/* BTMS Logistics, el marketplace. Material «Cristal» (vidrio, como el resto de los sistemas de BTMS), el navy de BTMS y el ámbar del sol.
   Todos los colores son variables; el modo oscuro las redefine (por el sistema o por data-theme). */
:root {
  --bg: #eef1f7; --ink: #0e1a3a; --ink-2: #46526f; --ink-3: #6b7796;
  --brand: #23397f; --brand-ink: #ffffff; --brand-soft: rgba(35, 57, 127, .1);
  --sol: #c97700; --sol-soft: rgba(224, 138, 0, .14);
  --ok: #0f7d57; --ok-soft: rgba(15, 125, 87, .12); --warn: #9c5a00; --warn-soft: rgba(224, 138, 0, .15); --bad: #c0301d; --bad-soft: rgba(192, 48, 29, .1);
  --line: rgba(15, 26, 58, .09); --line-strong: rgba(15, 26, 58, .18); --fill: rgba(15, 26, 58, .055); --fill-2: rgba(15, 26, 58, .09);
  --g1: rgba(255, 255, 255, .72); --g2: rgba(255, 255, 255, .36); --rim: rgba(255, 255, 255, .95);
  --bar: rgba(238, 241, 247, .7);
  --luz1: rgba(35, 57, 127, .1); --luz2: rgba(120, 200, 225, .12); --luz3: rgba(240, 190, 120, .13);
  --shadow: 0 1px 1px rgba(30, 50, 110, .05), 0 14px 40px rgba(30, 50, 120, .11);
  --shadow-hi: 0 2px 3px rgba(30, 50, 110, .06), 0 22px 54px rgba(30, 50, 120, .18);
  --radius: 22px; --radius-sm: 14px; --top: 64px;
  --font: "Inter Tight", -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a1022; --ink: #eef2ff; --ink-2: #b5bfdc; --ink-3: #8592b6;
    --brand: #8fb0ff; --brand-ink: #0b1224; --brand-soft: rgba(143, 176, 255, .16);
    --sol: #ffb259; --sol-soft: rgba(255, 178, 89, .15);
    --ok: #4fd49a; --ok-soft: rgba(79, 212, 154, .14); --warn: #f5b64a; --warn-soft: rgba(245, 182, 74, .14); --bad: #ff8277; --bad-soft: rgba(255, 130, 119, .15);
    --line: rgba(255, 255, 255, .1); --line-strong: rgba(255, 255, 255, .2); --fill: rgba(255, 255, 255, .08); --fill-2: rgba(255, 255, 255, .13);
    --g1: rgba(255, 255, 255, .12); --g2: rgba(255, 255, 255, .04); --rim: rgba(255, 255, 255, .22);
    --bar: rgba(10, 16, 34, .66);
    --luz1: rgba(35, 57, 127, .5); --luz2: rgba(27, 138, 166, .16); --luz3: rgba(176, 112, 42, .13);
    --shadow: 0 0 0 1px rgba(255, 255, 255, .05), 0 14px 40px rgba(0, 0, 0, .4); --shadow-hi: 0 0 0 1px rgba(255, 255, 255, .1), 0 22px 54px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0a1022; --ink: #eef2ff; --ink-2: #b5bfdc; --ink-3: #8592b6;
  --brand: #8fb0ff; --brand-ink: #0b1224; --brand-soft: rgba(143, 176, 255, .16);
  --sol: #ffb259; --sol-soft: rgba(255, 178, 89, .15);
  --ok: #4fd49a; --ok-soft: rgba(79, 212, 154, .14); --warn: #f5b64a; --warn-soft: rgba(245, 182, 74, .14); --bad: #ff8277; --bad-soft: rgba(255, 130, 119, .15);
  --line: rgba(255, 255, 255, .1); --line-strong: rgba(255, 255, 255, .2); --fill: rgba(255, 255, 255, .08); --fill-2: rgba(255, 255, 255, .13);
  --g1: rgba(255, 255, 255, .12); --g2: rgba(255, 255, 255, .04); --rim: rgba(255, 255, 255, .22);
  --bar: rgba(10, 16, 34, .66);
  --luz1: rgba(35, 57, 127, .5); --luz2: rgba(27, 138, 166, .16); --luz3: rgba(176, 112, 42, .13);
  --shadow: 0 0 0 1px rgba(255, 255, 255, .05), 0 14px 40px rgba(0, 0, 0, .4); --shadow-hi: 0 0 0 1px rgba(255, 255, 255, .1), 0 22px 54px rgba(0, 0, 0, .5);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink); font: 400 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
/* las luces de fondo que el vidrio deja ver */
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(60% 50% at 12% -5%, var(--luz1), transparent 70%), radial-gradient(48% 42% at 92% 8%, var(--luz2), transparent 70%), radial-gradient(60% 50% at 72% 108%, var(--luz3), transparent 70%); }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { letter-spacing: -.03em; line-height: 1.1; text-wrap: balance; }
p { text-wrap: pretty; }
a { color: var(--brand); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 60%, transparent); outline-offset: 2px; border-radius: 10px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--ink-3); } .small { font-size: 13px; } .num { font-variant-numeric: tabular-nums; }

/* el material */
.vidrio { background: linear-gradient(150deg, var(--g1), var(--g2)); border: 1px solid var(--line); border-radius: var(--radius);
  -webkit-backdrop-filter: blur(22px) saturate(180%); backdrop-filter: blur(22px) saturate(180%); box-shadow: var(--shadow), inset 0 1px 0 var(--rim); }

/* barra de arriba */
.barra { position: sticky; top: 0; z-index: 30; height: var(--top); display: flex; align-items: center; gap: 22px; padding: 0 max(20px, env(safe-area-inset-left, 0px));
  background: var(--bar); -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%); border-bottom: 1px solid var(--line); }
.marca { white-space: nowrap; display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -.04em; font-size: 18px; color: var(--ink); }
.marca i { width: 28px; height: 28px; border-radius: 9px; background: linear-gradient(145deg, #3a56b4, #16275c); display: grid; place-items: center; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35); }
.marca i svg { width: 17px; height: 17px; stroke: #fff; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.marca small { font-weight: 500; color: var(--ink-3); font-size: 12px; letter-spacing: 0; margin-left: 2px; }
.nav { display: flex; gap: 4px; margin-left: 8px; }
.nav a { padding: 8px 14px; border-radius: 999px; color: var(--ink-2); font-weight: 600; font-size: 14px; }
.nav a:hover { background: var(--fill); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--ink); color: var(--bg); }
.barra .fin { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.chip-actor { display: flex; align-items: center; gap: 9px; padding: 5px 12px 5px 5px; border-radius: 999px; background: var(--fill); border: 1px solid var(--line); cursor: pointer; font-weight: 600; font-size: 13px; }
.chip-actor:hover { background: var(--fill-2); }
.avatar { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 11px; color: #fff; background: linear-gradient(145deg, #3a56b4, #16275c); flex: none; }
.avatar.sol { background: linear-gradient(145deg, #f2a04a, #b86a10); }
.demo-sello { font-size: 11px; font-weight: 800; letter-spacing: .08em; padding: 4px 9px; border-radius: 999px; background: var(--sol-soft); color: var(--sol); }

/* la página */
main { width: 100%; max-width: 1120px; margin: 0 auto; padding: 28px max(20px, env(safe-area-inset-left, 0px)) 120px; }
.cabeza { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.cabeza h1 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; letter-spacing: -.045em; }
.cabeza p { color: var(--ink-2); margin-top: 6px; max-width: 60ch; }

/* botones y campos */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--fill); font-weight: 650; cursor: pointer; transition: transform .12s ease, background .15s; }
.btn:hover { background: var(--fill-2); }
.btn:active { transform: scale(.97); }
.btn.pri { background: var(--ink); color: var(--bg); border-color: transparent; }
.btn.pri:hover { background: color-mix(in srgb, var(--ink) 88%, var(--brand)); }
.btn.sol { background: linear-gradient(145deg, #ffbf74, #f09a2c); color: #2a1900; border-color: transparent; box-shadow: 0 6px 18px rgba(240, 154, 44, .35); }
.btn.sm { min-height: 34px; padding: 0 14px; font-size: 13px; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn[disabled] { opacity: .45; pointer-events: none; }
.campo { display: grid; gap: 6px; min-width: 0; }
.campo > span { font-size: 12px; font-weight: 700; letter-spacing: .02em; color: var(--ink-2); }
.campo input, .campo select, .campo textarea { width: 100%; min-height: 44px; padding: 10px 14px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: color-mix(in srgb, var(--bg) 55%, transparent); }
.campo textarea { min-height: 150px; resize: vertical; line-height: 1.5; }
.campo input:focus, .campo select:focus, .campo textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.campo .ayuda { font-size: 12px; color: var(--ink-3); font-weight: 400; letter-spacing: 0; }
.campo.mal input, .campo.mal select { border-color: var(--bad); box-shadow: 0 0 0 4px var(--bad-soft); }
.campo .error { color: var(--bad); font-size: 12px; font-weight: 600; letter-spacing: 0; }
.grilla { display: grid; gap: 14px; grid-template-columns: repeat(12, 1fr); }
.grilla > * { grid-column: span 12; }
@media (min-width: 720px) { .c2 { grid-column: span 2 !important; } .c3 { grid-column: span 3 !important; } .c4 { grid-column: span 4 !important; } .c6 { grid-column: span 6 !important; } .c8 { grid-column: span 8 !important; } }

/* segmentos (como los de iOS) */
.seg { display: inline-flex; padding: 4px; gap: 2px; border-radius: 999px; background: var(--fill); border: 1px solid var(--line); }
.seg button { border: 0; background: transparent; padding: 8px 16px; border-radius: 999px; font-weight: 650; font-size: 14px; color: var(--ink-2); cursor: pointer; min-height: 36px; }
.seg button[disabled] { opacity: .4; cursor: not-allowed; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); box-shadow: 0 2px 8px rgba(0, 0, 0, .15); }

/* filtros */
.filtros { padding: 16px; display: grid; gap: 12px; margin-bottom: 18px; }
.filtros .fila { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; }
.filtros .campo { flex: 1 1 170px; }
.filtros .campo input { min-height: 40px; }
.interruptor { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; font-size: 14px; min-height: 40px; user-select: none; }
.interruptor input { appearance: none; width: 42px; height: 26px; border-radius: 999px; background: var(--fill-2); position: relative; cursor: pointer; transition: background .2s; border: 1px solid var(--line-strong); }
.interruptor input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .2s; }
.interruptor input:checked { background: var(--ok); border-color: transparent; }
.interruptor input:checked::after { transform: translateX(16px); }

.solo-movil { display: none; }
@media (max-width: 640px) { .solo-movil { display: inline-flex; margin-left: auto; } .filtros .avanzados { display: none; } .filtros.abiertos .avanzados { display: flex; } .filtros { padding: 12px; } }

/* tarjeta de publicación */
.lista { display: grid; gap: 14px; }
.pub { padding: 20px 22px; display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr) auto; transition: transform .18s ease, box-shadow .18s; }
.pub:hover { transform: translateY(-2px); box-shadow: var(--shadow-hi), inset 0 1px 0 var(--rim); }
.pub .tipo { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; }
.pub .tipo::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.pub .tipo.libre { color: var(--sol); } .pub .tipo.libre::before { background: var(--sol); box-shadow: 0 0 0 4px var(--sol-soft); }
.pub .tipo.carga { color: var(--brand); }
.ruta { font-size: clamp(19px, 2.4vw, 25px); font-weight: 750; letter-spacing: -.035em; line-height: 1.15; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; margin-top: 8px; }
.ruta .flecha { color: var(--ink-3); font-weight: 500; display: inline-flex; align-self: center; }
.ruta .flecha svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ruta .vacio { color: var(--ink-3); font-weight: 500; font-style: normal; }
.datos { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.dato { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; background: var(--fill); font-size: 13px; font-weight: 550; color: var(--ink-2); }
.dato b { color: var(--ink); font-weight: 700; }
.dato.ok { background: var(--ok-soft); color: var(--ok); } .dato.warn { background: var(--warn-soft); color: var(--warn); }
.precio { text-align: right; display: grid; align-content: start; gap: 4px; min-width: 150px; }
.precio .monto { font-size: clamp(24px, 3vw, 32px); font-weight: 800; letter-spacing: -.045em; font-variant-numeric: tabular-nums; line-height: 1; }
.precio .monto small { font-size: .5em; font-weight: 700; color: var(--ink-3); margin-right: 3px; letter-spacing: 0; }
.precio .convenir { font-size: 20px; font-weight: 700; color: var(--ink-2); }
.precio .por { font-size: 13px; color: var(--ink-3); font-weight: 550; }
.pub .pie { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding-top: 14px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-3); }
.pub .quien { display: flex; align-items: center; gap: 9px; color: var(--ink); font-weight: 650; }
.rol { font-size: 11px; font-weight: 750; padding: 3px 9px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); letter-spacing: .02em; }
.pub .pie .espacio { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.nueva { font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: 999px; background: var(--sol-soft); color: var(--sol); letter-spacing: .04em; }
.propia { font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: 999px; background: var(--fill-2); color: var(--ink-2); letter-spacing: .04em; }
@media (max-width: 640px) { .pub { grid-template-columns: 1fr; } .precio { text-align: left; } .pub .pie .espacio { margin-left: 0; width: 100%; } }

/* estados vacíos, avisos y esqueleto */
.vacio-caja { padding: 48px 24px; text-align: center; display: grid; gap: 10px; justify-items: center; }
.vacio-caja h3 { font-size: 20px; }
.vacio-caja p { color: var(--ink-2); max-width: 46ch; }
.aviso { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--warn-soft); color: var(--ink); font-size: 14px; }
.aviso.malo { background: var(--bad-soft); } .aviso.bien { background: var(--ok-soft); }
.aviso svg { flex: none; width: 20px; height: 20px; margin-top: 1px; stroke: var(--warn); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.esqueleto { height: 148px; border-radius: var(--radius); background: linear-gradient(100deg, var(--fill) 30%, var(--fill-2) 50%, var(--fill) 70%); background-size: 220% 100%; animation: brillo 1.4s linear infinite; }
@keyframes brillo { to { background-position: -220% 0; } }
@media (prefers-reduced-motion: reduce) { .esqueleto { animation: none; } .pub, .btn { transition: none; } }

/* publicar */
.pegar { padding: 22px; display: grid; gap: 16px; }
.pegar textarea { min-height: 190px; font-size: 16px; }
.acciones { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.ejemplos { display: flex; gap: 8px; flex-wrap: wrap; }
.borrador { padding: 20px 22px; display: grid; gap: 14px; }
.borrador.fuera { opacity: .5; }
.borrador header { display: flex; align-items: center; gap: 12px; }
.borrador header h3 { font-size: 17px; letter-spacing: -.02em; }
.borrador header .espacio { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.dudas { display: grid; gap: 6px; }
.duda { display: flex; gap: 8px; font-size: 13px; padding: 8px 12px; border-radius: 12px; background: var(--warn-soft); color: var(--ink); }
.duda::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--sol); margin-top: 7px; flex: none; }
.barra-fija { position: sticky; bottom: 16px; z-index: 20; display: flex; align-items: center; gap: 14px; padding: 12px 16px; margin-top: 18px; }
.barra-fija .espacio { margin-left: auto; display: flex; gap: 10px; }

/* mis publicaciones */
.estado { font-size: 12px; font-weight: 750; padding: 4px 10px; border-radius: 999px; background: var(--fill-2); color: var(--ink-2); }
.estado.Activa { background: var(--ok-soft); color: var(--ok); } .estado.Pausada { background: var(--warn-soft); color: var(--warn); } .estado.Vencida, .estado.Cubierta { background: var(--fill-2); color: var(--ink-3); }

/* entrar y registrar */
.puerta { max-width: 520px; margin: 6vh auto 0; padding: 32px; display: grid; gap: 22px; }
.puerta h1 { font-size: 32px; font-weight: 800; letter-spacing: -.045em; }
.puerta .sub { color: var(--ink-2); }
.tipos { display: grid; gap: 10px; }
.tipo-op { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-radius: var(--radius-sm); border: 1.5px solid var(--line-strong); background: color-mix(in srgb, var(--bg) 50%, transparent); cursor: pointer; text-align: left; width: 100%; }
.tipo-op:hover { border-color: var(--brand); }
.tipo-op[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 4px var(--brand-soft); }
.tipo-op b { display: block; font-size: 15px; } .tipo-op > span:last-child > span { font-size: 13px; color: var(--ink-2); }
.tipo-op .ico { width: 38px; height: 38px; border-radius: 12px; background: var(--fill-2); display: grid; place-items: center; flex: none; }
.tipo-op .ico svg { width: 20px; height: 20px; stroke: var(--ink); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.actores-demo { display: grid; gap: 10px; }
.actor-op { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--fill); cursor: pointer; width: 100%; text-align: left; }
.actor-op:hover { background: var(--fill-2); }
.actor-op b { display: block; } .actor-op > span:last-child > span { font-size: 13px; color: var(--ink-2); }

/* aviso emergente */
#toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px); opacity: 0; z-index: 60; padding: 12px 20px; border-radius: 999px; font-weight: 650; font-size: 14px; transition: all .25s ease; pointer-events: none; max-width: calc(100vw - 32px); }
#toast.on { opacity: 1; transform: translateX(-50%); }
#toast.bad { background: var(--bad); color: #fff; } #toast:not(.bad) { background: var(--ink); color: var(--bg); }

/* menú del actor */
.menu { position: absolute; right: 20px; top: calc(var(--top) - 4px); width: 300px; padding: 10px; z-index: 40; display: grid; gap: 4px; }
.menu button { text-align: left; border: 0; background: transparent; padding: 10px 12px; border-radius: 12px; cursor: pointer; display: flex; gap: 10px; align-items: center; width: 100%; }
.menu button:hover { background: var(--fill); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; width: 100%; }

/* el mapa */
.chips-flota { display: flex; gap: 8px; flex-wrap: wrap; }
.chip-flota { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 14px 0 10px; border-radius: 999px; border: 1.5px solid var(--line-strong); background: transparent; cursor: pointer; font-weight: 650; font-size: 13px; color: var(--ink-2); }
.chip-flota i { width: 12px; height: 12px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 25%, transparent); }
.chip-flota small { color: var(--ink-3); font-weight: 600; }
.chip-flota[aria-pressed="true"] { border-color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); color: var(--ink); }
.chip-flota[aria-pressed="false"] i { background: var(--fill-2); box-shadow: none; }
.mapa-caja { padding: 8px; overflow: hidden; }
.mapa { height: min(60vh, 560px); min-height: 320px; border-radius: calc(var(--radius) - 8px); overflow: hidden; background: var(--fill); }
.mapa-leyenda { display: flex; gap: 18px; flex-wrap: wrap; padding: 10px 12px 4px; color: var(--ink-3); }
.mapa-leyenda span { display: inline-flex; align-items: center; gap: 7px; }
.anillo { width: 14px; height: 14px; border-radius: 50%; border: 3px solid; display: inline-block; background: var(--ink-3); }
.anillo.libre { border-color: var(--ok); } .anillo.ocupado { border-color: var(--warn); } .anillo.sin { border-color: var(--ink-3); background: transparent; }
.pin-c { background: none; border: 0; }
.pin { display: block; width: 22px; height: 22px; border-radius: 50%; background: var(--c); border: 4px solid; box-shadow: 0 2px 6px rgba(0, 0, 0, .35); }
.pin.libre { border-color: #19a974; } .pin.ocupado { border-color: #e0a030; } .pin.sin { border-color: #8a93a8; opacity: .8; }
.pin.mov { animation: pulso 1.8s ease-out infinite; }
@keyframes pulso { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--c) 55%, transparent); } 100% { box-shadow: 0 0 0 14px transparent; } }
.leaflet-popup-content-wrapper { border-radius: 14px; font-family: var(--font); }
.tabla-camiones { overflow-x: auto; padding: 6px 8px; }
.tabla-camiones table { width: 100%; border-collapse: collapse; min-width: 560px; }
.tabla-camiones th { text-align: left; font-size: 12px; color: var(--ink-3); font-weight: 700; padding: 10px 12px; letter-spacing: .02em; }
.tabla-camiones td { padding: 11px 12px; border-top: 1px solid var(--line); font-size: 14px; }
.tabla-camiones tr[data-u]:not([data-u=""]) { cursor: pointer; } .tabla-camiones tbody tr:hover { background: var(--fill); }
.punto-flota { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--c); margin-right: 9px; }

/* el asistente */
.asist-btn { position: fixed; right: max(20px, env(safe-area-inset-right, 0px)); bottom: max(20px, env(safe-area-inset-bottom, 0px)); z-index: 45; display: inline-flex; align-items: center; gap: 10px; padding: 0 20px 0 14px; min-height: 52px; border-radius: 999px; border: 1px solid var(--line-strong); cursor: pointer;
  background: linear-gradient(145deg, #3a56b4, #16275c); color: #fff; font-weight: 700; box-shadow: var(--shadow-hi); }
.asist-btn span { width: 24px; height: 24px; display: grid; place-items: center; } .asist-btn svg { width: 22px; height: 22px; stroke: #fff; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.asist { position: fixed; right: max(20px, env(safe-area-inset-right, 0px)); bottom: max(20px, env(safe-area-inset-bottom, 0px)); z-index: 50; width: 400px; height: min(620px, calc(100vh - 100px)); display: flex; flex-direction: column; overflow: hidden; box-shadow: var(--shadow-hi), inset 0 1px 0 var(--rim); background: linear-gradient(150deg, var(--g1), var(--g2)), var(--bg); }
.asist header { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.asist header b { display: block; font-size: 16px; } .asist header small { color: var(--ink-3); font-size: 12px; }
.asist header button { border: 0; background: var(--fill); width: 34px; height: 34px; border-radius: 50%; cursor: pointer; display: grid; place-items: center; }
.asist header svg { width: 16px; height: 16px; stroke: var(--ink); fill: none; stroke-width: 2; stroke-linecap: round; }
.asist-hilo { flex: 1; overflow-y: auto; padding: 14px; display: grid; align-content: start; gap: 10px; }
.asist-vacio { display: grid; gap: 10px; color: var(--ink-2); } .asist-vacio p { font-size: 14px; }
.chip { text-align: left; border: 1px solid var(--line-strong); background: var(--fill); border-radius: 14px; padding: 10px 14px; cursor: pointer; font-size: 14px; font-weight: 550; }
.chip:hover { background: var(--fill-2); }
.burbuja { max-width: 92%; padding: 10px 14px; border-radius: 18px; font-size: 14px; line-height: 1.45; }
.burbuja p { margin: 0 0 6px; } .burbuja p:last-child { margin: 0; } .burbuja ul { margin: 4px 0 0; padding-left: 18px; } .burbuja li { margin: 3px 0; }
.burbuja.usuario { justify-self: end; background: var(--ink); color: var(--bg); border-bottom-right-radius: 6px; }
.burbuja.asistente { justify-self: start; background: var(--fill-2); border-bottom-left-radius: 6px; }
.burbuja.error { background: var(--bad-soft); }
.burbuja.pensando { display: flex; gap: 5px; padding: 14px 16px; } .burbuja.pensando i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); animation: salto 1.1s ease-in-out infinite; } .burbuja.pensando i:nth-child(2) { animation-delay: .15s; } .burbuja.pensando i:nth-child(3) { animation-delay: .3s; }
@keyframes salto { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-5px); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .pin.mov, .burbuja.pensando i { animation: none; } }
.asist-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.asist-form input { flex: 1; min-width: 0; min-height: 42px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-strong); background: color-mix(in srgb, var(--bg) 55%, transparent); }
.asist-form input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }

/* pedidos, viajes, consola y ventanas */
.stack { display: grid; gap: 16px; }
.volver { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); font-weight: 600; font-size: 14px; margin-bottom: 14px; }
.volver .atras { width: 16px; height: 16px; transform: rotate(180deg); stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.bloque, .resumen { padding: 20px 22px; } .bloque h2 { font-size: 18px; letter-spacing: -.02em; margin-bottom: 12px; } .resumen .ruta { margin-top: 0; }
.estado-p { display: inline-flex; align-items: center; font-size: 12px; font-weight: 750; padding: 4px 12px; border-radius: 999px; background: var(--fill-2); color: var(--ink-2); margin-right: 8px; letter-spacing: .02em; white-space: nowrap; }
.estado-p.toca { background: var(--sol-soft); color: var(--sol); } .estado-p.espera { background: var(--brand-soft); color: var(--brand); } .estado-p.aceptado, .estado-p.viaje { background: var(--ok-soft); color: var(--ok); }
.estado-p.rechazado, .estado-p.vencido, .estado-p.retirado { background: var(--fill-2); color: var(--ink-3); }
.propuestas { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.propuestas li { padding: 12px 14px; border-radius: 16px; background: var(--fill); border: 1px solid var(--line); } .propuestas li.mia { background: var(--brand-soft); border-color: transparent; }
.p-cab { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 2px; } .nota { margin: 6px 0 0; color: var(--ink-2); font-size: 14px; }
.pasos { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .pasos i { width: 22px; height: 2px; background: var(--line-strong); }
.paso { padding: 6px 14px; border-radius: 999px; background: var(--fill); color: var(--ink-3); font-weight: 650; font-size: 13px; } .paso.on { background: var(--ok-soft); color: var(--ok); } .pasos.cancelado .paso.on { background: var(--bad-soft); color: var(--bad); }
.eventos { margin: 12px 0 0; padding-left: 18px; display: grid; gap: 6px; font-size: 14px; }
.hilo { display: grid; gap: 8px; max-height: 360px; overflow-y: auto; padding: 2px 2px 10px; } .hilo .burbuja small { display: block; margin-top: 4px; opacity: .65; font-size: 11px; }
.viaje-mapa { height: 240px; border-radius: 16px; overflow: hidden; background: var(--fill); }
.insignia { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--sol); color: #2a1900; font-size: 11px; font-weight: 800; margin-left: 7px; }
.nav a { display: inline-flex; align-items: center; } .pestanas a { display: flex; align-items: center; justify-content: center; }
.seg .num { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 4px; border-radius: 999px; background: var(--fill-2); font-size: 11px; }
.seg button[aria-pressed="true"] .num { background: color-mix(in srgb, var(--bg) 25%, transparent); }
.pedido-t { text-decoration: none; color: inherit; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { padding: 14px 16px; display: grid; gap: 2px; border-radius: 18px; } .kpi b { font-size: 28px; letter-spacing: -.04em; line-height: 1.1; } .kpi span { font-size: 12px; color: var(--ink-3); } .kpi.aten b { color: var(--sol); }
.tabla-admin table { min-width: 940px; } .tabla-admin td:first-child { min-width: 230px; } .tabla-admin .acc-fila .btn { white-space: nowrap; }
.acc-fila { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.clave { display: flex; gap: 10px; align-items: center; padding: 12px; border-radius: 14px; background: var(--fill); margin-top: 12px; } .clave code { flex: 1; overflow-wrap: anywhere; font-size: 13px; }
dialog.modal { border: 0; padding: 0; margin: auto; max-width: min(560px, calc(100vw - 24px)); width: 100%; color: var(--ink); background: linear-gradient(150deg, var(--g1), var(--g2)), var(--bg); box-shadow: var(--shadow-hi), inset 0 1px 0 var(--rim); }
dialog.modal::backdrop { background: rgba(8, 12, 26, .5); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.modal-c header { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px 6px; gap: 12px; } .modal-c h2 { font-size: 20px; }
.modal-c .x { border: 0; background: var(--fill); width: 34px; height: 34px; border-radius: 50%; cursor: pointer; display: grid; place-items: center; flex: none; }
.modal-c .x svg { width: 16px; height: 16px; stroke: var(--ink); fill: none; stroke-width: 2; stroke-linecap: round; }
.modal-cuerpo { padding: 8px 20px 16px; max-height: calc(100vh - 220px); overflow: auto; }
.modal-c footer { display: flex; justify-content: flex-end; gap: 10px; padding: 12px 20px 18px; border-top: 1px solid var(--line); }

/* celular */
.pestanas { display: none; }
@media (max-width: 760px) {
  .nav { display: none; }
  .marca small { display: none; }
  .barra { gap: 12px; }
  main { padding-top: 20px; padding-bottom: 130px; }
  .pestanas { display: flex; position: fixed; left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom, 0px)); z-index: 35; padding: 6px; gap: 4px; border-radius: 999px; }
  .pestanas a { flex: 1; text-align: center; padding: 11px 2px; border-radius: 999px; font-weight: 650; font-size: 12px; color: var(--ink-2); }
  .pestanas a[aria-current="page"] { background: var(--ink); color: var(--bg); }
  .menu { left: 12px; right: 12px; width: auto; }
  .asist-btn { bottom: calc(86px + env(safe-area-inset-bottom, 0px)); right: 14px; min-height: 48px; }
  .asist { left: 10px; right: 10px; width: auto; bottom: calc(86px + env(safe-area-inset-bottom, 0px)); height: min(70vh, calc(100vh - 170px)); }
  .barra-fija { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); flex-wrap: wrap; padding: 10px 12px; gap: 8px; }
  .barra-fija .espacio { margin-left: 0; width: 100%; }
  .barra-fija .espacio .btn { flex: 1; padding: 0 10px; }
  .barra-fija #cuenta { margin-left: auto; }
  .chip-actor .nombre { display: none; } .chip-actor { padding: 5px; }
  #toast { bottom: 96px; }
}

/* =====================================================================================================================================================
   LIQUID GLASS
   El vidrio va en lo que flota y se toca (barras, controles, paneles, ventanas); necesita algo que refractar, así que el fondo está vivo; nunca vidrio sobre
   vidrio (lo que va dentro de un panel de vidrio es tinta plana, no otro vidrio); y se adapta a transparencia reducida y a más contraste.
   ===================================================================================================================================================== */
:root {
  --v1: rgba(255, 255, 255, .50); --v2: rgba(255, 255, 255, .14); --rim-a: rgba(255, 255, 255, .98); --rim-b: rgba(255, 255, 255, .30); --brillo: rgba(255, 255, 255, .60);
  --sombra-v: 0 26px 60px -20px rgba(28, 48, 120, .30), 0 8px 20px -10px rgba(28, 48, 120, .20), 0 1px 2px rgba(28, 48, 120, .10);
  --sombra-v-hi: 0 34px 70px -18px rgba(28, 48, 120, .38), 0 12px 26px -10px rgba(28, 48, 120, .26), 0 1px 2px rgba(28, 48, 120, .12);
  --aur1: rgba(58, 104, 240, .66); --aur2: rgba(48, 196, 238, .54); --aur3: rgba(255, 158, 58, .50); --aur4: rgba(150, 104, 255, .44);
  --resorte: cubic-bezier(.2, .9, .25, 1.15); --suave: cubic-bezier(.3, .7, .2, 1);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --v1: rgba(255, 255, 255, .15); --v2: rgba(255, 255, 255, .04); --rim-a: rgba(255, 255, 255, .62); --rim-b: rgba(255, 255, 255, .08); --brillo: rgba(255, 255, 255, .20);
    --sombra-v: 0 28px 64px -18px rgba(0, 0, 0, .70), 0 10px 24px -10px rgba(0, 0, 0, .45), 0 1px 2px rgba(0, 0, 0, .4);
    --sombra-v-hi: 0 38px 78px -16px rgba(0, 0, 0, .78), 0 14px 30px -10px rgba(0, 0, 0, .5), 0 1px 2px rgba(0, 0, 0, .45);
    --aur1: rgba(58, 98, 255, .50); --aur2: rgba(24, 186, 222, .30); --aur3: rgba(255, 138, 56, .28); --aur4: rgba(140, 96, 255, .34);
  }
}
:root[data-theme="dark"] {
  --v1: rgba(255, 255, 255, .15); --v2: rgba(255, 255, 255, .04); --rim-a: rgba(255, 255, 255, .62); --rim-b: rgba(255, 255, 255, .08); --brillo: rgba(255, 255, 255, .20);
  --sombra-v: 0 28px 64px -18px rgba(0, 0, 0, .70), 0 10px 24px -10px rgba(0, 0, 0, .45), 0 1px 2px rgba(0, 0, 0, .4);
  --sombra-v-hi: 0 38px 78px -16px rgba(0, 0, 0, .78), 0 14px 30px -10px rgba(0, 0, 0, .5), 0 1px 2px rgba(0, 0, 0, .45);
  --aur1: rgba(58, 98, 255, .50); --aur2: rgba(24, 186, 222, .30); --aur3: rgba(255, 138, 56, .28); --aur4: rgba(140, 96, 255, .34);
}

/* el fondo vivo: luces de color que se mueven despacio detrás de todo (el vidrio las refracta) */
body::before { display: none; }
.aurora { position: fixed; inset: -10vmax; z-index: -1; pointer-events: none; overflow: hidden; }
.aurora i { position: absolute; border-radius: 50%; filter: blur(54px); will-change: transform; }
.aurora i:nth-child(1) { width: 62vmax; height: 62vmax; left: -14vmax; top: -18vmax; background: radial-gradient(circle at 40% 40%, var(--aur1), transparent 68%); animation: flota1 34s ease-in-out infinite alternate; }
.aurora i:nth-child(2) { width: 54vmax; height: 54vmax; right: -16vmax; top: 4vmax; background: radial-gradient(circle at 50% 50%, var(--aur2), transparent 68%); animation: flota2 41s ease-in-out infinite alternate; }
.aurora i:nth-child(3) { width: 58vmax; height: 58vmax; left: 18vmax; bottom: -30vmax; background: radial-gradient(circle at 50% 50%, var(--aur3), transparent 68%); animation: flota3 47s ease-in-out infinite alternate; }
.aurora i:nth-child(4) { width: 40vmax; height: 40vmax; right: 8vmax; bottom: -6vmax; background: radial-gradient(circle at 50% 50%, var(--aur4), transparent 68%); animation: flota1 53s ease-in-out infinite alternate-reverse; }
/* dos luces más, por el medio de la página: es donde están las tarjetas y el vidrio tiene que tener algo que refractar */
.aurora i:nth-child(5) { width: 34vmax; height: 34vmax; left: 24vmax; top: 34vmax; background: radial-gradient(circle at 50% 50%, var(--aur2), transparent 66%); animation: flota2 37s ease-in-out infinite alternate-reverse; }
.aurora i:nth-child(6) { width: 30vmax; height: 30vmax; right: 26vmax; top: 58vmax; background: radial-gradient(circle at 50% 50%, var(--aur4), transparent 66%); animation: flota3 43s ease-in-out infinite alternate; }
@keyframes flota1 { 0% { transform: translate3d(0, 0, 0) scale(1); } 50% { transform: translate3d(9vmax, 6vmax, 0) scale(1.12); } 100% { transform: translate3d(-4vmax, 12vmax, 0) scale(.95); } }
@keyframes flota2 { 0% { transform: translate3d(0, 0, 0) scale(1.05); } 50% { transform: translate3d(-10vmax, 8vmax, 0) scale(.92); } 100% { transform: translate3d(5vmax, -4vmax, 0) scale(1.14); } }
@keyframes flota3 { 0% { transform: translate3d(0, 0, 0) scale(1); } 50% { transform: translate3d(12vmax, -8vmax, 0) scale(1.1); } 100% { transform: translate3d(-8vmax, -3vmax, 0) scale(.94); } }

/* el material */
.vidrio { position: relative; isolation: isolate; background: linear-gradient(155deg, var(--v1), var(--v2)); border: 1px solid transparent;
  -webkit-backdrop-filter: blur(22px) saturate(220%) brightness(1.06); backdrop-filter: blur(22px) saturate(220%) brightness(1.06);
  box-shadow: inset 0 1px 0 var(--rim-a), inset 0 -1px 0 var(--rim-b), inset 0 0 22px rgba(255, 255, 255, .06), var(--sombra-v); transition: transform .45s var(--resorte), box-shadow .35s var(--suave), background .35s; }
/* el brillo de la luz: arriba, y un resplandor que sigue al puntero */
.vidrio::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, -20%), var(--brillo), transparent 62%), linear-gradient(180deg, var(--brillo), transparent 34%); opacity: .9; transition: opacity .3s; }
/* el borde luminoso: más claro en las esquinas que miran a la luz */
.vidrio::after { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.2px; pointer-events: none; z-index: 1;
  background: linear-gradient(135deg, var(--rim-a), var(--rim-b) 32%, transparent 52%, var(--rim-b) 76%, var(--rim-a));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); opacity: .85; }
.pestanas, .asist, #toast, .barra-fija, .menu, .barra { position: fixed; }
.barra-fija { position: sticky; } .menu { position: absolute; } .barra { position: sticky; }
dialog.modal { position: fixed; }

/* la barra de arriba: vidrio plano que deja pasar el color */
.barra { background: linear-gradient(180deg, var(--v1), var(--v2)); -webkit-backdrop-filter: blur(30px) saturate(200%); backdrop-filter: blur(30px) saturate(200%); border-bottom: 1px solid var(--rim-b);
  box-shadow: inset 0 -1px 0 var(--rim-b), 0 12px 32px -18px rgba(28, 48, 120, .35); }
.marca i { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 6px 14px -4px rgba(35, 57, 127, .6); }

/* el menú que sigue a quien está mirando: una pastilla de vidrio que se desliza al cambiar de sección */
.nav { position: relative; padding: 4px; border-radius: 999px; background: color-mix(in srgb, var(--fill) 70%, transparent); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .08), inset 0 0 0 1px var(--rim-b); gap: 2px; margin-left: 10px; }
.nav a { position: relative; z-index: 1; transition: color .25s; } .nav a:hover { background: transparent; color: var(--ink); }
.nav a[aria-current="page"] { background: transparent; color: var(--ink); }
.nav-ind, .seg-pulgar { position: absolute; top: 4px; bottom: 4px; left: 0; width: var(--w, 0); transform: translateX(var(--x, 0)); border-radius: 999px; z-index: 0; pointer-events: none;
  background: linear-gradient(160deg, rgba(255, 255, 255, .95), rgba(255, 255, 255, .55)); box-shadow: inset 0 1px 0 #fff, 0 6px 16px -4px rgba(28, 48, 120, .35), 0 1px 3px rgba(28, 48, 120, .25); transition: transform .5s var(--resorte), width .5s var(--resorte), opacity .2s; }
:root[data-theme="dark"] .nav-ind, :root[data-theme="dark"] .seg-pulgar { background: linear-gradient(160deg, rgba(255, 255, 255, .34), rgba(255, 255, 255, .14)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 6px 16px -4px rgba(0, 0, 0, .6); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .nav-ind, :root:not([data-theme="light"]) .seg-pulgar { background: linear-gradient(160deg, rgba(255, 255, 255, .34), rgba(255, 255, 255, .14)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 6px 16px -4px rgba(0, 0, 0, .6); } }
.nav:not(.listo) .nav-ind, .seg:not(.listo) .seg-pulgar { opacity: 0; transition: none; }
.insignia { box-shadow: 0 0 0 3px color-mix(in srgb, var(--sol) 25%, transparent), 0 4px 10px -2px var(--sol); animation: latido 2.6s ease-in-out infinite; }
@keyframes latido { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--sol) 8%, transparent), 0 4px 12px -2px var(--sol); } }

/* los segmentos: la pastilla de vidrio se mueve de una opción a otra */
.seg { position: relative; background: color-mix(in srgb, var(--fill) 70%, transparent); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .08), inset 0 0 0 1px var(--rim-b); }
.seg button { position: relative; z-index: 1; background: transparent !important; box-shadow: none !important; color: var(--ink-2); transition: color .25s; }
.seg button[aria-pressed="true"] { color: var(--ink) !important; }
.seg .num { background: color-mix(in srgb, var(--ink) 10%, transparent); }

/* botones: vidrio, con brillo y resorte */
.btn { position: relative; overflow: hidden; border: 1px solid var(--rim-b); background: linear-gradient(160deg, var(--v1), var(--v2)); -webkit-backdrop-filter: blur(14px) saturate(160%); backdrop-filter: blur(14px) saturate(160%);
  box-shadow: inset 0 1px 0 var(--rim-a), 0 6px 16px -8px rgba(28, 48, 120, .35); transition: transform .35s var(--resorte), box-shadow .3s, background .3s; }
.btn:hover { background: linear-gradient(160deg, var(--v1), var(--v1)); transform: translateY(-1px); box-shadow: inset 0 1px 0 var(--rim-a), 0 12px 22px -10px rgba(28, 48, 120, .45); }
.btn:active { transform: scale(.96); }
.btn.ghost { background: transparent; box-shadow: none; border-color: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
.btn.ghost:hover { background: color-mix(in srgb, var(--ink) 7%, transparent); box-shadow: none; }
.btn.pri { background: linear-gradient(160deg, color-mix(in srgb, var(--ink) 92%, #fff), var(--ink)); color: var(--bg); border-color: transparent; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 12px 24px -10px rgba(0, 0, 0, .55); }
.btn.sol { background: linear-gradient(160deg, #ffd08e, #f39a2b 70%); color: #2a1700; border-color: rgba(255, 255, 255, .5); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .85), inset 0 -2px 6px rgba(190, 100, 0, .25), 0 12px 26px -8px rgba(240, 150, 40, .65); }
.btn.sol:hover { background: linear-gradient(160deg, #ffdca6, #f7a53c 70%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), inset 0 -2px 6px rgba(190, 100, 0, .25), 0 16px 30px -8px rgba(240, 150, 40, .8); }
.btn.sol::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, .55) 50%, transparent 62%); transform: translateX(-120%); transition: transform .8s var(--suave); pointer-events: none; }
.btn.sol:hover::after { transform: translateX(120%); }

/* campos: vidrio hundido */
.campo input, .campo select, .campo textarea { background: color-mix(in srgb, var(--bg) 42%, transparent); border: 1px solid var(--rim-b); box-shadow: inset 0 2px 5px rgba(28, 48, 120, .10), inset 0 1px 0 rgba(255, 255, 255, .25); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); transition: border-color .25s, box-shadow .3s; }
.campo input:focus, .campo select:focus, .campo textarea:focus { border-color: var(--brand); box-shadow: inset 0 2px 5px rgba(28, 48, 120, .10), 0 0 0 4px var(--brand-soft), 0 0 24px -4px var(--brand-soft); }

/* el contenido que entra: cada pieza aparece con un resorte suave, una detrás de otra */
main > *, #resultado > * { animation: entra .6s var(--suave) both; }
main > *:nth-child(2) { animation-delay: .06s; } main > *:nth-child(3) { animation-delay: .12s; } main > *:nth-child(4) { animation-delay: .18s; }
#resultado .lista > * { animation: entra .55s var(--suave) both; }
#resultado .lista > *:nth-child(2) { animation-delay: .05s; } #resultado .lista > *:nth-child(3) { animation-delay: .10s; } #resultado .lista > *:nth-child(4) { animation-delay: .15s; } #resultado .lista > *:nth-child(5) { animation-delay: .20s; } #resultado .lista > *:nth-child(n+6) { animation-delay: .25s; }
@keyframes entra { from { opacity: 0; transform: translateY(14px) scale(.985); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }

/* títulos con un poco de luz */
.cabeza h1, .puerta h1 { background: linear-gradient(120deg, var(--ink) 30%, color-mix(in srgb, var(--brand) 80%, var(--ink)) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* las tarjetas: se levantan hacia la luz y el brillo las recorre */
.pub:hover { transform: translateY(-4px) scale(1.004); box-shadow: inset 0 1px 0 var(--rim-a), inset 0 -1px 0 var(--rim-b), var(--sombra-v-hi); }
.pub .tipo::before { animation: respira 3s ease-in-out infinite; } @keyframes respira { 50% { box-shadow: 0 0 0 7px transparent; } }
.dato { background: color-mix(in srgb, var(--ink) 6%, transparent); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25); }
.nueva { position: relative; overflow: hidden; } .nueva::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .8) 50%, transparent 65%); transform: translateX(-130%); animation: brilla 3.4s ease-in-out infinite; }
@keyframes brilla { 0%, 55% { transform: translateX(-130%); } 100% { transform: translateX(130%); } }
.precio .monto { background: linear-gradient(160deg, var(--ink), color-mix(in srgb, var(--ink) 55%, var(--brand))); -webkit-background-clip: text; background-clip: text; color: transparent; }
.precio .monto small { color: var(--ink-3); -webkit-text-fill-color: var(--ink-3); }

/* el asistente: una gota de vidrio con un anillo de luz que gira */
.asist-btn { overflow: visible; border: 0; background: linear-gradient(150deg, rgba(70, 105, 215, .95), rgba(22, 39, 92, .96)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), inset 0 -2px 8px rgba(0, 0, 0, .3), 0 18px 34px -10px rgba(35, 57, 127, .8); transition: transform .4s var(--resorte), box-shadow .3s; }
.asist-btn::before { content: ""; position: absolute; inset: -3px; border-radius: inherit; z-index: -1; background: conic-gradient(from 0deg, #ffb259, #6ea8ff, #b58bff, #5fe0d0, #ffb259); filter: blur(8px); opacity: .75; animation: gira 6s linear infinite; }
.asist-btn:hover { transform: translateY(-3px) scale(1.04); } .asist-btn:active { transform: scale(.95); }
@keyframes gira { to { transform: rotate(360deg); } }
.asist { transform-origin: 100% 100%; animation: abre .5s var(--resorte) both; -webkit-backdrop-filter: blur(34px) saturate(190%); backdrop-filter: blur(34px) saturate(190%); background: linear-gradient(155deg, var(--v1), var(--v2)); }
.asist[hidden] { display: none; }
@keyframes abre { from { opacity: 0; transform: translateY(24px) scale(.88); filter: blur(10px); } to { opacity: 1; transform: none; filter: none; } }
.burbuja.usuario { background: linear-gradient(155deg, color-mix(in srgb, var(--ink) 88%, #fff), var(--ink)); box-shadow: 0 8px 18px -8px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .25); }
.burbuja.asistente { background: color-mix(in srgb, var(--ink) 7%, transparent); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3); }
.burbuja { animation: sube .4s var(--resorte) both; } @keyframes sube { from { opacity: 0; transform: translateY(10px) scale(.95); } }

/* ventanas y avisos */
dialog.modal[open] { animation: abre .45s var(--resorte) both; } dialog.modal::backdrop { background: radial-gradient(60% 60% at 50% 40%, rgba(60, 90, 220, .25), rgba(8, 12, 26, .55)); -webkit-backdrop-filter: blur(10px) saturate(130%); backdrop-filter: blur(10px) saturate(130%); animation: velo .4s both; }
@keyframes velo { from { opacity: 0; } }
#toast { transition: all .5s var(--resorte); }

/* abajo, en el celular: la barra de vidrio flota y su pastilla se desliza */
.pestanas { box-shadow: inset 0 1px 0 var(--rim-a), inset 0 -1px 0 var(--rim-b), var(--sombra-v-hi); }
.pestanas a { position: relative; z-index: 1; background: transparent !important; transition: color .25s; } .pestanas a[aria-current="page"] { color: var(--ink) !important; }

/* el mapa: el vidrio flota encima y el mapa se ve a través */
.mapa-caja { position: relative; padding: 0; border-radius: var(--radius); overflow: hidden; }
.mapa { isolation: isolate; border-radius: 0; height: min(66vh, 620px); min-height: 380px; }
.mapa-sobre { position: absolute; z-index: 5; top: 12px; left: 12px; right: 66px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; pointer-events: none; }
.mapa-sobre > * { pointer-events: auto; }
.mapa-sobre .chips-flota { padding: 6px; border-radius: 999px; background: linear-gradient(160deg, var(--v1), var(--v2)); -webkit-backdrop-filter: blur(22px) saturate(190%); backdrop-filter: blur(22px) saturate(190%); box-shadow: inset 0 1px 0 var(--rim-a), inset 0 0 0 1px var(--rim-b), var(--sombra-v); gap: 4px; }
.mapa-sobre .chip-flota { border: 0; min-height: 34px; background: transparent; } .mapa-sobre .chip-flota[aria-pressed="true"] { background: color-mix(in srgb, var(--c) 18%, rgba(255, 255, 255, .5)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), 0 4px 10px -4px var(--c); color: var(--ink); }
.mapa-sobre .solo-libres { padding: 4px 14px 4px 10px; border-radius: 999px; background: linear-gradient(160deg, var(--v1), var(--v2)); -webkit-backdrop-filter: blur(22px) saturate(190%); backdrop-filter: blur(22px) saturate(190%); box-shadow: inset 0 1px 0 var(--rim-a), inset 0 0 0 1px var(--rim-b), var(--sombra-v); }
.mapa-caja .mapa-leyenda { position: absolute; z-index: 5; left: 12px; bottom: 12px; padding: 8px 14px; border-radius: 999px; background: linear-gradient(160deg, var(--v1), var(--v2)); -webkit-backdrop-filter: blur(22px) saturate(190%); backdrop-filter: blur(22px) saturate(190%); box-shadow: inset 0 1px 0 var(--rim-a), inset 0 0 0 1px var(--rim-b), var(--sombra-v); color: var(--ink-2); gap: 14px; }
.leaflet-control-zoom { border: 0 !important; border-radius: 14px !important; overflow: hidden; box-shadow: inset 0 1px 0 var(--rim-a), var(--sombra-v) !important; } .leaflet-control-zoom a { background: linear-gradient(160deg, var(--v1), var(--v2)) !important; -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); color: var(--ink) !important; border: 0 !important; }
.leaflet-popup-content-wrapper { background: linear-gradient(155deg, rgba(255, 255, 255, .85), rgba(255, 255, 255, .6)); -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%); box-shadow: var(--sombra-v); } .leaflet-popup-tip { background: rgba(255, 255, 255, .8); }
.pin { box-shadow: 0 3px 10px rgba(0, 0, 0, .4), inset 0 2px 3px rgba(255, 255, 255, .55); }

/* tablas y bloques de contenido dentro del vidrio: tinta plana, sin otro vidrio encima */
.tabla-camiones, .bloque, .resumen { -webkit-backdrop-filter: blur(26px) saturate(180%); backdrop-filter: blur(26px) saturate(180%); }
.propuestas li, .clave { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3); }
.kpi { transition: transform .45s var(--resorte), box-shadow .35s; } .kpi:hover { transform: translateY(-3px); }
.aviso { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.tipo-op, .actor-op, .chip { background: color-mix(in srgb, var(--ink) 4%, transparent); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3); transition: transform .4s var(--resorte), background .25s, border-color .25s, box-shadow .3s; }
.tipo-op:hover, .actor-op:hover, .chip:hover { transform: translateY(-2px); background: color-mix(in srgb, var(--ink) 8%, transparent); }
.puerta { padding: 36px; }

/* celular */
@media (max-width: 760px) {
  .mapa-sobre { right: 12px; } .mapa-sobre .chips-flota { max-width: 100%; border-radius: 22px; }
  .mapa-caja .mapa-leyenda { bottom: 58px; left: 8px; right: 8px; border-radius: 16px; }
  .pestanas { padding: 5px; } .pestanas .nav-ind { top: 5px; bottom: 5px; }
}

/* quien prefiere menos movimiento, menos transparencia o más contraste: el vidrio se vuelve más sólido y quieto */
@media (prefers-reduced-motion: reduce) {
  .aurora i, .asist-btn::before, .insignia, .pub .tipo::before, .nueva::after, .pin.mov { animation: none !important; }
  main > *, #resultado > *, #resultado .lista > *, .asist, dialog.modal[open], .burbuja { animation: none !important; }
  .vidrio, .btn, .pub, .nav-ind, .seg-pulgar { transition: none !important; }
}
@media (prefers-reduced-transparency: reduce) {
  .vidrio, .barra, .btn, .campo input, .campo select, .campo textarea, .asist, .tabla-camiones, .bloque, .resumen, .mapa-sobre *, .mapa-leyenda, .aviso { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
  .vidrio, .barra, .asist, .pestanas, #toast, dialog.modal { background: var(--bg) !important; }
  .aurora { opacity: .35; }
}
@media (prefers-contrast: more) { .vidrio::after { opacity: 1; } .vidrio { border-color: var(--line-strong); } .btn { border-color: var(--line-strong); } }

/* en oscuro el mapa también se oscurece (si no, el vidrio claro flota sobre un mapa blanco y no se lee) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.9) contrast(.92) saturate(.75); }
  :root:not([data-theme="light"]) .mapa-sobre .chips-flota, :root:not([data-theme="light"]) .mapa-sobre .solo-libres, :root:not([data-theme="light"]) .mapa-caja .mapa-leyenda { background: linear-gradient(160deg, rgba(20, 30, 62, .62), rgba(20, 30, 62, .36)); }
  :root:not([data-theme="light"]) .leaflet-popup-content-wrapper { background: linear-gradient(155deg, rgba(34, 46, 88, .88), rgba(22, 32, 66, .72)); color: #eef2ff; } :root:not([data-theme="light"]) .leaflet-popup-tip { background: rgba(30, 42, 82, .9); }
  :root:not([data-theme="light"]) .leaflet-container { background: #0e1630; }
}
:root[data-theme="dark"] .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.9) contrast(.92) saturate(.75); }
:root[data-theme="dark"] .mapa-sobre .chips-flota, :root[data-theme="dark"] .mapa-sobre .solo-libres, :root[data-theme="dark"] .mapa-caja .mapa-leyenda { background: linear-gradient(160deg, rgba(20, 30, 62, .62), rgba(20, 30, 62, .36)); }
:root[data-theme="dark"] .leaflet-popup-content-wrapper { background: linear-gradient(155deg, rgba(34, 46, 88, .88), rgba(22, 32, 66, .72)); color: #eef2ff; } :root[data-theme="dark"] .leaflet-popup-tip { background: rgba(30, 42, 82, .9); }
:root[data-theme="dark"] .leaflet-container { background: #0e1630; }

/* el asistente: más cuerpo para que se lea sobre cualquier cosa, y el subtítulo con contraste */
.asist { background: linear-gradient(155deg, var(--v1), var(--v2)), color-mix(in srgb, var(--bg) 52%, transparent); }
.asist header small { color: var(--ink-2); }
.asist-vacio p { color: var(--ink); }

/* los filtros segmentados no parten sus rótulos: si no entran, se desplazan de costado dentro de su caja */
.seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; } .seg::-webkit-scrollbar { display: none; }
.seg button { white-space: nowrap; flex: 0 0 auto; }

/* =====================================================================================================================================================
   CALMA (como valeriano.pages.dev): un solo azul marino, dos luces apenas visibles (azul arriba a la izquierda, cálida abajo a la derecha) y el ámbar sólo
   donde hay que tocar. Nada de manchas de varios colores: el vidrio refracta un fondo quieto y parejo.
   ===================================================================================================================================================== */
:root { --aur1: rgba(58, 104, 240, .20); --aur2: transparent; --aur3: rgba(224, 140, 60, .13); --aur4: transparent; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --aur1: rgba(58, 98, 255, .30); --aur3: rgba(255, 150, 70, .12); } }
:root[data-theme="dark"] { --aur1: rgba(58, 98, 255, .30); --aur3: rgba(255, 150, 70, .12); }
.aurora i:nth-child(2), .aurora i:nth-child(4), .aurora i:nth-child(5), .aurora i:nth-child(6) { display: none; }
.aurora i { filter: blur(70px); }
.aurora i:nth-child(1) { animation-duration: 60s; } .aurora i:nth-child(3) { animation-duration: 75s; }
/* el vidrio no amplifica los colores de atrás */
.vidrio, .barra, .btn, .asist, .pestanas, .mapa-sobre .chips-flota, .mapa-sobre .solo-libres, .mapa-caja .mapa-leyenda { -webkit-backdrop-filter: blur(24px) saturate(115%); backdrop-filter: blur(24px) saturate(115%); }
:root { --bg: #eef1f6; }
dialog.modal::backdrop { background: rgba(8, 12, 26, .5); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
/* el botón del asistente: azul marino con un solo halo ámbar tenue, sin arcoíris */
.asist-btn::before { background: radial-gradient(closest-side, rgba(255, 178, 89, .55), transparent); filter: blur(10px); opacity: .5; animation: none; inset: -6px; }
.asist-btn { background: linear-gradient(150deg, #2c4596, #16275c); }
.insignia { animation: none; box-shadow: none; }
.pub .tipo::before { animation: none; }
/* los chips de flota: vidrio neutro; el color de la flota vive sólo en su punto */
.mapa-sobre .chip-flota[aria-pressed="true"] { background: color-mix(in srgb, var(--ink) 11%, transparent); box-shadow: inset 0 1px 0 var(--rim-a), inset 0 0 0 1px var(--rim-b); }
.mapa-sobre .chips-flota { box-shadow: inset 0 1px 0 var(--rim-a), inset 0 0 0 1px var(--rim-b), var(--sombra-v); }
.chip-flota[aria-pressed="true"] { border-color: var(--line-strong); }
.chip-flota i { box-shadow: none; }

/* el mapa siempre claro, también en oscuro (los controles de vidrio oscuro flotan encima y se leen igual) */
:root[data-theme="dark"] .leaflet-tile-pane { filter: saturate(.85) brightness(.98); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .leaflet-tile-pane { filter: saturate(.85) brightness(.98); } }
:root[data-theme="dark"] .leaflet-container { background: #dfe6ee; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .leaflet-container { background: #dfe6ee; } }
:root[data-theme="dark"] .mapa-sobre .chips-flota, :root[data-theme="dark"] .mapa-sobre .solo-libres, :root[data-theme="dark"] .mapa-caja .mapa-leyenda { background: linear-gradient(160deg, rgba(20, 30, 62, .78), rgba(20, 30, 62, .6)); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .mapa-sobre .chips-flota, :root:not([data-theme="light"]) .mapa-sobre .solo-libres, :root:not([data-theme="light"]) .mapa-caja .mapa-leyenda { background: linear-gradient(160deg, rgba(20, 30, 62, .78), rgba(20, 30, 62, .6)); } }

/* ---- quién ve cada aviso: botones de tipo de actor (varios a la vez, «Todos» cuando no hay ninguno) */
.quienes { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-quien { min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--line-strong); background: transparent; color: var(--ink-2); font: inherit; font-weight: 650; font-size: 13px; cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.chip-quien:hover { border-color: var(--ink-2); }
.chip-quien[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip-quien:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* el pie de cada aviso propio tiene varios botones: en pantallas angostas pasan a otra línea en vez de salirse de la tarjeta */
.pub .pie .espacio { flex-wrap: wrap; }
.pub .pie .espacio .btn { white-space: nowrap; }
@media (max-width: 640px) { .pub .pie { flex-wrap: wrap; } }

/* ---- pantalla de avisos */
.avisos-lista { gap: 16px; }
.aviso-bloque { padding: 22px; display: grid; gap: 14px; }
.aviso-bloque header { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.aviso-bloque h2 { margin: 0; font-size: 20px; letter-spacing: -.01em; }
.aviso-bloque p { margin: 0; color: var(--ink-2); max-width: 68ch; }
.aviso-bloque .acciones { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.aviso-cfg { display: grid; gap: 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.dest-fila { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; align-items: center; padding: 14px 16px; border-radius: 16px; background: color-mix(in srgb, var(--fill) 70%, transparent); border: 1px solid var(--line); }
.dest-datos { display: grid; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.dest-estado { justify-self: end; }
.dest-fila .acc-fila { grid-column: 1 / -1; justify-content: flex-start; }
.dest-nota { grid-column: 1 / -1; }
@media (max-width: 640px) { .dest-fila { grid-template-columns: 1fr; } .dest-estado { justify-self: start; } .aviso-bloque { padding: 18px; } }

/* ---- verificación y calificaciones */
.rep { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; vertical-align: middle; }
.verif, .estrellas { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; line-height: 1; }
.verif { padding: 4px 9px 4px 6px; border-radius: 999px; color: var(--ok, #1a7a4c); background: color-mix(in srgb, var(--ok, #1a7a4c) 13%, transparent); }
.verif svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.estrellas { color: var(--ink); }
.estrellas svg { width: 14px; height: 14px; fill: none; stroke: #e0932a; stroke-width: 1.8; stroke-linejoin: round; }
.estrellas svg.llena { fill: #ffb259; }
.estrellas small { font-weight: 600; color: var(--ink-2); }
.estrellas.fija { gap: 2px; vertical-align: -2px; }
.rep-tarjeta { padding: 18px 22px; display: grid; gap: 8px; margin-bottom: 16px; }
.rep-cab { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.rep-tarjeta p { margin: 0; }
.rep-tarjeta summary { cursor: pointer; font-weight: 650; color: var(--ink-2); }
.rep-lista { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 8px; }
.cal-form, .cal-hecha { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.cal-form h3, .cal-hecha h3 { margin: 0; font-size: 16px; }
.cal-hecha p { margin: 0; }
.estrellas-input { display: flex; gap: 6px; }
.estrellas-input button { width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 12px; background: transparent; cursor: pointer; color: #e0932a; transition: transform .15s, background .2s; }
.estrellas-input button:hover { background: var(--fill); transform: scale(1.06); }
.estrellas-input button:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.estrellas-input svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
.estrellas-input button.on svg { fill: #ffb259; }
