/* ==========================================================================
   QRMotion — единая система стилей
   Светлый эко-минимализм. Шрифты Manrope (заголовки) и Inter (текст)
   хранятся локально — никаких внешних запросов.
   ========================================================================== */

@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/inter-cyrillic-400-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/inter-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../fonts/inter-cyrillic-500-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../fonts/inter-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../fonts/inter-cyrillic-600-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../fonts/inter-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("../fonts/manrope-cyrillic-700-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("../fonts/manrope-latin-700-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 800; font-display: swap;
  src: url("../fonts/manrope-cyrillic-800-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 800; font-display: swap;
  src: url("../fonts/manrope-latin-800-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

@font-face { font-family: "Unbounded"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../fonts/unbounded-cyrillic-600-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Unbounded"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../fonts/unbounded-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Unbounded"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("../fonts/unbounded-cyrillic-700-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Unbounded"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("../fonts/unbounded-latin-700-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  /* Фирменный цвет задаётся в «Админка → Настройки → Оформление» (и в настройках организации):
     сервер подставляет --brand/--brand-deep/--brand-soft/--brand-tint, остальное выводится из них. */
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-2: #f9fbfe;
  --ink: #0e1c33;
  --ink-soft: #52607a;
  --ink-faint: #8591a6;
  --line: #e1e7f0;
  --line-soft: #edf1f7;

  --brand: #1f7ae0;
  --brand-deep: #1962b3;
  --brand-soft: #e4effc;
  --brand-tint: #f1f6fd;
  --brand-line: color-mix(in srgb, var(--brand) 26%, #ffffff);
  --on-brand: #ffffff;

  --green: #1f9461; --green-deep: #167049; --green-soft: #e3f5ec;
  --amber: #b9741a; --amber-soft: #fbf1e0;
  --red: #c8453b;   --red-soft: #fcecea;
  --blue: #2a6fd6;  --blue-soft: #e8f0fc;
  --violet: #6b4fa0; --violet-soft: #f1ecf8;
  --gray-soft: #eef1f5;

  --side: #0d1a30;
  --side-ink: #c3cee0;
  --side-faint: #7584a0;

  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(14,28,51,.04), 0 8px 24px rgba(14,28,51,.05);
  --shadow-lg: 0 20px 50px rgba(13,26,48,.18);
  --ring: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-head: "Manrope", "Inter", -apple-system, sans-serif;
  --font-display: "Unbounded", "Manrope", "Inter", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font); background: var(--bg); color: var(--ink);
  min-height: 100vh; line-height: 1.55; font-size: 14.5px;
  -webkit-font-smoothing: antialiased; display: flex; flex-direction: column;
}
main { flex: 1 0 auto; }
h1, h2, h3, h4 { font-family: var(--font-head); letter-spacing: -.02em; color: var(--ink); line-height: 1.2; }
h1 { font-size: 24px; font-weight: 800; }
h2 { font-size: 17px; font-weight: 700; }
h3 { font-size: 15px; font-weight: 700; }
a { color: var(--brand-deep); text-decoration-thickness: 1px; text-underline-offset: 2px; }
img, svg { display: inline-block; vertical-align: middle; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
.ic { width: 18px; height: 18px; flex-shrink: 0; }
.ic-sm { width: 15px; height: 15px; flex-shrink: 0; }
.ic-lg { width: 22px; height: 22px; flex-shrink: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hp-field { position: absolute !important; left: -10000px !important; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* ------------------------------------------------------------- утилиты */
.muted { color: var(--ink-soft); }
.faint { color: var(--ink-faint); }
.small { font-size: 12.5px; }
.tiny { font-size: 11.5px; }
.mono { font-family: var(--mono); font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.break { word-break: break-all; overflow-wrap: anywhere; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.flex { display: flex; align-items: center; gap: 10px; }
.flex-wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.end { justify-content: flex-end; }
.grow { flex: 1 1 auto; min-width: 0; }
.gap-sm { gap: 6px; } .gap-lg { gap: 18px; }
.stack > * + * { margin-top: 14px; }
.mt-0 { margin-top: 0 !important; } .mt-1 { margin-top: 6px; } .mt-2 { margin-top: 12px; } .mt-3 { margin-top: 20px; } .mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 6px; } .mb-2 { margin-bottom: 12px; } .mb-3 { margin-bottom: 20px; }
.w-100 { width: 100%; }
.grid { display: grid; gap: 16px; }
.grid > * { min-width: 0; }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cols-auto { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.sidebar-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }

/* ------------------------------------------------------------- шапка кабинета */
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); min-width: 0; }
/* Знак платформы: белый стилизованный QR на фирменном цвете — одинаковый везде. */
.brand-logo { width: 38px; height: 38px; border-radius: 11px; background: var(--brand); display: grid; place-items: center; flex-shrink: 0;
  box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 6px 14px -6px color-mix(in srgb, var(--brand) 75%, transparent); }
.brand-logo svg { width: 100%; height: 100%; display: block; }
.brand-logo-lg { width: 56px; height: 56px; border-radius: 15px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-text .name { font-family: var(--font-head); font-weight: 800; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-text .sub { font-size: 11px; color: var(--ink-faint); letter-spacing: .02em; }
.top-actions { display: flex; align-items: center; gap: 8px; }

.dropdown { position: relative; }
.dropdown > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; color: var(--ink-soft); background: var(--surface); user-select: none; }
.dropdown > summary::-webkit-details-marker { display: none; }
.dropdown > summary:hover { border-color: var(--ink-faint); color: var(--ink); }
.dropdown[open] > summary { border-color: var(--brand); color: var(--brand-deep); }
.dropdown-menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 210px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; z-index: 60; }
.dropdown-menu a, .dropdown-menu button { display: flex; width: 100%; align-items: center; gap: 9px; padding: 9px 11px; border-radius: 8px; font-size: 13.5px; color: var(--ink); text-decoration: none; background: none; border: 0; cursor: pointer; font-family: inherit; text-align: left; }
.dropdown-menu a:hover, .dropdown-menu button:hover { background: var(--brand-tint); }
.dropdown-menu .active { font-weight: 600; color: var(--brand-deep); }
.dropdown-menu hr { border: 0; border-top: 1px solid var(--line-soft); margin: 5px 0; }
.dropdown-menu .head { padding: 8px 11px 6px; font-size: 12px; color: var(--ink-faint); }
.avatar { width: 24px; height: 24px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-deep); display: grid; place-items: center; font-size: 11px; font-weight: 700; flex-shrink: 0; }


.impersonation { background: var(--side); color: #e4ebf6; font-size: 13px; }
.impersonation .inner { max-width: 1200px; margin: 0 auto; padding: 8px 20px; display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.impersonation button { background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.25); border-radius: 999px; padding: 4px 12px; font-size: 12.5px; cursor: pointer; font-family: inherit; }
.impersonation button:hover { background: rgba(255,255,255,.22); }

/* ------------------------------------------------------------- контент */
.container { max-width: 1200px; margin: 26px auto; padding: 0 20px; width: 100%; }
.container.narrow { max-width: 760px; }
.container.slim { max-width: 560px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head p { color: var(--ink-soft); margin-top: 4px; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-soft); text-decoration: none; font-size: 13px; margin-bottom: 8px; }
.back-link:hover { color: var(--brand-deep); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); margin-bottom: 16px; }
.card.flush { padding: 0; overflow: hidden; }
.card.flush > .card-head { padding: 16px 20px; border-bottom: 1px solid var(--line-soft); margin: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.card-head h2 { margin: 0; }
.card .card-foot { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.card.highlight { border-color: var(--brand-line); background: linear-gradient(180deg, var(--brand-tint), var(--surface) 60%); }
.card.danger-zone { border-color: #f0cfcb; }

/* ------------------------------------------------------------- метрики */
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stats.n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stats.n4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stats.n5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.stats.n6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px 16px; text-decoration: none; color: inherit; display: block; transition: border-color .15s, transform .1s; }
a.stat:hover { border-color: var(--brand-line); transform: translateY(-1px); }
.stat .label { display: flex; align-items: center; gap: 7px; font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-faint); margin-bottom: 9px; }
.stat .value { font-family: var(--font-head); font-size: 28px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.stat .cap { font-size: 12px; color: var(--ink-faint); margin-top: 5px; }
.stat.green .value { color: var(--green-deep); }
.stat.amber .value { color: var(--amber); }
.stat.blue .value { color: var(--blue); }
.stat.red .value { color: var(--red); }
.stat.violet .value { color: var(--violet); }

/* ------------------------------------------------------------- уведомления */
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius-sm); margin: 0 0 14px; font-size: 14px; border: 1px solid transparent; }
.alert .ic { margin-top: 1px; }
.alert-success { background: var(--green-soft); color: var(--green-deep); border-color: #c4e7d5; }
.alert-error   { background: var(--red-soft); color: #9a352d; border-color: #f0cfcb; }
.alert-info    { background: var(--blue-soft); color: #1d4f99; border-color: #cfdef5; }
.alert-warning { background: var(--amber-soft); color: #82540f; border-color: #efdcbc; }
.alert a { color: inherit; font-weight: 600; }
.flash-stack { position: relative; z-index: 60; max-width: 1200px; margin: 18px auto -8px; padding: 0 20px; width: 100%; }
.flash-stack .alert { box-shadow: var(--shadow); }
/* Сообщение внутри формы (partials/flash с target): ниже шапки, у полей, которые нужно исправить. */
.flash-inline { margin: 0 0 14px; }
.flash-inline .alert { margin: 0; animation: qm-flash-in .2s ease-out; }
@keyframes qm-flash-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.flash-inline .alert + .alert { margin-top: 8px; }
#report, #contact { scroll-margin-top: 80px; }

/* ------------------------------------------------------------- бейджи */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--gray-soft); color: var(--ink-soft); }
.badge.dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-available, .badge.green { background: var(--green-soft); color: var(--green-deep); }
.status-issued, .badge.amber { background: var(--amber-soft); color: var(--amber); }
.status-lost, .badge.red { background: var(--red-soft); color: var(--red); }
.status-retired, .badge.gray { background: var(--gray-soft); color: #67738a; }
.badge.blue { background: var(--blue-soft); color: var(--blue); }
.badge.violet { background: var(--violet-soft); color: var(--violet); }

/* ------------------------------------------------------------- формы */
label, .label { display: block; font-weight: 600; font-size: 13px; color: var(--ink); margin: 14px 0 6px; }
form > label:first-child { margin-top: 0; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="date"],
input[type="search"], input[type="tel"], input[type="url"], select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  font: inherit; font-size: 14px; color: var(--ink); background: var(--surface);
  transition: border-color .15s, box-shadow .15s; appearance: none; -webkit-appearance: none;
}
input[type="color"] { width: 48px; height: 38px; border: 1px solid var(--line); border-radius: 8px; padding: 3px; background: var(--surface); cursor: pointer; }
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a998f' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px; }
textarea { resize: vertical; min-height: 96px; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); }
input[disabled], select[disabled], textarea[disabled] { background: var(--line-soft); color: var(--ink-faint); }
input.mono, textarea.mono { font-family: var(--mono); font-size: 13px; }
::placeholder { color: var(--ink-faint); }
.hint { font-size: 12px; color: var(--ink-faint); margin-top: 5px; line-height: 1.5; }
.field-error { font-size: 12.5px; color: var(--red); margin-top: 5px; }
.required { color: var(--red); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.form-grid .full { grid-column: 1 / -1; }
.form-actions { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; align-items: center; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; font-size: 14px; margin: 10px 0; cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 1px; accent-color: var(--brand); flex-shrink: 0; }
.check .hint { margin-top: 2px; }
.check-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0 14px; max-height: 260px; overflow: auto; }
.check-list .check { margin: 6px 0; }
.notify-list .check { padding: 10px 0; margin: 0; border-bottom: 1px solid var(--line); }
.notify-list .check:last-child { border-bottom: 0; }
.notify-list .check input:disabled + span { opacity: .75; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 6px 16px 14px; margin: 16px 0; }
legend { font-weight: 700; font-size: 13px; padding: 0 6px; color: var(--ink-soft); }
.input-inline { display: flex; gap: 8px; align-items: center; }
.input-inline input, .input-inline select { width: auto; flex: 1 1 auto; min-width: 0; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.filters .fld { display: flex; flex-direction: column; min-width: 140px; }
.filters .fld.grow { flex: 1 1 220px; }
.filters label { margin: 0 0 5px; font-size: 12px; color: var(--ink-soft); }
.filters input, .filters select { padding: 8px 11px; }
.filters select { padding-right: 32px; }

/* ------------------------------------------------------------- кнопки */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 10px 18px; border: 1px solid transparent; border-radius: var(--radius-sm); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s, color .15s, transform .05s; line-height: 1.2; }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn.is-loading { opacity: .6; cursor: not-allowed; }
.btn .ic { width: 16px; height: 16px; }
.btn-primary { background: var(--brand); color: var(--on-brand); box-shadow: 0 1px 0 rgba(255,255,255,.18) inset, 0 6px 16px -8px color-mix(in srgb, var(--brand) 70%, transparent); }
.btn-primary:hover { background: var(--brand-deep); }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-secondary:hover { border-color: var(--ink-faint); }
.btn-ghost { background: transparent; color: var(--ink-soft); }
.btn-ghost:hover { background: var(--brand-tint); color: var(--brand-deep); }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { background: #a5382f; }
.btn-danger-outline { background: var(--surface); color: var(--red); border-color: #f0cfcb; }
.btn-danger-outline:hover { background: var(--red-soft); }
.btn-warning { background: var(--amber); color: #fff; }
.btn-warning:hover { background: #9b6014; }
.btn-blue { background: var(--blue); color: #fff; }
.btn-blue:hover { background: #235a7f; }
.btn-sm { padding: 6px 11px; font-size: 12.5px; border-radius: 8px; }
.btn-lg { padding: 14px 22px; font-size: 15px; }
.btn-block { width: 100%; }
.btn-icon { padding: 7px; }
.inline-form { display: inline; }
.btn-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

/* ------------------------------------------------------------- таблицы */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; padding: 10px 14px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-faint); border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface-2); }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--line-soft); font-size: 13.5px; vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--brand-tint); }
.table tr.is-muted td { opacity: .55; }
.table .actions { text-align: right; white-space: nowrap; }
.table a.row-link { color: var(--ink); text-decoration: none; font-weight: 600; }
.table a.row-link:hover { color: var(--brand-deep); text-decoration: underline; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table-foot { padding: 12px 16px; display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; border-top: 1px solid var(--line-soft); font-size: 13px; color: var(--ink-soft); }

.pagination { display: flex; gap: 5px; flex-wrap: wrap; }
.pagination a, .pagination span { min-width: 34px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); text-align: center; font-size: 13px; text-decoration: none; color: var(--ink-soft); }
.pagination a:hover { background: var(--brand-tint); }
.pagination .current { background: var(--brand); color: #fff; border-color: var(--brand); }
.pagination .disabled { opacity: .4; }

.empty { text-align: center; padding: 42px 20px; color: var(--ink-faint); }
.empty .ic { width: 34px; height: 34px; color: var(--line); margin-bottom: 10px; }
.empty p { font-size: 15px; color: var(--ink-soft); margin-bottom: 14px; }

/* ------------------------------------------------------------- ключ-значение */
.kv { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); font-size: 14px; }
.kv:last-child { border-bottom: 0; }
.loc-list { list-style: none; margin: 0; padding: 0; }
.loc-list li { padding: 10px 0; border-bottom: 1px solid var(--line-soft); font-size: 14px; }
.loc-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.loc-list li > div { margin-top: 2px; }
.kv > span:first-child { color: var(--ink-faint); }
.kv > b, .kv > span:last-child { text-align: right; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }

/* ------------------------------------------------------------- вкладки */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tab { padding: 10px 16px; border: 0; background: none; font: inherit; font-size: 14px; font-weight: 500; color: var(--ink-soft); border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; white-space: nowrap; text-decoration: none; }
.tab:hover { color: var(--ink); }
.tab.active { color: var(--brand-deep); border-bottom-color: var(--brand); font-weight: 600; }
.tab-panel[hidden] { display: none; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { padding: 6px 13px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 13px; color: var(--ink-soft); text-decoration: none; white-space: nowrap; }
.chip:hover { border-color: var(--brand); color: var(--brand-deep); }
.chip.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip .n { opacity: .75; margin-left: 3px; }

/* ------------------------------------------------------------- модальное окно */
.modal { display: none; position: fixed; inset: 0; background: rgba(9,19,38,.55); z-index: 100; align-items: center; justify-content: center; padding: 16px; }
.modal.open { display: flex; }
.modal-box { background: var(--surface); border-radius: 16px; padding: 24px; width: 100%; max-width: 420px; box-shadow: var(--shadow-lg); max-height: 92vh; overflow: auto; }
.modal-box.text-center img, .modal-box.text-center canvas { margin: 0 auto; display: block; }

/* ------------------------------------------------------------- QR-карточка и история */
.unit-title { font-family: var(--font-head); font-size: 22px; font-weight: 800; }
.unit-uuid { font-family: var(--mono); font-size: 12px; color: var(--ink-faint); word-break: break-all; margin-top: 3px; }
.op-panel { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; background: var(--surface); }
.op-panel.issue { border-top: 3px solid var(--blue); }
.op-panel.return { border-top: 3px solid var(--green); }
.payout-note { background: var(--brand-tint); border: 1px solid var(--line); padding: 10px 13px; border-radius: 10px; font-size: 13px; color: var(--ink-soft); margin: 10px 0 2px; }
.timeline { list-style: none; position: relative; }
.timeline li { position: relative; padding: 0 0 16px 26px; }
.timeline li::before { content: ""; position: absolute; left: 7px; top: 18px; bottom: 0; width: 2px; background: var(--line-soft); }
.timeline li:last-child::before { display: none; }
.timeline .tl-dot { position: absolute; left: 0; top: 4px; width: 16px; height: 16px; border-radius: 50%; border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--line); background: var(--ink-faint); }
.tl-issue .tl-dot { background: var(--blue); } .tl-return .tl-dot { background: var(--green); }
.tl-lost .tl-dot { background: var(--red); } .tl-found .tl-dot { background: var(--amber); }
.tl-retire .tl-dot, .tl-restore .tl-dot { background: #8a93a5; }
.timeline .tl-title { font-weight: 600; font-size: 14px; }
.timeline .tl-meta { font-size: 12.5px; color: var(--ink-soft); margin-top: 2px; }

/* ------------------------------------------------------------- сканер */
#reader { width: 100%; }
#reader video { border-radius: 14px; }
.upload-area { border: 1.5px dashed var(--line); border-radius: 12px; padding: 18px; text-align: center; cursor: pointer; color: var(--ink-soft); transition: border-color .15s, background .15s; }
.upload-area:hover, .upload-area.drag { border-color: var(--brand); background: var(--brand-tint); }
.scan-status { text-align: center; padding: 10px; color: var(--ink-faint); font-size: 13px; }
.scan-status.ok { color: var(--green-deep); }
.scan-status.err { color: var(--red); }
.scan-result { background: var(--brand-tint); border-radius: 12px; padding: 14px; margin-top: 12px; word-break: break-all; }

/* ------------------------------------------------------------- QR-сетка и печать */
.qr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.qr-item { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px; text-align: center; }
.qr-item canvas, .qr-item img { width: 100%; max-width: 160px; height: auto; display: block; margin: 0 auto; image-rendering: pixelated; }
.qr-item .qr-label { font-weight: 700; font-size: 13px; margin-top: 6px; }
.qr-item .qr-id { font-family: var(--mono); font-size: 10.5px; color: var(--ink-faint); margin-top: 3px; word-break: break-all; }

.print-sheet { display: flex; flex-wrap: wrap; gap: 4mm; }
.print-label { width: var(--label, 40mm); border: 1px dashed #cdd6e3; border-radius: 2mm; padding: 2mm; text-align: center; break-inside: avoid; page-break-inside: avoid; background: #fff; }
.print-label .qr-box { width: 100%; aspect-ratio: 1 / 1; }
.print-label .qr-box svg, .print-label .qr-box canvas, .print-label .qr-box img { width: 100%; height: 100%; display: block; }
.print-label .pl-label { font-family: var(--font-head); font-weight: 800; font-size: calc(var(--label, 40mm) / 9); line-height: 1.1; margin-top: 1mm; word-break: break-word; }
.print-label .pl-org { font-size: calc(var(--label, 40mm) / 14); color: #52607a; line-height: 1.1; }
.print-label .pl-id { font-family: var(--mono); font-size: calc(var(--label, 40mm) / 16); color: #8591a6; }
.print-toolbar { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 16px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }

/* ------------------------------------------------------------- графики */
.chart { width: 100%; height: auto; }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--ink-soft); flex-wrap: wrap; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.bar-row { display: grid; grid-template-columns: minmax(110px, 200px) 1fr 70px; align-items: center; gap: 10px; margin: 7px 0; font-size: 13px; }
.bar-track { background: var(--line-soft); border-radius: 999px; height: 9px; overflow: hidden; }
.bar-fill { display: block; height: 100%; background: var(--brand); border-radius: 999px; }
.bar-row .v { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------- сообщения */
.msg-list .msg { display: block; padding: 14px 18px; border-bottom: 1px solid var(--line-soft); text-decoration: none; color: inherit; }
.msg-list .msg:hover { background: var(--brand-tint); }
.msg-list .msg.unread { background: var(--brand-tint); }
.msg-list .msg.unread .msg-subject { font-weight: 700; }
.msg-list .msg.unread .msg-subject::before { content: ""; display: inline-block; width: 8px; height: 8px; background: var(--brand); border-radius: 50%; margin-right: 8px; vertical-align: 1px; }
.msg-subject { font-size: 14.5px; }
.msg-meta { font-size: 12.5px; color: var(--ink-faint); margin-top: 3px; display: flex; gap: 10px; flex-wrap: wrap; }
.msg-preview { font-size: 13px; color: var(--ink-soft); margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-body { white-space: pre-wrap; word-break: break-word; font-size: 14.5px; line-height: 1.6; }

/* ------------------------------------------------------------- админ-панель */
.sidebar { background: var(--side); color: var(--side-ink); padding: 18px 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; }
.sidebar .brand { color: #fff; padding: 4px 8px 18px; }

.sidebar .brand-text .sub { color: var(--side-faint); }
.admin-content { padding: 24px; max-width: 1280px; width: 100%; }
.admin-content .flash-stack { padding: 0; margin: 0 0 6px; }
.side-toggle { display: none; }

/* ------------------------------------------------------------- публичные страницы */
.aura { position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(60% 50% at 85% -5%, color-mix(in srgb, var(--brand) 22%, transparent), transparent 70%), radial-gradient(45% 40% at 5% 5%, color-mix(in srgb, var(--brand) 8%, transparent), transparent 70%); }
.auth-wrap { max-width: 420px; margin: 4vh auto 40px; padding: 0 16px; width: 100%; }
.auth-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 30px 28px; box-shadow: 0 14px 40px rgba(13,26,48,.08); }
.auth-card h1 { font-size: 22px; margin-bottom: 4px; }
.auth-card .sub { color: var(--ink-soft); font-size: 13.5px; margin-bottom: 18px; }
.auth-foot { text-align: center; margin-top: 16px; font-size: 13px; color: var(--ink-soft); }
.auth-forgot { display: block; width: max-content; margin: 8px 0 0 auto; font-size: 13px; }
.restore-ic { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--red-soft); color: var(--red); margin-bottom: 12px; }
.restore-ic .ic { width: 22px; height: 22px; }
.code-input { font-family: var(--mono); font-size: 22px !important; letter-spacing: .3em; text-align: center; }
.recovery-codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; font-family: var(--mono); font-size: 14px; background: var(--brand-tint); border-radius: 10px; padding: 14px; }

.eyebrow { display: inline-flex; align-items: center; gap: 8px; background: var(--brand-soft); color: var(--brand-deep); font-size: 13px; font-weight: 600; padding: 6px 14px; border-radius: 999px; margin-bottom: 20px; }
.site-footer { border-top: 1px solid var(--line); color: var(--ink-faint); text-align: center; padding: 22px 16px; font-size: 12.5px; margin-top: 40px; }
.site-footer a { color: var(--ink-soft); }
.public-unit { max-width: 560px; margin: 2vh auto 40px; padding: 0 16px; width: 100%; }
.public-unit .org { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.public-unit .org-badge { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; color: #fff; font-family: var(--font-head); font-weight: 800; font-size: 19px; flex-shrink: 0; }

.lang-switch { display: inline-flex; gap: 2px; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: var(--surface); }
.lang-switch a { font-size: 12px; font-weight: 600; text-decoration: none; color: var(--ink-faint); padding: 3px 9px; border-radius: 999px; text-transform: uppercase; }
.lang-switch a.active { background: var(--brand); color: #fff; }
.lang-switch a:hover:not(.active) { color: var(--ink); }

.error-page { text-align: center; padding: 60px 24px; }
.error-page .code { font-family: var(--font-head); font-size: 72px; font-weight: 800; color: var(--line); line-height: 1; letter-spacing: -.04em; }
.error-page h1 { margin: 10px 0 8px; }
.error-page p { color: var(--ink-soft); max-width: 46ch; margin: 0 auto 22px; }

/* ------------------------------------------------------------- установщик */
.req-list { list-style: none; }
.req-list li { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line-soft); font-size: 14px; }
.req-list li:last-child { border-bottom: 0; }
.req-list .ok { color: var(--green); } .req-list .bad { color: var(--red); } .req-list .warn { color: var(--amber); }
.req-list .val { margin-left: auto; color: var(--ink-faint); font-size: 13px; }
pre.code { background: #0d1a30; color: #d6e1f2; border-radius: 10px; padding: 14px; overflow: auto; font-size: 12.5px; line-height: 1.5; max-width: 100%; white-space: pre-wrap; word-break: break-all; }
.log-view { background: #0d1a30; color: #cdd9ec; border-radius: 10px; padding: 14px; overflow: auto; font-family: var(--mono); font-size: 12px; line-height: 1.55; max-height: 560px; white-space: pre-wrap; word-break: break-all; }

/* ------------------------------------------------------------- шапка и подвал публичных страниц */
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 200; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; text-decoration: none; }
.skip-link:focus { top: 12px; }
.site-header { position: sticky; top: 0; z-index: 70; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid transparent; transition: border-color .2s, background .2s; }
.site-header.is-scrolled { border-bottom-color: var(--line); background: color-mix(in srgb, var(--surface) 88%, transparent); }
.site-header-inner { max-width: 1200px; margin: 0 auto; padding: 12px 24px; display: flex; align-items: center; gap: 20px; }
.site-header .brand { margin-right: auto; }
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav > a { color: var(--ink-soft); text-decoration: none; font-weight: 500; font-size: 14px; padding: 8px 11px; border-radius: 9px; }
.site-nav > a:hover { color: var(--ink); background: color-mix(in srgb, var(--brand) 8%, transparent); }
.site-nav-mobile-actions { display: none; }
.nav-toggle { display: none; width: 40px; height: 40px; border-radius: 11px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; padding: 0; position: relative; }
.nav-toggle span { position: absolute; left: 11px; right: 11px; height: 2px; border-radius: 2px; background: var(--ink); transition: transform .25s, opacity .2s, top .25s; }
.nav-toggle span:nth-child(1) { top: 13px; } .nav-toggle span:nth-child(2) { top: 19px; } .nav-toggle span:nth-child(3) { top: 25px; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { top: 19px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { top: 19px; transform: rotate(-45deg); }

.site-foot { margin-top: 72px; background: var(--side); color: var(--side-ink); }
.site-foot-inner { max-width: 1200px; margin: 0 auto; padding: 48px 24px 28px; display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); gap: 32px; }
.site-foot .brand { color: #fff; }
.site-foot .brand-text .sub { color: var(--side-faint); }
.foot-brand p { margin-top: 14px; font-size: 13.5px; color: var(--side-faint); max-width: 38ch; }
.foot-col { display: flex; flex-direction: column; gap: 9px; font-size: 13.5px; }
.foot-col h4 { color: #fff; font-family: var(--font-head); font-size: 14px; margin-bottom: 4px; }
.foot-col a { color: var(--side-ink); text-decoration: none; }
.foot-col a:hover { color: #fff; text-decoration: underline; }
.site-foot-bottom { max-width: 1200px; margin: 0 auto; padding: 18px 24px 26px; border-top: 1px solid rgba(255,255,255,.08); display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; font-size: 12.5px; color: var(--side-faint); }

.cookie-note { position: fixed; left: 16px; bottom: 16px; z-index: 120; max-width: 460px; display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; box-shadow: var(--shadow-lg); font-size: 13px; color: var(--ink-soft); }
.cookie-note[hidden] { display: none; }
.cookie-note p { flex: 1; line-height: 1.45; }
.cookie-ic { width: 34px; height: 34px; border-radius: 10px; background: var(--brand-soft); color: var(--brand-deep); display: grid; place-items: center; flex-shrink: 0; }

/* ------------------------------------------------------------- согласия */
.consent-box { border: 1px solid var(--line); background: var(--surface-2); border-radius: var(--radius-sm); padding: 4px 14px; margin-top: 14px; }
.consent-check { font-size: 13.5px; font-weight: 400; color: var(--ink); line-height: 1.45; }
.consent-check .hint { display: block; margin-top: 3px; }
.consent-check a { font-weight: 600; }

/* ------------------------------------------------------------- правовые документы */
.legal { max-width: 860px; margin: 24px auto 0; padding: 0 24px; width: 100%; }
.legal-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 26px; }
.legal-tabs a { padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 13px; color: var(--ink-soft); text-decoration: none; }
.legal-tabs a:hover { border-color: var(--brand-line); color: var(--ink); }
.legal-tabs a.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.legal-head .eyebrow { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--brand-deep); background: var(--brand-soft); border-radius: 999px; padding: 5px 12px; margin-bottom: 14px; }
.legal-head h1 { font-family: var(--font-display); font-weight: 700; font-size: clamp(24px, 3.6vw, 36px); line-height: 1.15; letter-spacing: -.01em; max-width: 24ch; }
.legal-head p { margin-top: 10px; }
.legal-toc { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 22px 0 6px; padding: 14px 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); font-size: 14px; }
.legal-body { font-size: 15.5px; line-height: 1.7; color: var(--ink); margin-top: 26px; }
.legal-body h2 { font-family: var(--font-display); font-weight: 600; font-size: 22px; margin: 34px 0 6px; scroll-margin-top: 90px; }
.legal-body h3 { font-size: 17px; margin: 26px 0 8px; scroll-margin-top: 90px; }
.legal-body p, .legal-body ol, .legal-body ul { margin: 0 0 12px; }
.legal-body ol, .legal-body ul { padding-left: 24px; }
.legal-body li { margin: 6px 0; }
.legal-body li::marker { color: var(--ink-faint); }
.legal-sep { border: 0; border-top: 1px solid var(--line); margin: 40px 0 10px; }
.legal-table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.5; margin: 6px 0 16px; background: var(--surface); border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.legal-table th { text-align: left; background: var(--surface-2); color: var(--ink-soft); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.legal-table td { padding: 10px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.legal-table tr:last-child td { border-bottom: 0; }
.legal-card { margin-top: 34px; border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); padding: 20px 22px; }
.legal-card-title { font-family: var(--font-head); font-weight: 800; margin-bottom: 10px; }
.legal-dl { display: grid; grid-template-columns: minmax(150px, 220px) 1fr; gap: 6px 16px; font-size: 14.5px; }
.legal-dl dt { color: var(--ink-faint); }

/* ------------------------------------------------------------- подписка */
.billing-status-main { display: flex; gap: 16px; align-items: center; }
.ic-round { width: 52px; height: 52px; border-radius: 16px; background: var(--brand); color: var(--on-brand); display: grid; place-items: center; flex-shrink: 0; }
.billing-plan-name { font-family: var(--font-head); font-weight: 800; font-size: 22px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.billing-limits { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-top: 18px; }
.billing-limits > div { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; display: flex; justify-content: space-between; gap: 8px; font-size: 13.5px; }
.billing-limits span { color: var(--ink-soft); }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.plan-card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 22px; display: flex; flex-direction: column; gap: 6px; }
.plan-card.featured { border: 2px solid var(--brand); box-shadow: 0 18px 40px -22px color-mix(in srgb, var(--brand) 60%, transparent); }
.plan-card h3 { font-family: var(--font-display); font-weight: 600; font-size: 19px; }
.plan-flag { position: absolute; top: -11px; right: 18px; background: var(--brand); color: var(--on-brand); font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.plan-price { font-family: var(--font-display); font-weight: 700; font-size: 28px; margin-top: 8px; letter-spacing: -.01em; }
.plan-price span { font-family: var(--font); font-size: 14px; font-weight: 500; color: var(--ink-soft); letter-spacing: 0; }
.plan-features { list-style: none; margin: 12px 0 16px; padding: 0; display: flex; flex-direction: column; gap: 7px; font-size: 14px; flex: 1; }
.plan-features li { display: flex; gap: 8px; align-items: flex-start; }
.plan-features .ic-sm { color: var(--brand); margin-top: 3px; }
.billing-banner { background: var(--amber-soft); color: #7a4f10; border-bottom: 1px solid #efdcbc; font-size: 13.5px; }
.billing-banner.billing-soft, .billing-banner.billing-readonly { background: var(--red-soft); color: #8f2f27; border-bottom-color: #f0cfcb; }
.billing-banner .inner { max-width: 1200px; margin: 0 auto; padding: 9px 20px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.billing-banner .btn { background: var(--surface); border-color: transparent; color: var(--ink); }
.invoice h1 { font-size: 22px; margin-top: 4px; }
.invoice-sum { font-family: var(--font-display); font-size: 20px; }
.requisites { white-space: pre-wrap; font-family: var(--font); font-size: 14.5px; line-height: 1.6; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.pay-result { padding: 36px 26px; }
.pay-icon { width: 64px; height: 64px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--gray-soft); color: var(--ink-soft); }
.pay-succeeded .pay-icon { background: var(--green-soft); color: var(--green-deep); }
.pay-pending .pay-icon { background: var(--amber-soft); color: var(--amber); }
.pay-failed .pay-icon, .pay-canceled .pay-icon { background: var(--red-soft); color: var(--red); }
.pay-result .kv { text-align: left; }
.provider-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.provider-opt { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin: 0; cursor: pointer; font-weight: 400; }
.provider-opt:has(input:checked) { border-color: var(--brand); background: var(--brand-tint); box-shadow: var(--ring); }
.provider-opt input { margin-top: 3px; accent-color: var(--brand); }
.provider-opt b { display: block; font-size: 14px; }
.provider-opt small { display: block; color: var(--ink-soft); font-size: 12.5px; line-height: 1.4; margin-top: 2px; }
.color-pick { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.swatch { width: 30px; height: 30px; border-radius: 9px; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line); background: var(--sw); cursor: pointer; padding: 0; }
.swatch:hover { transform: scale(1.08); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 11px; padding: 3px; background: var(--surface-2); gap: 2px; flex-wrap: wrap; }
.seg label { margin: 0; cursor: pointer; font-weight: 500; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: inline-block; padding: 7px 14px; border-radius: 8px; font-size: 13.5px; color: var(--ink-soft); }
.seg input:checked + span { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(14,28,51,.12); font-weight: 600; }
.seg input:focus-visible + span { outline: 2px solid var(--brand); }

/* ------------------------------------------------------------- админ-меню на телефоне */
.side-backdrop { position: fixed; inset: 0; background: rgba(9,19,38,.45); z-index: 85; opacity: 0; transition: opacity .2s; }
.side-backdrop.show { opacity: 1; }

/* ------------------------------------------------------------- адаптивность */
/* ------------------------------------------------------------- справка */
.admin-content .container { margin: 0 auto; padding: 0; }
.help { max-width: 920px; }
.help-hero { text-align: center; padding: 8px 0 18px; }
.help-hero h1 { display: inline-flex; align-items: center; gap: 10px; }
.help-hero h1 .ic { width: 26px; height: 26px; color: var(--brand); }
.help-hero > p { max-width: 640px; margin: 6px auto 18px; }
.help-search { position: relative; display: flex; align-items: center; max-width: 680px; margin: 0 auto; background: var(--surface); border: 1.5px solid var(--line); border-radius: 14px; box-shadow: 0 6px 24px rgba(14,28,51,.06); transition: border-color .15s, box-shadow .15s; }
.help-search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.help-search > .ic { position: absolute; left: 16px; width: 20px; height: 20px; color: var(--ink-faint); pointer-events: none; }
.help-search input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 15px 12px 15px 48px; font-size: 16px; outline: none; box-shadow: none; }
.help-search input::-webkit-search-cancel-button { display: none; }
/* Фокус показывает рамка всего поля (.help-search:focus-within), а не самого input —
   иначе вторая рамка обрывается перед крестиком и подсказкой «/». */
.help-search input:focus-visible { outline: none; }
.help-search:focus-within kbd { visibility: hidden; }
.help-clear { border: 0; background: none; color: var(--ink-faint); padding: 8px; cursor: pointer; display: grid; place-items: center; border-radius: 8px; }
.help-clear:hover { color: var(--ink); background: var(--brand-tint); }
.help-search kbd { margin-right: 12px; }
kbd { display: inline-block; min-width: 22px; padding: 2px 6px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; background: var(--bg); font: 600 12px/1.3 ui-monospace, monospace; color: var(--ink-soft); text-align: center; }
.help-popular { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; margin-top: 14px; }
.chip { border: 1px solid var(--line); background: var(--surface); color: var(--ink-soft); border-radius: 999px; padding: 5px 12px; font: inherit; font-size: 13px; cursor: pointer; transition: border-color .15s, color .15s, background .15s; }
.chip:hover { border-color: var(--brand); color: var(--brand-deep); background: var(--brand-tint); }

.help-results { margin: 6px auto 22px; padding: 14px; }
.help-results-summary { font-size: 13px; color: var(--ink-soft); padding: 2px 6px 8px; }
.help-results-list { list-style: none; margin: 0; padding: 0; }
.help-results-sep { font-size: 12px; color: var(--ink-faint); padding: 12px 12px 4px; border-top: 1px dashed var(--line); margin-top: 6px; }
.help-hit { display: block; padding: 10px 12px; border-radius: 10px; text-decoration: none; color: var(--ink); border: 1px solid transparent; }
.help-hit:hover, .help-hit.is-selected { background: var(--brand-tint); border-color: var(--brand-soft); }
.help-hit-cat { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-faint); }
.help-hit-title { display: block; font-weight: 600; margin: 2px 0; }
.help-hit-snippet { display: block; font-size: 13px; color: var(--ink-soft); line-height: 1.5; }
.help mark { background: #fbe9a6; color: inherit; border-radius: 3px; padding: 0 1px; }

.help-toc { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; margin: 8px 0 14px; }
.help-toc-link { display: flex; align-items: center; gap: 10px; padding: 11px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); font-size: 14px; font-weight: 500; transition: border-color .15s; }
.help-toc-link:hover { border-color: var(--brand); }
.help-toc-link .ic { color: var(--brand); flex-shrink: 0; }
.help-toc-link span { flex: 1; min-width: 0; }
.help-toc-link b { font-size: 12px; color: var(--ink-faint); font-weight: 600; }
.help-tools { display: flex; justify-content: flex-end; gap: 4px; margin-bottom: 4px; }

.help-section { margin: 14px 0 26px; scroll-margin-top: 80px; }
.help-section > h2 { display: flex; align-items: center; gap: 8px; font-size: 18px; margin: 0 0 10px; }
.help-section > h2 .ic { color: var(--brand); }
.help-item { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 8px; scroll-margin-top: 80px; transition: border-color .15s, box-shadow .2s; }
.help-item[open] { border-color: var(--brand-line); }
.help-item.is-target { box-shadow: 0 0 0 3px var(--brand-soft); border-color: var(--brand); }
.help-item > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; font-weight: 600; border-radius: 12px; }
.help-item > summary::-webkit-details-marker { display: none; }
.help-item > summary:hover { color: var(--brand-deep); }
.help-chevron { flex-shrink: 0; color: var(--ink-faint); transition: transform .2s; }
.help-item[open] .help-chevron { transform: rotate(90deg); }
.help-body { padding: 0 16px 14px; color: var(--ink); line-height: 1.6; font-size: 14.5px; }
.help-body p { margin: 0 0 10px; }
.help-body ul, .help-body ol { margin: 0 0 10px; padding-left: 22px; }
.help-body li { margin: 4px 0; }
.help-body code { background: var(--bg); border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; font-size: 13px; overflow-wrap: anywhere; }
.help-path { display: inline-block; background: var(--brand-tint); color: var(--brand-deep); border-radius: 6px; padding: 0 7px; font-weight: 600; font-size: 13.5px; white-space: nowrap; }
.help-go { margin: 12px 0 0; }
.help-still { text-align: center; margin-top: 10px; }
.help-still .btn { margin-top: 10px; }
.help.is-searching .help-toc, .help.is-searching .help-tools { display: none; }
@media (max-width: 720px) {
  .help-hero { text-align: left; }
  .help-hero > p { margin-left: 0; }
  .help-popular { justify-content: flex-start; }
  .help-toc { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .help-toc-link { padding: 10px; font-size: 13px; }
  .help-path { white-space: normal; }
}

@media (max-width: 1020px) {
  .stats.n5, .stats.n6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sidebar-layout { grid-template-columns: minmax(0, 1fr); }
  .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 270px; z-index: 90; transform: translateX(-100%); transition: transform .2s; height: 100%; }
  .sidebar.open { transform: none; box-shadow: var(--shadow-lg); }
  .side-toggle { display: inline-flex; }
  .admin-content { padding: 18px 14px; }
}
@media (max-width: 960px) {
  .site-nav { position: fixed; left: 12px; right: 12px; top: 66px; flex-direction: column; align-items: stretch; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 10px; box-shadow: var(--shadow-lg);
    opacity: 0; transform: translateY(-8px) scale(.98); pointer-events: none; visibility: hidden; transition: opacity .18s, transform .18s, visibility 0s .18s; max-height: calc(100vh - 90px); overflow-y: auto; }
  .site-nav.open { opacity: 1; transform: none; pointer-events: auto; visibility: visible; transition: opacity .18s, transform .18s; }
  .site-nav > a { padding: 12px 14px; font-size: 15.5px; color: var(--ink); }
  .site-nav-mobile-actions { display: flex; flex-direction: column; gap: 8px; padding: 10px 4px 4px; border-top: 1px solid var(--line-soft); margin-top: 6px; }
  .nav-toggle { display: inline-block; }
  .site-foot-inner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-brand { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  body { font-size: 14px; }
  .site-header-inner { padding: 10px 14px; gap: 10px; }
  .site-header .brand-text .sub { display: none; }
  .legal { padding: 0 16px; }
  .legal-body { font-size: 15px; }
  .legal-dl { grid-template-columns: 1fr; gap: 2px; }
  .legal-dl dd { margin-bottom: 8px; }
  .billing-limits { grid-template-columns: minmax(0, 1fr); }
  .cookie-note { left: 10px; right: 10px; bottom: 10px; max-width: none; }
  .cols-2, .cols-3, .cols-4, .form-grid { grid-template-columns: minmax(0, 1fr); }
  .container { padding: 0 14px; margin-top: 18px; }
  .brand-text .sub { display: none; }
  .hide-mobile { display: none !important; }
  .card { padding: 18px 16px; }
  .stats, .stats[class] { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat { padding: 14px; }
  .stat .value { font-size: 23px; }
  .table th, .table td { padding: 9px 10px; }
  .page-head { align-items: flex-start; }
  .bar-row { grid-template-columns: 100px 1fr 50px; }
  .form-actions .btn { flex: 1 1 auto; }
  .recovery-codes { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* ------------------------------------------------------------- печать */
@media print {
  @page { margin: 8mm; }
  body { background: #fff; display: block; }
  .impersonation, .flash-stack, .site-footer, .no-print, .sidebar, .print-toolbar { display: none !important; }
  .container, .admin-content { margin: 0; padding: 0; max-width: none; }
  .card { box-shadow: none; border: 0; padding: 0; }
  .print-label { border-color: #ddd; }
  a { color: inherit; text-decoration: none; }
}

/* ------------------------------------------------------------- переключатель темы в шапке */
.theme-toggle { width: 33px; height: 33px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-soft);
  display: inline-grid; place-items: center; padding: 0; cursor: pointer; flex-shrink: 0; transition: color .15s, border-color .15s, background .15s; }
.theme-toggle:hover { color: var(--ink); border-color: var(--ink-faint); }
.theme-toggle .ic-sm { width: 16px; height: 16px; grid-area: 1 / 1; transition: transform .3s, opacity .2s; }
.theme-toggle .theme-ic-sun { opacity: 0; transform: rotate(-60deg) scale(.6); }
:root[data-mode="dark"] .theme-toggle .theme-ic-moon { opacity: 0; transform: rotate(60deg) scale(.6); }
:root[data-mode="dark"] .theme-toggle .theme-ic-sun { opacity: 1; transform: none; }

/* ==========================================================================
   Тёмная тема публичных страниц: главная, вход, регистрация, документы,
   страница QR-кода, ошибки. Кабинет и панель платформы — в console.css.
   Включается атрибутом data-mode="dark" на <html>; на печать не влияет.
   ========================================================================== */
@media screen {
  :root[data-mode="dark"] { color-scheme: dark; }
  :root[data-mode="dark"] body:not(.console) {
    --bg: #0a111e;
    --surface: #111a2b;
    --surface-2: #142035;
    --surface-3: #1a2640;
    --field: #0d1626;
    --ink: #e9eef7;
    --ink-2: #d0d9e7;
    --ink-soft: #9fadc2;
    --ink-faint: #6e7d96;
    --line: #223049;
    --line-soft: #19253b;
    --line-strong: #2c3c5a;

    --green: #34c38a; --green-deep: #62d7a7; --green-soft: rgba(52, 195, 138, .14);
    --amber: #eea544; --amber-soft: rgba(238, 165, 68, .14);
    --red: #ef6a5f;   --red-soft: rgba(239, 106, 95, .14);
    --blue: #5e98f6;  --blue-soft: rgba(94, 152, 246, .15);
    --violet: #a68df2; --violet-soft: rgba(166, 141, 242, .15);
    --gray-soft: rgba(150, 165, 192, .13);

    --brand-deep: color-mix(in srgb, var(--brand) 58%, #ffffff);
    --brand-soft: color-mix(in srgb, var(--brand) 20%, var(--surface));
    --brand-tint: color-mix(in srgb, var(--brand) 9%, var(--surface));
    --brand-line: color-mix(in srgb, var(--brand) 42%, var(--surface));

    --side: #060c17;
    --side-ink: #b3c0d4;
    --side-faint: #6c7b94;

    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
    --shadow-lg: 0 24px 60px -16px rgba(0, 0, 0, .75), 0 0 0 1px rgba(255, 255, 255, .04);
    --ring: 0 0 0 3px color-mix(in srgb, var(--brand) 34%, transparent);
    background: var(--bg); color: var(--ink);
  }
  :root[data-mode="dark"] body:not(.console) ::selection { background: color-mix(in srgb, var(--brand) 40%, transparent); }

  /* шапка, меню, подвал */
  :root[data-mode="dark"] .site-header.is-scrolled { background: color-mix(in srgb, var(--bg) 86%, transparent); }
  :root[data-mode="dark"] .site-nav > a:hover { background: color-mix(in srgb, var(--brand) 14%, transparent); }
  :root[data-mode="dark"] .site-foot { border-top: 1px solid var(--line-soft); }
  :root[data-mode="dark"] .skip-link, :root[data-mode="dark"] .legal-tabs a.active { color: var(--bg); }
  :root[data-mode="dark"] .dropdown-menu { background: var(--surface-2); border-color: var(--line-strong); }

  /* поля и кнопки */
  :root[data-mode="dark"] body:not(.console) input[type="text"], :root[data-mode="dark"] body:not(.console) input[type="email"],
  :root[data-mode="dark"] body:not(.console) input[type="password"], :root[data-mode="dark"] body:not(.console) input[type="number"],
  :root[data-mode="dark"] body:not(.console) input[type="date"], :root[data-mode="dark"] body:not(.console) input[type="search"],
  :root[data-mode="dark"] body:not(.console) input[type="tel"], :root[data-mode="dark"] body:not(.console) input[type="url"],
  :root[data-mode="dark"] body:not(.console) select, :root[data-mode="dark"] body:not(.console) textarea { background-color: var(--field); border-color: var(--line-strong); }
  :root[data-mode="dark"] body:not(.console) input:focus, :root[data-mode="dark"] body:not(.console) select:focus, :root[data-mode="dark"] body:not(.console) textarea:focus { border-color: var(--brand); }
  :root[data-mode="dark"] body:not(.console) input[disabled], :root[data-mode="dark"] body:not(.console) select[disabled], :root[data-mode="dark"] body:not(.console) textarea[disabled] { background-color: var(--surface-3); }
  :root[data-mode="dark"] body:not(.console) ::placeholder { color: #56647c; }
  :root[data-mode="dark"] body:not(.console) .help-search input, :root[data-mode="dark"] body:not(.console) .help-search input:focus { background: transparent; }
  :root[data-mode="dark"] body:not(.console) .btn-primary:hover { background: color-mix(in srgb, var(--brand) 86%, #ffffff); }
  :root[data-mode="dark"] body:not(.console) .btn-secondary { background: var(--surface-2); border-color: var(--line-strong); }
  :root[data-mode="dark"] body:not(.console) .btn-secondary:hover { background: var(--surface-3); border-color: #3a4c6e; }
  :root[data-mode="dark"] body:not(.console) .btn-ghost:hover { background: rgba(255, 255, 255, .06); color: var(--ink); }
  :root[data-mode="dark"] body:not(.console) .btn-danger { background: #d4493e; }
  :root[data-mode="dark"] body:not(.console) .btn-danger-outline { background: transparent; border-color: color-mix(in srgb, var(--red) 42%, var(--surface)); color: #ff9188; }
  :root[data-mode="dark"] body:not(.console) .btn-warning { color: #1f1606; }

  /* уведомления и статусы */
  :root[data-mode="dark"] body:not(.console) .alert-success { background: color-mix(in srgb, var(--green) 11%, var(--surface)); border-color: color-mix(in srgb, var(--green) 30%, var(--surface)); color: #9fe5c4; }
  :root[data-mode="dark"] body:not(.console) .alert-error { background: color-mix(in srgb, var(--red) 11%, var(--surface)); border-color: color-mix(in srgb, var(--red) 32%, var(--surface)); color: #ffb9b2; }
  :root[data-mode="dark"] body:not(.console) .alert-info { background: color-mix(in srgb, var(--blue) 11%, var(--surface)); border-color: color-mix(in srgb, var(--blue) 32%, var(--surface)); color: #b3cdff; }
  :root[data-mode="dark"] body:not(.console) .alert-warning { background: color-mix(in srgb, var(--amber) 11%, var(--surface)); border-color: color-mix(in srgb, var(--amber) 30%, var(--surface)); color: #f6cf95; }
  :root[data-mode="dark"] body:not(.console) .status-retired, :root[data-mode="dark"] body:not(.console) .badge.gray { color: #a8b4c7; }
  :root[data-mode="dark"] body:not(.console) .card.danger-zone { border-color: color-mix(in srgb, var(--red) 30%, var(--surface)); }
  :root[data-mode="dark"] body:not(.console) .auth-card { box-shadow: 0 18px 50px -20px rgba(0, 0, 0, .7); }
  :root[data-mode="dark"] body:not(.console) .help mark { background: color-mix(in srgb, var(--amber) 34%, transparent); }
  :root[data-mode="dark"] body:not(.console) .modal { background: rgba(3, 7, 14, .66); }
  :root[data-mode="dark"] body:not(.console) .side-backdrop { background: rgba(3, 7, 14, .6); }
  :root[data-mode="dark"] body:not(.console) .aura { opacity: .55; }
  :root[data-mode="dark"] body:not(.console) .error-page .code { color: var(--line-strong); }

  /* QR-коды и этикетки — всегда на белом */
  :root[data-mode="dark"] body:not(.console) .qr-item canvas, :root[data-mode="dark"] body:not(.console) .qr-item img { background: #fff; }

  /* плавная смена темы по кнопке */
  html.theme-switching body:not(.console), html.theme-switching body:not(.console) *, html.theme-switching body:not(.console) *::before, html.theme-switching body:not(.console) *::after {
    transition: background-color .22s ease, border-color .22s ease, color .22s ease, fill .22s ease, stroke .22s ease, box-shadow .22s ease !important; }
}
html.theme-switching .theme-toggle .ic-sm { transition: transform .3s, opacity .2s !important; }

/* ------------------------------------------------------------- телефоны: без самопроизвольного приближения
   iOS увеличивает страницу при нажатии на поле, если шрифт в нём мельче 16 px.
   На сенсорных экранах поля ввода — 16 px; масштабирование пальцами остаётся. */
@media (hover: none) and (pointer: coarse) {
  input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="date"],
  input[type="search"], input[type="tel"], input[type="url"], input:not([type]), select, textarea { font-size: 16px !important; }
  input.code-input[type], input.code-input { font-size: 22px !important; }
}
.print-label .pl-caption { font-size: calc(var(--label, 40mm) / 15); font-weight: 600; color: #24324b; line-height: 1.15; margin-top: .6mm; }

/* ------------------------------------------------------------- посылки: состояние и ввод кода (кабинет и публичная страница) */
.parcel-state { display: flex; gap: 12px; align-items: flex-start; margin-top: 16px; padding: 12px 14px; border-radius: 12px; font-size: 13.5px; line-height: 1.5; }
.parcel-state > .ic { width: 20px; height: 20px; flex-shrink: 0; margin-top: 1px; }
.parcel-state b { display: block; font-size: 14px; }
.parcel-state.wait { background: var(--blue-soft); color: var(--ink); }
.parcel-state.wait > .ic { color: var(--blue); }
.parcel-state.ok { background: var(--green-soft); color: var(--ink); }
.parcel-state.ok > .ic { color: var(--green); }
.parcel-state.off { background: var(--gray-soft); color: var(--ink); }
.parcel-state.off > .ic { color: var(--ink-soft); }
.parcel-state .small { color: var(--ink-soft); }
.parcel-public .org-name { font-family: var(--font-head); font-weight: 800; font-size: 18px; line-height: 1.2; }
.parcel-public .parcel-h1 { font-size: 22px; margin-top: 4px; }
.pin-form { margin-top: 6px; }
.pin-form label { margin-top: 14px; }
.pin-input { font-size: 34px !important; letter-spacing: .5em; text-indent: .5em; padding: 14px 12px !important; max-width: 260px; display: block; font-weight: 700; }
.pin-input::placeholder { letter-spacing: .3em; color: var(--line); }
.parcel-done { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 26px 12px 10px; }
.parcel-done-ic { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--green); color: #fff; margin-bottom: 6px;
  box-shadow: 0 0 0 8px var(--green-soft); }
.parcel-done-ic .ic { width: 30px; height: 30px; }
.parcel-done b { font-family: var(--font-head); font-size: 20px; }
.parcel-done span { color: var(--ink-soft); font-size: 14px; }
.parcel-done small { color: var(--ink-faint); font-size: 12.5px; max-width: 36ch; margin-top: 4px; }
.parcel-done.is-new .parcel-done-ic { animation: qm-pop-in .35s cubic-bezier(.2,.9,.3,1.3); }
@keyframes qm-pop-in { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .parcel-done.is-new .parcel-done-ic { animation: none; } }
@media (hover: none) and (pointer: coarse) { input.pin-input, input.pin-input[type] { font-size: 34px !important; } }

/* «Другие опции» в конце настроек: неприметная ссылка на отказ от подписки и удаление */
.settings-other-link { margin: 28px 0 8px; text-align: center; font-size: 13px; }
.settings-other-link a { color: var(--ink-faint); text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.settings-other-link a:hover { color: var(--ink-soft); text-decoration: underline; }
