/* SKLAD PRO — строгая деловая тема (светлая / тёмная, синий акцент) */

:root {
  --bg: #F4F5F7;
  --surface: #FFFFFF;
  --surface-2: #F9FAFB;
  --soft: #F0F2F5;
  --line: #E3E6EA;
  --line-2: #D3D8DE;
  --ink: #111827;
  --ink-2: #374151;
  --muted: #6B7280;
  --accent: #1F5FD6;
  --accent-hover: #1A51B8;
  --accent-ink: #1A4FB5;
  --accent-soft: #EBF1FC;
  --on-accent: #FFFFFF;
  /* старые имена переменных указывают на новый акцент */
  --gold: var(--accent); --gold-hi: var(--accent); --gold-ink: var(--accent-ink); --gold-soft: var(--accent-soft); --on-gold: var(--on-accent);
  --red: #C62828;   --red-soft: #FDECEC;
  --orange: #B45309; --orange-soft: #FEF3E2;
  --green: #15803D; --green-soft: #E8F5EC;
  --blue: #1F5FD6;  --blue-soft: #EBF1FC;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04);
  --shadow-lg: 0 -8px 30px rgba(16, 24, 40, .12);
  --scrim: rgba(17, 24, 39, .45);
  --r: 10px;
  --nav-h: 60px;
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --wrap: 640px;
  --side: max(0px, calc((100vw - var(--wrap)) / 2));
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0F1115; --surface: #171A20; --surface-2: #1B1F26; --soft: #20242C;
  --line: #2A2F38; --line-2: #3A404B;
  --ink: #E8EAEE; --ink-2: #C5C9D1; --muted: #8C929D;
  --accent: #5B8DEF; --accent-hover: #6F9BF1; --accent-ink: #8AAEF5; --accent-soft: rgba(91, 141, 239, .15); --on-accent: #fff;
  --red: #F07167; --red-soft: rgba(240, 113, 103, .14);
  --orange: #E8A04A; --orange-soft: rgba(232, 160, 74, .15);
  --green: #4CC38A; --green-soft: rgba(76, 195, 138, .14);
  --blue: #5B8DEF; --blue-soft: rgba(91, 141, 239, .15);
  --shadow: none; --scrim: rgba(0, 0, 0, .6);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0F1115; --surface: #171A20; --surface-2: #1B1F26; --soft: #20242C;
    --line: #2A2F38; --line-2: #3A404B;
    --ink: #E8EAEE; --ink-2: #C5C9D1; --muted: #8C929D;
    --accent: #5B8DEF; --accent-hover: #6F9BF1; --accent-ink: #8AAEF5; --accent-soft: rgba(91, 141, 239, .15); --on-accent: #fff;
    --red: #F07167; --red-soft: rgba(240, 113, 103, .14);
    --orange: #E8A04A; --orange-soft: rgba(232, 160, 74, .15);
    --green: #4CC38A; --green-soft: rgba(76, 195, 138, .14);
    --blue: #5B8DEF; --blue-soft: rgba(91, 141, 239, .15);
    --shadow: none; --scrim: rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}
body.tg {
  --sat: max(env(safe-area-inset-top, 0px), calc(var(--tg-safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px)));
  --sab: max(env(safe-area-inset-bottom, 0px), var(--tg-safe-area-inset-bottom, 0px));
}

/* ---------- база ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh;
  background: var(--bg); color: var(--ink);
  font: 15px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
  overflow-x: hidden; overscroll-behavior-y: contain; font-variant-numeric: tabular-nums;
}
body.lock { overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; text-align: inherit; touch-action: manipulation; }
button:disabled { opacity: .45; cursor: default; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, p { margin: 0; }
small { font-size: 12px; }
[hidden] { display: none !important; }
.ic { flex: none; display: block; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button, a, label { transition: background-color .15s, color .15s, border-color .15s, opacity .15s; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: .02em; }

.red { color: var(--red); } .orange { color: var(--orange); } .green { color: var(--green); }
.blue { color: var(--accent-ink); } .gold, .gold-t { color: var(--accent-ink); } .muted { color: var(--muted); }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt20 { margin-top: 20px; } .mb12 { margin-bottom: 12px; }
.pb10 { padding-bottom: 10px; } .pad { padding: 16px; }
.grow { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.meta { font-size: 13px; color: var(--muted); line-height: 1.35; }
.rt { font-size: 15px; font-weight: 600; line-height: 1.3; }

/* ---------- шапка ---------- */
#top {
  position: sticky; top: 0; z-index: 20;
  padding-top: var(--sat); padding-left: var(--side); padding-right: var(--side);
  background: var(--surface); border-bottom: 1px solid var(--line);
}
.bar { display: flex; align-items: center; gap: 8px; min-height: 56px; padding: 6px 16px; }
.bar-title { flex: 1; min-width: 0; }
.bar-title h1 { font-size: 19px; font-weight: 650; letter-spacing: -.01em; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-sub { font-size: 12.5px; color: var(--muted); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-sub b { color: var(--ink-2); font-weight: 600; }
.bar-right { display: flex; gap: 6px; flex: none; }
.brand { font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand em { font-style: normal; font-size: 11px; font-weight: 600; color: var(--muted); border: 1px solid var(--line-2); padding: 1px 6px; border-radius: 4px; }
.hpad { padding: 0 16px 10px; }

.icon-btn {
  position: relative; width: 40px; height: 40px; border-radius: 8px;
  display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line-2); color: var(--ink-2);
}
.icon-btn:hover { background: var(--soft); }
.icon-btn.ghost { background: transparent; border-color: transparent; margin-left: -8px; }
.bar-right .icon-btn.ghost { margin-left: 0; }
.icon-btn.sm { width: 34px; height: 34px; border-radius: 7px; }
.icon-btn .ic { width: 20px; height: 20px; }
.badge {
  position: absolute; top: 4px; right: 4px; min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 9px; background: var(--red); color: #fff; font-size: 10.5px; font-weight: 700;
  display: grid; place-items: center; border: 2px solid var(--surface); box-sizing: content-box; transform: translate(40%, -40%);
}

.search {
  display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 12px;
  background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 8px; color: var(--muted);
}
.search:focus-within { border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 3px var(--accent-soft); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 16px; color: var(--ink); height: 100%; }
.search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.search input::placeholder { color: var(--muted); }

.chips { display: flex; gap: 6px; overflow-x: auto; padding: 0 16px 10px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips.wrap { flex-wrap: wrap; padding: 0; overflow: visible; }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 5px; height: 32px; padding: 0 12px;
  border-radius: 7px; background: var(--surface); border: 1px solid var(--line-2);
  font-size: 13.5px; font-weight: 550; color: var(--ink-2); white-space: nowrap;
}
.chip .ic { width: 15px; height: 15px; }
.chip.on { background: var(--accent-soft); color: var(--accent-ink); border-color: var(--accent); }
.chip.ghost { border-style: dashed; color: var(--muted); }
.seg { display: flex; gap: 0; padding: 3px; border-radius: 9px; background: var(--soft); border: 1px solid var(--line); }
.seg button { flex: 1; min-width: 0; min-height: 36px; border-radius: 7px; font-size: 14px; font-weight: 550; color: var(--muted); text-align: center; padding: 0 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(16, 24, 40, .1); font-weight: 600; }
.seg.big button { min-height: 44px; font-size: 15px; }

/* ---------- контент ---------- */
#view { padding: 12px calc(16px + var(--side)) calc(var(--nav-h) + var(--sab) + 28px); min-height: 60vh; }
body.has-cart #view { padding-bottom: calc(var(--nav-h) + var(--sab) + 90px); }

.sec { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 24px 2px 8px; }
.sec h2 { font-size: 13px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.sec h2.red { color: var(--red); } .sec h2.muted { color: var(--muted); }
.cnt { font-size: 11.5px; font-weight: 650; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 5px; background: var(--soft); color: var(--ink-2); display: inline-grid; place-items: center; letter-spacing: 0; }
.link { color: var(--accent-ink); font-size: 13.5px; font-weight: 600; padding: 4px 0; display: inline-flex; align-items: center; gap: 2px; }
.link.sm { font-size: 13px; margin-top: 8px; }
.link .ic { width: 15px; height: 15px; }
#view > .sec:first-child { margin-top: 6px; }
.count { font-size: 12.5px; color: var(--muted); margin: 2px 2px 8px; }
.hint { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--ink-2); background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--accent); padding: 9px 12px; border-radius: 6px; margin: 10px 0 12px; line-height: 1.4; }
.hint .ic { margin-top: 1px; color: var(--accent); width: 16px; height: 16px; }
.ver { text-align: center; font-size: 12px; color: var(--muted); margin-top: 24px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; box-shadow: var(--shadow); }
article.card + article.card, .sec + article.card { margin-top: 10px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.grid2.g8 { gap: 8px; }

/* ---------- панель «Сегодня» ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.panel-h { display: flex; justify-content: space-between; align-items: center; padding: 11px 14px; border-bottom: 1px solid var(--line); font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.metrics > div { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.metrics > div + div { border-left: 1px solid var(--line); }
.metrics span { font-size: 12.5px; color: var(--muted); }
.metrics b { font-size: 22px; font-weight: 700; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.metrics b small { font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: 0; }

/* hero (касса, долги) — теперь спокойная белая панель */
.hero { background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; box-shadow: var(--shadow); }
.hero-top { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.hk { font-size: 12.5px; color: var(--muted); }
.hero-rev { font-size: 30px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; margin-top: 2px; }
.hero-rev small { font-size: 14px; font-weight: 600; color: var(--muted); margin-left: 6px; letter-spacing: 0; }
.hero-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: end; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.hero-row.two { grid-template-columns: 1fr 1fr; margin-top: 0; padding-top: 0; border-top: 0; }
.hv { font-size: 18px; font-weight: 700; margin-top: 2px; white-space: nowrap; }
.hv small { font-size: 12px; font-weight: 600; color: var(--muted); }
.hv.gold { color: var(--accent-ink); }
.hv.red-l { color: var(--red); }
.hs { font-size: 12px; color: var(--muted); margin-top: 2px; }
.hero.slim { padding: 14px; }

.mini {
  display: grid; grid-template-columns: auto 1fr; grid-template-areas: "mi mk" "mv mv" "ms ms";
  column-gap: 8px; row-gap: 1px; align-items: center; text-align: left;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; box-shadow: var(--shadow);
}
.mini:hover, .qa button:hover, .row[data-act]:hover, button.row:hover { background: var(--surface-2); }
.mi { grid-area: mi; color: var(--muted); }
.mi .ic { width: 18px; height: 18px; }
.mk { grid-area: mk; font-size: 12.5px; color: var(--muted); font-weight: 500; }
.mv { grid-area: mv; font-size: 20px; font-weight: 700; letter-spacing: -.02em; margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mv small { font-size: 12px; color: var(--muted); font-weight: 600; letter-spacing: 0; }
.ms { grid-area: ms; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini.warn-red { border-left: 3px solid var(--red); } .mini.warn-red .mi { color: var(--red); }
.mini.warn-orange { border-left: 3px solid var(--orange); } .mini.warn-orange .mi, .mini.warn-orange .mv { color: var(--orange); }

.qa { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.qa button {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 66px; padding: 10px 6px; border-radius: var(--r);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
  font-size: 13.5px; font-weight: 600; text-align: center; line-height: 1.15;
}
.qa button span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qi { color: var(--accent); flex: none; display: grid; place-items: center; }
.qi .ic { width: 20px; height: 20px; }

/* ---------- списки ---------- */
.list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); }
.list > .empty { padding: 26px 16px; }
.row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 10px 14px; text-align: left; position: relative; color: var(--ink); }
.list > .row + .row, .list > .ci + .ci { border-top: 1px solid var(--line); }
.row > .ic:last-child { color: var(--muted); width: 18px; height: 18px; }
.row .grow { gap: 1px; }
.ri { width: 34px; height: 34px; border-radius: 8px; flex: none; display: grid; place-items: center; background: var(--soft); color: var(--ink-2); }
.ri .ic { width: 18px; height: 18px; }
.ri.gold, .ri.blue { background: var(--accent-soft); color: var(--accent-ink); }
.ri.red { background: var(--red-soft); color: var(--red); }
.ri.orange { background: var(--orange-soft); color: var(--orange); }
.ri.green { background: var(--green-soft); color: var(--green); }
.ri.muted { background: var(--soft); color: var(--muted); }
.ra { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 1px; text-align: right; max-width: 45%; }
.ra b { font-size: 15px; font-weight: 650; white-space: nowrap; }
.ra small { color: var(--muted); white-space: nowrap; }
.day-h { font-size: 12.5px; font-weight: 650; color: var(--muted); margin: 18px 2px 6px; text-transform: uppercase; letter-spacing: .04em; }
.day-h:first-child { margin-top: 4px; }

.thumb { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; flex: none; background: var(--soft); border: 1px solid var(--line); }
.thumb.sm { width: 36px; height: 36px; border-radius: 6px; }
.thumb.lg { width: 72px; height: 72px; border-radius: 10px; }
.prow2.dim { opacity: .5; }
.addbtn { width: 30px; height: 30px; border-radius: 7px; display: grid; place-items: center; border: 1px solid var(--line-2); color: var(--accent); }
.incart { font-size: 11.5px; font-weight: 650; color: var(--accent-ink); background: var(--accent-soft); border-radius: 5px; padding: 2px 6px; white-space: nowrap; }

.row.task { gap: 10px; padding: 8px 10px 8px 14px; }
.tcheck { width: 22px; height: 22px; border-radius: 5px; flex: none; border: 2px solid var(--line-2); display: grid; place-items: center; color: #fff; }
.row.task.done .tcheck { background: var(--green); border-color: var(--green); }
.row.task.done .rt { text-decoration: line-through; color: var(--muted); }
.row.task.over .tcheck { border-color: var(--red); }
.row.task.over .rt b { color: var(--red); }
.tbody { display: flex; flex-direction: column; gap: 1px; padding: 4px 0; text-align: left; }
.tbody .rt b { color: var(--accent-ink); font-weight: 650; margin-right: 2px; }

/* ---------- пилюли / статусы ---------- */
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px; border-radius: 5px; font-size: 12px; font-weight: 600; white-space: nowrap; line-height: 1.4; flex: none; }
.pill .ic { width: 12px; height: 12px; }
.pill-gold, .pill-blue { background: var(--accent-soft); color: var(--accent-ink); }
.pill-red { background: var(--red-soft); color: var(--red); }
.pill-orange { background: var(--orange-soft); color: var(--orange); }
.pill-green { background: var(--green-soft); color: var(--green); }
.pill-muted { background: var(--soft); color: var(--ink-2); }

/* ---------- кнопки ---------- */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 44px; padding: 0 16px; border-radius: 8px;
  font-size: 15px; font-weight: 600; text-align: center; line-height: 1.2; cursor: pointer; border: 1px solid transparent;
}
.btn .ic { width: 18px; height: 18px; }
.btn-gold, .btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-gold:hover:not(:disabled) { background: var(--accent-hover); }
.btn-soft { background: var(--surface); color: var(--ink); border-color: var(--line-2); }
.btn-soft:hover:not(:disabled) { background: var(--soft); }
.btn-dark { background: var(--ink); color: var(--surface); }
.btn-danger { background: var(--surface); color: var(--red); border-color: color-mix(in srgb, var(--red) 35%, var(--line-2)); }
.btn-red { background: var(--red); color: #fff; }
.btn-lg { min-height: 50px; font-size: 16px; }
.btn.sm { min-height: 36px; font-size: 13.5px; padding: 0 12px; }
.btn.w-auto { width: auto; display: inline-flex; padding: 0 16px; }
.btn-row { display: flex; gap: 8px; }
.btn-row > * { flex: 1; min-width: 0; }
.sbtn {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 36px; padding: 0 8px;
  border-radius: 7px; background: var(--surface); border: 1px solid var(--line-2); color: var(--ink-2); font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; cursor: pointer; min-width: 0;
}
.sbtn .ic { width: 16px; height: 16px; }
.sbtn.gold { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.sbtn.green { color: var(--green); }
.sbtn:disabled { opacity: .4; }

/* ---------- склад ---------- */
.pcard { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 10px 12px; padding: 12px; }
.pcard .ph { width: 64px; height: 64px; border-radius: 8px; overflow: hidden; background: var(--soft); border: 1px solid var(--line); }
.pcard .ph img { width: 100%; height: 100%; object-fit: cover; }
.pinfo { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.sku { font-size: 12px; font-weight: 600; color: var(--muted); font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
.name { font-size: 15.5px; font-weight: 650; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pinfo .meta b { color: var(--ink); font-weight: 650; }
.pinfo .meta b.red { color: var(--red); } .pinfo .meta b.orange { color: var(--orange); }
.prow { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; margin-top: 4px; }
.price { font-size: 16px; font-weight: 700; }
.pactions { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding-top: 10px; border-top: 1px solid var(--line); }
.pactions:has(> :nth-child(2):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pinfo .name { cursor: pointer; }

.pbig { aspect-ratio: 16 / 10; border-radius: var(--r); overflow: hidden; background: var(--soft); border: 1px solid var(--line); }
.pbig img { width: 100%; height: 100%; object-fit: cover; }
.ptitle { font-size: 21px; font-weight: 700; letter-spacing: -.01em; margin-top: 14px; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.stat { display: flex; flex-direction: column; gap: 1px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; box-shadow: var(--shadow); min-width: 0; }
.stat > span { font-size: 12.5px; color: var(--muted); }
.stat > b { font-size: 18px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat > b small { font-size: 12px; color: var(--muted); font-weight: 600; }
.stat > small { color: var(--muted); line-height: 1.3; }
.stat > small em { font-style: normal; font-weight: 700; }
.stat.bad { border-left: 3px solid var(--red); }
.stat.goldb { border-left: 3px solid var(--accent); }
.stat.goldb > b { color: var(--accent-ink); }
em.up { color: var(--green); } em.dn { color: var(--red); }
.bc { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.bc b { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: .06em; font-size: 15px; }

/* ключ-значение (клиент, зарплата, касса) */
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px 14px; }
.kv > div { display: flex; flex-direction: column; min-width: 0; }
.kv span { font-size: 12.5px; color: var(--muted); }
.kv b { font-size: 15.5px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.paycard .paytop { display: flex; align-items: center; gap: 10px; padding-bottom: 10px; margin-bottom: 10px; border-bottom: 1px solid var(--line); }
.monthnav { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.monthnav b { font-size: 15px; }
.bonusbox { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 8px; padding: 9px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); font-size: 13.5px; color: var(--ink-2); }
.bonusbox .chip { height: 30px; }

/* ---------- продажа ---------- */
.scan-cta { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px; border-radius: var(--r); background: var(--surface); border: 1px dashed var(--line-2); }
.scan-cta b { display: block; font-size: 15px; }
.scan-cta small { display: block; color: var(--muted); font-size: 13px; margin-top: 1px; }
.sc-ic { width: 44px; height: 44px; border-radius: 8px; flex: none; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.steps { display: flex; gap: 0; margin: 12px 0 8px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--surface); }
.steps span { flex: 1; min-width: 0; text-align: center; font-size: 12px; font-weight: 600; padding: 7px 4px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.steps span + span { border-left: 1px solid var(--line); }
.steps span.on { background: var(--accent-soft); color: var(--accent-ink); }

#cartbar {
  position: fixed; z-index: 29; left: calc(12px + var(--side)); right: calc(12px + var(--side));
  bottom: calc(var(--nav-h) + var(--sab) + 10px);
  display: flex; align-items: center; gap: 12px; height: 52px; padding: 0 14px 0 10px;
  border-radius: 10px; background: var(--accent); color: var(--on-accent);
  box-shadow: 0 8px 20px -8px rgba(31, 95, 214, .55);
}
#cartbar.empty { background: var(--surface); color: var(--muted); border: 1px dashed var(--line-2); box-shadow: none; }
#cartbar > .ic { color: inherit; opacity: .8; }
.cb-ic { position: relative; width: 34px; height: 34px; border-radius: 7px; display: grid; place-items: center; background: rgba(255, 255, 255, .16); flex: none; }
#cartbar.empty .cb-ic { background: var(--soft); color: var(--muted); }
.cb-ic i { position: absolute; top: -5px; right: -5px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: #fff; color: var(--accent); font: 700 11px/17px inherit; font-style: normal; text-align: center; }
.cb-txt { flex: 1; min-width: 0; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cb-txt b { font-size: 15px; }

/* ---------- CRM ---------- */
.kpis { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px 12px; padding: 2px 16px 4px; scrollbar-width: none; }
.kpis::-webkit-scrollbar { display: none; }
.kpi { flex: none; min-width: 96px; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 10px 12px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.kpi b { font-size: 21px; font-weight: 700; line-height: 1.15; }
.kpi span { font-size: 12px; color: var(--muted); white-space: nowrap; }
.kpi.orange b { color: var(--orange); } .kpi.red b { color: var(--red); } .kpi.gold b, .kpi.blue b { color: var(--accent-ink); }

.ctop { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; }
.ctop .grow { gap: 1px; }
.cstats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 10px; padding: 10px 0 0; border-top: 1px solid var(--line); }
.cstats > div { display: flex; flex-direction: column; min-width: 0; }
.cstats span { font-size: 12px; color: var(--muted); }
.cstats b { font-size: 15px; font-weight: 650; white-space: nowrap; }
.cstats small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cstats small.red { color: var(--red); }
.cactions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-top: 10px; }
@media (min-width: 420px) { .ccard .cactions { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

.av { width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--soft); color: var(--ink-2); font-size: 14px; font-weight: 650; border: 1px solid var(--line); }
.av.vip { background: var(--accent-soft); color: var(--accent-ink); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }
.av.lg { width: 56px; height: 56px; font-size: 19px; }
.av.sm { width: 34px; height: 34px; font-size: 12.5px; }
.av.xs { width: 24px; height: 24px; font-size: 10px; }

.fstage { padding: 12px 14px; border-left: 3px solid var(--c); }
.fhead { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.fdot { width: 9px; height: 9px; border-radius: 50%; background: var(--c); flex: none; }
.row > .fdot { margin: 0 6px; }
.fcount { margin-left: auto; font-size: 13px; font-weight: 650; color: var(--muted); }
.fchips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.fchip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 3px; min-height: 32px; border-radius: 7px; border: 1px solid var(--line); background: var(--surface-2); font-size: 13.5px; font-weight: 550; }
.farrow { display: grid; place-items: center; height: 22px; color: var(--muted); }

.profile { display: flex; align-items: center; gap: 14px; }
.profile h2 { font-size: 19px; font-weight: 700; }
.status-btn { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; color: var(--muted); align-self: flex-start; }
.contact { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.contact .sbtn { min-height: 40px; }
.contact .sbtn .ic { color: var(--accent); }
.acts .btn { min-height: 44px; font-size: 14.5px; }
.note p { font-size: 14.5px; line-height: 1.45; margin-bottom: 6px; }
.card.note + .card.note { margin-top: 8px; }

.tl { position: relative; padding: 2px 0 4px; }
.tl::before { content: ""; position: absolute; left: 13px; top: 12px; bottom: 8px; width: 1px; background: var(--line-2); }
.tl-day { position: relative; font-size: 12.5px; font-weight: 650; color: var(--muted); margin: 16px 0 6px 40px; text-transform: uppercase; letter-spacing: .04em; }
.tl-day:first-child { margin-top: 4px; }
.tl-item { position: relative; display: flex; align-items: flex-start; gap: 12px; padding: 5px 0; }
.tl-item[data-act] { cursor: pointer; }
.tl-dot { position: relative; z-index: 1; width: 28px; height: 28px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line-2); color: var(--muted); }
.tl-dot.gold, .tl-dot.blue { color: var(--accent); }
.tl-dot.red { color: var(--red); } .tl-dot.green { color: var(--green); } .tl-dot.orange { color: var(--orange); }
.tl-main { flex: 1; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; }
.tl-t { font-size: 14.5px; font-weight: 600; }
.tl-t b { white-space: nowrap; }
.tl-time { flex: none; font-size: 12px; color: var(--muted); padding-top: 10px; min-width: 36px; text-align: right; }

.dcard { border-left: 3px solid var(--green); }
.dcard.over { border-left-color: var(--red); } .dcard.soon { border-left-color: var(--orange); }
.amt { font-size: 16px; font-weight: 700; white-space: nowrap; flex: none; }
.dcard.over .amt { color: var(--red); }
.dmeta { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; font-size: 13px; color: var(--muted); }
.dmeta > span:first-child { display: inline-flex; align-items: center; gap: 6px; }
.gdot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: currentColor; }
.gdot.red { color: var(--red); } .gdot.orange { color: var(--orange); } .gdot.green { color: var(--green); }

.me { display: flex; align-items: center; gap: 14px; }
.me h2 { font-size: 17px; font-weight: 700; }
.demo-card { border-style: dashed; }
.demo-card .rt { display: flex; align-items: center; gap: 8px; }
.demo-card p { margin: 6px 0 12px; }

/* ---------- аналитика ---------- */
.net { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.net b { font-size: 17px; white-space: nowrap; }
.chart { padding: 14px 14px 10px; }
.ch-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.ch-head b { font-size: 14.5px; }
.chart-svg { width: 100%; height: 124px; display: block; overflow: visible; }
.chart-svg .b { fill: color-mix(in srgb, var(--accent) 40%, transparent); }
.chart-svg .b-now { fill: var(--accent); }
.chart-svg .b0 { fill: var(--soft); }
.chart-svg .line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart-svg .lg1 { stop-color: var(--accent); stop-opacity: .18; }
.chart-svg .lg2 { stop-color: var(--accent); stop-opacity: 0; }
.axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 6px; }
.row.top { gap: 10px; }
.rank { width: 18px; flex: none; text-align: center; font-weight: 650; color: var(--muted); }
.meter { display: block; height: 4px; border-radius: 2px; background: var(--soft); margin-top: 6px; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--accent); }
.big-num { font-size: 26px; font-weight: 700; margin: 2px 0 4px; }
.catbar { display: flex; gap: 2px; height: 8px; border-radius: 2px; overflow: hidden; margin-top: 10px; }
.catbar i { display: block; min-width: 3px; }
.catlegend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 12px; font-size: 12.5px; color: var(--muted); }
.catlegend span { display: inline-flex; align-items: center; gap: 6px; }
.catlegend i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.catlegend b { color: var(--ink); font-weight: 650; }

/* ---------- формы ---------- */
.field { margin-bottom: 12px; min-width: 0; }
.field > label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin: 0 1px 5px; }
.inp {
  display: block; width: 100%; min-height: 44px; padding: 0 12px; border-radius: 8px;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink);
  font-size: 16px; outline: none; -webkit-appearance: none; appearance: none; min-width: 0;
}
textarea.inp { padding: 10px 12px; line-height: 1.45; resize: vertical; }
select.inp { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
input[type="date"].inp, input[type="time"].inp { line-height: 42px; }
.inp:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.inp:disabled { opacity: .55; background: var(--soft); }
.inp.sm { min-height: 36px; width: 96px; font-size: 16px; padding: 0 8px; border-radius: 7px; }
.inrow { display: flex; gap: 8px; align-items: stretch; }
.inrow .inp { flex: 1; }
.inrow .chip { height: auto; min-height: 44px; }
.inrow .btn.w-auto { min-height: 44px; }

.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: 8px; }
.stepper button { width: 42px; height: 42px; display: grid; place-items: center; }
.stepper span { min-width: 44px; text-align: center; font-size: 17px; font-weight: 700; }
.sum-line { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); font-size: 14px; color: var(--ink-2); }
.sum-line b { font-size: 20px; color: var(--ink); }
.qs-prod { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.qs-prod .price { font-size: 19px; }
.paybox { display: flex; flex-direction: column; gap: 1px; padding: 11px 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); margin-bottom: 12px; }
.paybox span { font-size: 12.5px; color: var(--muted); }
.paybox b { font-size: 20px; }
.warnbox { display: flex; gap: 8px; align-items: center; padding: 9px 12px; border-radius: 7px; background: var(--orange-soft); color: var(--orange); font-size: 13.5px; font-weight: 600; margin-top: 10px; }

.cart-sum-top { font-size: 13px; color: var(--muted); margin: 0 2px 8px; }
.ci { display: flex; gap: 12px; align-items: flex-start; padding: 12px; position: relative; }
.ci .rt { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ci-price span { white-space: nowrap; }
.ci .inp.sm { width: 78px; }
.ci-price { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 12px; color: var(--muted); }
.ci-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; }
.del { width: 32px; height: 28px; display: grid; place-items: center; color: var(--muted); border-radius: 6px; }
.del .ic { width: 17px; height: 17px; }
.pick { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 12px 8px 8px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--surface); text-align: left; }
.pick b { display: block; font-size: 15px; }
.pick small { display: block; color: var(--muted); }
.pick > .ic:last-child { color: var(--muted); }
.totals { margin-top: 6px; padding: 12px 14px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); }
.totals > div { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; font-size: 14px; color: var(--ink-2); }
.totals .tot { margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 15px; font-weight: 650; color: var(--ink); }
.totals .tot b { font-size: 20px; }
.totals .muted { color: var(--muted); font-size: 13px; }

.photo-box { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.photo-prev { height: 150px; border-radius: 8px; border: 1px dashed var(--line-2); background: var(--surface-2); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--muted); font-size: 13px; overflow: hidden; }
.photo-prev img { width: 100%; height: 100%; object-fit: cover; }
.photo-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.photo-btns .sbtn { min-height: 40px; }

.scan-box { position: relative; aspect-ratio: 4 / 3; border-radius: 8px; overflow: hidden; background: #0E0F11; }
.scan-box video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scan-frame { position: absolute; inset: 22% 12%; border: 2px solid #fff; border-radius: 6px; box-shadow: 0 0 0 999px rgba(0, 0, 0, .35); }
.scan-frame i { position: absolute; left: 6%; right: 6%; top: 50%; height: 2px; background: #E53935; animation: scanline 1.8s ease-in-out infinite; }
@keyframes scanline { 0%, 100% { transform: translateY(-38px); } 50% { transform: translateY(38px); } }
.scan-msg { position: absolute; left: 12px; right: 12px; bottom: 12px; color: #fff; font-size: 13px; text-align: center; background: rgba(0, 0, 0, .55); padding: 8px 10px; border-radius: 6px; }
.scan-box.off { aspect-ratio: auto; min-height: 140px; display: grid; place-items: center; padding: 20px; background: var(--soft); }
.scan-box.off video, .scan-box.off .scan-frame { display: none; }
.scan-box.off .scan-msg { position: static; background: none; color: var(--ink-2); font-size: 14px; line-height: 1.45; }
.demo-scan { margin-top: 6px; padding: 12px; border-radius: 8px; background: var(--surface-2); border: 1px dashed var(--line-2); }
.demo-scan .btn-row { margin-top: 8px; }

.done { text-align: center; padding: 4px 0 16px; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.done-ic { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--green-soft); color: var(--green); margin-bottom: 8px; }
.done-ic .ic { width: 30px; height: 30px; }
.sheet-body .grid2.g8 .btn { font-size: 14px; padding: 0 8px; gap: 6px; }
.done h2 { font-size: 19px; font-weight: 700; }
.done-sum { font-size: 28px; font-weight: 700; margin: 4px 0 6px; }

.receipt { background: #fff; color: #141414; font: 13.5px/1.45 ui-monospace, "SF Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace; padding: 16px; border-radius: 6px; border: 1px solid #e3e3e3; max-width: 380px; margin: 0 auto; }
.r-shop { text-align: center; font-weight: 800; font-size: 16px; }
.r-c { text-align: center; color: #555; }
.r-hr { border-top: 1px dashed #aaa; margin: 10px 0; }
.r-item { margin-top: 4px; }
.r-line { display: flex; justify-content: space-between; gap: 10px; }
.r-tot { font-weight: 800; font-size: 16px; margin: 4px 0; }

.empty { text-align: center; padding: 36px 20px; display: flex; flex-direction: column; align-items: center; }
.ei { width: 52px; height: 52px; border-radius: 10px; display: grid; place-items: center; background: var(--soft); color: var(--muted); margin-bottom: 12px; }
.empty b { font-size: 15.5px; }
.empty p { font-size: 14px; color: var(--muted); margin: 5px 0 14px; max-width: 300px; }
.sk { border-radius: var(--r); background: linear-gradient(90deg, var(--soft) 25%, var(--surface-2) 50%, var(--soft) 75%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

.fab {
  position: fixed; z-index: 28; right: calc(16px + var(--side)); bottom: calc(var(--nav-h) + var(--sab) + 16px);
  width: 52px; height: 52px; border-radius: 12px; display: grid; place-items: center;
  background: var(--accent); color: var(--on-accent); box-shadow: 0 6px 16px -6px rgba(31, 95, 214, .6);
}
body.has-cart .fab { bottom: calc(var(--nav-h) + var(--sab) + 74px); }

.nav {
  position: fixed; z-index: 30; left: 0; right: 0; bottom: 0;
  display: grid; grid-template-columns: repeat(5, 1fr);
  height: calc(var(--nav-h) + var(--sab)); padding: 0 var(--side) var(--sab);
  background: var(--surface); border-top: 1px solid var(--line);
}
.nav button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; font-weight: 550; color: var(--muted); min-width: 0; position: relative; }
.nav button svg { width: 22px; height: 22px; }
.nav button span { white-space: nowrap; }
.nav button.on { color: var(--accent-ink); }
.nav button.on::before { content: ""; position: absolute; top: 0; left: 28%; right: 28%; height: 2px; background: var(--accent); border-radius: 0 0 2px 2px; }
.nav-sale-ic { display: grid; place-items: center; }

#scrim { position: fixed; inset: 0; z-index: 40; background: var(--scrim); opacity: 0; pointer-events: none; transition: opacity .2s ease; }
#scrim.on { opacity: 1; pointer-events: auto; }
#sheet {
  position: fixed; z-index: 50; left: 0; right: 0; bottom: 0; margin: 0 auto; max-width: var(--wrap);
  max-height: calc(100vh - var(--sat) - 24px);
  display: flex; flex-direction: column;
  background: var(--bg); border-radius: 14px 14px 0 0; box-shadow: var(--shadow-lg);
  transform: translateY(105%); transition: transform .26s cubic-bezier(.2, .9, .25, 1); visibility: hidden;
}
@supports (height: 100dvh) { #sheet { max-height: calc(100dvh - var(--sat) - 24px); } }
#sheet.on { transform: none; visibility: visible; }
.grab { display: grid; place-items: center; height: 18px; flex: none; touch-action: none; }
.grab i { width: 36px; height: 4px; border-radius: 2px; background: var(--line-2); }
.sheet-head { display: flex; align-items: center; gap: 10px; padding: 0 10px 10px 16px; flex: none; touch-action: none; border-bottom: 1px solid var(--line); }
.sheet-head h3 { flex: 1; min-width: 0; font-size: 17px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheet-body { flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; padding: 14px 16px 16px; }
.sheet-body > .list { margin-bottom: 4px; }
.sheet-foot { flex: none; padding: 10px 16px calc(10px + var(--sab)); border-top: 1px solid var(--line); background: var(--surface); }
.sheet-body:last-child { padding-bottom: calc(18px + var(--sab)); }
.sticky-in { position: sticky; top: -14px; z-index: 2; background: var(--bg); padding: 6px 0 10px; margin-top: -6px; }

.modal-wrap { position: fixed; inset: 0; z-index: 60; background: var(--scrim); display: grid; place-items: center; padding: 24px; }
.modal { width: 100%; max-width: 380px; background: var(--surface); border-radius: 12px; padding: 20px 18px 16px; box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .4); }
.modal h3 { font-size: 17px; font-weight: 700; }
.modal p { color: var(--ink-2); font-size: 14.5px; margin: 8px 0 18px; line-height: 1.45; }

.toast {
  visibility: hidden; opacity: 0; position: fixed; z-index: 70; left: 50%; top: calc(var(--sat) + 10px);
  transform: translate(-50%, -140%); max-width: calc(100vw - 32px); width: max-content;
  display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 8px;
  background: #1F2937; color: #fff; font-size: 14px; font-weight: 550;
  box-shadow: 0 10px 25px -10px rgba(0, 0, 0, .45); transition: transform .25s ease, opacity .25s, visibility .25s; pointer-events: none;
}
.toast.on { transform: translate(-50%, 0); visibility: visible; opacity: 1; }
.toast .ic { color: #6EE7A0; width: 18px; height: 18px; }
.toast.err { background: #7F1D1D; }
.toast.err .ic { color: #FCA5A5; }

#ptr { position: fixed; z-index: 25; left: 50%; top: calc(var(--sat) + 8px); width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); color: var(--accent); opacity: 0; transform: translate(-50%, 0); pointer-events: none; }
#ptr.spin { opacity: 1 !important; animation: spin .8s linear infinite; }
@keyframes spin { from { transform: translate(-50%, 64px) rotate(0); } to { transform: translate(-50%, 64px) rotate(360deg); } }

#net { display: none; position: fixed; z-index: 65; left: 0; right: 0; top: 0; padding: calc(var(--sat) + 6px) 16px 6px; text-align: center; font-size: 13px; font-weight: 600; background: var(--red); color: #fff; }
body.offline #net { display: block; }
body.offline #top { padding-top: calc(var(--sat) + 30px); }

#printArea { display: none; }
@media print {
  @page { margin: 10mm; }
  body { background: #fff !important; }
  body > *:not(#appShell):not(#printArea), #appShell > *:not(#printArea) { display: none !important; }
  #appShell { display: block !important; }
  #printArea { display: block !important; }
  #printArea .receipt { border: 0; max-width: 80mm; margin: 0 auto; }
}

@media (max-width: 370px) {
  .qa button { font-size: 13px; padding: 8px 10px; gap: 8px; }
  .metrics b { font-size: 18px; }
  .sbtn { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* ---------- вход, регистрация, поиск ---------- */
.auth-page { min-height: 100vh; min-height: 100dvh; padding: max(32px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom)); display: grid; place-items: start center; background: var(--bg); }
.auth-card { width: 100%; max-width: 480px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 24px; box-shadow: 0 1px 3px rgba(16, 24, 40, .06); }
.auth-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.auth-logo > span, .adm-logo { width: 40px; height: 40px; border-radius: 8px; display: grid; place-items: center; background: var(--accent); color: #fff; font-weight: 800; font-size: 18px; flex: none; }
.auth-logo b, .auth-logo small { display: block; }
.auth-logo b { font-size: 17px; }
.auth-logo small { color: var(--muted); margin-top: 1px; }
.auth-tabs { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--line); }
.auth-tabs button { min-height: 42px; padding: 6px 4px; text-align: center; font-size: 14px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.auth-tabs button.on { color: var(--accent-ink); border-bottom-color: var(--accent); }
.auth-copy { margin: 20px 0 16px; }
.auth-copy h1 { font-size: 22px; line-height: 1.2; font-weight: 700; }
.auth-copy p { margin-top: 6px; color: var(--muted); font-size: 14px; }
.auth-form { display: grid; gap: 12px; }
.auth-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: start; }
.auth-field { display: grid; gap: 5px; min-width: 0; }
.auth-field > span { color: var(--ink-2); font-size: 13px; font-weight: 600; }
.auth-field > small { color: var(--muted); font-size: 12px; }
.auth-field input, .auth-field select, .auth-search input, #admQ { width: 100%; min-width: 0; min-height: 44px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); outline: none; font-size: 16px; }
.auth-field input:focus, .auth-field select:focus, .auth-search input:focus, #admQ:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.pw-row { display: flex; gap: 8px; }
.pw-row input { flex: 1; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
.auth-primary, .auth-whatsapp { min-height: 46px; border-radius: 8px; display: grid; place-items: center; padding: 0 16px; text-align: center; background: var(--accent); color: #fff; font-weight: 650; margin-top: 4px; width: 100%; }
.auth-primary:hover:not(:disabled) { background: var(--accent-hover); }
.auth-primary:disabled { opacity: .6; }
.auth-whatsapp { background: #15803D; margin-top: 12px; }
.auth-demo { width: 100%; min-height: 44px; margin-top: 10px; border-radius: 8px; text-align: center; border: 1px solid var(--line-2); color: var(--ink-2); font-weight: 600; background: var(--surface); }
.auth-demo:hover { background: var(--soft); }
.auth-foot { margin-top: 18px; text-align: center; color: var(--muted); font-size: 12px; }
.auth-message { margin: 0 0 12px; padding: 10px 12px; border-radius: 7px; background: var(--accent-soft); color: var(--accent-ink); font-size: 14px; border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent); }
.auth-message.ok { background: var(--green-soft); color: var(--green); border-color: color-mix(in srgb, var(--green) 25%, transparent); }
.auth-message.danger, .auth-empty.danger { background: var(--red-soft); color: var(--red); border-color: color-mix(in srgb, var(--red) 25%, transparent); }
.id-result { padding: 18px; border-radius: 10px; text-align: center; border: 1px solid var(--line); background: var(--surface-2); }
.id-result span, .id-result strong { display: block; }
.id-result span { color: var(--muted); font-size: 13px; }
.id-result strong { margin: 4px 0 12px; font-size: 34px; letter-spacing: .12em; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
.id-result button { margin: auto; padding: 8px 14px; border: 1px solid var(--line-2); border-radius: 7px; color: var(--accent-ink); font-weight: 600; }
.pending-box { margin-top: 14px; padding: 12px 14px; border-radius: 8px; background: var(--orange-soft); border: 1px solid color-mix(in srgb, var(--orange) 25%, transparent); }
.pending-box.danger { background: var(--red-soft); }
.pending-box b { display: block; }
.pending-box p { margin-top: 4px; color: var(--ink-2); font-size: 14px; }
.auth-search { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.auth-search button { min-width: 88px; padding: 0 16px; border-radius: 8px; background: var(--accent); color: #fff; font-weight: 650; }
.directory-results { display: grid; gap: 8px; margin-top: 14px; }
.directory-card { padding: 12px 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); }
.directory-card div { display: flex; justify-content: space-between; gap: 10px; }
.directory-card span, .directory-card p, .directory-card small { color: var(--muted); font-size: 13px; }
.directory-card p { margin-top: 4px; }
.directory-open { display: inline-flex; margin-top: 10px; min-height: 34px; align-items: center; justify-content: center; padding: 0 12px; border-radius: 7px; background: var(--accent); color: #fff; font-size: 13px; font-weight: 650; }
.directory-open:hover { background: var(--accent-hover); }
.auth-empty { padding: 20px 14px; border-radius: 8px; text-align: center; color: var(--muted); background: var(--surface-2); border: 1px dashed var(--line-2); }

/* ---------- кнопки панелей ---------- */
.btn-line, .btn-solid { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: 7px; font-size: 13.5px; font-weight: 600; white-space: nowrap; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); }
.btn-line:hover:not(:disabled) { background: var(--soft); }
.btn-line.danger { color: var(--red); }
.btn-solid { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-solid:hover:not(:disabled) { background: var(--accent-hover); }
.btn-solid.ok { background: var(--green); border-color: var(--green); }
.btn-line:disabled, .btn-solid:disabled { opacity: .55; cursor: progress; }
.st { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 5px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--soft); color: var(--ink-2); }
.st::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.st-ok { background: var(--green-soft); color: var(--green); }
.st-warn { background: var(--orange-soft); color: var(--orange); }
.st-bad { background: var(--red-soft); color: var(--red); }

/* ---------- панель администратора ---------- */
.adm { max-width: 1180px; margin: 0 auto; padding: max(16px, env(safe-area-inset-top)) 16px 40px; }
.adm-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 16px; margin: 0 -16px 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
.adm-brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.adm-brand b, .adm-brand small { display: block; }
.adm-brand b { font-size: 17px; }
.adm-brand small { color: var(--muted); font-size: 12.5px; }
.adm-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.adm-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.adm-stat { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 14px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); text-align: left; }
.adm-stat b { font-size: 24px; font-weight: 700; }
.adm-stat span { font-size: 12.5px; color: var(--muted); }
.adm-stat.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.adm-stat.warn b { color: var(--orange); } .adm-stat.ok b { color: var(--green); } .adm-stat.bad b { color: var(--red); }
.adm-tools { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; margin-bottom: 12px; }
.adm-seg { display: flex; padding: 3px; border-radius: 9px; background: var(--soft); border: 1px solid var(--line); }
.adm-seg button { padding: 0 12px; min-height: 36px; border-radius: 7px; font-size: 13.5px; font-weight: 550; color: var(--muted); white-space: nowrap; }
.adm-seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(16, 24, 40, .1); }
.adm-table { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.adm-row { display: grid; grid-template-columns: minmax(0, 1fr) 96px 150px 200px 150px 240px; gap: 12px; align-items: center; padding: 12px 16px; font-size: 14px; }
.adm-row + .adm-row { border-top: 1px solid var(--line); }
.adm-head { background: var(--surface-2); font-size: 12px; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding-top: 9px; padding-bottom: 9px; }
.adm-main { display: flex; flex-direction: column; min-width: 0; }
.adm-main b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-main small { color: var(--ink-2); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-main small.muted { color: var(--muted); }
.adm-row a { color: var(--accent-ink); }
.adm-btns { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.adm-sum { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; color: var(--muted); font-size: 13px; margin-bottom: 12px; }
.adm-quick { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0 4px; }
.adm-quick a { text-decoration: none; }

.account-panel { position: fixed; inset: 0; z-index: 100; visibility: hidden; }
.account-panel.on { visibility: visible; }
.account-scrim { position: absolute; inset: 0; background: var(--scrim); opacity: 0; transition: .2s; }
.account-panel.on .account-scrim { opacity: 1; }
.account-sheet { position: absolute; left: 0; right: 0; bottom: 0; max-width: 600px; max-height: 90vh; overflow: auto; margin: auto; padding: 14px 18px calc(18px + var(--sab)); background: var(--bg); border-radius: 14px 14px 0 0; transform: translateY(105%); transition: .24s; }
.account-sheet.wide { max-width: 720px; }
@media (min-width: 760px) { .account-sheet { top: 50%; bottom: auto; border-radius: 12px; transform: translateY(-40%); opacity: 0; } .account-panel.on .account-sheet { transform: translateY(-50%); opacity: 1; } }
.account-panel.on .account-sheet { transform: none; }
@media (min-width: 760px) { .account-panel.on .account-sheet { transform: translateY(-50%); } }
.account-title { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid var(--line); }
.account-title b, .account-title span { display: block; }
.account-title b { font-size: 17px; }
.account-title span { color: var(--muted); font-size: 13px; margin-top: 1px; }
.account-title > button { width: 34px; height: 34px; border-radius: 7px; border: 1px solid var(--line-2); text-align: center; font-size: 20px; line-height: 1; color: var(--muted); background: var(--surface); }
.account-section { padding: 12px 14px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); margin-bottom: 10px; }
.account-section h3 { font-size: 15px; }
.account-section p { margin-top: 4px; color: var(--muted); font-size: 13px; }
.account-links { display: grid; gap: 8px; margin-top: 14px; }
.account-links .btn-line { min-height: 42px; }
.staff-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 11px 0; border-bottom: 1px solid var(--line); }
.staff-row b, .staff-row span { display: block; }
.staff-row > div:first-child span { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.staff-row > div:last-child { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.danger-text { color: var(--red); }
.check-row { display: flex; align-items: center; gap: 12px; padding: 10px 2px; border-bottom: 1px solid var(--line); cursor: pointer; }
.check-row input { width: 18px; height: 18px; flex: none; accent-color: var(--accent); }
.check-row span { display: flex; flex-direction: column; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.check-row small { color: var(--muted); font-size: 12px; }
.pop-content { padding: 2px 0; }
.pop-content h3 { margin: 18px 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.pop-content p { line-height: 1.45; margin: 4px 0; }
.qty-input { width: 76px !important; text-align: center; min-height: 38px; }

@media (max-width: 900px) {
  .adm-row { grid-template-columns: 1fr auto; gap: 6px 12px; }
  .adm-head { display: none; }
  .adm-main { grid-column: 1 / 2; }
  .adm-main b, .adm-main small { white-space: normal; }
  .adm-row > div:nth-child(5) { grid-column: 2; grid-row: 1; justify-self: end; }
  .adm-row > [data-label] { font-size: 13px; color: var(--ink-2); }
  .adm-row > [data-label]::before { content: attr(data-label) ": "; color: var(--muted); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; }
  .adm-btns { grid-column: 1 / -1; justify-content: flex-start; margin-top: 4px; }
  .adm-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .adm-tools { grid-template-columns: 1fr; }
  .adm-seg { overflow-x: auto; }
}
@media (max-width: 520px) {
  .auth-page { padding: 0; background: var(--surface); }
  .auth-card { min-height: 100vh; min-height: 100dvh; border: 0; border-radius: 0; padding: max(20px, env(safe-area-inset-top)) 16px max(20px, env(safe-area-inset-bottom)); box-shadow: none; }
  .auth-tabs button { font-size: 13px; }
  .auth-grid { grid-template-columns: 1fr; }
  .directory-card div { flex-direction: column; }
}

/* чек/квитанция картинкой и подсказка по инвентаризации */
.rimg { display: block; width: 100%; max-width: 420px; margin: 0 auto 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; -webkit-touch-callout: default; user-select: auto; }
.sheet-foot a.btn { text-decoration: none; }
.howto b { font-size: 15px; }
.howto p { margin: 6px 0 8px; color: var(--ink-2); font-size: 14px; line-height: 1.45; }
.howto ol { margin: 0; padding-left: 20px; color: var(--ink-2); font-size: 14px; line-height: 1.5; }
.howto li + li { margin-top: 3px; }

/* ---------- оплата сервиса (админ) ---------- */
.adm-stats { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.adm-stat.money { grid-column: span 2; cursor: default; }
.adm-stat.money b { color: var(--accent-ink); }
.adm-alert { background: var(--surface); border: 1px solid color-mix(in srgb, var(--red) 35%, var(--line)); border-left: 4px solid var(--red); border-radius: 10px; margin-bottom: 14px; overflow: hidden; }
.adm-alert-h { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; padding: 10px 14px; background: var(--red-soft); }
.adm-alert-h b { color: var(--red); } .adm-alert-h span { color: var(--ink-2); font-size: 13px; }
.adm-alert-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px 14px; align-items: center; padding: 10px 14px; border-top: 1px solid var(--line); }
.adm-alert-row b, .adm-alert-row small { display: block; } .adm-alert-row small { color: var(--muted); font-size: 12.5px; }
.adm-bill { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.adm-bill small { color: var(--muted); font-size: 12px; }
.bill-card { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); margin-bottom: 12px; }
.bill-card > div { display: flex; flex-direction: column; gap: 3px; align-items: flex-start; min-width: 0; }
.bill-card span { font-size: 12.5px; color: var(--muted); } .bill-card b { font-size: 16px; }
.bill-form { padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.month-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.month-chips .btn-line.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-ink); }
.auth-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.btn-line.wide { width: 100%; min-height: 42px; }
.bill-settings { margin-top: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); padding: 0 14px; }
.bill-settings summary { cursor: pointer; padding: 12px 0; font-weight: 600; color: var(--ink-2); }
.bill-settings[open] { padding-bottom: 14px; }
.danger-zone { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid color-mix(in srgb, var(--red) 30%, var(--line)); border-radius: 10px; background: var(--surface); margin-bottom: 8px; }
.danger-zone b, .danger-zone span { display: block; } .danger-zone span { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.auth-primary.danger-bg { background: var(--red); }
.muted.small { font-size: 12.5px; margin: 0; }
.bill-banner { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; margin-bottom: 12px; border-radius: 10px; background: var(--orange-soft); border: 1px solid color-mix(in srgb, var(--orange) 30%, transparent); color: var(--ink); }
.bill-banner.bad { background: var(--red-soft); border-color: color-mix(in srgb, var(--red) 30%, transparent); }
.bill-banner .ic { color: var(--orange); margin-top: 2px; } .bill-banner.bad .ic { color: var(--red); }
.bill-banner b { display: block; } .bill-banner span { font-size: 13px; color: var(--ink-2); }
.bill-banner a { display: inline-block; margin-top: 6px; font-weight: 600; color: var(--accent-ink); font-size: 13.5px; }
@media (max-width: 900px) {
  .adm-alert-row { grid-template-columns: 1fr; }
  .adm-stat.money { grid-column: 1 / -1; }
}
@media (max-width: 560px) { .bill-card, .auth-grid.three { grid-template-columns: 1fr; } }
.id-state { align-self: center; min-width: 74px; font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.id-state.ok { color: var(--green); } .id-state.bad { color: var(--red); }
.check-line { display: flex; align-items: center; gap: 10px; margin: -2px 0 14px; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.check-line input { width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.retkv { text-align: left; width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.auth-demo.app-dl { display: grid; place-items: center; text-decoration: none; color: var(--accent-ink); border-color: var(--accent); }

/* Демо-версия */
.demo-box { margin: 4px 0 14px; padding: 12px 14px; border-radius: 8px; background: var(--accent-soft, #EBF1FC); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); }
.demo-box b { display: block; color: var(--accent-ink, var(--accent)); }
.demo-box p { margin-top: 4px; color: var(--ink-2); font-size: 14px; line-height: 1.45; }
.demo-box a { display: inline-block; margin-top: 8px; color: var(--accent-ink, var(--accent)); font-weight: 650; font-size: 14px; }
.auth-primary.demo-reg { margin-top: 10px; }
.auth-demo.app-link { display: grid; place-items: center; text-decoration: none; color: var(--accent-ink); border-color: var(--accent); }
.demo-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 12px; padding: 10px 12px; border-radius: 8px; background: var(--accent-soft, #EBF1FC); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent); font-size: 13px; color: var(--ink-2); }
.demo-bar b { color: var(--accent-ink, var(--accent)); }
.demo-bar .demo-count { font-variant-numeric: tabular-nums; }
.demo-bar .demo-count.full { color: var(--red, #C0392B); font-weight: 650; }
.demo-bar a { margin-left: auto; color: var(--accent-ink, var(--accent)); font-weight: 650; text-decoration: none; }
.demo-limit { text-align: center; padding: 8px 4px 4px; }
.demo-limit p { color: var(--ink-2); margin: 8px 0 16px; line-height: 1.5; }
.demo-limit svg { display: block; margin: 0 auto; color: var(--accent); }

/* 2.6.0: DEMO-метка, замок приложения, видеоурок */
.demo-tag { display: inline-flex; align-items: center; gap: 3px; margin-left: 6px; padding: 2px 7px; border-radius: 999px; background: #F3E8FF; color: #6B21A8; font-size: 11px; font-weight: 750; letter-spacing: .04em; vertical-align: middle; }
.demo-tag svg { flex: none; }
.adm-stat.demo b { color: #6B21A8; }
.pending-box.demo-note { background: #FAF5FF; border-color: #E9D5FF; display: grid; gap: 8px; justify-items: start; }
.pending-box.demo-note .demo-tag { margin-left: 0; }
.demo-bar b { display: inline-flex; align-items: center; gap: 4px; }
html.app-locked body > :not(#appLock) { visibility: hidden !important; }
#appLock { position: fixed; inset: 0; z-index: 2147483000; display: grid; place-items: center; padding: 24px 16px; background: var(--bg, #F4F5F7); visibility: visible; }
#appLock .lock-card { width: 100%; max-width: 340px; display: grid; gap: 12px; text-align: center; }
#appLock .lock-logo { width: 64px; height: 64px; margin: 0 auto 4px; border-radius: 16px; display: grid; place-items: center; background: var(--accent, #1F5FD6); color: #fff; font-size: 32px; font-weight: 800; }
#appLock h1 { font-size: 22px; margin: 0; color: var(--ink, #111827); }
#appLock p { margin: 0; color: var(--ink-2, #4B5563); }
#appLock input { min-height: 50px; border-radius: 10px; border: 1px solid var(--line-2, #D1D5DB); padding: 0 14px; font-size: 18px; text-align: center; background: var(--surface, #fff); color: var(--ink, #111827); }
#appLock input:focus { outline: 2px solid var(--accent, #1F5FD6); outline-offset: 1px; }
#appLock .lock-err { color: var(--red, #C0392B); font-size: 14px; font-weight: 600; }
#appLock .lock-btn { min-height: 50px; border: 0; border-radius: 10px; background: var(--accent, #1F5FD6); color: #fff; font-size: 17px; font-weight: 700; cursor: pointer; }
#appLock .lock-forgot { border: 0; background: none; color: var(--ink-2, #4B5563); font-size: 14px; text-decoration: underline; cursor: pointer; padding: 8px; }
.applock-state { display: flex; gap: 12px; align-items: flex-start; }
.applock-state > svg { flex: none; color: var(--ink-3, #6B7280); margin-top: 2px; }
.applock-state.on > svg { color: var(--green, #15803D); }
.applock-state b { display: block; }
.applock-state .meta { display: block; margin-top: 2px; }
.video-box { border-radius: 12px; overflow: hidden; background: #0B1220; aspect-ratio: 16 / 9; }
.video-box video { width: 100%; height: 100%; display: block; }
a.row { text-decoration: none; color: inherit; }
.adm-main small .demo-tag { margin: 0 4px 0 0; }
