/* ============================================================
   Musi Parking v2 — Premium design system
   Palette: brand blue #246BFD / dark #08061F / white
   ============================================================ */

:root {
  /* Brand: blue / dark / white */
  --navy:       #08061F;   /* brand dark */
  --navy-2:     #0E0C33;
  --navy-3:     #161354;
  --gold:       #246BFD;   /* brand blue (primary accent) */
  --gold-bright:#6D9BFF;   /* light blue */
  --ivory:      #F5F7FC;   /* app background */
  --paper:      #FFFFFF;
  --charcoal:   #16182B;
  --muted:      #6B7280;
  --line:       #E4E9F5;
  --success:    #16A34A;
  --danger:     #DC2626;
  --radius:     14px;
  --shadow:     0 10px 30px rgba(8,6,31,.08);
  --shadow-lg:  0 24px 60px rgba(8,6,31,.16);
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--ivory);
  color: var(--charcoal);
  line-height: 1.55;
  min-height: 100vh;
}

/* ─── Layout ─── */
.shell     { max-width: 480px;  margin: 0 auto; padding: 16px; }   /* mobile app */
.shell-wide{ max-width: 1100px; margin: 0 auto; padding: 24px; }   /* dashboards */

/* ─── Header / brand ─── */
.brandbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0; margin-bottom: 8px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 11px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-3) 100%);
  color: var(--gold-bright); display: grid; place-items: center;
  font-weight: 800; font-size: 17px; letter-spacing: .5px;
}
img.brand-mark { border: none; background: none; display: block; object-fit: contain; }
.brand-name { font-weight: 700; color: var(--navy); font-size: 17px; letter-spacing: .2px; }
.brand-name small { display: block; font-weight: 500; color: var(--gold); font-size: 11px;
  text-transform: uppercase; letter-spacing: 2px; }

/* ─── Hero balance card (customer) ─── */
.card-hero {
  background: linear-gradient(150deg, var(--navy) 0%, var(--navy-2) 55%, var(--navy-3) 100%);
  color: var(--ivory); border-radius: 20px; padding: 26px 22px;
  box-shadow: var(--shadow-lg); position: relative; overflow: hidden;
}
.card-hero::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(420px 140px at 110% -10%, rgba(36,107,253,.28), transparent 60%),
    radial-gradient(300px 120px at -20% 120%, rgba(36,107,253,.12), transparent 60%);
  pointer-events: none;
}
.card-hero .label { font-size: 12px; letter-spacing: 2.5px; text-transform: uppercase; color: var(--gold-bright); }
.card-hero .amount { font-size: 44px; font-weight: 800; letter-spacing: -1px; margin: 4px 0 2px; }
.card-hero .meta { font-size: 13px; color: rgba(255,255,255,.75); }
.gold-line { height: 3px; width: 56px; border-radius: 3px; margin-top: 14px;
  background: linear-gradient(90deg, var(--gold), transparent); }

/* ─── Cards ─── */
.card {
  background: var(--paper); border-radius: var(--radius);
  border: 1px solid var(--line); box-shadow: var(--shadow);
  padding: 18px; margin-top: 16px;
}
.card h3 { color: var(--navy); font-size: 15px; margin-bottom: 12px;
  display: flex; align-items: center; gap: 8px; }
.card h3::before { content: ""; width: 8px; height: 8px; border-radius: 2px;
  background: var(--gold); display: inline-block; }

/* ─── Stats grid (dashboards) ─── */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px,1fr)); gap: 14px; margin-top: 16px; }
.stat {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; box-shadow: var(--shadow);
}
.stat .k { font-size: 11.5px; text-transform: uppercase; letter-spacing: 1.4px; color: var(--muted); }
.stat .v { font-size: 26px; font-weight: 800; color: var(--navy); margin-top: 2px; }
.stat .v.gold { color: var(--gold); }

/* ─── Forms & buttons ─── */
label { display: block; font-size: 12.5px; font-weight: 600; color: var(--navy);
  margin: 12px 0 5px; letter-spacing: .3px; }
input, select {
  width: 100%; padding: 12px 14px; font-size: 15px; font-family: var(--font);
  border: 1.5px solid var(--line); border-radius: 10px; background: var(--paper);
  color: var(--charcoal); outline: none; transition: border-color .15s;
}
input:focus, select:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(36,107,253,.18); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 13px 18px; margin-top: 14px;
  font-size: 15px; font-weight: 700; font-family: var(--font);
  border: none; border-radius: 10px; cursor: pointer; transition: transform .06s, opacity .15s;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-3) 100%);
  color: var(--gold-bright); letter-spacing: .3px;
}
.btn:hover { opacity: .93; }
.btn:active { transform: scale(.985); }
.btn.gold { background: linear-gradient(135deg, var(--gold) 0%, #1D50C8 100%); color: #fff; }
.btn.ghost { background: transparent; border: 1.5px solid var(--line); color: var(--navy); }
.btn.sm { width: auto; padding: 8px 14px; font-size: 13px; margin-top: 0; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ─── Chips / status ─── */
.chip { display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .4px; }
.chip.ok    { background: rgba(30,127,79,.12);  color: var(--success); }
.chip.warn  { background: rgba(36,107,253,.18); color: #1D50C8; }
.chip.bad   { background: rgba(179,55,47,.12);  color: var(--danger); }
.chip.navy  { background: rgba(8,6,31,.08);   color: var(--navy); }

/* ─── Tables ─── */
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { text-align: left; padding: 9px 10px; color: var(--muted); font-size: 11px;
  text-transform: uppercase; letter-spacing: 1.2px; border-bottom: 2px solid var(--line); }
td { padding: 10px; border-bottom: 1px solid #EEF1F8; vertical-align: middle; }
tr:last-child td { border-bottom: none; }

/* ─── Countdown ring (active session) ─── */
.session-live {
  display: flex; align-items: center; gap: 16px;
  background: linear-gradient(135deg, rgba(36,107,253,.10), rgba(36,107,253,.03));
  border: 1.5px solid rgba(36,107,253,.5); border-radius: var(--radius); padding: 16px;
}
.session-live .time { font-size: 30px; font-weight: 800; color: var(--navy); font-variant-numeric: tabular-nums; }

/* ─── Quick amounts ─── */
.amounts { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; margin-top: 8px; }
.amounts button {
  padding: 11px 0; border: 1.5px solid var(--line); border-radius: 10px;
  background: var(--paper); font-weight: 700; font-size: 14px; color: var(--navy);
  cursor: pointer; font-family: var(--font);
}
.amounts button.sel { border-color: var(--gold); background: rgba(36,107,253,.14); }

/* ─── Nav tabs (dashboards) ─── */
.tabs { display: flex; gap: 6px; margin-top: 18px; border-bottom: 2px solid var(--line);
  overflow-x: auto; }
.tabs button {
  padding: 10px 16px; border: none; background: none; font: 600 13.5px var(--font);
  color: var(--muted); cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -2px;
  white-space: nowrap;
}
.tabs button.on { color: var(--navy); border-bottom-color: var(--gold); }

/* ─── Toast ─── */
#toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: var(--navy); color: var(--ivory); padding: 12px 22px;
  border-radius: 12px; border: 1px solid rgba(36,107,253,.5);
  box-shadow: var(--shadow-lg); font-size: 14px; z-index: 99;
  opacity: 0; pointer-events: none; transition: opacity .25s;
  max-width: 90vw; text-align: center;
}
#toast.show { opacity: 1; }
#toast.err { background: var(--danger); border-color: transparent; }

/* ─── Login screens ─── */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px;
  background:
    radial-gradient(600px 300px at 80% -10%, rgba(36,107,253,.14), transparent 60%),
    var(--ivory); }
.login-card { width: 100%; max-width: 400px; background: var(--paper);
  border-radius: 20px; border: 1px solid var(--line); box-shadow: var(--shadow-lg); padding: 32px 28px; }
.login-card .brand { justify-content: center; margin-bottom: 8px; }
.login-card h1 { text-align: center; font-size: 20px; color: var(--navy); margin-bottom: 2px; }
.login-card p.sub { text-align: center; color: var(--muted); font-size: 13.5px; margin-bottom: 10px; }

/* ─── Table pager ─── */
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding-top: 10px; }
.pager span { font-size: 12px; color: var(--muted); }
.pager button {
  padding: 5px 12px; border: 1.5px solid var(--line); border-radius: 8px;
  background: var(--paper); font: 600 12.5px var(--font); color: var(--navy); cursor: pointer;
}
.pager button:disabled { opacity: .4; cursor: default; }

.hidden { display: none !important; }
.muted { color: var(--muted); font-size: 13px; }
.mt { margin-top: 14px; }
.row { display: flex; gap: 10px; align-items: center; }
.row > * { flex: 1; }
.right { text-align: right; }

/* ============================================================
   Modern app skin (customer PWA) — Dribbble-style parking app
   Scoped under body.app-modern so dashboards keep their look.
   ============================================================ */

body.app-modern { background: #F2F3F7; }
.app-modern .shell { max-width: 430px; padding: 14px 16px 110px; }

.app-modern .card {
  border: none; border-radius: 26px; box-shadow: 0 8px 28px rgba(8,6,31,.07);
  padding: 22px 20px; margin-top: 16px;
}
.app-modern .card h3 { font-size: 16px; letter-spacing: -.2px; }
.app-modern .card h3::before { display: none; }

.app-modern .card-hero {
  border-radius: 30px; padding: 26px 24px 22px;
  background: linear-gradient(160deg, #08061F 0%, #0E0C33 55%, #1A2B7A 100%);
}
.app-modern .card-hero .amount { font-size: 50px; letter-spacing: -2px; }

/* License-plate badge */
.plate-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: #FFF; border: 2px solid #1F2937; border-radius: 8px;
  padding: 4px 12px 4px 8px; font-weight: 800; letter-spacing: 2px;
  color: #111827; font-size: 15px; margin-top: 12px;
}
.plate-badge::before {
  content: "ZW"; background: #246BFD; color: #fff; font-size: 9px;
  padding: 3px 5px; border-radius: 3px; letter-spacing: 1px;
}

/* Zone chips */
.zone-chips { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 8px; scrollbar-width: none; }
.zone-chips::-webkit-scrollbar { display: none; }
.zone-chip {
  flex: 0 0 auto; min-width: 108px; padding: 14px 16px; border-radius: 20px;
  background: #EEF3FF; border: 2px solid transparent; cursor: pointer;
  font-family: var(--font); text-align: left; transition: all .15s;
}
.zone-chip .zc { font-size: 20px; font-weight: 800; color: var(--navy); }
.zone-chip .zn { font-size: 11px; color: var(--muted); margin-top: 1px; }
.zone-chip .zr { font-size: 12px; font-weight: 700; color: var(--gold); margin-top: 6px; }
.zone-chip.sel { background: var(--navy); border-color: var(--gold); }
.zone-chip.sel .zc { color: var(--gold-bright); }
.zone-chip.sel .zn { color: rgba(255,255,255,.7); }

/* Duration pills */
.app-modern .amounts { grid-template-columns: repeat(4,1fr); gap: 10px; }
.app-modern .amounts button {
  border-radius: 999px; padding: 12px 0; border: none; background: #F2F3F7;
  transition: all .15s;
}
.app-modern .amounts button.sel {
  background: var(--navy); color: var(--gold-bright);
  box-shadow: 0 6px 16px rgba(8,6,31,.25);
}

/* Big CTA */
.app-modern .btn { border-radius: 999px; padding: 16px 18px; font-size: 16px; }
.app-modern .btn.ghost { background: #fff; }

/* Session progress */
.session-modern {
  background: linear-gradient(150deg, #08061F, #1A2B7A);
  border-radius: 26px; padding: 22px; color: var(--ivory);
  box-shadow: 0 12px 32px rgba(8,6,31,.28); margin-top: 16px;
  position: relative; overflow: hidden;
}
.session-modern::after {
  content:""; position:absolute; inset:0; pointer-events:none;
  background: radial-gradient(300px 120px at 100% 0%, rgba(36,107,253,.25), transparent 60%);
}
.session-modern .sm-top { display: flex; justify-content: space-between; align-items: center; }
.session-modern .sm-zone { font-size: 12px; letter-spacing: 2px; color: var(--gold-bright); text-transform: uppercase; }
.session-modern .sm-time { font-size: 40px; font-weight: 800; letter-spacing: -1px; font-variant-numeric: tabular-nums; margin: 6px 0 12px; }
.session-modern .bar { height: 8px; border-radius: 99px; background: rgba(255,255,255,.15); overflow: hidden; }
.session-modern .bar i { display: block; height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, var(--gold), var(--gold-bright)); transition: width 1s linear; }
.session-modern .btn { background: rgba(255,255,255,.12); color: var(--ivory);
  border: 1px solid rgba(36,107,253,.5); margin-top: 16px; }

/* Floating bottom nav */
.bottom-nav {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 18px;
  width: min(400px, calc(100vw - 32px));
  background: rgba(8,6,31,.96); backdrop-filter: blur(10px);
  border-radius: 999px; display: flex; justify-content: space-around;
  padding: 10px 12px; box-shadow: 0 16px 40px rgba(8,6,31,.35);
  border: 1px solid rgba(36,107,253,.28); z-index: 50;
}
.bottom-nav button {
  background: none; border: none; color: rgba(255,255,255,.55);
  font: 600 11px var(--font); cursor: pointer; display: flex; flex-direction: column;
  align-items: center; gap: 3px; padding: 6px 18px; border-radius: 999px;
}
.bottom-nav button .ico { width: 22px; height: 22px; }
.bottom-nav button.on { color: var(--gold-bright); background: rgba(36,107,253,.14); }

/* Section switching */
.app-section { display: none; }
.app-section.on { display: block; }

/* ─── Print: sticker sheets ─── */
@media print {
  body { background: #fff; }
  .no-print { display: none !important; }
  .sticker-sheet { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6mm; }
  .sticker-card { break-inside: avoid; }
}
.sticker-sheet { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px,1fr)); gap: 14px; margin-top: 16px; }
.sticker-card {
  border: 2px solid var(--navy); border-radius: 12px; overflow: hidden; background: #fff;
}
.sticker-card .head {
  background: var(--navy); color: var(--gold-bright); padding: 8px 12px;
  font-weight: 800; font-size: 13px; letter-spacing: 1px; display: flex; justify-content: space-between;
}
.sticker-card .body { padding: 14px; text-align: center; }
.sticker-card img { width: 132px; height: 132px; }
.sticker-card .serial { font-size: 11px; color: var(--muted); letter-spacing: 1px; margin-top: 6px; }
.sticker-card .foot {
  border-top: 2px solid var(--gold); padding: 8px 12px; font-size: 11.5px;
  display: flex; justify-content: space-between; color: var(--navy); font-weight: 600;
}
