/* Sirius Rulon admin panel. Ranglar Android ilovadagi DIZAYN_TIZIMI.md tokenlari bilan bir xil. */
:root {
    --brand: #234F67;
    --brand-dark: #17384A;
    --brand-light: #3B6E8A;
    --brand-surface: #EAF1F5;
    --bg: #F6F8FA;
    --surface: #FFFFFF;
    --outline: #E6EBEF;
    --text: #1B2A33;
    --text-2: #5E6E78;
    --hint: #9BA8B0;
    --ok: #2E7D32;
    --ok-bg: #E7F4E9;
    --bad: #E53935;
    --bad-bg: #FDECEB;
    --warn: #B7791F;
    --warn-bg: #FFF4E0;
    --info: #0277BD;
    --info-bg: #E5F1FA;
    --sidebar: #17384A;
    --sidebar-text: #C9D8E1;
    --sidebar-active: #234F67;
    --radius: 10px;
    --sidebar-w: 248px;
    --font: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

    /* Qo'shimcha tokenlar (light/dark uchun) */
    --muted: var(--text-2);
    --brand-hover: #17384A;
    --brand-surface-2: #DFECF3;
    --surface-2: #F8FAFC;
    --row-hover: #FAFCFD;
    --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
    --shadow-md: 0 10px 24px rgba(16, 24, 40, .08);
    --hero-from: #17384A;
    --hero-to: #234F67;
    --overlay: rgba(15, 23, 42, .6);
    color-scheme: light;
}

/* ---------- Dark mode ---------- */
[data-theme="dark"] {
    --brand: #3E7FA1;
    --brand-dark: #A8CCDE;
    --brand-light: #6FA9C7;
    --brand-surface: #1B3442;
    --brand-surface-2: #22404F;
    --brand-hover: #336C8A;
    --bg: #0D171D;
    --surface: #142229;
    --surface-2: #192A33;
    --outline: #24363F;
    --text: #E2EAEF;
    --text-2: #9DB0BB;
    --hint: #6E838E;
    --ok: #4CAF6A;
    --ok-bg: rgba(76, 175, 106, .14);
    --bad: #F2675F;
    --bad-bg: rgba(242, 103, 95, .14);
    --warn: #E0A84A;
    --warn-bg: rgba(224, 168, 74, .14);
    --info: #4FB0E8;
    --info-bg: rgba(79, 176, 232, .14);
    --sidebar: #0A1318;
    --sidebar-text: #AFC2CD;
    --sidebar-active: #1B3442;
    --row-hover: #18282F;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .35);
    --shadow-md: 0 10px 28px rgba(0, 0, 0, .45);
    --hero-from: #10293A;
    --hero-to: #1C4458;
    --overlay: rgba(2, 6, 10, .72);
    color-scheme: dark;
}
html { transition: background-color .2s ease; }

html, body { height: 100%; }
body.adm {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}
.adm a { color: var(--brand); }
.adm :focus-visible { outline: 2px solid var(--brand-light); outline-offset: 2px; }
.num, .adm-kpi__value, .adm-table td.num { font-variant-numeric: tabular-nums; }
.tone-ok { color: var(--ok) !important; }
.tone-bad { color: var(--bad) !important; }
.tone-warn { color: var(--warn) !important; }

/* ---------- Sidebar ---------- */
.adm-sidebar {
    position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w);
    background: var(--sidebar); color: var(--sidebar-text);
    display: flex; flex-direction: column; z-index: 1040;
    padding: 16px 12px calc(16px + env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
}
.adm .adm-logo { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; font-size: 16px; padding: 4px 8px 18px; text-decoration: none; }
.adm .adm-logo:hover { color: #fff; }
.adm-logo__mark { width: 30px; height: 30px; border-radius: 8px; background: var(--brand-light); display: grid; place-items: center; font-size: 15px; }
.adm-nav__sec { font-size: 11px; letter-spacing: .09em; text-transform: uppercase; opacity: .55; padding: 14px 10px 4px; }
.adm-nav__link {
    display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px;
    color: inherit !important; text-decoration: none; font-size: 13.5px; min-height: 38px;
}
.adm-nav__link i,
.adm-nav__link svg { width: 18px; height: 18px; font-size: 18px; opacity: .9; flex-shrink: 0; }
.adm-nav__link:hover { background: rgba(255, 255, 255, .06); color: #fff !important; }
.adm-nav__link.is-active { background: var(--sidebar-active); color: #fff !important; }
.adm-backdrop { display: none; }

/* ---------- Main ---------- */
.adm-main { margin-left: var(--sidebar-w); min-height: 100%; display: flex; flex-direction: column; }
.adm-topbar {
    position: sticky; top: 0; z-index: 1020;
    display: flex; align-items: center; gap: 12px;
    padding: 10px 24px; padding-top: calc(10px + env(safe-area-inset-top, 0px));
    background: var(--surface); border-bottom: 1px solid var(--outline);
}
.adm-burger { display: none; border: 0; background: none; padding: 6px; margin-left: -6px; color: var(--text); font-size: 24px; line-height: 1; }
.adm-topbar__title { flex: 1; min-width: 0; font-weight: 600; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 0; }
.adm-seg { display: inline-flex; border: 1px solid var(--outline); border-radius: 8px; overflow: hidden; }
.adm-seg a { padding: 5px 10px; font-size: 12.5px; color: var(--text-2); text-decoration: none; }
.adm-seg a.is-on { background: var(--brand-surface); color: var(--brand); font-weight: 600; }
.adm-sklad-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    position: relative;
    flex-shrink: 0;
}
.adm-sklad-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    height: 32px;
    padding: 0 10px;
    background: var(--surface);
    border: 1px solid var(--outline);
    border-radius: 8px;
    cursor: pointer;
    transition: all .18s ease;
    box-shadow: var(--shadow-sm);
}
.adm-sklad-badge:hover {
    border-color: var(--brand-light);
    background: var(--surface-2);
}
.adm-sklad-badge.is-selected {
    background: var(--brand-surface);
    border-color: var(--brand-light);
}
.adm-sklad-badge.is-selected:hover {
    background: var(--brand-surface-2);
}
.adm-sklad-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    pointer-events: none;
    user-select: none;
}
.adm-sklad-icon {
    font-size: 15px;
    color: var(--text-2);
    line-height: 1;
    display: inline-flex;
}
.adm-sklad-badge.is-selected .adm-sklad-icon {
    color: var(--brand);
}
.adm-sklad-name {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.adm-sklad-badge.is-selected .adm-sklad-name {
    color: var(--brand-dark);
}
.adm-sklad-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--ok);
    display: inline-block;
    flex-shrink: 0;
    box-shadow: 0 0 0 2px rgba(46, 125, 50, 0.2);
}
.adm-sklad-chevron {
    font-size: 14px;
    color: var(--hint);
    line-height: 1;
    transition: transform .18s ease;
}
.adm-sklad-badge:hover .adm-sklad-chevron {
    color: var(--brand);
}
.adm-sklad-native-select {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}
.adm-sklad-reset-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1px solid var(--outline);
    background: var(--surface);
    color: var(--text-2);
    cursor: pointer;
    padding: 0;
    font-size: 14px;
    line-height: 1;
    transition: all .15s ease;
    box-shadow: var(--shadow-sm);
}
.adm-sklad-reset-btn:hover {
    background: var(--bad-bg);
    border-color: #FCA5A5;
    color: var(--bad);
    transform: scale(1.05);
}
.adm-user { display: inline-grid; place-items: center; flex: none; border: 0; background: var(--brand-surface); color: var(--brand); width: 34px; height: 34px; border-radius: 50%; font-weight: 700; font-size: 12px; }
.adm-content { padding: 20px 24px 32px; display: grid; gap: 16px; min-width: 0; }
.adm-page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 16px; }
.adm-page-head h1 { font-size: 22px; font-weight: 600; margin: 0; }
.adm-page-head p { margin: 2px 0 0; color: var(--text-2); max-width: 70ch; }
.adm-note { font-size: 12.5px; color: var(--text-2); }

/* ---------- Filters ---------- */
.adm-filter { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.adm-filter__field { display: grid; gap: 3px; }
.adm-filter__field label { font-size: 11.5px; color: var(--text-2); margin: 0; }
.adm-filter .form-control, .adm-filter .form-select { font-size: 13.5px; border-color: var(--outline); border-radius: 8px; min-height: 36px; }
.adm-filter .form-control:focus, .adm-filter .form-select:focus { border-color: var(--brand-light); box-shadow: 0 0 0 3px rgba(35, 79, 103, .12); }
.adm-filter__search { min-width: 200px; }
.adm-presets { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.adm-presets a {
    font-size: 12.5px; padding: 7px 10px; border-radius: 8px; border: 1px solid var(--outline);
    background: var(--surface); color: var(--text-2); text-decoration: none; min-height: 36px; display: inline-flex; align-items: center;
}
.adm-presets a.is-on { border-color: var(--brand); color: var(--brand); font-weight: 600; }
.adm-filter__actions { display: flex; gap: 8px; margin-left: auto; }
.adm-filter__head, .adm-filter__close { display: none; }
.adm-chips { display: none; }

.adm-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    font-size: 13.5px; padding: 7px 14px; min-height: 36px; border-radius: 8px;
    border: 1px solid var(--outline); background: var(--surface); color: var(--text) !important; text-decoration: none; cursor: pointer;
}
.adm-btn:hover { border-color: var(--brand-light); }
.adm-btn--primary { background: var(--brand); border-color: var(--brand); color: #fff !important; }
.adm-btn--primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
.adm-btn i { font-size: 17px; }

/* ---------- KPI ---------- */
.adm-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.adm-kpis--6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (min-width: 1500px) { .adm-kpis--6 { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.adm-kpi { background: var(--surface); border: 1px solid var(--outline); border-radius: var(--radius); padding: 14px 16px; display: grid; gap: 4px; min-width: 0; align-content: start; }
.adm-kpi--hl { border-color: var(--brand); background: var(--brand-surface); }
.adm-kpi__label { font-size: 12.5px; color: var(--text-2); }
.adm-kpi__value { font-size: 20px; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.adm-kpi__value .s { display: none; }
.adm-kpi__sub { font-size: 12px; color: var(--hint); }

/* ---------- Cards ---------- */
.adm-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; }
.adm-grid--even { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.adm-card { background: var(--surface); border: 1px solid var(--outline); border-radius: var(--radius); padding: 16px; display: grid; gap: 12px; min-width: 0; align-content: start; }
.adm-card__head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.adm-card__head h2 { font-size: 15px; font-weight: 600; margin: 0; }
.adm-card__head small, .adm-card__head a { font-size: 12.5px; color: var(--hint); }
.adm-chart { min-height: 280px; }
.adm-bars { display: grid; gap: 10px; }
.adm-bar__top { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
.adm-bar__top span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-bar__top span:last-child { color: var(--text-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.adm-bar__track { height: 6px; border-radius: 3px; background: var(--brand-surface); overflow: hidden; margin-top: 3px; }
.adm-bar__fill { display: block; height: 100%; background: var(--brand); }
.adm-list { display: grid; }
.adm-list__row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--outline); font-size: 13.5px; }
.adm-list__row:last-child { border-bottom: 0; }
.adm-list__row span:last-child { font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.adm-list__row--total { font-weight: 700; border-top: 2px solid var(--outline); }
.adm-alert { border-radius: var(--radius); padding: 12px 14px; background: var(--bad-bg); color: var(--bad); font-size: 13.5px; }
.adm-alert--info { background: var(--info-bg); color: var(--info); }
.adm-empty { padding: 32px 16px; text-align: center; color: var(--text-2); background: var(--surface); border: 1px dashed var(--outline); border-radius: var(--radius); }

/* ---------- Report list ---------- */
.adm-report-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.adm-report-link { display: flex; gap: 12px; padding: 10px 8px; border-radius: 8px; text-decoration: none; color: var(--text) !important; }
.adm-report-link:hover { background: var(--bg); }
.adm-report-link i { font-size: 20px; color: var(--brand-light); margin-top: 1px; }
.adm-report-link b { display: block; font-weight: 600; font-size: 14px; }
.adm-report-link span { display: block; font-size: 12.5px; color: var(--text-2); }

/* ---------- Table ---------- */
.adm-table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--outline); border-radius: var(--radius); }
.adm-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.adm-table th {
    position: sticky; top: 0; background: var(--brand-surface); color: var(--text-2);
    font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; font-weight: 600;
    text-align: left; padding: 10px 12px; white-space: nowrap;
}
.adm-table td { padding: 9px 12px; border-top: 1px solid var(--outline); white-space: nowrap; vertical-align: top; }
.adm-table td.wrap { white-space: normal; min-width: 180px; max-width: 320px; }
.adm-table th.num, .adm-table td.num { text-align: right; }
.adm-table tbody tr:hover td { background: var(--row-hover); }
.adm-table tfoot td { font-weight: 700; background: var(--bg); border-top: 2px solid var(--outline); }
.adm-table td:first-child, .adm-table th:first-child { position: sticky; left: 0; z-index: 1; }
.adm-table td:first-child { background: var(--surface); }
.adm-table th:first-child { z-index: 2; }
.adm-table tfoot td:first-child { background: var(--bg); }
.adm-pill { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 999px; white-space: nowrap; background: var(--bg); color: var(--text-2); }
.adm-pill--ok { background: var(--ok-bg); color: var(--ok); }
.adm-pill--bad { background: var(--bad-bg); color: var(--bad); }
.adm-pill--warn { background: var(--warn-bg); color: var(--warn); }
.adm-pill--info { background: var(--info-bg); color: var(--info); }

.adm-cards { display: none; gap: 8px; }
.adm-rc { background: var(--surface); border: 1px solid var(--outline); border-radius: var(--radius); padding: 12px 14px; display: grid; gap: 8px; }
.adm-rc__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.adm-rc__head b { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.adm-rc__nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.adm-rc__nums div { font-size: 11.5px; color: var(--text-2); min-width: 0; }
.adm-rc__nums b { display: block; font-size: 13.5px; color: var(--text); font-weight: 600; overflow-wrap: anywhere; }
.adm-rc__meta { font-size: 12px; color: var(--hint); overflow-wrap: anywhere; }

.adm-pager { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); }
.adm-pager__btns { display: flex; gap: 8px; }
.adm-pager .is-disabled { opacity: .45; pointer-events: none; }

/* ---------- Bottom nav ---------- */
.adm-bottomnav { display: none; }

/* ---------- Login ---------- */
.adm-auth { min-height: 100%; display: grid; place-items: center; padding: 24px 16px; }
.adm-auth__card { width: 100%; max-width: 380px; background: var(--surface); border: 1px solid var(--outline); border-radius: 14px; padding: 28px 24px; display: grid; gap: 16px; }
.adm-auth__card h1 { font-size: 20px; margin: 0; }
.adm-auth__card p { margin: 0; color: var(--text-2); }
.adm-auth .form-control { min-height: 44px; border-color: var(--outline); }
.adm-auth .adm-btn { min-height: 44px; width: 100%; }

/* =================== Planshet =================== */
@media (max-width: 991.98px) {
    .adm-sidebar { transform: translateX(-100%); transition: transform .2s ease; box-shadow: none; }
    body.adm-menu-open .adm-sidebar { transform: none; box-shadow: 4px 0 24px rgba(0, 0, 0, .25); }
    body.adm-menu-open .adm-backdrop { display: block; position: fixed; inset: 0; background: rgba(10, 20, 26, .45); z-index: 1035; }
    .adm-main { margin-left: 0; }
    .adm-burger { display: block; }
    .adm-topbar { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
    .adm-content { padding: 16px max(16px, env(safe-area-inset-left, 0px)) 28px; }
    .adm-grid { grid-template-columns: 1fr; }
}

/* =================== Telefon =================== */
@media (max-width: 767.98px) {
    .adm-content { padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px)); gap: 12px; }
    .adm-page-head h1 { font-size: 19px; }
    .adm-user { display: none; }

    /* Filtr: chiplar + pastdan chiqadigan oyna */
    .adm-chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
    .adm-chip { font-size: 12.5px; padding: 7px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--outline); white-space: nowrap; color: var(--text); }
    .adm-chip--action { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; display: inline-flex; gap: 4px; align-items: center; }
    .adm-filter {
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 1050;
        background: var(--surface); border-radius: 16px 16px 0 0;
        padding: 12px 16px calc(16px + env(safe-area-inset-bottom, 0px));
        flex-direction: column; align-items: stretch; gap: 12px;
        max-height: 85vh; overflow-y: auto;
        transform: translateY(105%); transition: transform .2s ease;
        box-shadow: 0 -8px 24px rgba(0, 0, 0, .12);
    }
    body.adm-filter-open .adm-filter { transform: none; }
    body.adm-filter-open .adm-backdrop { display: block; position: fixed; inset: 0; background: rgba(10, 20, 26, .45); z-index: 1045; }
    .adm-filter__head { display: flex; justify-content: space-between; align-items: center; font-weight: 600; font-size: 15px; }
    .adm-filter__close { display: block; border: 0; background: none; font-size: 24px; line-height: 1; color: var(--text-2); padding: 4px; }
    .adm-filter__field, .adm-filter__search { width: 100%; min-width: 0; }
    .adm-filter .form-control, .adm-filter .form-select { min-height: 44px; font-size: 16px; }
    .adm-filter__row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
    .adm-presets a { min-height: 40px; flex: 1; justify-content: center; }
    .adm-filter__actions { margin-left: 0; display: grid; grid-template-columns: 1fr 1fr; }
    .adm-filter__actions .adm-btn { min-height: 44px; }
    .adm-filter__export { display: none; }

    .adm-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .adm-kpi { padding: 10px 12px; }
    .adm-kpi__value { font-size: 17px; }
    .adm-kpi__value .f { display: none; }
    .adm-kpi__value .s { display: inline; }
    .adm-chart { min-height: 220px; }

    .adm-table-wrap.has-cards { display: none; }
    .adm-cards { display: grid; }

    .adm-bottomnav {
        display: grid; grid-template-columns: repeat(5, 1fr);
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030;
        background: var(--surface); border-top: 1px solid var(--outline);
        padding: 4px max(4px, env(safe-area-inset-left, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)) max(4px, env(safe-area-inset-right, 0px));
    }
    .adm-bottomnav a, .adm-bottomnav button {
        display: grid; justify-items: center; align-content: center; gap: 1px; min-height: 48px;
        font-size: 10.5px; color: var(--text-2); text-decoration: none; border: 0; background: none; padding: 2px 0;
    }
    .adm-bottomnav i { font-size: 21px; }
    .adm-bottomnav .is-active { color: var(--brand); font-weight: 600; }
}

@media (min-width: 768px) {
    .adm-filter__row { display: contents; }
}

@media (prefers-reduced-motion: reduce) {
    .adm-sidebar, .adm-filter { transition: none; }
}

@media (max-width: 767.98px) {
    .adm-topbar .adm-seg--lang { display: none; }
    .adm-sklad-name {
        max-width: 95px;
        font-size: 11.5px;
    }
    .adm-sklad-badge {
        height: 30px;
        padding: 0 8px;
    }
    .adm-sklad-reset-btn {
        width: 24px;
        height: 24px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .adm-topbar {
        gap: 6px;
        padding-left: 10px;
        padding-right: 10px;
    }
    .adm-sklad-name {
        max-width: 75px;
        font-size: 11px;
    }
}

/* ---------- Theme toggle ---------- */
.adm-theme-toggle {
    position: relative; flex: none; display: inline-grid; place-items: center;
    width: 34px; height: 34px; padding: 0; border-radius: 9px;
    border: 1px solid var(--outline); background: var(--surface); color: var(--text-2);
    cursor: pointer; overflow: hidden; box-shadow: var(--shadow-sm);
    transition: border-color .15s ease, color .15s ease, background-color .15s ease;
}
.adm-theme-toggle:hover { border-color: var(--brand-light); color: var(--brand); }
.adm-theme-toggle i {
    grid-area: 1 / 1; font-size: 18px; line-height: 1;
    transition: transform .3s ease, opacity .2s ease;
}
.adm-theme-toggle__sun { opacity: 0; transform: rotate(-90deg) scale(.6); }
[data-theme="dark"] .adm-theme-toggle__moon { opacity: 0; transform: rotate(90deg) scale(.6); }
[data-theme="dark"] .adm-theme-toggle__sun { opacity: 1; transform: none; color: #F5C451; }

/* ---------- Dark mode: Bootstrap 5.1 komponentlari ---------- */
[data-theme="dark"] body.adm { background: var(--bg); color: var(--text); }
[data-theme="dark"] .adm .form-control,
[data-theme="dark"] .adm .form-select {
    background-color: var(--surface-2); color: var(--text); border-color: var(--outline);
}
[data-theme="dark"] .adm .form-control:focus,
[data-theme="dark"] .adm .form-select:focus {
    background-color: var(--surface-2); color: var(--text);
    border-color: var(--brand-light); box-shadow: 0 0 0 3px rgba(76, 141, 175, .25);
}
[data-theme="dark"] .adm .form-control::placeholder { color: var(--hint); }
[data-theme="dark"] .adm .form-control:disabled,
[data-theme="dark"] .adm .form-control[readonly] { background-color: var(--bg); }
[data-theme="dark"] .adm .form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%239DB0BB' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
}
[data-theme="dark"] .adm .form-select option { background: var(--surface); color: var(--text); }
[data-theme="dark"] .adm .form-label,
[data-theme="dark"] .adm label { color: var(--text-2); }
[data-theme="dark"] .adm .form-check-input { background-color: var(--surface-2); border-color: var(--outline); }
[data-theme="dark"] .adm .form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }
[data-theme="dark"] .adm .btn-close { filter: invert(1) grayscale(1) brightness(1.6); }
[data-theme="dark"] .adm .bg-light,
[data-theme="dark"] .adm .bg-white { background-color: var(--surface-2) !important; }
[data-theme="dark"] .adm .text-dark,
[data-theme="dark"] .adm .text-body { color: var(--text) !important; }
[data-theme="dark"] .adm .text-muted,
[data-theme="dark"] .adm .text-secondary { color: var(--text-2) !important; }
[data-theme="dark"] .adm .text-primary { color: var(--brand-light) !important; }
[data-theme="dark"] .adm .text-success { color: var(--ok) !important; }
[data-theme="dark"] .adm .text-danger { color: var(--bad) !important; }
[data-theme="dark"] .adm .border,
[data-theme="dark"] .adm .border-top,
[data-theme="dark"] .adm .border-bottom { border-color: var(--outline) !important; }
[data-theme="dark"] .adm .table { color: var(--text); border-color: var(--outline); --bs-table-bg: transparent; --bs-table-hover-bg: var(--row-hover); --bs-table-striped-bg: var(--surface-2); }
[data-theme="dark"] .adm .table > :not(caption) > * > * { color: var(--text); border-color: var(--outline); }
[data-theme="dark"] .adm .modal-content,
[data-theme="dark"] .adm .dropdown-menu,
[data-theme="dark"] .adm .card,
[data-theme="dark"] .adm .list-group-item { background-color: var(--surface); color: var(--text); border-color: var(--outline); }
[data-theme="dark"] .adm .dropdown-item { color: var(--text); }
[data-theme="dark"] .adm .dropdown-item:hover { background: var(--surface-2); }
[data-theme="dark"] .adm .btn-light { background: var(--surface-2); border-color: var(--outline); color: var(--text); }
[data-theme="dark"] .adm .btn-link.text-muted:hover { color: var(--text) !important; }
[data-theme="dark"] .adm hr { border-color: var(--outline); opacity: 1; }
[data-theme="dark"] .adm ::-webkit-scrollbar { width: 10px; height: 10px; }
[data-theme="dark"] .adm ::-webkit-scrollbar-thumb { background: #2A3E48; border-radius: 6px; border: 2px solid var(--bg); }
[data-theme="dark"] .adm ::-webkit-scrollbar-track { background: transparent; }
[data-theme="dark"] .apexcharts-tooltip { background: var(--surface) !important; color: var(--text) !important; border-color: var(--outline) !important; }
[data-theme="dark"] .apexcharts-tooltip-title { background: var(--surface-2) !important; border-color: var(--outline) !important; }

/* Sahifalardagi inline yozilgan och ranglar uchun himoya (dark mode) */
[data-theme="dark"] .adm [style*="background:#fff" i],
[data-theme="dark"] .adm [style*="background: #fff" i],
[data-theme="dark"] .adm [style*="background-color:#fff" i],
[data-theme="dark"] .adm [style*="background-color: #fff" i],
[data-theme="dark"] .adm [style*="background:white" i],
[data-theme="dark"] .adm [style*="background: white" i] { background: var(--surface) !important; }
[data-theme="dark"] .adm [style*="background:#f8fafc" i],
[data-theme="dark"] .adm [style*="background: #f8fafc" i],
[data-theme="dark"] .adm [style*="background:#f1f5f9" i],
[data-theme="dark"] .adm [style*="background: #f1f5f9" i],
[data-theme="dark"] .adm [style*="background:#f9fafb" i],
[data-theme="dark"] .adm [style*="background: #f9fafb" i] { background: var(--surface-2) !important; }
[data-theme="dark"] .adm [style*="color:#1e293b" i],
[data-theme="dark"] .adm [style*="color: #1e293b" i],
[data-theme="dark"] .adm [style*="color:#0f172a" i],
[data-theme="dark"] .adm [style*="color: #0f172a" i],
[data-theme="dark"] .adm [style*="color:#334155" i],
[data-theme="dark"] .adm [style*="color: #334155" i],
[data-theme="dark"] .adm [style*="color:#000" i] { color: var(--text) !important; }
[data-theme="dark"] .adm [style*="border:1px solid #e2e8f0" i],
[data-theme="dark"] .adm [style*="border: 1px solid #e2e8f0" i],
[data-theme="dark"] .adm [style*="border-bottom:1px solid #e2e8f0" i],
[data-theme="dark"] .adm [style*="border-bottom: 1px solid #e2e8f0" i] { border-color: var(--outline) !important; }
[data-theme="dark"] .adm h1, [data-theme="dark"] .adm h2, [data-theme="dark"] .adm h3,
[data-theme="dark"] .adm h4, [data-theme="dark"] .adm h5, [data-theme="dark"] .adm h6,
[data-theme="dark"] .adm .h1, [data-theme="dark"] .adm .h2, [data-theme="dark"] .adm .h3,
[data-theme="dark"] .adm .h4, [data-theme="dark"] .adm .h5, [data-theme="dark"] .adm .h6 { color: var(--text); }
[data-theme="dark"] .adm a:not([class]) { color: var(--brand-light); }
