:root {
  --ink: #1f1f1c; --ink-2: #2b2b27; --ink-3: #3a3a35;
  --gold: #ffce32; --gold-soft: #fff4cc;
  --paper: #f5f4ef; --card: #ffffff; --line: #e7e5dd; --line-2: #f0eee8;
  --muted: #6d6f69; --muted-2: #9a9b95;
  --red: #d9453a; --red-soft: #fdecea; --green: #2f9e5b; --green-soft: #e6f5ec;
  --blue: #2f6fed; --blue-soft: #e9f0fe; --orange: #f08a24; --orange-soft: #fff1e3;
  --radius: 18px; --shadow: 0 1px 2px rgba(20, 20, 15, .04), 0 6px 24px rgba(20, 20, 15, .06);
}
[hidden] { display: none !important; }
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { margin: 0; letter-spacing: -.01em; }
.muted { color: var(--muted); margin: 0; }
.small { font-size: 12px; }
.grow { flex: 1; min-width: 0; }
a { color: inherit; }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Marca ---------- */
.brand-mark { display: inline-flex; align-items: center; font-weight: 800; font-size: 34px; letter-spacing: -.02em; background: var(--gold); color: var(--ink); padding: 2px 14px; border-radius: 12px; }
.brand-mark span { color: var(--ink); }
.brand-mark.small { font-size: 18px; padding: 1px 9px; border-radius: 8px; }

/* ---------- Entrar: Luanda ao pôr do sol em ecrã inteiro ---------- */
.login-screen { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(360px, .8fr); align-items: center;
  background: linear-gradient(90deg, rgba(12, 16, 39, .82) 0%, rgba(12, 16, 39, .45) 42%, rgba(12, 16, 39, .15) 70%, rgba(12, 16, 39, .35) 100%), url(/assets/luanda.svg) center 62% / cover no-repeat, #1b1530; }
.login-brand { color: #fff; padding: 56px clamp(24px, 6vw, 96px); display: flex; flex-direction: column; gap: 18px; align-self: start; margin-top: 7vh; }
.login-brand .brand-mark { align-self: flex-start; }
.login-brand h1 { font-size: clamp(34px, 4.4vw, 58px); line-height: 1.04; letter-spacing: -.025em; text-shadow: 0 2px 24px rgba(0, 0, 0, .35); }
.login-brand p { color: #e9e4f2; font-size: 18px; max-width: 480px; margin: 0; text-shadow: 0 1px 12px rgba(0, 0, 0, .4); }
.login-points { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 10px; color: #f3f0f8; font-weight: 500; }
.login-points li { display: flex; align-items: center; gap: 12px; }
.login-points li::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px rgba(255, 206, 50, .25); flex: none; }
.login-brand small { color: #c9c2d8; letter-spacing: .12em; text-transform: uppercase; font-size: 12px; font-weight: 700; }
.login-panel { display: flex; justify-content: center; padding: 32px 24px; }
.login-stack { width: 100%; max-width: 410px; display: grid; gap: 16px; }
.admin-install-card { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--line); padding: 16px; border-radius: 18px; }
.admin-install-card img { border-radius: 12px; }
.admin-install-card p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.admin-install-card .btn { width: 100%; }
#admin-install-steps { padding-left: 22px; margin: 0; display: grid; gap: 10px; }
.admin-connection { position: fixed; left: 16px; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 110; margin: 0; }
.offline-admin { min-height: 100dvh; display: grid; place-items: center; padding: 24px; }
.offline-admin .card { max-width: 460px; display: grid; gap: 16px; }
@media (display-mode: standalone) {
  [data-admin-install] { display: none !important; }
  body { padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
}
@media (max-width: 600px) { .topbar { flex-wrap: wrap; } }
.login-card { width: 100%; max-width: 410px; background: rgba(255, 255, 255, .96); backdrop-filter: blur(12px); border-radius: 26px; padding: 34px; box-shadow: 0 30px 80px rgba(8, 6, 20, .45); display: grid; gap: 14px; border: 1px solid rgba(255, 255, 255, .6); }
.login-card h2 { font-size: 28px; }
.login-card form { display: grid; gap: 14px; min-width: 0; }
.login-card .btn-primary { box-shadow: 0 8px 24px rgba(255, 206, 50, .45); }

/* ---------- Faixa de boas-vindas (visão geral) ---------- */
.hero { border-radius: 22px; overflow: hidden; min-height: 190px; display: flex; align-items: flex-end; box-shadow: var(--shadow);
  background: linear-gradient(90deg, rgba(12, 16, 39, .88) 0%, rgba(12, 16, 39, .55) 45%, rgba(12, 16, 39, .05) 80%), url(/assets/luanda.svg) center 64% / cover no-repeat, #1b1530; }
.hero-text { padding: 26px 28px; color: #fff; display: grid; gap: 6px; max-width: 640px; }
.hero-text h2 { font-size: clamp(24px, 3vw, 32px); letter-spacing: -.02em; }
.hero-text p { margin: 0; color: #e6e1ef; }
.hero-text .btn { justify-self: start; margin-top: 8px; }
.eyebrow { text-transform: capitalize; font-size: 13px; font-weight: 700; color: var(--gold) !important; letter-spacing: .02em; }

.field { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-3); }
.field input, .field select, .input { width: 100%; font: inherit; font-weight: 500; color: var(--ink); padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; outline: none; transition: border-color .15s, box-shadow .15s; }
.field input:focus, .field select:focus, .input:focus { border-color: var(--ink); box-shadow: 0 0 0 4px rgba(255, 206, 50, .35); }
.check { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 14px; }
.form-error { background: var(--red-soft); color: #8f2a22; border-radius: 12px; padding: 10px 12px; font-size: 14px; }
.link-btn { background: none; border: 0; color: var(--muted); font: inherit; font-size: 13px; text-decoration: underline; cursor: pointer; padding: 4px; }

/* ---------- Botões e etiquetas ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 700; font-size: 14px; border-radius: 12px; padding: 10px 16px; border: 1.5px solid transparent; cursor: pointer; text-decoration: none; white-space: nowrap; transition: transform .05s, background .15s, border-color .15s; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-block { width: 100%; padding: 13px 16px; }
.btn-primary { background: var(--gold); color: var(--ink); }
.btn-primary:hover { background: #ffc61a; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-light { background: #fff; color: var(--red); }
.btn-outline { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-outline:hover { border-color: var(--ink-3); }
.btn-danger { background: var(--red); color: #fff; }
.btn-ghost { background: transparent; color: #d7d8d1; border-color: var(--ink-3); }
.btn-ghost:hover { background: var(--ink-2); }
.btn-sm { padding: 7px 11px; font-size: 13px; border-radius: 10px; }
.icon-btn { width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; cursor: pointer; color: var(--ink); }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--line-2); color: var(--ink-3); white-space: nowrap; }
.chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .9; }
.chip.green { background: var(--green-soft); color: var(--green); }
.chip.red { background: var(--red-soft); color: var(--red); }
.chip.gold { background: var(--gold-soft); color: #8a6a00; }
.chip.blue { background: var(--blue-soft); color: var(--blue); }
.chip.orange { background: var(--orange-soft); color: #b05f0c; }
.chip.grey { background: var(--line-2); color: var(--muted); }
.count { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; display: inline-grid; place-items: center; font-size: 12px; font-weight: 800; background: var(--gold); color: var(--ink); }
.count.red { background: var(--red); color: #fff; }

/* ---------- Estrutura ---------- */
.shell { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; background: linear-gradient(90deg, var(--ink) 252px, var(--paper) 252px); }
.sidebar { background: var(--ink); color: #fff; display: flex; flex-direction: column; padding: 20px 14px; position: sticky; top: 0; height: 100vh; z-index: 30; }
.side-brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 22px; font-weight: 700; color: #e9e9e3; }
.nav { display: grid; gap: 4px; }
.nav button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 12px; border: 0; border-radius: 12px; background: transparent; color: #c9cac3; font: inherit; font-weight: 600; cursor: pointer; text-align: left; }
.nav button:hover { background: var(--ink-2); color: #fff; }
.nav button[aria-current="page"] { background: var(--gold); color: var(--ink); }
.nav button[aria-current="page"] .count { background: var(--ink); color: var(--gold); }
.nav button .count { margin-left: auto; }
.side-foot { margin-top: auto; display: grid; gap: 12px; padding-top: 16px; border-top: 1px solid var(--ink-3); }
.me { display: flex; gap: 10px; align-items: center; padding: 0 4px; }
.me b { display: block; font-size: 14px; }
.me small { color: #a3a49d; font-size: 12px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--gold); color: var(--ink); display: grid; place-items: center; font-weight: 800; flex: none; }
.main { min-width: 0; display: flex; flex-direction: column; }
.scrim { display: none; }
.topbar { display: flex; align-items: center; gap: 14px; padding: 22px clamp(16px, 3vw, 36px) 8px; }
.topbar h1 { font-size: 26px; }
.menu-btn { display: none; }
.live { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); background: #fff; border: 1px solid var(--line); padding: 7px 12px; border-radius: 999px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(47, 158, 91, .6); animation: live 2s infinite; }
.live.off .live-dot { background: var(--muted-2); animation: none; }
@keyframes live { 70% { box-shadow: 0 0 0 8px rgba(47, 158, 91, 0); } 100% { box-shadow: 0 0 0 0 rgba(47, 158, 91, 0); } }
.page { padding: 12px clamp(16px, 3vw, 36px) 48px; display: grid; gap: 18px; align-content: start; }
.banner { margin: 8px clamp(16px, 3vw, 36px) 0; padding: 12px 14px; border-radius: 12px; font-size: 14px; }
.banner-error { background: var(--red-soft); color: #8f2a22; }

/* ---------- Alarme SOS ---------- */
.sos-alarm { display: flex; align-items: center; gap: 14px; background: var(--red); color: #fff; padding: 14px clamp(16px, 3vw, 36px); position: sticky; top: 0; z-index: 20; }
.sos-alarm b { display: block; font-size: 16px; }
.sos-alarm span { font-size: 14px; opacity: .92; }
.sos-pulse { width: 14px; height: 14px; border-radius: 50%; background: #fff; animation: sos 1s infinite; flex: none; }
@keyframes sos { 0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .8); } 100% { box-shadow: 0 0 0 16px rgba(255, 255, 255, 0); } }

/* ---------- Cartões ---------- */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; min-width: 0; }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.card-head h2 { font-size: 17px; }
.card-head .grow + * { flex: none; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.kpi { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; display: grid; gap: 4px; position: relative; overflow: hidden; }
.kpi .label { font-size: 13px; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 8px; }
.kpi .value { font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.kpi .note { font-size: 12px; color: var(--muted); }
.kpi.accent { background: var(--ink); color: #fff; }
.kpi.accent .label, .kpi.accent .note { color: #b9bab3; }
.kpi .ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--line-2); color: var(--ink-3); }
.kpi.accent .ico { background: var(--ink-3); color: var(--gold); }
.alerts { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.alert-card { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); border: 0; font: inherit; text-align: left; cursor: pointer; color: inherit; }
.alert-card .ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.alert-card b { display: block; font-size: 22px; line-height: 1.1; }
.alert-card span { font-size: 13px; color: var(--muted); }
.alert-card.red .ico { background: var(--red-soft); color: var(--red); }
.alert-card.red.on { background: var(--red); color: #fff; }
.alert-card.red.on span { color: #ffe1de; }
.alert-card.red.on .ico { background: rgba(255, 255, 255, .2); color: #fff; }
.alert-card.gold .ico { background: var(--gold-soft); color: #8a6a00; }
.alert-card.orange .ico { background: var(--orange-soft); color: var(--orange); }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 18px; }
.map { height: 460px; border-radius: 14px; overflow: hidden; background: #e8ebe4; }
.map .leaflet-tile-pane { filter: saturate(.55) brightness(1.04); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 10px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.pin { width: 18px; height: 18px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 1px 6px rgba(0, 0, 0, .35); }
.pin.free { background: var(--green); }
.pin.busy { background: var(--orange); }
.pin.wait { background: var(--red); animation: sos 1.4s infinite; }
.pin.dest { background: var(--ink); border-radius: 4px; }

/* ---------- Listas e tabelas ---------- */
.list { display: grid; gap: 10px; }
.row-item { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 14px; border: 1px solid var(--line-2); }
.row-item .t { font-weight: 700; font-size: 14px; }
.row-item .s { font-size: 13px; color: var(--muted); }
.empty { text-align: center; color: var(--muted); padding: 28px 12px; font-size: 14px; }
.empty .i { width: 28px; height: 28px; color: var(--muted-2); margin-bottom: 6px; }
.table-wrap { overflow-x: auto; margin: 0 -4px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td .sub { display: block; font-size: 12px; color: var(--muted); }
.route { display: grid; gap: 2px; }
.route span::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 8px; background: var(--ink); vertical-align: 1px; }
.route span + span::before { background: var(--red); border-radius: 2px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filters button { font: inherit; font-size: 13px; font-weight: 600; padding: 7px 13px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; cursor: pointer; color: var(--ink-3); }
.filters button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ---------- Motoristas por aprovar ---------- */
.applications { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.application { display: grid; gap: 14px; }
.application .who { display: flex; gap: 12px; align-items: center; }
.application .who .avatar { width: 44px; height: 44px; font-size: 16px; }
.licence { position: relative; border-radius: 14px; overflow: hidden; background: #efeee8; aspect-ratio: 16 / 10; display: grid; place-items: center; color: var(--muted); font-size: 13px; cursor: zoom-in; }
.licence img { width: 100%; height: 100%; object-fit: contain; background: #2b2b27; }
.licence .tag { position: absolute; left: 10px; top: 10px; background: rgba(31, 31, 28, .75); color: #fff; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 6px; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.facts div { background: var(--paper); border-radius: 10px; padding: 8px 10px; }
.facts small { display: block; font-size: 11px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.facts b { font-size: 14px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.actions .btn-primary { margin-left: auto; }

/* ---------- SOS ---------- */
.sos-card { border: 2px solid var(--red); }
.sos-card .card-head h2 { color: var(--red); }

/* ---------- Utilitários (sem estilos no HTML, por causa da política de segurança) ---------- */
.dot-free { background: var(--green); } .dot-busy { background: var(--orange); } .dot-wait { background: var(--red); }
.legend i.dot-dest { background: var(--ink); border-radius: 2px; }
.search { max-width: 240px; } .mt { margin-top: 14px; } .mb { margin-bottom: 12px; }
.app-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.wrap { flex-wrap: wrap; } .minw { min-width: 240px; } .right { text-align: right; white-space: nowrap; }
.person { display: flex; gap: 10px; align-items: center; } .normal { font-weight: 500; }

/* ---------- Diálogo e aviso ---------- */
.modal { border: 0; border-radius: 22px; padding: 0; width: min(520px, calc(100vw - 32px)); box-shadow: 0 20px 60px rgba(0, 0, 0, .3); }
.modal::backdrop { background: rgba(20, 20, 15, .55); }
.modal-inner { padding: 24px; display: grid; gap: 14px; }
.modal-inner h2 { font-size: 20px; }
.modal-photo { width: min(960px, calc(100vw - 32px)); }
.modal-photo img { display: block; width: 100%; max-height: 80vh; object-fit: contain; background: #111; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 14px; font-weight: 600; box-shadow: var(--shadow); z-index: 100; }

/* ---------- Telemóvel e tablet ---------- */
@media (max-width: 1100px) { .grid-2 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 860px) {
  .login-screen { grid-template-columns: minmax(0, 1fr); align-items: start; background-position: center, 58% 30%; background-size: auto, auto 62vh; background-color: #110f22; }
  .login-brand { padding: 32px 20px 0; gap: 10px; margin-top: 0; min-height: 44vh; }
  .login-points, .login-brand small { display: none; }
  .login-brand h1 { font-size: 32px; }
  .login-brand p { font-size: 15px; }
  .login-panel { padding: 0 16px 32px; }
  .login-card { padding: 24px; }
  .hero { min-height: 170px; background-position: center, 62% 64%; }
  .hero-text { padding: 20px; }
  .shell { grid-template-columns: minmax(0, 1fr); background: var(--paper); }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 272px; transform: translateX(-100%); transition: transform .2s; }
  .sidebar.open { transform: none; }
  .scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, .4); z-index: 25; }
  .scrim.open { display: block; }
  .menu-btn { display: inline-grid; }
  .topbar { padding: 16px 16px 4px; }
  .topbar h1 { font-size: 21px; }
  .live span:last-child { display: none; }
  .page { padding: 10px 16px 40px; gap: 14px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { padding: 14px; }
  .kpi .value { font-size: 23px; }
  .map { height: 340px; }
  .card { padding: 16px; }
  .applications { grid-template-columns: minmax(0, 1fr); }
  .hide-sm { display: none; }
}

/* Conferência do carro Comfort. */
.check-field span { display: flex; align-items: flex-start; gap: 10px; line-height: 1.5; }
.check-field input[type="checkbox"] { width: 18px; height: 18px; flex: 0 0 18px; padding: 0; margin: 2px 0 0; accent-color: var(--gold); }

.wedding-photos{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.wedding-photos figure{margin:0}.wedding-photo{width:100%;height:150px;object-fit:cover;border-radius:12px}

.list-row{display:flex;align-items:center;gap:16px;padding:16px;border-bottom:1px solid var(--line)}
.list-row:last-child{border-bottom:0}
@media(max-width:600px){.list-row{align-items:flex-start;flex-wrap:wrap}}

.vehicle-photos{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:16px 0}
.vehicle-photo{border:1px solid var(--line,#ddd);border-radius:12px;padding:6px;background:white;cursor:pointer;color:inherit}
.vehicle-photo img{display:block;width:100%;height:120px;object-fit:contain;border-radius:8px}
.vehicle-photo span{display:block;padding:6px;font-size:13px;font-weight:600}
@media (display-mode: standalone) and (max-width: 860px) { .login-brand { min-height: 220px; } }

.payment-review-actions{position:sticky;bottom:0;background:#fff;padding:16px 0 4px;border-top:1px solid #e6e6df;z-index:1}

/* Conferência: conteúdo rolável com ações fora da área do comprovativo. */
.modal { max-height: calc(100dvh - 24px); color: var(--ink); }
.modal-inner { min-width: 0; overflow-wrap: anywhere; }
.modal-inner > * { min-width: 0; }
.field textarea { width: 100%; min-height: 74px; font: inherit; color: var(--ink); border: 1px solid var(--line); border-radius: 10px; padding: 10px; resize: vertical; }
.modal-review { width: min(940px, calc(100vw - 24px)); max-width: none; overflow: hidden; }
.review-form { display: flex; flex-direction: column; max-height: calc(100dvh - 24px); min-width: 0; }
.review-header { display: flex; gap: 12px; align-items: start; padding: 18px 20px; border-bottom: 1px solid var(--line); flex: none; }
.review-header h2 { font-size: 19px; overflow-wrap: anywhere; }
.review-amount { margin: 4px 0 0; font-size: 22px; font-weight: 750; }
.review-body { overflow: auto; min-height: 0; padding: 18px 20px; overscroll-behavior: contain; }
.review-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 22px; }
.review-grid > *, .review-fields { min-width: 0; }
.review-fields { display: grid; align-content: start; gap: 14px; }
.proof-link { display: grid; gap: 8px; text-align: center; font-size: 13px; color: var(--ink-3); }
.payment-proof { display: block; width: 100%; min-width: 0; max-height: 42dvh; height: 300px; object-fit: contain; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; }
.review-details { border-top: 1px solid var(--line); padding: 12px 0; font-size: 13px; overflow-wrap: anywhere; }
.review-details summary { cursor: pointer; font-weight: 650; }
.review-details[open] { display: grid; gap: 12px; }
.review-details p { margin: 10px 0 0; }
.review-confirm { align-items: flex-start; color: var(--ink); }
.review-confirm input { flex: none; width: 20px; height: 20px; margin: 0; accent-color: var(--ink); }
.review-footer { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; flex: none; padding: 14px 20px max(14px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: #fff; }
.review-footer .btn-primary { margin-left: auto; }
.review-photos { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.review-photo { border: 1px solid var(--line); border-radius: 10px; background: var(--paper); padding: 6px; min-width: 0; cursor: zoom-in; color: var(--ink); }
.review-photo img { display: block; width: 100%; height: 92px; object-fit: contain; }
.review-photo b { display: block; font-size: 11px; padding-top: 5px; overflow-wrap: anywhere; }
.review-photo span { font: 12px system-ui; }
.review-section-title { font-size: 14px; margin: 0 0 10px; }
.application-summary { flex-wrap: wrap; }
.application-summary .grow { flex-basis: 160px; overflow-wrap: anywhere; }
.facts b { overflow-wrap: anywhere; }
.billing-filters { margin: 10px 0; }
.billing-filters .btn { margin-left: 0; }
@media (max-width: 600px) {
  .modal-review { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); border-radius: 16px; }
  .review-form { max-height: calc(100dvh - 16px); }
  .review-header { padding: 14px; }
  .review-header h2 { font-size: 17px; }
  .review-amount { font-size: 20px; }
  .review-amount span { display: block; }
  .review-body { padding: 14px; }
  .review-grid { grid-template-columns: minmax(0,1fr); gap: 14px; }
  .payment-proof { height: 174px; max-height: 28dvh; }
  .review-footer { padding: 10px 12px max(10px, env(safe-area-inset-bottom)); gap: 6px; }
  .review-footer .btn { padding: 11px 12px; font-size: 13px; white-space: normal; min-height: 44px; }
  .review-footer .btn-primary { flex: 1; }
  .field input, .field select, .field textarea { font-size: 16px; }
  .topbar { gap: 8px; }
  .topbar h1 { font-size: 19px; }
  .topbar .grow { flex-basis: calc(100% - 100px); }
  .topbar .grow .muted { font-size: 12px; }
  .page { padding: 10px 12px 32px; }
  .card { padding: 14px; }
  .card-head { flex-wrap: wrap; }
  .billing-table { overflow: visible; margin: 12px 0; }
  .billing-table table, .billing-table tbody { display: block; }
  .billing-table thead { display: none; }
  .billing-table tr { display: grid; gap: 8px; border-bottom: 1px solid var(--line); padding: 14px 0; }
  .billing-table td { display: block; border: 0; padding: 0; overflow-wrap: anywhere; }
  .billing-table td[data-label]::before { content: attr(data-label); display: block; color: var(--muted); font-size: 11px; }
  .payment-row-action .btn { width: 100%; min-height: 44px; }
  .billing-filters { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; }
  .billing-filters .btn { padding: 10px 6px; font-size: 12px; white-space: normal; }
  .facts { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

.profile-preview { display: block; width: 100%; max-height: 60dvh; object-fit: contain; }

/* Trip feedback remains readable without horizontal scrolling on phones. */
.rating-list{display:grid;gap:14px}.trip-feedback{padding:16px;border:1px solid var(--line,#e6e3dc);border-radius:16px;min-width:0;overflow-wrap:anywhere}.feedback-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}.trip-feedback p{margin:10px 0}.feedback-note{white-space:pre-wrap;font-size:16px;line-height:1.5;color:#242421}.trip-feedback small{display:block}

/* Operation workspace: explicit priorities, readable data and quiet chrome. */
:root { --paper:#f4f5f2; --line:#e3e6df; --shadow:0 2px 8px rgba(24,35,28,.035); }
.skip-link { position:fixed;top:-80px;left:16px;background:var(--gold);padding:12px 20px;z-index:200;border-radius:8px; }
.skip-link:focus { top:12px; }
:is(button,a,input,select,textarea):focus-visible { outline:3px solid #b18b00;outline-offset:3px; }
.qa-preview { background:#fff0b3;color:#55440b;padding:7px 16px;text-align:center;font-size:12px;font-weight:700; }
.sidebar { height:100dvh;padding:22px 14px 16px; }
.side-brand { padding:0 12px 22px;letter-spacing:.03em; }
.nav { flex:1;min-height:0;display:block;overflow-y:auto;overscroll-behavior:contain;padding-right:4px;scrollbar-width:thin; }
.nav-group { margin-bottom:16px; }
.nav-label { margin:0 12px 7px;color:#a9b1a9;font-size:10px;font-weight:750;letter-spacing:.13em;text-transform:uppercase; }
.nav button { margin:3px 0;padding:10px 12px;font-size:13px;border-radius:10px; }
.nav button .i { width:17px;height:17px; }
.side-foot { flex:none;margin-top:6px;padding-top:14px; }
.topbar { padding-top:26px;padding-bottom:14px; }
.topbar h1 { font-size:25px; }
.topbar #page-sub { font-size:13px;margin-top:3px; }
.live { font-size:12px;font-variant-numeric:tabular-nums;white-space:nowrap; }
.live.partial { color:#865b08;background:#fff6de;border-color:#e8d397; }
.live.partial .live-dot { background:#b8790b; }
.hero { min-height:152px;background:linear-gradient(110deg,#1b3026,#273b2e);position:relative;align-items:center; }
.hero-text { padding:24px 28px;z-index:1;max-width:85%; }
.hero-text h2 { font-size:28px; }
.hero-text p { font-size:13px;color:#d3dfd5; }
.hero-text .eyebrow { font-size:10px;letter-spacing:.13em;text-transform:uppercase; }
.hero-text .btn-light { color:var(--ink);background:#f4f4e8;padding:7px 11px;font-size:12px; }
.hero-symbol { position:absolute;right:34px;top:50%;transform:translateY(-50%) rotate(-7deg);font-weight:900;font-size:140px;line-height:1;color:var(--gold);opacity:.15; }
.kpis { grid-template-columns:repeat(4,minmax(0,1fr));gap:14px; }
.kpi { padding:18px 20px;border:1px solid var(--line);box-shadow:none;gap:8px; }
.kpi.accent { background:#263a2c;border-color:#263a2c; }
.kpi .label { font-size:12px;line-height:1.3; }
.kpi .value { font-size:clamp(22px,2.3vw,32px);font-variant-numeric:tabular-nums;overflow-wrap:anywhere;line-height:1.15; }
.kpi .ico { width:26px;height:26px;border-radius:8px; }
.kpi .note { font-size:11px;line-height:1.4; }
.card { border:1px solid var(--line);box-shadow:var(--shadow);padding:22px; }
.card-head { margin-bottom:18px;justify-content:space-between;align-items:center; }
.card-head h2 { font-size:16px;letter-spacing:-.02em; }
.section-caption { color:var(--muted);font-size:11px; }
.overview-workspace { display:grid;grid-template-columns:1.15fr 1fr;gap:18px;align-items:stretch; }
.task-list { display:grid; }
.task-item { display:flex;gap:12px;align-items:center;padding:13px 0;border:0;border-bottom:1px solid var(--line-2);background:transparent;color:var(--ink);font:inherit;text-align:left;cursor:pointer;width:100%; }
.task-item:last-child { border-bottom:0; }
.task-item:hover { background:#f6f8f2; }
.task-item b { display:block;font-size:13px;line-height:1.4; }
.task-item small { display:block;color:var(--muted);font-size:11px;margin-top:2px; }
.task-icon { width:35px;height:35px;border-radius:10px;display:grid;place-items:center;background:var(--gold-soft);color:#805e00;flex:none; }
.task-item.red .task-icon { background:var(--red-soft);color:var(--red); }
.task-item.blue .task-icon { background:var(--blue-soft);color:var(--blue); }
.task-item.orange .task-icon { background:var(--orange-soft);color:#9a5209; }
.task-count { font-size:14px;font-weight:800;background:var(--paper);border-radius:8px;padding:3px 8px; }
.task-item>.i { width:15px;color:var(--muted); }
.task-clear { padding:25px 10px;text-align:center;display:grid;justify-items:center;gap:10px; }
.task-clear>.i { width:36px;height:36px;color:var(--green); }
.task-clear b { font-size:15px; }
.task-clear p { margin:0;color:var(--muted);font-size:13px;max-width:300px; }
.pulse-main { display:flex;align-items:center;gap:14px; }
.pulse-main>b { font-size:50px;font-weight:750;line-height:1;letter-spacing:-.06em; }
.pulse-main>div { flex:1;font-size:13px;font-weight:650; }
.pulse-main small { display:block;color:var(--muted);font-size:11px;font-weight:400;margin-top:4px; }
.pulse-stats { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;padding:22px 0 18px;margin-top:14px;border-bottom:1px solid var(--line); }
.pulse-stats b { display:block;font-size:22px;font-weight:750; }
.pulse-stats span { display:block;font-size:11px;color:var(--muted);line-height:1.45;margin-top:4px; }
.pulse-note { display:flex;gap:9px;align-items:flex-start;font-size:11px;color:var(--muted);padding:15px 0; }
.pulse-note .i { width:15px;height:15px;margin-top:2px; }
.scheduled-link { background:#f2f5ee;border:0;width:100%;border-radius:10px;padding:12px;display:flex;align-items:center;gap:10px;font:inherit;color:var(--ink);text-align:left;cursor:pointer; }
.scheduled-link span { flex:1; }
.scheduled-link b { display:block;font-size:12px; }
.scheduled-link small { display:block;font-size:10px;color:var(--muted);margin-top:3px; }
.trip-peek { background:#fff;text-align:left;font:inherit;color:var(--ink);width:100%;cursor:pointer; }
.trip-peek:hover { border-color:#b7c7b4;background:#fafbf8; }
.trip-peek .t,.trip-peek .s { display:block; }
.trip-peek .t { font-size:12px; }
.trip-peek .s { font-size:11px;margin-top:4px; }
.trip-peek .chip { font-size:10px;padding:3px 7px; }
.overview-bottom .row-item .t { font-size:12px; }
.overview-bottom .row-item .s { font-size:11px; }
.overview-bottom .avatar { width:29px;height:29px;font-size:11px; }
.ops-search { display:flex;gap:12px;flex-wrap:wrap;align-items:flex-end;padding-bottom:20px;border-bottom:1px solid var(--line); }
.ops-search .search-field { flex:1 1 260px; }
.ops-search .field { flex:0 1 175px; }
.ops-search .search-field { flex:1 1 260px; }
.ops-search input,.ops-search select { min-height:44px;font-size:13px; }
.ops-filters { margin:18px 0; }
.result-summary { display:flex;gap:8px;flex-wrap:wrap;align-items:center;justify-content:space-between;margin:18px 0;font-size:13px; }
.result-summary span { color:var(--muted);font-size:12px; }
.ops-trip-table td { font-size:12px;overflow-wrap:anywhere;max-width:240px; }
.ops-trip-table th { font-size:10px; }
.ops-trip-table td .sub { font-size:11px; }
.ops-trip-table tbody tr:hover { background:#f7f9f5; }
.search-empty { padding-bottom:26px;text-align:center; }
.search-empty .empty { padding-bottom:8px; }
.search-empty p { font-size:13px; }
.pagination { display:flex;align-items:center;justify-content:flex-end;gap:14px;border-top:1px solid var(--line);padding-top:18px;margin-top:16px;font-size:12px; }
.trip-detail { display:grid;gap:18px; }
.trip-detail-head { display:flex;align-items:center;gap:14px; }
.trip-detail-head .eyebrow { font-size:10px;color:var(--muted)!important;margin:0 0 4px; }
.trip-detail-status { display:flex;justify-content:space-between;align-items:center;gap:12px; }
.trip-detail-status>b { font-size:25px; }
.trip-detail-route { background:var(--paper);border-radius:12px;padding:14px;font-size:14px; }
.contact-grid { display:grid;grid-template-columns:1fr 1fr;gap:14px; }
.contact-grid article { min-width:0;border:1px solid var(--line);border-radius:12px;padding:14px; }
.contact-grid h3,.trip-detail>h3 { font-size:13px;margin:0 0 8px; }
.contact-grid b { font-size:14px; }
.contact-grid p { font-size:12px;margin:7px 0; }
.contact-grid .actions { margin-top:12px; }
.contact-grid .btn { white-space:normal;font-size:11px; }
.trip-timeline { list-style:none;margin:0;padding:0 0 0 10px;display:grid; }
.trip-timeline li { position:relative;display:flex;gap:12px;justify-content:space-between;border-left:2px solid var(--line);padding:0 0 18px 20px;font-size:13px; }
.trip-timeline li::before { content:"";width:8px;height:8px;position:absolute;left:-5px;top:6px;background:#36583e;border:2px solid #fff;border-radius:50%; }
.trip-timeline li:last-child { border-left-color:transparent;padding-bottom:0; }
.trip-timeline time { color:var(--muted);font-size:11px; }
.trip-reference,.detail-note { overflow-wrap:anywhere;font-size:12px; }
@media(max-width:1100px) { .overview-workspace { grid-template-columns:1fr; }.kpis { grid-template-columns:repeat(2,minmax(0,1fr)); }.topbar { flex-wrap:wrap; } }
@media(max-width:600px) {
  .topbar .grow { flex-basis:calc(100% - 58px); }.topbar>.live { order:3; }.topbar>#refresh { order:4; }.topbar>[data-install-admin] { order:5;font-size:12px; }
  .live span:last-child { display:inline; }.live { padding:6px 9px;font-size:11px; }
  .hero { min-height:145px; }.hero-text { padding:20px;max-width:100%; }.hero-text h2 { font-size:23px; }.hero-text p { font-size:12px; }.hero-symbol { display:none; }
  .kpi { padding:14px; }.kpi .value { font-size:24px; }.kpi .label { font-size:11px; }.kpi .ico { display:none; }
  .card { padding:16px; }.card-head h2 { font-size:15px; }.section-caption { font-size:10px; }.task-item small { font-size:11px; }.task-icon { width:30px;height:30px; }
  .pulse-main>b { font-size:43px; }.pulse-stats { gap:10px; }.pulse-stats b { font-size:20px; }
  .ops-search { display:grid;grid-template-columns:1fr 1fr;gap:12px; }.ops-search .search-field { grid-column:1/-1; }.ops-search>.btn { grid-column:1/-1;min-height:44px; }.ops-search input,.ops-search select { font-size:16px; }
  .ops-trip-table { overflow:visible; }.ops-trip-table table,.ops-trip-table tbody { display:block; }.ops-trip-table thead { display:none; }
  .ops-trip-table tr { display:grid;grid-template-columns:1fr auto;gap:10px;border:1px solid var(--line);border-radius:12px;padding:14px;margin-bottom:12px; }
  .ops-trip-table td { display:block;border:0;padding:0;max-width:none; }.ops-trip-table td:nth-child(2),.ops-trip-table td:nth-child(3),.ops-trip-table td:last-child { grid-column:1/-1; }
  .ops-trip-table td:nth-child(4) { grid-column:2;grid-row:1;text-align:right; }.ops-trip-table td:nth-child(5) { grid-column:1/-1; }
  .ops-trip-table td[data-label]::before { content:attr(data-label);display:block;font-size:10px;color:var(--muted);margin-bottom:3px; }.ops-trip-table .btn { width:100%;min-height:44px; }
  .contact-grid { grid-template-columns:1fr; }.trip-timeline li { flex-wrap:wrap;gap:4px; }.trip-timeline time { width:100%; }.pagination { justify-content:space-between;gap:8px; }
}
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { animation:none!important;transition:none!important;scroll-behavior:auto!important; } }

/* Finanças: cores pelo sinal e gráficos */
.kpi.money.pos { background: var(--green-soft); box-shadow: inset 4px 0 0 var(--green), var(--shadow); }
.kpi.money.pos .value { color: #1d7a43; }
.kpi.money.neg { background: var(--red-soft); box-shadow: inset 4px 0 0 var(--red), var(--shadow); }
.kpi.money.neg .value { color: #b52f25; }
.kpi.money.in .value { color: #1d7a43; }
.kpi.money.in { box-shadow: inset 4px 0 0 var(--green), var(--shadow); }
.kpi.money.out .value { color: #b52f25; }
.kpi.money.out { box-shadow: inset 4px 0 0 var(--red), var(--shadow); }
.kpi.money.big .value { font-size: 34px; }
.kpi.money.big.pos { background: var(--green); } .kpi.money.big.neg { background: var(--red); }
.kpi.money.big.pos .value, .kpi.money.big.neg .value, .kpi.money.big .label, .kpi.money.big .note { color: #fff; }
.kpi.money.big .ico { background: rgba(255,255,255,.22); color: #fff; }
.kpi.money.big.zero { background: var(--ink); } .kpi.money.big.zero .value, .kpi.money.big.zero .label, .kpi.money.big.zero .note { color: #fff; }
.charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 14px; }
.chart { margin: 0; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; }
.chart figcaption { font-weight: 700; margin-bottom: 4px; }
.chart svg { width: 100%; height: auto; display: block; }
.chart .bar.pos, .chart .bar.in, .chart .sw.pos, .chart .sw.in { fill: var(--green); background: var(--green); }
.chart .bar.neg, .chart .bar.out, .chart .sw.neg, .chart .sw.out { fill: var(--red); background: var(--red); }
.chart .grid { stroke: var(--line); stroke-width: 1; } .chart .zero { stroke: var(--ink); stroke-width: 1.2; }
.chart .axis { font-size: 10px; fill: var(--muted); }
.legend-row { display: flex; gap: 14px; margin: 0 0 6px; font-size: 12px; color: var(--muted); }
.legend-row .sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }
.hbar { display: grid; grid-template-columns: 90px 1fr auto; gap: 10px; align-items: center; margin: 10px 0; font-size: 13px; }
.hbar-track { width: 100%; height: 14px; background: var(--line-2); border-radius: 6px; display: block; }
.hbar-fill { fill: var(--green); }

/* Luz de "online": ponto discreto no canto do quadro, verde a pulsar quando há gente, cinzento quando não há */
.kpi { position: relative; }
.pulse-dot { position: absolute; top: 14px; right: 14px; width: 9px; height: 9px; min-width: 9px; border-radius: 50%; }
.pulse-dot.on { background: #22c55e; animation: pulse-dot 2s infinite; }
.pulse-dot.off { background: var(--muted-2); opacity: .5; }
.on-text { color: #1d7a43; font-weight: 700; }
.kpi.accent .on-text { color: #4ade80; }
@keyframes pulse-dot { 0% { box-shadow: 0 0 0 0 rgba(34,197,94,.55); } 70% { box-shadow: 0 0 0 7px rgba(34,197,94,0); } 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); } }
@media (prefers-reduced-motion: reduce) { .pulse-dot.on { animation: none; box-shadow: 0 0 0 3px rgba(34,197,94,.3); } }
/* Ao voltar à app, o que está no ecrã pode ser de antes: fica esbatido até chegarem os dados novos */
body.stale #page { opacity: .55; transition: opacity .25s; }
body:not(.stale) #page { transition: opacity .25s; }


/* Mapa da operação (admin21): imagens 3D da ZunGa, cor do motorista por cima, painel de detalhes */
.veh-pin { position: relative; width: 90px; height: 54px; display: grid; place-items: center; }
.vimg { position: relative; display: inline-block; isolation: isolate; }
.vimg img, .leaflet-container .vimg img { display: block; width: 100% !important; max-width: 100% !important; height: auto; user-select: none; -webkit-user-drag: none; pointer-events: none; }
.vimg.flip { transform: scaleX(-1); }
.vimg.sm { width: 54px; } .vimg.sm.narrow { width: 40px; }
.vimg.big { width: 76px; } .vimg.big.narrow { width: 58px; }
.vp-art .vimg.big { width: 176px; } .vp-art .vimg.big.narrow { width: 130px; }
.vtint { position: absolute; inset: 0; mix-blend-mode: multiply; -webkit-mask-size: contain; mask-size: contain; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-position: center; mask-position: center; pointer-events: none; }
.veh-pin .vimg { filter: drop-shadow(0 3px 3px rgba(0,0,0,.35)); }
.veh-pin.sel .vimg { filter: drop-shadow(0 0 8px rgba(47,111,237,.95)) drop-shadow(0 0 2px #fff); }
.veh-glow { position: absolute; bottom: 8px; left: 50%; width: 44px; height: 10px; margin-left: -22px; border-radius: 50%; background: rgba(0,0,0,.18); filter: blur(3px); }
.veh-dot { position: absolute; top: 9px; right: 16px; width: 10px; height: 10px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,.4); }
.veh-dot.free { background: #2f9e5b; } .veh-dot.busy { background: #f08a24; }
.vp-art { display: grid; place-items: center; background: linear-gradient(180deg, #eef3f6, #dfe8ec); border-radius: 12px; padding: 12px 8px; margin-bottom: 10px; }
.map-wrap { position: relative; }
.vehicle-panel { position: absolute; z-index: 600; top: 12px; left: 56px; width: 270px; max-height: calc(100% - 24px); overflow: auto; background: #fff; border-radius: 14px; box-shadow: 0 8px 30px rgba(20,20,15,.28); padding: 14px 16px; }
.vehicle-panel[hidden] { display: none; }
.vehicle-panel header { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 8px; }
.vp-plate { display: block; font-size: 20px; letter-spacing: .04em; }
.vp-sub { display: block; font-size: 12px; color: var(--muted); }
.vp-close { border: 0; background: var(--line-2); width: 28px; height: 28px; border-radius: 50%; font-size: 18px; line-height: 1; cursor: pointer; color: var(--ink); }
.vehicle-panel dl { margin: 0; display: grid; gap: 8px; }
.vehicle-panel dl > div { display: grid; grid-template-columns: 78px 1fr; gap: 8px; font-size: 13px; align-items: start; }
.vehicle-panel dt { color: var(--muted); }
.vehicle-panel dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.vp-swatch { width: 12px; height: 12px; vertical-align: -1px; margin-right: 6px; }
.vp-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.vp-note { font-size: 12px; margin-top: 8px; }
@media (max-width: 640px) { .vehicle-panel { left: 8px; right: 8px; top: auto; bottom: 8px; width: auto; max-height: 55%; } }
.m-economy-v2 { -webkit-mask-image: url(/assets/vehicles/display-economy-v2.webp); mask-image: url(/assets/vehicles/display-economy-v2.webp); }
.m-comfort-v2 { -webkit-mask-image: url(/assets/vehicles/display-comfort-v2.webp); mask-image: url(/assets/vehicles/display-comfort-v2.webp); }
.t-branco { background: #ffffff; } .g-branco { background: #ffffff; opacity: .55; }
.t-preto { background: #3b3e45; } .g-preto { background: #3b3e45; opacity: .55; }
.t-cinzento { background: #8d9198; } .g-cinzento { background: #8d9198; opacity: .55; }
.t-prata { background: #cfd3d8; } .g-prata { background: #cfd3d8; opacity: .55; }
.t-azul { background: #2f6fed; } .g-azul { background: #2f6fed; opacity: .55; }
.t-vermelho { background: #d9453a; } .g-vermelho { background: #d9453a; opacity: .55; }
.t-vinho { background: #8f2f4d; } .g-vinho { background: #8f2f4d; opacity: .55; }
.t-verde { background: #2f9e5b; } .g-verde { background: #2f9e5b; opacity: .55; }
.t-amarelo { background: #ffce32; } .g-amarelo { background: #ffce32; opacity: .55; }
.t-dourado { background: #c9a85a; } .g-dourado { background: #c9a85a; opacity: .55; }
.t-laranja { background: #f08a24; } .g-laranja { background: #f08a24; opacity: .55; }
.t-castanho { background: #8a6144; } .g-castanho { background: #8a6144; opacity: .55; }
.t-bege { background: #d8c3a0; } .g-bege { background: #d8c3a0; opacity: .55; }
.t-roxo { background: #7b4fc9; } .g-roxo { background: #7b4fc9; opacity: .55; }
.t-rosa { background: #e77fa6; } .g-rosa { background: #e77fa6; opacity: .55; }

.people-note { grid-column: 1 / -1; font-size: 12px; margin: 0; }

/* Marcadores do mapa (admin25): silhuetas pequenas vistas de cima */
.car-pin { width: 48px; height: 48px; display: grid; place-items: center; }
.car-pin svg { display: block; filter: drop-shadow(0 1px 2px rgba(0,0,0,.4)); }
.car-pin.sel svg { filter: drop-shadow(0 0 7px rgba(47,111,237,.95)) drop-shadow(0 0 2px #fff); }
.dot-pickup { background: #f5c518; } .dot-trip { background: #2f6fed; }
.car-pin.sel svg { filter: drop-shadow(0 0 6px #fff) drop-shadow(0 0 3px #1f1f1c); }

/* Conferir motorista: categorias em botões e validade em três escolhas (sem o seletor de datas do telemóvel) */
.cat-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0; }
.cat-chip { position: relative; }
.cat-chip input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.cat-chip span { display: inline-flex; min-width: 48px; justify-content: center; padding: 9px 14px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; font-weight: 700; }
.cat-chip input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); }
.cat-chip input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 2px; }
.cat-chip input:disabled + span { opacity: .45; }
.date-parts { display: grid; grid-template-columns: 1fr 1.6fr 1.2fr; gap: 8px; margin: 6px 0; }
.date-parts select { width: 100%; }

/* Conferir motorista numa só página: voltar, recusar e aprovar sempre à vista */
.review-header { display: flex; align-items: center; gap: 12px; }
.review-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.review-actions .btn { flex: 1 1 140px; }
.review-footer { display: grid; gap: 10px; }
.review-contact { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.review-reject { border-top: 1px solid var(--line); padding: 14px 0; display: grid; gap: 10px; }
.review-reject[hidden] { display: none; }
.reason-chip { cursor: pointer; border: 0; font: inherit; font-size: 12px; padding: 7px 12px; }
.btn-danger { background: var(--red); color: #fff; border: 0; font-weight: 700; }
.btn-danger:disabled { opacity: .45; }
.review-lightbox { position: absolute; inset: 0; z-index: 20; background: rgba(20,20,15,.92); display: grid; grid-template-rows: auto 1fr; gap: 10px; padding: 12px; }
.review-lightbox[hidden] { display: none; }
.review-lightbox img { width: 100%; height: 100%; min-height: 0; object-fit: contain; background: #111; border-radius: 10px; }

/* Mapa (admin29): carro 3D pequeno na cor do motorista, luz do estado no chão */
.veh-pin { position: relative; width: 72px; height: 44px; display: grid; place-items: center; }
.vimg.sm { width: 44px; } .vimg.sm.narrow { width: 34px; }
.vimg.big { width: 62px; } .vimg.big.narrow { width: 48px; }
.vp-art .vimg.big { width: 176px; } .vp-art .vimg.big.narrow { width: 130px; }
.veh-glow { position: absolute; bottom: 7px; left: 50%; width: 40px; height: 9px; margin-left: -20px; border-radius: 50%; filter: blur(2.5px); opacity: .9; }
.veh-pin.sel .veh-glow { width: 52px; margin-left: -26px; }
.veh-glow.sg-green { background: #22b35a; } .veh-glow.sg-orange { background: #f5c518; } .veh-glow.sg-blue { background: #2f6fed; }
.veh-pin .vimg { filter: drop-shadow(0 2px 2px rgba(0,0,0,.35)); }
.veh-pin.sel .vimg { filter: drop-shadow(0 0 7px rgba(255,255,255,.95)) drop-shadow(0 0 3px #1f1f1c); }

/* ---------- Barra lateral (admin30): ícones redondos e coloridos, e barra que encolhe ---------- */
.side-brand { align-items: center; }
.side-toggle { margin-left: auto; width: 32px; height: 32px; border-radius: 50%; border: 0; background: rgba(255,255,255,.08); color: #d9dad3; display: none; place-items: center; cursor: pointer; transition: background .15s, transform .2s; }
.side-toggle:hover { background: rgba(255,255,255,.18); color: #fff; }
.side-toggle .i { width: 16px; height: 16px; }
.brand-mark.small .bm-z { color: var(--ink); } .brand-mark .bm-rest { display: inline; }
.nav button { position: relative; gap: 12px; padding: 7px 12px 7px 8px; border-radius: 14px; }
.nav-badge { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.08); color: #cfd1c9; transition: background .15s, color .15s, transform .15s; }
.nav-badge .i { width: 17px; height: 17px; }
.nav button:hover .nav-badge { transform: scale(1.06); }
.nav button.tone-blue .nav-badge { background: rgba(96,141,255,.2); color: #8fb0ff; }
.nav button.tone-teal .nav-badge { background: rgba(45,190,190,.2); color: #6fe0dc; }
.nav button.tone-green .nav-badge { background: rgba(60,200,120,.2); color: #7ee2a6; }
.nav button.tone-red .nav-badge { background: rgba(240,90,80,.22); color: #ff8f86; }
.nav button.tone-orange .nav-badge { background: rgba(245,160,60,.22); color: #ffbd72; }
.nav button.tone-pink .nav-badge { background: rgba(240,120,170,.2); color: #ff9ec3; }
.nav button.tone-gold .nav-badge { background: rgba(255,206,50,.2); color: #ffd95e; }
.nav button.tone-purple .nav-badge { background: rgba(160,120,240,.22); color: #c0a2ff; }
.nav button.tone-slate .nav-badge { background: rgba(190,200,215,.18); color: #cfd8e6; }
.nav button[aria-current="page"] .nav-badge { background: var(--ink); color: var(--gold); }
.nav button .nav-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lo-icon { display: inline-grid; place-items: center; }
.lo-icon .i { width: 16px; height: 16px; }
#logout { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
@media (min-width: 861px) {
  .shell { --side-w: 252px; grid-template-columns: var(--side-w) minmax(0, 1fr); background: linear-gradient(90deg, var(--ink) var(--side-w), var(--paper) var(--side-w)); }
  .sidebar { transition: padding .2s; }
  .side-toggle { display: inline-grid; }
  body.nav-collapsed .shell { --side-w: 84px; }
  body.nav-collapsed .sidebar { padding-left: 12px; padding-right: 12px; }
  body.nav-collapsed .side-brand { flex-direction: column; gap: 10px; padding: 0 0 16px; }
  body.nav-collapsed .side-toggle { margin: 0; transform: rotate(180deg); }
  body.nav-collapsed .brand-mark .bm-rest, body.nav-collapsed .brand-name, body.nav-collapsed .nav-label, body.nav-collapsed .nav-text { display: none; }
  body.nav-collapsed .brand-mark.small { padding: 4px 12px; font-size: 20px; }
  body.nav-collapsed .nav-group { margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px solid rgba(255,255,255,.08); }
  body.nav-collapsed .nav-group:last-child { border-bottom: 0; }
  body.nav-collapsed .nav button { justify-content: center; padding: 5px; }
  body.nav-collapsed .nav button .count { position: absolute; top: 0; right: 2px; margin: 0; min-width: 18px; }
  body.nav-collapsed .side-foot .me > div:last-child { display: none; }
  body.nav-collapsed .side-foot .me { justify-content: center; }
  body.nav-collapsed #logout .lo-text { display: none; }
  body.nav-collapsed #logout { width: 44px; height: 44px; padding: 0; border-radius: 50%; margin: 8px auto 0; }
}
/* Equipa: cartões em vez de tabela, para se ler bem no telemóvel */
.member-grid { display: grid; gap: 12px; }
.member-card { display: flex; gap: 14px; align-items: flex-start; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.member-card.off { opacity: .6; }
.avatar.big { width: 46px; height: 46px; font-size: 16px; flex: none; }
.member-card .sub { display: block; font-size: 12px; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.access { border: 0; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; min-width: 0; }
.access legend { font-weight: 700; font-size: 13px; margin-bottom: 6px; padding: 0; }
.access[hidden] { display: none; }
.access-card, .perm-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 14px; cursor: pointer; background: #fff; }
.access-card:has(input:checked) { border-color: var(--ink); background: var(--gold-soft); }
.perm-row:has(input:checked) { border-color: var(--green); background: var(--green-soft); }
.access-card input, .perm-row input { margin-top: 3px; width: 18px; height: 18px; flex: none; accent-color: var(--ink); }
.access-card b, .perm-row b { display: block; }
.access-card small, .perm-row small { display: block; color: var(--muted); font-size: 12px; font-weight: 400; }
