* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy: #174e7a;
  --navy-deep: #102f4d;
  --blue: #1f6fd7;
  --blue-soft: #eaf3ff;
  --mint: #087d70;
  --mint-soft: #e1f3ef;
  --amber: #a85d00;
  --red: #bd3d47;
  --ink: #172b3d;
  --muted: #586d7e;
  --line: #d7e1e8;
  --paper: #fff;
  --canvas: #f5f8fa;
  --radius-lg: 28px;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 18px 50px rgba(21, 52, 77, .12);
}

[data-theme="dark"] {
  --navy: #2a5d8f;
  --navy-deep: #0c2c4a;
  --blue: #5aa2ff;
  --blue-soft: #1d3a5c;
  --mint: #57c3b5;
  --mint-soft: #1c3d40;
  --amber: #f0a93d;
  --red: #e56666;
  --ink: #e6eef4;
  --muted: #8fa2b2;
  --line: #2a3d4f;
  --paper: #152534;
  --canvas: #0d1a26;
  --shadow: 0 18px 50px rgba(0, 0, 0, .45);
}

[data-theme="dark"] .brand { color: var(--ink); }
[data-theme="dark"] .btn-secondary,
[data-theme="dark"] .modal-summary { color: var(--ink); }
[data-theme="dark"] .modal-title,
[data-theme="dark"] .map-section-heading h2,
[data-theme="dark"] .section-heading h2,
[data-theme="dark"] .app-topline h1,
[data-theme="dark"] .page-title h1,
[data-theme="dark"] .auth-heading,
[data-theme="dark"] .stat-card strong,
[data-theme="dark"] .receipt-head strong,
[data-theme="dark"] .receipt-total,
[data-theme="dark"] .success-title { color: var(--ink); }
[data-theme="dark"] .balance-card,
[data-theme="dark"] .toast { background: #0c2c4a; }
[data-theme="dark"] .auth-screen { background: linear-gradient(165deg, #0c2c4a 0%, #174e7a 55%, #215d91 100%); }

html { min-height: 100%; color-scheme: light; background: var(--canvas); scroll-behavior: smooth; }
body { min-height: 100vh; min-height: 100dvh; color: var(--ink); background: var(--canvas); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif; -webkit-tap-highlight-color: transparent; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid rgba(32, 110, 212, .28); outline-offset: 3px; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }

.public-header { max-width: 1120px; height: 82px; margin: 0 auto; padding: 0 28px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--navy-deep); text-decoration: none; }
.brand-mark { width: 39px; height: 39px; display: grid; place-items: center; color: white; background: var(--navy); border-radius: 12px 12px 12px 4px; font-size: 22px; font-weight: 800; }
.brand strong, .brand small { display: block; line-height: 1.05; }
.brand strong { font-size: 15px; font-weight: 800; }
.brand small { margin-top: 3px; color: var(--muted); font-size: 11px; letter-spacing: .04em; }
.account-link { min-height: 42px; border: 0; border-bottom: 1px solid currentColor; color: var(--navy); background: transparent; font-size: 13px; font-weight: 700; cursor: pointer; }
.header-actions { display: flex; align-items: center; gap: 13px; }
.install-app-btn { min-height: 40px; padding: 0 14px; color: white; background: var(--navy); border: 0; border-radius: 11px; font-size: 11px; font-weight: 800; cursor: pointer; }
.connection-status { padding: 6px 9px; color: #934343; background: #fdeaea; border-radius: 8px; font-size: 10px; font-weight: 800; }
.is-standalone .install-app-btn { display: none !important; }

.app-shell { width: 100%; }
.screen { display: none; }
.screen.active { display: block; animation: screen-in .35s cubic-bezier(.2,.7,.2,1); }
.auth-screen.active { display: flex; }
@keyframes screen-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.guest-screen { max-width: 1120px; margin: 0 auto; padding: 28px 28px 80px; }
.guest-hero { position: relative; min-height: 450px; padding: 68px 58px; overflow: hidden; color: white; background: linear-gradient(135deg, #102f4d 0%, #174e7a 100%); border-radius: var(--radius-lg); isolation: isolate; }
.guest-hero::before { content: ''; position: absolute; width: 510px; height: 510px; right: -105px; top: -150px; border: 78px solid rgba(127,221,201,.18); border-radius: 50%; z-index: -1; }
.guest-hero::after { content: 'P'; position: absolute; right: 58px; bottom: -67px; color: rgba(255,255,255,.06); font-size: 320px; font-weight: 800; line-height: 1; z-index: -1; }
.eyebrow { color: var(--mint); font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.guest-hero h1 { max-width: 610px; margin: 17px 0 16px; font-size: clamp(42px, 6vw, 72px); line-height: .98; letter-spacing: -.055em; }
.guest-hero > p { max-width: 460px; color: rgba(255,255,255,.72); font-size: 17px; line-height: 1.6; }
.btn { min-height: 54px; padding: 0 22px; display: inline-flex; align-items: center; justify-content: center; gap: 12px; border: 0; border-radius: 14px; font-weight: 800; cursor: pointer; transition: transform .18s ease, background .18s ease, opacity .18s ease; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(1px) scale(.99); }
.btn:disabled { cursor: wait; opacity: .6; transform: none; }
.btn-primary { color: white; background: var(--blue); }
.btn-primary:hover { background: #185eb9; }
.btn-secondary { color: var(--navy); background: var(--paper); border: 1px solid var(--line); }
.btn-success { color: white; background: var(--mint); }
.btn-glass { color: white; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.2); }
.btn-glass:hover { background: rgba(255,255,255,.22); }
.guest-cta { min-width: 250px; margin-top: 32px; background: var(--mint); box-shadow: 0 12px 24px rgba(2,61,55,.28); }
.guest-cta:hover { background: #066b60; }
.guest-cta span { font-size: 22px; }
.guest-locate { margin-top: 12px; }
.geo-locate-btn { padding: 4px 8px; border: none; border-radius: 8px; color: var(--blue); background: var(--blue-soft); font-size: 10px; font-weight: 700; cursor: pointer; }
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 16px 0 22px; }
.stat-card { padding: 14px; background: var(--blue-soft); border-radius: 14px; }
.stat-card span { display: block; color: var(--muted); font-size: 11px; margin-bottom: 4px; }
.stat-card strong { color: var(--navy-deep); font-size: 18px; }
.admin-actions { margin: 14px 0 6px; display: flex; gap: 10px; }
.trend-chart { display: flex; align-items: flex-end; gap: 6px; height: 96px; padding: 10px 4px 0; }
.trend-bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; height: 100%; }
.trend-bar span { width: 100%; display: block; background: linear-gradient(180deg, var(--blue), var(--mint)); border-radius: 6px 6px 0 0; min-height: 4px; }
.trend-bar small { color: var(--muted); font-size: 9px; }
.org-create { width: 100%; margin-top: 12px; }
.org-act { align-self: flex-end; white-space: nowrap; }
.receipt { background: var(--paper); border-radius: 14px; padding: 16px; }
.receipt-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.receipt-head strong { display: block; color: var(--navy-deep); }
.receipt-head small { color: var(--muted); font-size: 10px; }
.receipt-row { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: 12px; }
.receipt-row span { color: var(--muted); }
.receipt-total { display: flex; justify-content: space-between; margin-top: 12px; font-weight: 800; color: var(--navy-deep); }
.night-note { margin-top: 10px; padding: 8px 10px; border-radius: 10px; background: var(--blue-soft); color: var(--blue); font-size: 11px; font-weight: 700; }
.qr-body { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.qr-code { width: 200px; height: 200px; padding: 10px; background: white; border-radius: 14px; box-shadow: 0 6px 18px rgba(18, 59, 99, .1); }
.qr-code svg { width: 100%; height: 100%; display: block; }
@media print {
  body * { visibility: hidden; }
  #modal-content, #modal-content * { visibility: visible; }
  #modal-content { position: absolute; left: 0; top: 0; width: 100%; box-shadow: none; }
  .modal-header, .modal-footer, .modal-close { display: none !important; }
}
.trust-row { position: absolute; left: 58px; bottom: 34px; display: flex; gap: 24px; color: rgba(255,255,255,.67); font-size: 11px; font-weight: 600; }
.trust-row span::before { content: '✓'; margin-right: 7px; color: var(--mint); font-weight: 800; }

.public-map-section { margin-top: 22px; padding: 38px 40px 40px; background: var(--paper); border-radius: var(--radius-lg); }
.map-section-heading { margin-bottom: 24px; display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.map-section-heading h2 { margin-top: 8px; color: var(--navy-deep); font-size: clamp(27px, 4vw, 42px); letter-spacing: -.04em; }
.map-legend { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px 14px; color: var(--muted); font-size: 11px; font-weight: 700; }
.map-legend span::before { content: ''; width: 8px; height: 8px; margin-right: 6px; display: inline-block; border-radius: 50%; }
.map-legend .available::before { background: #3478f6; }
.map-legend .limited::before { background: var(--amber); }
.map-legend .full::before { background: var(--red); }
.map-legend .informational::before { background: #748493; }
.guest-map { position: relative; height: 430px; overflow: hidden; background: #e8eef1; border-radius: 22px; }
.map-surface { isolation: isolate; }
.parking-map-shell { position: relative; }
.parking-map-shell--account { margin-bottom: 14px; }
.map-search { position: absolute; top: 14px; left: 14px; z-index: 20; width: min(390px, calc(100% - 28px)); height: 50px; display: flex; align-items: center; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 8px 28px rgba(8,40,68,.18); }
.map-search:focus-within { border-color: var(--blue); box-shadow: 0 8px 28px rgba(8,40,68,.18), 0 0 0 3px rgba(32,110,212,.12); }
.map-search-icon { width: 44px; flex: 0 0 44px; color: var(--navy); text-align: center; font-size: 25px; line-height: 1; transform: rotate(-18deg); }
.map-search-input { min-width: 0; height: 100%; flex: 1; color: var(--ink); background: transparent; border: 0; outline: 0; font-size: 14px; }
.map-search-input::-webkit-search-cancel-button { display: none; }
.map-search-clear { width: 44px; height: 44px; flex: 0 0 44px; color: var(--muted); background: transparent; border: 0; border-radius: 12px; font-size: 22px; cursor: pointer; }
.map-search-clear:hover { color: var(--navy); background: var(--canvas); }
.map-search-results { position: absolute; top: 70px; left: 14px; z-index: 19; width: min(390px, calc(100% - 28px)); max-height: min(260px, calc(100% - 88px)); overflow-y: auto; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 14px 35px rgba(8,40,68,.2); }
.map-search-result { width: 100%; min-height: 62px; padding: 10px 13px; display: grid; grid-template-columns: 36px 1fr; gap: 10px; align-items: center; color: inherit; text-align: left; background: transparent; border: 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.map-search-result:last-child { border-bottom: 0; }
.map-search-result:hover, .map-search-result.active { background: var(--blue-soft); }
.map-search-result-icon { width: 34px; height: 34px; display: grid; place-items: center; color: white; background: var(--blue); border-radius: 10px; font-size: 12px; font-weight: 800; }
.map-search-result strong, .map-search-result small { display: block; }
.map-search-result strong { color: var(--navy-deep); font-size: 12px; }
.map-search-result small { margin-top: 3px; color: var(--muted); font-size: 10px; line-height: 1.3; }
.map-search-empty { padding: 17px; color: var(--muted); font-size: 12px; text-align: center; }
.map-loading { height: 100%; display: grid; place-items: center; color: var(--muted); font-size: 12px; }
.parking-map-fallback { height: 100%; padding: 24px; display: flex; flex-direction: column; justify-content: flex-end; background-color: #e5edf1; background-image: linear-gradient(28deg, transparent 48%, rgba(255,255,255,.9) 49%, rgba(255,255,255,.9) 52%, transparent 53%), linear-gradient(120deg, transparent 46%, #c5d4dc 47%, #c5d4dc 49%, transparent 50%); background-size: 120px 90px, 170px 130px; }
.fallback-map-title { margin-top: 64px; margin-bottom: auto; padding: 13px 15px; width: fit-content; color: var(--navy); background: rgba(255,255,255,.92); border-radius: 13px; box-shadow: 0 8px 24px rgba(18,59,99,.12); }
.fallback-map-title strong, .fallback-map-title small { display: block; }
.fallback-map-title small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.fallback-map-points { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px; max-height: 210px; overflow-y: auto; }
.fallback-map-point { min-height: 58px; padding: 9px 11px; display: grid; grid-template-columns: 34px 1fr; gap: 9px; align-items: center; color: var(--navy); background: rgba(255,255,255,.96); border: 1px solid rgba(255,255,255,.9); border-radius: 14px; box-shadow: 0 7px 20px rgba(18,59,99,.12); text-align: left; cursor: pointer; transition: transform .18s ease, box-shadow .18s ease; }
.fallback-map-point:hover { transform: translateY(-2px); box-shadow: 0 11px 25px rgba(18,59,99,.17); }
.fallback-map-point-icon { width: 34px; height: 34px; display: grid; place-items: center; color: white; background: linear-gradient(145deg, #3984eb, #175fc0); border-radius: 10px 10px 10px 4px; font-size: 14px; font-weight: 900; }
.fallback-map-point strong, .fallback-map-point small { display: block; }
.fallback-map-point strong { font-size: 10px; line-height: 1.25; }
.fallback-map-point small { margin-top: 3px; color: #238c7d; font-size: 9px; line-height: 1.25; }
.fallback-map-point.full small { color: var(--red); }
.fallback-map-point.unknown .fallback-map-point-icon, .fallback-map-point.restricted .fallback-map-point-icon { background: linear-gradient(145deg, #8998a5, #657581); }
.fallback-map-point.restricted small { color: #806a9d; }
.map-data-source, .map-attribution { color: var(--muted); font-size: 9px; }
.map-data-source { margin-top: 8px; text-align: right; }
.map-attribution { margin: 9px 4px 0; }
.parking-balloon { min-width: 225px; padding: 3px; color: var(--ink); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif; }
.parking-balloon > strong, .parking-balloon > span, .parking-balloon > small { display: block; }
.parking-balloon .parking-balloon-kicker { margin: 0 0 5px; color: var(--blue); font-size: 9px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.parking-balloon > strong { color: var(--navy-deep); font-size: 15px; line-height: 1.25; }
.parking-balloon > span:not(.parking-balloon-kicker) { margin-top: 5px; color: var(--muted); font-size: 11px; line-height: 1.35; }
.parking-balloon > small { margin-top: 9px; color: #8a98a4; font-size: 8px; }
.parking-balloon-facts { margin-top: 11px; display: flex; flex-wrap: wrap; gap: 6px; }
.parking-balloon-facts b { padding: 6px 8px; color: var(--blue); background: var(--blue-soft); border-radius: 8px; font-size: 10px; }
.parking-balloon button { width: 100%; min-height: 42px; margin-top: 12px; padding: 0 13px; display: flex; align-items: center; justify-content: center; gap: 8px; color: white; background: linear-gradient(135deg, var(--blue), #1557ad); border: 0; border-radius: 11px; box-shadow: 0 8px 18px rgba(32,110,212,.22); font-size: 11px; font-weight: 850; cursor: pointer; transition: transform .18s ease, box-shadow .18s ease; }
.parking-balloon button:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 11px 22px rgba(32,110,212,.3); }
.parking-balloon button:disabled { color: var(--muted); background: #edf1f4; box-shadow: none; cursor: default; }
.parking-price-badge { height: 34px; display: grid; place-items: center; color: #174c91; background: white; border: 3px solid #3478f6; border-radius: 17px; box-shadow: 0 5px 16px rgba(18,59,99,.22); font: 800 12px/1 -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif; white-space: nowrap; cursor: pointer; }
.parking-price-badge--price { min-width: 62px; padding: 0 8px; }
.parking-price-badge--compact { width: 34px; padding: 0; font-size: 14px; }
.parking-price-badge--limited { color: #8b5700; border-color: #f2a93b; }
.parking-price-badge--full { color: #a22f2f; border-color: #e25555; }
.parking-price-badge--unknown { color: #536473; border-color: #81919e; }
.parking-price-badge--restricted { color: #6f5b88; border-color: #8b79a8; }

.how-it-works { padding: 82px 58px 20px; }
.section-heading h2 { margin-top: 9px; color: var(--navy-deep); font-size: clamp(30px, 4vw, 46px); letter-spacing: -.04em; }
.section-heading > p { margin-top: 9px; color: var(--muted); line-height: 1.6; }
.steps-list { margin-top: 36px; list-style: none; border-top: 1px solid var(--line); }
.steps-list li { min-height: 96px; display: grid; grid-template-columns: 72px 1fr; align-items: center; border-bottom: 1px solid var(--line); }
.steps-list li > span { color: var(--mint); font-size: 13px; font-weight: 800; }
.steps-list strong { color: var(--navy-deep); font-size: 18px; }
.steps-list p { margin-top: 4px; color: var(--muted); font-size: 13px; }

.account-panel { max-width: 620px; margin: 60px auto 0; padding: 44px; background: var(--paper); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.account-panel form { margin-top: 30px; }

.auth-screen { min-height: 100dvh; display: flex; flex-direction: column; position: relative; padding: 20px 20px 40px; color: white; background: linear-gradient(165deg, var(--navy-deep) 0%, #0d3b68 55%, #144e83 100%); overflow: hidden; }
.auth-screen::before { content: ''; position: absolute; width: 560px; height: 560px; left: -180px; top: -160px; border: 96px solid rgba(80,182,168,.18); border-radius: 50%; }
.auth-screen::after { content: 'P'; position: absolute; right: -40px; bottom: -130px; color: rgba(255,255,255,.06); font-size: 380px; font-weight: 800; line-height: 1; }
.auth-back { position: relative; z-index: 1; width: fit-content; min-height: 44px; padding: 0 16px; display: flex; align-items: center; gap: 8px; color: white; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.16); border-radius: 12px; font-size: 13px; font-weight: 700; cursor: pointer; transition: background .18s; }
.auth-back:hover { background: rgba(255,255,255,.2); }
.auth-container { position: relative; z-index: 1; flex: 1; display: flex; align-items: center; justify-content: center; padding: 24px 0; }
.auth-brand { display: inline-flex; align-items: center; gap: 11px; color: white; font-size: 14px; font-weight: 800; }
.auth-brand .brand-mark { width: 44px; height: 44px; font-size: 24px; background: var(--mint); }
.auth-brand span { display: block; line-height: 1.1; }
.auth-brand span span { color: rgba(255,255,255,.62); font-size: 11px; font-weight: 600; }
.auth-card { width: 100%; max-width: 400px; padding: 34px 30px 30px; color: var(--ink); background: var(--paper); border-radius: var(--radius-lg); box-shadow: 0 30px 60px rgba(4, 22, 41, .35); }
.auth-heading { color: var(--navy-deep); font-size: 25px; font-weight: 800; letter-spacing: -.03em; }
.auth-sub { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.auth-or { margin: 18px 0; display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.auth-or::before, .auth-or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.btn-vk { min-height: 52px; color: white; background: #0077ff; }
.btn-vk:hover { background: #0066d8; }
.btn-vk .vk-logo { width: 26px; height: 26px; display: grid; place-items: center; color: #0077ff; background: white; border-radius: 7px; font-size: 11px; font-weight: 800; }
.auth-screen form { width: 100%; margin-top: 26px; }
.auth-screen form .form-group { margin-bottom: 17px; }
.form-group { margin-bottom: 17px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-row .form-group { margin-bottom: 0; }
.form-label { display: block; margin-bottom: 7px; color: var(--ink); font-size: 12px; font-weight: 700; }
.form-input, .form-select { width: 100%; height: 54px; padding: 0 15px; color: var(--ink); background: var(--canvas); border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 16px; transition: border-color .2s, background .2s; }
.form-input:focus, .form-select:focus { background: var(--paper); border-color: var(--blue); outline: 3px solid rgba(32,110,212,.12); }
.form-input.invalid { border-color: var(--red); background: #fff5f5; }
.field-hint { display: block; margin-top: 5px; color: var(--red); font-size: 11px; }
.form-switch { margin-top: 17px; color: var(--muted); text-align: center; font-size: 13px; }
.form-switch button { padding: 5px; color: var(--blue); background: none; border: 0; font-weight: 700; cursor: pointer; }
.consent-check { display: flex; align-items: flex-start; gap: 10px; margin: 4px 0 18px; color: var(--muted); font-size: 12px; line-height: 1.5; cursor: pointer; }
.consent-check input { width: 18px; height: 18px; margin-top: 1px; flex-shrink: 0; accent-color: var(--blue); cursor: pointer; }
.consent-link { padding: 0; color: var(--blue); background: none; border: 0; font-size: inherit; font-weight: 700; cursor: pointer; }
.consent-error { margin: -8px 0 16px; color: var(--red); font-size: 12px; font-weight: 600; }
.consent-text { color: var(--ink); font-size: 13.5px; line-height: 1.65; }
.consent-text p { margin-bottom: 12px; }
.consent-text p:last-child { margin-bottom: 0; }
.link-btn { min-height: 34px; padding: 0; color: var(--blue); background: transparent; border: 0; font-size: 12px; font-weight: 700; cursor: pointer; }
.link-btn:hover { text-decoration: underline; }
.code-row { display: flex; gap: 8px; align-items: center; }
.code-row .form-input { min-width: 0; flex: 1; }
.code-send { min-width: 0; height: 54px; padding: 0 14px; white-space: nowrap; }
.utility-row-btn {
  width: 100%;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: inherit;
  text-align: left;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  cursor: pointer;
  transition: background .18s ease;
}
.utility-row-btn:hover { background: var(--blue-soft); }
.utility-row-btn:focus-visible { position: relative; z-index: 1; outline-offset: -3px; }

.app-screen { max-width: 520px; min-height: 100dvh; margin: 0 auto; padding: 28px 20px 112px; }
.app-topline { margin-bottom: 22px; display: flex; align-items: center; justify-content: space-between; }
.app-topline h1, .page-title h1 { margin-top: 4px; color: var(--navy-deep); font-size: 28px; letter-spacing: -.04em; }
.profile-mini { width: 44px; height: 44px; display: grid; place-items: center; color: white; background: var(--navy); border-radius: 50%; font-weight: 800; }
.balance-card { min-height: 145px; padding: 25px; display: flex; align-items: flex-end; justify-content: space-between; color: white; background: var(--navy-deep); border-radius: 24px; overflow: hidden; position: relative; }
.balance-card::after { content: ''; position: absolute; width: 170px; height: 170px; right: -65px; top: -80px; border: 35px solid rgba(80,182,168,.25); border-radius: 50%; }
.balance-label { margin-bottom: 5px; color: rgba(255,255,255,.66); font-size: 12px; }
.balance-amount { font-size: 34px; font-weight: 800; letter-spacing: -.04em; }
.balance-btn { position: relative; z-index: 1; min-height: 40px; padding: 0 15px; color: white; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.18); border-radius: 11px; font-size: 12px; font-weight: 800; cursor: pointer; }
.active-parking-list { margin-top: 13px; display: grid; gap: 10px; }
.active-parking-widget { position: static; margin-top: 14px; display: grid; gap: 10px; }
.active-parking-widget--guest { position: static; margin: 16px auto 0; max-width: 480px; }
.active-parking-widget .active-parking { box-shadow: 0 12px 30px rgba(18, 44, 58, .35); }
.active-parking { padding: 21px; color: white; background: linear-gradient(145deg, var(--mint), #34998d); border-radius: 22px; box-shadow: 0 10px 26px rgba(56,153,141,.18); }
.active-head { display: flex; justify-content: space-between; gap: 15px; }
.active-head div { display: flex; flex-direction: column; }
.active-head span:first-child, .active-head small { color: rgba(255,255,255,.75); font-size: 11px; }
.active-head strong { margin: 4px 0 2px; font-size: 18px; }
.status-badge { height: fit-content; padding: 5px 8px; border-radius: 8px; font-size: 10px; font-weight: 800; }
.status-badge.active { color: #187569; background: rgba(255,255,255,.72); }
.timer { margin: 19px 0 14px; display: flex; align-items: baseline; gap: 8px; }
.timer span { font-size: 31px; font-weight: 800; font-variant-numeric: tabular-nums; }
.timer small { color: rgba(255,255,255,.72); }
.active-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.active-actions .btn-glass { flex: 1; white-space: nowrap; }
.compact-map-heading { margin: 22px 0 9px; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.compact-map-heading strong { color: var(--navy-deep); font-size: 15px; }
.compact-map-heading span { color: var(--muted); font-size: 10px; }
.map-heading-actions { display: flex; align-items: center; gap: 8px; }
.history-layer-toggle { min-height: 30px; padding: 0 10px; display: inline-flex; align-items: center; gap: 5px; color: var(--blue); background: var(--blue-soft); border: 0; border-radius: 9px; font-size: 11px; font-weight: 800; cursor: pointer; }
.history-layer-toggle.active { color: white; background: var(--blue); }
.map-container { height: 280px; overflow: hidden; background: #dfe8ed; border-radius: 22px; }
.section-title { margin: 31px 0 13px; display: flex; align-items: center; justify-content: space-between; }
.section-title h2 { color: var(--navy-deep); font-size: 19px; }
.section-title button { min-height: 36px; color: var(--blue); background: none; border: 0; font-size: 12px; font-weight: 800; cursor: pointer; }
.page-title { margin-top: 2px; }
.page-title span { color: var(--muted); font-size: 12px; }
.parking-list, .car-list, .history-list { display: flex; flex-direction: column; }
.parking-list { gap: 10px; }
.parking-card { position: relative; width: 100%; min-height: 96px; padding: 14px; display: grid; grid-template-columns: 52px 1fr auto; gap: 14px; align-items: center; overflow: hidden; color: inherit; text-align: left; background: var(--paper); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 7px 22px rgba(18,59,99,.07); cursor: pointer; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.parking-card::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 4px; background: linear-gradient(180deg, var(--blue), var(--mint)); opacity: .9; }
.parking-card:hover { border-color: rgba(32,110,212,.32); box-shadow: 0 13px 30px rgba(18,59,99,.13); transform: translateY(-2px); }
.parking-card:active { transform: translateY(0); }
.parking-card.is-unavailable::before { background: var(--red); }
.parking-card.status-unknown::before { background: #81919e; }
.parking-card.status-restricted::before { background: #8b79a8; }
.parking-icon { width: 52px; height: 52px; display: grid; place-items: center; color: white; background: linear-gradient(145deg, #3984eb, #175fc0); border-radius: 16px 16px 16px 6px; box-shadow: 0 8px 18px rgba(32,110,212,.24); font-weight: 900; }
.parking-icon span { width: 27px; height: 27px; display: grid; place-items: center; border: 2px solid rgba(255,255,255,.85); border-radius: 8px; }
.parking-name { display: block; color: var(--navy-deep); font-size: 14px; font-weight: 800; line-height: 1.3; }
.parking-address { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; line-height: 1.35; }
.parking-meta { margin-top: 7px; display: flex; gap: 10px; font-size: 10px; font-weight: 700; }
.parking-price, .parking-spots { padding: 4px 7px; border-radius: 7px; }
.parking-price { color: var(--blue); background: var(--blue-soft); }
.parking-spots { color: #238c7d; background: var(--mint-soft); }
.parking-spots.warning { color: var(--amber); }
.parking-spots.full { color: var(--red); }
.parking-spots.unknown { color: #5f7080; background: #edf1f4; }
.parking-spots.restricted { color: #6f5b88; background: #f0ebf5; }
.parking-arrow { width: 36px; height: 36px; display: grid; place-items: center; color: var(--blue); background: var(--blue-soft); border-radius: 11px; transition: transform .2s, background .2s; }
.parking-card:hover .parking-arrow { color: white; background: var(--blue); transform: translateX(2px); }
.parking-arrow span { font-size: 18px; transform: translateY(-1px); }
.parking-card-wrap { position: relative; }
.parking-card-wrap .parking-card { transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, padding-right .2s ease; }
.parking-route-btn { position: absolute; top: 8px; right: 8px; z-index: 1; width: 30px; height: 30px; display: grid; place-items: center; color: var(--blue); background: var(--blue-soft); border: none; border-radius: 9px; cursor: pointer; font-size: 15px; line-height: 1; transition: color .2s, background .2s; }
.parking-card:hover ~ .parking-route-btn, .parking-route-btn:hover { color: white; background: var(--blue); }
.modal-actions { display: flex; align-items: center; gap: 8px; }
.modal-route, .modal-qr { width: 34px; height: 34px; display: grid; place-items: center; color: var(--blue); background: var(--blue-soft); border: none; border-radius: 9px; cursor: pointer; font-size: 16px; line-height: 1; transition: color .2s, background .2s; }
.modal-route:hover, .modal-qr:hover { color: white; background: var(--blue); }
.car-card { min-height: 82px; padding: 15px 0; display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: 13px; border-bottom: 1px solid var(--line); }
.car-icon { width: 48px; height: 48px; display: grid; place-items: center; color: var(--navy); background: var(--blue-soft); border-radius: 14px; }
.car-number { font-size: 16px; font-weight: 800; letter-spacing: .05em; }
.car-model { margin-top: 3px; color: var(--muted); font-size: 11px; }
.car-type { margin-top: 3px; width: fit-content; padding: 2px 8px; color: var(--navy); background: var(--blue-soft); border-radius: 7px; font-size: 9px; font-weight: 800; }
.admin-card { min-height: 72px; padding: 14px 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); }
.admin-card > div:first-child { display: flex; flex-direction: column; min-width: 0; }
.admin-card strong { font-size: 15px; }
.admin-card small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.admin-card-actions { display: flex; gap: 6px; }
.admin-actions .btn-glass,
.admin-card-actions .btn-glass { color: var(--navy); background: var(--blue-soft); border-color: transparent; }
.admin-actions .btn-glass:hover,
.admin-card-actions .btn-glass:hover { background: rgba(23, 105, 207, .16); }
.admin-btn { min-height: 34px; padding: 0 10px; border-radius: 9px; font-size: 10px; white-space: nowrap; }
.admin-btn-danger { color: var(--red) !important; }
.referral-code { padding: 16px; color: var(--navy-deep); background: var(--canvas); border: 1px dashed var(--line); border-radius: var(--radius-sm); font-size: 22px; font-weight: 800; text-align: center; letter-spacing: .18em; }
.parking-tariffs { display: block; margin-top: 5px; color: var(--muted); font-size: 9px; line-height: 1.4; }
.parking-balloon-tariffs { margin-top: 6px !important; color: #4a8496; font-size: 9px; line-height: 1.4; }
.car-actions { display: flex; align-items: center; }
.icon-btn { width: 42px; height: 42px; display: grid; place-items: center; color: var(--muted); background: transparent; border: 0; border-radius: 50%; cursor: pointer; }
.icon-btn:hover { color: var(--blue); background: var(--blue-soft); }
.icon-btn.delete:hover { color: var(--red); background: #fdeaea; }
.empty-state { padding: 55px 20px; color: var(--muted); text-align: center; }
.empty-state strong { display: block; margin-bottom: 6px; color: var(--navy); }
.profile-header { padding: 10px 0 24px; display: flex; align-items: center; gap: 15px; }
.profile-avatar { width: 58px; height: 58px; display: grid; place-items: center; color: white; background: var(--navy); border-radius: 18px; font-size: 21px; font-weight: 800; }
.profile-info { min-width: 0; flex: 1; }
.profile-info h1 { color: var(--navy-deep); font-size: 22px; }
.profile-info p { margin-top: 3px; color: var(--muted); font-size: 12px; }
.profile-edit-btn { min-height: 42px; padding: 0 10px; color: var(--blue); background: transparent; border: 0; border-radius: 10px; font-size: 12px; font-weight: 800; cursor: pointer; }
.profile-edit-btn:hover { background: var(--blue-soft); }
.utility-list { border-top: 1px solid var(--line); }
.utility-list > * { min-height: 65px; display: flex; align-items: center; justify-content: space-between; color: inherit; text-decoration: none; border-bottom: 1px solid var(--line); }
.utility-list span { color: var(--muted); font-size: 12px; }
.utility-list strong { color: var(--navy); font-size: 12px; }
.utility-list .status-online { color: #238c7d; }
.history-item { min-height: 70px; display: grid; grid-template-columns: 38px 1fr auto; gap: 11px; align-items: center; border-bottom: 1px solid var(--line); }
.history-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; font-weight: 800; }
.history-icon.income { color: #238c7d; background: var(--mint-soft); }
.history-icon.expense { color: var(--blue); background: var(--blue-soft); }
.history-title { font-size: 12px; font-weight: 700; }
.history-date { margin-top: 3px; color: var(--muted); font-size: 10px; }
.history-amount { font-size: 13px; font-weight: 800; }
.history-amount.income { color: #238c7d; }
.logout-btn { width: 100%; margin-top: 30px; }

.bottom-nav { position: fixed; left: 50%; bottom: max(12px, env(safe-area-inset-bottom)); z-index: 1000; width: min(calc(100% - 24px), 480px); min-height: 68px; padding: 8px; display: grid; grid-template-columns: repeat(4, 1fr); background: var(--paper); border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 16px 50px rgba(8,40,68,.16); backdrop-filter: blur(16px); transform: translateX(-50%); }
.bottom-nav:has(#nav-admin:not([hidden])) { grid-template-columns: repeat(5, 1fr); }
.nav-item { min-height: 50px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--muted); background: none; border: 0; border-radius: 15px; cursor: pointer; }
.nav-item span { font-size: 16px; font-weight: 800; }
.nav-item small { font-size: 9px; font-weight: 700; }
.nav-item.active { color: white; background: var(--navy); }

.modal-overlay { position: fixed; inset: 0; z-index: 2000; padding: 16px; display: none; align-items: flex-end; justify-content: center; background: rgba(8,27,43,.58); backdrop-filter: blur(5px); }
.modal-overlay.active { display: flex; }
.modal { width: min(100%, 540px); max-height: min(90dvh, 760px); overflow-y: auto; color: var(--ink); background: var(--paper); border-radius: 26px 26px 16px 16px; box-shadow: var(--shadow); animation: modal-in .3s cubic-bezier(.2,.8,.2,1); }
@keyframes modal-in { from { opacity: 0; transform: translateY(30px); } }
.modal-header { position: sticky; top: 0; z-index: 2; padding: 21px 21px 15px; display: flex; align-items: center; justify-content: space-between; background: var(--paper); border-bottom: 1px solid var(--line); }
.modal-title { color: var(--navy-deep); font-size: 19px; font-weight: 800; }
.modal-close { width: 42px; height: 42px; display: grid; place-items: center; color: var(--muted); background: var(--canvas); border: 0; border-radius: 50%; cursor: pointer; }
.modal-body { padding: 20px 21px; }
.modal-footer { position: sticky; bottom: 0; padding: 14px 21px max(20px, env(safe-area-inset-bottom)); background: var(--paper); border-top: 1px solid var(--line); }
.modal-footer .btn { width: 100%; }
.form-input:disabled { color: var(--muted); background: var(--canvas); cursor: not-allowed; }
.form-hint { display: block; margin-top: 7px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.modal-summary { margin-bottom: 19px; padding: 15px; display: flex; align-items: center; justify-content: space-between; color: var(--navy); background: var(--blue-soft); border-radius: 14px; }
.modal-summary span { color: var(--muted); font-size: 11px; }
.modal-summary strong { display: block; margin-top: 2px; font-size: 18px; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.provider-options, .tariff-options { display: grid; gap: 8px; }
.provider-options { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
.tariff-options { grid-template-columns: repeat(3, 1fr); }
.choice-option { min-height: 58px; padding: 10px; display: flex; align-items: center; justify-content: center; gap: 8px; text-align: center; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.choice-option input { position: absolute; opacity: 0; pointer-events: none; }
.choice-option.selected, .choice-option:has(input:checked) { color: var(--blue); background: var(--blue-soft); border-color: var(--blue); }
.choice-option strong { font-size: 12px; }
.choice-option small { display: block; margin-top: 2px; color: var(--muted); font-size: 9px; }
.secure-note { margin-top: 18px; display: flex; gap: 10px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.secure-note b { color: var(--mint); }
.success-modal { padding: 42px 24px 26px; text-align: center; }
.success-modal .modal-footer { display: flex; flex-direction: column; gap: 10px; margin-top: 0; }
.success-modal .modal-footer .btn { width: 100%; }
.success-icon { width: 72px; height: 72px; margin: 0 auto 19px; display: grid; place-items: center; color: white; background: var(--mint); border-radius: 23px; font-size: 34px; font-weight: 800; transform: rotate(-3deg); }
.success-title { color: var(--navy-deep); font-size: 23px; font-weight: 800; }
.success-text { margin: 9px auto 22px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.success-cost { margin-bottom: 22px; color: var(--navy); font-size: 28px; font-weight: 800; }
.success-modal .btn { width: 100%; }
.toast { position: fixed; left: 50%; bottom: 104px; z-index: 3000; max-width: calc(100% - 32px); padding: 12px 17px; color: white; background: var(--navy-deep); border-radius: 12px; box-shadow: var(--shadow); font-size: 12px; font-weight: 700; opacity: 0; pointer-events: none; transform: translate(-50%, 18px); transition: .25s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 640px) {
  .public-header { height: 70px; padding: 0 18px; }
  .account-link { font-size: 11px; }
  .header-actions { gap: 8px; }
  .install-app-btn { padding: 0 10px; }
  .connection-status { display: none; }
  .guest-screen { padding: 10px 12px 60px; }
  .guest-hero { min-height: 520px; padding: 49px 25px; border-radius: 24px; }
  .guest-hero::after { right: -20px; bottom: -40px; font-size: 250px; }
  .guest-hero h1 { margin-top: 14px; font-size: 47px; }
  .guest-hero > p { font-size: 14px; }
  .guest-cta { width: 100%; }
  .trust-row { left: 25px; right: 25px; bottom: 27px; flex-wrap: wrap; gap: 9px 15px; }
  .public-map-section { padding: 26px 13px 13px; border-radius: 24px; }
  .map-section-heading { margin: 0 10px 18px; align-items: flex-start; flex-direction: column; gap: 13px; }
  .map-section-heading h2 { font-size: 29px; }
  .map-legend { justify-content: flex-start; }
  .guest-map { height: 360px; border-radius: 17px; }
  .map-search { top: 10px; left: 10px; width: calc(100% - 20px); }
  .map-search-results { top: 66px; left: 10px; width: calc(100% - 20px); }
  .parking-map-fallback { padding: 15px; }
  .fallback-map-points { max-height: 190px; overflow-y: auto; }
  .how-it-works { padding: 60px 13px 0; }
  .account-panel { margin-top: 45px; padding: 27px 20px; border-radius: 22px; }
  .auth-screen { padding: 14px 12px 24px; }
  .auth-heading { font-size: 22px; }
  .auth-card { padding: 26px 20px; border-radius: 22px; }
  .auth-container { padding: 20px 0; }
  .app-screen { padding-top: 21px; }
  .field-grid { grid-template-columns: 1fr; gap: 0; }
  .modal-overlay { padding: 0; }
  .modal { max-height: 92dvh; border-radius: 26px 26px 0 0; }
}

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

/* PWA visual refresh: map-first public flow and a calmer operating interface. */
:root {
  --navy: #164d78;
  --navy-deep: #0b2d48;
  --blue: #1769cf;
  --blue-soft: #eaf3ff;
  --mint: #08796d;
  --canvas: #f3f7fa;
  --radius-lg: 30px;
  --shadow: 0 18px 46px rgba(11, 45, 72, .12);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --navy: #2a5d8f;
  --navy-deep: #0c2c4a;
  --blue: #5aa2ff;
  --blue-soft: #1d3a5c;
  --mint: #57c3b5;
  --mint-soft: #1c3d40;
  --amber: #f0a93d;
  --red: #e56666;
  --ink: #e6eef4;
  --muted: #8fa2b2;
  --line: #2a3d4f;
  --paper: #152534;
  --canvas: #0d1a26;
  --shadow: 0 18px 46px rgba(0, 0, 0, .45);
}

[data-theme="dark"] .section-title h2,
[data-theme="dark"] .profile-info h1,
[data-theme="dark"] .empty-state strong,
[data-theme="dark"] .referral-code,
[data-theme="dark"] .utility-list strong,
[data-theme="dark"] .parking-name,
[data-theme="dark"] .car-icon,
[data-theme="dark"] .car-type { color: var(--ink); }

body {
  background: var(--canvas);
  text-rendering: optimizeLegibility;
}

button, a, input, select { touch-action: manipulation; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid rgba(23, 105, 207, .48);
  outline-offset: 3px;
}

.public-header {
  max-width: 1240px;
  height: 88px;
  padding: 0 32px;
}
.brand-mark {
  width: 42px;
  height: 42px;
  background: var(--navy-deep);
  border-radius: 14px 14px 14px 5px;
}
.account-link {
  min-height: 44px;
  padding: 0 4px;
  border-bottom-color: transparent;
  border-radius: 9px;
}
.account-link:hover { background: var(--blue-soft); }

.guest-screen {
  max-width: 1240px;
  padding: 20px 32px 88px;
  display: grid;
  grid-template-columns: minmax(330px, .9fr) minmax(0, 1.3fr);
  gap: 18px;
  align-items: start;
}
.guest-hero {
  min-height: 550px;
  padding: 58px 48px 46px;
  background: var(--navy-deep);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 52px rgba(11, 45, 72, .17);
}
.guest-hero::before {
  width: 330px;
  height: 330px;
  right: -142px;
  top: -110px;
  left: auto;
  border-width: 58px;
  border-color: rgba(119, 222, 202, .17);
}
.guest-hero::after {
  right: 34px;
  bottom: -46px;
  font-size: 260px;
}
.eyebrow { color: var(--mint); letter-spacing: .14em; }
.guest-hero h1 { max-width: 440px; font-size: clamp(42px, 4.7vw, 66px); }
.guest-hero > p { max-width: 390px; font-size: 16px; }
.guest-cta {
  width: 100%;
  min-width: 0;
  background: var(--mint);
  box-shadow: none;
}
.guest-cta:hover { background: #06685e; }
.guest-locate { width: 100%; justify-content: flex-start; }
.trust-row {
  right: 42px;
  left: 48px;
  bottom: 37px;
  padding-top: 17px;
  border-top: 1px solid rgba(255, 255, 255, .16);
  flex-wrap: wrap;
  gap: 8px 18px;
}
.public-map-section {
  min-height: 550px;
  margin-top: 0;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 26px rgba(11, 45, 72, .05);
}
.map-section-heading { margin-bottom: 20px; }
.map-section-heading h2 { font-size: clamp(28px, 3.1vw, 42px); }
.guest-map { height: 394px; border-radius: 20px; }
.how-it-works {
  grid-column: 1 / -1;
  padding: 48px 12px 10px;
}
.steps-list { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 0; }
.steps-list li {
  min-height: 118px;
  padding: 16px 18px 16px 0;
  grid-template-columns: 42px 1fr;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.steps-list li + li { padding-left: 18px; border-left: 1px solid var(--line); }
.steps-list strong { font-size: 16px; }
.active-parking-widget--guest { grid-column: 1 / -1; max-width: none; margin: 0; }

.auth-screen {
  background: var(--navy-deep);
}
.auth-screen::before { border-color: rgba(119, 222, 202, .16); }
.auth-card {
  max-width: 430px;
  border-radius: 26px;
  box-shadow: 0 28px 68px rgba(4, 27, 44, .36);
}
.auth-back { border-color: rgba(255,255,255,.22); }

.app-screen {
  max-width: 600px;
  padding: 34px 24px 126px;
}
.app-topline { margin-bottom: 25px; }
.app-topline h1, .page-title h1 { font-size: 31px; }
.profile-mini {
  width: 46px;
  height: 46px;
  background: var(--navy-deep);
  box-shadow: 0 7px 16px rgba(11, 45, 72, .17);
}
.balance-card {
  min-height: 158px;
  padding: 28px;
  background: var(--navy-deep);
  border-radius: 26px;
  box-shadow: 0 13px 32px rgba(11, 45, 72, .16);
}
.balance-card::after { border-color: rgba(119, 222, 202, .18); }
.balance-amount { font-size: 38px; }
.balance-btn:hover { background: rgba(255,255,255,.24); }
.compact-map-heading { align-items: center; margin-top: 28px; }
.compact-map-heading > strong { font-size: 17px; }
.map-heading-actions { flex-wrap: wrap; justify-content: flex-end; }
.map-container { height: 330px; border-radius: 20px; box-shadow: 0 8px 25px rgba(11, 45, 72, .07); }
.parking-map-shell--account { margin-bottom: 18px; }
.parking-card {
  min-height: 100px;
  border-color: transparent;
  border-bottom-color: var(--line);
  border-radius: 0;
  box-shadow: none;
}
.parking-card:first-child { border-top: 1px solid var(--line); }
.parking-card::before { width: 3px; }
.parking-card:hover { border-color: var(--line); border-left-color: var(--blue); box-shadow: 0 9px 20px rgba(11, 45, 72, .08); transform: translateY(-1px); }
.parking-icon { border-radius: 15px 15px 15px 5px; box-shadow: none; }
.parking-list { gap: 0; }
.car-list, .history-list { border-top: 1px solid var(--line); }
.car-card { padding: 16px 2px; }
.section-title { margin: 36px 0 12px; }
.section-title h2 { font-size: 20px; }
.admin-card { padding: 16px 2px; }
.profile-header { padding-top: 4px; }
.profile-avatar { background: var(--navy-deep); box-shadow: 0 8px 19px rgba(11, 45, 72, .16); }
.utility-list { border-top: 1px solid var(--line); }
.utility-list > * { min-height: 68px; padding: 0 2px; }
.utility-row-btn:hover { background: var(--blue-soft); }

.bottom-nav {
  width: min(calc(100% - 32px), 560px);
  min-height: 70px;
  padding: 7px;
  border-color: rgba(215, 225, 232, .9);
  border-radius: 20px;
  box-shadow: 0 18px 44px rgba(11, 45, 72, .18);
}
.nav-item { min-height: 54px; border-radius: 14px; }
.nav-item.active { background: var(--navy-deep); }

.modal-overlay { background: rgba(4, 27, 44, .66); }
.modal { border-radius: 28px 28px 18px 18px; }
.modal-header { padding: 23px 24px 16px; }
.modal-body { padding: 22px 24px; }
.modal-footer { padding-right: 24px; padding-left: 24px; }
.modal-summary { padding: 17px; background: var(--blue-soft); border-radius: 16px; }
.choice-option { min-height: 62px; border-radius: 13px; }
.choice-option:focus-within { outline: 3px solid rgba(23, 105, 207, .28); outline-offset: 2px; }
.success-icon { background: var(--mint); box-shadow: none; }

@media (max-width: 860px) {
  .guest-screen { display: block; max-width: 760px; padding-bottom: 66px; }
  .public-map-section { min-height: 0; margin-top: 18px; }
  .how-it-works { padding-right: 0; padding-left: 0; }
}

@media (max-width: 640px) {
  .public-header { height: 72px; padding: 0 18px; }
  .guest-screen { padding: 8px 12px 60px; }
  .guest-hero { min-height: 516px; padding: 46px 25px 42px; }
  .guest-hero h1 { font-size: clamp(40px, 12vw, 52px); }
  .guest-hero > p { font-size: 15px; }
  .guest-hero::before { width: 245px; height: 245px; right: -110px; top: -82px; border-width: 42px; }
  .guest-hero::after { right: -18px; font-size: 220px; }
  .trust-row { right: 25px; left: 25px; bottom: 25px; }
  .public-map-section { padding: 25px 13px 13px; border-radius: 24px; }
  .guest-map { height: 365px; }
  .steps-list { display: block; }
  .steps-list li, .steps-list li + li { min-height: 86px; padding: 13px 0; border-left: 0; }
  .how-it-works { padding-top: 54px; }
  .app-screen { padding: 24px 20px 122px; }
  .app-topline h1, .page-title h1 { font-size: 29px; }
  .balance-card { min-height: 150px; padding: 24px; }
  .balance-amount { font-size: 34px; }
  .map-container { height: 290px; }
  .compact-map-heading { align-items: flex-start; flex-direction: column; gap: 8px; }
  .map-heading-actions { justify-content: flex-start; }
  .bottom-nav { width: calc(100% - 24px); }
  .modal-header { padding: 21px 20px 14px; }
  .modal-body { padding: 19px 20px; }
  .modal-footer { padding-right: 20px; padding-left: 20px; }
}

@media (prefers-contrast: more) {
  .parking-card, .choice-option, .map-search, .bottom-nav { border-color: currentColor; }
  .btn-primary, .btn-success { outline: 1px solid rgba(0, 0, 0, .35); }
}

/* Keep the visual layouts from bypassing the SPA screen switcher. */
.screen:not(.active) { display: none !important; }
.screen.active.guest-screen { display: grid; }
.screen.active.auth-screen { display: flex; }

@media (max-width: 860px) {
  .screen.active.guest-screen { display: block; }
}

/* Desktop cabinet: use the available workspace without stretching reading-heavy screens. */
@media (min-width: 861px) {
  .app-screen {
    max-width: 1160px;
    padding: 42px 32px 136px;
  }

  #screen-cars,
  #screen-profile { max-width: 820px; }

  #screen-home .balance-card { min-height: 172px; }
  #screen-home .map-container { height: 420px; }

  #screen-home .parking-list,
  #screen-parks .parking-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  #screen-home .parking-card,
  #screen-parks .parking-card {
    min-height: 108px;
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: 0 8px 22px rgba(11, 45, 72, .06);
  }

  #screen-home .parking-card:first-child,
  #screen-parks .parking-card:first-child { border-top: 1px solid var(--line); }

  .bottom-nav { width: min(calc(100% - 48px), 720px); }
}

@media (min-width: 1280px) {
  .bottom-nav { top: 50%; bottom: auto; left: 32px; width: 88px; min-height: 0; grid-template-columns: 1fr; gap: 5px; padding: 8px; border-radius: 22px; transform: translateY(-50%); }
  .bottom-nav:has(#nav-admin:not([hidden])) { grid-template-columns: 1fr; }
  .nav-item { min-height: 58px; }
}

html[data-theme="dark"] .admin-actions .btn-glass,
html[data-theme="dark"] .admin-card-actions .btn-glass { color: var(--ink); border-color: var(--line); }
