@font-face { font-family: 'Barlow'; font-weight: 400; font-display: swap; src: url(/vendor/fonts/barlow/barlow-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Barlow'; font-weight: 500; font-display: swap; src: url(/vendor/fonts/barlow/barlow-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: 'Barlow'; font-weight: 600; font-display: swap; src: url(/vendor/fonts/barlow/barlow-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Barlow Condensed'; font-weight: 600; font-display: swap; src: url(/vendor/fonts/barlow-condensed/barlow-condensed-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Barlow Condensed'; font-weight: 700; font-display: swap; src: url(/vendor/fonts/barlow-condensed/barlow-condensed-latin-700-normal.woff2) format('woff2'); }

:root {
  --asphalt: #2B3036; --asphalt-2: #3A4047;
  --ink: #1E2227; --mute: #646C75; --faint: #8D949B;
  --paper: #EEF0EE; --surface: #FFFFFF; --sunk: #F5F6F5; --line: #DADDE1;
  --lane: #FFB400; --lane-ink: #2B2100; --lane-soft: #FFF3D1;
  --free: #1E8E5A; --hold: #D98A00; --part: #5B7FB8; --busy: #C9363E; --maint: #8D949B;
  --free-soft: #E3F3EA; --hold-soft: #FCEFD6; --busy-soft: #F8E1E2; --part-soft: #E4ECF7;
  --radius: 10px; --radius-s: 6px;
  --shadow: 0 1px 2px rgba(30,34,39,.08), 0 6px 20px rgba(30,34,39,.10);
  --f-body: 'Barlow', system-ui, sans-serif; --f-cond: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --nav-h: 62px; --side-w: 232px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --ink:#E7E9EC; --mute:#A3AAB2; --faint:#7A828A; --paper:#15181B; --surface:#1E2227; --sunk:#191C20; --line:#30353B; --asphalt:#0F1114; --asphalt-2:#262B31; --lane-soft:#3A2F12; --free-soft:#163126; --hold-soft:#3A2C12; --busy-soft:#3A1D20; --part-soft:#1E2A3B; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.4); color-scheme: dark; } }
:root[data-theme="dark"] { --ink:#E7E9EC; --mute:#A3AAB2; --faint:#7A828A; --paper:#15181B; --surface:#1E2227; --sunk:#191C20; --line:#30353B; --asphalt:#0F1114; --asphalt-2:#262B31; --lane-soft:#3A2F12; --free-soft:#163126; --hold-soft:#3A2C12; --busy-soft:#3A1D20; --part-soft:#1E2A3B; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.4); color-scheme: dark; }

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { height: 100dvh; }
body { font: 400 15px/1.45 var(--f-body); color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; overscroll-behavior: none; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
img { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--f-cond); font-weight: 700; letter-spacing: .005em; margin: 0; line-height: 1.1; }
h1 { font-size: 28px; } h2 { font-size: 21px; } h3 { font-size: 17px; font-weight: 600; }
:focus-visible { outline: 3px solid var(--lane); outline-offset: 2px; }
.mute { color: var(--mute); } .small { font-size: 13px; } .num { font-variant-numeric: tabular-nums; }
.cond { font-family: var(--f-cond); font-weight: 600; }
.hidden { display: none !important; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- Shell ---------- */
#app { height: 100%; display: flex; flex-direction: column; }
.shell { flex: 1; display: flex; min-height: 0; }
.side { display: none; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 0; position: relative; }
.page { flex: 1; min-height: 0; overflow: auto; padding: max(20px, calc(env(safe-area-inset-top, 0px) + 16px)) max(16px, env(safe-area-inset-right, 0px)) calc(var(--nav-h) + 24px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); -webkit-overflow-scrolling: touch; }
@media (max-width: 1023px) {
  .page > .page-inner > a.btn.ghost.sm:first-child { margin: 0 0 12px !important; min-height: 44px; padding: 0 12px; }
  .btn { min-height: 44px; }
}
.page-inner { max-width: 1180px; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 4px 0 16px; flex-wrap: wrap; }
.page-head p { margin: 4px 0 0; }

.tabbar { position: fixed; left: 0; right: 0; bottom: 0; height: calc(var(--nav-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: var(--asphalt); display: flex; z-index: 900; }
.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: #AEB4BB; text-decoration: none; font-size: 11.5px; font-weight: 500; position: relative; }
.tabbar a svg { width: 23px; height: 23px; }
.tabbar a.on { color: #fff; }
.tabbar a.on::before { content: ''; position: absolute; top: 0; left: 28%; right: 28%; height: 3px; background: var(--lane); border-radius: 0 0 3px 3px; }
.badge { position: absolute; top: 7px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--lane); color: var(--lane-ink); font: 700 11px/18px var(--f-body); text-align: center; }

@media (min-width: 1024px) {
  .tabbar { display: none; }
  .shell { overflow: hidden; }
  .side { display: flex; flex-direction: column; width: var(--side-w); height: 100%; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; background: var(--asphalt); color: #D5D9DD; padding: 18px 12px; gap: 2px; flex-shrink: 0; }
  .side > * { flex-shrink: 0; }
  .side .brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 20px; color: #fff; }
  .side .brand img { width: 100%; height: 52px; max-width: 190px; min-width: 0; object-fit: contain; object-position: left center; }
  .side .brand b { font: 700 19px/1.05 var(--f-cond); }
  .side a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px; text-decoration: none; color: #C5CAD0; font-weight: 500; position: relative; }
  .side a svg { width: 20px; height: 20px; flex-shrink: 0; }
  .side a:hover { background: var(--asphalt-2); color: #fff; }
  .side a.on { background: var(--asphalt-2); color: #fff; }
  .side a.on::before { content: ''; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 4px; background: var(--lane); border-radius: 0 3px 3px 0; }
  .side .badge { position: static; margin-left: auto; }
  .side .sep { height: 1px; background: #3D434A; margin: 12px 8px; }
  .side .label { font-size: 12px; color: #858D95; padding: 6px 12px 4px; }
  .side .me { margin-top: auto; padding: 12px; border-top: 1px solid #3D434A; font-size: 13px; }
  .side .me b { display: block; color: #fff; font-weight: 600; }
  .page { padding: 28px 32px 40px; }
}

/* ---------- Componentes ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 16px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .12s, border-color .12s; }
.btn:hover { border-color: var(--faint); }
.btn svg { width: 18px; height: 18px; }
.btn.primary { background: var(--lane); border-color: var(--lane); color: var(--lane-ink); }
.btn.primary:hover { filter: brightness(0.94); }
.btn.dark { background: var(--asphalt); border-color: var(--asphalt); color: #fff; }
.btn.danger { color: var(--busy); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.sm { height: 34px; padding: 0 12px; font-size: 14px; }
.btn.block { width: 100%; }
.btn.wa { background: #1FA855; border-color: #1FA855; color: #fff; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.icon-btn { width: 42px; height: 42px; padding: 0; border-radius: 50%; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; } .row.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 640px) { .grid3 { grid-template-columns: 1fr 1fr; } }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.card.flush { padding: 0; overflow: hidden; }
.card h3 { margin-bottom: 10px; }

label.f { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 500; color: var(--mute); }
.in, select.in, textarea.in { height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); width: 100%; font-size: 15px; }
textarea.in { height: auto; min-height: 84px; padding: 10px 12px; resize: vertical; }
.in:focus { border-color: var(--asphalt); outline: none; box-shadow: 0 0 0 3px rgba(255,180,0,.35); }
.check { display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--ink); cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--asphalt); }

/* Placa de código: la seña de identidad visual del inventario */
.plate { display: inline-flex; align-items: center; height: 22px; padding: 0 7px; border-radius: 4px; background: var(--asphalt); color: #fff; font: 700 13.5px/1 var(--f-cond); letter-spacing: .04em; white-space: nowrap; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.18); }
:root[data-theme="dark"] .plate { background: #3A4047; }
.plate.lg { height: 30px; font-size: 18px; padding: 0 10px; }

.chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); font-size: 13.5px; font-weight: 500; cursor: pointer; white-space: nowrap; user-select: none; }
.chip.on { background: var(--asphalt); border-color: var(--asphalt); color: #fff; }
.chip .dot { width: 9px; height: 9px; border-radius: 50%; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips.scroll::-webkit-scrollbar { display: none; }

.st { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 12px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.st::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.st.libre, .st.aceptada, .st.confirmado { background: var(--free-soft); color: var(--free); }
.st.apartado, .st.enviada { background: var(--hold-soft); color: var(--hold); }
.st.parcial { background: var(--part-soft); color: var(--part); }
.st.ocupado, .st.rechazada, .st.cancelado { background: var(--busy-soft); color: var(--busy); }
.st.vencida, .st.mantenimiento, .st.borrador, .st.inactivo { background: var(--sunk); color: var(--mute); }

.empty { text-align: center; padding: 48px 20px; color: var(--mute); }
.empty h3 { color: var(--ink); margin-bottom: 6px; }

table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: left; font-weight: 600; font-size: 12.5px; color: var(--mute); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--sunk); position: sticky; top: 0; }
table.t td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tr.click { cursor: pointer; } table.t tr.click:hover td { background: var(--sunk); }
.t-wrap { overflow: auto; max-height: calc(100vh - 220px); }
.right { text-align: right; }

/* ---------- Mapa ---------- */
.map-view { position: absolute; inset: 0 0 calc(var(--nav-h) + env(safe-area-inset-bottom)) 0; display: flex; }
@media (min-width: 1024px) { .map-view { bottom: 0; } }
.map-wrap { position: relative; flex: 1; min-width: 0; }
#map { position: absolute; inset: 0; background: #DDE1E3; }
.map-top { position: absolute; top: calc(10px + env(safe-area-inset-top)); left: 10px; right: 10px; z-index: 600; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.map-top > * { pointer-events: auto; }
.search { display: flex; align-items: center; gap: 4px; height: 50px; background: var(--surface); border-radius: 12px; box-shadow: var(--shadow); padding: 0 6px 0 14px; }
.search svg.lead { width: 20px; height: 20px; color: var(--mute); flex-shrink: 0; }
.search input { flex: 1; border: 0; background: transparent; height: 100%; font-size: 16px; min-width: 0; outline: none; }
.search .fbtn { position: relative; }
.search .fbtn .badge { top: 2px; left: auto; right: 0; }
.range-chip { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border-radius: 18px; background: var(--asphalt); color: #fff; font-weight: 600; font-size: 14px; box-shadow: var(--shadow); border: 0; cursor: pointer; }
.range-chip svg { width: 16px; height: 16px; color: var(--lane); }
.legend { display: flex; gap: 6px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.legend .chip { box-shadow: var(--shadow); border-color: transparent; height: 30px; font-size: 13px; }
.legend .chip.off { opacity: .45; }
.legend .chip.on { background: var(--surface); color: var(--ink); }
.map-fabs { position: absolute; right: 12px; bottom: 16px; z-index: 600; display: flex; flex-direction: column; gap: 10px; }
.fab { width: 50px; height: 50px; border-radius: 50%; border: 0; background: var(--surface); box-shadow: var(--shadow); display: grid; place-items: center; cursor: pointer; color: var(--ink); }
.fab svg { width: 22px; height: 22px; }
.fab.on { background: var(--asphalt); color: var(--lane); }
.count-pill { position: absolute; left: 12px; bottom: 22px; z-index: 600; background: var(--surface); box-shadow: var(--shadow); border-radius: 18px; height: 36px; padding: 0 14px; display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; border: 0; cursor: pointer; }
.count-pill b { font: 700 17px var(--f-cond); }
@media (min-width: 1024px) {
  .map-top { left: 16px; right: auto; width: 440px; top: 16px; }
  .map-fabs { bottom: 110px; right: 16px; }
  .count-pill { bottom: 24px; left: 16px; }
  .results { display: flex !important; }
}

/* Marcadores: señal rectangular con el color del estado */
.mk { width: 16px; height: 16px; border-radius: 4px; border: 2.5px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.45); }
.mk.libre { background: var(--free); } .mk.apartado { background: var(--hold); } .mk.parcial { background: var(--part); } .mk.ocupado { background: var(--busy); } .mk.mantenimiento { background: var(--maint); }
.mk.sel { transform: scale(1.5); border-color: var(--lane); z-index: 1000 !important; }
.mk.incart { border-color: var(--lane); border-width: 3.5px; }
/* Grupos: anillo que muestra la mezcla libre/ocupado del grupo */
.cl { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; box-shadow: 0 2px 8px rgba(0,0,0,.35); }
.cl span { width: 34px; height: 34px; border-radius: 50%; background: var(--asphalt); color: #fff; display: grid; place-items: center; font: 700 14px var(--f-cond); }
.cl.s { width: 40px; height: 40px; } .cl.s span { width: 29px; height: 29px; font-size: 13px; }
.cl.l { width: 56px; height: 56px; } .cl.l span { width: 42px; height: 42px; font-size: 16px; }
.me-dot { width: 18px; height: 18px; border-radius: 50%; background: #2F7BF6; border: 3px solid #fff; box-shadow: 0 0 0 6px rgba(47,123,246,.25); }
.leaflet-container { font-family: var(--f-body); }
.leaflet-control-attribution { font-size: 10px; }
.leaflet-control-zoom { display: none; }
@media (min-width: 1024px) { .leaflet-control-zoom { display: block; } }

/* Hoja inferior de vista previa */
.peek { position: absolute; left: 10px; right: 10px; bottom: 10px; z-index: 700; background: var(--surface); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; display: flex; transform: translateY(calc(100% + 120px)); transition: transform .22s cubic-bezier(.2,.8,.2,1); }
.peek.open { transform: none; }
.peek .ph { width: 118px; flex-shrink: 0; background: var(--sunk) center/cover; }
.peek .bd { flex: 1; padding: 12px 12px 12px 14px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.peek .nm { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.peek .acts { display: flex; gap: 8px; margin-top: 6px; }
.peek .x { position: absolute; top: 6px; right: 6px; width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(0,0,0,.05); cursor: pointer; display: grid; place-items: center; }
@media (min-width: 1024px) { .peek { left: 16px; right: auto; width: 440px; bottom: 72px; } }

/* Panel de resultados (escritorio) */
.results { display: none; width: 380px; flex-direction: column; background: var(--surface); border-left: 1px solid var(--line); }
.results .rh { padding: 16px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.results .rl { flex: 1; overflow: auto; }

/* Fila de espacio (lista) */
.sp-row { display: flex; gap: 12px; padding: 12px; border-bottom: 1px solid var(--line); cursor: pointer; align-items: stretch; background: var(--surface); }
.sp-row:hover { background: var(--sunk); }
.sp-row .ph { width: 92px; height: 66px; border-radius: 6px; background: var(--sunk) center/cover; flex-shrink: 0; }
.sp-row .bd { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.sp-row .nm { font-weight: 600; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-row .meta { font-size: 13px; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-row .pr { text-align: right; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-end; }
.sp-row .pr b { font: 700 17px var(--f-cond); }
.add-btn { width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; cursor: pointer; }
.add-btn.in { background: var(--lane); border-color: var(--lane); color: var(--lane-ink); }
.add-btn svg { width: 18px; height: 18px; }

/* ---------- Hojas / diálogos ---------- */
.sheet-bg { position: fixed; inset: 0; background: rgba(15,17,20,.45); z-index: 1000; display: flex; align-items: flex-end; justify-content: center; animation: fade .15s; }
.sheet { background: var(--surface); width: 100%; max-width: 560px; max-height: 92vh; border-radius: 16px 16px 0 0; display: flex; flex-direction: column; animation: up .22s cubic-bezier(.2,.8,.2,1); padding-bottom: env(safe-area-inset-bottom); }
.sheet .sh { padding: 16px 18px 10px; display: flex; justify-content: space-between; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); }
.sheet .sb { padding: 16px 18px; overflow: auto; display: flex; flex-direction: column; gap: 16px; }
.sheet .sf { padding: 12px 18px 16px; border-top: 1px solid var(--line); display: flex; gap: 10px; }
.sheet .sf .btn { flex: 1; }
.sheet.wide { max-width: 760px; }
@media (min-width: 700px) { .sheet-bg { align-items: center; } .sheet { border-radius: 16px; } }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
.fgroup h4 { margin: 0 0 8px; font-size: 13px; color: var(--mute); font-weight: 600; }

.toast { position: fixed; left: 50%; bottom: calc(var(--nav-h) + 20px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--asphalt); color: #fff; padding: 12px 18px; border-radius: 10px; z-index: 2000; box-shadow: var(--shadow); font-weight: 500; max-width: calc(100vw - 32px); animation: up .2s; white-space: pre-line; }
.toast.err { background: var(--busy); }
@media (min-width: 1024px) { .toast { bottom: 28px; } }

/* ---------- Ficha ---------- */
.detail { max-width: 980px; margin: 0 auto; }
.gallery { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; border-radius: 12px; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
.gallery::-webkit-scrollbar { display: none; }
.gallery img { height: 240px; width: auto; max-width: none; aspect-ratio: 16/10; object-fit: cover; border-radius: 10px; scroll-snap-align: start; background: var(--sunk); cursor: zoom-in; }
@media (min-width: 1024px) { .gallery { margin: 0; padding: 0; } .gallery img { height: 320px; } }
.d-head { margin: 18px 0 14px; display: flex; flex-direction: column; gap: 8px; }
.d-head h1 { font-size: 30px; }
.specs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.specs > div { padding: 11px 14px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); }
.specs > div:nth-child(2n) { border-right: 0; }
.specs span { display: block; font-size: 12.5px; color: var(--mute); }
.specs b { font-weight: 600; }
@media (min-width: 760px) { .specs { grid-template-columns: repeat(4, 1fr); } .specs > div:nth-child(2n) { border-right: 1px solid var(--line); } .specs > div:nth-child(4n) { border-right: 0; } }
.d-grid { display: grid; gap: 16px; }
@media (min-width: 1024px) { .d-grid { grid-template-columns: 1fr 340px; align-items: start; } .d-aside { position: sticky; top: 0; } }
.price-box { background: var(--asphalt); color: #fff; border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.price-box .big { font: 700 34px/1 var(--f-cond); }
.price-box .mute { color: #AEB4BB; }

/* Carril de disponibilidad de 12 meses */
.lane { display: grid; grid-template-columns: repeat(12, 1fr); gap: 3px; }
.lane i { height: 26px; border-radius: 3px; display: block; position: relative; }
.lane i.libre { background: var(--free); } .lane i.parcial { background: repeating-linear-gradient(135deg, var(--free) 0 5px, var(--busy) 5px 10px); } .lane i.apartado { background: var(--hold); } .lane i.ocupado { background: var(--busy); }
.lane-m { display: grid; grid-template-columns: repeat(12, 1fr); gap: 3px; margin-top: 4px; font-size: 11.5px; color: var(--mute); text-align: center; }
.bk { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.bk:last-child { border-bottom: 0; }
.bk .when { font-weight: 600; font-size: 14px; }

/* ---------- Cotización ---------- */
.ci { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: start; }
.ci .ph { width: 64px; height: 48px; border-radius: 5px; background: var(--sunk) center/cover; }
.ci .dates { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.ci .dates input { height: 34px; font-size: 13.5px; padding: 0 8px; width: auto; }
.ci .warn { color: var(--busy); font-size: 12.5px; font-weight: 600; margin-top: 4px; }
.totals { display: flex; flex-direction: column; gap: 6px; }
.totals .r { display: flex; justify-content: space-between; }
.totals .tot { font: 700 26px var(--f-cond); border-top: 3px solid var(--lane); padding-top: 8px; margin-top: 4px; }
.cart-grid { display: grid; gap: 16px; }
@media (min-width: 1024px) { .cart-grid { grid-template-columns: 1fr 380px; align-items: start; } }
.done-hero { background: var(--asphalt); color: #fff; border-radius: 14px; padding: 22px; display: flex; flex-direction: column; gap: 6px; }
.done-hero .n { font: 700 30px var(--f-cond); }
.share-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ---------- Tablero ---------- */
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 16px; }
@media (min-width: 900px) { .kpis { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.kpi .v { font: 700 32px/1 var(--f-cond); }
.kpi .l { font-size: 13px; color: var(--mute); }
.kpi.main { background: var(--asphalt); color: #fff; border-color: var(--asphalt); grid-column: span 2; }
@media (min-width: 900px) { .kpi.main { grid-column: auto; } }
.kpi.main .l { color: #AEB4BB; }
.occ-bar { display: flex; height: 10px; border-radius: 5px; overflow: hidden; background: #4A5057; margin-top: 8px; }
.occ-bar i { display: block; }
.dash { display: grid; gap: 16px; }
@media (min-width: 1024px) { .dash { grid-template-columns: 1fr 1fr; } .dash .wide { grid-column: span 2; } }
.hbar { display: grid; grid-template-columns: 110px 1fr 70px; gap: 10px; align-items: center; font-size: 14px; padding: 5px 0; }
.hbar .tr { height: 12px; background: var(--sunk); border-radius: 6px; overflow: hidden; display: flex; }
.hbar .tr i { background: var(--busy); display: block; }
.list-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; cursor: pointer; }
.list-row:last-child { border-bottom: 0; }
svg.chart text { font: 500 11px var(--f-body); fill: var(--mute); }

/* ---------- Login / asistente ---------- */
.auth { min-height: 100%; display: grid; place-items: center; padding: 24px 16px; background: var(--asphalt); position: relative; overflow: hidden; }
.auth::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 6px; background: repeating-linear-gradient(90deg, var(--lane) 0 46px, transparent 46px 80px); opacity: .9; }
.auth .box { position: relative; width: 100%; max-width: 420px; background: var(--surface); border-radius: 16px; padding: 28px 24px; box-shadow: 0 20px 60px rgba(0,0,0,.4); display: flex; flex-direction: column; gap: 16px; }
.auth .box.wide { max-width: 620px; }
.auth .logo { width: 100%; height: 64px; max-width: 240px; object-fit: contain; object-position: left center; align-self: flex-start; }
#lg img, #lgd img { width: 150px; height: 56px; object-fit: contain; object-position: center; }
.product-brand { display: flex; align-items: center; gap: 10px; }
.product-brand img, .side .brand.product-brand img { width: 220px; max-width: 100%; height: 126px; flex: 0 1 220px; object-fit: contain; }
.auth h1 { font-size: 32px; }
.steps { display: flex; gap: 6px; }
.steps i { flex: 1; height: 4px; border-radius: 2px; background: var(--line); }
.steps i.on { background: var(--lane); }
.demo-users { font-size: 13px; color: var(--mute); background: var(--sunk); border-radius: 8px; padding: 10px 12px; }
.demo-users button { border: 0; background: none; padding: 2px 0; color: var(--ink); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }

/* Selector de ubicación */
.pick-map { height: 280px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); position: relative; }
.pick-map .cross { position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; margin: -22px 0 0 -11px; z-index: 500; pointer-events: none; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.thumbs .t { position: relative; aspect-ratio: 16/10; border-radius: 8px; background: var(--sunk) center/cover; overflow: hidden; }
.thumbs .t .acts { position: absolute; right: 4px; top: 4px; display: flex; gap: 4px; }
.thumbs .t .acts button { width: 28px; height: 28px; border-radius: 6px; border: 0; background: rgba(0,0,0,.6); color: #fff; cursor: pointer; display: grid; place-items: center; }
.thumbs .t .acts svg { width: 15px; height: 15px; }
.thumbs .t .cov { position: absolute; left: 4px; bottom: 4px; background: var(--lane); color: var(--lane-ink); font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 4px; }
.drop { display: block; border: 2px dashed var(--line); border-radius: 10px; padding: 22px; text-align: center; color: var(--mute); cursor: pointer; }
.drop:hover { border-color: var(--faint); }
.progress { height: 8px; background: var(--sunk); border-radius: 4px; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--lane); transition: width .2s; }
.offline-bar { background: var(--hold); color: #fff; text-align: center; font-size: 13px; font-weight: 600; padding: 4px; }
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.92); z-index: 3000; display: grid; place-items: center; }
.lightbox img { max-width: 96vw; max-height: 90vh; }
.more-list a { display: flex; align-items: center; gap: 14px; padding: 14px 4px; border-bottom: 1px solid var(--line); text-decoration: none; font-weight: 500; }
.more-list a svg { width: 22px; height: 22px; color: var(--mute); }
@media (max-width: 640px) { .hide-s { display: none; } }
.drop > svg, .empty > svg { width: 30px; height: 30px; display: block; margin: 0 auto 8px; }
.list-row svg { width: 16px; height: 16px; vertical-align: -3px; }

@media (max-width: 640px) {
  table.stack-s thead { display: none; }
  table.stack-s tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
  table.stack-s td { padding: 0; border: 0; }
  table.stack-s td.hide-s { display: none; }
  table.stack-s td:nth-child(1) { grid-column: 1; grid-row: 1; }
  table.stack-s td:nth-child(2) { grid-column: 1; grid-row: 2; }
  table.stack-s td:nth-child(4) { grid-column: 2; grid-row: 2; justify-self: end; align-self: start; }
  table.stack-s td:nth-child(5) { grid-column: 2; grid-row: 1; }
}
.lg-d { display: none !important; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .lg-l { display: none !important; } :root:not([data-theme="light"]) .lg-d { display: block !important; } }
:root[data-theme="dark"] .lg-l { display: none !important; } :root[data-theme="dark"] .lg-d { display: block !important; }
