/* ==========================================================================
   Customs Assessment — Bojxona kadrlarini baholash tizimi
   Dizayn tizimi: zumrad (emerald) + oltin + kumush — Bojxona qo'mitasi ramzlari asosida
   ========================================================================== */
@font-face { font-family: "Inter"; src: url("../fonts/Inter-Regular.otf") format("opentype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/Inter-Medium.otf") format("opentype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/Inter-SemiBold.otf") format("opentype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/Inter-Bold.otf") format("opentype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/Inter-ExtraBold.otf") format("opentype"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Gelasio"; src: url("../fonts/Gelasio.ttf") format("truetype"); font-weight: 400 700; font-display: swap; }

:root {
  --em-950: #031512; --em-900: #062420; --em-850: #0a2f2a; --em-800: #0d3a33; --em-700: #135045; --em-600: #1a6a5a;
  --green: #1f9d55; --green-600: #17834a; --green-soft: #e3f4ea;
  --gold: #d4a72c; --gold-2: #b57d12; --gold-3: #f6cf55; --gold-soft: #fbf3dc;
  --gold-grad: linear-gradient(135deg, #fff3b8 0%, #f1c748 30%, #b57d12 62%, #f0c849 85%, #fff0a0 100%);
  --silver-grad: linear-gradient(135deg, #ffffff, #aeb4ba 30%, #6e757c 55%, #d8dcdf 80%, #8b9197);
  --red: #c8372d; --red-soft: #fbe9e7; --amber: #c27c0e; --amber-soft: #fdf1dc; --blue: #2a78d6; --blue-soft: #e5f0fc;

  --bg: #f3f6f4; --bg-2: #eaf0ed; --surface: #ffffff; --surface-2: #f8faf9; --surface-3: #eff4f1;
  --ink: #0f1f1b; --ink-2: #3a4a45; --muted: #6b7c76; --line: #dfe7e3; --line-2: #e9efec;
  --shadow-sm: 0 1px 2px rgba(6, 36, 32, .06), 0 1px 3px rgba(6, 36, 32, .05);
  --shadow: 0 1px 2px rgba(6, 36, 32, .05), 0 8px 24px -8px rgba(6, 36, 32, .12);
  --shadow-lg: 0 24px 60px -16px rgba(3, 21, 18, .35);
  --radius: 14px; --radius-sm: 10px; --radius-xs: 7px;
  --sidebar-w: 272px;
  --focus: 0 0 0 3px rgba(31, 157, 85, .28);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Gelasio", Georgia, "Times New Roman", serif;
  --sb-1: #0b2c2b; --sb-2: #062420; --sb-3: #031512; --sb-glow: rgba(47, 174, 72, .18);
  --pri-1: #23a85d; --pri-2: #17834a; --pri-b: #137140; --pri-glow: rgba(23,131,74,.5);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #061714; --bg-2: #081d19; --surface: #0b231f; --surface-2: #0e2a25; --surface-3: #12322c;
  --ink: #e9f2ee; --ink-2: #c3d3cd; --muted: #8aa39a; --line: #1d3e37; --line-2: #17352f;
  --green-soft: rgba(31, 157, 85, .16); --gold-soft: rgba(212, 167, 44, .14); --red-soft: rgba(200, 55, 45, .16);
  --amber-soft: rgba(194, 124, 14, .18); --blue-soft: rgba(42, 120, 214, .16);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -8px rgba(0, 0, 0, .5);
  --shadow-sm: 0 1px 2px rgba(0,0,0,.3);
  color-scheme: dark;
}

* { box-sizing: border-box; }
svg.i { width: 16px; height: 16px; flex: none; vertical-align: middle; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--font); font-size: 14px; line-height: 1.5; color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased; font-feature-settings: "cv11", "ss01", "tnum"; }
a { color: var(--green-600); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -.01em; }
.display { font-family: var(--font-display); letter-spacing: .01em; }
::selection { background: rgba(212, 167, 44, .35); }
:focus-visible { outline: none; box-shadow: var(--focus); }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 12.5px; }
.grow { flex: 1; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 10px; }
.spacer { flex: 1; }
.right { text-align: right; }
.center { text-align: center; }
.gold-text { background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ------------------------------------------------------------------ Layout */
.app { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: calc(100vh / var(--z, 1)); }
.sidebar { position: sticky; top: 0; height: calc(100vh / var(--z, 1)); overflow-y: auto; color: #d5e6df;
  background:
    radial-gradient(120% 60% at 0% 0%, var(--sb-glow), transparent 60%),
    radial-gradient(80% 50% at 100% 100%, rgba(212, 167, 44, .10), transparent 60%),
    linear-gradient(180deg, var(--sb-1) 0%, var(--sb-2) 55%, var(--sb-3) 100%);
  border-right: 1px solid rgba(212, 167, 44, .18); display: flex; flex-direction: column; scrollbar-width: thin; scrollbar-color: #1e4a41 transparent; }
.brand { display: flex; align-items: center; gap: 12px; padding: 18px 16px 16px; border-bottom: 1px solid rgba(255,255,255,.06); text-decoration: none !important; color: inherit; }
.brand img { width: 54px; height: 54px; filter: drop-shadow(0 6px 12px rgba(0,0,0,.5)); flex: none; }
.brand .sub { font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: #9fbdb3; margin-top: 6px; line-height: 1.35; }
.brandmark { display: flex; flex-direction: column; font-family: var(--font-display); font-weight: 700; line-height: 1.02; letter-spacing: .11em; text-transform: uppercase;
  font-size: 15.5px; background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brandmark span { display: block; }
.brandmark.big { font-size: clamp(34px, 4.2vw, 58px); letter-spacing: .16em; text-align: center; line-height: 1.05; margin-top: 18px; position: relative;
  filter: drop-shadow(0 4px 14px rgba(0,0,0,.45)); }
.nav a .ext { margin-left: auto; opacity: .5; } .nav a .ext svg.i { width: 13px; height: 13px; }
.sidebar-backdrop { display: none; }
.nav { padding: 10px 10px 20px; flex: 1; }
.nav-group { font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: #6f9488; padding: 16px 12px 6px; font-weight: 600; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 10px; color: #cfe1da; font-weight: 500;
  text-decoration: none; position: relative; transition: background .15s, color .15s; margin: 1px 0; }
.nav a svg { width: 18px; height: 18px; opacity: .85; flex: none; }
.nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav a.active { background: linear-gradient(90deg, rgba(212,167,44,.22), rgba(212,167,44,.04)); color: #fff6d6; }
.nav a.active::before { content: ""; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--gold-grad); }
.nav a.active svg { color: var(--gold-3); opacity: 1; }
.nav a .badge-dot { margin-left: auto; background: var(--green); color: #fff; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 20px; }
.nav a .badge-dot.live { background: #e0463a; animation: pulse 1.6s infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(224,70,58,.5);} 50% { box-shadow: 0 0 0 6px rgba(224,70,58,0);} }
.sidebar-foot { padding: 14px 16px; border-top: 1px solid rgba(255,255,255,.06); font-size: 11.5px; color: #7fa195; display: flex; align-items: center; gap: 10px; }
.sidebar-foot img { width: 26px; height: 26px; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 14px; padding: 12px 28px;
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line-2); min-height: 64px; }
.topbar .title { font-size: 19px; font-weight: 700; }
.topbar .crumbs { font-size: 12px; color: var(--muted); }
.icon-btn { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center;
  cursor: pointer; color: var(--ink-2); transition: .15s; }
.icon-btn:hover { border-color: var(--green); color: var(--green); }
.icon-btn svg { width: 18px; height: 18px; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 5px 12px 5px 5px; border-radius: 40px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; color: #3a2a04; background: var(--gold-grad); flex: none; }
.user-chip .u-name { font-weight: 600; font-size: 13px; line-height: 1.1; }
.user-chip .u-role { font-size: 11px; color: var(--muted); }
.content { padding: 24px 28px 48px; max-width: 1600px; width: 100%; }
.menu-btn { display: none; }

/* ------------------------------------------------------------------ Page header */
.page-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

/* ------------------------------------------------------------------ Cards */
.card { background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-h { display: flex; align-items: center; gap: 10px; padding: 16px 18px 0; }
.card-h h3 { font-size: 15px; font-weight: 700; }
.card-h .sub { color: var(--muted); font-size: 12.5px; }
.card-b { padding: 16px 18px 18px; }
.card.pad { padding: 18px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1440px) { .g3 { grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); } }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-21 { grid-template-columns: 2fr 1fr; }
.g-12 { grid-template-columns: 1fr 2fr; }
.span2 { grid-column: span 2; }

/* KPI tiles */
.kpi { position: relative; overflow: hidden; padding: 18px 18px 16px; }
.kpi .k-label { font-size: 12.5px; color: var(--muted); font-weight: 500; display: flex; align-items: center; gap: 8px; }
.kpi .k-icon { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--green-soft); color: var(--green); }
.kpi .k-icon svg { width: 16px; height: 16px; }
.kpi .k-value { font-size: 30px; font-weight: 800; letter-spacing: -.03em; margin-top: 10px; line-height: 1; }
.kpi .k-value small { font-size: 15px; font-weight: 600; color: var(--muted); margin-left: 2px; }
.kpi .k-foot { font-size: 12px; color: var(--muted); margin-top: 8px; }
.kpi.hero { color: #eaf6f1; border: 1px solid rgba(212,167,44,.35);
  background: radial-gradient(120% 120% at 100% 0%, rgba(246,207,85,.22), transparent 50%), linear-gradient(135deg, var(--sb-1), var(--sb-3)); }
.kpi.hero .k-label, .kpi.hero .k-foot { color: #a9c7bd; }
.kpi.hero .k-icon { background: rgba(246,207,85,.16); color: var(--gold-3); }
.kpi .k-bar { height: 6px; border-radius: 6px; background: var(--surface-3); margin-top: 12px; overflow: hidden; }
.kpi .k-bar > i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--green), #6fd39a); }
.kpi.hero .k-bar { background: rgba(255,255,255,.12); }
.kpi.hero .k-bar > i { background: var(--gold-grad); }

/* ------------------------------------------------------------------ Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 15px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 600; font-size: 13.5px; cursor: pointer;
  transition: background .15s, border-color .15s, transform .05s, box-shadow .15s; white-space: nowrap; text-decoration: none !important; }
.btn:hover { border-color: #b9cbc4; background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn.primary { background: linear-gradient(180deg, var(--pri-1), var(--pri-2)); border-color: var(--pri-b); color: #fff; box-shadow: 0 1px 0 rgba(255,255,255,.2) inset, 0 4px 12px -4px var(--pri-glow); }
.btn.primary:hover { filter: brightness(1.07); }
.btn.gold { background: var(--gold-grad); border-color: #b9860f; color: #3a2a04; box-shadow: 0 4px 14px -6px rgba(181,125,18,.6); }
.btn.dark { background: var(--em-800); border-color: var(--em-700); color: #fff; }
.btn.danger { color: var(--red); }
.btn.danger:hover { background: var(--red-soft); border-color: rgba(200,55,45,.35); }
.btn.danger.solid { background: var(--red); color: #fff; border-color: var(--red); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--surface-3); }
.btn.sm { height: 31px; padding: 0 10px; font-size: 12.5px; border-radius: 8px; }
.btn.xs { height: 26px; padding: 0 8px; font-size: 12px; border-radius: 7px; gap: 5px; }
.btn.xs svg { width: 14px; height: 14px; }
.btn.icon { width: 34px; padding: 0; }
.btn.sm.icon { width: 31px; }
.btn[disabled] { opacity: .55; pointer-events: none; }
.btn-group { display: inline-flex; }
.btn-group .btn { border-radius: 0; margin-left: -1px; }
.btn-group .btn:first-child { border-radius: 10px 0 0 10px; margin-left: 0; }
.btn-group .btn:last-child { border-radius: 0 10px 10px 0; }
.btn-group .btn.on { background: var(--em-800); color: #fff; border-color: var(--em-800); z-index: 1; }

/* ------------------------------------------------------------------ Forms */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .label { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.field .hint { font-size: 11.5px; color: var(--muted); }
.req::after { content: " *"; color: var(--red); }
.input, .select, .textarea { width: 100%; height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface);
  transition: border-color .15s, box-shadow .15s; }
.textarea { height: auto; min-height: 90px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--green); box-shadow: var(--focus); outline: none; }
.select { appearance: none; padding-right: 34px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7c76' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; }
.input.sm, .select.sm { height: 34px; font-size: 13px; border-radius: 9px; }
.input-icon { position: relative; }
.input-icon svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--muted); pointer-events: none; }
.input-icon .input { padding-left: 34px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1440px) { .g3 { grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); } }
.check { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; user-select: none; font-weight: 500; }
.check input { width: 17px; height: 17px; accent-color: var(--green); cursor: pointer; }
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 500; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track { width: 38px; height: 22px; border-radius: 22px; background: #c9d6d1; position: relative; transition: .2s; flex: none; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: .2s; }
.switch input:checked + .track { background: var(--green); }
.switch input:checked + .track::after { left: 19px; }
.switch input:focus-visible + .track { box-shadow: var(--focus); }

/* ------------------------------------------------------------------ Filters bar */
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 12px; background: var(--surface); border: 1px solid var(--line-2);
  border-radius: var(--radius); margin-bottom: 14px; box-shadow: var(--shadow-sm); }
.filters .input, .filters .select { height: 36px; width: auto; min-width: 150px; font-size: 13px; }
.filters .input-icon .input { min-width: 240px; }

/* ------------------------------------------------------------------ Tables */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.2px; }
table.t th { text-align: left; font-weight: 600; font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted);
  padding: 11px 12px; border-bottom: 1px solid var(--line); background: var(--surface-2); position: sticky; top: 0; z-index: 1; white-space: nowrap; }
table.t th:first-child { border-top-left-radius: var(--radius); }
table.t th:last-child { border-top-right-radius: var(--radius); }
table.t td { padding: 11px 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.t tbody tr { transition: background .1s; }
table.t tbody tr:hover { background: var(--surface-2); }
table.t tbody tr.click { cursor: pointer; }
table.t tbody tr:last-child td { border-bottom: 0; }
table.t td.num, table.t th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.t .actions-cell { text-align: right; white-space: nowrap; }
table.t .cb { width: 36px; }
.t-name { font-weight: 600; }
.t-sub { font-size: 12px; color: var(--muted); }
.empty { padding: 48px 20px; text-align: center; color: var(--muted); }
.empty svg { width: 44px; height: 44px; color: #b4c6bf; margin-bottom: 10px; }
.empty .e-title { font-weight: 700; color: var(--ink-2); font-size: 15px; margin-bottom: 4px; }
.pager { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--line-2); font-size: 13px; color: var(--muted); }
.pager .pages { margin-left: auto; display: flex; gap: 4px; }
.pager .pages button { min-width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 600; font-size: 12.5px; }
.pager .pages button.on { background: var(--em-800); color: #fff; border-color: var(--em-800); }
.pager .pages button:disabled { opacity: .4; cursor: default; }

/* ------------------------------------------------------------------ Badges, pills */
.badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 20px; font-size: 11.5px; font-weight: 600; white-space: nowrap;
  background: var(--surface-3); color: var(--ink-2); }
.badge svg { width: 12px; height: 12px; }
.badge.green { background: var(--green-soft); color: #11743e; }
.badge.red { background: var(--red-soft); color: #a52a22; }
.badge.amber { background: var(--amber-soft); color: #8d5a08; }
.badge.blue { background: var(--blue-soft); color: #1d5fae; }
.badge.gold { background: var(--gold-soft); color: #8a5f0a; border: 1px solid rgba(212,167,44,.35); }
.badge.dark { background: var(--em-800); color: #e6f2ed; }
:root[data-theme="dark"] .badge.green { color: #6fdc9c; } :root[data-theme="dark"] .badge.red { color: #ff8d83; }
:root[data-theme="dark"] .badge.amber { color: #f2b860; } :root[data-theme="dark"] .badge.blue { color: #86b6f0; } :root[data-theme="dark"] .badge.gold { color: #f3cf6b; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: currentColor; }
.pct { display: inline-flex; align-items: center; gap: 8px; min-width: 110px; }
.pct .bar { flex: 1; height: 6px; border-radius: 6px; background: var(--surface-3); overflow: hidden; min-width: 50px; }
.pct .bar i { display: block; height: 100%; border-radius: 6px; }
.pct b { font-variant-numeric: tabular-nums; font-size: 12.5px; min-width: 44px; text-align: right; }
.diff { display: inline-flex; gap: 3px; }
.diff i { width: 7px; height: 14px; border-radius: 2px; background: var(--line); }
.diff i.on { background: var(--gold); }

/* ------------------------------------------------------------------ Tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs button { background: none; border: 0; padding: 10px 14px; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; display: inline-flex; gap: 7px; align-items: center; }
.tabs button svg { width: 16px; height: 16px; }
.tabs button.on { color: var(--ink); border-bottom-color: var(--gold); }
.seg { display: inline-flex; padding: 3px; background: var(--surface-3); border-radius: 10px; gap: 2px; }
.seg button { border: 0; background: none; padding: 6px 12px; border-radius: 8px; font-weight: 600; font-size: 12.5px; color: var(--muted); cursor: pointer; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }

/* ------------------------------------------------------------------ Modal */
.modal-back { position: fixed; inset: 0; z-index: 100; background: rgba(3, 21, 18, .55); backdrop-filter: blur(3px); display: grid; place-items: center; padding: 20px;
  animation: fade .15s ease; }
.modal { width: min(640px, 100%); max-height: calc(100vh / var(--z, 1) - 40px); display: flex; flex-direction: column; background: var(--surface); border-radius: 18px;
  box-shadow: var(--shadow-lg); border: 1px solid var(--line-2); animation: pop .18s cubic-bezier(.2,.9,.3,1.2); overflow: hidden; }
.modal.lg { width: min(880px, 100%); } .modal.xl { width: min(1120px, 100%); } .modal.sm { width: min(440px, 100%); }
.modal-h { display: flex; align-items: center; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--line-2); }
.modal-h h3 { font-size: 17px; font-weight: 700; }
.modal-h .x { margin-left: auto; }
.modal-b { padding: 20px; overflow-y: auto; }
.modal-f { display: flex; gap: 10px; justify-content: flex-end; padding: 14px 20px; border-top: 1px solid var(--line-2); background: var(--surface-2); }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } }

/* ------------------------------------------------------------------ Toast */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast { min-width: 280px; max-width: 420px; padding: 12px 14px; border-radius: 12px; background: var(--em-900); color: #eaf6f1; box-shadow: var(--shadow-lg);
  display: flex; gap: 10px; align-items: flex-start; animation: pop .2s; border-left: 4px solid var(--green); font-size: 13.5px; }
.toast.error { border-left-color: #e0463a; } .toast.warn { border-left-color: var(--gold); }
.toast svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }

/* ------------------------------------------------------------------ Misc components */
.alert { display: flex; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--gold-soft); border: 1px solid rgba(212,167,44,.35); font-size: 13px; }
.alert svg { width: 18px; height: 18px; flex: none; color: var(--gold-2); margin-top: 1px; }
.alert.red { background: var(--red-soft); border-color: rgba(200,55,45,.3); } .alert.red svg { color: var(--red); }
.alert.green { background: var(--green-soft); border-color: rgba(31,157,85,.3); } .alert.green svg { color: var(--green); }
.alert.blue { background: var(--blue-soft); border-color: rgba(42,120,214,.3); } .alert.blue svg { color: var(--blue); }
.kv { display: grid; grid-template-columns: 170px 1fr; gap: 8px 14px; font-size: 13.5px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; font-weight: 500; }
.list-item { display: flex; gap: 12px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line-2); }
.list-item:last-child { border-bottom: 0; }
.chip-ico { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--green-soft); color: var(--green); flex: none; }
.chip-ico svg { width: 18px; height: 18px; }
.chip-ico.gold { background: var(--gold-soft); color: var(--gold-2); }
.chip-ico.red { background: var(--red-soft); color: var(--red); }
.chip-ico.blue { background: var(--blue-soft); color: var(--blue); }
.divider { height: 1px; background: var(--line-2); margin: 14px 0; }
.skeleton { background: linear-gradient(90deg, var(--surface-3), var(--surface-2), var(--surface-3)); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 8px; }
@keyframes sk { to { background-position: -200% 0; } }
.loader { display: grid; place-items: center; padding: 60px; }
.spin { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--green); animation: rot .8s linear infinite; }
@keyframes rot { to { transform: rotate(360deg); } }
.dropzone { border: 2px dashed var(--line); border-radius: 14px; padding: 30px; text-align: center; cursor: pointer; transition: .15s; background: var(--surface-2); }
.dropzone:hover, .dropzone.over { border-color: var(--green); background: var(--green-soft); }
.dropzone svg { width: 40px; height: 40px; color: var(--green); margin-bottom: 8px; }
.secret { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 20px; font-weight: 700; letter-spacing: .12em; padding: 10px 14px; border-radius: 10px;
  background: var(--gold-soft); border: 1px dashed var(--gold); display: inline-block; }
.option-row { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.option-row.correct { border-color: rgba(31,157,85,.55); background: var(--green-soft); }
.option-row .letter { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; font-weight: 700; background: var(--surface-3); flex: none; }
.option-row.correct .letter { background: var(--green); color: #fff; }
.option-row .input { border: 0; box-shadow: none !important; height: 32px; padding: 0 4px; background: transparent; }
.q-card { padding: 14px 16px; border: 1px solid var(--line-2); border-radius: 12px; margin-bottom: 10px; background: var(--surface); }
.q-card .opts { display: grid; gap: 6px; margin-top: 10px; }
.q-card .opt { padding: 7px 10px; border-radius: 8px; background: var(--surface-2); font-size: 13px; display: flex; gap: 8px; align-items: center; }
.q-card .opt svg { width: 15px; height: 15px; }
.q-card .opt.ok { background: var(--green-soft); color: #0f6a37; font-weight: 600; }
.q-card .opt.bad { background: var(--red-soft); color: #a52a22; text-decoration: line-through; }
:root[data-theme="dark"] .q-card .opt svg { width: 15px; height: 15px; }
.q-card .opt.ok { color: #7fe3a9; } :root[data-theme="dark"] .q-card .opt.bad { color: #ff9a90; }
.rule-row { display: grid; grid-template-columns: minmax(200px, 1fr) 118px 92px 78px 70px 34px; gap: 10px; align-items: center; padding: 10px; border: 1px solid var(--line-2);
  border-radius: 12px; background: var(--surface-2); margin-bottom: 8px; }
.stat-big { font-size: 40px; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.ring { position: relative; display: grid; place-items: center; }
.ring .ring-label { position: absolute; text-align: center; }
.event-card { padding: 16px; display: flex; flex-direction: column; gap: 10px; cursor: pointer; transition: transform .15s, box-shadow .15s; }
.event-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.progress { height: 8px; border-radius: 8px; background: var(--surface-3); overflow: hidden; display: flex; }
.progress i { display: block; height: 100%; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 0 rgba(34,197,94,.6); animation: livepulse 1.6s infinite; display: inline-block; }
.live-dot.off { background: #9ca3af; animation: none; }
@keyframes livepulse { 0% { box-shadow: 0 0 0 0 rgba(34,197,94,.55);} 70% { box-shadow: 0 0 0 8px rgba(34,197,94,0);} 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0);} }

/* ------------------------------------------------------------------ Charts */
.chart { position: relative; width: 100%; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .axis text, .chart text.lbl { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.chart .grid line { stroke: var(--line-2); }
.chart .tip { position: absolute; pointer-events: none; background: var(--em-900); color: #eaf6f1; padding: 7px 10px; border-radius: 8px; font-size: 12px;
  box-shadow: var(--shadow-lg); white-space: nowrap; transform: translate(-50%, calc(-100% - 10px)); opacity: 0; transition: opacity .1s; z-index: 5; }
.chart .tip b { color: #fff; }
.chart .tip.on { opacity: 1; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* ------------------------------------------------------------------ Login screen */
.login-page { min-height: calc(100vh / var(--z, 1)); display: grid; grid-template-columns: 1fr 1fr; background: var(--em-950); }
.login-art { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 40px; color: #eaf6f1;
  background:
    radial-gradient(70% 55% at 50% 38%, rgba(127,232,192,.22), transparent 70%),
    radial-gradient(120% 80% at 50% 120%, rgba(212,167,44,.14), transparent 60%),
    linear-gradient(160deg, color-mix(in srgb, var(--sb-1) 70%, #5fb3a0) 0%, var(--sb-1) 45%, var(--sb-3) 100%); }
.login-art::before { content: ""; position: absolute; inset: 0; opacity: .07;
  background-image: repeating-linear-gradient(45deg, #fff 0 1px, transparent 1px 22px), repeating-linear-gradient(-45deg, #fff 0 1px, transparent 1px 22px); }
.login-art .art-ring { position: relative; width: min(380px, 62%); aspect-ratio: 1; display: grid; place-items: center; animation: float 7s ease-in-out infinite; }
.login-art .art-ring::before { content: ""; position: absolute; inset: -12%; border-radius: 50%; background: radial-gradient(circle, rgba(246,207,85,.22), transparent 65%); }
.login-art img.badge-img { width: 100%; position: relative; filter: drop-shadow(0 30px 50px rgba(0,0,0,.55)); }
.login-art .art-foot { position: absolute; bottom: 26px; left: 0; right: 0; text-align: center; font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: #8fb2a6; }
.login-box .eyebrow { font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-2); font-weight: 700; margin-bottom: 6px; }
.login-mobile-brand { display: none; align-items: center; gap: 12px; margin-bottom: 22px; }
.login-mobile-brand img { width: 56px; }
.login-mobile-brand .brandmark { background: none; color: var(--ink); -webkit-text-fill-color: currentColor; }
@keyframes float { 50% { transform: translateY(-10px); } }
.login-art .tag { letter-spacing: .3em; text-transform: uppercase; font-size: 12.5px; color: #cfe2db; position: relative; }
.login-art .rule { width: 340px; height: 2px; background: var(--gold-grad); margin: 14px auto; position: relative; }
.login-form-side { display: grid; place-items: center; padding: 40px; background: var(--bg); }
.login-box { width: min(420px, 100%); }
.login-box h2 { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.login-box .org { color: var(--muted); margin: 6px 0 26px; }
.login-box .btn { height: 46px; width: 100%; font-size: 15px; }
.login-box .input { height: 46px; }
.login-foot { margin-top: 28px; font-size: 12px; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.login-foot svg { width: 16px; height: 16px; color: var(--green); }

/* ------------------------------------------------------------------ Responsive */
@media (max-width: 1280px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g-21, .g-12 { grid-template-columns: 1fr; } }
@media (max-width: 980px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; z-index: 90; width: var(--sidebar-w); transform: translateX(-100%); transition: transform .2s; }
  .sidebar.open { transform: none; box-shadow: var(--shadow-lg); }
  .menu-btn { display: grid; }
  .g2, .g3 { grid-template-columns: 1fr; }
  .span2 { grid-column: auto; }
  .content { padding: 18px 14px 40px; } .topbar { padding: 10px 14px; }
  .login-page { grid-template-columns: 1fr; } .login-art { display: none; }
  .form-grid, .form-grid.g3 { grid-template-columns: 1fr; }
  .rule-row { grid-template-columns: 1fr 1fr; }
  .user-chip .u-meta { display: none; }
}
@media print {
  .sidebar, .topbar, .page-head .actions, .filters, .pager, .btn { display: none !important; }
  .app { display: block; } .content { padding: 0; } .card { box-shadow: none; border-color: #ccc; break-inside: avoid; }
}

.cat-item { position: relative; padding: 9px 10px; border-radius: 10px; cursor: pointer; display: flex; gap: 8px; align-items: flex-start; }
.cat-item:hover { background: var(--surface-2); }
.cat-item.on { background: var(--green-soft); }
.cat-item .cat-name { font-weight: 500; line-height: 1.35; }
.cat-item.on .cat-name { font-weight: 700; }
.cat-item .cat-actions { position: absolute; right: 6px; top: 6px; display: none; gap: 2px; background: var(--surface); border-radius: 8px; box-shadow: var(--shadow-sm); }
.cat-item:hover .cat-actions { display: flex; }
.legend.vertical { flex-direction: column; gap: 8px; }

/* ------------------------------------------------------------------ Rang sxemalari (Sozlamalar → Brending) */
:root[data-accent="navy"] { --sb-1: #12305a; --sb-2: #0b2142; --sb-3: #061226; --sb-glow: rgba(80,140,230,.2); --pri-1: #2f73d6; --pri-2: #1f57ad; --pri-b: #1a4b96; --pri-glow: rgba(31,87,173,.5); }
:root[data-accent="teal"] { --sb-1: #0c3d44; --sb-2: #082d33; --sb-3: #03181b; --sb-glow: rgba(40,190,180,.2); --pri-1: #17a2a0; --pri-2: #0e7d7b; --pri-b: #0b6a68; --pri-glow: rgba(14,125,123,.5); }
:root[data-accent="burgundy"] { --sb-1: #4a1426; --sb-2: #330d1a; --sb-3: #1a060c; --sb-glow: rgba(220,90,120,.18); --pri-1: #b33a58; --pri-2: #8f2742; --pri-b: #7a2037; --pri-glow: rgba(143,39,66,.5); }
:root[data-accent="graphite"] { --sb-1: #2b3038; --sb-2: #1d2127; --sb-3: #0f1114; --sb-glow: rgba(200,210,220,.10); --pri-1: #4a5563; --pri-2: #343c47; --pri-b: #2b323b; --pri-glow: rgba(52,60,71,.5); }

/* ------------------------------------------------------------------ Moslashuvchan (responsive) tartib */
.split { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 16px; align-items: start; }
.tb-titles { min-width: 0; }
.tb-titles .title, .tb-titles .crumbs { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1100px) { .split { grid-template-columns: 1fr; } }
@media (max-width: 980px) {
  .sidebar-backdrop { display: block; position: fixed; inset: 0; z-index: 80; background: rgba(3,21,18,.5); opacity: 0; pointer-events: none; transition: opacity .2s; }
  .sidebar-backdrop.on { opacity: 1; pointer-events: auto; }
  .page-head { align-items: flex-start; }
  .page-head .actions { margin-left: 0; width: 100%; }
  .login-mobile-brand { display: flex; }
  .kv { grid-template-columns: 1fr; gap: 2px 0; } .kv dd { margin-bottom: 8px; }
}
@media (max-width: 640px) {
  body { font-size: 13.5px; }
  .g4 { grid-template-columns: 1fr 1fr; gap: 10px; }
  .page-head h1 { font-size: 21px; }
  .topbar { gap: 8px; min-height: 56px; }
  .topbar .title { font-size: 15px; } .topbar .crumbs { display: none; }
  #theme-btn { display: none; }
  .user-chip { padding: 3px; border: 0; background: none; }
  .kpi { padding: 14px; } .kpi .k-value { font-size: 23px; }
  .filters { padding: 10px; } .filters > * { flex: 1 1 100%; } .filters .input, .filters .select, .filters .input-icon .input { width: 100% !important; min-width: 0 !important; }
  .filters .seg { overflow-x: auto; }
  .page-head .actions .btn { flex: 1 1 auto; }
  .modal-back { padding: 0; align-items: end; } .modal { border-radius: 18px 18px 0 0; max-height: 94vh; width: 100% !important; }
  .modal-f { flex-wrap: wrap; } .modal-f .btn { flex: 1 1 auto; }
  .card-h { flex-wrap: wrap; }
  .pager { flex-wrap: wrap; } .pager .pages { margin-left: 0; flex-wrap: wrap; }
  .toasts { left: 10px; right: 10px; bottom: 10px; } .toast { min-width: 0; max-width: none; }
  .rule-row { grid-template-columns: 1fr 1fr; }
  .rule-row > :first-child { grid-column: 1 / -1; }
  .stat-big { font-size: 30px; }
  .login-form-side { padding: 24px 18px; align-items: start; }
}

/* ------------------------------------------------------------------ Menyu muharriri */
svg.i.rot180 { transform: rotate(180deg); }
.nav-group-card { padding: 12px; }
.nav-group-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.nav-group-head .input { font-weight: 700; max-width: 360px; }
.nav-group-body { display: flex; flex-direction: column; gap: 6px; min-height: 44px; }
.nav-empty { border: 2px dashed var(--line); border-radius: 10px; padding: 12px; text-align: center; color: var(--muted); font-size: 12.5px; }
.nav-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface-2); transition: .12s; }
.nav-row:hover { border-color: var(--line); background: var(--surface); box-shadow: var(--shadow-sm); }
.nav-row.off { opacity: .55; }
.nav-row.off .input { text-decoration: line-through; }
.nav-row.dragging { opacity: .35; }
.nav-row.over { box-shadow: 0 -3px 0 var(--gold) inset, 0 0 0 1px var(--gold); }
.nav-row .grip { cursor: grab; color: var(--muted); display: grid; place-items: center; }
.nav-row .input.sm { background: var(--surface); }
.nav-preview { border-radius: 14px; overflow: hidden; padding: 12px 10px; color: #d5e6df;
  background: radial-gradient(120% 60% at 0% 0%, var(--sb-glow), transparent 60%), linear-gradient(180deg, var(--sb-1), var(--sb-2) 55%, var(--sb-3)); }
.np-brand { display: flex; gap: 10px; align-items: center; padding: 4px 6px 12px; border-bottom: 1px solid rgba(255,255,255,.08); margin-bottom: 6px; }
.np-brand img { width: 38px; } .np-brand b { color: var(--gold-3); letter-spacing: .06em; text-transform: uppercase; font-size: 12.5px; display: block; }
.np-brand div div { font-size: 10px; color: #9fbdb3; }
.np-group { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: #6f9488; padding: 10px 8px 4px; font-weight: 700; }
.np-item { display: flex; align-items: center; gap: 9px; padding: 6px 8px; border-radius: 8px; font-size: 12.5px; }
.np-item svg.i { width: 15px; height: 15px; opacity: .8; }
.np-item:hover { background: rgba(255,255,255,.06); }
.np-ext { margin-left: auto; opacity: .5; }
.icon-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.icon-grid button { aspect-ratio: 1; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; display: grid; place-items: center; color: var(--ink-2); }
.icon-grid button:hover, .icon-grid button.on { border-color: var(--gold); background: var(--gold-soft); color: var(--gold-2); }
.icon-grid svg.i { width: 20px; height: 20px; }
.accent-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.accent { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 600; font-size: 12.5px; color: var(--ink); }
.accent .sw { width: 26px; height: 26px; border-radius: 8px; flex: none; box-shadow: inset 0 0 0 1px rgba(255,255,255,.2); }
.accent.on { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(212,167,44,.2); }
.btn.pulse { animation: savepulse 1.4s infinite; }
@keyframes savepulse { 50% { box-shadow: 0 0 0 5px rgba(212,167,44,.35); } }
.cert-help code { background: var(--surface-3); padding: 1px 6px; border-radius: 6px; font-size: 12px; cursor: pointer; }
.color-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.color-row input[type=color] { width: 44px; height: 38px; border: 1px solid var(--line); border-radius: 10px; padding: 3px; background: var(--surface); cursor: pointer; }
.color-row .sw { width: 30px; height: 30px; border-radius: 8px; border: 2px solid transparent; cursor: pointer; }
.color-row .sw.on { border-color: var(--ink); }
@media (max-width: 1100px) { .nav-layout { grid-template-columns: 1fr !important; } .nav-layout > .col { position: static !important; } }
@media (max-width: 640px) { .nav-row { flex-wrap: wrap; } .nav-row .grow { flex-basis: calc(100% - 90px); } .report-side { flex-direction: row !important; overflow-x: auto; padding-bottom: 6px; } .report-side > .card { min-width: 230px; } }
@media (max-width: 1100px) { .report-side { flex-direction: row !important; overflow-x: auto; padding-bottom: 6px; } .report-side > .card { min-width: 240px; flex: none; } }

/* ------------------------------------------------------------------ Sertifikat eskizi */
.cert-sketch { position: relative; aspect-ratio: 297 / 210; background: #fff; border: 1px solid #d9dee3; border-radius: 6px; overflow: hidden; color: #3c4043;
  font-size: clamp(6px, .9vw, 10px); box-shadow: var(--shadow); container-type: inline-size; }
.cert-sketch .cs-head { position: absolute; left: 5.5%; top: 6%; display: flex; gap: 1.2cqw; align-items: center; color: #202124; }
.cert-sketch .cs-head img { width: 5.2cqw; } .cert-sketch .cs-head .b { font-weight: 700; }
.cert-sketch .cs-wm { position: absolute; right: -14%; top: 14%; width: 52%; }
.cert-sketch .cs-title { position: absolute; top: 21%; left: 0; right: 0; text-align: center; font-weight: 800; font-size: 7.4cqw; letter-spacing: .14em; }
.cert-sketch .cs-no { position: absolute; top: 37%; width: 100%; text-align: center; font-weight: 600; font-size: 1.5cqw; }
.cert-sketch .cs-name { position: absolute; top: 43%; width: 100%; text-align: center; font-family: "Gelasio", Georgia, serif; font-style: italic; font-size: 3.8cqw; color: #3a3a3a; }
.cert-sketch .cs-body { position: absolute; top: 55%; left: 14%; right: 14%; text-align: center; font-size: 1.45cqw; line-height: 1.6; }
.cert-sketch .cs-foot { position: absolute; bottom: 7%; left: 5.5%; right: 5.5%; display: flex; align-items: flex-end; }
.cert-sketch .cs-qr { display: flex; flex-direction: column; align-items: center; gap: .8cqw; font-size: 1.1cqw; }
.cert-sketch .qrbox { width: 8.5cqw; height: 8.5cqw; background: repeating-conic-gradient(#222 0 25%, #fff 0 50%) 0 0 / 1.4cqw 1.4cqw; border: .5cqw solid #fff; outline: 1px solid #222; }
.cert-sketch .cs-sign { flex: 1; text-align: center; font-size: 1.4cqw; line-height: 1.55; margin-right: 8.5cqw; }
.split > *, .grid > *, .g-21 > *, .g-12 > * { min-width: 0; }

/* ------------------------------------------------------------------ Shior va kirish foni */
.login-art .slogan { position: relative; margin-top: 18px; font-family: var(--font-display); font-style: italic; font-size: clamp(15px, 1.5vw, 20px);
  color: #fff3c4; text-align: center; max-width: 520px; line-height: 1.4; text-shadow: 0 2px 10px rgba(0,0,0,.4); }
.login-art .slogan::before, .login-art .slogan::after { content: "❝"; color: var(--gold-3); opacity: .7; margin: 0 6px; font-style: normal; }
.login-art .slogan::after { content: "❞"; }
.login-art.has-bg { background: linear-gradient(180deg, rgba(3,21,18,.55), rgba(3,21,18,.82)), var(--login-bg) center / cover no-repeat; }
.login-mobile-slogan { display: none; font-family: var(--font-display); font-style: italic; color: var(--gold-2); margin: -8px 0 18px; font-size: 15px; }
@media (max-width: 980px) { .login-mobile-slogan { display: block; } }
.text-row { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line-2); }
.text-row:last-child { border-bottom: 0; }
.text-meta .t-name { margin-bottom: 4px; }
@media (max-width: 900px) { .text-row { grid-template-columns: 1fr; gap: 8px; } }
.upload-tile { display: flex; gap: 14px; align-items: center; padding: 12px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface-2); }
.upload-tile .thumb { width: 64px; height: 64px; border-radius: 12px; background: var(--surface-3) center / contain no-repeat; flex: none; border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; }
.upload-tile .thumb img { max-width: 100%; max-height: 100%; }
.upload-tile .thumb.wide { width: 110px; background-size: cover; }
.sty-row { border: 1px solid var(--line-2); border-radius: 12px; padding: 10px 12px; background: var(--surface-2); }
.sty-row.off { opacity: .55; }
.sty-head { display: flex; align-items: center; gap: 10px; }
.sty-head b { flex: 1; font-size: 13.5px; }
.sty-ctl { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.sty-field { display: flex; flex-direction: column; gap: 4px; flex: 1 1 180px; min-width: 0; }
.sty-field.narrow { flex: 0 1 110px; }
.sty-field > span { font-size: 11px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.sty-field input[type=color] { width: 40px; height: 32px; border: 1px solid var(--line); border-radius: 8px; padding: 2px; background: var(--surface); }
.btn.on-acc { background: var(--gold-soft); border-color: var(--gold); }
.sticky-col { position: sticky; top: 80px; }
@media (max-width: 980px) { .sticky-col { position: static; } }
.cert-sketch { background-size: cover; background-position: center; }
.cert-sketch .cs-head > div > div { line-height: 1.4; }
.cert-sketch .cs-title { line-height: 1; }

/* ------------------------------------------------------------------ Rasmli savollar */
.btn.dashed { border-style: dashed; border-width: 1.5px; background: var(--surface-2); }
.qimg-edit { display: flex; gap: 12px; align-items: flex-start; }
.qimg-edit img { max-width: 320px; max-height: 200px; border-radius: 10px; border: 1px solid var(--line); cursor: zoom-in; background: #fff; }
.opt-thumb { position: relative; width: 72px; height: 48px; border-radius: 8px; border: 1px solid var(--line); flex: none; background: #fff; }
.opt-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; cursor: zoom-in; }
.opt-x { position: absolute; top: -7px; right: -7px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: var(--red); color: #fff; display: grid; place-items: center; cursor: pointer; padding: 0; box-shadow: var(--shadow-sm); }
.opt-x svg.i { width: 12px; height: 12px; }
.q-thumb { width: 52px; height: 38px; object-fit: cover; border-radius: 7px; border: 1px solid var(--line); cursor: zoom-in; display: block; }
.q-preview-img { display: block; max-width: 100%; max-height: 260px; border-radius: 10px; border: 1px solid var(--line); margin-top: 10px; cursor: zoom-in; background: #fff; }
.opt-mini { width: 70px; height: 48px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); cursor: zoom-in; flex: none; background: #fff; }
.img-viewer { position: fixed; inset: 0; z-index: 150; background: rgba(3,21,18,.88); display: grid; place-items: center; padding: 30px; cursor: zoom-out; animation: fade .15s; }
.img-viewer img { max-width: 94vw; max-height: 90vh; border-radius: 10px; background: #fff; box-shadow: var(--shadow-lg); }
.img-viewer .icon-btn { position: absolute; top: 18px; right: 18px; }

/* ================================================================== Yuqori panel vidjetlari */
.topbar { gap: 10px; }
.tb-widgets { display: flex; gap: 8px; align-items: center; }
.tb-chip { display: flex; align-items: center; gap: 9px; height: 42px; padding: 0 13px 0 11px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink-2); white-space: nowrap; }
.tb-chip svg.i { width: 18px; height: 18px; color: var(--gold-2); }
.tb-chip .clk { display: flex; flex-direction: column; line-height: 1.12; }
.tb-chip .clk b { font-size: 14.5px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.tb-chip .clk-date { font-size: 11px; color: var(--muted); }
.tb-chip.weather { cursor: help; }
.tb-chip .w-ico { display: grid; place-items: center; }
.tb-chip .w-ico.sun svg.i { color: #f0a92c; } .tb-chip .w-ico.moon svg.i { color: #8aa0c8; } .tb-chip .w-ico.rain svg.i, .tb-chip .w-ico.storm svg.i { color: #3b82c4; }
.tb-chip .w-ico.snow svg.i { color: #7fb4d9; } .tb-chip .w-ico.cloud svg.i, .tb-chip .w-ico.fog svg.i { color: #8b98a3; } .tb-chip .w-ico.cloudSun svg.i { color: #e0a43a; }
.tb-search { display: flex; align-items: center; gap: 10px; height: 42px; min-width: 250px; padding: 0 8px 0 13px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface); color: var(--muted); cursor: pointer; font: inherit; transition: border-color .15s, box-shadow .15s; }
.tb-search:hover { border-color: var(--green); box-shadow: var(--focus); }
.tb-search .ts-text { flex: 1; text-align: left; font-size: 13px; }
kbd { font-family: var(--font); font-size: 11px; font-weight: 600; padding: 2px 6px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-2);
  box-shadow: 0 1px 0 var(--line); white-space: nowrap; }

/* ---------- buyruqlar paneli */
.cp-back { position: fixed; inset: 0; z-index: 140; background: rgba(3,21,18,.45); backdrop-filter: blur(4px); display: flex; justify-content: center; align-items: flex-start;
  padding: calc(12vh / var(--z, 1)) 16px 16px; animation: fade .12s; }
.cp { width: min(680px, 100%); background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-lg); border: 1px solid var(--line-2); overflow: hidden; animation: pop .16s; }
.cp-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line-2); }
.cp-head svg.i { width: 20px; height: 20px; color: var(--muted); }
.cp-input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 16px; color: var(--ink); }
.cp-list { max-height: calc(56vh / var(--z, 1)); overflow-y: auto; padding: 6px; }
.cp-group { font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 700; padding: 10px 10px 4px; }
.cp-item { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 10px; cursor: pointer; }
.cp-item.on { background: var(--green-soft); }
.cp-ico { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-3); color: var(--ink-2); flex: none; }
.cp-item.on .cp-ico { background: var(--pri-2); color: #fff; }
.cp-label { font-weight: 600; } .cp-sub { font-size: 12px; color: var(--muted); }
.cp-empty { padding: 30px; text-align: center; color: var(--muted); }
.cp-foot { display: flex; gap: 16px; padding: 10px 16px; border-top: 1px solid var(--line-2); font-size: 12px; color: var(--muted); background: var(--surface-2); }
.cp-foot kbd { margin-right: 3px; }

/* ================================================================== E'lonlar */
.ann { display: flex; gap: 12px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--surface); position: relative; overflow: hidden; }
.ann::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--blue); }
.ann-success::before { background: var(--green); } .ann-warning::before { background: var(--gold); } .ann-danger::before { background: var(--red); }
.ann-ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); flex: none; }
.ann-success .ann-ico { background: var(--green-soft); color: var(--green); } .ann-warning .ann-ico { background: var(--gold-soft); color: var(--gold-2); } .ann-danger .ann-ico { background: var(--red-soft); color: var(--red); }
.ann-title { font-weight: 700; font-size: 14.5px; display: flex; gap: 6px; align-items: center; }
.ann-pin svg.i { width: 14px; height: 14px; color: var(--gold-2); }
.ann-body { margin-top: 4px; color: var(--ink-2); font-size: 13.5px; }
.ann-meta { font-size: 11.5px; color: var(--muted); margin-top: 6px; }
.ann-row { display: flex; gap: 16px; align-items: flex-start; padding: 12px; }
.ann-row > .ann { flex: 1; border: 0; padding: 4px 4px 4px 16px; }
.ann-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; }
@media (max-width: 760px) { .ann-row { flex-direction: column; } .ann-side { align-items: flex-start; } }

/* ================================================================== Markdown sahifalar */
.md { line-height: 1.65; overflow-wrap: anywhere; }
.md > :first-child { margin-top: 0; } .md > :last-child { margin-bottom: 0; }
.md p { margin: 0 0 .8em; }
.md h2, .md h3, .md h4, .md h5 { margin: 1.2em 0 .5em; letter-spacing: -.01em; }
.md h2 { font-size: 1.45em; } .md h3 { font-size: 1.2em; } .md h4 { font-size: 1.05em; }
.md ul, .md ol { margin: 0 0 .9em; padding-left: 1.4em; } .md li { margin: .25em 0; }
.md blockquote { margin: 0 0 .9em; padding: 10px 14px; border-left: 4px solid var(--gold); background: var(--gold-soft); border-radius: 0 10px 10px 0; }
.md code { background: var(--surface-3); padding: 1px 6px; border-radius: 6px; font-size: .9em; }
.md mark { background: #fde68a; padding: 0 3px; border-radius: 3px; }
.md hr { border: 0; height: 1px; background: var(--line); margin: 1.4em 0; }
.md img { max-width: 100%; border-radius: 10px; border: 1px solid var(--line-2); }
.md a { text-decoration: underline; }
.md-table { overflow-x: auto; margin: 0 0 1em; }
.md table { border-collapse: collapse; width: 100%; font-size: .95em; }
.md th, .md td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; }
.md th { background: var(--surface-2); font-weight: 700; }
.page-article { padding: clamp(20px, 3vw, 44px); max-width: 980px; }
.page-body { font-size: 15px; }
.md-editor { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.md-editor .md-src { min-height: 420px; font-size: 13px; line-height: 1.55; }
.md-preview { border: 1px solid var(--line-2); border-radius: 12px; padding: 16px; min-height: 420px; max-height: calc(60vh / var(--z, 1)); overflow: auto; background: var(--surface); }
.md-toolbar { display: flex; gap: 4px; flex-wrap: wrap; }
@media (max-width: 900px) { .md-editor { grid-template-columns: 1fr; } }
@media print { .page-article { box-shadow: none; border: 0; max-width: none; } }

/* ================================================================== Ma'lumotnomalar */
.dict-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface-2); }
.dict-row .grip { cursor: grab; color: var(--muted); display: grid; place-items: center; }
.dict-row .input { flex: 1; }

/* ================================================================== Topbar moslashuvi */
@media (max-width: 1500px) { .tb-search { min-width: 0; } .tb-search .ts-text { display: none; } .tb-chip .clk-date { display: none; } }
@media (max-width: 1180px) { .tb-chip.weather { display: none !important; } .tb-search kbd { display: none; } .tb-search { padding: 0 11px; } }
@media (max-width: 760px) { .tb-widgets, .fs-btn { display: none; } }

/* ================================================================== Bosh sahifa: hero */
.dash-hero { position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1.4fr) auto; grid-template-rows: auto auto; gap: 18px 28px;
  padding: clamp(20px, 2.4vw, 34px); border-radius: 20px; margin-bottom: 18px; color: #eaf6f1; border: 1px solid rgba(212,167,44,.35);
  background: radial-gradient(90% 140% at 100% 0%, rgba(246,207,85,.20), transparent 55%), radial-gradient(70% 120% at 0% 100%, var(--sb-glow), transparent 60%),
    linear-gradient(135deg, var(--sb-1), var(--sb-3)); box-shadow: var(--shadow); }
.dash-hero::after { content: ""; position: absolute; inset: 0; opacity: .05; pointer-events: none;
  background-image: repeating-linear-gradient(45deg, #fff 0 1px, transparent 1px 22px), repeating-linear-gradient(-45deg, #fff 0 1px, transparent 1px 22px); }
.dash-hero .dh-main { position: relative; z-index: 1; }
.dash-hero .dh-date { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-3); font-weight: 700; }
.dash-hero h1 { font-size: clamp(24px, 2.2vw, 34px); font-weight: 800; margin-top: 6px; letter-spacing: -.02em; }
.dash-hero p { margin: 4px 0 0; color: #b9d3ca; }
.dash-hero .dh-slogan { margin-top: 12px; font-family: var(--font-display); font-style: italic; font-size: clamp(15px, 1.2vw, 19px); color: #fff0b8; }
.dash-hero .dh-stats { position: relative; z-index: 1; display: flex; gap: 10px; align-self: start; margin-right: clamp(60px, 9vw, 150px); }
.dash-hero .dh-stats > div { min-width: 104px; padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); backdrop-filter: blur(6px); }
.dash-hero .dh-stats b { display: block; font-size: 24px; font-weight: 800; color: #fff; letter-spacing: -.02em; }
.dash-hero .dh-stats span { font-size: 11.5px; color: #b9d3ca; }
.dash-hero .dh-actions { position: relative; z-index: 1; grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; }
.dash-hero .dh-emblem { position: absolute; right: -40px; top: 50%; transform: translateY(-50%); width: clamp(160px, 16vw, 280px); opacity: .22; filter: drop-shadow(0 12px 30px rgba(0,0,0,.4)); pointer-events: none; }
.btn.glass { background: rgba(255,255,255,.09); border-color: rgba(255,255,255,.2); color: #fff; }
.btn.glass:hover { background: rgba(255,255,255,.16); }
.dash-blocks { gap: 16px; }
.ann-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 10px; }
@media (max-width: 980px) { .dash-hero { grid-template-columns: 1fr; } .dash-hero .dh-stats { margin-right: 0; flex-wrap: wrap; } .dash-hero .dh-stats > div { flex: 1; min-width: 90px; } }

/* ---------- suv belgisi eskizi */
.range { flex: 1; accent-color: var(--green); }
.wm-val { min-width: 44px; text-align: right; font-variant-numeric: tabular-nums; }
.wm-preview { position: relative; height: 190px; border-radius: 14px; overflow: hidden; border: 1px solid var(--line-2);
  background: linear-gradient(160deg, #f3f6f5, #e7eeeb); display: grid; place-items: center; }
.wm-layer { position: absolute; inset: -40%; display: flex; flex-wrap: wrap; gap: 26px 40px; align-content: center; justify-content: center; transform: rotate(-24deg);
  font-size: 12px; font-weight: 700; color: #0b2c2b; letter-spacing: .06em; pointer-events: none; transition: opacity .2s; }
.wm-card { position: relative; width: 62%; padding: 14px; background: #fff; border-radius: 12px; box-shadow: 0 8px 24px -12px rgba(0,0,0,.25); display: flex; flex-direction: column; gap: 7px; }
.wm-q { font-size: 11px; font-weight: 700; color: #13734a; }
.wm-l { height: 8px; border-radius: 4px; background: #dfe6e3; } .wm-l.s { width: 60%; }
.wm-o { height: 16px; border-radius: 6px; border: 1px solid #e2e8e5; }
[data-theme="dark"] .wm-preview { background: linear-gradient(160deg, #10201d, #0b1715); } [data-theme="dark"] .wm-layer { color: #cfe3db; }
[data-theme="dark"] .wm-card { background: #15251f; }
.login-ann { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.login-ann:empty { display: none; }
.la { display: flex; gap: 10px; padding: 10px 12px; border-radius: 12px; font-size: 13px; background: var(--blue-soft); color: var(--ink-2); border: 1px solid rgba(0,105,167,.18); }
.la svg.i { width: 18px; height: 18px; flex: none; margin-top: 1px; color: var(--blue); }
.la b { display: block; color: var(--ink); }
.la-success { background: var(--green-soft); border-color: rgba(19,115,74,.2); } .la-success svg.i { color: var(--green); }
.la-warning { background: var(--gold-soft); border-color: rgba(181,125,18,.25); } .la-warning svg.i { color: var(--gold-2); }
.la-danger { background: var(--red-soft); border-color: rgba(200,55,45,.22); } .la-danger svg.i { color: var(--red); }

/* ================================================================== Katta ekranlar (Full HD+, 2K, 4K) */
@media (min-width: 1680px) {
  .content { max-width: none; padding: 28px 36px 56px; }
  .ann-grid { grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); }
}
@media (min-width: 1920px) {
  :root { --sidebar-w: 288px; }
  .content { padding: 30px 44px 60px; }
  .grid.g3.dir-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
/* 2K / QHD va undan katta: butun interfeys mutanosib kattalashadi (matn o'qilishi uchun) */
@media (min-width: 2400px) { html { zoom: 1.15; --z: 1.15; } }
@media (min-width: 2880px) { html { zoom: 1.3; --z: 1.3; } }
@media (min-width: 3400px) { html { zoom: 1.6; --z: 1.6; } }
@media (min-width: 4600px) { html { zoom: 2; --z: 2; } }
.cp-input, .cp-input:focus { border: 0 !important; box-shadow: none !important; padding: 4px 0 !important; height: auto !important; background: transparent !important; }
.badge.purple { background: #efeafd; color: #5a3fc0; } :root[data-theme="dark"] .badge.purple { background: rgba(124,92,230,.18); color: #b9a6f5; }
.match-head { display: grid; grid-template-columns: 34px 1fr 24px 1fr 30px; gap: 8px; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.match-row .match-arrow { color: var(--gold-2); font-weight: 800; }
.qmedia-edit { display: flex; gap: 12px; align-items: center; } .qmedia-edit audio { flex: 1; } .qmedia-edit video { max-width: 320px; max-height: 180px; border-radius: 10px; background: #000; }
.ans-prev { display: flex; align-items: center; gap: 6px; padding: 7px 10px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--surface-2); font-size: 13.5px; }
.ans-prev.ok { border-color: rgba(19,115,74,.35); background: var(--green-soft); } .ans-prev svg.i { width: 15px; height: 15px; color: var(--green); margin-left: auto; }
.hist-row { padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface); }
.alert.gold { background: var(--gold-soft); border-color: rgba(181,125,18,.3); color: var(--ink); }

/* ================================================================== Savollar sifati */
.grid.g6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.q-sum { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.qs-chip { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--surface);
  cursor: pointer; font: inherit; color: var(--muted); text-align: left; box-shadow: var(--shadow-sm, 0 1px 2px rgba(0,0,0,.04)); transition: border-color .15s, transform .15s; }
.qs-chip b { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.qs-chip span { font-size: 12.5px; }
.qs-chip:hover { border-color: var(--green); transform: translateY(-1px); }
.qs-chip.on { border-color: var(--green); box-shadow: var(--focus); }
.qa-bar { display: flex; align-items: center; gap: 8px; min-width: 130px; } .qa-bar .progress { flex: 1; }
.dist-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line-2); margin-bottom: 6px; }
.dist-row.ok { background: var(--green-soft); border-color: rgba(19,115,74,.25); }
.dist-row .letter { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--surface-3); font-weight: 700; flex: none; }
@media (max-width: 1280px) { .q-sum { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .q-sum { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.mat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 10px; }
.mat { display: flex; gap: 12px; padding: 12px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface-2); }
.mat.off { opacity: .55; }
.mat-ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--green-soft); color: var(--green); flex: none; }
.mat-t { font-weight: 600; }
.dyn-t td.num, .dyn-t th.num { text-align: center; font-variant-numeric: tabular-nums; }
.heat-t { border-collapse: separate; border-spacing: 3px; }
.heat-t th.rot { height: 150px; vertical-align: bottom; padding: 4px; white-space: nowrap; }
.heat-t th.rot span { writing-mode: vertical-rl; transform: rotate(180deg); font-size: 11.5px; font-weight: 600; display: inline-block; max-height: 150px; overflow: hidden; text-overflow: ellipsis; }
.heat-t td.hc { text-align: center; font-weight: 700; border-radius: 6px; min-width: 44px; font-variant-numeric: tabular-nums; color: var(--ink); }
.heat-t tr.avg td { border-top: 2px solid var(--line); }
.heat-legend { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 12px; }
.heat-legend i { width: 160px; height: 10px; border-radius: 5px; display: inline-block; }
.doc-btn { display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--surface); cursor: pointer; font: inherit; text-align: left; color: var(--ink); transition: border-color .15s, transform .15s; }
.doc-btn:hover { border-color: var(--green); transform: translateY(-1px); }
.doc-ico { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); flex: none; }
.qr-box { width: 220px; height: 220px; padding: 8px; background: #fff; border-radius: 14px; border: 1px solid var(--line); } .qr-box svg { width: 100%; height: 100%; display: block; }
.script-btn { font-weight: 800; font-size: 12px; letter-spacing: .02em; width: auto !important; padding: 0 10px; }


/* ================================================================== Moslashuvchanlik: umumiy himoya */
.row { min-width: 0; }
.card, .list-item, .list-item .grow, .card-b, .grid > *, .form-grid > * { min-width: 0; }
.row.wrap, .actions, .page-head .actions, .filters, .q-foot { flex-wrap: wrap; }
.t-name, .t-sub { overflow-wrap: anywhere; }
.list-item { flex-wrap: wrap; }
.list-item > .badge, .list-item > .pct { margin-left: auto; }
.dir-stats { display: flex; flex-wrap: wrap; gap: 12px 20px; }
.dir-stats .grow { flex: 1 1 160px; }
.card-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.tabs { overflow-x: auto; scrollbar-width: none; flex-wrap: nowrap; }
.tabs::-webkit-scrollbar { display: none; }
.tabs > button { flex: none; }
.mat-grid { grid-template-columns: repeat(auto-fill, minmax(min(360px, 100%), 1fr)); }
.ann-grid { grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); }
@media (max-width: 1360px) { .user-chip .u-meta { display: none; } .user-chip { padding: 4px; } }
@media (max-width: 1200px) { .tb-titles p, .tb-titles .crumbs { display: none; } }
@media (max-width: 640px) {
  .page-head { flex-direction: column; align-items: stretch; gap: 12px; }
  .page-head .actions { justify-content: flex-start; }
  .page-head .actions .btn { flex: 1 1 auto; justify-content: center; }
  .text-row .row, .text-meta { flex-wrap: wrap; }
}
.idle-warn { position: fixed; inset: 0; z-index: 160; background: rgba(3,21,18,.5); backdrop-filter: blur(3px); display: grid; place-items: center; padding: 16px; animation: fade .15s; }
.iw-card { display: flex; align-items: center; gap: 16px; background: var(--surface); border-radius: 18px; padding: 22px 24px; box-shadow: var(--shadow-lg); max-width: 520px; border: 1px solid var(--line-2); }
.iw-card > svg.i { width: 36px; height: 36px; color: var(--gold-2); flex: none; }
.iw-card b { font-size: 16px; } .iw-sec { color: var(--red); }

/* ---------------------------------------------------------------- Qo'llanmalar */
.help-btn svg.i { color: var(--gold-2); }
.help-drawer { position: fixed; inset: 0; z-index: 140; }
.help-drawer .hd-back { position: absolute; inset: 0; background: rgba(3,21,18,.35); opacity: 0; transition: opacity .2s; }
.help-drawer .hd-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(440px, 100%); background: var(--surface); box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; transform: translateX(100%); transition: transform .25s cubic-bezier(.2,.8,.2,1); border-left: 1px solid var(--line); }
.help-drawer.on .hd-back { opacity: 1; } .help-drawer.on .hd-panel { transform: none; }
.hd-head { display: flex; align-items: center; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.hd-head h3 { margin: 0; font-size: 18px; } .hd-kicker { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.hd-scroll { flex: 1; overflow: auto; padding: 18px 20px; }
.hd-foot { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line); }
.help-intro { margin: 0 0 16px; line-height: 1.6; color: var(--text-2, inherit); }
.help-steps { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.help-steps li { display: flex; gap: 12px; align-items: flex-start; line-height: 1.55; }
.help-steps li b { display: block; margin-bottom: 2px; }
.hs-n { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px;
  background: var(--gold-soft, rgba(201,162,39,.15)); color: var(--gold-2); }
.help-tips, .help-keys { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; }
.help-tips ul { margin: 6px 0 0; padding-left: 18px; line-height: 1.55; } .help-tips li + li { margin-top: 4px; }
.ht-h { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 13px; } .ht-h svg.i { width: 16px; height: 16px; color: var(--gold-2); }
.kbd-row { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 13px; } .kbd-row span { color: var(--muted); margin-left: 4px; }
kbd { font: 600 11px/1 var(--mono, monospace); padding: 4px 7px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--surface); box-shadow: 0 1px 0 var(--line-2); }
.help-hero { display: flex; gap: 16px; align-items: center; padding: 18px 20px; margin-bottom: 16px; }
.help-hero .input { margin-top: 10px; max-width: 560px; }
.hh-ico { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--gold-soft, rgba(201,162,39,.15)); flex: none; }
.hh-ico svg.i { width: 28px; height: 28px; color: var(--gold-2); }
.help-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 12px; }
.help-card { padding: 14px 16px; cursor: pointer; transition: transform .15s, box-shadow .15s, border-color .15s; min-width: 0; }
.help-card:hover, .help-card:focus-visible { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--gold-2); outline: none; }
.hc-intro { margin-top: 8px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.5; }
.help-edit-row { display: flex; gap: 10px; align-items: flex-start; }
.tour { position: fixed; inset: 0; z-index: 170; }
.tour-hole { position: fixed; border-radius: 12px; box-shadow: 0 0 0 9999px rgba(3,21,18,.55); transition: all .3s cubic-bezier(.2,.8,.2,1); pointer-events: none; outline: 2px solid var(--gold-2); }
.tour-tip { position: fixed; background: var(--surface); border-radius: 14px; padding: 16px; box-shadow: var(--shadow-lg); transition: left .3s, top .3s; line-height: 1.5; border: 1px solid var(--line-2); }
.tour-tip b { display: block; font-size: 15px; margin-bottom: 4px; }
.tt-n { font-size: 11px; color: var(--gold-2); font-weight: 700; letter-spacing: .06em; margin-bottom: 4px; }
.tt-act { display: flex; justify-content: flex-end; gap: 6px; margin-top: 12px; flex-wrap: wrap; }
@media (max-width: 640px) { .help-hero { flex-direction: column; align-items: stretch; } .hh-ico { display: none; } }
@media (max-width: 480px) {
  .page-head .actions .btn, .card-h .btn, .card-b .row > .btn { white-space: normal; text-align: left; height: auto; min-height: 36px; line-height: 1.25; max-width: 100%; }
  .card-h { flex-wrap: wrap; }
}
/* yuklanish skeleti va sahifa almashish animatsiyasi */
.view { animation: viewIn .22s ease-out; }
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.skel-page { display: flex; flex-direction: column; gap: 14px; }
.skel { border-radius: 12px; background: linear-gradient(90deg, var(--surface-3) 25%, var(--surface-2) 50%, var(--surface-3) 75%); background-size: 200% 100%; animation: skel 1.2s infinite linear; }
@keyframes skel { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.sk-h { height: 30px; width: min(320px, 70%); } .sk-sub { height: 14px; width: min(460px, 90%); }
.sk-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 14px; }
.sk-card { height: 110px; } .sk-big { height: 320px; }
@media (prefers-reduced-motion: reduce) { .view, .skel, .help-drawer .hd-panel, .tour-hole, .tour-tip { animation: none !important; transition: none !important; } }
.sys-k { min-width: 0; } .sys-k .stat-big { overflow-wrap: anywhere; min-width: 0; }
@media (max-width: 420px) { .sys-k .stat-big { font-size: 20px; } }

/* ---------------------------------------------------------------- v7: dizayn tuzatishlari */
.input-icon > svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); }
.input-icon svg:not(.input-icon > svg) { position: static; transform: none; }
.input-icon .pw-toggle svg { position: static; transform: none; width: 18px; height: 18px; color: inherit; }
.input-icon.has-toggle .input { padding-right: 46px; }
.pw-toggle { position: absolute; right: 5px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border: 0; border-radius: 9px;
  background: transparent; color: var(--muted); display: grid; place-items: center; cursor: pointer; transition: background .15s, color .15s; }
.pw-toggle:hover { background: var(--surface-3); color: var(--ink); }
.pw-toggle:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 1px; }
.pw-toggle.on { color: var(--gold-2); }
.pw-slash { position: absolute; width: 20px; height: 2px; background: currentColor; border-radius: 2px; transform: rotate(-45deg) scaleX(0); transition: transform .15s; box-shadow: 0 0 0 1.5px var(--surface); }
.pw-toggle:not(.on) .pw-slash { transform: rotate(-45deg) scaleX(0); }
.pw-toggle.on .pw-slash { transform: rotate(-45deg) scaleX(1); }
.chart text.lbl.val { fill: var(--ink); font-weight: 700; font-size: 12px; }
.chart text.lbl.hl { font-size: 12.5px; fill: var(--ink-2, var(--muted)); }
.chart svg { height: auto; max-width: 100%; }
.grid.align-start { align-items: start; }
.dstats { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 10px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.dstat { background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 12px; padding: 10px 12px; min-width: 0; }
.ds-v { font-size: 20px; font-weight: 800; letter-spacing: -.01em; color: var(--ink); }
.ds-l { font-size: 12px; font-weight: 600; color: var(--ink-2); margin-top: 2px; }
.ds-h { font-size: 11px; color: var(--muted); margin-top: 2px; }
.recent-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(360px, 100%), 1fr)); gap: 4px 20px; }
.recent-row { display: flex; align-items: center; gap: 12px; padding: 10px 8px; border-radius: 10px; color: inherit; text-decoration: none; min-width: 0; border-bottom: 1px solid var(--line-2); }
.recent-row:hover { background: var(--surface-2); }
.rr-main { flex: 1; min-width: 0; }
.rr-name { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rr-sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rr-score { display: flex; flex-direction: column; align-items: flex-end; flex: none; }
.rr-score b { font-size: 16px; } .rr-score span { font-size: 11.5px; color: var(--muted); }
.dstats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (min-width: 1700px) { .dstats { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (max-width: 520px) { .dstats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ds-v { font-size: 19px; white-space: nowrap; }

/* ---------------------------------------------------------------- Rahbariyat tahlili */
.export-bar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 16px 18px; margin-bottom: 16px; border-radius: 16px;
  background: linear-gradient(120deg, rgba(20,101,79,.16), rgba(212,167,44,.10)); border: 1px solid rgba(212,167,44,.30); }
.eb-text { display: flex; flex-direction: column; gap: 2px; flex: 1 1 220px; min-width: 0; }
.eb-text b { font-size: 15px; } .eb-text span { font-size: 12.5px; color: var(--muted); }
.eb-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.btn.eb { height: auto; min-height: 50px; padding: 8px 14px 8px 10px; gap: 10px; text-align: left; background: var(--surface); border: 1px solid var(--line); }
.btn.eb > span { display: flex; flex-direction: column; line-height: 1.2; }
.btn.eb b { font-size: 13.5px; } .btn.eb small { font-size: 11px; color: var(--muted); font-weight: 500; }
.btn.eb > svg.i { width: 30px; height: 30px; padding: 6px; border-radius: 9px; flex: none; }
.btn.eb.pptx > svg.i { background: rgba(209,72,54,.14); color: #d14836; }
.btn.eb.pdf > svg.i { background: rgba(200,55,45,.12); color: #c8372d; }
.btn.eb.xlsx > svg.i { background: rgba(31,157,85,.14); color: #1f9d55; }
.btn.eb.docx > svg.i { background: rgba(42,120,214,.14); color: #2a78d6; }
.btn.eb:hover { border-color: var(--gold-2); transform: translateY(-1px); }
.lk-period { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; font-weight: 600; margin-bottom: 12px; color: var(--ink-2); }
.lk-period svg.i { width: 16px; height: 16px; color: var(--gold-2); }
.lk-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 1500px) { .lk-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .lk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .btn.eb { flex: 1 1 100%; } }
.kpi.lk .k-value { font-size: 28px; }
.dl { font-weight: 700; font-size: 12px; } .dl.up { color: var(--green); } .dl.down { color: var(--red); } .dl.flat { color: var(--muted); }
.dl .muted { font-weight: 500; }
.insights { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.insights li { display: flex; gap: 12px; align-items: flex-start; line-height: 1.55; font-size: 14px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line-2); }
.insights li > i { flex: none; width: 10px; height: 10px; border-radius: 50%; margin-top: 6px; }
.insights li.green > i { background: #1f9d55; box-shadow: 0 0 0 4px rgba(31,157,85,.18); }
.insights li.amber > i { background: #d4a72c; box-shadow: 0 0 0 4px rgba(212,167,44,.2); }
.insights li.red > i { background: #c8372d; box-shadow: 0 0 0 4px rgba(200,55,45,.18); }
.insights li.blue > i { background: #2a78d6; box-shadow: 0 0 0 4px rgba(42,120,214,.18); }
.att-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.att-cell { border-radius: 12px; padding: 12px 14px; background: var(--surface-2); border: 1px solid var(--line-2); border-left-width: 4px; display: flex; flex-direction: column; gap: 2px; }
.att-cell b { font-size: 24px; letter-spacing: -.02em; } .att-cell span { font-size: 12px; color: var(--muted); font-weight: 600; }
.att-cell.red { border-left-color: #c8372d; } .att-cell.amber { border-left-color: #d4a72c; } .att-cell.blue { border-left-color: #2a78d6; } .att-cell.green { border-left-color: #1f9d55; }
.att-foot { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 13px; color: var(--ink-2); }
.att-foot svg.i { width: 16px; height: 16px; color: var(--gold-2); }
.mini-h { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: 14px 0 4px; }
.rank-t td, .rank-t th { white-space: nowrap; }
.medal { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font-weight: 800; font-size: 12px; color: #1b1405; }
.medal.m1 { background: linear-gradient(135deg, #f6dd7a, #c8962a); } .medal.m2 { background: linear-gradient(135deg, #eef2f1, #9fb0aa); } .medal.m3 { background: linear-gradient(135deg, #f1b98a, #b06a35); }
.rank { display: inline-grid; place-items: center; width: 26px; height: 26px; font-weight: 700; color: var(--muted); }
.idx { display: flex; align-items: center; gap: 10px; min-width: 150px; }
.idx-bar { flex: 1; height: 8px; border-radius: 6px; background: var(--surface-3); overflow: hidden; }
.idx-bar i { display: block; height: 100%; border-radius: 6px; }
.person { display: flex; align-items: center; gap: 12px; padding: 9px 4px; border-bottom: 1px solid var(--line-2); min-width: 0; }
.person:last-child { border-bottom: 0; }
.sec-title { font-size: 13px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-2); margin-bottom: 12px; display: flex; align-items: center; gap: 12px; }
.sec-title::after { content: ''; flex: 1; height: 1px; background: var(--line); }
/* jadvallar: ism ustunlari siqilib, harflab bo'linib ketmasin */
table.t td:has(> div > .t-name), table.t td:has(> div > b + .t-sub), table.t td:has(> .row > .avatar) { min-width: 220px; }
table.t td:has(> .row > .avatar) .row { flex-wrap: nowrap; }
table.t td .small:has(br) { white-space: nowrap; }
table.t td:has(> .pct), .pct { white-space: nowrap; }
.badge { white-space: nowrap; }
table.t td .t-sub { line-height: 1.35; }
/* ---------------------------------------------------------------- Tasdiqlash paneli */
.modal-f.confirming { background: linear-gradient(90deg, rgba(212,167,44,.12), transparent); animation: cfIn .18s ease-out; }
@keyframes cfIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.cf-q { flex: 1 1 260px; display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14px; min-width: 0; }
.cf-q svg.i { width: 22px; height: 22px; color: var(--gold-2); flex: none; }
.modal-f { flex-wrap: wrap; }

/* ---------------------------------------------------------------- Bildirishnomalar */
.bell-btn, .chat-btn { position: relative; }
.nbadge { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #e5484d; color: #fff;
  font-size: 10.5px; font-weight: 800; display: grid; place-items: center; line-height: 1; box-shadow: 0 0 0 2px var(--surface); pointer-events: none; }
.nbadge.hidden { display: none; }
.nav a .nbadge { position: static; margin-left: auto; box-shadow: none; }
.np-panel { position: fixed; top: 62px; right: 16px; width: min(420px, calc(100vw - 24px)); max-height: min(640px, calc(100vh - 80px)); z-index: 130;
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; overflow: hidden;
  animation: npIn .18s cubic-bezier(.2,.8,.2,1); }
@keyframes npIn { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }
.np-head { display: flex; align-items: center; gap: 6px; padding: 14px 14px 8px 18px; }
.np-head b { font-size: 16px; }
.np-act { border: 0; background: transparent; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; padding: 6px 8px; border-radius: 8px; cursor: pointer; }
.np-act:hover { background: var(--surface-2); color: var(--ink); } .np-act svg.i { width: 16px; height: 16px; }
.np-tabs { display: flex; gap: 6px; padding: 0 14px 10px; border-bottom: 1px solid var(--line); }
.np-tab { border: 1px solid var(--line); background: transparent; color: var(--ink-2); border-radius: 999px; padding: 5px 12px; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.np-tab.on { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.np-perm { margin: 10px 14px 0; border: 1px dashed var(--line-2); background: var(--surface-2); color: var(--ink-2); border-radius: 10px; padding: 8px 10px; display: flex; gap: 8px; align-items: center; font-size: 12.5px; cursor: pointer; }
.np-perm svg.i { width: 15px; height: 15px; color: var(--gold-2); }
.np-list { overflow: auto; flex: 1; padding: 6px; }
.np-item { position: relative; display: flex; gap: 12px; padding: 12px 34px 12px 12px; border-radius: 12px; cursor: pointer; }
.np-item:hover { background: var(--surface-2); }
.np-item.unread { background: rgba(31,157,85,.07); }
.np-item.unread::before { content: ''; position: absolute; left: 4px; top: 50%; width: 5px; height: 5px; border-radius: 50%; background: #1f9d55; transform: translateY(-50%); }
.np-ico { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; flex: none; background: rgba(42,120,214,.14); color: #2a78d6; }
.np-ico svg.i { width: 18px; height: 18px; }
.success > .np-ico { background: rgba(31,157,85,.14); color: #1f9d55; } .warning > .np-ico { background: rgba(212,167,44,.16); color: #c8962a; } .danger > .np-ico { background: rgba(200,55,45,.14); color: #c8372d; }
.np-body { min-width: 0; flex: 1; }
.np-title { font-weight: 700; font-size: 14px; } .np-text { font-size: 13px; color: var(--ink-2); margin-top: 2px; line-height: 1.45; white-space: pre-line; word-break: break-word; }
.np-meta { font-size: 11.5px; color: var(--muted); margin-top: 5px; } .np-link { color: var(--green); font-weight: 600; }
.np-del { position: absolute; right: 6px; top: 8px; width: 26px; height: 26px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; opacity: 0; display: grid; place-items: center; }
.np-item:hover .np-del, .np-del:focus-visible { opacity: 1; } .np-del:hover { background: var(--surface-3); } .np-del svg.i { width: 14px; height: 14px; }
.np-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 40px 20px; color: var(--muted); text-align: center; }
.np-empty svg.i { width: 36px; height: 36px; opacity: .5; } .np-empty b { color: var(--ink); }
.np-foot { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px; border-top: 1px solid var(--line); font-weight: 700; font-size: 13px; color: var(--green); text-decoration: none; }
.np-foot svg.i { width: 16px; height: 16px; }
.npop-box { position: fixed; right: 18px; bottom: 18px; z-index: 180; display: flex; flex-direction: column; gap: 10px; width: min(380px, calc(100vw - 36px)); }
.npop { display: flex; gap: 12px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px; box-shadow: var(--shadow-lg);
  cursor: pointer; animation: npopIn .3s cubic-bezier(.2,.8,.2,1); transition: opacity .3s, transform .3s; }
.npop.out { opacity: 0; transform: translateX(20px); }
@keyframes npopIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.np-txt { flex: 1; min-width: 0; font-size: 13px; color: var(--ink-2); line-height: 1.45; } .np-txt b { display: block; color: var(--ink); font-size: 14px; margin-bottom: 2px; }
.np-x { border: 0; background: transparent; color: var(--muted); cursor: pointer; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; flex: none; }
.np-x svg.i { width: 14px; height: 14px; }
.pwm { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.pwm-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; flex: 1; max-width: 220px; }
.pwm-bar i { height: 5px; border-radius: 3px; background: var(--surface-3); transition: background .2s; }
.pwm-txt { font-size: 12px; font-weight: 700; color: var(--muted); min-width: 70px; }
.pwm[data-s="0"] i:nth-child(-n+1), .pwm[data-s="1"] i:nth-child(-n+1) { background: #c8372d; }
.pwm[data-s="2"] i:nth-child(-n+2) { background: #d4a72c; }
.pwm[data-s="3"] i:nth-child(-n+3) { background: #5bbf85; }
.pwm[data-s="4"] i { background: #1f9d55; }
.pwm[data-s="0"] .pwm-txt, .pwm[data-s="1"] .pwm-txt { color: #c8372d; } .pwm[data-s="4"] .pwm-txt { color: #1f9d55; }

/* ---------------------------------------------------------------- Foydalanuvchilar va rollar */
.stat-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.stat-chip { display: flex; align-items: baseline; gap: 8px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; font: inherit; }
.stat-chip b { font-size: 20px; letter-spacing: -.02em; } .stat-chip span { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.stat-chip.static { cursor: default; }
.stat-chip.green b { color: var(--green); } .stat-chip.red b { color: var(--red); } .stat-chip.amber b { color: #c8962a; } .stat-chip.dark b { color: var(--muted); }
button.stat-chip:hover { border-color: var(--gold-2); }
.avatar.ring { position: relative; box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--ring, #14654f); }
.avatar .online { position: absolute; right: -2px; bottom: -2px; width: 11px; height: 11px; border-radius: 50%; background: #22c55e; border: 2px solid var(--surface); }
.badge.role { background: color-mix(in srgb, var(--rc) 16%, transparent); color: var(--rc); border: 1px solid color-mix(in srgb, var(--rc) 35%, transparent); font-weight: 700; }
[data-theme="dark"] .badge.role { color: color-mix(in srgb, var(--rc) 70%, white); }
.sec-flags { display: flex; flex-wrap: wrap; gap: 4px; }
.badge.amber { background: rgba(212,167,44,.16); color: #b8860b; } [data-theme="dark"] .badge.amber { color: #f0c75e; }
.uform { display: flex; flex-direction: column; gap: 16px; }
.fsec { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; background: var(--surface-2); }
.fsec-h { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); margin-bottom: 12px; }
.fsec-h svg.i { width: 16px; height: 16px; color: var(--gold-2); }
.role-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr)); gap: 8px; }
.rp { display: flex; align-items: center; gap: 10px; text-align: left; padding: 10px 12px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; font: inherit; min-width: 0; }
.rp > i { width: 10px; height: 34px; border-radius: 4px; flex: none; }
.rp > div { display: flex; flex-direction: column; min-width: 0; flex: 1; } .rp b { font-size: 13.5px; } .rp span { font-size: 11.5px; color: var(--muted); }
.rp.on { border-color: var(--green); background: rgba(31,157,85,.08); } .rp.on > svg.i { color: var(--green); width: 18px; height: 18px; flex: none; }
.rp.off { opacity: .45; cursor: not-allowed; }
.rp:not(.off):hover { border-color: var(--gold-2); }
.cred-card { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.cred-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line-2); }
.cred-row:last-child { border-bottom: 0; } .cred-row > span { width: 130px; font-size: 12.5px; color: var(--muted); font-weight: 600; flex: none; }
.cred-row > b { flex: 1; word-break: break-all; } .cred-row > b.big { font-size: 17px; letter-spacing: .02em; }
.role-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(330px, 100%), 1fr)); gap: 14px; margin-top: 14px; }
.role-card { padding: 18px; display: flex; flex-direction: column; gap: 12px; border-top: 4px solid var(--rc); }
.rc-top { display: flex; align-items: center; gap: 12px; }
.rc-ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--rc) 16%, transparent); color: var(--rc); flex: none; }
.rc-ico svg.i { width: 20px; height: 20px; }
.rc-name { font-weight: 800; font-size: 16px; } .rc-sub { font-size: 12px; color: var(--muted); }
.rc-desc { margin: 0; font-size: 13px; color: var(--ink-2); line-height: 1.5; min-height: 2.6em; }
.rc-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.rc-stats > div { background: var(--surface-2); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; }
.rc-stats b { font-size: 18px; } .rc-stats span { font-size: 11.5px; color: var(--muted); }
.rc-mods { display: flex; flex-wrap: wrap; gap: 4px; } .rc-mods span { font-size: 11px; padding: 3px 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line-2); color: var(--ink-2); }
.rc-mods .more { font-weight: 700; }
.rc-acts { display: flex; gap: 6px; align-items: center; margin-top: auto; flex-wrap: wrap; }
.scope-seg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.seg-b { text-align: left; padding: 10px 12px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; font: inherit; display: flex; flex-direction: column; }
.seg-b b { font-size: 13.5px; } .seg-b span { font-size: 11.5px; color: var(--muted); }
.seg-b.on { border-color: var(--green); background: rgba(31,157,85,.08); }
.swatches { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; min-height: 40px; }
.rsw { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line); cursor: pointer; }
.rsw.on { box-shadow: 0 0 0 2px var(--ink); }
.pm-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; } .pm-head > b { font-size: 15px; }
.pm-count { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.pm { display: flex; flex-direction: column; gap: 12px; }
.pm-group { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.pm-gh { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 14px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.pm-gh b { font-size: 12.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--gold-2); }
.pm-row { display: grid; grid-template-columns: minmax(180px, 240px) 1fr; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line-2); align-items: center; }
.pm-row:last-child { border-bottom: 0; }
.pm-mod { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 13.5px; cursor: pointer; }
.pm-mod em { font-style: normal; font-weight: 500; font-size: 11px; color: var(--muted); }
.pm-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.pm-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line); font-size: 12.5px; cursor: pointer; user-select: none; background: var(--surface); }
.pm-chip input { margin: 0; accent-color: #1f9d55; }
.pm-chip.on { border-color: rgba(31,157,85,.5); background: rgba(31,157,85,.1); color: var(--ink); font-weight: 600; }
.pm-chip.dis { opacity: .4; cursor: not-allowed; }
@media (max-width: 720px) { .pm-row { grid-template-columns: 1fr; } .scope-seg { grid-template-columns: 1fr; } }
.kind-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.kp { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink-2); font: inherit; font-weight: 600; font-size: 13px; cursor: pointer; }
.kp svg.i { width: 16px; height: 16px; }
.kp.info.on { border-color: #2a78d6; background: rgba(42,120,214,.1); color: #2a78d6; } .kp.success.on { border-color: #1f9d55; background: rgba(31,157,85,.1); color: #1f9d55; }
.kp.warning.on { border-color: #d4a72c; background: rgba(212,167,44,.12); color: #b8860b; } .kp.danger.on { border-color: #c8372d; background: rgba(200,55,45,.1); color: #c8372d; }
.np-tabs.tgt { border: 0; padding: 0 0 10px; flex-wrap: wrap; } .np-tabs.tgt .np-tab { display: inline-flex; gap: 6px; align-items: center; } .np-tab svg.i { width: 14px; height: 14px; }
.pick-list { max-height: 280px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; padding: 4px; background: var(--surface); }
.pick-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; cursor: pointer; }
.pick-item:hover { background: var(--surface-2); } .pick-item.on { background: rgba(31,157,85,.08); }
.pick-item > div { display: flex; flex-direction: column; min-width: 0; } .pick-item b { font-size: 13.5px; } .pick-item span { font-size: 11.5px; color: var(--muted); }
.pick-item .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.npv-h { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 10px; }
.npop.static { animation: none; cursor: default; box-shadow: var(--shadow); }
.npv-to { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 13px; font-weight: 600; color: var(--ink-2); } .npv-to svg.i { width: 16px; height: 16px; color: var(--gold-2); }
.sticky-card { position: sticky; top: 12px; }

/* ---------------------------------------------------------------- Kadrlar chati */
.view-chat { height: calc(100vh - 118px); min-height: 480px; }
.chat { position: relative; display: grid; grid-template-columns: 330px minmax(0, 1fr); height: 100%; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; background: var(--surface); box-shadow: var(--shadow); }
.chat.with-info.has-cur { grid-template-columns: 330px minmax(0, 1fr) 300px; }
.c-side { display: flex; flex-direction: column; border-right: 1px solid var(--line); min-height: 0; background: var(--surface); }
.c-side-h { display: flex; align-items: center; gap: 6px; padding: 16px 14px 10px 18px; } .c-side-h b { font-size: 18px; letter-spacing: -.01em; }
.icon-btn.primary { background: var(--green); color: #fff; border-color: transparent; }
.c-search { position: relative; margin: 0 14px 10px; } .c-search > svg.i { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--muted); }
.c-search .input { padding-left: 34px; border-radius: 12px; }
.c-list { flex: 1; overflow: auto; padding: 4px 8px 10px; }
.c-item { width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px; border: 0; border-radius: 14px; background: transparent; color: inherit; cursor: pointer; text-align: left; font: inherit; }
.c-item:hover { background: var(--surface-2); }
.c-item.on { background: linear-gradient(90deg, rgba(31,157,85,.16), rgba(31,157,85,.06)); }
.c-mid { flex: 1; min-width: 0; }
.c-t { display: flex; align-items: center; gap: 5px; font-weight: 700; font-size: 14px; } .c-t span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-t svg.i { width: 13px; height: 13px; color: var(--muted); flex: none; }
.c-p { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; } .c-p b { color: var(--ink-2); font-weight: 600; }
.c-item.unread .c-p { color: var(--ink); font-weight: 600; }
.c-end { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; flex: none; }
.c-time { font-size: 11px; color: var(--muted); }
.c-badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--green); color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; }
.c-badge.muted { background: var(--muted); }
.c-sec { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 12px 10px 6px; }
.c-empty-list { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 40px 16px; color: var(--muted); }
.c-empty-list svg.i { width: 34px; height: 34px; opacity: .5; } .c-empty-list b { color: var(--ink); }
.c-av { position: relative; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 14.5px; flex: none; letter-spacing: .02em; }
.c-av.sm { width: 32px; height: 32px; font-size: 11.5px; } .c-av.xl { width: 76px; height: 76px; font-size: 24px; }
.c-av.grp { border-radius: 14px; } .c-av.grp svg.i { width: 20px; height: 20px; } .c-av.grp.xl { border-radius: 22px; } .c-av.grp.xl svg.i { width: 32px; height: 32px; }
.c-av .on { position: absolute; right: 0; bottom: 0; width: 12px; height: 12px; border-radius: 50%; background: #22c55e; border: 2px solid var(--surface); }
.c-av.sm .on { width: 9px; height: 9px; }
.c-main { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0;
  background: radial-gradient(circle at 20% 10%, rgba(31,157,85,.05), transparent 40%), radial-gradient(circle at 90% 90%, rgba(212,167,44,.05), transparent 40%), var(--bg); }
.c-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--surface); min-height: 68px; }
.c-head:empty { display: none; }
.c-back { display: none; }
.c-hmeta { display: flex; flex-direction: column; min-width: 0; } .c-hmeta b { font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-hmeta span { font-size: 12px; color: var(--muted); } .c-hmeta span.online { color: #22c55e; font-weight: 600; }
.icon-btn.on { color: var(--green); border-color: var(--green); }
.c-tw { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; }
.c-thread { flex: 1; overflow: auto; padding: 18px 20px 8px; display: flex; flex-direction: column; gap: 2px; scroll-behavior: auto; }
.c-typing { min-height: 22px; padding: 0 24px 4px; font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.dots { display: inline-flex; gap: 3px; } .dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--green); animation: dot 1s infinite; }
.dots i:nth-child(2) { animation-delay: .15s; } .dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.c-day { display: flex; justify-content: center; margin: 14px 0 8px; } .c-day span { font-size: 11.5px; font-weight: 700; color: var(--ink-2); background: var(--surface); border: 1px solid var(--line); padding: 4px 12px; border-radius: 999px; }
.c-sys { align-self: center; font-size: 12px; color: var(--muted); background: var(--surface-2); padding: 5px 12px; border-radius: 999px; margin: 6px 0; text-align: center; max-width: 80%; }
.c-msg { position: relative; display: flex; align-items: flex-end; gap: 8px; margin-top: 8px; max-width: 100%; }
.c-msg.grouped { margin-top: 2px; }
.c-msg.mine { flex-direction: row-reverse; }
.c-avsp { width: 32px; flex: none; } .c-msg.mine .c-avsp { display: none; }
.c-bub { position: relative; max-width: min(620px, 72%); padding: 8px 12px 6px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 1px 2px rgba(0,0,0,.04); min-width: 70px; }
.c-msg:not(.mine) .c-bub { border-bottom-left-radius: 6px; } .c-msg.mine .c-bub { border-bottom-right-radius: 6px; }
.c-msg.mine .c-bub { background: linear-gradient(135deg, #1f9d55, #17834a); color: #fff; border-color: transparent; }
.c-msg.grouped:not(.mine) .c-bub { border-top-left-radius: 8px; } .c-msg.grouped.mine .c-bub { border-top-right-radius: 8px; }
.c-bub.deleted { background: transparent !important; border: 1px dashed var(--line) !important; color: var(--muted) !important; font-style: italic; box-shadow: none; }
.c-bub.deleted .c-text svg.i { width: 14px; height: 14px; vertical-align: -2px; }
.c-name { font-size: 12.5px; font-weight: 800; margin-bottom: 2px; }
.c-text { font-size: 14.5px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.c-text a { color: inherit; text-decoration: underline; }
.c-meta { display: flex; justify-content: flex-end; align-items: center; gap: 5px; font-size: 10.5px; opacity: .7; margin-top: 2px; }
.c-tick svg.i { width: 15px; height: 15px; } .c-tick.read { color: #b9f6d0; opacity: 1; }
.c-quote { display: flex; flex-direction: column; text-align: left; width: 100%; border: 0; border-left: 3px solid currentColor; background: rgba(127,127,127,.12); border-radius: 8px; padding: 5px 9px; margin: 2px 0 6px; cursor: pointer; color: inherit; font: inherit; }
.c-quote b { font-size: 12px; } .c-quote span { font-size: 12.5px; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.c-msg:not(.mine) .c-quote { border-left-color: var(--green); }
.c-img { display: block; border: 0; padding: 0; margin: 2px 0 4px; border-radius: 12px; overflow: hidden; cursor: zoom-in; background: rgba(0,0,0,.08); max-width: 320px; }
.c-img img { display: block; max-width: 100%; max-height: 320px; object-fit: cover; }
.c-file { display: flex; align-items: center; gap: 10px; padding: 8px 10px; margin: 2px 0 4px; border-radius: 12px; background: rgba(127,127,127,.12); color: inherit; text-decoration: none; min-width: 220px; }
.c-file > div:nth-child(2) { flex: 1; min-width: 0; display: flex; flex-direction: column; } .c-file b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .c-file span { font-size: 11.5px; opacity: .8; }
.cf-ico { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: rgba(255,255,255,.22); flex: none; }
.c-msg:not(.mine) .cf-ico { background: rgba(31,157,85,.14); color: var(--green); }
.c-file > svg.i { width: 18px; height: 18px; opacity: .8; }
.c-acts { display: flex; gap: 2px; opacity: 0; transition: opacity .12s; align-self: center; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 2px; box-shadow: var(--shadow); }
.c-msg:hover .c-acts, .c-acts:focus-within { opacity: 1; }
.c-acts button { width: 28px; height: 28px; border: 0; border-radius: 8px; background: transparent; color: var(--ink-2); cursor: pointer; display: grid; place-items: center; }
.c-acts button:hover { background: var(--surface-2); color: var(--ink); } .c-acts button.del:hover { color: var(--red); } .c-acts svg.i { width: 15px; height: 15px; }
.c-msg.flash .c-bub { animation: flash 1.4s ease; }
@keyframes flash { 0%, 60% { box-shadow: 0 0 0 4px rgba(212,167,44,.65); } 100% { box-shadow: none; } }
.c-more { align-self: center; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); border-radius: 999px; padding: 6px 14px; font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; margin-bottom: 8px; }
.c-first, .c-welcome { margin: auto; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; max-width: 440px; padding: 24px; color: var(--muted); }
.c-first svg.i { width: 40px; height: 40px; opacity: .45; } .c-first b { color: var(--ink); font-size: 16px; }
.c-welcome h2 { margin: 6px 0 0; color: var(--ink); } .c-welcome p { line-height: 1.6; margin: 0 0 8px; }
.cw-ico { width: 86px; height: 86px; border-radius: 28px; display: grid; place-items: center; background: linear-gradient(135deg, #1f9d55, #0b5a4a); color: #fff; box-shadow: 0 18px 40px rgba(31,157,85,.35); }
.cw-ico svg.i { width: 42px; height: 42px; }
.c-bar { background: var(--surface); border-top: 1px solid var(--line); }
.c-bar:empty { display: none; }
.c-ctx { display: flex; align-items: center; gap: 10px; padding: 8px 16px; border-bottom: 1px solid var(--line-2); }
.c-ctx > svg.i { width: 18px; height: 18px; color: var(--green); flex: none; } .c-ctx.edit > svg.i { color: var(--gold-2); }
.c-ctx > div { flex: 1; min-width: 0; display: flex; flex-direction: column; border-left: 3px solid var(--green); padding-left: 10px; }
.c-ctx.edit > div { border-left-color: var(--gold-2); }
.c-ctx b { font-size: 12.5px; } .c-ctx span { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-compose { display: flex; align-items: flex-end; gap: 6px; padding: 10px 12px; }
.c-input { flex: 1; resize: none; border: 1px solid var(--line); border-radius: 16px; padding: 10px 14px; font: inherit; font-size: 14.5px; line-height: 1.45; background: var(--surface-2); color: var(--ink); max-height: 180px; min-height: 44px; outline: none; }
.c-input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(31,157,85,.15); }
.c-send { width: 44px; height: 44px; border-radius: 50%; border: 0; background: linear-gradient(135deg, #22b462, #17834a); color: #fff; display: grid; place-items: center; cursor: pointer; flex: none; box-shadow: 0 8px 18px rgba(31,157,85,.35); transition: transform .12s; }
.c-send:hover { transform: scale(1.05); } .c-send:disabled { opacity: .6; } .c-send svg.i { width: 19px; height: 19px; }
.c-emoji-w { position: relative; }
.c-emoji { position: absolute; bottom: 48px; left: 0; z-index: 5; display: grid; grid-template-columns: repeat(5, 36px); gap: 2px; padding: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); }
.c-emoji.hidden { display: none; }
.c-emoji button { width: 36px; height: 36px; border: 0; background: transparent; border-radius: 8px; font-size: 20px; cursor: pointer; } .c-emoji button:hover { background: var(--surface-2); }
.c-drop { position: absolute; inset: 0; display: none; place-items: center; align-content: center; gap: 10px; background: rgba(31,157,85,.12); border: 3px dashed var(--green); border-radius: 0; color: var(--green); font-weight: 800; font-size: 16px; z-index: 6; pointer-events: none; }
.c-drop svg.i { width: 40px; height: 40px; }
.chat.drag .c-drop { display: grid; }
.c-info { display: none; border-left: 1px solid var(--line); overflow: auto; background: var(--surface); }
.chat.with-info.has-cur .c-info { display: block; }
.ci-top { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 24px 16px 16px; text-align: center; border-bottom: 1px solid var(--line); }
.ci-top b { font-size: 16px; margin-top: 6px; } .ci-top > span:not(.badge) { font-size: 12.5px; color: var(--muted); }
.ci-sec { padding: 14px 16px; border-bottom: 1px solid var(--line-2); }
.ci-sec.acts { display: flex; flex-direction: column; gap: 8px; border-bottom: 0; }
.ci-h { display: flex; align-items: center; justify-content: space-between; font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 10px; }
.ci-mem { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.ci-mem > div:nth-child(2) { flex: 1; min-width: 0; display: flex; flex-direction: column; } .ci-mem b { font-size: 13px; } .ci-mem span { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn.sm { width: 28px; height: 28px; } .icon-btn.sm svg.i { width: 14px; height: 14px; }
.ci-file { display: flex; align-items: center; gap: 10px; padding: 7px 0; color: inherit; text-decoration: none; }
.ci-file > svg.i { width: 30px; height: 30px; padding: 7px; border-radius: 9px; background: rgba(31,157,85,.12); color: var(--green); flex: none; }
.ci-file > div { min-width: 0; display: flex; flex-direction: column; } .ci-file b { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .ci-file span { font-size: 11px; color: var(--muted); }
.ci-file:hover b { color: var(--green); }
.pick-list.tall { max-height: 380px; }
button.pick-item { width: 100%; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; }
.pick-item .badge { margin-left: auto; }
.lightbox-chat { position: fixed; inset: 0; z-index: 200; background: rgba(2,12,11,.92); display: grid; place-items: center; padding: 30px 30px 80px; cursor: zoom-out; animation: fade .15s; }
.lightbox-chat img { max-width: 96vw; max-height: 82vh; border-radius: 10px; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.lb-bar { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; background: rgba(0,0,0,.5); padding: 8px 10px 8px 16px; border-radius: 14px; color: #fff; cursor: default; }
.c-loading { display: flex; flex-direction: column; gap: 12px; padding: 20px; }
@media (max-width: 1100px) { .chat.with-info.has-cur { grid-template-columns: 300px minmax(0, 1fr); } .chat.with-info.has-cur .c-info { position: absolute; right: 0; top: 0; bottom: 0; width: 300px; z-index: 7; box-shadow: var(--shadow-lg); } }
@media (max-width: 820px) {
  .view-chat { height: calc(100vh - 92px); }
  .chat, .chat.with-info.has-cur { grid-template-columns: 1fr; border-radius: 14px; }
  .chat.has-cur .c-side { display: none; } .chat:not(.has-cur) .c-main { display: none; }
  .c-back { display: inline-grid; } .c-bub { max-width: 84%; } .c-thread { padding: 12px 10px 6px; }
  .c-acts { position: absolute; top: -30px; right: 6px; } .c-msg.mine .c-acts { right: auto; left: 6px; }
}
@media (max-width: 640px) { .topbar .chat-btn { display: none; } }
@media (max-width: 480px) { .topbar .help-btn, .topbar .script-btn { display: none; } }

/* ---------------------------------------------------------------- v9: yakuniy sayqal */
.cell-wide { min-width: 230px; max-width: 320px; }
.cell-q { min-width: 300px; max-width: 560px; }
.cell-q > div:first-child { font-weight: 500; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.badge.outline { background: transparent; border: 1px dashed var(--line-2); color: var(--muted); }
.sys-k .stat-big { font-size: clamp(22px, 2.1vw, 34px); white-space: nowrap; }
@media (max-width: 1500px) { .user-chip .u-meta { display: none; } .user-chip { padding-right: 4px; } }

/* ---- Kirish sahifasi: 50/50 va harakat tugmalari ---- */
.login-box { width: min(460px, 100%); }
.login-or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 11.5px; margin: 22px 0 12px; text-transform: uppercase; letter-spacing: .14em; }
.login-or::before, .login-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.login-actions { display: flex; flex-direction: column; gap: 10px; }
.login-act { display: flex; align-items: center; gap: 14px; padding: 13px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface);
  color: var(--ink); text-decoration: none !important; transition: transform .15s, box-shadow .15s, border-color .15s; position: relative; overflow: hidden; }
.login-act::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 40%, rgba(212,167,44,.10) 50%, transparent 60%); transform: translateX(-100%); transition: transform .6s; }
.login-act:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--gold); }
.login-act:hover::after { transform: translateX(100%); }
.login-act .la-ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--green-soft); color: var(--green); }
.login-act .la-ico svg { width: 22px; height: 22px; }
.login-act.gold .la-ico { background: var(--gold-soft); color: var(--gold-2); }
.login-act .la-t { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.login-act .la-t b { font-size: 14.5px; }
.login-act .la-t small { font-size: 12px; color: var(--muted); }
.login-act .la-go { margin-left: auto; color: var(--muted); transition: transform .15s; }
.login-act:hover .la-go { transform: translateX(3px); color: var(--gold-2); }
.login-links { display: flex; justify-content: center; gap: 18px; margin-top: 14px; font-size: 12.5px; }
.login-links a { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.login-links a:hover { color: var(--green-600); }
.login-links svg { width: 15px; height: 15px; }

/* ---- v12: faollik muddati, kompyuter kalitlari ---- */
.seg-btns { display: inline-flex; gap: 4px; padding: 3px; border-radius: 11px; background: var(--surface-3); width: max-content; }
.seg-btns button { display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; padding: 6px 12px; border-radius: 8px; font-weight: 600; font-size: 13px; color: var(--muted); cursor: pointer; }
.seg-btns button svg { width: 15px; height: 15px; }
.seg-btns button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.period-box { border: 1px dashed var(--line); border-radius: 12px; padding: 10px 12px; background: var(--surface-2); }
.chips-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-btn { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 4px 11px; font-size: 12.5px; font-weight: 600; cursor: pointer; color: var(--ink-2); }
.chip-btn:hover { border-color: var(--green); color: var(--green-600); }
.access-sw { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.access-sw.on { border-color: rgba(31,157,85,.45); box-shadow: 0 0 0 3px rgba(31,157,85,.08); }
.access-sw .ai { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--surface-3); color: var(--muted); flex: none; }
.access-sw.on .ai { background: var(--green-soft); color: var(--green); }
.access-sw .ai svg { width: 20px; height: 20px; }
.access-sw input { width: 42px; height: 24px; appearance: none; border-radius: 999px; background: var(--line); position: relative; cursor: pointer; flex: none; transition: background .15s; }
.access-sw input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s; }
.access-sw input:checked { background: var(--green); }
.access-sw input:checked::after { transform: translateX(18px); }
.access-sw input:disabled { opacity: .5; cursor: not-allowed; }
tr.row-dim td { opacity: .6; }
.qr-white { background: #fff; border-radius: 14px; padding: 10px; box-shadow: var(--shadow-sm); border: 1px solid var(--line); }
.link-box { padding: 9px 11px; border-radius: 10px; background: var(--surface-3); word-break: break-all; }
.dev-steps { display: grid; gap: 8px; }
.dev-steps > div { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; }
.dev-steps b { width: 24px; height: 24px; border-radius: 50%; background: var(--gold-soft); color: var(--gold-2); display: grid; place-items: center; flex: none; font-size: 12px; }
.fmt-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.fmt-opt { border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px; cursor: pointer; background: var(--surface); transition: all .12s; }
.fmt-opt b { display: block; font-size: 13.5px; }
.fmt-opt .mono { font-size: 12px; color: var(--muted); }
.fmt-opt.on { border-color: var(--green); background: var(--green-soft); }
.fmt-preview { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 10px 12px; border-radius: 12px; background: var(--em-900); color: #eaf6f1; }
.fmt-preview .mono { font-size: 15px; font-weight: 800; letter-spacing: .05em; color: var(--gold-3); }
.fmt-warn { font-size: 12.5px; color: var(--amber); display: flex; gap: 6px; align-items: center; }
.fmt-warn svg { width: 15px; height: 15px; }

/* v13: real vaqt */
.live-stale{position:fixed;left:50%;bottom:22px;transform:translateX(-50%);z-index:900;display:flex;align-items:center;gap:10px;padding:8px 8px 8px 14px;border-radius:12px;background:var(--surface,#fff);border:1px solid var(--line,#e3e6ea);box-shadow:0 10px 30px rgba(15,23,42,.18);font-size:13.5px;animation:lsIn .25s ease}
.live-stale>svg{width:16px;height:16px;color:var(--accent,#0f766e)}
@keyframes lsIn{from{opacity:0;transform:translate(-50%,10px)}to{opacity:1;transform:translate(-50%,0)}}
.rt-dot{display:inline-block;width:8px;height:8px;border-radius:50%;background:#9aa3ad;margin-right:6px;vertical-align:middle}
body.live-on .rt-dot{background:#16a34a;box-shadow:0 0 0 0 rgba(22,163,74,.5);animation:livePulse 2s infinite}
@keyframes livePulse{0%{box-shadow:0 0 0 0 rgba(22,163,74,.45)}70%{box-shadow:0 0 0 7px rgba(22,163,74,0)}100%{box-shadow:0 0 0 0 rgba(22,163,74,0)}}
