:root{
  color-scheme: light;
  --bg:#E9EDF1; --frame:#DCE2E8;
  --surface:#FFFFFF; --surface-2:#F4F6F8; --surface-3:#EEF1F5;
  --ink:#141A22; --ink-2:#525C68; --muted:#8B95A1;
  --line:#E6EAEF; --line-2:#D6DCE3;
  --accent:#0E9F6E; --accent-press:#0B7E57; --accent-soft:#E4F5EE; --accent-ink:#0A5E45;
  --cta:#4F46E5; --cta-press:#4338CA; --cta-soft:#EEF2FF;
  --max:#12B36A; --max-soft:#E2F6EC;
  --warn:#B26B00; --warn-soft:#FBECD2;
  --danger:#D33F45; --danger-soft:#FBE4E5;
  --info:#2563EB; --info-soft:#E5EDFF;
  --support:#0D9488; --support-press:#0F766E;
  --radius:16px; --radius-sm:11px;
  --shadow-card: 0 1px 2px rgba(20,26,34,.05), 0 10px 30px rgba(20,26,34,.07);
  --shadow-pop: 0 -6px 16px rgba(20,26,34,.06), 0 -1px 0 rgba(20,26,34,.04);
  --font:"Golos Text", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
*{box-sizing:border-box}
html,body{margin:0}
body{
  background:var(--bg); color:var(--ink); font-family:var(--font);
  -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility;
  /* 100vh в мобильном Safari — высота БЕЗ учёта адресной строки (она то
     скрывается, то нет), из-за чего нижняя часть страницы (кнопки
     Далее/Акции) уезжала под неё. 100dvh — реальная видимая высота;
     100vh оставлен как фолбэк для браузеров без поддержки dvh. */
  min-height:100vh; min-height:100dvh; display:flex; align-items:center; justify-content:center;
}
@media (min-width:560px){ body{ padding:28px 16px } }

.phone{ width:100%; max-width:430px; min-height:100vh; min-height:100dvh; background:var(--surface);
  position:relative; display:flex; flex-direction:column; overflow:hidden; }
@media (min-width:560px){
  .phone{ min-height:auto; height:min(880px,94vh); border-radius:30px;
    box-shadow:var(--shadow-card), 0 0 0 10px var(--frame), 0 0 0 11px var(--line-2); }
}

/* Шапка */
.top{ padding:14px 18px 12px; background:var(--surface); position:sticky; top:0; z-index:5; flex:none; border-bottom:1px solid transparent; }
.brand{ display:flex; align-items:center; justify-content:space-between; gap:10px; }
.logo{ display:flex; align-items:center; gap:9px; font-weight:800; letter-spacing:-.01em; font-size:15px; }
.logo .mark{ width:25px; height:25px; border-radius:8px; background:var(--accent); display:grid; place-items:center; color:#fff; }
.logo .mark svg{ width:15px; height:15px; display:block }
/* Кнопка «Подключить Макс» (заглушка) — на каждом экране */
.max-chip{ display:inline-flex; align-items:center; gap:7px; font-family:var(--font); font-size:12.5px; font-weight:700;
  color:var(--max); background:var(--max-soft); border:1.5px solid #BFE9D2; border-radius:99px; padding:7px 12px; cursor:pointer; white-space:nowrap; }
.max-chip .m{ display:inline-grid; place-items:center; width:18px; height:18px; border-radius:5px; background:var(--max); color:#fff; font-size:10px; font-weight:800; letter-spacing:-.03em }
.hcluster{ display:flex; align-items:center; gap:8px }
.lang-chip{ display:inline-flex; align-items:center; gap:5px; font-family:var(--font); background:var(--surface-2); border:1.5px solid var(--line); border-radius:99px; padding:6px 8px; cursor:pointer; }
.lang-chip .fl{ font-size:16px; line-height:1 }
.lang-chip svg{ width:12px; height:12px; color:var(--muted) }
@media (max-width:392px){ .logo #logoText{ display:none } .max-chip .mct{ display:none } }
.logo #logoText{ max-width:150px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap }
/* ---- Раскрывающееся меню в шапке (MAX + звонок) ---- */
.chip-menu-wrap{ position:relative }
.chip-pulse{ animation:fabbounce 4.5s ease-in-out infinite; }
@media (prefers-reduced-motion:reduce){ .chip-pulse{ animation:none } }
.chip-dropdown{ position:absolute; top:calc(100% + 8px); right:0; z-index:20; background:#fff; border:1px solid var(--line); border-radius:14px; box-shadow:0 14px 34px rgba(16,24,28,.16); padding:6px; min-width:220px; }
.chip-dd-item{ display:flex; align-items:center; gap:10px; width:100%; padding:9px 10px; border-radius:10px; border:none; background:none; cursor:pointer; text-align:left; text-decoration:none; color:inherit; font-family:var(--font); }
.chip-dd-item:hover{ background:var(--surface-2) }
.chip-dd-item .si{ width:30px; height:30px; border-radius:9px; display:grid; place-items:center; flex:none; background:var(--max-soft); color:var(--max); font-size:15px }
.chip-dd-item .st{ display:flex; flex-direction:column; font-size:13px }
.chip-dd-item .st b{ font-size:13.5px }
.chip-dd-item .st span{ color:var(--ink-2); font-size:11.5px }
.chip-dd-item .mm{ font-size:9px; font-weight:800; letter-spacing:-.02em }
/* ---- Реквизиты компании под кнопкой «Авторизация» ---- */
.company-req{ margin-top:18px; padding:12px 14px; border-radius:12px; background:var(--surface-2); text-align:center }
.company-req .cr-name{ font-weight:700; font-size:13px; color:var(--ink); margin-bottom:3px }
.company-req .cr-line{ font-size:11.5px; color:var(--ink-2); line-height:1.5 }
/* ---- Блоки для лендинга (конструктор в реквизитах компании) ---- */
.landing-blocks{ margin-top:18px; display:flex; flex-direction:column; gap:16px }
.landing-block{ border-radius:12px; background:var(--surface-2); border:1.5px solid var(--line); overflow:hidden }
.landing-block .lb-title{ font-weight:700; font-size:14px; color:var(--ink); text-align:center; padding:13px 14px 0 }
.landing-block .lb-image{ display:block; width:100%; max-height:180px; object-fit:cover; margin-top:10px }
.landing-block .lb-content{ font-size:12.5px; color:var(--ink-2); line-height:1.55; padding:10px 14px 13px; white-space:pre-wrap }
.landing-block .lb-title:last-child{ padding-bottom:13px }
.landing-block .lb-title + .lb-content{ padding-top:2px }
.lang-opt{ display:flex; align-items:center; gap:13px; width:100%; background:var(--surface-2); border:1.5px solid var(--line); border-radius:13px; padding:13px 15px; cursor:pointer; font-family:var(--font); margin-bottom:9px; text-align:left }
.lang-opt.sel{ border-color:var(--accent); background:var(--accent-soft) }
.lang-opt .fl{ font-size:25px; line-height:1 } .lang-opt .ln{ flex:1; font-size:15px; font-weight:600 }
.lang-opt .tick{ color:var(--accent); opacity:0 } .lang-opt.sel .tick{ opacity:1 } .lang-opt .tick svg{ width:18px; height:18px }
.progress-row{ margin-top:12px }
.step-count{ font-size:12px; color:var(--muted); font-weight:600; font-variant-numeric:tabular-nums; margin-bottom:7px; }
.bar{ height:6px; border-radius:99px; background:var(--surface-3); overflow:hidden }
.bar > i{ display:block; height:100%; width:8%; border-radius:99px; background:linear-gradient(90deg,var(--accent),#22B98A); transition:width .45s cubic-bezier(.2,.7,.2,1); }

.body{ flex:1 1 auto; overflow-y:auto; padding:14px 18px 18px; -webkit-overflow-scrolling:touch; }
.step{ animation:slidein .32s cubic-bezier(.2,.7,.2,1) both; }
@keyframes slidein{ from{ opacity:0; transform:translateY(10px) } to{ opacity:1; transform:none } }
@media (prefers-reduced-motion:reduce){ .step{ animation:none } .bar>i,.sheet,.sheet-wrap{ transition:none!important } }

.eyebrow{ text-transform:uppercase; letter-spacing:.07em; font-size:11px; font-weight:700; color:var(--accent); margin:2px 0 8px; }
.eyebrow-note{ text-transform:none; letter-spacing:0; font-weight:500; color:var(--muted); font-size:12px; margin-left:2px; }
h1.q{ font-size:23px; line-height:1.18; letter-spacing:-.02em; font-weight:700; margin:0 0 8px; text-wrap:balance; }
.sub{ font-size:14px; line-height:1.5; color:var(--ink-2); margin:0 0 18px; }
.sub svg{ width:16px; height:16px; vertical-align:-3px; margin-right:2px }
/* Небольшая красная пометка обязательности рядом с лейблом поля (тот же
   цвет, что у "Обязательно" на шаге документов) — чтобы было явно видно,
   что поле нужно заполнить, прежде чем разблокируется «Далее». */
.req-mark{ color:var(--danger); font-weight:600; font-size:11px; text-transform:uppercase; letter-spacing:.03em; margin-left:4px; }
/* Разделитель между смысловыми блоками одного шага (напр. «Регион» и
   «Специализация»), чтобы они не сливались визуально в один блок. */
.step-divider{ border:none; border-top:1px solid var(--line); margin:24px 0 18px; }

.field{ margin-bottom:15px }
.field > label{ display:block; font-size:13px; font-weight:600; color:var(--ink-2); margin:0 0 7px; }
.input{ width:100%; font-family:var(--font); font-size:17px; color:var(--ink); background:var(--surface-2);
  border:1.5px solid var(--line); border-radius:var(--radius-sm); padding:14px 15px; outline:none; transition:.15s; }
.input::placeholder{ color:var(--muted) }
.input:focus{ border-color:var(--accent); background:var(--surface); box-shadow:0 0 0 4px var(--accent-soft); }
.input.big{ font-size:19px; font-variant-numeric:tabular-nums; }
.two{ display:flex; gap:10px } .two > *{ flex:1 }

/* Floating label (лейбл внутри поля, как в pixelcave Codebase Floating Labels) —
   поле чуть компактнее обычного .field: лейбл не занимает отдельную строку сверху. */
.field-floating{ position:relative; margin-bottom:15px }
.field-floating .input{ height:50px; padding:19px 15px 5px; font-size:15.5px; }
.field-floating label{ position:absolute; left:15px; top:50%; transform:translateY(-50%);
  font-size:15px; color:var(--muted); pointer-events:none; transition:.15s ease; transform-origin:left top; }
.field-floating .input:focus + label,
.field-floating .input:not(:placeholder-shown) + label{ top:9px; transform:translateY(0) scale(.72); color:var(--ink-2); font-weight:600; }

.opt-list{ display:flex; flex-direction:column; gap:10px }
.opt{ display:flex; align-items:center; gap:13px; text-align:left; width:100%; background:var(--surface);
  border:1.5px solid var(--line); border-radius:var(--radius); padding:14px 15px; cursor:pointer; font-family:var(--font); transition:.15s; }
.opt:active{ transform:scale(.99) }
.opt.sel{ border-color:var(--accent); background:var(--accent-soft) }
.opt .ic{ width:40px; height:40px; border-radius:11px; flex:none; display:grid; place-items:center; background:var(--surface-3); color:var(--accent); }
.opt.sel .ic{ background:#fff }
.opt .ic svg{ width:21px; height:21px }
.opt .tt{ flex:1; min-width:0 }
.opt .tt b{ display:block; font-size:15px; font-weight:600; color:var(--ink) }
.opt .tt span{ display:block; font-size:12.5px; color:var(--muted); margin-top:2px }
.opt .tick{ width:22px; height:22px; border-radius:50%; border:2px solid var(--line-2); flex:none; display:grid; place-items:center; transition:.15s }
.opt.sel .tick{ background:var(--accent); border-color:var(--accent) }
.opt .tick svg{ width:13px; height:13px; color:#fff; opacity:0; transition:.15s }
.opt.sel .tick svg{ opacity:1 }

.search{ position:relative; margin-bottom:12px }
.search .input{ padding-left:42px }
.search svg{ position:absolute; left:14px; top:50%; transform:translateY(-50%); width:18px; height:18px; color:var(--muted) }
#clist{ max-height:46vh; overflow-y:auto; overflow-x:hidden; -webkit-overflow-scrolling:touch; padding:2px 2px 4px; margin:0 -2px; }

.otp{ display:flex; gap:10px; justify-content:space-between; margin:6px 0 16px }
.otp input{ width:100%; aspect-ratio:1/1.12; text-align:center; font-size:25px; font-weight:700; font-variant-numeric:tabular-nums;
  background:var(--surface-2); border:1.5px solid var(--line); border-radius:13px; outline:none; color:var(--ink); transition:.15s; }
.otp input:focus{ border-color:var(--accent); background:#fff; box-shadow:0 0 0 4px var(--accent-soft) }
.otp input.filled{ border-color:var(--accent); background:#fff }
.resend{ font-size:13.5px; color:var(--ink-2); text-align:center }
.resend button{ background:none; border:none; color:var(--accent); font-weight:600; font-family:var(--font); font-size:13.5px; cursor:pointer; padding:0 }
.resend button:disabled{ color:var(--muted); cursor:default }
.hint{ background:var(--accent-soft); color:var(--accent-ink); border-radius:11px; padding:11px 13px; font-size:13px; line-height:1.45; margin-bottom:16px; display:flex; gap:9px; align-items:flex-start }

/* Документы (фото) */
.doc{ display:flex; align-items:center; gap:13px; background:var(--surface); border:1.5px solid var(--line); border-radius:var(--radius); padding:12px 13px; }
.doc + .doc{ margin-top:10px }
.doc.done{ border-color:var(--accent) }
.doc .thumb{ width:50px; height:50px; border-radius:11px; flex:none; overflow:hidden; position:relative; background:var(--surface-3); display:grid; place-items:center; color:var(--muted) }
.doc .thumb img{ width:100%; height:100%; object-fit:cover; display:block }
.doc .thumb svg{ width:22px; height:22px }
.doc .meta{ flex:1; min-width:0 }
.doc .meta b{ display:block; font-size:14px; font-weight:600; line-height:1.25 }
.doc .meta span{ display:block; font-size:12px; color:var(--muted); margin-top:2px }
.doc .req{ color:var(--danger) }
.doc-status{ display:flex; align-items:center; gap:4px; font-size:11.5px; font-weight:600; margin-top:4px }
.doc-status svg{ width:12px; height:12px; flex:none }
.doc-status--pending{ color:var(--muted) }
.doc-status--ok{ color:var(--accent) }
.doc-status--error{ color:var(--danger) }
.doc .act{ flex:none; display:flex; flex-direction:column; gap:5px; align-items:flex-end }
.doc.busy{ opacity:.6; pointer-events:none }
.doc.busy .thumb svg{ animation:docspin 1s linear infinite }
@keyframes docspin{ to{ transform:rotate(360deg) } }
.mini{ font-family:var(--font); font-size:12.5px; font-weight:600; border:none; cursor:pointer; border-radius:9px; padding:8px 11px; background:var(--accent); color:#fff; display:inline-flex; align-items:center; gap:6px; white-space:nowrap; }
.mini.ghost{ background:var(--surface-3); color:var(--ink-2) }
.mini svg{ width:14px; height:14px }
.badge-ok{ position:absolute; right:-3px; bottom:-3px; width:20px; height:20px; border-radius:50%; background:var(--accent); border:2px solid #fff; display:grid; place-items:center }
.badge-ok svg{ width:11px; height:11px; color:#fff }
/* ---- Документы с document_types.multiple=1 (чеки об оплате патента) —
   форма добавления всегда открыта, вместо одного слота "переснять" ---- */
.doc.doc-multi{ flex-direction:column; align-items:stretch; gap:10px }
.doc-multi-head b{ display:block; font-size:14px; font-weight:600; line-height:1.25 }
.doc-multi-head span{ display:block; font-size:12px; color:var(--muted); margin-top:2px }
.doc-multi-grid{ display:flex; flex-wrap:wrap; gap:8px }
.doc-thumb-mini{ width:52px; height:52px; border-radius:10px; overflow:hidden; position:relative; background:var(--surface-3); flex:none }
.doc-thumb-mini img{ width:100%; height:100%; object-fit:cover; display:block }
.doc-thumb-mini .badge-ok{ width:16px; height:16px; right:-2px; bottom:-2px }
.doc-thumb-mini .badge-ok svg{ width:9px; height:9px }
.doc-multi .act{ flex-direction:row; align-items:stretch; width:100% }
.doc-multi .act .mini{ flex:1; justify-content:center }
.note{ font-size:12.5px; color:var(--ink-2); background:var(--surface-2); border-radius:11px; padding:11px 13px; margin:0 0 16px; line-height:1.45 }

.consent{ display:flex; gap:11px; align-items:flex-start; margin-top:4px; cursor:pointer; padding:2px 0 }
.consent input{ position:absolute; opacity:0; width:0; height:0 }
.consent .box{ width:22px; height:22px; border-radius:7px; border:2px solid var(--line-2); flex:none; margin-top:1px; display:grid; place-items:center; transition:.15s; background:var(--surface) }
.consent .box svg{ width:13px; height:13px; color:#fff; opacity:0; transition:.15s }
.consent input:checked + .box{ background:var(--accent); border-color:var(--accent) }
.consent input:checked + .box svg{ opacity:1 }
.consent .txt{ font-size:12.5px; color:var(--ink-2); line-height:1.5 }
.consent .txt a{ color:var(--accent); text-decoration:none; font-weight:600 }

.summary{ background:var(--surface-2); border-radius:var(--radius); padding:4px 15px; margin:0 0 6px }
.summary .row{ display:flex; justify-content:space-between; gap:14px; padding:11px 0; border-bottom:1px solid var(--line) }
.summary .row:last-child{ border-bottom:none }
.summary .row .k{ font-size:13px; color:var(--muted) } .summary .row .v{ font-size:13.5px; font-weight:600; text-align:right }

.err{ color:var(--danger); font-size:12.5px; margin-top:7px; display:none; align-items:center; gap:6px }
.err.show{ display:flex } .err svg{ width:14px; height:14px; flex:none }

/* Нижняя навигация */
.nav{ flex:none; display:flex; gap:11px; padding:13px 18px calc(13px + env(safe-area-inset-bottom));
  background:var(--surface); border-top:1px solid var(--line); position:sticky; bottom:0; z-index:5; }
.btn{ font-family:var(--font); font-size:16px; font-weight:600; border-radius:13px; padding:15px 18px; border:1.5px solid transparent; cursor:pointer; transition:.1s; display:flex; align-items:center; justify-content:center; gap:8px; }
.btn:active{ transform:scale(.98) }
.btn-primary{ flex:1; background:var(--cta); color:#fff; font-size:17.5px; font-weight:700; padding:18px 18px; box-shadow:0 8px 20px rgba(79,70,229,.32) } .btn-primary:hover{ background:var(--cta-press) }
.btn-primary:disabled{ background:var(--line-2); color:#fff; cursor:default; box-shadow:none }
.btn-back{ background:var(--surface-2); color:var(--ink-2); border-color:var(--line); flex:none; width:54px; padding:0 }
.btn-back.btn-back--wide{ flex:1; width:auto; padding:15px 18px }
.btn-support{ background:var(--support); color:#fff; flex:none; width:54px; padding:0 }
.btn-support:hover{ background:var(--support-press) }
.btn svg{ width:18px; height:18px }
.btn-ghost-later{ background:var(--surface-2); color:var(--ink-2); border-color:var(--line); flex:1 }

/* Готово */
.done-screen{ text-align:center; padding:36px 22px 8px; display:flex; flex-direction:column; align-items:center }
.done-badge{ width:92px; height:92px; border-radius:50%; background:var(--accent-soft); display:grid; place-items:center; margin-bottom:20px; animation:pop .5s cubic-bezier(.2,.9,.3,1.2) both }
@keyframes pop{ from{ transform:scale(.5); opacity:0 } to{ transform:scale(1); opacity:1 } }
.done-badge svg{ width:46px; height:46px; color:var(--accent) }
.done-screen h1{ font-size:24px; letter-spacing:-.02em; margin:0 0 10px }
.done-screen p{ font-size:14px; color:var(--ink-2); line-height:1.55; margin:0 0 8px; max-width:34ch }

.pill{ display:inline-flex; align-items:center; gap:6px; background:var(--accent-soft); color:var(--accent-ink); font-size:12px; font-weight:600; padding:5px 10px; border-radius:99px; margin-bottom:14px }
.pill svg{ width:13px; height:13px }

/* ===== Кабинет / На подпись ===== */
.cab-head{ margin:2px 0 16px }
.cab-head h1{ font-size:22px; letter-spacing:-.02em; margin:0 0 4px; display:flex; align-items:center; gap:6px } .cab-head p{ font-size:13.5px; color:var(--ink-2); margin:0 }
.cab-head .menu-ic{ width:18px; height:18px; flex:none; color:var(--muted) }
button.cab-head{ all:unset; display:block; width:100%; box-sizing:border-box; text-align:left; cursor:pointer; margin:2px 0 16px; padding:14px 16px; border-radius:16px; background:var(--surface-2); border:1.5px solid var(--line); font-family:var(--font); -webkit-tap-highlight-color:transparent }
button.cab-head:active{ transform:scale(.99); background:var(--surface-3,var(--surface-2)) }
.signall{ background:linear-gradient(135deg,#0E9F6E,#12B36A); color:#fff; border-radius:14px; padding:11px 12px; margin-bottom:14px; box-shadow:0 6px 16px rgba(14,159,110,.24); display:flex; align-items:center; gap:11px }
.signall .txt{ flex:1; min-width:0 }
.signall .t{ font-size:13.5px; font-weight:700; margin-bottom:1px } .signall .s{ font-size:11px; opacity:.92; line-height:1.35 }
.signall .t svg{ width:16px; height:16px; vertical-align:-3px; margin-right:2px }
.signall button{ flex:none; background:#fff; color:var(--cta-press); border:none; border-radius:10px; padding:11px 15px; font-family:var(--font); font-size:14px; font-weight:800; cursor:pointer; display:flex; align-items:center; gap:6px; white-space:nowrap }
.signall.empty{ background:var(--surface-2); box-shadow:none; color:var(--ink-2) }
.signall.empty .t{ color:var(--ink) }
.sec-title{ font-size:12.5px; font-weight:700; color:var(--muted); text-transform:uppercase; letter-spacing:.06em; margin:20px 2px 10px }
.sign-card{ background:var(--surface); border:1.5px solid var(--line); border-radius:var(--radius); padding:14px; }
.sign-card + .sign-card{ margin-top:10px }
.sign-card .r1{ display:flex; align-items:flex-start; gap:12px }
.sign-card .di{ width:42px; height:42px; border-radius:11px; flex:none; display:grid; place-items:center; background:var(--info-soft); color:var(--info) }
.sign-card .di svg{ width:22px; height:22px }
.sign-card .dt{ flex:1; min-width:0 }
.sign-card .dt b{ display:block; font-size:15px; font-weight:600; line-height:1.25 }
.sign-card .dt span{ display:block; font-size:12.5px; color:var(--muted); margin-top:2px }
.stat{ display:inline-flex; align-items:center; gap:5px; font-size:11.5px; font-weight:600; padding:4px 9px; border-radius:99px; margin-top:9px }
.stat.wait{ background:var(--warn-soft); color:var(--warn) }
.stat.me{ background:var(--info-soft); color:var(--info) }
.stat.both{ background:var(--accent-soft); color:var(--accent-ink) }
.stat.auto{ background:var(--surface-3); color:var(--ink-2) }
.stat svg{ width:12px; height:12px }
.sign-actions{ display:flex; gap:9px; margin-top:12px }
.sign-actions .read{ flex:none; background:var(--surface-2); color:var(--ink-2); border:1.5px solid var(--line); border-radius:11px; padding:11px 13px; font-family:var(--font); font-size:13px; font-weight:600; cursor:pointer; display:inline-flex; align-items:center; gap:6px }
.sign-actions .read svg{ width:15px; height:15px }
.sign-actions .sign{ flex:1; background:var(--cta); color:#fff; border:none; border-radius:12px; padding:14px 13px; font-family:var(--font); font-size:15.5px; font-weight:700; cursor:pointer; display:inline-flex; align-items:center; justify-content:center; gap:7px; box-shadow:0 6px 14px rgba(79,70,229,.26) }
.sign-actions .sign svg{ width:16px; height:16px }
.sign-card.done{ border-color:var(--accent-soft) } .sign-card.done .di{ background:var(--accent-soft); color:var(--accent) }
.hist{ display:flex; align-items:center; gap:11px; padding:11px 2px; border-bottom:1px solid var(--line) }
.hist svg{ width:18px; height:18px; color:var(--accent); flex:none }
.hist b{ font-size:13.5px; font-weight:600 } .hist span{ font-size:12px; color:var(--muted) }
.hist .info{ flex:1; min-width:0 }
.hist-dl{ flex:none; display:grid; place-items:center; width:32px; height:32px; border-radius:9px; background:var(--surface-2); color:var(--ink-2); text-decoration:none }
.hist-dl svg{ color:var(--ink-2) }
.cab-max{ margin:18px 0 6px; background:var(--max-soft); border:1.5px solid #BFE9D2; border-radius:var(--radius); padding:14px; display:flex; align-items:center; gap:12px }
.cab-max .m{ width:38px;height:38px;border-radius:10px;background:var(--max);color:#fff;display:grid;place-items:center;font-weight:800;flex:none }
.cab-max .t{ flex:1 } .cab-max .t b{ display:block; font-size:14px } .cab-max .t span{ font-size:12px; color:var(--ink-2) }
.cab-max button{ background:var(--max); color:#fff; border:none; border-radius:10px; padding:9px 12px; font-family:var(--font); font-weight:700; font-size:12.5px; cursor:pointer; flex:none }

/* ===== Bottom sheet ===== */
.sheet-wrap{ position:absolute; inset:0; z-index:40; display:none; }
.sheet-wrap.open{ display:block }
.sheet-wrap-2{ z-index:50 }
.sheet-bg{ position:absolute; inset:0; background:rgba(20,26,34,.42); opacity:0; transition:opacity .28s; }
.sheet-wrap.open .sheet-bg{ opacity:1 }
.sheet{ position:absolute; left:0; right:0; bottom:0; background:var(--surface); border-radius:22px 22px 0 0; padding:8px 20px calc(22px + env(safe-area-inset-bottom)); box-shadow:var(--shadow-pop); transform:translateY(100%); transition:transform .3s cubic-bezier(.2,.8,.2,1); max-height:88%; overflow-y:auto; }
.sheet-wrap.open .sheet{ transform:none }
.sheet.sheet--half{ height:52%; max-height:52%; }
.grab{ width:38px; height:4px; border-radius:99px; background:var(--line-2); margin:6px auto 14px }
.sheet h2{ font-size:19px; letter-spacing:-.01em; margin:0 0 6px } .sheet .sh-sub{ font-size:13.5px; color:var(--ink-2); margin:0 0 18px; line-height:1.5 }
.sheet-opt{ display:flex; align-items:center; gap:13px; width:100%; background:var(--surface-2); border:1.5px solid var(--line); border-radius:14px; padding:15px; cursor:pointer; font-family:var(--font); margin-bottom:11px; text-align:left }
.sheet-opt:active{ transform:scale(.99) }
.sheet-opt .si{ width:44px; height:44px; border-radius:12px; flex:none; display:grid; place-items:center }
.sheet-opt.sms .si{ background:var(--info-soft); color:var(--info) } .sheet-opt.max .si{ background:var(--max-soft); color:var(--max) }
.sheet-opt .si svg{ width:22px; height:22px } .sheet-opt .si .mm{ font-weight:800; font-size:13px }
.sheet-opt .st{ flex:1 } .sheet-opt .st b{ display:block; font-size:15px; font-weight:600 } .sheet-opt .st span{ display:block; font-size:12px; color:var(--muted); margin-top:2px }
.sheet-opt .go{ color:var(--muted) } .sheet-opt .go svg{ width:18px; height:18px }
a.sheet-opt{ color:inherit; text-decoration:none }
.sheet-opt.danger .si{ background:var(--danger-soft,#fde8e8); color:var(--danger,#e5484d) }
.sheet-opt.danger .st b{ color:var(--danger) }
.sheet .doc-preview{ background:var(--surface-2); border:1.5px solid var(--line); border-radius:14px; padding:18px; min-height:180px; font-size:13px; color:var(--ink-2); line-height:1.6 }
.sheet .doc-preview h4{ margin:0 0 10px; color:var(--ink); font-size:15px }
.sheet .doc-preview h5,.sheet .doc-preview h6{ margin:16px 0 8px; color:var(--ink); font-size:14px }
.sheet .doc-preview .table-responsive{ overflow-x:auto; margin:12px 0; -webkit-overflow-scrolling:touch }
.sheet .doc-preview table{ border-collapse:collapse; width:100%; min-width:480px; font-size:12.5px }
.sheet .doc-preview table th,.sheet .doc-preview table td{ border:1px solid var(--line-2); padding:6px 9px; text-align:left; vertical-align:top }
.sheet .doc-preview table th{ background:var(--surface-3); font-weight:700 }
.sheet-btn{ width:100%; background:var(--cta); color:#fff; border:none; border-radius:13px; padding:17px; font-family:var(--font); font-size:17px; font-weight:700; cursor:pointer; margin-top:6px; box-shadow:0 8px 20px rgba(79,70,229,.3) }
.sheet-btn:disabled{ background:var(--line-2) }
.sheet-btn svg{ width:18px; height:18px; vertical-align:-4px; margin-right:2px }
.sheet-actions-row{ display:flex; gap:8px; align-items:stretch; }
.sheet-actions-row .sheet-btn{ width:auto; margin-top:6px; }
.sheet-actions-row .sheet-btn--wide{ flex:2; }
.sheet-actions-row .sheet-btn--sm{ flex:1; background:var(--surface-2); color:var(--ink-2); box-shadow:none; font-size:13px; padding:10px 8px; border:1.5px solid var(--line); }

/* ---- Предупреждение о дубле паспорта: текст + 2 кнопки ---- */
.hint.hint-col{ flex-direction:column; align-items:stretch; gap:10px; }
.hint-col .hint-top{ display:flex; gap:9px; align-items:flex-start; }
.hint-col .warn-actions{ display:flex; gap:8px; }
.hint-col .warn-btn{ flex:1; display:flex; align-items:center; justify-content:center; gap:6px; text-align:center; font-family:var(--font); font-size:12.5px; font-weight:700; border-radius:10px; padding:10px 8px; cursor:pointer; text-decoration:none; line-height:1.25; }
.hint-col .warn-btn.call{ background:var(--danger); color:#fff; border:none; }
.hint-col .warn-btn.max{ background:#fff; color:var(--danger); border:1.5px solid var(--danger); }
.hint-col .warn-btn svg{ width:15px; height:15px; flex:none; }
.toast{ position:absolute; left:50%; bottom:84px; transform:translateX(-50%) translateY(20px); z-index:60; background:var(--ink); color:#fff; font-size:13.5px; font-weight:500; padding:12px 18px; border-radius:12px; box-shadow:0 10px 30px rgba(0,0,0,.25); opacity:0; transition:.3s; display:flex; align-items:center; gap:9px; max-width:88%; }
.toast.show{ opacity:1; transform:translateX(-50%) translateY(0) }
.toast svg{ width:18px; height:18px; color:#4ADE80; flex:none }
.fab-support{ position:absolute; right:15px; bottom:86px; z-index:35; display:flex; align-items:center; gap:8px; background:var(--support); color:#fff; border:none; border-radius:99px; padding:12px 16px 12px 13px; font-family:var(--font); font-size:14px; font-weight:700; cursor:pointer; box-shadow:0 10px 24px rgba(13,148,136,.42); }
.fab-support .fi{ position:relative; display:grid; place-items:center; width:23px; height:23px }
.fab-support svg{ width:22px; height:22px }
.fab-support .dot{ position:absolute; top:-2px; right:-2px; width:9px; height:9px; border-radius:50%; background:#3DDC84; border:2px solid var(--support) }
.fab-support::after{ content:""; position:absolute; inset:0; border-radius:99px; animation:fabpulse 2.2s ease-out infinite; pointer-events:none }
@keyframes fabpulse{ 0%{ box-shadow:0 0 0 0 rgba(13,148,136,.45) } 70%{ box-shadow:0 0 0 15px rgba(13,148,136,0) } 100%{ box-shadow:0 0 0 0 rgba(13,148,136,0) } }
@media (prefers-reduced-motion:reduce){ .fab-support::after{ animation:none } }
/* Раз в ~4.5с — короткий двойной подскок кнопки «Поддержка» в нав-баре
   (нижний правый угол экрана), чтобы привлечь к ней внимание. */
.btn-support{ animation:fabbounce 4.5s ease-in-out infinite; }
@keyframes fabbounce{ 0%,72%,100%{ transform:translateY(0) } 78%{ transform:translateY(-9px) } 84%{ transform:translateY(0) } 90%{ transform:translateY(-4px) } 96%{ transform:translateY(0) } }
@media (prefers-reduced-motion:reduce){ .btn-support{ animation:none } }

/* Плавающая кнопка акции (админка promo_actions.php → is_floating_button) —
   видна только в личном кабинете (fab-support там скрыт панелью Акции/Поддержка,
   поэтому тот же правый нижний угол свободен). */
.fab-promo{ position:absolute; right:15px; bottom:86px; z-index:35; display:flex; align-items:center; gap:8px;
  background:var(--cta); color:#fff; border:none; border-radius:99px; padding:12px 18px 12px 14px;
  font-family:var(--font); font-size:14px; font-weight:700; cursor:pointer; box-shadow:0 10px 24px rgba(79,70,229,.42);
  max-width:calc(100% - 30px); animation:fabbounce 4.5s ease-in-out infinite; }
.fab-promo svg{ width:20px; height:20px; flex:none }
@media (prefers-reduced-motion:reduce){ .fab-promo{ animation:none } }
.fab-promo .fp-title{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap }

/* ---- Select2 — под стиль полей приложения ---- */
.select2-container--default .select2-selection--single{ height:auto; background:var(--surface-2); border:1.5px solid var(--line); border-radius:var(--radius-sm); padding:14px 15px; font-family:var(--font); }
.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--single{ border-color:var(--accent); background:var(--surface); box-shadow:0 0 0 4px var(--accent-soft); }
.select2-container--default .select2-selection--single .select2-selection__rendered{ padding:0; line-height:1.3; font-size:17px; color:var(--ink); }
.select2-container--default .select2-selection--single .select2-selection__placeholder{ color:var(--muted); }
.select2-container--default .select2-selection--single .select2-selection__arrow{ height:100%; top:0; right:10px; }
.select2-dropdown{ border:1.5px solid var(--line); border-radius:var(--radius-sm); font-family:var(--font); overflow:hidden; }
.select2-search--dropdown{ padding:8px; }
.select2-search--dropdown .select2-search__field{ border:1.5px solid var(--line); border-radius:9px; padding:9px 11px; font-family:var(--font); outline:none; }
.select2-results__option{ padding:10px 12px; font-size:15px; }
.select2-container--default .select2-results__option--highlighted[aria-selected]{ background:var(--accent); color:#fff; }
.select2-container--default .select2-results__option[aria-selected=true]{ background:var(--accent-soft); color:var(--accent-ink); }
