* { box-sizing: border-box; }

:root {
  --bg: #f7f7f8;
  --paper: #ffffff;
  --ink: #17181c;
  --ink-soft: #62636b;
  --ink-faint: #9a9ba3;
  --line: #e7e7eb;

  --accent: #17181c;
  --accents: #3b6ef6, #16a34a, #ea580c, #7c3aed, #0891b2, #dc2626, #ca8a04, #db2777, #6b7280, #111827;

  --vencido: #dc2626;
  --proximo: #ca8a04;
  --ok: #16a34a;

  --shadow: 0 1px 2px rgba(20, 20, 25, 0.04), 0 8px 24px rgba(20, 20, 25, 0.05);
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;

  --sidebar-w: 248px;
}

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  font-size: 14.5px;
}

button { font-family: inherit; }
a { color: inherit; }

/* ---------- generic buttons / fields ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border: none;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  background: var(--ink);
  color: #fff;
  transition: opacity 0.15s;
}
.btn svg { width: 14px; height: 14px; flex-shrink: 0; }
.btn:hover { opacity: 0.85; }
.btn-block { width: 100%; }
.btn-accent { background: var(--ink); }
.btn-ghost {
  background: none;
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn-ghost:hover { background: var(--bg); opacity: 1; }
.btn-danger { background: #fff; color: var(--vencido); border: 1px solid #f3c9c9; }
.btn-danger:hover { background: #fef2f2; opacity: 1; }
.btn-text {
  background: none;
  border: none;
  color: var(--ink-soft);
  text-decoration: none;
  cursor: pointer;
  padding: 0;
  font-size: 13px;
  font-weight: 600;
}
.btn-text:hover { color: var(--ink); }
.btn-sm { padding: 7px 12px; font-size: 12px; border-radius: 8px; }

.field { margin-bottom: 14px; }
.field label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.field input, .field select, .field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  font-size: 14px;
  background: #fff;
  color: var(--ink);
  font-family: var(--sans);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--ink);
}
.field textarea { resize: vertical; min-height: 70px; }

.error {
  background: #fef2f2;
  color: var(--vencido);
  border: 1px solid #f3c9c9;
  padding: 9px 12px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 14px;
}

/* ---------- Auth ---------- */

.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  margin-bottom: 22px;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}
.auth-brand .mark {
  width: 30px; height: 30px; border-radius: 9px;
  background: var(--ink); color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.auth-brand .mark svg { width: 17px; height: 17px; }

.auth-card {
  width: 100%;
  max-width: 380px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 32px;
  box-shadow: var(--shadow);
}

.auth-card h1 {
  font-size: 21px;
  font-weight: 700;
  margin: 0 0 22px;
}

.auth-switch { margin-top: 18px; text-align: center; font-size: 13px; color: var(--ink-soft); }
.auth-switch button { color: var(--ink); font-weight: 700; }

/* ---------- App shell (sidebar layout) ---------- */

.page { display: flex; flex-direction: column; min-height: 100vh; }

.app-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 32px;
  height: 123px;
  flex-shrink: 0;
  background-image: linear-gradient(90deg, rgba(8, 9, 12, 0.8) 0%, rgba(8, 9, 12, 0.45) 40%, rgba(8, 9, 12, 0.1) 68%), url('Header.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: sticky;
  top: 0;
  z-index: 5;
}
.app-logo { height: 60%; width: auto; flex-shrink: 0; }
.app-header .brand-text { font-size: 22px; font-weight: 800; color: #fff; letter-spacing: 0.01em; }
.app-brand {
  display: flex; align-items: center; gap: 16px;
  height: 100%;
  border: none; background: none; padding: 0; margin: 0; cursor: pointer; text-align: left;
}

.shell { display: flex; flex: 1; min-height: 0; }

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--paper);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  height: calc(100vh - 123px);
  position: sticky;
  top: 123px;
}

.sidebar-section-label {
  padding: 4px 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-top: 10px;
}

.sidebar-nav { flex: 1; overflow-y: auto; padding-bottom: 12px; }

.veh-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 20px;
  border: none;
  background: none;
  cursor: pointer;
  text-align: left;
  color: var(--ink-soft);
  font-size: 13.5px;
  font-weight: 600;
}
.veh-item:hover { background: var(--bg); color: var(--ink); }
.veh-item.active { background: var(--bg); color: var(--ink); box-shadow: inset 3px 0 0 var(--vehcolor, var(--ink)); }
.veh-item.vendido { opacity: 0.55; }
.veh-item.vendido.active { opacity: 0.85; }

.sidebar-divider { height: 1px; background: var(--ink-faint); margin: 14px 20px; opacity: 0.5; }
.divider { height: 1px; background: var(--line); margin: 0 0 24px; }
.veh-item .swatch {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
  background: var(--vehcolor, var(--ink));
}
.veh-item .name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.veh-add {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 20px;
  border: none;
  background: none;
  cursor: pointer;
  text-align: left;
  color: var(--ink-faint);
  font-size: 13.5px;
  font-weight: 600;
}
.veh-add:hover { color: var(--ink); }
.veh-add .plus { display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.veh-add .plus svg { width: 12px; height: 12px; }

.sidebar-user {
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-user .avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--line); color: var(--ink-soft);
  display: flex; align-items: center; justify-content: center;
  font-size: 12.5px; font-weight: 700; flex-shrink: 0;
}
.sidebar-user .who { flex: 1; min-width: 0; }
.sidebar-user .name { font-size: 13px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user .logout { font-size: 12px; }

/* ---------- Main ---------- */

.main { flex: 1; min-width: 0; }

.container { margin: 0; padding: 32px; }

/* ---------- Empty state ---------- */

.empty {
  border-radius: 16px;
  padding: 70px 32px;
  text-align: center;
  background: var(--paper);
  border: 1px solid var(--line);
}
.empty h2 { font-size: 22px; font-weight: 700; margin: 0 0 8px; }
.empty p { color: var(--ink-soft); margin-bottom: 22px; }

/* ---------- Home ---------- */

.home-hero {
  position: relative;
  min-height: 320px;
  border-radius: 20px;
  overflow: hidden;
  background-color: var(--vehcolor, var(--ink));
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: flex-end;
  margin-bottom: 32px;
}
.home-hero-overlay { padding: 28px 32px; max-width: 560px; }
.home-hero-eyebrow {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.65); margin-bottom: 8px;
}
.home-hero-line { margin: 0; font-size: 24px; font-weight: 500; line-height: 1.4; color: #fff; }
.home-hero-line strong { font-weight: 800; }
.home-hero-alert {
  margin: 14px 0 0; padding-left: 12px; border-left: 3px solid currentColor;
  font-size: 14.5px; font-weight: 700;
}
.home-hero-alert--vencido { color: #ff9b9b; }
.home-hero-alert--proximo { color: #ffd479; }

.home-feed { display: flex; flex-direction: column; margin-bottom: 10px; }
.home-feed-day {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--ink-faint); margin: 18px 0 6px;
}
.home-feed-day:first-child { margin-top: 0; }
.home-feed-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 8px; margin: 0 -8px;
  border-bottom: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}
.home-feed-row:hover { background: var(--bg); }
.home-feed-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--vehcolor, var(--ink)); flex-shrink: 0; }
.home-feed-thumb { width: 32px; height: 32px; border-radius: 6px; overflow: hidden; flex-shrink: 0; background: var(--bg); }
.home-feed-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.home-feed-veh { font-size: 13px; font-weight: 700; flex-shrink: 0; min-width: 80px; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-feed-desc { flex: 1; min-width: 0; font-size: 13.5px; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-feed-cost { font-size: 13px; font-weight: 700; flex-shrink: 0; }

/* ---------- Vehicle header ---------- */

.veh-header {
  display: flex;
  gap: 32px;
  align-items: stretch;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.veh-header-info { flex: 1; min-width: 240px; display: flex; flex-direction: column; }
.veh-title-row { display: flex; align-items: center; gap: 8px; }
.veh-header-info h1 { font-size: 26px; font-weight: 700; margin: 0; letter-spacing: -0.01em; }
.veh-header-info .sub { font-size: 14.5px; color: var(--ink); margin-top: 4px; }
.veh-header-info .meta { font-size: 13.5px; color: var(--ink-soft); margin-top: 6px; }
.veh-header-info .actions {
  margin-top: 18px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  position: sticky;
  top: 123px;
  z-index: 4;
  background: var(--bg);
  padding: 10px 0;
}
.veh-header-info .actions .btn { padding: 11px 12px; font-size: 11px; }
.veh-header-info .actions .btn svg { width: 11px; height: 11px; }

.venc-menu-wrap { position: relative; }
.venc-menu-wrap .dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; margin-right: 5px; }
.dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 10;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  min-width: 170px;
  overflow: hidden;
}
.dropdown-menu button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 14px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
.dropdown-menu button:hover { background: var(--bg); }

.btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  border: none;
  border-radius: 8px;
  background: none;
  color: var(--ink-faint);
  cursor: pointer;
}
.btn-icon:hover { background: var(--bg); color: var(--ink); }
.btn-icon svg { width: 16px; height: 16px; }

.veh-photo {
  position: relative;
  aspect-ratio: 16 / 9;
  max-width: 620px;
  border-radius: 16px;
  overflow: hidden;
  background: var(--vehcolor, var(--ink));
  flex-shrink: 0;
}
.veh-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.veh-photo-placeholder {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  color: rgba(255, 255, 255, 0.9); font-size: 12.5px; font-weight: 600;
}
.veh-photo-placeholder svg { width: 56px; height: 56px; opacity: 0.9; }
.veh-photo-tools {
  position: absolute; top: 10px; right: 10px; display: flex; gap: 6px;
}
.veh-photo-tools .btn { background: rgba(0, 0, 0, 0.5); backdrop-filter: blur(2px); }
.veh-photo-tools .btn:hover { background: rgba(0, 0, 0, 0.68); }

/* ---------- Stats ---------- */

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.section-head h3 { font-size: 15px; font-weight: 700; margin: 0; }

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  margin-bottom: 28px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  container-type: inline-size;
}
.stat {
  background: var(--paper);
  padding: 9px 18px;
}
.stat .icon { color: var(--ink-faint); margin-bottom: 4px; }
.stat .icon svg { width: 13px; height: 13px; }
.stat .num { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; white-space: nowrap; }
.stat .num small { font-size: 11px; color: var(--ink-faint); font-weight: 600; }
.stat .label { margin-top: 1px; font-size: 10.5px; color: var(--ink-soft); font-weight: 500; white-space: nowrap; }

/* Ancho del propio bloque de KPIs (no el de la ventana) — en la ficha de
   vehículo, la foto ocupa la mitad de la pantalla, así que el contenedor
   real de .stats puede ser angosto aunque la ventana sea grande. */
@container (max-width: 1000px) {
  .stats { grid-template-columns: repeat(auto-fit, minmax(115px, 1fr)); }
  .stat { padding: 8px 10px; }
  .stat .num { font-size: 13px; }
  .stat .num small { font-size: 9.5px; }
  .stat .label { font-size: 8.5px; }
}

@container (max-width: 480px) {
  .stats { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
  .stat { padding: 9px 14px; }
  .stat .num { font-size: 15px; white-space: normal; }
  .stat .num small { font-size: 10px; }
  .stat .label { font-size: 10px; white-space: normal; }
}

/* ---------- Vencimientos ---------- */

.venc-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  margin-bottom: 28px;
}
.venc-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  text-align: left;
}
.venc-card:hover { border-color: var(--ink-faint); }
.venc-card .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--status, var(--ok)); flex-shrink: 0; }
.venc-card .body { flex: 1; min-width: 0; }
.venc-card .tipo { font-size: 13.5px; font-weight: 700; }
.venc-card .fecha { font-size: 12px; color: var(--ink-soft); margin-top: 1px; }
.venc-card .estado { font-size: 11.5px; font-weight: 700; color: var(--status, var(--ok)); white-space: nowrap; }

/* ---------- Bitácora (timeline) ---------- */

.timeline { margin-bottom: 10px; }

.tl-item {
  display: flex;
  gap: 16px;
  padding: 0 0 14px;
  position: relative;
}
.tl-item:last-child { padding-bottom: 0; }
.tl-item:last-child .content { border-bottom: none; }
.tl-item .rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}
.tl-item .dot {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--bg); border: 1px solid var(--tipocolor, var(--line));
  display: flex; align-items: center; justify-content: center;
  color: var(--tipocolor, var(--ink-soft)); flex-shrink: 0;
}
.tl-item .dot svg { width: 16px; height: 16px; }
.tl-item .line { width: 1px; flex: 1; background: var(--line); margin-top: 4px; }

.tl-item .content {
  flex: 1; min-width: 0;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 14px;
  padding: 4px 0 18px;
  border-bottom: 1px solid var(--ink-faint);
}
.tl-item .main-col { min-width: 0; }
.tl-item .fecha-row { display: flex; align-items: center; gap: 8px; }
.tl-item .fecha { font-size: 12.5px; color: var(--ink-soft); font-weight: 700; text-transform: uppercase; letter-spacing: 0.02em; }
.tl-item .tipo-badge {
  font-size: 11px; font-weight: 700; color: var(--tipocolor, var(--ink-soft));
  background: var(--bg); border: 1px solid var(--tipocolor, var(--line));
  padding: 2px 8px; border-radius: 999px;
}
.tl-item .desc-link {
  display: block;
  background: none; border: none; padding: 0; margin-top: 5px;
  text-align: left; cursor: pointer;
  color: var(--ink); font-size: 15.5px; font-weight: 700; font-family: var(--sans);
}
.tl-item .desc-link:hover { text-decoration: underline; }
.tl-item .place { font-size: 13px; color: var(--ink-soft); margin-top: 4px; }
.tl-item .side { text-align: right; flex-shrink: 0; }
.tl-thumb {
  position: relative;
  width: 44px; height: 44px;
  margin: 0 0 8px auto;
  border-radius: 8px;
  overflow: hidden;
  cursor: zoom-in;
  background: var(--bg);
  border: 1px solid var(--line);
}
.tl-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tl-thumb-count {
  position: absolute; bottom: 2px; right: 2px;
  font-size: 9.5px; font-weight: 700; color: #fff;
  background: rgba(0, 0, 0, 0.6); padding: 1px 4px; border-radius: 4px;
}
.tl-item .km { font-size: 12.5px; color: var(--ink-soft); font-weight: 600; }
.tl-item .km-conv { display: block; font-size: 11px; color: var(--ink-faint); font-weight: 500; }
.tl-item .cost { font-size: 14px; font-weight: 700; margin-top: 2px; }
.tl-item .usd { display: block; font-size: 11.5px; color: var(--ink-faint); font-weight: 500; }

.empty-registros { color: var(--ink-faint); font-size: 14px; padding: 20px 4px; font-weight: 500; }

/* ---------- Modal ---------- */

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 20, 25, 0.45);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 48px 20px;
  overflow-y: auto;
  z-index: 50;
}

.modal {
  width: 100%;
  max-width: 500px;
  background: var(--paper);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 28px 28px;
}

.modal h2 { font-size: 18px; font-weight: 700; margin: 0 0 18px; }
.modal .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.modal .row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }

.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.modal-actions .spacer { flex: 1; }

.swatch-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch-option {
  width: 26px; height: 26px; border-radius: 50%; padding: 0; cursor: pointer;
  border: 2px solid transparent; box-shadow: inset 0 0 0 1px var(--line);
}
.swatch-option.selected { border-color: var(--ink); }
.swatch-option.auto {
  background: linear-gradient(135deg, #fff 0 50%, var(--bg) 50% 100%);
}

.field-check { margin-bottom: 14px; }
.field-check label { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; cursor: pointer; }

/* ---------- Detail modal ---------- */

.detail-nav { display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.detail-nav .detail-head { flex: 1; margin-bottom: 0; }
.detail-nav .btn-icon { align-self: center; font-size: 18px; font-weight: 700; }
.detail-nav .btn-icon:disabled { opacity: 0.3; cursor: default; }
.detail-nav .btn-icon:disabled:hover { background: none; }
.detail-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; }
.detail-head .fecha { font-size: 17px; font-weight: 700; }
.detail-head .km { font-size: 13px; color: var(--ink-soft); font-weight: 600; }
.detail-place { font-size: 13px; color: var(--ink-soft); margin-bottom: 14px; }
.detail-obs { font-size: 14.5px; line-height: 1.5; margin-bottom: 18px; white-space: pre-wrap; }
.detail-costs { display: flex; gap: 24px; margin-bottom: 20px; font-size: 13px; }
.detail-costs b { display: block; font-size: 18px; font-weight: 700; }

.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 8px; margin-bottom: 18px; }
.photo-grid .thumb { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--line); cursor: pointer; }
.photo-grid .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-grid .thumb .rm {
  position: absolute; top: 4px; right: 4px;
  background: rgba(0, 0, 0, 0.6); color: #fff; border: none; border-radius: 50%;
  width: 20px; height: 20px; line-height: 18px; font-size: 12px; cursor: pointer;
}

.upload-hint { font-size: 12px; color: var(--ink-faint); margin-top: -8px; margin-bottom: 14px; }

/* ---------- Lightbox ---------- */

.lightbox {
  position: fixed; inset: 0; background: rgba(10, 10, 12, 0.92);
  display: flex; align-items: center; justify-content: center; z-index: 80; cursor: zoom-out; padding: 24px;
}
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 8px; }
.lightbox-close {
  position: absolute; top: 20px; right: 24px;
  width: 40px; height: 40px; border-radius: 50%;
  border: none; background: rgba(255, 255, 255, 0.12); color: #fff;
  font-size: 22px; line-height: 1; cursor: pointer;
}
.lightbox-close:hover { background: rgba(255, 255, 255, 0.22); }
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px; border-radius: 50%;
  border: none; background: rgba(255, 255, 255, 0.12); color: #fff;
  font-size: 26px; line-height: 1; cursor: pointer;
}
.lightbox-nav:hover { background: rgba(255, 255, 255, 0.22); }
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

/* ---------- misc ---------- */

.muted { color: var(--ink-soft); }
.hidden { display: none !important; }

@media (max-width: 860px) {
  .app-header { height: 62px; padding: 0 20px; background-position: 68% center; }
  .app-header .brand-text { font-size: 16px; }
  .shell { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; border-right: none; border-bottom: 1px solid var(--line); flex-direction: row; align-items: center; flex-wrap: wrap; }
  .sidebar-nav { display: flex; overflow-x: auto; flex: 1; padding-bottom: 0; }
  .sidebar-section-label { display: none; }
  .veh-item, .veh-add { width: auto; white-space: nowrap; padding: 10px 14px; box-shadow: none !important; border-radius: 10px; }
  .veh-item.active { background: var(--bg); }
  .sidebar-user { border-top: none; }
  .container { padding: 20px 16px; }
  .veh-header { flex-direction: column-reverse; }
  .veh-photo { width: 100%; }
  .tl-item .content { flex-direction: column; gap: 4px; }
  .tl-item .side { text-align: left; }
  .modal .row2, .modal .row3 { grid-template-columns: 1fr; }
  .modal { padding: 22px 20px; }
  .home-hero { min-height: 220px; }
  .home-hero-overlay { padding: 20px; max-width: 100%; }
  .home-hero-line { font-size: 19px; }
  .home-feed-veh { display: none; }
}
