/* ==========================================================================
   1. VARIABLES & CORE SETTINGS (SCALED UP)
   ========================================================================== */
:root {
    --primary: #4f46e5;         /* Indigo modern */
    --primary-hover: #4338ca;
    --primary-light: #eef2ff;
    --dark: #0f172a;            /* Slate 900 (Sidebar) */
    --dark-hover: #1e293b;      /* Slate 800 */
    --text-main: #334155;       /* Slate 700 */
    --text-muted: #64748b;      /* Slate 500 */
    --bg-main: #f1f5f9;         /* Slate 100 (Lebih kontras) */
    --bg-card: #ffffff;
    --border-color: #cbd5e1;    /* Slate 300 (Garis lebih tegas) */
    
    /* Status Colors */
    --success: #10b981;         
    --success-light: #ecfdf5;
    --warning: #f59e0b;         
    --warning-light: #fffbeb;
    --danger: #ef4444;          
    --danger-light: #fef2f2;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: Inter, system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   2. AUTHENTICATION PAGE (LOGIN)
   ========================================================================== */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: radial-gradient(circle at top right, #e0e7ff 0%, var(--bg-main) 70%);
}

.login-container {
    background-color: var(--bg-card);
    padding: 48px; /* Diperbesar dari 40px */
    border-radius: 20px; /* Lebih rounded */
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border: 1px solid var(--border-color);
    width: 100%;
    max-width: 460px; /* Diperbesar dari 420px */
}

.login-header {
    text-align: center;
    margin-bottom: 36px;
}

.login-header h2 {
    color: var(--dark);
    font-size: 32px; /* Diperbesar dari 28px */
    font-weight: 800;
    letter-spacing: -0.75px;
    margin-bottom: 12px;
}

.login-header p {
    color: var(--text-muted);
    font-size: 16px; /* Diperbesar dari 14px */
}

/* ==========================================================================
   3. REUSABLE FORM CONTROLS (BIGGER & CRISP)
   ========================================================================== */
.form-group {
    margin-bottom: 24px; /* Diperbesar */
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 15px; /* Diperbesar dari 13px */
    color: var(--dark);
}

.form-group input, 
.form-group textarea, 
.form-group select {
    width: 100%;
    padding: 14px 18px; /* Diperbesar */
    border: 1px solid var(--border-color);
    border-radius: 10px; /* Lebih proporsional */
    font-size: 16px; /* Diperbesar dari 14px */
    color: var(--dark);
    background-color: #fff;
    transition: all 0.2s ease-in-out;
    outline: none;
}

.form-group input:focus, 
.form-group textarea:focus, 
.form-group select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 5px rgba(79, 70, 229, 0.15);
}

/* Buttons */
.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 14px 20px; /* Diperbesar */
    background-color: var(--primary);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 16px; /* Diperbesar dari 14px */
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn:hover {
    background-color: var(--primary-hover);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

.btn:active {
    transform: scale(0.97);
}

/* Alerts */
.alert {
    background-color: var(--danger-light);
    border: 1px solid #fca5a5;
    color: #b91c1c;
    padding: 14px 20px;
    border-radius: 10px;
    font-size: 14px;
    margin-bottom: 28px;
    font-weight: 500;
    text-align: center;
}

/* ==========================================================================
   4. LAYOUT SYSTEM: SIDEBAR + MAIN AREA (EXPANDED)
   ========================================================================== */
.wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* Sidebar Kiri */
.sidebar {
    width: 290px; /* Diperbesar dari 260px agar teks menu longgar */
    background-color: var(--dark);
    color: #f1f5f9;
    display: flex;
    flex-direction: column;
}

.sidebar-brand {
    padding: 32px 24px; /* Lebih tinggi */
    font-size: 22px; /* Diperbesar dari 18px */
    font-weight: 800;
    letter-spacing: -0.5px;
    text-align: center;
    border-bottom: 1px solid var(--dark-hover);
    color: #ffffff;
}

.sidebar-menu {
    list-style: none;
    padding: 32px 16px;
    flex: 1;
}

.sidebar-menu li {
    margin-bottom: 8px; /* Lebih berjarak */
}

.sidebar-menu li a {
    display: block;
    padding: 14px 20px; /* Ruang klik lebih besar */
    color: #94a3b8;
    text-decoration: none;
    font-size: 16px; /* Menu lebih terbaca jelas */
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.sidebar-menu li a:hover, 
.sidebar-menu li.active a {
    background-color: var(--dark-hover);
    color: #ffffff;
}

.sidebar-menu li.active a {
    background-color: var(--primary);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
}

/* Main Content (Kanan) */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Top Navigation / Header */
.top-header {
    background-color: var(--bg-card);
    height: 75px; /* Naik dari 64px */
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 0 40px;
    border-bottom: 1px solid var(--border-color);
}

.user-profile {
    font-size: 16px; /* Lebih besar */
    color: var(--text-main);
}

/* Container Konten Dashboard */
.content-body {
    padding: 40px; /* Ruang luar konten lebih longgar */
    max-width: 1600px; /* Mengakomodasi monitor lebar */
    width: 100%;
    margin: 0 auto;
}

/* ==========================================================================
   5. UI COMPONENTS: CARDS, TABLES & BADGES (LARGE)
   ========================================================================== */
.card {
    background: var(--bg-card);
    padding: 36px; /* Area dalam card jauh lebih lega */
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    margin-bottom: 32px;
}

.card h2 {
    font-size: 26px; /* Judul selamat datang lebih megah */
    font-weight: 800;
    color: var(--dark);
    letter-spacing: -0.5px;
}

.card h3 {
    font-size: 20px; /* Judul tabel/section */
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 8px;
}

/* Tables dengan Spacing Longgar */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    margin-top: 24px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    text-align: left;
}

th {
    background-color: #f8fafc;
    color: var(--dark);
    font-weight: 700;
    padding: 16px 20px; /* Padding th naik */
    font-size: 14px;
    border-bottom: 1px solid var(--border-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

td {
    padding: 20px; /* Ruang baris tabel sangat luas dan eksklusif */
    font-size: 15px;
    color: var(--text-main);
    border-bottom: 1px solid var(--border-color);
    line-height: 1.5;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background-color: #f8fafc;
}

/* Badges Status */
.badge {
    padding: 6px 12px; /* Badge lebih tebal */
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
}

/* Link Aksi */
.btn-aksi {
    padding: 8px 16px; /* Tombol periksa diperbesar */
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    color: var(--primary);
    background-color: var(--primary-light);
    transition: all 0.2s ease;
    display: inline-block;
}

.btn-aksi:hover {
    background-color: var(--primary);
    color: #ffffff;
    box-shadow: 0 4px 8px rgba(79, 70, 229, 0.15);
}

/* Grid untuk Summary Cards */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

/* Komponen Profil Header */
.profile-hero {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: white;
    padding: 36px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}
.profile-info h2 {
    color: #ffffff !important;
    font-size: 28px;
    margin-bottom: 6px;
}
.profile-info p {
    color: #94a3b8;
    font-size: 16px;
}
.profile-badge {
    background-color: rgba(79, 70, 229, 0.2);
    border: 1px solid #6366f1;
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    color: #e0e7ff;
}

/* Stat Card Style */
.stat-card {
    background: #ffffff;
    padding: 24px 32px;
    border-radius: 16px;
    border: 1px solid #cbd5e1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}
.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
}
.stat-card.blue::before { background-color: #3b82f6; }
.stat-card.amber::before { background-color: #f59e0b; }
.stat-card.emerald::before { background-color: #10b981; }

.stat-title {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    color: #64748b;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}
.stat-value {
    font-size: 36px;
    font-weight: 800;
    color: #0f172a;
}