/* JULIAO · Control de rutas — sistema de diseño.
   Blanco, negro y el rojo de la marca (#EB1439); el amarillo (#F7BE00) solo señala metas.
   Tipografía Archivo, la misma del sitio de Juliao. Todo el color sale de :root. */
@font-face { font-family: "Archivo"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/static/lib/fuentes/archivo-latin-wght-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Archivo"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/static/lib/fuentes/archivo-latin-ext-wght-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --brand: #EB1439; --brand-600: #CF0F30; --brand-700: #A90B26; --brand-50: #FEF1F3; --brand-100: #FCDDE2;
  --sol: #F7BE00; --sol-50: #FFF8DC; --sol-700: #8A6A00;
  --ink: #101216; --ink-2: #2A2E36; --text: #3D434E; --muted: #7C8492; --faint: #B4BAC5;
  --bg: #F4F4F2; --bg-2: #EBEBE8; --surface: #FFFFFF; --line: #E5E5E1; --line-2: #D6D6D1;
  --ok: #12855A; --ok-50: #E7F5EE; --warn: #B86E00; --warn-50: #FFF3DD; --bad: #D0102F; --bad-50: #FDECEF; --info: #1E5B8C; --info-50: #E8F0F7;
  --serie: #2F343D; --serie-2: #C9CCD2;
  --r-xs: 6px; --r-sm: 8px; --r: 12px; --r-lg: 16px; --r-xl: 22px;
  --sh-1: 0 1px 2px rgba(16,18,22,.05);
  --sh-2: 0 1px 2px rgba(16,18,22,.04), 0 10px 26px -8px rgba(16,18,22,.12);
  --sh-3: 0 2px 6px rgba(16,18,22,.06), 0 28px 64px -14px rgba(16,18,22,.26);
  --ease: cubic-bezier(.2,.8,.2,1); --ease-out: cubic-bezier(.16,1,.3,1);
  --rail: 248px; --top: 66px;
  font-family: "Archivo", "Helvetica Neue", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.45; overflow: hidden; }
h1, h2, h3, h4 { color: var(--ink); margin: 0; letter-spacing: -.015em; }
h1 { font-size: 22px; font-weight: 700; } h2 { font-size: 16.5px; font-weight: 680; } h3 { font-size: 14px; font-weight: 660; }
p { margin: 0 0 10px; } a { color: var(--brand-600); text-decoration: none; }
.hidden { display: none !important; }
.muted { color: var(--muted); } .small { font-size: 12.5px; } .tiny { font-size: 11.5px; }
.num { font-variant-numeric: tabular-nums; }
.up { text-transform: uppercase; letter-spacing: .09em; font-size: 10.5px; font-weight: 700; color: var(--muted); }
::selection { background: var(--brand-100); }
*::-webkit-scrollbar { width: 10px; height: 10px; } *::-webkit-scrollbar-thumb { background: #D2D2CD; border-radius: 10px; border: 3px solid transparent; background-clip: content-box; }

/* ───────── estructura ───────── */
.app { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); height: 100vh; }
.rail { background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 22px 14px 14px; }
.brand { padding: 0 10px 20px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.brand img { height: 27px; display: block; }
.brand .site { margin-top: 14px; font-size: 15px; font-weight: 700; color: var(--ink); }
.brand .sub { font-size: 10.5px; color: var(--muted); letter-spacing: .09em; text-transform: uppercase; font-weight: 650; margin-top: 2px; }
#nav { flex: 1; overflow-y: auto; }
.nav-sec { font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); padding: 16px 12px 6px; }
.nav-item { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: var(--r-sm); color: var(--text); font-weight: 560; cursor: pointer; position: relative; transition: background .18s var(--ease), color .18s var(--ease); user-select: none; }
.nav-item .ic { display: grid; place-items: center; width: 20px; height: 20px; color: var(--muted); }
.nav-item:hover { background: var(--bg); color: var(--ink); }
.nav-item.active { background: var(--brand-50); color: var(--brand-700); font-weight: 660; } .nav-item.active .ic { color: var(--brand); }
.nav-item.active::before { content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0; background: var(--brand); }
.rail-foot { border-top: 1px solid var(--line); padding-top: 12px; }
.who { display: flex; align-items: center; gap: 10px; padding: 6px 8px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: #fff; font-weight: 700; display: grid; place-items: center; font-size: 12.5px; flex: none; }
.who b { display: block; color: var(--ink); font-size: 13px; font-weight: 660; line-height: 1.2; } .who span { font-size: 11.5px; color: var(--muted); }
.powered { font-size: 10px; color: var(--faint); letter-spacing: .08em; text-transform: uppercase; text-align: center; margin-top: 10px; font-weight: 650; }
.main { display: flex; flex-direction: column; min-width: 0; height: 100vh; }
.topbar { height: var(--top); flex: none; display: flex; align-items: center; gap: 16px; padding: 0 26px; background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar .crumb { font-size: 11.5px; color: var(--muted); font-weight: 560; margin-bottom: 1px; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.clock { font-weight: 680; color: var(--ink); font-size: 15px; padding-left: 8px; text-align: right; line-height: 1.15; }
.clock small { display: block; font-size: 10.5px; font-weight: 600; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }
.view { flex: 1; overflow: auto; }
.page { padding: 22px 26px 44px; max-width: 1560px; margin: 0 auto; animation: rise .4s var(--ease-out) both; }
.page-head { display: flex; align-items: flex-end; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head .grow { flex: 1; min-width: 220px; } .page-head p { margin: 4px 0 0; color: var(--muted); max-width: 720px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; } .row.tight { gap: 6px; } .row.nowrap { flex-wrap: nowrap; }
.stack { display: flex; flex-direction: column; gap: 16px; } .grow { flex: 1; min-width: 0; } .spacer { flex: 1; }
.grid { display: grid; gap: 16px; } .g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) var(--aside, 400px); gap: 16px; align-items: start; }
@media (max-width: 1180px) { .g4, .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .split { grid-template-columns: 1fr; } }
/* ventana angosta: el menú lateral pasa a ser una barra superior */
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .rail { flex-direction: row; align-items: center; gap: 12px; padding: 8px 14px; border-right: 0; border-bottom: 1px solid var(--line); min-width: 0; }
  .brand { padding: 0; border: 0; margin: 0; flex: none; } .brand img { height: 20px; } .brand .site, .brand .sub, .nav-sec, .rail-foot .who, .powered, .nav-item.active::before { display: none; }
  #nav { display: flex; gap: 2px; overflow-x: auto; } .nav-item { padding: 8px 10px; white-space: nowrap; } .rail-foot { border: 0; padding: 0; flex: none; } .rail-foot .btn { margin: 0 !important; }
  .main { height: auto; min-height: 0; } .g2, .g3, .g4 { grid-template-columns: 1fr; } .page { padding: 16px; } .topbar { padding: 0 16px; } .page .grid[style] { grid-template-columns: 1fr !important; }
}

/* ───────── superficies ───────── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-1); padding: 18px; position: relative; min-width: 0; }
.card.flush { padding: 0; overflow: hidden; }
.card-h { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; } .card-h h2, .card-h h3 { flex: 1; min-width: 0; }
.card-h .s { font-size: 12px; color: var(--muted); font-weight: 500; display: block; margin-top: 2px; letter-spacing: 0; }
.card.flush > .card-h { padding: 16px 18px 0; }
.sep { height: 1px; background: var(--line); margin: 14px 0; border: 0; }
.kpi .k-top { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.kpi .k-val { font-size: 36px; font-weight: 700; color: var(--ink); letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; margin-top: 8px; }
.kpi .k-val small { font-size: 15px; font-weight: 600; color: var(--muted); letter-spacing: 0; margin-left: 3px; }
.kpi .k-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; min-height: 18px; } .kpi .k-sub b { color: var(--ink-2); font-weight: 650; }
.kpi .k-meta { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 11.5px; color: var(--muted); font-weight: 560; }
.kpi .delta { font-weight: 660; } .delta.ok { color: var(--ok); } .delta.bad { color: var(--bad); }
.meter { height: 6px; border-radius: 4px; background: var(--bg-2); position: relative; flex: 1; } .meter i { display: block; height: 100%; border-radius: 4px; background: var(--serie); transition: width .8s var(--ease-out); max-width: 100%; }
.meter.ok i { background: var(--ok); } .meter.warn i { background: var(--warn); } .meter.bad i { background: var(--bad); }
.meter .goal { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink); border-radius: 1px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; align-items: center; } .kv > :nth-child(odd) { color: var(--muted); font-size: 12.5px; } .kv > :nth-child(even) { color: var(--ink); font-weight: 560; }

/* ───────── controles ───────── */
.btn { --bh: 38px; height: var(--bh); padding: 0 15px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font: inherit; font-weight: 620; font-size: 13.5px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; white-space: nowrap; transition: transform .16s var(--ease), box-shadow .2s var(--ease), background .2s, border-color .2s; user-select: none; }
.btn:hover { border-color: #BDBDB7; box-shadow: var(--sh-2); } .btn:active { transform: scale(.98); }
.btn:focus-visible, .seg button:focus-visible, .nav-item:focus-visible, .iconbtn:focus-visible { outline: 3px solid rgba(235,20,57,.3); outline-offset: 2px; }
.btn.primary { background: var(--ink); border-color: var(--ink); color: #fff; } .btn.primary:hover { background: #23262D; }
.btn.brand { background: var(--brand); border-color: var(--brand); color: #fff; } .btn.brand:hover { background: var(--brand-600); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text); } .btn.ghost:hover { background: var(--bg-2); box-shadow: none; color: var(--ink); }
.btn.danger { color: var(--bad); border-color: #F2C4CC; } .btn.danger:hover { background: var(--bad-50); }
.btn.sm { --bh: 32px; padding: 0 11px; font-size: 12.5px; border-radius: 8px; } .btn.lg { --bh: 46px; padding: 0 22px; font-size: 15px; border-radius: 11px; } .btn.block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.iconbtn { width: 36px; height: 36px; border-radius: 9px; border: 1px solid transparent; background: transparent; color: var(--text); display: grid; place-items: center; cursor: pointer; transition: background .18s, color .18s; }
.iconbtn:hover { background: var(--bg-2); color: var(--ink); } .iconbtn.line { border-color: var(--line-2); background: #fff; }
.seg { display: inline-flex; background: var(--bg-2); border-radius: 9px; padding: 3px; gap: 2px; }
.seg button { height: 32px; padding: 0 13px; border: 0; background: transparent; border-radius: 7px; font: inherit; font-weight: 600; font-size: 12.5px; color: var(--muted); cursor: pointer; transition: all .18s var(--ease); white-space: nowrap; }
.seg button:hover { color: var(--ink); } .seg button.on { background: #fff; color: var(--ink); box-shadow: var(--sh-1); }
.chip { height: 30px; padding: 0 11px; border-radius: 15px; background: var(--bg-2); color: var(--ink-2); font-size: 12px; font-weight: 620; display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--faint); flex: none; }
.chip.ok::before { background: var(--ok); box-shadow: 0 0 0 3px rgba(18,133,90,.16); } .chip.warn::before { background: var(--warn); } .chip.live::before { background: var(--brand); box-shadow: 0 0 0 3px rgba(235,20,57,.16); animation: pulse 1.6s infinite; }
.chip.demo { background: var(--sol-50); color: var(--sol-700); } .chip.demo::before { background: var(--sol); }
.tag { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 11.5px; font-weight: 650; background: var(--bg-2); color: var(--ink-2); white-space: nowrap; }
.tag.ok { background: var(--ok-50); color: #0C6B47; } .tag.warn { background: var(--warn-50); color: #8A5300; } .tag.bad { background: var(--bad-50); color: #A80C25; } .tag.info { background: var(--info-50); color: #174A73; } .tag.dark { background: var(--ink); color: #fff; }
.tag svg { flex: none; }
.dotv { display: inline-block; width: 9px; height: 9px; border-radius: 3px; flex: none; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; font-weight: 620; color: var(--ink-2); }
label.inline { flex-direction: row; align-items: center; gap: 9px; font-weight: 560; cursor: pointer; }
input, select, textarea { font: inherit; font-size: 14px; font-weight: 500; color: var(--ink); background: #fff; border: 1px solid var(--line-2); border-radius: 9px; height: 40px; padding: 0 12px; outline: none; transition: border-color .18s, box-shadow .18s; min-width: 0; width: 100%; }
textarea { height: auto; padding: 10px 12px; resize: vertical; min-height: 76px; line-height: 1.5; }
select { appearance: none; -webkit-appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237C8492' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
input:hover, select:hover, textarea:hover { border-color: #BDBDB7; }
input:focus, select:focus, textarea:focus { border-color: var(--ink); box-shadow: 0 0 0 4px rgba(16,18,22,.08); }
input[type=checkbox] { width: 18px; height: 18px; padding: 0; accent-color: var(--brand); flex: none; }
input[type=color] { padding: 3px; width: 52px; }
.hint { font-size: 11.5px; font-weight: 500; color: var(--muted); } .form-err { color: var(--bad); font-size: 12.5px; font-weight: 600; min-height: 18px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; } .form-grid .full { grid-column: 1 / -1; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tab { padding: 10px 14px; color: var(--muted); cursor: pointer; border: 0; background: none; font: inherit; font-weight: 620; position: relative; white-space: nowrap; }
.tab:hover { color: var(--ink); } .tab.on { color: var(--ink); } .tab.on::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--brand); }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; } .filters label { min-width: 140px; flex: 0 1 180px; }
.datebar { display: inline-flex; align-items: center; gap: 4px; } .datebar input { width: 158px; height: 36px; }

/* ───────── datos ───────── */
.table-wrap { overflow: auto; border-radius: var(--r-lg); border: 1px solid var(--line); background: #fff; box-shadow: var(--sh-1); }
.card .table-wrap { border: 0; box-shadow: none; border-radius: 0; margin: 0 -18px -18px; }
table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
th { position: sticky; top: 0; background: #FAFAF8; text-align: left; font-size: 10.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); font-weight: 700; padding: 11px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; z-index: 1; }
th.sort { cursor: pointer; user-select: none; } th.sort:hover { color: var(--ink); } th.sort.on { color: var(--ink); } th.sort.on::after { content: " ↓"; } th.sort.on.asc::after { content: " ↑"; }
td { padding: 11px 14px; border-bottom: 1px solid var(--line); color: var(--ink-2); vertical-align: middle; white-space: nowrap; } tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .15s; } tbody tr:hover { background: #FAFAF8; } tr.click { cursor: pointer; } td.r, th.r { text-align: right; } td b { color: var(--ink); font-weight: 650; } td.wrap { white-space: normal; }
td .bar { display: inline-block; height: 6px; border-radius: 3px; background: var(--serie); vertical-align: middle; margin-right: 8px; } td .bar.over { background: var(--brand); }
.empty { padding: 44px 20px; text-align: center; color: var(--muted); } .empty .ic { width: 52px; height: 52px; border-radius: 14px; background: var(--bg); display: grid; place-items: center; margin: 0 auto 12px; color: var(--faint); } .empty b { display: block; color: var(--ink-2); font-size: 15px; margin-bottom: 4px; }
.skeleton { background: linear-gradient(90deg, #ECECE9 0%, #F6F6F4 40%, #ECECE9 80%); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; border-radius: 10px; min-height: 16px; }
.note { padding: 11px 14px; border-radius: 10px; background: var(--info-50); color: #174A73; font-size: 12.5px; font-weight: 540; line-height: 1.5; }
.note.warn { background: var(--warn-50); color: #7A4A00; } .note.bad { background: var(--bad-50); color: #A80C25; } .note.demo { background: var(--sol-50); color: #6B5200; }
.chart { width: 100%; display: block; overflow: visible; } .chart text { font-family: inherit; font-size: 11px; fill: var(--muted); font-weight: 540; } .chart .eje { stroke: var(--line); } .chart .base { stroke: var(--line-2); }
.chart .dato { font-weight: 660; fill: var(--ink-2); } .chart .halo { paint-order: stroke; stroke: #fff; stroke-width: 4px; stroke-linejoin: round; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--text); font-weight: 560; align-items: center; } .legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; } .legend i.ln { height: 0; width: 16px; border-top: 2px dashed var(--ink); border-radius: 0; }
.tip { position: fixed; z-index: 95; pointer-events: none; background: var(--ink); color: #fff; padding: 8px 11px; border-radius: 9px; font-size: 12px; line-height: 1.45; box-shadow: var(--sh-3); max-width: 260px; opacity: 0; transition: opacity .12s; }
.tip.on { opacity: 1; } .tip b { display: block; font-weight: 660; } .tip span { color: #C9CCD2; }

/* ───────── tablero ───────── */
.mapa { height: 420px; border-radius: var(--r-lg); overflow: hidden; background: #E9E9E5; z-index: 0; }
.leaflet-container { font-family: inherit; background: #E9E9E5; } .leaflet-tile-pane { filter: grayscale(1) contrast(.92) brightness(1.06); }
.mapa { position: relative; } .mapa-aviso { position: absolute; left: 12px; bottom: 12px; z-index: 500; background: rgba(255,255,255,.94); border-radius: 8px; padding: 6px 10px; font-size: 11.5px; font-weight: 560; color: var(--muted); box-shadow: var(--sh-1); }
.pin { width: 26px; height: 26px; border-radius: 50%; background: #fff; border: 2px solid var(--faint); color: var(--ink-2); font-size: 11.5px; font-weight: 700; display: grid; place-items: center; box-shadow: 0 2px 6px rgba(16,18,22,.28); }
.pin.ok { background: var(--ink); border-color: #fff; color: #fff; } .pin.sitio { background: var(--sol); border-color: #fff; color: var(--ink); animation: latido 1.6s infinite; } .pin.bad { background: var(--brand); border-color: #fff; color: #fff; }
.pin.cedi { border-radius: 7px; background: var(--brand); border-color: #fff; color: #fff; } .pin.off { width: 12px; height: 12px; border-width: 2px; }
.leaflet-tooltip { font-family: inherit; font-weight: 620; font-size: 12px; color: var(--ink); border: 0; border-radius: 8px; box-shadow: var(--sh-2); padding: 6px 9px; } .leaflet-tooltip span { display: block; font-weight: 500; color: var(--muted); font-size: 11.5px; }
.veh-h { display: flex; align-items: center; gap: 12px; } .veh-h .ico { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; color: #fff; flex: none; }
.veh-h h3 { font-size: 15px; } .veh-h .s { font-size: 12px; color: var(--muted); }
.prog { display: flex; gap: 3px; margin: 14px 0 6px; } .prog i { flex: 1; height: 6px; border-radius: 3px; background: var(--bg-2); } .prog i.ok { background: var(--ink); } .prog i.sitio { background: var(--sol); } .prog i.bad { background: var(--brand); }
.stops { margin-top: 12px; }
.stop { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 0 12px; position: relative; padding-bottom: 4px; }
.stop .n { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line-2); background: #fff; color: var(--muted); font-size: 11.5px; font-weight: 700; display: grid; place-items: center; z-index: 1; }
.stop.ok .n { background: var(--ink); border-color: var(--ink); color: #fff; } .stop.sitio .n { background: var(--sol); border-color: var(--sol); color: var(--ink); } .stop.bad .n { background: var(--brand); border-color: var(--brand); color: #fff; }
.stop::before { content: ""; position: absolute; left: 12px; top: 26px; bottom: -2px; width: 2px; background: var(--line); } .stop:last-child::before { display: none; }
.stop .t { font-weight: 650; color: var(--ink); line-height: 26px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .stop .h { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.stop .r { text-align: right; padding-top: 2px; } .stop .tr { grid-column: 2 / -1; font-size: 11.5px; color: var(--muted); padding: 5px 0 9px; display: flex; align-items: center; gap: 6px; }
.feed { display: flex; flex-direction: column; max-height: 360px; overflow: auto; margin: 0 -8px; }
.feed-item { display: flex; gap: 11px; align-items: flex-start; padding: 9px 8px; border-radius: 10px; } .feed-item:hover { background: var(--bg); }
.feed-item .hora { font-variant-numeric: tabular-nums; font-weight: 660; color: var(--ink); font-size: 12.5px; width: 40px; flex: none; padding-top: 1px; }
.feed-item .t { font-weight: 620; color: var(--ink); font-size: 13px; line-height: 1.3; } .feed-item .s { font-size: 11.5px; color: var(--muted); }
.gantt .seg-t { cursor: default; } .gantt .ahora { stroke: var(--brand); stroke-width: 1.5; }

/* ───────── avisos, modales, cajón ───────── */
#toasts { position: fixed; right: 20px; bottom: 20px; z-index: 90; display: flex; flex-direction: column-reverse; gap: 10px; width: 350px; pointer-events: none; }
.toast { pointer-events: auto; padding: 13px 16px 13px 42px; border-radius: 12px; background: var(--ink); color: #D9DBE0; box-shadow: var(--sh-3); font-size: 12.5px; position: relative; animation: slide-in .4s var(--ease-out) both; }
.toast b { display: block; color: #fff; font-size: 13.5px; font-weight: 660; } .toast.out { animation: slide-out .3s var(--ease) forwards; }
.toast::before { content: ""; position: absolute; left: 16px; top: 18px; width: 10px; height: 10px; border-radius: 50%; background: var(--faint); } .toast.ok::before { background: #35C48B; } .toast.bad::before { background: var(--brand); } .toast.warn::before { background: var(--sol); }
.modal-bg { position: fixed; inset: 0; z-index: 80; background: rgba(16,18,22,.46); display: grid; place-items: center; padding: 24px; animation: fade .2s ease both; }
.modal { width: min(var(--w, 620px), 100%); max-height: calc(100vh - 48px); background: #fff; border-radius: var(--r-xl); box-shadow: var(--sh-3); display: flex; flex-direction: column; overflow: hidden; animation: pop .3s var(--ease-out) both; }
.modal-h { display: flex; align-items: center; gap: 12px; padding: 20px 24px 10px; } .modal-h h2 { flex: 1; font-size: 19px; }
.modal-b { padding: 8px 24px 22px; overflow: auto; } .modal-f { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 24px 18px; border-top: 1px solid var(--line); background: #FAFAF8; }
.x { width: 34px; height: 34px; border-radius: 9px; border: 0; background: var(--bg); color: var(--muted); cursor: pointer; display: grid; place-items: center; } .x:hover { background: var(--bg-2); color: var(--ink); }
.drawer-bg { position: fixed; inset: 0; z-index: 70; background: rgba(16,18,22,.3); animation: fade .2s ease both; }
.drawer { position: fixed; right: 0; top: 0; bottom: 0; width: min(var(--w, 500px), 100vw); background: #fff; z-index: 71; box-shadow: var(--sh-3); display: flex; flex-direction: column; animation: drawer-in .34s var(--ease-out) both; }
.drawer-h { display: flex; align-items: center; gap: 12px; padding: 20px 22px 14px; border-bottom: 1px solid var(--line); } .drawer-h h2 { flex: 1; } .drawer-b { flex: 1; overflow: auto; padding: 18px 22px; } .drawer-f { padding: 14px 22px 18px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; background: #FAFAF8; }
.plan-row { display: grid; grid-template-columns: 26px minmax(0, 1fr) 112px 34px 34px 34px; gap: 8px; align-items: center; margin-bottom: 8px; } .plan-row .n { font-weight: 700; color: var(--muted); text-align: center; }

/* ───────── acceso ───────── */
.login { position: fixed; inset: 0; z-index: 60; display: grid; grid-template-columns: minmax(0, 1fr) 470px; background: #fff; }
.login-scene { position: relative; overflow: hidden; background: var(--ink); color: #fff; }
.login-scene svg.traza { position: absolute; inset: 0; width: 100%; height: 100%; }
.login-scene::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, var(--ink) 0%, var(--ink) 24%, rgba(16,18,22,0) 58%); }
.login-scene .claim { z-index: 1; position: absolute; left: 52px; bottom: 50px; max-width: 560px; animation: rise .8s var(--ease-out) .2s both; }
.login-scene .claim h2 { font-size: 42px; line-height: 1.04; letter-spacing: -.035em; font-weight: 700; color: #fff; } .login-scene .claim h2 em { font-style: normal; color: var(--sol); }
.login-scene .claim p { color: #B9BDC6; font-size: 15px; margin: 14px 0 0; max-width: 430px; }
.login-panel { display: flex; flex-direction: column; justify-content: center; padding: 48px 54px; position: relative; }
.login-panel .lg-logo { height: 40px; align-self: flex-start; } .login-panel .lg-site { font-size: 25px; font-weight: 700; color: var(--ink); letter-spacing: -.03em; margin: 26px 0 2px; }
.login-panel .lg-sub { color: var(--muted); margin-bottom: 26px; } .login-panel form { display: flex; flex-direction: column; gap: 14px; } .login-panel input { height: 46px; font-size: 15px; }
.login-foot { margin-top: 22px; font-size: 11.5px; color: var(--muted); line-height: 1.6; } .login-by { position: absolute; left: 54px; bottom: 28px; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); font-weight: 650; }
@media (max-width: 940px) { .login { grid-template-columns: 1fr; } .login-scene { display: none; } .login-panel { padding: 36px 28px; } .login-by { left: 28px; } }
.splash { position: fixed; inset: 0; z-index: 100; background: #fff; display: grid; place-items: center; transition: opacity .5s ease, visibility .5s; } .splash.out { opacity: 0; visibility: hidden; }
.splash img { height: 34px; animation: breathe 1.6s ease-in-out infinite; }

/* ───────── movimiento ───────── */
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes slide-in { from { opacity: 0; transform: translateX(26px); } to { opacity: 1; transform: none; } }
@keyframes slide-out { to { opacity: 0; transform: translateX(36px); } }
@keyframes drawer-in { from { transform: translateX(50px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }
@keyframes latido { 0%, 100% { box-shadow: 0 0 0 0 rgba(247,190,0,.55), 0 2px 6px rgba(16,18,22,.28); } 60% { box-shadow: 0 0 0 9px rgba(247,190,0,0), 0 2px 6px rgba(16,18,22,.28); } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes breathe { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
.stagger > * { animation: rise .45s var(--ease-out) both; } .stagger > :nth-child(2) { animation-delay: 50ms; } .stagger > :nth-child(3) { animation-delay: 100ms; } .stagger > :nth-child(4) { animation-delay: 150ms; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
