/* ============================================================
   SJ Celiz Loan Management System — Main Stylesheet
   Font: Plus Jakarta Sans | JetBrains Mono
   Palette: Deep Navy + Emerald + Warm Amber
   ============================================================ */

:root {
    /* Core Palette */
    --navy-900: #0a0e1a;
    --navy-800: #0f1629;
    --navy-700: #162040;
    --navy-600: #1e2d55;
    --navy-500: #243668;
    --navy-400: #3a5088;
    --navy-200: #8da3c8;
    --navy-100: #c8d5eb;
    --navy-50:  #eef2f9;

    --emerald-600: #059669;
    --emerald-500: #10b981;
    --emerald-400: #34d399;
    --emerald-100: #d1fae5;
    --emerald-50:  #ecfdf5;

    --amber-600: #d97706;
    --amber-500: #f59e0b;
    --amber-400: #fbbf24;
    --amber-100: #fef3c7;
    --amber-50:  #fffbeb;

    --red-600: #dc2626;
    --red-500: #ef4444;
    --red-100: #fee2e2;
    --red-50:  #fef2f2;

    --blue-500: #3b82f6;
    --blue-100: #dbeafe;

    /* Layout */
    --sidebar-w: 260px;
    --topbar-h: 64px;

    /* Background */
    --bg-app:     #f0f4fb;
    --bg-card:    #ffffff;
    --bg-sidebar: var(--navy-800);

    /* Text */
    --text-primary:   #0f172a;
    --text-secondary: #475569;
    --text-muted:     #94a3b8;
    --text-inverse:   #ffffff;

    /* Borders */
    --border:     #e2e8f0;
    --border-md:  #cbd5e1;

    /* Shadow */
    --shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
    --shadow-md: 0 4px 16px rgba(0,0,0,.08);
    --shadow-lg: 0 8px 32px rgba(0,0,0,.12);

    /* Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;

    /* Transitions */
    --transition: 0.2s ease;
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 15px; scroll-behavior: smooth; }

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background: var(--bg-app);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; }
button { cursor: pointer; border: none; background: none; }

/* ── Sidebar ── */
.sidebar {
    width: var(--sidebar-w);
    min-height: 100vh;
    background: var(--bg-sidebar);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 200;
    transition: transform var(--transition);
    overflow-y: auto;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 20px 16px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.brand-icon {
    width: 40px; height: 40px;
    background: linear-gradient(135deg, var(--emerald-500), var(--emerald-600));
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(16,185,129,.35);
}

.brand-text { display: flex; flex-direction: column; }
.brand-name { font-size: 15px; font-weight: 700; color: white; letter-spacing: -.01em; }
.brand-sub  { font-size: 10px; font-weight: 500; color: var(--navy-200); text-transform: uppercase; letter-spacing: .06em; }

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-section-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--navy-200);
    padding: 12px 8px 4px;
    margin-top: 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--navy-100);
    font-size: 14px;
    font-weight: 500;
    transition: all var(--transition);
    position: relative;
}

.nav-item:hover {
    background: rgba(255,255,255,.08);
    color: white;
}

.nav-item.active {
    background: linear-gradient(135deg, rgba(16,185,129,.25), rgba(16,185,129,.1));
    color: var(--emerald-400);
    border-left: 3px solid var(--emerald-400);
    padding-left: 9px;
}

.nav-item i { width: 18px; text-align: center; font-size: 15px; }
.nav-item span { flex: 1; }

.nav-badge {
    background: var(--red-500);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 20px;
    min-width: 20px;
    text-align: center;
}

.sidebar-footer {
    padding: 12px;
    border-top: 1px solid rgba(255,255,255,.08);
}

.user-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,.06);
}

.user-avatar-sm {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--emerald-500), var(--navy-400));
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 700; color: white;
    flex-shrink: 0;
}

.user-info-sm { flex: 1; min-width: 0; }
.user-name-sm { display: block; font-size: 13px; font-weight: 600; color: white; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role-sm { display: block; font-size: 11px; color: var(--navy-200); text-transform: capitalize; }

.logout-btn {
    color: var(--navy-200);
    font-size: 15px;
    padding: 4px;
    border-radius: 6px;
    transition: color var(--transition);
}
.logout-btn:hover { color: var(--red-500); }

/* ── Main Wrapper ── */
.main-wrapper {
    flex: 1;
    margin-left: var(--sidebar-w);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left var(--transition);
}

/* ── Top Bar ── */
.topbar {
    height: var(--topbar-h);
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 24px;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.menu-toggle {
    display: none;
    font-size: 18px;
    color: var(--text-secondary);
    padding: 8px;
    border-radius: 8px;
    transition: background var(--transition);
}
.menu-toggle:hover { background: var(--bg-app); }

.topbar-title h1 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    flex: 1;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.topbar-btn {
    width: 36px; height: 36px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-secondary);
    background: var(--bg-app);
    font-size: 16px;
    position: relative;
    transition: all var(--transition);
}
.topbar-btn:hover { background: var(--navy-50); color: var(--text-primary); }

.alert-dot {
    position: absolute;
    top: -2px; right: -2px;
    width: 16px; height: 16px;
    background: var(--red-500);
    color: white;
    font-size: 9px;
    font-weight: 700;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid white;
}

.user-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--emerald-500), var(--navy-400));
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 700; color: white;
}

/* ── Page Content ── */
.page-content {
    flex: 1;
    padding: 24px;
    max-width: 1400px;
    width: 100%;
}

/* ── Flash Messages ── */
.flash-message {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    margin: 0 24px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    transition: opacity .4s;
}
.flash-message button { margin-left: auto; color: inherit; font-size: 14px; opacity: .7; }
.flash-message button:hover { opacity: 1; }
.flash-success { background: var(--emerald-50); color: var(--emerald-600); border: 1px solid var(--emerald-100); }
.flash-error   { background: var(--red-50); color: var(--red-600); border: 1px solid var(--red-100); }
.flash-info    { background: var(--blue-100); color: #1e40af; border: 1px solid #bfdbfe; }
.flash-warning { background: var(--amber-50); color: var(--amber-600); border: 1px solid var(--amber-100); }

/* ── Cards ── */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.card-header {
    padding: 18px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.card-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-title i { color: var(--emerald-500); }

.card-body { padding: 24px; }

/* ── Stat Cards ── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.stat-icon.emerald { background: var(--emerald-50); color: var(--emerald-600); }
.stat-icon.blue    { background: var(--blue-100); color: #1d4ed8; }
.stat-icon.amber   { background: var(--amber-50); color: var(--amber-600); }
.stat-icon.red     { background: var(--red-50); color: var(--red-600); }
.stat-icon.navy    { background: var(--navy-50); color: var(--navy-600); }

.stat-info { flex: 1; }
.stat-label { font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }
.stat-value { font-size: 22px; font-weight: 800; color: var(--text-primary); font-family: 'JetBrains Mono', monospace; letter-spacing: -.02em; }
.stat-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.stat-card.overdue-card {
    border-left: 4px solid var(--red-500);
}
.stat-card.paid-card {
    border-left: 4px solid var(--emerald-500);
}

/* ── Tables ── */
.table-wrap { overflow-x: auto; }

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

thead th {
    background: var(--navy-50);
    padding: 11px 16px;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

tbody tr {
    border-bottom: 1px solid var(--border);
    transition: background var(--transition);
}
tbody tr:hover { background: var(--navy-50); }
tbody tr:last-child { border-bottom: none; }

tbody td {
    padding: 12px 16px;
    color: var(--text-primary);
    vertical-align: middle;
}

.td-mono {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    font-weight: 500;
}

.td-name { font-weight: 600; }
.td-muted { color: var(--text-muted); font-size: 13px; }

/* ── Badges ── */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    white-space: nowrap;
}

.badge-active   { background: var(--emerald-50); color: var(--emerald-600); }
.badge-paid     { background: var(--blue-100); color: #1d4ed8; }
.badge-overdue  { background: var(--red-50); color: var(--red-600); }
.badge-pending  { background: var(--amber-50); color: var(--amber-600); }
.badge-inactive { background: var(--navy-50); color: var(--text-secondary); }

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px;
    border-radius: var(--radius-sm);
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all var(--transition);
    white-space: nowrap;
    line-height: 1;
}

.btn-primary {
    background: var(--navy-700);
    color: white;
}
.btn-primary:hover { background: var(--navy-600); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(22,32,64,.25); }

.btn-success {
    background: var(--emerald-500);
    color: white;
}
.btn-success:hover { background: var(--emerald-600); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(16,185,129,.3); }

.btn-warning {
    background: var(--amber-500);
    color: white;
}
.btn-warning:hover { background: var(--amber-600); }

.btn-danger {
    background: var(--red-500);
    color: white;
}
.btn-danger:hover { background: var(--red-600); }

.btn-outline {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-md);
}
.btn-outline:hover { background: var(--bg-app); color: var(--text-primary); }

.btn-sm { padding: 6px 12px; font-size: 12px; gap: 5px; }
.btn-lg { padding: 12px 24px; font-size: 15px; }

.btn-icon {
    width: 34px; height: 34px;
    padding: 0;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 8px;
}

.btn-group { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── Forms ── */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group.full { grid-column: 1 / -1; }

label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
}

label .req { color: var(--red-500); }

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="date"],
input[type="password"],
input[type="search"],
select,
textarea {
    padding: 10px 13px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 14px;
    color: var(--text-primary);
    background: white;
    transition: border-color var(--transition), box-shadow var(--transition);
    width: 100%;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--emerald-500);
    box-shadow: 0 0 0 3px rgba(16,185,129,.12);
}

input::placeholder, textarea::placeholder { color: var(--text-muted); }

textarea { resize: vertical; min-height: 90px; }

.input-group {
    display: flex;
    align-items: stretch;
}

.input-group input {
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    flex: 1;
}

.input-group .input-addon {
    padding: 0 13px;
    background: var(--navy-50);
    border: 1.5px solid var(--border);
    border-left: none;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
}

.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ── Page Header ── */
.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.page-header h2 {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-primary);
}

.page-header p {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ── Search / Filter Bar ── */
.filter-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    align-items: center;
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 200px;
}

.search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 14px;
}

.search-box input {
    padding-left: 36px;
}

/* ── QR Code ── */
.qr-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.qr-wrap canvas, .qr-wrap img {
    border: 6px solid white;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
}

.qr-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--text-muted);
}

/* ── Scanner Box ── */
.scanner-box {
    background: var(--navy-900);
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    aspect-ratio: 1;
    max-width: 380px;
    margin: 0 auto;
}

.scanner-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: rgba(255,255,255,.6);
    font-size: 13px;
    text-align: center;
    padding: 24px;
    z-index: 2;
}

.scanner-corners {
    position: absolute;
    inset: 24px;
    z-index: 3;
    pointer-events: none;
}

.corner {
    position: absolute;
    width: 24px; height: 24px;
    border-color: var(--emerald-400);
    border-style: solid;
}
.corner-tl { top: 0; left: 0; border-width: 3px 0 0 3px; border-radius: 3px 0 0 0; }
.corner-tr { top: 0; right: 0; border-width: 3px 3px 0 0; border-radius: 0 3px 0 0; }
.corner-bl { bottom: 0; left: 0; border-width: 0 0 3px 3px; border-radius: 0 0 0 3px; }
.corner-br { bottom: 0; right: 0; border-width: 0 3px 3px 0; border-radius: 0 0 3px 0; }

.scanner-line {
    position: absolute;
    left: 24px; right: 24px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--emerald-400), transparent);
    animation: scanline 2s ease-in-out infinite;
    z-index: 4;
}

@keyframes scanline {
    0%, 100% { top: 24px; }
    50% { top: calc(100% - 26px); }
}

/* ── Debtor Profile ── */
.debtor-profile {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.debtor-avatar {
    width: 72px; height: 72px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--navy-600), var(--emerald-600));
    display: flex; align-items: center; justify-content: center;
    font-size: 28px; font-weight: 800; color: white;
    flex-shrink: 0;
    box-shadow: var(--shadow-md);
}

.debtor-info h3 {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
}

.debtor-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 6px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: var(--text-secondary);
}

.meta-item i { color: var(--text-muted); width: 14px; }

/* ── Detail Grid ── */
.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.detail-item { }
.detail-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); margin-bottom: 2px; }
.detail-value { font-size: 14px; font-weight: 600; color: var(--text-primary); }

/* ── Loan Progress ── */
.loan-progress {
    margin-top: 8px;
}

.progress-bar-wrap {
    height: 8px;
    background: var(--navy-50);
    border-radius: 20px;
    overflow: hidden;
    margin-top: 6px;
}

.progress-bar-fill {
    height: 100%;
    border-radius: 20px;
    background: linear-gradient(90deg, var(--emerald-500), var(--emerald-400));
    transition: width .6s ease;
}

.progress-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ── Empty State ── */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 40px;
    margin-bottom: 12px;
    opacity: .4;
    display: block;
}

.empty-state h4 { font-size: 16px; color: var(--text-secondary); margin-bottom: 6px; }
.empty-state p { font-size: 13px; }

/* ── Settings ── */
.settings-tabs {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: var(--bg-app);
    border-radius: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.settings-tab {
    flex: 1;
    min-width: 100px;
    padding: 9px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
}

.settings-tab:hover { color: var(--text-primary); }
.settings-tab.active { background: white; color: var(--navy-700); box-shadow: var(--shadow-sm); }

/* ── Quick Actions ── */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.quick-action {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
    color: var(--text-primary);
}

.quick-action:hover {
    border-color: var(--emerald-400);
    background: var(--emerald-50);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.quick-action i {
    font-size: 22px;
    width: 48px; height: 48px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
}

.quick-action .qa-label { font-size: 13px; font-weight: 600; }

/* ── Sidebar Overlay (mobile) ── */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 150;
    backdrop-filter: blur(2px);
}

/* ── Login Page ── */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy-700) 50%, var(--navy-600) 100%);
    padding: 24px;
}

.login-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 24px 80px rgba(0,0,0,.35);
}

.login-logo {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
}

.login-logo .logo-icon {
    width: 52px; height: 52px;
    background: linear-gradient(135deg, var(--emerald-500), var(--navy-600));
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 24px; color: white;
    box-shadow: 0 8px 24px rgba(16,185,129,.3);
}

.login-logo h2 { font-size: 18px; font-weight: 800; line-height: 1.2; }
.login-logo h2 span { display: block; font-size: 12px; font-weight: 500; color: var(--text-muted); }

.login-card h3 { font-size: 22px; font-weight: 800; margin-bottom: 6px; }
.login-card p { font-size: 14px; color: var(--text-muted); margin-bottom: 24px; }

/* ── Responsive ── */
@media (max-width: 900px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-overlay.open {
        display: block;
    }

    .main-wrapper {
        margin-left: 0;
    }

    .menu-toggle { display: flex; }
    .page-content { padding: 16px; }
    .topbar { padding: 0 16px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .quick-actions { grid-template-columns: repeat(2, 1fr); }
    .form-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .page-header { flex-direction: column; }
    .card-header { flex-direction: column; align-items: flex-start; }
    .btn-group { flex-direction: column; }
}

/* ── Utilities ── */
.text-success { color: var(--emerald-600) !important; }
.text-danger  { color: var(--red-600) !important; }
.text-warning { color: var(--amber-600) !important; }
.text-muted   { color: var(--text-muted) !important; }
.text-right   { text-align: right; }
.text-center  { text-align: center; }
.fw-bold      { font-weight: 700; }
.fw-semibold  { font-weight: 600; }
.mt-0  { margin-top: 0; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.w-100  { width: 100%; }
.hr { border: none; border-top: 1px solid var(--border); margin: 20px 0; }
.mono { font-family: 'JetBrains Mono', monospace; }

/* ── v2 Additions ── */
.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}
.pg-info { font-size: 13px; color: var(--text-muted); }
.pg-btns { display: flex; gap: 6px; flex-wrap: wrap; }
