/* AirFlame — стили. Мобильная версия по умолчанию, на широком экране — боковое меню. */
:root {
  --bg: #f4f2ef;
  --surface: #ffffff;
  --ink: #1b1f2a;
  --muted: #6b7080;
  --line: #e6e2dc;
  --flame: #e8542a;
  --flame-ink: #ffffff;
  --flame-soft: #fde9e2;
  --navy: #1b1f2a;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(27,31,42,.06), 0 4px 14px rgba(27,31,42,.05);
  --tab-h: 64px;
  --b-blue: #2f6fdf; --b-blue-bg: #e6eefc;
  --b-violet: #7a4ad8; --b-violet-bg: #efe8fb;
  --b-amber: #a86b00; --b-amber-bg: #fdf1d6;
  --b-orange: #d2481d; --b-orange-bg: #fde6dc;
  --b-green: #1f8a4c; --b-green-bg: #e1f4e8;
  --b-red: #c62828; --b-red-bg: #fbe3e3;
  --b-gray: #6b7080; --b-gray-bg: #eceae6;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12141a; --surface: #1c1f27; --ink: #eceef3; --muted: #9aa0ae; --line: #2c303b;
    --flame-soft: #3a2119; --shadow: none;
    --b-blue-bg: #1c2a44; --b-violet-bg: #2b2140; --b-amber-bg: #3a2e12; --b-orange-bg: #3d2218;
    --b-green-bg: #163223; --b-red-bg: #3d1a1a; --b-gray-bg: #2a2d35;
    --b-blue: #7fa8f5; --b-violet: #b597f0; --b-amber: #f0c060; --b-orange: #f59a74; --b-green: #6fd09a; --b-red: #f08080; --b-gray: #a3a8b4;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg); color: var(--ink); font-size: 15px; line-height: 1.45;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
a { color: var(--flame); text-decoration: none; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
h1 { font-size: 18px; font-weight: 800; }
h2 { font-size: 19px; font-weight: 800; }
h3 { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 10px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.mt { margin-top: 12px; }
.pre { white-space: pre-wrap; word-break: break-word; }
.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.row { display: flex; align-items: center; }
.row.between { justify-content: space-between; gap: 10px; }
.row.gap { gap: 8px; flex-wrap: wrap; }
[hidden] { display: none !important; }

/* ---------- Загрузка / вход ---------- */
.boot { min-height: 100vh; display: grid; place-items: center; }
.boot-logo { font-size: 48px; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.12); opacity: .7; } }
.auth { min-height: 100vh; display: grid; place-items: center; padding: 20px 16px;
  background: radial-gradient(1200px 500px at 50% -10%, var(--flame-soft), transparent 70%), var(--bg); }
.auth-card { width: 100%; max-width: 380px; background: var(--surface); border-radius: 20px; padding: 28px 22px;
  box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px; }
.logo-big { font-size: 28px; font-weight: 800; text-align: center; }

/* ---------- Каркас ---------- */
.layout { min-height: 100vh; }
.side { display: none; }
.main { min-height: 100vh; padding-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom)); }
.top {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; padding-top: calc(12px + env(safe-area-inset-top));
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.top h1 { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.back { font-size: 30px; line-height: 1; color: var(--ink); padding: 0 6px 4px 0; }
.brand-m { font-size: 20px; }
.bell { position: relative; font-size: 20px; padding: 4px; }
.bell-count { position: absolute; top: -2px; right: -6px; background: var(--flame); color: var(--flame-ink);
  font-size: 11px; font-weight: 800; border-radius: 10px; padding: 1px 6px; min-width: 18px; text-align: center; }
.content { padding: 16px; max-width: 860px; margin: 0 auto; }
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; height: calc(var(--tab-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom); background: var(--surface); border-top: 1px solid var(--line);
}
.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--muted); font-size: 11px; font-weight: 600; }
.tabbar a .ni { font-size: 20px; filter: grayscale(1); opacity: .7; }
.tabbar a.on { color: var(--flame); }
.tabbar a.on .ni { filter: none; opacity: 1; }
.hide-m { display: none !important; }

@media (min-width: 900px) {
  .layout { display: grid; grid-template-columns: 240px 1fr; }
  .side { display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; background: var(--navy); color: #fff; padding: 20px 12px; }
  .brand { font-weight: 800; font-size: 20px; padding: 4px 12px 22px; }
  .side nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
  .side nav a { color: #c9ccd6; padding: 10px 12px; border-radius: 10px; display: flex; gap: 10px; font-weight: 600; }
  .side nav a:hover { background: rgba(255,255,255,.06); }
  .side nav a.on { background: var(--flame); color: #fff; }
  .side-me { font-size: 13px; padding: 12px; color: #fff; border-top: 1px solid rgba(255,255,255,.1); }
  .side-me small { color: #9aa0ae; }
  .main { padding-bottom: 0; }
  .tabbar, .brand-m, .fab { display: none !important; }
  .hide-m { display: inline-flex !important; }
  .content { padding: 24px; }
  .top { padding: 16px 24px; }
}

/* ---------- Элементы ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 12px;
  padding: 11px 16px; font: inherit; font-weight: 700; cursor: pointer; background: var(--b-gray-bg); color: var(--ink);
  min-height: 44px; transition: transform .05s, filter .15s; }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; pointer-events: none; }
.btn.primary { background: var(--flame); color: var(--flame-ink); }
.btn.primary:hover { filter: brightness(1.05); }
.btn.ghost { background: transparent; border: 1.5px solid var(--line); }
.btn.danger { background: var(--b-red-bg); color: var(--b-red); }
.btn.link { background: none; color: var(--flame); min-height: 36px; }
.btn.small { padding: 7px 12px; min-height: 36px; font-size: 14px; }
.btn.wide { width: 100%; }
.danger-text { color: var(--b-red) !important; }

input, select, textarea { width: 100%; font: inherit; color: var(--ink); background: var(--surface); border: 1.5px solid var(--line);
  border-radius: 12px; padding: 11px 12px; min-height: 44px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--flame); box-shadow: 0 0 0 3px var(--flame-soft); }
textarea { resize: vertical; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
label > input, label > select, label > textarea { font-weight: 500; font-size: 15px; }
label.check { flex-direction: row; align-items: center; gap: 8px; color: var(--ink); font-weight: 500; font-size: 14px; }
label.check input { width: 20px; height: 20px; min-height: 0; accent-color: var(--flame); }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.checks { display: flex; flex-wrap: wrap; gap: 6px 14px; }
code { background: var(--b-gray-bg); padding: 1px 5px; border-radius: 5px; font-size: 12px; word-break: break-all; }

.form { display: flex; flex-direction: column; gap: 14px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg label { flex-direction: row; align-items: center; justify-content: center; gap: 6px; border: 1.5px solid var(--line);
  border-radius: 12px; padding: 11px; color: var(--ink); cursor: pointer; font-size: 15px; }
.seg label:has(input:checked) { border-color: var(--flame); background: var(--flame-soft); }
.seg input { width: auto; min-height: 0; accent-color: var(--flame); }

.panel { background: var(--surface); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.stack { display: flex; flex-direction: column; gap: 14px; }
.list { display: flex; flex-direction: column; gap: 10px; }
.card { display: flex; flex-direction: column; gap: 5px; background: var(--surface); border-radius: var(--radius);
  padding: 14px; box-shadow: var(--shadow); color: var(--ink); border-left: 4px solid transparent; }
a.card:hover { filter: brightness(.99); }
.card.turn { border-left-color: var(--flame); }
.card.urgent { border-left-color: var(--b-red); }
.card.inactive { opacity: .55; }
.card.unread { border-left-color: var(--flame); background: color-mix(in srgb, var(--flame-soft) 40%, var(--surface)); }
.rem-red { border-left-color: var(--b-red); } .rem-orange { border-left-color: var(--b-orange); }
.rem-amber { border-left-color: var(--b-amber); } .rem-green { border-left-color: var(--b-green); }

.badge { display: inline-block; white-space: nowrap; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 20px; }
.b-blue { color: var(--b-blue); background: var(--b-blue-bg); } .b-violet { color: var(--b-violet); background: var(--b-violet-bg); }
.b-amber { color: var(--b-amber); background: var(--b-amber-bg); } .b-orange { color: var(--b-orange); background: var(--b-orange-bg); }
.b-green { color: var(--b-green); background: var(--b-green-bg); } .b-red { color: var(--b-red); background: var(--b-red-bg); }
.b-gray { color: var(--b-gray); background: var(--b-gray-bg); }
.chip { display: inline-block; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 20px; background: var(--b-gray-bg); color: var(--ink); margin-top: 6px; }

.tabs { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 12px; scrollbar-width: none; }
.tabs button { flex: none; border: 0; background: var(--surface); color: var(--muted); font: inherit; font-weight: 700; font-size: 14px;
  padding: 8px 14px; border-radius: 20px; cursor: pointer; box-shadow: var(--shadow); display: flex; gap: 6px; align-items: center; }
.tabs button span { font-size: 12px; background: var(--b-gray-bg); border-radius: 10px; padding: 0 7px; }
.tabs button.on { background: var(--ink); color: var(--bg); }
.tabs button.on span { background: var(--flame); color: #fff; }
.search { margin-bottom: 12px; }
.empty { text-align: center; color: var(--muted); padding: 40px 10px; }
.loading { text-align: center; color: var(--muted); padding: 40px; }

.fab { position: fixed; right: 18px; bottom: calc(var(--tab-h) + 16px + env(safe-area-inset-bottom)); z-index: 15; width: 56px; height: 56px;
  border-radius: 18px; background: var(--flame); color: #fff; font-size: 28px; display: grid; place-items: center;
  box-shadow: 0 6px 18px rgba(232,84,42,.4); }

.kv { display: grid; grid-template-columns: 120px 1fr; gap: 8px 12px; margin: 14px 0; }
.kv dt { color: var(--muted); font-size: 13px; font-weight: 600; padding-top: 1px; }
.kv dd { margin: 0; }
@media (max-width: 420px) { .kv { grid-template-columns: 1fr; gap: 2px; } .kv dd { margin-bottom: 8px; } }

.steps { list-style: none; padding: 0; margin: 14px 0 0; display: flex; gap: 4px; }
.steps li { flex: 1; font-size: 11px; font-weight: 600; color: var(--muted); display: flex; flex-direction: column; gap: 5px; }
.steps li span { height: 5px; border-radius: 3px; background: var(--line); }
.steps li.done span { background: var(--b-green); }
.steps li.cur { color: var(--ink); }
.steps li.cur span { background: var(--flame); }

.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.actions .btn { flex: 1 1 auto; }

.timeline { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-direction: column; gap: 10px; }
.timeline li { padding-left: 14px; border-left: 2px solid var(--line); }
.timeline li.status { border-left-color: var(--flame); }
.timeline li.comment { border-left-color: var(--b-blue); }

.help { font-size: 13px; color: var(--muted); }
.help summary { cursor: pointer; font-weight: 600; color: var(--flame); }
.help ol { padding-left: 18px; margin: 8px 0 0; display: flex; flex-direction: column; gap: 4px; }
details summary { cursor: pointer; }

#toasts { position: fixed; left: 50%; transform: translateX(-50%); top: calc(12px + env(safe-area-inset-top)); z-index: 100;
  display: flex; flex-direction: column; gap: 8px; width: min(92vw, 420px); pointer-events: none; }
.toast { background: var(--navy); color: #fff; padding: 12px 16px; border-radius: 12px; font-weight: 600; font-size: 14px;
  box-shadow: 0 8px 24px rgba(0,0,0,.2); animation: tin .2s ease-out; transition: opacity .4s, transform .4s; }
.toast.t-err { background: var(--b-red); }
.toast.t-info { background: var(--flame); }
.toast.out { opacity: 0; transform: translateY(-8px); }
@keyframes tin { from { opacity: 0; transform: translateY(-8px); } }
.row.gap > select, .row.gap > input { flex: 1 1 180px; width: auto; }

/* ---------- Заявка v2: типы, товары, оплата, файлы ---------- */
.stack-s { display: flex; flex-direction: column; gap: 12px; }
.stack-s > h3 { margin-bottom: 0; }
.clamp1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.pad-top { display: flex; align-items: flex-end; padding-bottom: 10px; }
.checks.col { flex-direction: column; gap: 10px; }
.btn.big { min-height: 52px; font-size: 16px; }
.sel { user-select: all; font-weight: 600; }

.kinds { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.kind { flex-direction: row; align-items: center; gap: 8px; border: 1.5px solid var(--line); border-radius: 12px;
  padding: 12px; color: var(--ink); font-size: 14px; font-weight: 700; cursor: pointer; background: var(--surface); }
.kind span { font-size: 20px; }
.kind input { position: absolute; opacity: 0; pointer-events: none; }
.kind.on, .kind:has(input:checked) { border-color: var(--flame); background: var(--flame-soft); }
.kind:has(input:focus-visible) { box-shadow: 0 0 0 3px var(--flame-soft); }
.paygrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.small-kind { justify-content: center; text-align: center; padding: 10px 8px; font-size: 13px; }

.lines-head, .line { display: grid; grid-template-columns: 96px minmax(0, 1fr) 92px 64px 54px 32px; gap: 6px; align-items: center; }
.lines-head { padding: 0 2px; }
#lines { display: flex; flex-direction: column; gap: 8px; }
.line input, .line select { min-height: 42px; padding: 9px 8px; font-size: 14px; }
.icon-btn { border: 0; background: var(--b-gray-bg); color: var(--muted); border-radius: 10px; height: 42px; font-size: 20px; cursor: pointer; }
.icon-btn:hover { color: var(--b-red); }
@media (max-width: 560px) {
  .lines-head { display: none; }
  .line { grid-template-columns: 1.3fr 1fr 0.8fr 40px; padding: 10px; border: 1.5px solid var(--line); border-radius: 12px; }
  .line [data-l=type] { grid-column: 1 / 2; }
  .line [data-l=name] { grid-column: 2 / 5; }
  .line [data-l=price] { grid-column: 1 / 2; }
  .line [data-l=discount] { grid-column: 2 / 3; }
  .line [data-l=qty] { grid-column: 3 / 4; }
  .line .icon-btn { grid-column: 4 / 5; grid-row: 2; }
  .grid3 { grid-template-columns: 1fr 1fr; }
}
.total-row { display: flex; justify-content: space-between; align-items: baseline; padding-top: 10px; border-top: 1.5px dashed var(--line); font-size: 15px; }
.total-row b { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }

.moneybox { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; }
.moneybox > div { padding: 10px 12px; border-radius: 10px; font-weight: 600; }
.mb-ok { background: var(--b-green-bg); color: var(--b-green); }
.mb-info { background: var(--b-blue-bg); color: var(--b-blue); }
.mb-due { background: var(--b-orange-bg); color: var(--b-orange); font-size: 16px; }

table.lines { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
table.lines td { padding: 8px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
table.lines td.num { text-align: right; white-space: nowrap; padding-left: 12px; }
table.lines tr.total td { border-bottom: 0; font-weight: 800; font-size: 17px; padding-top: 10px; }

.flags { display: flex; flex-wrap: wrap; gap: 6px; }
.flag { background: var(--b-amber-bg); color: var(--b-amber); font-weight: 700; font-size: 13px; padding: 6px 10px; border-radius: 20px; }
.chip.wa { background: var(--b-green-bg); color: var(--b-green); }

.files { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; margin-bottom: 10px; }
.file { display: flex; flex-direction: column; gap: 4px; border: 1.5px solid var(--line); border-radius: 10px; padding: 6px; color: var(--ink); min-width: 0; }
.file img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; max-width: 100%; }
.file .fi { font-size: 34px; text-align: center; padding: 14px 0; }
.filebtn { cursor: pointer; align-self: flex-start; flex-direction: row; color: var(--ink); font-size: 14px; }
.chip-btn { border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 20px; cursor: pointer; }
.chip-btn.on { border-color: var(--flame); background: var(--flame-soft); color: var(--flame); }
.grow { flex: 1 1 200px; }

/* ---------- Заставка ---------- */
#splash { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; align-content: center; gap: 18px;
  background: radial-gradient(600px 420px at 50% 46%, #3a1d14 0%, #17141a 55%, #101116 100%); transition: opacity .55s ease, visibility .55s; }
#splash.out { opacity: 0; visibility: hidden; }
.sp-glow { position: absolute; width: 260px; height: 260px; left: 50%; top: 46%; transform: translate(-50%, -50%); border-radius: 50%;
  background: radial-gradient(circle, rgba(255,120,40,.35), transparent 65%); animation: glow 1.6s ease-in-out infinite; }
.sp-flame { width: 110px; height: 110px; position: relative; filter: drop-shadow(0 0 16px rgba(255,140,50,.6)); transform-origin: 50% 90%;
  animation: flicker 1.2s ease-in-out infinite; }
.sp-flame path:last-child { transform-origin: 50% 90%; animation: flicker 0.8s ease-in-out infinite reverse; }
.sp-name { position: relative; color: #f5e9df; font: 800 30px/1 'Manrope', system-ui, sans-serif; letter-spacing: .02em; opacity: 0; animation: rise .7s .25s ease-out forwards; }
.sp-name b { color: #ff8a3d; font-weight: 800; }
.sp-sparks { position: absolute; left: 50%; top: 44%; width: 0; height: 0; }
.sp-sparks i { position: absolute; width: 4px; height: 4px; border-radius: 50%; background: #ffb547; box-shadow: 0 0 6px #ff8a3d; opacity: 0;
  animation: spark 1.8s ease-out infinite; }
.sp-sparks i:nth-child(1) { left: -18px; animation-delay: .1s; } .sp-sparks i:nth-child(2) { left: 10px; animation-delay: .5s; }
.sp-sparks i:nth-child(3) { left: -4px; animation-delay: .9s; } .sp-sparks i:nth-child(4) { left: 22px; animation-delay: 1.2s; }
.sp-sparks i:nth-child(5) { left: -26px; animation-delay: 1.5s; }
@keyframes flicker { 0%,100% { transform: scale(1, 1) rotate(0); } 25% { transform: scale(.97, 1.04) rotate(-1.5deg); } 50% { transform: scale(1.02, .97) rotate(1deg); } 75% { transform: scale(.98, 1.03) rotate(-.5deg); } }
@keyframes glow { 50% { transform: translate(-50%, -50%) scale(1.12); opacity: .75; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes spark { 0% { opacity: 0; transform: translate(0, 0) scale(1); } 15% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--x, 6px), -90px) scale(.3); } }

/* логотип в интерфейсе */
.af-logo { width: 1.25em; height: 1.25em; vertical-align: -0.2em; flex: none; }
.brand .af-logo, .brand-m .af-logo { animation: flicker 2.4s ease-in-out infinite; transform-origin: 50% 90%; }
.logo-big .af-logo { width: 54px; height: 54px; display: block; margin: 0 auto 8px; filter: drop-shadow(0 0 10px rgba(255,140,50,.45)); animation: flicker 1.6s ease-in-out infinite; transform-origin: 50% 90%; }

/* ---------- Часы и объявления ---------- */
.side-clock { padding: 14px 12px 12px; border-top: 1px solid rgba(255,255,255,.1); color: #fff; }
.side-clock .t { font-size: 34px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1; }
.side-clock .d { font-size: 13px; color: #c9ccd6; margin-top: 4px; }
.ann { position: relative; min-height: 40px; margin-top: 10px; }
.ann-item { position: absolute; inset: 0 0 auto 0; font-size: 12.5px; line-height: 1.35; color: #ffd9c2; background: rgba(232,84,42,.16);
  border: 1px solid rgba(232,84,42,.35); border-radius: 10px; padding: 7px 9px; opacity: 0; transform: translateY(4px); transition: opacity .5s, transform .5s; }
.ann-item.on, .ann-item:only-child { opacity: 1; transform: none; position: relative; }
.infobar { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.infobar .clock-m { font-size: 13px; font-weight: 700; color: var(--muted); }
.infobar .ann { margin: 0; min-height: 34px; }
.infobar .ann-item { color: var(--b-orange); background: var(--b-orange-bg); border-color: transparent; font-weight: 600; font-size: 13px; }
@media (min-width: 900px) { .infobar { display: none; } }

/* счётчик на пункте меню */
.nav-count { background: var(--flame); color: #fff; font-size: 11px; font-weight: 800; border-radius: 10px; padding: 0 6px; min-width: 18px; text-align: center; line-height: 18px; margin-left: auto; }
.tabbar a { position: relative; }
.tabbar .nav-count { position: absolute; top: 6px; left: 54%; margin: 0; animation: pop .4s ease-out; }
@keyframes pop { 0% { transform: scale(.4); } 70% { transform: scale(1.2); } 100% { transform: scale(1); } }
.bell.ring { animation: ring .9s ease-in-out 2; transform-origin: 50% 10%; }
@keyframes ring { 0%,100% { transform: rotate(0); } 15% { transform: rotate(16deg); } 30% { transform: rotate(-14deg); } 45% { transform: rotate(10deg); } 60% { transform: rotate(-6deg); } 75% { transform: rotate(3deg); } }

/* ---------- Анимации действий ---------- */
.fx { position: fixed; inset: 0; z-index: 150; pointer-events: none; display: grid; place-items: center; align-content: center; gap: 14px;
  background: radial-gradient(circle at 50% 50%, rgba(20,20,26,.35), rgba(20,20,26,0) 60%); transition: opacity .35s; }
.fx.out { opacity: 0; }
.fx-text { font-weight: 800; font-size: 20px; color: var(--ink); background: var(--surface); padding: 8px 16px; border-radius: 30px; box-shadow: 0 8px 24px rgba(0,0,0,.18); animation: rise .35s ease-out; }
.fx-truck { width: 170px; animation: drive 1.5s cubic-bezier(.5,0,.6,1) forwards; }
.fx-road { position: absolute; top: 50%; left: 0; right: 0; height: 0; }
.fx-road span { position: absolute; height: 3px; width: 60px; border-radius: 2px; background: var(--flame); opacity: .0; animation: speed 1.5s linear forwards; }
.fx-road span:nth-child(1) { top: -22px; animation-delay: .25s; } .fx-road span:nth-child(2) { top: 0; animation-delay: .4s; } .fx-road span:nth-child(3) { top: 22px; animation-delay: .55s; }
@keyframes drive { 0% { transform: translateX(-70vw); } 35% { transform: translateX(0) ; } 60% { transform: translateX(0) rotate(-1deg); } 100% { transform: translateX(80vw); } }
@keyframes speed { 0% { left: 60%; opacity: 0; } 30% { opacity: .9; } 100% { left: -20%; opacity: 0; } }
.fx-burst { position: relative; width: 110px; height: 110px; display: grid; place-items: center; }
.fx-burst i { position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; margin: -4px; border-radius: 50%; background: #ffb547; box-shadow: 0 0 8px #ff7a2e;
  animation: burst .8s .2s ease-out forwards; opacity: 0; }
.fx-burst i:nth-child(even) { background: #e8542a; width: 6px; height: 6px; }
@keyframes burst { 0% { opacity: 1; transform: rotate(var(--a)) translateY(0) scale(1); } 100% { opacity: 0; transform: rotate(var(--a)) translateY(calc(-1 * var(--d))) scale(.3); } }
.fx-check { width: 96px; height: 96px; }
.fx-check circle { fill: var(--b-green); transform-origin: center; animation: popc .45s ease-out; }
.fx-check path { fill: none; stroke: #fff; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .4s .25s ease-out forwards; }
@keyframes popc { 0% { transform: scale(.2); } 70% { transform: scale(1.12); } 100% { transform: scale(1); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
.fx-stamp { font-size: 28px; font-weight: 800; color: var(--flame); border: 4px solid var(--flame); border-radius: 14px; padding: 10px 22px; background: var(--surface);
  transform: rotate(-8deg); animation: stamp .45s cubic-bezier(.2,1.6,.4,1); box-shadow: 0 10px 30px rgba(0,0,0,.18); text-transform: uppercase; letter-spacing: .04em; }
@keyframes stamp { 0% { transform: rotate(-8deg) scale(2.2); opacity: 0; } 100% { transform: rotate(-8deg) scale(1); opacity: 1; } }
.card { animation: cardIn .3s ease-out both; }
@keyframes cardIn { from { opacity: .4; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
.lang-switch { display: inline-flex; border: 1.5px solid var(--line); border-radius: 20px; overflow: hidden; }
.lang-switch button { border: 0; background: transparent; color: var(--muted); font: inherit; font-weight: 800; font-size: 13px; padding: 6px 12px; cursor: pointer; }
.lang-switch button.on { background: var(--flame); color: #fff; }
.side .lang-switch { border-color: rgba(255,255,255,.25); margin: 0 12px 10px; align-self: flex-start; }
.side .lang-switch button { color: #c9ccd6; }
.side .lang-switch button.on { color: #fff; }
.row.gap > select, .row.gap > input { min-width: 0; max-width: 100%; }
#driverSel { flex: 1 1 0; }

.steps li.miss { color: var(--b-red); }
.steps li.miss span { background: var(--b-red); }
.mb-miss { background: var(--b-red-bg); color: var(--b-red); font-weight: 700; }
