/* ==========================================
   RESET & VARIABEL UTAMA (THEME STYLING)
   ================================---------- */
:root {
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --success: #22c55e;
    --danger: #ef4444;
    --danger-dark: #dc2626;
    --warning: #f59e0b;
    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --radius: 8px;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

/* ==========================================
   HEADER & NAVBAR
   ================================---------- */
header {
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    padding: 0 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

header .brand h1 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -0.025em;
}

nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

nav a {
    color: var(--text-muted);
    text-decoration: none;
    padding: 8px 14px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

nav a:hover {
    color: var(--primary);
    background-color: #f1f5f9;
}

nav a.active {
    color: var(--primary);
    background-color: #e0e7ff;
    font-weight: 600;
}

nav a.btn-logout {
    color: var(--danger);
    margin-left: 10px;
}

nav a.btn-logout:hover {
    background-color: #fee2e2;
    color: var(--danger-dark);
}

/* ==========================================
   CONTAINER & LAYOUT
   ================================---------- */
.container {
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 24px;
}

.section-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 5px;
    letter-spacing: -0.02em;
}

.section-desc {
    color: var(--text-muted);
    font-size: 14px;
    margin-top: 0;
    margin-bottom: 25px;
}

/* ==========================================
   CARDS & STATS
   ================================---------- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 35px;
}

.card {
    background: var(--bg-card);
    padding: 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.card h3 {
    margin: 0 0 8px 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.card .number {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-main);
    margin: 0 0 16px 0;
    letter-spacing: -0.03em;
}

/* ==========================================
   BUTTONS
   ================================---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    background-color: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn:hover {
    background-color: var(--primary-dark);
}

.btn-danger {
    background-color: var(--danger);
}

.btn-danger:hover {
    background-color: var(--danger-dark);
}

/* ==========================================
   TABLES
   ================================---------- */
.table-responsive {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    overflow-x: auto;
    margin-top: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    white-space: nowrap;
}

th, td {
    padding: 14px 20px;
    font-size: 14px;
    border-bottom: 1px solid var(--border-color);
}

th {
    background-color: #f8fafc;
    font-weight: 600;
    color: var(--text-muted);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

tr:last-child td {
    border-bottom: none;
}

tbody tr:hover {
    background-color: #f8fafc;
}

/* ==========================================
   BADGES
   ================================---------- */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-danger {
    background-color: #fee2e2;
    color: #991b1b;
}

.badge-success {
    background-color: #dcfce7;
    color: #166534;
}

/* ==========================================
   FORMS & INPUTS
   ================================---------- */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
    color: var(--text-main);
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 14px;
    background-color: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* ==========================================
   FOOTER
   ================================---------- */
footer {
    text-align: center;
    padding: 30px;
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 60px;
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-card);
}