/* Кабинет клиента AurumClick. Токены — как у сайта (site/src/styles/global.css): чёрный, тёплый белый, золото.
   Кабинет — рабочее место: плотнее сайта, без сцен; движение — только в ответ на действие. */
@font-face { font-family: Onest; font-weight: 100 900; font-display: swap; src: url(/static/fonts/onest-cyrillic-wght-normal.woff2) format('woff2'); unicode-range: U+0400-04FF; }
@font-face { font-family: Onest; font-weight: 100 900; font-display: swap; src: url(/static/fonts/onest-latin-wght-normal.woff2) format('woff2'); unicode-range: U+0000-03FF, U+2000-27BF; }
@font-face { font-family: Plex; font-weight: 400; font-display: swap; src: url(/static/fonts/ibm-plex-mono-cyrillic-400-normal.woff2) format('woff2'); unicode-range: U+0400-04FF; }
@font-face { font-family: Plex; font-weight: 400; font-display: swap; src: url(/static/fonts/ibm-plex-mono-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-03FF, U+2000-27BF; }
@font-face { font-family: Plex; font-weight: 500; font-display: swap; src: url(/static/fonts/ibm-plex-mono-cyrillic-500-normal.woff2) format('woff2'); unicode-range: U+0400-04FF; }
@font-face { font-family: Plex; font-weight: 500; font-display: swap; src: url(/static/fonts/ibm-plex-mono-latin-500-normal.woff2) format('woff2'); unicode-range: U+0000-03FF, U+2000-27BF; }
@font-face { font-family: Cormorant; font-weight: 500; font-display: swap; src: url(/static/fonts/cormorant-garamond-cyrillic-500-normal.woff2) format('woff2'); unicode-range: U+0400-04FF; }
@font-face { font-family: Cormorant; font-weight: 500; font-display: swap; src: url(/static/fonts/cormorant-garamond-latin-500-normal.woff2) format('woff2'); unicode-range: U+0000-03FF, U+2000-27BF; }
@font-face { font-family: Cormorant; font-weight: 600; font-display: swap; src: url(/static/fonts/cormorant-garamond-cyrillic-600-normal.woff2) format('woff2'); unicode-range: U+0400-04FF; }
@font-face { font-family: Cormorant; font-weight: 600; font-display: swap; src: url(/static/fonts/cormorant-garamond-latin-600-normal.woff2) format('woff2'); unicode-range: U+0000-03FF, U+2000-27BF; }

:root {
  color-scheme: dark;
  --ink: #08080a;
  --coal: #111014;
  --coal-2: #18161b;
  --seam: #2a2519;
  --seam-2: #3a3222;
  --paper: #ece8df;
  --text-2: #cfc9bd;
  --ash: #9a9386;
  --ash-2: #888174;
  --gold: #c9a75a;
  --gold-2: #e4c987;
  --gold-ink: #17120a;
  --red: #e5484d;
  --red-text: #ff8f92;
  --green: #4cc38a;
  --green-text: #7fd8aa;
  --tint: rgba(236, 232, 223, 0.03);
  --tint-2: rgba(236, 232, 223, 0.06);
  --gold-tint: rgba(201, 167, 90, 0.08);
  --gold-line: rgba(201, 167, 90, 0.34);
  --red-tint: rgba(229, 72, 77, 0.08);
  --red-line: rgba(229, 72, 77, 0.36);
  --green-tint: rgba(76, 195, 138, 0.09);
  --green-line: rgba(76, 195, 138, 0.34);
  --glow: rgba(201, 167, 90, 0.16);
  --header-bg: rgba(8, 8, 10, 0.8);
  --menu-bg: rgba(14, 13, 16, 0.98);
  --shadow: 0 24px 64px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 240, 210, 0.05);
  --shadow-s: 0 10px 30px rgba(0, 0, 0, 0.35);
  --grain: 0.035;

  --serif: Cormorant, 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --sans: Onest, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: Plex, 'IBM Plex Mono', ui-monospace, Menlo, Consolas, monospace;
  --side: 248px;
  --r-l: 18px;
  --r: 12px;
  --r-s: 9px;
}
:root[data-theme='light'] {
  color-scheme: light;
  --ink: #f0ebe1;
  --coal: #fcfaf5;
  --coal-2: #f5f0e6;
  --seam: #e2d9c6;
  --seam-2: #cfc4ac;
  --paper: #15130f;
  --text-2: #3d382f;
  --ash: #5f584b;
  --ash-2: #6b6457;
  --gold: #c9a75a;
  --gold-2: #7a5c14;
  --red: #c4373c;
  --red-text: #a3262b;
  --green: #23875a;
  --green-text: #1d6e4a;
  --tint: rgba(21, 19, 15, 0.025);
  --tint-2: rgba(21, 19, 15, 0.05);
  --gold-tint: rgba(201, 167, 90, 0.12);
  --gold-line: rgba(160, 124, 44, 0.42);
  --red-tint: rgba(196, 55, 60, 0.07);
  --red-line: rgba(196, 55, 60, 0.36);
  --green-tint: rgba(35, 135, 90, 0.08);
  --green-line: rgba(35, 135, 90, 0.34);
  --glow: rgba(201, 167, 90, 0.22);
  --header-bg: rgba(240, 235, 225, 0.86);
  --menu-bg: rgba(252, 250, 245, 0.99);
  --shadow: 0 24px 60px rgba(70, 52, 20, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  --shadow-s: 0 10px 28px rgba(70, 52, 20, 0.1);
  --grain: 0.04;
}

/* Смена темы: круг от переключателя (View Transitions, portal.ts). */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-new(root) { z-index: 2; }

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
  margin: 0; min-height: 100dvh;
  background: var(--ink); color: var(--paper);
  font-family: var(--sans); font-size: 1rem; line-height: 1.55;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'tnum' 0;
}
body::after {
  content: ''; position: fixed; inset: 0; z-index: 90; pointer-events: none; opacity: var(--grain);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 .93 0 0 0 0 .8 0 0 0 1.1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
:root[data-theme='light'] body::after { filter: invert(1); }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: rgba(201, 167, 90, 0.35); color: var(--paper); }
:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; list-style: none; }
dl, dd, figure { margin: 0; }
fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
legend { padding: 0; }
code, pre { font-family: var(--mono); }
time { font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }

.i { width: 20px; height: 20px; flex: none; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.muted { color: var(--ash); }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.sr { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 14px; border-radius: var(--r-s); background: var(--gold); color: var(--gold-ink); font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }
.link-s, .hint a, .lead a, .auth-alt a, .muted a, .act-body a, .tg-steps a, .note a {
  color: var(--gold-2); text-decoration: underline; text-decoration-color: var(--gold-line); text-underline-offset: 3px;
}
.link-s { font-size: 0.875rem; }
.link-s:hover, .hint a:hover, .lead a:hover, .auth-alt a:hover, .act-body a:hover, .tg-steps a:hover { text-decoration-color: currentColor; }

/* ——— Знак и название ——— */
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 1.0625rem; letter-spacing: -0.01em; }
.mark { width: 28px; height: 28px; }

/* ——— Кнопки ——— */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 18px; border-radius: var(--r);
  border: 1px solid var(--seam-2); background: var(--tint-2); color: var(--paper);
  font-size: 0.9375rem; font-weight: 550; line-height: 1.2; text-decoration: none; white-space: nowrap;
  cursor: pointer; transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { border-color: var(--gold-line); background: var(--gold-tint); }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn[aria-disabled='true'] { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-s { min-height: 34px; padding: 0 12px; border-radius: var(--r-s); font-size: 0.875rem; gap: 6px; }
.btn-s .i { width: 16px; height: 16px; }
.btn-gold { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); font-weight: 650; box-shadow: 0 8px 24px -10px var(--glow); }
.btn-gold:hover { background: #d6b66c; border-color: #d6b66c; }
:root[data-theme='light'] .btn-gold:hover { background: #bd9a4c; border-color: #bd9a4c; }
.btn-quiet { background: transparent; border-color: transparent; color: var(--ash); }
.btn-quiet:hover { background: var(--tint-2); border-color: var(--seam); color: var(--paper); }
.btn-danger { background: transparent; border-color: var(--red-line); color: var(--red-text); }
.btn-danger:hover { background: var(--red-tint); border-color: var(--red); }
.btn-block { display: flex; width: 100%; }
.btn.is-done { border-color: var(--green-line); color: var(--green-text); }
.row-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 20px; }

/* ——— Поля ——— */
.form { display: grid; gap: 18px; }
.psec .form > .btn { justify-self: start; }
.form-narrow { max-width: 720px; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.form-inline { grid-template-columns: minmax(0, 1fr) auto; align-items: start; }
.form-inline > .btn { margin-top: calc(0.875rem * 1.55 + 7px); min-height: 46px; }
.form-inline:has(.input-code) { grid-template-columns: auto auto; justify-content: start; }
.field { display: grid; gap: 7px; min-width: 0; }
.field > legend { margin-bottom: 7px; }
.field-row { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.label { font-size: 0.875rem; font-weight: 550; color: var(--text-2); }
.label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.hint { font-size: 0.875rem; color: var(--ash); line-height: 1.5; }
.err { font-size: 0.875rem; color: var(--red-text); line-height: 1.45; }
.input {
  width: 100%; min-height: 46px; padding: 11px 14px; border-radius: var(--r);
  border: 1px solid var(--seam-2); background: var(--coal); color: var(--paper);
  font-size: 1rem; line-height: 1.4; transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.input::placeholder { color: var(--ash-2); opacity: 0.8; }
.input:hover { border-color: color-mix(in srgb, var(--seam-2) 60%, var(--ash)); }
.input:focus { outline: none; border-color: var(--gold-2); box-shadow: 0 0 0 4px var(--glow); }
.has-err .input, .input[aria-invalid='true'] { border-color: var(--red-line); }
.has-err .input:focus { box-shadow: 0 0 0 4px var(--red-tint); }
.textarea { min-height: 120px; resize: vertical; }
.select {
  appearance: none; padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%239a9386' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 8 4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 18px;
}
.input-code { height: 46px; font-size: 1.25rem; letter-spacing: 0.24em; max-width: 220px; }
.pass { position: relative; }
.pass .input { padding-right: 52px; }
.reveal {
  position: absolute; right: 6px; top: 50%; translate: 0 -50%; width: 38px; height: 38px;
  display: grid; place-items: center; border: 0; border-radius: var(--r-s); background: transparent; color: var(--ash); cursor: pointer;
}
.reveal:hover { color: var(--paper); background: var(--tint-2); }
.reveal[aria-pressed='true'] { color: var(--gold-2); }
.meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 2px; }
.meter i { height: 4px; border-radius: 2px; background: var(--seam); transition: background-color 0.2s ease; }
.meter[data-level='1'] i:nth-child(-n+1) { background: var(--red); }
.meter[data-level='2'] i:nth-child(-n+2) { background: var(--gold); }
.meter[data-level='3'] i:nth-child(-n+3), .meter[data-level='4'] i { background: var(--green); }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 0.9375rem; color: var(--text-2); cursor: pointer; line-height: 1.5; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; flex: none; accent-color: var(--gold); cursor: pointer; }
.check input:disabled { cursor: not-allowed; }
.check input:disabled + span { color: var(--ash); }
.check small { display: block; font-size: 0.8125rem; color: var(--ash); margin-top: 2px; }
.check a { color: var(--gold-2); text-underline-offset: 3px; text-decoration-color: var(--gold-line); }
.check.has-err input { outline: 2px solid var(--red-line); outline-offset: 2px; }
.cf-turnstile { min-height: 65px; }

/* Сегменты (вид предложения) */
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg-item { position: relative; cursor: pointer; }
.seg-item input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg-item span {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--seam-2); color: var(--text-2); font-size: 0.9375rem; transition: border-color 0.15s, background-color 0.15s, color 0.15s;
}
.seg-item:hover span { border-color: var(--gold-line); }
.seg-item input:checked + span { border-color: var(--gold-2); background: var(--gold-tint); color: var(--paper); font-weight: 550; }
.seg-item input:focus-visible + span { outline: 2px solid var(--gold-2); outline-offset: 2px; }

/* Картинки к предложению */
.drop { position: relative; display: block; cursor: pointer; }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.drop-in {
  display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 64px; padding: 12px;
  border: 1px dashed var(--seam-2); border-radius: var(--r); color: var(--text-2); font-size: 0.9375rem; transition: border-color 0.15s, background-color 0.15s;
}
.drop:hover .drop-in, .drop:focus-within .drop-in, .drop.is-over .drop-in { border-color: var(--gold-2); background: var(--gold-tint); }
.drop:focus-within .drop-in { box-shadow: 0 0 0 4px var(--glow); }
.thumbs { display: flex; flex-wrap: wrap; gap: 10px; }
.thumbs:empty { display: none; }
.thumbs li { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 6px 6px 6px 6px; border: 1px solid var(--seam); border-radius: var(--r); background: var(--coal); min-width: 220px; max-width: 320px; }
.thumbs img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; }
.thumbs b { display: block; font-size: 0.8125rem; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thumbs small { font-size: 0.75rem; color: var(--ash); }
.thumbs button { width: 30px; height: 30px; border: 0; border-radius: 8px; background: transparent; color: var(--ash); cursor: pointer; font-size: 1.25rem; line-height: 1; }
.thumbs button:hover { color: var(--paper); background: var(--tint-2); }

/* ——— Сообщения ——— */
.note, .alert, .flash {
  display: flex; align-items: flex-start; gap: 12px; padding: 13px 16px; border-radius: var(--r);
  border: 1px solid var(--seam); background: var(--tint-2); font-size: 0.9375rem; line-height: 1.5; margin-bottom: 18px;
}
.note > .i, .alert > .i, .flash > .i { margin-top: 1px; color: var(--ash); }
.note p, .alert p, .flash p { flex: 1; }
.note .btn { margin: -4px -6px -4px 4px; }
.note-gold { border-color: var(--gold-line); background: var(--gold-tint); }
.note-gold > .i { color: var(--gold-2); }
.note-warn { border-color: var(--red-line); background: var(--red-tint); }
.note-warn > .i { color: var(--red-text); }
.note-info > .i { color: var(--gold-2); }
.alert { border-color: var(--red-line); background: var(--red-tint); }
.alert > .i { color: var(--red-text); }
.flash { border-color: var(--green-line); background: var(--green-tint); }
.flash > .i { color: var(--green-text); }

/* Метки состояния */
.chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 3px 10px 3px 9px; border-radius: 999px;
  border: 1px solid var(--seam-2); font-size: 0.8125rem; font-weight: 550; line-height: 1.35; white-space: nowrap; color: var(--text-2);
}
.chip i { width: 6px; height: 6px; border-radius: 50%; background: var(--ash); flex: none; }
.chip-active, .chip-on, .chip-paid, .chip-issued, .chip-solved, .chip-idea-done { border-color: var(--green-line); color: var(--green-text); }
.chip-active i, .chip-on i, .chip-paid i, .chip-issued i, .chip-solved i, .chip-idea-done i { background: var(--green); }
.chip-expiring, .chip-pending, .chip-seen, .chip-waiting, .chip-idea-in_progress { border-color: var(--gold-line); color: var(--gold-2); }
.chip-expiring i, .chip-pending i, .chip-seen i, .chip-waiting i, .chip-idea-in_progress i { background: var(--gold); }
.chip-expired, .chip-revoked, .chip-lost { border-color: var(--red-line); color: var(--red-text); }
.chip-expired i, .chip-revoked i, .chip-lost i { background: var(--red); }
.chip-cancelled, .chip-idea-declined { color: var(--ash); }
.chip-review i, .chip-open i, .chip-idea-reviewing i { background: var(--gold-2); }
.chip-idea-received i { background: var(--ash); }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 6px; border: 1px solid var(--seam-2); font-size: 0.8125rem; color: var(--text-2); }
.tag-quiet { border-color: transparent; background: var(--tint-2); color: var(--ash); }
.net-badge { display: inline-flex; align-items: center; padding: 1px 7px; border-radius: 6px; border: 1px solid var(--gold-line); color: var(--gold-2); font-size: 0.75rem; font-weight: 500; letter-spacing: 0.02em; }
.badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--gold); color: var(--gold-ink); font-size: 0.75rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.dot-new { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); flex: none; }

/* ——— Каркас кабинета ——— */
.side {
  position: fixed; inset: 0 auto 0 0; z-index: 20; width: var(--side); display: flex; flex-direction: column; gap: 28px;
  padding: 22px 14px 18px; border-right: 1px solid var(--seam); background: var(--ink);
}
.side .brand { padding: 2px 10px; }
.nav { display: grid; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 12px; min-height: 42px; padding: 0 12px; border-radius: 10px;
  color: var(--text-2); text-decoration: none; font-size: 0.9375rem; transition: background-color 0.15s, color 0.15s;
}
.nav a .i { color: var(--ash); transition: color 0.15s; }
.nav a:hover { background: var(--tint-2); color: var(--paper); }
.nav a[aria-current='page'] { background: var(--tint-2); color: var(--paper); font-weight: 600; box-shadow: inset 2px 0 0 var(--gold); }
.nav a[aria-current='page'] .i { color: var(--gold-2); }
.nav .badge { margin-left: auto; }
.side-foot { margin-top: auto; display: grid; gap: 10px; padding: 14px 10px 0; border-top: 1px solid var(--seam); }
.who { font-size: 0.8125rem; color: var(--ash); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-tools { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.side-tools form { margin: 0; }
.prefs { display: flex; gap: 6px; margin: 0; }
.tool {
  display: inline-grid; place-items: center; min-width: 36px; height: 36px; padding: 0; border-radius: 10px;
  border: 1px solid var(--seam); background: transparent; color: var(--ash); cursor: pointer; transition: color 0.15s, border-color 0.15s, background-color 0.15s;
}
.tool:hover { color: var(--paper); border-color: var(--seam-2); background: var(--tint-2); }
.tool .i { width: 18px; height: 18px; }
.tool-lang { font-family: var(--mono); font-size: 0.75rem; font-weight: 500; letter-spacing: 0.04em; }
.tool-out { display: inline-flex; gap: 7px; padding: 0 11px; font-size: 0.8125rem; }
.i-moon { display: none; }
:root[data-theme='light'] .i-sun { display: none; }
:root[data-theme='light'] .i-moon { display: inline; }
.top, .tabs { display: none; }

.main { margin-left: var(--side); padding: 40px clamp(24px, 4vw, 56px) 96px; outline: none; }
.main > * { max-width: 1120px; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 14px 24px; margin-bottom: 28px; }
.page-head-stack { display: block; }
.page-title { font-family: var(--serif); font-weight: 600; font-size: clamp(2.25rem, 1.7rem + 1.6vw, 2.875rem); line-height: 1; letter-spacing: -0.012em; }
.page-title-s { font-size: clamp(1.75rem, 1.4rem + 1vw, 2.25rem); line-height: 1.08; }
.page-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 12px; color: var(--ash); font-size: 0.9375rem; }
.page-meta a { color: var(--text-2); text-underline-offset: 3px; }
.lead { margin-top: 12px; max-width: 64ch; font-size: 1.0625rem; color: var(--text-2); line-height: 1.55; }
.section-title { font-size: 1.1875rem; font-weight: 650; letter-spacing: -0.012em; line-height: 1.3; }
.crumbs { margin-bottom: 16px; }
.crumbs a { display: inline-flex; align-items: center; gap: 6px; margin-left: -4px; padding: 4px 8px 4px 4px; border-radius: 8px; color: var(--ash); font-size: 0.875rem; text-decoration: none; }
.crumbs a:hover { color: var(--paper); background: var(--tint-2); }
.crumbs .i { width: 16px; height: 16px; }
.hint-foot { margin-top: 18px; }

/* Открытый счёт — полоса над страницей */
.strip {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 24px; padding: 12px 16px; border-radius: var(--r);
  border: 1px solid var(--gold-line); background: var(--gold-tint); text-decoration: none; font-size: 0.9375rem; transition: border-color 0.15s;
}
.strip:hover { border-color: var(--gold-2); }
.strip-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px var(--glow); }
.strip-left { margin-left: auto; color: var(--ash); }
.strip-left b { color: var(--paper); font-weight: 500; }
.strip-go { display: inline-flex; align-items: center; gap: 2px; color: var(--gold-2); font-weight: 600; }
.strip-go .i { width: 16px; height: 16px; }

/* ——— Панели ——— */
.panel { padding: 24px; border-radius: var(--r-l); border: 1px solid var(--seam); background: var(--coal); }
.panel + .panel { margin-top: 16px; }
.panel-quiet { background: transparent; }
.panel-title { font-size: 1rem; font-weight: 650; letter-spacing: -0.005em; margin-bottom: 14px; }
.panel > .muted + .btn, .panel > .muted + .row-actions { margin-top: 16px; }
.panel-icon { display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 14px; border-radius: 12px; border: 1px solid var(--gold-line); color: var(--gold-2); }
.panel-quiet > .btn { margin-top: 16px; }
.split { display: grid; gap: 24px; align-items: start; }
.split-main, .split-side { min-width: 0; }
.split-side { display: grid; gap: 16px; }
.split-side .panel + .panel { margin-top: 0; }
.split-main > .panel + .panel { margin-top: 16px; }
@media (min-width: 1100px) { .split { grid-template-columns: minmax(0, 1fr) 340px; } }

.rows li + li { border-top: 1px solid var(--seam); }
.row-link { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; text-decoration: none; }
.row-link:hover .row-title { color: var(--gold-2); }
.row-main { display: grid; gap: 2px; min-width: 0; }
.row-title { font-size: 0.9375rem; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-sub { font-size: 0.8125rem; color: var(--ash); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-meta { display: flex; align-items: center; gap: 8px; font-size: 0.8125rem; color: var(--ash); white-space: nowrap; }
.rows + .link-s { display: inline-block; margin-top: 10px; }
.links { display: grid; gap: 2px; }
.links a { display: flex; align-items: center; gap: 10px; padding: 8px 0; color: var(--text-2); text-decoration: none; font-size: 0.9375rem; }
.links a .i { width: 18px; height: 18px; color: var(--ash); }
.links a:hover { color: var(--paper); }
.links a:hover .i { color: var(--gold-2); }
.links-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 28px; margin-top: 18px; }

.facts { display: grid; gap: 10px; }
.facts > div { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 12px; align-items: baseline; }
.facts dt { font-size: 0.8125rem; color: var(--ash); }
.facts dd { font-size: 0.9375rem; min-width: 0; overflow-wrap: anywhere; }
.facts-grid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px 24px; }
.facts-grid > div, .facts-row > div { display: grid; grid-template-columns: none; gap: 3px; }
.facts-row { display: flex; flex-wrap: wrap; gap: 14px 36px; }
.panel .facts-grid + .act { margin-top: 20px; }

/* ——— Лицензии ——— */
.lics { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr)); }
.note + .lics { margin-top: 4px; }
.lic { display: flex; flex-direction: column; gap: 16px; padding: 22px; border-radius: var(--r-l); border: 1px solid var(--seam); background: var(--coal); }
.lic-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.lic-head h3 { font-family: var(--serif); font-size: 1.625rem; font-weight: 600; line-height: 1; letter-spacing: -0.01em; }
.lic-link { text-decoration: none; }
.lic-link:hover { color: var(--gold-2); }
.lic-until { font-size: 0.9375rem; color: var(--text-2); }
.lic-expired, .lic-revoked { background: transparent; }
.lic-expired .lic-head h3, .lic-revoked .lic-head h3 { color: var(--text-2); }
.lic .facts { padding-top: 14px; border-top: 1px solid var(--seam); }
.lic .facts > div { grid-template-columns: 82px minmax(0, 1fr); }
.lic-foot { display: flex; gap: 8px; margin-top: auto; }
.term { display: flex; align-items: center; gap: 12px; }
.term-bar { flex: 1; height: 4px; width: 100%; }
.term-bg { fill: var(--seam); }
.term-fg { fill: var(--gold); }
.lic-expiring .term-fg, .panel-term .term-fg { fill: var(--gold-2); }
.term-left { font-size: 0.8125rem; color: var(--ash); white-space: nowrap; font-variant-numeric: tabular-nums; }
.panel-term .term-label { font-size: 0.875rem; color: var(--text-2); margin-bottom: 4px; }
.panel-term .term-date { font-family: var(--serif); font-size: 1.75rem; font-weight: 600; line-height: 1.15; margin-bottom: 16px; }
.panel-term .term { margin-bottom: 18px; }
.panel-term > .muted { margin-bottom: 18px; font-size: 0.9375rem; }

/* Ключ */
.secret { display: flex; align-items: flex-start; gap: 10px; }
.secret-box { flex: 1; min-width: 0; border-radius: var(--r); border: 1px solid var(--seam-2); background: var(--coal-2); }
.secret-box summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 46px; padding: 0 8px 0 14px; cursor: pointer; list-style: none; }
.secret-box summary::-webkit-details-marker { display: none; }
.secret-mask { display: flex; min-width: 0; font-size: 0.9375rem; color: var(--ash); white-space: nowrap; letter-spacing: 0.02em; }
.secret-dots { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.secret-tail { flex: none; color: var(--text-2); }
.secret-show { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 8px; font-size: 0.8125rem; color: var(--gold-2); }
.secret-show .i { width: 16px; height: 16px; }
.secret-box summary:hover .secret-show { background: var(--gold-tint); }
.secret-box[open] summary { display: none; }
.secret-val { display: block; padding: 12px 14px; font-size: 0.9375rem; line-height: 1.5; overflow-wrap: anywhere; user-select: all; }
.secret > .btn { min-height: 46px; }
.panel > .secret + .hint { margin-top: 12px; }

.cmd { margin-top: 14px; border-radius: var(--r); border: 1px solid var(--seam-2); background: var(--coal-2); overflow: hidden; }
.cmd pre { margin: 0; padding: 16px 18px; overflow-x: auto; font-size: 0.875rem; line-height: 1.75; white-space: pre; }
.cmd-bar { display: flex; justify-content: flex-end; padding: 8px; border-top: 1px solid var(--seam); }
.k-show { display: none; }
.split-main:has(.secret-box[open]) .k-show { display: inline; }
.split-main:has(.secret-box[open]) .k-hide { display: none; }
.cmd + .hint { margin-top: 12px; }

.timeline { position: relative; display: grid; gap: 16px; padding-left: 22px; }
.timeline::before { content: ''; position: absolute; left: 4px; top: 8px; bottom: 8px; width: 1px; background: var(--seam-2); }
.timeline li { position: relative; display: grid; gap: 2px; }
.timeline li::before { content: ''; position: absolute; left: -22px; top: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--coal); border: 1.5px solid var(--gold-2); }
.timeline time { font-size: 0.8125rem; color: var(--ash); }
.timeline p { font-size: 0.9375rem; }
.timeline .tl-sub { font-size: 0.875rem; color: var(--text-2); }
.timeline .tl-issued::before, .timeline .tl-renewed::before { background: var(--gold); border-color: var(--gold); }
.timeline .tl-failed::before { border-color: var(--red); }
.timeline .tl-move_requested::before, .timeline .tl-reissue_requested::before { border-color: var(--ash); }

/* Действия-раскрывашки */
.act { border-top: 1px solid var(--seam); }
.panel-title + .act { border-top: 0; }
.act summary {
  display: flex; align-items: center; gap: 10px; min-height: 48px; cursor: pointer; list-style: none; font-size: 0.9375rem; font-weight: 550;
}
.act summary::-webkit-details-marker { display: none; }
.act summary .i { width: 18px; height: 18px; color: var(--ash); }
.act summary::after {
  content: ''; margin-left: auto; width: 8px; height: 8px; border-right: 1.5px solid var(--ash); border-bottom: 1.5px solid var(--ash);
  rotate: 45deg; translate: -4px -2px; transition: rotate 0.2s ease;
}
.act[open] summary::after { rotate: 225deg; translate: -4px 2px; }
.act summary:hover { color: var(--gold-2); }
.act-danger summary .i { color: var(--red-text); }
.act-body { display: grid; gap: 12px; padding: 2px 0 20px; font-size: 0.9375rem; }
.act-body .form { margin-top: 4px; }
.act-body code { font-size: 0.8125rem; padding: 1px 5px; border-radius: 5px; background: var(--tint-2); overflow-wrap: anywhere; }
.act-link { display: flex; align-items: center; gap: 10px; min-height: 48px; border-top: 1px solid var(--seam); color: var(--text-2); text-decoration: none; font-size: 0.9375rem; }
.act-link .i { width: 18px; height: 18px; color: var(--ash); }
.act-link:hover { color: var(--gold-2); }

/* ——— Покупка ——— */
.plans { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); margin-bottom: 26px; }
.plan {
  position: relative; display: flex; flex-direction: column; gap: 6px; padding: 22px 20px 20px; border-radius: var(--r-l);
  border: 1px solid var(--seam); background: var(--coal); text-decoration: none; transition: border-color 0.15s, box-shadow 0.15s, translate 0.15s;
}
.plan:hover { border-color: var(--gold-line); box-shadow: var(--shadow-s); }
.plan:active { translate: 0 1px; }
.plan-best { border-color: var(--gold-line); background: linear-gradient(180deg, var(--gold-tint), transparent 70%), var(--coal); }
.plan-term { font-size: 1rem; font-weight: 650; }
.plan-price { display: flex; align-items: baseline; gap: 6px; margin-top: 8px; }
.plan-price b { font-size: 2rem; font-weight: 500; letter-spacing: -0.03em; line-height: 1.1; }
.plan-price span { font-size: 0.875rem; color: var(--ash); }
.plan-total { font-size: 0.875rem; color: var(--text-2); }
.plan-save { margin-left: 4px; padding: 0 6px; border-radius: 6px; background: var(--gold-tint); color: var(--gold-2); font-size: 0.8125rem; }
.plan-until { font-size: 0.8125rem; color: var(--ash); }
.plan-go {
  display: inline-flex; align-items: center; justify-content: center; margin-top: 16px; min-height: 40px; border-radius: var(--r-s);
  border: 1px solid var(--seam-2); font-size: 0.9375rem; font-weight: 600; transition: background-color 0.15s, border-color 0.15s;
}
.plan:hover .plan-go { border-color: var(--gold-line); background: var(--gold-tint); }
.plan-best .plan-go { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); }
.plan-best:hover .plan-go { background: #d6b66c; border-color: #d6b66c; }
.incl { display: flex; flex-wrap: wrap; gap: 10px 28px; }
.incl li { display: flex; align-items: center; gap: 8px; font-size: 0.9375rem; color: var(--text-2); }
.incl .i { width: 18px; height: 18px; color: var(--gold-2); }

.steps-bar { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: -6px 0 28px; counter-reset: s; }
.steps-bar li { display: flex; align-items: center; gap: 10px; font-size: 0.875rem; color: var(--ash); }
.steps-bar li span {
  display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--seam-2); font-size: 0.75rem;
}
.steps-bar li + li::before { content: ''; width: 28px; height: 1px; background: var(--seam-2); margin-right: 4px; }
.steps-bar [aria-current='step'] { color: var(--paper); font-weight: 600; }
.steps-bar [aria-current='step'] span { border-color: var(--gold); background: var(--gold); color: var(--gold-ink); }
.steps-bar .done { color: var(--text-2); }
.steps-bar .done span { border-color: var(--gold-line); color: var(--gold-2); }

.confirm { display: grid; gap: 16px; align-items: stretch; }
.confirm .panel + .panel { margin-top: 0; }
@media (min-width: 960px) { .confirm { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 20px; } }
.sum > div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--seam); }
.sum > div:first-child { padding-top: 0; }
.sum dt { color: var(--ash); font-size: 0.9375rem; }
.sum dd { text-align: right; font-size: 0.9375rem; }
.sum-total { border-bottom: 0 !important; padding-top: 18px !important; }
.sum-total dt { color: var(--paper); font-weight: 600; }
.sum-total b { font-size: 1.75rem; font-weight: 500; letter-spacing: -0.02em; }
.sum-total dd > .mono:last-child { color: var(--ash); font-size: 0.875rem; }
.sum + .hint { margin-top: 14px; }
.pay-net { display: flex; align-items: center; gap: 10px; font-weight: 550; margin-top: -2px; }
.confirm .form .panel-title { margin-bottom: 0; }

/* ——— Счёт ——— */
.track { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 26px; }
.track li { position: relative; display: grid; gap: 10px; font-size: 0.875rem; color: var(--ash); line-height: 1.35; }
.track li::before { content: ''; height: 3px; border-radius: 2px; background: var(--seam); }
.track li i { position: absolute; top: -4.5px; left: 0; width: 12px; height: 12px; border-radius: 50%; background: var(--ink); border: 1.5px solid var(--seam-2); }
.track .done::before { background: var(--gold); }
.track .done i { background: var(--gold); border-color: var(--gold); }
.track .now::before { background: linear-gradient(90deg, var(--gold) 0 40%, var(--seam) 40%); }
.track .now i { border-color: var(--gold-2); background: var(--ink); box-shadow: 0 0 0 4px var(--glow); }
.track .now { color: var(--paper); font-weight: 600; }
.track .done { color: var(--text-2); }
.track li span { padding-left: 0; }

.pay { display: grid; gap: 20px; align-items: start; }
@media (min-width: 880px) { .pay { grid-template-columns: minmax(0, 1fr) 248px; } }
.pay-main { padding: 28px; border-radius: var(--r-l); border: 1px solid var(--seam); background: var(--coal); }
.pay-label { font-size: 0.9375rem; font-weight: 550; color: var(--ash); }
.amount-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin: 6px 0 10px; }
.amount { display: flex; align-items: baseline; font-weight: 500; letter-spacing: -0.035em; line-height: 1; }
.amount-w { font-size: clamp(2.75rem, 2rem + 2.4vw, 3.75rem); }
.amount-c { font-size: clamp(2.75rem, 2rem + 2.4vw, 3.75rem); color: var(--gold-2); }
.amount-u { margin-left: 12px; font-size: 1.125rem; color: var(--ash); letter-spacing: 0; }
.pay-main > .hint { max-width: 60ch; }
.pay-facts { display: grid; gap: 0; margin: 22px 0 18px; border-top: 1px solid var(--seam); }
.pay-facts > div { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 16px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--seam); }
.pay-facts dt { font-size: 0.875rem; color: var(--ash); }
.pay-facts dd { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; min-width: 0; }
.addr-code { flex: 1 1 280px; min-width: 0; padding: 9px 12px; border-radius: var(--r-s); background: var(--coal-2); border: 1px solid var(--seam); font-size: 0.9375rem; overflow-wrap: anywhere; user-select: all; }
.timer { font-size: 1.125rem; font-weight: 500; }
.timer.is-soon { color: var(--gold-2); }
.pay-main .note { margin: 0; }
.pay-qr { display: grid; gap: 10px; justify-items: center; padding: 20px; border-radius: var(--r-l); border: 1px solid var(--seam); background: var(--coal); }
.pay-qr .qr { width: 100%; max-width: 208px; height: auto; border-radius: 10px; }
.pay-qr figcaption { font-size: 0.8125rem; color: var(--ash); text-align: center; line-height: 1.45; }
.pay + .note { margin-top: 18px; }
.inv > .note-info { margin-top: 18px; }

.more { margin-top: 18px; }
.more summary {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer; list-style: none; color: var(--gold-2); font-size: 0.9375rem; font-weight: 550;
  padding: 4px 0;
}
.more summary::-webkit-details-marker { display: none; }
.more summary::after {
  content: ''; width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; rotate: 45deg; translate: 0 -2px; transition: rotate 0.2s;
}
.more[open] summary::after { rotate: 225deg; translate: 0 2px; }
.more > .form, .more > .hint, .more > .secret-line { margin-top: 14px; }
.inv .more > .form { max-width: 760px; padding: 20px; border-radius: var(--r-l); border: 1px solid var(--seam); background: var(--coal); }
.inv-foot { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--seam); }
.inv-foot form { margin: 0; }

.result { max-width: 640px; padding: 32px; border-radius: var(--r-l); border: 1px solid var(--seam); background: var(--coal); }
.result p { color: var(--text-2); }
.result p + p { margin-top: 8px; }
.result-icon { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 18px; border-radius: 16px; border: 1px solid var(--gold-line); color: var(--gold-2); }
.result-icon .i { width: 24px; height: 24px; }
.result-facts { margin: 22px 0 4px; padding-top: 18px; border-top: 1px solid var(--seam); }
.result-title { font-family: var(--serif); font-size: 2rem; font-weight: 600; line-height: 1.08; margin-bottom: 10px; }
.result-ok .result-icon { border-color: var(--green-line); color: var(--green-text); background: var(--green-tint); }
.result-muted .result-icon { border-color: var(--seam-2); color: var(--ash); }

/* ——— Таблицы ——— */
.table-wrap { overflow-x: auto; border-radius: var(--r-l); border: 1px solid var(--seam); background: var(--coal); }
.table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.table th { padding: 12px 16px; text-align: left; font-size: 0.8125rem; font-weight: 550; color: var(--ash); border-bottom: 1px solid var(--seam); white-space: nowrap; }
.table td { padding: 14px 16px; border-bottom: 1px solid var(--seam); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--tint); }
.table th.num, .table td.num { text-align: right; }
.cell-act { text-align: right; white-space: nowrap; }
.tx-link { display: inline-flex; align-items: center; gap: 4px; color: var(--gold-2); text-decoration: none; font-size: 0.875rem; }
.tx-link .i { width: 14px; height: 14px; }
.tx-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.table-quiet td { color: var(--text-2); font-size: 0.875rem; }
.row-warn td:nth-child(2) { color: var(--red-text); }

/* ——— Пустые состояния ——— */
.empty { display: grid; justify-items: center; gap: 8px; padding: 56px 24px; text-align: center; border-radius: var(--r-l); border: 1px dashed var(--seam-2); }
.empty > .muted { max-width: 46ch; }
.empty > .btn { margin-top: 14px; }
.empty-icon { display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 10px; border-radius: 18px; border: 1px solid var(--gold-line); color: var(--gold-2); background: var(--gold-tint); }
.empty-icon .i { width: 26px; height: 26px; }
.empty-title { font-family: var(--serif); font-size: 1.875rem; font-weight: 600; line-height: 1.1; }
.empty + .section-title { margin: 40px 0 16px; }
.empty-page { border: 0; padding-top: 72px; }
.empty-page .row-actions { justify-content: center; }
.empty-line { padding: 18px 0; }

/* Первый вход */
.welcome .section-title { margin: 40px 0 16px; }
.how { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); margin: 10px 0 24px; counter-reset: h; }
.how li { counter-increment: h; display: grid; gap: 4px; padding: 18px 0 0; border-top: 1px solid var(--seam); }
.how li::before { content: counter(h); font-family: var(--mono); font-size: 0.8125rem; color: var(--gold-2); margin-bottom: 4px; }
.how b { font-size: 0.9375rem; font-weight: 650; }
.how span { font-size: 0.875rem; color: var(--ash); }

/* ——— Поддержка ——— */
.tickets { border-radius: var(--r-l); border: 1px solid var(--seam); background: var(--coal); overflow: hidden; }
.tickets li + li { border-top: 1px solid var(--seam); }
.ticket-row { position: relative; display: flex; align-items: center; gap: 20px; padding: 16px 20px; text-decoration: none; transition: background-color 0.15s; }
.ticket-row:hover { background: var(--tint); }
.ticket-main { display: grid; gap: 3px; flex: 1; min-width: 0; }
.ticket-subj { font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ticket-last { font-size: 0.875rem; color: var(--ash); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ticket-side { display: flex; align-items: center; gap: 14px; font-size: 0.8125rem; color: var(--ash); white-space: nowrap; }
.ticket-row .dot-new { position: absolute; left: 7px; top: 50%; translate: 0 -50%; width: 6px; height: 6px; }
.is-unread .ticket-subj { font-weight: 700; }
.is-unread .ticket-last { color: var(--text-2); }

.chat { display: grid; gap: 14px; max-width: 820px; margin-bottom: 22px; }
.msg { max-width: min(660px, 88%); padding: 14px 18px; border-radius: var(--r-l); border: 1px solid var(--seam); background: var(--coal); }
.msg-client { justify-self: end; background: var(--tint-2); border-color: var(--seam-2); border-bottom-right-radius: 6px; }
.msg-manager { border-bottom-left-radius: 6px; }
.msg-who { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-bottom: 6px; font-size: 0.8125rem; font-weight: 600; color: var(--text-2); }
.msg-manager .msg-who { color: var(--gold-2); }
.msg-who time { font-weight: 400; color: var(--ash); }
.msg-body { display: grid; gap: 6px; font-size: 0.9375rem; line-height: 1.6; overflow-wrap: anywhere; }
.msg-body p:empty { display: none; }
.msg-files { margin-top: 8px; font-size: 0.8125rem; color: var(--text-2); overflow-wrap: anywhere; }
.hint-solved { margin: -6px 0 18px; }
.reply { max-width: 820px; padding: 20px; border-radius: var(--r-l); border: 1px solid var(--seam); background: var(--coal); }

/* ——— Идеи и замечания ——— */
.flow { display: grid; gap: 14px; margin-bottom: 16px; position: relative; }
.flow li { position: relative; display: grid; gap: 2px; padding-left: 22px; }
.flow li::before { content: ''; position: absolute; left: 0; top: 7px; width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--gold-2); }
.flow li:last-child::before { background: var(--gold); border-color: var(--gold); }
.flow li:not(:last-child)::after { content: ''; position: absolute; left: 4px; top: 19px; bottom: -18px; width: 1px; background: var(--seam-2); }
.flow b { font-size: 0.9375rem; font-weight: 600; }
.flow span { font-size: 0.875rem; color: var(--ash); }
.mine { margin-top: 48px; }
.mine .section-title { margin-bottom: 14px; }
.ideas { display: grid; gap: 12px; }
.idea { display: grid; gap: 10px; padding: 18px 20px; border-radius: var(--r-l); border: 1px solid var(--seam); background: var(--coal); }
.idea-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: 0.875rem; }
.idea-head time { margin-left: auto; color: var(--ash); font-size: 0.8125rem; }
.idea-body { font-size: 0.9375rem; color: var(--text-2); white-space: pre-line; overflow-wrap: anywhere; }
.idea-status { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 0.875rem; }
.idea-status .muted { display: inline-flex; align-items: center; gap: 5px; }
.idea-status .i { width: 16px; height: 16px; }

/* ——— Профиль ——— */
.anchors {
  position: sticky; top: 0; z-index: 10; display: flex; gap: 4px; margin: -8px 0 8px; padding: 10px 0; overflow-x: auto; scrollbar-width: none;
  background: linear-gradient(var(--ink) 75%, transparent);
}
.anchors::-webkit-scrollbar { display: none; }
.anchors a { flex: none; padding: 7px 13px; border-radius: 999px; color: var(--ash); font-size: 0.875rem; text-decoration: none; transition: color 0.15s, background-color 0.15s; }
.anchors a:hover { color: var(--paper); background: var(--tint-2); }
.anchors a.is-here { color: var(--paper); background: var(--tint-2); }
.psec { margin-top: 36px; max-width: 860px; }
.psec-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 36px; margin-bottom: 12px; }
.psec-head form { margin: 0; }
.psec > .panel + .panel { margin-top: 14px; }
.sec-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 16px; padding-bottom: 6px; }
.sec-text { flex: 1 1 280px; min-width: 0; }
.sec-row-line { margin-top: 6px; padding-top: 20px; border-top: 1px solid var(--seam); }
.sec-text h3 { font-size: 1rem; font-weight: 650; margin-bottom: 3px; }
.sec-text p { font-size: 0.9375rem; }
.sec-text .chip { margin-right: 6px; }
.panel .sec-row + .act { border-top: 0; }
.panel .act:last-child { margin-bottom: -10px; }
.panel .note { margin: 14px 0 6px; }
.devices { padding: 4px 24px; }
.device { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; }
.device + .device { border-top: 1px solid var(--seam); }
.device-main { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; min-width: 0; }
.device-main b { font-weight: 600; }
.device-main > .muted { flex-basis: 100%; font-size: 0.875rem; }
.device form { margin: 0; }
.tg { display: flex; align-items: flex-start; gap: 18px; }
.tg-icon { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 14px; border: 1px solid var(--gold-line); color: var(--gold-2); }
.tg-text { flex: 1; min-width: 0; display: grid; gap: 8px; }
.tg-text h3 { font-size: 1rem; font-weight: 650; }
.tg-text p { font-size: 0.9375rem; }
.tg-act { flex: none; }
.tg-act form { margin: 0; }
.tg-steps { display: grid; gap: 10px; counter-reset: t; font-size: 0.9375rem; }
.tg-steps li { counter-increment: t; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.tg-steps li::before {
  content: counter(t); display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  border: 1px solid var(--gold-line); color: var(--gold-2); font-family: var(--mono); font-size: 0.75rem;
}
.tg-code { padding: 4px 10px; border-radius: 8px; background: var(--coal-2); border: 1px solid var(--seam-2); font-size: 0.9375rem; user-select: all; }
.panel-codes { max-width: 860px; margin-bottom: 8px; border-color: var(--gold-line); background: linear-gradient(180deg, var(--gold-tint), transparent 60%), var(--coal); }
.panel-codes > p:not(.hint) { color: var(--text-2); max-width: 64ch; }
.codes { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px 16px; margin: 18px 0 4px; font-size: 1.0625rem; letter-spacing: 0.04em; counter-reset: c; }
.codes li { counter-increment: c; display: flex; gap: 10px; padding: 8px 12px; border-radius: var(--r-s); background: var(--coal-2); border: 1px solid var(--seam); user-select: all; }
.codes li::before { content: counter(c); color: var(--ash-2); min-width: 1.4em; font-size: 0.8125rem; align-self: center; user-select: none; }
.panel-codes .row-actions { margin-top: 14px; }
.panel-codes .hint { margin-top: 12px; }
#journal .hint-foot a { color: var(--gold-2); }

/* 2FA */
.setup { display: grid; gap: 14px; max-width: 860px; counter-reset: st; }
.setup-step { counter-increment: st; position: relative; padding: 24px 24px 24px 72px; border-radius: var(--r-l); border: 1px solid var(--seam); background: var(--coal); }
.setup-step::before {
  content: counter(st); position: absolute; left: 24px; top: 22px; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid var(--gold-line); color: var(--gold-2); font-family: var(--mono); font-size: 0.875rem;
}
.setup-step h2 { font-size: 1.0625rem; font-weight: 650; margin-bottom: 4px; }
.setup-step > .form { margin-top: 14px; max-width: 420px; }
.setup-step > .hint { margin-top: 12px; }
.setup-qr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; align-items: start; }
.qr-box { padding: 0; }
.qr-box .qr { width: 176px; height: 176px; border-radius: 10px; }
.secret-line { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.secret-line code { padding: 8px 12px; border-radius: var(--r-s); background: var(--coal-2); border: 1px solid var(--seam-2); font-size: 0.9375rem; letter-spacing: 0.06em; overflow-wrap: anywhere; user-select: all; }

/* ——— Вход и регистрация ——— */
.auth { background: radial-gradient(1200px 600px at 50% -10%, var(--gold-tint), transparent 60%), var(--ink); }
.auth-shell { display: grid; grid-template-rows: auto 1fr auto; min-height: 100dvh; }
.auth-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px clamp(16px, 4vw, 40px); }
.auth-main { display: grid; place-items: center; padding: 24px 16px 40px; outline: none; }
.auth-card { width: min(100%, 440px); padding: 38px 36px 34px; border-radius: 22px; border: 1px solid var(--seam); background: var(--coal); box-shadow: var(--shadow); }
.auth-card > .form { margin-top: 26px; }
.auth-card > .alert, .auth-card > .flash, .auth-card > .note { margin: 22px 0 -6px; }
.auth-card > .btn { margin-top: 26px; }
.auth-card > .more { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--seam); }
.auth-card > .more .form { margin-top: 14px; }
.auth-title { font-family: var(--serif); font-weight: 600; font-size: 2.5rem; line-height: 1; letter-spacing: -0.012em; }
.auth-lead { margin-top: 12px; color: var(--text-2); font-size: 1rem; line-height: 1.55; }
.auth-alt { margin-top: 24px; text-align: center; font-size: 0.9375rem; color: var(--ash); }
.auth-icon { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 20px; border-radius: 16px; border: 1px solid var(--gold-line); color: var(--gold-2); background: var(--gold-tint); }
.auth-icon .i { width: 24px; height: 24px; }
.auth-icon-warn { border-color: var(--red-line); color: var(--red-text); background: var(--red-tint); }
.auth-icon-quiet { border-color: var(--seam-2); color: var(--ash); background: var(--tint); }
.auth-icon-num { width: auto; padding: 0 14px; font-family: var(--serif); font-size: 1.375rem; font-weight: 600; font-variant-numeric: lining-nums; }
.auth-card .row-actions { margin-top: 26px; }
.addr { font-weight: 600; color: var(--paper); overflow-wrap: anywhere; }
.tips { display: grid; gap: 8px; margin-top: 20px; font-size: 0.875rem; color: var(--ash); }
.tips li { position: relative; padding-left: 16px; }
.tips li::before { content: ''; position: absolute; left: 2px; top: 0.62em; width: 5px; height: 5px; border-radius: 50%; background: var(--seam-2); }
.auth-foot { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 24px; padding: 20px 16px 28px; font-size: 0.8125rem; color: var(--ash); }
.auth-foot a { text-decoration: none; }
.auth-foot a:hover { color: var(--paper); }
.auth .empty-page { padding: 0; }

/* ——— Вход через Telegram и заявка на доступ (ADR 0216) ——— */
.btn-tg .i { width: 18px; height: 18px; }
.auth-card > .btn-tg { margin-top: 26px; }
.hint-under { margin-top: 10px; text-align: center; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.way { margin-top: 24px; }
.auth-card > .way-main { padding: 20px; border-radius: var(--r-l); border: 1px solid var(--gold-line); background: var(--gold-tint); }
.way-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-bottom: 6px; }
.way-head h2 { font-size: 1.0625rem; font-weight: 650; }
.way-bot { display: grid; justify-items: center; gap: 14px; margin-top: 18px; }
.way-bot .qr-box { display: grid; justify-items: center; gap: 8px; }
.way-bot .qr-box .qr { width: 160px; height: 160px; }
.tag-gold { border-color: var(--gold-line); color: var(--gold-2); }
.reqs { display: grid; gap: 12px; }
.req { display: grid; gap: 10px; padding: 18px 20px; border-radius: var(--r-l); border: 1px solid var(--seam); background: var(--coal); }
.welcome .req { margin-top: 18px; }
.req-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 12px; }
.req-head h3 { font-size: 1rem; font-weight: 650; }
.req .row-actions { margin-top: 2px; }
.req-reason { color: var(--paper); }
.bot-card .qr-box { display: grid; justify-items: center; gap: 8px; margin: 16px 0; }
.chip-new { border-color: var(--gold-line); color: var(--gold-2); }
.chip-new i { background: var(--gold); }
.chip-approved { border-color: var(--green-line); color: var(--green-text); }
.chip-approved i { background: var(--green); }
.chip-rejected { border-color: var(--red-line); color: var(--red-text); }
.chip-rejected i { background: var(--red); }

/* ——— Квитанция ——— */
.print-page { padding: 28px 16px 60px; }
.receipt-tools { display: flex; justify-content: space-between; gap: 12px; max-width: 760px; margin: 0 auto 16px; }
.receipt {
  max-width: 760px; margin: 0 auto; padding: 48px; border-radius: 6px; background: #fdfbf6; color: #15130f; box-shadow: var(--shadow);
  --seam: #e2d9c6; --ash: #5f584b;
}
.receipt-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; padding-bottom: 28px; border-bottom: 1px solid #15130f; }
.receipt-no { text-align: right; }
.receipt-no h1 { font-family: var(--serif); font-size: 2rem; font-weight: 600; line-height: 1; }
.receipt-no p { margin-top: 8px; font-size: 0.9375rem; color: #5f584b; }
.receipt-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px 32px; margin: 28px 0; }
.receipt-meta > div { display: grid; gap: 3px; }
.receipt-meta dt { font-size: 0.8125rem; color: #5f584b; }
.receipt-meta dd { font-size: 0.9375rem; overflow-wrap: anywhere; }
.receipt-table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.receipt-table th { padding: 10px 0; text-align: left; font-size: 0.8125rem; font-weight: 550; color: #5f584b; border-bottom: 1px solid #e2d9c6; }
.receipt-table td { padding: 14px 0; border-bottom: 1px solid #e2d9c6; }
.receipt-table th + th, .receipt-table td + td { padding-left: 16px; }
.receipt-table tfoot th { color: #5f584b; font-weight: 400; text-align: right; padding-right: 16px; }
.receipt-table tfoot td, .receipt-table tfoot th { border-bottom: 0; padding-top: 10px; padding-bottom: 4px; }
.receipt-total th, .receipt-total td { font-size: 1.0625rem; font-weight: 650 !important; color: #15130f !important; padding-top: 16px !important; }
.receipt-pay { padding-top: 24px; border-top: 1px solid #e2d9c6; }
.receipt-hash { font-size: 0.8125rem !important; }
.receipt-foot { display: grid; gap: 2px; margin-top: 32px; font-size: 0.8125rem; color: #5f584b; }
.receipt .brand { color: #15130f; }

@media print {
  @page { margin: 16mm; }
  :root { --grain: 0; }
  body, .print-page { background: #fff !important; color: #15130f; padding: 0; }
  body::after, .no-print, .side, .top, .tabs, .strip, .skip { display: none !important; }
  .receipt { box-shadow: none; padding: 0; max-width: none; background: #fff; }
  .main { margin: 0; padding: 0; }
  body.app:has(.panel-codes) .main > :not(.panel-codes) { display: none !important; }
  .panel-codes { border: 0; background: #fff; color: #15130f; }
  .panel-codes .row-actions { display: none; }
  .codes li { background: #fff; border-color: #ccc; color: #15130f; }
}

/* ——— Телефон и планшет ——— */
@media (max-width: 959px) {
  .side { display: none; }
  .top {
    position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; height: 58px;
    padding: 0 16px; border-bottom: 1px solid var(--seam); background: var(--header-bg); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  }
  .me { position: relative; }
  .me summary { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--seam-2); color: var(--text-2); cursor: pointer; list-style: none; }
  .me summary::-webkit-details-marker { display: none; }
  .me[open] summary { border-color: var(--gold-line); color: var(--gold-2); }
  .me-menu {
    position: absolute; right: 0; top: calc(100% + 8px); width: min(290px, calc(100vw - 32px)); display: grid; gap: 2px; padding: 10px;
    border-radius: 16px; border: 1px solid var(--seam-2); background: var(--menu-bg); box-shadow: var(--shadow);
  }
  .me-menu .who { padding: 6px 10px 10px; border-bottom: 1px solid var(--seam); margin-bottom: 4px; }
  .me-menu > a { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 10px; border-radius: 10px; text-decoration: none; color: var(--text-2); }
  .me-menu > a .i { color: var(--ash); }
  .me-menu > a[aria-current='page'] { color: var(--paper); background: var(--tint-2); }
  .me-menu > a[aria-current='page'] .i { color: var(--gold-2); }
  .me-tools { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; padding: 10px 0 0 4px; border-top: 1px solid var(--seam); }
  .me-tools form { margin: 0; }
  .main { margin-left: 0; padding: 22px 16px calc(96px + env(safe-area-inset-bottom)); }
  .tabs {
    position: fixed; inset: auto 0 0 0; z-index: 30; display: grid; grid-template-columns: repeat(4, 1fr);
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); border-top: 1px solid var(--seam); background: var(--menu-bg);
  }
  .tabs a { position: relative; display: grid; justify-items: center; gap: 3px; padding: 7px 2px 5px; border-radius: 12px; color: var(--ash); text-decoration: none; font-size: 0.6875rem; font-weight: 550; }
  .tabs a[aria-current='page'] { color: var(--gold-2); }
  .tabs a[aria-current='page'] .i { color: var(--gold-2); }
  .tabs .i { width: 22px; height: 22px; }
  .tabs .badge { position: absolute; top: 2px; left: calc(50% + 6px); min-width: 17px; height: 17px; font-size: 0.6875rem; padding: 0 4px; }
  .anchors { top: 58px; margin-left: -16px; margin-right: -16px; padding-left: 12px; padding-right: 12px; }
  .anchors { mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent); }
  .anchors.at-end { mask-image: none; }
}
@media (max-width: 719px) {
  .page-head { margin-bottom: 22px; }
  .panel, .lic, .pay-main, .result, .reply { padding: 20px 18px; }
  .devices { padding: 2px 18px; }
  .note .btn { margin: 8px 0 0; }
  .note:has(.btn) { flex-wrap: wrap; }
  .note:has(.btn) .btn { margin-left: 32px; }
  .facts > div { grid-template-columns: 96px minmax(0, 1fr); }
  .form-inline { grid-template-columns: minmax(0, 1fr); }
  .form-inline > .btn { margin-top: 0; justify-self: start; }
  .cmd pre { padding: 14px; font-size: 0.8125rem; }
  .secret { flex-direction: column; align-items: stretch; }
  .secret > .btn { align-self: flex-start; min-height: 34px; }
  .track { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 20px; }
  .pay-facts > div { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .amount-row .btn { width: 100%; }
  .addr-code { flex-basis: 100%; }
  .pay-addr .btn { width: 100%; }
  .pay-qr { justify-items: center; }
  .inv-foot { flex-direction: column; align-items: flex-start; }
  .steps-bar { gap: 8px 14px; }
  .steps-bar li + li::before { width: 14px; }
  .steps-bar li { font-size: 0.8125rem; }
  /* Таблицы — карточками */
  .table-wrap { border: 0; background: transparent; overflow: visible; }
  .table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .table, .table tbody, .table tr, .table td { display: block; }
  .table tr { padding: 12px 16px; margin-bottom: 10px; border-radius: var(--r-l); border: 1px solid var(--seam); background: var(--coal); }
  .table td { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 7px 0; border: 0; text-align: right; }
  .table td::before { content: attr(data-th); color: var(--ash); font-family: var(--sans); font-size: 0.8125rem; letter-spacing: 0; text-align: left; flex: none; }
  .table td.cell-act { justify-content: flex-start; padding-top: 12px; margin-top: 4px; border-top: 1px solid var(--seam); }
  .table td.cell-act::before { content: none; }
  .table td.cell-act .btn { width: 100%; }
  .table tbody tr:hover td { background: transparent; }
  .ticket-row { flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px 18px 14px 20px; }
  .ticket-main { width: 100%; }
  .msg { max-width: 100%; }
  .tg { flex-wrap: wrap; }
  .tg-act { flex-basis: 100%; padding-left: 62px; }
  .setup-step { padding: 20px 18px 20px 60px; }
  .setup-step::before { left: 18px; top: 18px; }
  .setup-qr { grid-template-columns: minmax(0, 1fr); }
  .qr-box .qr { width: 168px; height: 168px; }
  .device { flex-wrap: wrap; }
  .auth-card { padding: 30px 22px 26px; border-radius: 20px; }
  .auth-title { font-size: 2.125rem; }
  .receipt { padding: 28px 20px; }
  .receipt-head { flex-direction: column; }
  .receipt-no { text-align: left; }
  .lic-foot .btn { flex: 1; }
  .psec-head { flex-wrap: wrap; }
}
@media (max-width: 420px) {
  .auth-card { border: 0; background: transparent; box-shadow: none; padding: 8px 4px; }
  .auth { background: var(--ink); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
.count { justify-self: end; margin-top: -2px; font-size: 0.8125rem; color: var(--ash); }
.count.is-over { color: var(--red-text); }
