/* Стиль ТЕК-9: тёпло-серый фон, белые карточки, тёмная шапка, ярко-красный акцент в --red */
:root {
  --red: #e10600; --red-ink: #ffffff;
  --dark: #1a1516; --bg: #efedeb; --card: #ffffff; --text: #1a1516; --muted: #6b6264; --line: #e4dfdd;
  --shadow: 0 1px 2px rgba(26,21,22,.06), 0 4px 14px rgba(26,21,22,.06);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --dark: #0a0a0a; --bg: #121110; --card: #1d1c1b; --text: #f1efed; --muted: #a29e99; --line: #34312e; --shadow: none; color-scheme: dark; }
}
:root[data-theme="dark"] { --dark: #0a0a0a; --bg: #121110; --card: #1d1c1b; --text: #f1efed; --muted: #a29e99; --line: #34312e; --shadow: none; color-scheme: dark; }
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font: 16px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; -webkit-text-size-adjust: 100%;
  min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }

.top { position: relative; background: var(--dark); padding: 22px 16px; padding-top: max(22px, env(safe-area-inset-top)); display: flex; justify-content: center; }
.logo { height: 46px; width: auto; display: block; }
.logo-txt { font-weight: 900; font-size: 30px; letter-spacing: .5px; color: #fff; }
.logo-txt b { color: var(--red); }

main { flex: 1; width: 100%; max-width: 520px; margin: 0 auto; padding: 28px 16px 16px; }
h1 { font-size: 20px; margin: 0 0 16px; text-align: center; font-weight: 700; }
.choices { display: grid; gap: 14px; }
.choice { display: flex; align-items: center; gap: 16px; padding: 20px 18px; min-height: 96px; border-radius: 18px; text-decoration: none;
  background: var(--card); color: var(--text); border: 1px solid var(--line); box-shadow: var(--shadow);
  transition: transform .08s ease, filter .15s ease; -webkit-tap-highlight-color: transparent; }
.choice:active { transform: scale(.985); }
.choice:hover { filter: brightness(.97); }
.choice:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
.choice.primary { background: var(--red); color: var(--red-ink); border-color: var(--red); }
.ico { width: 52px; height: 52px; flex: none; border-radius: 14px; display: grid; place-items: center; background: var(--dark); }
.choice.primary .ico { background: rgba(255,255,255,.18); }
.ico svg { width: 28px; height: 28px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.txt b { font-size: 22px; line-height: 1.15; }
.txt small { font-size: 15px; opacity: .8; margin-top: 3px; }
.go { font-size: 32px; line-height: 1; opacity: .7; }

footer { text-align: center; color: var(--muted); font-size: 13px; padding: 16px; padding-bottom: max(18px, env(safe-area-inset-bottom)); }
footer a { color: inherit; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ico { background: #3a3132; } }
:root[data-theme="dark"] .ico { background: #3a3132; }

/* ---------- переключатель темы ---------- */
.t9-theme { position: absolute; right: max(16px, env(safe-area-inset-right)); top: calc(50% + env(safe-area-inset-top) / 2); transform: translateY(-50%);
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; padding: 0; cursor: pointer;
  background: transparent; border: 1px solid #4a4142; color: #fff; -webkit-tap-highlight-color: transparent; }
.t9-theme:hover { border-color: #8a7f81; }
.t9-theme svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; display: none; }
html:not([data-tmode]) .t9-theme .ti-auto, html[data-tmode="auto"] .t9-theme .ti-auto, html[data-tmode="light"] .t9-theme .ti-light, html[data-tmode="dark"] .t9-theme .ti-dark { display: block; }
.t9-tip { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: #1a1516; color: #fff;
  padding: 9px 14px; border-radius: 10px; font-size: 14px; font-weight: 600; opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 9999; white-space: nowrap; }
.t9-tip.on { opacity: 1; }
@media (max-width: 360px) { .logo { height: 38px; } }

/* ---------- вход, сотрудники, уведомления ---------- */

/* ---------- форма заявки ---------- */
.lead { text-align: center; color: var(--muted); margin: -6px 0 18px; font-size: 15px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 18px; }
.f { display: block; font-size: 14px; font-weight: 600; color: var(--muted); margin-top: 14px; }
.f:first-child { margin-top: 0; }
.f > span { display: block; margin-bottom: 6px; }
.f > span i { color: var(--red); font-style: normal; }
.inp { width: 100%; font: inherit; font-size: 16px; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 12px; min-height: 48px; }
textarea.inp { min-height: 110px; resize: vertical; }
.inp:focus { outline: 2px solid var(--red); outline-offset: -1px; border-color: transparent; }
.types { display: flex; flex-wrap: wrap; gap: 8px; }
.types label { position: relative; }
.types input { position: absolute; opacity: 0; pointer-events: none; }
.types span { display: inline-block; padding: 9px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font-weight: 600; font-size: 15px; cursor: pointer; }
.types input:checked + span { background: var(--red); border-color: var(--red); color: #fff; }
.types input:focus-visible + span { outline: 2px solid var(--red); outline-offset: 2px; }
.consent { display: flex; gap: 10px; align-items: flex-start; margin-top: 16px; font-size: 14px; color: var(--muted); cursor: pointer; }
.consent input { width: 22px; height: 22px; accent-color: var(--red); flex: none; margin: 0; }
.consent a { color: var(--text); }
.err { color: var(--red); font-size: 14px; min-height: 20px; margin-top: 10px; }
.btn { display: flex; width: 100%; align-items: center; justify-content: center; font: inherit; font-weight: 800; font-size: 18px; border: 0; border-radius: 16px;
  min-height: 58px; background: var(--red); color: #fff; cursor: pointer; margin-top: 6px; }
.btn:disabled { opacity: .6; }
.btn.ghost { background: var(--card); color: var(--text); border: 1px solid var(--line); font-size: 16px; min-height: 50px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.done { text-align: center; padding: 26px 18px; }
.done .ok { width: 64px; height: 64px; border-radius: 50%; background: var(--red); color: #fff; display: grid; place-items: center; margin: 0 auto 14px; font-size: 34px; }
.done h2 { margin: 0 0 6px; font-size: 22px; }
.done .num { font-size: 26px; font-weight: 900; margin: 6px 0 12px; }
.done p { color: var(--muted); margin: 0 0 6px; }
.call { display: block; margin-top: 16px; font-size: 20px; font-weight: 800; color: var(--text); text-decoration: none; }
.info { margin-top: 14px; font-size: 14px; color: var(--muted); text-align: center; }

/* ================= ТЕК-9 · Liquid Glass ================= */
/* Общая основа для всех сайтов: красный акцент, белый и чёрный, полупрозрачное «стекло» с размытием. */
:root {
  --g-red: #ff1a12; --g-red2: #e10600;
  --g-ink: #0b0b0c; --g-muted: rgba(11,11,12,.56);
  --g-glass: rgba(255,255,255,.56); --g-glass2: rgba(255,255,255,.78); --g-solid: #ffffff;
  --g-edge: rgba(255,255,255,.8); --g-line: rgba(11,11,12,.09);
  --g-shadow: 0 10px 30px rgba(20,0,0,.09), 0 1px 2px rgba(0,0,0,.05);
  --g-hi: inset 0 1px 0 rgba(255,255,255,.7);
  --g-blur: blur(26px) saturate(180%);
  --g-base: #f5f3f3;
  --g-glow1: rgba(255,40,30,.34); --g-glow2: rgba(255,120,100,.26); --g-glow3: rgba(255,30,20,.18);
  --g-btn: linear-gradient(180deg, #ff4b40 0%, #e10600 100%);
  --g-btn-shadow: 0 8px 20px rgba(225,6,0,.35), inset 0 1px 0 rgba(255,255,255,.45);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --g-ink: #ffffff; --g-muted: rgba(255,255,255,.62);
    --g-glass: rgba(38,38,42,.5); --g-glass2: rgba(62,62,68,.62); --g-solid: #1b1b1e;
    --g-edge: rgba(255,255,255,.16); --g-line: rgba(255,255,255,.09);
    --g-shadow: 0 10px 30px rgba(0,0,0,.5); --g-hi: inset 0 1px 0 rgba(255,255,255,.14);
    --g-base: #060606; --g-glow1: rgba(255,30,20,.42); --g-glow2: rgba(255,60,40,.24); --g-glow3: rgba(200,10,0,.32);
  }
}
:root[data-theme="dark"] {
  --g-ink: #ffffff; --g-muted: rgba(255,255,255,.62);
  --g-glass: rgba(38,38,42,.5); --g-glass2: rgba(62,62,68,.62); --g-solid: #1b1b1e;
  --g-edge: rgba(255,255,255,.16); --g-line: rgba(255,255,255,.09);
  --g-shadow: 0 10px 30px rgba(0,0,0,.5); --g-hi: inset 0 1px 0 rgba(255,255,255,.14);
  --g-base: #060606; --g-glow1: rgba(255,30,20,.42); --g-glow2: rgba(255,60,40,.24); --g-glow3: rgba(200,10,0,.32);
}
/* фон с мягкими красными бликами — стекло видно только на «живом» фоне */
html { background: var(--g-base) !important; }
body { background: transparent !important; color: var(--g-ink); -webkit-font-smoothing: antialiased; }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 40% at 12% 6%, var(--g-glow1), transparent 70%),
    radial-gradient(50% 36% at 96% 32%, var(--g-glow2), transparent 70%),
    radial-gradient(70% 45% at 28% 98%, var(--g-glow3), transparent 70%),
    var(--g-base); }
/* если браузер не умеет размывать — делаем стекло плотнее, чтобы текст читался */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  :root { --g-glass: rgba(255,255,255,.92); --g-glass2: #fff; }
  :root[data-theme="dark"] { --g-glass: rgba(30,30,34,.94); --g-glass2: #2a2a2f; }
}
@media (prefers-reduced-transparency: reduce) {
  :root { --g-glass: rgba(255,255,255,.95); }
  :root[data-theme="dark"] { --g-glass: rgba(30,30,34,.96); }
}
/* переключатель темы — стеклянная капсула */
.t9-theme { background: var(--g-glass2) !important; border: 1px solid var(--g-edge) !important; color: var(--g-ink) !important;
  box-shadow: var(--g-shadow), var(--g-hi); -webkit-backdrop-filter: var(--g-blur); backdrop-filter: var(--g-blur); }
.t9-tip { background: rgba(20,20,22,.82) !important; -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-radius: 999px !important; padding: 10px 16px !important; }
/* печать всегда чёрно-белая, без стекла и фона */
@media print {
  html, body { background: #fff !important; }
  body::before { display: none !important; }
  * { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; box-shadow: none !important; }
}
/* ---------- страница заявок в стиле стекла ---------- */
@media screen {
  :root:root:root { --bg: transparent; --card: var(--g-glass); --text: var(--g-ink); --muted: var(--g-muted); --line: var(--g-line); --red: var(--g-red2); --shadow: var(--g-shadow); }
  .top { position: sticky; top: 0; z-index: 20; margin: max(10px, env(safe-area-inset-top)) 12px 0; padding: 12px 16px; border-radius: 26px;
    background: var(--g-glass); border: 1px solid var(--g-edge); box-shadow: var(--g-shadow), var(--g-hi); -webkit-backdrop-filter: var(--g-blur); backdrop-filter: var(--g-blur); }
  .logo { height: 34px; }
  .logo-txt { color: var(--g-ink); }
  .t9-theme { right: 10px; top: 50%; }
  .card { border: 1px solid var(--g-edge); border-radius: 28px; box-shadow: var(--g-shadow), var(--g-hi); -webkit-backdrop-filter: var(--g-blur); backdrop-filter: var(--g-blur); padding: 20px; }
  .inp { background: var(--g-glass2); border: 1px solid var(--g-edge); border-radius: 14px; box-shadow: var(--g-hi); }
  .types span { background: var(--g-glass2); border-color: var(--g-edge); box-shadow: var(--g-hi); }
  .types input:checked + span { background: var(--g-btn) border-box; border-color: transparent; box-shadow: var(--g-btn-shadow); }
  .btn { border-radius: 999px; background: var(--g-btn) border-box; border: 1px solid transparent; box-shadow: var(--g-btn-shadow); }
  .btn.ghost { background: var(--g-glass2); color: var(--g-ink); border-color: var(--g-edge); box-shadow: var(--g-hi); }
  .done .ok { background: var(--g-btn) border-box; box-shadow: var(--g-btn-shadow); }
}
