/* ─────────────────────────────────────────────────────────────
   Asosiy uslublar: ranglar, shrift, tugma, forma, jadval, holatlar.
   Rang va burchak qiymatlari (--accent, --r, --ctl-h ...) sahifaga
   PHP orqali qo'shiladi: app/Core/Theme.php -> cssVars().
   ───────────────────────────────────────────────────────────── */

:root {
    /* Kunduzgi: oq yuza, nozik chegaralar */
    --canvas: #f6f8f8;
    --surface: #fff;
    --surface-2: #f1f5f4;
    --surface-3: #e9efed;
    --line: #e3e9e7;
    --line-strong: #cfd8d5;
    --text: #0b1a16;
    --text-2: #33443d;
    --muted: #64756e;
    --ink: var(--accent-ink-l, #197a31);

    --ok: #136c38;
    --ok-bg: #e4f4ea;
    --err: #ae2318;
    --err-bg: #fdecea;
    --warn: #8a5500;
    --warn-bg: #fdf1d8;
    --info: #1f6feb;

    --shadow-sm: 0 1px 2px rgba(11, 26, 22, .05);
    --shadow: 0 1px 2px rgba(11, 26, 22, .04), 0 6px 16px -6px rgba(11, 26, 22, .10);
    --shadow-lg: 0 2px 4px rgba(11, 26, 22, .04), 0 18px 40px -16px rgba(11, 26, 22, .22);
    --focus: #1668d6;

    /* Yuqori panel: kunduzi oq, kechasi quyuq */
    --bar: #fff;
    --bar-fg: var(--text);
    --bar-line: var(--line);
    --bar-soft: var(--surface-2);
    /* Sayt pasti har doim quyuq ko'k */
    --foot-bg: #101d2b;
    --foot-fg: #e7eef2;

    --font: 'Onest', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --font-display: 'Bricolage Grotesque', 'Onest', system-ui, sans-serif;

    --ctl-h: 44px;
    --row-y: 14px;
    --r-sm: 6px;
    --r: 10px;
    --r-lg: 16px;

    color-scheme: light;
}

:root[data-mode="dark"] {
    /* Kechki: quyuq ko'k (navy) */
    --canvas: #232c3b;
    --surface: #1f2736;
    --surface-2: #2a3548;
    --surface-3: #323e54;
    --line: #323e54;
    --line-strong: #41506b;
    --text: #f1f5fb;
    --text-2: #c7d1e0;
    --muted: #8a96ab;
    --ink: var(--accent-ink-d, #5fd37c);

    --ok: #4ade80;
    --ok-bg: rgba(74, 222, 128, .15);
    --err: #f87171;
    --err-bg: rgba(248, 113, 113, .15);
    --warn: #fbbf24;
    --warn-bg: rgba(251, 191, 36, .15);

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow: 0 2px 6px rgba(0, 0, 0, .3);
    --shadow-lg: 0 20px 44px -18px rgba(0, 0, 0, .7);
    --focus: #7db4f2;

    --bar: #1f2736;
    --bar-fg: var(--text);
    --bar-line: var(--line);
    --bar-soft: var(--surface-2);
    --foot-bg: #1b2231;
    --foot-fg: #dfe6f1;

    color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
    :root[data-mode="auto"] {
        --canvas: #232c3b;
        --surface: #1f2736;
        --surface-2: #2a3548;
        --surface-3: #323e54;
        --line: #323e54;
        --line-strong: #41506b;
        --text: #f1f5fb;
        --text-2: #c7d1e0;
        --muted: #8a96ab;
        --ink: var(--accent-ink-d, #5fd37c);

        --ok: #4ade80;
        --ok-bg: rgba(74, 222, 128, .15);
        --err: #f87171;
        --err-bg: rgba(248, 113, 113, .15);
        --warn: #fbbf24;
        --warn-bg: rgba(251, 191, 36, .15);

        --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
        --shadow: 0 2px 6px rgba(0, 0, 0, .3);
        --shadow-lg: 0 20px 44px -18px rgba(0, 0, 0, .7);
        --focus: #7db4f2;

        --bar: #1f2736;
        --bar-fg: var(--text);
        --bar-line: var(--line);
        --bar-soft: var(--surface-2);
        --foot-bg: #1b2231;
        --foot-fg: #dfe6f1;

        color-scheme: dark;
    }
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
    margin: 0;
    background: var(--canvas);
    color: var(--text);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.55;
    letter-spacing: -.004em;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--font-display); line-height: 1.16; letter-spacing: -.022em; margin: 0; font-weight: 650; }
h1 { font-size: clamp(1.55rem, 1.2rem + 1.5vw, 2.1rem); font-weight: 700; }
h2 { font-size: 1.0625rem; }
h3 { font-size: .9375rem; }
p { margin: 0; }
img { max-width: 100%; display: block; }
code { font-size: .875em; background: var(--surface-2); padding: .12em .4em; border-radius: var(--r-sm); word-break: break-all; }
kbd { font: inherit; font-size: .75rem; }

a { color: var(--ink); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: var(--r-sm); }

.wrap { width: 100%; max-width: 1840px; margin: 0 auto; padding: 0 clamp(16px, 2.4vw, 44px); }
.wrap-narrow { max-width: 1180px; }
.narrow { max-width: 780px; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.link { font-weight: 550; }
.lead { font-size: 1.0625rem; color: var(--muted); max-width: 56ch; }
.hint { color: var(--muted); font-size: .8125rem; margin-top: 6px; }
.row { display: flex; flex-wrap: wrap; align-items: center; }
.gap { gap: 10px; }
.stack-lg { display: grid; gap: 18px; align-content: start; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-top { align-items: start; }

.visually-hidden {
    position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
    position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--surface); color: var(--text);
    padding: 10px 14px; border-radius: var(--r-sm); box-shadow: var(--shadow-lg); transition: top .15s;
}
.skip:focus { top: 12px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
[hidden] { display: none !important; }

.icon { flex: none; }

/* ───────── Tugmalar ───────── */
.btn {
    position: relative;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: var(--ctl-h); padding: 0 17px;
    font: inherit; font-weight: 600; font-size: .9375rem; line-height: 1.2; text-decoration: none; text-align: center;
    border: 1px solid transparent; border-radius: var(--r); cursor: pointer;
    transition: background-color .16s ease, border-color .16s ease, color .16s ease, transform .16s ease, box-shadow .16s ease;
}
.btn:active { transform: translateY(1px); }
.btn-sm { min-height: 36px; padding: 0 13px; font-size: .875rem; gap: 6px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--accent-strong); box-shadow: var(--shadow); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--line-strong); }
.btn-secondary:hover { background: var(--surface-2); border-color: var(--muted); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--accent-soft); }
.btn-danger { background: var(--err); color: #fff; }
.btn-danger-ghost { background: transparent; color: var(--err); border-color: var(--line-strong); }
.btn-danger-ghost:hover { background: var(--err-bg); border-color: var(--err); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; }
.btn-primary:disabled:hover { background: var(--accent); box-shadow: var(--shadow-sm); }

/* Forma yuborilayotganda: tugma ichida aylanuvchi belgi */
.btn.is-busy { color: transparent !important; pointer-events: none; }
.btn.is-busy::after {
    content: ''; position: absolute; width: 17px; height: 17px; border-radius: 50%;
    border: 2px solid currentColor; border-top-color: transparent; opacity: 0; animation: spin .6s linear infinite;
}
.btn-primary.is-busy::after { border-color: var(--on-accent); border-top-color: transparent; }
.btn-secondary.is-busy::after, .btn-ghost.is-busy::after { border-color: var(--text); border-top-color: transparent; }
.btn.is-busy::after { opacity: 1; }
@keyframes spin { to { transform: rotate(360deg); } }

.icon-btn {
    display: inline-grid; place-items: center; width: 34px; height: 34px; color: var(--muted);
    border-radius: var(--r-sm); background: none; border: 0; cursor: pointer; transition: background-color .15s, color .15s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }

/* ───────── Forma ───────── */
.form { display: grid; gap: 15px; }
.field { display: grid; gap: 6px; align-content: start; min-width: 0; }
.label, legend { font-weight: 600; font-size: .875rem; letter-spacing: -.005em; }
.input, .select, .textarea {
    width: 100%; min-height: var(--ctl-h); padding: 0 13px;
    font: inherit; color: var(--text); background: var(--surface);
    border: 1px solid var(--line-strong); border-radius: var(--r);
    transition: border-color .15s, box-shadow .15s;
}
.input:hover, .select:hover, .textarea:hover { border-color: var(--muted); }
.textarea { padding: 11px 13px; min-height: 120px; resize: vertical; line-height: 1.55; }
.select { padding-right: 36px; appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
    background-position: calc(100% - 19px) 50%, calc(100% - 14px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.select-sm { min-height: 36px; width: auto; font-size: .875rem; }
.input-sm { min-height: 36px; font-size: .875rem; }
.input-xs { width: 84px; min-width: 0; }
.check-inline { align-items: center; gap: 8px; font-size: .9063rem; }
.check-inline input { margin-top: 0; }
.field-narrow { max-width: 320px; }
.input::placeholder, .textarea::placeholder { color: var(--muted); opacity: .85; }
.input:focus, .select:focus, .textarea:focus {
    outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
.input-file { padding: 8px 11px; height: auto; }
.has-error .input, .has-error .select, .has-error .textarea { border-color: var(--err); }
.has-error .input:focus { box-shadow: 0 0 0 3px var(--err-bg); }
.err-text { color: var(--err); font-size: .8125rem; font-weight: 500; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 2px; }
.form-actions-stack { flex-direction: column; align-items: stretch; }
.form-panel { display: grid; gap: 15px; align-content: start; }
.form-sub { margin-top: 6px; padding-top: 15px; border-top: 1px solid var(--line); }

.pw { position: relative; }
.pw .input { padding-right: 46px; }
.pw-toggle { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 38px; height: 34px; display: grid; place-items: center;
    border: 0; background: none; color: var(--muted); cursor: pointer; border-radius: var(--r-sm); }
.pw-toggle:hover { color: var(--text); background: var(--surface-2); }

.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent); flex: none; }

.toggle {
    appearance: none; flex: none; width: 42px; height: 24px; margin: 0; border-radius: 99px; position: relative; cursor: pointer;
    background: var(--line-strong); transition: background-color .18s ease;
}
.toggle::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff;
    transition: transform .18s cubic-bezier(.4, 0, .2, 1); box-shadow: 0 1px 2px rgba(0, 0, 0, .3); }
.toggle:checked { background: var(--accent); }
.toggle:checked::after { transform: translateX(18px); }
.toggle:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.switch-row { display: flex; align-items: center; gap: 12px; cursor: pointer; font-weight: 600; }
.switch-row-block { align-items: flex-start; padding: 13px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2); }
.switch-row-block .toggle { margin-top: 1px; }
.switch-row-block > span { display: grid; gap: 2px; }
.switch-row-block .hint { margin: 0; font-weight: 400; }

fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.group { display: grid; gap: 9px; }
.group legend { margin-bottom: 8px; padding: 0; }

.opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(146px, 1fr)); gap: 8px; }
.opt { position: relative; display: block; cursor: pointer; }
.opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.opt-body { display: grid; gap: 2px; padding: 11px 13px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--surface); height: 100%;
    transition: border-color .15s, background-color .15s, box-shadow .15s; }
.opt-title { font-weight: 600; font-size: .9375rem; }
.opt-sub { color: var(--muted); font-size: .8125rem; }
.opt:hover .opt-body { border-color: var(--muted); }
.opt input:checked + .opt-body { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.opt input:focus-visible + .opt-body { outline: 2px solid var(--focus); outline-offset: 2px; }

.swatches { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.swatch { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--line-strong); cursor: pointer; padding: 0; position: relative; display: block;
    transition: box-shadow .15s, transform .15s; }
.swatch:hover { box-shadow: 0 0 0 2px var(--muted); transform: scale(1.06); }
.swatch.is-selected { box-shadow: 0 0 0 3px var(--text); }
.swatch:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.sw-0 { background: #197a31; } .sw-1 { background: #0f766e; } .sw-2 { background: #2563eb; } .sw-3 { background: #7c3aed; }
.sw-4 { background: #c026d3; } .sw-5 { background: #dc2626; } .sw-6 { background: #ea580c; } .sw-7 { background: #334155; }
.swatch-custom { background: conic-gradient(#e11d48, #f59e0b, #84cc16, #06b6d4, #6366f1, #e11d48); overflow: hidden; }
.swatch-custom input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.swatch-custom:focus-within { outline: 2px solid var(--focus); outline-offset: 3px; }

/* ───────── Panel, belgi, xabar ───────── */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; }
.panel-title { margin-bottom: 12px; }
.panel > h2 { margin-bottom: 4px; }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; font-size: .75rem; font-weight: 600; line-height: 1.6;
    border-radius: 5px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; vertical-align: middle; }
.badge-accent { background: var(--accent-soft); color: var(--ink); border-color: transparent; }
.badge-ok { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.badge-err { background: var(--err-bg); color: var(--err); border-color: transparent; }
.badge-warn { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.badge-muted { background: var(--surface-2); color: var(--muted); }

.alert { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: var(--r); border: 1px solid transparent; font-size: .9375rem; margin-bottom: 16px; }
.alert-success { background: var(--ok-bg); color: var(--ok); }
.alert-error { background: var(--err-bg); color: var(--err); }
.alert-info { background: var(--accent-soft); color: var(--text); }

/* Bo'sh va xato holatlari */
.empty, .state { text-align: center; padding: 44px 20px; display: grid; gap: 6px; justify-items: center; }
.empty-title, .state-title { font-family: var(--font-display); font-size: 1.0625rem; font-weight: 650; }
.state-ico { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 6px;
    background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.state-ico.is-err { background: var(--err-bg); color: var(--err); border-color: transparent; }
.empty .btn, .state .btn { margin-top: 10px; }

/* Yuklanish namunasi (ro'yxat kelguncha) */
.skeleton { position: relative; overflow: hidden; background: var(--surface-2); border-radius: var(--r-sm); height: 1em; }
.skeleton::after { content: ''; position: absolute; inset: 0; transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--surface) 70%, transparent), transparent);
    animation: sweep 1.3s infinite; }
@keyframes sweep { to { transform: translateX(100%); } }

.dl { margin: 0; display: grid; }
.dl > div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.dl > div:last-child { border-bottom: 0; }
.dl dt { color: var(--muted); font-size: .9375rem; }
.dl dd { margin: 0; font-weight: 600; text-align: right; }

.list-plain { list-style: none; margin: 0 0 12px; padding: 0; }
.list-plain li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.list-plain li:last-child { border-bottom: 0; }

/* ───────── Qidiruv, segment, tablar ───────── */
.search { position: relative; display: flex; align-items: center; flex: 1 1 240px; min-width: 0; }
.search .icon { position: absolute; left: 13px; color: var(--muted); pointer-events: none; }
.search-input { width: 100%; min-height: var(--ctl-h); padding: 0 14px 0 40px; font: inherit; color: var(--text); background: var(--surface);
    border: 1px solid var(--line-strong); border-radius: var(--r); transition: border-color .15s, box-shadow .15s; }
.search-input::placeholder { color: var(--muted); }
.search-input:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.seg { display: inline-flex; flex-wrap: wrap; max-width: 100%; padding: 3px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); gap: 2px; }
.seg-item { padding: 6px 13px; border-radius: calc(var(--r) - 3px); text-decoration: none; color: var(--muted); font-weight: 600; font-size: .875rem; text-align: center; }
.seg-item:hover { color: var(--text); }
.seg-item.is-on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.seg-block { display: flex; }
.seg-block .seg-item { flex: 1; }

.filters { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin-bottom: 16px; }
.filters-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
/* Uzun variant nomlari tanlash maydonini kengaytirib yubormasin */
.filters-row > .select { flex: 1 1 180px; min-width: 0; max-width: 100%; }
.po-filters .select, .filter-grid .select { min-width: 0; max-width: 100%; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.tab { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 0 13px; font: inherit; font-size: .875rem; font-weight: 600;
    color: var(--text-2); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 99px; cursor: pointer;
    transition: border-color .15s, background-color .15s, color .15s; }
.tab:hover { border-color: var(--muted); }
.tab.is-on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.tab-n { font-size: .75rem; opacity: .75; font-variant-numeric: tabular-nums; }

/* ───────── Xizmat belgisi va qatori ───────── */
.chip { flex: none; width: 40px; height: 40px; border-radius: 11px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); display: grid; place-items: center; }
.chip img { width: 100%; height: 100%; object-fit: contain; }
.chip-lg { width: 60px; height: 60px; border-radius: 16px; }
.chip-i { font-family: var(--font-display); font-weight: 700; font-size: .875rem; letter-spacing: .01em; border-color: transparent; }
.chip-lg.chip-i { font-size: 1.1875rem; }
.hue-0 { background: #dff1e4; color: #14602a; } .hue-1 { background: #d9f0ed; color: #0d5f58; }
.hue-2 { background: #dce8fc; color: #1d4bb0; } .hue-3 { background: #e9e0fb; color: #5b2bc0; }
.hue-4 { background: #f6dff9; color: #9a1fa8; } .hue-5 { background: #fbe0e0; color: #b01c1c; }
.hue-6 { background: #fce6d6; color: #b4470b; } .hue-7 { background: #e1e5ea; color: #2c3a4e; }
:root[data-mode="dark"] .hue-0 { background: #1a3a24; color: #8fe0a6; } :root[data-mode="dark"] .hue-1 { background: #163a37; color: #8be0d6; }
:root[data-mode="dark"] .hue-2 { background: #1c2c52; color: #a5c4ff; } :root[data-mode="dark"] .hue-3 { background: #2c2150; color: #c9b4ff; }
:root[data-mode="dark"] .hue-4 { background: #43204a; color: #f1b4f7; } :root[data-mode="dark"] .hue-5 { background: #4a1f1f; color: #ffb0b0; }
:root[data-mode="dark"] .hue-6 { background: #4a2a14; color: #ffc9a0; } :root[data-mode="dark"] .hue-7 { background: #2a3340; color: #c3cedd; }
@media (prefers-color-scheme: dark) {
    :root[data-mode="auto"] .hue-0 { background: #1a3a24; color: #8fe0a6; } :root[data-mode="auto"] .hue-1 { background: #163a37; color: #8be0d6; }
    :root[data-mode="auto"] .hue-2 { background: #1c2c52; color: #a5c4ff; } :root[data-mode="auto"] .hue-3 { background: #2c2150; color: #c9b4ff; }
    :root[data-mode="auto"] .hue-4 { background: #43204a; color: #f1b4f7; } :root[data-mode="auto"] .hue-5 { background: #4a1f1f; color: #ffb0b0; }
    :root[data-mode="auto"] .hue-6 { background: #4a2a14; color: #ffc9a0; } :root[data-mode="auto"] .hue-7 { background: #2a3340; color: #c3cedd; }
}

.list { padding: 0; overflow: hidden; }
.ledger-rows { display: grid; }
.svc { display: flex; align-items: center; gap: 13px; padding: var(--row-y) 18px; text-decoration: none; color: inherit;
    border-bottom: 1px solid var(--line); transition: background-color .14s ease; }
.svc:last-child { border-bottom: 0; }
a.svc:hover { background: var(--accent-soft); }
a.svc:hover .svc-go { opacity: 1; transform: none; }
.svc-main { flex: 1; min-width: 0; display: grid; gap: 1px; }
.svc-name { font-weight: 600; display: flex; flex-wrap: wrap; gap: 3px 8px; align-items: center; }
.svc-sub { color: var(--muted); font-size: .8125rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.svc-meta { flex: none; display: grid; gap: 1px; text-align: right; justify-items: end; }
.svc-time { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: .8125rem; }
.svc-go { flex: none; color: var(--muted); opacity: 0; transform: translateX(-3px); transition: opacity .14s, transform .14s; }
.price { font-family: var(--font-display); font-weight: 700; font-size: 1.0625rem; font-variant-numeric: tabular-nums; white-space: nowrap; letter-spacing: -.02em; }
.price-lg { font-size: 1.875rem; }
.price-sm { font-size: .875rem; }
.price-lock { font-family: var(--font); font-weight: 500; font-size: .8125rem; color: var(--muted); letter-spacing: 0; }
.svc-sample { border: 1px solid var(--line); border-radius: var(--r); }

.pager { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; justify-content: center; margin-top: 20px; }
.pager-n { min-width: 34px; height: 34px; display: grid; place-items: center; border-radius: var(--r-sm); text-decoration: none; color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.pager-n:hover { background: var(--surface-2); }
.pager-n.is-current { background: var(--accent); color: var(--on-accent); }

/* ───────── Jadval ───────── */
.table-wrap { position: relative; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.table th { text-align: left; font-weight: 600; font-size: .75rem; letter-spacing: .02em; text-transform: uppercase; color: var(--muted);
    padding: 11px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: var(--row-y) 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--surface-2); }
.table-panel { padding: 0; overflow: hidden; }
.col-check { width: 42px; padding-right: 0 !important; }
.col-check input { width: 17px; height: 17px; accent-color: var(--accent); }
.col-act { text-align: right; width: 1%; white-space: nowrap; }
.cell-sub { display: block; font-size: .8125rem; }
.cell-svc { display: flex; align-items: center; gap: 11px; color: inherit; text-decoration: none; }
.cell-svc:hover strong { text-decoration: underline; }
.cell-svc .chip { width: 36px; height: 36px; border-radius: 9px; }

/* ───────── Sahifa sarlavhasi ───────── */
.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px 20px; margin-bottom: 22px; }
.page-head .muted { margin-top: 4px; }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); text-decoration: none; font-weight: 550; font-size: .875rem; margin-bottom: 10px; }
.back:hover { color: var(--text); }

/* ───────── Kirish va ro'yxatdan o'tish ───────── */
/* Mijoz: tepada asosiy menyu ko'rinib turadi, forma ixcham kartada */
.auth-page { position: relative; display: grid; justify-items: center; align-content: start;
    padding: clamp(24px, 6vh, 64px) 16px clamp(32px, 8vh, 80px); overflow: hidden; }
.auth-page::before { content: ''; position: absolute; inset: -160px 0 auto 0; height: 420px; pointer-events: none;
    background: radial-gradient(40% 55% at 50% 50%, var(--accent), transparent 70%); opacity: .12; }
.auth-card { position: relative; width: 100%; max-width: 400px; display: grid; gap: 15px; padding: 26px 26px 22px;
    background: var(--surface); border: 1px solid var(--line); border-radius: calc(var(--r-lg) + 2px); box-shadow: var(--shadow-lg); }
.auth-card-wide { max-width: 500px; }
.auth-card-head { display: flex; align-items: center; gap: 12px; }
.auth-card-head h1 { font-size: 1.375rem; line-height: 1.2; }
.auth-card-head .muted { font-size: .875rem; margin-top: 2px; }
.auth-card-ico { flex: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
    background: var(--accent-soft); color: var(--ink); }
.auth-card .form { gap: 13px; }
.opts-compact .opt-body { padding: 9px 12px; }
.auth-box { width: 100%; max-width: 400px; margin: auto; padding: 32px 0; display: grid; gap: 15px; }
.auth-box h1 { font-size: 1.875rem; }
.auth-alt { text-align: center; color: var(--muted); font-size: .9375rem; }
.auth-alt a { font-weight: 600; }
.auth-solo { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 20px; }
.auth-solo > div, .auth-solo .auth-box { max-width: 390px; }
.auth-solo-brand { font-family: var(--font-display); font-weight: 700; font-size: 1.1875rem; text-align: center; display: flex; gap: 8px; justify-content: center; align-items: center; }

.error-page { min-height: 72vh; display: grid; place-items: center; padding: 40px 20px; }
.error-box { text-align: center; display: grid; gap: 10px; justify-items: center; max-width: 440px; }
.error-code { font-family: var(--font-display); font-weight: 700; font-size: clamp(3.5rem, 12vw, 6rem); line-height: 1; letter-spacing: -.04em; color: var(--accent); }

@media (max-width: 640px) {
    .auth-card { padding: 20px 18px 18px; }
    .grid-2 { grid-template-columns: minmax(0, 1fr); }
    .panel { padding: 16px; }
    .svc { padding-left: 14px; padding-right: 14px; gap: 11px; flex-wrap: wrap; row-gap: 7px; }
    .svc-main { flex: 1 1 calc(100% - 52px); }
    .svc-meta { flex: 1 1 100%; display: flex; flex-direction: row-reverse; justify-content: flex-end; align-items: baseline;
        gap: 10px; text-align: left; padding-left: 52px; }
    .svc-go { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ───────── Buyurtma qatori ───────── */
.ord { display: flex; align-items: center; gap: 13px; padding: var(--row-y) 18px; text-decoration: none; color: inherit;
    border-bottom: 1px solid var(--line); transition: background-color .14s ease; }
.ord:last-child { border-bottom: 0; }
.ord:hover { background: var(--accent-soft); }
.ord:hover .svc-go { opacity: 1; transform: none; }
.ord-id { flex: none; font-family: var(--font-display); font-weight: 700; font-size: .8125rem; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 42px; }
.ord-main { flex: 1; min-width: 0; display: grid; gap: 1px; }
.ord-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ord-sub { color: var(--muted); font-size: .8125rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ord-meta { flex: none; display: grid; gap: 3px; justify-items: end; text-align: right; }
.list-flush { margin: 0 -20px -20px; border-top: 1px solid var(--line); }
.list-flush .ord:last-child { border-bottom: 0; }

.badge-lg { padding: 4px 12px; font-size: .8125rem; border-radius: 7px; }
.amt-plus { color: var(--ok); }
.amt-minus { color: var(--text); }
.req { color: var(--err); }
.dd-val { display: inline-flex; align-items: center; gap: 6px; word-break: break-word; }

/* Buyurtma sahifasi */
.order-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
.result-panel { border-color: color-mix(in srgb, var(--ok) 35%, var(--line)); }
.result-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.result-head h2 { display: flex; align-items: center; gap: 7px; color: var(--ok); }
.result { margin: 0; padding: 14px 16px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9375rem; line-height: 1.6;
    white-space: pre-wrap; word-break: break-word; }
.textarea-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .875rem; }
.textarea-sm { min-height: 76px; font-size: .875rem; }
.is-copied { color: var(--ok) !important; border-color: var(--ok) !important; }

/* Buyurtma formasi (mahsulot sahifasi) */
.order-form { gap: 13px; padding-top: 14px; margin-top: 2px; border-top: 1px solid var(--line); }
.buy-bal { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px;
    background: var(--surface-2); border-radius: var(--r); font-size: .9375rem; }
.buy-bal .muted { display: inline-flex; align-items: center; gap: 6px; }
.buy-bal strong { font-variant-numeric: tabular-nums; }

/* Balansni to'ldirish */
.topup-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
.input-amount { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; min-height: 56px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.quick-amounts { display: flex; flex-wrap: wrap; gap: 7px; margin-top: -6px; }
.pay-card { display: grid; gap: 12px; align-content: start; border-color: color-mix(in srgb, var(--accent) 26%, var(--line)); }
.pay-row { display: grid; gap: 3px; }
.pay-label { color: var(--muted); font-size: .8125rem; }
.pay-value { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; letter-spacing: .01em; word-break: break-all; }
.pay-value-sm { font-size: 1rem; }
.pay-note { font-size: .875rem; }
.pay-steps { margin: 0; padding-left: 20px; color: var(--muted); font-size: .875rem; display: grid; gap: 5px; }

/* To'lov arizalari (admin) */
.topup-card { display: grid; gap: 14px; }
.topup-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 10px 20px; }
.topup-head h2 { font-size: 1.125rem; }
.topup-body { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 18px; align-items: start; }
.topup-receipt img { width: 100%; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2); }
.topup-form { margin: 0; }

/* Xizmat maydonlari muharriri */
.fields-list { display: grid; gap: 12px; }
.field-row { display: grid; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2); }
.field-row-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.field-row-grip { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: .75rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.field-row .input, .field-row .select, .field-row .textarea { background: var(--surface); }
.field-row-foot { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px; }
.mini-field { display: grid; gap: 4px; font-size: .8125rem; color: var(--muted); }
.input-mini { width: 92px; min-height: 36px; }
.fields-empty { font-size: .875rem; }

.tabs-wide { margin-bottom: 14px; }
.tabs-wide .tab { text-decoration: none; }
.stat-link { text-decoration: none; color: inherit; transition: border-color .18s, transform .18s, box-shadow .18s; }
.stat-link:hover { border-color: var(--line-strong); transform: translateY(-2px); box-shadow: var(--shadow); }
.stat-value-sm { font-size: 1.25rem; }
.balance-side { position: relative; display: grid; gap: 8px; justify-items: end; text-align: right; }

@media (max-width: 980px) {
    .order-grid, .topup-grid { grid-template-columns: minmax(0, 1fr); }
    .topup-body { grid-template-columns: minmax(0, 1fr); }
    .topup-receipt { max-width: 260px; }
}
@media (max-width: 640px) {
    .list-flush { margin: 0 -16px -16px; }
    .ord { padding-left: 14px; padding-right: 14px; gap: 10px; flex-wrap: wrap; row-gap: 6px; }
    .ord-main { flex: 1 1 calc(100% - 52px); }
    .ord-meta { flex: 1 1 100%; flex-direction: row-reverse; display: flex; justify-content: flex-end; align-items: center;
        gap: 10px; padding-left: 52px; }
    .ord .svc-go { display: none; }
    .balance-side { justify-items: start; text-align: left; }
}

/* ───────── Nuqta belgilari ───────── */
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; flex: none; }
.dot-ok { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 20%, transparent); }
.dot-warn { background: var(--warn); box-shadow: 0 0 0 3px color-mix(in srgb, var(--warn) 20%, transparent); }
.dot-info { background: var(--info); box-shadow: 0 0 0 3px color-mix(in srgb, var(--info) 20%, transparent); }
.dot-err { background: var(--err); box-shadow: 0 0 0 3px color-mix(in srgb, var(--err) 20%, transparent); }
.dot-accent { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.gap-sm { gap: 4px; }
.btn-dark { background: var(--text); color: var(--surface); }
.btn-dark:hover { background: color-mix(in srgb, var(--text) 86%, var(--accent)); }

/* ───────── E'lonlar qatori (tepada) ───────── */
.ticker { display: flex; align-items: center; gap: 10px; min-height: 38px; padding: 0 14px 0 16px;
    background: var(--text); color: var(--surface); overflow: hidden; }
.ticker-tag { display: inline-flex; align-items: center; gap: 6px; flex: none; font-size: .75rem; font-weight: 700;
    letter-spacing: .04em; text-transform: uppercase; opacity: .85; }
.ticker-view { flex: 1; min-width: 0; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent);
    mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent); }
.ticker-track { display: flex; align-items: center; gap: 36px; width: max-content; animation: ticker 46s linear infinite; }
.ticker:hover .ticker-track, .ticker.is-paused .ticker-track { animation-play-state: paused; }
.ticker-item { display: inline-flex; align-items: center; gap: 8px; font-size: .8125rem; white-space: nowrap; }
.ticker-item strong { font-weight: 650; }
.ticker-body { opacity: .78; }
.ticker-link { color: inherit; font-weight: 650; text-decoration: none; border: 1px solid color-mix(in srgb, currentColor 40%, transparent);
    border-radius: 99px; padding: 1px 10px; font-size: .75rem; }
.ticker-link:hover { background: color-mix(in srgb, currentColor 16%, transparent); }
.ticker-stop { flex: none; width: 26px; height: 26px; display: grid; place-items: center; border: 0; border-radius: 50%;
    background: color-mix(in srgb, currentColor 14%, transparent); color: inherit; cursor: pointer; opacity: .8; }
.ticker-stop:hover { opacity: 1; }
.ticker.is-paused .ticker-stop { background: var(--accent); color: var(--on-accent); opacity: 1; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker-track { animation: none; } }

/* ───────── Menyudagi balans va foydalanuvchi ───────── */
.balchip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 99px; text-decoration: none;
    border: 1px solid var(--line); background: var(--surface); color: var(--text); font-weight: 650; font-size: .875rem;
    font-variant-numeric: tabular-nums; white-space: nowrap; }
.balchip .icon { color: var(--ink); }
.balchip:hover { border-color: var(--line-strong); }

.menu { position: relative; }
.menu .userchip { border: 1px solid var(--line); background: var(--surface); cursor: pointer; font: inherit; padding: 3px 10px 3px 3px; gap: 8px; }
.menu .userchip .icon { color: var(--muted); }
.menu.is-open .userchip { border-color: var(--line-strong); }
.menu-pop { position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; min-width: 232px; padding: 6px;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); display: grid; gap: 1px; }
.menu-head { display: grid; gap: 1px; padding: 9px 11px 11px; border-bottom: 1px solid var(--line); margin-bottom: 5px; }
.menu-head strong { font-size: .9375rem; }
.menu-head .muted { font-size: .8125rem; overflow: hidden; text-overflow: ellipsis; }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 38px; padding: 0 11px; border: 0; border-radius: var(--r-sm);
    background: none; color: var(--text); font: inherit; font-size: .9063rem; font-weight: 550; text-align: left; text-decoration: none; cursor: pointer; }
.menu-item .icon { color: var(--muted); }
.menu-item:hover { background: var(--surface-2); }
.menu-item-danger { color: var(--err); }
.menu-item-danger .icon { color: currentColor; }
.menu-item-danger:hover { background: var(--err-bg); }

/* ───────── Kabinet boshqaruvi ───────── */
.dash { display: grid; grid-template-columns: minmax(0, 1fr) clamp(300px, 24%, 460px); gap: 18px; align-items: start; }
.dash-main { display: grid; gap: 18px; min-width: 0; }

.hello { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 20px;
    padding: 26px 28px; border-radius: var(--r-lg); overflow: hidden;
    background: linear-gradient(120deg, var(--surface-2), var(--surface) 65%); border: 1px solid var(--line); }
.hello-copy { display: grid; gap: 12px; min-width: 0; }
.hello-copy h1 { font-size: clamp(1.5rem, 1.1rem + 1.5vw, 2.125rem); line-height: 1.12; }
.hello-wave { display: inline-block; }
.hello-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 2px; }
.hello-art { flex: none; width: 210px; height: 144px; }

.bal { display: grid; gap: 18px; }
.bal-top { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 20px; }
.bal-left { display: grid; gap: 4px; }
.bal-label { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: .875rem; font-weight: 550; }
.bal-value { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.9rem, 1.3rem + 2.2vw, 2.6rem);
    letter-spacing: -.03em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.bal-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.bal-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); margin: 0 -20px -20px; }
.bal-cell { display: grid; gap: 5px; padding: 15px 20px; border-left: 1px solid var(--line); }
.bal-cell:first-child { border-left: 0; }
.bal-cell-label { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: .8125rem; }
.bal-cell-value { font-family: var(--font-display); font-weight: 700; font-size: 1.125rem; font-variant-numeric: tabular-nums; }

.ovw { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.ovw-sub { font-family: var(--font); font-size: .8125rem; font-weight: 400; margin-left: 6px; }
.ovw-item { display: grid; gap: 7px; }
.ovw-label { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: .875rem; font-weight: 550; }
.ovw-n { font-family: var(--font-display); font-weight: 700; font-size: 1.875rem; line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.ovw-n em { font-style: normal; font-size: .875rem; font-weight: 500; color: var(--muted); margin-left: 5px; letter-spacing: 0; }
.meter { display: block; height: 5px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.meter-fill { display: block; height: 100%; border-radius: 99px; }
.meter-ok { background: var(--ok); }
.meter-warn { background: var(--warn); }
.meter-info { background: var(--info); }
.meter-err { background: var(--err); }

.sess { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--line); }
.sess:last-child { border-bottom: 0; }
.sess-ico { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
    background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.sess-main { flex: 1; min-width: 0; display: grid; gap: 1px; }
.sess-name { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; font-weight: 600; font-size: .9375rem; }
.sess-sub { color: var(--muted); font-size: .8125rem; font-variant-numeric: tabular-nums; }
.sess-time { flex: none; font-size: .8125rem; }

.ann { align-self: start; }
.ann-list { list-style: none; margin: 0; padding: 0; display: grid; }
.ann-item { display: flex; gap: 11px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.ann-item:first-child { padding-top: 2px; }
.ann-item:last-child { border-bottom: 0; padding-bottom: 0; }
.ann-item .dot { margin-top: 7px; }
.ann-body { min-width: 0; display: grid; gap: 5px; }
.ann-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 10px; }
.ann-head strong { font-size: .9375rem; }
.ann-time { font-size: .75rem; white-space: nowrap; }
.ann-body p { font-size: .875rem; line-height: 1.5; }
.ann-body .btn { justify-self: start; margin-top: 2px; }
/* E'lonlar ostidagi "yangi va narxi o'zgargan xizmatlar" */
.ann-sub { display: flex; align-items: center; gap: 7px; margin: 18px 0 6px; padding-top: 16px; border-top: 1px solid var(--line);
    font-size: .875rem; font-weight: 650; color: var(--text-2); }
.panel-title + .ann-sub { margin-top: 0; padding-top: 0; border-top: 0; }
.upd-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.upd-line del { font-size: .8125rem; }
.upd-line .icon { color: var(--muted); }

@media (max-width: 980px) {
    .dash { grid-template-columns: minmax(0, 1fr); }
}
/* Profil menyusi endi menyu panelida emas — tor ekranda ham o'ng chekkaga tiralib turadi */
@media (max-width: 420px) {
    .menu-pop { min-width: 0; width: calc(100vw - 32px); max-width: 300px; }
}
@media (max-width: 820px) {
    .ticker-tag span, .ticker-tag { font-size: .6875rem; }
}
@media (max-width: 700px) {
    .hello { flex-direction: column; align-items: flex-start; padding: 22px; }
    .hello-art { width: 170px; height: 116px; align-self: center; }
    .ovw { grid-template-columns: minmax(0, 1fr); gap: 16px; }
    .bal-grid { grid-template-columns: minmax(0, 1fr); }
    .bal-cell { border-left: 0; border-top: 1px solid var(--line); }
    .bal-cell:first-child { border-top: 0; }
    .sess { padding-left: 16px; padding-right: 16px; }
}
@media (max-width: 640px) {
    .bal-grid { margin: 0 -16px -16px; }
}

/* Progress bar kengligi (CSP tufayli inline style ishlatilmaydi) */
.w-0 { width: 0%; }
.w-5 { width: 5%; }
.w-10 { width: 10%; }
.w-15 { width: 15%; }
.w-20 { width: 20%; }
.w-25 { width: 25%; }
.w-30 { width: 30%; }
.w-35 { width: 35%; }
.w-40 { width: 40%; }
.w-45 { width: 45%; }
.w-50 { width: 50%; }
.w-55 { width: 55%; }
.w-60 { width: 60%; }
.w-65 { width: 65%; }
.w-70 { width: 70%; }
.w-75 { width: 75%; }
.w-80 { width: 80%; }
.w-85 { width: 85%; }
.w-90 { width: 90%; }
.w-95 { width: 95%; }
.w-100 { width: 100%; }

/* Admin yon menyusidagi bo'lim sarlavhasi va turga oid yordam */
.side-group.is-current { color: var(--ink); }
.type-hint { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 16px; padding: 11px 14px;
    background: var(--accent-soft); border-radius: var(--r); color: var(--text-2); font-size: .875rem; }
.type-hint .icon { color: var(--ink); margin-top: 1px; }
.type-panel { border-color: color-mix(in srgb, var(--accent) 28%, var(--line)); }
.type-panel > h2 { display: flex; align-items: center; gap: 8px; }
.type-panel > h2 .icon { color: var(--ink); }
.cell-meta { font-size: .8125rem; }
.page-head h1 { display: flex; align-items: center; gap: 10px; }
.page-head h1 .icon { color: var(--ink); }

/* Buyurtma tugmasi: chapda matn, o'ngda summa */
.btn-order { justify-content: space-between; gap: 10px; padding-left: 14px; padding-right: 14px; min-height: 50px; font-size: .9063rem; }
.btn-order-txt { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.btn-order-sum { font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 420px) {
    .btn-order { flex-direction: column; align-items: stretch; gap: 2px; padding-top: 9px; padding-bottom: 9px; text-align: center; }
    .btn-order-txt { justify-content: center; }
}

/* ───────── Xizmat guruhlari ───────── */
.svc-group-h { display: flex; align-items: center; gap: 8px; padding: 9px 18px; background: var(--surface-2);
    border-bottom: 1px solid var(--line); border-top: 1px solid var(--line);
    font-size: .75rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-2); }
.svc-group:first-child .svc-group-h { border-top: 0; }
.svc-group-n { font-weight: 600; letter-spacing: 0; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ───────── Buyurtma berish formasi ───────── */
.order-panel { display: grid; gap: 15px; align-content: start; }
.imei-add { display: flex; gap: 8px; }
.imei-add .input { flex: 1; min-width: 0; }
.imei-count { font-weight: 600; color: var(--ink); }
.imei-count.is-over { color: var(--err); }
.order-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
    margin: 4px -20px -20px; padding: 15px 20px; border-top: 1px solid var(--line); background: var(--surface-2);
    border-radius: 0 0 var(--r-lg) var(--r-lg); }
.order-foot-sum { display: grid; gap: 1px; }
.order-foot-sum .muted { display: inline-flex; align-items: center; gap: 6px; font-size: .8125rem; }
.btn-order-main { min-height: 46px; padding-left: 22px; padding-right: 22px; }
.alert-panel { display: grid; gap: 12px; justify-items: start; }
.alert-panel .alert { margin: 0; }
.svc-card { display: grid; gap: 11px; align-content: start; justify-items: start; }
.svc-card h2 { font-size: 1.125rem; }
.svc-card-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.seg-types { margin-bottom: 16px; }
.seg-types .seg-item { display: inline-flex; align-items: center; gap: 7px; }
.balchip-lg { min-height: 38px; font-size: .9375rem; }
.nav-cta { flex: none; }

/* ───────── Kengaytirilgan filtr paneli ───────── */
.filter-panel { display: grid; gap: 12px; margin-bottom: 18px; padding: 16px 18px; }
.filter-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.filter-grid .search { flex: none; }
.filter-grid .select, .filter-grid .input { min-height: 40px; }
.field-inline { display: flex; align-items: center; gap: 8px; min-width: 0; }
.field-inline > span { flex: none; color: var(--muted); font-size: .8125rem; }
.filter-panel .form-actions { margin: 0; }

.table-orders .cell-input { font-variant-numeric: tabular-nums; font-size: .875rem; word-break: break-all; max-width: 200px; }
.table-orders .cell-result { font-size: .8125rem; color: var(--text-2); max-width: 340px; }

/* ───────── Bo'lim ichidagi tablar ───────── */
.subtabs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 18px; padding: 4px; background: var(--surface-2);
    border: 1px solid var(--line); border-radius: var(--r); width: fit-content; max-width: 100%; }
.subtab { padding: 7px 15px; border-radius: calc(var(--r) - 4px); text-decoration: none; color: var(--muted);
    font-weight: 600; font-size: .875rem; white-space: nowrap; }
.subtab:hover { color: var(--text); }
.subtab.is-on { background: var(--text); color: var(--surface); }

@media (max-width: 900px) {
    .filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Tor ekranda jadval qatorlari kartaga aylanadi (.table-cards) */
@media (max-width: 700px) {
    .table-cards, .table-cards tbody, .table-cards tr, .table-cards td { display: block; width: auto; }
    .table-cards thead { display: none; }
    .table-cards tr { position: relative; padding: 13px 16px; border-bottom: 1px solid var(--line); }
    .table-cards tbody tr:last-child { border-bottom: 0; }
    .table-cards td { padding: 0; border: 0; max-width: none; white-space: normal; text-align: left; }
    .table-cards td + td { margin-top: 6px; }
    .table-cards td[data-label]::before { content: attr(data-label); display: inline-block; min-width: 76px;
        margin-right: 8px; color: var(--muted); font-size: .8125rem; font-weight: 600; }
    .table-cards td.cell-go { position: absolute; top: 10px; right: 10px; margin: 0; }
    .table-cards .cell-input, .table-cards .cell-result { font-size: .875rem; }
}

@media (max-width: 640px) {
    /* Telefonda filtrlar ixchamroq joylashadi */
    .filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .filter-grid > .search, .filter-grid > input[type="text"] { grid-column: 1 / -1; }
    .field-inline { flex-direction: column; align-items: stretch; gap: 3px; }
    .field-inline > span { font-size: .75rem; font-weight: 600; }
    .order-foot { margin-left: -16px; margin-right: -16px; margin-bottom: -16px; padding: 14px 16px; }
    .btn-order-main { width: 100%; }
    .svc-group-h { padding-left: 14px; padding-right: 14px; }
    .table-orders .cell-result, .table-orders .cell-input { max-width: 220px; }
}
.hint-link { margin: 0; padding: 12px 14px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); }

/* ───────── Buyurtma berish: ko'rinish almashtirgich ───────── */
.viewtog { display: inline-flex; gap: 4px; padding: 3px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); }
.viewtog-btn { display: grid; place-items: center; width: 36px; height: 32px; border-radius: calc(var(--r) - 4px);
    color: var(--muted); text-decoration: none; }
.viewtog-btn:hover { color: var(--text); }
.viewtog-btn.is-on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

/* ───────── Buyurtma berish: filtrlar ───────── */
.po-filters { display: grid; gap: 14px; padding: 16px 18px; margin-bottom: 18px; }
.po-filter-grid { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 14px; }
.po-search-row { display: flex; flex-wrap: wrap; gap: 10px; }
.po-search-row .search { flex: 1 1 260px; }
.po-search-row .btn { min-height: var(--ctl-h); }

/* ───────── Buyurtma berish: kartalar ───────── */
.po-group { padding: 0; overflow: hidden; margin-bottom: 18px; }
.po-group-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; margin: 0; padding: 13px 18px;
    border-bottom: 1px solid var(--line); background: var(--surface-2); font-weight: 650; }
.po-group-n { font-size: .8125rem; font-weight: 500; color: var(--muted); }
.po-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; padding: 16px 18px; }
.po-card { display: flex; align-items: flex-start; gap: 12px; padding: 13px 14px; text-decoration: none; color: var(--text);
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); min-width: 0;
    transition: border-color .15s, box-shadow .15s, transform .15s; }
.po-card:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.po-card.is-on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.po-card .chip { flex: none; }
.po-card-body { display: grid; gap: 7px; min-width: 0; }
.po-card-name { font-weight: 600; font-size: .9375rem; line-height: 1.35; color: var(--ink); }
.po-card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; font-size: .8125rem; }
.po-price { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: var(--r-sm);
    background: var(--accent); color: var(--on-accent); font-weight: 650; font-variant-numeric: tabular-nums; }
.po-card-type { text-transform: uppercase; letter-spacing: .04em; font-size: .6875rem; font-weight: 650; }
.po-list .svc.is-on { background: var(--accent-soft); }

/* ───────── Modal oyna ───────── */
.modal { position: fixed; inset: 0; z-index: 90; display: none; align-items: center; justify-content: center; padding: 20px; }
.modal.is-open { display: flex; }
.modal-back { position: absolute; inset: 0; background: rgba(15, 23, 32, .55); backdrop-filter: blur(2px); }
.modal-box { position: relative; display: flex; flex-direction: column; width: 100%; max-width: 1040px; max-height: calc(100dvh - 40px);
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); overflow: hidden; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 15px 18px;
    border-bottom: 1px solid var(--line); }
.modal-title { margin: 0; font-size: 1.0625rem; font-weight: 650; }
.modal-x { flex: none; }
.modal-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .85fr); min-height: 0; overflow: hidden; }
.modal-form { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--line); }
.modal-fields { display: grid; gap: 15px; align-content: start; padding: 18px; overflow-y: auto; }
.modal-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
    padding: 14px 18px; border-top: 1px solid var(--line); background: var(--surface-2); }
.modal-side { display: grid; gap: 11px; justify-items: center; align-content: start; text-align: center;
    padding: 24px 20px; background: var(--surface-2); overflow-y: auto; }
.modal-side-name { margin: 0; font-size: 1.0625rem; font-weight: 650; text-transform: uppercase; letter-spacing: .01em; line-height: 1.35; }
.modal-side-desc { max-width: 40ch; }
.modal-side .facts { width: 100%; text-align: left; }
.modal-open { overflow: hidden; }

@media (max-width: 860px) {
    .po-filter-grid { grid-template-columns: minmax(0, 1fr); }
    /* Telefonda oyna butun ekranni egallaydi va oddiy sahifa kabi aylanadi */
    .modal { padding: 0; align-items: flex-start; overflow-y: auto; -webkit-overflow-scrolling: touch; }
    .modal-box { display: block; max-width: none; max-height: none; min-height: 100dvh; border: 0; border-radius: 0; overflow: visible; }
    .modal-head { position: sticky; top: 0; z-index: 2; background: var(--surface); }
    .modal-grid { display: block; overflow: visible; }
    .modal-form { display: block; border-right: 0; }
    .modal-fields { overflow: visible; padding: 16px; }
    .modal-foot { position: sticky; bottom: 0; z-index: 2; }
    .modal-side { padding: 18px 16px 28px; border-top: 1px solid var(--line); overflow: visible; }
    .modal-side .chip-lg { display: none; }
    .modal-side-name { font-size: .9375rem; }
}
@media (max-width: 560px) {
    .po-cards { grid-template-columns: minmax(0, 1fr); padding: 14px; }
    .po-group-h { padding-left: 14px; padding-right: 14px; }
    .btn-order-main { width: 100%; }
}
.po-card.is-loading, .svc.is-loading { opacity: .6; pointer-events: none; }

/* Xizmatlar katalogi: har qatorda "Buyurtma berish" tugmasi */
.cat-list .svc-meta { min-width: 120px; }
.svc-btn { flex: none; pointer-events: none; }
a.svc-order:hover .svc-btn { background: var(--accent-strong); box-shadow: var(--shadow); }
.cat-cur { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: .875rem; }
@media (max-width: 640px) {
    .cat-list .svc-meta { min-width: 0; }
    .svc-btn { flex: 1 1 100%; justify-content: center; }
}

/* Mehmon uchun buyurtma oynasi: nimalar so'ralishi */
.guest-ask { display: grid; gap: 6px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2); }
.guest-ask .label { margin: 0; }
.guest-ask .list-plain { margin: 0; }
.guest-ask li { display: flex; justify-content: flex-start; align-items: center; gap: 7px; padding: 4px 0; border-bottom: 0; font-size: .9063rem; }
.guest-ask li .icon { color: var(--ok); }

/* Buyurtma oynasida xizmatning to'liq tavsifi */
.modal-side-more { width: 100%; text-align: left; }
.modal-side-more summary { cursor: pointer; color: var(--ink); font-weight: 600; font-size: .875rem; text-align: center; }
.modal-side-more .prose { margin-top: 8px; font-size: .875rem; }

/* Mijoz: buyurtmani ko'rish oynasi */
.modal-view .modal-box { max-width: 560px; }
.ov-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px;
    padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.ov-name { margin: 0; font-weight: 650; font-size: 1rem; line-height: 1.4; min-width: 0; }
.ov-grid { margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ov-grid > div, .ov-times > div { padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2); }
.ov-grid dt, .ov-times dt, .ov-label { color: var(--muted); font-size: .75rem; font-weight: 600; }
.ov-grid dd, .ov-times dd { margin: 3px 0 0; font-weight: 600; font-size: .9063rem; font-variant-numeric: tabular-nums; }
.ov-code { display: grid; gap: 8px; }
.ov-code-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ov-values { margin: 0; }
.ov-times { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.ov-more { justify-self: start; }
@media (max-width: 860px) {
    .modal-view { padding: 16px; align-items: center; }
    .modal-view .modal-box { min-height: 0; border: 1px solid var(--line); border-radius: var(--r-lg); }
}
@media (max-width: 420px) {
    .ov-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

/* Kichik oyna (mehmon uchun kirish) */
.modal-sm .modal-box { max-width: 420px; }
.modal-body { display: grid; gap: 14px; padding: 18px; overflow-y: auto; }
.login-modal-svc { margin: 0; padding: 10px 12px; border-radius: var(--r); background: var(--accent-soft); color: var(--ink); font-weight: 600; font-size: .875rem; }
@media (max-width: 900px) {
    .modal-sm { padding: 16px; align-items: center; }
    .modal-sm .modal-box { min-height: 0; border: 1px solid var(--line); border-radius: var(--r-lg); }
}

/* Bir ustunli grid konteynerlar tarkibidan kengaymasin (tor ekranda gorizontal siljish bo'lmaydi) */
.stack-lg, .form, .form-panel, .filters, .po-filters, .modal-fields,
.order-panel, .svc-card, .dash-main, .design-fields, .preview { grid-template-columns: minmax(0, 1fr); }

/* ───────── Menyudagi qo'shimcha tugmalar ───────── */
.btn-accent2 { background: var(--accent2); color: var(--on-accent2); border-color: transparent; }
.btn-accent2:hover { background: var(--accent2-strong); color: var(--on-accent2); }
.btn-outline-bar { background: transparent; color: var(--bar-fg); border-color: var(--bar-line); }
.btn-outline-bar:hover { background: var(--bar-soft); color: var(--bar-fg); border-color: var(--bar-fg); }
