@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg: #F4F5F7;
  --bg2: #e8eaed;
  --surface: #ffffff;
  --surface2: #f9fafb;
  --border: #E5E7EB;
  --text: #111827;
  --muted: #6b7280;
  --accent: #2563eb;
  --accent-dim: #eff6ff;
  --ok: #16a34a;
  --warn: #d97706;
  --danger: #dc2626;
  --charge: #2563eb;
  --font: "Inter", system-ui, sans-serif;
  --display: "Inter", system-ui, sans-serif;
  --mono: "Inter", system-ui, sans-serif;
  --shadow: 0 1px 3px rgba(0,0,0,0.07), 0 4px 12px rgba(0,0,0,0.05);
  --radius: 12px;
  --sidebar-w: 232px;
  --content-pad-x: 28px;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; overflow-x: hidden; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: #1d4ed8; }
img, svg, iframe { max-width: 100%; }

/* ── Sidebar layout ── */
.rq-app {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  width: 100%;
  max-width: 2600px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
}

.rq-sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  /* Truckly: sidebar vloeit over in pagina-achtergrond, geen witte box */
  background: var(--bg);
  border-right: none;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  z-index: 30;
  overflow-y: auto;
}

.rq-sidebar-logo {
  height: 56px;
  display: flex;
  align-items: center;
  padding: 0 1rem;
  border-bottom: none;
  flex-shrink: 0;
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.04em;
  color: var(--text);
  text-decoration: none !important;
}
.sidebar-brand-mark { flex-shrink: 0; }
.sidebar-brand:hover { color: var(--accent); text-decoration: none !important; }

.rq-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0.75rem 0.7rem;
  flex: 1;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 0.9rem;
  border-radius: 10px;
  color: #6B7280;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.12s, color 0.12s;
  white-space: nowrap;
}
.sidebar-link svg { flex-shrink: 0; opacity: 0.75; }
.sidebar-link:hover { background: rgba(0,0,0,0.05); color: var(--text); text-decoration: none; }
.sidebar-link:hover svg { opacity: 1; }
.sidebar-link.is-live {
  color: #0284C7;
}
.sidebar-link.is-live svg { opacity: 1; color: #0EA5E9; }
.sidebar-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #0EA5E9;
  margin-left: auto;
  flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(14,165,233,0.22);
  animation: sidebar-live-pulse 1.6s ease-in-out infinite;
}
@keyframes sidebar-live-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.85); }
}
.sidebar-link.is-active {
  background: rgba(37,99,235,0.1);
  color: var(--accent);
  font-weight: 600;
}
.sidebar-link.is-active svg { opacity: 1; }
.sidebar-link--cta {
  margin-top: 0.4rem;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}
.sidebar-link--cta:hover { background: #1d4ed8; color: #fff; }
.sidebar-link--cta.is-active { background: #1d4ed8; color: #fff; }

.rq-sidebar-foot { display: none; }
.sidebar-link--logout { color: var(--muted); }
.sidebar-link--logout:hover { color: var(--danger); background: rgba(220,38,38,0.06); }

.rq-main {
  flex: 1;
  margin-left: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-width: 0;
}

.rq-mainbar {
  background: var(--bg);
  border-bottom: none;
  padding: 0 var(--content-pad-x);
  height: 56px;
  display: flex;
  align-items: center;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 30;
}
.rq-mainbar-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: #374151;
}
.rq-mainbar-end { display: flex; align-items: center; gap: 8px; margin-left: auto; }

/* ── Topbar icon buttons ── */
.rq-iconbtn,
.rq-topbtn {
  width: 38px; height: 38px;
  border-radius: 11px;
  background: #fff;
  border: 1px solid #E5E7EB;
  display: flex; align-items: center; justify-content: center;
  color: #4B5563;
  cursor: pointer;
  transition: background .12s, color .12s, border-color .12s, box-shadow .12s;
  position: relative;
  flex-shrink: 0;
}
.rq-iconbtn:hover,
.rq-topbtn:hover {
  background: #F9FAFB;
  color: #111827;
  border-color: #D1D5DB;
}

.rq-bell .rq-bell-dot {
  position: absolute; top: 8px; right: 8px;
  width: 7px; height: 7px; border-radius: 50%;
  background: #2563EB; border: 2px solid #fff;
}

/* ── Profile chip ── */
.rq-profile-wrap { position: relative; }
.rq-profile-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 3px 8px 3px 3px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #E5E7EB;
  cursor: pointer;
  transition: border-color .12s, box-shadow .12s, background .12s;
}
.rq-profile-btn:hover,
.rq-profile-btn.is-open {
  border-color: #BFDBFE;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.10);
  background: #fff;
}
.rq-avatar-circle {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(145deg, #3B82F6, #2563EB);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 11px; font-weight: 700;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}
.rq-profile-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.15;
  min-width: 0;
  max-width: 120px;
}
.rq-profile-name {
  font-size: 12.5px;
  font-weight: 700;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 110px;
}
.rq-profile-hint {
  font-size: 10px;
  font-weight: 500;
  color: #9CA3AF;
}
.rq-profile-chevron {
  color: #9CA3AF;
  flex-shrink: 0;
  transition: transform .15s;
}
.rq-profile-btn.is-open .rq-profile-chevron { transform: rotate(180deg); }

/* Legacy avatar alias */
.rq-avatar-btn {
  background: none; border: none; cursor: pointer; padding: 0;
  display: flex; align-items: center;
}

/* ── Dropdown wrapper ── */
.rq-dropdown-wrap { position: relative; }

.rq-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 210px;
  background: #fff;
  border: 1px solid #E5E7EB;
  border-radius: 14px;
  box-shadow: 0 8px 28px rgba(15,23,42,0.12);
  z-index: 200;
  overflow: hidden;
  padding: 6px;
}
.rq-dropdown.is-open { display: block; }

.rq-dropdown-header {
  padding: 10px 12px 8px;
  border-bottom: 1px solid #F3F4F6;
  margin-bottom: 4px;
}
.rq-dropdown-header strong { display: block; font-size: 13.5px; color: #111827; font-weight: 700; }
.rq-dropdown-header span { display: block; font-size: 11px; color: #9CA3AF; font-weight: 500; margin-top: 2px; }

.rq-dropdown-item {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 12px;
  font-size: 13px; font-weight: 500; color: #374151;
  border-radius: 9px;
  text-decoration: none !important;
  transition: background .1s;
  cursor: pointer;
}
.rq-dropdown-item:hover { background: #F3F4F6; color: #111827; text-decoration: none !important; }
.rq-dropdown-item--danger { color: #DC2626; }
.rq-dropdown-item--danger:hover { background: rgba(220,38,38,0.07); color: #DC2626; }

.rq-dropdown-sep { height: 1px; background: #F3F4F6; margin: 4px 0; }

.rq-hamburger {
  display: none;
  width: 38px; height: 38px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: #fff;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
  transition: background .12s, border-color .12s;
}
.rq-hamburger:hover { background: #F9FAFB; }
.rq-hamburger span {
  display: block;
  width: 15px;
  height: 1.6px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .2s ease, opacity .15s ease;
  transform-origin: center;
}
/* Hamburger → X when open */
.rq-hamburger.is-open,
.rq-hamburger[aria-expanded="true"] {
  border-color: #BFDBFE;
  background: #EFF6FF;
}
.rq-hamburger.is-open span:nth-child(1),
.rq-hamburger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6.6px) rotate(45deg);
}
.rq-hamburger.is-open span:nth-child(2),
.rq-hamburger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.rq-hamburger.is-open span:nth-child(3),
.rq-hamburger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6.6px) rotate(-45deg);
}

.rq-content {
  padding: 0;
  flex: 1;
  min-width: 0;
}

/* Sidebar overlay for mobile */
.rq-sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 39;
  background: rgba(0,0,0,0.35);
}
.rq-sidebar-overlay.is-visible { display: block; }

/* Mobile dock */
.rq-dock { display: none; }
.dock-link {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--muted);
  background: none;
  border: 0;
  font: inherit;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.4rem 0.2rem;
  border-radius: 10px;
  text-decoration: none;
}
.dock-link svg { width: 20px; height: 20px; }
.dock-link.is-active { color: var(--accent); background: var(--accent-dim); }
.dock-link:hover { color: var(--text); text-decoration: none; }
.dock-link--new {
  flex: 0 0 48px;
  position: relative;
  top: 0;
  width: 48px;
  height: 48px;
  padding: 0;
  border-radius: 999px;
  background: #2563EB !important;
  color: #fff !important;
  box-shadow: 0 6px 18px rgba(37,99,235,0.32);
  border: 3px solid #fff;
  align-self: center;
}
.dock-plus {
  font-size: 26px;
  line-height: 1;
  font-weight: 500;
  transform: none;
}
.dock-link--new span { display: block; }

.brand-word {
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--text);
}
.brand-word--md { font-size: 1.8rem; line-height: 1; }
.brand-word--lg { font-size: 2.4rem; line-height: 1; }
.ritq-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 0.7rem; color: var(--accent); }
.ritq-tagline { margin: 0; color: var(--muted); font-size: 0.95rem; }

.content {
  padding: 1.25rem 1.5rem 5.5rem;
  display: block;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
}
.content.single { max-width: 1080px; }
.content.stage {
  max-width: none;
  padding: 0;
  min-height: 100vh;
}
body.page-trips .content.single,
body.page-audi .content.single {
  max-width: 1180px;
}
/* rq-content is full-width by default now */
.rq-content .content { max-width: none; padding: 0; }

h1 {
  margin: 0 0 0.3rem;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  letter-spacing: -0.045em;
  font-weight: 700;
}
.lead { color: var(--muted); margin: 0 0 1.1rem; }
.card, .dash-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.card { padding: 1.2rem 1.3rem; }
.card-title {
  margin: 0 0 0.7rem;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.panel-title {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 0.85rem;
}
.panel-title h2 { margin: 0; font-size: 1.05rem; }

label {
  display: block; color: var(--muted); font-size: 0.72rem; margin: 0.75rem 0 0.3rem;
  font-family: var(--mono); letter-spacing: 0.12em; text-transform: uppercase;
}
input, select, textarea {
  width: 100%; padding: 0.78rem 0.9rem; border-radius: 12px;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text); font: inherit;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.85rem; }
.form-grid .span2 { grid-column: span 2; }
.form-grid label { display: grid; gap: 0.35rem; }
.btn, button[type=submit] {
  display: inline-block; margin-top: 1rem; padding: 0.85rem 1.4rem;
  border: 0; border-radius: 999px; background: var(--accent); color: #fff;
  font-weight: 600; cursor: pointer; font: inherit; letter-spacing: -0.01em;
}
.btn:hover, button[type=submit]:hover { background: #1d4ed8; }
.btn.secondary, button.secondary, .btn.ghost {
  background: transparent; color: var(--text); border: 1px solid var(--border);
}
.btn.secondary:hover, button.secondary:hover { background: var(--bg2); }
.btn.primary { background: var(--accent); color: #fff; }
.btn.danger-btn, button.danger-btn {
  background: rgba(220,38,38,0.08); color: var(--danger);
  border: 1px solid rgba(220,38,38,0.25);
}
.error, .ok {
  padding: 0.75rem 1rem; border-radius: 12px; margin-bottom: 1rem; font-size: 0.92rem;
}
.error { background: rgba(220,38,38,0.08); border: 1px solid rgba(220,38,38,0.25); color: var(--danger); }
.ok { background: rgba(22,163,74,0.08); border: 1px solid rgba(22,163,74,0.25); color: var(--ok); }

/* Auth / login pages — compact centered card */
.auth-shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 28px 16px;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(37, 99, 235, 0.08), transparent 55%),
    var(--bg);
}
.auth-card {
  width: 100%;
  max-width: 380px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04), 0 12px 32px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}
.auth-card-visual {
  height: 112px;
  background: #0f1117;
  overflow: hidden;
}
.auth-card-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
  display: block;
}
.auth-form {
  padding: 1.35rem 1.4rem 1.5rem;
}
.page-auth .ritq-brand {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  margin: 0;
}
.page-auth .ritq-wordmark {
  height: 34px;
  width: auto;
  max-width: 100%;
}
.page-auth .ritq-tagline {
  margin: 0;
  font-size: 0.9rem;
}
.sidebar-brand-mark {
  flex-shrink: 0;
  display: inline-flex;
  color: #28C8FB;
}
.sidebar-brand-mark .ritq-mark {
  display: block;
}
.sidebar-brand:hover .sidebar-brand-mark {
  color: #28C8FB;
}
.auth-line {
  margin: 0.45rem 0 1rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.4;
}
.auth-form label:first-of-type { margin-top: 0.15rem; }
.auth-form input {
  padding: 0.65rem 0.8rem;
  border-radius: 10px;
  font-size: 0.95rem;
}
.auth-form button[type=submit] {
  width: 100%;
  margin-top: 1.1rem;
  padding: 0.72rem 1.1rem;
  border-radius: 10px;
  font-size: 0.95rem;
}
.auth-foot {
  margin: 1rem 0 0;
  text-align: center;
  font-size: 0.88rem;
  color: var(--muted);
}
.muted { color: var(--muted); }
.foot { display: none; }

/* Legacy class names kept so old markup / caches don't break layout */
.auth-photo {
  min-height: auto;
  display: block;
  background: transparent;
}
.auth-photo-img { display: none; }
.auth-glass {
  position: static;
  width: 100%;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
}

.stat strong { display: block; font-size: 1.35rem; color: var(--accent); }
.stat span { color: var(--muted); font-size: 0.82rem; }
.stat.cost strong { color: var(--danger); }
.bars { display: grid; gap: 0.55rem; margin-top: 0.85rem; }
.bar {
  display: grid; grid-template-columns: 90px 1fr 48px; gap: 0.5rem; align-items: center;
  font-size: 0.85rem; color: var(--muted);
}
.bar i { height: 8px; border-radius: 99px; background: var(--bg2); overflow: hidden; display: block; }
.bar i em { display: block; height: 100%; background: var(--accent); border-radius: 99px; }

.crumb { color: var(--muted); font-size: 0.85rem; margin: 0 0 0.75rem; }
.dash-muted { color: var(--muted); }
.dash-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 1rem; margin-bottom: 1rem;
}
.dash-icon-btn {
  width: 38px; height: 38px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--surface); color: var(--muted);
  display: grid; place-items: center; text-decoration: none;
}

.history-item {
  display: flex; gap: 0.85rem; width: 100%;
  padding: 0.95rem 0.2rem;
  border: 0; border-bottom: 1px solid var(--border);
  background: transparent; text-align: left; cursor: pointer;
  font: inherit; color: inherit;
}
.history-item:hover { background: var(--bg2); }
a.history-item { text-decoration: none; color: inherit; }
.history-icon {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  background: var(--accent-dim); color: var(--charge);
  display: grid; place-items: center; margin-top: 0.15rem;
}
.history-icon.expense-icon { color: var(--danger); }
.history-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(150px, 220px); gap: 1rem; }
.history-type { font-weight: 650; }
.history-date, .history-stat.muted { color: var(--muted); }
.history-cost { margin-top: 0.45rem; font-size: 1.25rem; font-weight: 650; }
.history-right { text-align: right; }
.history-stat { display: flex; align-items: center; justify-content: flex-end; gap: 0.35rem; margin-bottom: 0.3rem; }
.history-month { margin: 1.2rem 0 0.4rem; color: var(--muted); font-size: 0.82rem; text-transform: capitalize; }

.side-card { padding: 1.1rem 1.15rem; margin-bottom: 1rem; }
.side-cta {
  display: block; text-align: center; padding: 0.7rem 1rem;
  border-radius: 999px; border: 1px solid var(--border); color: var(--text);
  font-weight: 600; text-decoration: none; margin-top: 0.8rem;
}
.side-links { display: grid; gap: 0.45rem; }
.side-links a {
  display: flex; align-items: center; gap: 0.65rem;
  padding: 0.65rem 0.75rem; border-radius: 12px;
  background: var(--surface2); border: 1px solid var(--border);
  color: var(--text); text-decoration: none;
}

body.modal-open { overflow: hidden; }
.charge-modal {
  position: fixed; inset: 0; z-index: 1050;
  display: grid; place-items: center; padding: 1rem;
}
.charge-modal[hidden] { display: none !important; }
.modal-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.4); }
.modal-panel {
  position: relative; z-index: 1; width: min(680px, 100%);
  max-height: calc(100vh - 2rem); overflow: auto;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; box-shadow: var(--shadow);
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.1rem; border-bottom: 1px solid var(--border);
}
.modal-head-left { display: flex; align-items: center; gap: 0.65rem; }
.modal-head-left h2 { margin: 0; font-size: 1.15rem; }
.modal-head-icon {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--accent-dim); color: var(--charge);
  display: grid; place-items: center;
}
.modal-head-actions { display: flex; align-items: center; gap: 0.35rem; }
.modal-action {
  width: 36px; height: 36px; border-radius: 50%; border: 0;
  background: var(--surface2); color: var(--text);
  display: grid; place-items: center; cursor: pointer; text-decoration: none;
}
.modal-action.danger { color: var(--danger); }
.modal-row {
  display: grid; grid-template-columns: 36px 1fr 1fr; gap: 0.75rem;
  padding: 0.85rem 1.1rem; border-bottom: 1px solid var(--border);
}
.modal-row.location-row { grid-template-columns: 36px 1fr; }
.modal-label { display: block; color: var(--muted); font-size: 0.78rem; }
.modal-map {
  width: calc(100% - 2.2rem); height: 180px; margin: 0.85rem 1.1rem;
  border: 1px solid var(--border); border-radius: 12px;
}
.modal-foot {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1rem;
  padding: 0.95rem 1.1rem; background: var(--surface2);
}

.op-badge {
  display: inline-block; font-size: 0.72rem; font-weight: 700;
  padding: 0.15rem 0.45rem; border-radius: 5px; margin-left: 0.35rem;
}
.stats-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
}
.chip-row { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.6rem 0 1rem; }
.chip {
  display: inline-block; padding: 0.35rem 0.75rem; border-radius: 999px;
  border: 1px solid var(--border); color: var(--muted); text-decoration: none;
  font-size: 0.88rem;
}
.chip.active, .chip:hover { background: var(--accent); color: #fff; border-color: var(--accent); text-decoration: none; }
.fab-menu { display: grid; gap: 0.55rem; margin-top: 0.5rem; }
.fab-menu a {
  display: flex; align-items: center; gap: 0.85rem;
  padding: 1rem 1.05rem; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text); text-decoration: none;
}
.fab-menu a:hover { border-color: var(--accent); }
.row-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; }
.map-embed {
  height: 180px; border-radius: 12px; overflow: hidden; border: 1px solid var(--border);
  margin-top: 0.75rem;
}
.map-embed iframe { width: 100%; height: 100%; border: 0; }
.table-wrap, table { width: 100%; overflow-x: auto; }
th, td { text-align: left; padding: 0.6rem 0.4rem; border-bottom: 1px solid var(--border); font-size: 0.92rem; }
th { color: var(--muted); font-weight: 500; }

.trip-card {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.95rem 1.05rem; margin-bottom: 0.55rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  color: inherit; text-decoration: none;
}
.kicker {
  letter-spacing: 0.14em; font-size: 0.68rem; color: var(--muted);
  margin: 0 0 0.75rem; font-weight: 600; text-transform: uppercase;
  font-family: var(--mono);
}
.traffic-bar {
  display: flex; height: 10px; border-radius: 99px; overflow: hidden;
  background: var(--bg2); margin: 0.5rem 0 0.75rem;
}
.score-head { display: flex; gap: 1rem; align-items: center; }
.score-ring {
  --p: 80; width: 88px; height: 88px; flex-shrink: 0; border-radius: 50%;
  background: conic-gradient(var(--ok) calc(var(--p) * 0.38 * 1%), var(--warn) calc(var(--p) * 0.7 * 1%), var(--accent) calc(var(--p) * 1%), var(--bg2) 0);
  display: grid; place-items: center;
}
.score-ring strong {
  width: 68px; height: 68px; border-radius: 50%;
  background: var(--surface); display: grid; place-items: center; font-size: 1.45rem;
}

/* ── Dashboard hero + tiles ── */
.dash-hero {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.6rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
  box-shadow: var(--shadow);
}
.dash-hero-left { flex: 1; min-width: 200px; }
.dash-hero-left h1 { font-size: 1.35rem; margin: 0 0 0.35rem; }
.dash-hero-plate { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin-bottom: 0.5rem; }
.dash-hero-right {
  text-align: center;
  min-width: 180px;
}
.dash-range-num {
  font-size: clamp(2.8rem, 6vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.06em;
  line-height: 1;
  color: var(--text);
}
.dash-range-num small {
  font-size: 0.45em;
  font-weight: 500;
  color: var(--muted);
  margin-left: 0.1em;
  letter-spacing: 0;
}
.dash-range-label {
  font-size: 0.84rem;
  color: var(--muted);
  margin-top: 0.3rem;
}
.dash-range-label.is-wltp { color: var(--warn); }

.soc-bar-wrap { margin-top: 0.7rem; }
.soc-bar {
  height: 8px;
  width: min(220px, 100%);
  border-radius: 99px;
  background: var(--bg2);
  overflow: hidden;
  display: block;
}
.soc-bar i {
  display: block;
  height: 100%;
  border-radius: 99px;
}
.soc-bar.soc-ok i { background: var(--ok); }
.soc-bar.soc-warn i { background: var(--warn); }
.soc-bar.soc-low i { background: var(--danger); }
.soc-bar-cap {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin-top: 0.35rem;
}

/* quick actions */
.dash-actions {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 1.1rem;
  flex-wrap: wrap;
}
.dash-actions a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}
.dash-actions a:hover { border-color: var(--accent); color: var(--accent); }
.dash-actions a.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.dash-actions a.primary:hover { background: #1d4ed8; }

.dash-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0 0 1rem;
}
.dash-kpi {
  padding: 1rem 1.1rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  cursor: default;
  transition: border-color 0.15s;
}
.dash-kpi:hover { border-color: var(--accent); }
.dash-kpi span {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}
.dash-kpi strong {
  display: block;
  margin: 0.35rem 0 0.15rem;
  font-size: 1.25rem;
  letter-spacing: -0.04em;
  color: var(--text);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.dash-kpi em {
  font-style: normal;
  color: var(--muted);
  font-size: 0.78rem;
}
.dash-kpi.is-warn strong { color: var(--danger); }
.dash-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.dash-panel {
  display: block;
  padding: 1.15rem 1.2rem 1.1rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  color: inherit;
  text-decoration: none;
  min-height: 110px;
  box-shadow: var(--shadow);
  transition: border-color 0.15s;
}
.dash-panel:hover { border-color: var(--accent); color: inherit; }
.dash-panel-kicker {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 0.4rem;
}
.dash-panel strong {
  display: block;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}
.dash-panel em {
  display: block;
  margin-top: 0.35rem;
  font-style: normal;
  color: var(--muted);
  font-size: 0.86rem;
}

/* overview-style kept for mijn-audi */
.overview-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}
.overview-sub { margin: 0.2rem 0 0; color: var(--muted); }
.overview-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: flex-end; }
.overview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.7rem;
}
.kenteken {
  display: inline-flex;
  align-items: stretch;
  border-radius: 5px;
  overflow: hidden;
  border: 1px solid #ccc;
}
.kenteken-eu {
  background: #003399;
  color: #fff;
  font-size: 0.58rem;
  font-weight: 700;
  padding: 0.35rem 0.28rem;
  display: grid;
  place-items: end center;
  letter-spacing: 0.04em;
}
.kenteken-num {
  background: #f7d117;
  color: #111;
  font-weight: 800;
  letter-spacing: 0.12em;
  padding: 0.28rem 0.65rem 0.22rem;
  font-size: 1.02rem;
}
.hud-chip {
  display: inline-flex; align-items: center;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.78rem;
  background: var(--surface2);
}
.hud-chip.is-ok { color: var(--ok); border-color: rgba(22,163,74,0.35); background: rgba(22,163,74,0.06); }
.hud-chip.is-bad { color: var(--danger); border-color: rgba(220,38,38,0.35); background: rgba(220,38,38,0.06); }

.hud-tile span { display: block; font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); font-weight: 600; }

.hud-tile {
  display: block;
  padding: 0.95rem 1rem 0.9rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  color: inherit;
  text-decoration: none;
  min-height: 108px;
  box-shadow: var(--shadow);
}
.hud-tile:hover { border-color: var(--accent); color: inherit; }
.hud-tile strong {
  display: block;
  margin: 0.35rem 0 0.15rem;
  font-size: 1.35rem;
  letter-spacing: -0.04em;
  color: var(--text);
}
.hud-tile em {
  font-style: normal;
  color: var(--muted);
  font-size: 0.82rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* page banner — thin strip */
.page-banner {
  background: #f0f2f5;
  border-radius: 14px;
  overflow: hidden;
  margin: 0 0 1.25rem;
  height: 180px;
  display: block;
  border: 1px solid var(--border);
}
.page-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.month-heading {
  margin: 1.45rem 0 0.7rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.month-heading:first-of-type { margin-top: 0.4rem; }

.log-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem 1.3rem 1.05rem;
  margin-bottom: 0.75rem;
  box-shadow: var(--shadow);
}
.log-main {
  display: grid;
  grid-template-columns: minmax(140px, 1.15fr) minmax(180px, 1.35fr) auto;
  gap: 1rem 1.4rem;
  align-items: start;
}
.log-card--split .log-main { grid-template-columns: minmax(0, 1fr) auto; }
.log-place { min-width: 0; }
.log-place strong { display: block; font-size: 1.05rem; font-weight: 600; letter-spacing: -0.02em; }
.log-badges { margin-bottom: 0.35rem; }
.log-badges .op-badge { margin-left: 0; }
.log-cat { font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-bottom: 0.2rem; }
.log-subtext { color: var(--muted); font-size: 0.86rem; margin-top: 0.18rem; }
.log-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 0.45rem 1.1rem; }
.log-facts span { display: block; font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.log-facts strong { display: block; font-size: 0.92rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.log-nums { text-align: right; justify-self: end; min-width: 7.6rem; }
.log-eur { font-size: 1.4rem; font-weight: 700; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; color: var(--text); line-height: 1.15; }
.log-kwh { margin-top: 0.28rem; color: var(--muted); font-size: 0.88rem; font-variant-numeric: tabular-nums; }
.log-actions {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.85rem;
  margin-top: 0.95rem; padding-top: 0.8rem; border-top: 1px solid var(--border);
}
.log-actions a { color: var(--accent); font-size: 0.85rem; font-weight: 500; }
.log-actions form { margin: 0; display: inline; }
.log-actions button[type=submit],
button.link-danger {
  margin: 0; padding: 0; border: 0; border-radius: 0; background: none;
  color: var(--danger); font: inherit; font-size: 0.85rem; font-weight: 500; cursor: pointer;
}
.log-map { margin: 0; }
.log-map summary { cursor: pointer; color: var(--accent); font-size: 0.85rem; font-weight: 500; list-style: none; }
.log-map summary::-webkit-details-marker { display: none; }
.log-map .map-slot { margin-top: 0.7rem; height: 180px; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); background: #f0f2f5; }
.log-map iframe { width: 100%; height: 100%; border: 0; }

.pager {
  display: flex; align-items: center; justify-content: center; gap: 1rem;
  margin: 1.4rem 0 0.4rem; color: var(--muted); font-size: 0.9rem;
}

.trip-row {
  display: grid;
  grid-template-columns: 4.4rem minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  width: 100%;
  padding: 1rem 1.15rem;
  margin-bottom: 0.55rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  color: inherit;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: border-color 0.15s;
}
.trip-row:hover { border-color: var(--accent); color: inherit; }
.trip-when strong { display: block; font-variant-numeric: tabular-nums; font-size: 1.05rem; }
.trip-when span { color: var(--muted); font-size: 0.78rem; }
.trip-body strong { display: block; font-weight: 600; letter-spacing: -0.02em; }
.trip-body span { color: var(--muted); font-size: 0.84rem; }
.trip-dist { font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -0.03em; white-space: nowrap; color: var(--text); }

/* trips stats bar */
.trips-stats {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: 0.85rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 1.1rem;
  box-shadow: var(--shadow);
}
.trips-stats-item { font-size: 0.88rem; }
.trips-stats-item strong { font-weight: 700; color: var(--text); }
.trips-stats-item span { color: var(--muted); }

/* ══════════════════════════════════════════
   DASHBOARD — Truckly exact replica
   All .db-* classes. Zero legacy overrides.
   ══════════════════════════════════════════ */

/* ── Breadcrumb topbar ── */
.db-topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; margin-bottom: 1.5rem;
}
.db-breadcrumb {
  display: flex; align-items: center; gap: 0.35rem;
  font-size: 0.84rem; color: #9CA3AF;
}
.db-bc-sep { color: #D1D5DB; font-size: 0.9rem; }
.db-bc-active { color: #111827; font-weight: 600; }
.db-topbar-end { display: flex; align-items: center; gap: 0.65rem; }
.db-btn-report {
  display: inline-flex; align-items: center; gap: 0.35rem;
  background: #2563EB; color: #fff;
  padding: 0.45rem 1.15rem; border-radius: 8px;
  font-size: 0.85rem; font-weight: 600;
  text-decoration: none; white-space: nowrap;
  box-shadow: 0 1px 4px rgba(37,99,235,0.25);
}
.db-btn-report:hover { background: #1D4ED8; color: #fff; }
.db-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: #2563EB; display: grid; place-items: center;
  color: #fff; font-size: 0.72rem; font-weight: 700;
  text-decoration: none; flex-shrink: 0;
}
.db-avatar:hover { background: #1D4ED8; }

/* ── Outer 2-col grid 68/30 ── */
.db-main-grid {
  display: grid;
  grid-template-columns: 68fr 30fr;
  gap: 24px;
  margin-bottom: 24px;
  align-items: start;
  max-width: 1400px;
}

/* ══════════ HERO CARD ══════════ */
.db-hero-card {
  background: #fff;
  border-radius: 16px;
  border: 1px solid #E5E7EB;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05), 0 4px 16px rgba(0,0,0,0.04);
  padding: 24px;
  overflow: hidden;
}

/* Inner hero grid: left 58% / right 40% */
.db-hero-inner {
  display: grid;
  grid-template-columns: 58fr 40fr;
  gap: 20px;
  align-items: start;
}

/* ── Hero left: gauges + car + tyre callouts ── */
.db-hero-left {}

.db-hero-head {
  display: flex; align-items: flex-start;
  justify-content: space-between; gap: 1rem;
  margin-bottom: 16px;
}
.db-hero-title {
  margin: 0 0 4px;
  font-size: 1.25rem; font-weight: 700;
  letter-spacing: -0.04em; color: #111827;
}
.db-vin {
  display: inline-block;
  font-size: 0.7rem; letter-spacing: 0.08em;
  color: #9CA3AF; background: #F9FAFB;
  border: 1px solid #E5E7EB; border-radius: 4px;
  padding: 2px 7px; font-family: 'IBM Plex Mono', monospace;
}

/* 3 gauges */
.db-gauges {
  display: flex;
  justify-content: space-around;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 16px;
}
.db-gauge-item {
  display: flex; flex-direction: column;
  align-items: center; flex: 1; gap: 2px;
}
.db-gauge-svg { display: block; overflow: visible; }

/* Car image — NO black background */
.db-car-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  background: transparent;
  min-height: 180px;
  padding: 0 12px;
}
.db-car-img {
  display: block;
  width: 100%;
  max-width: 420px;
  max-height: 220px;
  object-fit: contain;
  mix-blend-mode: multiply;
  background: transparent;
}

/* Tyre callouts — 4 corner labels with connecting line */
.db-tyre {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 5px;
  pointer-events: none;
  font-size: 0;
}
.db-tyre-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}
.db-tyre-val {
  font-size: 0.75rem;
  font-weight: 700;
  color: #111827;
  background: #fff;
  border: 1px solid #E5E7EB;
  border-radius: 5px;
  padding: 2px 7px;
  line-height: 1.3;
  box-shadow: 0 1px 3px rgba(0,0,0,0.07);
  white-space: nowrap;
}
.db-tyre-lbl {
  font-size: 0.65rem;
  color: #9CA3AF;
  font-weight: 500;
  text-align: center;
}
.db-tyre-dot {
  width: 7px; height: 7px;
  background: #2563EB;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.18);
}
/* positions relative to .db-car-wrap */
.db-tyre--fl { bottom: 18%; left: 5%; flex-direction: row; }
.db-tyre--fr { bottom: 18%; right: 5%; flex-direction: row-reverse; }
.db-tyre--rl { bottom: 2%;  left: 5%; flex-direction: row; }
.db-tyre--rr { bottom: 2%;  right: 5%; flex-direction: row-reverse; }

/* ── Hero right: mini-map + specs ── */
.db-hero-right {}

.db-mini-map {
  width: 100%;
  height: 180px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #E5E7EB;
  background: #F3F4F6;
  margin-bottom: 16px;
  position: relative;
}
.db-mini-map iframe,
.db-mini-map #db-leaflet-map {
  width: 100%; height: 100%; border: 0; display: block;
}

.db-specs-list {
  display: flex; flex-direction: column; gap: 0;
}
.db-spec-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 0;
  border-bottom: 1px solid #F3F4F6;
  gap: 8px;
}
.db-spec-row:last-child { border-bottom: 0; }
.db-spec-row span {
  font-size: 0.78rem; color: #6B7280; font-weight: 500;
  flex-shrink: 0;
}
.db-spec-row strong {
  font-size: 0.82rem; color: #111827; font-weight: 600;
  text-align: right; font-variant-numeric: tabular-nums;
}
.db-spec-badge {
  display: inline-flex; align-items: center;
  font-size: 0.7rem; font-weight: 700;
  padding: 2px 8px; border-radius: 999px;
  background: rgba(22,163,74,0.1); color: #16A34A;
  border: 1px solid rgba(22,163,74,0.3);
}
.db-spec-badge.parked {
  background: #F0F9FF; color: #0284C7;
  border-color: rgba(2,132,199,0.3);
}

/* ══════════ RIGHT COLUMN ══════════ */
.db-right-col {
  display: flex; flex-direction: column; gap: 16px;
}

.db-card {
  background: #fff;
  border-radius: 16px;
  border: 1px solid #E5E7EB;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05), 0 4px 16px rgba(0,0,0,0.04);
  padding: 20px;
}
.db-card-head {
  display: flex; align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.db-card-title {
  margin: 0;
  font-size: 0.95rem; font-weight: 700; color: #111827;
}
.db-link-sm {
  font-size: 0.8rem; font-weight: 600;
  color: #2563EB; text-decoration: none;
}
.db-link-sm:hover { color: #1D4ED8; }

/* Activity card */
.db-activity-banner {
  display: flex; align-items: baseline; gap: 8px;
  flex-wrap: wrap; margin-bottom: 4px;
}
.db-activity-km {
  font-size: 2.2rem; font-weight: 700;
  letter-spacing: -0.07em; color: #111827; line-height: 1;
}
.db-activity-sub { font-size: 0.75rem; color: #6B7280; }
.db-activity-badge {
  font-size: 0.7rem; font-weight: 700;
  padding: 2px 8px; border-radius: 999px;
  background: rgba(22,163,74,0.1); color: #16A34A;
  border: 1px solid rgba(22,163,74,0.3);
}
.db-activity-sub-label {
  font-size: 0.72rem; color: #9CA3AF;
  margin-bottom: 10px; display: block;
}
.db-sparkline { width: 100%; overflow: visible; }
.db-sparkline svg { display: block; width: 100%; height: 70px; }

/* Reminders card */
.db-reminder-list {
  display: flex; flex-direction: column;
  border: 1px solid #F3F4F6; border-radius: 10px;
  overflow: hidden; margin-bottom: 12px;
}
.db-reminder-row {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 4px; padding: 9px 12px;
  border-bottom: 1px solid #F3F4F6;
}
.db-reminder-row:last-child { border-bottom: 0; }
.db-reminder-label {
  font-size: 0.82rem; color: #111827; font-weight: 500;
}
.db-reminder-date {
  font-size: 0.78rem; font-weight: 700;
  color: #2563EB; text-align: right;
}
.db-reminder-date.ok { color: #16A34A; }
.db-reminder-date.warn { color: #D97706; }
.db-reminder-user {
  display: flex; align-items: center; gap: 8px;
  padding-top: 10px;
  border-top: 1px solid #F3F4F6;
  font-size: 0.84rem; font-weight: 600; color: #374151;
}
.db-reminder-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: #2563EB; display: grid; place-items: center;
  color: #fff; font-size: 0.62rem; font-weight: 700;
  flex-shrink: 0;
}

/* ══════════ TAB BAR ══════════ */
.db-tabs {
  display: flex; gap: 0;
  border-bottom: 1.5px solid #E5E7EB;
  margin-bottom: 20px;
  overflow-x: auto; scrollbar-width: none;
}
.db-tabs::-webkit-scrollbar { display: none; }
.db-tab {
  display: inline-block; padding: 10px 18px;
  font-size: 0.875rem; font-weight: 500;
  color: #6B7280; background: none; border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1.5px; cursor: pointer;
  text-decoration: none; white-space: nowrap;
  font-family: var(--font);
  transition: color 0.12s, border-color 0.12s;
}
.db-tab:hover { color: #111827; text-decoration: none; }
.db-tab.is-active {
  color: #2563EB; border-bottom-color: #2563EB; font-weight: 600;
}

/* ══════════ BOTTOM GRID ══════════ */
.db-bottom-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 2rem;
}

/* Driver card */
.db-driver-head {
  display: flex; align-items: center;
  gap: 12px; margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid #F3F4F6;
}
.db-driver-avatar-lg {
  width: 52px; height: 52px; border-radius: 50%;
  background: #2563EB; display: grid; place-items: center;
  color: #fff; font-size: 1rem; font-weight: 700; flex-shrink: 0;
}
.db-driver-name { font-size: 1.05rem; font-weight: 700; color: #111827; margin-bottom: 4px; }
.db-driver-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.db-tag {
  display: inline-block; font-size: 0.68rem; font-weight: 600;
  padding: 2px 8px; border-radius: 4px;
  background: #F3F4F6; border: 1px solid #E5E7EB; color: #6B7280;
}
.db-tag--green {
  background: rgba(22,163,74,0.08); color: #16A34A;
  border-color: rgba(22,163,74,0.3);
}
.db-driver-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 10px 16px;
}
.db-driver-item span {
  display: block; font-size: 0.68rem; letter-spacing: 0.07em;
  text-transform: uppercase; color: #9CA3AF; font-weight: 600;
}
.db-driver-item strong {
  display: block; font-size: 0.92rem; font-weight: 700;
  color: #111827; font-variant-numeric: tabular-nums;
}

/* Charge info card */
.db-charge-list {
  display: flex; flex-direction: column;
  border: 1px solid #F3F4F6; border-radius: 10px; overflow: hidden;
}
.db-charge-row {
  display: flex; align-items: center;
  justify-content: space-between; gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid #F3F4F6;
}
.db-charge-row:last-child { border-bottom: 0; }
.db-charge-row span { font-size: 0.82rem; color: #6B7280; }
.db-charge-row strong {
  font-size: 0.88rem; font-weight: 700;
  color: #111827; font-variant-numeric: tabular-nums; text-align: right;
}
.db-charge-row.is-warn strong { color: #DC2626; }

/* ══════════ LEGACY — kept for other pages ══════════ */
.dash-grid {

/* Topbar inside content */
.db-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  gap: 1rem;
}
.db-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--muted);
}
.db-bc-sep { color: #D1D5DB; }
.db-bc-active { color: var(--text); font-weight: 600; }
.db-topbar-end { display: flex; align-items: center; gap: 0.6rem; }
.db-btn-report {
  display: inline-flex; align-items: center;
  background: var(--accent); color: #fff;
  padding: 0.45rem 1.1rem; border-radius: 8px;
  font-size: 0.85rem; font-weight: 600; text-decoration: none;
}
.db-btn-report:hover { background: #1d4ed8; color: #fff; }
.db-avatar span {
  display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--accent); color: #fff;
  font-size: 0.72rem; font-weight: 700;
}

/* Main 2-col grid — 65/35 */
.db-main-grid {
  display: grid;
  grid-template-columns: 65fr 35fr;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
  align-items: start;
}

/* ── Hero card (left) ── */
.db-hero-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem 1.75rem 1.25rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.04);
}
.db-hero-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.db-hero-title {
  margin: 0 0 0.3rem;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--text);
}
.db-vin {
  display: inline-block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.1rem 0.45rem;
  letter-spacing: 0.06em;
}
.db-link-sm {
  font-size: 0.82rem; font-weight: 600;
  color: var(--accent); text-decoration: none; white-space: nowrap;
}
.db-link-sm:hover { color: #1d4ed8; }

/* 3 gauges row */
.db-gauges {
  display: flex;
  justify-content: space-around;
  align-items: center;
  gap: 0.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.25rem;
}
.db-gauge-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}
.gauge-svg { display: block; overflow: visible; }

/* Car visual row */
.db-car-row {
  display: grid;
  grid-template-columns: 1fr 200px;
  gap: 1.5rem;
  align-items: center;
}

/* Car image with tyre callouts */
.db-car-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}
.db-car-img {
  width: 100%;
  max-width: 440px;
  max-height: 260px;
  object-fit: contain;
  display: block;
}

/* Tyre callouts */
.db-tyre {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  pointer-events: none;
}
.db-tyre-dot {
  width: 7px; height: 7px;
  background: var(--accent); border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(37,99,235,0.2);
}
.db-tyre-val {
  font-size: 0.72rem; font-weight: 700;
  color: var(--text); line-height: 1.1;
  background: #fff; border: 1px solid var(--border);
  border-radius: 4px; padding: 1px 5px;
}
.db-tyre-lbl { font-size: 0.62rem; color: var(--muted); }
.db-tyre--fl { left: 4%; bottom: 28%; }
.db-tyre--fr { right: 4%; bottom: 28%; }
.db-tyre--rl { left: 4%; bottom: 2%; }
.db-tyre--rr { right: 4%; bottom: 2%; }

/* Specs list */
.db-specs-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.db-spec-row {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.db-spec-row span {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 600;
  color: var(--muted);
}
.db-spec-row strong {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.db-status-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: rgba(22,163,74,0.1);
  color: var(--ok);
  border: 1px solid rgba(22,163,74,0.3);
}
.db-status-badge.is-bad {
  background: rgba(220,38,38,0.08);
  color: var(--danger);
  border-color: rgba(220,38,38,0.3);
}

/* ── Right column ── */
.db-right-col {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Generic card */
.db-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.25rem 1.4rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.04);
}
.db-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.db-card-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

/* Activity sparkline */
.db-activity-stat {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.4rem 0.6rem;
  margin-bottom: 0.85rem;
}
.db-activity-km {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.06em;
  color: var(--text);
  line-height: 1;
}
.db-activity-label {
  font-size: 0.78rem;
  color: var(--muted);
}
.db-activity-badge {
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(22,163,74,0.1);
  color: var(--ok);
  border-radius: 999px;
  padding: 0.15rem 0.5rem;
  border: 1px solid rgba(22,163,74,0.3);
}
.db-sparkline {
  overflow: hidden;
  border-radius: 8px;
}
.db-sparkline svg { display: block; width: 100%; height: auto; }

/* Reminders */
.db-reminder-list { display: flex; flex-direction: column; gap: 0; margin-bottom: 1rem; }
.db-reminder-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
  gap: 0.5rem;
}
.db-reminder-row:last-child { border-bottom: 0; }
.db-reminder-label { font-size: 0.85rem; color: var(--text); font-weight: 500; }
.db-reminder-val {
  font-size: 0.82rem; font-weight: 700;
  color: var(--accent); white-space: nowrap;
}
.db-reminder-val.is-ok { color: var(--ok); }
.db-reminder-val.is-bad { color: var(--danger); }
.db-reminder-user {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  font-weight: 500;
}
.db-reminder-avatar span {
  display: grid; place-items: center;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent); color: #fff;
  font-size: 0.62rem; font-weight: 700;
}

/* ── Tab bar ── */
.db-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 1.25rem;
  overflow-x: auto;
  scrollbar-width: none;
}
.db-tabs::-webkit-scrollbar { display: none; }
.db-tab {
  display: inline-block;
  padding: 0.65rem 1.1rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  font-family: var(--font);
  transition: color 0.12s, border-color 0.12s;
}
.db-tab:hover { color: var(--text); text-decoration: none; }
.db-tab.is-active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }

/* ── Bottom grid ── */
.db-bottom-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

/* Legacy non-dashboard grid classes (charges, expenses, etc.) */
.dash-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 1.25rem; margin-bottom: 1.25rem; align-items: start; }
.dash-side { display: flex; flex-direction: column; gap: 1rem; }
.dash-bottom-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.1rem; }
.chip-row { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.apk-chip { display: inline-flex; align-items: center; padding: 0.25rem 0.6rem; border-radius: 999px; border: 1px solid var(--border); font-size: 0.75rem; font-weight: 600; background: var(--surface2); color: var(--muted); }
.apk-chip.is-ok { color: var(--ok); border-color: rgba(22,163,74,0.3); background: rgba(22,163,74,0.07); }
.apk-chip.is-bad { color: var(--danger); border-color: rgba(220,38,38,0.3); background: rgba(220,38,38,0.07); }
.btn-link { font-size: 0.82rem; font-weight: 600; color: var(--accent); text-decoration: none; }
.btn-link:hover { color: #1d4ed8; }
.side-info-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.1rem; box-shadow: var(--shadow); }
.side-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.75rem; }
.side-card-head h3 { margin: 0; font-size: 0.82rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); }
.side-card-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem 1rem; }
.side-card-item span { display: block; font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; margin-bottom: 0.1rem; }
.side-card-item strong { display: block; font-size: 0.92rem; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bottom-stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem 1.2rem; box-shadow: var(--shadow); }
.bottom-stat-card .kicker { display: block; font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-bottom: 0.35rem; }
.bottom-stat-card .value { display: block; font-size: 1.6rem; font-weight: 700; letter-spacing: -0.05em; color: var(--text); line-height: 1.1; }
.bottom-stat-card .sub { display: block; font-size: 0.78rem; color: var(--muted); margin-top: 0.2rem; }
.bottom-stat-card.is-warn .value { color: var(--danger); }

/* ── Responsive ── */
@media (max-width: 1100px) {
  .db-main-grid { grid-template-columns: 1fr; }
  .db-hero-inner { grid-template-columns: 1fr; }
  .db-bottom-grid { grid-template-columns: 1fr; }
  .db-right-col { display: grid; grid-template-columns: 1fr 1fr; }
  .dash-grid { grid-template-columns: 1fr; }
  .dash-bottom-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 1600px) {
  .rq-app {
    display: block;
    max-width: none;
  }
  .rq-sidebar {
    display: none;
    width: min(88vw, 400px);
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 70;
    transform: none;
    transition: none;
    box-shadow: none;
  }
  .rq-sidebar.is-open {
    display: flex;
    box-shadow: 4px 0 24px rgba(0,0,0,0.12);
  }
  .rq-hamburger { display: flex !important; }
  .rq-main { margin-left: 0; }
  .rq-mainbar {
    padding: 0 0.9rem;
    height: 56px;
  }
  .rq-mainbar-title {
    font-size: 1.02rem;
    font-weight: 700;
    color: #374151;
  }
  .rq-profile-meta { display: none; }
  .rq-profile-btn { padding: 3px; gap: 4px; }
  .rq-profile-chevron { display: none; }
  .rq-content { padding: 0.75rem 0.75rem 6.5rem; }
  .rq-dock {
    display: flex;
    position: fixed;
    left: 50%;
    right: auto;
    bottom: calc(0.9rem + env(safe-area-inset-bottom));
    z-index: 60;
    width: min(520px, calc(100vw - 1.7rem));
    max-width: calc(100vw - 1.7rem);
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 0.3rem 0.45rem;
    justify-content: space-between;
    align-items: center;
    height: 56px;
    box-sizing: border-box;
    box-shadow: 0 10px 28px rgba(0,0,0,0.14);
    transform: translate3d(-50%, 0, 0);
    transition:
      width .42s cubic-bezier(0.22, 1, 0.36, 1),
      height .42s cubic-bezier(0.22, 1, 0.36, 1),
      padding .42s cubic-bezier(0.22, 1, 0.36, 1),
      border-radius .42s cubic-bezier(0.22, 1, 0.36, 1),
      bottom .42s cubic-bezier(0.22, 1, 0.36, 1),
      box-shadow .42s ease;
  }
  .dock-link {
    font-size: 0.6rem;
    padding: 0;
    gap: 2px;
    height: 100%;
    justify-content: center;
    flex: 1 1 0;
  }
  .dock-link svg {
    width: 18px;
    height: 18px;
    transition: width .36s cubic-bezier(0.22, 1, 0.36, 1), height .36s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .dock-link > span:not(.dock-plus) {
    display: block;
    opacity: 1;
    max-height: 1.25em;
    overflow: hidden;
    white-space: nowrap;
    transition: opacity .28s ease, max-height .36s cubic-bezier(0.22, 1, 0.36, 1), transform .36s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .dock-link--new {
    top: 0;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border-width: 3px;
    align-self: center;
    transition: width .42s cubic-bezier(0.22, 1, 0.36, 1), height .42s cubic-bezier(0.22, 1, 0.36, 1), flex-basis .42s cubic-bezier(0.22, 1, 0.36, 1), border-width .42s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .dock-plus {
    font-size: 24px;
    transform: none;
    transition: font-size .42s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .rq-dock.is-compact {
    width: min(268px, calc(100vw - 4.5rem));
    max-width: 268px;
    padding: 0.18rem 0.5rem;
    border-radius: 999px;
    height: 46px;
    bottom: calc(1.15rem + env(safe-area-inset-bottom));
    justify-content: space-evenly;
  }
  .rq-dock.is-compact .dock-link > span:not(.dock-plus) {
    opacity: 0;
    max-height: 0;
    transform: translateY(4px);
    pointer-events: none;
  }
  .rq-dock.is-compact .dock-link { padding: 0; }
  .rq-dock.is-compact .dock-link--new {
    top: 0;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
  }
  .rq-dock.is-compact .dock-plus {
    display: block;
    font-size: 20px;
    color: #fff;
  }
  .rq-dropdown { right: -6px; }
  .rq-iconbtn, .rq-topbtn { width: 36px; height: 36px; }
  .rq-avatar-circle { width: 28px; height: 28px; font-size: 10px; }
  .db-main-grid { grid-template-columns: 1fr; gap: 16px; }
  .db-hero-inner { grid-template-columns: 1fr; }
  .db-gauges { gap: 4px; }
  .db-gauge-svg { width: 88px !important; height: 88px !important; }
  .db-bottom-grid { grid-template-columns: 1fr; gap: 16px; }
  .db-right-col { display: flex; flex-direction: column; }
  .db-car-img { max-height: 160px; }
  .db-mini-map { height: 140px; }
  .auth-card { max-width: 100%; border-radius: 14px; }
  .auth-card-visual { height: 96px; }
  .auth-form { padding: 1.2rem 1.15rem 1.35rem; }
  .history-grid { grid-template-columns: 1fr; }
  .history-right { text-align: left; }
  .history-stat { justify-content: flex-start; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span2 { grid-column: span 1; }
  .modal-row { grid-template-columns: 28px 1fr; }
  .log-main { grid-template-columns: 1fr auto; }
  .log-facts { grid-column: 1 / -1; }
  .page-banner { height: 132px; }
  .dash-grid { grid-template-columns: 1fr; }
  .dash-bottom-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .trip-row { grid-template-columns: minmax(0, 1fr) auto; }
  .trip-when { display: none; }
}
