/* ============================================================
   Hokimiyat Bandlik — Dashboard
   ============================================================ */

:root {
    --bg: #f6f7fb;
    --bg-elev: #ffffff;
    --surface: rgba(255, 255, 255, 0.72);
    --surface-solid: #ffffff;
    --surface-2: #f3f4fa;
    --border: rgba(15, 23, 42, 0.08);
    --border-strong: rgba(15, 23, 42, 0.14);
    --text: #0b1220;
    --text-muted: #5a6480;
    --text-dim: #9aa3b9;

    --primary: #1e40af;
    --primary-2: #2563eb;
    --primary-soft: rgba(30, 64, 175, 0.12);
    --success: #10b981;
    --success-soft: rgba(16, 185, 129, 0.12);
    --warning: #f59e0b;
    --warning-soft: rgba(245, 158, 11, 0.14);
    --danger: #ef4444;
    --danger-soft: rgba(239, 68, 68, 0.12);
    --info: #06b6d4;
    --info-soft: rgba(6, 182, 212, 0.14);
    --pink: #ec4899;

    --grad-primary: linear-gradient(135deg, #0b1a4a 0%, #1e40af 50%, #3b82f6 100%);
    --grad-success: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
    --grad-warning: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
    --grad-info: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);

    --aurora-1: radial-gradient(1000px 600px at -10% -20%, rgba(30, 64, 175, 0.28), transparent 60%);
    --aurora-2: radial-gradient(800px 500px at 110% 10%, rgba(11, 26, 74, 0.22), transparent 60%);
    --aurora-3: radial-gradient(700px 500px at 50% 120%, rgba(59, 130, 246, 0.18), transparent 60%);

    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 4px 20px -4px rgba(15, 23, 42, 0.08), 0 2px 6px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 10px 40px -10px rgba(30, 64, 175, 0.22), 0 4px 12px rgba(15, 23, 42, 0.06);
    --glow: 0 0 0 1px rgba(30, 64, 175, 0.28), 0 8px 28px -6px rgba(30, 64, 175, 0.4);

    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 22px;
    --sidebar-w: 264px;
}

[data-theme="dark"] {
    --bg: #070a17;
    --bg-elev: #0e1328;
    --surface: rgba(17, 22, 46, 0.7);
    --surface-solid: #121838;
    --surface-2: #0f142e;
    --border: rgba(148, 163, 184, 0.12);
    --border-strong: rgba(148, 163, 184, 0.22);
    --text: #ebeefc;
    --text-muted: #a2acd0;
    --text-dim: #6d7699;

    --primary: #60a5fa;
    --primary-2: #93c5fd;
    --primary-soft: rgba(96, 165, 250, 0.15);
    --success: #34d399;
    --success-soft: rgba(52, 211, 153, 0.15);
    --warning: #fbbf24;
    --warning-soft: rgba(251, 191, 36, 0.15);
    --danger: #fb7185;
    --danger-soft: rgba(251, 113, 133, 0.15);
    --info: #22d3ee;
    --info-soft: rgba(34, 211, 238, 0.15);

    --grad-primary: linear-gradient(135deg, #0b1a4a 0%, #1e40af 45%, #3b82f6 100%);

    --aurora-1: radial-gradient(1000px 600px at -10% -20%, rgba(30, 64, 175, 0.35), transparent 60%);
    --aurora-2: radial-gradient(800px 500px at 110% 10%, rgba(11, 26, 74, 0.3), transparent 60%);
    --aurora-3: radial-gradient(700px 500px at 50% 120%, rgba(59, 130, 246, 0.22), transparent 60%);

    --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
    --shadow-md: 0 8px 28px -6px rgba(0,0,0,0.55), 0 2px 6px rgba(0,0,0,0.4);
    --shadow-lg: 0 18px 50px -12px rgba(30, 64, 175, 0.5), 0 4px 16px rgba(0, 0, 0, 0.45);
    --glow: 0 0 0 1px rgba(96, 165, 250, 0.35), 0 12px 36px -8px rgba(30, 64, 175, 0.55);
}

* { box-sizing: border-box; }
*::selection { background: var(--primary); color: #fff; }

html, body {
    margin: 0; padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "Inter", "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: "cv02","cv03","cv04","cv11";
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: var(--aurora-1), var(--aurora-2), var(--aurora-3);
    pointer-events: none;
    z-index: 0;
    animation: auroraFloat 22s ease-in-out infinite alternate;
}
@keyframes auroraFloat {
    0%   { transform: translate3d(0, 0, 0) scale(1); }
    50%  { transform: translate3d(-20px, 10px, 0) scale(1.04); }
    100% { transform: translate3d(25px, -15px, 0) scale(1.02); }
}

a { color: inherit; text-decoration: none; }

.app {
    display: grid;
    grid-template-columns: var(--sidebar-w) 1fr;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* ---------- Sidebar ---------- */
.sidebar {
    background: var(--surface);
    backdrop-filter: saturate(160%) blur(16px);
    -webkit-backdrop-filter: saturate(160%) blur(16px);
    border-right: 1px solid var(--border);
    padding: 22px 16px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    scrollbar-width: thin;
}
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 8px 22px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 18px;
}
.brand-logo {
    width: 40px; height: 40px;
    display: grid; place-items: center;
    border-radius: 12px;
    background: var(--grad-primary);
    color: #fff;
    font-weight: 800;
    letter-spacing: 0.3px;
    box-shadow: 0 6px 20px -4px rgba(30, 64, 175, 0.6);
    position: relative;
}
.brand-logo::after {
    content: "";
    position: absolute; inset: 0;
    border-radius: 12px;
    background: var(--grad-primary);
    filter: blur(14px); opacity: 0.5;
    z-index: -1;
}
.brand-name { font-weight: 700; font-size: 14.5px; letter-spacing: 0.1px; }
.brand-sub  { font-size: 11px; color: var(--text-muted); }

.nav-section {
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 0.9px;
    color: var(--text-dim);
    padding: 14px 12px 8px;
    font-weight: 600;
}
.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 12px;
    margin-bottom: 3px;
    border-radius: 12px;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 13.5px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.nav-item:hover { background: var(--surface-2); color: var(--text); transform: translateX(2px); }
.nav-item.active {
    background: var(--primary-soft);
    color: var(--primary);
    font-weight: 600;
}
.nav-item.active::before {
    content: "";
    position: absolute;
    left: -16px; top: 10px; bottom: 10px;
    width: 3px;
    background: var(--grad-primary);
    border-radius: 0 4px 4px 0;
    box-shadow: 0 0 12px var(--primary);
}
.nav-item svg { width: 18px; height: 18px; stroke-width: 2; flex-shrink: 0; }

.sidebar-promo {
    margin-top: 24px;
    padding: 18px;
    border-radius: 16px;
    background: var(--grad-primary);
    color: #fff;
    position: relative;
    overflow: hidden;
}
.sidebar-promo::before {
    content: "";
    position: absolute; inset: 0;
    background: radial-gradient(circle at 80% 20%, rgba(255,255,255,0.3), transparent 50%);
}
.sidebar-promo h4 { margin: 0 0 4px; font-size: 13.5px; font-weight: 700; }
.sidebar-promo p  { margin: 0 0 12px; font-size: 11.5px; opacity: 0.9; }
.sidebar-promo button {
    background: rgba(255,255,255,0.25);
    border: 1px solid rgba(255,255,255,0.35);
    color: #fff;
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: background 0.2s;
}
.sidebar-promo button:hover { background: rgba(255,255,255,0.35); }

/* ---------- Main ---------- */
.main { display: flex; flex-direction: column; min-width: 0; }

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 28px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: saturate(160%) blur(16px);
    -webkit-backdrop-filter: saturate(160%) blur(16px);
}
.topbar-left { display: flex; flex-direction: column; gap: 2px; }
.topbar h1 { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -0.3px; }
.topbar .crumb { color: var(--text-muted); font-size: 12px; display: flex; align-items: center; gap: 6px; }
.topbar .crumb svg { width: 12px; height: 12px; }

.topbar-right { display: flex; align-items: center; gap: 10px; }

.search {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    min-width: 300px;
    color: var(--text-muted);
    transition: all 0.2s;
}
.search:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-soft);
}
.search input {
    background: transparent; border: 0; outline: 0;
    color: var(--text); font-size: 13px; flex: 1;
    font-family: inherit;
}
.search kbd {
    font-family: inherit;
    font-size: 10.5px;
    font-weight: 600;
    padding: 2px 7px;
    background: var(--bg-elev);
    border: 1px solid var(--border-strong);
    border-radius: 5px;
    color: var(--text-dim);
}

.icon-btn {
    width: 40px; height: 40px;
    display: grid; place-items: center;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}
.icon-btn:hover { color: var(--primary); border-color: var(--primary); transform: translateY(-1px); box-shadow: var(--glow); }
.icon-btn svg { width: 18px; height: 18px; stroke-width: 2; }
.icon-btn .dot-notif {
    position: absolute;
    top: 7px; right: 8px;
    width: 8px; height: 8px;
    background: var(--danger);
    border: 2px solid var(--surface-2);
    border-radius: 50%;
}

.avatar {
    width: 40px; height: 40px;
    border-radius: 12px;
    background: var(--grad-primary);
    display: grid; place-items: center;
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.3px;
    box-shadow: 0 4px 14px -2px rgba(30, 64, 175, 0.5);
    flex-shrink: 0;
}

/* ---------- User menu ---------- */
.user-menu { position: relative; }
.user-btn {
    display: flex; align-items: center; gap: 10px;
    padding: 4px 10px 4px 4px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}
.user-btn:hover { border-color: var(--primary); }
.user-btn .user-meta { text-align: left; line-height: 1.2; }
.user-btn .user-name { font-size: 12.5px; font-weight: 600; }
.user-btn .user-role { font-size: 10.5px; color: var(--text-muted); }
.user-btn .chev { width: 14px; height: 14px; color: var(--text-muted); transition: transform 0.2s; }
.user-menu.open .chev { transform: rotate(180deg); }

.user-dropdown {
    position: absolute;
    top: calc(100% + 8px); right: 0;
    min-width: 240px;
    background: var(--surface-solid);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow-lg);
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: all 0.18s;
    z-index: 50;
}
.user-menu.open .user-dropdown {
    opacity: 1; visibility: visible; transform: translateY(0);
}
.user-dropdown-head {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 14px 14px;
    background: linear-gradient(180deg, var(--primary-soft), transparent);
    border-bottom: 1px solid var(--border);
    margin-bottom: 6px;
    border-radius: 13px 13px 0 0;
}
.ud-avatar {
    width: 42px; height: 42px;
    border-radius: 12px;
    background: var(--grad-primary);
    color: #fff;
    display: grid; place-items: center;
    font-weight: 700;
    font-size: 15px;
    box-shadow: 0 6px 16px -4px rgba(30, 64, 175, 0.4);
    flex-shrink: 0;
}
.ud-info { min-width: 0; flex: 1; }
.user-dropdown-head .user-name {
    font-size: 13.5px; font-weight: 700;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.user-dropdown-head .user-email {
    font-size: 11.5px; color: var(--text-muted); margin-top: 2px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.user-dropdown-item {
    display: flex; align-items: center; gap: 12px;
    width: 100%;
    padding: 10px 12px;
    background: transparent;
    border: 0;
    color: var(--text);
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.15s;
    text-decoration: none;
}
.user-dropdown-item > div:not(.ud-item-sub) { line-height: 1.25; }
.user-dropdown-item:hover { background: var(--surface-2); transform: translateX(2px); }
.user-dropdown-item svg { width: 16px; height: 16px; color: var(--text-muted); flex-shrink: 0; }
.user-dropdown-item:hover svg { color: var(--primary); }
.ud-item-sub { font-size: 11px; color: var(--text-dim); margin-top: 1px; font-weight: 400; }
.ud-divider { height: 1px; background: var(--border); margin: 6px 4px; }
.user-dropdown-item.danger { color: var(--danger); }
.user-dropdown-item.danger svg { color: var(--danger); }
.user-dropdown-item.danger:hover { background: var(--danger-soft); }
.user-dropdown-item.danger:hover svg { color: var(--danger); }
.user-dropdown form { margin: 0; }

/* ---------- Toast ---------- */
.toast {
    padding: 12px 16px;
    border-radius: 12px;
    background: var(--success-soft);
    color: var(--success);
    border: 1px solid var(--success-soft);
    font-size: 13.5px;
    font-weight: 500;
    margin-bottom: 16px;
    display: flex; align-items: center; gap: 10px;
    animation: riseIn 0.4s ease;
}
.toast svg { width: 16px; height: 16px; flex-shrink: 0; stroke-width: 2.5; }
.toast.error { background: var(--danger-soft); color: var(--danger); border-color: var(--danger-soft); }

/* ---------- Profile hero ---------- */
.profile-hero {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 22px;
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
}
.profile-hero-bg {
    height: 130px;
    background: var(--grad-primary);
    position: relative;
    overflow: hidden;
}
.profile-hero-bg::before {
    content: "";
    position: absolute;
    right: -60px; top: -60px;
    width: 240px; height: 240px;
    background: radial-gradient(circle, rgba(255,255,255,0.25), transparent 65%);
    border-radius: 50%;
}
.profile-hero-bg::after {
    content: "";
    position: absolute;
    left: -40px; bottom: -80px;
    width: 200px; height: 200px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.5), transparent 65%);
    border-radius: 50%;
}
.profile-hero-content {
    display: flex;
    align-items: flex-end;
    gap: 20px;
    padding: 0 28px 22px;
    margin-top: -52px;
    position: relative;
    z-index: 1;
}
.profile-avatar-xl {
    width: 104px; height: 104px;
    border-radius: 24px;
    background: var(--grad-primary);
    color: #fff;
    display: grid; place-items: center;
    font-size: 40px;
    font-weight: 800;
    letter-spacing: -0.5px;
    border: 4px solid var(--surface-solid);
    box-shadow: var(--shadow-lg);
    flex-shrink: 0;
}
.profile-hero-info h2 {
    margin: 0 0 4px;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.4px;
}
.profile-hero-info p {
    margin: 0;
    color: var(--text-muted);
    font-size: 13px;
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.dot-sep { color: var(--text-dim); }
.role-chip {
    padding: 2px 10px;
    background: var(--primary-soft);
    color: var(--primary);
    border-radius: 999px;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.profile-hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--border);
    border-top: 1px solid var(--border);
}
.pstat { padding: 14px 22px; background: var(--surface); }
.pstat-k { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; font-weight: 600; }
.pstat-v { font-size: 14px; font-weight: 700; }

/* ---------- Settings layout ---------- */
.settings-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 20px;
}

.settings-nav { display: flex; flex-direction: column; gap: 6px; }
.settings-nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    color: var(--text);
    text-decoration: none;
    transition: all 0.2s;
}
.settings-nav-item:hover { border-color: var(--border-strong); transform: translateX(2px); }
.settings-nav-item.active {
    border-color: var(--primary);
    background: var(--primary-soft);
    box-shadow: 0 4px 14px -4px rgba(30, 64, 175, 0.3);
}
.settings-nav-item.active .snav-title { color: var(--primary); }
.settings-nav-item svg { width: 20px; height: 20px; color: var(--text-muted); flex-shrink: 0; }
.settings-nav-item.active svg { color: var(--primary); }
.snav-title { font-size: 13.5px; font-weight: 600; }
.snav-sub { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }

.settings-content { display: flex; flex-direction: column; gap: 18px; }
.settings-card { padding: 24px 26px; }
.settings-head { margin-bottom: 20px; }
.settings-head h3 { margin: 0 0 4px; font-size: 16px; font-weight: 700; letter-spacing: -0.2px; }
.settings-head p { margin: 0; color: var(--text-muted); font-size: 12.5px; }

.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.settings-card .form-field { margin-bottom: 16px; }
.settings-card .form-field label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 7px;
}
.settings-card .form-input,
.settings-card input[type="text"],
.settings-card input[type="email"],
.settings-card input[type="password"] {
    width: 100%;
    padding: 11px 14px;
    background: var(--surface-2);
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    color: var(--text);
    font-size: 13.5px;
    font-family: inherit;
    outline: 0;
    transition: all 0.2s;
}
.settings-card input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
    background: var(--surface-solid);
}

.field-help { margin-top: 6px; font-size: 11.5px; color: var(--text-muted); }
.field-err { margin-top: 6px; font-size: 12px; color: var(--danger); }

.pw-hints {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 6px 0 18px;
}
.pw-hint {
    display: flex; align-items: center; gap: 6px;
    padding: 6px 12px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 11.5px;
    color: var(--text-muted);
}
.pw-hint svg { width: 12px; height: 12px; color: var(--success); stroke-width: 3; }

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
    margin-top: 6px;
}
.btn-primary {
    padding: 10px 20px;
    background: var(--grad-primary);
    color: #fff;
    border: 0;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    display: flex; align-items: center; gap: 8px;
    box-shadow: 0 6px 16px -4px rgba(30, 64, 175, 0.45);
    transition: all 0.2s;
    text-decoration: none;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 24px -4px rgba(30, 64, 175, 0.55); }
.btn-primary svg { width: 14px; height: 14px; stroke-width: 2.5; }

.btn-ghost {
    padding: 10px 18px;
    background: var(--surface-2);
    color: var(--text);
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    display: inline-flex; align-items: center; gap: 8px;
    text-decoration: none;
    transition: all 0.2s;
}
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-ghost.danger:hover { border-color: var(--danger); color: var(--danger); }
.btn-ghost svg { width: 14px; height: 14px; stroke-width: 2; }

.session-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 12px;
}
.session-icon {
    width: 40px; height: 40px;
    border-radius: 10px;
    background: var(--primary-soft);
    color: var(--primary);
    display: grid; place-items: center;
    flex-shrink: 0;
}
.session-icon svg { width: 18px; height: 18px; }
.session-meta { flex: 1; min-width: 0; }
.session-title { font-size: 13.5px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.session-sub { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }

.pref-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
    gap: 14px;
}
.pref-row:last-child { border-bottom: 0; padding-bottom: 0; }
.pref-row:first-of-type { padding-top: 0; }
.pref-title { font-size: 13.5px; font-weight: 600; margin-bottom: 2px; }
.pref-sub { font-size: 12px; color: var(--text-muted); }

@media (max-width: 720px) {
    .user-btn .user-meta { display: none; }
}

/* ---------- Content ---------- */
.content { padding: 28px; flex: 1; }

.page-hero {
    background: var(--grad-primary);
    border-radius: var(--radius-lg);
    padding: 28px 32px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 26px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 50px -10px rgba(30, 64, 175, 0.4);
}
.page-hero::before {
    content: "";
    position: absolute;
    right: -80px; top: -60px;
    width: 320px; height: 320px;
    background: radial-gradient(circle, rgba(255,255,255,0.25), transparent 65%);
    border-radius: 50%;
}
.page-hero::after {
    content: "";
    position: absolute;
    left: -60px; bottom: -80px;
    width: 240px; height: 240px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.45), transparent 65%);
    border-radius: 50%;
}
.page-hero .hero-text { position: relative; z-index: 1; max-width: 60%; }
.page-hero h2 { margin: 0 0 8px; font-size: 22px; font-weight: 700; letter-spacing: -0.4px; }
.page-hero p  { margin: 0; opacity: 0.88; font-size: 13.5px; }
.hero-actions { display: flex; gap: 10px; position: relative; z-index: 1; }
.hero-actions .btn-glass {
    background: rgba(255,255,255,0.18);
    border: 1px solid rgba(255,255,255,0.3);
    backdrop-filter: blur(12px);
    color: #fff;
    padding: 10px 18px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    display: flex; align-items: center; gap: 8px;
    transition: all 0.2s;
}
.hero-actions .btn-glass:hover { background: rgba(255,255,255,0.28); transform: translateY(-1px); }
.hero-actions .btn-glass svg { width: 14px; height: 14px; }
.hero-actions .btn-glass.solid { background: #fff; color: var(--primary); border-color: transparent; }
.hero-actions .btn-glass.solid:hover { background: #f3f4fa; }

/* ---------- Stats ---------- */
.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 22px;
}

.card {
    background: var(--surface);
    backdrop-filter: saturate(160%) blur(14px);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow-md);
    position: relative;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    animation: riseIn 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--border-strong); }
@keyframes riseIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.stats .card:nth-child(1) { animation-delay: 0.04s; }
.stats .card:nth-child(2) { animation-delay: 0.09s; }
.stats .card:nth-child(3) { animation-delay: 0.14s; }
.stats .card:nth-child(4) { animation-delay: 0.19s; }

.stat-card { overflow: hidden; position: relative; }
.stat-card::before {
    content: "";
    position: absolute;
    top: -1px; left: -1px; right: -1px;
    height: 3px;
    border-radius: var(--radius) var(--radius) 0 0;
    opacity: 0.9;
}
.stat-card.primary::before { background: var(--grad-primary); }
.stat-card.success::before { background: var(--grad-success); }
.stat-card.info::before    { background: var(--grad-info); }
.stat-card.warning::before { background: var(--grad-warning); }

.stat-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}
.stat-label { color: var(--text-muted); font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.7px; }
.stat-icon {
    width: 46px; height: 46px;
    border-radius: 14px;
    display: grid; place-items: center;
    position: relative;
    color: #fff;
}
.stat-icon::after {
    content: "";
    position: absolute; inset: 0;
    border-radius: 14px;
    filter: blur(12px); opacity: 0.55;
    z-index: -1;
}
.stat-icon svg { width: 22px; height: 22px; stroke-width: 2; }
.stat-icon.primary { background: var(--grad-primary); }
.stat-icon.primary::after { background: var(--grad-primary); }
.stat-icon.success { background: var(--grad-success); }
.stat-icon.success::after { background: var(--grad-success); }
.stat-icon.info    { background: var(--grad-info); }
.stat-icon.info::after { background: var(--grad-info); }
.stat-icon.warning { background: var(--grad-warning); }
.stat-icon.warning::after { background: var(--grad-warning); }

.stat-value {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.8px;
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
    background: linear-gradient(180deg, var(--text), var(--text-muted));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.stat-trend {
    display: flex; align-items: center; gap: 8px;
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-muted);
}
.chip {
    padding: 3px 9px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 11px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.chip.up   { background: var(--success-soft); color: var(--success); }
.chip.down { background: var(--danger-soft);  color: var(--danger); }
.chip.neu  { background: var(--primary-soft); color: var(--primary); }
.chip svg  { width: 11px; height: 11px; }

.sparkline {
    margin-top: 14px;
    width: 100%; height: 44px;
}
.sparkline path.area { fill: url(#sparkGrad); opacity: 0.35; }
.sparkline path.line { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Rows ---------- */
.row-2 {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 18px;
    margin-bottom: 18px;
}
.row-2.reverse { grid-template-columns: 1fr 2fr; }

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    gap: 16px;
}
.section-head h2 {
    margin: 0;
    font-size: 15.5px;
    font-weight: 700;
    letter-spacing: -0.2px;
}
.section-head .muted { color: var(--text-muted); font-size: 12px; margin-top: 2px; }
.tab-group { display: flex; gap: 4px; padding: 4px; background: var(--surface-2); border-radius: 10px; }
.tab-group button {
    background: transparent;
    border: 0;
    padding: 6px 12px;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}
.tab-group button.active {
    background: var(--surface-solid);
    color: var(--text);
    box-shadow: var(--shadow-sm);
}

/* ---------- Bars chart ---------- */
.bars { display: flex; flex-direction: column; gap: 13px; }
.bar-row {
    display: grid;
    grid-template-columns: 150px 1fr 60px;
    align-items: center;
    gap: 14px;
}
.bar-label { font-weight: 500; color: var(--text); font-size: 13px; }
.bar-track {
    height: 10px;
    background: var(--surface-2);
    border-radius: 999px;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border);
}
.bar-fill {
    height: 100%;
    border-radius: 999px;
    background: var(--grad-primary);
    box-shadow: 0 0 12px var(--primary-soft);
    animation: barGrow 1.1s cubic-bezier(0.2, 0.8, 0.2, 1) both;
    transform-origin: left;
}
.bar-row:nth-child(2) .bar-fill { background: var(--grad-success); }
.bar-row:nth-child(3) .bar-fill { background: var(--grad-info); }
.bar-row:nth-child(4) .bar-fill { background: var(--grad-warning); }
.bar-row:nth-child(5) .bar-fill { background: linear-gradient(135deg, #ec4899, #f43f5e); }
.bar-row:nth-child(6) .bar-fill { background: linear-gradient(135deg, #14b8a6, #22d3ee); }
.bar-row:nth-child(7) .bar-fill { background: linear-gradient(135deg, #a855f7, #ec4899); }
.bar-row:nth-child(8) .bar-fill { background: linear-gradient(135deg, #f59e0b, #ec4899); }
@keyframes barGrow {
    from { transform: scaleX(0); }
    to   { transform: scaleX(1); }
}
.bar-value {
    text-align: right;
    font-variant-numeric: tabular-nums;
    color: var(--text);
    font-size: 13px;
    font-weight: 700;
}

/* ---------- Donut (SVG) ---------- */
.donut-wrap { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.donut-svg { width: 200px; height: 200px; }
.donut-track { fill: none; stroke: var(--surface-2); stroke-width: 18; }
.donut-seg-hemis {
    fill: none; stroke: url(#gradHemis); stroke-width: 18;
    stroke-linecap: round;
    filter: drop-shadow(0 4px 12px var(--primary-soft));
    transition: stroke-dasharray 1s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.donut-seg-prof {
    fill: none; stroke: url(#gradProf); stroke-width: 18;
    stroke-linecap: round;
    opacity: 0.95;
}
.donut-center-text { fill: var(--text); font-weight: 700; font-size: 22px; font-family: inherit; }
.donut-center-sub  { fill: var(--text-muted); font-size: 10.5px; letter-spacing: 0.6px; font-family: inherit; }
.donut-legend { display: flex; gap: 24px; }
.legend-item {
    display: flex; align-items: center; gap: 8px;
    font-size: 12.5px; color: var(--text-muted);
}
.legend-item strong { color: var(--text); font-variant-numeric: tabular-nums; }
.dot { width: 10px; height: 10px; border-radius: 3px; }
.dot.hemis { background: var(--grad-primary); }
.dot.prof  { background: var(--grad-info); }

/* ---------- Trend chart ---------- */
.trend-chart {
    height: 260px;
    margin-top: 8px;
}

/* ---------- Tables ---------- */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td {
    padding: 13px 20px;
    text-align: left;
    font-size: 13px;
    border-bottom: 1px solid var(--border);
}
.table th {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    background: var(--surface-2);
}
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background 0.15s; }
.table tbody tr:hover td { background: var(--surface-2); }
.table .code-cell {
    font-family: "JetBrains Mono", ui-monospace, monospace;
    color: var(--primary);
    font-weight: 700;
    font-size: 12px;
}
.card.no-pad { padding: 0; overflow: hidden; }
.card.no-pad .section-head { padding: 22px 22px 0; }
.card.no-pad .table { margin-top: 14px; }

.badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px; font-weight: 700;
    letter-spacing: 0.3px;
    font-variant-numeric: tabular-nums;
}
.badge.hemis { background: var(--primary-soft); color: var(--primary); }
.badge.prof  { background: var(--info-soft); color: var(--info); }

/* ---------- Activity feed ---------- */
.feed { display: flex; flex-direction: column; gap: 16px; }
.feed-item {
    display: flex;
    gap: 14px;
    position: relative;
    padding-bottom: 16px;
    border-bottom: 1px dashed var(--border);
}
.feed-item:last-child { border-bottom: 0; padding-bottom: 0; }
.feed-icon {
    width: 34px; height: 34px;
    border-radius: 10px;
    display: grid; place-items: center;
    flex-shrink: 0;
}
.feed-icon svg { width: 16px; height: 16px; stroke-width: 2; }
.feed-icon.primary { background: var(--primary-soft); color: var(--primary); }
.feed-icon.success { background: var(--success-soft); color: var(--success); }
.feed-icon.info    { background: var(--info-soft); color: var(--info); }
.feed-icon.warning { background: var(--warning-soft); color: var(--warning); }
.feed-body { flex: 1; min-width: 0; }
.feed-title { font-size: 13px; font-weight: 500; color: var(--text); margin: 0; }
.feed-title strong { font-weight: 700; }
.feed-time { font-size: 11.5px; color: var(--text-dim); margin-top: 2px; }

/* ---------- Quick info ---------- */
.quick-list { display: flex; flex-direction: column; gap: 14px; }
.quick-item { display: flex; justify-content: space-between; align-items: center; }
.quick-item .label { color: var(--text-muted); font-size: 13px; }
.quick-item .value {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    font-size: 14px;
}
.quick-divider { height: 1px; background: var(--border); margin: 2px 0; }

.progress-ring {
    position: relative;
    width: 80px; height: 80px;
    margin: 10px auto 4px;
}

/* ---------- Universities page ---------- */
.uni-hero {
    background: var(--surface);
    backdrop-filter: saturate(160%) blur(14px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}
.uni-hero::before {
    content: "";
    position: absolute;
    right: -100px; top: -80px;
    width: 280px; height: 280px;
    background: radial-gradient(circle, var(--primary-soft), transparent 65%);
    border-radius: 50%;
    pointer-events: none;
}
.uni-hero-left { display: flex; align-items: center; gap: 18px; position: relative; z-index: 1; }
.uni-hero-icon {
    width: 56px; height: 56px;
    border-radius: 16px;
    background: var(--grad-primary);
    color: #fff;
    display: grid; place-items: center;
    box-shadow: 0 8px 24px -6px rgba(30, 64, 175, 0.5);
}
.uni-hero-icon svg { width: 26px; height: 26px; }
.uni-hero h2 { margin: 0 0 4px; font-size: 19px; font-weight: 700; letter-spacing: -0.3px; }
.uni-hero p  { margin: 0; color: var(--text-muted); font-size: 13px; }
.uni-hero p strong { color: var(--text); font-weight: 700; }
.uni-hero .hero-actions { position: relative; z-index: 1; }
.uni-hero .btn-glass {
    background: var(--surface-2);
    border: 1px solid var(--border-strong);
    backdrop-filter: none;
    color: var(--text);
    padding: 10px 16px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    display: flex; align-items: center; gap: 8px;
    transition: all 0.2s;
}
.uni-hero .btn-glass:hover { border-color: var(--primary); color: var(--primary); }
.uni-hero .btn-glass.solid {
    background: var(--grad-primary);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 8px 20px -6px rgba(30, 64, 175, 0.45);
}
.uni-hero .btn-glass.solid:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px -6px rgba(30, 64, 175, 0.6);
    color: #fff;
}

.uni-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 18px 22px;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}
.uni-search {
    flex: 1;
    min-width: 280px;
    max-width: 420px;
    position: relative;
    display: flex; align-items: center;
}
.uni-search svg {
    position: absolute;
    left: 14px;
    width: 16px; height: 16px;
    color: var(--text-muted);
    stroke-width: 2;
    pointer-events: none;
}
.uni-search input {
    width: 100%;
    padding: 10px 38px 10px 40px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-size: 13.5px;
    font-family: inherit;
    outline: 0;
    transition: all 0.2s;
}
.uni-search input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); background: var(--surface-solid); }
.uni-search .clear-btn {
    position: absolute; right: 10px;
    width: 22px; height: 22px; border-radius: 50%;
    display: grid; place-items: center;
    background: var(--border-strong); color: var(--text);
    text-decoration: none; font-size: 14px; font-weight: 600;
    line-height: 1;
}
.select {
    padding: 9px 30px 9px 12px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2399a' stroke-width='2'><path d='m6 9 6 6 6-6'/></svg>");
    background-repeat: no-repeat;
    background-position: right 10px center;
    min-width: 160px;
    transition: border-color 0.15s;
}
.select:hover { border-color: var(--border-strong); }
.select:focus { outline: 0; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }

.uni-sort { display: flex; align-items: center; gap: 10px; }
.muted-sm { color: var(--text-muted); font-size: 12px; }
.uni-sort .tab-group { padding: 3px; }
.uni-sort .tab-group a {
    padding: 6px 11px;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.2s;
}
.uni-sort .tab-group a:hover { color: var(--text); }
.uni-sort .tab-group a.active {
    background: var(--surface-solid);
    color: var(--text);
    box-shadow: var(--shadow-sm);
}

.uni-table th, .uni-table td { padding: 14px 22px; }
.uni-table tbody tr { transition: all 0.15s; }

.code-badge {
    display: inline-block;
    padding: 5px 10px;
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 12px;
    font-weight: 700;
    color: var(--primary);
    background: var(--primary-soft);
    border-radius: 8px;
    letter-spacing: 0.2px;
}

.uni-name { display: flex; align-items: center; gap: 12px; }
.uni-avatar {
    width: 36px; height: 36px;
    border-radius: 10px;
    background: var(--grad-primary);
    color: #fff;
    display: grid; place-items: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px -3px rgba(30, 64, 175, 0.4);
}
.uni-name-main { font-size: 13.5px; font-weight: 600; color: var(--text); line-height: 1.35; }
.uni-name-sub { font-size: 11.5px; color: var(--text-dim); margin-top: 1px; }

.row-action {
    background: transparent;
    border: 0;
    width: 32px; height: 32px;
    display: grid; place-items: center;
    border-radius: 8px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
}
.row-action:hover { background: var(--primary-soft); color: var(--primary); }
.row-action svg { width: 16px; height: 16px; }

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 60px 20px;
    text-align: center;
}
.empty-state svg {
    width: 60px; height: 60px;
    color: var(--text-dim);
    margin-bottom: 16px;
}
.empty-state h3 { margin: 0 0 6px; font-size: 17px; font-weight: 700; }
.empty-state p { margin: 0 0 20px; color: var(--text-muted); max-width: 360px; }

.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 22px;
    border-top: 1px solid var(--border);
    gap: 12px;
    flex-wrap: wrap;
}
.pag-info { color: var(--text-muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.pag-info strong { color: var(--text); font-weight: 700; }
.pag-nav { display: flex; gap: 4px; align-items: center; }
.pag-btn {
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    display: grid; place-items: center;
    border-radius: 9px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text);
    font-size: 12.5px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s;
    font-variant-numeric: tabular-nums;
}
.pag-btn:hover:not(.active):not(.disabled) { border-color: var(--primary); color: var(--primary); }
.pag-btn.active {
    background: var(--grad-primary);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 12px -3px rgba(30, 64, 175, 0.45);
}
.pag-btn.disabled { opacity: 0.4; cursor: not-allowed; }
.pag-btn svg { width: 14px; height: 14px; stroke-width: 2.5; }
.pag-dots { color: var(--text-dim); padding: 0 4px; font-size: 13px; }

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
    .stats { grid-template-columns: repeat(2, 1fr); }
    .row-2, .row-2.reverse { grid-template-columns: 1fr; }
    .settings-layout { grid-template-columns: 1fr; }
    .settings-nav { flex-direction: row; overflow-x: auto; }
    .settings-nav-item { min-width: 200px; }
}
@media (max-width: 720px) {
    .form-grid-2 { grid-template-columns: 1fr; }
    .profile-hero-content { flex-direction: column; align-items: center; text-align: center; }
    .profile-hero-stats { grid-template-columns: 1fr; }
    .profile-avatar-xl { width: 88px; height: 88px; font-size: 32px; }
}
@media (max-width: 720px) {
    .app { grid-template-columns: 1fr; }
    .sidebar { display: none; }
    .stats { grid-template-columns: 1fr; }
    .search { display: none; }
    .content { padding: 16px; }
    .topbar { padding: 14px 16px; }
    .page-hero { padding: 22px; flex-direction: column; gap: 18px; align-items: flex-start; }
    .page-hero .hero-text { max-width: 100%; }
}

/* ============================================================
   OTM (universities) statistika sahifalari
   ============================================================ */

.otm-toolbar {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 18px; border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}
.otm-search {
    position: relative; flex: 1 1 280px; min-width: 240px;
}
.otm-search svg {
    position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
    width: 16px; height: 16px; color: var(--text-muted);
}
.otm-search input {
    width: 100%; padding: 10px 38px 10px 38px;
    background: var(--surface-2); border: 1px solid var(--border);
    border-radius: 12px; color: var(--text); font-size: 13.5px; font-family: inherit;
    transition: all 0.2s;
}
.otm-search input:focus { outline: none; border-color: var(--primary-2); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15); }
.otm-search .clear-btn {
    position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
    width: 22px; height: 22px; border-radius: 50%;
    display: grid; place-items: center;
    background: var(--surface-2); color: var(--text-muted); text-decoration: none;
    font-size: 14px; line-height: 1;
}
.otm-search .clear-btn:hover { background: var(--danger-soft); color: var(--danger); }

.otm-sort { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.otm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 16px;
    padding: 18px;
}
.otm-grid-faculty {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.otm-card {
    position: relative;
    display: flex; flex-direction: column; gap: 14px;
    background: var(--surface);
    backdrop-filter: saturate(160%) blur(14px);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    text-decoration: none; color: inherit;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.otm-card::before {
    content: ""; position: absolute;
    top: 0; left: 0; right: 0; height: 3px;
    background: var(--grad-primary);
    opacity: 0.85;
    transition: opacity 0.2s;
}
.otm-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-strong);
    box-shadow: var(--shadow-lg);
}
.otm-card:hover::before { opacity: 1; }
.otm-card:hover .otm-arrow { color: var(--primary-2); transform: translateX(4px); }

.otm-card-head {
    display: flex; justify-content: space-between; align-items: flex-start;
}
.otm-avatar {
    width: 44px; height: 44px;
    border-radius: 12px;
    background: var(--grad-primary);
    color: #fff;
    display: grid; place-items: center;
    font-weight: 800; font-size: 18px;
    box-shadow: 0 6px 18px -6px rgba(30, 64, 175, 0.5);
}
.otm-avatar.variant { background: var(--grad-info); box-shadow: 0 6px 18px -6px rgba(6, 182, 212, 0.45); }
.otm-code-badge {
    background: var(--primary-soft); color: var(--primary-2);
    padding: 4px 10px; border-radius: 999px;
    font-size: 11.5px; font-weight: 700; letter-spacing: 0.3px;
    font-family: 'JetBrains Mono', monospace;
}
.otm-code-badge.muted { background: var(--surface-2); color: var(--text-muted); }

.otm-card-name {
    font-size: 14.5px; font-weight: 700;
    color: var(--text);
    line-height: 1.35;
    min-height: 38px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.otm-card-stats {
    display: flex; gap: 16px; align-items: center;
    padding: 12px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.otm-big {
    flex: 0 0 auto;
}
.otm-big-label { font-size: 10.5px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.7px; font-weight: 600; }
.otm-big-value {
    font-size: 28px; font-weight: 800;
    background: var(--grad-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}
.otm-mini-grid {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 10px; flex: 1;
}
.otm-mini { text-align: center; }
.otm-mini-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.otm-mini-value { font-size: 15px; font-weight: 700; color: var(--text); margin-top: 2px; font-variant-numeric: tabular-nums; }

.otm-payment {
    display: flex; gap: 6px; flex-wrap: wrap;
}

.otm-card-foot {
    display: flex; align-items: center; gap: 12px; justify-content: space-between;
    margin-top: auto;
}
.otm-card-foot .bar-track { flex: 1; }
.otm-arrow {
    display: flex; align-items: center; gap: 4px;
    color: var(--text-muted);
    font-size: 12px; font-weight: 600;
    transition: all 0.2s;
}
.otm-arrow svg { width: 14px; height: 14px; }

/* Breakdown cards */
.breakdown-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px; margin-top: 18px;
}
.breakdown-card { padding: 18px 22px; }
.breakdown-card.wide { grid-column: 1 / -1; }
.breakdown-head {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--border);
}
.breakdown-title { font-size: 14px; font-weight: 700; color: var(--text); }
.breakdown-icon {
    width: 32px; height: 32px; border-radius: 10px;
    display: grid; place-items: center; color: #fff;
}
.breakdown-icon svg { width: 16px; height: 16px; stroke-width: 2; }
.breakdown-icon.primary { background: var(--grad-primary); }
.breakdown-icon.info    { background: var(--grad-info); }
.breakdown-icon.success { background: var(--grad-success); }
.breakdown-icon.warning { background: var(--grad-warning); }

.breakdown-rows { display: flex; flex-direction: column; gap: 10px; }
.breakdown-row {
    display: grid; grid-template-columns: minmax(120px, 1fr) 2fr 60px;
    gap: 12px; align-items: center;
}
.breakdown-label {
    font-size: 12.5px; color: var(--text); font-weight: 500;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.breakdown-value {
    font-size: 13px; font-weight: 700; color: var(--text);
    text-align: right; font-variant-numeric: tabular-nums;
}
.breakdown-card.wide .breakdown-row {
    grid-template-columns: minmax(220px, 2fr) 3fr 70px;
}

/* Group chips */
.group-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px; padding: 18px;
}
.group-chip {
    display: flex; flex-direction: column; gap: 6px;
    padding: 12px 14px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: all 0.2s;
}
.group-chip:hover { border-color: var(--primary-2); transform: translateY(-2px); }
.group-name { font-weight: 700; font-size: 13.5px; color: var(--text); font-family: 'JetBrains Mono', monospace; }
.group-stats { display: flex; justify-content: space-between; align-items: center; font-size: 11.5px; }
.group-count {
    background: var(--primary-soft); color: var(--primary-2);
    padding: 2px 8px; border-radius: 999px; font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.group-gpa { color: var(--text-muted); font-variant-numeric: tabular-nums; }

@media (max-width: 1100px) {
    .breakdown-grid { grid-template-columns: 1fr; }
    .breakdown-card.wide { grid-column: auto; }
}
@media (max-width: 720px) {
    .otm-grid { grid-template-columns: 1fr; padding: 14px; }
    .otm-card-stats { flex-direction: column; align-items: flex-start; gap: 12px; }
    .otm-mini-grid { width: 100%; }
}
