/* NOWAY Audit (V-051). Asos: jamoa ilovasi (V-023).
   Apple uslubi: tizim shrifti, #F2F2F7 fon, inset grouped ro'yxatlar, Large Title, ingichka ikonkalar.
   Aksent — NOWAY teal (bitta). Holatlar — iOS tizim ranglari. Qorong'i rejim — avtomatik. */
:root {
  --bg: #f2f2f7;
  --group: #ffffff;
  --text: #000000;
  --muted: #8e8e93;
  --sep: rgba(60, 60, 67, 0.18);
  --fill: rgba(118, 118, 128, 0.12);
  --accent: #447374;
  --red: #ff3b30;
  --gray: #8e8e93;
  --blue: #007aff;
  --orange: #ff9500;
  --green: #34c759;
  --tabbar: rgba(249, 249, 249, 0.94);
  --tab-h: 0px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --group: #1c1c1e;
    --text: #ffffff;
    --muted: #8e8e93;
    --sep: rgba(84, 84, 88, 0.6);
    --fill: rgba(118, 118, 128, 0.24);
    --accent: #6fa3a4;
    --red: #ff453a;
    --blue: #0a84ff;
    --orange: #ff9f0a;
    --green: #30d158;
    --tabbar: rgba(22, 22, 23, 0.94);
  }
  :root .seg button.on { background: #636366; }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font: 17px/1.29 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
  letter-spacing: -0.41px;
  -webkit-font-smoothing: antialiased;
  padding-top: var(--safe-t);
  padding-bottom: calc(var(--tab-h) + var(--safe-b) + 12px);
}
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
a { color: inherit; text-decoration: none; }
svg.ic { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round; flex: none; }

#app { max-width: 680px; margin: 0 auto; padding: 8px 16px 24px; }

/* Large Title */
.nav { display: flex; justify-content: space-between; align-items: center; min-height: 44px; }
.back { color: var(--accent); display: inline-flex; align-items: center; gap: 2px; font-size: 17px; }
.back svg.ic { width: 20px; height: 20px; stroke-width: 2.2; }
.top { display: flex; align-items: flex-end; gap: 8px; margin: 2px 0 6px; }
.top h1 { font-size: 34px; line-height: 41px; font-weight: 700; letter-spacing: 0.37px; margin: 0; flex: 1; }
.top h1.small { font-size: 28px; line-height: 34px; letter-spacing: 0.36px; }
.sub { color: var(--muted); font-size: 15px; margin: 0 0 12px; letter-spacing: -0.24px; }
.icon-btn { border: 0; background: none; color: var(--accent); padding: 6px; margin-right: -6px; cursor: pointer;
  display: inline-flex; border-radius: 8px; }
.icon-btn svg.ic { width: 26px; height: 26px; }

/* inset grouped */
.section { margin: 22px 16px 7px; font-size: 13px; line-height: 18px; color: var(--muted);
  text-transform: uppercase; letter-spacing: -0.08px; display: flex; align-items: center; gap: 6px; }
.section.danger { color: var(--red); }
.group { background: var(--group); border-radius: 10px; overflow: hidden; }
.group + .group { margin-top: 16px; }
.row { display: flex; gap: 12px; align-items: center; padding: 11px 16px; min-height: 44px; position: relative; cursor: pointer; }
.row:not(:last-child)::after { content: ""; position: absolute; right: 0; bottom: 0; left: 50px; height: 0.5px; background: var(--sep); }
.row.plain:not(:last-child)::after { left: 16px; }
.row:has(.avatar):not(:last-child)::after { left: 64px; }
.row:active { background: var(--fill); }
.row .lead { color: var(--accent); display: flex; }
.row .main { flex: 1; min-width: 0; }
.row .title { display: block; }
.row .chev { color: var(--muted); opacity: .6; }
.row .chev svg.ic { width: 14px; height: 14px; stroke-width: 2.4; }
.meta { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 3px; font-size: 13px; color: var(--muted); align-items: center; letter-spacing: -0.08px; }
.meta .m { display: inline-flex; align-items: center; gap: 3px; }
.meta svg.ic { width: 13px; height: 13px; stroke-width: 1.8; }
.overdue { color: var(--red) !important; }
.empty { color: var(--muted); padding: 40px 0; text-align: center; font-size: 15px; }
.note { color: var(--muted); font-size: 13px; padding: 7px 16px 0; letter-spacing: -0.08px; }

/* holat — nuqta + matn */
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.pill i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--c); }
.s-yangi { --c: var(--gray); }
.s-jarayonda { --c: var(--blue); }
.s-tekshiruvda { --c: var(--orange); }
.s-tayyor { --c: var(--green); }
.pill.big { font-size: 15px; color: var(--text); }

/* segmented control */
.seg { display: flex; background: var(--fill); border-radius: 9px; padding: 2px; margin: 4px 0 14px; }
.seg button { flex: 1; border: 0; background: none; padding: 6px 8px; border-radius: 7px; font-size: 13px;
  font-weight: 500; letter-spacing: -0.08px; cursor: pointer; }
.seg button.on { background: var(--group); box-shadow: 0 3px 8px rgba(0,0,0,.12), 0 3px 1px rgba(0,0,0,.04); font-weight: 600; }
.seg button:disabled { opacity: .5; }

/* board */
.board { display: flex; gap: 12px; overflow-x: auto; margin: 0 -16px; padding: 0 16px 8px; scroll-snap-type: x mandatory; scroll-padding: 0 16px; scrollbar-width: none; }
.board::-webkit-scrollbar { display: none; }
.col { flex: 0 0 82%; max-width: 280px; scroll-snap-align: start; }
.col-h { display: flex; justify-content: space-between; margin: 0 4px 8px; font-size: 13px; color: var(--muted); }
.card { display: block; background: var(--group); border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; }
.card:active { opacity: .7; }
.card .title { font-size: 15px; letter-spacing: -0.24px; }

/* xususiyatlar */
.prop { display: flex; align-items: center; padding: 11px 16px; min-height: 44px; position: relative; gap: 12px; }
.prop:not(:last-child)::after { content: ""; position: absolute; right: 0; bottom: 0; left: 16px; height: 0.5px; background: var(--sep); }
.prop .k { flex: 1; }
.prop .v { color: var(--muted); text-align: right; max-width: 62%; }
.prop select, .prop input { border: 0; background: none; color: var(--muted); text-align: right; text-align-last: right;
  padding: 0; max-width: 100%; -webkit-appearance: none; appearance: none; }
.prop input[type=date] { min-height: 22px; }
.prop select:focus, .prop input:focus { outline: none; color: var(--accent); }

/* forma (grouped) */
.form .field { display: block; padding: 11px 16px; position: relative; }
.form .field:not(:last-child)::after { content: ""; position: absolute; right: 0; bottom: 0; left: 16px; height: 0.5px; background: var(--sep); }
.form .field span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 2px; }
.form input, .form select, .form textarea { width: 100%; border: 0; background: none; padding: 2px 0; outline: none; -webkit-appearance: none; }
.form textarea { min-height: 64px; resize: vertical; }
.btn { border: 0; border-radius: 12px; padding: 14px; background: var(--accent); color: #fff; font-weight: 600; cursor: pointer; width: 100%; margin-top: 20px; }
.btn.ghost { background: var(--group); color: var(--accent); }
.btn.danger { background: var(--group); color: var(--red); }
.btn:disabled { opacity: .4; }
.link-row { color: var(--accent); }

/* izohlar */
.comment { padding: 11px 16px; position: relative; }
.comment:not(:last-child)::after { content: ""; position: absolute; right: 0; bottom: 0; left: 16px; height: 0.5px; background: var(--sep); }
.comment .who { font-size: 13px; font-weight: 600; }
.comment small { color: var(--muted); font-weight: 400; margin-left: 6px; }
.comment p { margin: 2px 0 0; font-size: 15px; letter-spacing: -0.24px; }
.composer { display: flex; gap: 8px; align-items: center; margin-top: 10px; }
.composer input { flex: 1; padding: 9px 14px; border: 0.5px solid var(--sep); border-radius: 18px; background: var(--group); outline: none; }
.send { border: 0; width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; cursor: pointer; flex: none; }
.send svg.ic { width: 18px; height: 18px; stroke-width: 2.2; }

/* kalendar */
.cal-wrap { background: var(--group); border-radius: 12px; padding: 10px 8px 6px; }
.cal-h { display: flex; align-items: center; justify-content: space-between; padding: 0 8px 6px; font-weight: 600; }
.cal-h .icon-btn { margin: 0; }
.cal-h .icon-btn svg.ic { width: 20px; height: 20px; stroke-width: 2.2; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; }
.cal .dow { font-size: 13px; font-weight: 600; color: var(--muted); padding: 4px 0 6px; }
.cal button { border: 0; background: none; height: 48px; font-size: 19px; letter-spacing: 0.38px; position: relative; cursor: pointer; display: grid; place-items: center; }
.cal button span { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; }
.cal button.out { color: var(--muted); opacity: .45; }
.cal button.today span { color: var(--accent); font-weight: 600; }
.cal button.sel span { background: var(--accent); color: #fff; font-weight: 600; }
.cal button i { position: absolute; left: 50%; bottom: 0; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--muted); }
.cal button i.late { background: var(--red); }

/* kirish */
.login { min-height: 82vh; display: flex; flex-direction: column; justify-content: center; }
.login .mark { width: 76px; height: 76px; border-radius: 17px; margin: 0 auto 16px; display: block; box-shadow: 0 6px 16px rgba(0,0,0,.12); }
.login h1 { text-align: center; font-size: 28px; margin: 0 0 4px; }
.login .sub { text-align: center; margin-bottom: 26px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--fill); display: grid; place-items: center;
  font-weight: 600; font-size: 14px; color: var(--muted); flex: none; }
.badge { font-size: 12px; color: var(--accent); font-weight: 500; }

/* tab bar */
#tabs { position: fixed; left: 0; right: 0; bottom: 0; height: calc(var(--tab-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  background: var(--tabbar); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-top: 0.5px solid var(--sep); display: flex; z-index: 5; }
#tabs[hidden] { display: none; }
#tabs a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  font-size: 10px; font-weight: 500; letter-spacing: 0.1px; color: var(--muted); }
#tabs a svg.ic { width: 25px; height: 25px; stroke-width: 1.5; }
#tabs a.on { color: var(--accent); }

/* sheet */
#sheet { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 10; display: flex; align-items: flex-end; }
#sheet[hidden] { display: none; }
#sheet .panel { background: var(--bg); width: 100%; max-width: 680px; margin: 0 auto; border-radius: 12px 12px 0 0;
  padding: 8px 16px calc(16px + var(--safe-b)); max-height: 92vh; overflow: auto; }
#sheet .grab { width: 36px; height: 5px; border-radius: 3px; background: var(--sep); margin: 0 auto 10px; }
#sheet h2 { margin: 0 0 14px; font-size: 17px; font-weight: 600; text-align: center; }

#toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tab-h) + var(--safe-b) + 14px); z-index: 20;
  background: rgba(30,30,30,.92); color: #fff; border-radius: 20px; padding: 9px 16px; font-size: 15px; max-width: calc(100% - 32px); }
#toast[hidden] { display: none; }

/* ================= Audit ilovasi qo'shimchalari ================= */
body { padding-bottom: calc(var(--safe-b) + 24px); }
.row, .pcard, .thumb { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.acts { display: inline-flex; gap: 6px; }
.s-taqdim { --c: var(--accent); }
.title.done { color: var(--muted); text-decoration: line-through; }
button.row { border: 0; background: none; width: 100%; text-align: left; }
button.row.act { justify-content: center; color: var(--accent); }

#net { position: sticky; top: 0; z-index: 6; background: var(--orange); color: #000; font-size: 13px; text-align: center;
  padding: calc(6px + var(--safe-t)) 12px 6px; margin-top: calc(-1 * var(--safe-t)); }
#net[hidden] { display: none; }

/* skelet (ilova yuklanguncha) */
.skel { padding-top: 96px; display: grid; gap: 10px; }
.skel i { height: 62px; border-radius: 10px; background: var(--fill); animation: pulse 1.1s ease-in-out infinite alternate; }
@keyframes pulse { to { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .skel i { animation: none; } }

/* qidiruv */
.search { display: flex; align-items: center; gap: 6px; background: var(--fill); border-radius: 10px; padding: 7px 10px; margin: 4px 0 14px; color: var(--muted); }
.search svg.ic { width: 17px; height: 17px; stroke-width: 2; }
.search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; padding: 0; color: var(--text); -webkit-appearance: none; appearance: none; }
.search input::-webkit-search-cancel-button { -webkit-appearance: none; }

/* 5 bo'limli segment */
.seg.five button { padding: 6px 2px; font-size: 12.5px; letter-spacing: -0.2px; white-space: nowrap; }

/* "qo'shish" qatori */
.add-row { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: var(--group); color: var(--accent);
  border-radius: 10px; padding: 12px 16px; min-height: 44px; margin: 0 0 12px; cursor: pointer; text-align: left; }
.add-row:active { background: var(--fill); }
.add-row svg.ic { width: 20px; height: 20px; stroke-width: 2; }
#sheet .add-row { margin-top: 10px; }

/* kuchli / kuchsiz tomon kartasi */
.pcard { background: var(--group); border-radius: 12px; padding: 13px 16px; margin-bottom: 10px; cursor: pointer; }
.pcard:active { background: var(--fill); }
.p-h { display: flex; gap: 10px; align-items: flex-start; }
.p-h .title { flex: 1; font-weight: 600; }
.pcard p { margin: 7px 0 0; font-size: 15px; letter-spacing: -0.24px; white-space: pre-line; }
.w { display: inline-flex; gap: 3px; padding-top: 7px; flex: none; }
.w i { width: 7px; height: 7px; border-radius: 50%; background: var(--fill); }
.w i.on { background: var(--accent); }

/* foto / video kichik ko'rinishi */
.thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; scrollbar-width: none; }
.thumbs::-webkit-scrollbar { display: none; }
.thumbs.edit { flex-wrap: wrap; margin: 0 0 4px; overflow: visible; }
.thumbs.edit:empty { display: none; }
.thumb { position: relative; flex: none; width: 76px; height: 76px; border: 0; padding: 0; border-radius: 9px; overflow: hidden;
  background: var(--fill); cursor: pointer; animation: pulse 1.1s ease-in-out infinite alternate; }
.thumb:has(img[src]), .thumb:has(video[src]), .thumb.broken { animation: none; }
.thumb img, .thumb video { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.thumb img:not([src]) { visibility: hidden; }
.thumb.broken::after { content: "!"; position: absolute; inset: 0; display: grid; place-items: center; color: var(--red); font-weight: 700; }
.playb { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; background: rgba(0,0,0,.22); pointer-events: none; }
.playb svg.ic { width: 24px; height: 24px; fill: currentColor; stroke: none; }
.thumb .x { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; display: grid; place-items: center; }
.thumb .x svg.ic { width: 12px; height: 12px; stroke-width: 2.6; }
.thumb.new { outline: 2px solid var(--accent); outline-offset: -2px; }

/* qadamlar */
.progress { height: 6px; border-radius: 3px; background: var(--fill); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.note.prog { padding: 6px 2px 12px; }
.num { width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid var(--c); background: none; color: var(--c); font-size: 14px; font-weight: 600;
  display: grid; place-items: center; flex: none; padding: 0; cursor: pointer; letter-spacing: 0; }
.num.s-tayyor { background: var(--c); color: #fff; }
.row .more { color: var(--muted); margin: -6px -8px -6px 0; }
.row .more svg.ic { width: 22px; height: 22px; fill: currentColor; stroke: none; }
.row:has(.num):not(:last-child)::after { left: 58px; }

/* toast: "Qaytarish" bilan */
#toast { display: flex; align-items: center; gap: 12px; bottom: calc(var(--safe-b) + 18px); width: max-content; }
#toast button { border: 0; background: none; color: #8fd0d1; font-weight: 600; padding: 0; cursor: pointer; flex: none; }

/* fayl ko'rish oynasi */
#viewer { position: fixed; inset: 0; z-index: 30; background: #000; color: #fff; display: flex; flex-direction: column;
  padding: var(--safe-t) 0 var(--safe-b); }
#viewer[hidden] { display: none; }
.v-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 16px; min-height: 48px; font-size: 15px; }
.v-bar span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v-bar .icon-btn { color: #fff; }
.v-body { flex: 1; min-height: 0; display: grid; place-items: center; }
.v-body img, .v-body video { max-width: 100%; max-height: 100%; object-fit: contain; }
.v-body iframe { width: 100%; height: 100%; border: 0; background: #fff; }
.v-open { width: auto; margin: 10px 16px; text-align: center; }

/* ================= Taqdimot rejimi: teal monoxrom, 3 rang ================= */
body.present { --p-bg: #0B1617; --p-text: #DCD8CF; --p-acc: #3E5F5E; background: var(--p-bg); color: var(--p-text); padding-bottom: 0;
  font-family: "Avenir Next", Avenir, -apple-system, "Helvetica Neue", sans-serif; letter-spacing: 0; -webkit-user-select: none; user-select: none; }
html:has(body.present) { background: #0B1617; }
body.present #app { max-width: 760px; padding: 0 24px calc(40px + var(--safe-b)); }
.p-close { position: fixed; top: calc(var(--safe-t) + 12px); right: 14px; z-index: 4; width: 40px; height: 40px; border-radius: 50%; border: 0;
  background: color-mix(in srgb, var(--p-acc) 55%, transparent); color: var(--p-text); display: grid; place-items: center; cursor: pointer; }
.p-close svg.ic { width: 18px; height: 18px; stroke-width: 2; }
.p-label { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--p-text); opacity: .6; }
.p-cover { min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding: 40px 0; }
.p-cover h1 { font-size: clamp(40px, 12vw, 72px); line-height: 1.02; font-weight: 600; margin: 18px 0 14px; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.p-cover p { margin: 0; font-size: 17px; opacity: .8; }
.p-cover .p-date { margin-top: 4px; opacity: .55; }
.p-stats { display: flex; gap: 28px; margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--p-acc); font-size: 13px; opacity: .9; }
.p-stats b { display: block; font-size: 34px; font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; }
.p-sec { padding: 44px 0 20px; border-top: 1px solid var(--p-acc); }
.p-sec h2 { font-size: 30px; line-height: 1.12; font-weight: 600; margin: 8px 0 26px; letter-spacing: -0.01em; }
.p-lead { font-size: 22px; line-height: 1.4; margin: 0 0 20px; }
.p-item, .p-steps li { display: flex; gap: 16px; margin-bottom: 30px; }
.p-n { flex: none; width: 34px; font-size: 14px; font-variant-numeric: tabular-nums; opacity: .55; padding-top: 4px; }
.p-b, .p-steps li > div { flex: 1; min-width: 0; }
.pres h3 { font-size: 20px; line-height: 1.25; font-weight: 600; margin: 0 0 5px; }
.p-tag { font-size: 13px; opacity: .6; }
.pres article p, .p-steps p { font-size: 16px; line-height: 1.5; margin: 9px 0 0; opacity: .88; white-space: pre-line; }
.p-media { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin-top: 14px; }
.p-media.one { grid-template-columns: 1fr; }
.p-media img, .p-media video { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; background: var(--p-acc); display: block; cursor: pointer; }
.p-media.one img { aspect-ratio: auto; }
.p-media > :only-child { grid-column: 1 / -1; aspect-ratio: 16 / 10; }
.p-rep { margin-bottom: 30px; }
.p-btn { margin-top: 12px; border: 1px solid var(--p-acc); background: none; color: var(--p-text); border-radius: 10px; padding: 11px 16px; font: inherit; cursor: pointer; }
.p-steps { list-style: none; margin: 0; padding: 0; }
.p-steps .p-n { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--p-acc); display: grid; place-items: center; padding: 0; opacity: 1; }
.p-steps li.tayyor .p-n { background: var(--p-acc); }
.p-steps li.jarayonda .p-n { border-color: var(--p-text); }
.p-foot { border-top: 1px solid var(--p-acc); padding: 22px 0 0; font-size: 12px; letter-spacing: .18em; text-transform: uppercase; opacity: .55; }
#tab .form textarea { min-height: 110px; }

/* ================= Safa Nazorat qo'shimchalari ================= */
:root { --tab-h: 50px; }
body { padding-bottom: calc(var(--tab-h) + var(--safe-b) + 16px); }
#toast { bottom: calc(var(--tab-h) + var(--safe-b) + 14px); }
.s-tekshiruvda { --c: var(--orange); }
.center { text-align: center; }
.accent { color: var(--accent); }
.chips { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px 12px; padding: 0 16px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips button { flex: none; border: 0; border-radius: 16px; padding: 7px 13px; background: var(--fill); font-size: 14px; cursor: pointer; white-space: nowrap; }
.chips button.on { background: var(--accent); color: #fff; font-weight: 600; }
.scanbar { display: flex; gap: 8px; align-items: stretch; margin: 12px 0 0; }
.scanbar .btn.scan { width: auto; margin: 0; padding: 0 14px; display: inline-flex; align-items: center; gap: 6px; flex: none; }
.scanbar .search { flex: 1; margin: 0; min-height: 44px; }
.scanbar + .seg { margin-top: 10px; }
.row.line { align-items: center; }
.row.line:not(:last-child)::after, .row.plain:not(:last-child)::after { left: 16px; }
.qtybox { flex: none; min-width: 52px; text-align: right; font-size: 19px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: 0; }
.qtybox.none { color: var(--muted); font-weight: 400; }
.qtybox small { display: block; font-size: 12px; font-weight: 500; }
.neg { color: var(--red); } .pos { color: var(--green); }
.pcard .big { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: 0; }
.kpis { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.kpis span { font-size: 12px; padding: 4px 9px; border-radius: 10px; background: var(--fill); letter-spacing: 0; }
.kpis .no { color: var(--red); } .kpis .ok { color: var(--muted); }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.tiles div { background: var(--group); border-radius: 12px; padding: 12px 14px; font-size: 13px; color: var(--muted); }
.tiles b { display: block; font-size: 24px; color: var(--text); font-variant-numeric: tabular-nums; letter-spacing: 0; }
.progress { margin: 4px 0 2px; }
.scanv { position: relative; background: #000; }
.scanv video { width: 100%; height: 100%; object-fit: cover; }
.scanv .frame { position: absolute; left: 10%; right: 10%; top: 50%; height: 130px; margin-top: -65px; border: 2px solid rgba(255,255,255,.85); border-radius: 14px; box-shadow: 0 0 0 100vmax rgba(0,0,0,.35); }
.v-note { margin: 0; padding: 12px 16px 16px; text-align: center; font-size: 14px; color: rgba(255,255,255,.8); }
.print-only { display: none; }
.signs { justify-content: space-between; margin-top: 40px; font-size: 13px; }
@media print {
  :root { --bg: #fff; --group: #fff; --text: #000; --muted: #444; color-scheme: light; }
  body { padding: 0; font-size: 12px; }
  #tabs, #toast, #sheet, #net, .no-print, .chev { display: none !important; }
  .print-only { display: flex; }
  .group { border: 0.5px solid #999; border-radius: 0; }
  .row, .prop { min-height: 0; padding: 5px 8px; break-inside: avoid; }
  .top h1 { font-size: 20px; line-height: 1.2; }
  .qtybox { font-size: 13px; }
}
/* Safa brend rangi (logodan): aksent ko'k */
:root { --accent: #008dc4; }
@media (prefers-color-scheme: dark) { :root { --accent: #2aa7dc; } }
#toast button { color: #7fd0f2; }

/* Xosting belgisi (bepul Netlify: o'ng pastda, 9–49px balandlikda). Belgi bor bo'lsa,
   pastki menyu, toast va oynalar undan yuqoriga ko'tariladi. Belgi yashirilmaydi. */
html.host-badge { --safe-b: max(env(safe-area-inset-bottom, 0px), 54px); }
