:root {
  color-scheme: light;
  --bg: #eef2f6;
  --surface: #ffffff;
  --surface-2: #f7f9fc;
  --surface-3: #eef3f8;
  --text: #101828;
  --muted: #667085;
  --line: rgba(16, 24, 40, 0.12);
  --line-strong: rgba(16, 24, 40, 0.22);
  --blue: #1769e0;
  --blue-deep: #0f4faf;
  --teal: #0f766e;
  --green: #0d7a5f;
  --green-soft: #e7f7f1;
  --amber: #a15c07;
  --amber-soft: #fff4de;
  --red: #b42318;
  --red-soft: #fff1f0;
  --shadow: 0 18px 45px rgba(16, 24, 40, 0.13);
  --shadow-soft: 0 9px 22px rgba(16, 24, 40, 0.09);
  --shadow-pressed: 0 5px 13px rgba(16, 24, 40, 0.12);
  --inset: inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

* { box-sizing: border-box; }

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    linear-gradient(135deg, #f9fbfd 0%, #edf2f7 45%, #d8e0ea 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.46), transparent 38%, rgba(255, 255, 255, 0.24)),
    repeating-linear-gradient(90deg, rgba(16, 24, 40, 0.028) 0 1px, transparent 1px 84px);
}

.launch-screen {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  gap: 22px;
  align-content: center;
  background:
    linear-gradient(145deg, rgba(248, 251, 255, 0.96), rgba(226, 234, 244, 0.94)),
    repeating-linear-gradient(90deg, rgba(16, 24, 40, 0.028) 0 1px, transparent 1px 84px);
  pointer-events: none;
  animation: launch-out 1.7s ease 0.95s forwards;
}

.launch-card {
  display: flex;
  align-items: center;
  gap: 15px;
  min-width: min(360px, calc(100vw - 42px));
  padding: 18px;
  border: 1px solid rgba(16, 24, 40, 0.10);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(243, 247, 251, 0.92));
  box-shadow: 0 30px 70px rgba(16, 24, 40, 0.20), var(--inset);
  animation: launch-card-in 850ms cubic-bezier(.2, .9, .2, 1) both;
}

.launch-card img {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  box-shadow: 0 18px 34px rgba(23, 105, 224, 0.24), var(--inset);
}

.launch-card strong,
.launch-card span {
  display: block;
}

.launch-card strong {
  color: #0b1220;
  font-size: 22px;
  line-height: 1.05;
  font-weight: 900;
}

.launch-card span {
  margin-top: 5px;
  color: var(--muted);
  font-weight: 700;
}

.launch-road {
  position: relative;
  width: min(360px, calc(100vw - 42px));
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(16, 24, 40, 0.10);
  box-shadow: inset 0 1px 3px rgba(16, 24, 40, 0.12);
}

.launch-road span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 34%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), #2dd4bf);
  box-shadow: 0 0 24px rgba(23, 105, 224, 0.35);
  animation: launch-road-run 1.65s ease-in-out infinite;
}

@keyframes launch-card-in {
  0% { opacity: 0; transform: translateY(16px) scale(0.96); filter: blur(6px); }
  100% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

@keyframes launch-road-run {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(330%); }
}

@keyframes launch-out {
  0% { opacity: 1; transform: scale(1); }
  72% { opacity: 1; }
  100% { opacity: 0; visibility: hidden; transform: scale(1.018); }
}

button,
input {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}

button:focus {
  outline: none;
}

button:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(23, 105, 224, 0.20);
  outline-offset: 2px;
}

button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.app-shell {
  position: relative;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  max-width: 720px;
  margin: 0 auto;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.74), rgba(244, 247, 251, 0.92)),
    var(--bg);
  box-shadow:
    0 0 0 1px rgba(16, 24, 40, 0.08),
    0 34px 90px rgba(16, 24, 40, 0.20);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: calc(14px + env(safe-area-inset-top)) 16px 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(246, 249, 252, 0.84));
  border-bottom: 1px solid rgba(16, 24, 40, 0.10);
  backdrop-filter: blur(24px) saturate(1.25);
  box-shadow: 0 14px 32px rgba(16, 24, 40, 0.08);
}

.topbar h1 {
  margin: 3px 0 0;
  font-size: 28px;
  line-height: 1;
  font-weight: 840;
  letter-spacing: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  color: #475467;
  text-transform: uppercase;
  letter-spacing: 0;
  font-weight: 820;
}

.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(13, 122, 95, 0.12);
}

.icon-btn {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  border: 1px solid rgba(16, 24, 40, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(180deg, #ffffff, #eef3f8);
  color: var(--blue-deep);
  font-size: 24px;
  line-height: 1;
  box-shadow: var(--shadow-soft), var(--inset);
  transition: transform 140ms ease, box-shadow 140ms ease, filter 140ms ease;
}

.content {
  padding: 16px 14px 106px;
}

.tabs {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  max-width: 720px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 5px;
  padding: 9px 9px calc(9px + env(safe-area-inset-bottom));
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.74), rgba(244, 247, 251, 0.96));
  border-top: 1px solid rgba(16, 24, 40, 0.12);
  backdrop-filter: blur(24px) saturate(1.25);
  box-shadow: 0 -20px 48px rgba(16, 24, 40, 0.14);
}

.tab {
  min-height: 50px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #5d6675;
  font-size: 11px;
  line-height: 1.15;
  font-weight: 780;
  letter-spacing: 0;
  white-space: normal;
  overflow-wrap: anywhere;
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.tab.active {
  background:
    linear-gradient(180deg, #ffffff, #e8f0ff);
  border-color: rgba(23, 105, 224, 0.22);
  color: var(--blue);
  box-shadow: 0 10px 22px rgba(23, 105, 224, 0.16), var(--inset);
}

.login {
  min-height: 100dvh;
  display: grid;
  align-content: center;
  gap: 14px;
  padding: 22px;
  max-width: 470px;
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 10px;
  padding: 16px;
  border: 1px solid rgba(16, 24, 40, 0.10);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f4f7fb);
  box-shadow: var(--shadow), var(--inset);
}

.brand img {
  width: 66px;
  height: 66px;
  border-radius: 8px;
  box-shadow: 0 16px 34px rgba(23, 105, 224, 0.22), var(--inset);
}

.brand h1 {
  margin: 0;
  font-size: 26px;
  line-height: 1.05;
  font-weight: 860;
  letter-spacing: 0;
}

.brand p,
.hint {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.42;
}

label {
  display: grid;
  gap: 7px;
  color: #596475;
  font-size: 13px;
  font-weight: 780;
}

input {
  width: 100%;
  min-height: 50px;
  border: 1px solid rgba(16, 24, 40, 0.14);
  border-radius: 8px;
  padding: 13px 14px;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(249, 251, 253, 0.96));
  font-size: 17px;
  font-weight: 650;
  box-shadow: inset 0 2px 8px rgba(16, 24, 40, 0.06), var(--inset);
}

input:focus {
  outline: 3px solid rgba(23, 105, 224, 0.18);
  border-color: rgba(23, 105, 224, 0.48);
}

.search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
}

.pay-box {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.payment-ok {
  color: var(--green);
  font-weight: 850;
}

.payment-bad {
  color: var(--red);
  font-weight: 850;
}

.primary,
.secondary {
  min-height: 54px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 12px 14px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0;
  white-space: normal;
  overflow-wrap: anywhere;
  box-shadow: var(--shadow-soft), var(--inset);
  transition: transform 140ms ease, box-shadow 140ms ease, filter 140ms ease;
}

.primary {
  background:
    linear-gradient(180deg, #2d7ff0 0%, var(--blue) 58%, var(--blue-deep) 100%);
  color: #fff;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.20);
}

.secondary {
  background:
    linear-gradient(180deg, #ffffff, #edf2f7);
  border-color: rgba(16, 24, 40, 0.13);
  color: var(--text);
}

.secondary.danger {
  background: linear-gradient(180deg, #fffafa, var(--red-soft));
  border-color: rgba(180, 35, 24, 0.24);
  color: var(--red);
}

.stack {
  display: grid;
  gap: 12px;
}

.home-layout {
  display: grid;
  gap: 12px;
}

.command-hero {
  position: relative;
  overflow: hidden;
  min-height: 0;
  border: 1px solid rgba(16, 24, 40, 0.12);
  border-radius: 8px;
  padding: 16px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.98), rgba(235, 242, 249, 0.90)),
    linear-gradient(135deg, rgba(23, 105, 224, 0.18), rgba(15, 118, 110, 0.12));
  box-shadow:
    0 28px 70px rgba(16, 24, 40, 0.18),
    var(--inset);
  perspective: 920px;
}

.command-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(115deg, transparent 0 34%, rgba(255, 255, 255, 0.58) 45%, transparent 58%),
    repeating-linear-gradient(90deg, rgba(16, 24, 40, 0.028) 0 1px, transparent 1px 70px);
  opacity: 0.72;
}

.hero-copy {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}

.hero-kicker {
  color: var(--blue-deep);
  font-size: 12px;
  font-weight: 860;
  letter-spacing: 0;
  text-transform: uppercase;
}

.command-hero h2 {
  margin: 4px 0 10px;
  font-size: 24px;
  line-height: 1.05;
  font-weight: 880;
  letter-spacing: 0;
}

.hero-number {
  display: flex;
  align-items: baseline;
  gap: 8px;
  color: #0b1220;
  font-size: 66px;
  line-height: 0.86;
  font-weight: 920;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 0 #fff, 0 18px 26px rgba(16, 24, 40, 0.20);
}

.hero-number span {
  color: #526071;
  font-size: 22px;
  font-weight: 840;
}

.hero-subline {
  margin-top: 10px;
  color: #475467;
  font-size: 14px;
  line-height: 1.35;
  font-weight: 620;
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  border-radius: 999px;
  padding: 7px 11px;
  background: linear-gradient(180deg, #f7fffb, var(--green-soft));
  border: 1px solid rgba(13, 122, 95, 0.20);
  color: var(--green);
  font-size: 12px;
  font-weight: 880;
  white-space: nowrap;
  box-shadow: var(--inset), 0 10px 20px rgba(13, 122, 95, 0.10);
}

.live-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 5px rgba(13, 122, 95, 0.12);
}

.live-badge.warn {
  color: var(--amber);
  background: linear-gradient(180deg, #fffdf7, var(--amber-soft));
  border-color: rgba(161, 92, 7, 0.22);
}

.premium-panel {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
  margin: 18px 0 12px;
  padding: 14px;
  border: 1px solid rgba(16, 24, 40, 0.10);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(243, 247, 251, 0.72));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    0 18px 38px rgba(16, 24, 40, 0.10);
}

.premium-panel::before {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  top: 14px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue), #2dd4bf, transparent);
  opacity: 0.72;
}

.occupancy-ring {
  --value: 0;
  display: grid;
  place-items: center;
  width: 144px;
  height: 144px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #ffffff 0 53%, transparent 54%),
    conic-gradient(var(--blue) calc(var(--value) * 1%), rgba(16, 24, 40, 0.10) 0);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 20px 34px rgba(23, 105, 224, 0.16);
}

.occupancy-ring div {
  display: grid;
  place-items: center;
  width: 104px;
  height: 104px;
  border-radius: inherit;
  background: linear-gradient(180deg, #ffffff, #f3f7fb);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.occupancy-ring strong,
.occupancy-ring span {
  display: block;
}

.occupancy-ring strong {
  color: var(--text);
  font-size: 32px;
  line-height: 1;
  font-weight: 920;
  font-variant-numeric: tabular-nums;
}

.occupancy-ring span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 780;
}

.premium-status {
  display: grid;
  gap: 8px;
  align-content: center;
}

.status-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 40px;
  padding: 9px 11px;
  border: 1px solid rgba(16, 24, 40, 0.09);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--inset);
}

.status-line span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
}

.status-line strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
  text-align: right;
  overflow-wrap: anywhere;
}

.parking-deck {
  position: relative;
  z-index: 1;
  height: 150px;
  margin: 18px 4px 12px;
  border: 1px solid rgba(15, 23, 42, 0.18);
  border-radius: 8px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(10, 15, 24, 0.96), rgba(21, 31, 46, 0.98)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.045) 0 1px, transparent 1px 44px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 36px);
  box-shadow:
    0 28px 38px rgba(16, 24, 40, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transform: rotateX(56deg) rotateZ(-2deg);
  transform-origin: 50% 100%;
}

.parking-deck::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 6px;
  pointer-events: none;
}

.cycle-caption {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 0 0 10px;
}

.cycle-caption span {
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid rgba(16, 24, 40, 0.09);
  border-radius: 8px;
  color: #475467;
  background: rgba(255, 255, 255, 0.62);
  font-size: 11px;
  font-weight: 780;
  text-align: center;
  line-height: 1.2;
  overflow-wrap: anywhere;
  box-shadow: var(--inset);
}

.deck-road {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 34px;
  margin-top: -17px;
  background:
    linear-gradient(90deg, rgba(23, 105, 224, 0.10), rgba(255, 255, 255, 0.16), rgba(15, 118, 110, 0.10)),
    repeating-linear-gradient(90deg, transparent 0 28px, rgba(226, 232, 240, 0.62) 28px 42px, transparent 42px 70px);
  opacity: 0.92;
}

.control-line {
  position: absolute;
  z-index: 6;
  top: 50%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(96, 165, 250, 0.90), transparent);
  box-shadow: 0 0 18px rgba(96, 165, 250, 0.48);
}

.control-line.entry {
  left: 18px;
  width: 36%;
  transform: translateY(-24px) rotate(-16deg);
}

.control-line.exit {
  right: 18px;
  width: 36%;
  transform: translateY(24px) rotate(-16deg);
}

.sensor-node {
  position: absolute;
  z-index: 8;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.86);
  box-shadow:
    0 12px 20px rgba(0, 0, 0, 0.30),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.sensor-node::before {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: inherit;
  background: #22c55e;
  box-shadow: 0 0 18px rgba(34, 197, 94, 0.62);
  opacity: 0.75;
}

.sensor-node::after {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: inherit;
  border: 1px solid rgba(34, 197, 94, 0.22);
  animation: sensor-pulse 2.6s ease-in-out infinite;
}

.sensor-node.entry {
  left: 52px;
  bottom: 18px;
}

.sensor-node.exit {
  right: 52px;
  top: 18px;
}

.sensor-node.active::before {
  background: #60a5fa;
  box-shadow: 0 0 20px rgba(96, 165, 250, 0.72);
}

.sensor-node span {
  position: absolute;
  inset: 15px;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.82);
}

.deck-grid {
  position: absolute;
  inset: 16px 18px;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 14px 10px;
}

.deck-slot {
  position: relative;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.03));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.deck-slot.occupied::before {
  content: "";
  position: absolute;
  inset: 8px 5px;
  border-radius: 8px 8px 5px 5px;
  background: linear-gradient(180deg, #94a3b8, #475569 62%, #1f2937);
  box-shadow:
    0 9px 18px rgba(15, 23, 42, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.38);
}

.deck-slot.free::before {
  content: "";
  position: absolute;
  inset: 12px 8px;
  border: 1px solid rgba(47, 211, 160, 0.34);
  border-radius: 4px;
  background: rgba(47, 211, 160, 0.08);
}

.deck-beam {
  position: absolute;
  z-index: 3;
  top: 0;
  bottom: 0;
  width: 90px;
  background: linear-gradient(90deg, transparent, rgba(47, 211, 160, 0.26), transparent);
  filter: blur(1px);
  animation: deck-scan 3.4s ease-in-out infinite;
}

.deck-gate {
  position: absolute;
  z-index: 4;
  bottom: 10px;
  min-width: 42px;
  padding: 5px 8px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.86);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 11px;
  font-weight: 880;
  text-align: center;
}

.deck-gate.entry {
  left: 12px;
}

.deck-gate.exit {
  right: 12px;
}

.deck-gate.open {
  color: #d1fae5;
  background: rgba(13, 122, 95, 0.42);
  box-shadow: 0 0 24px rgba(47, 211, 160, 0.34);
}

.hero-metrics {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.hero-metrics div {
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(16, 24, 40, 0.10);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.70);
  box-shadow: var(--inset), 0 8px 18px rgba(16, 24, 40, 0.08);
}

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

.quick-action {
  min-height: 86px;
  border: 1px solid rgba(16, 24, 40, 0.11);
  border-radius: 8px;
  padding: 12px;
  color: var(--text);
  text-align: left;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(241, 246, 250, 0.96));
  box-shadow: var(--shadow-soft), var(--inset);
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

.quick-action strong,
.quick-action span {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.quick-action strong {
  font-size: 14px;
  font-weight: 860;
  line-height: 1.15;
}

.quick-action span {
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 680;
  line-height: 1.25;
}

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

.status-tile {
  min-width: 0;
  padding: 13px 12px;
  border: 1px solid rgba(16, 24, 40, 0.10);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: var(--shadow-soft), var(--inset);
}

.status-tile span,
.status-tile strong {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.status-tile span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
}

.status-tile strong {
  margin-top: 7px;
  color: var(--text);
  font-size: 16px;
  line-height: 1.15;
  font-weight: 880;
}

.hero-metrics span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
}

.hero-metrics strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-size: 22px;
  line-height: 1;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

@keyframes deck-scan {
  0% { transform: translateX(-110px); opacity: 0; }
  18% { opacity: 1; }
  82% { opacity: 1; }
  100% { transform: translateX(720px); opacity: 0; }
}

@keyframes sensor-pulse {
  0%, 100% { transform: scale(0.86); opacity: 0.35; }
  50% { transform: scale(1.18); opacity: 0.85; }
}

.card {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 253, 0.94));
  border: 1px solid rgba(16, 24, 40, 0.11);
  border-radius: 8px;
  padding: 16px;
  box-shadow: var(--shadow), var(--inset);
  transform: translateZ(0);
}

.card::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.95), transparent);
}

.card h2 {
  margin: 0 0 12px;
  font-size: 18px;
  line-height: 1.15;
  font-weight: 820;
  letter-spacing: 0;
}

.ticket-card {
  display: block;
  width: 100%;
  color: var(--text);
  text-align: left;
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

.ticket-card:active,
.icon-btn:active,
.primary:active,
.secondary:active,
.menu-tile:active,
.quick-action:active,
.chip:active,
.tab:active {
  transform: translateY(1px);
  box-shadow: var(--shadow-pressed), var(--inset);
}

.ticket-photo-card {
  border-radius: 8px;
  overflow: hidden;
  background: #070a0f;
  border: 1px solid rgba(16, 24, 40, 0.18);
  box-shadow: 0 22px 46px rgba(16, 24, 40, 0.20), var(--inset);
}

.ticket-photo-button {
  display: grid;
  width: 100%;
  min-height: 0;
  border: 0;
  padding: 0;
  background: #070a0f;
  color: #fff;
  text-align: left;
}

.ticket-photo {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #070a0f;
}

.ticket-photo-button span {
  padding: 10px 12px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 13px;
  font-weight: 760;
  background: linear-gradient(180deg, rgba(7, 10, 15, 0.2), rgba(7, 10, 15, 0.92));
}

.hero-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.big-number {
  font-size: 72px;
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
  color: #0f1728;
  text-shadow:
    0 2px 0 #ffffff,
    0 16px 26px rgba(16, 24, 40, 0.18);
}

.muted {
  color: var(--muted);
  line-height: 1.42;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  border-radius: 999px;
  padding: 5px 11px;
  font-weight: 850;
  font-size: 12px;
  background: linear-gradient(180deg, #f7fffb, var(--green-soft));
  color: var(--green);
  border: 1px solid rgba(13, 122, 95, 0.18);
  box-shadow: var(--inset), 0 8px 18px rgba(13, 122, 95, 0.10);
}

.status-pill.sub-active {
  color: #08755f;
  background: rgba(8, 117, 95, 0.12);
  border-color: rgba(8, 117, 95, 0.22);
}

.status-pill.sub-soon {
  color: #8a6415;
  background: rgba(181, 139, 43, 0.15);
  border-color: rgba(181, 139, 43, 0.26);
}

.status-pill.sub-expired,
.status-pill.sub-blocked {
  color: #b42318;
  background: rgba(180, 35, 24, 0.12);
  border-color: rgba(180, 35, 24, 0.22);
}

.row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-top: 1px solid rgba(16, 24, 40, 0.09);
  min-width: 0;
}

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

.row span {
  min-width: 0;
  color: #475467;
  overflow-wrap: anywhere;
}

.row strong {
  flex: 0 0 auto;
  max-width: 48%;
  text-align: right;
  font-weight: 820;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.plate {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 20px;
  font-weight: 850;
  letter-spacing: 0;
}

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

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

.menu-tile {
  min-height: 88px;
  border: 1px solid rgba(16, 24, 40, 0.11);
  border-radius: 8px;
  background:
    linear-gradient(180deg, #ffffff, #f1f5f9);
  color: var(--text);
  text-align: left;
  padding: 14px;
  box-shadow: var(--shadow-soft), var(--inset);
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

.menu-tile strong {
  display: block;
  font-size: 15px;
  line-height: 1.15;
  margin-bottom: 6px;
  font-weight: 820;
}

.menu-tile span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.28;
  overflow-wrap: anywhere;
}

.danger {
  background: linear-gradient(180deg, #fffafa, var(--red-soft));
  border-color: rgba(180, 35, 24, 0.20);
  color: #8e1f19;
}

.primary-tile {
  background:
    linear-gradient(180deg, #f9fcff, #e8f1ff 58%, #ddeaff);
  border-color: rgba(23, 105, 224, 0.20);
  color: var(--blue);
}

.toolbar-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.chip {
  border: 1px solid rgba(16, 24, 40, 0.13);
  border-radius: 999px;
  padding: 9px 13px;
  background: rgba(255, 255, 255, 0.88);
  white-space: normal;
  overflow-wrap: anywhere;
  color: var(--text);
  box-shadow: var(--shadow-soft), var(--inset);
}

.chip.active {
  background: linear-gradient(180deg, #f8fbff, #e7f0ff);
  border-color: rgba(23, 105, 224, 0.22);
  color: var(--blue);
  font-weight: 850;
}

.camera-frame {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: #05070a;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 20px 42px rgba(0, 0, 0, 0.24);
}

.error {
  color: var(--red);
  margin: 0;
  font-weight: 780;
}

.empty {
  color: var(--muted);
  text-align: center;
  padding: 32px 12px;
  font-weight: 760;
}

@media (hover: hover) {
  .icon-btn:hover,
  .primary:hover,
  .secondary:hover,
  .menu-tile:hover,
  .quick-action:hover,
  .chip:hover,
  .ticket-card:hover {
    filter: brightness(1.012);
    box-shadow: 0 18px 34px rgba(16, 24, 40, 0.14), var(--inset);
  }
}

@media (max-width: 480px) {
  .content {
    padding-left: 10px;
    padding-right: 10px;
  }

  .topbar {
    padding-left: 12px;
    padding-right: 12px;
  }

  .topbar h1 {
    font-size: 25px;
  }

  .tab {
    font-size: 11px;
    min-height: 52px;
    padding: 5px 3px;
  }

  .actions,
  .menu-grid,
  .search-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

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

  .primary,
  .secondary {
    padding-left: 9px;
    padding-right: 9px;
    font-size: 14px;
  }

  .big-number {
    font-size: 62px;
  }

  .command-hero {
    padding: 15px;
  }

  .hero-copy {
    grid-template-columns: 1fr;
  }

  .live-badge {
    justify-self: start;
  }

  .hero-number {
    font-size: 62px;
  }

  .parking-deck {
    height: 124px;
    margin: 15px 0 8px;
  }

  .premium-panel {
    grid-template-columns: 1fr;
    gap: 12px;
    margin: 16px 0 12px;
  }

  .occupancy-ring {
    width: 132px;
    height: 132px;
    justify-self: center;
  }

  .occupancy-ring div {
    width: 96px;
    height: 96px;
  }

  .status-line {
    min-height: 44px;
  }

  .deck-grid {
    inset: 14px 12px;
    gap: 12px 7px;
  }

  .hero-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .quick-action,
  .status-tile {
    min-height: 72px;
    padding: 12px;
  }

  .quick-action strong {
    font-size: 15px;
  }

  .quick-action span,
  .status-tile span {
    font-size: 12px;
  }

  .status-tile strong {
    font-size: 15px;
  }
}

@media (max-width: 360px) {
  .quick-dock,
  .actions {
    grid-template-columns: 1fr;
  }

  .tabs {
    gap: 3px;
    padding-left: 6px;
    padding-right: 6px;
  }

  .tab {
    font-size: 10px;
  }
}

@media (min-width: 720px) {
  body {
    background:
      linear-gradient(135deg, #fafcff 0%, #edf2f7 44%, #cfd8e3 100%);
  }

  .app-shell {
    min-height: 100vh;
  }

  .content {
    padding-left: 18px;
    padding-right: 18px;
  }
}


/* Stable HTTPS shell polish */
.content.login-content {
  padding: 0;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 0%, rgba(45, 127, 240, 0.14), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,0.82), rgba(238,242,246,0.98));
}

.login {
  width: min(100%, 500px);
  min-height: auto;
  animation: panel-rise 520ms cubic-bezier(.2, .9, .2, 1) both;
}

.login::before {
  content: "";
  width: 72px;
  height: 4px;
  border-radius: 999px;
  margin: 0 auto 4px;
  background: linear-gradient(90deg, var(--blue), #20b7a8, var(--green));
  box-shadow: 0 10px 28px rgba(23,105,224,0.22);
}

.card,
.command-hero,
.status-tile,
.quick-action,
.brand {
  animation: panel-rise 420ms cubic-bezier(.2, .85, .2, 1) both;
}

.card:nth-child(2),
.status-tile:nth-child(2),
.quick-action:nth-child(2) { animation-delay: 35ms; }
.card:nth-child(3),
.status-tile:nth-child(3),
.quick-action:nth-child(3) { animation-delay: 70ms; }
.card:nth-child(4),
.status-tile:nth-child(4),
.quick-action:nth-child(4) { animation-delay: 105ms; }

.empty {
  position: relative;
  min-height: 120px;
  display: grid;
  place-items: center;
  color: transparent !important;
}

.empty::before {
  content: "";
  width: 46px;
  height: 46px;
  border-radius: 999px;
  border: 4px solid rgba(23, 105, 224, 0.14);
  border-top-color: var(--blue);
  animation: spin 820ms linear infinite;
}

.empty::after {
  content: "Загрузка";
  position: absolute;
  top: calc(50% + 36px);
  color: var(--muted);
  font-weight: 800;
}

@keyframes panel-rise {
  from { opacity: 0; transform: translateY(12px) scale(0.985); filter: blur(4px); }
  to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }
}


/* Modern 3D operator interface */
:root {
  --bg: #edf2f7;
  --surface: rgba(255, 255, 255, 0.88);
  --surface-2: rgba(246, 249, 252, 0.78);
  --surface-3: rgba(226, 234, 243, 0.82);
  --text: #0a1220;
  --muted: #617084;
  --line: rgba(15, 23, 42, 0.13);
  --line-strong: rgba(15, 23, 42, 0.24);
  --blue: #1c6be8;
  --blue-deep: #0b4fb3;
  --teal: #0f9f8e;
  --green: #087f63;
  --amber: #a15c07;
  --red: #b42318;
  --steel: #2e4057;
  --violet: #6952c7;
  --shadow: 0 28px 70px rgba(15, 23, 42, 0.18);
  --shadow-soft: 0 16px 36px rgba(15, 23, 42, 0.12);
  --shadow-pressed: 0 8px 20px rgba(15, 23, 42, 0.16);
  --inset: inset 0 1px 0 rgba(255, 255, 255, 0.92);
  --glass: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(239, 245, 250, 0.74));
  --glass-strong: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(232, 239, 247, 0.86));
}

html {
  background: #dfe7f0;
}

body {
  min-height: 100dvh;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.94) 0%, rgba(234,240,247,0.96) 42%, rgba(205,216,229,0.96) 100%);
  overflow-x: hidden;
}

body::before {
  background:
    linear-gradient(115deg, rgba(255,255,255,0.72), transparent 36%, rgba(255,255,255,0.34) 66%, transparent),
    repeating-linear-gradient(90deg, rgba(15, 23, 42, 0.032) 0 1px, transparent 1px 92px),
    repeating-linear-gradient(0deg, rgba(15, 23, 42, 0.022) 0 1px, transparent 1px 92px);
  mask-image: linear-gradient(180deg, #000, rgba(0,0,0,0.72));
}

.app-shell {
  max-width: 760px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.72), rgba(236,242,248,0.88)),
    linear-gradient(135deg, rgba(28,107,232,0.08), rgba(15,159,142,0.06));
  box-shadow:
    0 0 0 1px rgba(15, 23, 42, 0.08),
    0 44px 120px rgba(15, 23, 42, 0.22);
  perspective: 1200px;
}

.topbar {
  padding: calc(16px + env(safe-area-inset-top)) 18px 14px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.94), rgba(238,244,250,0.82));
  border-bottom-color: rgba(15, 23, 42, 0.10);
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.11);
}

.topbar h1 {
  font-size: clamp(25px, 6vw, 34px);
  text-shadow: 0 1px 0 #fff, 0 16px 32px rgba(15, 23, 42, 0.13);
}

.eyebrow {
  color: #405069;
}

.icon-btn,
.primary,
.secondary,
.quick-action,
.card,
.status-tile,
.ticket-photo-card,
.brand,
.premium-panel,
.status-line {
  transform-style: preserve-3d;
}

.icon-btn,
.primary,
.secondary {
  min-width: 46px;
  border-radius: 12px;
  box-shadow:
    0 14px 30px rgba(15, 23, 42, 0.14),
    0 3px 0 rgba(15, 23, 42, 0.08),
    var(--inset);
}

.primary {
  background:
    linear-gradient(180deg, #4b96ff 0%, #1f72ec 42%, #0b4fb3 100%);
  box-shadow:
    0 18px 34px rgba(28, 107, 232, 0.28),
    0 4px 0 rgba(5, 40, 95, 0.34),
    var(--inset);
}

.secondary {
  background: var(--glass-strong);
}

.content {
  padding: 18px 15px 116px;
}

.command-hero {
  border-radius: 18px;
  padding: 18px;
  border-color: rgba(15, 23, 42, 0.12);
  background:
    linear-gradient(145deg, rgba(255,255,255,0.96), rgba(232,240,248,0.82)),
    linear-gradient(125deg, rgba(28,107,232,0.20), rgba(15,159,142,0.12), rgba(105,82,199,0.10));
  box-shadow:
    0 34px 90px rgba(15, 23, 42, 0.20),
    0 2px 0 rgba(255,255,255,0.86) inset,
    0 -1px 0 rgba(15,23,42,0.06) inset;
  transform: translateZ(0) rotateX(0.01deg);
  isolation: isolate;
}

.command-hero::before {
  background:
    linear-gradient(118deg, transparent 0 30%, rgba(255,255,255,0.62) 43%, transparent 56%),
    repeating-linear-gradient(90deg, rgba(15,23,42,0.032) 0 1px, transparent 1px 76px);
  opacity: 0.68;
  transform: translateZ(16px);
}

.command-hero::after {
  content: "";
  position: absolute;
  inset: 14px;
  z-index: 0;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.64);
  pointer-events: none;
  transform: translateZ(22px);
}

.hero-copy,
.premium-panel,
.hero-metrics {
  transform: translateZ(34px);
}

.hero-kicker,
.live-badge,
.status-pill {
  letter-spacing: 0;
}

.command-hero h2 {
  font-size: clamp(23px, 6vw, 33px);
}

.hero-number {
  font-size: clamp(58px, 15vw, 88px);
  text-shadow:
    0 2px 0 #fff,
    0 7px 0 rgba(15, 23, 42, 0.06),
    0 24px 42px rgba(15, 23, 42, 0.24);
}

.live-badge {
  border-radius: 999px;
  box-shadow:
    0 14px 28px rgba(8, 127, 99, 0.13),
    var(--inset);
}

.premium-panel,
.card,
.status-tile,
.quick-action,
.brand {
  border-radius: 16px;
  background: var(--glass);
  border-color: rgba(15, 23, 42, 0.11);
  box-shadow:
    0 24px 58px rgba(15, 23, 42, 0.15),
    0 2px 0 rgba(255,255,255,0.86) inset,
    0 -1px 0 rgba(15,23,42,0.05) inset;
  backdrop-filter: blur(18px) saturate(1.12);
}

.premium-panel {
  grid-template-columns: 160px minmax(0, 1fr);
  transform: translateZ(38px) rotateX(1deg);
}

.occupancy-ring {
  width: 142px;
  height: 142px;
  background:
    radial-gradient(circle at 48% 45%, #ffffff 0 51%, transparent 52%),
    conic-gradient(from -30deg, #1c6be8 calc(var(--value) * 1%), rgba(46,64,87,0.16) 0);
  box-shadow:
    0 22px 42px rgba(28,107,232,0.22),
    0 4px 0 rgba(15,23,42,0.08),
    inset 0 2px 0 rgba(255,255,255,0.96);
}

.occupancy-ring div {
  box-shadow:
    inset 0 2px 0 rgba(255,255,255,0.96),
    inset 0 -12px 22px rgba(15,23,42,0.05);
}

.status-line {
  min-height: 44px;
  border-radius: 12px;
  background: rgba(255,255,255,0.66);
}

.hero-metrics div,
.row {
  border-radius: 12px;
}

.quick-dock {
  gap: 10px;
}

.quick-action {
  min-height: 96px;
  padding: 14px;
  position: relative;
  overflow: hidden;
}

.quick-action::after,
.card::before,
.status-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(125deg, rgba(255,255,255,0.46), transparent 42%);
  opacity: 0.72;
}

.quick-action strong {
  font-size: 15px;
}

.quick-action span {
  font-size: 12px;
  line-height: 1.3;
}

.status-grid {
  gap: 10px;
}

.status-tile {
  position: relative;
  min-height: 82px;
  padding: 14px;
}

.status-tile strong {
  font-size: 17px;
}

.card {
  padding: 17px;
}

.card h2 {
  font-size: 19px;
}

.row {
  min-height: 46px;
  padding: 11px 0;
}

.actions {
  gap: 10px;
}

.actions .primary,
.actions .secondary {
  min-height: 58px;
}

.tabs {
  max-width: 760px;
  gap: 7px;
  padding: 10px 10px calc(10px + env(safe-area-inset-bottom));
  background:
    linear-gradient(180deg, rgba(255,255,255,0.78), rgba(238,244,250,0.96));
  box-shadow: 0 -24px 60px rgba(15, 23, 42, 0.18);
}

.tab {
  min-height: 56px;
  border-radius: 14px;
  font-size: 11px;
  font-weight: 820;
}

.tab.active {
  background:
    linear-gradient(180deg, #ffffff, #eaf2ff 64%, #dce9ff);
  box-shadow:
    0 16px 28px rgba(28,107,232,0.18),
    0 3px 0 rgba(28,107,232,0.12),
    var(--inset);
}

.login {
  perspective: 1000px;
}

.brand {
  padding: 18px;
  transform: rotateX(0.01deg);
}

.brand img,
.launch-card img {
  border-radius: 14px;
}

input {
  border-radius: 13px;
  min-height: 56px;
  background: rgba(255,255,255,0.92);
  box-shadow:
    inset 0 2px 9px rgba(15,23,42,0.07),
    0 12px 28px rgba(15,23,42,0.07),
    var(--inset);
}

.launch-screen {
  background:
    linear-gradient(145deg, rgba(248,251,255,0.98), rgba(224,233,243,0.96)),
    repeating-linear-gradient(90deg, rgba(15,23,42,0.03) 0 1px, transparent 1px 92px);
}

.launch-card {
  border-radius: 18px;
  box-shadow:
    0 38px 100px rgba(15,23,42,0.24),
    0 4px 0 rgba(15,23,42,0.06),
    var(--inset);
  transform-style: preserve-3d;
}

.camera-frame,
.ticket-photo-card {
  border-radius: 16px;
}

@media (hover: hover) {
  .card:hover,
  .quick-action:hover,
  .status-tile:hover {
    transform: translateY(-3px) rotateX(2deg);
    box-shadow:
      0 32px 72px rgba(15, 23, 42, 0.18),
      0 2px 0 rgba(255,255,255,0.92) inset,
      0 -1px 0 rgba(15,23,42,0.06) inset;
  }

  .primary:hover,
  .secondary:hover,
  .icon-btn:hover,
  .tab:hover {
    transform: translateY(-2px);
  }
}

@media (max-width: 560px) {
  .content {
    padding-left: 12px;
    padding-right: 12px;
  }

  .premium-panel {
    grid-template-columns: 1fr;
  }

  .occupancy-ring {
    justify-self: center;
  }

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

  .quick-action {
    min-height: 92px;
  }
}

@media (max-width: 390px) {
  .tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .content {
    padding-bottom: 178px;
  }

  .hero-copy {
    grid-template-columns: 1fr;
  }

  .live-badge {
    justify-self: start;
  }
}


/* Login layout safety */
[hidden] {
  display: none !important;
}

.brand > div,
.launch-card > div {
  min-width: 0;
}

.brand h1,
.launch-card strong {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: normal;
}

.brand p {
  overflow-wrap: anywhere;
}

.content.login-content .login {
  padding-left: 16px;
  padding-right: 16px;
}

.content.login-content .brand {
  width: 100%;
  grid-template-columns: auto minmax(0, 1fr);
}

@media (max-width: 420px) {
  .content.login-content .brand {
    align-items: flex-start;
    gap: 13px;
    padding: 15px;
  }

  .brand img {
    width: 58px;
    height: 58px;
    flex: 0 0 auto;
  }

  .brand h1 {
    font-size: 22px;
    line-height: 1.08;
  }

  .brand p {
    font-size: 14px;
  }
}


/* Mobile login no-overflow composition */
.content.login-content {
  overflow-x: hidden;
}

.content.login-content .login,
.content.login-content .brand,
.content.login-content label,
.content.login-content input,
.content.login-content button,
.content.login-content .hint {
  max-width: 100%;
}

.content.login-content .brand {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: center;
  overflow: hidden;
}

.content.login-content .brand h1 {
  display: block;
  min-width: 0;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: auto;
}

.content.login-content .brand p {
  min-width: 0;
  max-width: 100%;
  white-space: normal;
}

@media (max-width: 420px) {
  .content.login-content .login {
    width: 100%;
    padding: 18px 14px;
  }

  .content.login-content .brand {
    grid-template-columns: 56px minmax(0, 1fr);
    border-radius: 14px;
  }

  .content.login-content .brand img {
    width: 56px;
    height: 56px;
  }

  .content.login-content .brand h1 {
    font-size: 20px;
    line-height: 1.12;
  }
}


/* Hard mobile title width guard */
@media (max-width: 480px) {
  .content.login-content .brand > div {
    width: min(220px, calc(100vw - 118px));
    max-width: min(220px, calc(100vw - 118px));
  }

  .content.login-content .brand h1 {
    width: 100%;
    max-width: 100%;
    font-size: 19px;
  }
}


/* Login title absolute guard */
.content.login-content .brand {
  display: grid !important;
  grid-template-columns: 64px minmax(0, 220px) !important;
  justify-content: start;
}

.content.login-content .brand > div {
  width: 220px !important;
  max-width: 220px !important;
  overflow: hidden;
}

.content.login-content .brand h1 {
  white-space: normal !important;
  overflow-wrap: break-word !important;
  max-width: 220px !important;
}


/* Always-visible operator navigation */
:root {
  --nav-height: 82px;
}

.app-shell {
  grid-template-rows: auto 1fr;
}

.content:not(.login-content) {
  padding-bottom: calc(var(--nav-height) + 24px + env(safe-area-inset-bottom)) !important;
}

.tabs:not([hidden]) {
  position: fixed !important;
  left: 50% !important;
  right: auto !important;
  bottom: max(8px, env(safe-area-inset-bottom)) !important;
  z-index: 1000 !important;
  width: min(calc(100vw - 18px), 742px) !important;
  max-width: 742px !important;
  transform: translateX(-50%) translateZ(0) !important;
  display: grid !important;
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  gap: 6px !important;
  min-height: 66px !important;
  padding: 8px !important;
  border: 1px solid rgba(15, 23, 42, 0.12) !important;
  border-radius: 18px !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(232, 239, 247, 0.94)) !important;
  box-shadow:
    0 26px 70px rgba(15, 23, 42, 0.24),
    0 2px 0 rgba(255,255,255,0.88) inset !important;
  backdrop-filter: blur(22px) saturate(1.2) !important;
  -webkit-backdrop-filter: blur(22px) saturate(1.2) !important;
}

.tab {
  min-width: 0 !important;
  min-height: 50px !important;
  padding: 6px 4px !important;
  border-radius: 13px !important;
  display: grid !important;
  place-items: center !important;
  text-align: center !important;
  line-height: 1.12 !important;
  font-size: 10.5px !important;
  overflow-wrap: anywhere !important;
  white-space: normal !important;
}

.tab.active {
  transform: translateY(-2px) !important;
}

@media (max-width: 430px) {
  :root {
    --nav-height: 132px;
  }

  .tabs:not([hidden]) {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    min-height: 112px !important;
  }

  .tab {
    min-height: 48px !important;
    font-size: 11px !important;
  }
}

@media (max-width: 340px) {
  .tab {
    font-size: 10px !important;
  }
}


/* Top-pinned operator navigation */
:root {
  --nav-height: 0px;
}

.content:not(.login-content) {
  padding-bottom: calc(24px + env(safe-area-inset-bottom)) !important;
}

.tabs:not([hidden]) {
  position: sticky !important;
  top: calc(78px + env(safe-area-inset-top)) !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  z-index: 900 !important;
  width: auto !important;
  max-width: none !important;
  transform: none !important;
  margin: 0 10px 10px !important;
  display: grid !important;
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  gap: 6px !important;
  min-height: 58px !important;
  padding: 7px !important;
  border: 1px solid rgba(15, 23, 42, 0.12) !important;
  border-radius: 16px !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.90), rgba(232, 239, 247, 0.96)) !important;
  box-shadow:
    0 18px 42px rgba(15, 23, 42, 0.16),
    0 2px 0 rgba(255,255,255,0.9) inset !important;
  backdrop-filter: blur(22px) saturate(1.2) !important;
  -webkit-backdrop-filter: blur(22px) saturate(1.2) !important;
}

.tab {
  min-height: 44px !important;
  border-radius: 12px !important;
  padding: 6px 4px !important;
  font-size: 10.5px !important;
  line-height: 1.12 !important;
  display: grid !important;
  place-items: center !important;
  text-align: center !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
}

.tab.active {
  transform: none !important;
}

@media (max-width: 430px) {
  .tabs:not([hidden]) {
    top: calc(72px + env(safe-area-inset-top)) !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    min-height: 100px !important;
    margin-left: 8px !important;
    margin-right: 8px !important;
  }

  .tab {
    min-height: 42px !important;
    font-size: 11px !important;
  }
}

@media (min-width: 720px) {
  .tabs:not([hidden]) {
    margin-left: 16px !important;
    margin-right: 16px !important;
  }
}


/* True fixed top navigation: nav is after content in DOM, so sticky is not enough */
:root {
  --top-nav-height: 112px;
}

.content:not(.login-content) {
  padding-top: calc(var(--top-nav-height) + 14px) !important;
  padding-bottom: calc(24px + env(safe-area-inset-bottom)) !important;
}

.tabs:not([hidden]) {
  position: fixed !important;
  left: 50% !important;
  right: auto !important;
  top: calc(82px + env(safe-area-inset-top)) !important;
  bottom: auto !important;
  z-index: 1001 !important;
  width: min(calc(100vw - 18px), 742px) !important;
  max-width: 742px !important;
  transform: translateX(-50%) translateZ(0) !important;
  margin: 0 !important;
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 6px !important;
  min-height: 104px !important;
  padding: 8px !important;
  border-radius: 18px !important;
  border: 1px solid rgba(15, 23, 42, 0.12) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.91), rgba(232, 239, 247, 0.97)) !important;
  box-shadow:
    0 22px 54px rgba(15, 23, 42, 0.18),
    0 2px 0 rgba(255,255,255,0.9) inset !important;
  backdrop-filter: blur(22px) saturate(1.2) !important;
  -webkit-backdrop-filter: blur(22px) saturate(1.2) !important;
}

.tab {
  min-height: 42px !important;
  border-radius: 12px !important;
  padding: 6px 5px !important;
  display: grid !important;
  place-items: center !important;
  font-size: 11px !important;
  line-height: 1.12 !important;
  text-align: center !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
}

.tab.active {
  transform: translateY(-1px) !important;
}

@media (min-width: 700px) {
  :root {
    --top-nav-height: 74px;
  }

  .tabs:not([hidden]) {
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    min-height: 62px !important;
  }

  .tab {
    min-height: 46px !important;
    font-size: 10.5px !important;
  }
}

@media (max-width: 380px) {
  .tabs:not([hidden]) {
    width: min(calc(100vw - 12px), 742px) !important;
    gap: 5px !important;
    padding: 7px !important;
  }

  .tab {
    font-size: 10px !important;
  }
}


/* Modern home dashboard */
.home-dashboard {
  display: grid;
  gap: 14px;
}

.dashboard-head {
  align-items: center;
}

.dashboard-stage {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px;
  gap: 12px;
  align-items: stretch;
  transform: translateZ(34px);
}

.parking-visual {
  position: relative;
  min-height: 176px;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.16);
  background:
    linear-gradient(180deg, rgba(12, 19, 31, 0.96), rgba(31, 45, 64, 0.98)),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.05) 0 1px, transparent 1px 48px),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.035) 0 1px, transparent 1px 40px);
  box-shadow:
    0 30px 58px rgba(15, 23, 42, 0.24),
    inset 0 1px 0 rgba(255,255,255,0.16);
  transform: perspective(900px) rotateX(7deg);
  transform-origin: 50% 70%;
}

.parking-visual::before {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 12px;
  border: 1px solid rgba(226, 232, 240, 0.12);
  pointer-events: none;
}

.parking-visual .deck-grid {
  inset: 22px 18px 28px;
  grid-template-columns: repeat(7, 1fr);
  grid-template-rows: repeat(2, 1fr);
}

.parking-visual .deck-road {
  top: 50%;
  height: 38px;
  margin-top: -19px;
}

.parking-visual .deck-beam {
  height: 100%;
}

.parking-visual .sensor-node.entry {
  left: 42px;
  bottom: 18px;
}

.parking-visual .sensor-node.exit {
  right: 42px;
  top: 18px;
}

.dashboard-main-metric {
  position: relative;
  min-width: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.11);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.94), rgba(233,240,248,0.82));
  box-shadow:
    0 24px 52px rgba(15, 23, 42, 0.15),
    inset 0 1px 0 rgba(255,255,255,0.92);
}

.dashboard-main-metric span,
.dashboard-main-metric em {
  color: var(--muted);
  font-style: normal;
  font-weight: 820;
}

.dashboard-main-metric strong {
  color: var(--text);
  font-size: 58px;
  line-height: 0.9;
  font-weight: 940;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 0 #fff, 0 18px 32px rgba(15,23,42,0.20);
}

.dashboard-strip {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 8px;
  transform: translateZ(36px);
}

.occupancy-line {
  height: 13px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.10);
  box-shadow: inset 0 1px 4px rgba(15,23,42,0.12);
}

.occupancy-line span {
  display: block;
  width: calc(var(--value) * 1%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1c6be8, #0f9f8e);
  box-shadow: 0 0 22px rgba(28,107,232,0.30);
}

.strip-values {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-weight: 780;
}

.strip-values strong {
  color: var(--text);
}

.dashboard-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dashboard-metrics div {
  min-height: 74px;
}

@media (max-width: 520px) {
  .dashboard-stage {
    grid-template-columns: 1fr;
  }

  .parking-visual {
    min-height: 164px;
  }

  .dashboard-main-metric {
    grid-template-columns: auto auto auto;
    justify-content: center;
    gap: 8px;
    min-height: 76px;
  }

  .dashboard-main-metric strong {
    font-size: 48px;
  }

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


/* Home dashboard visual refinements */
.parking-visual .deck-gate {
  bottom: 8px;
  min-width: 54px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 10px;
  line-height: 1;
  letter-spacing: 0;
  opacity: 0.88;
}

.parking-visual .deck-gate.entry {
  left: 12px;
}

.parking-visual .deck-gate.exit {
  right: 12px;
}

.parking-visual .deck-slot.occupied::before {
  inset: 10px 7px;
  border-radius: 7px 7px 4px 4px;
}

.parking-visual .deck-slot.free::before {
  inset: 15px 10px;
}

@media (max-width: 520px) {
  .parking-visual .deck-gate {
    font-size: 9px;
    min-width: 48px;
  }
}
