/* ALHIKMA — yagona uslublar fayli (kirish sahifasi va ilova) */

/* ===== Mavzu: qorong'i (asosiy) ===== */
:root {
    --c1-rgb: 168 85 247; --c2-rgb: 109 40 217;
    color-scheme: dark;
    --bg: #0b0b18;
    --surface: #14142e;
    --panel: rgba(22, 22, 48, 0.9);
    --panel-strong: rgba(14, 14, 34, 0.97);
    --card-grad: linear-gradient(145deg, rgba(25, 25, 55, 0.96), rgba(12, 12, 30, 0.98));
    --sidebar-grad: linear-gradient(180deg, rgba(12, 12, 30, 0.97), rgba(8, 8, 22, 0.99));
    --nav-bg: rgba(10, 10, 26, 0.97);
    --option-bg: #15152a;
    --glass-1: rgba(255, 255, 255, 0.035);
    --glass-2: rgba(255, 255, 255, 0.05);
    --glass-3: rgba(255, 255, 255, 0.065);
    --line: rgba(255, 255, 255, 0.08);
    --line-2: rgba(255, 255, 255, 0.14);
    --border: var(--line);
    --border-accent: rgba(170, 100, 255, 0.35);
    --text: #ffffff;
    --text-2: #c9c9de;
    --muted: #8f8fa8;
    --icon-active: #ffffff;
    --accent: #a855f7;
    --accent-2: #6d5dfc;
    --ok: #22c55e;
    --warn: #fab219;
    --bad: #ef4444;
    /* Grafik ranglari — dizayn bo'yicha: Daromad binafsha, Xarajat qizil
       (tekshirilgan: CVD ΔE 27.9, kontrast ≥3:1 #14142e fonda) */
    --c-income: #a855f7;
    --c-expense: #ef4444;
    --c-bar: #9085e9;
    --sidebar-w: 250px;
}

/* ===== Mavzu: yorug' ===== */
:root[data-theme="light"] {
    color-scheme: light;
    --bg: #eef0fa;
    --surface: #ffffff;
    --panel: rgba(255, 255, 255, 0.92);
    --panel-strong: #ffffff;
    --card-grad: linear-gradient(145deg, #ffffff, #f6f5ff);
    --sidebar-grad: linear-gradient(180deg, #ffffff, #f4f2ff);
    --nav-bg: rgba(255, 255, 255, 0.97);
    --option-bg: #ffffff;
    --glass-1: rgba(40, 30, 110, 0.035);
    --glass-2: rgba(40, 30, 110, 0.05);
    --glass-3: rgba(40, 30, 110, 0.07);
    --line: rgba(40, 30, 110, 0.10);
    --line-2: rgba(40, 30, 110, 0.18);
    --border-accent: rgba(124, 58, 237, 0.35);
    --text: #16142e;
    --text-2: #3c3a5c;
    --muted: #6e6c8a;
    --icon-active: #6d28d9;
}

:root[data-theme="light"] .page-body {
    background:
        radial-gradient(circle at 15% 10%, rgba(145, 75, 255, 0.10), transparent 40%),
        radial-gradient(circle at 85% 90%, rgba(56, 120, 255, 0.08), transparent 45%),
        var(--bg);
}

:root[data-theme="light"] .panel,
:root[data-theme="light"] .list-row,
:root[data-theme="light"] .user-chip { box-shadow: 0 6px 24px rgba(60, 40, 140, 0.07); }
:root[data-theme="light"] .nav-icon { stroke: #7c3aed; }
:root[data-theme="light"] .sidebar-item.active { background: linear-gradient(135deg, rgba(135, 60, 255, 0.16), rgba(70, 40, 180, 0.06)); }
:root[data-theme="light"] .money-debt { color: #dc2626; }
:root[data-theme="light"] .money-ok { color: #15803d; }
:root[data-theme="light"] .badge-ok { color: #15803d; }
:root[data-theme="light"] .badge-warn { color: #a16207; }
:root[data-theme="light"] .badge-off { color: #b91c1c; }
:root[data-theme="light"] .badge-info { color: #6d28d9; }
:root[data-theme="light"] .form-message.error, :root[data-theme="light"] .btn-danger { color: #b91c1c; }
:root[data-theme="light"] .notice { color: #9a3412; }
:root[data-theme="light"] .chart-tip { color: var(--text); }

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

.page-body {
    margin: 0;
    min-height: 100vh;
    font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
    font-size: 14px;
    color: var(--text);
    background:
        radial-gradient(circle at 15% 10%, rgba(145, 75, 255, 0.16), transparent 40%),
        radial-gradient(circle at 85% 90%, rgba(56, 120, 255, 0.10), transparent 45%),
        var(--bg);
    background-attachment: fixed;
}

body.no-scroll { overflow: hidden; }

a { color: inherit; }

h1, h2, h3 { margin: 0; }

/* ===== Tugmalar ===== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 10px 18px;
    border-radius: 13px;
    border: 1px solid var(--border-accent);
    background: linear-gradient(135deg, #8b3dff, #5b4dff);
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
    box-shadow: 0 8px 22px rgba(120, 60, 255, 0.25);
}

.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 28px rgba(120, 60, 255, 0.38); }
.btn:disabled { opacity: .55; cursor: wait; transform: none; }
.btn-sm { min-height: 34px; padding: 6px 12px; font-size: 13px; border-radius: 11px; }
.btn-block { width: 100%; }

.btn-ghost { background: var(--glass-2); border-color: var(--border); box-shadow: none; }
.btn-ghost:hover { background: rgba(145, 75, 255, 0.12); box-shadow: none; }

.btn-danger { background: rgba(239, 68, 68, 0.12); border-color: rgba(239, 68, 68, 0.35); color: #fca5a5; box-shadow: none; }
.btn-danger:hover { background: rgba(239, 68, 68, 0.2); box-shadow: none; }

.btn-ok { background: linear-gradient(135deg, #16a34a, #0d8a5f); border-color: rgba(34, 197, 94, .4); box-shadow: 0 8px 22px rgba(22, 163, 74, .25); }

.icon-btn {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--glass-2);
    color: var(--text-2);
    cursor: pointer;
    font-size: 15px;
}

.icon-btn:hover { color: var(--text); border-color: var(--border-accent); }

/* ===== Formalar ===== */

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }

.field label {
    color: var(--muted);
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.field input, .field select, .field textarea, .input {
    width: 100%;
    min-height: 44px;
    padding: 11px 14px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--glass-1);
    color: var(--text);
    font-size: 15px;
    font-family: inherit;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.field textarea { min-height: 80px; resize: vertical; }

.field input:focus, .field select:focus, .field textarea:focus, .input:focus {
    border-color: var(--border-accent);
    box-shadow: 0 0 0 3px rgba(145, 75, 255, 0.15);
}

select option { background: var(--option-bg); color: var(--text); }
input[type=date] { color-scheme: dark; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-hint { color: var(--muted); font-size: 12px; margin-top: -6px; margin-bottom: 12px; }

.form-message { min-height: 18px; margin: 2px 0 12px; font-size: 13px; }
.form-message.error { color: #fca5a5; }
.form-message.success { color: #86efac; }

/* ===== Panellar ===== */

.panel {
    position: relative;
    padding: 22px;
    border-radius: 22px;
    background: var(--card-grad);
    border: 1px solid var(--border);
    box-shadow: inset 0 1px 0 var(--glass-1), 0 15px 45px rgba(0, 0, 0, 0.22);
}

.panel h2 { font-size: 18px; margin-bottom: 4px; }
.panel-sub { color: var(--muted); font-size: 13px; margin: 0 0 18px; }

.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.panel-head h2 { margin: 0; }
.panel-head a { color: var(--accent); font-size: 13px; text-decoration: none; }

/* ===== Ilova karkasi ===== */

.app-shell { min-height: 100vh; }

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--sidebar-w);
    overflow-y: auto;
    padding: 24px 16px calc(24px + env(safe-area-inset-bottom, 0px));
    background:
        radial-gradient(circle at 20% 10%, rgba(145, 75, 255, 0.16), transparent 35%),
        var(--sidebar-grad);
    border-right: 1px solid rgba(170, 100, 255, 0.25);
    box-shadow: 10px 0 50px rgba(80, 30, 180, 0.14);
    z-index: 1000;
    transition: transform .25s ease;
}

.sidebar-logo { text-align: center; margin-bottom: 26px; }
.sidebar-logo img { width: 170px; max-width: 100%; filter: drop-shadow(0 0 14px rgba(165, 90, 255, 0.45)); }

.sidebar-menu { display: flex; flex-direction: column; gap: 4px; }

.sidebar-group {
    margin: 14px 10px 6px;
    color: var(--muted);
    font-size: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 10px;
    border-radius: 13px;
    color: var(--text-2);
    text-decoration: none;
    border: 1px solid transparent;
    transition: all .2s ease;
}

.sidebar-item:hover { color: var(--text); background: rgba(145, 75, 255, 0.10); border-color: rgba(145, 75, 255, 0.22); }

.sidebar-item.active {
    color: var(--text);
    background: linear-gradient(135deg, rgba(135, 60, 255, 0.26), rgba(70, 40, 180, 0.12));
    border-color: rgba(160, 90, 255, 0.35);
    box-shadow: inset 0 0 20px rgba(130, 60, 255, 0.08), 0 0 22px rgba(110, 50, 255, 0.10);
}

.sidebar-icon {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--glass-2);
    border: 1px solid var(--glass-3);
}

.sidebar-item.active .sidebar-icon { background: rgba(145, 75, 255, 0.2); border-color: rgba(170, 100, 255, 0.35); }

.nav-icon {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: #b77cff;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.sidebar-item.active .nav-icon, .sidebar-item:hover .nav-icon { stroke: var(--icon-active); filter: drop-shadow(0 0 6px rgba(170, 100, 255, 0.8)); }

.sidebar-text { font-size: 14px; font-weight: 500; }

.main { margin-left: var(--sidebar-w); min-width: 0; }

.container { max-width: 1400px; margin: 0 auto; padding: 22px 26px 40px; }

.topbar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.topbar-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.topbar-title h1 { font-size: 22px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu-btn { display: none; }

.topbar-right { display: flex; align-items: center; gap: 10px; margin-left: auto; flex-wrap: wrap; }

.branch-select {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 13px;
    background: var(--panel);
    border: 1px solid var(--border-accent);
}

.branch-select select {
    background: transparent;
    color: var(--text);
    border: 0;
    font-size: 14px;
    font-family: inherit;
    padding: 7px 2px;
    outline: none;
    cursor: pointer;
    max-width: 170px;
}

.branch-pill {
    padding: 8px 12px;
    border-radius: 13px;
    background: var(--panel);
    border: 1px solid var(--border-accent);
    font-size: 13px;
}

.user-box { position: relative; }

.user-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 10px 5px 5px;
    border-radius: 15px;
    background: var(--panel);
    border: 1px solid var(--border);
    color: var(--text);
    cursor: pointer;
    text-align: left;
    font-family: inherit;
}

.user-chip:hover { border-color: var(--border-accent); }
.user-chip-avatar { width: 36px; height: 36px; border-radius: 11px; object-fit: cover; flex-shrink: 0; }

.avatar-initials {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #8b3dff, #3b82f6);
    font-weight: 700;
    font-size: 14px;
    color: var(--text);
}

.user-chip-text { display: flex; flex-direction: column; line-height: 1.25; }
.user-chip-text strong { font-size: 14px; }
.user-chip-text small { color: var(--muted); font-size: 12px; }
.user-chip-caret { color: var(--muted); font-size: 12px; }

.user-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    min-width: 190px;
    padding: 6px;
    border-radius: 15px;
    background: var(--panel-strong);
    border: 1px solid var(--border-accent);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
    z-index: 2000;
    display: flex;
    flex-direction: column;
}

.user-menu[hidden] { display: none; }

.user-menu a, .user-menu button {
    padding: 11px 12px;
    border-radius: 10px;
    color: var(--text-2);
    text-decoration: none;
    font-size: 14px;
    background: none;
    border: 0;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
}

.user-menu a:hover, .user-menu button:hover { background: rgba(145, 75, 255, 0.14); color: var(--text); }
.user-menu-logout { color: #fca5a5 !important; }

.app-footer {
    margin-top: 36px;
    padding: 20px 0 4px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 12px;
    text-align: center;
    line-height: 1.8;
}

.bottom-nav { display: none; }
.sidebar-overlay { display: none; }

/* ===== Umumiy elementlar ===== */

.toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.toolbar .search { flex: 1 1 220px; min-width: 0; }
.toolbar .input { min-height: 42px; }
.toolbar select.input { width: auto; flex: 0 1 200px; }

.chips { display: flex; gap: 6px; flex-wrap: wrap; }

.chip {
    padding: 8px 13px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: var(--glass-1);
    color: var(--text-2);
    font-size: 13px;
    cursor: pointer;
    font-family: inherit;
}

.chip.on { color: var(--text); border-color: var(--border-accent); background: rgba(145, 75, 255, 0.18); }

.badge {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .3px;
    white-space: nowrap;
}

.badge-ok { color: #86efac; background: rgba(34, 197, 94, .1); border: 1px solid rgba(34, 197, 94, .3); }
.badge-warn { color: #fcd34d; background: rgba(250, 178, 25, .1); border: 1px solid rgba(250, 178, 25, .3); }
.badge-off { color: #fca5a5; background: rgba(239, 68, 68, .1); border: 1px solid rgba(239, 68, 68, .3); }
.badge-info { color: #c4b5fd; background: rgba(145, 75, 255, .12); border: 1px solid rgba(145, 75, 255, .3); }

.money-debt { color: #fca5a5; font-weight: 600; }
.money-ok { color: #86efac; font-weight: 600; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }

.empty-state { text-align: center; color: var(--muted); padding: 40px 16px; }
.empty-icon { font-size: 28px; margin-bottom: 8px; opacity: .6; }

.loading { display: flex; gap: 6px; justify-content: center; padding: 40px; }
.loading span { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: pulse 1s infinite ease-in-out; }
.loading span:nth-child(2) { animation-delay: .15s; }
.loading span:nth-child(3) { animation-delay: .3s; }
@keyframes pulse { 0%, 100% { opacity: .2; transform: scale(.8); } 50% { opacity: 1; transform: scale(1); } }

/* Ro'yxat qatorlari (telefonda kartochka) */
.list { display: flex; flex-direction: column; gap: 8px; }

.list-row {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 6px 14px;
    padding: 13px 15px;
    border-radius: 16px;
    background: var(--glass-1);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease;
}

.list-row:hover { border-color: var(--border-accent); background: rgba(145, 75, 255, 0.06); }
.list-row.static { cursor: default; }
.list-row.static:hover { border-color: var(--border); background: var(--glass-1); }
.list-main { min-width: 0; }
.list-main strong { display: block; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-main small { color: var(--muted); font-size: 12px; }
.list-side { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.list-side b { font-size: 15px; }

.summary-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.summary-bar > div {
    flex: 1 1 150px;
    padding: 13px 15px;
    border-radius: 15px;
    background: var(--glass-1);
    border: 1px solid var(--border);
}

.summary-bar span { display: block; color: var(--muted); font-size: 11px; letter-spacing: 1px; text-transform: uppercase; }
.summary-bar b { font-size: 20px; }

.tabs { display: flex; gap: 6px; margin-bottom: 14px; border-bottom: 1px solid var(--border); }

.tab {
    padding: 10px 14px;
    background: none;
    border: 0;
    border-bottom: 2px solid transparent;
    color: var(--muted);
    cursor: pointer;
    font-size: 14px;
    font-family: inherit;
}

.tab.on { color: var(--text); border-bottom-color: var(--accent); }

.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: 14px; margin-bottom: 16px; }
.kv span { color: var(--muted); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid-6-4 { display: grid; grid-template-columns: 1.6fr 1fr; gap: 18px; }
.stack { display: flex; flex-direction: column; gap: 18px; }

/* ===== Statistik kartochkalar ===== */

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 18px;
}

.stat-card {
    position: relative;
    min-height: 128px;
    padding: 18px 20px;
    border-radius: 20px;
    overflow: hidden;
    background: var(--card-grad);
    border: 1px solid var(--border);
    box-shadow: inset 0 1px 0 var(--glass-1), 0 12px 35px rgba(0, 0, 0, 0.22);
    transition: transform .2s ease, border-color .2s ease;
    text-decoration: none;
    color: inherit;
    display: block;
}

.stat-card::before {
    content: "";
    position: absolute;
    width: 130px;
    height: 130px;
    right: -45px;
    top: -50px;
    border-radius: 50%;
    opacity: 0.28;
    filter: blur(35px);
    background: var(--glow, #a855f7);
}

a.stat-card:hover { transform: translateY(-3px); border-color: var(--border-accent); }

.stat-top { display: flex; align-items: center; gap: 10px; position: relative; }

.stat-icon {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--glass-3);
    border: 1px solid var(--line);
    font-size: 18px;
    flex-shrink: 0;
}

.stat-label { color: #9a9ab5; font-size: 11px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; }
.stat-value { position: relative; margin-top: 16px; font-size: 26px; font-weight: 700; letter-spacing: -.5px; }
.stat-sub { position: relative; margin-top: 4px; color: var(--muted); font-size: 12px; }
.stat-sub .up { color: #86efac; }
.stat-sub .down { color: #fca5a5; }

.g-purple { --glow: #a855f7; }
.g-blue { --glow: #3b82f6; }
.g-green { --glow: #22c55e; }
.g-red { --glow: #ef4444; }
.g-orange { --glow: #f97316; }
.g-cyan { --glow: #06b6d4; }

/* Bosh sahifa sarlavhasi */
.hero {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 24px 26px;
    margin-bottom: 18px;
    border-radius: 24px;
    border: 1px solid var(--border-accent);
    background:
        radial-gradient(circle at 85% 30%, rgba(59, 130, 246, 0.25), transparent 45%),
        radial-gradient(circle at 15% 80%, rgba(168, 85, 247, 0.30), transparent 50%),
        linear-gradient(135deg, #1a1040, #0c0c24);
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(170, 100, 255, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(170, 100, 255, 0.07) 1px, transparent 1px);
    background-size: 36px 36px;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 60%); mask-image: linear-gradient(90deg, transparent, #000 60%);
    pointer-events: none;
}

.hero > * { position: relative; z-index: 1; }
.hero h1 { font-size: 30px; letter-spacing: 1px; }
.hero h1 span { display: block; font-size: 17px; font-weight: 500; color: #c4b5fd; letter-spacing: 0; margin-top: 2px; }
.hero p { color: #b8b8d0; margin: 10px 0 0; font-size: 14px; }

.hero-date {
    flex-shrink: 0;
    padding: 14px 18px;
    border-radius: 18px;
    background: var(--glass-2);
    border: 1px solid var(--line-2);
    backdrop-filter: blur(12px);
    text-align: right;
}

.hero-date small { display: block; color: var(--muted); font-size: 11px; letter-spacing: 1px; }
.hero-date b { display: block; font-size: 18px; margin: 3px 0; }
.hero-date span { color: #c4b5fd; font-size: 13px; }

/* Tezkor amallar */
.quick-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }

.quick-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 14px 6px;
    border-radius: 16px;
    background: var(--glass-1);
    border: 1px solid var(--border);
    color: var(--text-2);
    text-decoration: none;
    font-size: 12px;
    text-align: center;
    cursor: pointer;
    font-family: inherit;
}

.quick-action:hover { border-color: var(--border-accent); color: var(--text); background: rgba(145, 75, 255, 0.1); }
.quick-action .stat-icon { width: 42px; height: 42px; }

/* Davomat ko'rsatkichi */
.att-summary { display: flex; align-items: center; gap: 20px; }
.att-list { flex: 1; display: flex; flex-direction: column; gap: 9px; }
.att-list div { display: flex; justify-content: space-between; align-items: center; font-size: 14px; }
.att-list i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 8px; }

.ring { position: relative; width: 120px; height: 120px; flex-shrink: 0; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--glass-3); stroke-width: 9; }
.ring-fg { fill: none; stroke: var(--c-income); stroke-width: 9; stroke-linecap: round; }
.ring-text { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring-text b { font-size: 24px; }
.ring-text small { color: var(--muted); font-size: 11px; }

/* ===== Grafiklar ===== */

.chart-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--text-2); margin-bottom: 8px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.dot.s-income { background: var(--c-income); }
.dot.s-expense { background: var(--c-expense); }

.chart-wrap { position: relative; }
.chart-svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart-grid { stroke: var(--glass-3); stroke-width: 1; }
.chart-axis { fill: var(--muted); font-size: 11px; }
.chart-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart-line.s-income { stroke: var(--c-income); }
.chart-line.s-expense { stroke: var(--c-expense); }
.chart-cross { stroke: var(--line-2); stroke-width: 1; stroke-dasharray: 3 3; }
.chart-marker { stroke: var(--surface); stroke-width: 2; }
.chart-marker.s-income { fill: var(--c-income); }
.chart-marker.s-expense { fill: var(--c-expense); }
.chart-hit { cursor: crosshair; }

.chart-tip {
    position: absolute;
    top: 0;
    transform: translateX(-50%);
    padding: 9px 12px;
    border-radius: 12px;
    background: var(--panel-strong);
    border: 1px solid var(--border-accent);
    font-size: 12px;
    line-height: 1.7;
    pointer-events: none;
    white-space: nowrap;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .4);
}

.chart-tip .dot { width: 8px; height: 8px; margin-right: 6px; }

.bar-list { display: flex; flex-direction: column; gap: 12px; }
.bar-row { display: grid; grid-template-columns: minmax(80px, 140px) 1fr auto; align-items: center; gap: 12px; font-size: 13px; }
.bar-label { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-label small { display: block; color: var(--muted); font-size: 11px; }
.bar-track { height: 12px; border-radius: 6px; background: var(--glass-2); overflow: hidden; }
.bar-fill { height: 100%; border-radius: 0 4px 4px 0; }
.bar-accent { background: var(--c-bar); }
.bar-income { background: var(--c-income); }
.bar-expense { background: var(--c-expense); }
.bar-value { font-weight: 600; white-space: nowrap; }

/* ===== Jadval ===== */

.table-wrap { overflow-x: auto; }

.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; color: var(--muted); font-weight: 600; font-size: 11px; letter-spacing: 1px; text-transform: uppercase; padding: 10px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 11px 12px; border-bottom: 1px solid var(--glass-1); white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; }

/* ===== Davomat belgilash ===== */

.att-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 11px 13px;
    border-radius: 15px;
    background: var(--glass-1);
    border: 1px solid var(--border);
}

.att-row strong { font-size: 15px; min-width: 0; overflow: hidden; text-overflow: ellipsis; }

.seg { display: flex; gap: 4px; flex-shrink: 0; }

.seg button {
    min-width: 42px;
    height: 40px;
    padding: 0 8px;
    border-radius: 11px;
    border: 1px solid var(--border);
    background: var(--glass-1);
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}

.seg button.on[data-s=present] { background: rgba(34, 197, 94, .2); border-color: #22c55e; color: #86efac; }
.seg button.on[data-s=absent] { background: rgba(239, 68, 68, .2); border-color: #ef4444; color: #fca5a5; }
.seg button.on[data-s=late] { background: rgba(250, 178, 25, .2); border-color: #fab219; color: #fcd34d; }
.seg button.on[data-s=excused] { background: rgba(56, 189, 248, .2); border-color: #38bdf8; color: #7dd3fc; }

.sticky-actions {
    position: sticky;
    bottom: 0;
    padding: 12px 0 calc(12px + env(safe-area-inset-bottom, 0px));
    background: linear-gradient(180deg, transparent, var(--bg) 35%);
    display: flex;
    gap: 10px;
    z-index: 5;
}

/* O'quvchi tanlagich */
.picker { position: relative; }

.picker-list {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    max-height: 240px;
    overflow-y: auto;
    padding: 4px;
    border-radius: 13px;
    background: var(--panel-strong);
    border: 1px solid var(--border-accent);
    z-index: 50;
    box-shadow: 0 15px 40px rgba(0, 0, 0, .5);
}

.picker-list button {
    display: block;
    width: 100%;
    text-align: left;
    padding: 10px 12px;
    border-radius: 9px;
    background: none;
    border: 0;
    color: var(--text);
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
}

.picker-list button:hover { background: rgba(145, 75, 255, .15); }
.picker-list small { color: var(--muted); margin-left: 6px; }

/* ===== Modal oyna ===== */

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(5, 5, 15, 0.72);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    z-index: 3000;
}

.modal { width: 100%; max-width: 500px; max-height: 92vh; overflow-y: auto; }
.modal-wide { max-width: 760px; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.modal-head h2 { font-size: 19px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 6px; }
.confirm-text { color: var(--text-2); line-height: 1.6; margin: 6px 0 18px; }

/* ===== Xabarlar ===== */

.toast-box {
    position: fixed;
    left: 50%;
    bottom: calc(86px + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 4000;
    width: max-content;
    max-width: calc(100% - 32px);
}

.toast {
    padding: 12px 18px;
    border-radius: 14px;
    background: var(--panel-strong);
    border: 1px solid rgba(34, 197, 94, .45);
    color: #d1fae5;
    font-size: 14px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .45);
    transition: opacity .4s ease, transform .4s ease;
}

.toast-error { border-color: rgba(239, 68, 68, .5); color: #fecaca; }
.toast.hide { opacity: 0; transform: translateY(8px); }

.notice {
    padding: 13px 16px;
    border-radius: 15px;
    margin-bottom: 16px;
    background: rgba(249, 115, 22, 0.1);
    border: 1px solid rgba(249, 115, 22, 0.35);
    color: #fdba74;
    font-size: 14px;
    line-height: 1.5;
}

/* ===== Moslashuvchanlik ===== */

@media (max-width: 1200px) {
    .stats { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 960px) {
    .sidebar { transform: translateX(-105%); }
    body.menu-open .sidebar { transform: none; }
    body.menu-open .sidebar-overlay {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, .55);
        z-index: 999;
    }
    .main { margin-left: 0; }
    .menu-btn { display: inline-flex; }
    .container { padding: 14px 14px calc(96px + env(safe-area-inset-bottom, 0px)); }
    .grid-2, .grid-3, .grid-6-4 { grid-template-columns: 1fr; }

    .bottom-nav {
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px));
        background: var(--nav-bg);
        border-top: 1px solid rgba(170, 100, 255, 0.25);
        backdrop-filter: blur(16px);
        z-index: 900;
    }

    .bottom-nav a, .bottom-nav button {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 3px;
        padding: 6px 2px;
        border-radius: 12px;
        color: #8f8fa8;
        text-decoration: none;
        font-size: 10.5px;
        background: none;
        border: 0;
        font-family: inherit;
        cursor: pointer;
    }

    .bottom-nav .active { color: var(--text); background: rgba(145, 75, 255, .16); }
    .bottom-nav .active .nav-icon { stroke: var(--icon-active); }
    .user-chip-text, .user-chip-caret { display: none; }
    .user-chip { padding: 4px; }
}

@media (max-width: 640px) {
    .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
    .stat-card { min-height: 112px; padding: 14px; border-radius: 17px; }
    .stat-value { font-size: 19px; margin-top: 12px; }
    .stat-label { font-size: 10px; letter-spacing: .6px; }
    .stat-icon { width: 32px; height: 32px; font-size: 15px; }
    .hero { flex-direction: column; align-items: flex-start; padding: 18px; }
    .hero h1 { font-size: 24px; }
    .hero-date { text-align: left; width: 100%; }
    .panel { padding: 16px; border-radius: 18px; }
    .form-row { grid-template-columns: 1fr; gap: 0; }
    .quick-actions { grid-template-columns: repeat(4, 1fr); gap: 6px; }
    .quick-action { font-size: 11px; padding: 10px 2px; }
    .topbar-title h1 { font-size: 18px; }
    .seg button { min-width: 38px; height: 38px; padding: 0 4px; }
    .att-summary { flex-direction: column; align-items: stretch; }
    .att-summary .ring { margin: 0 auto; }
    .bar-row { grid-template-columns: 90px 1fr auto; gap: 8px; }
    .modal-backdrop { padding: 0; align-items: flex-end; }
    .modal { max-height: 94vh; border-radius: 22px 22px 0 0; padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px)); }
    .branch-select select { max-width: 120px; }
}

.profile-grid { display: grid; grid-template-columns: 320px 1fr; gap: 18px; align-items: start; }
@media (max-width: 960px) { .profile-grid { grid-template-columns: 1fr; } }

/* =====================================================================
   YAKUNIY DIZAYN ELEMENTLARI (design/DIZAYN.md)
   ===================================================================== */

/* Tugmalar matni har ikki mavzuda oq (gradient fon) */
.btn { color: #fff; }
.btn-ghost { color: var(--text); }
.avatar-initials { color: #fff; }

/* ----- Yon menyu: ustun tuzilish, pastda foydalanuvchi kartochkasi ----- */
.sidebar { display: flex; flex-direction: column; }
.sidebar-logo { margin-bottom: 22px; }
.sidebar-logo img { width: 150px; }
.sidebar-menu { gap: 3px; }
.sidebar-item { padding: 8px 10px; }
.sidebar-soon { margin-left: auto; font-size: 9px; letter-spacing: .5px; color: var(--muted); border: 1px solid var(--line); border-radius: 8px; padding: 2px 6px; }

.sidebar-user {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    margin-top: 18px;
    border-radius: 16px;
    background: var(--glass-2);
    border: 1px solid var(--line);
    color: inherit;
    text-decoration: none;
}
.sidebar-user img, .sidebar-user .avatar-initials { width: 40px; height: 40px; border-radius: 12px; object-fit: cover; flex-shrink: 0; }
.sidebar-user b { display: block; font-size: 13px; }
.sidebar-user small { color: var(--muted); font-size: 11px; }

/* ----- Yuqori panel: qidiruv, mavzu, qo'ng'iroqcha ----- */
.search-box { position: relative; flex: 0 1 300px; min-width: 0; }
.search-box input {
    width: 100%;
    height: 42px;
    padding: 0 14px 0 38px;
    border-radius: 13px;
    border: 1px solid var(--line);
    background: var(--panel);
    color: var(--text);
    font-family: inherit;
    font-size: 14px;
    outline: none;
}
.search-box input:focus { border-color: var(--border-accent); }
.search-box::before { content: "⌕"; position: absolute; left: 13px; top: 50%; transform: translateY(-52%); color: var(--muted); font-size: 18px; }

.theme-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 42px;
    padding: 0 10px;
    border-radius: 13px;
    border: 1px solid var(--line);
    background: var(--panel);
    color: var(--text-2);
    cursor: pointer;
    font-family: inherit;
}
.theme-toggle .switch { width: 34px; height: 18px; border-radius: 10px; background: linear-gradient(90deg, #6d28d9, #8b5cf6); position: relative; }
.theme-toggle .switch::after { content: ""; position: absolute; top: 2px; left: 18px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: left .2s ease; }
:root[data-theme="light"] .theme-toggle .switch { background: #c9c3ea; }
:root[data-theme="light"] .theme-toggle .switch::after { left: 2px; }

.bell-box { position: relative; }
.bell { position: relative; width: 42px; height: 42px; background: var(--panel); }
.bell-count {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 10px rgba(239, 68, 68, .6);
}
.notif-menu { min-width: 300px; max-width: min(360px, calc(100vw - 24px)); gap: 6px; }
.notif-item { display: flex; gap: 10px; padding: 10px 12px; border-radius: 11px; text-decoration: none; color: var(--text-2); font-size: 13px; line-height: 1.45; }
.notif-item:hover { background: rgba(145, 75, 255, 0.12); }
.notif-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; flex-shrink: 0; }
.notif-warn { background: #fab219; } .notif-bad { background: #ef4444; } .notif-info { background: #8b5cf6; }

/* ----- Sarlavha (hero) — rasmli ----- */
.hero2 {
    position: relative;
    display: grid;
    grid-template-columns: minmax(250px, 1fr) 210px;
    align-items: stretch;
    gap: 18px;
    min-height: 190px;
    margin-bottom: 18px;
    padding: 24px;
    overflow: hidden;
    border-radius: 24px;
    border: 1px solid rgba(170, 100, 255, 0.35);
    background:
        radial-gradient(circle at 10% 90%, rgba(168, 85, 247, 0.35), transparent 50%),
        linear-gradient(135deg, #1b1046, #0b0b26 60%, #0a0f2e);
    color: #fff;
}
.hero2-art {
    position: absolute;
    top: 0;
    bottom: 0;
    right: 230px;
    width: min(56%, 620px);
    background-size: cover;
    background-position: center;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 22%, #000 82%, transparent 100%);
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 22%, #000 82%, transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 22%, #000 82%, transparent 100%);
    opacity: .95;
}
.hero2-text { position: relative; z-index: 2; display: flex; flex-direction: column; justify-content: center; }
.hero2-text h1 { font-size: 40px; font-weight: 800; letter-spacing: 1px; line-height: 1; text-shadow: 0 2px 20px rgba(0, 0, 0, .5); }
.hero2-text h2 { font-size: 24px; font-weight: 600; margin: 4px 0 10px; }
.hero2-text p { margin: 0; font-size: 14px; color: #e0dcff; font-weight: 600; }
.hero2-text small { margin-top: 12px; color: #b9b5d8; font-size: 12px; letter-spacing: .3px; }
.hero2-date {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 16px 18px;
    border-radius: 18px;
    background: rgba(20, 16, 50, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
}
.hero2-date small { color: #a9a6c9; font-size: 12px; }
.hero2-date b { font-size: 20px; margin: 4px 0 6px; }
.hero2-date span { color: #c4b5fd; font-size: 13px; }
.hero2-date span i { font-style: normal; color: #7dd3fc; }
.hero2-date q { margin-top: 14px; color: #d4d0ee; font-size: 13px; line-height: 1.5; }

/* Rahbar sarlavhasidagi filial nuqtalari */
.hero-node {
    position: absolute;
    z-index: 3;
    padding: 4px 9px;
    border-radius: 10px;
    background: rgba(10, 12, 40, 0.82);
    border: 1px solid rgba(96, 165, 250, 0.5);
    font-size: 11px;
    line-height: 1.3;
    color: #fff;
    box-shadow: 0 0 14px rgba(59, 130, 246, .35);
    white-space: nowrap;
    transform: translate(-50%, -50%);
}
.hero-node b { display: block; font-size: 13px; }

/* ----- Rangli statistik kartochkalar (KPI) ----- */
.kpi-grid { display: grid; gap: 16px; margin-bottom: 16px; }
.kpi-grid.cols-2 { grid-template-columns: 1fr 1fr; }
.kpi-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }

.kpi {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 98px;
    padding: 12px 16px 12px 12px;
    border-radius: 18px;
    overflow: hidden;
    color: #fff;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 12px 30px rgba(0, 0, 0, .25);
    transition: transform .2s ease;
}
a.kpi:hover { transform: translateY(-3px); }
.kpi-big { min-height: 118px; }
.kpi-purple { background: linear-gradient(120deg, #5b21b6, #3b1a8f 45%, #1e1b4b); }
.kpi-blue { background: linear-gradient(120deg, #1d4ed8, #1e3a8a 45%, #172554); }
.kpi-green { background: linear-gradient(120deg, #047857, #065f46 45%, #0b2f2a); }
.kpi-red { background: linear-gradient(120deg, #b91c1c, #7f1d1d 45%, #3b0d14); }
.kpi-violet { background: linear-gradient(120deg, #6d28d9, #4c1d95 45%, #24124d); }
.kpi-orange { background: linear-gradient(120deg, #c2410c, #7c2d12 45%, #3a1608); }
.kpi-art { width: 96px; height: 76px; border-radius: 14px; object-fit: cover; flex-shrink: 0; -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 62%, transparent 100%); -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 62%, transparent 100%); mask-image: radial-gradient(circle at 50% 50%, #000 62%, transparent 100%); }
.kpi-big .kpi-art { width: 140px; height: 96px; }
.kpi-body { position: relative; z-index: 1; min-width: 0; }
.kpi-label { font-size: 13px; color: rgba(255, 255, 255, .85); }
.kpi-value { font-size: 24px; font-weight: 800; margin: 2px 0; white-space: nowrap; }
.kpi-big .kpi-value { font-size: 30px; }
.kpi-value small { font-size: 14px; font-weight: 600; }
.kpi-trend { font-size: 12px; font-weight: 700; }
.kpi-trend.up { color: #86efac; } .kpi-trend.down { color: #fca5a5; } .kpi-trend.flat { color: rgba(255, 255, 255, .7); }
.kpi-red .kpi-trend.up { color: #fecaca; }
.kpi-spark { position: absolute; right: 14px; bottom: 12px; display: flex; align-items: flex-end; gap: 3px; height: 30px; opacity: .85; }
.kpi-spark i { width: 4px; border-radius: 2px 2px 0 0; background: rgba(255, 255, 255, .55); min-height: 2px; }
.kpi-spark i:last-child { background: #fff; }

/* ----- Avatar (bosh harflar) ----- */
.av {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    border: 2px solid rgba(255, 255, 255, .15);
}
.person-row { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 12px; padding: 9px 4px; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; }
.person-row:last-child { border-bottom: 0; }
.person-row:hover { background: var(--glass-1); }
.person-row b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person-row small { color: var(--muted); font-size: 12px; }
.tag-new { color: #c084fc; font-size: 12px; font-weight: 600; }
.tag-ok { color: #4ade80; font-size: 12px; font-weight: 600; }

/* Davomat ko'rsatkichi ro'yxati (ikonkalar bilan) */
.att-rows { display: flex; flex-direction: column; gap: 10px; flex: 1; }
.att-rows div { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.att-rows .av { width: 30px; height: 30px; font-size: 13px; }
.att-rows b { margin-left: auto; }

/* ----- Vertikal ustunli grafik ----- */
.vbars { display: flex; align-items: flex-end; justify-content: space-around; gap: 10px; height: 200px; padding-top: 22px; }
.vbar { flex: 1; max-width: 46px; display: flex; flex-direction: column; align-items: center; height: 100%; justify-content: flex-end; gap: 6px; }
.vbar-val { font-size: 12px; font-weight: 700; }
.vbar-fill { width: 100%; border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, #8b5cf6, #3b82f6); box-shadow: 0 0 14px rgba(139, 92, 246, .35); min-height: 3px; }
.vbar-label { font-size: 11px; color: var(--muted); white-space: nowrap; max-width: 70px; overflow: hidden; text-overflow: ellipsis; }

/* ----- Donut ----- */
.donut-wrap { display: flex; align-items: center; gap: 20px; }
.donut { position: relative; width: 150px; height: 150px; flex-shrink: 0; }
.donut svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.donut-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.donut-center b { font-size: 20px; }
.donut-center small { color: var(--muted); font-size: 11px; }
.donut-legend { flex: 1; display: flex; flex-direction: column; gap: 8px; font-size: 13px; min-width: 0; }
.donut-legend div { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; }
.donut-legend i { width: 10px; height: 10px; border-radius: 3px; }
.donut-legend span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.donut-legend em { font-style: normal; color: var(--muted); font-size: 12px; white-space: nowrap; }

/* ----- Filial holati ----- */
.st-good { color: #4ade80; font-weight: 600; }
.st-mid { color: #fbbf24; font-weight: 600; }
.st-bad { color: #f87171; font-weight: 600; }

/* ----- Telegram va AI kartochkalari ----- */
.tg-card { display: flex; align-items: center; gap: 18px; }
.tg-icon { width: 76px; height: 76px; flex-shrink: 0; border-radius: 50%; background: radial-gradient(circle at 30% 30%, #4fc3f7, #0288d1); display: flex; align-items: center; justify-content: center; box-shadow: 0 0 30px rgba(41, 182, 246, .45); }
.tg-icon svg { width: 40px; height: 40px; }
.tg-card h2 { font-size: 16px; }
.tg-card p { color: var(--muted); font-size: 13px; margin: 4px 0 12px; }
.btn-tg { background: linear-gradient(135deg, #2563eb, #1d4ed8); border-color: rgba(96, 165, 250, .5); box-shadow: 0 8px 22px rgba(37, 99, 235, .3); }

.ai-card ul { margin: 0 0 16px; padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 9px; }
.ai-card li { display: flex; gap: 8px; font-size: 13px; line-height: 1.5; color: var(--text-2); }
.ai-card li::before { content: "•"; color: #a855f7; font-weight: 700; }
.ai-head { display: flex; gap: 14px; align-items: flex-start; }
.ai-head img { width: 64px; height: 64px; border-radius: 16px; flex-shrink: 0; }
.badge-new { background: linear-gradient(135deg, #8b5cf6, #6d28d9); color: #fff; border: 0; }

/* Panel sarlavhasidagi tanlagich */
.panel-select { height: 32px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--glass-2); color: var(--text-2); font-family: inherit; font-size: 12px; }

/* Bo'lim hali tayyor emas */
.soon-panel { text-align: center; padding: 50px 20px; }
.soon-panel .stat-icon { width: 64px; height: 64px; font-size: 30px; margin: 0 auto 16px; }
.soon-panel p { color: var(--muted); max-width: 520px; margin: 10px auto 0; line-height: 1.6; }

/* ----- Moslashuvchanlik (yangi elementlar) ----- */
@media (max-width: 1200px) {
    .kpi-grid.cols-3 { grid-template-columns: 1fr 1fr; }
    .hero2-art { right: 0; width: 70%; opacity: .55; }
}

@media (max-width: 960px) {
    .search-box { display: none; }
    .theme-toggle span.lbl { display: none; }
    .sidebar-user { margin-bottom: 70px; }
}

@media (max-width: 640px) {
    .hero2 { grid-template-columns: 1fr; padding: 18px; min-height: 0; }
    .hero2-art { width: 100%; right: 0; opacity: .4; }
    .hero2-text h1 { font-size: 30px; }
    .hero2-text h2 { font-size: 19px; }
    .hero2-date { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 12px 14px; }
    .hero2-date b { font-size: 16px; margin: 0; }
    .hero2-date q { margin-top: 2px; width: 100%; }
    .hero-node { display: none; }
    .kpi-grid.cols-2, .kpi-grid.cols-3 { grid-template-columns: 1fr 1fr; gap: 10px; }
    .kpi { flex-direction: column; align-items: flex-start; gap: 6px; min-height: 0; padding: 10px; }
    .kpi-art, .kpi-big .kpi-art { width: 100%; height: 70px; border-radius: 12px; }
    .kpi-value, .kpi-big .kpi-value { font-size: 18px; }
    .kpi-value small { font-size: 11px; }
    .kpi-label { font-size: 12px; }
    .kpi-spark { display: none; }
    .donut-wrap { flex-direction: column; align-items: stretch; }
    .donut { margin: 0 auto; }
    .vbars { height: 170px; gap: 4px; }
    .vbar-label { font-size: 10px; }
    .tg-card { flex-direction: column; text-align: center; }
    .theme-toggle { padding: 0 8px; }
}

/* ----- Sarlavha rasmi: matn va sana bloki orasida, to'liq kompozitsiya (3:1) ----- */
.hero2 { min-height: 214px; }
.hero2-art {
    right: 228px;
    left: auto;
    width: auto;
    height: 100%;
    aspect-ratio: 3 / 1;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: right center;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 30%, #000 94%, transparent 100%);
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 30%, #000 94%, transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 30%, #000 94%, transparent 100%);
    opacity: 1;
}
.hero2-art .hero-node { transform: translate(-50%, 0); }
.hero-node { padding: 3px 8px; font-size: 10px; }
.hero-node b { font-size: 11px; }

/* Yon menyu: "tez orada" — kichik nuqta */
.sidebar-soon { width: 7px; height: 7px; padding: 0; border: 0; border-radius: 50%; background: #8b5cf6; box-shadow: 0 0 8px #8b5cf6; font-size: 0; }

/* Davomat halqasi — dizayndagidek yashil */
.ring-fg { stroke: #10b981; }

@media (max-width: 1200px) {
    .hero2-art { right: 0; opacity: .5; }
}

@media (max-width: 640px) {
    .hero2-art { right: -10%; height: 100%; opacity: .45; }
    .kpi-grid.cols-3 > .kpi:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

[hidden] { display: none !important; }
.sidebar { scrollbar-width: thin; scrollbar-color: rgba(145, 75, 255, .35) transparent; }
.sidebar::-webkit-scrollbar { width: 5px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(145, 75, 255, .35); border-radius: 4px; }
@media (max-width: 640px) {
    .kpi-grid.cols-3 > .kpi:last-child:nth-child(odd) { flex-direction: row; align-items: center; }
    .kpi-grid.cols-3 > .kpi:last-child:nth-child(odd) .kpi-art { width: 120px; height: 72px; }
}

/* =====================================================================
   CHAT VA TOPSHIRIQLAR (namunaviy/4 — 10-oyna)
   ===================================================================== */

.nav-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: #ef4444; color: #fff; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.bottom-nav a { position: relative; }
.bottom-nav .nav-badge { position: absolute; top: 2px; right: 18%; margin: 0; min-width: 16px; height: 16px; font-size: 10px; }

.chat-wrap { display: grid; grid-template-columns: 330px 1fr; gap: 16px; height: calc(100vh - 150px); min-height: 480px; }
.chat-list { padding: 14px; display: flex; flex-direction: column; overflow: hidden; }
.chat-list-head { display: flex; align-items: center; justify-content: space-between; margin: 4px 4px 12px; }
#chat_contacts { overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }

.chat-contact {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 10px;
    align-items: center;
    width: 100%;
    padding: 10px;
    border-radius: 14px;
    border: 1px solid transparent;
    background: none;
    color: var(--text);
    text-align: left;
    cursor: pointer;
    font-family: inherit;
}
.chat-contact:hover { background: var(--glass-2); }
.chat-contact.on { background: rgba(145, 75, 255, .16); border-color: var(--border-accent); }
.chat-contact .av { width: 42px; height: 42px; font-size: 14px; }
.chat-contact-main { min-width: 0; }
.chat-contact-main b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-contact-main small { display: block; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-contact-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.chat-contact-side small { color: var(--muted); font-size: 11px; }

.chat-main { padding: 0; display: flex; flex-direction: column; overflow: hidden; }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); min-height: 66px; }
.chat-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.chat-title .av { width: 40px; height: 40px; }
.chat-title b { display: block; }
.chat-title small { color: var(--muted); font-size: 12px; }
.chat-back { display: none; }

.chat-messages { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.msg { display: flex; flex-direction: column; align-items: flex-start; max-width: 78%; }
.msg.mine { align-self: flex-end; align-items: flex-end; }
.msg-sender { font-size: 11px; color: var(--accent); margin: 0 0 3px 10px; font-weight: 600; }
.msg-bubble { position: relative; padding: 9px 13px 18px; border-radius: 16px 16px 16px 4px; background: var(--glass-3); border: 1px solid var(--line); min-width: 74px; }
.msg.mine .msg-bubble { border-radius: 16px 16px 4px 16px; background: linear-gradient(135deg, #6d28d9, #4f46e5); border-color: transparent; color: #fff; }
.msg-text { white-space: pre-wrap; word-break: break-word; font-size: 14px; line-height: 1.45; }
.msg-time { position: absolute; right: 10px; bottom: 4px; font-size: 10px; opacity: .65; }

.chat-input { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.chat-input .input { flex: 1; }
.chat-input .icon-btn { width: 44px; height: 44px; font-size: 18px; }
.icon-btn.recording, .btn.recording { background: #ef4444 !important; color: #fff !important; border-color: #ef4444 !important; width: auto; padding: 0 12px; font-size: 13px; animation: pulse-rec 1s infinite; }
@keyframes pulse-rec { 50% { box-shadow: 0 0 0 6px rgba(239, 68, 68, .25); } }

/* Ovozli xabar */
.voice { --p: 0%; display: flex; align-items: center; gap: 10px; min-width: 210px; }
.voice-btn { width: 36px; height: 36px; flex-shrink: 0; border-radius: 50%; border: 0; background: #fff; color: #5b21b6; font-size: 13px; cursor: pointer; }
.voice-wave { flex: 1; display: flex; align-items: center; gap: 2px; height: 28px; background: linear-gradient(90deg, currentColor var(--p), transparent var(--p)); -webkit-background-clip: text; }
.voice-wave i { flex: 1; min-width: 2px; border-radius: 2px; background: currentColor; opacity: .55; }
.voice.playing .voice-wave i { opacity: .85; }
.voice-time { font-size: 11px; opacity: .8; min-width: 28px; }
.msg:not(.mine) .voice-btn, .timeline .voice-btn { background: linear-gradient(135deg, #8b5cf6, #6d28d9); color: #fff; }

/* Chat ichidagi topshiriq kartochkasi */
.task-card { min-width: 220px; padding: 10px 12px; border-radius: 12px; background: rgba(0, 0, 0, .22); border: 1px solid rgba(250, 178, 25, .45); cursor: pointer; }
.msg:not(.mine) .task-card { background: var(--glass-2); }
.task-card-title { font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.task-card-meta { font-size: 12px; opacity: .9; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.task-card-note { margin-top: 6px; font-size: 13px; opacity: .9; }

/* Topshiriq jarayoni */
.timeline { display: flex; flex-direction: column; gap: 12px; }
.tl-item { display: grid; grid-template-columns: 14px 1fr; gap: 10px; }
.tl-dot { width: 10px; height: 10px; margin-top: 5px; border-radius: 50%; background: var(--muted); }
.tl-dot.s-new { background: #8b5cf6; } .tl-dot.s-in_progress, .tl-dot.s-review { background: #fab219; }
.tl-dot.s-returned { background: #ef4444; } .tl-dot.s-done { background: #22c55e; }
.tl-head { font-size: 13px; }
.tl-text { margin-top: 4px; font-size: 14px; color: var(--text-2); white-space: pre-wrap; }
.tl-item .voice { margin-top: 6px; color: var(--text); }
.tk-count { opacity: .7; }

@media (max-width: 960px) {
    .chat-wrap { height: calc(100vh - 190px); }
}

@media (max-width: 700px) {
    .chat-wrap { grid-template-columns: 1fr; height: calc(100dvh - 170px); }
    .chat-main { display: none; }
    .chat-wrap.open .chat-list { display: none; }
    .chat-wrap.open .chat-main { display: flex; }
    .chat-back { display: inline-flex; }
    .msg { max-width: 88%; }
    .voice { min-width: 180px; }
}
@media (max-width: 700px) {
    .chat-wrap.open .chat-main {
        position: fixed;
        inset: 0;
        z-index: 950;
        border-radius: 0;
        border: 0;
        padding-top: env(safe-area-inset-top, 0px);
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }
    .chat-wrap { height: auto; min-height: 0; }
    .chat-list { max-height: none; }
}
@media (max-width: 700px) { .chat-wrap.open .chat-main { background: var(--bg); } }

/* =====================================================================
   TELEFON VA PLANSHETGA MOSLASHUV (zoom muammosi)
   ===================================================================== */

/* Panjara bloklari ichidagi keng jadval sahifani kengaytirmasin — jadval o'zi suriladi */
.grid-2 > *, .grid-3 > *, .grid-6-4 > *, .kpi-grid > *, .profile-grid > *, .stats > *, .chat-wrap > * { min-width: 0; }

/* Himoya: hech qanday element sahifani yon tomonga kengaytirmasin */
html, .page-body { max-width: 100%; overflow-x: clip; }
.table-wrap { max-width: 100%; -webkit-overflow-scrolling: touch; }

/* iPhone 16px dan kichik maydonga bosilganda sahifani kattalashtiradi — telefon/planshetda 16px */
@media (max-width: 1024px), (pointer: coarse) {
    input, select, textarea, .input, .field input, .field select, .field textarea,
    .branch-select select, .panel-select, .chat-input .input, .search-box input { font-size: 16px; }
    .panel-select { height: 36px; }
}
@media (max-width: 1200px) { .hero-node { display: none; } }

/* =====================================================================
   NAMUNAVIY DIZAYN BLOKLARI (4-namuna)
   ===================================================================== */

.only-mobile { display: none; }
@media (max-width: 900px) { .only-desktop { display: none; } .only-mobile { display: flex; } }

/* Bugungi darslar */
.lesson-row { display: grid; grid-template-columns: 52px 34px 1fr auto auto; align-items: center; gap: 12px; padding: 10px 6px; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; }
.lesson-row:last-child { border-bottom: 0; }
.lesson-row:hover { background: var(--glass-1); }
.lesson-time { font-weight: 700; font-size: 14px; }
.lesson-icon { width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-weight: 700; background: linear-gradient(135deg, #3b82f6, #8b5cf6); color: #fff; }
.lesson-name { min-width: 0; }
.lesson-name b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lesson-name small { color: var(--muted); font-size: 12px; }
.lesson-count { color: var(--text-2); font-size: 13px; white-space: nowrap; }
@media (max-width: 640px) {
    .lesson-row { grid-template-columns: 46px 1fr auto; }
    .lesson-icon, .lesson-count { display: none; }
}

/* So'nggi faolliklar */
.activity-row { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 9px 4px; border-bottom: 1px solid var(--line); }
.activity-row:last-child { border-bottom: 0; }
.activity-icon { width: 32px; height: 32px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 14px; border: 1px solid; }
.activity-text { font-size: 13px; color: var(--text-2); line-height: 1.4; min-width: 0; }

/* Segment tablar (to'lov turi) */
.tabs-pill { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 13px; background: var(--glass-2); border: 1px solid var(--line); }
.tabs-pill button { height: 36px; padding: 0 14px; border-radius: 10px; border: 0; background: none; color: var(--text-2); font-family: inherit; font-size: 14px; cursor: pointer; }
.tabs-pill button.on { background: linear-gradient(135deg, #8b3dff, #5b4dff); color: #fff; }

/* O'quvchilar jadvali */
.students-table tbody tr { cursor: pointer; }
.students-table tbody tr:hover td { background: var(--glass-1); }
.name-cell { display: flex; align-items: center; gap: 10px; }
.name-cell .av { width: 32px; height: 32px; font-size: 12px; }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; }
.row-actions .icon-btn { width: 34px; height: 34px; font-size: 14px; text-decoration: none; }

/* Sozlamalar */
.settings-wrap { display: grid; grid-template-columns: 230px 1fr; gap: 18px; align-items: start; }
.settings-wrap > * { min-width: 0; }
.settings-tabs { padding: 10px; display: flex; flex-direction: column; gap: 4px; }
.settings-tab { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 12px; color: var(--text-2); text-decoration: none; font-size: 14px; }
.settings-tab span { width: 22px; text-align: center; }
.settings-tab:hover { background: var(--glass-2); }
.settings-tab.on { background: rgba(145, 75, 255, .16); color: var(--text); border: 1px solid var(--border-accent); }
.settings-body { max-width: 760px; }
.settings-photo { display: flex; align-items: center; gap: 18px; margin-bottom: 18px; }
.big-avatar { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; border: 3px solid var(--border-accent); box-shadow: 0 0 30px rgba(145, 75, 255, .35); display: inline-flex; align-items: center; justify-content: center; font-size: 30px; flex-shrink: 0; }
.theme-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.theme-card { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: 16px; border: 2px solid var(--line); background: var(--glass-1); color: var(--text); font-family: inherit; font-size: 14px; cursor: pointer; }
.theme-card.on { border-color: #8b5cf6; box-shadow: 0 0 20px rgba(139, 92, 246, .3); }
.theme-prev { height: 70px; border-radius: 10px; }
.theme-prev.dark { background: linear-gradient(135deg, #1b1046, #0b0b18); border: 1px solid rgba(255, 255, 255, .1); }
.theme-prev.light { background: linear-gradient(135deg, #ffffff, #e9e6ff); border: 1px solid rgba(0, 0, 0, .08); }
@media (max-width: 760px) {
    .settings-wrap { grid-template-columns: 1fr; }
    .settings-tabs { flex-direction: row; overflow-x: auto; padding: 6px; }
    .settings-tab { white-space: nowrap; padding: 9px 12px; }
}

/* ===== Telegram: dars hisoboti ===== */
.media-pick { display: flex; gap: 8px; flex-wrap: wrap; }
.media-pick .btn { cursor: pointer; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin-top: 10px; }
.media-item { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--glass-2); border: 1px solid var(--line); }
.media-item img, .media-item video { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-item button { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .65); color: #fff; cursor: pointer; }
.media-item small { position: absolute; left: 4px; bottom: 4px; padding: 1px 6px; border-radius: 8px; background: rgba(0, 0, 0, .6); color: #fff; font-size: 10px; }
.media-tag { position: absolute; left: 4px; top: 4px; font-size: 14px; }
.upload-progress { position: relative; height: 32px; border-radius: 10px; background: var(--glass-2); border: 1px solid var(--line); overflow: hidden; margin-bottom: 12px; }
.upload-progress span { position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(90deg, #2563eb, #8b5cf6); transition: width .2s ease; }
.upload-progress b { position: relative; display: flex; align-items: center; justify-content: center; height: 100%; font-size: 13px; color: #fff; }
.steps-list { padding-left: 20px; margin: 4px 0 12px; display: flex; flex-direction: column; gap: 12px; line-height: 1.55; color: var(--text-2); }
.code-box { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; padding: 10px 12px; border-radius: 12px; background: var(--glass-2); border: 1px dashed var(--border-accent); }
.code-box code { font-size: 16px; font-weight: 700; color: var(--text); letter-spacing: .5px; }
.field .media-pick label.btn { text-transform: none; letter-spacing: normal; font-size: 14px; color: var(--text); }

/* ===== Arizalar ===== */
.share-links { display: flex; flex-direction: column; gap: 8px; }
.share-links .code-box { margin: 0; }
.share-links code { font-size: 13px; font-weight: 600; overflow-wrap: anywhere; flex: 1; }
.app-row .list-main small { display: block; margin-top: 2px; }
.app-row .list-main a { color: var(--accent); text-decoration: none; }
.app-row { align-items: start; }
@media (max-width: 640px) { .app-row { grid-template-columns: 1fr; } .app-row .list-side { align-items: flex-start; flex-direction: row; justify-content: space-between; } }

/* ===== AI Analitika ===== */
.ai-summary { font-size: 15px; line-height: 1.7; color: var(--text-2); margin: 0 0 16px; }
.ai-highlights { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.ai-hl { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-radius: 14px; background: var(--glass-2); border: 1px solid var(--line); font-size: 13px; line-height: 1.5; }
.ai-hl span { color: var(--text-2); }
.ai-hl-good { border-left: 3px solid #22c55e; } .ai-hl-warning { border-left: 3px solid #fab219; } .ai-hl-critical { border-left: 3px solid #ef4444; }
.ai-problem, .ai-reco { display: flex; flex-direction: column; gap: 5px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14px; line-height: 1.5; }
.ai-problem:last-child, .ai-reco:last-child { border-bottom: 0; }
.ai-problem ul { margin: 4px 0 0; padding-left: 18px; color: var(--text-2); font-size: 13px; }
.visually-hidden-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; pointer-events: none; }
.photo-pick { position: relative; cursor: pointer; }

/* ===== Profil rasmini ramkaga moslash ===== */
.crop-box { position: relative; width: 260px; height: 260px; margin: 6px auto 14px; border-radius: 18px; overflow: hidden; }
.crop-canvas { display: block; touch-action: none; cursor: grab; }
.crop-canvas:active { cursor: grabbing; }
.crop-box::after { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: 18px;
    background: radial-gradient(circle at center, transparent 129px, rgba(5, 5, 15, .6) 130px);
    box-shadow: inset 0 0 0 2px rgba(170, 100, 255, .5); }
.crop-zoom { display: flex; align-items: center; gap: 10px; max-width: 300px; margin: 0 auto 8px; }
.crop-zoom input { flex: 1; accent-color: #8b5cf6; }

/* ===== Dars jadvali ===== */
.sched-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.sched-col { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 10px; border-radius: 16px; background: var(--glass-1); border: 1px solid var(--line); }
.sched-col.today { border-color: rgba(145, 75, 255, .55); box-shadow: 0 0 0 1px rgba(145, 75, 255, .25); }
.sched-head { font-size: 13px; font-weight: 600; color: var(--text-2); text-align: center; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.sched-col.today .sched-head { color: #c4b5fd; }
.sched-card { display: flex; flex-direction: column; gap: 2px; padding: 9px 10px; border-radius: 12px; text-decoration: none; color: var(--text);
    background: rgba(145, 75, 255, .1); border: 1px solid rgba(145, 75, 255, .25); border-left: 3px solid #8b5cf6; min-width: 0; }
.sched-card:hover { background: rgba(145, 75, 255, .18); }
.sched-card b { font-size: 13px; }
.sched-card .sched-name { font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.sched-card small { color: var(--muted); font-size: 11.5px; overflow-wrap: anywhere; }
.sched-card.conflict { background: rgba(239, 68, 68, .1); border-color: rgba(239, 68, 68, .45); border-left-color: #ef4444; }
.sched-empty { color: var(--muted); font-size: 12px; text-align: center; padding: 10px 0; }
.sched-tabs { display: flex; flex-wrap: nowrap; overflow-x: auto; max-width: 100%; }
.sched-tabs button { flex: 1 0 auto; padding: 0 10px; }
#sc_day .sched-card { padding: 12px 14px; }
#sc_day .sched-card b, #sc_day .sched-card .sched-name { font-size: 15px; }
#sc_day .sched-card small { font-size: 13px; }
:root[data-theme="light"] .sched-col.today .sched-head { color: #6d28d9; }@media (max-width: 900px) { .sched-week { display: none; } }

/* ===== To'lov taqsimoti (o'quvchi formasi) ===== */
.share-box { border: 1px dashed var(--border-accent, rgba(145, 75, 255, .4)); border-radius: 14px; padding: 12px; margin-bottom: 14px; display: flex; flex-direction: column; gap: 8px; }
.share-head { display: flex; flex-direction: column; gap: 2px; }
.share-head small { font-size: 12px; }
.share-row { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.3fr) minmax(0, 1fr) auto; gap: 6px; align-items: center; }
.share-row select, .share-row input { min-width: 0; width: 100%; }
.share-row .icon-btn { width: 38px; height: 38px; }
.share-box > .btn { align-self: flex-start; }
.share-total { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; }
@media (max-width: 560px) {
    .share-row { grid-template-columns: minmax(0, 1fr) auto; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
    .share-row [data-sg] { grid-column: 1 / -1; }
    .share-row [data-st] { grid-column: 1 / -1; }
}
.share-split { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; margin: -4px 0 14px; }
.share-pill { padding: 5px 10px; border-radius: 999px; background: rgba(145, 75, 255, .12); border: 1px solid rgba(145, 75, 255, .3); }
.share-pill.center { background: rgba(34, 197, 94, .1); border-color: rgba(34, 197, 94, .35); }

/* ===== O'qituvchi bloki ===== */
.tb-h { font-size: 14px; margin: 18px 0 10px; color: var(--text-2); }
.tb-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.tb-day { display: flex; flex-direction: column; gap: 3px; padding: 8px 6px; border-radius: 12px; background: var(--glass-1); border: 1px solid var(--line); text-align: center; min-width: 0; }
.tb-day b { font-size: 12px; color: var(--muted); }
.tb-day small { font-size: 11px; color: var(--muted); overflow-wrap: anywhere; }
.tb-day.has { border-color: rgba(145, 75, 255, .45); background: rgba(145, 75, 255, .1); }
.tb-day.has b { color: var(--text); }
.tb-day.has small { color: var(--text-2); }
.tb-table td, .tb-table th { white-space: nowrap; }
.tb-table td:first-child { white-space: normal; min-width: 140px; }
.tb-total td { font-weight: 700; border-top: 2px solid var(--line); }
@media (max-width: 560px) { .tb-week { grid-template-columns: repeat(4, minmax(0, 1fr)); } }.pay-split { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; margin: -4px 0 14px; }
.pay-split[hidden] { display: none; }

/* ===== To'lov cheki ===== */
.receipt-preview { display: flex; justify-content: center; margin-bottom: 8px; }
.receipt-preview .receipt { width: 100%; max-width: 340px; background: #fff; color: #111; border-radius: 12px; padding: 16px 18px; font-size: 13px; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }
.receipt-preview .rc-head { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; padding-bottom: 8px; border-bottom: 1px dashed #999; }
.receipt-preview .rc-head b { font-size: 16px; }
.receipt-preview .rc-head span { color: #555; font-size: 12px; }
.receipt-preview .rc-title { text-align: center; font-weight: 700; margin: 10px 0; letter-spacing: .5px; }
.receipt-preview table { width: 100%; border-collapse: collapse; }
.receipt-preview td { padding: 3px 0; vertical-align: top; color: #444; }
.receipt-preview td:last-child { text-align: right; font-weight: 600; color: #111; }
.receipt-preview .rc-sum { display: flex; justify-content: space-between; align-items: center; border-top: 1px dashed #999; border-bottom: 1px dashed #999; padding: 8px 0; margin: 8px 0; }
.receipt-preview .rc-sum b { font-size: 19px; color: #15803d; }
.receipt-preview .rc-small td { font-size: 12px; }
.receipt-preview .rc-foot { text-align: center; margin-top: 10px; padding-top: 8px; border-top: 1px dashed #999; font-size: 12px; color: #555; }
/* ===== Oyni yopish ===== */
.close-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 14px; margin-bottom: 14px; border-radius: 14px; border: 1px dashed var(--line); background: var(--glass-1); }
.close-bar > div:first-child { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.close-bar small { color: var(--muted); font-size: 12px; line-height: 1.5; }
.close-bar.is-closed { border-style: solid; border-color: rgba(234, 179, 8, .45); background: rgba(234, 179, 8, .08); }
.close-actions { display: flex; gap: 8px; flex-wrap: wrap; }
/* =====================================================================
   3D JONLI RASMLAR (bosh sahifa): suzish, aylanish, kursor ortidan og'ish
   ===================================================================== */
.kpi {
    transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--lift, 0px));
    transition: transform .35s cubic-bezier(.2, .8, .2, 1), box-shadow .35s ease;
}
a.kpi:hover { --lift: -4px; transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-4px); box-shadow: 0 20px 44px rgba(0, 0, 0, .38), 0 0 0 1px rgba(255, 255, 255, .16); }
.kpi::after {
    content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; border-radius: inherit;
    background: radial-gradient(circle at var(--gx, 50%) var(--gy, 0%), rgba(255, 255, 255, .22), transparent 48%);
    opacity: 0; transition: opacity .3s ease;
}
a.kpi:hover::after { opacity: 1; }

.kpi-art { animation: art3d 7s ease-in-out infinite; will-change: transform; transition: scale .35s ease; }
a.kpi:hover .kpi-art { scale: 1.08; }
.kpi:nth-child(2) .kpi-art { animation-delay: -1.7s; }
.kpi:nth-child(3) .kpi-art { animation-delay: -3.4s; }
.kpi:nth-child(4) .kpi-art { animation-delay: -5.1s; }
.kpi:nth-child(5) .kpi-art { animation-delay: -2.6s; }
.kpi:nth-child(6) .kpi-art { animation-delay: -4.3s; }
@keyframes art3d {
    0%, 100% { transform: perspective(520px) rotateY(-14deg) rotateX(6deg) translate3d(0, 0, 0); }
    25% { transform: perspective(520px) rotateY(-2deg) rotateX(-4deg) translate3d(0, -5px, 16px); }
    50% { transform: perspective(520px) rotateY(14deg) rotateX(5deg) translate3d(0, -2px, 8px); }
    75% { transform: perspective(520px) rotateY(3deg) rotateX(-6deg) translate3d(0, -6px, 20px); }
}
@keyframes art3d-wide {
    0%, 100% { transform: perspective(700px) rotateY(-6deg) rotateX(4deg) translate3d(0, 0, 0); }
    50% { transform: perspective(700px) rotateY(6deg) rotateX(-3deg) translate3d(0, -3px, 12px); }
}
@media (max-width: 640px) { .kpi-art { animation-name: art3d-wide; } }

/* Sarlavhadagi katta rasm: sekin "nafas olish" + sichqoncha bilan parallaks */
.hero2-art {
    animation: hero3d 16s ease-in-out infinite;
    transform-origin: 55% 50%;
    translate: var(--px, 0px) var(--py, 0px);
    transition: translate .5s ease-out;
    will-change: transform;
}
@keyframes hero3d {
    0%, 100% { transform: perspective(1200px) rotateY(-5deg) rotateX(2deg) scale(1.03); }
    50% { transform: perspective(1200px) rotateY(5deg) rotateX(-2deg) scale(1.08) translateY(-5px); }
}
.hero2-art::after {
    content: ""; position: absolute; inset: -20%; pointer-events: none;
    background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, .16) 50%, transparent 60%);
    transform: translateX(-70%);
    animation: hero-shine 9s ease-in-out infinite;
}
@keyframes hero-shine { 0%, 55% { transform: translateX(-70%); } 85%, 100% { transform: translateX(70%); } }
.hero-node { animation: node-pulse 3.2s ease-in-out infinite; }
@keyframes node-pulse { 0%, 100% { box-shadow: 0 0 10px rgba(59, 130, 246, .3); } 50% { box-shadow: 0 0 22px rgba(96, 165, 250, .75); } }

.ai-head img { animation: art3d 8s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
    .kpi-art, .hero2-art, .hero2-art::after, .hero-node, .ai-head img { animation: none !important; }
    .kpi, .hero2-art { transition: none; }
}
/* ===== Logotip: emblema doim 3D aylanadi, "ALHIKMA" yozuvi o'qiladigan holda yarqiraydi ===== */
.logo3d { display: flex; flex-direction: column; align-items: center; perspective: 700px; }
.logo3d img { width: 100%; max-width: none; display: block; filter: none; }
.logo3d-emblem, .logo3d-text { width: 150px; position: relative; }
.logo3d-emblem {
    height: calc(150px * 410 / 546); overflow: hidden;
    animation: logo-spin 7s linear infinite;
}
.logo3d-emblem img { filter: drop-shadow(0 0 10px rgba(165, 90, 255, .6)); }
.logo3d-text { height: calc(150px * 106 / 546); overflow: hidden; margin-top: 2px; filter: drop-shadow(0 0 10px rgba(165, 90, 255, .45)); }
.logo3d-text img { margin-top: -75.09%; }
.logo3d-text::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(100deg, transparent 35%, rgba(255, 255, 255, .55) 50%, transparent 65%);
    mix-blend-mode: overlay; transform: translateX(-120%);
    animation: logo-shine 4.5s ease-in-out infinite;
}
@keyframes logo-spin {
    0% { transform: rotateY(0deg) translateY(0); }
    25% { transform: rotateY(90deg) translateY(-3px); }
    50% { transform: rotateY(180deg) translateY(0); }
    75% { transform: rotateY(270deg) translateY(-3px); }
    100% { transform: rotateY(360deg) translateY(0); }
}
@keyframes logo-shine { 0%, 50% { transform: translateX(-120%); } 80%, 100% { transform: translateX(120%); } }
@media (prefers-reduced-motion: reduce) { .logo3d-emblem, .logo3d-text::after { animation: none; } }
/* ===== Jonli rasmlar v2: kino-zoom (Ken Burns), yorug'lik o'tishi, yorqinlik pulsi ===== */
.kpi-art { display: block; position: relative; overflow: hidden; }
.kpi-art-img {
    display: block; width: 100%; height: 100%; object-fit: cover;
    animation: art-kenburns 9s ease-in-out infinite;
    transform-origin: 50% 50%; will-change: transform;
}
.kpi-art::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .38) 48%, rgba(255, 255, 255, .08) 56%, transparent 70%);
    transform: translateX(-130%);
    animation: art-shine 5.5s ease-in-out infinite;
}
.kpi:nth-child(2) .kpi-art-img, .kpi:nth-child(2) .kpi-art::after { animation-delay: -1.4s; }
.kpi:nth-child(3) .kpi-art-img, .kpi:nth-child(3) .kpi-art::after { animation-delay: -2.8s; }
.kpi:nth-child(4) .kpi-art-img, .kpi:nth-child(4) .kpi-art::after { animation-delay: -4.2s; }
.kpi:nth-child(5) .kpi-art-img, .kpi:nth-child(5) .kpi-art::after { animation-delay: -2.1s; }
.kpi:nth-child(6) .kpi-art-img, .kpi:nth-child(6) .kpi-art::after { animation-delay: -3.5s; }
.kpi:nth-child(even) .kpi-art-img { animation-name: art-kenburns-2; }
@keyframes art-kenburns {
    0%, 100% { transform: scale(1.06) translate(-3%, 2%); filter: brightness(1) saturate(1); }
    50% { transform: scale(1.24) translate(3%, -3%); filter: brightness(1.22) saturate(1.2); }
}
@keyframes art-kenburns-2 {
    0%, 100% { transform: scale(1.2) translate(3%, -2%); filter: brightness(1.18) saturate(1.15); }
    50% { transform: scale(1.06) translate(-3%, 3%); filter: brightness(1) saturate(1); }
}
@keyframes art-shine { 0%, 45% { transform: translateX(-130%); } 75%, 100% { transform: translateX(130%); } }

/* Telefonda 3D og'ish aniqroq */
@keyframes art3d-wide {
    0%, 100% { transform: perspective(600px) rotateY(-11deg) rotateX(6deg) translate3d(0, 0, 0); }
    25% { transform: perspective(600px) rotateY(0deg) rotateX(-5deg) translate3d(0, -4px, 18px); }
    50% { transform: perspective(600px) rotateY(11deg) rotateX(5deg) translate3d(0, -2px, 10px); }
    75% { transform: perspective(600px) rotateY(2deg) rotateX(-6deg) translate3d(0, -5px, 20px); }
}

/* Sarlavha rasmi: kuchliroq kino-zoom */
@keyframes hero3d {
    0%, 100% { transform: perspective(1200px) rotateY(-6deg) rotateX(2deg) scale(1.04); }
    50% { transform: perspective(1200px) rotateY(6deg) rotateX(-2deg) scale(1.14) translateY(-6px); }
}

/* "Harakatni kamaytirish" yoqilgan qurilmalarda: 3D tebranishsiz, faqat sekin zoom va yorug'lik */
@media (prefers-reduced-motion: reduce) {
    .kpi-art-img { animation: art-kenburns 14s ease-in-out infinite !important; }
    .kpi-art::after { animation: art-shine 8s ease-in-out infinite !important; }
}
/* =====================================================================
   3D DIAGRAMMALAR
   ===================================================================== */

/* --- Chiziqli grafik (savdo dinamikasi): 3D lenta + soyali maydon + yengil og'ish --- */
.chart-wrap { perspective: 1100px; }
.chart-svg { transform: rotateX(10deg); transform-origin: 50% 100%; }
.chart-3d .chart-area { stroke: none; fill-opacity: .13; }
.chart-3d .chart-back { fill: none; stroke-width: 1.5; stroke-opacity: .45; stroke-linejoin: round; }
.chart-3d .chart-ribbon polygon { fill-opacity: .32; stroke: none; }
.chart-3d .chart-line { stroke-width: 3; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .45)); }
.chart-3d.s-income .chart-area, .chart-3d.s-income .chart-ribbon polygon { fill: var(--c-income); }
.chart-3d.s-expense .chart-area, .chart-3d.s-expense .chart-ribbon polygon { fill: var(--c-expense); }
.chart-3d.s-income .chart-back { stroke: var(--c-income); }
.chart-3d.s-expense .chart-back { stroke: var(--c-expense); }
.chart-3d { animation: chart-rise .9s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i, 0) * .15s); transform-origin: 50% 100%; transform-box: fill-box; }
@keyframes chart-rise { from { transform: scaleY(0); opacity: 0; } to { transform: scaleY(1); opacity: 1; } }

/* --- Halqali diagrammalar: qatlamlar bilan qalinlik, og'ish va sekin tebranish --- */
.donut, .ring { perspective: 520px; }
.d3-stack {
    position: absolute; inset: 0; transform-style: preserve-3d;
    transform: rotateX(46deg);
    animation: d3-wobble 10s ease-in-out infinite;
}
.d3-stack > svg {
    position: absolute; inset: 0; width: 100%; height: 100%;
    transform: translateZ(var(--z, 0px)) rotate(-90deg);
}
.d3-stack > .d3-layer { filter: brightness(var(--b, .5)) saturate(1.15); pointer-events: none; }
.d3-stack > .d3-top { filter: drop-shadow(0 0 6px rgba(168, 85, 247, .35)); }
@keyframes d3-wobble {
    0%, 100% { transform: rotateX(46deg) rotateZ(-7deg); }
    50% { transform: rotateX(38deg) rotateZ(7deg); }
}
.donut-center, .ring-text { z-index: 2; text-shadow: 0 2px 8px rgba(0, 0, 0, .6); }

/* --- Vertikal ustunlar (filiallar bo'yicha o'quvchilar): yuqori va yon yuza --- */
.vbar-fill { position: relative; border-radius: 0; overflow: visible; box-shadow: 0 10px 18px rgba(0, 0, 0, .35); animation: bar-grow .9s cubic-bezier(.2, .8, .2, 1) both; transform-origin: bottom; }
.vbar-fill::before, .vbar-fill::after { content: ""; position: absolute; background: inherit; }
.vbar-fill::before { left: 0; right: 0; bottom: 100%; height: 11px; transform-origin: 0 100%; transform: skewX(-45deg); filter: brightness(1.45); }
.vbar-fill::after { top: 0; left: 100%; width: 11px; height: 100%; transform-origin: 0 0; transform: skewY(-45deg); filter: brightness(.55); }
.vbar-val { margin-bottom: 9px; }
.vbar:nth-child(2) .vbar-fill { animation-delay: .08s; }
.vbar:nth-child(3) .vbar-fill { animation-delay: .16s; }
.vbar:nth-child(4) .vbar-fill { animation-delay: .24s; }
.vbar:nth-child(5) .vbar-fill { animation-delay: .32s; }
.vbar:nth-child(6) .vbar-fill { animation-delay: .40s; }
@keyframes bar-grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }

/* --- Gorizontal ustunlar (to'lov usullari, xarajat turlari): 3D brus --- */
.bar-track { overflow: visible; border-radius: 3px; position: relative; margin-top: 6px; }
.bar-fill { position: relative; border-radius: 0; animation: bar-grow-x .9s cubic-bezier(.2, .8, .2, 1) both; transform-origin: left; }
.bar-fill::before, .bar-fill::after { content: ""; position: absolute; background: inherit; }
.bar-fill::before { left: 0; right: 0; bottom: 100%; height: 6px; transform-origin: 0 100%; transform: skewX(-45deg); filter: brightness(1.4); }
.bar-fill::after { top: 0; left: 100%; width: 6px; height: 100%; transform-origin: 0 0; transform: skewY(-45deg); filter: brightness(.55); }
@keyframes bar-grow-x { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* --- Kartochkadagi kichik ustunchalar --- */
.kpi-spark i { position: relative; border-radius: 0; }
.kpi-spark i::before, .kpi-spark i::after { content: ""; position: absolute; background: inherit; }
.kpi-spark i::before { left: 0; right: 0; bottom: 100%; height: 3px; transform-origin: 0 100%; transform: skewX(-45deg); filter: brightness(1.4); }
.kpi-spark i::after { top: 0; left: 100%; width: 3px; height: 100%; transform-origin: 0 0; transform: skewY(-45deg); filter: brightness(.6); }
.kpi-spark { gap: 5px; }

@media (prefers-reduced-motion: reduce) {
    .d3-stack, .chart-3d, .vbar-fill, .bar-fill { animation: none !important; }
}
/* ===== Kassa ===== */
.cash-flow { display: flex; align-items: stretch; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.cash-flow > div { flex: 1 1 130px; padding: 12px 14px; border-radius: 14px; background: var(--glass-1); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cash-flow > div span { font-size: 11px; letter-spacing: .8px; text-transform: uppercase; color: var(--muted); }
.cash-flow > div b { font-size: 18px; overflow-wrap: anywhere; }
.cash-flow > i { align-self: center; font-style: normal; font-size: 20px; font-weight: 700; color: var(--muted); }
.cash-flow .cash-total { border-color: rgba(145, 75, 255, .55); background: linear-gradient(135deg, rgba(139, 92, 246, .22), rgba(59, 130, 246, .12)); }
.cash-flow .cash-total b { font-size: 21px; }
.cash-h { font-size: 14px; color: var(--text-2); margin: 20px 0 10px; }
.cash-diff { font-size: 14px; margin: -4px 0 12px; }
.cash-plus { color: #93c5fd; font-weight: 600; }
@media (max-width: 640px) {
    .cash-flow { flex-direction: column; }
    .cash-flow > div { flex: none; flex-direction: row; justify-content: space-between; align-items: center; }
    .cash-flow > i { display: none; }
}.cash-start h2 { font-size: 18px; margin-bottom: 8px; }
.cash-start p { font-size: 14px; line-height: 1.6; margin-bottom: 14px; }
.cash-start-form { max-width: 380px; }

/* =====================================================================
   YON MENYU: har bo'lim o'z rangida, 3D yaltiroq belgilar (bosh sahifa uslubida)
   ===================================================================== */
.sidebar-item {
    --c1: #a855f7; --c2: #6d28d9; --c1-rgb: 168 85 247; --c2-rgb: 109 40 217;
    position: relative; overflow: hidden;
    transition: transform .25s ease, background .25s ease, border-color .25s ease, box-shadow .25s ease;
    animation: nav-in .5s cubic-bezier(.2, .8, .2, 1) backwards;
    animation-delay: calc(var(--i, 0) * 35ms);
}
.sidebar-icon {
    position: relative; border: 0 !important;
    background: linear-gradient(145deg, var(--c1), var(--c2)) !important;
    box-shadow: 0 6px 14px -5px var(--c1), inset 0 1px 0 rgba(255, 255, 255, .4), inset 0 -3px 6px rgba(0, 0, 0, .28);
    transform: perspective(300px) rotateX(8deg) rotateY(-12deg);
    transition: transform .3s cubic-bezier(.2, .8, .2, 1), box-shadow .3s ease;
}
.sidebar-icon::after {
    content: ""; position: absolute; left: 3px; right: 3px; top: 2px; height: 46%; border-radius: 9px 9px 14px 14px;
    background: linear-gradient(180deg, rgba(255, 255, 255, .5), rgba(255, 255, 255, 0)); pointer-events: none;
}
.sidebar-icon .nav-icon { position: relative; z-index: 1; stroke: #fff !important; filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, .4)) !important; }
.sidebar-item:hover {
    transform: translateX(3px);
    background: linear-gradient(90deg, rgb(var(--c1-rgb) / 0.2), transparent 85%);
    border-color: rgb(var(--c1-rgb) / 0.38);
}
.sidebar-item:hover .sidebar-icon { transform: perspective(300px) translateY(-2px) scale(1.1); box-shadow: 0 10px 20px -6px var(--c1), inset 0 1px 0 rgba(255, 255, 255, .45), inset 0 -3px 6px rgba(0, 0, 0, .25); }
.sidebar-item.active {
    background: linear-gradient(100deg, rgb(var(--c1-rgb) / 0.4), rgb(var(--c2-rgb) / 0.12));
    border-color: rgb(var(--c1-rgb) / 0.62);
    box-shadow: 0 10px 26px -12px var(--c1), inset 0 1px 0 rgba(255, 255, 255, .08);
}
.sidebar-item.active::before {
    content: ""; position: absolute; left: 0; top: 20%; bottom: 20%; width: 3px; border-radius: 3px;
    background: linear-gradient(var(--c1), var(--c2)); box-shadow: 0 0 12px var(--c1);
}
.sidebar-item.active::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, .13) 50%, transparent 62%);
    transform: translateX(-110%); animation: nav-shine 4.5s ease-in-out infinite;
}
.sidebar-item.active .sidebar-icon { animation: nav-float 3.2s ease-in-out infinite; }
.sidebar-item.active .sidebar-text { font-weight: 700; }
@keyframes nav-in { from { opacity: 0; transform: translateX(-14px); } to { opacity: 1; transform: none; } }
@keyframes nav-shine { 0%, 50% { transform: translateX(-110%); } 85%, 100% { transform: translateX(110%); } }
@keyframes nav-float {
    0%, 100% { transform: perspective(300px) rotateY(-14deg) rotateX(6deg) translateY(0); }
    50% { transform: perspective(300px) rotateY(14deg) rotateX(-4deg) translateY(-2px); }
}
:root[data-theme="light"] .sidebar-item.active { background: linear-gradient(100deg, rgb(var(--c1-rgb) / 0.26), rgb(var(--c2-rgb) / 0.06)); }
:root[data-theme="light"] .sidebar-item:hover { background: linear-gradient(90deg, rgb(var(--c1-rgb) / 0.14), transparent 85%); }

/* Pastki menyu (telefon): faol bo'lim o'z rangida yonadi */
.bottom-nav a { position: relative; }
.bottom-nav a.active .nav-icon { stroke: var(--c1, #a855f7) !important; filter: drop-shadow(0 0 6px var(--c1, #a855f7)); }
.bottom-nav a.active span { color: var(--c1, #a855f7); }
.bottom-nav a.active::before {
    content: ""; position: absolute; top: 0; left: 28%; right: 28%; height: 3px; border-radius: 0 0 3px 3px;
    background: linear-gradient(90deg, var(--c1), var(--c2)); box-shadow: 0 0 10px var(--c1);
}
@media (prefers-reduced-motion: reduce) {
    .sidebar-item, .sidebar-item.active::after, .sidebar-item.active .sidebar-icon { animation: none !important; }
}
/* ===== Avtomatik yangilanish belgisi (xalaqit bermaydigan) ===== */
.update-pill {
    position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 900;
    display: inline-flex; align-items: center; gap: 8px; padding: 8px 10px 8px 14px; border-radius: 999px;
    font: 600 13px inherit; font-family: inherit; color: #fff; cursor: pointer;
    background: rgba(20, 16, 50, .92); border: 1px solid rgba(168, 85, 247, .55);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .45), 0 0 18px rgba(168, 85, 247, .35); backdrop-filter: blur(8px);
    animation: pill-in .4s cubic-bezier(.2, .8, .2, 1);
}
.update-pill b { padding: 4px 10px; border-radius: 999px; background: linear-gradient(135deg, #8b5cf6, #6d28d9); font-size: 12px; }
@keyframes pill-in { from { opacity: 0; transform: translate(-50%, 20px); } to { opacity: 1; transform: translate(-50%, 0); } }
@media (max-width: 900px) { .update-pill { bottom: 84px; } .update-pill span { display: none; } }
/* ===== Telegram: filiallar holati ===== */
.tg-branches { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.tg-branch { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: 14px; background: var(--glass-1); border: 1px solid var(--line); min-width: 0; }
.tg-branch span { font-size: 13px; font-weight: 600; color: #fca5a5; }
.tg-branch.ok { border-color: rgba(34, 197, 94, .4); background: rgba(34, 197, 94, .07); }
.tg-branch.ok span { color: #86efac; }
.tg-branch small { color: var(--muted); font-size: 12px; line-height: 1.4; }
:root[data-theme="light"] .tg-branch.ok span { color: #15803d; }
/* Xodimlar ro'yxatida administrator */
.list-row.staff-admin { border-color: rgba(168, 85, 247, .45); background: linear-gradient(100deg, rgba(168, 85, 247, .14), transparent 70%); }

/* =====================================================================
   CHAT — Telegram uslubida: pufakchalar, guruhlash, reaksiyalar, stikerlar
   ===================================================================== */
.chat-wrap.tg .chat-search { margin: 0 2px 10px; height: 40px; min-height: 40px; }
.chat-unread { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: linear-gradient(135deg, #8b5cf6, #6d28d9); color: #fff; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 0 10px rgba(139, 92, 246, .55); }
.av-group { background: linear-gradient(135deg, #8b5cf6, #3b82f6); display: inline-flex; align-items: center; justify-content: center; }
.chat-main { position: relative; }

/* Fon: nozik naqsh (Telegram devor qog'ozi kabi) */
.tg-bg {
    background-color: transparent;
    background-image:
        radial-gradient(circle at 20% 15%, rgba(139, 92, 246, .12), transparent 40%),
        radial-gradient(circle at 85% 80%, rgba(59, 130, 246, .10), transparent 45%),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='none' stroke='%23a78bfa' stroke-opacity='.07' stroke-width='1.5'%3E%3Ccircle cx='20' cy='20' r='6'/%3E%3Cpath d='M70 15l8 8-8 8-8-8z'/%3E%3Cpath d='M15 75h14M22 68v14'/%3E%3Ccircle cx='90' cy='90' r='9'/%3E%3Cpath d='M55 60c6-8 14-8 20 0'/%3E%3Cpath d='M95 40l6 10h-12z'/%3E%3C/g%3E%3C/svg%3E");
}
.chat-messages { gap: 2px; padding: 14px 14px 18px; scroll-behavior: auto; overflow-x: hidden; }
.chat-day { position: sticky; top: 4px; z-index: 2; display: flex; justify-content: center; margin: 12px 0 8px; pointer-events: none; }
.chat-day span { padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; color: #fff; background: rgba(20, 16, 50, .7); backdrop-filter: blur(6px); }
.chat-more { display: flex; justify-content: center; margin: 4px 0 8px; }

/* Xabar qatori */
.msg { display: flex; flex-direction: row; align-items: flex-end; gap: 6px; max-width: 82%; margin-top: 1px; }
.msg.gfirst { margin-top: 8px; }
.msg.mine { align-self: flex-end; flex-direction: row-reverse; }
.msg-col { display: flex; flex-direction: column; min-width: 0; align-items: flex-start; }
.msg.mine .msg-col { align-items: flex-end; }
.msg-av, .msg-av-space { width: 32px; height: 32px; flex-shrink: 0; border-radius: 50%; overflow: hidden; }
.msg-av .av { width: 32px; height: 32px; font-size: 12px; }
img.msg-av { object-fit: cover; }

/* Pufakcha */
.msg-bubble {
    position: relative; padding: 7px 11px 6px; border-radius: 18px; max-width: 100%;
    background: var(--glass-2); border: 1px solid var(--line); color: var(--text);
    box-shadow: 0 2px 6px rgba(0, 0, 0, .18);
}
.msg:not(.mine).glast .msg-bubble { border-bottom-left-radius: 5px; }
.msg.mine .msg-bubble { background: linear-gradient(135deg, #7c3aed, #4f46e5); border-color: transparent; color: #fff; }
.msg.mine.glast .msg-bubble { border-bottom-right-radius: 5px; }
.msg:not(.mine):not(.gfirst) .msg-bubble { border-top-left-radius: 8px; }
.msg.mine:not(.gfirst) .msg-bubble { border-top-right-radius: 8px; }
.msg-sender { font-size: 12.5px; font-weight: 700; margin: 0 0 2px; }
.msg-text { font-size: 14.5px; line-height: 1.42; white-space: normal; word-break: break-word; display: inline; }
.msg-text a { color: inherit; text-decoration: underline; }
.msg-text.deleted { font-style: italic; opacity: .7; }
.msg-meta { float: right; margin: 6px 0 -2px 10px; font-size: 11px; opacity: .7; white-space: nowrap; display: inline-flex; align-items: center; gap: 3px; position: static; }
.msg-tick { font-size: 11px; letter-spacing: -3px; margin-left: 2px; }
.msg-tick.read { color: #7dd3fc; opacity: 1; }
.msg.mine .msg-meta { opacity: .85; }

/* Javob (iqtibos) */
.msg-reply { display: flex; flex-direction: column; gap: 1px; padding: 4px 8px; margin: 2px 0 5px; border-left: 3px solid #a78bfa; border-radius: 6px; background: rgba(167, 139, 250, .12); cursor: pointer; max-width: 260px; }
.msg.mine .msg-reply { border-left-color: #fff; background: rgba(255, 255, 255, .14); }
.msg-reply b { font-size: 12px; color: #c4b5fd; }
.msg.mine .msg-reply b { color: #fff; }
.msg-reply span { font-size: 12.5px; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Faqat emoji / stiker — pufakchasiz */
.msg.bare .msg-bubble { background: none; border: 0; box-shadow: none; padding: 0; }
.msg.bare .msg-meta { float: none; display: inline-flex; margin: 2px 4px; padding: 2px 8px; border-radius: 999px; background: rgba(20, 16, 50, .6); color: #fff; opacity: 1; }
.msg-emoji { line-height: 1.1; }
.msg-emoji.e1 { font-size: 64px; }
.msg-emoji.e2 { font-size: 48px; }
.msg-emoji.e3 { font-size: 38px; }
.msg-emoji { animation: emoji-in .5s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes emoji-in { from { transform: scale(.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* Stikerlar (harakatlanadi) */
.stk { width: 120px; height: 120px; display: flex; align-items: center; justify-content: center; }
.stk span { font-size: 92px; line-height: 1; display: inline-block; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .35)); }
.stk.small { width: 64px; height: 64px; }
.stk.small span { font-size: 44px; }
.stk.anim-bounce span { animation: st-bounce 1.6s ease-in-out infinite; }
.stk.anim-flicker span { animation: st-flicker 1.2s ease-in-out infinite; transform-origin: bottom; }
.stk.anim-pop span { animation: st-pop 1.8s ease-in-out infinite; }
.stk.anim-shake span { animation: st-shake 1.4s ease-in-out infinite; }
.stk.anim-beat span { animation: st-beat 1.1s ease-in-out infinite; }
.stk.anim-clap span { animation: st-clap .8s ease-in-out infinite; }
.stk.anim-sway span { animation: st-sway 2s ease-in-out infinite; transform-origin: bottom; }
.stk.anim-pulse span { animation: st-pulse 1.6s ease-in-out infinite; }
.stk.anim-tilt span { animation: st-tilt 2.2s ease-in-out infinite; }
.stk.anim-fly span { animation: st-fly 2s ease-in-out infinite; }
.stk.anim-spin span { animation: st-spin 3s linear infinite; }
.stk.anim-shine span { animation: st-shine 2s ease-in-out infinite; }
.stk.anim-flex span { animation: st-flex 1.2s ease-in-out infinite; transform-origin: bottom left; }
.stk.anim-float span { animation: st-float 2.4s ease-in-out infinite; }
.stk.anim-wave span { animation: st-wave 1.4s ease-in-out infinite; transform-origin: 70% 80%; }
@keyframes st-bounce { 0%, 100% { transform: translateY(0) scale(1); } 40% { transform: translateY(-14px) scale(1.05, .95); } 60% { transform: translateY(0) scale(.95, 1.05); } }
@keyframes st-flicker { 0%, 100% { transform: scale(1) skewX(0); } 25% { transform: scale(1.08, .94) skewX(3deg); } 50% { transform: scale(.96, 1.08) skewX(-3deg); } 75% { transform: scale(1.05) skewX(2deg); } }
@keyframes st-pop { 0%, 100% { transform: scale(1) rotate(0); } 20% { transform: scale(1.25) rotate(-10deg); } 40% { transform: scale(.95) rotate(8deg); } 60% { transform: scale(1.08) rotate(-4deg); } }
@keyframes st-shake { 0%, 100% { transform: rotate(0); } 15% { transform: rotate(-12deg); } 30% { transform: rotate(10deg); } 45% { transform: rotate(-8deg); } 60% { transform: rotate(6deg); } }
@keyframes st-beat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.2); } 30% { transform: scale(.95); } 45% { transform: scale(1.12); } }
@keyframes st-clap { 0%, 100% { transform: scale(1) rotate(0); } 50% { transform: scale(.85) rotate(-8deg); } }
@keyframes st-sway { 0%, 100% { transform: rotate(-8deg); } 50% { transform: rotate(8deg); } }
@keyframes st-pulse { 0%, 100% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(239, 68, 68, 0)); } 50% { transform: scale(1.12); filter: drop-shadow(0 0 14px rgba(239, 68, 68, .7)); } }
@keyframes st-tilt { 0%, 100% { transform: rotate(0) translateY(0); } 30% { transform: rotate(-14deg) translateY(-4px); } 60% { transform: rotate(10deg); } }
@keyframes st-fly { 0% { transform: translate(-10px, 10px) rotate(0); } 50% { transform: translate(10px, -14px) rotate(-6deg); } 100% { transform: translate(-10px, 10px) rotate(0); } }
@keyframes st-spin { from { transform: rotate(0) scale(1); } 50% { transform: rotate(180deg) scale(1.15); } to { transform: rotate(360deg) scale(1); } }
@keyframes st-shine { 0%, 100% { transform: translateY(0); filter: drop-shadow(0 0 0 #fde047); } 50% { transform: translateY(-8px); filter: drop-shadow(0 0 18px #fde047); } }
@keyframes st-flex { 0%, 100% { transform: rotate(0) scale(1); } 50% { transform: rotate(-12deg) scale(1.15); } }
@keyframes st-float { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-10px) rotate(3deg); } }
@keyframes st-wave { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(20deg); } 40% { transform: rotate(-12deg); } 60% { transform: rotate(18deg); } 80% { transform: rotate(-6deg); } }

/* Rasm */
.msg-bubble.image { padding: 4px; overflow: hidden; }
.msg-img { display: block; max-width: min(300px, 62vw); max-height: 360px; min-width: 120px; min-height: 90px; border-radius: 14px; object-fit: cover; cursor: zoom-in; background: rgba(255, 255, 255, .06); }
.msg-img.broken { min-height: 40px; }
.msg-bubble.image .msg-text { display: block; padding: 6px 8px 0; }
.msg-bubble.image .msg-meta { margin: 4px 6px 2px; }
.chat-lightbox { position: fixed; inset: 0; z-index: 3500; background: rgba(0, 0, 0, .92); display: flex; align-items: center; justify-content: center; padding: 16px; animation: pill-in .2s ease; }
.chat-lightbox img { max-width: 100%; max-height: 100%; border-radius: 10px; }
.chat-lightbox .icon-btn { position: absolute; top: 16px; right: 16px; }

/* Reaksiyalar */
.msg-reacts { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.react { display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px; border-radius: 999px; font-size: 14px; cursor: pointer; border: 1px solid var(--line); background: var(--glass-2); color: var(--text); font-family: inherit; }
.react b { font-size: 12px; }
.react.mine { background: rgba(139, 92, 246, .28); border-color: rgba(167, 139, 250, .7); }
.react.burst { animation: react-burst .5s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes react-burst { 0% { transform: scale(.4); } 70% { transform: scale(1.25); } 100% { transform: scale(1); } }

/* Paydo bo'lish, belgilash */
.msg.pop .msg-bubble { animation: msg-pop .35s cubic-bezier(.2, 1.2, .4, 1); }
.msg.mine.pop .msg-bubble { transform-origin: bottom right; }
.msg:not(.mine).pop .msg-bubble { transform-origin: bottom left; }
@keyframes msg-pop { from { transform: scale(.6) translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
.msg.sel .msg-bubble, .msg.flash .msg-bubble { box-shadow: 0 0 0 2px rgba(167, 139, 250, .8), 0 6px 18px rgba(139, 92, 246, .4); }
.msg.flash .msg-bubble { animation: flash 1.4s ease; }
@keyframes flash { 0%, 60% { background-color: rgba(167, 139, 250, .35); } }
.msg { user-select: text; -webkit-touch-callout: none; }

/* Kontekst menyu */
.chat-menu { position: fixed; z-index: 2500; min-width: 210px; padding: 6px; border-radius: 16px; background: rgba(22, 18, 52, .97); border: 1px solid rgba(167, 139, 250, .35); box-shadow: 0 18px 40px rgba(0, 0, 0, .5); backdrop-filter: blur(10px); animation: menu-in .18s ease; }
@keyframes menu-in { from { opacity: 0; transform: scale(.9); } to { opacity: 1; transform: none; } }
.chat-menu > button { display: flex; width: 100%; align-items: center; gap: 8px; padding: 10px 12px; border: 0; border-radius: 10px; background: none; color: #fff; font: inherit; font-size: 14px; cursor: pointer; text-align: left; }
.chat-menu > button:hover { background: rgba(167, 139, 250, .16); }
.chat-menu > button.danger { color: #fca5a5; }
.cm-reacts { display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px; padding: 4px; margin-bottom: 4px; border-bottom: 1px solid rgba(255, 255, 255, .08); width: 250px; }
.cm-reacts button { font-size: 22px; padding: 4px; border: 0; background: none; cursor: pointer; border-radius: 10px; transition: transform .15s ease; }
.cm-reacts button:hover { transform: scale(1.3); background: rgba(255, 255, 255, .08); }

/* Pastga tushish */
.chat-down { position: absolute; right: 16px; bottom: 86px; z-index: 5; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: rgba(22, 18, 52, .92); color: #fff; font-size: 18px; cursor: pointer; box-shadow: 0 8px 20px rgba(0, 0, 0, .4); }
.chat-down b { position: absolute; top: -6px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: #8b5cf6; font-size: 11px; display: flex; align-items: center; justify-content: center; }

/* Yozish qatori */
.chat-compose { border-top: 1px solid var(--line); background: var(--glass-1); }
.chat-input { border-top: 0; align-items: flex-end; padding: 8px 10px; gap: 6px; }
.chat-input textarea.input { resize: none; min-height: 44px; max-height: 140px; padding: 11px 14px; line-height: 1.4; border-radius: 22px; overflow-y: auto; }
.chat-input .icon-btn { flex-shrink: 0; cursor: pointer; }
.chat-send { background: linear-gradient(135deg, #8b5cf6, #6d28d9) !important; color: #fff; border: 0 !important; border-radius: 50% !important; animation: send-in .2s ease; }
@keyframes send-in { from { transform: scale(.5) rotate(-30deg); } to { transform: none; } }
.chat-replybar { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--line); animation: pill-in .2s ease; }
.chat-replybar .rb-icon { font-size: 20px; color: #a78bfa; }
.chat-replybar div { flex: 1; min-width: 0; border-left: 3px solid #a78bfa; padding-left: 8px; }
.chat-replybar b { display: block; font-size: 13px; color: #c4b5fd; }
.chat-replybar small { display: block; color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-replybar .icon-btn { width: 36px; height: 36px; }

/* Emoji / stiker paneli */
.chat-panel { border-bottom: 1px solid var(--line); animation: panel-up .22s ease; }
@keyframes panel-up { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.chat-panel-tabs { display: flex; gap: 6px; padding: 8px 10px 0; }
.chat-panel-tabs button { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: none; color: var(--text-2); font: inherit; font-size: 13px; cursor: pointer; }
.chat-panel-tabs button.on { background: rgba(139, 92, 246, .25); color: #fff; border-color: rgba(167, 139, 250, .6); }
.chat-panel-body { height: 230px; overflow-y: auto; padding: 6px 10px 10px; }
.emoji-cat { font-size: 12px; color: var(--muted); margin: 8px 2px 4px; }
.emoji-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); gap: 2px; }
.emoji-grid button { font-size: 24px; height: 40px; border: 0; background: none; border-radius: 10px; cursor: pointer; transition: transform .12s ease; }
.emoji-grid button:hover { background: var(--glass-2); transform: scale(1.2); }
.sticker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 6px; padding-top: 6px; }
.sticker-grid button { border: 0; background: none; border-radius: 14px; cursor: pointer; display: flex; justify-content: center; padding: 4px; }
.sticker-grid button:hover { background: var(--glass-2); }

/* "yozmoqda..." */
.chat-title small.typing { color: #a78bfa; display: inline-flex; align-items: center; gap: 2px; }
.chat-title small.typing i { width: 4px; height: 4px; border-radius: 50%; background: currentColor; display: inline-block; animation: typing 1.2s infinite; }
.chat-title small.typing i:nth-of-type(2) { animation-delay: .2s; }
.chat-title small.typing i:nth-of-type(3) { animation-delay: .4s; }
@keyframes typing { 0%, 60%, 100% { opacity: .3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }

:root[data-theme="light"] .msg:not(.mine) .msg-bubble { background: #fff; }
:root[data-theme="light"] .chat-day span { background: rgba(80, 60, 160, .55); }
@media (max-width: 700px) {
    .msg { max-width: 90%; }
    .chat-down { bottom: 80px; }
    .chat-panel-body { height: 200px; }
}
@media (prefers-reduced-motion: reduce) { .stk span, .msg-emoji, .msg.pop .msg-bubble { animation: none !important; } }

.share-clash { font-size: 13px; color: #fca5a5; padding: 8px 10px; border-radius: 10px; background: rgba(239, 68, 68, .1); border: 1px solid rgba(239, 68, 68, .35); }

/* ===== Ota-ona boti ===== */
.parent-bot { margin: -4px 0 16px; padding: 12px 14px; border-radius: 14px; border: 1px solid rgba(56, 189, 248, .3); background: rgba(56, 189, 248, .07); display: flex; flex-direction: column; gap: 8px; }
.pb-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.pb-list { display: flex; flex-wrap: wrap; gap: 6px; }
.pb-parent { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 10px; border-radius: 999px; background: rgba(34, 197, 94, .12); border: 1px solid rgba(34, 197, 94, .35); font-size: 13px; }
.pb-parent button { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 12px; }
.pb-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.pb-bar { height: 8px; border-radius: 999px; background: var(--glass-2); overflow: hidden; }
.pb-bar i { display: block; height: 100%; background: linear-gradient(90deg, #38bdf8, #22c55e); border-radius: 999px; }

.lesson-time small { display: block; font-size: 11px; opacity: .6; font-weight: 500; }

.check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: #8b5cf6; }

/* Orqaga tugmasi */
.back-btn { width: 40px; height: 40px; font-size: 20px; flex-shrink: 0; }
.topbar-title { display: flex; align-items: center; gap: 10px; min-width: 0; }

.staff-badge { display: flex; width: max-content; margin: 4px 0 2px; }
.teacher-badge { color: #fff; background: linear-gradient(135deg, #3b82f6, #1d4ed8); border: 0; }

/* ===== Bepul tahlil ===== */
.insights { display: flex; flex-direction: column; gap: 8px; }
.insight { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--glass-1); color: var(--text); text-decoration: none; }
.insight b { display: block; font-size: 14px; }
.insight small { display: block; color: var(--text-2); font-size: 13px; line-height: 1.5; margin-top: 2px; }
.insight-ic { font-size: 16px; line-height: 1.4; }
.insight-critical { border-color: rgba(239, 68, 68, .45); background: rgba(239, 68, 68, .07); }
.insight-warning { border-color: rgba(245, 158, 11, .4); background: rgba(245, 158, 11, .06); }
.insight-good { border-color: rgba(34, 197, 94, .35); background: rgba(34, 197, 94, .06); }
a.insight:hover { border-color: var(--border-accent); }
.ai-model-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 16px; font-size: 14px; }

/* ===== Yon menyu guruhlari (yig'iladigan toifalar) ===== */
.menu-group { border-radius: 14px; }
.menu-group-head {
    width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 10px; margin-top: 4px;
    background: transparent; border: 1px solid transparent; border-radius: 12px; color: var(--text-2);
    font: inherit; font-size: 12px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; cursor: pointer;
    transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.menu-group-head:hover { color: var(--text); background: rgba(145, 75, 255, .08); border-color: rgba(145, 75, 255, .18); }
.menu-group-ic { width: 34px; text-align: center; font-size: 17px; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .35)); }
.menu-group-title { flex: 1; text-align: left; }
.menu-group-count { font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 10px; padding: 1px 7px; letter-spacing: 0; }
.menu-group-chev { font-size: 18px; line-height: 1; transition: transform .25s ease; }
.menu-group.open .menu-group-chev { transform: rotate(90deg); }
.menu-group.open .menu-group-head { color: var(--text); }
.menu-group-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .28s ease; }
.menu-group.open .menu-group-body { grid-template-rows: 1fr; }
.menu-group-inner { overflow: hidden; display: flex; flex-direction: column; gap: 3px; padding-left: 10px; margin-left: 16px; border-left: 1px dashed var(--line); }
.menu-group.open .menu-group-inner { padding-top: 3px; padding-bottom: 4px; }
.menu-group:not(.open):has(.nav-badge:not([hidden])) .menu-group-count { background: #ef4444; color: #fff; border-color: #ef4444; }
.menu-group:has(.sidebar-item.active):not(.open) .menu-group-head { color: var(--text); border-color: rgba(145, 75, 255, .3); }

/* ===== Shaxsiy tahlilchi ===== */
.an-hero { display: flex; gap: 22px; align-items: flex-start; }
.an-hero-text { flex: 1; min-width: 0; }
.an-score {
    flex: none; width: 116px; height: 116px; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center;
    background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .25), transparent 55%), linear-gradient(145deg, var(--s1, #8b5cf6), var(--s2, #4c1d95));
    box-shadow: 0 16px 34px -14px var(--s1, #8b5cf6), inset 0 -6px 14px rgba(0, 0, 0, .3), inset 0 2px 0 rgba(255, 255, 255, .35);
    color: #fff; animation: nav-float 5s ease-in-out infinite;
}
.an-score b { font-size: 40px; line-height: 1; }
.an-score small { opacity: .8; }
.an-a { --s1: #22c55e; --s2: #15803d; } .an-b { --s1: #3b82f6; --s2: #1d4ed8; }
.an-c { --s1: #f59e0b; --s2: #b45309; } .an-d { --s1: #ef4444; --s2: #b91c1c; }
.an-parts { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.an-part-head { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 4px; }
.an-part small { display: block; font-size: 12px; margin-top: 4px; }
.an-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.an-kpi { padding: 14px; border-radius: 16px; border: 1px solid var(--line); background: var(--glass-1); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.an-kpi b { font-size: 19px; overflow-wrap: anywhere; }
.an-delta { font-size: 12px; color: var(--muted); }
.an-plan { margin-bottom: 12px; }
.an-plan ul { margin: 6px 0 0 18px; padding: 0; line-height: 1.7; font-size: 14px; }
.an-plan a { color: var(--text); }
.an-fc { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.an-fc div { display: flex; flex-direction: column; gap: 2px; }
.an-fc b { font-size: 17px; }
.an-trend { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; align-items: end; }
.an-month { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; }
.an-month small { color: var(--muted); font-size: 11px; }
.an-bars { height: 130px; width: 100%; display: flex; gap: 4px; align-items: flex-end; justify-content: center; }
.an-bar { display: block; width: 38%; max-width: 22px; border-radius: 6px 6px 2px 2px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35); transform-origin: bottom; animation: an-grow .7s cubic-bezier(.2, .8, .2, 1) backwards; }
.an-inc { background: linear-gradient(180deg, #34d399, #059669); }
.an-exp { background: linear-gradient(180deg, #f87171, #b91c1c); }
@keyframes an-grow { from { transform: scaleY(0); } }
.an-mini { display: inline-flex; width: 42px; height: 42px; border-radius: 50%; align-items: center; justify-content: center; font-weight: 800; color: #fff; background: linear-gradient(145deg, var(--s1, #64748b), var(--s2, #334155)); }
@media (max-width: 760px) {
    .an-hero { flex-direction: column; align-items: center; text-align: center; }
    .an-parts { grid-template-columns: 1fr; text-align: left; }
    .an-kpis { grid-template-columns: 1fr 1fr; }
    .an-kpi b { font-size: 16px; }
}
.an-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.staff-tech { color: #fff; background: linear-gradient(135deg, #14b8a6, #0f766e); border: 0; }
.staff-cleaner { color: #fff; background: linear-gradient(135deg, #f59e0b, #b45309); border: 0; }

/* ===== Xodimlar reytingi: golografik shohsupa va shkala ===== */
.rt-panel .panel-head { flex-wrap: wrap; gap: 10px; }
.rt-a { --rc: #22c55e; --rc-rgb: 34 197 94; --rc2: #15803d; } .rt-b { --rc: #3b82f6; --rc-rgb: 59 130 246; --rc2: #1d4ed8; }
.rt-c { --rc: #f59e0b; --rc-rgb: 245 158 11; --rc2: #b45309; } .rt-d { --rc: #ef4444; --rc-rgb: 239 68 68; --rc2: #b91c1c; } .rt-none { --rc: #64748b; --rc-rgb: 100 116 139; --rc2: #334155; }
.rt-podium { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; align-items: end; margin: 6px 0 20px; perspective: 900px; }
.rt-holo {
    position: relative; text-align: center; padding: 14px 8px 0; border-radius: 18px 18px 6px 6px; overflow: hidden;
    background: linear-gradient(180deg, rgb(var(--rc-rgb) / 0.18), rgba(10, 12, 30, .2));
    border: 1px solid rgb(var(--rc-rgb) / 0.45);
    box-shadow: 0 0 26px -8px var(--rc), inset 0 0 22px -10px var(--rc);
    transform: rotateX(8deg); transform-origin: bottom;
}
.rt-holo::before {
    content: ""; position: absolute; inset: -40%; pointer-events: none; opacity: .35;
    background: conic-gradient(from 0deg, transparent, rgba(120, 220, 255, .55), transparent 30%, rgba(200, 120, 255, .5), transparent 60%);
    animation: rt-spin 7s linear infinite;
}
.rt-holo::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .06) 0 1px, transparent 1px 4px);
    animation: rt-scan 3s linear infinite;
}
.rt-holo > * { position: relative; z-index: 1; }
.rt-orb {
    width: 70px; height: 70px; margin: 0 auto 8px; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center;
    background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .5), transparent 50%), linear-gradient(145deg, var(--rc), var(--rc2));
    box-shadow: 0 0 22px var(--rc), inset 0 -5px 10px rgba(0, 0, 0, .3); color: #fff; animation: rt-float 3.4s ease-in-out infinite;
}
.rt-orb span { font-size: 18px; line-height: 1; }
.rt-orb b { font-size: 22px; line-height: 1.1; }
.rt-holo strong { display: block; font-size: 13px; line-height: 1.25; overflow-wrap: anywhere; }
.rt-holo small { display: block; color: var(--muted); font-size: 11px; }
.rt-holo em { display: block; font-style: normal; color: #fbbf24; font-size: 12px; letter-spacing: 1px; margin: 4px 0 8px; }
.rt-step { margin: 0 -8px; padding: 6px 0; font-weight: 800; font-size: 20px; color: #fff; background: linear-gradient(180deg, var(--rc), var(--rc2)); }
.rt-place-1 .rt-step { padding: 22px 0; } .rt-place-2 .rt-step { padding: 12px 0; }
.rt-place-1 .rt-orb { width: 84px; height: 84px; }
.rt-list { display: flex; flex-direction: column; gap: 10px; }
.rt-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--glass-1); }
.rt-rank { flex: none; width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; background: linear-gradient(145deg, var(--rc), var(--rc2)); color: #fff; box-shadow: 0 0 12px -2px var(--rc); }
.rt-main { flex: 1; min-width: 0; }
.rt-name { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.rt-score { font-size: 20px; font-weight: 800; color: var(--rc); text-shadow: 0 0 10px rgb(var(--rc-rgb) / 0.6); }
.rt-scale { position: relative; margin: 6px 0 6px; }
.rt-scale-track { display: flex; height: 8px; border-radius: 6px; overflow: hidden; opacity: .85; }
.rt-scale-track i:nth-child(1) { background: linear-gradient(90deg, #7f1d1d, #ef4444); }
.rt-scale-track i:nth-child(2) { background: #f59e0b; }
.rt-scale-track i:nth-child(3) { background: #3b82f6; }
.rt-scale-track i:nth-child(4) { background: linear-gradient(90deg, #22c55e, #4ade80); }
.rt-scale-mark { position: absolute; top: -4px; width: 4px; height: 16px; margin-left: -2px; border-radius: 3px; background: #fff; box-shadow: 0 0 8px #fff, 0 0 14px var(--rc); }
.rt-stars { color: #fbbf24; letter-spacing: 1px; }
.rt-metrics { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.rt-metrics span { font-size: 12px; padding: 2px 8px; border-radius: 10px; border: 1px solid rgb(var(--rc-rgb) / 0.45); color: var(--text-2); }
.rt-metrics b { color: var(--rc); }
@keyframes rt-spin { to { transform: rotate(360deg); } }
@keyframes rt-scan { from { background-position: 0 0; } to { background-position: 0 40px; } }
@keyframes rt-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@media (max-width: 760px) { .rt-podium { gap: 6px; } .rt-orb { width: 58px; height: 58px; } .rt-place-1 .rt-orb { width: 68px; height: 68px; } .rt-orb b { font-size: 18px; } }
@media (prefers-reduced-motion: reduce) { .rt-holo::before, .rt-holo::after, .rt-orb { animation: none; } }

/* ===== Sotuv voronkasi ===== */
.lead-actions { flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.lead-trial { color: #c4b5fd; }
.lead-row.lead-trial, .lead-row.lead-trial_done { border-color: rgba(168, 85, 247, .35); }
.lead-stages .chip b { margin-left: 4px; opacity: .8; }
.lead-timeline { display: flex; flex-direction: column; gap: 8px; max-height: 50vh; overflow: auto; }
.lt-item { padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--glass-1); display: flex; flex-direction: column; gap: 2px; }
.lt-item b { font-weight: 500; font-size: 14px; }
.funnel { display: flex; flex-direction: column; gap: 10px; }
.funnel-step { display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: 10px; align-items: center; }
.funnel-bar {
    width: var(--w); margin: 0 auto; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; color: #fff;
    background: linear-gradient(135deg, hsl(calc(265 - var(--i) * 30) 80% 62%), hsl(calc(265 - var(--i) * 30) 70% 42%));
    box-shadow: 0 8px 18px -10px hsl(calc(265 - var(--i) * 30) 80% 55%), inset 0 1px 0 rgba(255, 255, 255, .35);
    transform-origin: center; animation: an-grow-x .7s cubic-bezier(.2, .8, .2, 1) backwards; animation-delay: calc(var(--i) * 90ms);
}
.funnel-label { display: flex; flex-direction: column; font-size: 13px; }
@keyframes an-grow-x { from { transform: scaleX(0); } }
@media (max-width: 760px) {
    .funnel-step { grid-template-columns: 1fr; gap: 2px; }
    .funnel-label { flex-direction: row; justify-content: space-between; }
    .lead-row { grid-template-columns: 1fr !important; }
    .lead-row .list-side { align-items: flex-start; }
    .lead-actions { justify-content: flex-start; }
}

/* ===== Imtihonlar ===== */
.exam-table .er-score { width: 90px; text-align: right; }
.exam-table .er-comment { min-width: 120px; }
.exam-table td { vertical-align: middle; }
.exam-table input[type=checkbox] { width: 20px; height: 20px; }
#ct_student { width: 100%; min-height: 130px; }

/* ===== Yon menyu: logo, Bosh sahifa va Tahlilchi joyida — qolgani aylantiriladi ===== */
.sidebar { overflow: hidden !important; height: 100vh; height: 100dvh; }
.sidebar-logo { flex: none; }
.sidebar-menu { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 0; }
.menu-fixed { flex: none; display: flex; flex-direction: column; gap: 3px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.menu-scroll {
    flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
    display: flex; flex-direction: column; gap: 3px; padding: 6px 2px 4px; margin-right: -6px; padding-right: 6px;
    scrollbar-width: thin; scrollbar-color: rgba(145, 75, 255, .35) transparent;
}
.menu-scroll::-webkit-scrollbar { width: 5px; }
.menu-scroll::-webkit-scrollbar-thumb { background: rgba(145, 75, 255, .35); border-radius: 4px; }
.menu-scroll .sidebar-user { margin-top: 18px; }
.check-row { display: flex; align-items: center; gap: 8px; font-size: 14px; margin: 6px 0 10px; cursor: pointer; }
.check-row input { width: 18px; height: 18px; }
#op_pay .code-box { flex-wrap: wrap; margin-bottom: 8px; }
#op_pay .code-box code { flex: 1 1 100%; min-width: 0; word-break: break-all; font-size: 12px; }

/* ===== Til tanlash ===== */
.lang-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.lang-cards .theme-card { justify-content: center; }
.lang-switch { display: flex; justify-content: center; gap: 6px; margin-bottom: 10px; }
.lang-switch button { min-width: 44px; height: 32px; border-radius: 10px; border: 1px solid var(--line); background: var(--glass-2); color: var(--muted); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.lang-switch button.on { background: linear-gradient(135deg, #8b3dff, #5b4dff); color: #fff; border-color: transparent; }
/* Chat: yuborilayotgan xabar */
.msg.pending .msg-bubble { opacity: .72; }
.msg.pending .msg-tick { font-size: 11px; }
.chat-day span { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(20, 16, 50, .82); }
:root[data-theme="light"] .chat-day span { background: rgba(60, 50, 110, .55); }

/* Chek: printer kengligi */
.receipt-actions { flex-wrap: wrap; justify-content: flex-start; }
.printer-width { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; font-size: 13px; }
.printer-width small { flex: 1 1 100%; }

/* ===== Bajarish zarur ===== */
.duties { margin: 0 0 18px; padding: 14px; border-radius: 20px; border: 1px solid rgba(239, 68, 68, .45);
    background: linear-gradient(135deg, rgba(239, 68, 68, .14), rgba(245, 158, 11, .07)); box-shadow: 0 14px 34px -18px rgba(239, 68, 68, .7);
    animation: duties-in .45s cubic-bezier(.2, .8, .2, 1); }
.duties-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 15px; }
.duties-head small { margin-left: auto; color: var(--muted); font-size: 12px; }
.duties-dot { width: 10px; height: 10px; border-radius: 50%; background: #ef4444; box-shadow: 0 0 0 0 rgba(239, 68, 68, .7); animation: duty-pulse 1.6s infinite; }
.duty { display: flex; align-items: center; gap: 12px; padding: 11px 12px; margin-top: 8px; border-radius: 14px; text-decoration: none; color: var(--text);
    background: var(--glass-1); border: 1px solid var(--line); border-left: 4px solid #f59e0b; transition: transform .15s ease; }
.duty-critical { border-left-color: #ef4444; background: rgba(239, 68, 68, .09); }
.duty:active { transform: scale(.98); }
.duty-ic { font-size: 22px; }
.duty-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.duty-main b { font-size: 14px; }
.duty-main small { color: var(--text-2); font-size: 12px; }
@keyframes duty-pulse { 0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, .7); } 70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); } 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); } }
@keyframes duties-in { from { opacity: 0; transform: translateY(-8px); } }
@media (max-width: 640px) { .duty { flex-wrap: wrap; } .duty .btn { margin-left: 34px; } }

/* ===== Menyu guruh sarlavhalari — bo'limlar va bosh sahifa uslubida ===== */
.menu-group-head { padding: 8px 10px; font-size: 14px; font-weight: 700; letter-spacing: 0; text-transform: none; color: var(--text); }
.menu-group-head .menu-group-ic { width: 34px; height: 34px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center;
    font-size: 0; filter: none; flex: none; }
.menu-group-head .menu-group-ic .nav-icon { width: 18px; height: 18px; }
.menu-group-head:hover { background: linear-gradient(90deg, rgb(var(--c1-rgb) / 0.18), transparent 85%);
    border-color: rgb(var(--c1-rgb) / 0.35); }
.menu-group.open > .menu-group-head { background: linear-gradient(100deg, rgb(var(--c1-rgb) / 0.22), transparent 90%); }
.menu-group-count { border-color: rgb(var(--c1-rgb) / 0.4); color: var(--text-2); }
.menu-group-chev { color: var(--c1); }
.menu-group-inner { border-left-color: rgb(var(--c1-rgb) / 0.35); }

/* ===== Bosish effekti: har qanday tugma/qatorga — silliq, jonli to'lqin ===== */
.rpl-host { position: relative; }
.rpl-wrap { position: absolute; inset: 0; overflow: hidden; border-radius: inherit; pointer-events: none; z-index: 0; }
.rpl { position: absolute; border-radius: 50%; pointer-events: none; transform: scale(0); opacity: .38;
    background: radial-gradient(circle, rgba(255, 255, 255, .55) 0%, rgba(190, 150, 255, .35) 45%, rgba(190, 150, 255, 0) 70%);
    animation: rpl .55s cubic-bezier(.2, .8, .2, 1) forwards; }
:root[data-theme="light"] .rpl { background: radial-gradient(circle, rgba(124, 58, 237, .28) 0%, rgba(124, 58, 237, .14) 45%, rgba(124, 58, 237, 0) 70%); }
@keyframes rpl { to { transform: scale(1); opacity: 0; } }
.btn, .chip, .list-row:not(.static), .sidebar-item, .menu-group-head, .bottom-nav a, .bottom-nav button, .kpi, .duty, .quick-action,
.settings-tab, .tabs-pill button, .icon-btn, .person-row, .chat-contact, .insight { transition: transform .12s ease, background .2s ease, box-shadow .2s ease; }
.btn:active, .chip:active, .list-row:not(.static):active, .sidebar-item:active, .menu-group-head:active, .bottom-nav a:active,
.kpi:active, .quick-action:active, .settings-tab:active, .tabs-pill button:active, .icon-btn:active, .person-row:active,
.chat-contact:active, .insight:active { transform: scale(.97); }
@media (prefers-reduced-motion: reduce) { .rpl { display: none; } }

/* ===== Lid manbalari ===== */
.src-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 14px; }
.src-card { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.src-head { display: flex; align-items: center; gap: 12px; }
.src-ic { width: 46px; height: 46px; flex: none; border-radius: 14px; display: grid; place-items: center; font-size: 22px;
    background: linear-gradient(135deg, #8b5cf6, #6d28d9); box-shadow: 0 8px 22px -10px rgba(139, 92, 246, .9); }
.src-ic.src-instagram { background: linear-gradient(135deg, #f58529, #dd2a7b 50%, #8134af); }
.src-ic.src-telegram { background: linear-gradient(135deg, #38bdf8, #0284c7); }
.src-ic.src-site { background: linear-gradient(135deg, #34d399, #059669); }
.src-ic.src-other { background: linear-gradient(135deg, #f59e0b, #b45309); }
.src-title { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.src-title small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.src-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.src-stats div { background: var(--surface-2, rgba(255, 255, 255, .04)); border: 1px solid var(--border); border-radius: 12px; padding: 8px 10px; text-align: center; }
.src-stats b { display: block; font-size: 18px; }
.src-stats small { color: var(--muted); font-size: 11px; }
.src-card .code-box { margin: 0; }
.src-card .code-box code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; }
.src-steps summary { cursor: pointer; color: var(--accent, #a78bfa); font-weight: 600; font-size: 13px; }
.src-steps ol { margin: 8px 0 0; padding-left: 18px; font-size: 13px; line-height: 1.6; color: var(--muted); }
.src-steps code { word-break: break-all; }
.src-card .code-box code { font-size: 13px; font-weight: 600; letter-spacing: 0; }

/* Arizani qabul qilish: tanlangan guruh ma'lumoti */
.acc-group { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin: -4px 0 12px; padding: 10px;
    border-radius: 14px; background: var(--glass-2); border: 1px solid var(--border-accent); }
.acc-group small { display: block; color: var(--muted); font-size: 11px; }
.acc-group b { font-size: 13px; }


/* ===== Bo'lim sarlavhasi (bosh sahifa / menyu uslubi) ===== */
.sec-hero {
    position: relative; overflow: hidden; display: flex; align-items: center; gap: 16px;
    padding: 20px 22px; margin-bottom: 16px; border-radius: 22px;
    border: 1px solid rgb(var(--c1-rgb) / 0.4);
    background:
        radial-gradient(circle at 92% 20%, rgb(var(--c1-rgb) / 0.34), transparent 46%),
        radial-gradient(circle at 8% 110%, rgb(var(--c2-rgb) / 0.4), transparent 52%),
        linear-gradient(135deg, #17103a, #0c0c24);
    box-shadow: 0 18px 40px -26px var(--c1);
    animation: sec-in .45s cubic-bezier(.2, .8, .2, 1);
}
.sec-hero::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background-image: linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
    background-size: 32px 32px; -webkit-mask-image: linear-gradient(90deg, transparent 30%, #000); mask-image: linear-gradient(90deg, transparent 30%, #000);
}
.sec-hero > * { position: relative; z-index: 1; }
.sec-hero-ic { width: 58px !important; height: 58px !important; min-width: 58px; border-radius: 18px !important; display: grid !important; place-items: center;
    animation: nav-float 3.6s ease-in-out infinite; }
.sec-hero-ic .nav-icon { width: 28px; height: 28px; }
.sec-hero-text { min-width: 0; }
.sec-hero h1 { margin: 0; font-size: 24px; letter-spacing: .3px; color: #fff; }
.sec-hero p { margin: 4px 0 0; font-size: 13.5px; color: #c9c5e6; line-height: 1.45; }
.sec-hero-orb { position: absolute !important; right: -40px; top: -60px; width: 200px; height: 200px; border-radius: 50%; z-index: 0 !important;
    background: radial-gradient(circle, rgb(var(--c1-rgb) / 0.55), transparent 65%); filter: blur(8px); opacity: .7;
    animation: orb-pulse 6s ease-in-out infinite; pointer-events: none; }
.sec-hero.compact { padding: 14px 18px; }
.sec-hero.compact .sec-hero-ic { width: 46px !important; height: 46px !important; min-width: 46px; }
.sec-hero.compact h1 { font-size: 20px; }
@keyframes sec-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes orb-pulse { 0%, 100% { transform: scale(1); opacity: .6; } 50% { transform: scale(1.15); opacity: .85; } }
@media (max-width: 700px) {
    .sec-hero { padding: 16px; gap: 13px; border-radius: 20px; margin-bottom: 14px; }
    .sec-hero-ic { width: 50px !important; height: 50px !important; min-width: 50px; border-radius: 15px !important; }
    .sec-hero h1 { font-size: 20px; }
    .sec-hero p { font-size: 12.5px; }
    .sec-hero.compact { padding: 12px 14px; }
}
@media (prefers-reduced-motion: reduce) { .sec-hero, .sec-hero-ic, .sec-hero-orb { animation: none !important; } }
:root[data-theme="light"] .sec-hero {
    background:
        radial-gradient(circle at 92% 20%, rgb(var(--c1-rgb) / 0.26), transparent 46%),
        radial-gradient(circle at 8% 110%, rgb(var(--c2-rgb) / 0.22), transparent 52%),
        linear-gradient(135deg, #ffffff, #f3f0ff);
}
:root[data-theme="light"] .sec-hero h1 { color: #1e1b4b; }
:root[data-theme="light"] .sec-hero p { color: #4b4870; }
:root[data-theme="light"] .sec-hero::after { background-image: linear-gradient(rgba(0, 0, 0, .04) 1px, transparent 1px), linear-gradient(90deg, rgba(0, 0, 0, .04) 1px, transparent 1px); }

/* Ichki bo'limlar: panellar, ro'yxatlar, tugmalar — bo'lim rangida jonli urg'u */
#view .view-page .panel:not(.chat-main) { position: relative; }
#view .view-page .panel::before {
    content: ""; position: absolute; left: 18px; right: 18px; top: -1px; height: 2px; border-radius: 2px; pointer-events: none;
    background: linear-gradient(90deg, transparent, rgb(var(--c1-rgb) / 0.8), transparent); opacity: .7;
}
#view .view-page .panel-head h2::before {
    content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 9px; vertical-align: middle;
    background: linear-gradient(135deg, var(--c1), var(--c2)); box-shadow: 0 0 10px var(--c1);
}
#view .view-page .list-row { transition: transform .2s ease, border-color .2s ease, background .2s ease; }
#view .view-page .list-row:hover { border-color: rgb(var(--c1-rgb) / 0.45);
    background: linear-gradient(90deg, rgb(var(--c1-rgb) / 0.12), transparent 80%); }
#view .view-page .chip.on, #view .view-page .tabs-pill button.on {
    background: linear-gradient(135deg, var(--c1), var(--c2)); border-color: transparent; color: #fff;
    box-shadow: 0 6px 16px -8px var(--c1);
}
#view .view-page .table tbody tr:hover td { background: rgb(var(--c1-rgb) / 0.08); }

/* Chat: bosh sahifa uslubidagi kontaktlar va xabarlar */
.sec-hero + .view-page .chat-wrap { height: calc(100vh - 250px); }
.chat-wrap.tg .chat-list-head h2 { display: none; }
.chat-wrap.tg .chat-list-head { justify-content: flex-end; margin-top: 0; }
.chat-contact { border: 1px solid transparent; border-radius: 16px; transition: background .2s ease, border-color .2s ease, transform .2s ease; }
.chat-contact:hover { transform: translateX(2px); border-color: rgb(var(--c1-rgb, 34 211 238) / 0.35);
    background: linear-gradient(90deg, rgb(var(--c1-rgb, 34 211 238) / 0.14), transparent 85%); }
.chat-contact.on { border-color: rgb(var(--c1-rgb, 34 211 238) / 0.55);
    background: linear-gradient(90deg, rgb(var(--c1-rgb, 34 211 238) / 0.22), rgb(var(--c2-rgb, 8 145 178) / 0.08)); }
.chat-contact .av { box-shadow: 0 0 0 2px #0c0c24, 0 0 0 4px rgb(var(--c1-rgb, 34 211 238) / 0.6), 0 8px 18px -8px var(--c1, #22d3ee); }
.chat-unread { background: linear-gradient(135deg, var(--c1, #22d3ee), var(--c2, #0891b2)); box-shadow: 0 0 12px rgb(var(--c1-rgb, 34 211 238) / 0.7); }
.msg.mine .msg-bubble { background: linear-gradient(135deg, #7c3aed, #4f46e5 60%, #0891b2); box-shadow: 0 8px 20px -12px #7c3aed; }
.chat-head { background: linear-gradient(90deg, rgb(var(--c1-rgb, 34 211 238) / 0.12), transparent 70%); }
:root[data-theme="light"] .chat-contact .av { box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgb(var(--c1-rgb, 34 211 238) / 0.6); }
.sec-hero-act { margin-left: auto; flex: none; }
.sec-hero + .view-page .chat-wrap.tg .chat-list-head { display: none; }
@media (max-width: 700px) { .sec-hero + .view-page .chat-wrap { height: auto; min-height: 0; } }


/* ===== Tahlilchi: 100 ta tekshiruv ===== */
.chk-top { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-bottom: 14px; }
.chk-ring { --v: 0; width: 112px; height: 112px; border-radius: 50%; display: grid; place-content: center; text-align: center; flex: none;
    background: radial-gradient(closest-side, var(--panel-bg, #12112a) 78%, transparent 79% 100%),
        conic-gradient(#22c55e calc(var(--v) * 1%), rgba(255, 255, 255, .08) 0); box-shadow: 0 0 26px -10px #22c55e; }
.chk-ring b { font-size: 26px; line-height: 1; }
.chk-ring small { color: var(--muted); font-size: 11px; }
.chk-counts { display: grid; grid-template-columns: repeat(4, minmax(64px, 1fr)); gap: 8px; flex: 1; min-width: 240px; }
.chk-c { display: flex; flex-direction: column; align-items: center; padding: 10px 6px; border-radius: 14px; font-weight: 800; font-size: 20px;
    border: 1px solid var(--border); background: var(--glass-2); }
.chk-c small { font-size: 11px; font-weight: 500; color: var(--muted); }
.chk-c.ok { color: #4ade80; } .chk-c.warn { color: #fbbf24; } .chk-c.bad { color: #f87171; } .chk-c.na { color: var(--muted); }
.chk-areas { margin-bottom: 12px; flex-wrap: wrap; }
.chk-areas .chip b { margin-left: 4px; opacity: .85; }
.chk-list { display: flex; flex-direction: column; gap: 6px; }
.chk-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--border);
    background: var(--glass-2); color: inherit; text-decoration: none; transition: transform .15s ease, border-color .15s ease; }
a.chk-row:hover { transform: translateX(2px); border-color: var(--border-accent); }
.chk-ic { width: 28px; height: 28px; flex: none; border-radius: 9px; display: grid; place-items: center; font-weight: 800; color: #fff; }
.chk-ok .chk-ic { background: linear-gradient(135deg, #22c55e, #15803d); }
.chk-warn .chk-ic { background: linear-gradient(135deg, #fbbf24, #b45309); }
.chk-bad .chk-ic { background: linear-gradient(135deg, #f87171, #b91c1c); box-shadow: 0 0 12px -2px #ef4444; }
.chk-na .chk-ic { background: rgba(148, 163, 184, .35); }
.chk-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.chk-main b { font-size: 13.5px; font-weight: 600; }
.chk-main small { color: var(--muted); font-size: 12px; white-space: normal; }
.chk-val { flex: none; max-width: 42%; text-align: right; font-size: 12.5px; font-weight: 700; color: var(--text); }
.chk-na .chk-main b, .chk-na .chk-val { opacity: .6; }
@media (max-width: 700px) { .chk-row { align-items: flex-start; } .chk-val { max-width: 38%; } .chk-counts { grid-template-columns: repeat(2, 1fr); } }


/* ===== Sozlamalar: menyu uslubidagi bo'limlar ===== */
.sidebar-solo .sidebar-text { font-weight: 700; color: var(--text); }
.settings-tabs { padding: 10px; gap: 6px; }
.settings-tab { position: relative; gap: 12px; padding: 9px 12px; border: 1px solid transparent; border-radius: 16px; color: var(--text-2); }
.settings-tab b { flex: 1; font-weight: 600; font-size: 14px; line-height: 1.25; }
.settings-tab .st-ic { width: 38px !important; height: 38px !important; min-width: 38px; border-radius: 12px !important; display: grid !important; place-items: center; }
.settings-tab .st-ic .nav-icon { width: 19px; height: 19px; }
.settings-tab .st-chev { font-style: normal; color: var(--muted); font-size: 18px; transition: transform .2s ease; }
.settings-tab:hover { background: linear-gradient(90deg, rgb(var(--c1-rgb) / 0.18), transparent 85%);
    border-color: rgb(var(--c1-rgb) / 0.35); transform: translateX(2px); }
.settings-tab:hover .st-ic { transform: perspective(300px) translateY(-2px) scale(1.08); }
.settings-tab.on { color: var(--text); border-color: rgb(var(--c1-rgb) / 0.6);
    background: linear-gradient(90deg, rgb(var(--c1-rgb) / 0.26), rgb(var(--c2-rgb) / 0.08));
    box-shadow: 0 10px 24px -14px var(--c1); }
.settings-tab.on b { font-weight: 700; }
.settings-tab.on .st-chev { color: var(--c1); transform: translateX(2px); }
.settings-tab.on .st-ic { animation: nav-float 3.2s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .settings-tab.on .st-ic { animation: none; } }


/* ===== Yuqori panel va pastki menyu: menyu uslubidagi 3D ikonkalar ===== */
.tb3d { position: relative; border: 0 !important; color: #fff !important;
    background: linear-gradient(145deg, var(--c1), var(--c2)) !important;
    box-shadow: 0 8px 18px -8px var(--c1), inset 0 1px 0 rgba(255, 255, 255, .4), inset 0 -3px 6px rgba(0, 0, 0, .28);
    transition: transform .25s cubic-bezier(.2, .8, .2, 1), box-shadow .25s ease; }
.tb3d::after { content: ""; position: absolute; left: 3px; right: 3px; top: 2px; height: 45%; border-radius: 10px 10px 16px 16px;
    background: linear-gradient(180deg, rgba(255, 255, 255, .45), rgba(255, 255, 255, 0)); pointer-events: none; }
.tb3d .nav-icon { width: 21px; height: 21px; stroke: #fff !important; fill: none; stroke-width: 2.1; position: relative; z-index: 1;
    filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, .4)); }
.tb3d:hover { transform: translateY(-2px) scale(1.05); box-shadow: 0 12px 24px -8px var(--c1), inset 0 1px 0 rgba(255, 255, 255, .45), inset 0 -3px 6px rgba(0, 0, 0, .25); }
.tb3d:active { transform: scale(.94); }
.menu-btn.tb3d, .back-btn.tb3d { width: 44px; height: 44px; border-radius: 14px; }
.bell.tb3d { width: 44px; height: 44px; border-radius: 14px; }
.bell.tb3d .bell-count { z-index: 2; box-shadow: 0 0 0 2px var(--bg, #0b0b18), 0 0 10px rgba(239, 68, 68, .7); }
.bell.tb3d:not(:has(.bell-count[hidden])) .nav-icon { animation: bell-ring 2.6s ease-in-out infinite; transform-origin: 50% 10%; }
@keyframes bell-ring { 0%, 70%, 100% { transform: rotate(0); } 75% { transform: rotate(14deg); } 80% { transform: rotate(-12deg); } 85% { transform: rotate(8deg); } 90% { transform: rotate(-5deg); } }

/* Kun / tun almashtirgich */
.theme-toggle { height: 44px; gap: 7px; padding: 0 9px; border-radius: 14px; border: 1px solid rgba(168, 85, 247, .35);
    background: linear-gradient(145deg, rgba(40, 28, 90, .85), rgba(16, 14, 40, .9)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 8px 18px -12px #7c3aed; }
.theme-toggle .tt-ic { display: grid; place-items: center; width: 18px; height: 18px; }
.theme-toggle .tt-ic .nav-icon { width: 17px; height: 17px; fill: none; stroke-width: 2.1; }
.theme-toggle .tt-sun .nav-icon { stroke: #fbbf24 !important; }
.theme-toggle .tt-moon .nav-icon { stroke: #c4b5fd !important; }
.theme-toggle .switch { width: 38px; height: 22px; border-radius: 12px; background: linear-gradient(90deg, #6d28d9, #a855f7); box-shadow: inset 0 1px 3px rgba(0, 0, 0, .4), 0 0 12px -2px #a855f7; }
.theme-toggle .switch::after { top: 3px; left: 19px; width: 16px; height: 16px; box-shadow: 0 2px 5px rgba(0, 0, 0, .35); }
:root[data-theme="light"] .theme-toggle { background: linear-gradient(145deg, #fff, #f1ecff); border-color: #d9cdfd; }
:root[data-theme="light"] .theme-toggle .switch::after { left: 3px; }

/* Filial tanlagich va avatar */
.branch-select, .branch-pill { position: relative; min-height: 44px; display: flex; align-items: center; border-radius: 14px;
    border: 1px solid transparent !important;
    background: linear-gradient(145deg, rgba(36, 26, 82, .9), rgba(14, 12, 36, .95)) padding-box,
        linear-gradient(135deg, #a855f7, #3b82f6 60%, #06b6d4) border-box !important;
    box-shadow: 0 8px 20px -14px #a855f7; }
:root[data-theme="light"] .branch-select, :root[data-theme="light"] .branch-pill {
    background: linear-gradient(145deg, #fff, #f5f2ff) padding-box, linear-gradient(135deg, #a855f7, #3b82f6 60%, #06b6d4) border-box !important; }
.user-chip { border-radius: 14px; }
.user-chip-avatar { box-shadow: 0 0 0 2px var(--bg, #0b0b18), 0 0 0 4px #a855f7, 0 6px 14px -6px #a855f7; }

/* Pastki menyu (telefon) */
@media (max-width: 960px) {
    .bottom-nav { left: 10px !important; right: 10px !important; bottom: calc(8px + env(safe-area-inset-bottom, 0px)) !important;
        padding: 7px 6px !important; border-radius: 22px; border: 1px solid rgba(168, 85, 247, .28) !important;
        background: linear-gradient(180deg, rgba(24, 18, 56, .88), rgba(10, 9, 28, .94)) !important;
        box-shadow: 0 16px 40px -12px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .03) inset; backdrop-filter: blur(18px) saturate(1.3); }
    .bottom-nav a, .bottom-nav button { gap: 4px !important; padding: 3px 2px !important; font-size: 10.5px !important; font-weight: 600; color: #9b98b8 !important;
        background: none !important; transition: transform .2s ease; }
    .bottom-nav .bn-ic { position: relative; width: 38px; height: 38px; border-radius: 13px; display: grid; place-items: center; font-style: normal;
        background: linear-gradient(145deg, var(--c1, #a855f7), var(--c2, #6d28d9));
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), inset 0 -3px 6px rgba(0, 0, 0, .28), 0 6px 14px -8px var(--c1, #a855f7);
        opacity: .72; filter: saturate(.75); transition: transform .3s cubic-bezier(.2, .8, .2, 1), opacity .25s, filter .25s, box-shadow .25s; }
    .bottom-nav .bn-ic::after { content: ""; position: absolute; left: 3px; right: 3px; top: 2px; height: 45%; border-radius: 10px 10px 14px 14px;
        background: linear-gradient(180deg, rgba(255, 255, 255, .45), rgba(255, 255, 255, 0)); pointer-events: none; }
    .bottom-nav .bn-ic .nav-icon { width: 20px; height: 20px; stroke: #fff !important; filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, .45)) !important; position: relative; z-index: 1; }
    .bottom-nav a.active .bn-ic { opacity: 1; filter: none; transform: translateY(-5px) scale(1.1);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), inset 0 -3px 6px rgba(0, 0, 0, .25), 0 10px 22px -6px var(--c1); }
    .bottom-nav a.active span { color: #fff !important; }
    .bottom-nav a.active::before { top: auto !important; bottom: -3px; left: 38% !important; right: 38% !important; height: 4px !important; border-radius: 4px !important; }
    .bottom-nav a:active .bn-ic, .bottom-nav button:active .bn-ic { transform: scale(.9); }
    .bottom-nav .nav-badge { top: -2px !important; right: 14% !important; z-index: 2; box-shadow: 0 0 0 2px #120e2c; }
}
:root[data-theme="light"] .bottom-nav { background: linear-gradient(180deg, rgba(255, 255, 255, .92), rgba(243, 239, 255, .96)) !important; border-color: #ddd3fb !important; }
:root[data-theme="light"] .bottom-nav a.active span { color: #2e1065 !important; }
@media (prefers-reduced-motion: reduce) { .bell.tb3d .nav-icon { animation: none !important; } }
@media (max-width: 560px) {
    .menu-btn.tb3d, .back-btn.tb3d, .bell.tb3d { width: 42px; height: 42px; }
    .theme-toggle { height: 42px; padding: 0 8px; }
    .theme-toggle .tt-ic { display: none; }
    .branch-select, .branch-pill { min-height: 42px; }
    .branch-select select { max-width: 112px; }
    .settings-tab .st-chev { display: none; }
}
.bottom-nav a.active .bn-ic .nav-icon, .bottom-nav .bn-ic .nav-icon { stroke: #fff !important; filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, .45)) !important; }


/* Fonda (ko'rinmas) yangilash: kirish animatsiyalari qayta o'ynamaydi — sahifa "yangilangandek" ko'rinmaydi */
.view-page.soft .duties, .view-page.soft .chart-3d, .view-page.soft .vbar-fill, .view-page.soft .bar-fill,
.view-page.soft .an-bar, .view-page.soft .funnel-bar, .view-page.soft .kpi, .view-page.soft .panel,
.view-page.soft .ring, .view-page.soft .donut, .view-page.soft svg * { animation: none !important; transition: none !important; }

/* Chat (telefon): suhbat butun ekranda — tepada sarlavha, pastda yozish bloki qotib turadi, faqat xabarlar suriladi */
@media (max-width: 700px) {
    #view .chat-wrap.open .chat-main { position: fixed; inset: 0; z-index: 950; display: flex; flex-direction: column;
        height: 100vh; height: 100dvh; border-radius: 0; border: 0; margin: 0; background: var(--bg); }
    #view .chat-wrap.open .chat-head, #view .chat-wrap.open .chat-input, #view .chat-wrap.open .chat-replybar { flex: none; }
    #view .chat-wrap.open .chat-messages { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
    #view .chat-wrap.open .chat-input { padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px)); }
    body.chat-full { overflow: hidden; }
    body.chat-full .bottom-nav { display: none !important; }
}
.lesson-actions { display: flex; flex-direction: column; gap: 10px; }
.lesson-actions .btn { justify-content: flex-start; min-height: 48px; text-align: left; }

.time-hint { display: block; margin-top: 4px; font-size: 12px; color: var(--muted); }
.time-hint.bad { color: #f87171; font-weight: 700; }


/* Davomat: qo'ng'iroq tugmalari va "darsga kelmaganlar" */
.call-btns { display: inline-flex; gap: 6px; flex: none; }
.call-btn { width: 38px; height: 38px; border-radius: 12px; display: inline-grid; place-items: center; text-decoration: none; font-size: 17px;
    background: linear-gradient(145deg, #22c55e, #15803d); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 6px 14px -8px #22c55e; }
.call-btn.parent { background: linear-gradient(145deg, #38bdf8, #0369a1); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 6px 14px -8px #38bdf8; }
.call-btn:active { transform: scale(.92); }
.att-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.att-row > strong { flex: 1; min-width: 140px; }
.absent-panel { margin-bottom: 16px; border-color: rgba(239, 68, 68, .35) !important; }
.absent-row .list-side { display: flex; align-items: center; gap: 8px; }
@media (max-width: 560px) { .att-row .seg { width: 100%; } }



/* ===== Ilova karkasi: tepa va pastki menyu joyida, faqat ish bloki suriladi (bosh sahifadan tashqari) ===== */
html.fixed-shell, body.fixed-shell { height: 100%; overflow: hidden; overscroll-behavior: none; }
body.fixed-shell .main { height: 100vh; height: 100dvh; overflow: hidden; }
body.fixed-shell .container { height: 100%; display: flex; flex-direction: column; padding-bottom: 0 !important; box-sizing: border-box; }
body.fixed-shell .topbar { flex: none; }
body.fixed-shell #view { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
body.fixed-shell #view > .sec-hero { flex: none; }
body.fixed-shell #view > .view-page { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch; margin: 0 -8px; padding: 4px 8px 18px; scrollbar-width: thin; }
body.fixed-shell .app-footer { display: none; }
@media (max-width: 960px) {
    body.fixed-shell #view > .view-page { padding-bottom: calc(100px + env(safe-area-inset-bottom, 0px)); }
}
/* Chat: ish bloki o'zi ichida — kontaktlar ro'yxati va xabarlar alohida suriladi */
body.fixed-shell[data-route="chat"] #view > .view-page { overflow: hidden; display: flex; flex-direction: column; }
body.fixed-shell[data-route="chat"] #view .chat-wrap { flex: 1 1 auto; min-height: 0; height: auto !important; }
body.fixed-shell[data-route="chat"] #view .chat-wrap .chat-list { min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
body.fixed-shell[data-route="chat"] #chat_contacts { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
@media (max-width: 960px) {
    body.fixed-shell[data-route="chat"] #view > .view-page { padding-bottom: calc(92px + env(safe-area-inset-bottom, 0px)); }
}
body.fixed-shell[data-route="chat"] #view .chat-wrap { grid-template-rows: minmax(0, 1fr); }
body.fixed-shell[data-route="chat"] #view .chat-wrap > * { min-height: 0; }

/* Yon menyu: tepada logotip, pastda foydalanuvchi kartasi joyida — faqat o'rtadagi bo'limlar suriladi */
#sidebar_user { flex: none; }
#sidebar_user .sidebar-user { margin: 10px 0 0 !important; }
.sidebar > .sidebar-menu { margin-bottom: 0; }
@media (max-height: 740px) {
    .sidebar-logo { margin-bottom: 12px !important; }
    .sidebar-logo .logo3d-emblem { transform: scale(.8); transform-origin: center top; margin-bottom: -18px; }
}
.menu-scroll { padding-bottom: 16px !important; }

/* ===== Interfeys ikonkalari (emoji o'rniga, menyu uslubida) ===== */
.ui-ic { display: inline-block; width: 1.15em; height: 1.15em; vertical-align: -0.2em; flex: none; }
.ui-ic .ui-ic-svg { width: 100%; height: 100%; fill: none; stroke: var(--ic, currentColor); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.btn:not(.btn-ghost) .ui-ic .ui-ic-svg, .badge .ui-ic .ui-ic-svg, .chip.on .ui-ic .ui-ic-svg, .tabs-pill button.on .ui-ic .ui-ic-svg,
.call-btn .ui-ic .ui-ic-svg, .toast .ui-ic .ui-ic-svg, .settings-tab.on .ui-ic .ui-ic-svg { stroke: currentColor; }
.call-btn .ui-ic { width: 20px; height: 20px; color: #fff; }
.ui-ic3d { position: relative; display: inline-grid; place-items: center; flex: none; width: 1.6em; height: 1.6em; border-radius: .45em;
    vertical-align: -0.42em; margin-right: .18em; background: linear-gradient(145deg, var(--c1), var(--c2));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), inset 0 -2px 4px rgba(0, 0, 0, .25), 0 4px 10px -4px var(--c1); }
.ui-ic3d::after { content: ""; position: absolute; left: 2px; right: 2px; top: 1px; height: 46%; border-radius: .4em .4em .6em .6em;
    background: linear-gradient(180deg, rgba(255, 255, 255, .45), rgba(255, 255, 255, 0)); pointer-events: none; }
.ui-ic3d .ui-ic-svg { position: relative; z-index: 1; width: 62%; height: 62%; fill: none; stroke: #fff; stroke-width: 2.3; stroke-linecap: round; stroke-linejoin: round;
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .35)); }
h1 .ui-ic3d, h2 .ui-ic3d, h3 .ui-ic3d { font-size: .9em; }
.empty .ui-ic3d, .empty-state .ui-ic3d { font-size: 1em; margin: 0; }
.ui-ic { margin-right: .28em; }
.ui-ic:last-child { margin-right: 0; }
.chat-send .ui-ic .ui-ic-svg, .icon-btn.recording .ui-ic .ui-ic-svg, .btn-danger .ui-ic .ui-ic-svg, .btn-ok .ui-ic .ui-ic-svg { stroke: #fff !important; }
.icon-btn .ui-ic { margin: 0; width: 22px; height: 22px; }

/* To'lov cheki (ekranda): kassa cheki uslubi — oq qog'oz, monoshrift */
.receipt-preview .receipt { font-family: "DejaVu Sans Mono", "Roboto Mono", "Courier New", Consolas, monospace; font-size: 12.5px; line-height: 1.5;
    padding: 18px 16px 20px; border-radius: 6px; background: #fff linear-gradient(#fff, #fafafa); color: #111;
    -webkit-mask-image: linear-gradient(#000, #000); }
.receipt-preview .rc-head b { font-size: 19px; letter-spacing: 1.5px; color: #000; }
.receipt-preview .rc-head span { color: #222; font-size: 12px; }
.receipt-preview .rc-title { font-size: 18px; letter-spacing: 1.5px; margin: 4px 0 6px; color: #000; }
.receipt-preview .rc-dash { border-top: 1.5px dashed #555; margin: 7px 0; }
.receipt-preview .rc-lr { display: flex; justify-content: space-between; gap: 10px; color: #222; }
.receipt-preview .rc-lr b { font-weight: 500; text-align: right; color: #000; }
.receipt-preview .rc-th { font-size: 11.5px; color: #444; }
.receipt-preview .rc-total { font-size: 17px; font-weight: 800; color: #000; margin: 2px 0 4px; }
.receipt-preview .rc-total b, .receipt-preview .rc-code b, .receipt-preview .rc-code span { font-weight: 800; color: #000; }
.receipt-preview .rc-qr { display: flex; justify-content: center; margin: 8px 0 4px; }
.receipt-preview .rc-qr svg { width: 132px; height: 132px; }
.receipt-preview .rc-verify { text-align: center; font-size: 11px; color: #333; }
.receipt-preview .rc-foot { text-align: center; font-weight: 800; color: #000; border: 0; padding: 0; margin-top: 4px; }
.receipt-preview .rc-head { border-bottom: 0 !important; padding-bottom: 0 !important; }
