:root { color-scheme: dark; --bg: #080b0d; --panel: #111517; --panel-2: #171c1f; --line: #30373b; --text: #f7f8f8; --muted: #949da2; --orange: #ff6b1a; --green: #3ddc84; --danger: #ff5964; --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); letter-spacing: 0; }
button, input { font: inherit; letter-spacing: 0; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.mirror-shell { min-height: 100vh; }
.login-view { min-height: 100vh; display: grid; grid-template-columns: minmax(320px, 1.15fr) minmax(350px, .85fr); }
.login-visual { min-height: 100vh; overflow: hidden; background: #0c1012; }
.login-visual img { width: 100%; height: 100%; object-fit: cover; display: block; }
.login-panel { display: flex; flex-direction: column; justify-content: center; padding: clamp(28px, 7vw, 96px); border-left: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 11px; }
.brand img { width: 44px; height: 44px; object-fit: contain; }
.brand span { display: grid; gap: 2px; }
.brand b { font-size: 15px; }
.brand small { color: var(--muted); }
.eyebrow { color: var(--orange); font-size: 11px; font-weight: 900; text-transform: uppercase; }
.login-panel > .eyebrow { margin-top: 58px; }
h1, h2, p { margin: 0; }
.login-panel h1 { margin-top: 7px; font-size: clamp(28px, 4vw, 46px); line-height: 1.05; }
.login-panel > p { max-width: 520px; margin-top: 13px; color: var(--muted); line-height: 1.55; }
#login-form { display: grid; gap: 14px; margin-top: 34px; }
label { display: grid; gap: 7px; color: #c6cccf; font-size: 12px; font-weight: 800; }
input { min-height: 46px; width: 100%; padding: 0 13px; border: 1px solid var(--line); border-radius: 5px; outline: none; background: #090c0e; color: #fff; }
input:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255, 107, 26, .13); }
#login-form button, .history-form button { min-height: 46px; border: 0; border-radius: 5px; background: var(--orange); color: #111; font-weight: 900; }
#login-form button:disabled, .history-form button:disabled { opacity: .6; cursor: wait; }
.form-message { min-height: 20px; margin-top: 10px; color: var(--danger) !important; font-size: 12px; }
.privacy-note { margin-top: 28px; color: var(--muted); }
.tracking-view { min-height: 100vh; }
.topbar { min-height: 70px; display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 22px; padding: 10px clamp(16px, 3vw, 44px); border-bottom: 1px solid var(--line); background: #0b0e10; }
.live-state { display: flex; align-items: center; gap: 8px; color: #cfd5d7; font-size: 12px; font-weight: 800; }
.live-state i { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 5px rgba(61, 220, 132, .12); }
.quiet-button { min-height: 36px; padding: 0 13px; border: 1px solid var(--line); border-radius: 5px; background: #151a1d; color: #fff; font-weight: 800; }
.unit-bar { display: grid; grid-template-columns: auto minmax(250px, 1fr) auto auto; align-items: center; gap: 18px; padding: 18px clamp(16px, 3vw, 44px); border-bottom: 1px solid var(--line); background: var(--panel); }
.unit-avatar { width: 58px; height: 58px; display: grid; place-items: center; overflow: hidden; border: 1px solid #50595e; border-radius: 50%; background: #1b2124; color: var(--orange); font-size: 11px; font-weight: 900; }
.unit-avatar img { width: 100%; height: 100%; object-fit: cover; }
.unit-copy { display: grid; gap: 4px; min-width: 0; }
.unit-copy h1 { overflow: hidden; font-size: 20px; text-overflow: ellipsis; white-space: nowrap; }
.unit-copy p { color: var(--muted); font-size: 12px; }
.reading { min-width: 130px; padding-left: 18px; border-left: 1px solid var(--line); }
.reading span { display: block; color: var(--muted); font-size: 9px; font-weight: 900; text-transform: uppercase; }
.reading b { display: block; margin-top: 5px; font-size: 13px; }
.reading strong { font-size: 24px; color: var(--orange); }
.mirror-tabs { min-height: 48px; display: flex; align-items: stretch; gap: 2px; padding: 0 clamp(16px, 3vw, 44px); border-bottom: 1px solid var(--line); background: #0d1113; }
.mirror-tabs button { position: relative; min-height: 47px; padding: 0 16px; border: 0; background: transparent; color: var(--muted); font-size: 12px; font-weight: 850; }
.mirror-tabs button::after { content: ""; position: absolute; left: 16px; right: 16px; bottom: 0; height: 2px; background: transparent; }
.mirror-tabs button:hover, .mirror-tabs button.active { color: #fff; }
.mirror-tabs button.active::after { background: var(--orange); }
.map-stage { position: relative; min-height: min(68vh, 760px); isolation: isolate; }
#mirror-map { position: absolute; inset: 0; background: #0b0f11; }
.map-status { position: absolute; z-index: 500; left: 18px; right: 18px; bottom: 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid rgba(255, 255, 255, .18); border-radius: 6px; background: rgba(8, 11, 13, .9); backdrop-filter: blur(8px); font-size: 12px; }
.map-status button { min-height: 34px; padding: 0 12px; border: 1px solid #596269; border-radius: 5px; background: #181e21; color: #fff; font-weight: 800; }
.leaflet-container { font-family: var(--font); }
.leaflet-control-zoom a { background: #111619 !important; color: #fff !important; border-color: #333b3f !important; }
.mirror-marker-host { border: 0; background: transparent; }
.mirror-marker { position: relative; width: 52px; height: 52px; display: grid; place-items: center; overflow: hidden; border: 3px solid #fff; border-radius: 50%; background: var(--orange); box-shadow: 0 4px 18px rgba(0,0,0,.55), 0 0 0 4px rgba(255, 107, 26, .28); color: #111; font-size: 10px; font-weight: 950; }
.mirror-marker img { position: absolute; inset: 0; width: 100% !important; height: 100% !important; max-width: none !important; display: block; object-fit: cover; }
.history-panel { padding: 20px clamp(16px, 3vw, 44px); border-top: 1px solid var(--line); background: var(--panel); }
.history-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.history-heading h2 { margin-top: 3px; font-size: 18px; }
.history-form { display: grid; grid-template-columns: 1fr 1fr auto; align-items: end; gap: 12px; margin-top: 16px; }
.history-summary { margin-top: 12px; color: var(--muted); font-size: 12px; }
.detail-panel { min-height: calc(100vh - 252px); padding: 28px clamp(16px, 4vw, 64px) 48px; background: #0d1113; }
.detail-heading { display: flex; align-items: end; justify-content: space-between; gap: 28px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.detail-heading h2 { margin-top: 4px; font-size: 25px; }
.detail-heading > p { max-width: 480px; color: var(--muted); font-size: 12px; line-height: 1.5; text-align: right; }
.vehicle-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 6px; margin-top: 22px; overflow: hidden; background: var(--panel); }
.vehicle-facts > div { min-height: 84px; display: grid; align-content: center; gap: 6px; padding: 16px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.vehicle-facts > div:nth-child(3n) { border-right: 0; }
.vehicle-facts span, .maintenance-summary span { color: var(--muted); font-size: 10px; font-weight: 850; text-transform: uppercase; }
.vehicle-facts b { overflow-wrap: anywhere; font-size: 15px; }
.vehicle-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-top: 22px; }
.vehicle-gallery figure { margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); }
.photo-frame { aspect-ratio: 4 / 3; display: grid; place-items: center; overflow: hidden; background: #080b0d; color: var(--muted); font-size: 11px; }
.photo-frame img { width: 100%; height: 100%; display: block; object-fit: cover; }
.vehicle-gallery figcaption { padding: 11px 13px; font-size: 12px; font-weight: 800; }
.maintenance-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 22px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); }
.maintenance-summary > div { min-height: 86px; display: grid; align-content: center; gap: 7px; padding: 16px; border-right: 1px solid var(--line); }
.maintenance-summary > div:last-child { border-right: 0; }
.maintenance-summary b { font-size: 22px; }
.maintenance-list { display: grid; gap: 9px; margin-top: 16px; }
.maintenance-item { display: grid; grid-template-columns: auto 1fr; gap: 13px; padding: 16px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); }
.service-status { width: 10px; height: 10px; margin-top: 4px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 5px rgba(61, 220, 132, .1); }
.service-status.programado { background: var(--orange); box-shadow: 0 0 0 5px rgba(255, 107, 26, .12); }
.service-status.cancelado { background: var(--danger); box-shadow: none; }
.maintenance-item > div { min-width: 0; }
.maintenance-item span { color: var(--orange); font-size: 10px; font-weight: 850; text-transform: uppercase; }
.maintenance-item h3 { margin: 3px 0 5px; font-size: 15px; }
.maintenance-item small { color: var(--muted); }
.maintenance-item p { margin-top: 10px; color: #d6dadc; font-size: 12px; line-height: 1.5; white-space: pre-wrap; }
.maintenance-item em { display: block; margin-top: 10px; color: #ffb082; font-size: 11px; font-style: normal; font-weight: 750; }
.detail-loading, .detail-empty { grid-column: 1 / -1; min-height: 110px; display: grid; place-items: center; padding: 24px; color: var(--muted); text-align: center; }
footer { padding: 17px; border-top: 1px solid var(--line); color: var(--muted); text-align: center; font-size: 11px; }
@media (max-width: 760px) {
  .login-view { grid-template-columns: 1fr; align-content: start; }
  .login-visual { min-height: 0; height: min(42vh, 330px); }
  .login-panel { padding: 26px 20px 40px; border-left: 0; border-top: 1px solid var(--line); }
  .login-panel > .eyebrow { margin-top: 34px; }
  .topbar { grid-template-columns: 1fr auto; gap: 10px; }
  .live-state { display: none; }
  .unit-bar { grid-template-columns: auto 1fr; gap: 12px; }
  .reading { min-width: 0; padding: 12px 0 0; border-left: 0; border-top: 1px solid var(--line); }
  .map-stage { min-height: 56vh; }
  .mirror-tabs { overflow-x: auto; padding: 0 10px; }
  .mirror-tabs button { flex: 0 0 auto; padding: 0 12px; }
  .map-status { left: 10px; right: 10px; bottom: 10px; }
  .history-heading { align-items: flex-start; }
  .history-form { grid-template-columns: 1fr; }
  .detail-panel { min-height: 65vh; padding: 22px 16px 36px; }
  .detail-heading { display: grid; gap: 8px; align-items: start; }
  .detail-heading > p { text-align: left; }
  .vehicle-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vehicle-facts > div:nth-child(3n) { border-right: 1px solid var(--line); }
  .vehicle-facts > div:nth-child(2n) { border-right: 0; }
  .vehicle-gallery { grid-template-columns: 1fr; }
}
