/* JalolBooks boshqaruv paneli – yagona dizayn tizimi (DESIGN_SPEC.md §2–§4).
   CSP: default-src 'self' – tashqi shrift/rasm yo‘q, inline style yo‘q.
   Hamma o‘lchamlar 4px setkada. Rang faqat tokenlar orqali. */

/* ───────────── 1. Tokenlar ───────────── */
:root {
  color-scheme: light;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  --mono: ui-monospace, "Cascadia Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;

  --bg: #f5f5f2;
  --surface: #ffffff;
  --surface-2: #f1f0ec;
  --surface-3: #e7e6e1;
  --line: #e3e1db;
  --line-strong: #cfcdc6;
  --text: #1b1c1e;
  --text-2: #56575c;
  --text-3: #6b6c71;
  --scrim: rgba(20, 20, 24, .38);
  --shadow-1: 0 1px 2px rgba(20, 20, 24, .06);
  --shadow-2: 0 8px 28px rgba(20, 20, 24, .14), 0 1px 3px rgba(20, 20, 24, .08);

  --accent: #2457c5;
  --accent-hover: #1d4aa9;
  --accent-soft: #e8eefb;
  --on-accent: #ffffff;
  --focus: #2457c5;

  --ok: #1d7544;      --ok-soft: #e3f2e8;
  --warn: #8f5600;    --warn-soft: #fbefd8;
  --bad: #b42318;     --bad-soft: #fbe7e5;
  --info: #2457c5;    --info-soft: #e8eefb;

  /* Bosqichlar (2026-10-16): 🛒 → (⏳) → 📝 → 🏤 → 📦 + 🌱 lid – hamma joyda bir xil (chip, badge, timeline, voronka) */
  --st-lead: #1d7544;   --st-lead-soft: #e3f2e8;
  --st-await: #5c636d;  --st-await-soft: #eef0f2;
  --st-check: #8f5600;  --st-check-soft: #fbefd8;
  --st-ready: #6a3ed2;  --st-ready-soft: #efe9fc;
  --st-post: #9b2f6a;   --st-post-soft: #fae8f1;
  --st-ship: #0e7166;   --st-ship-soft: #ddf2ee;
  --st-cancel: #9a2a22; --st-cancel-soft: #f8e9e7;
  --st-replaced: #85868b; --st-replaced-soft: #efeeea;

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-pill: 999px;

  --side-w: 232px;
  --top-h: 56px;
  --bnav-h: 60px;
  --gutter: 24px;
  --drawer-w: 600px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #111214; --surface: #1a1b1e; --surface-2: #222327; --surface-3: #2c2d32;
    --line: #2e3035; --line-strong: #3e4046;
    --text: #ececea; --text-2: #abacb0; --text-3: #8f9197;
    --scrim: rgba(0, 0, 0, .55);
    --shadow-1: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-2: 0 10px 32px rgba(0, 0, 0, .55), 0 1px 3px rgba(0, 0, 0, .4);
    --accent: #7ea4ff; --accent-hover: #9bb8ff; --accent-soft: #1c2742; --on-accent: #0c1530; --focus: #9bb8ff;
    --ok: #5fcb8e; --ok-soft: #15301f;
    --warn: #e9b158; --warn-soft: #362812;
    --bad: #ff8c80; --bad-soft: #3a1b19;
    --info: #7ea4ff; --info-soft: #1c2742;
    --st-lead: #5fcb8e; --st-lead-soft: #15301f;
    --st-await: #a2a9b3; --st-await-soft: #24272c;
    --st-check: #e9b158; --st-check-soft: #362812;
    --st-ready: #b39dff; --st-ready-soft: #2a2245;
    --st-post: #f293c6; --st-post-soft: #3a1d2c;
    --st-ship: #4fc9b5; --st-ship-soft: #12302c;
    --st-cancel: #f08a80; --st-cancel-soft: #33201e;
    --st-replaced: #7c7e84; --st-replaced-soft: #26272b;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111214; --surface: #1a1b1e; --surface-2: #222327; --surface-3: #2c2d32;
  --line: #2e3035; --line-strong: #3e4046;
  --text: #ececea; --text-2: #abacb0; --text-3: #8f9197;
  --scrim: rgba(0, 0, 0, .55);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-2: 0 10px 32px rgba(0, 0, 0, .55), 0 1px 3px rgba(0, 0, 0, .4);
  --accent: #7ea4ff; --accent-hover: #9bb8ff; --accent-soft: #1c2742; --on-accent: #0c1530; --focus: #9bb8ff;
  --ok: #5fcb8e; --ok-soft: #15301f;
  --warn: #e9b158; --warn-soft: #362812;
  --bad: #ff8c80; --bad-soft: #3a1b19;
  --info: #7ea4ff; --info-soft: #1c2742;
  --st-lead: #5fcb8e; --st-lead-soft: #15301f;
  --st-await: #a2a9b3; --st-await-soft: #24272c;
  --st-check: #e9b158; --st-check-soft: #362812;
  --st-ready: #b39dff; --st-ready-soft: #2a2245;
  --st-post: #f293c6; --st-post-soft: #3a1d2c;
  --st-ship: #4fc9b5; --st-ship-soft: #12302c;
  --st-cancel: #f08a80; --st-cancel-soft: #33201e;
  --st-replaced: #7c7e84; --st-replaced-soft: #26272b;
}

/* ───────────── 2. Asos ───────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 15px/22px var(--font);
  font-variant-numeric: tabular-nums;
}
h1, h2, h3, h4, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.mono { font-family: var(--mono); font-size: 13px; letter-spacing: .02em; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.nowrap { white-space: nowrap; }
.ell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.money { white-space: nowrap; font-variant-numeric: tabular-nums; }
.t-sm { font-size: 13px; line-height: 18px; }
.t-xs { font-size: 12px; line-height: 16px; }
.t-strong { font-weight: 600; }
.grow { flex: 1 1 auto; min-width: 0; }
.row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.row.wrap { flex-wrap: wrap; }
.stack { display: grid; gap: 16px; min-width: 0; }
.stack-sm { display: grid; gap: 8px; min-width: 0; }
kbd {
  display: inline-block; min-width: 20px; height: 20px; padding: 0 5px;
  border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 4px;
  background: var(--surface); color: var(--text-2);
  font: 600 11px/17px var(--font); text-align: center;
}

/* ───────────── 3. Qobiq (shell) ───────────── */
.app { min-height: 100vh; display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); }
.side { position: relative; z-index: 30; background: var(--surface); border-right: 1px solid var(--line); min-width: 0; }
.side-inner { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; }
.brand { height: var(--top-h); display: flex; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 1px solid var(--line); flex: none; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 8px; flex: none;
  background: var(--accent); color: var(--on-accent);
  display: grid; place-items: center; font-weight: 700; font-size: 14px;
}
.brand-name { font-weight: 700; font-size: 15px; line-height: 18px; }
.brand-sub { font-size: 12px; line-height: 16px; color: var(--text-3); }
.nav { padding: 12px 8px; display: grid; gap: 2px; overflow-y: auto; flex: 1 1 auto; align-content: start; }
.nav-group { padding: 16px 12px 6px; font-size: 12px; line-height: 16px; font-weight: 600; color: var(--text-3); }
.nav a {
  height: 40px; display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; align-items: center; gap: 6px;
  padding: 0 8px 0 10px; border-radius: var(--r-md);
  color: var(--text-2); font-weight: 500; text-decoration: none;
}
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.nav .ico { font-size: 17px; text-align: center; }
.nav .lbl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.count {
  justify-self: end; min-width: 24px; height: 20px; padding: 0 6px; border-radius: var(--r-pill);
  font-size: 12px; line-height: 20px; font-weight: 700; text-align: center;
  background: var(--surface-3); color: var(--text-2);
}
.count.warn { background: var(--warn-soft); color: var(--warn); }
.count.ready { background: var(--st-ready-soft); color: var(--st-ready); }
.count.post { background: var(--st-post-soft); color: var(--st-post); }
.count.zero { visibility: hidden; }
.side-foot { padding: 12px 16px; border-top: 1px solid var(--line); font-size: 13px; line-height: 18px; flex: none; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); margin-right: 6px; vertical-align: 1px; }
.dot.bad { background: var(--bad); }
.dot.warn { background: var(--warn); }

.main { min-width: 0; }
.top {
  position: sticky; top: 0; z-index: 20; height: var(--top-h);
  display: flex; align-items: center; gap: 8px; padding: 0 var(--gutter);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.top h1 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.top-spacer { flex: 1 1 auto; }
.top-chips { display: flex; gap: 6px; flex: none; }
.tchip {
  height: 32px; display: inline-flex; align-items: center; gap: 6px; padding: 0 10px;
  border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--surface);
  font-size: 13px; font-weight: 600; color: var(--text-2); white-space: nowrap; text-decoration: none;
}
.tchip:hover { border-color: var(--line-strong); text-decoration: none; }
.tchip b { min-width: 16px; text-align: right; color: var(--text); }
.tchip.is-zero, .tchip.is-zero b { color: var(--text-3); }
.tchip.st-post b { color: var(--st-post); }
.tchip.st-ready b { color: var(--st-ready); }
.tchip.st-check b { color: var(--st-check); }
.mode-badge {
  width: 168px; height: 32px; flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border-radius: var(--r-pill); background: var(--surface-2); border: 1px solid var(--line);
  font-size: 13px; font-weight: 600; white-space: nowrap; color: var(--text);
}
.mode-badge.is-paused { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.mode-badge.is-test { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.bot-pill {
  width: 176px; height: 32px; flex: none; display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--r-pill); font-size: 13px; font-weight: 600; white-space: nowrap;
  background: var(--ok-soft); color: var(--ok);
}
.bot-pill.is-down { background: var(--bad-soft); color: var(--bad); }
.icon-btn {
  width: 36px; height: 36px; flex: none; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); cursor: pointer; font-size: 16px;
}
.icon-btn:hover { border-color: var(--line-strong); }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 12px;
}
.avatar.lg { width: 40px; height: 40px; font-size: 14px; }
.user-btn {
  height: 40px; display: flex; align-items: center; gap: 8px; padding: 0 8px 0 4px;
  border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--surface); cursor: pointer; flex: none;
}
.user-btn .who { display: grid; text-align: left; line-height: 16px; }
.user-btn .who b { font-size: 13px; }
.user-btn .who span { font-size: 12px; color: var(--text-3); }

.view { padding: 24px var(--gutter) 96px; max-width: 1440px; outline: none; min-width: 0; }
.banner {
  margin: 16px var(--gutter) 0; min-height: 44px; padding: 10px 14px; border-radius: var(--r-md);
  display: flex; align-items: center; gap: 12px; font-size: 14px; line-height: 20px;
}
.banner.bad { background: var(--bad-soft); color: var(--bad); }
.banner.warn { background: var(--warn-soft); color: var(--warn); }
.banner.info { background: var(--info-soft); color: var(--info); }
.banner .grow { color: var(--text); }
.banner b { color: inherit; }

/* Pastki menyu – faqat telefonda */
.bnav { display: none; }

/* ───────────── 4. Sahifa sarlavhasi ───────────── */
.page-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 20px; min-width: 0; }
.page-head h2 { font-size: 24px; line-height: 32px; font-weight: 700; }
.page-head .lead { color: var(--text-2); margin-top: 2px; }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; flex: none; }
.live { display: inline-flex; align-items: center; height: 18px; font-size: 13px; line-height: 18px; color: var(--text-3); white-space: nowrap; }
.statusline {
  height: 30px; display: flex; align-items: center; gap: 8px; padding: 0 12px;
  border-radius: var(--r-md); background: var(--surface-2); font-size: 13px; color: var(--text-2);
  margin-bottom: 16px; white-space: nowrap; overflow: hidden;
}
.statusline .grow { overflow: hidden; text-overflow: ellipsis; }

/* ───────────── 5. Tugmalar ───────────── */
.btn {
  height: 36px; padding: 0 14px; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); color: var(--text);
  font-weight: 600; font-size: 14px; line-height: 20px; cursor: pointer; white-space: nowrap; position: relative;
  text-decoration: none; transition: background .12s, border-color .12s;
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, var(--line)); }
.btn.danger-solid { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--accent); }
.btn.ghost:hover { background: var(--accent-soft); }
.btn.link-danger { border-color: transparent; background: transparent; color: var(--bad); }
.btn.sm { height: 32px; padding: 0 10px; font-size: 13px; }
.btn.lg { height: 44px; padding: 0 18px; font-size: 15px; }
.btn.block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.btn.is-busy { color: transparent !important; pointer-events: none; }
.btn.is-busy::after {
  content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid var(--text-3); border-top-color: transparent; animation: spin .8s linear infinite;
}
.btn.primary.is-busy::after { border-color: var(--on-accent); border-top-color: transparent; }
@keyframes spin { to { transform: rotate(360deg); } }
.spinner { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-top-color: transparent; animation: spin .8s linear infinite; vertical-align: -2px; flex: none; }
.btn .kbd-hint { font-weight: 500; font-size: 11px; color: var(--text-3); margin-left: 2px; }
.btn.primary .kbd-hint { color: color-mix(in srgb, var(--on-accent) 75%, transparent); }

/* ───────────── 6. Holat belgilari (badge) ───────────── */
.badge {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px;
  border-radius: var(--r-pill); font-size: 13px; font-weight: 600; white-space: nowrap;
  background: var(--surface-2); color: var(--text-2);
}
.badge.fixed { width: 176px; justify-content: flex-start; }
.badge.s-awaiting_payment { background: var(--st-await-soft); color: var(--st-await); }
.badge.s-pending_check { background: var(--st-check-soft); color: var(--st-check); }
.badge.s-at_post { background: var(--st-post-soft); color: var(--st-post); }
.badge.s-ready { background: var(--st-ready-soft); color: var(--st-ready); }
.badge.s-shipped { background: var(--st-ship-soft); color: var(--st-ship); }
.badge.s-cancelled { background: var(--st-cancel-soft); color: var(--st-cancel); }
.badge.s-replaced, .badge.s-merged { background: var(--st-replaced-soft); color: var(--st-replaced); }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.plain { background: var(--surface-2); color: var(--text-2); }
.tag { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: var(--r-pill); font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--surface-2); color: var(--text-2); }
.tag.warn { background: var(--warn-soft); color: var(--warn); }
.tag.bad { background: var(--bad-soft); color: var(--bad); }
.tag.ok { background: var(--ok-soft); color: var(--ok); }
.tag.info { background: var(--info-soft); color: var(--info); }
.tag.ready { background: var(--st-ready-soft); color: var(--st-ready); }
.tag.lead { background: var(--st-lead-soft); color: var(--st-lead); }
.tag.post { background: var(--st-post-soft); color: var(--st-post); }
.age { display: inline-block; width: 100px; flex: none; text-align: right; font-size: 13px; font-weight: 600; color: var(--text-2); white-space: nowrap; }
.age.warn { color: var(--warn); }
.age.bad { color: var(--bad); }

/* ───────────── 7. Kartochka ───────────── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1); min-width: 0; }
.card-h { height: 52px; display: flex; align-items: center; gap: 8px; padding: 0 20px; border-bottom: 1px solid var(--line); }
.card-h h3 { font-size: 15px; line-height: 20px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.card-h .right { margin-left: auto; display: flex; align-items: center; gap: 8px; flex: none; }
.card-b { padding: 16px 20px; min-width: 0; }
.card-b.tight { padding: 4px 20px; }
.items td.rk { width: 32px; color: var(--text-3); }
.items td.bd { width: 196px; text-align: right; }
.items td.btn-c { width: 150px; text-align: right; }
.card-f { padding: 12px 20px; border-top: 1px solid var(--line); font-size: 13px; color: var(--text-3); }
.kv { display: grid; grid-template-columns: 148px minmax(0, 1fr); gap: 4px 12px; font-size: 14px; line-height: 20px; }
.kv dt { color: var(--text-2); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.note { padding: 10px 12px; border-radius: var(--r-md); font-size: 14px; line-height: 20px; display: flex; gap: 10px; align-items: flex-start; }
.note.warn { background: var(--warn-soft); color: var(--text); }
.note.bad { background: var(--bad-soft); color: var(--text); }
.note.info { background: var(--info-soft); color: var(--text); }
.note.ok { background: var(--ok-soft); color: var(--text); }
.note.plain { background: var(--surface-2); color: var(--text); }
.note .ni { flex: none; font-size: 16px; }
.quote {
  border-left: 3px solid var(--line-strong); padding: 8px 12px; background: var(--surface-2);
  border-radius: 0 var(--r-sm) var(--r-sm) 0; font-size: 14px; line-height: 20px; white-space: pre-wrap; overflow-wrap: anywhere;
}
.quote-label { font-size: 12px; line-height: 16px; color: var(--text-3); margin-bottom: 4px; font-weight: 600; }
.sec-title { font-size: 13px; line-height: 18px; font-weight: 700; color: var(--text-2); margin: 0 0 8px; }

/* ───────────── 8. Natija qatori (oldindan joy band) ───────────── */
.result { min-height: 20px; font-size: 13px; line-height: 20px; color: var(--text-3); display: flex; gap: 6px; align-items: center; }
.result.ok { color: var(--ok); }
.result.warn { color: var(--warn); }
.result.bad { color: var(--bad); }
.result.info { color: var(--info); }
.forecast { min-height: 20px; font-size: 13px; line-height: 20px; color: var(--text-3); }
.forecast.warn { color: var(--warn); }

/* ───────────── 9. Segment, tab, chip, maydon ───────────── */
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--line); max-width: 100%; }
.seg button {
  height: 30px; padding: 0 12px; border: 0; border-radius: 7px; background: transparent; cursor: pointer;
  font-size: 13px; font-weight: 600; color: var(--text-2); white-space: nowrap; display: inline-flex; align-items: center; gap: 6px;
}
.seg button[aria-pressed="true"], .seg button[aria-checked="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-1); }
.seg button[disabled] { opacity: .5; cursor: not-allowed; }
.seg .n { min-width: 22px; height: 18px; padding: 0 5px; border-radius: var(--r-pill); background: var(--surface-3); font-size: 11px; line-height: 18px; text-align: center; }
.seg.eq { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; }
.seg.eq button { justify-content: center; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a, .tabs button {
  height: 44px; padding: 0 12px; display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; cursor: pointer;
  border-bottom: 3px solid transparent; color: var(--text-2); font-weight: 600; white-space: nowrap; text-decoration: none; flex: none;
}
.tabs [aria-selected="true"] { color: var(--accent); border-bottom-color: var(--accent); }
.chip {
  height: 32px; padding: 0 12px; display: inline-flex; align-items: center; gap: 6px; flex: none;
  border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--surface); cursor: pointer;
  font-size: 13px; font-weight: 600; color: var(--text-2); white-space: nowrap;
}
.chip[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.chip .n { min-width: 22px; text-align: center; font-variant-numeric: tabular-nums; }
.field { display: grid; gap: 6px; min-width: 0; }
.field > label, .lbl-t { font-size: 13px; line-height: 18px; font-weight: 600; color: var(--text-2); }
.input, .select, .textarea {
  height: 36px; width: 100%; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  background: var(--surface); color: var(--text); font-size: 14px; min-width: 0;
}
.textarea { height: auto; min-height: 120px; padding: 8px 10px; line-height: 20px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input.is-bad { border-color: var(--bad); }
.input.is-ok { border-color: var(--ok); }
.help { min-height: 18px; font-size: 13px; line-height: 18px; color: var(--text-3); }
.help.bad { color: var(--bad); }
.help.ok { color: var(--ok); }
.search { position: relative; min-width: 0; }
.search .input { padding-left: 32px; }
.search::before { content: "⌕"; position: absolute; left: 11px; top: 7px; color: var(--text-3); font-size: 16px; pointer-events: none; }
.switch { width: 46px; height: 26px; border-radius: 13px; border: 0; background: var(--surface-3); position: relative; cursor: pointer; flex: none; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.3); transition: transform .15s; }
.switch[aria-checked="true"] { background: var(--ok); }
.switch[aria-checked="true"]::after { transform: translateX(20px); }
.switch[disabled] { opacity: .5; cursor: not-allowed; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; }

/* ───────────── 10. Bosqich chizig‘i (5 bosqich) ───────────── */
.stages {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(max-content, 1fr); gap: 8px; margin-bottom: 12px;
  overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; padding-bottom: 4px;
}
.stage {
  height: 72px; padding: 10px 10px 10px 14px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface);
  text-align: left; cursor: pointer; position: relative; overflow: hidden; display: grid; grid-template-rows: 22px 1fr; gap: 2px; min-width: 0;
}
.stage::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--c, var(--line-strong)); }
.stage .st-top { display: flex; align-items: center; gap: 4px; min-width: 0; font-weight: 700; font-size: 14px; }
.stage .st-top .stl { flex: 1 1 auto; white-space: nowrap; }
.stage .st-n { margin-left: auto; font-size: 20px; line-height: 22px; font-weight: 700; color: var(--c); min-width: 22px; text-align: right; flex: none; }
.stage .st-sub { font-size: 12px; line-height: 16px; color: var(--text-3); white-space: nowrap; }
.stage[aria-pressed="true"] { border-color: var(--c); box-shadow: inset 0 0 0 1px var(--c); background: color-mix(in srgb, var(--c) 7%, var(--surface)); }
.stage.c-await { --c: var(--st-await); }
.stage.c-check { --c: var(--st-check); }
.stage.c-post { --c: var(--st-post); }
.stage.c-batch { --c: var(--st-ready); }
.stage.c-sus { --c: var(--warn); }
.stage.c-ready { --c: var(--st-ready); }
.stage.c-ship { --c: var(--st-ship); }
.stage.c-track { --c: var(--st-ship); }
.steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
.step { display: grid; gap: 4px; min-width: 0; }
.step .bar { height: 6px; border-radius: 3px; background: var(--surface-3); }
.step.done .bar { background: var(--c); }
.step.now .bar { background: var(--c); opacity: .45; }
.step.stop .bar { background: var(--st-cancel); }
.step { align-content: start; }
.step .sl { font-size: 12px; line-height: 18px; height: 36px; font-weight: 600; color: var(--text-2); white-space: normal; overflow: hidden; }
.step .st { font-size: 12px; line-height: 16px; color: var(--text-3); min-height: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.step.c1 { --c: var(--st-await); } .step.c2 { --c: var(--st-check); } .step.c3 { --c: var(--st-ready); } .step.c4 { --c: var(--st-post); } .step.c5 { --c: var(--st-ship); }

/* ───────────── 11. Jadval (desktop) → kartochka (telefon) ───────────── */
.tbl-wrap { overflow: clip; }
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; font-size: 14px; line-height: 20px; }
.tbl th {
  height: 40px; padding: 0 12px; text-align: left; font-size: 12px; line-height: 16px; font-weight: 700; color: var(--text-3);
  background: var(--surface-2); border-bottom: 1px solid var(--line); position: sticky; top: var(--top-h); z-index: 2; white-space: nowrap;
}
.tbl th:first-child { border-top-left-radius: var(--r-lg); }
.tbl th:last-child { border-top-right-radius: var(--r-lg); }
.tbl td { height: 56px; padding: 6px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; min-width: 0; overflow: hidden; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr { cursor: pointer; }
.tbl tbody tr:hover td { background: color-mix(in srgb, var(--surface-2) 60%, var(--surface)); }
.tbl tbody tr.is-cursor td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.tbl tbody tr.is-sel td { background: var(--accent-soft); }
.tbl tbody tr.is-flash td { animation: flash 1.6s ease-out; }
@keyframes flash { 0% { background: var(--warn-soft); } 100% { background: transparent; } }
.tbl .num { text-align: right; }
.tbl .l1 { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tbl .l2 { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; line-height: 18px; color: var(--text-3); }
.tbl .cb { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; cursor: pointer; }
.tbl.rows60 td { height: 60px; }
.tbl.rows68 td { height: 68px; }
.tbl .row-btn { width: 100%; }
.tbl tr.is-done td { color: var(--text-3); }
.mcards { display: none; }

/* ───────────── 12. Vazifalar navbati (Bosh sahifa) ───────────── */
.todo-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.todo {
  height: 164px; padding: 14px 16px 14px 18px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface);
  display: grid; grid-template-rows: 34px 40px 36px; gap: 4px; align-content: start; text-align: left; cursor: pointer; position: relative; overflow: hidden; color: var(--text);
}
.todo::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--c); }
.todo .big { font-size: 28px; line-height: 34px; font-weight: 700; color: var(--c); }
.todo .say { font-size: 14px; line-height: 20px; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.todo .hint { font-size: 13px; line-height: 18px; color: var(--text-3); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.todo.is-zero .big { color: var(--text-3); }
.todo.c-draft { --c: var(--accent); }
.todo.c-check { --c: var(--st-check); }
.todo.c-sus { --c: var(--warn); }
.todo.c-post { --c: var(--st-post); }
.todo.c-ready { --c: var(--st-ready); }
.todo.c-ship { --c: var(--st-ship); }
.home { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.queue-tools { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.queue-tools::-webkit-scrollbar { display: none; }
.queue-tools .seg button { padding: 0 9px; }
@media (max-width: 1599px) { .queue-tools .kbd-tip { display: none; } }
.qrow {
  height: 72px; display: grid; grid-template-columns: 40px minmax(0, 1fr) 104px 172px; align-items: center; gap: 12px;
  padding: 0 16px; border-bottom: 1px solid var(--line); cursor: pointer; position: relative;
}
.qrow:last-child { border-bottom: 0; }
.qrow:hover { background: color-mix(in srgb, var(--surface-2) 55%, var(--surface)); }
.qrow.is-cursor { box-shadow: inset 3px 0 0 var(--accent); background: color-mix(in srgb, var(--accent-soft) 45%, var(--surface)); }
.qico { width: 40px; height: 40px; border-radius: var(--r-md); display: grid; place-items: center; font-size: 18px; background: color-mix(in srgb, var(--c) 12%, var(--surface)); }
.qrow.k-draft { --c: var(--accent); }
.qrow.k-check { --c: var(--st-check); }
.qrow.k-sus { --c: var(--warn); }
.qrow.k-post { --c: var(--st-post); }
.qrow.k-ready { --c: var(--st-ready); }
.qrow.k-ship { --c: var(--st-ship); }
.qrow.k-handoff { --c: var(--bad); }
.qrow.k-outbox { --c: var(--text-3); }
.qmain { min-width: 0; display: grid; gap: 2px; }
.qt { display: flex; align-items: center; gap: 8px; min-width: 0; }
.qt .kind { font-size: 12px; font-weight: 700; color: var(--c); white-space: nowrap; flex: none; }
.qt .who { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.qsub { font-size: 13px; line-height: 18px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 18px; }
.qsub.ok { color: var(--ok); } .qsub.warn { color: var(--warn); } .qsub.bad { color: var(--bad); } .qsub.info { color: var(--info); }
.qwait { text-align: right; font-size: 12px; line-height: 16px; color: var(--text-3); white-space: nowrap; }
.qwait b { display: block; font-size: 14px; line-height: 20px; color: var(--text-2); }
.qwait.warn b { color: var(--warn); }
.qwait.bad b { color: var(--bad); }
.qrow.is-done .who, .qrow.is-done .kind { text-decoration: line-through; color: var(--text-3); }
.qrow.is-done .qico { filter: grayscale(1); opacity: .6; }
.qact { width: 172px; height: 36px; display: grid; }
.qact .btn { width: 100%; }
.qrow.is-cursor .qact .btn:not([disabled]) { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
/* «Bugun» kartasi: qiymat o‘ngda, ikkinchi och qator har qatorda band – ritm bir xil */
.today { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; row-gap: 10px; margin: 0; font-size: 14px; line-height: 20px; }
.today dt { color: var(--text-2); }
.today dd { margin: 0; text-align: right; white-space: nowrap; }
.today dd span { display: block; font-size: 12px; line-height: 16px; color: var(--text-3); }
.ob-row { display: flex; align-items: center; gap: 8px; padding-top: 8px; border-top: 1px solid var(--line); min-width: 0; }
.stack-res { display: grid; gap: 4px; }
.spark-h { display: flex; justify-content: space-between; gap: 8px; margin-top: 4px; }
.spark { height: 56px; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 3px; align-items: end; border-bottom: 1px solid var(--line); }
.spark i { display: block; background: color-mix(in srgb, var(--accent) 55%, var(--surface)); border-radius: 2px 2px 0 0; min-height: 2px; }
.spark i:last-child { background: var(--accent); }
.progress { height: 8px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.progress > i { display: block; height: 100%; width: 0; background: var(--ok); border-radius: 4px; }
.progress.warn > i { background: var(--warn); }
.progress.accent > i { background: var(--accent); }

/* ───────────── 13. Drawer, dialog, sheet, toast, popover ───────────── */
.scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 40; opacity: 0; pointer-events: none; transition: opacity .16s; }
.scrim.is-open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(var(--drawer-w), 100vw); z-index: 41;
  background: var(--bg); border-left: 1px solid var(--line); box-shadow: var(--shadow-2);
  transform: translateX(102%); transition: transform .2s ease; display: flex; flex-direction: column;
}
.drawer:not(.is-open) { visibility: hidden; transition: transform .2s ease, visibility 0s linear .2s; }
.drawer.is-open { transform: none; visibility: visible; }
.drawer.w460 { --drawer-w: 460px; }
.drawer.w500 { --drawer-w: 500px; }
.drawer-h { height: 64px; flex: none; display: flex; align-items: center; gap: 10px; padding: 0 20px; border-bottom: 1px solid var(--line); background: var(--surface); }
.drawer-h h2 { font-size: 18px; line-height: 24px; font-weight: 700; white-space: nowrap; }
.drawer-b { flex: 1 1 auto; overflow-y: auto; padding: 20px; display: grid; gap: 16px; align-content: start; grid-auto-rows: max-content; }
.drawer-f { flex: none; padding: 12px 20px; border-top: 1px solid var(--line); background: var(--surface); display: flex; gap: 8px; justify-content: flex-end; }

.dlg {
  border: 0; padding: 0; border-radius: var(--r-lg); background: var(--surface); color: var(--text);
  width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 48px); box-shadow: var(--shadow-2);
}
.dlg.wide { width: min(640px, calc(100vw - 32px)); }
.dlg::backdrop { background: var(--scrim); }
.dlg-h { padding: 20px 24px 8px; }
.dlg-h h2 { font-size: 18px; line-height: 26px; font-weight: 700; }
.dlg-b { padding: 8px 24px 16px; display: grid; gap: 12px; grid-auto-rows: max-content; font-size: 14px; line-height: 21px; overflow-y: auto; max-height: calc(100vh - 220px); }
.dlg-f { padding: 12px 24px 20px; display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.dlg-f .btn { min-width: 128px; }
.sheet-grip { display: none; }

.toasts { position: fixed; right: 24px; bottom: 24px; z-index: 60; display: grid; gap: 8px; width: min(400px, calc(100vw - 32px)); }
.toast {
  background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--info); border-radius: var(--r-md);
  box-shadow: var(--shadow-2); padding: 12px 12px 12px 14px; display: grid; grid-template-columns: 1fr auto; gap: 4px 8px;
  font-size: 14px; line-height: 20px; animation: tin .18s ease-out;
}
@keyframes tin { from { transform: translateY(8px); opacity: 0; } }
.toast.ok { border-left-color: var(--ok); }
.toast.warn { border-left-color: var(--warn); }
.toast.bad { border-left-color: var(--bad); }
.toast.wait { border-left-color: var(--text-3); }
.toast .tt { font-weight: 700; }
.toast .td { grid-column: 1 / -1; color: var(--text-2); font-size: 13px; line-height: 19px; }
.toast .ta { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.toast .x { border: 0; background: none; cursor: pointer; color: var(--text-3); font-size: 16px; width: 24px; height: 24px; }
.toast .bar { grid-column: 1 / -1; height: 3px; border-radius: 2px; background: var(--surface-3); overflow: hidden; }
.toast .bar > i { display: block; height: 100%; background: var(--accent); width: 100%; transform-origin: left; animation: shrink linear forwards; }
@keyframes shrink { to { transform: scaleX(0); } }

.popover {
  position: fixed; z-index: 50; top: 52px; right: 16px; width: 288px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow-2); padding: 8px; display: grid; gap: 2px;
}
.popover .pi { height: 40px; display: flex; align-items: center; gap: 10px; padding: 0 10px; border: 0; background: none; border-radius: var(--r-sm); cursor: pointer; text-align: left; width: 100%; color: var(--text); text-decoration: none; font-size: 14px; }
.popover .pi:hover { background: var(--surface-2); text-decoration: none; }
.popover .pi.bad { color: var(--bad); }
.popover hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }
.popover .ph { padding: 8px 10px; }
.popover .pl { padding: 6px 10px 2px; font-size: 12px; font-weight: 700; color: var(--text-3); }
.popover .seg { margin: 4px 10px 6px; }

/* ───────────── 14. Buyurtma tafsiloti ───────────── */
.od-head { display: grid; gap: 6px; }
.od-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.od-title h3 { font-size: 22px; line-height: 28px; font-weight: 700; }
.next-card { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); padding: 16px; display: grid; gap: 12px; min-height: 204px; align-content: start; box-shadow: var(--shadow-1); }
.next-card .nc-label { font-size: 12px; line-height: 16px; font-weight: 700; color: var(--text-3); }
.next-card .nc-title { font-size: 17px; line-height: 24px; font-weight: 700; }
.next-card .nc-say { font-size: 14px; line-height: 20px; color: var(--text-2); }
.next-card .nc-btns { display: grid; gap: 8px; }
.next-card .nc-btns.two { grid-template-columns: 1fr 1fr; }
.next-card.is-confirm { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.receipt {
  height: 300px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--line);
  display: grid; place-items: center; overflow: hidden; position: relative;
}
.receipt .paper { width: 168px; padding: 16px 14px; background: #fff; color: #222; border-radius: 6px; box-shadow: 0 2px 10px rgba(0,0,0,.15); font: 12px/18px var(--mono); transform-origin: center; transition: transform .15s; }
.receipt .paper b { display: block; text-align: center; font-size: 13px; margin-bottom: 6px; }
.receipt .paper hr { border: 0; border-top: 1px dashed #bbb; margin: 6px 0; }
.receipt-tools { display: flex; gap: 6px; align-items: center; margin-top: 8px; }
.timeline { display: grid; gap: 0; }
.tl-row { display: grid; grid-template-columns: 52px 24px minmax(0, 1fr) 64px; gap: 8px; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 14px; line-height: 20px; }
.tl-row:last-child { border-bottom: 0; }
.tl-row .tm { color: var(--text-3); font-size: 13px; }
.tl-row .src { justify-self: end; }
.tl-row .dv { font-size: 13px; line-height: 18px; color: var(--ok); }
.tl-row .dv.warn { color: var(--warn); }
.items { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 14px; line-height: 20px; }
.items td { padding: 8px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.items tr:last-child td { border-bottom: 0; }
.items .r { text-align: right; width: 112px; white-space: nowrap; }
.items .q { width: 56px; text-align: right; color: var(--text-2); }
.items tr.total td { font-weight: 700; font-size: 15px; border-top: 2px solid var(--line); }
.copy-box { padding: 12px; border-radius: var(--r-md); background: var(--surface-2); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: start; font-size: 14px; line-height: 21px; }
.copy-box .btn { width: 120px; }

/* ───────────── 15. Qoralamalar (ro‘yxat – qatorlari Bosh sahifa navbati bilan bir xil; bosilsa suhbat ochiladi) ───────────── */
.card-tabs { margin: 0; padding: 0 8px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.queue-tools .chips { flex-wrap: nowrap; }

/* ───────────── 16. Suhbatlar – Telegram ko‘rinishidagi modul: suhbatlar.css (.sb). Bu yerda faqat qobiq ─────────────
   Suhbatlar sahifasida ilova ekran balandligiga bog‘lanadi: ro‘yxat, yozishma va yozish maydoni o‘zi aylanadi, sahifa aylanmaydi. */
.count.acc { background: var(--accent); color: var(--on-accent); }
.app.is-chat { height: 100vh; height: 100dvh; min-height: 0; }
.app.is-chat .main { display: flex; flex-direction: column; min-height: 0; height: 100vh; height: 100dvh; }
.app.is-chat .top { flex: none; }
.app.is-chat #banners { flex: none; }
.app.is-chat .banner { margin: 0; border-radius: 0; }
.app.is-chat .view { flex: 1 1 auto; min-height: 0; max-width: none; padding: 0; display: flex; flex-direction: column; }
.held-box { border-top: 1px solid var(--line); background: var(--warn-soft); }

/* ───────────── 17. Sozlamalar ───────────── */
/* Qidiruv + chiplar (Katalog, Qoidalar) – Buyurtmalar bilan bir xil naqsh */
.toolbar { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; min-width: 0; }
.toolbar .chiprow { display: flex; gap: 6px; flex: none; }
.toolbar-gap { margin-bottom: 12px; }
.set-row .unit { flex: none; font-size: 13px; color: var(--text-2); }
.anchors { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.set-group { margin-bottom: 24px; }
.set-group > .gh {
  position: sticky; top: var(--top-h); z-index: 3; height: 48px; display: flex; align-items: center; gap: 8px;
  background: var(--bg); font-size: 15px; font-weight: 700; padding: 0 4px;
}
.set-group > .gh span { font-weight: 400; color: var(--text-3); font-size: 13px; }
.set-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) 372px; gap: 12px; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--line); min-height: 88px; }
.set-row:last-child { border-bottom: 0; }
.set-row .si { font-size: 20px; text-align: center; }
.set-row .sn { font-weight: 600; }
.set-row .sd { font-size: 13px; line-height: 18px; color: var(--text-3); }
.set-row .now { font-size: 13px; line-height: 18px; color: var(--text-2); margin-top: 2px; }
.set-row .last { font-size: 12px; line-height: 17px; color: var(--text-3); min-height: 17px; }
.set-row .ctl { display: flex; align-items: center; justify-content: flex-end; gap: 10px; min-width: 0; }
.set-row .ctl .seg { max-width: 100%; }
.set-row .busy-slot { width: 18px; height: 18px; flex: none; display: grid; place-items: center; color: var(--text-3); }
.set-row .onoff { width: 84px; text-align: right; font-size: 13px; color: var(--text-2); flex: none; }
.set-row.is-flash { animation: flash 1.6s ease-out; }
.modes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.mode {
  min-height: 168px; padding: 16px; border-radius: var(--r-lg); border: 2px solid var(--line); background: var(--surface); text-align: left; cursor: pointer;
  display: grid; grid-template-rows: auto 1fr auto; gap: 8px; position: relative; color: var(--text);
}
.mode[aria-checked="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 5%, var(--surface)); }
.mode .mt { font-weight: 700; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.mode .mt .ck { margin-left: auto; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line-strong); display: grid; place-items: center; font-size: 12px; flex: none; }
.mode[aria-checked="true"] .mt .ck { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.mode .md { font-size: 13px; line-height: 19px; color: var(--text-2); }
.mode .mf { font-size: 12px; line-height: 16px; color: var(--text-3); }
.mode[disabled] { cursor: not-allowed; }
.mode[disabled]:not([aria-checked="true"]) { background: var(--surface-2); border-style: dashed; }
.stackbar { display: flex; height: 10px; border-radius: 5px; overflow: hidden; gap: 2px; background: var(--surface-3); }
.stackbar i { display: block; height: 100%; }
.stackbar .s-ok { background: var(--ok); } .stackbar .s-warn { background: var(--warn); } .stackbar .s-bad { background: var(--bad); }
.ai-card { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 20px; min-height: 112px; }
.ai-card .big-ico { width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center; font-size: 26px; background: var(--ok-soft); }
.ai-card.is-paused { background: var(--warn-soft); }
.ai-card.is-paused .big-ico { background: var(--surface); }
.group-text { font: 13px/20px var(--mono); white-space: pre-wrap; background: var(--surface-2); border-radius: var(--r-md); padding: 12px; overflow-wrap: anywhere; }

/* ───────────── 18. Hisobot ───────────── */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { min-height: 120px; padding: 16px; display: grid; gap: 4px; align-content: start; }
.kpi .kl { font-size: 13px; color: var(--text-2); font-weight: 600; }
.kpi .kv2 { font-size: 26px; line-height: 32px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi .kd { font-size: 13px; line-height: 18px; color: var(--text-3); }
.kpi .kd .up { color: var(--ok); font-weight: 700; } .kpi .kd .dn { color: var(--bad); font-weight: 700; }
.grid-2-1 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; }
.grid-1-1 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; }
.chart-box { min-height: 240px; }
.chart { width: 100%; height: 240px; display: block; }
.chart .bar { fill: var(--accent); }
.chart .bar.part { fill: color-mix(in srgb, var(--accent) 40%, var(--surface)); }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .avg { stroke: var(--text-3); stroke-dasharray: 4 4; stroke-width: 1; }
.chart text { fill: var(--text-3); font-size: 11px; font-family: var(--font); }
.chart .xl.today { fill: var(--accent); font-weight: 700; }
.funnel { display: grid; gap: 12px; }
.fstep { display: grid; grid-template-columns: minmax(0, 1fr) 56px; gap: 4px 8px; font-size: 14px; }
.fstep .fb { grid-column: 1 / -1; height: 10px; border-radius: 5px; background: var(--surface-3); overflow: hidden; }
.fstep .fb i { display: block; height: 100%; background: var(--c); border-radius: 5px; width: 0; }
.fstep .fv { text-align: right; font-weight: 700; }
.fstep .fp { grid-column: 1 / -1; font-size: 12px; color: var(--text-3); }
.verdict { padding: 14px 16px; border-radius: var(--r-md); font-size: 14px; line-height: 21px; }
.verdict.ok { background: var(--ok-soft); } .verdict.warn { background: var(--warn-soft); } .verdict.bad { background: var(--bad-soft); }
.cond { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 8px; font-size: 13px; line-height: 20px; padding: 4px 0; }

/* ───────────── 19. Kirish ───────────── */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.login { width: min(400px, 100%); padding: 28px 28px 24px; display: grid; gap: 14px; }
.login .lb { display: flex; align-items: center; gap: 10px; }
.login .msg-slot { min-height: 58px; }
.app.is-login .side, .app.is-login .top, .app.is-login .bnav, .app.is-login #banners { display: none !important; }
.app.is-login { grid-template-columns: minmax(0, 1fr); }
.app.is-login .view { padding: 0; max-width: none; }

/* ───────────── 20. Holat bloklari (bo‘sh/xato/yopiq) ───────────── */
.state { min-height: 320px; display: grid; place-items: center; text-align: center; padding: 32px 16px; }
.state .si { font-size: 36px; line-height: 44px; }
.state h3 { font-size: 18px; line-height: 26px; margin: 8px 0 4px; }
.state p { color: var(--text-2); max-width: 520px; margin: 0 auto; }
.state .row { justify-content: center; margin-top: 16px; }
.sk { display: block; border-radius: 6px; background: linear-gradient(90deg, var(--surface-2) 0, var(--surface-3) 50%, var(--surface-2) 100%); background-size: 200% 100%; animation: sk 1.2s linear infinite; }
@keyframes sk { to { background-position: -200% 0; } }
.sk.h14 { height: 14px; } .sk.h18 { height: 18px; } .sk.h20 { height: 20px; } .sk.h24 { height: 24px; } .sk.h28 { height: 28px; } .sk.h30 { height: 30px; }
.sk.h32 { height: 32px; } .sk.h36 { height: 36px; } .sk.h44 { height: 44px; } .sk.h72 { height: 72px; } .sk.h112 { height: 112px; } .sk.h120 { height: 120px; }
.sk.h164 { height: 164px; border-radius: var(--r-lg); } .sk.h196 { height: 196px; } .sk.h228 { height: 228px; } .sk.h330 { height: 330px; } .sk.h346 { height: 346px; }
.sk.h400 { height: 400px; } .sk.h420 { height: 420px; }
.sk.h120, .sk.h196, .sk.h228, .sk.h330, .sk.h346, .sk.h400, .sk.h420 { border-radius: var(--r-lg); }
.sk.w40 { width: 40%; } .sk.w60 { width: 60%; } .sk.w80 { width: 80%; } .sk.w100 { width: 100%; }
/* Skelet sahifaning yakuniy o‘lchamida: sarlavha 56, qatorlar 56/60/68/72/76/88/92 */
.sk-head { display: grid; gap: 6px; }
.sk-mb8 { margin-bottom: 8px; } .sk-mt8 { margin-top: 8px; } .sk-mb16 { margin-bottom: 16px; }
.sk-card { overflow: hidden; }
.sk-top { height: 40px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.sk-top.h44 { height: 44px; } .sk-top.h56 { height: 57px; background: transparent; }
.sk-row { display: flex; align-items: center; padding: 0 16px; border-bottom: 1px solid var(--line); }
.sk-row:last-child { border-bottom: 0; }
.sk-row.h56 { height: 57px; } .sk-row.h60 { height: 61px; } .sk-row.h64 { height: 64px; } .sk-row.h68 { height: 69px; } .sk-row.h72 { height: 73px; }
.sk-row.h76 { height: 76px; } .sk-row.h88 { height: 89px; } .sk-row.h92 { height: 93px; }
.sk-stage { min-width: 148px; border-radius: var(--r-md); }
/* Jonli yangilanish: suzuvchi tugma, kontentni surmaydi */
.live-bar-slot { position: sticky; top: calc(var(--top-h) + 8px); z-index: 6; height: 0; display: flex; justify-content: center; }
.live-bar { height: 36px; padding: 0 16px; border-radius: var(--r-pill); border: 0; background: var(--accent); color: var(--on-accent); font-weight: 600; font-size: 14px; cursor: pointer; box-shadow: var(--shadow-2); transform: translateY(8px); }
.live.is-off { color: var(--bad); }
.chart-empty { display: grid; place-items: center; height: 240px; text-align: center; }
.chart-empty .si { font-size: 32px; line-height: 40px; }
.mini-empty { padding: 16px 0; color: var(--text-2); font-size: 14px; }
.users-solo { margin-top: 12px; }

/* Ommaviy amal paneli */
.bulkbar {
  position: fixed; left: calc(var(--side-w) + (100vw - var(--side-w)) / 2); transform: translateX(-50%); bottom: 24px; z-index: 35;
  height: 56px; padding: 0 8px 0 16px; border-radius: var(--r-lg); background: #1d1e22; color: #f3f3f1; display: flex; align-items: center; gap: 8px;
  box-shadow: var(--shadow-2); width: min(760px, calc(100vw - var(--side-w) - 48px));
}
.bulkbar .btn { background: transparent; color: #f3f3f1; border-color: #4a4c52; }
.bulkbar .btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.bulkbar .bt { font-size: 13px; color: #bdbec2; }
.packlist { margin-bottom: 16px; }
.packlist ul { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 24px; }
.packlist li { display: grid; grid-template-columns: 20px minmax(0, 1fr) 40px; gap: 8px; font-size: 14px; line-height: 22px; align-items: center; }

/* ───────────── 20b. Yordamchi ───────────── */
.todo-grid.s3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.input.num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl.static tbody tr { cursor: default; }
.items td.hk { width: 220px; white-space: nowrap; }

/* ───────────── 21. Moslashuv (breakpointlar) ───────────── */
.filters .select { width: auto; flex: none; max-width: 220px; }
.filters { margin-bottom: 12px; }
.filters .search { min-width: 220px; }
@media (max-width: 1499px) { .col-wide { display: none; } }
@media (max-width: 1399px) { .top-chips .tchip .tl { display: none; } }
.filters-btn { display: none; }
@media (max-width: 1279px) {
  .col-books, .col-oaddr { display: none; }
  .todo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home { grid-template-columns: minmax(0, 1fr); }
  .home-side { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .modes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1099px) {
  :root { --side-w: 64px; }
  .side .brand-txt, .nav .lbl, .nav-group, .side-foot .sf-txt { display: none; }
  .nav a { grid-template-columns: 1fr; justify-items: center; padding: 0; position: relative; }
  .nav a .count { position: absolute; top: 2px; right: 2px; min-width: 18px; height: 16px; line-height: 16px; font-size: 10px; padding: 0 4px; }
  .brand { justify-content: center; padding: 0; }
  .side-foot { text-align: center; padding: 12px 0; }
  .col-addr { display: none; }
  .top-chips { display: none; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2-1, .grid-1-1 { grid-template-columns: minmax(0, 1fr); }
  .todo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .set-row { grid-template-columns: 40px minmax(0, 1fr); }
  .set-row .ctl { grid-column: 2; justify-content: flex-start; }
}

/* Jadval → kartochka: 1023px va undan tor (rail bilan 848px dan kam joy qoladi) */
@media (max-width: 1023px) {
  .tbl-wrap .tbl { display: none; }
  .mcards { display: grid; gap: 10px; }
  .tbl-wrap.card:has(> .mcards) { background: transparent; border: 0; box-shadow: none; }
  .mc {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 12px 14px; display: grid; gap: 4px;
    font-size: 14px; line-height: 20px; min-width: 0; cursor: pointer; text-align: left; color: var(--text); width: 100%;
  }
  .mc .m1 { display: flex; align-items: center; gap: 8px; min-width: 0; flex-wrap: wrap; row-gap: 4px; }
  .mc .m1 b { white-space: nowrap; }
  .mc .m1 .tm { margin-left: auto; font-size: 12px; color: var(--text-3); white-space: nowrap; }
  .mc .ml { color: var(--text-2); overflow-wrap: anywhere; min-width: 0; }
  .mc .m4 { display: flex; align-items: center; gap: 8px; margin-top: 6px; min-width: 0; }
  .mc .m4 .btn { margin-left: auto; min-width: 140px; }
  .mc.is-sel { border-color: var(--accent); background: var(--accent-soft); }
}

@media (max-width: 760px) {
  :root { --gutter: 16px; --top-h: 52px; }
  body { font-size: 15px; }
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; }
  .top { padding: 0 12px; gap: 6px; }
  .top h1 { position: static; width: auto; height: auto; clip: auto; overflow: hidden; text-overflow: ellipsis; flex: 1 1 auto; min-width: 0; font-size: 17px; line-height: 24px; font-weight: 700; }
  .top-spacer { display: none; }
  .page-head h2 { display: none; }
  .live { white-space: normal; height: auto; }
  .items .badge .bt { display: none; }
  .items td.bd { width: 52px; }
  .items td.btn-c { width: 48px; }
  .items td.btn-c .btn .wl { display: none; }
  .items .r { width: 96px; }
  .card-b.tight { padding: 4px 14px; }
  .mode-badge { width: 40px; padding: 0; }
  .mode-badge .ml { display: none; }
  .bot-pill { width: 32px; padding: 0; }
  .bot-pill .bl { display: none; }
  .bot-pill .dot { margin: 0; }
  .user-btn { padding: 0; border: 0; height: 36px; }
  .user-btn .who, .user-btn .caret { display: none; }
  .view { padding: 16px 16px calc(var(--bnav-h) + 88px); }
  .app.is-chat .view { padding: 0 0 calc(var(--bnav-h) + env(safe-area-inset-bottom)); }
  body.in-chat .app.is-chat .view { padding-bottom: 0; }
  .banner { margin: 12px 12px 0; }
  .page-head { flex-wrap: wrap; margin-bottom: 14px; }
  .page-head h2 { font-size: 20px; line-height: 28px; }
  .page-head .actions { margin-left: 0; width: 100%; flex-wrap: wrap; }
  .bnav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; height: calc(var(--bnav-h) + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom); background: var(--surface); border-top: 1px solid var(--line);
  }
  .bnav a, .bnav button {
    flex: 1 1 0; min-width: 0; display: grid; justify-items: center; align-content: center; gap: 2px; position: relative;
    color: var(--text-2); font-size: 11px; line-height: 14px; font-weight: 600; text-decoration: none; border: 0; background: none; cursor: pointer;
    border-top: 3px solid transparent;
  }
  .bnav .bi { font-size: 19px; line-height: 22px; }
  .bnav [aria-current="page"] { color: var(--accent); border-top-color: var(--accent); }
  .bnav .count { position: absolute; top: 4px; left: calc(50% + 6px); min-width: 18px; height: 16px; line-height: 16px; font-size: 10px; padding: 0 4px; }
  .bnav .lb { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 2px; }

  .card { border-radius: var(--r-md); }
  .card-h { padding: 0 14px; }
  .card-b { padding: 14px; }

  .stages { scrollbar-width: none; padding-bottom: 0; }
  .stages::-webkit-scrollbar { display: none; }
  .stage { min-width: 148px; }
  .filters .filters-2 { display: none !important; }
  .filters .search { min-width: 0; flex-basis: 100%; }
  .filters-btn { display: inline-flex !important; }

  .home-side { grid-template-columns: minmax(0, 1fr); }
  .todo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .todo { height: auto; min-height: 128px; padding: 12px 12px 12px 16px; display: flex; flex-direction: column; gap: 2px; }
  .todo-grid.s3 { grid-template-columns: minmax(0, 1fr); }
  .todo-grid.s3 .todo { min-height: 96px; }
  .todo .say { font-size: 13px; line-height: 18px; display: block; -webkit-line-clamp: unset; }
  .steps { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .step { grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 10px; }
  .step .sl { height: auto; }
  .todo .big { font-size: 24px; line-height: 30px; }
  .todo .hint { display: none; }
  .qrow { height: auto; min-height: 72px; grid-template-columns: 36px minmax(0, 1fr) 88px; grid-template-rows: auto auto; padding: 10px 12px; row-gap: 8px; }
  .qico { width: 36px; height: 36px; }
  .qact { grid-column: 1 / -1; width: 100%; }
  .qt { flex-wrap: wrap; row-gap: 0; }

  .drawer { --drawer-w: 100vw; border-left: 0; }
  .drawer-b { padding: 16px; }
  .drawer-h { padding: 0 12px; }

  .dlg, .dlg.wide { width: 100vw; max-width: 100vw; margin: auto 0 0; border-radius: 16px 16px 0 0; max-height: 88vh; }
  .sheet-grip { display: block; width: 40px; height: 4px; border-radius: 2px; background: var(--line-strong); margin: 8px auto 0; }
  .dlg-h { padding: 12px 16px 4px; }
  .dlg-b { padding: 8px 16px 12px; }
  .dlg-f { padding: 8px 16px 16px; display: grid; grid-template-columns: 1fr 1fr; }
  .dlg-f .btn { min-width: 0; height: 46px; white-space: normal; line-height: 18px; }
  .dlg-f .btn:only-child { grid-column: 1 / -1; }
  .toasts { left: 8px; right: 8px; bottom: calc(var(--bnav-h) + 8px); width: auto; }
  .popover { left: 8px; right: 8px; width: auto; top: 56px; }

  .toolbar { flex-direction: column; align-items: stretch; }
  .toolbar .chiprow { overflow-x: auto; scrollbar-width: none; }
  .toolbar .chiprow::-webkit-scrollbar { display: none; }
  .tabs.eqtabs > * { flex: 1 1 0; justify-content: center; min-width: 0; }

  .set-row { grid-template-columns: 32px minmax(0, 1fr); padding: 14px; }
  .set-row .ctl { grid-column: 1 / -1; justify-content: stretch; }
  .set-row .ctl .seg { flex: 1 1 auto; overflow-x: auto; }
  .set-row .ctl .seg.eq { display: grid; }
  .set-row .ctl .seg:not(.eq) { flex-wrap: wrap; overflow: visible; }
  .modes { grid-template-columns: 1fr 1fr; gap: 8px; }
  .mode { min-height: 150px; padding: 12px; }
  .ai-card { grid-template-columns: 48px minmax(0, 1fr); }
  .ai-card .btn { grid-column: 1 / -1; }
  .ai-card .big-ico { width: 48px; height: 48px; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 8px; }
  .kpi { min-height: 104px; padding: 12px; }
  .kpi .kv2 { font-size: 20px; line-height: 26px; }
  .kpi .kd .cmp { display: none; }
  .bulkbar { left: 8px; right: 8px; transform: none; width: auto; bottom: calc(var(--bnav-h) + 8px); }
  .bulkbar .bt { display: none; }
  .packlist ul { grid-template-columns: minmax(0, 1fr); }
  .kv { grid-template-columns: minmax(0, 1fr); gap: 0 0; }
  .kv dt { margin-top: 8px; font-size: 12px; }
  .next-card .nc-btns.two { grid-template-columns: 1fr 1fr; }
  .tl-row { grid-template-columns: 44px 20px minmax(0, 1fr); }
  .tl-row .src { display: none; }
  .seg { overflow-x: auto; scrollbar-width: none; }
  .seg::-webkit-scrollbar { display: none; }
  .receipt { height: 260px; }
  .hide-phone { display: none !important; }
}
@media (min-width: 761px) { .only-phone { display: none !important; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* ───────────── 22. Pochtaga topshirish: partiya, PDF’dan trek ───────────── */
.stack > .packlist { margin-bottom: 0; }
.batch-card .tbl th:first-child, .batch-card .tbl th:last-child { border-radius: 0; }
.batch-sum .tag { height: 24px; font-size: 13px; }
.batch-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.add-box { border-top: 1px solid var(--line); background: var(--surface-2); }
.add-row { min-height: 36px; }
.mini-empty.pad { padding: 16px 20px; }
.batch-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.batch-row:last-child { border-bottom: 0; }
.batch-row .progress { margin-top: 6px; max-width: 320px; }

.dropzone {
  display: grid; justify-items: center; align-content: center; gap: 6px; min-height: 168px; padding: 20px 16px; margin: 0;
  border: 2px dashed var(--line-strong); border-radius: var(--r-lg); background: var(--surface); text-align: center; cursor: pointer; color: var(--text);
}
.dropzone:hover, .dropzone.is-over { border-color: var(--accent); background: var(--accent-soft); }
.dropzone:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }
.dropzone .dz-ico { font-size: 34px; line-height: 40px; }
.dropzone .dz-t { font-size: 16px; line-height: 22px; font-weight: 700; }
.dropzone .dz-or { font-size: 13px; color: var(--text-3); }
.dropzone .dz-h { font-size: 13px; line-height: 18px; color: var(--text-3); max-width: 520px; }
.dropzone.big { min-height: 240px; }
.dropzone.big .dz-ico { font-size: 48px; line-height: 56px; }
.dropzone.big .dz-t { font-size: 20px; line-height: 28px; }
.pdf-row { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 6px 0; border-bottom: 1px dashed var(--line); min-width: 0; flex-wrap: wrap; }
.pdf-row:last-child { border-bottom: 0; }
.pdf-row .grow { min-width: 160px; }
.pdf-row.is-sel { background: color-mix(in srgb, var(--accent-soft) 60%, transparent); border-radius: var(--r-sm); padding: 6px 8px; }
.pdf-row .pi-ico { font-size: 22px; flex: none; }
.pdf-res .tbl th:first-child, .pdf-res .tbl th:last-child { border-radius: 0; }
.pdf-tbl .select { height: 32px; font-size: 13px; }
.diff { color: var(--warn) !important; font-weight: 700; }
.tbl .l2.diff { color: var(--warn); }
/* Pochta xodimi – sodda, katta, do‘stona */
.postal { max-width: 760px; display: grid; gap: 16px; }
.postal .page-head { margin-bottom: 4px; }
.postal .page-head h2 { display: block; font-size: 26px; line-height: 34px; }
.postal .lead { font-size: 16px; line-height: 24px; }
.postal .card-h h3 { font-size: 17px; }
.postal .card-b { font-size: 16px; line-height: 24px; }
.steps-plain { margin: 0; padding-left: 22px; display: grid; gap: 8px; }
.postal .btn.lg { height: 52px; font-size: 17px; padding: 0 22px; }

/* ───────────── 23. A4 yorliqlar (ekranda – kichraytirilgan varaq; chop etishda – asl o‘lcham) ───────────── */
.print-bar { margin-bottom: 16px; }
.sheets { display: grid; gap: 20px; }
.sheet-wrap { width: 100%; max-width: 210mm; overflow: hidden; margin: 0 auto; }
.sheet {
  width: 210mm; height: 297mm; padding: 6mm; background: #fff; color: #111; transform-origin: top left;
  display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: repeat(5, 1fr);
  box-shadow: var(--shadow-2); border-radius: 2px; font-family: var(--font);
}
.yl {
  position: relative; border: .3mm dashed #8a8a8a; margin: -.15mm; padding: 4mm 5mm 3mm; overflow: hidden;
  display: flex; flex-direction: column; gap: 1mm; color: #111; font-size: 12pt; line-height: 1.25;
}
.yl.empty { border-color: #d0d0d0; }
.yl .lno { position: absolute; top: 2mm; right: 3mm; font-size: 11pt; color: #555; font-variant-numeric: tabular-nums; }
.yl .l-name { font-size: 16pt; font-weight: 700; padding-right: 22mm; line-height: 1.15; }
.yl .l-phone { font-size: 13pt; font-variant-numeric: tabular-nums; }
.yl .l-reg { font-size: 12pt; }
.yl .l-off { font-size: 14pt; font-weight: 700; }
.yl .l-books { font-size: 11pt; color: #222; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.yl .l-meta { font-size: 11pt; color: #333; margin-top: auto; }

@page { size: A4 portrait; margin: 0; }
@media print {
  html, body { background: #fff !important; color: #000; }
  .side, .top, .bnav, #banners, .toasts, .popover, .scrim, .drawer, .dlg, .print-bar, .bulkbar, .live-bar-slot { display: none !important; }
  .app { display: block !important; min-height: 0; }
  .main { display: block; }
  .view { padding: 0 !important; max-width: none !important; }
  .sheets { display: block; }
  .sheet-wrap { max-width: none; width: auto; height: auto !important; overflow: visible; margin: 0; }
  .sheet { transform: none !important; box-shadow: none; border-radius: 0; break-after: page; page-break-after: always; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .sheet-wrap:last-child .sheet { break-after: auto; page-break-after: auto; }
  .app:not(.is-print-view) .card { box-shadow: none; }
}
@media (max-width: 760px) {
  .batch-actions .btn { flex: 1 1 100%; }
  .batch-actions .grow { display: none; }
  .postal .page-head h2 { font-size: 22px; line-height: 30px; }
  .dropzone.big { min-height: 200px; }
  .print-bar .seg { order: 3; }
}
.verify-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.tbl .l2.warn-t { color: var(--warn); }
.go-post { margin-bottom: 12px; align-items: center; }
.go-post .btn { flex: none; }
.yl-checks { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; width: 100%; }
.yl-checks .check { font-size: 13px; line-height: 18px; align-items: flex-start; }
.yl-checks .check input { margin-top: 0; flex: none; }
.c-post-n { color: var(--st-post); }
.card-b .onoff { width: 84px; text-align: right; font-size: 13px; color: var(--text-2); flex: none; }
.th-sort { border: 0; background: none; padding: 0; font: inherit; font-weight: 700; color: inherit; cursor: pointer; white-space: nowrap; display: inline-flex; gap: 4px; align-items: center; }
.th-sort[aria-pressed="true"] { color: var(--accent); }
.th-sort:hover { color: var(--text); }
.items.cmp .r { width: 34%; white-space: normal; }

/* ───────── Haqiqiy panel qo‘shimchalari (prototipdagi ko‘rinish o‘zgarmaydi) ───────── */
/* Chek – haqiqiy rasm (/api/media/r.*): quti o‘lchami prototipdagidek, rasm ichiga sig‘adi */
.receipt .rc-img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; transform-origin: center; transition: transform .15s; }
/* Suhbat: fayl havola bo‘lsa ham oddiy fayl kartasi kabi */
.sb a.file { color: inherit; text-decoration: none; }
.sb a.file:hover b { text-decoration: underline; }
