@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap");

:root {
  color-scheme: dark;
  /* Mobile-first Vzhiksi Luxury Glass UX tokens */
  --bg-obsidian: #080b12;
  --bg-base: #101522;
  --bg-deep: #080b12;
  --bg-surface: #242b3c;
  --bg-surface-2: #1c2233;
  --bg-surface-hover: #2c3549;
  --glass-surface: linear-gradient(168deg, rgba(38, 47, 70, 0.72) 0%, rgba(20, 25, 39, 0.92) 100%);
  --glass-border: rgba(255, 255, 255, 0.11);
  --glass-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.14);
  --accent-yellow: #f0ed67;
  --accent-yellow-hover: #f7f483;
  --accent-cyan: #6ce5df;
  --accent-mint: #9cddbc;
  --accent-coral: #ff9caa;
  --text-primary: #f4f7ff;
  --text-secondary: #cfd7ea;
  --text-muted: #93a0bd;
  --border: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.18);
  --shadow-card: 0 20px 44px rgba(0, 0, 0, 0.42);
  --shadow-frame: 0 30px 70px rgba(0, 0, 0, 0.7);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-pill: 999px;
  --font-sans: Manrope, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, sans-serif;

  /* Admin Console & shared aliases */
  --bg: #080b12;
  --panel: #242b3c;
  --panel2: #2c3447;
  --text: #f5f6fb;
  --muted: #9da8bd;
  --line: #ffffff16;
  --accent: #f0ed67;
  --yellow: #f0ed67;
  --cyan: #6ce5df;
  --purple: #b8a1f7;
  --pink: #f0a2bf;
  --green: #9cddbc;
  --red: #ff9caa;
  --font: var(--font-sans);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background:
    radial-gradient(760px 440px at 50% 0%, rgba(240, 237, 103, 0.08) 0%, transparent 70%),
    radial-gradient(620px 380px at 14% 28%, rgba(108, 229, 223, 0.07) 0%, transparent 72%),
    #080b12;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button,
a {
  cursor: pointer;
}

button {
  border: 0;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

h1 {
  font-size: 28px;
  letter-spacing: -1px;
  line-height: 1.3;
}

h2 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.015em;
}

h3 {
  font-size: 1.05rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}

h4 {
  font-size: 0.96rem;
  font-weight: 600;
}

small,
.small {
  font-size: 12px;
}

.muted {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.cyan {
  color: var(--cyan);
}

.yellow {
  color: var(--yellow);
}

.danger {
  color: var(--red);
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.eyebrow {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 2.2px;
  font-weight: 800;
  color: var(--cyan);
}

/* ==========================================================================
   Mobile-First Phone Frame & App Stage
   ========================================================================== */

.app-stage {
  display: flex;
  justify-content: center;
  padding: 20px 14px 36px;
}

.phone-frame {
  width: 100%;
  max-width: 440px;
  min-height: calc(100vh - 56px);
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: 28px;
  box-shadow: var(--shadow-frame);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: clip;
  transition: max-width 0.24s ease;
}

.phone-frame.is-wide {
  max-width: 860px;
}

.app-content {
  flex: 1 1 auto;
  padding: 16px 16px 96px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.phone-frame.is-onboarding .app-content {
  padding-bottom: 28px;
}

/* ==========================================================================
   Bottom Navigation
   ========================================================================== */

.bottom-nav {
  position: sticky;
  bottom: 0;
  z-index: 20;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  justify-content: space-around;
  background: rgba(21, 26, 40, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  padding: 6px 4px calc(8px + env(safe-area-inset-bottom, 0px));
  margin-top: auto;
}

.bottom-nav.is-hidden {
  display: none;
}

.nav-tab {
  flex: 1 1 0;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 6px 2px;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: #94a3b8;
  font-size: 0.72rem;
  font-weight: 550;
  transition: color 0.16s ease, background 0.16s ease;
}

.nav-tab:hover {
  background: rgba(255, 255, 255, 0.04);
}

.nav-tab.is-active {
  color: #f4ef62;
  background: rgba(244, 239, 98, 0.09);
}

.nav-tab:focus-visible {
  outline: 2px solid #8ed9b6;
  outline-offset: -2px;
}

.nav-tab.is-active .nav-icon {
  color: #8ed9b6;
}

.nav-label {
  white-space: nowrap;
}

.nav-icon {
  width: 21px;
  height: 21px;
}

/* ==========================================================================
   Core Cards, Sections & Surfaces
   ========================================================================== */

section[class^="view-"] {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 2px 2px 0;
}

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.card-subtle {
  background: var(--bg-surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.empty-state-card {
  text-align: center;
  align-items: center;
  padding: 26px 18px;
}

.empty-state-inline {
  text-align: center;
  padding: 18px 10px;
}

.info-banner {
  background: rgba(108, 229, 223, 0.1);
  border: 1px solid rgba(108, 229, 223, 0.28);
  border-radius: var(--radius-md);
  padding: 11px 13px;
  font-size: 0.86rem;
  color: var(--text-secondary);
}

.info-banner strong {
  color: var(--text-primary);
}

.alert-card {
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.alert-warning {
  background: rgba(255, 156, 170, 0.1);
  border: 1px solid rgba(255, 156, 170, 0.34);
  color: var(--text-primary);
}

.alert-warning strong,
.alert-warning h3 {
  color: var(--accent-coral);
}

.preview-box {
  background: var(--bg-surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 11px 13px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.preview-label {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-cyan);
  font-weight: 650;
}

.telegram-bubble {
  background: rgba(108, 229, 223, 0.1);
  border-left: 3px solid var(--accent-cyan);
  border-radius: 8px;
  padding: 9px 11px;
  font-size: 0.87rem;
  color: var(--text-primary);
}

.admin-entry-card {
  border-style: dashed;
  border-color: rgba(108, 229, 223, 0.28);
}

/* ==========================================================================
   Badges & Pills
   ========================================================================== */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 650;
  white-space: nowrap;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.badge-accent,
.badge.cyan {
  background: rgba(108, 229, 223, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(108, 229, 223, 0.32);
}

.badge-success,
.badge.green {
  background: rgba(156, 221, 188, 0.16);
  color: var(--accent-mint);
  border: 1px solid rgba(156, 221, 188, 0.35);
}

.badge-warning,
.badge.red {
  background: rgba(255, 156, 170, 0.16);
  color: var(--accent-coral);
  border: 1px solid rgba(255, 156, 170, 0.35);
}

.badge.yellow {
  background: rgba(240, 237, 103, 0.16);
  color: var(--yellow);
  border: 1px solid rgba(240, 237, 103, 0.35);
}

.badge-neutral {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

/* ==========================================================================
   Buttons & Switches
   ========================================================================== */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 11px 16px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.09);
  color: var(--text-primary);
  font-weight: 650;
  font-size: 0.92rem;
  transition: transform 0.12s ease, background-color 0.16s ease, border-color 0.16s ease, opacity 0.16s ease;
}

.btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.14);
}

.btn:active:not(:disabled) {
  transform: scale(0.98);
  opacity: 0.9;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-block {
  width: 100%;
}

.btn-sm {
  min-height: 38px;
  padding: 7px 13px;
  font-size: 0.82rem;
  border-radius: 12px;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-lg {
  min-height: 50px;
  padding: 14px 18px;
  font-size: 1rem;
  border-radius: 14px;
}

.btn-primary,
.btn.primary {
  background: var(--accent-yellow);
  color: #151a28;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(244, 239, 98, 0.22);
}

.btn-primary:hover:not(:disabled),
.btn.primary:hover:not(:disabled) {
  background: var(--accent-yellow-hover);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.09);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.08);
}

.btn-secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.14);
}

.btn-danger,
.btn.red {
  background: rgba(255, 156, 170, 0.15);
  color: var(--accent-coral);
  border-color: rgba(255, 156, 170, 0.26);
}

.btn-danger:hover:not(:disabled),
.btn.red:hover:not(:disabled) {
  background: rgba(255, 156, 170, 0.24);
}

.btn.cyan {
  background: rgba(115, 223, 217, 0.12);
  color: var(--cyan);
  border-color: rgba(115, 223, 217, 0.24);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  border-color: rgba(255, 255, 255, 0.06);
}

.btn-ghost:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.09);
  color: var(--text-primary);
}

.btn-link,
.link-btn {
  background: transparent;
  border: none;
  padding: 2px 4px;
  color: var(--accent-cyan);
  font-size: 0.84rem;
  font-weight: 600;
  text-decoration: none;
}

.btn-link:hover,
.link-btn:hover {
  text-decoration: underline;
}

.switch-btn,
.view-schedules .switch-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 51px;
  height: 31px;
  min-width: 51px;
  min-height: 31px;
  padding: 2px;
  border-radius: 999px;
  border: 0;
  background: rgba(255, 255, 255, 0.16);
  flex-shrink: 0;
  transition: background-color 0.22s ease, opacity 0.16s ease;
}

.switch-btn.is-on,
.view-schedules .switch-btn.is-on {
  background: #69d49f;
}

.switch-btn .ios-switch-thumb {
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  transform: translateX(0);
  transition: transform 0.22s cubic-bezier(0.25, 0.8, 0.25, 1);
  pointer-events: none;
}

.switch-btn.is-on .ios-switch-thumb {
  transform: translateX(20px);
}

.switch-btn:active:not(:disabled) .ios-switch-thumb {
  transform: scale(0.95);
}

.switch-btn.is-on:active:not(:disabled) .ios-switch-thumb {
  transform: translateX(20px) scale(0.95);
}

.switch-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ==========================================================================
   Forms, Inputs & Chips
   ========================================================================== */

.stack-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.inline-form {
  display: flex;
  gap: 8px;
  align-items: center;
}

.inline-form input {
  flex: 1 1 auto;
  min-width: 0;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.field-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.field-hint {
  font-size: 0.77rem;
  color: var(--text-muted);
}

input[type="text"],
input[type="tel"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="time"],
input[type="search"],
select,
textarea {
  width: 100%;
  background: var(--bg-surface-2);
  border: 1px solid var(--border-strong);
  border-radius: 11px;
  padding: 10px 12px;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px rgba(108, 229, 223, 0.16);
}

input[type="file"] {
  background: var(--bg-surface-2);
  border: 1px dashed var(--border-strong);
  border-radius: 11px;
  padding: 9px 10px;
  font-size: 0.84rem;
  color: var(--text-secondary);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.days-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.day-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 11px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  background: var(--bg-surface-2);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.day-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.day-chip.is-selected,
.day-chip:has(input:checked) {
  background: rgba(240, 237, 103, 0.18);
  border-color: var(--accent-yellow);
  color: var(--accent-yellow);
}

.check-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  cursor: pointer;
}

.check-row input[type="checkbox"],
.check-row input[type="radio"] {
  width: 17px;
  height: 17px;
  accent-color: var(--accent-yellow);
  flex-shrink: 0;
}

.stack-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

/* ==========================================================================
   Lists
   ========================================================================== */

.plain-list,
.voice-samples,
.steps-instruction {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: var(--text-secondary);
  font-size: 0.88rem;
}

.summary-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.summary-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--bg-surface-2);
  font-size: 0.88rem;
}

.summary-list li span {
  color: var(--text-muted);
}

/* ==========================================================================
   Onboarding
   ========================================================================== */

.onboarding-progress {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.onboarding-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.onboarding-progress-title {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.onboarding-steps-bar {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 5px;
}

.step-pill {
  text-align: center;
  padding: 5px 4px;
  border-radius: 8px;
  background: var(--bg-surface-2);
  border: 1px solid var(--border);
  font-size: 0.72rem;
  font-weight: 650;
  color: var(--text-muted);
}

.step-pill.is-done {
  background: rgba(156, 221, 188, 0.16);
  border-color: rgba(156, 221, 188, 0.4);
  color: var(--accent-mint);
}

.step-pill.is-active {
  background: rgba(240, 237, 103, 0.18);
  border-color: var(--accent-yellow);
  color: var(--accent-yellow);
}

.discovered-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 6px;
}

.discovered-vehicle-card {
  background: var(--bg-surface-2);
  border: 1px solid rgba(108, 229, 223, 0.28);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.discovered-vehicle-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* ==========================================================================
   Vehicle Home («Авто»)
   ========================================================================== */

.vehicle-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.vehicle-switcher {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.vehicle-pill {
  padding: 7px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 600;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.vehicle-pill.is-active {
  background: rgba(240, 237, 103, 0.16);
  border-color: var(--accent-yellow);
  color: var(--accent-yellow);
}

.vehicle-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 2px;
}

.nrt-status {
  font-size: 0.78rem;
  font-weight: 650;
}

.nrt-status.is-online {
  color: var(--accent-mint);
}

.nrt-status.is-offline {
  color: var(--accent-coral);
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-mint);
  box-shadow: 0 0 8px var(--accent-mint);
  flex-shrink: 0;
  animation: pulseDot 2s infinite ease-in-out;
}

@keyframes pulseDot {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.45;
    transform: scale(0.85);
  }
}

.hero-vehicle-card {
  background: linear-gradient(165deg, #273047 0%, var(--bg-surface) 58%, #1e2536 100%);
}

.hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.hero-image-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 0 4px;
  min-height: 132px;
}

.hero-image-wrap::before {
  content: "";
  position: absolute;
  inset: 14% 12% 6%;
  background: radial-gradient(ellipse at center, rgba(108, 229, 223, 0.18) 0%, rgba(240, 237, 103, 0.05) 45%, transparent 72%);
  pointer-events: none;
}

.hero-car-img {
  position: relative;
  width: 100%;
  max-width: 310px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 14px 20px rgba(0, 0, 0, 0.45));
}

.telemetry-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.telemetry-item {
  background: rgba(15, 20, 32, 0.48);
  border: 1px solid var(--border);
  border-radius: 13px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.telemetry-item strong {
  font-size: 0.98rem;
  font-variant-numeric: tabular-nums;
}

.engine-controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.nrt-progress {
  background: var(--bg-surface-2);
  border: 1px solid rgba(108, 229, 223, 0.25);
  border-radius: 13px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.launch-progress-bar {
  position: relative;
  width: 100%;
  height: 6px;
  margin-top: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.launch-progress-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  left: -42%;
  width: 42%;
  border-radius: 999px;
  background: linear-gradient(90deg, #8ed9b6 0%, #f4ef62 65%, #8ed9b6 100%);
  box-shadow: 0 0 10px rgba(244, 239, 98, 0.35);
  animation: pulse-launch-crawl 1.45s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes pulse-launch-crawl {
  0% { left: -42%; width: 32%; }
  50% { left: 28%; width: 52%; }
  100% { left: 102%; width: 32%; }
}

@media (prefers-reduced-motion: reduce) {
  .launch-progress-fill {
    animation: none;
    left: 0;
    width: 60%;
  }
}

.nrt-progress-label {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--accent-cyan);
}

.nrt-progress-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.nrt-step {
  flex: 1 1 auto;
  text-align: center;
  padding: 5px 8px;
  border-radius: 8px;
  font-size: 0.74rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.nrt-step.is-done {
  background: rgba(156, 221, 188, 0.14);
  border-color: rgba(156, 221, 188, 0.42);
  color: var(--accent-mint);
}

.nrt-step.is-active {
  background: rgba(240, 237, 103, 0.18);
  border-color: var(--accent-yellow);
  color: var(--accent-yellow);
}

.limits-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.quota-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  font-size: 0.84rem;
}

.quota-pill span {
  color: var(--text-muted);
}

.quota-pill strong {
  color: var(--accent-mint);
  font-weight: 650;
}

.limit-banner {
  gap: 10px;
}

/* Climate & Heaters */

.climate-temp-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 13px;
  background: var(--bg-surface-2);
  border: 1px solid var(--border);
}

.climate-temp-value {
  font-size: 1.55rem;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  color: var(--accent-yellow);
  line-height: 1.15;
}

.stepper-controls {
  display: flex;
  gap: 8px;
}

.stepper-btn {
  width: 42px;
  height: 42px;
  padding: 0;
  font-size: 1.25rem;
  border-radius: 12px;
}

.heaters-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.heaters-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.heater-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 11px 12px;
  border-radius: 13px;
  border: 1px solid var(--border);
  background: var(--bg-surface-2);
  color: var(--text-secondary);
  text-align: left;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.heater-tile:hover:not(:disabled) {
  border-color: var(--border-strong);
  background: var(--bg-surface-hover);
}

.heater-tile.is-on {
  background: rgba(240, 237, 103, 0.14);
  border-color: rgba(240, 237, 103, 0.65);
  color: var(--text-primary);
}

.heater-tile:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.heater-name {
  font-size: 0.83rem;
  font-weight: 600;
}

.heater-state {
  font-size: 0.75rem;
  font-weight: 650;
  color: var(--text-muted);
}

.heater-tile.is-on .heater-state {
  color: var(--accent-yellow);
}

/* Recent events */

.events-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.event-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 11px;
  background: var(--bg-surface-2);
  border: 1px solid var(--border);
}

.event-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.87rem;
}

.event-time {
  font-size: 0.76rem;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ==========================================================================
   Schedules («Расписание»)
   ========================================================================== */

.schedules-list {
  display: grid;
  gap: 16px;
}

.view-schedules > .section-head {
  justify-content: space-between;
}

.schedule-card {
  display: grid;
  gap: 12px;
  border-radius: 20px;
}

.schedule-card-top, .schedule-vehicle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.schedule-vehicle > :first-child {
  color: var(--accent-mint);
  min-width: 0;
  overflow-wrap: anywhere;
}

.schedule-vehicle > :last-child {
  flex-shrink: 0;
}

.view-schedules [hidden] {
  display: none;
}

.schedule-card p, .schedule-form-card p {
  margin: 0;
}

.schedule-time {
  font-size: 2rem;
  line-height: 1;
  font-weight: 750;
}

.schedule-meta {
  display: grid;
  gap: 6px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 0.86rem;
}

.schedule-meta h3 {
  margin: 0;
  font-size: 1.08rem;
  overflow-wrap: anywhere;
}

.schedule-next {
  font-size: 0.83rem;
}

.schedule-next.is-enabled {
  color: var(--accent-mint);
}

.schedule-actions {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 8px;
}

.schedule-actions > .btn {
  width: 100%;
  justify-content: center;
}

.confirm-delete-modal {
  max-width: 360px;
}

.confirm-delete-text {
  margin: 0 0 18px;
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.45;
}

.confirm-delete-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.confirm-delete-actions > .btn {
  width: 100%;
  justify-content: center;
}

.schedule-card [data-live-actions="schedule-skip"]:empty {
  display: none;
}

.view-schedules button, .schedule-form-card select, .schedule-form-card input[type="time"],
.schedule-form-card .day-chip {
  min-height: 44px;
}

.schedule-form-card select, .schedule-form-card input[type="time"] {
  min-width: 0;
}

.schedule-form-card .day-chip {
  min-width: 44px;
  border-radius: 12px;
}

.schedule-form-card .day-chip:has(input:checked) {
  color: var(--accent-mint);
  border-color: var(--accent-mint);
  background: #293e42;
}

.schedule-form-card .day-chip:focus-within {
  outline: 2px solid var(--accent-yellow);
  outline-offset: 2px;
}

.schedule-back {
  align-self: flex-start;
  margin-bottom: 8px;
  padding-inline: 0;
  background: transparent;
  border-color: transparent;
}

.schedule-form-card {
  margin-top: 12px;
}

.schedule-days {
  padding: 0;
  border: 0;
  margin: 0;
  min-width: 0;
}

.schedule-days legend {
  padding: 0;
  margin-bottom: 6px;
}

.schedule-preview {
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.schedule-preview p {
  margin-top: 4px;
}

/* ==========================================================================
   Access & Transfer («Доступ»)
   ========================================================================== */

.selected-vehicle-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 11px;
  background: var(--bg-surface-2);
  border: 1px solid var(--border);
}

.access-list-section,
.invitations-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.invite-details {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.revoke-box {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding-top: 6px;
  border-top: 1px solid var(--border);
}

/* ==========================================================================
   Profile & History («Профиль»)
   ========================================================================== */

.garage-list,
.claims-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.garage-item,
.claim-card {
  background: var(--bg-surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.garage-item-head,
.claim-card-head,
.channel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.claim-card-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.8rem;
}

.channel-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.history-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filter-chip {
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--bg-surface-2);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
}

.filter-chip.is-active {
  background: rgba(108, 229, 223, 0.16);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.history-row {
  background: var(--bg-surface-2);
  border: 1px solid var(--border);
  border-radius: 13px;
  padding: 11px 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.history-row.is-error {
  border-color: rgba(255, 156, 170, 0.35);
}

.history-row-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.history-row-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.78rem;
}

/* ==========================================================================
   Modals, OMODA iframe, OAuth & Telegram Sheets
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(8, 11, 18, 0.76);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-card {
  width: 100%;
  max-width: 420px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-frame);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.modal-body-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.segmented-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 4px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  margin-bottom: 14px;
}

.seg-tab {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 9px 10px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.seg-tab.is-active {
  background: var(--accent);
  color: #151a28;
}

.oj-iframe-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.oj-iframe-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
}

.oj-iframe {
  width: 100%;
  height: 420px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #ffffff;
}

.oj-fallback-details {
  margin-top: 12px;
  border-top: 1px solid var(--border);
  padding-top: 10px;
}

.oj-fallback-details summary {
  cursor: pointer;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 10px;
}

.linked-status-card {
  padding: 12px;
  border-radius: 14px;
  background: rgba(156, 221, 188, 0.08);
  border: 1px solid rgba(156, 221, 188, 0.28);
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 12px 0;
}

.device-sync-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.device-sync-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 13px;
}

.oauth-brand-pair {
  display: flex;
  align-items: center;
  gap: 8px;
}

.oauth-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 999px;
}

.oauth-pill-yandex {
  background: rgba(108, 229, 223, 0.16);
  color: var(--cyan);
}

.oauth-pill-pulse {
  background: rgba(240, 237, 103, 0.16);
  color: var(--accent);
}

.nrt-wait-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(108, 229, 223, 0.08);
  border: 1px solid rgba(108, 229, 223, 0.25);
  font-size: 13px;
}

.code-pill-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 6px;
}

.code-pill {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 6px 12px;
  border-radius: 10px;
  background: rgba(240, 237, 103, 0.14);
  color: var(--accent);
  border: 1px solid rgba(240, 237, 103, 0.35);
}

.tg-chat-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border-radius: 14px;
  background: #141926;
  border: 1px solid var(--border);
  margin-bottom: 14px;
}

.tg-msg {
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.4;
  max-width: 92%;
}

.tg-msg-bot {
  align-self: flex-start;
  background: #242b3c;
  color: var(--text);
}

.tg-msg-user {
  align-self: flex-end;
  background: rgba(108, 229, 223, 0.18);
  color: var(--cyan);
}

.tg-deeplink-hint {
  font-size: 11px;
  color: var(--muted);
}

.tg-deeplink-hint span {
  color: var(--cyan);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.tg-steps-list {
  margin: 0 0 14px;
  padding: 12px 14px 12px 30px;
  border-radius: 14px;
  background: #141926;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text);
}

.tg-waiting-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(108, 229, 223, 0.08);
  border: 1px solid rgba(108, 229, 223, 0.24);
  margin-bottom: 14px;
}

.tg-waiting-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--cyan);
  flex: 0 0 9px;
  box-shadow: 0 0 0 0 rgba(108, 229, 223, 0.65);
  animation: tg-pulse 1.8s ease-out infinite;
}

@keyframes tg-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(108, 229, 223, 0.65);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(108, 229, 223, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(108, 229, 223, 0);
  }
}

.tg-waiting-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.tg-waiting-ttl {
  font-size: 12px;
  margin-top: 2px;
}

.channel-sub-actions {
  margin-top: 10px;
}

.icon-close {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
}

.icon-close:hover {
  background: rgba(255, 255, 255, 0.14);
}

/* ==========================================================================
   Toast Stack
   ========================================================================== */

.toast-stack {
  position: fixed;
  top: 64px;
  right: 16px;
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(350px, calc(100vw - 32px));
  pointer-events: none;
}

.toast-item {
  pointer-events: auto;
  background: rgba(26, 33, 50, 0.96);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-strong);
  border-left: 4px solid var(--accent-mint);
  border-radius: 14px;
  padding: 11px 13px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  animation: toastIn 0.22s ease-out;
}

.toast-item.toast-sms {
  border-left-color: var(--accent-yellow);
}

.toast-item.toast-telegram {
  border-left-color: var(--accent-cyan);
}

.toast-item.toast-warning {
  border-left-color: var(--accent-coral);
}

.toast-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.toast-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
}

.toast-message {
  font-size: 0.82rem;
  color: var(--text-secondary);
  word-break: break-word;
}

.toast-close {
  border: none;
  background: transparent;
  color: var(--text-muted);
  padding: 2px 4px;
  font-size: 0.9rem;
  line-height: 1;
}

.toast-close:hover {
  color: var(--text-primary);
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ==========================================================================
   Admin Console & Desktop Workspace Classes (Preserved)
   ========================================================================== */

.workspace {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  max-width: 1680px;
  margin: 0 auto;
  min-height: 100vh;
}

.sidebar {
  padding: 18px 16px;
  border-right: 1px solid var(--line);
  background: #1b2130a0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: sticky;
  top: 0;
  height: 100vh;
  max-height: 100vh;
  align-self: start;
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 10px;
}

.brandmark {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--yellow), #faa1c6 65%, #b98bff);
  border-radius: 11px;
  transform: rotate(-8deg);
  display: grid;
  place-items: center;
  color: #1d2535;
  font-weight: 800;
  font-size: 22px;
}

.brand strong {
  font-size: 22px;
  letter-spacing: 3px;
}

.brand small {
  font-size: 9px;
  letter-spacing: 2px;
  color: var(--muted);
  display: block;
  margin-top: 2px;
}

.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar nav button {
  padding: 9px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: none;
  color: var(--muted);
  text-align: left;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
}

.sidebar nav button:hover {
  background: #ffffff06;
  color: var(--text);
}

.sidebar nav button.active {
  color: var(--yellow);
  background: linear-gradient(90deg, #efeb6917, #efeb6906);
  box-shadow: inset 2px 0 var(--yellow);
}

.main {
  padding: 26px 34px;
  min-width: 0;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.between {
  justify-content: space-between;
}

.wrap {
  flex-wrap: wrap;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr);
  gap: 20px;
}

.grid {
  display: grid;
  gap: 16px;
}

.g2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 320px;
  padding: 24px;
  background: radial-gradient(ellipse at 75% 45%, #bd9dff22, transparent 65%), linear-gradient(140deg, #333d51, #252d3e);
  border-radius: 20px;
  border: 1px solid #ffffff13;
}

.carstage {
  position: relative;
  height: 185px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 4px 0;
}

.car-photo {
  display: block;
  width: 100%;
  max-width: 520px;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 16px 9px #0005);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 14px;
}

.metric {
  padding: 12px 14px;
  border-radius: 12px;
  background: #1b22346e;
  border: 1px solid #ffffff06;
}

.metric small {
  color: var(--muted);
  font-size: 10px;
  display: block;
  margin-bottom: 4px;
}

.metric strong {
  font-size: 18px;
}

.notice {
  border-radius: 11px;
  padding: 13px 15px;
  background: #6ce5df0b;
  border: 1px solid #6ce5df22;
  font-size: 12px;
  line-height: 1.6;
  color: #bbd7d9;
}

.notice.warning {
  background: #f0ed670b;
  border-color: #f0ed6720;
  color: #d7d5ad;
}

.notice.error {
  background: #ff9caa0c;
  border-color: #ff9caa24;
  color: #ffc6cf;
}

.login-wrap {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  min-height: 100vh;
  max-width: 1360px;
  margin: auto;
}

.login-visual {
  padding: 56px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.login-visual h1 {
  font-size: 44px;
  line-height: 1.18;
  letter-spacing: -1.5px;
  margin: 28px 0 14px;
}

.login-visual h1 span {
  color: var(--yellow);
}

.login-panel {
  display: flex;
  align-items: center;
  padding: 36px;
  justify-content: center;
}

.login-panel .card {
  width: 410px;
  padding: 32px;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 12px;
}

th {
  font-size: 10px;
  color: var(--muted);
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

@media (max-width: 960px) {
  .workspace {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: static;
    height: auto;
    max-height: none;
  }
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .login-wrap {
    grid-template-columns: 1fr;
  }
  .login-visual {
    display: none;
  }
  .metrics {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 520px) {
  .app-stage {
    padding: 0;
  }

  .phone-frame {
    max-width: 100%;
    min-height: 100vh;
    border: none;
    border-radius: 0;
    box-shadow: none;
  }

  .toast-stack {
    top: 92px;
    left: 12px;
    right: 12px;
    width: auto;
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }
}

/* ============================================================================
   Welcome Landing Screen, Brand Picker, Legal Offer Modal
   ============================================================================ */

.view-welcome {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.welcome-hero-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.welcome-hero-head {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.welcome-hero-head h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
}

.welcome-car-wrap {
  margin: 4px 0;
}

.welcome-benefits-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.welcome-benefit-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.welcome-benefit-icon {
  font-size: 20px;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}

.welcome-benefit-card strong {
  display: block;
  font-size: 14px;
  margin-bottom: 2px;
}

.welcome-benefit-card p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.4;
}

.brand-picker {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.brand-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.brand-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 10px 6px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: inherit;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.brand-tile.is-active-brand:hover {
  border-color: rgba(56, 189, 248, 0.55);
}

.brand-tile.is-selected {
  border-color: var(--cyan, #38bdf8);
  background: rgba(56, 189, 248, 0.14);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.35);
}

.brand-tile.is-coming-soon {
  opacity: 0.42;
  cursor: not-allowed;
}

.brand-tile-name {
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.02em;
}

.brand-tile-sub {
  font-size: 11px;
}

.brand-soon-badge {
  font-size: 10px;
  padding: 1px 6px;
}

.field-hint {
  display: block;
  font-size: 12px;
  line-height: 1.35;
  margin-top: 4px;
}

.link-btn-inline {
  background: none;
  border: none;
  padding: 0;
  color: var(--cyan, #38bdf8);
  text-decoration: underline;
  font: inherit;
  cursor: pointer;
}

.modal-card-wide {
  max-width: 560px;
}

.offer-markdown-body {
  max-height: 55vh;
  overflow-y: auto;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 13.5px;
  line-height: 1.55;
}

.offer-markdown-body h2,
.offer-markdown-body h3,
.offer-markdown-body h4 {
  margin: 12px 0 6px;
}

.offer-markdown-body h2:first-child,
.offer-markdown-body h3:first-child {
  margin-top: 0;
}

.offer-markdown-body p {
  margin: 0 0 8px;
}

.offer-markdown-body .md-list {
  margin: 0 0 10px;
  padding-left: 18px;
}

/* ── City Autocomplete Dropdown (iOS/Android/Desktop friendly) ── */
.city-autocomplete {
  position: relative;
  width: 100%;
}

.city-suggestions {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 50;
  max-height: 240px;
  overflow-y: auto;
  background: #171c28;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  padding: 4px;
}

.city-suggestion-item {
  width: 100%;
  min-height: 44px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
  padding: 8px 12px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #f4f7fb;
  text-align: left;
  cursor: pointer;
}

.city-suggestion-item:hover,
.city-suggestion-item:active,
.city-suggestion-item:focus-visible {
  background: rgba(242, 232, 92, 0.14);
  outline: none;
}

.city-suggestion-name {
  font-size: 0.95rem;
  font-weight: 600;
}

.city-suggestion-meta {
  font-size: 0.78rem;
}

.city-suggestion-empty {
  padding: 10px 12px;
  font-size: 0.85rem;
}

/* ── Vehicle Hero Clickable Info Labels (ДЕМО доступ & Запуски) ── */
.hero-labels-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.hero-label-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: #e6ecf5;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.hero-label-pill.is-accent {
  border-color: rgba(242, 232, 92, 0.4);
  background: rgba(242, 232, 92, 0.12);
  color: #f6ee84;
}

.hero-label-pill.is-warning {
  border-color: rgba(255, 169, 77, 0.45);
  background: rgba(255, 169, 77, 0.14);
  color: #ffc078;
}

.hero-label-pill.is-success {
  border-color: rgba(81, 207, 102, 0.4);
  background: rgba(81, 207, 102, 0.12);
  color: #8ce99a;
}

.hero-label-pill.is-danger {
  border-color: rgba(255, 107, 107, 0.45);
  background: rgba(255, 107, 107, 0.14);
  color: #ffa8a8;
}

.hero-label-q {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  font-size: 0.7rem;
  line-height: 1;
}

/* ── Vehicle Card Context Menu (⋮) ── */
.hero-top-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.vehicle-menu-wrap {
  position: relative;
}

.vehicle-menu-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: #e6ecf5;
  font-size: 1.15rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.vehicle-menu-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

.vehicle-menu-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 164px;
  z-index: 60;
  background: #171c28;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
  padding: 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.vehicle-menu-item {
  width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #f4f7fb;
  font-size: 0.9rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}

.vehicle-menu-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.vehicle-menu-item.is-danger {
  color: #ff8787;
}

.vehicle-menu-item.is-danger:hover {
  background: rgba(255, 107, 107, 0.14);
}

/* ── PKCE 3-Step Guide & Phone Screenshots ── */
.pkce-steps-list {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.9rem;
  color: #dce4f0;
}

.pkce-platform-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.pkce-platform-tab {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: #b7c3d6;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.pkce-platform-tab.is-active {
  border-color: rgba(242, 232, 92, 0.65);
  background: rgba(242, 232, 92, 0.14);
  color: #f6ee84;
}

.pkce-guide-img-wrap {
  display: flex;
  justify-content: center;
  background: #0d111a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 8px;
  overflow: hidden;
}

.pkce-guide-img {
  width: 100%;
  max-width: 240px;
  max-height: 360px;
  object-fit: contain;
  border-radius: 10px;
}

/* ── Consistent Form Field Alignment ── */
.grid-2 {
  align-items: end;
}

.grid-2 .field {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-width: 0;
}

.field input:not([type="checkbox"]):not([type="radio"]),
.field select,
.inline-form input:not([type="checkbox"]):not([type="radio"]),
.inline-form select,
.city-autocomplete input {
  width: 100%;
  height: 44px;
  box-sizing: border-box;
}

/* ── Interactive Weekday Chips in Schedules ── */
.day-chip {
  cursor: pointer;
  user-select: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.day-chip:has(input:checked) {
  border-color: rgba(242, 232, 92, 0.75);
  background: rgba(242, 232, 92, 0.18);
  color: #f6ee84;
}

/* ── Uniform "+" Add Buttons (Авто / Сценарии / Расписание) ── */
.pulse-add-btn,
.schedule-add-card,
.vehicle-add,
.vehicle-scenarios .scenario-plus {
  width: 100%;
  min-height: 54px;
  padding: 14px 18px;
  border-radius: 14px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px dashed rgba(244, 239, 98, 0.5);
  background: rgba(244, 239, 98, 0.08);
  color: #f4ef62;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.25;
  box-shadow: none;
  cursor: pointer;
  transition: background-color 0.16s ease, border-color 0.16s ease, transform 0.12s ease, opacity 0.16s ease;
}

.pulse-add-btn:hover:not(:disabled),
.schedule-add-card:hover:not(:disabled),
.vehicle-add:hover:not(:disabled),
.vehicle-scenarios .scenario-plus:hover:not(:disabled) {
  background: rgba(244, 239, 98, 0.14);
  border-color: rgba(244, 239, 98, 0.78);
}

.pulse-add-btn:active:not(:disabled),
.schedule-add-card:active:not(:disabled),
.vehicle-add:active:not(:disabled),
.vehicle-scenarios .scenario-plus:active:not(:disabled) {
  transform: scale(0.985);
  opacity: 0.92;
}

.pulse-add-plus {
  font-size: 1.2rem;
  font-weight: 500;
  line-height: 1;
}

.schedule-add-card {
  margin-top: 12px;
}

.app-topbar { padding: 14px 16px 6px; border-bottom: 1px solid var(--border); }

/* Garage cards */
.has-garage .app-topbar { min-height: 86px; padding: 16px 20px; margin: 0; }
.has-garage .app-topbar strong { font-size: 22px; }
.phone-frame.has-garage { background: #151b28; }
.has-garage .app-content { padding: 16px 16px 96px; }
.vehicle-card-list { display: grid; gap: 12px; }
.garage-vehicle {
  min-width: 0;
  padding: 16px;
  color: #eef2fc;
  font-family: system-ui, sans-serif;
  line-height: normal;
  background: #222b3d;
  border: 1px solid #3a455a;
  border-radius: 22px;
}
.garage-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 14px;
}
.garage-identity { min-width: 0; overflow-wrap: anywhere; }
.garage-identity h2 { font-size: 20px; margin: 0 0 5px; }
.garage-caption { color: #a9b7cc; font-size: 13px; }
.garage-vehicle .garage-control {
  min-height: 44px;
  padding: 10px 14px;
  color: #eef2fc;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
  transition: transform 0.12s ease, background-color 0.16s ease, opacity 0.16s ease;
}
.garage-vehicle .garage-control:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.14);
}
.garage-vehicle .garage-control:active:not(:disabled) {
  transform: scale(0.98);
  opacity: 0.9;
}
.garage-vehicle :is(button, input, summary):focus-visible,
.vehicle-add:focus-visible { outline: 2px solid #f4ef62; outline-offset: 3px; }
.garage-vehicle .garage-menu { min-width: 44px; border-radius: 12px; padding: 8px; }
.garage-vehicle .vehicle-menu-dropdown > button {
  padding: 9px 12px;
  min-height: 44px;
  text-align: left;
  color: inherit;
  border: 0;
  background: none;
}
.garage-vehicle .vehicle-menu-dropdown > button:hover { background: #273246; }
.garage-image { display: block; width: 100%; height: 70px; object-fit: contain; margin: 6px 0; }
.garage-online { color: #8ed9b6; font-size: 12px; }
.garage-online small { color: #a9b7cc; }
.garage-vehicle .garage-start {
  width: 100%;
  padding-inline: 12px;
  color: #151b28;
  background: #f4ef62;
  border-color: transparent;
  font-weight: 650;
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(244, 239, 98, 0.2);
}
.garage-vehicle .garage-start:hover:not(:disabled) {
  background: var(--accent-yellow-hover);
}
.garage-vehicle .engine-controls:not(:has(button)) { display: none; }
.garage-vehicle .engine-controls { margin: 8px 0 0; }
.garage-section { margin-top: 12px; }
.garage-heat-details > summary {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr) 8px;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 6px 10px;
  cursor: pointer;
  list-style: none;
  border: 1px solid #46516a;
  border-radius: 12px;
  background: #273246;
}
.garage-heat-details > summary::-webkit-details-marker { display: none; }
.garage-heat-title { font-size: 15px; font-weight: 650; }
.garage-heat-details > summary small { text-align: right; font-size: 12px; overflow-wrap: anywhere; }
.garage-heat-chevron {
  width: 7px;
  height: 7px;
  border-right: 1px solid #a9b7cc;
  border-bottom: 1px solid #a9b7cc;
  transform: translateY(-2px) rotate(45deg);
}
.garage-heat-details[open] .garage-heat-chevron { transform: translateY(2px) rotate(225deg); }
.garage-heat-details .garage-heaters { margin-top: 6px; }
.garage-heat-details .garage-heaters:not(:has(button)) { display: none; }
.garage-heat-unavailable { margin: 6px 0 0; padding-left: 16px; font-size: 13px; color: #a9b7cc; }
.garage-heaters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.garage-heater {
  min-height: 44px;
  padding: 6px 10px;
  text-align: left;
  color: #eef2fc;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  font-size: 13px;
  transition: transform 0.12s ease, background-color 0.16s ease, border-color 0.16s ease, opacity 0.16s ease;
}
.garage-heater:active:not(:disabled) { transform: scale(0.98); opacity: 0.9; }
.garage-heater small { display: block; margin-top: 2px; color: #a9b7cc; }
.garage-heater.is-on { color: #8ed9b6; border-color: rgba(142, 217, 182, 0.6); background: rgba(142, 217, 182, 0.14); }
.garage-section p { margin: 4px 0 0; }
.garage-temperature { display: grid; grid-template-columns: minmax(0, 1fr); row-gap: 4px; }
.garage-temp-label { font-size: 14px; color: #eef2fc; }
.garage-temp-bar {
  display: flex;
  align-items: stretch;
  gap: 8px;
  min-width: 0;
}
.ios-stepper {
  position: relative;
  display: inline-flex;
  align-items: stretch;
  min-height: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.09);
  overflow: hidden;
}
.garage-temp-stepper {
  flex: 1 1 auto;
  min-width: 0;
}
.ios-stepper-btn {
  width: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.06);
  color: #eef2fc;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background-color 0.15s ease, transform 0.1s ease, opacity 0.15s ease;
}
.ios-stepper-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.14);
}
.ios-stepper-btn:active:not(:disabled) {
  background: rgba(244, 239, 98, 0.22);
  color: #f4ef62;
}
.garage-temperature input[type="number"] {
  flex: 1 1 48px;
  width: 100%;
  min-width: 44px;
  min-height: 44px;
  border: 0;
  border-inline: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0;
  background: transparent;
  color: #f4ef62;
  padding: 8px 4px;
  text-align: center;
  font: inherit;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  -moz-appearance: textfield;
  appearance: textfield;
}
.garage-temperature input[type="number"]::-webkit-inner-spin-button,
.garage-temperature input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.garage-temp-apply {
  flex-shrink: 0;
  border-radius: 12px;
  padding-inline: 14px;
}
.garage-temperature small { grid-column: 1 / -1; }
.garage-unavailable { margin-top: 12px; font-size: 13px; color: #a9b7cc; }
.garage-unavailable summary { cursor: pointer; min-height: 44px; align-content: center; }
.garage-unavailable ul { margin: 0 0 8px; padding-left: 1.25rem; }
.garage-vehicle .garage-scenarios { width: 100%; margin-top: 8px; }
.vehicle-details { display: grid; grid-template-columns: auto 1fr; gap: 8px 12px; }
.vehicle-details dd { margin: 0; }
.garage-vehicle .operation-alert, .garage-vehicle .nrt-progress { color: #eef2fc; margin-top: 10px; padding: 8px 0; }
.vehicle-op-slot {
  height: 28px;
  min-height: 28px;
  max-height: 28px;
  overflow: hidden;
  display: flex;
  align-items: center;
  margin-top: 8px;
}
.vehicle-op-progress {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  opacity: 1;
  transform: scaleX(1);
}
@keyframes pulse-op-finish-fill {
  0% { left: 0; width: 65%; }
  100% { left: 0; width: 100%; }
}
@keyframes pulse-op-finish-fade {
  0% { opacity: 1; transform: scaleX(1); }
  35% { opacity: 1; transform: scaleX(1); }
  100% { opacity: 0; transform: scaleX(0.98); }
}
.vehicle-op-progress.is-finishing {
  animation: pulse-op-finish-fade 0.62s ease forwards;
}
.vehicle-op-progress .vehicle-op-bar {
  margin-top: 0;
  height: 4px;
}
.vehicle-op-progress.is-finishing .launch-progress-fill {
  left: 0;
  width: 100%;
  animation: pulse-op-finish-fill 0.22s ease forwards;
}
.vehicle-op-label {
  font-size: 0.75rem;
  line-height: 1.1;
  color: #a9b7cc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Plan-locked vehicle & scenario cards */
.garage-vehicle.is-plan-locked > :not([data-live-region="garage-plan-lock"]) {
  opacity: 0.48;
  filter: grayscale(0.65);
}
.plan-lock-banner {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(244, 239, 98, 0.32);
  background: rgba(244, 239, 98, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.plan-lock-status {
  font-size: 0.82rem;
  font-weight: 600;
  color: #f4ef62;
  margin: 0;
}
.plan-lock-cta {
  flex-shrink: 0;
}
.scenario-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}
.scenario-card-top h3 {
  margin: 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.scenario-plan-lock {
  margin-bottom: 6px;
}
.scenario-card.is-plan-locked > :not(.scenario-card-top):not([data-live-region="scenario-plan-lock"]) {
  opacity: 0.5;
  filter: grayscale(0.65);
}
.scenario-card.is-plan-locked .scenario-card-top h3 {
  opacity: 0.62;
}
.garage-vehicle button:disabled { cursor: default; opacity: .58; }
@media (max-width: 520px) {
  .app-stage:has(.has-garage) { padding: 0; }
  .phone-frame.has-garage { max-width: 100%; min-height: 100vh; border: 0; border-radius: 0; }
}

/* Vehicle scenarios */
.vehicle-scenarios {
  --scenario-panel: #202939;
  --scenario-border: #364258;
  --scenario-muted: #a9b7cc;
  --scenario-control: #273246;
  min-width: 0;
  color: #eef2fc;
}
.vehicle-scenarios h2 { margin: 0; font-size: 1.4rem; }
.scenario-car-row, .scenario-choice {
  display: flex;
  align-items: center;
  gap: 8px;
}
.scenario-car-row, .scenario-choice { justify-content: space-between; }
.scenario-car-row > :first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #8ed9b6; }
.scenario-car-row > :last-child { flex-shrink: 0; color: var(--scenario-muted); font-size: .88rem; }
.scenario-card, .scenario-panel {
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--scenario-border);
  background: var(--scenario-panel);
  min-width: 0;
}
.scenario-card h3, .scenario-panel h3 { margin: 0 0 6px; font-size: 1.12rem; }
.vehicle-scenario-list, .scenario-editor, .scenario-editor-form { display: grid; gap: 10px; }
.vehicle-scenario-list { margin-top: 12px; }
.scenario-car-row { margin-bottom: 3px; }
.scenario-car-details, .scenario-more, .scenario-caption { color: var(--scenario-muted); font-size: .83rem; }
.scenario-car-details p { margin: 0 0 6px; }
.scenario-car-details > summary, .scenario-more > summary {
  min-height: 44px;
  line-height: 44px;
  cursor: pointer;
}
.scenario-chips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.scenario-chips > span {
  padding: 9px;
  border: 1px solid #46516a;
  background: #1a2231;
  border-radius: 8px;
  font-size: .78rem;
  overflow-wrap: anywhere;
}
.scenario-card-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 10px; gap: 8px; }
.scenario-card-actions > :first-child { grid-column: 1 / -1; }
.scenario-card-actions > .scenario-button {
  border-radius: 12px;
  transition: transform 0.12s ease, background-color 0.16s ease, opacity 0.16s ease;
}
.scenario-card-actions > .scenario-button.btn-primary {
  border-radius: 14px;
}
.scenario-card-actions > .scenario-button:not(.btn-primary):not(.btn-danger) {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.09);
}
.scenario-card-actions > .scenario-button:not(.btn-primary):hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.14);
}
.scenario-card-actions > .scenario-button:active:not(:disabled) {
  transform: scale(0.98);
  opacity: 0.9;
}
.vehicle-scenarios .scenario-button { min-width: 44px; min-height: 44px; padding: 8px 12px; }
.vehicle-scenarios .scenario-back { justify-self: start; background: transparent; border-color: transparent; padding-inline: 0; }
.scenario-editor-form { margin: 0; }
.scenario-fixture { margin: 0; color: #8ed9b6; font-size: .82rem; }
.scenario-caption { margin: 0; }
.scenario-vehicle-select, .scenario-name-input { display: grid; gap: 5px; min-width: 0; }
.scenario-choice { flex-wrap: wrap; min-height: 49px; padding-block: 4px; font-size: .9rem; }
.scenario-choice > span { flex: 1 1 95px; }
.scenario-choice > select { flex: 0 1 139px; }
.scenario-choice-segmented {
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}
.scenario-choice-segmented > .scenario-choice-label {
  flex: none;
  font-size: 0.88rem;
  color: #dfe6f5;
}
.scenario-choice-stepper {
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.scenario-stepper {
  flex: 0 0 auto;
  min-width: 152px;
}
.ios-stepper-val {
  flex: 1 1 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  padding: 0 8px;
  font-size: 0.92rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #f4ef62;
  white-space: nowrap;
}
.ios-stepper.is-disabled {
  opacity: 0.48;
}
.ios-segmented {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 3px;
  width: 100%;
  min-height: 44px;
  padding: 3px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.07);
}
.ios-segmented.is-disabled {
  opacity: 0.5;
}
.ios-seg-btn {
  flex: 1 1 0;
  min-width: 0;
  min-height: 38px;
  padding: 6px 4px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #a9b7cc;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease, transform 0.1s ease;
}
.ios-seg-btn:hover:not(:disabled):not(.is-active) {
  color: #eef2fc;
  background: rgba(255, 255, 255, 0.05);
}
.ios-seg-btn:active:not(:disabled) {
  transform: scale(0.97);
}
.ios-seg-btn.is-active {
  background: #2f3b52;
  color: #eef2fc;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.28);
}
.ios-seg-btn.is-active.is-positive {
  background: #2f3b52;
  color: #f4ef62;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.28);
}
.ios-seg-btn.is-active.is-off {
  background: #2a3448;
  color: #cfd7ea;
}
.ios-select-proxy,
.vehicle-scenarios select.ios-select-proxy {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 44px;
  margin: 0;
  padding: 0;
  opacity: 0;
  pointer-events: none;
  border: 0;
  background: transparent;
}
.vehicle-scenarios select, .vehicle-scenarios input {
  min-width: 0;
  max-width: 100%;
  min-height: 44px;
  padding: 7px 9px;
  color: inherit;
  border: 1px solid #46516a;
  border-radius: 10px;
  background: var(--scenario-control);
}
.scenario-panel .scenario-caption { margin-top: 8px; }
.scenario-notice {
  margin: 0;
  padding: 8px 10px;
  background: #2a2925;
  border: 1px solid #554d31;
  border-radius: 10px;
  color: #efe2aa;
  font-size: .85rem;
}
.scenario-operation { margin-top: 10px; overflow-wrap: anywhere; }
.scenario-operation ul, .scenario-notice ul { margin: 4px 0 0; padding-inline-start: 20px; }
.scenario-operation p { margin: 0; }
.scenario-operation small { display: block; color: var(--scenario-muted); }
.vehicle-scenarios > h2 + .scenario-caption { margin-top: 10px; }
.scenario-car-details > summary { display: flex; line-height: normal; }
.scenario-car-details > summary::-webkit-details-marker { display: none; }
.scenario-car-details > summary > :first-child::before { content: "› "; }
.scenario-car-details[open] > summary > :first-child::before { content: "⌄ "; }
.scenario-engine-hint { margin-top: 6px; }
.vehicle-scenarios .scenario-plus {
  margin-top: 12px;
}
.scenario-editor-engine { color: #eef2fc; border-left: 3px solid #8ed9b6; background: #243839; }
.scenario-panel .scenario-choice > select, .scenario-name-input > input { background-color: #181f2e; }
.vehicle-scenarios select, .schedule-form-card select {
  appearance: none;
  height: 44px;
  padding-inline-end: 28px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%23a9b7cc' stroke-width='1.5'/%3E%3C/svg%3E");
  background-position: right 9px center;
  background-repeat: no-repeat;
  background-size: 12px 8px;
}

.scenario-chips > span { display: flex; align-items: flex-start; gap: 6px; }
.scenario-chips svg { width: 15px; height: 15px; flex: 0 0 15px; color: #8ed9b6; }


/* ============================================================================
   Vehicle Options Discovery & Existing Vehicle Options Modal
   ============================================================================ */

.modal-card-options {
  max-height: 85vh;
  overflow-y: auto;
}

.option-modal-sub {
  font-size: 13px;
  margin-top: 2px;
}

.vehicle-options-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
}

.options-toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.options-fallback-banner {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border-radius: 12px;
  border-left: 3px solid #f4ef62;
  background: rgba(244, 239, 98, 0.08);
  font-size: 13px;
}

.options-fallback-banner p {
  margin: 0;
}

.options-alert {
  padding: 10px 12px;
  border-radius: 10px;
  border-left: 3px solid #ffadb9;
  background: rgba(255, 173, 185, 0.1);
  color: #ffd0d7;
  font-size: 13px;
}

.option-groups {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.option-group {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 12px;
}

.option-group-title {
  margin: 0 0 8px;
  font-size: 14px;
  color: #eef2fc;
}

.option-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.option-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.option-row:first-child {
  padding-top: 0;
  border-top: 0;
}

.option-row-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.option-label {
  font-size: 13px;
  min-width: 0;
}

.option-state-badge {
  flex-shrink: 0;
  font-size: 11px;
}

.option-action-note {
  font-size: 12px;
}

.option-owner-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #cbd5e1;
  cursor: pointer;
  margin-top: 4px;
}

/* ── iOS UISwitch for Settings & Option Checkboxes ── */
.option-owner-toggle input[type="checkbox"],
.toggle-row input[type="checkbox"],
.check-group:not(.legal-check-group) .check-row input[type="checkbox"],
.share-card .check-row input[type="checkbox"],
.buyer-card .check-row input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  width: 46px;
  height: 28px;
  min-width: 46px;
  min-height: 28px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color 0.22s ease, opacity 0.16s ease;
}

.option-owner-toggle input[type="checkbox"]::after,
.toggle-row input[type="checkbox"]::after,
.check-group:not(.legal-check-group) .check-row input[type="checkbox"]::after,
.share-card .check-row input[type="checkbox"]::after,
.buyer-card .check-row input[type="checkbox"]::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  transition: transform 0.22s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.option-owner-toggle input[type="checkbox"]:checked,
.toggle-row input[type="checkbox"]:checked,
.check-group:not(.legal-check-group) .check-row input[type="checkbox"]:checked,
.share-card .check-row input[type="checkbox"]:checked,
.buyer-card .check-row input[type="checkbox"]:checked {
  background: #69d49f;
}

.option-owner-toggle input[type="checkbox"]:checked::after,
.toggle-row input[type="checkbox"]:checked::after,
.check-group:not(.legal-check-group) .check-row input[type="checkbox"]:checked::after,
.share-card .check-row input[type="checkbox"]:checked::after,
.buyer-card .check-row input[type="checkbox"]:checked::after {
  transform: translateX(18px);
}

.option-owner-toggle input[type="checkbox"]:disabled,
.toggle-row input[type="checkbox"]:disabled,
.check-group:not(.legal-check-group) .check-row input[type="checkbox"]:disabled,
.share-card .check-row input[type="checkbox"]:disabled,
.buyer-card .check-row input[type="checkbox"]:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ==========================================================================
   Welcome Login, Topbar Username, Services & Settings Views
   ========================================================================== */

.welcome-login-form {
  margin-top: 14px;
  margin-bottom: 16px;
}

.form-error {
  color: #fca5a5;
  font-size: 0.85rem;
  line-height: 1.35;
}

.app-topbar {
  gap: 8px;
  flex-wrap: nowrap;
}

.app-topbar-right {
  flex-shrink: 1;
  min-width: 0;
  justify-content: flex-end;
}

.topbar-user-name {
  display: inline-block;
  max-width: 160px;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.82rem;
  font-weight: 600;
  color: #e2e8f0;
}

@media (max-width: 520px) {
  .topbar-user-name {
    max-width: 110px;
  }
  .app-topbar .nrt-status {
    padding: 4px 7px;
    font-size: 0.72rem;
    white-space: nowrap;
    flex-shrink: 0;
  }
  .app-topbar button[data-action="logout"] {
    padding: 6px 8px;
    font-size: 0.78rem;
    flex-shrink: 0;
  }
}

.view-services,
.view-settings,
.view-settings-subview {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.service-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.service-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.service-card-head h3 {
  margin: 0;
  font-size: 1.05rem;
}

.service-card-desc {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.4;
}

.service-account-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.9rem;
}

.service-meta-pill {
  font-size: 0.84rem;
}

.service-toggles-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
}

.ios-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  cursor: pointer;
  font-size: 0.9rem;
}

.ios-toggle {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  width: 44px;
  height: 26px;
  flex-shrink: 0;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.35);
  border: 1px solid rgba(148, 163, 184, 0.35);
  cursor: pointer;
  transition: background 0.2s ease;
}

.ios-toggle::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  transition: transform 0.22s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.ios-toggle:checked {
  background: #69d49f;
}

.ios-toggle:checked::after {
  transform: translateX(18px);
}

.service-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.service-actions-row .btn {
  flex: 1 1 130px;
  min-height: 44px;
}

.settings-menu-list {
  padding: 0;
  overflow: hidden;
}

.settings-menu-row {
  width: 100%;
  min-height: 60px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.16s ease;
}

.settings-menu-row:last-child {
  border-bottom: none;
}

.settings-menu-row:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.04);
}

.settings-menu-row.is-disabled,
.settings-menu-row:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.settings-menu-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.settings-menu-copy strong {
  font-size: 0.96rem;
}

.settings-menu-copy .muted {
  font-size: 0.82rem;
  line-height: 1.3;
}

.settings-menu-chevron {
  font-size: 1.35rem;
  color: #94a3b8;
  flex-shrink: 0;
}

.settings-subview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.settings-subview-head h2 {
  margin: 0;
  font-size: 1.12rem;
  flex: 1;
  text-align: center;
}

.settings-subview-right {
  min-width: 68px;
  display: flex;
  justify-content: flex-end;
}

.timezone-pill {
  font-size: 0.84rem;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
}

.event-filter-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
}

.event-filter-chip {
  flex-shrink: 0;
  min-height: 36px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: #cbd5e1;
  font-size: 0.82rem;
  font-weight: 550;
  cursor: pointer;
}

.event-filter-chip.is-active {
  background: rgba(244, 239, 98, 0.14);
  border-color: #f4ef62;
  color: #f4ef62;
}

.event-feed-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.event-feed-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.event-feed-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.event-feed-time {
  font-size: 0.78rem;
}

.event-feed-title {
  font-size: 0.95rem;
}

.event-feed-actors {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: 0.82rem;
}

.event-feed-params {
  font-size: 0.84rem;
  color: #8ed9b6;
}

.event-feed-details {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-word;
}

.event-feed-status {
  font-size: 0.78rem;
}

/* ==========================================================================
   Billing & Subscription UI (TopBar Pill, Plan Picker, Payment History)
   ========================================================================== */

.topbar-sub-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 9px;
  border-radius: var(--radius-pill);
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  flex-shrink: 0;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.12s ease;
}

.topbar-sub-pill:hover {
  background: rgba(255, 255, 255, 0.12);
}

.topbar-sub-pill.tone-accent {
  background: rgba(240, 237, 103, 0.16);
  border-color: rgba(240, 237, 103, 0.45);
  color: var(--accent-yellow);
}

.topbar-sub-pill.tone-warning {
  background: rgba(255, 156, 170, 0.18);
  border-color: rgba(255, 156, 170, 0.5);
  color: var(--accent-coral);
}

@media (max-width: 520px) {
  .topbar-sub-pill {
    padding: 3px 7px;
    font-size: 0.7rem;
  }
  .topbar-user-name {
    max-width: 72px;
  }
}

@media (max-width: 410px) {
  .app-topbar-left .muted {
    display: none;
  }
  .topbar-user-name {
    display: none;
  }
}

.billing-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.billing-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.billing-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.billing-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.9rem;
}

.billing-plan-card {
  background: var(--bg-surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.billing-plan-card.is-recommended {
  border-color: rgba(240, 237, 103, 0.42);
  background: linear-gradient(180deg, rgba(240, 237, 103, 0.08) 0%, var(--bg-surface-2) 100%);
}

.billing-plan-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.billing-plan-features {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 0.86rem;
  color: var(--text-secondary);
}

.billing-recurring-note {
  line-height: 1.35;
}

.billing-payment-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.billing-payment-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-2);
  border: 1px solid var(--border);
}

.billing-payment-info,
.billing-payment-right {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.billing-payment-right {
  align-items: flex-end;
  flex-shrink: 0;
}

.badge-danger {
  background: rgba(255, 156, 170, 0.16);
  color: var(--accent-coral);
  border: 1px solid rgba(255, 156, 170, 0.35);
}

.billing-promo-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.billing-promo-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.billing-promo-input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-size: 0.9rem;
  text-transform: uppercase;
}

.billing-promo-btn {
  flex-shrink: 0;
  white-space: nowrap;
}

.billing-promo-applied {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.billing-promo-clear {
  background: transparent;
  border: 0;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 2px 6px;
  font-size: 0.9rem;
}

.billing-promo-error {
  margin: 0;
  color: var(--accent-coral);
}

.billing-active-promo-badge {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.billing-warning-banner {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: rgba(240, 198, 70, 0.14);
  border: 1px solid rgba(240, 198, 70, 0.42);
  color: var(--text-primary);
  font-size: 0.85rem;
  line-height: 1.4;
}

.billing-unlink-btn {
  color: var(--accent-coral);
}

.admin-promo-form .g3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

@media (max-width: 720px) {
  .admin-promo-form .g3 {
    grid-template-columns: 1fr;
  }
}

/* ==================== Standalone /sapanel Admin Portal ==================== */

.sapanel-body {
  min-height: 100vh;
  background: radial-gradient(circle at 18% 0%, #222b44 0%, var(--bg-deep) 58%, #090c14 100%);
  color: var(--text-primary);
}

.sapanel-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.88em;
}

.sapanel-muted {
  color: var(--text-muted);
}

/* Login screen */
.sapanel-login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.sapanel-login-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-frame);
}

.sapanel-login-brand {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-yellow);
  margin-bottom: 10px;
}

.sapanel-login-title {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.sapanel-login-sub {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 20px;
}

/* Shell & Sidebar */
.sapanel-shell {
  max-width: 1400px;
  margin: 0 auto;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 24px;
  padding: 20px;
}

.sapanel-sidebar {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  height: calc(100vh - 40px);
  position: sticky;
  top: 20px;
}

.sapanel-sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.sapanel-logo {
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.sapanel-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.sapanel-nav-item {
  width: 100%;
  text-align: left;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.92rem;
  transition: background 0.15s ease, color 0.15s ease;
}

.sapanel-nav-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
}

.sapanel-nav-item.is-active {
  background: rgba(240, 237, 103, 0.14);
  color: var(--accent-yellow);
  border: 1px solid rgba(240, 237, 103, 0.32);
}

.sapanel-sidebar-foot {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.sapanel-actor-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  padding: 4px 6px;
}

.sapanel-actor-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-mint);
}

/* Main content */
.sapanel-main {
  min-width: 0;
}

.sapanel-section {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.sapanel-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.sapanel-h1 {
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.sapanel-h2 {
  font-size: 1.08rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.sapanel-h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.sapanel-subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 4px;
}

.sapanel-group-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: -8px;
}

/* KPI Grid */
.sapanel-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.sapanel-kpi-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sapanel-kpi-title {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 600;
}

.sapanel-kpi-value {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.sapanel-kpi-value.is-accent {
  color: var(--accent-yellow);
}

.sapanel-kpi-value.is-green {
  color: var(--accent-mint);
}

.sapanel-kpi-value.is-red {
  color: var(--accent-coral);
}

.sapanel-kpi-sub {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* Cards, Subtabs, Chips, Badges, Buttons */
.sapanel-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
}

.sapanel-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.sapanel-card-head .sapanel-h2 {
  margin-bottom: 0;
}

.sapanel-subtabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
}

.sapanel-subtab {
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  background: var(--bg-surface-2);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.88rem;
}

.sapanel-subtab.is-active {
  background: var(--accent-yellow);
  color: #141926;
  border-color: var(--accent-yellow);
}

.sapanel-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.sapanel-chip {
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: var(--bg-surface-2);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 600;
}

.sapanel-chip.is-active {
  background: rgba(108, 229, 223, 0.16);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.sapanel-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
}

.sapanel-badge.is-green {
  background: rgba(156, 221, 188, 0.16);
  color: var(--accent-mint);
}

.sapanel-badge.is-yellow {
  background: rgba(240, 237, 103, 0.16);
  color: var(--accent-yellow);
}

.sapanel-badge.is-red {
  background: rgba(255, 156, 170, 0.16);
  color: var(--accent-coral);
}

.sapanel-badge.is-cyan {
  background: rgba(108, 229, 223, 0.16);
  color: var(--accent-cyan);
}

.sapanel-badge.is-purple {
  background: rgba(184, 161, 247, 0.18);
  color: var(--purple);
}

.sapanel-badge.is-muted {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
}

.sapanel-row-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.sapanel-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.88rem;
  transition: opacity 0.15s ease, background 0.15s ease;
}

.sapanel-btn.is-primary {
  background: var(--accent-yellow);
  color: #141926;
}

.sapanel-btn.is-primary:hover {
  background: var(--accent-yellow-hover);
}

.sapanel-btn.is-secondary {
  background: var(--bg-surface-2);
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
}

.sapanel-btn.is-danger {
  background: rgba(255, 156, 170, 0.14);
  border: 1px solid rgba(255, 156, 170, 0.35);
  color: var(--accent-coral);
}

.sapanel-btn.is-ghost {
  background: transparent;
  color: var(--accent-cyan);
}

.sapanel-btn.is-sm {
  padding: 6px 11px;
  font-size: 0.8rem;
}

.sapanel-btn.is-full {
  width: 100%;
}

/* Alerts */
.sapanel-alert {
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.86rem;
  margin-bottom: 14px;
}

.sapanel-alert.is-error {
  background: rgba(255, 156, 170, 0.14);
  border: 1px solid rgba(255, 156, 170, 0.42);
  color: var(--accent-coral);
}

.sapanel-alert.is-info {
  background: rgba(108, 229, 223, 0.14);
  border: 1px solid rgba(108, 229, 223, 0.42);
  color: var(--accent-cyan);
}

/* Forms */
.sapanel-form-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sapanel-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.sapanel-form-row2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.sapanel-form-actions {
  grid-column: 1 / -1;
}

.sapanel-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 0.83rem;
  color: var(--text-secondary);
}

.sapanel-field-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.sapanel-field input,
.sapanel-field select,
.sapanel-field textarea,
.sapanel-input {
  width: 100%;
  background: var(--bg-surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  color: var(--text-primary);
  font-size: 0.9rem;
}

.sapanel-input.is-sm {
  width: auto;
  padding: 7px 10px;
  font-size: 0.84rem;
}

.sapanel-checkbox {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.9rem;
  cursor: pointer;
}

.sapanel-checkbox input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent-yellow);
}

/* Toolbar & Tables */
.sapanel-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.sapanel-search-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 260px;
  max-width: 520px;
}

.sapanel-counter {
  font-size: 0.84rem;
  color: var(--text-muted);
}

.sapanel-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.sapanel-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.sapanel-table th,
.sapanel-table td {
  text-align: left;
  padding: 10px 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.sapanel-table.is-compact th,
.sapanel-table.is-compact td {
  padding: 7px 8px;
  font-size: 0.82rem;
}

.sapanel-table th {
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.sapanel-clickable-row {
  cursor: pointer;
  transition: background 0.12s ease;
}

.sapanel-clickable-row:hover {
  background: rgba(255, 255, 255, 0.04);
}

.sapanel-cell-strong {
  font-weight: 700;
  color: var(--text-primary);
}

.sapanel-cell-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.sapanel-wrap-cell {
  max-width: 360px;
  word-break: break-word;
}

.sapanel-empty-cell {
  text-align: center !important;
  color: var(--text-muted);
  padding: 20px !important;
}

.sapanel-mini-progress {
  width: 96px;
  height: 5px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
  margin-top: 4px;
}

.sapanel-mini-progress > div {
  height: 100%;
  background: var(--accent-cyan);
}

/* Grids */
.sapanel-two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.sapanel-integrations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 16px;
}

.sapanel-claim-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sapanel-claim-item {
  background: var(--bg-surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
}

/* User Detail Drawer */
.sapanel-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(8, 11, 18, 0.72);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  justify-content: flex-end;
}

.sapanel-drawer {
  width: 100%;
  max-width: 680px;
  height: 100vh;
  background: var(--bg-base);
  border-left: 1px solid var(--border-strong);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-frame);
}

.sapanel-drawer-head {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.sapanel-drawer-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.sapanel-drawer-body {
  padding: 20px 24px 32px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sapanel-drawer-block {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
}

.sapanel-drawer-block h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.sapanel-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.sapanel-block-head h3 {
  margin-bottom: 0;
}

.sapanel-mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.sapanel-mini-metric {
  background: var(--bg-surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.sapanel-mini-metric.is-wide {
  grid-column: 1 / -1;
}

.sapanel-mini-metric span {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.sapanel-mini-metric strong {
  font-size: 0.92rem;
}

/* 14-day Alice vertical bar chart */
.sapanel-bar-chart {
  display: grid;
  grid-template-columns: repeat(14, minmax(0, 1fr));
  gap: 6px;
  align-items: end;
  height: 140px;
  padding-top: 10px;
}

.sapanel-bar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  height: 100%;
}

.sapanel-bar-count {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--purple);
  min-height: 14px;
}

.sapanel-bar-track {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.sapanel-bar-fill {
  width: 100%;
  max-width: 20px;
  border-radius: 5px 5px 2px 2px;
  background: rgba(255, 255, 255, 0.08);
  transition: height 0.2s ease;
}

.sapanel-bar-fill.has-val {
  background: linear-gradient(180deg, var(--purple) 0%, rgba(184, 161, 247, 0.45) 100%);
}

.sapanel-bar-label {
  font-size: 0.66rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Command source horizontal bars */
.sapanel-hbar-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sapanel-hbar-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.84rem;
  margin-bottom: 4px;
}

.sapanel-hbar-track {
  height: 8px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.sapanel-hbar-fill {
  height: 100%;
  border-radius: 99px;
}

.sapanel-hbar-fill.is-cyan {
  background: var(--accent-cyan);
}

.sapanel-hbar-fill.is-purple {
  background: var(--purple);
}

.sapanel-hbar-fill.is-yellow {
  background: var(--accent-yellow);
}

/* Vehicles & KV list in drawer */
.sapanel-vehicle-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}

.sapanel-vehicle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: var(--bg-surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
}

.sapanel-summary-line {
  font-size: 0.84rem;
  color: var(--text-secondary);
}

.sapanel-kv-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sapanel-kv-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.86rem;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

.sapanel-kv-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.sapanel-kv-row span {
  color: var(--text-muted);
}

/* Responsive fallback for narrower viewports */
@media (max-width: 1024px) {
  .sapanel-shell {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .sapanel-sidebar {
    position: static;
    height: auto;
  }

  .sapanel-nav {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .sapanel-nav-item {
    width: auto;
  }

  .sapanel-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sapanel-two-col,
  .sapanel-form-grid,
  .sapanel-integrations-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .sapanel-kpi-grid,
  .sapanel-form-row2,
  .sapanel-mini-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Vzhiksi Luxury Glass Design System (/online & /online/sapanel)
   ========================================================================== */

.phone-frame {
  background:
    radial-gradient(320px 220px at 82% 5%, rgba(240, 237, 103, 0.1) 0%, transparent 72%),
    radial-gradient(280px 240px at 14% 30%, rgba(108, 229, 223, 0.08) 0%, transparent 75%),
    linear-gradient(180deg, #121726 0%, #090c14 100%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow:
    0 30px 70px rgba(0, 0, 0, 0.7),
    0 0 40px rgba(240, 237, 103, 0.06),
    inset 0 1px 1px rgba(255, 255, 255, 0.2);
}

@media (max-width: 520px) {
  .phone-frame {
    border: none;
    box-shadow: none;
  }
}

.brandmark.brandmark-c1 {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.brandmark.brandmark-c1 svg {
  display: block;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 4px 12px rgba(108, 229, 223, 0.18));
}

/* Frosted Glass Topbar & Bottom Dock */
.app-topbar {
  background: rgba(24, 31, 48, 0.72);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.bottom-nav {
  background: rgba(22, 28, 44, 0.78);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    0 -10px 28px rgba(0, 0, 0, 0.48),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.nav-tab.is-active {
  color: var(--accent-yellow);
  background: rgba(240, 237, 103, 0.14);
  box-shadow: inset 0 0 0 1px rgba(240, 237, 103, 0.3);
}

/* Multi-layer Glass Cards & Modals */
.card,
.garage-vehicle,
.scenario-card,
.scenario-panel,
.schedule-card,
.billing-plan-card,
.modal-card,
.sapanel-card,
.sapanel-sidebar,
.sapanel-login-card,
.sapanel-kpi-card {
  background: linear-gradient(168deg, rgba(38, 47, 70, 0.72) 0%, rgba(20, 25, 39, 0.92) 100%);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.11);
  box-shadow:
    0 20px 44px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.billing-plan-card.is-recommended {
  border-color: rgba(240, 237, 103, 0.36);
  box-shadow:
    0 20px 44px rgba(0, 0, 0, 0.42),
    0 0 28px rgba(240, 237, 103, 0.08),
    inset 0 1px 0 rgba(240, 237, 103, 0.24);
}

/* Cyan-glow Active Heater Tiles */
.garage-heater {
  background: rgba(15, 19, 31, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.garage-heater.is-on {
  color: var(--text-primary);
  background: linear-gradient(145deg, rgba(108, 229, 223, 0.16), rgba(240, 237, 103, 0.08));
  border-color: rgba(108, 229, 223, 0.42);
  box-shadow:
    0 6px 18px rgba(108, 229, 223, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.garage-heater.is-on small {
  color: var(--accent-cyan);
  font-weight: 700;
}

/* Glossy Lime CTA Buttons */
.btn-primary,
.garage-vehicle .garage-start,
.sapanel-btn.is-primary {
  background: linear-gradient(180deg, #f9f693 0%, #ebe652 100%);
  color: #0e121e;
  border: none;
  box-shadow:
    0 10px 28px rgba(240, 237, 103, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.btn-primary:hover:not(:disabled),
.garage-vehicle .garage-start:hover:not(:disabled),
.sapanel-btn.is-primary:hover:not(:disabled) {
  background: linear-gradient(180deg, #fcf9ab 0%, #f1ec64 100%);
  box-shadow:
    0 12px 32px rgba(240, 237, 103, 0.36),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

/* Frosted Toasts (keeps .toast-stack top: 64px below .app-topbar) */
.toast-item {
  background: rgba(24, 31, 48, 0.88);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  box-shadow:
    0 14px 36px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

/* SA Panel Brand Logo Alignment */
.sapanel-login-brand,
.sapanel-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.sapanel-brand-svg {
  flex-shrink: 0;
  display: block;
}
