/* "B" dizayni (rahbar tanlovi, 2026-10-28): to'q ko'k qorong'i dashboard, ko'k urg'u, bo'limlarning rangli belgilari.
   Ikki rejim: kunduzgi (yorug') va kechki (qorong'i) — menyudagi tugma bilan almashtiriladi. */
/* Manrope (SIL OFL 1.1, public/fonts/OFL.txt) — ERP ichida, tashqi saytga murojaatsiz. O'zgaruvchan vazn 400–800. */
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 400 800; font-display: swap; src: url(/fonts/manrope-cyrillic-ext.woff2) format("woff2"); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 400 800; font-display: swap; src: url(/fonts/manrope-cyrillic.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 400 800; font-display: swap; src: url(/fonts/manrope-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 400 800; font-display: swap; src: url(/fonts/manrope-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --bg: #f4f6fb;
  --surface: #ffffff;
  --surface-2: #f6f8fc;
  --border: #e3e8f0;
  --border-strong: #cfd7e3;
  --text: #111a2e;
  --text-2: #55627a;
  --text-3: #8692a8;
  --brand: #2563eb;
  --brand-2: #1d4ed8;
  --brand-soft: #e8f0fe;
  --on-brand: #ffffff;
  --sidebar: #0e1626;
  --sidebar-text: #9aa7bf;
  --sidebar-line: rgba(255, 255, 255, .08);
  --green: #16a34a; --green-soft: #dcfce7; --green-text: #166534;
  --yellow: #eab308; --yellow-soft: #fef9c3; --yellow-text: #854d0e;
  --red: #dc2626; --red-soft: #fee2e2; --red-text: #991b1b;
  /* Grafik ranglari (Server holati, 2026-11-01): kategoriyali tartib — 1 ko'k, 2 to'q sariq, 3 zangori-yashil, 4 sariq; oq va to'q fonga tekshirilgan */
  --viz-1: #2a78d6; --viz-2: #eb6834; --viz-3: #1baf7a; --viz-4: #eda100;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .07);
  --shadow-lg: 0 20px 40px -12px rgba(16, 24, 40, .3);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0b1120; --surface: #141c2e; --surface-2: #1a2438; --border: #222e45; --border-strong: #2c3a55;
  --text: #e6ebf5; --text-2: #9aa7bf; --text-3: #6b7894; --brand: #3b82f6; --brand-2: #60a5fa; --brand-soft: #172a4d;
  --on-brand: #ffffff;
  --sidebar: #0e1626;
  --green-soft: #12301c; --green-text: #86efac; --yellow-soft: #352b0b; --yellow-text: #fde047; --red-soft: #3a1414; --red-text: #fca5a5;
  --viz-1: #3987e5; --viz-2: #d95926; --viz-3: #199e70; --viz-4: #c98500;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--bg); color: var(--text); font: 14px/1.5 "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
.boot { display: grid; place-items: center; min-height: 100vh; color: var(--text-3); }
.icon { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.muted { color: var(--text-3); }

/* ---------- layout ---------- */
.layout { display: grid; grid-template-columns: calc(248px * var(--zoom, 1)) 1fr; min-height: 100vh; }
.sidebar { background: var(--sidebar); color: var(--sidebar-text); padding: 16px 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 20px; color: #fff; font-weight: 700; font-size: 16px; }
.brand-logo { width: 34px; height: 34px; border-radius: 11px; background: linear-gradient(135deg, #3b82f6, #6366f1); color: #fff; display: grid; place-items: center; font-weight: 800; }
.brand small { display: block; font-weight: 400; font-size: 11px; color: var(--sidebar-text); }
.nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; color: var(--sidebar-text); margin-bottom: 2px; }
.nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav a.active { background: rgba(59, 130, 246, .16); color: #fff; }
.nav a.active .icon { color: #60a5fa; }
/* Bo'lim ranglari: menyudagi va vidjetlardagi rangli belgi (yangi bo'lim — kulrang, rang shu yerda qo'shiladi) */
[data-key="marketing"], [data-sec="marketing"] { --tile: #ec4899; }
[data-key="sotuv"], [data-sec="sotuv"] { --tile: #22c55e; }
[data-key="saudiya"], [data-sec="saudiya"] { --tile: #8b5cf6; }
[data-key="moliya"], [data-sec="moliya"] { --tile: #f59e0b; }
[data-key="hr"], [data-sec="hr"] { --tile: #06b6d4; }
[data-key="texnik"], [data-sec="texnik"] { --tile: #f43f5e; }
[data-key="server"], [data-sec="server"] { --tile: #6366f1; }
.sidebar nav.nav > a .icon, .sidebar nav.nav > a.active .icon,
.sidebar .nav-sec-row > a .icon, .sidebar .nav-sec-row > a.active .icon { width: 16px; height: 16px; padding: 6px; box-sizing: content-box; border-radius: 8px; background: var(--tile, #475569); color: #fff; }
.nav a .label { flex: 1; }
.nav a .nav-n { font-size: 11px; font-weight: 600; opacity: .7; }
/* Yon panel: bo'lim ostidagi bo'limchalar ro'yxati (2026-10-29) — bir vaqtda bitta bo'lim ochiq */
.nav-sec-row { display: flex; align-items: center; gap: 2px; margin-bottom: 2px; }
.nav-sec-row > a { flex: 1; min-width: 0; margin-bottom: 0; }
.nav-caret { flex: none; width: 26px; height: 26px; display: grid; place-items: center; border: 0; border-radius: 7px; background: none; color: var(--sidebar-text); cursor: pointer; }
.nav-caret:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav-caret .icon { width: 14px; height: 14px; transition: transform .15s; }
.nav-sec.open .nav-caret .icon { transform: rotate(180deg); }
.nav-subs { display: none; margin: 0 0 8px 23px; padding-left: 9px; border-left: 1px solid var(--sidebar-line); }
.nav-sec.open .nav-subs { display: block; }
.nav .nav-subs a { gap: 8px; padding: 5px 8px; margin-bottom: 1px; border-radius: 7px; font-size: 12.5px; line-height: 1.3; }
.nav .nav-subs a .dot { width: 7px; height: 7px; box-shadow: none; }
.nav .nav-subs a.planned { opacity: .55; }
.nav .nav-subs a.planned:hover, .nav .nav-subs a.planned.active { opacity: 1; }
/* Guruhlar ichma-ich (2026-10-30): guruh bosilsa — bo'limchalari tagida ochiladi, qayta bosilsa yopiladi; telefondagi chap panelda ham */
.grp-btn { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: none; font: inherit; text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.grp-btn .label { flex: 1; min-width: 0; }
.grp-btn .icon { flex: none; width: 13px; height: 13px; transform: rotate(-90deg); transition: transform .15s; }
.grp.open > .grp-btn .icon { transform: none; }
.grp-btn .grp-n { font-size: 11px; font-weight: 600; opacity: .7; }
.grp-btn .dot { width: 7px; height: 7px; box-shadow: none; }
.grp-items { display: none; }
.grp.open > .grp-items { display: block; }
.nav .grp-btn { padding: 7px 8px; margin-bottom: 1px; border-radius: 7px; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-3); }
.nav .grp-btn:hover, .nav .grp.open > .grp-btn { background: rgba(255,255,255,.05); color: #fff; }
.nav .grp-items { margin: 0 0 6px 13px; padding-left: 8px; border-left: 1px solid var(--sidebar-line); }
/* Bloklari bor bo'limcha (2026-10-30): o'zi ham ochilib-yopiladi, tagida bloklari — har biri alohida oyna */
.nav .grp.sub-fold > .grp-btn { padding: 5px 8px; font-size: 12.5px; font-weight: 400; letter-spacing: 0; text-transform: none; line-height: 1.3; color: var(--sidebar-text); }
.nav .grp.sub-fold > .grp-btn .icon { width: 12px; height: 12px; }
.nav .grp.sub-fold > .grp-items { margin: 0 0 4px 12px; }
.nav-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--sidebar-line); }
/* Shrift o'lchami (2026-10-31): Sozlamalar → Ko'rinish, --zoom app.js da (applyFontSize). Hammasi birga kattalashadi;
   100vh li yoki pastki panelga bog'langan qutilar (sidebar, bottom-nav) emas, ularning ichi kattalashadi. */
.content, .sidebar > *, .topbar, .modal, .sheet > *, #toasts { zoom: var(--zoom, 1); }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 16px 18px; }
.set-row .t { font-weight: 600; margin-bottom: 2px; }
.set-row + .set-row { border-top: 1px solid var(--border); }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: none; align-items: center; gap: 10px; padding: 10px 16px; background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 5; }
.content { padding: 24px 28px 56px; width: 100%; max-width: 1400px; }

/* ---------- holat chirog'i ---------- */
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--text-3); }
.dot.green { background: var(--green); box-shadow: 0 0 0 3px rgba(22, 163, 74, .2); }
.dot.yellow { background: var(--yellow); box-shadow: 0 0 0 3px rgba(234, 179, 8, .25); }
.dot.red { background: var(--red); box-shadow: 0 0 0 3px rgba(220, 38, 38, .25); animation: blink 1.4s infinite; }
@keyframes blink { 50% { opacity: .35; } }
.status-pill { display: inline-flex; align-items: center; gap: 9px; padding: 7px 14px 7px 12px; border-radius: 999px; font-weight: 600; font-size: 13px; border: 1px solid transparent; cursor: pointer; background: none; }
.status-pill.green { background: var(--green-soft); color: var(--green-text); }
.status-pill.yellow { background: var(--yellow-soft); color: var(--yellow-text); }
.status-pill.red { background: var(--red-soft); color: var(--red-text); }

/* ---------- sahifa ---------- */
.page-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: 24px; line-height: 1.25; }
.page-head .sub { color: var(--text-2); margin-top: 3px; }
.page-head .right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 18px; overflow-x: auto; }
.tabs a { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; color: var(--text-2); border-bottom: 2px solid transparent; white-space: nowrap; font-weight: 500; }
.tabs a.active { color: var(--brand); border-bottom-color: var(--brand); }
.tabs .dot { width: 8px; height: 8px; box-shadow: none; }

.empty-state { padding: 48px 24px; text-align: center; }
.empty-state .big { width: 56px; height: 56px; border-radius: 16px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; margin: 0 auto 14px; }
.empty-state .big .icon { width: 28px; height: 28px; }
.empty-state h2 { margin: 0 0 6px; font-size: 18px; }
.empty-state p { margin: 0 auto; max-width: 520px; color: var(--text-2); }

/* ---------- vidjetlar ---------- */
.widgets { display: grid; grid-template-columns: repeat(12, 1fr); gap: 14px; }
.widget { grid-column: span 3; padding: 16px; min-height: 110px; display: flex; flex-direction: column; }
.widget.md { grid-column: span 6; }
.widget.lg { grid-column: span 12; }
.widget-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; color: var(--text-2); font-size: 13px; font-weight: 600; }
.w-tile { width: 28px; height: 28px; flex: none; border-radius: 8px; display: grid; place-items: center; background: var(--tile, var(--brand)); color: #fff; }
.w-tile .icon { width: 15px; height: 15px; }
.widget-head .from { margin-left: auto; font-weight: 400; color: var(--text-3); font-size: 12px; }
.widget .stat-value { font-size: 28px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.widget .stat-hint { color: var(--text-3); font-size: 12px; margin-top: 2px; }
.widget.error { border-color: var(--red); }
.widget .err { color: var(--red-text); background: var(--red-soft); padding: 8px 10px; border-radius: 8px; font-size: 13px; }
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li { display: flex; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--border); }
.widget li:last-child { border-bottom: none; }
.widget li .v { margin-left: auto; font-weight: 600; }

table.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 8px 10px; border-bottom: 1px solid var(--border); text-align: left; }
.table th { font-size: 12px; color: var(--text-2); background: var(--surface-2); font-weight: 600; }
.table-wrap { overflow-x: auto; }

/* ---------- tizim holati ---------- */
.status-list { display: flex; flex-direction: column; }
.status-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.status-row:last-child { border-bottom: none; }
.status-row .dot { margin-top: 6px; }
.status-row .t { font-weight: 600; }
.status-row .r { color: var(--text-2); font-size: 13px; }
.presence { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); margin: 2px 0; }
.presence .dot { margin-top: 0; width: 8px; height: 8px; }
.presence.on { color: var(--green); font-weight: 600; }
.users-off { margin-top: 12px; }
/* Operator oyligi va KPI (sotuv/kpi) */
.kpi-total { font-size: 30px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; margin-top: 8px; }
.kpi-cells { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin: 12px 0; }
.kpi-cell { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; }
.kpi-cell-v { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.kpi-sum { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; color: var(--text-2); font-size: 13px; }
.users-off > summary { padding: 12px 16px; cursor: pointer; color: var(--text-2); font-weight: 600; }
.users-off[open] > summary { border-bottom: 1px solid var(--border); }
.section-title { font-size: 15px; margin: 26px 0 10px; }

/* ---------- forma, tugma, modal ---------- */
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border-strong); background: var(--surface); padding: 7px 14px; border-radius: 8px; cursor: pointer; font-weight: 500; white-space: nowrap; }
.btn:hover { background: var(--surface-2); }
.btn:disabled { opacity: .55; cursor: default; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.btn-primary:hover { background: var(--brand-2); }
.btn-ghost { border-color: transparent; background: transparent; }
.input { width: 100%; padding: 8px 10px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); outline: none; }
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; }
.field .help { font-size: 12px; color: var(--text-3); margin-top: 3px; }

.modal-back { position: fixed; inset: 0; background: rgba(10, 20, 25, .45); display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px; z-index: 50; overflow-y: auto; }
.modal { width: 100%; max-width: 560px; background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-lg); }
.modal-head { display: flex; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-head h3 { margin: 0; font-size: 17px; flex: 1; }
.modal-body { padding: 8px 4px; }

#toasts { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 100; }
.toast { background: #16212a; color: #fff; padding: 10px 14px; border-radius: 8px; box-shadow: var(--shadow-lg); max-width: 380px; }
.toast.error { background: #991b1b; }
.toast.ok { background: #166534; }

.error-card { padding: 28px; text-align: center; }
.error-card h2 { margin: 0 0 6px; color: var(--red-text); }
.skeleton { height: 110px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }

@media (max-width: 1100px) { .widget { grid-column: span 6; } }
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: min(calc(264px * var(--zoom, 1)), 88vw); z-index: 40; transform: translateX(-100%); transition: transform .2s; }
  .layout.nav-open .sidebar { transform: none; }
  .layout.nav-open::after { content: ""; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 30; }
  .topbar { display: flex; }
  .content { padding: 16px 16px 40px; }
  .widget, .widget.md { grid-column: span 12; }
}

/* ---------- guruhlar va bo'limcha kartochkalari ---------- */
.crumbs { font-size: 13px; color: var(--text-3); margin-bottom: 4px; }
.crumbs a { color: var(--text-2); }
.sub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.sub-card { padding: 14px 16px; color: var(--text); display: flex; flex-direction: column; gap: 8px; transition: border-color .15s; }
.sub-card:hover { border-color: var(--brand); text-decoration: none; }
.sub-card .t { font-weight: 600; line-height: 1.35; }
.sub-card-top { display: flex; align-items: center; gap: 8px; }
.sub-card-n { margin-left: auto; font-size: 11px; font-weight: 600; color: var(--text-3); }
.tag { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); }
.plan-list { text-align: left; max-width: 560px; margin: 14px auto 0; color: var(--text-2); padding-left: 20px; }
.plan-list li { margin: 4px 0; }

/* ---------- bilim bazasi, agentlar, tasdiqlash ---------- */
.modal.wide { max-width: 880px; }
.pad { padding: 14px 16px; }
textarea.input { resize: vertical; min-height: 90px; font-family: inherit; line-height: 1.5; }
textarea.input.tall { min-height: 320px; }
textarea.input.mono { font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
select.input { width: auto; min-width: 160px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.grow { flex: 1; }
.kb-layout { display: grid; grid-template-columns: 260px 1fr; gap: 16px; align-items: start; }
.kb-cats a { display: flex; justify-content: space-between; gap: 8px; padding: 9px 14px; color: var(--text); border-bottom: 1px solid var(--border); }
.kb-cats a:last-child { border-bottom: none; }
.kb-cats a.active { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.kb-cats .n { color: var(--text-3); font-size: 12px; }
.list-row { display: flex; gap: 12px; align-items: center; padding: 11px 16px; border-bottom: 1px solid var(--border); cursor: pointer; }
.list-row:last-child { border-bottom: none; }
.list-row:hover { background: var(--surface-2); }
.list-row .t { font-weight: 600; }
.list-row .s { color: var(--text-3); font-size: 12px; }
.badge { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.badge.green { background: var(--green-soft); color: var(--green-text); }
.badge.yellow { background: var(--yellow-soft); color: var(--yellow-text); }
.badge.red { background: var(--red-soft); color: var(--red-text); }
.badge.gray { background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); }
.note { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; color: var(--text-2); font-size: 13px; }
.approved-box { white-space: pre-wrap; max-height: 200px; overflow: auto; }
.agent-card { padding: 16px; margin-bottom: 14px; }
.agent-card h3 { margin: 0; font-size: 16px; }
.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin: 14px 0; }
.kv label { display: block; font-size: 12px; color: var(--text-3); margin-bottom: 4px; }
/* Paketlar ro'yxati (SEO va sayt): sarlavhada nom, narx, chegirma va ogohlantirish, bosilganda tarkib ochiladi */
.pkg-row { margin-bottom: 10px; }
.pkg-row > summary { display: flex; align-items: center; gap: 10px; cursor: pointer; list-style: none; }
.pkg-row > summary::-webkit-details-marker { display: none; }
.pkg-row > summary .pkg-main { min-width: 0; }
.pkg-row > summary .pkg-warn { font-size: 12px; color: var(--yellow-text); margin-top: 3px; }
.pkg-row > summary .pkg-cost { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.pkg-row > summary .price { font-weight: 700; color: var(--brand); white-space: nowrap; }
.pkg-row > summary .discount { font-size: 12px; font-weight: 600; color: var(--green-text); white-space: nowrap; margin-top: 3px; }
.pkg-row > summary svg { flex: none; color: var(--text-3); transition: transform .15s; }
.pkg-row[open] > summary svg { transform: rotate(180deg); }
.pkg-row label { display: block; font-size: 12px; color: var(--text-3); margin-bottom: 4px; }
.pkg-row ul { margin: 0; padding-left: 18px; }
.pkg-row li { margin: 2px 0; }
.tools-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.transcript > div { padding: 10px 0; border-bottom: 1px solid var(--border); }
.transcript pre, pre.json { white-space: pre-wrap; word-break: break-word; background: var(--surface-2); padding: 8px 10px; border-radius: 6px; font-size: 12px; margin: 6px 0 0; max-height: 260px; overflow: auto; }
.nav .count { background: var(--red); color: #fff; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; }
@media (max-width: 900px) { .kb-layout { grid-template-columns: 1fr; } }

.tabs { scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }

/* ---------- telefon: pastki menyu va bo'limchalar paneli (2026-10-28; 2026-10-30 dan panel chap tomondan chiqadi) ---------- */
.bottom-nav, .sheet, .sheet-back { display: none; }
@keyframes sheet-left { from { transform: translateX(-24px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (max-width: 900px) {
  .layout.has-bottom-nav .content { padding-bottom: calc(100px + env(safe-area-inset-bottom)); }
  /* ☰ menyu — tizim va profil: pastki panel/yuqori tugmadagi bo'limlar takrorlanmaydi (2026-10-29) */
  .sidebar .nav > .in-bar { display: none; }
  .nav-foot { margin-top: 0; }
  .top-quick { margin-left: auto; display: flex; gap: 12px; padding-right: 2px; }
  .top-quick a { position: relative; width: 36px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--tile, var(--brand)); color: #fff; opacity: .8; transition: opacity .15s, box-shadow .15s; -webkit-tap-highlight-color: transparent; }
  .top-quick a .icon { width: 17px; height: 17px; }
  .top-quick a .dot { position: absolute; top: -4px; right: -4px; width: 12px; height: 12px; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .35); }
  .top-quick a.active { opacity: 1; box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--tile, var(--brand)); }
  .bottom-nav { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 35; background: var(--surface); border-top: 1px solid var(--border); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); box-shadow: 0 -6px 20px rgba(0, 0, 0, .18); }
  .bn-item { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 4px 2px; border: 0; background: none; color: var(--text-2); font-size: 11px; font-weight: 600; cursor: pointer; -webkit-tap-highlight-color: transparent; }
  .bn-ico { position: relative; width: 38px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: var(--tile, var(--brand)); color: #fff; opacity: .78; transition: opacity .15s, box-shadow .15s; }
  .bn-ico .icon { width: 17px; height: 17px; }
  .bn-ico .dot { position: absolute; top: -3px; right: -3px; width: 10px; height: 10px; border: 2px solid var(--surface); box-shadow: none; animation: none; }
  .bn-lbl { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .bn-item.active .bn-ico, .bn-item.open .bn-ico { opacity: 1; box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--tile, var(--brand)); }
  .bn-item.active .bn-lbl, .bn-item.open .bn-lbl { color: var(--text); }
  .sheet-back:not([hidden]) { display: block; position: fixed; inset: 0; z-index: 33; background: rgba(4, 8, 18, .55); }
  /* Chap panel: pastki menyu ustida, ekran tepasidan; pastki menyu ko'rinib turadi (boshqa bo'limga darrov o'tish uchun) */
  .sheet:not([hidden]) { display: block; position: fixed; left: 0; top: 0; bottom: calc(70px + env(safe-area-inset-bottom)); z-index: 34; width: min(340px, 86vw); overflow-y: auto; background: var(--surface); border: 1px solid var(--border); border-left: 0; border-radius: 0 18px 18px 0; box-shadow: var(--shadow-lg); padding: env(safe-area-inset-top) 0 8px; animation: sheet-left .18s ease-out; }
  .sheet-head { display: flex; align-items: center; gap: 10px; padding: 10px 8px 10px 14px; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 1; background: var(--surface); }
  .sheet-head strong { font-size: 16px; }
  .sheet-head .btn { margin-left: auto; padding: 6px; }
  .sh-tree { padding-top: 4px; }
  .sh-tree .grp-btn { padding: 13px 16px; color: var(--text); font-size: 14px; font-weight: 700; }
  .sh-tree .grp-btn:active { background: var(--surface-2); }
  .sh-tree .grp.open > .grp-btn { color: var(--brand); }
  .sh-tree .grp-items { margin: 0 0 6px 22px; border-left: 1px solid var(--border); }
  .sh-tree .grp-items .sh-row { padding-left: 14px; }
  .sh-tree .grp.sub-fold > .grp-btn { padding: 11px 16px 11px 14px; font-size: 14px; font-weight: 400; }
  .sh-tree .grp.sub-fold.open > .grp-btn { font-weight: 600; }
  .sh-tree .grp.sub-fold > .grp-items { margin-left: 20px; }
  .sh-row.sh-page { padding-top: 10px; padding-bottom: 10px; font-size: 13.5px; color: var(--text-2); }
  .sh-row { display: flex; align-items: center; gap: 10px; padding: 11px 16px; color: var(--text); font-size: 14px; }
  .sh-row:active { background: var(--surface-2); }
  .sh-row .dot { width: 8px; height: 8px; box-shadow: none; animation: none; }
  .sh-row .sh-title { flex: 1; min-width: 0; }
  .sh-row.planned { color: var(--text-3); }
  .sh-row.current { color: var(--brand); font-weight: 700; }
  .sh-row .tag { font-size: 10px; }
}

/* ---------- foydalanuvchilar va rollar ---------- */
.lvl { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 999px; white-space: nowrap; border: 1px solid transparent; }
.lvl-yoq { background: var(--surface-2); color: var(--text-3); border-color: var(--border); }
.lvl-korish { background: var(--surface-2); color: var(--text-2); border-color: var(--border-strong); }
.lvl-ishlash { background: var(--green-soft); color: var(--green-text); }
.lvl-boshqarish { background: var(--brand-soft); color: var(--brand); border-color: var(--brand); }
.role-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.role-card { padding: 14px 16px; display: flex; flex-direction: column; }
.role-card > .row:last-child { margin-top: auto; }
.role-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.role-opt, .field label.role-opt { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; margin: 0; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; background: var(--surface); font-weight: 400; font-size: 13px; }
.role-opt:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.role-opt.base { opacity: .8; cursor: default; }
.role-opt input { margin-top: 3px; }
.role-opt .t { font-weight: 600; font-size: 13px; }
.role-opt .s { color: var(--text-3); font-size: 12px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.access-preview { border: 1px solid var(--border); border-radius: 8px; }
.ap-row { display: flex; gap: 12px; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.ap-row:last-child { border-bottom: none; }
.ap-sec { width: 110px; flex: none; font-weight: 600; font-size: 13px; }
.ap-items { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 13px; }
.ap-item.planned { color: var(--text-3); }
.ap-pages { display: inline-flex; flex-wrap: wrap; gap: 4px 10px; margin-left: 8px; font-size: 12px; color: var(--text-2); }
.perm-table { border: 1px solid var(--border); border-radius: 8px; max-height: 56vh; overflow: auto; }
.perm-sec { border-bottom: 1px solid var(--border); }
.perm-sec:last-child { border-bottom: none; }
.perm-row { display: flex; gap: 10px; align-items: center; padding: 6px 12px; }
.perm-row.head { background: var(--surface-2); position: sticky; top: 0; z-index: 1; }
.perm-row.sub { padding-left: 28px; font-size: 13px; }
.perm-row.page { padding-left: 48px; font-size: 12.5px; color: var(--text-2); }
.perm-row .tag { font-size: 10px; }
.perm-group { padding: 8px 12px 2px 20px; font-size: 11px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--text-3); }
select.input.lvl-select { min-width: 0; width: 220px; padding: 4px 8px; }
select.input.lvl-select.set { border-color: var(--brand); color: var(--brand); font-weight: 600; }
@media (max-width: 600px) {
  .role-grid, .role-pick { grid-template-columns: 1fr; }
  .ap-row { flex-direction: column; gap: 4px; }
  .perm-row.sub { padding-left: 16px; }
  .perm-row.page { padding-left: 30px; }
  select.input.lvl-select { width: 150px; }
}

/* ---------- vazifalar (2026-11-01): loyiha va filtr tugmalari, doska (holat ustunlari), vazifa oynasi ---------- */
.nav .count.blue { background: var(--brand); color: var(--on-brand); }
.tk-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); cursor: pointer; font-weight: 500; font-size: 13px; }
.chip:hover { border-color: var(--brand); }
.chip.active { background: var(--brand-soft); color: var(--brand); border-color: var(--brand); }
.chip .n { font-size: 11px; font-weight: 700; opacity: .75; }
.tk-board { display: grid; grid-template-columns: repeat(4, minmax(220px, 1fr)); gap: 12px; overflow-x: auto; align-items: start; padding-bottom: 6px; }
.tk-col { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; min-height: 140px; }
.tk-col.drop { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.tk-col-head { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 13px; margin: 2px 4px 10px; }
.tk-col-head .dot { width: 8px; height: 8px; box-shadow: none; }
.tk-card { background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--border-strong); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; cursor: pointer; }
.tk-card:hover { border-color: var(--brand); }
.tk-card.p-muhim { border-left-color: var(--yellow); }
.tk-card.p-shoshilinch { border-left-color: var(--red); }
.tk-card[draggable="true"] { cursor: grab; }
.tk-card .t { font-weight: 600; line-height: 1.35; margin-bottom: 6px; }
.tk-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12px; color: var(--text-3); }
.tk-meta span { display: inline-flex; align-items: center; gap: 3px; }
.tk-meta .icon { width: 12px; height: 12px; }
.late { color: var(--red-text); font-weight: 600; }
.tk-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tk-grid .input { width: 100%; }
.tk-desc { white-space: pre-wrap; margin-bottom: 12px; line-height: 1.5; }
.tk-h { font-size: 14px; margin: 18px 0 8px; }
.tk-check { display: flex; align-items: center; gap: 8px; padding: 4px 0; cursor: pointer; }
.tk-check.done span { text-decoration: line-through; color: var(--text-3); }
.tk-check .btn { padding: 2px 6px; }
.tk-file { display: flex; align-items: center; gap: 6px; padding: 4px 0; }
.tk-file .btn { padding: 2px 6px; }
.tk-comment { padding: 8px 0; border-bottom: 1px solid var(--border); white-space: pre-wrap; }
.tk-comment .w { font-size: 12px; color: var(--text-3); white-space: normal; }
.tk-history { margin-top: 16px; }
.tk-history summary { cursor: pointer; font-weight: 600; }
.tk-members { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 6px; }
@media (max-width: 760px) {
  .tk-board { grid-template-columns: repeat(4, 78vw); }
  .tk-grid { grid-template-columns: 1fr; }
}
/* Claude ulanishi (2026-11-01): nusxalanadigan manzil va kalit */
.code-box { display: block; min-width: 0; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; word-break: break-all; }

/* ---------- server holati (2026-11-01): ko'rsatkich kartochkalari, jonli grafiklar (SVG), jarayonlar, disk ---------- */
.sv-bar { margin-bottom: 12px; }
.sv-live { width: 10px; height: 10px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); animation: sv-pulse 2s ease-in-out infinite; }
.sv-live.off { background: var(--text-3); box-shadow: none; animation: none; }
.sv-live.stale { background: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
@keyframes sv-pulse { 50% { opacity: .45; } }
.sv-stale { color: var(--red-text); }
.sv-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin-bottom: 14px; }
.sv-chart [hidden], .sv-cols-wrap [hidden] { display: none; }
.sv-tile { padding: 14px 16px; min-width: 0; }
.sv-tile-l { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 13px; font-weight: 600; }
.sv-tile-l .dot { margin-left: auto; }
.sv-tile-v { font-size: 26px; font-weight: 700; letter-spacing: -.01em; margin-top: 4px; line-height: 1.2; overflow-wrap: anywhere; }
.sv-tile-s { font-size: 12px; margin-top: 2px; }
.sv-meter { height: 6px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); overflow: hidden; margin-top: 10px; }
.sv-meter > i { display: block; height: 100%; border-radius: 999px; background: var(--green); transition: width .4s; }
.sv-meter > i.yellow { background: var(--yellow); }
.sv-meter > i.red { background: var(--red); }
.sv-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.sv-chart { padding: 14px 16px 10px; min-width: 0; }
.sv-chart-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.sv-chart-head .t { font-weight: 600; margin-right: auto; }
.sv-head-vals { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; }
.sv-hv { display: inline-flex; align-items: center; gap: 6px; }
.sv-hv strong { font-variant-numeric: tabular-nums; }
.sv-key { display: inline-block; width: 12px; height: 2px; border-radius: 2px; background: var(--viz-1); }
.sv-key.sv-s2 { background: var(--viz-2); }
.sv-key.sv-s3 { background: var(--viz-3); }
.sv-key.sv-s4 { background: var(--viz-4); }
.sv-plot-wrap { display: grid; grid-template-columns: auto 1fr; gap: 8px; align-items: start; }
.sv-yl { position: relative; min-width: 44px; font-size: 11px; color: var(--text-3); text-align: right; font-variant-numeric: tabular-nums; }
.sv-yl span { position: absolute; right: 0; transform: translateY(-50%); white-space: nowrap; }
.sv-plot-col { min-width: 0; }
.sv-plot { position: relative; touch-action: pan-y; outline: none; cursor: crosshair; }
.sv-plot:focus-visible { box-shadow: 0 0 0 2px var(--brand-soft); border-radius: 4px; }
.sv-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; display: block; }
.sv-gridline { stroke: var(--border); stroke-width: 1; }
.sv-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; stroke: var(--viz-1); }
.sv-area { stroke: none; fill: var(--viz-1); opacity: .1; }
.sv-line.sv-s2 { stroke: var(--viz-2); }
.sv-line.sv-s3 { stroke: var(--viz-3); }
.sv-line.sv-s4 { stroke: var(--viz-4); }
.sv-xl { position: relative; height: 18px; margin-top: 6px; font-size: 11px; color: var(--text-3); }
.sv-xl span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.sv-xl span.first { transform: none; }
.sv-xl span.last { transform: translateX(-100%); }
.sv-cross { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--text-3); pointer-events: none; }
.sv-pt { position: absolute; width: 8px; height: 8px; border-radius: 50%; transform: translate(-50%, -50%); background: var(--viz-1); box-shadow: 0 0 0 2px var(--surface); pointer-events: none; }
.sv-pt.sv-s2 { background: var(--viz-2); }
.sv-tip { position: absolute; top: 0; z-index: 2; transform: translateX(12px); background: var(--surface); border: 1px solid var(--border-strong); border-radius: 8px; box-shadow: var(--shadow-lg); padding: 7px 10px; font-size: 12px; pointer-events: none; white-space: nowrap; }
.sv-tip.left { transform: translateX(calc(-100% - 12px)); }
.sv-tip-t { color: var(--text-3); margin-bottom: 3px; }
.sv-tip-r { display: flex; align-items: center; gap: 6px; }
.sv-tip-r strong { font-size: 13px; font-variant-numeric: tabular-nums; }
.sv-tip-r span:last-child { color: var(--text-2); }
.sv-empty { position: absolute; inset: 0; display: grid; place-items: center; font-size: 13px; }
.sv-note { font-size: 12px; margin-top: 6px; }
.sv-card-t { font-weight: 600; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sv-seg { display: flex; gap: 2px; height: 8px; border-radius: 999px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--border); }
.sv-seg > span { display: block; height: 100%; min-width: 2px; }
.sv-f1 { background: var(--viz-1); }
.sv-f2 { background: var(--viz-2); }
.sv-f3 { background: var(--viz-3); }
.sv-f4 { background: var(--viz-4); }
.sv-seg-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 8px; font-size: 12.5px; color: var(--text-2); }
.sv-seg-legend span { display: inline-flex; align-items: center; gap: 5px; }
.sv-seg-legend i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }
.sv-seg-legend strong { color: var(--text); font-variant-numeric: tabular-nums; }
.sv-cores { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px 14px; margin-top: 14px; }
.sv-core { display: grid; grid-template-columns: 18px 1fr 46px; align-items: center; gap: 8px; font-size: 12px; font-variant-numeric: tabular-nums; }
.sv-core .sv-meter { margin-top: 0; }
.sv-core > span:last-child { text-align: right; }
.sv-kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px 18px; }
.sv-kv label { display: block; font-size: 12px; color: var(--text-3); margin-bottom: 2px; }
.sv-kv > div > div { overflow-wrap: anywhere; }
.sv-hist { transition: opacity .15s; }
.sv-hist.loading { opacity: .6; }
.sv-table td.num, .sv-table th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sv-cols-wrap { position: relative; }
.sv-cols { display: flex; align-items: flex-end; gap: 2px; height: 120px; border-bottom: 1px solid var(--border); }
.sv-col { flex: 1; height: 100%; display: flex; align-items: flex-end; justify-content: center; outline: none; cursor: default; }
.sv-col i { display: block; width: 100%; max-width: 24px; min-height: 1px; background: var(--viz-1); border-radius: 4px 4px 0 0; }
.sv-col:hover i, .sv-col:focus-visible i { opacity: .75; }
.sv-cols-x { position: relative; height: 18px; margin-top: 6px; font-size: 11px; }
.sv-cols-x span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.sv-inode { margin-top: 10px; font-size: 12px; }
.sv-inode .sv-meter { margin-top: 4px; }
.sv-size-g { margin-bottom: 14px; }
.sv-size-h { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.sv-hbar { display: grid; grid-template-columns: minmax(110px, 200px) 1fr minmax(80px, auto); gap: 10px; align-items: center; padding: 3px 0; font-size: 13px; }
.sv-hbar .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sv-hbar .b { height: 8px; }
.sv-hbar .b i { display: block; height: 100%; background: var(--viz-1); border-radius: 0 4px 4px 0; }
.sv-hbar .v { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 900px) {
  .sv-grid2 { grid-template-columns: 1fr; }
  .sv-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .sv-tile { padding: 12px; }
  .sv-tile-v { font-size: 21px; }
  .sv-hbar { grid-template-columns: minmax(90px, 1fr) 1fr; }
  .sv-hbar .v { grid-column: 1 / -1; text-align: left; margin-top: -2px; color: var(--text-2); }
}
