:root {
  --bg: #070b09;
  --surface: #0f1512;
  --surface-2: #151d19;
  --surface-3: #1d2823;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #ecf2ee;
  --muted: #8fa097;
  --faint: #5f6d66;
  --brand: #3ca93f;
  --brand-hi: #4fc152;
  --brand-ink: #04240a;
  --brand-soft: rgba(60, 169, 63, 0.14);
  --st-available: #3ca93f;
  --st-charging: #3b9be8;
  --st-reserved: #9b7bea;
  --st-maintenance: #e6a23c;
  --st-out_of_service: #e5534b;
  --st-offline: #93a199;
  --danger: #e5534b;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
  --nav-h: 68px;
  --font-ar: 'Cairo', system-ui, sans-serif;
  --font-en: 'Exo 2', system-ui, sans-serif;
  --font-num: 'Rajdhani', 'Exo 2', system-ui, sans-serif;
  --glass: rgba(12, 17, 15, 0.88);
  --glass-strong: rgba(15, 21, 18, 0.97);
  --backdrop: rgba(0, 0, 0, 0.55);
  --map-bg: #111816;
  --err-fg: #ff9c95;
  --danger-fg: #ff8a82;
  --warn-fg: #f2c27a;
  --dc-fg: #7cc0f5;
  --ac-fg: #86d888;
  --splash-glow: rgba(60, 169, 63, 0.16);
  color-scheme: dark;
}

/* Day theme — chosen in Settings (نهاري), or by "Automatic" when the device is in light mode. */
:root[data-mode='light'] {
  --bg: #f3f6f4;
  --surface: #ffffff;
  --surface-2: #f1f5f2;
  --surface-3: #e4ebe6;
  --line: rgba(16, 32, 24, 0.09);
  --line-strong: rgba(16, 32, 24, 0.17);
  --text: #12201a;
  --muted: #55665d;
  --faint: #86948c;
  --brand-hi: #2a8a2d;
  --brand-soft: rgba(60, 169, 63, 0.12);
  --st-available: #2e9331;
  --st-charging: #1f7fcc;
  --st-reserved: #7556d6;
  --st-maintenance: #b8760d;
  --st-out_of_service: #d03b33;
  --st-offline: #66736c;
  --danger: #d03b33;
  --shadow: 0 10px 30px rgba(16, 32, 24, 0.12);
  --glass: rgba(255, 255, 255, 0.9);
  --glass-strong: rgba(255, 255, 255, 0.98);
  --backdrop: rgba(16, 32, 24, 0.35);
  --map-bg: #e9ede9;
  --err-fg: #b42318;
  --danger-fg: #c0392b;
  --warn-fg: #8a5a0f;
  --dc-fg: #1d6fb8;
  --ac-fg: #237a26;
  --splash-glow: rgba(60, 169, 63, 0.14);
  color-scheme: light;
}
:root[data-mode='light'] .osm-dark { filter: none; }
:root[data-mode='light'] .on-dark,
:root:not([data-mode='light']) .on-light { display: none !important; }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
:where(svg:not([width])) { width: 18px; height: 18px; flex: none; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-en);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
html[lang='ar'] body { font-family: var(--font-ar); }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--brand-hi); }
.num, .mono { font-family: var(--font-num); font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.stack > * + * { margin-top: 12px; }
.ltr { direction: ltr; unicode-bidi: isolate; }

/* ---------- splash ---------- */
.splash {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center;
  background: radial-gradient(60% 50% at 50% 45%, var(--splash-glow), transparent 70%), var(--bg);
  transition: opacity 0.5s ease, visibility 0.5s;
}
.splash.out { opacity: 0; visibility: hidden; }
.splash-inner { display: grid; justify-items: center; gap: 22px; }
.splash img { width: min(46vw, 200px); animation: blink 1.1s ease-in-out infinite; filter: drop-shadow(0 0 0 rgba(60, 169, 63, 0)); }
.splash .tag { color: var(--muted); font-size: 14px; letter-spacing: 0.04em; opacity: 0; animation: fadeUp 0.6s 0.4s forwards; }
.splash .bar { width: 140px; height: 3px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.splash .bar::after { content: ''; display: block; height: 100%; width: 40%; background: var(--brand); border-radius: 3px; animation: load 1.2s ease-in-out infinite; }
@keyframes blink {
  0%, 100% { opacity: 1; filter: drop-shadow(0 0 22px rgba(60, 169, 63, 0.55)); }
  50% { opacity: 0.25; filter: drop-shadow(0 0 0 rgba(60, 169, 63, 0)); }
}
@keyframes load { 0% { transform: translateX(-110%); } 100% { transform: translateX(260%); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- auth ---------- */
.auth {
  position: fixed; inset: 0; overflow-y: auto; padding: 56px 16px 40px;
  background: radial-gradient(80% 40% at 50% 0%, rgba(60, 169, 63, 0.12), transparent 70%), var(--bg);
}
.auth-card { width: 100%; max-width: 420px; margin: 0 auto; animation: fadeUp 0.35s ease; }
.auth-logo { display: block; width: 92px; margin: 0 auto 18px; }
.auth h1 { font-size: 24px; margin: 0 0 4px; text-align: center; font-weight: 700; }
.auth .sub { color: var(--muted); text-align: center; margin: 0 0 26px; }
.lang-btn {
  position: absolute; top: 14px; inset-inline-end: 14px; z-index: 20; min-width: 44px; height: 38px; padding: 0 12px;
  border-radius: 999px; border: 1px solid var(--line-strong); background: var(--glass); backdrop-filter: blur(8px);
  cursor: pointer; font-weight: 700;
}
.auth-alt { margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); text-align: center; }
.auth-alt p { margin: 0 0 10px; color: var(--muted); }

/* ---------- forms ---------- */
.field { margin-bottom: 14px; }
.field > label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; font-weight: 600; }
.input {
  width: 100%; height: 50px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line-strong);
  background: var(--surface); outline: none; transition: border-color 0.15s, box-shadow 0.15s; font-size: 16px;
}
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-size: 6px 6px; background-repeat: no-repeat; background-position: calc(100% - 20px) 22px, calc(100% - 14px) 22px; padding-inline-end: 34px; }
html[dir='rtl'] select.input { background-position: 14px 22px, 20px 22px; }
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.input.bad { border-color: var(--danger); }
.input[type='email'], .input[type='tel'], .input.ltr-input { direction: ltr; }
html[dir='rtl'] .input[type='email'], html[dir='rtl'] .input[type='tel'], html[dir='rtl'] .input.ltr-input { text-align: right; }
.hint { font-size: 12px; color: var(--faint); margin-top: 5px; }
.err { font-size: 12.5px; color: var(--danger); margin-top: 5px; min-height: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pw-wrap { position: relative; }
.pw-wrap .input { padding-inline-end: 48px; }
.pw-eye { position: absolute; inset-inline-end: 4px; top: 4px; width: 42px; height: 42px; border: 0; background: none; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 4px; gap: 4px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px; }
.seg button { height: 40px; border: 0; border-radius: 9px; background: none; color: var(--muted); cursor: pointer; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; }
.seg button.on { background: var(--brand-soft); color: var(--brand-hi); box-shadow: inset 0 0 0 1px rgba(60, 169, 63, 0.4); }
.form-error { background: rgba(229, 83, 75, 0.1); border: 1px solid rgba(229, 83, 75, 0.35); color: var(--err-fg); padding: 10px 12px; border-radius: 10px; font-size: 14px; margin-bottom: 14px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 50px; padding: 0 22px; border-radius: 999px;
  border: 1px solid transparent; background: var(--brand); color: #fff; font-weight: 700; cursor: pointer; text-decoration: none;
  transition: transform 0.1s, background 0.15s, opacity 0.15s; white-space: nowrap; font-size: 15px;
}
.btn:hover { background: var(--brand-hi); }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn.block { width: 100%; }
.btn.ghost { background: transparent; border-color: var(--line-strong); color: var(--text); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.danger { background: transparent; border-color: rgba(229, 83, 75, 0.5); color: var(--danger-fg); }
.btn.danger:hover { background: rgba(229, 83, 75, 0.1); }
.btn.sm { height: 38px; padding: 0 16px; font-size: 14px; }
.btn.busy { pointer-events: none; opacity: 0.7; }
.btn.busy::before { content: ''; width: 16px; height: 16px; border: 2px solid currentColor; border-top-color: transparent; border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.link-btn { background: none; border: 0; color: var(--brand-hi); cursor: pointer; font-weight: 600; padding: 4px; }
.link-btn:disabled { color: var(--faint); cursor: default; }

.otp { display: flex; gap: 8px; justify-content: center; direction: ltr; margin: 8px 0 18px; }
.otp input {
  width: 48px; height: 58px; text-align: center; font-size: 26px; font-family: var(--font-num); font-weight: 700;
  border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface); outline: none;
}
.otp input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.otp.bad input { border-color: var(--danger); animation: shake 0.3s; }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.timer { text-align: center; color: var(--muted); font-size: 14px; }
.timer b { color: var(--text); font-family: var(--font-num); font-size: 17px; }

.dev-note { background: rgba(230, 162, 60, 0.1); border: 1px dashed rgba(230, 162, 60, 0.5); color: var(--warn-fg); border-radius: 10px; padding: 10px 12px; font-size: 13px; margin-bottom: 16px; word-break: break-all; }
.dev-note b { font-family: var(--font-num); font-size: 18px; letter-spacing: 0.2em; }

/* ---------- app shell ---------- */
.app { position: fixed; inset: 0; display: grid; grid-template-rows: 1fr auto; }
.views { position: relative; overflow: hidden; }
.view { position: absolute; inset: 0; overflow-y: auto; }
.page { max-width: 680px; margin: 0 auto; padding: 18px 16px 32px; }
.bottom-nav {
  display: grid; grid-template-columns: repeat(4, 1fr); height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom); background: var(--glass-strong); border-top: 1px solid var(--line); z-index: 30;
}
.bottom-nav button {
  border: 0; background: none; color: var(--faint); display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; font-size: 12px; font-weight: 600; cursor: pointer; position: relative;
}
.bottom-nav button svg { width: 24px; height: 24px; }
.bottom-nav button.on { color: var(--brand-hi); }
.bottom-nav button.on::before { content: ''; position: absolute; top: 0; width: 32px; height: 3px; border-radius: 0 0 3px 3px; background: var(--brand); }
.nav-badge { position: absolute; top: 9px; inset-inline-start: calc(50% + 6px); min-width: 9px; height: 9px; border-radius: 9px; background: var(--st-reserved); box-shadow: 0 0 0 2px var(--surface); }

.topbar { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.topbar h2 { margin: 0; font-size: 21px; font-weight: 700; }
.icon-btn { width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; cursor: pointer; flex: none; }
.icon-btn svg { width: 20px; height: 20px; }
html[dir='rtl'] .flip svg { transform: scaleX(-1); }

/* ---------- map view ---------- */
#map { position: absolute; inset: 0; background: var(--map-bg); }
.map-top { position: absolute; top: 0; inset-inline: 0; z-index: 500; padding: 12px; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.map-top > * { pointer-events: auto; }
.map-brand { display: flex; align-items: center; gap: 10px; }
.map-brand .pill { display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 14px; border-radius: 999px; background: var(--glass); backdrop-filter: blur(10px); border: 1px solid var(--line); }
.map-brand img { height: 28px; }
.map-brand .pill span { font-weight: 700; letter-spacing: 0.04em; font-family: var(--font-num); font-size: 17px; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--glass);
  backdrop-filter: blur(10px); color: var(--text); font-weight: 600; font-size: 13px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
}
.chip.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.map-fabs { position: absolute; z-index: 500; inset-inline-end: 12px; top: 118px; display: flex; flex-direction: column; gap: 10px; }
.fab { width: 48px; height: 48px; border-radius: 14px; border: 1px solid var(--line); background: var(--glass); display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow); }
.fab svg { width: 22px; height: 22px; }
.fab.on { color: var(--st-charging); }
.leaflet-bottom.leaflet-right { margin-bottom: 4px; }
.leaflet-control-zoom { display: none; }
@media (min-width: 900px) { .leaflet-control-zoom { display: block; } }
.leaflet-container { font-family: inherit; background: var(--map-bg); }
.osm-dark { filter: invert(1) hue-rotate(180deg) brightness(0.85) contrast(0.9) saturate(0.6); }
.leaflet-control-attribution { background: var(--glass) !important; color: var(--faint) !important; font-size: 10px; }
.leaflet-control-attribution a { color: var(--muted) !important; }
.map-pin { background: none; border: 0; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.55)); }
.user-pin { background: none; border: 0; }
.user-dot { display: block; width: 18px; height: 18px; border-radius: 50%; background: var(--st-charging); border: 3px solid #fff; box-shadow: 0 0 0 0 rgba(59, 155, 232, 0.6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 16px rgba(59, 155, 232, 0); } 100% { box-shadow: 0 0 0 0 rgba(59, 155, 232, 0); } }

.map-card {
  position: absolute; z-index: 600; inset-inline: 12px; bottom: 12px; max-width: 520px; margin-inline: auto;
  background: var(--glass-strong); border: 1px solid var(--line-strong); border-radius: 20px; padding: 14px 16px; box-shadow: var(--shadow);
  animation: fadeUp 0.3s ease;
}
.map-card .kicker { font-size: 12px; font-weight: 700; color: var(--brand-hi); text-transform: uppercase; letter-spacing: 0.06em; display: flex; align-items: center; gap: 6px; }
.map-card h3 { margin: 4px 0 2px; font-size: 18px; }
.map-card .actions { display: flex; gap: 8px; margin-top: 12px; }
.map-card .actions .btn { flex: 1; height: 44px; }
.loc-card { text-align: center; }
.loc-card .ico { width: 54px; height: 54px; border-radius: 50%; margin: 2px auto 10px; display: grid; place-items: center; background: rgba(59, 155, 232, 0.14); color: var(--st-charging); }

/* ---------- status bits ---------- */
.st { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.st::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.st.available { color: var(--st-available); background: rgba(60, 169, 63, 0.13); }
.st.charging { color: var(--st-charging); background: rgba(59, 155, 232, 0.13); }
.st.reserved { color: var(--st-reserved); background: rgba(155, 123, 234, 0.14); }
.st.maintenance { color: var(--st-maintenance); background: rgba(230, 162, 60, 0.13); }
.st.out_of_service { color: var(--st-out_of_service); background: rgba(229, 83, 75, 0.13); }
.st.offline { color: var(--st-offline); background: var(--surface-3); }
.st.charging::before { animation: blinkDot 1.2s infinite; }
@keyframes blinkDot { 50% { opacity: 0.25; } }
.avail { display: inline-flex; align-items: baseline; gap: 4px; font-weight: 700; }
.avail b { font-family: var(--font-num); font-size: 20px; color: var(--st-available); }
.avail.none b { color: var(--muted); }
.meta { display: flex; flex-wrap: wrap; gap: 6px 12px; color: var(--muted); font-size: 13px; }
.meta span { display: inline-flex; align-items: center; gap: 5px; }
.meta svg { width: 14px; height: 14px; }
.tag { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 7px; font-size: 12px; font-weight: 700; background: var(--surface-3); color: var(--text); }
.tag.dc { background: rgba(59, 155, 232, 0.16); color: var(--dc-fg); }
.tag.ac { background: rgba(60, 169, 63, 0.16); color: var(--ac-fg); }
.legend { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* ---------- sheets & dialogs ---------- */
.backdrop { position: fixed; inset: 0; z-index: 900; background: var(--backdrop); animation: fade 0.2s; }
@keyframes fade { from { opacity: 0; } }
.sheet {
  position: fixed; z-index: 901; inset-inline: 0; bottom: 0; max-height: 88dvh; overflow-y: auto; background: var(--surface);
  border-radius: 22px 22px 0 0; border-top: 1px solid var(--line-strong); padding: 10px 18px calc(22px + env(safe-area-inset-bottom));
  animation: slideUp 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.sheet .grab { width: 40px; height: 4px; border-radius: 4px; background: var(--line-strong); margin: 0 auto 12px; }
@keyframes slideUp { from { transform: translateY(100%); } }
@media (min-width: 900px) {
  .sheet { inset-inline-start: auto; inset-inline-end: 16px; top: 16px; bottom: 16px; width: 440px; max-height: none; border-radius: 22px; border: 1px solid var(--line-strong); animation: fadeUp 0.25s; }
  .sheet .grab { display: none; }
}
.sheet-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.sheet-head h3 { margin: 0; font-size: 20px; line-height: 1.3; }
.dialog {
  position: fixed; z-index: 1001; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(92vw, 400px);
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 20px; padding: 22px; box-shadow: var(--shadow); animation: fadeUp 0.2s;
}
.dialog h3 { margin: 0 0 8px; font-size: 19px; }
.dialog p { margin: 0 0 20px; color: var(--muted); }
.dialog .actions { display: flex; gap: 10px; }
.dialog .actions .btn { flex: 1; }
.backdrop.top { z-index: 1000; }

.toasts { position: fixed; z-index: 2000; top: 14px; left: 50%; transform: translateX(-50%); display: grid; gap: 8px; width: min(92vw, 420px); pointer-events: none; }
.toast { background: var(--surface-3); border: 1px solid var(--line-strong); border-inline-start: 4px solid var(--brand); border-radius: 12px; padding: 12px 14px; box-shadow: var(--shadow); animation: fadeUp 0.25s; font-weight: 600; font-size: 14px; }
.toast.error { border-inline-start-color: var(--danger); }
.toast.warn { border-inline-start-color: var(--st-maintenance); }

/* ---------- lists & cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.section-title { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; margin: 22px 4px 10px; }
.st-row { display: flex; gap: 12px; align-items: center; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; width: 100%; text-align: start; transition: border-color 0.15s, background 0.15s; }
.st-row + .st-row { margin-top: 10px; }
/* A station in "My stations": the row, then labelled buttons for what the owner can do with it. */
.st-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.st-card + .st-card { margin-top: 10px; }
.st-card .st-row { border: 0; border-radius: 0; background: none; }
.st-card .st-row:hover { background: var(--surface-2); }
.st-actions { display: flex; gap: 8px; padding: 0 14px 14px; }
.st-actions .btn { flex: 1 1 auto; min-width: 0; white-space: nowrap; padding-inline: 8px; gap: 5px; font-size: 12.5px; }
.st-actions .btn svg { width: 16px; height: 16px; flex: none; }
.chg-edit { flex: none; align-self: flex-start; }
.st-row:hover { border-color: var(--line-strong); background: var(--surface-2); }
.st-row .ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.st-row .ic svg { width: 22px; height: 22px; }
.st-row .body { flex: 1; min-width: 0; }
.st-row .name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chg { display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.chg + .chg { margin-top: 10px; }
.chg .plug { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-3); flex: none; }
.chg .plug svg { width: 24px; height: 24px; }
.chg .body { flex: 1; min-width: 0; }
.chg .kw { font-family: var(--font-num); font-weight: 700; font-size: 20px; }
.kw, .tag.num, .num { direction: ltr; unicode-bidi: isolate; }
.stats-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(54px, 1fr)); gap: 6px; margin: 14px 0 18px; }
.stats-strip div { background: var(--surface-2); border-radius: 12px; padding: 8px 4px; text-align: center; border: 1px solid var(--line); }
.stats-strip b { display: block; font-family: var(--font-num); font-size: 22px; line-height: 1.1; direction: ltr; unicode-bidi: isolate; }
.stats-strip span { font-size: 10.5px; color: var(--muted); font-weight: 600; }
.info-grid { display: grid; gap: 10px; margin-bottom: 14px; }
.info-grid > div { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); font-size: 14px; }
.info-grid svg { width: 18px; height: 18px; flex: none; margin-top: 2px; color: var(--faint); }
.info-grid b { color: var(--text); font-weight: 600; }

.search { position: relative; margin-bottom: 12px; }
.search svg { position: absolute; top: 15px; inset-inline-start: 14px; width: 20px; height: 20px; color: var(--faint); }
.search .input { padding-inline-start: 44px; }
.area-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 14px; scrollbar-width: thin; }
.area-chips .chip { background: var(--surface); backdrop-filter: none; }
.area-chips .chip.on { background: var(--brand); }

.empty { text-align: center; padding: 40px 16px; color: var(--muted); }
.empty .ico { width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 16px; display: grid; place-items: center; background: var(--surface-2); color: var(--faint); }
.empty .ico svg { width: 34px; height: 34px; }
.empty h3 { color: var(--text); margin: 0 0 6px; }

/* reservation countdown */
.ring-wrap { display: grid; place-items: center; margin: 8px 0 18px; position: relative; }
.ring { width: 220px; height: 220px; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 12; }
.ring .track { stroke: var(--surface-3); }
.ring .prog { stroke: var(--st-reserved); stroke-linecap: round; transition: stroke-dashoffset 1s linear, stroke 0.3s; }
.ring-label { position: absolute; text-align: center; }
.ring-label b { display: block; font-family: var(--font-num); font-size: 52px; font-weight: 700; line-height: 1; direction: ltr; }
.ring-label span { font-size: 13px; color: var(--muted); }
.res-card { background: linear-gradient(180deg, rgba(155, 123, 234, 0.08), transparent 40%), var(--surface); border: 1px solid var(--line-strong); border-radius: 22px; padding: 20px; }
.res-card.charging { background: linear-gradient(180deg, rgba(59, 155, 232, 0.1), transparent 40%), var(--surface); }
.charging-anim { width: 120px; height: 120px; margin: 6px auto 14px; border-radius: 50%; display: grid; place-items: center; background: rgba(59, 155, 232, 0.12); color: var(--st-charging); animation: pulseBlue 2s infinite; }
.charging-anim svg { width: 54px; height: 54px; }
@keyframes pulseBlue { 0% { box-shadow: 0 0 0 0 rgba(59, 155, 232, 0.4); } 70% { box-shadow: 0 0 0 26px rgba(59, 155, 232, 0); } 100% { box-shadow: 0 0 0 0 rgba(59, 155, 232, 0); } }
.hist { display: flex; justify-content: space-between; gap: 10px; padding: 12px 4px; border-bottom: 1px solid var(--line); font-size: 14px; }

/* spaces: first-login choice and the home / business pages */
.space-card { display: flex; align-items: center; gap: 14px; width: 100%; padding: 16px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); cursor: pointer; text-align: start; transition: border-color 0.15s, background 0.15s; }
.space-card:hover { border-color: var(--brand); background: var(--surface-2); }
.space-card:disabled { opacity: 0.6; cursor: default; }
.space-card .ic { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-hi); flex: none; }
.space-card .ic svg { width: 24px; height: 24px; }
.space-card .body { flex: 1; min-width: 0; }
.space-card b { display: block; font-size: 16px; }
.space-card small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.space-card .chev { color: var(--faint); }
html[dir='rtl'] .space-card .chev { transform: scaleX(-1); }
.note-card { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; margin-bottom: 14px; border-radius: 12px; font-size: 14px; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); }
.note-card svg { margin-top: 2px; }
.note-card.bad { background: rgba(229, 83, 75, 0.08); border-color: rgba(229, 83, 75, 0.3); color: var(--err-fg); }
.note-card.good { background: var(--brand-soft); border-color: rgba(60, 169, 63, 0.3); color: var(--brand-hi); }
.picker-map { height: 280px; border-radius: 14px; overflow: hidden; border: 1px solid var(--line-strong); position: relative; }
.st.draft { color: var(--muted); background: var(--surface-3); }
.status-select { width: 150px; height: 38px; font-size: 14px; border-radius: 10px; padding: 0 10px; background-position: calc(100% - 18px) 16px, calc(100% - 12px) 16px !important; }
html[dir='rtl'] .status-select { background-position: 12px 16px, 18px 16px !important; }
.chg .icon-btn { width: 38px; height: 38px; align-self: flex-start; }
.chg.column { flex-direction: column; align-items: stretch; }
.chg-top { display: flex; gap: 12px; align-items: center; }
.live-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.live-box { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.live-box .stats-strip { margin: 0 0 12px; }
.copy-box { display: flex; align-items: center; gap: 8px; padding: 10px 12px; margin: 8px 0; border-radius: 10px; background: var(--surface-3); font-family: var(--font-num); font-size: 15px; word-break: break-all; direction: ltr; text-align: left; }
.copy-box span { flex: 1; }
/* Connection details of a charger: three numbered values to copy into it. */
.link-item { margin-top: 12px; }
.link-item > b { font-size: 14px; }
.link-more summary { cursor: pointer; color: var(--muted); font-size: 13px; }
.link-more[open] summary { color: var(--text); }
/* The last finished session on a charger card: energy, duration and the final cost. */
.last-session { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); font-size: 13.5px; }
.last-session > :first-child { flex-basis: 100%; }
.steps { margin: 0 0 14px; padding-inline-start: 22px; color: var(--muted); font-size: 14px; }
.steps li { margin-bottom: 8px; }
.steps b { color: var(--text); }
.month-card { display: block; padding: 12px; margin-bottom: 12px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); color: inherit; text-decoration: none; }
.month-card:hover { border-color: var(--line-strong); }
.chev-end { flex: none; }
html[dir='rtl'] .chev-end { transform: scaleX(-1); }
.kv-card { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; margin-top: 10px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); font-size: 14px; }
.sched-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.sched-row + .sched-row { margin-top: 8px; }
.sched-row.off .body { opacity: 0.5; }
.sched-row .body { flex: 1; min-width: 0; text-align: start; background: none; border: 0; padding: 0; cursor: pointer; }
.sched-row .body b { font-size: 18px; display: inline-block; }
.sched-row .icon-btn { width: 38px; height: 38px; }
.day-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.day-chips .chip { background: var(--surface); backdrop-filter: none; }
.day-chips .chip.on { background: var(--brand); }
.chg-actions { display: flex; flex-direction: column; gap: 6px; flex: none; }
.chg.focused { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.chg-ops { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.stickers { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.sticker { background: #fff; color: #111; border-radius: 18px; padding: 18px; text-align: center; border: 2px solid #3ca93f; }
.sticker-brand { margin-bottom: 8px; }
.sticker-qr svg { width: 100%; max-width: 220px; height: auto; display: block; margin: 0 auto 10px; }
.sticker b { display: block; font-size: 17px; }
.sticker-name { font-weight: 700; margin-top: 6px; }
.sticker-code { color: #444; font-size: 13px; margin-top: 2px; }
/* A sticker is printed on white, so it always uses the dark-lettered logo. */
:root .sticker .on-dark { display: none !important; }
:root:not([data-mode='light']) .sticker .on-light, :root[data-mode='light'] .sticker .on-light { display: inline !important; }
.print-only { display: none; }
.bill-head { align-items: center; gap: 16px; margin-bottom: 16px; }

@media print {
  :root, :root[data-mode] {
    --bg: #fff; --surface: #fff; --surface-2: #fff; --surface-3: #f1f1f1; --text: #111; --muted: #444; --faint: #666;
    --line: #ccc; --line-strong: #999; --st-available: #1f7a22; color-scheme: light;
  }
  html, body { height: auto; overflow: visible; background: #fff; }
  .app, .views, .view { position: static; display: block; height: auto; overflow: visible; }
  .view[hidden], .bottom-nav, .toasts, .no-print { display: none !important; }
  .print-only { display: block; }
  .print-only.bill-head { display: flex; }
  /* Paper is always light, whichever theme is on screen. */
  :root .on-dark { display: none !important; }
  :root:not([data-mode='light']) .on-light, :root[data-mode='light'] .on-light { display: inline !important; }
  .card, .list, .stats-strip div { break-inside: avoid; }
  .hist { break-inside: avoid; }
  .stickers { grid-template-columns: repeat(2, 1fr); }
  .sticker { break-inside: avoid; }
}

/* settings */
.profile-head { display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: 20px; background: linear-gradient(135deg, rgba(60, 169, 63, 0.18), rgba(60, 169, 63, 0.02)), var(--surface); border: 1px solid var(--line); }
.avatar { width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center; background: var(--brand); color: #fff; font-weight: 800; font-size: 22px; flex: none; }
.list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.list-item { display: flex; align-items: center; gap: 14px; width: 100%; padding: 15px 16px; background: none; border: 0; text-align: start; cursor: pointer; }
.list-item + .list-item { border-top: 1px solid var(--line); }
.list-item:hover { background: var(--surface-2); }
.list-item .ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--surface-3); flex: none; }
.list-item .ic svg { width: 20px; height: 20px; }
.list-item .body { flex: 1; min-width: 0; }
.list-item .body small { display: block; color: var(--muted); font-size: 12.5px; }
.list-item .chev { color: var(--faint); }
html[dir='rtl'] .list-item .chev { transform: scaleX(-1); }
.kv { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; }
.kv + .kv { border-top: 1px solid var(--line); }
.kv span { color: var(--muted); font-size: 14px; }
.kv b { font-weight: 600; text-align: end; word-break: break-all; }
.pm { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.pm + .pm { border-top: 1px solid var(--line); }
.pm .cardart { width: 52px; height: 36px; border-radius: 7px; display: grid; place-items: center; font-size: 10px; font-weight: 800; color: #fff; flex: none; letter-spacing: 0.04em; }
.verified { color: var(--st-available); display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 13px; }
.unverified { color: var(--st-maintenance); display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 13px; }

.skeleton { background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: var(--radius); height: 76px; }
.skeleton + .skeleton { margin-top: 10px; }
@keyframes shimmer { to { background-position: -200% 0; } }

@media (min-width: 900px) {
  .map-fabs { top: auto; bottom: 24px; inset-inline-end: 24px; }
  .map-card { inset-inline-start: 24px; inset-inline-end: auto; bottom: 24px; width: 420px; margin: 0; }
  .map-top { padding: 16px 24px; flex-direction: row; align-items: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .splash img { opacity: 1; }
}

/* ---- wallet (step 5) ---- */
.wallet-hero { position: relative; overflow: hidden; border-radius: var(--radius); padding: 20px 18px 18px; display: grid; gap: 4px; justify-items: start;
  background: linear-gradient(135deg, var(--brand-soft), transparent 70%), var(--surface); border: 1px solid var(--line); }
.wallet-hero > span { color: var(--muted); font-weight: 600; }
.wallet-ic { position: absolute; inset-inline-end: 16px; top: 16px; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.wallet-total { display: flex; align-items: baseline; gap: 6px; direction: ltr; }
.wallet-total b { font-family: var(--font-num); font-size: 44px; line-height: 1; letter-spacing: 0.5px; }
.wallet-total small { font-size: 15px; color: var(--muted); font-weight: 700; }
.wallet-total.neg b { color: var(--danger-fg); }
.wallet-way { margin-top: 10px; }
.wallet-way > summary { cursor: pointer; list-style: none; gap: 10px; }
.wallet-way > summary::-webkit-details-marker { display: none; }
.wallet-way > summary svg { color: var(--brand); flex: none; }
.transfer-info { background: var(--surface-2); border: 1px dashed var(--line-strong); border-radius: var(--radius-sm); padding: 10px 12px; margin-bottom: 14px; font-weight: 600; white-space: normal; overflow-wrap: anywhere; }
.wallet-amt { white-space: nowrap; direction: ltr; align-self: center; font-family: var(--font-num); font-size: 17px; }
.wallet-amt.credit { color: var(--brand); }
.prepaid-note { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 11px 14px; border-radius: 12px; background: var(--brand-soft); color: var(--text); text-decoration: none; font-size: 13.5px; font-weight: 600; }
.prepaid-note svg { flex: none; width: 18px; height: 18px; color: var(--brand); }
.prepaid-note span { flex: 1; }
.prepaid-note svg:last-child { color: var(--muted); }
html[dir='rtl'] .prepaid-note svg:last-child { transform: scaleX(-1); }

/* ---- trip planner (step 6) ---- */
.trip-flag { display: block; width: 18px; height: 18px; border-radius: 50%; background: var(--st-charging); border: 3px solid #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4); }
#tripChip { position: absolute; z-index: 500; top: 118px; inset-inline-start: 12px; max-width: calc(100% - 90px); }
.trip-chip { display: flex; align-items: center; border-radius: 999px; background: var(--glass); border: 1px solid var(--line-strong); box-shadow: var(--shadow); overflow: hidden; }
.trip-chip button { border: 0; background: none; color: var(--text); cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 9px 12px; font: inherit; font-size: 13px; font-weight: 700; min-width: 0; }
.trip-chip button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trip-chip button svg { width: 18px; height: 18px; flex: none; color: var(--st-charging); }
.trip-chip [data-trip-clear] { padding-inline: 10px; border-inline-start: 1px solid var(--line); color: var(--muted); }
.trip-chip [data-trip-clear] svg { color: var(--muted); width: 16px; height: 16px; }
.trip-conn { flex-wrap: wrap; overflow: visible; }
.trip-adv > summary { cursor: pointer; font-weight: 700; color: var(--muted); font-size: 14px; padding: 4px 0; }
.trip-timeline { position: relative; margin-top: 16px; }
.tl-item { position: relative; display: flex; gap: 12px; align-items: flex-start; }
.tl-body { flex: 1; min-width: 0; display: grid; gap: 2px; padding-bottom: 4px; }
.tl-item.stop .tl-body { background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.tl-dot { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-num); font-weight: 700; font-size: 14px; background: var(--st-charging); color: #fff; margin-top: 2px; }
.tl-dot.start { background: var(--surface-2); border: 3px solid var(--st-charging); }
.tl-dot.end { background: var(--st-charging); border: 3px solid #fff; box-shadow: 0 0 0 2px var(--st-charging); }
.tl-leg { margin-inline-start: 12px; padding: 10px 0 10px 24px; border-inline-start: 2px dashed var(--st-charging); color: var(--muted); font-size: 13px; }
html[dir='rtl'] .tl-leg { padding: 10px 24px 10px 0; }
@media (min-width: 900px) { #tripChip { top: 70px; } }
.stats-strip b.dur { direction: inherit; font-size: 17px; line-height: 1.3; }

/* ---- map search and station names (after step 6) ---- */
.map-brand .pill { flex: none; }
.map-search { position: relative; z-index: 2; flex: 1; min-width: 0; display: flex; align-items: center; height: 46px; border-radius: 999px; background: var(--glass); backdrop-filter: blur(10px); border: 1px solid var(--line); box-shadow: var(--shadow); }
.map-search:focus-within { border-color: var(--brand); }
.map-search .ic { flex: none; display: grid; place-items: center; width: 40px; color: var(--muted); }
.map-search .ic svg { width: 19px; height: 19px; }
.map-search input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; color: var(--text); font: inherit; font-size: 14.5px; outline: none; padding: 0; }
.map-search input::-webkit-search-cancel-button { display: none; }
.map-search input::placeholder { color: var(--muted); }
#mapQClear { flex: none; width: 38px; height: 38px; margin-inline-end: 4px; border: 0; border-radius: 50%; background: none; color: var(--muted); display: grid; place-items: center; cursor: pointer; }
#mapQClear svg { width: 17px; height: 17px; }
.map-results { position: absolute; top: calc(100% + 8px); inset-inline: 0; min-width: 260px; max-height: min(60vh, 440px); overflow-y: auto; padding: 6px; border-radius: 16px; background: var(--glass-strong); border: 1px solid var(--line-strong); box-shadow: var(--shadow); z-index: 700; }
.map-result { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px; border: 0; border-radius: 12px; background: none; color: var(--text); font: inherit; text-align: start; cursor: pointer; }
.map-result:hover, .map-result.on { background: var(--surface-2); }
.map-result .ic { flex: none; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.map-result .ic svg { width: 18px; height: 18px; }
.map-result .body { min-width: 0; display: grid; gap: 2px; }
.map-result b { font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.map-result small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.map-noresult { padding: 14px; color: var(--muted); font-size: 14px; text-align: center; }
.map-pin { position: relative; }
.pin-label { display: none; position: absolute; top: calc(100% + 2px); left: 50%; transform: translateX(-50%); max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  padding: 2px 8px; border-radius: 999px; background: var(--glass-strong); border: 1px solid var(--line-strong); color: var(--text); font-family: var(--font-ar); font-size: 12px; font-weight: 700; line-height: 1.5; pointer-events: none; }
.labels-on .pin-label { display: block; }
@media (min-width: 900px) { .map-brand { width: min(540px, 50%); flex: none; } }
.map-top:focus-within, .map-top:has(.map-results:not([hidden])) { z-index: 650; }
.place-mark { display: block; width: 22px; height: 22px; border-radius: 50%; background: rgba(59, 155, 232, 0.25); border: 3px solid var(--st-charging); box-shadow: 0 0 0 4px rgba(59, 155, 232, 0.18); }
.map-results-head { padding: 10px 10px 4px; font-size: 12px; font-weight: 700; color: var(--muted); border-top: 1px solid var(--line); margin-top: 4px; }
.map-result .ic.place { background: rgba(59, 155, 232, 0.14); color: var(--st-charging); }
.place-search { position: relative; display: flex; align-items: center; margin-bottom: 8px; }
.place-search > .ic { position: absolute; inset-inline-start: 12px; color: var(--muted); display: grid; pointer-events: none; }
.place-search > .ic svg { width: 18px; height: 18px; }
.place-search .input { padding-inline-start: 40px; }
.place-search .map-results { top: calc(100% + 4px); }

/* ---- in-app directions (suggestion 3) ---- */
.nav-panel { position: absolute; inset: 0; z-index: 640; pointer-events: none; }
.nav-panel > * { pointer-events: auto; }
.nav-card { position: absolute; inset-inline: 12px; bottom: 12px; max-height: 70%; overflow-y: auto; padding: 16px; border-radius: 20px; background: var(--glass-strong); border: 1px solid var(--line-strong); box-shadow: var(--shadow); }
.nav-card h3 { font-size: 18px; }
.nav-card .actions { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; margin-top: 14px; }
.nav-card .actions:has(> :only-child) { grid-template-columns: 1fr; }
.nav-sum { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.nav-sum b { font-size: 22px; color: var(--brand); }
.nav-sum span { color: var(--muted); font-size: 14px; }
.nav-steps { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 2px; }
.nav-steps li { display: flex; gap: 12px; align-items: center; padding: 8px 4px; border-bottom: 1px solid var(--line); font-size: 14px; }
.nav-steps .body { display: grid; gap: 2px; }
.nav-steps small { color: var(--muted); }
.nav-ic { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); color: var(--text); }
.nav-ic svg { width: 20px; height: 20px; }
.nav-ic.big { width: 56px; height: 56px; border-radius: 16px; background: var(--brand); color: #fff; }
.nav-ic.big svg { width: 34px; height: 34px; }
.nav-ic.ok { background: var(--brand); color: #fff; }
.nav-banner { position: absolute; top: 12px; inset-inline: 12px; display: flex; gap: 14px; align-items: center; padding: 14px; border-radius: 20px; background: #12301a; color: #fff; box-shadow: var(--shadow); }
.nav-banner .body { min-width: 0; display: grid; gap: 2px; }
.nav-dist { font-family: var(--font-num); font-size: 30px; line-height: 1.1; }
.nav-text { font-size: 17px; font-weight: 700; line-height: 1.35; }
.nav-banner small { color: rgba(255, 255, 255, 0.7); font-size: 13px; }
.nav-note { position: absolute; top: 118px; inset-inline: 24px; padding: 8px 12px; border-radius: 12px; background: var(--glass-strong); border: 1px solid var(--line-strong); font-size: 13px; font-weight: 600; text-align: center; }
.nav-bottom { position: absolute; bottom: 12px; inset-inline: 12px; display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 20px; background: var(--glass-strong); border: 1px solid var(--line-strong); box-shadow: var(--shadow); }
.nav-bottom .nav-sum { flex: 1; min-width: 0; display: grid; gap: 0; }
.nav-bottom .nav-sum b { font-size: 20px; }
.nav-bottom .nav-sum span { font-size: 13px; }
.navigating .map-top, .navigating .map-fabs, .navigating #mapCard, .navigating #tripChip, .navigating .leaflet-control-zoom { display: none !important; }
@media (min-width: 900px) { .nav-card, .nav-bottom, .nav-banner { inset-inline-start: 24px; inset-inline-end: auto; width: 420px; } .nav-card, .nav-bottom { bottom: 24px; } .nav-banner { top: 24px; } }
.nav-open #mapCard { display: none; }
/* Driving view: the driver is an arrow on the road, turning to face the way the road goes. */
.nav-puck { display: block; width: 52px; height: 52px; border-radius: 50%; transition: transform 0.45s ease-out;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.45)); box-shadow: 0 0 0 0 rgba(22, 103, 196, 0.45); animation: puckPulse 2.2s ease-out infinite; }
.nav-puck svg { display: block; width: 100%; height: 100%; }
@keyframes puckPulse { 0% { box-shadow: 0 0 0 0 rgba(22, 103, 196, 0.45); } 100% { box-shadow: 0 0 0 20px rgba(22, 103, 196, 0); } }
/* The arrowhead that ends the white turn marking on the road. Points north until rotated. */
.turn-head { display: block; width: 30px; height: 30px; background: #fff; clip-path: polygon(50% 0, 100% 78%, 50% 58%, 0 78%); filter: drop-shadow(0 0 2px rgba(11, 42, 74, 0.8)); }
html[lang='ar'] .map-place { font-family: var(--font-ar); }
/* Places the admin added to the map: a dot with the name beside it, like the map's own labels. */
.map-place { position: absolute; left: 0; top: 0; display: none; align-items: center; gap: 5px; transform: translate(-5px, -50%); white-space: nowrap; pointer-events: none; direction: ltr;
  font: 700 12.5px/1.2 var(--font-en); color: var(--pc); text-shadow: 0 0 3px var(--bg), 0 0 3px var(--bg), 0 0 2px var(--bg); }
.places-on .map-place { display: flex; }
.map-place i { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--pc); border: 2px solid var(--bg); box-shadow: 0 0 0 1px var(--pc); }
.map-place.g-food { --pc: #f0b45a; } .map-place.g-shop { --pc: #c9a6ff; } .map-place.g-health { --pc: #ff8f86; }
.map-place.g-travel { --pc: #86c5f5; } .map-place.g-civic { --pc: #a8d8b0; } .map-place.g-other { --pc: #c3cdc7; }
:root[data-mode='light'] .map-place.g-food { --pc: #a85a07; } :root[data-mode='light'] .map-place.g-shop { --pc: #6d3fc0; } :root[data-mode='light'] .map-place.g-health { --pc: #c0281f; }
:root[data-mode='light'] .map-place.g-travel { --pc: #1b65a8; } :root[data-mode='light'] .map-place.g-civic { --pc: #2d6b36; } :root[data-mode='light'] .map-place.g-other { --pc: #4f5a54; }

/* ---- company groups and staff (suggestion 1) ---- */
.group-chips { margin: 0 0 14px; flex-wrap: wrap; overflow: visible; }
.group-chips .chip { height: 32px; }
.st.role { background: var(--brand-soft); color: var(--brand-hi); }
.group-checks { display: grid; gap: 6px; margin-top: 8px; padding-inline-start: 4px; }
.readonly [data-claim], .readonly [data-setup] { display: none; }
label.check { display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; padding: 4px 0; }
label.check input { width: 18px; height: 18px; accent-color: var(--brand); flex: none; }

/* ---- E9 assistant (suggestion 4) ---- */
/* The E9 button is the EVC963 emblem itself, in its own colours: green ring and 9, an E in charcoal
   by day and white at night, on a disc of the page colour. A charge spark runs round the ring and
   the 9 breathes, so it reads as alive rather than as one more round button. */
:root { --e9-ink: #ffffff; --e9-disc: radial-gradient(circle at 35% 30%, #1d2a23, #0b110e 70%); --e9-logo: #3ca93f; }
:root[data-mode='light'] { --e9-ink: #393536; --e9-disc: radial-gradient(circle at 35% 30%, #ffffff, #eef4ef 75%); }
.e9-mark .e9-ring, .e9-mark .e9-nine { fill: var(--e9-logo); }
.e9-mark .e9-e { fill: var(--e9-ink); }
.e9-fab { position: absolute; z-index: 520; inset-inline-end: 12px; top: 300px; width: 60px; height: 60px; border-radius: 50%; border: 0; padding: 0; cursor: pointer;
  background: var(--e9-disc); display: grid; place-items: center; isolation: isolate;
  box-shadow: 0 8px 24px rgba(60, 169, 63, 0.35), 0 0 0 0 rgba(60, 169, 63, 0.5), var(--shadow); animation: e9breath 3.2s ease-in-out infinite;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1); -webkit-tap-highlight-color: transparent; }
.e9-fab:hover { transform: scale(1.06); }
.e9-fab:active { transform: scale(0.92); }
.e9-fab:focus-visible { outline: 3px solid var(--brand-hi); outline-offset: 4px; }
.e9-fab .e9-mark { width: 92%; height: 92%; position: relative; z-index: 1; }
.e9-mark { display: block; fill: currentColor; overflow: visible; }
.e9-fab .e9-mark .e9-nine { transform-box: fill-box; transform-origin: center; animation: e9nine 3.2s ease-in-out infinite; }
.e9-orbit { position: absolute; inset: -5px; border-radius: 50%; z-index: -1; pointer-events: none;
  background: conic-gradient(from 0deg, transparent 0 62%, rgba(60, 169, 63, 0.15) 70%, #3ca93f 90%, #b8f5ba 96%, transparent 97%);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2.5px));
          mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2.5px));
  animation: e9spin 2.6s linear infinite; }
.e9-fab:hover .e9-orbit { animation-duration: 1.1s; }
@keyframes e9spin { to { transform: rotate(360deg); } }
@keyframes e9breath { 0%, 100% { box-shadow: 0 8px 24px rgba(60, 169, 63, 0.45), 0 0 0 0 rgba(60, 169, 63, 0.45), var(--shadow); }
  60% { box-shadow: 0 8px 24px rgba(60, 169, 63, 0.45), 0 0 0 12px rgba(60, 169, 63, 0), var(--shadow); } }
@keyframes e9nine { 0%, 100% { opacity: 1; } 50% { opacity: 0.72; } }
.navigating .e9-fab { display: none; }
@media (min-width: 900px) { .e9-fab { top: auto; bottom: 230px; inset-inline-end: 24px; } }
.sheet.e9-sheet { display: flex; flex-direction: column; height: min(86dvh, 720px); overflow: hidden; padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
@media (min-width: 900px) { .sheet.e9-sheet { height: auto; } }
.e9-head { align-items: center; gap: 12px; }
.e9-av { flex: none; position: relative; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: var(--e9-disc); box-shadow: 0 2px 8px rgba(60, 169, 63, 0.3); }
.e9-av .e9-mark { width: 94%; height: 94%; }
.e9-av.big { width: 46px; height: 46px; }
.e9-av.thinking::after { content: ''; position: absolute; inset: -3px; border-radius: 50%; border: 2px solid transparent; border-top-color: var(--brand-hi); border-inline-end-color: var(--brand-hi); animation: e9spin 0.9s linear infinite; }
.e9-head .icon-btn svg { width: 20px; height: 20px; }
.e9-status { display: inline-flex; align-items: center; gap: 6px; }
.e9-status i { width: 7px; height: 7px; border-radius: 50%; background: var(--st-available); box-shadow: 0 0 0 3px var(--brand-soft); }
.recording .e9-status i { background: var(--danger); box-shadow: 0 0 0 3px rgba(229, 83, 75, 0.2); }
.e9-log { flex: 1; min-height: 0; overflow-y: auto; display: grid; align-content: start; gap: 12px; padding: 8px 2px 12px; }
.e9-msg { display: flex; gap: 8px; align-items: flex-start; }
.e9-msg.me { justify-content: flex-end; }
.e9-msg .bubble { padding: 10px 13px; border-radius: 16px; white-space: pre-wrap; line-height: 1.55; font-size: 14.5px; max-width: 88%; overflow-wrap: anywhere; }
.e9-msg.me .bubble { background: var(--brand); color: #fff; border-end-end-radius: 4px; }
.e9-msg.e9 .bubble { background: var(--surface-2); border: 1px solid var(--line); border-end-start-radius: 4px; justify-self: start; }
.bubble.typing { display: flex; gap: 4px; align-items: center; }
.bubble.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: e9dot 1s infinite ease-in-out; }
.bubble.typing i:nth-child(2) { animation-delay: 0.15s; } .bubble.typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes e9dot { 0%, 80%, 100% { opacity: 0.25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.e9-card { display: grid; gap: 8px; padding: 10px 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line-strong); }
.e9-card .body { min-width: 0; display: grid; gap: 2px; }
.e9-card .body b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.e9-card .body small { color: var(--muted); font-size: 12px; }
.e9-card-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.e9-card-actions .btn svg { width: 16px; height: 16px; }
.e9-confirm { display: grid; grid-template-columns: 1.3fr 1fr; gap: 8px; }
/* The two answers to one of E9's opening questions: talk or type, fast or slow. */
.e9-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.e9-choices .btn { min-width: 0; padding-inline: 8px; }
.e9-choices .btn span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
/* More than two answers (the stations found): one per line, so long names stay readable. */
.e9-choices.many { grid-template-columns: 1fr; }
.e9-choices.many .btn { justify-content: flex-start; padding-inline: 14px; }
.e9-choices .btn svg { flex: none; }
.speaking .e9-status i { animation: e9rec 1.1s ease-in-out infinite; }
.e9-sugg { flex-wrap: wrap; overflow: visible; }
.e9-sugg .chip { height: 32px; font-size: 12.5px; }
.e9-input { display: flex; gap: 8px; align-items: center; padding-top: 10px; border-top: 1px solid var(--line); }
.e9-input .input { flex: 1; min-width: 0; }
.e9-input .icon-btn.send { background: var(--brand); color: #fff; border-color: var(--brand); }
html[dir='rtl'] .e9-input .icon-btn.send svg { transform: scaleX(-1); }
#e9Mic.on { background: var(--danger); color: #fff; border-color: var(--danger); animation: pulse 1.5s infinite; }
.e9-note { margin: 8px 2px 0; font-size: 11.5px; }

/* E9 finding the customer */
.bubble.e9-locating { display: flex; align-items: center; gap: 10px; }
.e9-radar { position: relative; flex: none; width: 30px; height: 30px; display: grid; place-items: center; color: var(--brand); }
.e9-radar svg { width: 18px; height: 18px; position: relative; }
.e9-radar i { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--brand); opacity: 0; animation: e9ping 1.6s ease-out infinite; }
.e9-radar i + i { animation-delay: 0.8s; }
@keyframes e9ping { 0% { transform: scale(0.3); opacity: 0.9; } 100% { transform: scale(1.25); opacity: 0; } }
/* Chargers in a suggestion: free now, and free soon */
.e9-slots { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.e9-slot { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 600; border: 1px solid var(--line-strong); background: var(--surface-2); }
.e9-slot i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.e9-slot.free { color: var(--st-available); border-color: color-mix(in srgb, var(--st-available) 40%, transparent); background: var(--brand-soft); }
.e9-slot.free i { background: var(--st-available); box-shadow: 0 0 0 3px var(--brand-soft); }
.e9-slot.soon { color: var(--text); }
.e9-slot.soon i { background: conic-gradient(var(--st-available) 0 50%, transparent 50%); border: 1.5px solid var(--st-available); width: 10px; height: 10px; }
/* Recording a voice message: the typing bar becomes a live recorder */
.e9-rec { display: none; gap: 10px; align-items: center; padding-top: 10px; border-top: 1px solid var(--line); }
.e9-sheet.recording .e9-rec { display: flex; }
.e9-sheet.recording .e9-input { display: none; }
.e9-rec-mid { flex: 1; min-width: 0; display: grid; gap: 4px; padding: 8px 12px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line); }
.e9-rec-top { display: flex; align-items: center; gap: 8px; font-size: 13px; white-space: nowrap; min-width: 0; }
.e9-rec-top b { color: var(--danger); }
.e9-rec-top .num { color: var(--muted); font-variant-numeric: tabular-nums; }
.e9-rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--danger); animation: e9rec 1.1s ease-in-out infinite; }
@keyframes e9rec { 0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(229, 83, 75, 0.55); } 50% { opacity: 0.55; box-shadow: 0 0 0 6px rgba(229, 83, 75, 0); } }
.e9-rec-ok { margin-inline-start: auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; display: inline-flex; align-items: center; gap: 4px; color: var(--st-available); font-size: 12px; font-weight: 700; opacity: 0; transition: opacity 0.2s; }
.e9-rec-ok svg { width: 14px; height: 14px; }
.e9-sheet.hearing .e9-rec-ok { opacity: 1; }
#e9Wave { width: 100%; height: 40px; display: block; }
.e9-rec-text { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 1.4em; }
.e9-rec .icon-btn.send { background: var(--brand); color: #fff; border-color: var(--brand); }
html[dir='rtl'] .e9-rec .icon-btn.send svg { transform: scaleX(-1); }
#e9RecCancel { color: var(--danger); }
