/* ============================================================
   ISP Platform — Premium Dashboard Design
   Dark sidebar + tinted stat cards + mesh gradients
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@500;600;700;800&display=swap');

:root {
    /* Brand */
    --brand:        #7c3aed;
    --brand-50:     #f5f3ff;
    --brand-100:    #ede9fe;
    --brand-200:    #ddd6fe;
    --brand-500:    #8b5cf6;
    --brand-600:    #7c3aed;
    --brand-700:    #6d28d9;
    --brand-grad:   linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #d946ef 100%);
    --brand-grad-soft: linear-gradient(135deg, #eef2ff 0%, #f5f3ff 100%);

    /* Status */
    --success:    #10b981;
    --success-50: #ecfdf5;
    --success-100:#d1fae5;
    --warning:    #f59e0b;
    --warning-50: #fffbeb;
    --warning-100:#fef3c7;
    --danger:     #ef4444;
    --danger-50:  #fef2f2;
    --danger-100: #fee2e2;
    --info:       #3b82f6;
    --info-50:    #eff6ff;
    --info-100:   #dbeafe;

    /* Surfaces */
    --bg:        #f7f8fb;
    --bg-elev:   #ffffff;
    --bg-soft:   #fafbfc;
    --border:    #eef0f4;
    --border-md: #e2e6ec;
    --border-strong: #cbd2dc;
    --text:      #0b1020;
    --text-2:    #1f2937;
    --text-muted:#5b6478;
    --text-soft: #98a0af;

    /* Sidebar — dark navy */
    --sb-width:    260px;
    --sb-bg:       #0d1117;
    --sb-bg-2:     #0a0e14;
    --sb-text:     #c9d1d9;
    --sb-text-muted: #6b7385;
    --sb-border:   rgba(255,255,255,0.06);
    --sb-hover:    rgba(255,255,255,0.04);
    --sb-active:   rgba(124,58,237,0.18);

    /* Layout */
    --topbar-h: 68px;
    --r-sm:  8px;
    --r:     14px;
    --r-lg:  18px;
    --r-xl:  24px;

    /* Shadows */
    --sh-sm:  0 1px 2px rgba(11,16,32,.04), 0 1px 3px rgba(11,16,32,.05);
    --sh:     0 4px 12px -2px rgba(11,16,32,.06), 0 2px 4px -2px rgba(11,16,32,.04);
    --sh-lg:  0 16px 40px -12px rgba(11,16,32,.12), 0 6px 16px -6px rgba(11,16,32,.08);
    --sh-glow:0 8px 24px rgba(124,58,237,.28);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html, body {
    margin: 0; padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body {
    background-image:
        radial-gradient(1200px circle at 0% -10%, rgba(124,58,237,0.06), transparent 50%),
        radial-gradient(1000px circle at 100% 0%, rgba(59,130,246,0.05), transparent 50%);
    background-attachment: fixed;
}

a { color: var(--brand); text-decoration: none; transition: color .15s; }
a:hover { color: var(--brand-700); }

h1, h2, h3, h4, h5 { font-family: 'Plus Jakarta Sans', 'Inter', sans-serif; letter-spacing: -0.01em; color: var(--text); }

.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }

/* ============================================================
   NAVBAR (top)
   ============================================================ */
.navbar {
    position: sticky; top: 0;
    z-index: 1030;
    height: var(--topbar-h);
    background: rgba(255,255,255,0.78);
    border-bottom: 1px solid var(--border);
    padding: 0 28px;
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
}

.navbar-brand {
    display: flex !important;
    align-items: center;
    gap: 12px;
    color: var(--text) !important;
    padding: 0 !important;
    font-weight: 700;
}

.brand-icon {
    width: 40px; height: 40px;
    border-radius: 12px;
    background: var(--brand-grad);
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    font-size: 19px;
    box-shadow: 0 8px 18px rgba(124,58,237,.3), inset 0 -2px 4px rgba(0,0,0,.15), inset 0 2px 4px rgba(255,255,255,.25);
}

.brand-text-main {
    display: block;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 15.5px; font-weight: 800;
    color: var(--text); line-height: 1.1;
    letter-spacing: -0.01em;
}
.brand-text-sub {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 0.02em;
    margin-top: 2px;
}

.sidebar-toggle-btn {
    width: 38px; height: 38px;
    border-radius: 10px;
    background: var(--bg-elev);
    border: 1px solid var(--border-md);
    color: var(--text);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 18px; cursor: pointer;
    transition: .15s ease;
    box-shadow: var(--sh-sm);
}
.sidebar-toggle-btn:hover { background: var(--brand-50); border-color: var(--brand-200); color: var(--brand-700); }

.navbar .nav-link {
    color: var(--text) !important;
    font-weight: 500;
    border-radius: 10px;
    padding: 8px 12px !important;
    transition: .15s ease;
}
.navbar .nav-link:hover { background: var(--bg); }

.user-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--brand-grad);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 14px;
    box-shadow: 0 2px 8px rgba(124,58,237,.32), inset 0 -1px 3px rgba(0,0,0,.18);
}

.dropdown-menu {
    border: 1px solid var(--border);
    border-radius: var(--r);
    box-shadow: var(--sh-lg);
    padding: 8px;
    min-width: 248px;
    background: var(--bg-elev);
}
.dropdown-item {
    border-radius: 8px;
    font-size: 13.5px; font-weight: 500;
    padding: 9px 12px !important;
    color: var(--text) !important;
    transition: .12s ease;
}
.dropdown-item:hover { background: var(--brand-50); color: var(--brand-700) !important; }
.dropdown-item.text-danger { color: var(--danger) !important; }
.dropdown-item.text-danger:hover { background: var(--danger-50); }
.dropdown-divider { border-color: var(--border); margin: 4px 0; }

/* ============================================================
   SIDEBAR (dark)
   ============================================================ */
.sidebar {
    position: fixed;
    top: var(--topbar-h);
    bottom: 0; left: 0;
    width: var(--sb-width);
    background: linear-gradient(180deg, var(--sb-bg) 0%, var(--sb-bg-2) 100%);
    color: var(--sb-text);
    overflow-y: auto;
    padding: 20px 14px;
    z-index: 1020;
    transition: transform .25s ease;
    border-right: 1px solid var(--sb-border);
}

.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.08); border-radius: 4px; }

.sidebar-logo {
    display: flex; align-items: center; gap: 12px;
    padding: 4px 8px 18px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--sb-border);
}
.sidebar-logo .brand-icon { width: 36px; height: 36px; font-size: 17px; border-radius: 10px; }
.sidebar-logo-text { display: flex; flex-direction: column; }
.sidebar-logo-name {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 800; color: #fff;
    font-size: 14.5px;
    letter-spacing: -0.01em;
}
.sidebar-logo-sub { font-size: 10.5px; color: var(--sb-text-muted); font-weight: 600; }

.sidebar-header { padding: 0 8px 14px; margin-bottom: 12px; border-bottom: 1px solid var(--sb-border); }

.sidebar-role-badge {
    display: inline-flex; align-items: center; gap: 6px;
    background: rgba(124,58,237,.18);
    border: 1px solid rgba(124,58,237,.28);
    color: #c4b5fd;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 10.5px; font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 10px;
}
.sidebar-user-name { font-size: 13.5px; font-weight: 600; color: #fff; line-height: 1.3; }

.sidebar-section { margin-bottom: 6px; }
.sidebar-section-label {
    font-size: 10.5px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.1em;
    color: var(--sb-text-muted);
    padding: 10px 12px 6px;
}

.sidebar-item {
    position: relative;
    display: flex; align-items: center; gap: 11px;
    padding: 9px 12px;
    border-radius: 10px;
    color: var(--sb-text);
    font-size: 13.5px; font-weight: 500;
    text-decoration: none;
    transition: .15s ease;
    margin-bottom: 2px;
}
.sidebar-item:hover { background: var(--sb-hover); color: #fff; }
.sidebar-item.active {
    background: var(--sb-active);
    color: #fff;
    font-weight: 600;
    box-shadow: inset 0 0 0 1px rgba(124,58,237,.3);
}
.sidebar-item.active::before {
    content: '';
    position: absolute;
    left: -2px; top: 50%; transform: translateY(-50%);
    width: 3px; height: 18px;
    background: var(--brand-grad);
    border-radius: 2px;
    box-shadow: 0 0 8px rgba(124,58,237,.5);
}
.sidebar-item i { font-size: 16px; width: 20px; text-align: center; opacity: .85; }
.sidebar-item.active i { opacity: 1; }

.sidebar-divider { height: 1px; background: var(--sb-border); margin: 12px 8px; }

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.main-content {
    min-height: calc(100vh - var(--topbar-h));
    padding: 0;
}
.main-content.with-sidebar { margin-left: var(--sb-width); }

.content-wrapper {
    padding: 32px 36px 96px;
    max-width: 1440px;
    margin: 0 auto;
}

/* Page header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 28px;
    flex-wrap: wrap; gap: 14px;
}
.page-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 26px; font-weight: 800;
    color: var(--text); margin: 0;
    line-height: 1.2;
    letter-spacing: -0.02em;
    display: flex; align-items: center; gap: 14px;
}
.page-title i {
    color: var(--brand-700);
    background: var(--brand-100);
    padding: 9px;
    border-radius: 12px;
    font-size: 22px;
    box-shadow: inset 0 -2px 0 rgba(124,58,237,.12);
}
.page-subtitle { font-size: 13.5px; color: var(--text-muted); margin-top: 6px; font-weight: 500; }

/* ============================================================
   CARDS
   ============================================================ */
.card {
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--r);
    box-shadow: var(--sh-sm);
    overflow: hidden;
    transition: .2s ease;
}
.card-header {
    padding: 18px 22px;
    background: transparent;
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; flex-wrap: wrap;
}
.card-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 15px; font-weight: 700;
    color: var(--text); margin: 0;
    display: flex; align-items: center; gap: 10px;
    letter-spacing: -0.005em;
}
.card-title i { color: var(--brand); font-size: 17px; }
.card-body { padding: 22px; }
.card-footer {
    padding: 14px 22px;
    background: var(--bg-soft);
    border-top: 1px solid var(--border);
    display: flex; gap: 8px; flex-wrap: wrap;
}

.hover-lift { transition: .25s cubic-bezier(.4,0,.2,1); }
.hover-lift:hover {
    transform: translateY(-3px);
    box-shadow: var(--sh-lg);
    border-color: var(--brand-200);
}

/* ============================================================
   STAT CARDS — colored, with decorative gradient blob
   ============================================================ */
.stat-card {
    position: relative;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--r);
    box-shadow: var(--sh-sm);
    padding: 22px;
    transition: .25s cubic-bezier(.4,0,.2,1);
    overflow: hidden;
}
.stat-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--card-tint, transparent);
    opacity: .55;
    pointer-events: none;
}
.stat-card > * { position: relative; z-index: 1; }
.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--sh-lg);
    border-color: var(--card-border, var(--border-strong));
}

.stat-card.tint-blue   { --card-tint: linear-gradient(135deg, rgba(59,130,246,.08), rgba(59,130,246,0)); --card-border: rgba(59,130,246,.25); }
.stat-card.tint-purple { --card-tint: linear-gradient(135deg, rgba(139,92,246,.10), rgba(139,92,246,0)); --card-border: rgba(139,92,246,.28); }
.stat-card.tint-teal   { --card-tint: linear-gradient(135deg, rgba(20,184,166,.10), rgba(20,184,166,0)); --card-border: rgba(20,184,166,.25); }
.stat-card.tint-orange { --card-tint: linear-gradient(135deg, rgba(245,158,11,.10), rgba(245,158,11,0)); --card-border: rgba(245,158,11,.25); }
.stat-card.tint-green  { --card-tint: linear-gradient(135deg, rgba(16,185,129,.10), rgba(16,185,129,0)); --card-border: rgba(16,185,129,.25); }
.stat-card.tint-pink   { --card-tint: linear-gradient(135deg, rgba(236,72,153,.10), rgba(236,72,153,0)); --card-border: rgba(236,72,153,.25); }

.stat-card .card-body { padding: 0; }

.stat-icon {
    width: 46px; height: 46px;
    border-radius: 12px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 20px;
    color: #fff;
    margin-bottom: 16px;
    box-shadow: 0 8px 16px -4px var(--icon-shadow, rgba(0,0,0,.15)), inset 0 -2px 4px rgba(0,0,0,.12), inset 0 2px 4px rgba(255,255,255,.18);
}
.icon-blue   { background: linear-gradient(135deg, #60a5fa, #2563eb); --icon-shadow: rgba(37,99,235,.4); }
.icon-purple { background: linear-gradient(135deg, #a78bfa, #6d28d9); --icon-shadow: rgba(124,58,237,.4); }
.icon-teal   { background: linear-gradient(135deg, #2dd4bf, #0d9488); --icon-shadow: rgba(13,148,136,.4); }
.icon-orange { background: linear-gradient(135deg, #fbbf24, #d97706); --icon-shadow: rgba(217,119,6,.4); }
.icon-pink   { background: linear-gradient(135deg, #f472b6, #db2777); --icon-shadow: rgba(219,39,119,.4); }
.icon-green  { background: linear-gradient(135deg, #34d399, #059669); --icon-shadow: rgba(5,150,105,.4); }

.stat-value {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 32px; font-weight: 800;
    color: var(--text);
    line-height: 1;
    letter-spacing: -0.03em;
}
.stat-label {
    font-size: 12.5px;
    color: var(--text-muted);
    margin-top: 8px;
    font-weight: 600;
    letter-spacing: 0.01em;
}
.stat-trend {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 11.5px; font-weight: 700;
    margin-top: 10px;
    padding: 3px 10px;
    border-radius: 999px;
}
.stat-trend.up   { color: #047857; background: var(--success-100); }
.stat-trend.down { color: #b91c1c; background: var(--danger-100); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    border-radius: 10px;
    font-weight: 600;
    font-size: 13.5px;
    padding: 9px 16px;
    transition: .15s ease;
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    line-height: 1.2;
    letter-spacing: -0.005em;
}
.btn:focus { box-shadow: 0 0 0 3px var(--brand-100); outline: none; }

.btn-primary {
    background: var(--brand-grad);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 12px -2px rgba(124,58,237,.4), inset 0 -2px 4px rgba(0,0,0,.12), inset 0 1px 2px rgba(255,255,255,.18);
}
.btn-primary:hover { background: linear-gradient(135deg, #5b53e8, #7c3aed 50%, #c026d3); transform: translateY(-1px); box-shadow: 0 8px 20px -4px rgba(124,58,237,.45), inset 0 -2px 4px rgba(0,0,0,.12); color: #fff; }
.btn-primary:active { transform: translateY(0); }

.btn-light {
    background: var(--bg-elev);
    color: var(--text);
    border-color: var(--border-md);
    box-shadow: var(--sh-sm);
}
.btn-light:hover { background: var(--bg); border-color: var(--border-strong); }

.btn-warning { background: linear-gradient(135deg, #fbbf24, #d97706); color: #fff; border-color: transparent; box-shadow: 0 4px 12px -2px rgba(217,119,6,.35); }
.btn-warning:hover { color: #fff; transform: translateY(-1px); }

.btn-success { background: linear-gradient(135deg, #34d399, #059669); color: #fff; border-color: transparent; box-shadow: 0 4px 12px -2px rgba(5,150,105,.35); }
.btn-success:hover { color: #fff; transform: translateY(-1px); }

.btn-danger { background: linear-gradient(135deg, #f87171, #dc2626); color: #fff; border-color: transparent; box-shadow: 0 4px 12px -2px rgba(220,38,38,.35); }
.btn-danger:hover { color: #fff; transform: translateY(-1px); }

.btn-outline-primary { background: var(--bg-elev); color: var(--brand-700); border-color: var(--border-md); }
.btn-outline-primary:hover { background: var(--brand-50); border-color: var(--brand-200); color: var(--brand-700); }

.btn-outline-warning { background: var(--bg-elev); color: var(--warning); border-color: var(--border-md); }
.btn-outline-warning:hover { background: var(--warning-50); border-color: var(--warning); color: #b45309; }

.btn-outline-danger { background: var(--bg-elev); color: var(--danger); border-color: var(--border-md); }
.btn-outline-danger:hover { background: var(--danger-50); border-color: var(--danger); color: #991b1b; }

.btn-outline-secondary { background: var(--bg-elev); color: var(--text-muted); border-color: var(--border-md); }
.btn-outline-secondary:hover { background: var(--bg); }

.btn-sm { padding: 5px 11px; font-size: 12px; border-radius: 8px; gap: 5px; }
.btn-lg { padding: 13px 26px; font-size: 15px; border-radius: 12px; }

/* ============================================================
   FORMS
   ============================================================ */
.form-label { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 6px; display: block; letter-spacing: -0.005em; }

.form-control, .form-select {
    border: 1px solid var(--border-md);
    border-radius: 10px;
    padding: 10px 13px;
    font-size: 13.5px;
    color: var(--text);
    background: var(--bg-elev);
    transition: .15s ease;
    width: 100%;
    font-family: inherit;
    box-shadow: var(--sh-sm);
}
.form-control:focus, .form-select:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px var(--brand-100);
    outline: none;
}
.form-control:hover, .form-select:hover { border-color: var(--border-strong); }

textarea.form-control { min-height: 110px; resize: vertical; line-height: 1.5; }
.form-text { font-size: 12px; color: var(--text-muted); margin-top: 5px; }

.form-section {
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 18px 20px;
    margin-bottom: 16px;
}
.form-section-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 12px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 14px;
    display: flex; align-items: center; gap: 7px;
}
.form-section-title i { color: var(--brand); }

/* ============================================================
   TABLES
   ============================================================ */
.table { margin: 0; font-size: 13.5px; width: 100%; border-collapse: separate; border-spacing: 0; }
.table thead { background: var(--bg-soft); }
.table thead th {
    border-bottom: 1px solid var(--border);
    border-top: none;
    padding: 13px 22px;
    font-size: 11.5px; font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    text-align: left;
}
.table tbody td {
    padding: 14px 22px;
    border-top: 1px solid var(--border);
    color: var(--text);
    vertical-align: middle;
}
.table-hover tbody tr { transition: background-color .12s; }
.table-hover tbody tr:hover { background: var(--bg-soft); }
.table tbody tr:first-child td { border-top: 0; }

/* ============================================================
   BADGES
   ============================================================ */
.badge {
    font-weight: 700;
    font-size: 11px;
    padding: 4px 11px;
    border-radius: 999px;
    letter-spacing: 0.02em;
    display: inline-flex; align-items: center; gap: 4px;
}
.bg-primary  { background: var(--brand-100) !important; color: var(--brand-700) !important; }
.bg-success  { background: var(--success-100) !important; color: #047857 !important; }
.bg-warning  { background: var(--warning-100) !important; color: #b45309 !important; }
.bg-danger   { background: var(--danger-100) !important; color: #b91c1c !important; }
.bg-info     { background: var(--info-100) !important; color: #1e40af !important; }
.bg-secondary { background: var(--bg) !important; color: var(--text-muted) !important; border: 1px solid var(--border-md); }

/* ============================================================
   ALERTS
   ============================================================ */
.alert {
    border: 1px solid transparent;
    border-radius: var(--r);
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13.5px;
    font-weight: 500;
    box-shadow: var(--sh-sm);
}
.alert i { font-size: 20px; flex-shrink: 0; }
.alert-success { background: linear-gradient(135deg, var(--success-50), #fff); color: #065f46; border-color: rgba(16,185,129,.25); }
.alert-success i { color: var(--success); }
.alert-danger  { background: linear-gradient(135deg, var(--danger-50), #fff); color: #991b1b; border-color: rgba(239,68,68,.25); }
.alert-danger i { color: var(--danger); }
.alert-warning { background: linear-gradient(135deg, var(--warning-50), #fff); color: #92400e; border-color: rgba(245,158,11,.25); }
.alert-warning i { color: var(--warning); }
.alert-info    { background: linear-gradient(135deg, var(--info-50), #fff); color: #1e40af; border-color: rgba(59,130,246,.25); }
.alert-info i { color: var(--info); }

.alert-dismissible .btn-close {
    background: none; border: none; margin-left: auto;
    font-size: 22px; line-height: 1;
    color: inherit; opacity: 0.5;
    cursor: pointer; padding: 0;
}
.alert-dismissible .btn-close::before { content: '×'; }
.alert-dismissible .btn-close:hover { opacity: 1; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
    margin-top: 80px;
    padding: 22px 36px;
    background: var(--bg-elev);
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 12.5px;
}
.footer.with-sidebar { margin-left: var(--sb-width); }
.footer strong { color: var(--text); }

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fade-in {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}
.fade-in   { animation: fade-in .5s cubic-bezier(.4,0,.2,1) both; }
.fade-in-1 { animation: fade-in .5s cubic-bezier(.4,0,.2,1) .1s both; }
.fade-in-2 { animation: fade-in .5s cubic-bezier(.4,0,.2,1) .2s both; }
.fade-in-3 { animation: fade-in .5s cubic-bezier(.4,0,.2,1) .3s both; }

/* ============================================================
   UTILITIES
   ============================================================ */
code {
    background: var(--brand-50);
    border: 1px solid var(--brand-100);
    color: var(--brand-700);
    padding: 2px 7px;
    border-radius: 6px;
    font-size: 12px;
    font-family: 'Fira Code', 'Consolas', monospace;
    font-weight: 500;
}

dl.row dt {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 700;
    padding: 7px 0;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
dl.row dd { padding: 7px 0; margin: 0; font-size: 13.5px; color: var(--text); font-weight: 500; }

hr { border: 0; border-top: 1px solid var(--border); margin: 18px 0; }

.chart-container { position: relative; height: 280px; width: 100%; }
.chart-container.tall { height: 340px; }

.text-success { color: var(--success) !important; }
.text-warning { color: var(--warning) !important; }
.text-danger  { color: var(--danger) !important; }
.text-primary { color: var(--brand-700) !important; }
.text-muted   { color: var(--text-muted) !important; }
.text-soft    { color: var(--text-soft) !important; }

.list-unstyled { padding-left: 0; list-style: none; }

/* ============================================================
   HERO (landing)
   ============================================================ */
.hero {
    position: relative;
    text-align: center;
    padding: 80px 24px 56px;
    overflow: hidden;
    border-radius: var(--r-xl);
    margin-bottom: 32px;
    background:
        radial-gradient(ellipse 800px 400px at 50% -20%, rgba(124,58,237,0.18), transparent 60%),
        radial-gradient(ellipse 600px 350px at 80% 100%, rgba(59,130,246,0.12), transparent 60%),
        radial-gradient(ellipse 600px 350px at 0% 100%, rgba(236,72,153,0.08), transparent 60%),
        var(--bg-elev);
    border: 1px solid var(--border);
}
.hero::before {
    content: '';
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(11,16,32,.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(11,16,32,.025) 1px, transparent 1px);
    background-size: 32px 32px;
    mask-image: radial-gradient(ellipse 600px at 50% 50%, #000, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse 600px at 50% 50%, #000, transparent 70%);
    pointer-events: none;
}
.hero > * { position: relative; }

.hero-icon {
    display: inline-flex;
    align-items: center; justify-content: center;
    width: 92px; height: 92px;
    border-radius: 26px;
    background: var(--brand-grad);
    font-size: 44px;
    color: #fff;
    margin-bottom: 28px;
    box-shadow: 0 24px 48px -12px rgba(124,58,237,.5), inset 0 -3px 6px rgba(0,0,0,.16), inset 0 3px 6px rgba(255,255,255,.25);
    transform: rotate(-2deg);
}
.hero h1 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 48px; font-weight: 900;
    color: var(--text);
    letter-spacing: -0.035em;
    line-height: 1.05;
    margin: 0 0 18px;
}
.hero h1 .accent {
    background: var(--brand-grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.hero .lead {
    font-size: 17px;
    color: var(--text-muted);
    max-width: 680px;
    margin: 0 auto;
    font-weight: 500;
    line-height: 1.55;
}
.tech-badge {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--bg-elev);
    color: var(--brand-700);
    border: 1px solid var(--brand-200);
    font-size: 12.5px; font-weight: 700;
    padding: 8px 18px;
    border-radius: 999px;
    box-shadow: var(--sh-sm);
    letter-spacing: 0.01em;
}
.tech-badge i { color: var(--brand); }

/* ============================================================
   AUTH (login) — split layout
   ============================================================ */
.auth-shell {
    min-height: calc(100vh - var(--topbar-h));
    display: flex; align-items: center; justify-content: center;
    padding: 24px;
    background:
        radial-gradient(ellipse 600px 400px at 20% 30%, rgba(124,58,237,0.12), transparent 60%),
        radial-gradient(ellipse 500px 400px at 80% 70%, rgba(59,130,246,0.08), transparent 60%);
}
.auth-card {
    width: 100%; max-width: 420px;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    box-shadow: var(--sh-lg);
    padding: 36px 32px;
}
.auth-card h2 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 22px; font-weight: 800;
    margin: 0 0 6px;
    letter-spacing: -0.02em;
}
.auth-card p.muted { color: var(--text-muted); font-size: 13.5px; margin: 0 0 24px; }

.auth-icon {
    width: 56px; height: 56px;
    border-radius: 16px;
    background: var(--brand-grad);
    color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 24px;
    margin-bottom: 18px;
    box-shadow: 0 12px 28px -8px rgba(124,58,237,.45);
}

.cred-hint {
    margin-top: 18px;
    padding: 12px 14px;
    background: var(--brand-50);
    border: 1px solid var(--brand-100);
    border-radius: 10px;
    font-size: 12.5px; color: var(--brand-700);
    text-align: center;
}

/* ============================================================
   MISC
   ============================================================ */
.section-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 18px; flex-wrap: wrap; gap: 12px;
}
.section-header h3 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 17px; font-weight: 700;
    margin: 0;
    letter-spacing: -0.01em;
}

/* User cell with avatar */
.user-cell {
    display: flex; align-items: center; gap: 11px;
}
.user-cell-avatar {
    width: 34px; height: 34px;
    border-radius: 10px;
    background: var(--brand-grad);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 12.5px;
    flex-shrink: 0;
}
.user-cell-info { line-height: 1.3; }
.user-cell-name { font-weight: 600; color: var(--text); font-size: 13.5px; }
.user-cell-meta { font-size: 11.5px; color: var(--text-muted); }

/* Empty state */
.empty {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
}
.empty i {
    font-size: 56px;
    color: var(--text-soft);
    display: block;
    margin-bottom: 12px;
}

/* ============================================================
   MOBILE
   ============================================================ */
@media (max-width: 991.98px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.show { transform: translateX(0); box-shadow: var(--sh-lg); }
    .main-content.with-sidebar { margin-left: 0; }
    .footer.with-sidebar { margin-left: 0; }
    .content-wrapper { padding: 22px 18px 64px; }
    .page-title { font-size: 22px; }
    .hero { padding: 56px 18px 40px; }
    .hero h1 { font-size: 32px; }
    .stat-value { font-size: 26px; }
}
