/* QRBs interface. Mobile first; tokens in tokens.css. Own identity: logo gradient accents, glass command bar,
   floating dock with the QR button in the centre, rounded cards. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'cv11', 'ss01';
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
body::before {
  content: ''; position: fixed; inset: -20vh -10vw auto; height: 70vh; z-index: -1; pointer-events: none;
  background: radial-gradient(560px 300px at 85% 0%, rgba(155, 77, 255, 0.10), transparent 70%), radial-gradient(620px 320px at 5% 10%, rgba(47, 91, 255, 0.09), transparent 70%);
}
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3, h4, p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
::selection { background: color-mix(in srgb, var(--brand) 25%, transparent); }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- typography ---------- */
.h1 { font-size: clamp(32px, 6vw, 60px); line-height: 1.04; font-weight: 850; letter-spacing: -0.04em; }
.h2 { font-size: clamp(24px, 4vw, 36px); line-height: 1.12; font-weight: 800; letter-spacing: -0.03em; }
.h3 { font-size: 20px; line-height: 1.25; font-weight: 750; letter-spacing: -0.02em; }
.h4 { font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }
.lead { font-size: 17px; color: var(--muted); line-height: 1.6; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.bold { font-weight: 700; }
.center { text-align: center; }
.mono { font-variant-numeric: tabular-nums; }
.gradient-text { background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--brand-text); }
.pre { white-space: pre-wrap; word-break: break-word; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.clamp-4 { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

/* ---------- layout helpers ---------- */
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 640px; margin: 0 auto; }
.stack { display: flex; flex-direction: column; gap: var(--gap, 12px); }
.row { display: flex; align-items: center; gap: var(--gap, 10px); min-width: 0; }
.row.wrap { flex-wrap: wrap; }
.spread { justify-content: space-between; }
.grow { flex: 1 1 auto; min-width: 0; }
.grid-2 { display: grid; gap: 16px; grid-template-columns: 1fr; }
.grid-3 { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .grid-2 { grid-template-columns: 1fr 1fr; } .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.divider { height: 1px; background: var(--line); border: 0; margin: 0; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; }

/* ---------- buttons ---------- */
.btn {
  --b-bg: var(--surface-2); --b-fg: var(--text); --b-bd: transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 14px;
  background: var(--b-bg); color: var(--b-fg); border: 1px solid var(--b-bd);
  font-weight: 650; font-size: 14.5px; letter-spacing: -0.005em; white-space: nowrap;
  transition: transform 120ms var(--ease), background-color var(--dur) var(--ease), border-color var(--dur), opacity var(--dur), box-shadow var(--dur);
  -webkit-tap-highlight-color: transparent; user-select: none;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-lg svg { width: 20px; height: 20px; }
.btn:hover { filter: brightness(0.97); }
.btn:active { transform: scale(0.97); }
.btn[disabled], .btn.loading { opacity: 0.55; pointer-events: none; }
.btn.loading::after { content: ''; width: 15px; height: 15px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin 700ms linear infinite; }
.btn-primary { --b-bg: var(--text); --b-fg: var(--bg); }
:root[data-theme='dark'] .btn-primary { --b-bg: #eef0ff; --b-fg: #0d1030; }
.btn-brand { --b-bg: var(--brand); --b-fg: #fff; box-shadow: 0 8px 20px color-mix(in srgb, var(--brand) 30%, transparent); }
.btn-gradient { --b-bg: var(--brand); --b-fg: #fff; background: var(--gradient); box-shadow: var(--glow); }
.btn-gradient:hover { filter: brightness(1.06) saturate(1.05); }
.btn-ghost { --b-bg: transparent; --b-bd: var(--line-strong); }
.btn-ghost:hover { --b-bg: var(--surface-2); filter: none; }
.btn-plain { --b-bg: transparent; padding: 0 10px; }
.btn-plain:hover { --b-bg: var(--surface-2); filter: none; }
.btn-danger { --b-bg: var(--danger-soft); --b-fg: var(--danger); }
.btn-success { --b-bg: var(--success-soft); --b-fg: var(--success); }
.btn-soft { --b-bg: var(--brand-soft); --b-fg: var(--brand-text); }
.btn-sm { min-height: 34px; padding: 0 13px; font-size: 13.5px; border-radius: 10px; }
.btn-lg { min-height: 52px; padding: 0 26px; font-size: 16px; border-radius: 15px; }
.btn-block { width: 100%; }
.icon-btn {
  position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
  color: var(--text); transition: background-color var(--dur), transform 120ms; -webkit-tap-highlight-color: transparent;
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn:active { transform: scale(0.92); }
.icon-btn svg { width: 24px; height: 24px; }
.link { color: var(--brand-text); font-weight: 600; }
.link:hover { text-decoration: underline; }

/* ---------- badges / chips / dots ---------- */
.badge-count {
  position: absolute; top: 3px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--pill);
  background: var(--like); color: #fff; font-size: 11px; font-weight: 750; line-height: 18px; text-align: center;
  border: 2px solid var(--bg); animation: pop 360ms var(--spring);
}
.chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px; border-radius: var(--pill); background: var(--surface-2); color: var(--text-2); font-size: 12.5px; font-weight: 650; }
.chip svg { width: 14px; height: 14px; flex: none; }
.chip-brand { background: var(--brand-soft); color: var(--brand-text); }
.chip-success { background: var(--success-soft); color: var(--success); }
.chip-danger { background: var(--danger-soft); color: var(--danger); }
.chip-warning { background: var(--warning-soft); color: var(--warning); }
.live-badge {
  display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 13px 0 11px; border-radius: var(--pill);
  background: var(--brand-soft); color: var(--brand-text); font-size: 12.5px; font-weight: 750; letter-spacing: 0.01em;
}
.live-dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--success); flex: none; }
.live-dot::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; background: var(--success); opacity: 0.35; animation: ping 1.6s var(--ease-out) infinite; }
.verified { width: 16px; height: 16px; color: var(--brand); flex: none; }

/* ---------- form controls ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.label { font-size: 13px; font-weight: 650; color: var(--text-2); }
.hint { font-size: 12.5px; color: var(--muted); }
.error-text { font-size: 12.5px; color: var(--danger); font-weight: 600; min-height: 0; }
.input, .select, .textarea {
  width: 100%; min-height: 48px; padding: 12px 14px; border-radius: 14px;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--text); outline: none;
  transition: border-color var(--dur), background-color var(--dur), box-shadow var(--dur);
}
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.input:focus, .select:focus, .textarea:focus { background: var(--surface); border-color: var(--brand); box-shadow: var(--ring-brand); }
.field.has-error .input, .field.has-error .select, .field.has-error .textarea { border-color: var(--danger); background: var(--danger-soft); }
.textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 19px) 50%, calc(100% - 14px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 38px; }
.input-wrap { position: relative; }
.input-wrap .input { padding-right: 46px; }
.input-wrap .icon-btn { position: absolute; right: 3px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; }
.input-prefix { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.input-wrap.prefixed .input { padding-left: 32px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--text-2); cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--brand); flex: none; }
.switch { position: relative; width: 46px; height: 28px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: var(--pill); background: var(--line-strong); transition: background-color var(--dur); }
.switch span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform var(--dur) var(--spring); }
.switch input:checked + span { background: var(--brand); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.segmented { display: inline-flex; padding: 3px; gap: 2px; border-radius: 13px; background: var(--surface-2); }
.segmented > button, .segmented > a { display: inline-flex; align-items: center; justify-content: center; min-height: 34px; padding: 0 14px; border-radius: 10px; font-weight: 650; font-size: 13.5px; color: var(--muted); transition: background-color var(--dur), color var(--dur); }
.segmented > [aria-pressed='true'], .segmented > [aria-current='page'] { background: var(--surface); color: var(--brand-text); box-shadow: var(--shadow-xs); }
.pw-meter { height: 4px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.pw-meter i { display: block; height: 100%; width: 0; background: var(--danger); transition: width var(--dur), background-color var(--dur); }

/* ---------- cards / lists ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-xs); }
.card-pad { padding: 20px; }
@media (min-width: 720px) { .card-pad { padding: 24px; } }
.card-soft { background: var(--bg-soft); border-radius: var(--radius-lg); }
.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--radius-sm); min-width: 0; transition: background-color var(--dur); }
a.list-item:hover, button.list-item:hover { background: var(--surface-2); }
button.list-item { width: 100%; text-align: left; }
.list-item .meta { flex: 1; min-width: 0; }
.list-item .title { font-weight: 650; font-size: 14.5px; }
.list-item .sub { font-size: 13px; color: var(--muted); }
.unread-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--brand); flex: none; }
.settings-group { border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.settings-row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; min-height: 56px; }
.settings-row + .settings-row { border-top: 1px solid var(--line); }
.settings-row .meta { flex: 1; min-width: 0; }

/* ---------- avatar / plate ---------- */
.avatar {
  --s: 40px; width: var(--s); height: var(--s); border-radius: 50%; flex: none; overflow: hidden; position: relative;
  background: var(--gradient); color: #fff; display: grid; place-items: center; font-weight: 750; font-size: calc(var(--s) * 0.4); letter-spacing: -0.02em;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.ring { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5.5px var(--qr-indigo); }
.avatar-anon { background: var(--surface-3); color: var(--muted); }
.avatar-anon svg { width: 55%; height: 55%; }
.plate {
  display: inline-flex; align-items: stretch; height: 30px; border-radius: 7px; overflow: hidden; flex: none;
  background: var(--plate-bg); color: var(--plate-ink); border: 1.5px solid #0b0d12; font-weight: 800; letter-spacing: 0.06em; font-size: 14px;
  font-variant-numeric: tabular-nums; box-shadow: var(--shadow-xs);
}
.plate .band { display: grid; place-items: center; width: 22px; background: var(--plate-band); color: #fff; font-size: 8px; letter-spacing: 0; font-weight: 800; }
.plate .num { display: grid; place-items: center; padding: 0 10px; white-space: nowrap; }
.plate.lg { height: 46px; font-size: 22px; border-width: 2px; border-radius: 10px; }
.plate.lg .band { width: 32px; font-size: 11px; }
.plate.lg .num { padding: 0 16px; }
.plate.sm { height: 24px; font-size: 12px; border-radius: 6px; }
.plate.sm .band { width: 18px; font-size: 7px; }
.plate.sm .num { padding: 0 7px; }

/* ---------- app shell: command bar (top) + floating dock (phones) ---------- */
.app { min-height: 100vh; min-height: 100dvh; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 850; font-size: 21px; letter-spacing: -0.045em; color: var(--text); }
.brand img { width: 30px; height: 30px; filter: drop-shadow(0 4px 10px rgba(79, 77, 255, 0.35)); }
.brand.lg { font-size: 26px; } .brand.lg img { width: 38px; height: 38px; }
.cmdbar {
  position: sticky; top: 0; z-index: 40; padding-top: var(--safe-top);
  background: var(--glass); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}
.cmdbar::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--gradient); opacity: 0.35; }
.cmdbar-in { max-width: var(--content-w); margin: 0 auto; height: var(--topbar-h); padding: 0 12px 0 16px; display: flex; align-items: center; gap: 12px; }
.cmd-nav { display: none; }
.cmd-actions { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.cmd-create { display: none; }
.me-btn { display: inline-flex; align-items: center; gap: 2px; padding: 3px 6px 3px 3px; border-radius: var(--pill); border: 1px solid var(--line); background: var(--surface); transition: border-color var(--dur), box-shadow var(--dur); }
.me-btn:hover { border-color: var(--line-strong); box-shadow: var(--shadow-xs); }
.me-btn .me-chev svg { width: 16px; height: 16px; color: var(--muted); }
.me-btn .avatar { --s: 32px; }
@media (max-width: 767px) { .me-btn .me-chev { display: none; } .me-btn { padding: 2px; } .me-btn .avatar { --s: 30px; } }
@media (min-width: 768px) {
  .only-phone { display: none !important; }
  .cmdbar-in { padding: 0 20px; gap: 18px; height: 68px; }
  .cmd-nav {
    display: flex; align-items: center; gap: 4px; margin: 0 auto; padding: 5px; border-radius: var(--pill);
    background: var(--surface-2); border: 1px solid var(--line);
  }
  .cmd-item { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: var(--pill); color: var(--muted); font-weight: 650; font-size: 14px; transition: color var(--dur), background-color var(--dur), box-shadow var(--dur); }
  .cmd-item:hover { color: var(--text); background: var(--surface); }
  .cmd-ic { position: relative; display: grid; place-items: center; }
  .cmd-ic svg { width: 21px; height: 21px; }
  .cmd-item .badge-count { top: -7px; right: -9px; }
  .cmd-item[aria-current='page'] { color: #fff; background: var(--gradient); box-shadow: var(--glow); }
  .cmd-item[aria-current='page'] .badge-count { border-color: transparent; background: #fff; color: var(--brand-text); }
  .cmd-label { display: none; }
  .cmd-actions { margin-left: 0; gap: 10px; }
  .cmd-create { display: inline-flex; }
  .cmd-create span { display: none; }
  :root { --topbar-h: 68px; }
}
@media (min-width: 1100px) { .cmd-label, .cmd-create span { display: inline; } }

.dock {
  position: fixed; left: 12px; right: 12px; bottom: calc(10px + var(--safe-bottom)); z-index: 40; height: 62px;
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; padding: 0 6px; border-radius: 22px;
  background: var(--glass); backdrop-filter: saturate(180%) blur(22px); -webkit-backdrop-filter: saturate(180%) blur(22px);
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
.dock a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; height: 100%; color: var(--muted); font-size: 10.5px; font-weight: 650; -webkit-tap-highlight-color: transparent; }
.dock a > svg { width: 23px; height: 23px; transition: transform 160ms var(--spring); }
.dock a:active > svg { transform: scale(0.86); }
.dock a[aria-current='page'] { color: var(--brand-text); }
.dock a[aria-current='page']::before { content: ''; position: absolute; top: 6px; width: 4px; height: 4px; border-radius: 50%; background: var(--gradient); }
.dock a .badge-count { top: 5px; right: calc(50% - 22px); }
.dock .avatar { --s: 24px; }
.dock a[aria-current='page'] .avatar { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px var(--brand); }
.dock-fab { display: grid; place-items: center; width: 54px; height: 54px; margin-top: -26px; border-radius: 18px; background: var(--gradient); color: #fff; box-shadow: var(--glow), 0 0 0 5px var(--bg); transition: transform 160ms var(--spring); }
.dock-fab svg { width: 26px; height: 26px; }
.dock-qr:active .dock-fab { transform: scale(0.92); }
.dock-qr[aria-current='page'] .dock-fab { transform: rotate(-6deg); }
.dock-qr[aria-current='page']::before { display: none; }
.main { padding-bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 20px); min-width: 0; }
.page { width: 100%; max-width: 680px; margin: 0 auto; padding: 18px 16px 0; }
.page-wide { max-width: 980px; }
.page-full { max-width: var(--content-w); }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; min-height: 40px; }
.page-head h1 { position: relative; }
.back-btn { margin-left: -8px; }
@media (min-width: 768px) {
  .dock { display: none; }
  .main { padding-bottom: 56px; }
  .page { padding: 32px 24px 0; }
}

/* chat screen on phones: the conversation takes the whole screen */
@media (max-width: 767px) {
  .app.chat-mode .cmdbar, .app.chat-mode .dock { display: none; }
  .app.chat-mode .main { padding-bottom: 0; }
  .app.chat-mode .chat { min-height: 100vh; min-height: 100dvh; }
  .app.chat-mode .chat-head { top: 0; padding-top: calc(10px + var(--safe-top)); }
  .app.chat-mode .chat-foot { bottom: 0; padding-bottom: calc(10px + var(--safe-bottom)); }
}

/* ---------- public shell (landing, legal, auth) ---------- */
.site-header { position: sticky; top: 0; z-index: 40; padding-top: var(--safe-top); background: var(--glass); backdrop-filter: saturate(180%) blur(18px); -webkit-backdrop-filter: saturate(180%) blur(18px); border-bottom: 1px solid var(--line); }
.site-header::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--gradient); opacity: 0.35; }
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 12px; }
.site-nav { display: none; gap: 26px; }
.site-nav a { color: var(--muted); font-weight: 600; font-size: 14.5px; transition: color var(--dur); }
.site-nav a:hover, .site-nav a[aria-current='page'] { color: var(--text); }
@media (min-width: 900px) { .site-nav { display: flex; } }
.header-actions { display: flex; align-items: center; gap: 6px; }
.header-actions .btn-ghost { display: none; }
@media (min-width: 560px) { .header-actions .btn-ghost { display: inline-flex; } }
@media (max-width: 559px) {
  .site-header .brand span { display: none; }
  .site-header .lang-switch button { min-width: 32px; padding: 0 6px; }
  .header-actions { gap: 4px; }
}
.site-footer { border-top: 1px solid var(--line); margin-top: 64px; padding: 40px 0 calc(28px + var(--safe-bottom)); color: var(--muted); font-size: 14px; }
.footer-grid { display: grid; gap: 28px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a:hover { color: var(--text); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 13px; }
.lang-switch { display: inline-flex; gap: 2px; padding: 3px; border-radius: 11px; background: var(--surface-2); }
.lang-switch button { height: 30px; min-width: 38px; padding: 0 8px; border-radius: 8px; font-size: 12.5px; font-weight: 750; color: var(--muted); transition: background-color var(--dur), color var(--dur); }
.lang-switch button[aria-pressed='true'] { background: var(--surface); color: var(--brand-text); box-shadow: var(--shadow-xs); }

/* landing */
.hero { position: relative; overflow: hidden; padding: 48px 0 56px; }
.hero::before { content: ''; position: absolute; inset: -40% -20% auto; height: 120%; background: radial-gradient(600px 300px at 80% 20%, rgba(91, 77, 255, 0.18), transparent 70%), radial-gradient(500px 280px at 10% 40%, rgba(47, 91, 255, 0.14), transparent 70%); pointer-events: none; }
.hero-grid { position: relative; display: grid; gap: 40px; align-items: center; }
@media (min-width: 960px) { .hero { padding: 88px 0 96px; } .hero-grid { grid-template-columns: 1.08fr 0.92fr; gap: 56px; } }
.hero .lead { max-width: 540px; margin-top: 18px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.trust-row { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 28px; color: var(--muted); font-size: 13.5px; font-weight: 600; }
.trust-row span { display: inline-flex; align-items: center; gap: 7px; }
.trust-row svg { width: 18px; height: 18px; color: var(--success); }
.phone-mock {
  position: relative; width: min(330px, 86vw); margin: 0 auto; aspect-ratio: 9 / 18.5; border-radius: 46px; padding: 12px;
  background: linear-gradient(160deg, #1d1d24, #0b0b0f); box-shadow: var(--shadow-lg), inset 0 0 0 1.5px rgba(255, 255, 255, 0.08);
}
.phone-screen { position: relative; height: 100%; border-radius: 36px; overflow: hidden; background: var(--bg); display: flex; flex-direction: column; }
.phone-notch { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); width: 92px; height: 26px; border-radius: 20px; background: #0b0b0f; z-index: 2; }
.mock-scan { padding: 50px 18px 18px; display: flex; flex-direction: column; gap: 12px; height: 100%; }
.mock-msg { padding: 11px 13px; border-radius: 14px; background: var(--surface-2); font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.mock-msg.sel { background: var(--brand); color: #fff; box-shadow: 0 8px 20px color-mix(in srgb, var(--brand) 35%, transparent); }
.float-card { position: absolute; z-index: 3; display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 16px; background: var(--elevated); border: 1px solid var(--line); box-shadow: var(--shadow); font-size: 13px; font-weight: 650; animation: float 6s var(--ease) infinite; }
.float-card.a { left: -6%; top: 22%; }
.float-card.b { right: -8%; bottom: 18%; animation-delay: -3s; }
@media (max-width: 520px) { .float-card.a { left: -2%; } .float-card.b { right: -2%; } }
.section { padding: 64px 0; }
@media (min-width: 960px) { .section { padding: 96px 0; } }
.section-head { max-width: 640px; margin: 0 auto 40px; text-align: center; }
.section-head .lead { margin-top: 12px; }
.feature { padding: 26px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); transition: transform var(--dur) var(--ease), box-shadow var(--dur); }
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.feature-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--brand-soft); color: var(--brand-text); margin-bottom: 18px; }
.feature-icon svg { width: 24px; height: 24px; }
.feature p { color: var(--muted); margin-top: 8px; font-size: 14.5px; }
.steps { counter-reset: step; display: grid; gap: 16px; }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.step { position: relative; padding: 24px; border-radius: var(--radius-lg); background: var(--bg-soft); }
.step::before { counter-increment: step; content: counter(step, decimal-leading-zero); display: block; font-size: 13px; font-weight: 800; color: var(--brand-text); margin-bottom: 14px; letter-spacing: 0.08em; }
.step p { color: var(--muted); font-size: 14px; margin-top: 6px; }
.price-card { position: relative; max-width: 460px; margin: 0 auto; padding: 32px; border-radius: var(--radius-xl); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden; }
.price-card::before { content: ''; position: absolute; inset: 0 0 auto; height: 5px; background: var(--gradient); }
.price { font-size: 56px; font-weight: 850; letter-spacing: -0.04em; line-height: 1; }
.price small { font-size: 18px; color: var(--muted); font-weight: 700; letter-spacing: 0; }
.ticks { display: flex; flex-direction: column; gap: 10px; margin: 22px 0 26px; }
.ticks li { list-style: none; display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; }
.ticks svg { width: 20px; height: 20px; color: var(--success); flex: none; margin-top: 1px; }
.cta-band { border-radius: var(--radius-xl); padding: 40px 28px; background: var(--gradient); color: #fff; text-align: center; position: relative; overflow: hidden; }
.cta-band .lead { color: rgba(255, 255, 255, 0.85); margin: 12px auto 24px; max-width: 520px; }
.cta-band .btn { --b-bg: #fff; --b-fg: #0b0d12; }
.faq details { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; font-weight: 700; font-size: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 22px; line-height: 1; color: var(--muted); transition: transform var(--dur); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); margin-top: 10px; }

/* auth */
.auth-wrap { min-height: calc(100vh - 64px); min-height: calc(100dvh - 64px); display: grid; place-items: center; padding: 32px 16px 48px; }
.auth-card { width: 100%; max-width: 420px; }
.auth-card .card { padding: 28px 22px; }
@media (min-width: 560px) { .auth-card .card { padding: 36px 34px; } }
.auth-title { text-align: center; margin: 14px 0 6px; }
.auth-alt { text-align: center; margin-top: 18px; font-size: 14.5px; color: var(--muted); }
.notice { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--radius); background: var(--brand-soft); color: var(--text-2); font-size: 14px; border: 1px solid color-mix(in srgb, var(--brand) 14%, transparent); }
.notice svg { width: 20px; height: 20px; color: var(--brand-text); flex: none; margin-top: 1px; }
.notice.success { background: var(--success-soft); } .notice.success svg { color: var(--success); }
.notice.danger { background: var(--danger-soft); } .notice.danger svg { color: var(--danger); }
.notice.warning { background: var(--warning-soft); } .notice.warning svg { color: var(--warning); }

/* ---------- feed / posts ---------- */
.post { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 14px 0 16px; margin-bottom: 14px; box-shadow: var(--shadow-xs); animation: rise 360ms var(--ease-out) both; }
@media (min-width: 768px) { .post { padding: 16px 0 18px; margin-bottom: 18px; } }
.post-head { display: flex; align-items: center; gap: 10px; padding: 0 14px 12px; }
.post-head .who { flex: 1; min-width: 0; line-height: 1.25; }
.post-head .who a:first-child { font-weight: 700; font-size: 14.5px; }
.post-head .when { color: var(--muted); font-size: 12.5px; }
.post-media { position: relative; background: var(--surface-2); overflow: hidden; user-select: none; }
.post-media { margin: 0 12px; border-radius: var(--radius); }
@media (min-width: 768px) { .post-media { margin: 0 14px; } }
.post-media img { width: 100%; max-height: 720px; object-fit: cover; aspect-ratio: auto; }
.heart-burst { position: absolute; left: 50%; top: 50%; width: 96px; height: 96px; margin: -48px 0 0 -48px; color: #fff; filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.35)); opacity: 0; pointer-events: none; }
.heart-burst.go { animation: burst 820ms var(--spring) both; }
.post-actions { display: flex; align-items: center; gap: 2px; padding: 8px 8px 0; }
.post-actions .icon-btn svg { width: 26px; height: 26px; }
.post-actions .liked { color: var(--like); }
.post-actions .liked svg { animation: pop 420ms var(--spring); }
.post-body { padding: 4px 14px 0; font-size: 14.5px; }
.post-body .likes { font-weight: 700; margin-bottom: 4px; display: block; }
.post-body .text { white-space: pre-wrap; word-break: break-word; }
.post-body .text a { font-weight: 700; margin-right: 6px; }
.post-tag { display: inline-flex; align-items: center; gap: 8px; margin: 10px 14px 0; padding: 6px 10px 6px 6px; border-radius: 12px; background: var(--gradient-soft); font-size: 13px; font-weight: 650; color: var(--text-2); }
.post-foot { padding: 6px 14px 0; font-size: 13.5px; color: var(--muted); }
.post-foot button { color: var(--muted); }
.grid-posts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 14px; }
@media (min-width: 640px) { .grid-posts { grid-template-columns: repeat(3, 1fr); gap: 12px; } }
.tile { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: var(--surface-2); border-radius: var(--radius); border: 1px solid var(--line); }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform 500ms var(--ease); }
.tile:hover img { transform: scale(1.04); }
.tile .tile-text { position: absolute; inset: 0; padding: 10px; display: flex; align-items: center; justify-content: center; text-align: center; font-size: 12.5px; font-weight: 650; color: var(--text-2); background: var(--bg-soft); }
.tile .tile-stats { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 16px; color: #fff; font-weight: 750; background: rgba(0, 0, 0, 0.35); opacity: 0; transition: opacity var(--dur); }
.tile:hover .tile-stats { opacity: 1; }
.tile-stats span { display: inline-flex; align-items: center; gap: 5px; }
.tile-stats svg { width: 18px; height: 18px; }

/* stories-like suggestions row */
.suggest-row { display: flex; gap: 12px; overflow-x: auto; padding: 4px 0 12px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.suggest-row::-webkit-scrollbar { display: none; }
.suggest { flex: none; width: 148px; scroll-snap-align: start; padding: 16px 12px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.suggest .avatar { --s: 64px; }
.suggest .name { font-weight: 700; font-size: 13.5px; max-width: 100%; }

/* comments */
.comment { display: flex; gap: 10px; padding: 10px 0; align-items: flex-start; }
.comment .avatar { --s: 34px; }
.comment .bubble { flex: 1; min-width: 0; font-size: 14px; }
.comment .bubble b { font-weight: 700; margin-right: 6px; }
.comment-form { position: sticky; bottom: calc(var(--tabbar-h) + var(--safe-bottom)); display: flex; gap: 8px; align-items: flex-end; padding: 10px 0; background: var(--bg); border-top: 1px solid var(--line); }
@media (min-width: 768px) { .comment-form { bottom: 0; } }
.comment-form .textarea { min-height: 44px; max-height: 140px; padding: 11px 14px; resize: none; }

/* ---------- profile ---------- */
.profile-head { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center; padding: 6px 0 18px; }
.profile-head .avatar { --s: 86px; }
@media (min-width: 768px) { .profile-head { gap: 32px; padding: 12px 0 24px; } .profile-head .avatar { --s: 124px; } }
.profile-name { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.profile-name h1 { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.stats { display: flex; gap: 22px; margin: 14px 0 12px; }
.stats a, .stats div { display: flex; flex-direction: column; font-size: 13px; color: var(--muted); line-height: 1.25; }
.stats b { font-size: 17px; color: var(--text); font-weight: 750; }
@media (min-width: 768px) { .stats a, .stats div { flex-direction: row; gap: 5px; font-size: 15px; align-items: baseline; } .stats b { font-size: 15px; } }
.profile-bio { font-size: 14.5px; white-space: pre-wrap; word-break: break-word; }
.profile-actions { display: flex; gap: 8px; margin: 14px 0 6px; flex-wrap: wrap; }
.profile-actions .btn { flex: 1 1 auto; min-width: 110px; }
@media (min-width: 768px) { .profile-actions .btn { flex: 0 0 auto; } }
.tabs { display: flex; gap: 4px; padding: 4px; margin-top: 12px; border-radius: var(--pill); background: var(--surface-2); border: 1px solid var(--line); }
.tabs button, .tabs a { flex: 1; display: flex; align-items: center; justify-content: center; gap: 7px; height: 40px; border-radius: var(--pill); color: var(--muted); font-size: 13.5px; font-weight: 700; transition: color var(--dur), background-color var(--dur); }
.tabs [aria-selected='true'] { color: var(--text); background: var(--surface); box-shadow: var(--shadow-xs); }
.tabs svg { width: 16px; height: 16px; }
.vehicle-strip { display: flex; gap: 12px; overflow-x: auto; padding: 4px 0 14px; scrollbar-width: none; }
.vehicle-strip::-webkit-scrollbar { display: none; }
.vehicle-pill { flex: none; display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px; border-radius: var(--pill); border: 1px solid var(--line); background: var(--surface); }
.vehicle-pill .thumb { width: 38px; height: 38px; border-radius: 50%; overflow: hidden; background: var(--surface-2); display: grid; place-items: center; color: var(--muted); flex: none; }
.vehicle-pill .thumb img { width: 100%; height: 100%; object-fit: cover; }
.vehicle-pill .thumb svg { width: 20px; height: 20px; }
.vehicle-pill .t { font-size: 13px; font-weight: 700; line-height: 1.2; }
.vehicle-pill .s { font-size: 12px; color: var(--muted); }
.lock-box { padding: 40px 20px; margin-top: 14px; text-align: center; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); }
.lock-box svg { width: 60px; height: 60px; margin: 0 auto 12px; padding: 14px; border-radius: 18px; background: var(--gradient-soft); color: var(--brand-text); }

/* ---------- garage ---------- */
.vehicle-card { overflow: hidden; display: flex; flex-direction: column; }
.vehicle-cover { position: relative; aspect-ratio: 16 / 9; background: linear-gradient(135deg, var(--surface-2), var(--surface-3)); display: grid; place-items: center; color: var(--faint); overflow: hidden; }
.vehicle-cover img { width: 100%; height: 100%; object-fit: cover; }
.vehicle-cover > svg { width: 64px; height: 64px; }
.vehicle-cover .plate { position: absolute; left: 14px; bottom: 14px; }
.vehicle-cover .cover-btn { position: absolute; right: 10px; top: 10px; background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.vehicle-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 14px; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.kpi { padding: 10px 12px; border-radius: var(--radius-sm); background: var(--bg-soft); }
.kpi b { display: block; font-size: 18px; font-weight: 800; letter-spacing: -0.02em; }
.kpi span { font-size: 12px; color: var(--muted); }
.qr-box { display: grid; place-items: center; padding: 18px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); }
.qr-box svg { width: 100%; max-width: 220px; height: auto; }
.sticker-preview { width: 100%; max-width: 300px; margin: 0 auto; aspect-ratio: 1; border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); }
.sticker-preview svg { width: 100%; height: 100%; }

/* ---------- inbox / chat ---------- */
.inbox-layout { display: grid; grid-template-columns: 1fr; min-height: calc(100vh - var(--topbar-h)); }
@media (min-width: 900px) {
  .inbox-layout { grid-template-columns: 360px 1fr; max-width: var(--content-w); margin: 0 auto; height: calc(100vh - var(--topbar-h) - var(--safe-top)); height: calc(100dvh - var(--topbar-h) - var(--safe-top)); border-left: 1px solid var(--line); border-right: 1px solid var(--line); background: var(--surface); }
}
.inbox-list { border-right: 1px solid var(--line); overflow-y: auto; }
.inbox-list .head { padding: 18px 16px 10px; display: flex; align-items: center; justify-content: space-between; }
.conv { display: flex; align-items: center; gap: 12px; padding: 10px 16px; transition: background-color var(--dur); }
.conv { margin: 0 8px; border-radius: var(--radius); }
.conv:hover, .conv[aria-current='true'] { background: var(--surface-2); }
.conv[aria-current='true'] { box-shadow: inset 3px 0 0 var(--brand); }
.conv .avatar { --s: 54px; }
.conv .meta { flex: 1; min-width: 0; }
.conv .name { font-size: 14.5px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.conv .preview { font-size: 13.5px; color: var(--muted); }
.conv.unread .name, .conv.unread .preview { font-weight: 750; color: var(--text); }
.chat { display: flex; flex-direction: column; min-height: calc(100vh - var(--topbar-h) - var(--tabbar-h)); min-height: calc(100dvh - var(--topbar-h) - var(--tabbar-h) - var(--safe-bottom)); }
@media (min-width: 768px) { .chat { min-height: 0; height: calc(100vh - var(--topbar-h) - var(--safe-top)); height: calc(100dvh - var(--topbar-h) - var(--safe-top)); } }
.chat-head { position: sticky; top: calc(var(--topbar-h) + var(--safe-top)); z-index: 5; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
@media (min-width: 768px) { .chat-head { top: 0; padding: 14px 18px; } }
.chat-head .avatar { --s: 40px; }
.chat-body { flex: 1; padding: 16px 12px; display: flex; flex-direction: column; gap: 3px; overflow-y: auto; }
@media (min-width: 768px) { .chat-body { padding: 20px 22px; } }
.msg { max-width: min(78%, 520px); padding: 9px 14px; border-radius: 20px; font-size: 14.5px; line-height: 1.45; word-break: break-word; white-space: pre-wrap; animation: msgin 260ms var(--ease-out) both; }
.msg.them { align-self: flex-start; background: var(--surface-2); border-bottom-left-radius: 6px; }
.msg.me { align-self: flex-end; background: var(--gradient); color: #fff; border-bottom-right-radius: 6px; }
.msg.template { font-weight: 650; }
.msg.template::before { content: attr(data-icon); margin-right: 6px; }
.msg-time { font-size: 11.5px; color: var(--faint); margin: 2px 6px 8px; }
.msg-time.me { align-self: flex-end; }
.msg-time.them { align-self: flex-start; }
.day-sep { align-self: center; margin: 14px 0 8px; font-size: 12px; color: var(--muted); font-weight: 650; }
.chat-foot { position: sticky; bottom: calc(var(--tabbar-h) + var(--safe-bottom)); padding: 10px 12px; background: var(--bg); border-top: 1px solid var(--line); }
@media (min-width: 768px) { .chat-foot { bottom: 0; padding: 14px 18px; } }
.composer { display: flex; align-items: flex-end; gap: 8px; padding: 5px 5px 5px 16px; border-radius: 24px; border: 1px solid var(--line-strong); background: var(--surface); }
.composer textarea { flex: 1; min-height: 38px; max-height: 140px; padding: 8px 0; border: 0; outline: 0; resize: none; background: transparent; line-height: 1.4; }
.composer .btn { border-radius: 19px; min-height: 38px; }
.quick-replies { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 10px; scrollbar-width: none; }
.quick-replies::-webkit-scrollbar { display: none; }
.quick-replies button { flex: none; height: 34px; padding: 0 14px; border-radius: var(--pill); border: 1px solid var(--line-strong); font-size: 13px; font-weight: 650; background: var(--surface); transition: background-color var(--dur), transform 120ms; }
.quick-replies button:hover { background: var(--surface-2); }
.quick-replies button:active { transform: scale(0.95); }
.seen { align-self: flex-end; font-size: 11.5px; color: var(--muted); margin: 0 6px 6px; display: inline-flex; gap: 4px; align-items: center; }
.seen svg { width: 15px; height: 15px; color: var(--brand); }
.inbox-empty { display: none; }
@media (max-width: 899px) { .inbox-list[data-hide-mobile] { display: none; } .inbox-list { border-right: 0; } }
@media (min-width: 900px) { [data-back-mobile] { display: none; } .inbox-layout .chat { height: 100%; min-height: 0; } .inbox-layout [data-pane] { min-width: 0; overflow: hidden; } }
@media (min-width: 900px) { .inbox-empty { display: grid; place-items: center; text-align: center; padding: 40px; } }

/* ---------- scan page ---------- */
.scan-page { min-height: 100vh; min-height: 100dvh; background: var(--bg-soft); padding: calc(16px + var(--safe-top)) 16px calc(32px + var(--safe-bottom)); }
.scan-shell { max-width: 480px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.scan-top { display: flex; align-items: center; justify-content: space-between; }
.scan-hero { overflow: hidden; }
.scan-hero .vehicle-cover { aspect-ratio: 16 / 10; }
.scan-hero .info { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 12px; }
.privacy-pill { display: inline-flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 12px; background: var(--success-soft); color: var(--success); font-size: 13px; font-weight: 650; }
.privacy-pill svg { width: 18px; height: 18px; flex: none; }
.templates { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tpl { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px; min-height: 92px; border-radius: var(--radius); background: var(--surface); border: 1.5px solid var(--line); text-align: left; font-size: 13.5px; font-weight: 650; line-height: 1.3; transition: border-color var(--dur), transform 140ms var(--spring), background-color var(--dur); }
.tpl .ic { font-size: 22px; line-height: 1; }
.tpl:hover { border-color: var(--line-strong); }
.tpl:active { transform: scale(0.97); }
.tpl[aria-pressed='true'] { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-text); }
.tpl.custom { grid-column: 1 / -1; min-height: 0; flex-direction: row; align-items: center; }
.success-anim { width: 72px; height: 72px; margin: 6px auto 4px; border-radius: 50%; background: var(--success-soft); color: var(--success); display: grid; place-items: center; animation: pop 520ms var(--spring); }
.success-anim svg { width: 38px; height: 38px; }
.success-anim path { stroke-dasharray: 30; stroke-dashoffset: 30; animation: draw 520ms 200ms var(--ease-out) forwards; }

/* ---------- notifications ---------- */
.notif { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: var(--radius-sm); transition: background-color var(--dur); }
.notif:hover { background: var(--surface-2); }
.notif.new { background: color-mix(in srgb, var(--brand) 6%, transparent); }
.notif .avatar { --s: 44px; }
.notif .txt { flex: 1; min-width: 0; font-size: 14px; line-height: 1.4; }
.notif .txt b { font-weight: 700; }
.notif .when { color: var(--muted); font-size: 12.5px; }
.notif > svg { width: 20px; height: 20px; color: var(--muted); flex: none; }
.notif .thumb { width: 44px; height: 44px; border-radius: 8px; overflow: hidden; flex: none; background: var(--surface-2); }
.notif .thumb img { width: 100%; height: 100%; object-fit: cover; }
.notif-ic { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.notif-ic svg { width: 22px; height: 22px; }
.notif-ic.scan { background: var(--brand-soft); color: var(--brand-text); }
.notif-ic.order { background: var(--success-soft); color: var(--success); }
.section-label { font-size: 15px; font-weight: 750; margin: 18px 0 6px; }

/* ---------- compose ---------- */
.dropzone { position: relative; display: grid; place-items: center; aspect-ratio: 4 / 3; border-radius: var(--radius-lg); border: 2px dashed var(--line-strong); background: var(--bg-soft); color: var(--muted); text-align: center; padding: 20px; cursor: pointer; overflow: hidden; transition: border-color var(--dur), background-color var(--dur); }
.dropzone:hover, .dropzone.drag { border-color: var(--brand); background: var(--brand-soft); }
.dropzone svg { width: 46px; height: 46px; margin: 0 auto 10px; }
.dropzone img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.char-count { font-size: 12px; color: var(--faint); text-align: right; }

/* ---------- empty / skeleton / spinner ---------- */
.empty { padding: 56px 20px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty-ic { width: 76px; height: 76px; border-radius: 24px; display: grid; place-items: center; background: var(--gradient-soft); color: var(--brand-text); margin-bottom: 6px; }
.empty-ic svg { width: 36px; height: 36px; }
.empty p { color: var(--muted); max-width: 360px; }
.skel { position: relative; overflow: hidden; background: var(--surface-2); border-radius: 10px; }
.skel::after { content: ''; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--surface) 60%, transparent), transparent); animation: shimmer 1.3s infinite; }
.skel-line { height: 12px; border-radius: 6px; }
.skel-circle { border-radius: 50%; }
.spinner { width: 26px; height: 26px; border-radius: 50%; border: 2.5px solid var(--line-strong); border-top-color: var(--brand); animation: spin 700ms linear infinite; margin: 24px auto; }
.load-more { display: flex; justify-content: center; padding: 18px 0; }

/* ---------- toast / modal / sheet ---------- */
.toasts { position: fixed; left: 50%; top: calc(12px + var(--safe-top)); transform: translateX(-50%); z-index: 1000; display: flex; flex-direction: column; gap: 8px; width: min(420px, calc(100vw - 24px)); pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: var(--elevated); color: var(--text); border: 1px solid var(--line); box-shadow: var(--shadow-lg); font-size: 14px; font-weight: 600; animation: toastin 380ms var(--spring) both; }
.toast.out { animation: toastout 220ms var(--ease) forwards; }
.toast .ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--surface-2); }
.toast .ic svg { width: 18px; height: 18px; }
.toast.success .ic { background: var(--success-soft); color: var(--success); }
.toast.error .ic { background: var(--danger-soft); color: var(--danger); }
.toast.live .ic { background: var(--gradient); color: #fff; }
.toast .t-body { flex: 1; min-width: 0; }
.toast .t-title { font-size: 11.5px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--brand-text); display: flex; align-items: center; gap: 6px; }
.modal-root { position: fixed; inset: 0; z-index: 900; display: flex; align-items: flex-end; justify-content: center; }
@media (min-width: 640px) { .modal-root { align-items: center; padding: 24px; } }
.modal-backdrop { position: absolute; inset: 0; background: var(--overlay); animation: fade 200ms var(--ease) both; }
.modal { position: relative; width: 100%; max-width: 480px; max-height: 92vh; max-height: 92dvh; overflow-y: auto; background: var(--elevated); border-radius: 24px 24px 0 0; padding: 10px 20px calc(22px + var(--safe-bottom)); box-shadow: var(--shadow-lg); animation: sheetin 360ms var(--ease-out) both; }
@media (min-width: 640px) { .modal { border-radius: 24px; padding: 24px; animation: dialogin 280ms var(--ease-out) both; } }
.modal.wide { max-width: 640px; }
.modal-root.closing .modal { animation: sheetout 220ms var(--ease) forwards; }
.modal-root.closing .modal-backdrop { animation: fadeout 220ms var(--ease) forwards; }
.grabber { width: 40px; height: 5px; border-radius: 3px; background: var(--line-strong); margin: 0 auto 14px; }
@media (min-width: 640px) { .grabber { display: none; } }
.modal-title { font-size: 18px; font-weight: 750; letter-spacing: -0.02em; margin-bottom: 6px; }
.modal-text { color: var(--muted); font-size: 14.5px; }
.modal-actions { display: flex; flex-direction: column-reverse; gap: 8px; margin-top: 20px; }
@media (min-width: 640px) { .modal-actions { flex-direction: row; justify-content: flex-end; } }
.sheet-list { display: flex; flex-direction: column; margin: 0 -8px; }
.sheet-list button, .sheet-list a { display: flex; align-items: center; gap: 14px; min-height: 52px; padding: 0 14px; border-radius: 14px; font-weight: 600; font-size: 15px; text-align: left; width: 100%; }
.sheet-list button:hover, .sheet-list a:hover { background: var(--surface-2); }
.sheet-list svg { width: 22px; height: 22px; }
.sheet-list .danger { color: var(--danger); }

/* ---------- legal / content ---------- */
.doc-hero { padding: 48px 0 28px; border-bottom: 1px solid var(--line); background: radial-gradient(700px 240px at 50% -20%, rgba(91, 77, 255, 0.12), transparent 70%); }
.doc-hero .lead { margin-top: 12px; max-width: 640px; }
.doc-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.doc { display: grid; gap: 40px; padding-top: 36px; }
@media (min-width: 960px) { .doc { grid-template-columns: 260px 1fr; gap: 64px; } }
.toc { display: none; }
@media (min-width: 960px) { .toc { display: block; position: sticky; top: 96px; align-self: start; max-height: calc(100vh - 120px); overflow-y: auto; } }
.toc-title { font-size: 12px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.toc a { display: flex; gap: 10px; padding: 7px 10px; border-radius: 10px; font-size: 14px; color: var(--muted); font-weight: 550; transition: background-color var(--dur), color var(--dur); }
.toc a span { color: var(--faint); font-variant-numeric: tabular-nums; min-width: 18px; }
.toc a:hover, .toc a.active { background: var(--surface-2); color: var(--text); }
.doc-body { max-width: 760px; }
.doc-section { padding-bottom: 32px; margin-bottom: 32px; border-bottom: 1px solid var(--line); scroll-margin-top: 90px; }
.doc-section:last-child { border-bottom: 0; }
.doc-section h2 { display: flex; gap: 14px; align-items: baseline; font-size: 22px; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 16px; }
.doc-section h2 .n { color: var(--brand-text); font-variant-numeric: tabular-nums; font-size: 15px; font-weight: 800; padding: 3px 9px; border-radius: 8px; background: var(--brand-soft); }
.clause { display: grid; grid-template-columns: 44px 1fr; gap: 6px; margin-top: 12px; color: var(--text-2); font-size: 15px; line-height: 1.7; }
.clause .n { font-weight: 750; color: var(--text); font-variant-numeric: tabular-nums; }
.doc-callout { margin-top: 16px; padding: 16px 18px; border-radius: var(--radius); background: var(--bg-soft); border-left: 3px solid var(--brand); font-size: 14.5px; color: var(--text-2); }
.about-hero { text-align: center; padding: 56px 0 40px; }
.about-logo { width: 96px; height: 96px; margin: 0 auto 22px; border-radius: 28px; box-shadow: 0 20px 50px rgba(91, 77, 255, 0.35); animation: float 6s var(--ease) infinite; }
.values { display: grid; gap: 16px; }
@media (min-width: 760px) { .values { grid-template-columns: repeat(3, 1fr); } }
.stat-band { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 760px) { .stat-band { grid-template-columns: repeat(4, 1fr); } }
.stat-band div { padding: 22px; border-radius: var(--radius-lg); background: var(--bg-soft); }
.stat-band b { display: block; font-size: 28px; font-weight: 850; letter-spacing: -0.03em; }
.stat-band span { color: var(--muted); font-size: 13.5px; }

/* 404 */
.nf { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 40px 20px; }
.nf .code { font-size: clamp(90px, 22vw, 180px); font-weight: 900; line-height: 0.9; letter-spacing: -0.06em; }

/* ---------- admin ---------- */
.admin { display: grid; grid-template-columns: 1fr; min-height: 100vh; min-height: 100dvh; background: var(--bg-soft); }
@media (min-width: 960px) { .admin { grid-template-columns: 240px 1fr; } }
.admin-side { display: flex; align-items: center; gap: 4px; overflow-x: auto; padding: calc(10px + var(--safe-top)) 12px 10px; background: var(--bg); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; scrollbar-width: none; }
.admin-side::-webkit-scrollbar { display: none; }
.admin-side .brand { margin-right: 10px; flex: none; }
.admin-side .brand small { font-size: 11px; font-weight: 800; letter-spacing: 0.08em; padding: 3px 7px; border-radius: 6px; background: var(--text); color: var(--bg); }
.admin-side a.nav-a, .admin-side button.nav-a { flex: none; display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 12px; border-radius: 11px; font-weight: 600; font-size: 14px; color: var(--muted); }
.admin-side .nav-a svg { width: 20px; height: 20px; }
.admin-side .nav-a:hover { background: var(--surface-2); color: var(--text); }
.admin-side .nav-a[aria-current='page'] { background: var(--gradient); color: #fff; box-shadow: var(--glow); }
.admin-side .nav-a .badge-count { position: static; border: 0; }
@media (min-width: 960px) {
  .admin-side { flex-direction: column; align-items: stretch; height: 100vh; height: 100dvh; padding: 22px 14px; border-bottom: 0; border-right: 1px solid var(--line); overflow: visible; }
  .admin-side .brand { margin: 0 6px 22px; }
  .admin-side .spacer { flex: 1; }
}
.admin-main { padding: 20px 16px 48px; min-width: 0; }
@media (min-width: 960px) { .admin-main { padding: 32px 36px 56px; } }
.admin-title { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.kpi-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 900px) { .kpi-grid { grid-template-columns: repeat(4, 1fr); } }
.kpi-card { padding: 18px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); }
.kpi-card .k { font-size: 12.5px; color: var(--muted); font-weight: 650; }
.kpi-card .v { font-size: 28px; font-weight: 850; letter-spacing: -0.03em; margin-top: 6px; }
.chart { width: 100%; height: 160px; }
.chart .bar { fill: var(--qr-indigo); opacity: 0.85; transition: opacity var(--dur); }
.chart .bar:hover { opacity: 1; }
.chart text { fill: var(--muted); font-size: 10px; }
.chart line { stroke: var(--line); }
.table-wrap { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--line); background: var(--surface); }
.table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 720px; }
.table th { text-align: left; font-size: 12px; font-weight: 750; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--bg-soft); white-space: nowrap; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background-color var(--dur); }
.table tbody tr:hover { background: var(--bg-soft); }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.toolbar .input, .toolbar .select { width: auto; min-width: 160px; flex: 1 1 200px; min-height: 42px; background: var(--surface); border-color: var(--line); }
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.report-card { padding: 18px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
.snapshot { padding: 12px 14px; border-radius: var(--radius-sm); background: var(--bg-soft); font-size: 14px; white-space: pre-wrap; word-break: break-word; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 8px 14px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; word-break: break-word; }

/* dev mail */
.mail-frame { width: 100%; max-height: 640px; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; color: #0b0d12; }

/* ---------- live field checks (✓ / ✕) ---------- */
.field-status { display: none; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; }
.field-status:not(:empty) { display: inline-flex; }
.field-status svg { width: 16px; height: 16px; flex: none; }
.field-status.ok { color: var(--success); }
.field-status.bad { color: var(--danger); }
.field-status .checking { color: var(--muted); font-weight: 500; }
.field.is-valid .input { border-color: color-mix(in srgb, var(--success) 55%, transparent); }
.field.is-invalid .input { border-color: var(--danger); background: var(--danger-soft); }
.u-suggest { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.u-suggest .chip { cursor: pointer; height: 30px; transition: transform 120ms var(--spring); }
.u-suggest .chip:active { transform: scale(0.95); }
.pw-strength { display: flex; align-items: center; gap: 10px; }
.pw-strength .pw-meter { flex: 1; }
.pw-label { font-size: 12px; font-weight: 700; min-width: 0; }
.pw-label[data-level='1'] { color: var(--danger); }
.pw-label[data-level='2'] { color: var(--warning); }
.pw-label[data-level='3'] { color: var(--success); }

/* ---------- e-mail code ---------- */
.verify-mail { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: var(--radius); background: var(--gradient-soft); font-size: 14px; color: var(--text-2); word-break: break-word; }
.verify-mail svg { width: 26px; height: 26px; color: var(--brand-text); flex: none; }
.code-boxes { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.code-box {
  width: 100%; min-width: 0; height: 58px; border-radius: 14px; border: 1.5px solid var(--line-strong); background: var(--surface-2);
  text-align: center; font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--text); outline: none;
  transition: border-color var(--dur), box-shadow var(--dur), background-color var(--dur);
}
.code-box:focus { border-color: var(--brand); background: var(--surface); box-shadow: var(--ring-brand); }
.shake .code-boxes { animation: shake 380ms var(--ease); }
.shake .code-box { border-color: var(--danger); }

/* ---------- vehicle form ---------- */
.kind-switch { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.kind-opt input { position: absolute; opacity: 0; pointer-events: none; }
.kind-opt span {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; height: 78px; border-radius: var(--radius);
  border: 1.5px solid var(--line); background: var(--surface); font-size: 13px; font-weight: 700; color: var(--muted); cursor: pointer;
  transition: border-color var(--dur), color var(--dur), background-color var(--dur), transform 140ms var(--spring);
}
.kind-opt span svg { width: 28px; height: 28px; }
.kind-opt:active span { transform: scale(0.97); }
.kind-opt input:checked + span { border-color: transparent; color: #fff; background: var(--gradient); box-shadow: var(--glow); }
.kind-opt input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.plate-input .input { padding-left: 52px; font-weight: 800; letter-spacing: 0.08em; font-variant-numeric: tabular-nums; text-transform: uppercase; }
.plate-flag { position: absolute; left: 8px; top: 50%; transform: translateY(-50%); width: 34px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--plate-band); color: #fff; font-size: 11px; font-weight: 800; pointer-events: none; }
.picker-box { position: relative; }
.picker .input { padding-right: 40px; }
.picker-caret { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; transition: transform var(--dur); }
.picker-caret svg { width: 18px; height: 18px; }
.picker.open .picker-caret { transform: translateY(-50%) rotate(180deg); }
.picker.disabled { opacity: 0.55; }
.picker.chosen .input { font-weight: 650; }
.picker-list {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 20; max-height: 280px; overflow-y: auto; padding: 6px;
  border-radius: var(--radius); background: var(--elevated); border: 1px solid var(--line); box-shadow: var(--shadow-lg);
}
.picker-group { padding: 8px 10px 4px; font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--brand-text); }
.picker-opt { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border-radius: 10px; font-size: 14.5px; cursor: pointer; }
.picker-opt:hover, .picker-opt[data-active] { background: var(--surface-2); }
.picker-opt[aria-selected='true'] { color: var(--brand-text); font-weight: 700; }
.picker-opt svg { width: 16px; height: 16px; }
.picker-empty { padding: 12px; font-size: 13.5px; color: var(--muted); }
.missing-link { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; margin-top: -6px; }
.missing-link svg { width: 16px; height: 16px; }
.color-field { border: 0; padding: 0; margin: 0; min-width: 0; }
.color-field legend { padding: 0; margin-bottom: 8px; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { position: relative; cursor: pointer; }
.swatch input { position: absolute; opacity: 0; pointer-events: none; }
.swatch .color-dot { transition: transform 140ms var(--spring), box-shadow var(--dur); }
.swatch:hover .color-dot { transform: scale(1.08); }
.swatch input:checked + .color-dot { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--brand); transform: scale(1.06); }
.swatch input:focus-visible + .color-dot { outline: 2px solid var(--brand); outline-offset: 4px; }
.color-dot { display: inline-block; width: var(--s, 12px); height: var(--s, 12px); flex: none; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(13, 16, 48, 0.18); }
.color-dot.multi { background: conic-gradient(#e5383b, #f5c518, #1f9d55, #2f5bff, #7c4dff, #e5383b); }

/* ---------- scan page extras ---------- */
.owner-line { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface-2); font-size: 14px; }
.owner-line > svg { width: 20px; height: 20px; color: var(--brand-text); flex: none; }
.cta-ic { width: 52px; height: 52px; margin: 0 auto; border-radius: 16px; display: grid; place-items: center; background: var(--gradient); color: #fff; box-shadow: var(--glow); }
.cta-ic svg { width: 26px; height: 26px; }

/* ---------- message requests ---------- */
.tab-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 6px; border-radius: var(--pill); background: var(--gradient); color: #fff; font-size: 11px; font-weight: 800; }
.request-bar { display: flex; flex-direction: column; gap: 12px; padding: 14px; border-radius: var(--radius); background: var(--gradient-soft); border: 1px solid var(--line); }
.request-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.request-actions .btn { padding: 0 10px; }
@media (max-width: 420px) { .request-actions { grid-template-columns: 1fr; } }
.request-bar .link { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; }
.request-bar .link svg { width: 16px; height: 16px; }
.notif-ic.ok { background: var(--success-soft); color: var(--success); }
.notif-ic:not(.scan):not(.order):not(.ok) { background: var(--surface-2); color: var(--muted); }

@keyframes shake { 0%, 100% { transform: none; } 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(4px); } }

/* ---------- motion ---------- */
.fade-in { animation: rise 420ms var(--ease-out) both; }
.view-enter { animation: viewin 280ms var(--ease-out) both; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { to { transform: translateX(100%); } }
@keyframes pop { 0% { transform: scale(0.6); } 60% { transform: scale(1.15); } 100% { transform: scale(1); } }
@keyframes ping { 0% { transform: scale(0.6); opacity: 0.45; } 100% { transform: scale(2.2); opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes viewin { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes msgin { from { opacity: 0; transform: translateY(6px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes burst { 0% { opacity: 0; transform: scale(0.3); } 15% { opacity: 0.95; transform: scale(1.15); } 30% { transform: scale(0.95); } 45% { transform: scale(1); opacity: 0.95; } 80% { opacity: 0.95; } 100% { opacity: 0; transform: scale(1.1) translateY(-20px); } }
@keyframes toastin { from { opacity: 0; transform: translateY(-14px) scale(0.96); } to { opacity: 1; transform: none; } }
@keyframes toastout { to { opacity: 0; transform: translateY(-10px) scale(0.97); } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeout { to { opacity: 0; } }
@keyframes sheetin { from { transform: translateY(100%); } to { transform: none; } }
@keyframes sheetout { to { transform: translateY(100%); } }
@keyframes dialogin { from { opacity: 0; transform: translateY(12px) scale(0.97); } to { opacity: 1; transform: none; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@media (min-width: 640px) { .modal-root.closing .modal { animation: fadeout 180ms var(--ease) forwards; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
}
