/* =====================================================================
   SEBE WhatsApp · оформление. Спокойное стекло в стиле iOS, акцент - зелёный SEBE.
   Светлая и тёмная тема (data-theme на html, по умолчанию - как в системе).
   ===================================================================== */
:root {
  --bg: #f3f4f7; --bg2: #e9ebf0; --card: rgba(255,255,255,.86); --card-solid: #fff; --text: #14171f; --mut: #6b7280; --line: rgba(20,23,31,.09);
  --accent: #0f9f6e; --accent2: #2fc48d; --accent-ink: #fff; --ok: #16a34a; --warn: #d97706; --bad: #dc2626; --info: #2563eb;
  --soft-ok: rgba(22,163,74,.11); --soft-warn: rgba(217,119,6,.13); --soft-bad: rgba(220,38,38,.1); --soft-info: rgba(37,99,235,.1); --soft-acc: rgba(15,159,110,.12);
  --r: 16px; --r-sm: 11px; --shadow: 0 1px 2px rgba(16,24,40,.05), 0 8px 24px rgba(16,24,40,.06);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --side: 236px; --tab: 64px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1016; --bg2: #151a22; --card: rgba(24,29,38,.82); --card-solid: #1a1f29; --text: #e8ebf1; --mut: #8d96a6; --line: rgba(255,255,255,.08);
    --soft-ok: rgba(34,197,94,.14); --soft-warn: rgba(245,158,11,.15); --soft-bad: rgba(248,113,113,.14); --soft-info: rgba(96,165,250,.14); --soft-acc: rgba(15,159,110,.16);
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 30px rgba(0,0,0,.35); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d1016; --bg2: #151a22; --card: rgba(24,29,38,.82); --card-solid: #1a1f29; --text: #e8ebf1; --mut: #8d96a6; --line: rgba(255,255,255,.08);
  --soft-ok: rgba(34,197,94,.14); --soft-warn: rgba(245,158,11,.15); --soft-bad: rgba(248,113,113,.14); --soft-info: rgba(96,165,250,.14); --soft-acc: rgba(15,159,110,.16);
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 30px rgba(0,0,0,.35); color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 15px/1.45 var(--font); color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; min-height: 100vh;
  background-image: radial-gradient(1200px 600px at 100% -10%, rgba(15,159,110,.07), transparent 60%), radial-gradient(900px 500px at -10% 110%, rgba(37,99,235,.05), transparent 60%); background-attachment: fixed; }
a { color: var(--accent); text-decoration: none; }
h1, h2, h3 { margin: 0; letter-spacing: -.01em; }
h1 { font-size: 26px; font-weight: 750; }
h2 { font-size: 18px; font-weight: 700; }
h3 { font-size: 15px; font-weight: 700; }
.mut { color: var(--mut); } .small { font-size: 13px; } .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ok { color: var(--ok); } .bad { color: var(--bad); } .warn { color: var(--warn); }
.hidden, [hidden] { display: none !important; }

/* ---------- кнопки и поля ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 40px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--card-solid); color: var(--text); font: 600 14px var(--font); cursor: pointer; white-space: nowrap; transition: transform .08s, background .15s, border-color .15s; }
.btn:hover { border-color: rgba(15,159,110,.45); }
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn--primary { background: linear-gradient(180deg, var(--accent2), var(--accent)); border-color: transparent; color: var(--accent-ink); box-shadow: 0 6px 16px rgba(15,159,110,.28); }
.btn--ghost { background: transparent; }
.btn--danger { color: var(--bad); }
.btn--sm { height: 32px; padding: 0 11px; font-size: 13px; border-radius: 10px; }
.btn--icon { width: 40px; padding: 0; }
.btn svg { width: 18px; height: 18px; }
input, select, textarea { font: 15px var(--font); color: var(--text); background: var(--card-solid); border: 1px solid var(--line); border-radius: 11px; padding: 9px 12px; width: 100%; outline: none; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--soft-acc); }
textarea { min-height: 70px; resize: vertical; }
label.f { display: block; margin-bottom: 12px; }
label.f > span { display: block; font-size: 12.5px; font-weight: 600; color: var(--mut); margin-bottom: 5px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; } .row > * { flex: 1 1 160px; min-width: 0; }
.check { display: flex; gap: 9px; align-items: flex-start; cursor: pointer; } .check input { width: 18px; height: 18px; margin: 2px 0 0; flex: none; accent-color: var(--accent); }

/* ---------- каркас кабинета ---------- */
.shell { display: flex; min-height: 100vh; }
.side { position: fixed; inset: 0 auto 0 0; width: var(--side); padding: 18px 12px; display: flex; flex-direction: column; gap: 4px; border-right: 1px solid var(--line);
  background: var(--card); backdrop-filter: blur(22px) saturate(1.6); -webkit-backdrop-filter: blur(22px) saturate(1.6); z-index: 20; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 16px; font-weight: 750; font-size: 16px; }
.logo { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 17px;
  background: linear-gradient(140deg, #2fc48d, #0f9f6e 55%, #0b7a55); box-shadow: 0 6px 14px rgba(15,159,110,.35), inset 0 1px 0 rgba(255,255,255,.35); }
.logo--img { display: block; object-fit: cover; background: none; box-shadow: 0 6px 16px rgba(14,17,25,.28); }
.brand small { display: block; font-size: 12px; font-weight: 500; color: var(--mut); max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 11px; color: var(--text); font-weight: 560; font-size: 14.5px; }
.nav a svg { width: 19px; height: 19px; color: var(--mut); flex: none; }
.nav a:hover { background: var(--bg2); }
.nav a.on { background: var(--soft-acc); color: var(--accent); } .nav a.on svg { color: var(--accent); }
.nav .badge { margin-left: auto; }
.side .sp { flex: 1; }
.side .me { padding: 10px; border-radius: 12px; font-size: 13px; color: var(--mut); display: flex; gap: 8px; align-items: center; }
.main { flex: 1; margin-left: var(--side); padding: 26px 30px 60px; min-width: 0; }   /* на всю ширину окна (владелец 08.10) */
.tabs-m { display: none; }
@media (max-width: 900px) {
  .side { display: none; }
  .main { margin-left: 0; padding: 16px 14px calc(var(--tab) + 30px + env(safe-area-inset-bottom)); }
  .tabs-m { display: flex; position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); height: var(--tab); border-radius: 22px; z-index: 30;
    background: var(--card); backdrop-filter: blur(22px) saturate(1.7); -webkit-backdrop-filter: blur(22px) saturate(1.7); border: 1px solid var(--line); box-shadow: var(--shadow); }
  .tabs-m a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--mut); font-size: 10.5px; font-weight: 600; }
  .tabs-m a svg { width: 22px; height: 22px; } .tabs-m a.on { color: var(--accent); }
  h1 { font-size: 22px; }
  .head > .grow { flex-basis: 100%; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; } .kpi { padding: 12px 13px; } .kpi .v { font-size: 18px; } .kpi .s { font-size: 12px; }
  .head > .btn, .head > a.btn { flex: 1 1 auto; }
}
.head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.head .grow { flex: 1; min-width: 0; }
.head .sub { color: var(--mut); font-size: 13.5px; margin-top: 2px; }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--mut); font-size: 13.5px; margin-bottom: 8px; cursor: pointer; }

/* ---------- карточки, плитки, таблицы ---------- */
.card { background: var(--card); backdrop-filter: blur(18px) saturate(1.5); -webkit-backdrop-filter: blur(18px) saturate(1.5); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 18px; margin-bottom: 16px; }
.card > h2, .card > h3 { margin-bottom: 12px; display: flex; align-items: center; gap: 10px; }
.card > h2 .grow, .card > h3 .grow { flex: 1; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; box-shadow: var(--shadow); cursor: default; }
.kpi[data-go] { cursor: pointer; } .kpi[data-go]:hover { border-color: rgba(15,159,110,.45); }
.kpi .l { font-size: 12.5px; color: var(--mut); font-weight: 600; } .kpi .v { font-size: 22px; font-weight: 750; margin-top: 3px; font-variant-numeric: tabular-nums; } .kpi .s { font-size: 12.5px; color: var(--mut); margin-top: 2px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; } @media (max-width: 1100px) { .grid2 { grid-template-columns: 1fr; } }
.tbl-wrap { overflow-x: auto; margin: 0 -18px; padding: 0 18px; }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: left; font-size: 12px; font-weight: 650; color: var(--mut); padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.t td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t tbody tr[data-href] { cursor: pointer; } table.t tbody tr[data-href]:hover td { background: var(--bg2); }
table.t td.num, table.t th.num { text-align: right; }
table.t tfoot td { font-weight: 700; border-top: 1px solid var(--line); border-bottom: 0; }
.empty { text-align: center; color: var(--mut); padding: 34px 10px; }
.empty b { display: block; color: var(--text); font-size: 16px; margin-bottom: 4px; }
.badge { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 650; background: var(--bg2); color: var(--mut); white-space: nowrap; }
.badge.ok { background: var(--soft-ok); color: var(--ok); } .badge.warn { background: var(--soft-warn); color: var(--warn); } .badge.bad { background: var(--soft-bad); color: var(--bad); }
.badge.info { background: var(--soft-info); color: var(--info); } .badge.acc { background: var(--soft-acc); color: var(--accent); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.chip { height: 34px; padding: 0 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--card-solid); color: var(--text); font: 600 13.5px var(--font); cursor: pointer; }
.chip.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar .search { flex: 1 1 220px; max-width: 360px; }
.list-item { display: flex; gap: 12px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.list-item:last-child { border-bottom: 0; }
.list-item .grow { flex: 1; min-width: 0; }
.list-item .t1 { font-weight: 620; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .list-item .t2 { font-size: 12.5px; color: var(--mut); }
.bar { height: 6px; border-radius: 999px; background: var(--bg2); overflow: hidden; margin-top: 6px; } .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent2), var(--accent)); border-radius: inherit; }
.steps { counter-reset: s; display: grid; gap: 10px; }
.step { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 12px; background: var(--bg2); }
.step::before { counter-increment: s; content: counter(s); width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: var(--card-solid); flex: none; }
.step.done::before { content: "✓"; background: var(--soft-ok); color: var(--ok); }
.step .grow { flex: 1; }
.feed { font-size: 13.5px; } .feed div { padding: 7px 0; border-bottom: 1px solid var(--line); } .feed div:last-child { border: 0; } .feed .mut { font-size: 12px; }
.note { padding: 11px 13px; border-radius: 12px; background: var(--soft-info); color: var(--text); font-size: 13.5px; margin-bottom: 12px; }
.note.warn { background: var(--soft-warn); } .note.bad { background: var(--soft-bad); } .note.ok { background: var(--soft-ok); }

/* ---------- строки документа ---------- */
.lines td { padding: 6px 6px; } .lines input { padding: 7px 9px; border-radius: 9px; font-size: 14px; }
.lines .c-item { min-width: 240px; } .lines .c-n { width: 120px; } .lines .c-x { width: 36px; }
.lines .x { width: 30px; height: 30px; border-radius: 8px; border: 0; background: transparent; color: var(--mut); cursor: pointer; font-size: 18px; } .lines .x:hover { background: var(--soft-bad); color: var(--bad); }
.picker { position: relative; }
.picker .dd { position: absolute; left: 0; right: 0; top: calc(100% + 4px); background: var(--card-solid); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); z-index: 60; max-height: 280px; overflow: auto; padding: 4px; }
.picker .dd div { padding: 8px 10px; border-radius: 8px; cursor: pointer; font-size: 14px; display: flex; gap: 8px; align-items: center; }
.picker .dd div:hover, .picker .dd div.on { background: var(--soft-acc); }
.picker .dd small { color: var(--mut); margin-left: auto; white-space: nowrap; }
.picker .dd .new { color: var(--accent); font-weight: 600; }

/* ---------- окна и уведомления ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(10,12,18,.42); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); z-index: 100; display: flex; align-items: flex-start; justify-content: center; padding: 6vh 14px 14px; overflow: auto; animation: fade .15s; }
.modal { width: 100%; max-width: 560px; background: var(--card-solid); border-radius: 20px; box-shadow: 0 30px 80px rgba(0,0,0,.3); border: 1px solid var(--line); animation: pop .18s; }
.modal.wide { max-width: 980px; }
.modal-h { display: flex; align-items: center; gap: 10px; padding: 18px 20px 6px; } .modal-h h2 { flex: 1; }
.modal-b { padding: 10px 20px 6px; } .modal-f { display: flex; gap: 10px; justify-content: flex-end; padding: 12px 20px 18px; flex-wrap: wrap; }
.modal-f .sp { flex: 1; }
@keyframes fade { from { opacity: 0; } } @keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.985); } }
.toast { position: fixed; left: 50%; bottom: calc(var(--tab) + 28px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: #14171f; color: #fff; padding: 11px 16px; border-radius: 14px; font-size: 14px; z-index: 200; box-shadow: 0 10px 30px rgba(0,0,0,.3); max-width: min(560px, 92vw); animation: pop .2s; }
@media (min-width: 901px) { .toast { bottom: 26px; } }
.toast.bad { background: #b91c1c; }

/* ---------- страницы входа ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.auth .box { width: 100%; max-width: 420px; }
.auth .brand { justify-content: center; padding-bottom: 22px; font-size: 20px; }
.auth .logo { width: 44px; height: 44px; font-size: 22px; border-radius: 13px; }
.auth .err { color: var(--bad); font-size: 13.5px; min-height: 18px; margin: 4px 0 10px; }
.auth .alt { text-align: center; margin-top: 16px; font-size: 14px; color: var(--mut); }

/* ---------- печать ---------- */
@media print { .side, .tabs-m, .no-print, .btn { display: none !important; } .main { margin: 0; padding: 0; } .card { box-shadow: none; border: 0; backdrop-filter: none; } body { background: #fff; } }

/* ---------- чаты: список слева, переписка справа ---------- */
.chat { display: grid; grid-template-columns: 340px 1fr; height: calc(100vh - 52px); min-height: 420px; max-height: calc(100dvh - 52px); background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.chat-list { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.chat-list .top { padding: 12px; border-bottom: 1px solid var(--line); }
.chat-list .top .chips { margin: 10px 0 0; }
.chat-list .top .chip { height: 30px; font-size: 12.5px; padding: 0 10px; }
.chat-list .items { overflow: auto; flex: 1; }
.ci { display: flex; gap: 10px; padding: 11px 12px; border-bottom: 1px solid var(--line); cursor: pointer; }
.ci:hover { background: var(--bg2); } .ci.on { background: var(--soft-acc); }
.ci .av { width: 40px; height: 40px; border-radius: 50%; background: var(--bg2); display: grid; place-items: center; font-weight: 700; color: var(--mut); flex: none; }
.ci .grow { flex: 1; min-width: 0; }
.ci .t1 { display: flex; gap: 6px; align-items: baseline; } .ci .t1 b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 640; }
.ci .t1 small { color: var(--mut); font-size: 11.5px; white-space: nowrap; }
.ci .t2 { display: flex; gap: 6px; align-items: center; color: var(--mut); font-size: 13px; } .ci .t2 span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ci .cnt { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 11.5px; font-weight: 700; display: grid; place-items: center; }
.chat-view { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.chat-view .hd { display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.chat-view .hd .grow { flex: 1; min-width: 0; } .chat-view .hd .t1 { font-weight: 700; } .chat-view .hd .t2 { font-size: 12.5px; color: var(--mut); }
.msgs { flex: 1; overflow: auto; padding: 16px; display: flex; flex-direction: column; gap: 6px; background: var(--bg); }
.msg { max-width: min(560px, 78%); padding: 8px 11px 6px; border-radius: 14px; background: var(--card-solid); border: 1px solid var(--line); align-self: flex-start; white-space: pre-wrap; word-wrap: break-word; font-size: 14.5px; }
.msg.out { align-self: flex-end; background: #d9fdd3; border-color: transparent; color: #111b21; }
:root[data-theme="dark"] .msg.out { background: #005c4b; color: #e9edef; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .msg.out { background: #005c4b; color: #e9edef; } }
.msg .meta { display: block; text-align: right; font-size: 11px; color: var(--mut); margin-top: 2px; }
.msg.out .meta { color: inherit; opacity: .65; }
.msg .who { display: block; font-size: 11.5px; font-weight: 650; color: var(--accent); margin-bottom: 2px; }
.msg.fail { border-color: var(--bad); } .msg .err { display: block; color: var(--bad); font-size: 12px; margin-top: 3px; }
.msg .file { display: inline-flex; gap: 6px; align-items: center; font-weight: 600; }
.msg img.pic { max-width: 260px; max-height: 260px; border-radius: 10px; display: block; margin-bottom: 4px; cursor: zoom-in; }
.day { align-self: center; font-size: 12px; color: var(--mut); background: var(--card-solid); padding: 3px 10px; border-radius: 999px; margin: 8px 0; }
.composer { border-top: 1px solid var(--line); padding: 10px; display: flex; gap: 8px; align-items: flex-end; }
.composer textarea { min-height: 42px; max-height: 160px; resize: none; }
.window-note { padding: 8px 14px; font-size: 12.5px; background: var(--soft-warn); }
.window-note.ok { background: var(--soft-ok); }
.chat-empty { flex: 1; display: grid; place-items: center; color: var(--mut); text-align: center; padding: 20px; }
@media (max-width: 900px) {
  .chat { grid-template-columns: 1fr; height: calc(100vh - var(--tab) - 60px); }
  .chat.open .chat-list { display: none; } .chat:not(.open) .chat-view { display: none; }
}
.key { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; background: var(--bg2); padding: 10px 12px; border-radius: 10px; word-break: break-all; user-select: all; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .92em; background: var(--bg2); padding: 1px 5px; border-radius: 6px; }
pre { background: var(--bg2); padding: 12px 14px; border-radius: 12px; overflow: auto; font-size: 13px; }
.tpl-prev { background: #d9fdd3; color: #111b21; border-radius: 12px; padding: 10px 12px; white-space: pre-wrap; font-size: 14px; }
.tpl-prev .h { font-weight: 700; margin-bottom: 4px; } .tpl-prev .f { color: #667781; font-size: 12.5px; margin-top: 6px; }
.tpl-prev .b { margin-top: 8px; border-top: 1px solid rgba(0,0,0,.08); padding-top: 6px; text-align: center; color: #027eb5; font-weight: 600; font-size: 13.5px; }
.chat-view .hd .t1, .chat-view .hd .t2 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav a .badge, .tabs-m a .badge { font-style: normal; }
@media (max-width: 900px) {
  .chat-view .hd { flex-wrap: wrap; row-gap: 8px; }
  .chat-view .hd .grow { flex: 1 1 calc(100% - 56px); }
  .chat-view .hd select { flex: 1 1 auto; max-width: none !important; }
  .tabs-m a { position: relative; }
  .tabs-m a .badge { position: absolute; top: 5px; left: calc(50% + 5px); height: 18px; padding: 0 6px; font-size: 11px; background: var(--accent); color: #fff; }
}
.auth .brand small { max-width: none; }

/* быстрый вход: отпечаток / Face ID и QR (08.10) */
.auth .quick { margin-top: 12px; display: grid; gap: 8px; }
.auth .quick__btn { width: 100%; justify-content: center; gap: 8px; }
.auth .quick__ic { font-size: 16px; line-height: 1; opacity: .75; }
.auth .qrl { display: grid; justify-items: center; gap: 10px; margin-top: 6px; text-align: left; }
.auth .qrl__box { width: 220px; max-width: 100%; aspect-ratio: 1; padding: 10px; background: #fff; border-radius: 16px; border: 1px solid var(--line); transition: opacity .2s; }
.auth .qrl__box svg { width: 100%; height: 100%; display: block; }
.auth .qrl__box.is-old { opacity: .25; }
.auth .qrl__how { margin: 0; padding-left: 20px; font-size: 13.5px; color: var(--mut); line-height: 1.5; }
.pk-item .t2 { font-size: 12.5px; }

/* демо-кабинет: плашка сверху (08.10) */
.demo-bar { position: fixed; top: 0; left: 0; right: 0; height: 44px; z-index: 60; display: flex; align-items: center; justify-content: center; gap: 14px; padding: 0 14px; box-sizing: border-box; font-size: 13.5px; font-weight: 600;
  color: #7c2d12; background: linear-gradient(90deg, #fff7ed, #ffedd5); border-bottom: 1px solid #fed7aa; white-space: nowrap; overflow: hidden; }
.demo-bar .btn { height: 32px; padding: 0 12px; font-size: 13px; flex: none; }
.demo-bar span { overflow: hidden; text-overflow: ellipsis; }
/* плашка не загораживает меню и шапку: всё под ней сдвигается на её высоту (08.10) */
body.is-demo .side { top: 44px; }
body.is-demo .main { padding-top: calc(26px + 44px); }
body.is-demo .chat { height: calc(100vh - 52px - 44px); }
@media (max-width: 760px) { body.is-demo .chat { height: calc(100vh - var(--tab) - 60px - 44px); } }
@media (max-width: 760px) { .demo-bar { font-size: 12.5px; gap: 8px; } .demo-bar span { white-space: normal; line-height: 1.2; } }
:root[data-theme="dark"] .demo-bar { color: #fed7aa; background: rgba(251, 146, 60, .12); border-color: rgba(251, 146, 60, .25); }

/* кнопка темы в боковой панели и в «Ещё» (08.10) */
.theme-btn { position: relative; display: inline-flex; align-items: center; justify-content: space-between; width: 72px; height: 34px; padding: 0 8px; margin: 0 10px 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg2); color: var(--mut); cursor: pointer; transition: background .2s, border-color .2s; }
.theme-btn svg { width: 15px; height: 15px; position: relative; z-index: 1; }
.theme-btn i { position: absolute; left: 3px; top: 3px; width: 26px; height: 26px; border-radius: 50%; background: var(--card-solid); box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .25s cubic-bezier(.22,1,.36,1); }
.theme-btn.is-dark i { transform: translateX(36px); }
.theme-btn:not(.is-dark) svg:first-child, .theme-btn.is-dark svg:last-child { color: var(--accent); }
.theme-btn:active i { width: 30px; }
.modal .theme-btn { margin-top: 10px; }
/* подключение WhatsApp (08.10): шаги плитками, переключатель, одна большая кнопка */
.wa-hero { padding: 24px 24px 22px; position: relative; overflow: hidden; }
.wa-hero::before { content: ''; position: absolute; right: -80px; top: -80px; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, var(--soft-acc), transparent 70%); pointer-events: none; }
.wa-hero__top { display: flex; gap: 14px; align-items: center; margin-bottom: 18px; position: relative; }
.wa-hero__badge { width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--accent2), var(--accent)); box-shadow: 0 8px 20px rgba(15,159,110,.3); flex: none; }
.wa-hero__badge svg { width: 24px; height: 24px; }
.wa-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; position: relative; }
.wa-step { padding: 14px; border-radius: 14px; background: var(--bg2); border: 1px solid transparent; display: grid; gap: 4px; }
.wa-step__ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--card-solid); color: var(--accent); margin-bottom: 4px; box-shadow: var(--shadow); }
.wa-step__ic svg { width: 18px; height: 18px; }
.wa-step b { font-size: 14px; } .wa-step span { font-size: 12.5px; color: var(--mut); line-height: 1.4; }
.wa-toggle { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--card-solid); cursor: pointer; margin-bottom: 16px; position: relative; }
.wa-toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.wa-toggle i { flex: none; width: 44px; height: 26px; border-radius: 13px; background: #cfd6df; position: relative; transition: background .2s; margin-top: 1px; }
.wa-toggle i::after { content: ''; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .22s cubic-bezier(.22,1,.36,1); }
.wa-toggle input:checked + i { background: var(--accent); } .wa-toggle input:checked + i::after { transform: translateX(18px); }
.wa-toggle b { display: block; font-size: 14px; } .wa-toggle span { display: block; font-size: 12.5px; color: var(--mut); line-height: 1.45; margin-top: 2px; }
.wa-hero__act { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; position: relative; }
.btn--lg { height: 48px; padding: 0 22px; font-size: 15px; border-radius: 14px; } .btn--lg svg { width: 18px; height: 18px; }
.wa-how { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.wa-how__it { display: grid; grid-template-columns: 38px 1fr; gap: 4px 12px; padding: 14px; border-radius: 14px; background: var(--bg2); }
.wa-how__ic { grid-row: span 2; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--soft-acc); color: var(--accent); }
.wa-how__ic svg { width: 19px; height: 19px; }
.wa-how__it b { font-size: 14px; } .wa-how__it span { font-size: 12.5px; color: var(--mut); line-height: 1.45; }
:root[data-theme="dark"] .wa-toggle i { background: #3a4552; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .wa-toggle i { background: #3a4552; } }
@media (max-width: 760px) { .wa-steps, .wa-how { grid-template-columns: 1fr; } .wa-hero { padding: 18px 16px; } .wa-hero__act .btn { width: 100%; } }

/* ===== боковая панель и шапка страницы (08.10, владелец: «меню и шапку красивую и пафосную») ===== */
.side { padding: 20px 14px 16px; border-right: 0; color: #e6f4ee; overflow: hidden;
  background: radial-gradient(420px 320px at 100% 0%, rgba(110, 231, 183, .22), transparent 60%), radial-gradient(360px 300px at 0% 100%, rgba(15, 159, 110, .25), transparent 60%), linear-gradient(170deg, #06281f 0%, #0a4a36 55%, #073a2b 100%);
  box-shadow: 8px 0 30px -18px rgba(6, 40, 31, .6); }
.side::after { content: ''; position: absolute; right: -70px; bottom: 120px; width: 220px; height: 220px; border-radius: 50%; border: 2px solid rgba(110, 231, 183, .14); box-shadow: 0 0 0 26px rgba(110, 231, 183, .05), 0 0 0 54px rgba(110, 231, 183, .03); pointer-events: none; }
.side .brand { padding: 2px 6px 22px; color: #fff; font-size: 16.5px; letter-spacing: -.2px; position: relative; z-index: 1; }
.side .brand .logo--img { width: 40px; height: 40px; border-radius: 13px; background: rgba(255, 255, 255, .14); padding: 4px; box-sizing: border-box; box-shadow: 0 8px 20px rgba(0, 0, 0, .25), inset 0 1px 0 rgba(255, 255, 255, .25); }
.side .brand small { color: rgba(230, 244, 238, .66); }
.side .nav { position: relative; z-index: 1; display: grid; gap: 3px; }
.side .nav a { color: rgba(230, 244, 238, .82); padding: 10px 12px; border-radius: 13px; font-weight: 600; position: relative; transition: background .2s, color .2s, transform .2s; }
.side .nav a svg { color: rgba(230, 244, 238, .62); width: 20px; height: 20px; transition: color .2s, transform .2s; }
.side .nav a:hover { background: rgba(255, 255, 255, .08); color: #fff; } .side .nav a:hover svg { color: #fff; transform: translateX(1px); }
.side .nav a.on { background: linear-gradient(90deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .06)); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12), 0 8px 20px -10px rgba(0, 0, 0, .5); }
.side .nav a.on::before { content: ''; position: absolute; left: 0; top: 9px; bottom: 9px; width: 3px; border-radius: 3px; background: linear-gradient(180deg, #6ee7b7, #25d366); box-shadow: 0 0 12px rgba(110, 231, 183, .8); }
.side .nav a.on svg { color: #6ee7b7; }
.side .nav .badge.acc { background: #25d366; color: #052e1f; }
.side .theme-btn { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .14); color: rgba(230, 244, 238, .7); margin: 0 6px 10px; }
.side .theme-btn i { background: #fff; } .side .theme-btn:not(.is-dark) svg:first-child, .side .theme-btn.is-dark svg:last-child { color: #0a4a36; }
.side .theme-btn.is-dark i { background: #e6f4ee; }
.side .me { padding: 10px 8px 4px; gap: 10px; color: rgba(230, 244, 238, .66); position: relative; z-index: 1; }
.me__av { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; font-weight: 800; font-size: 14px; color: #06281f; background: linear-gradient(135deg, #6ee7b7, #25d366); flex: none; box-shadow: 0 6px 14px rgba(0, 0, 0, .25); }
.me__t { min-width: 0; } .me__n { color: #fff; font-weight: 700; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .me__r { font-size: 12px; }
:root[data-theme="dark"] .side { background: radial-gradient(420px 320px at 100% 0%, rgba(110, 231, 183, .14), transparent 60%), linear-gradient(170deg, #0b1512 0%, #0e2219 60%, #0b1b15 100%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .side { background: radial-gradient(420px 320px at 100% 0%, rgba(110, 231, 183, .14), transparent 60%), linear-gradient(170deg, #0b1512 0%, #0e2219 60%, #0b1b15 100%); } }
/* шапка страницы */
.head { margin-bottom: 22px; padding-bottom: 16px; position: relative; }
.head::after { content: ''; position: absolute; left: 0; bottom: 0; width: 100%; height: 1px; background: linear-gradient(90deg, var(--line), transparent 70%); }
.head h1 { font-size: 30px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; background: linear-gradient(90deg, var(--text), var(--text) 60%, var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; display: inline-block; }
.head .sub { font-size: 14px; margin-top: 5px; }
.head::before { content: ''; position: absolute; left: 0; bottom: -1px; width: 56px; height: 3px; border-radius: 3px; background: linear-gradient(90deg, var(--accent2), var(--accent)); box-shadow: 0 0 10px rgba(46, 196, 141, .5); }
/* нижняя полоса на телефоне в том же духе */
@media (max-width: 760px) {
  .tabs-m { background: linear-gradient(170deg, rgba(6, 40, 31, .94), rgba(10, 74, 54, .94)); border: 1px solid rgba(255, 255, 255, .1); box-shadow: 0 12px 30px -10px rgba(6, 40, 31, .6); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
  .tabs-m a { color: rgba(230, 244, 238, .66); } .tabs-m a.on { color: #6ee7b7; }
  .head h1 { font-size: 24px; }
}
.me__out { margin-left: auto; width: 34px; height: 34px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .14); background: rgba(255, 255, 255, .08); color: rgba(230, 244, 238, .75); display: grid; place-items: center; cursor: pointer; flex: none; transition: background .2s, color .2s; }
.me__out svg { width: 17px; height: 17px; } .me__out:hover { background: rgba(255, 255, 255, .16); color: #fff; }
/* в меню нет текста для ввода: ни выделения, ни мигающего курсора (08.10, владелец: «появляется как будто что-то писать собираюсь») */
.side, .tabs-m, .theme-btn, .nav a { user-select: none; -webkit-user-select: none; caret-color: transparent; }
.theme-btn:focus, .nav a:focus, .me__out:focus { outline: none; } .theme-btn:focus-visible, .nav a:focus-visible, .me__out:focus-visible { outline: 2px solid #6ee7b7; outline-offset: 2px; }
/* «Как это работает» - 4 ровные плитки, коротко (08.10) */
.wa-how { grid-template-columns: repeat(4, 1fr); gap: 12px; }
.wa-how__it { display: flex; flex-direction: column; gap: 6px; padding: 16px; background: var(--card-solid); border: 1px solid var(--line); border-radius: 16px; transition: border-color .2s, transform .2s; }
.wa-how__it:hover { border-color: var(--accent); transform: translateY(-2px); }
.wa-how__ic { grid-row: auto; margin-bottom: 4px; }
.wa-how__it b { font-size: 14.5px; } .wa-how__it span { font-size: 13px; line-height: 1.5; }
@media (max-width: 1100px) { .wa-how { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .wa-how { grid-template-columns: 1fr; } }
.wa-busy { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; background: rgba(6, 20, 15, .45); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: waFade .2s ease; }
.wa-busy__box { width: min(360px, calc(100vw - 32px)); padding: 28px 24px; border-radius: 22px; background: var(--card-solid); box-shadow: 0 24px 60px rgba(0, 0, 0, .3); display: grid; justify-items: center; gap: 8px; text-align: center; }
.wa-busy__box b { font-size: 17px; } .wa-busy__box span { font-size: 13.5px; color: var(--mut); line-height: 1.5; }
.wa-busy__ring { width: 46px; height: 46px; border-radius: 50%; border: 4px solid var(--soft-acc); border-top-color: var(--accent); animation: waSpin .8s linear infinite; margin-bottom: 6px; }
@keyframes waSpin { to { transform: rotate(360deg); } } @keyframes waFade { from { opacity: 0; } }
/* текст интерфейса не выделяется и не копируется; выделять можно только данные: поля ввода, сообщения в чате, ключи и PIN, код, номера (08.10, владелец) */
body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
input, textarea, select, [contenteditable], .msg, .key, code, pre, .sel, .sel * { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }
.btn--prog { position: relative; overflow: hidden; min-width: 230px; font-variant-numeric: tabular-nums; opacity: 1 !important; }
.btn--prog::before { content: ''; position: absolute; inset: 0 auto 0 0; width: var(--p, 0%); background: rgba(255, 255, 255, .28); transition: width .12s linear; pointer-events: none; }
/* тариф на Главной (08.10) */
.plan-card { display: flex; align-items: center; gap: 14px; padding: 16px 18px; }
.plan-card__ic { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; flex: none; background: var(--soft-acc); color: var(--accent); }
.plan-card__ic svg { width: 21px; height: 21px; }
.plan-card__t { flex: 1; min-width: 0; display: grid; gap: 2px; } .plan-card__t b { font-size: 15.5px; } .plan-card__t span { font-size: 13px; color: var(--mut); }
.plan-card--warn .plan-card__ic { background: rgba(245, 158, 11, .14); color: #d97706; }
.plan-card--bad { border-color: rgba(220, 38, 38, .35); } .plan-card--bad .plan-card__ic { background: rgba(220, 38, 38, .12); color: #dc2626; }
@media (max-width: 560px) { .plan-card { flex-wrap: wrap; } .plan-card .btn { width: 100%; } }
