/* Mi Puesto · CMA — estilos. Marca: manual del club (Marino, Rojo Aranjuez, Amarillo Sol; Barlow). */

@font-face { font-family: 'Barlow'; font-weight: 400; font-display: swap; src: url('/fonts/barlow-400-latin.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: 'Barlow'; font-weight: 400; font-display: swap; src: url('/fonts/barlow-400-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Barlow'; font-weight: 500; font-display: swap; src: url('/fonts/barlow-500-latin.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: 'Barlow'; font-weight: 500; font-display: swap; src: url('/fonts/barlow-500-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Barlow'; font-weight: 600; font-display: swap; src: url('/fonts/barlow-600-latin.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: 'Barlow'; font-weight: 600; font-display: swap; src: url('/fonts/barlow-600-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Barlow Condensed'; font-weight: 600; font-display: swap; src: url('/fonts/barlow-condensed-600-latin.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: 'Barlow Condensed'; font-weight: 600; font-display: swap; src: url('/fonts/barlow-condensed-600-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Barlow Condensed'; font-weight: 700; font-display: swap; src: url('/fonts/barlow-condensed-700-latin.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: 'Barlow Condensed'; font-weight: 700; font-display: swap; src: url('/fonts/barlow-condensed-700-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --marino: #1E3A6E;
  --marino-2: #2B4E8C;
  --rojo: #D62E25;
  --sol: #FAD24A;
  --gris: #5B6472;
  --asfalto: #15181E;
  --ok: #1F8A4C;
  --warn: #B86E00;

  --bg: #FFFFFF;
  --surface: #F3F5F9;
  --surface-2: #E8ECF3;
  --text: #15181E;
  --muted: #5B6472;
  --line: #DDE2EA;
  --accent: var(--marino);
  --accent-text: #FFFFFF;
  --link: #1E4FA0;
  --shadow: 0 6px 24px rgba(21, 24, 30, .16), 0 1px 3px rgba(21, 24, 30, .12);

  --top-offset: 0px;
  --sheet-h: 46dvh;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12151B;
    --surface: #1B2029;
    --surface-2: #252C38;
    --text: #EEF1F6;
    --muted: #A2ABBA;
    --line: #2C3442;
    --accent: #3F6CC0;
    --link: #8FB4FF;
    --shadow: 0 6px 24px rgba(0, 0, 0, .5), 0 1px 3px rgba(0, 0, 0, .4);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: 'Barlow', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 16px; line-height: 1.45; color: var(--text); background: var(--bg);
  overflow: hidden; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
body.is-admin { --top-offset: 30px; }
h1, h2, h3, .cond { font-family: 'Barlow Condensed', 'Barlow', sans-serif; font-weight: 700; letter-spacing: .01em; line-height: 1.1; }
h1 { font-size: 1.7rem; margin: 0 0 .25rem; }
h2 { font-size: 1.35rem; margin: 1.2rem 0 .5rem; }
h3 { font-size: 1.1rem; margin: 1rem 0 .4rem; }
p { margin: .35rem 0; }
a { color: var(--link); }
button { font: inherit; color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
[hidden] { display: none !important; }

/* ── Mapa ─────────────────────────────────────────────────────────────── */
.map { position: fixed; inset: 0; background: #E9ECE4; }
.maplibregl-ctrl-top-right { top: calc(var(--safe-t) + var(--top-offset) + 64px); right: 2px; }
.maplibregl-ctrl-group { border-radius: 10px !important; box-shadow: var(--shadow) !important; }
.maplibregl-ctrl-group button { width: 38px; height: 38px; }
.maplibregl-ctrl-attrib { font-size: 10px; }
.maplibregl-ctrl-bottom-right, .maplibregl-ctrl-bottom-left { bottom: calc(var(--sheet-h) + 2px); transition: bottom .25s; }
.ctrl-text-btn { font-weight: 700 !important; font-size: 12px !important; font-family: 'Barlow Condensed', sans-serif; color: #15181E !important; }
.ctrl-text-btn.on { background: var(--marino) !important; color: #fff !important; }
.layer-menu { position: absolute; right: 46px; top: 0; background: var(--bg); color: var(--text); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; min-width: 170px; z-index: 5; }
.layer-menu button { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: none; padding: 9px 10px; border-radius: 8px; text-align: left; cursor: pointer; font-size: 15px; }
.layer-menu button[aria-checked="true"] { background: var(--surface-2); font-weight: 600; }

/* Marcadores de puesto (HTML) */
.pm {
  --c: var(--marino);
  width: 30px; height: 30px; border-radius: 50%; border: 2.5px solid #fff; background: var(--c); color: #fff;
  display: grid; place-items: center; font: 700 13px/1 'Barlow Condensed', sans-serif; cursor: pointer; padding: 0;
  box-shadow: 0 1px 4px rgba(0,0,0,.45); position: relative; transition: transform .15s;
}
.pm-wrap { line-height: 0; }
.pm.t-avituallamiento { --c: #1F8A4C; border-radius: 9px; }
.pm.t-base { --c: var(--sol); color: var(--asfalto); border-radius: 8px; width: 34px; height: 34px; font-size: 16px; }
.pm.hole::after { content: ''; position: absolute; top: -4px; right: -4px; width: 11px; height: 11px; border-radius: 50%; background: var(--rojo); border: 2px solid #fff; }
.pm.checked::before { content: '✓'; position: absolute; bottom: -6px; right: -6px; width: 15px; height: 15px; border-radius: 50%; background: var(--ok); border: 2px solid #fff; font: 700 9px/11px 'Barlow', sans-serif; text-align: center; }
.pm.approx { outline: 2px dashed var(--warn); outline-offset: 2px; }
.pm.sel { transform: scale(1.35); z-index: 5; box-shadow: 0 0 0 4px rgba(214,46,37,.35), 0 2px 8px rgba(0,0,0,.5); }
.pm.dim { opacity: .45; }
.pm.dragging { transform: scale(1.5); box-shadow: 0 0 0 6px rgba(250,210,74,.6); }
.scrub-dot { width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 4px solid var(--rojo); box-shadow: 0 1px 6px rgba(0,0,0,.5); pointer-events: none; }
.maplibregl-popup-content { font-family: 'Barlow', sans-serif; border-radius: 10px; padding: 8px 12px; color: #15181E; }

/* ── Barra superior y buscador ───────────────────────────────────────── */
.topbar {
  position: fixed; z-index: 40; left: 10px; right: 10px; top: calc(var(--safe-t) + var(--top-offset) + 8px);
  display: flex; align-items: center; gap: 8px; height: 50px; padding: 0 6px 0 6px;
  background: var(--bg); border-radius: 14px; box-shadow: var(--shadow);
}
.brand { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; flex: none; }
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.search { position: relative; flex: 1; min-width: 0; display: flex; align-items: center; }
.search-ico { position: absolute; left: 10px; width: 18px; height: 18px; fill: var(--muted); pointer-events: none; }
.search input {
  width: 100%; height: 40px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface);
  padding: 0 12px 0 34px; font: 500 16px 'Barlow', sans-serif; color: var(--text); outline: none;
}
.search input:focus { border-color: var(--marino-2); background: var(--bg); }
.results {
  position: absolute; top: 46px; left: -44px; right: -8px; max-height: min(60dvh, 440px); overflow-y: auto;
  background: var(--bg); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; z-index: 50;
}
@media (min-width: 900px) { .results { left: 0; right: 0; } }
.result { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; background: none; border-radius: 9px; text-align: left; cursor: pointer; min-height: 48px; }
.result:hover, .result[aria-selected="true"] { background: var(--surface-2); }
.result .r-main { flex: 1; min-width: 0; }
.result .r-title { font-weight: 600; }
.result .r-sub { font-size: .85rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.result mark { background: rgba(250,210,74,.55); color: inherit; border-radius: 2px; }
.results-empty { padding: 14px 10px; color: var(--muted); }
.me-btn { flex: none; height: 40px; border: 0; border-radius: 10px; background: var(--rojo); color: #fff; font: 700 15px 'Barlow Condensed', sans-serif; padding: 0 12px; cursor: pointer; }

.admin-bar {
  position: fixed; top: var(--safe-t); left: 0; right: 0; height: 30px; z-index: 45; display: flex; align-items: center; justify-content: center; gap: 14px;
  background: var(--sol); color: var(--asfalto); font: 600 14px 'Barlow', sans-serif;
}
.admin-bar a { color: var(--asfalto); font-weight: 700; }
.admin-bar button { border: 1px solid rgba(0,0,0,.25); background: transparent; border-radius: 6px; padding: 1px 8px; cursor: pointer; }

.route-chips { position: fixed; z-index: 20; left: 10px; top: calc(var(--safe-t) + var(--top-offset) + 66px); display: flex; gap: 6px; flex-wrap: wrap; }
.rchip {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 17px; border: 0;
  background: var(--bg); color: var(--text); box-shadow: var(--shadow); font: 700 15px 'Barlow Condensed', sans-serif; cursor: pointer;
}
.rchip i { width: 14px; height: 4px; border-radius: 2px; background: var(--c); }
.rchip[aria-pressed="false"] { opacity: .55; }
.rchip[aria-pressed="false"] i { background: var(--muted); }

/* ── Panel inferior (móvil) / lateral (escritorio) ───────────────────── */
.sheet {
  position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; height: var(--sheet-h);
  background: var(--bg); border-radius: 18px 18px 0 0; box-shadow: 0 -4px 24px rgba(0,0,0,.18);
  display: flex; flex-direction: column; transition: height .25s ease;
}
.sheet.dragging { transition: none; }
.sheet-grip { flex: none; height: 26px; display: grid; place-items: center; cursor: grab; touch-action: none; }
.sheet-grip span { width: 42px; height: 5px; border-radius: 3px; background: var(--line); }
.sheet-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 0 16px calc(28px + var(--safe-b)); -webkit-overflow-scrolling: touch; }
@media (min-width: 900px) {
  :root { --sheet-h: 0px; }
  .sheet { top: calc(var(--top-offset) + 70px); left: 10px; bottom: 10px; width: 400px; height: auto !important; border-radius: 16px; box-shadow: var(--shadow); }
  .sheet-grip { display: none; }
  .sheet-body { padding-top: 14px; }
  .topbar { right: auto; width: 400px; }
  .route-chips { left: 420px; top: calc(var(--top-offset) + 18px); }
  .maplibregl-ctrl-top-right { top: calc(var(--top-offset) + 10px); }
  .maplibregl-ctrl-bottom-right, .maplibregl-ctrl-bottom-left { bottom: 0; }
}

/* ── Componentes ─────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 14px;
  border-radius: 11px; border: 1px solid var(--line); background: var(--surface); color: var(--text);
  font: 600 15px 'Barlow', sans-serif; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn:disabled { opacity: .5; cursor: default; }
.btn-primary { background: var(--marino); border-color: var(--marino); color: #fff; }
.btn-red { background: var(--rojo); border-color: var(--rojo); color: #fff; }
.btn-ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn-ghost { background: transparent; }
.btn-danger { color: var(--rojo); }
.btn-block { width: 100%; }
.btn-sm { min-height: 34px; padding: 0 10px; font-size: 14px; border-radius: 9px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.btn-row .btn { flex: 1 1 auto; }

.badge {
  display: inline-grid; place-items: center; min-width: 34px; height: 34px; padding: 0 7px; border-radius: 50%;
  background: var(--marino); color: #fff; font: 700 15px/1 'Barlow Condensed', sans-serif; flex: none;
}
.badge.t-avituallamiento { background: #1F8A4C; border-radius: 9px; }
.badge.t-base { background: var(--sol); color: var(--asfalto); border-radius: 8px; }
.badge.t-tarea, .badge.t-escoba, .badge.t-corre { background: var(--surface-2); color: var(--text); border-radius: 9px; font-size: 13px; }
.badge.sm { min-width: 26px; height: 26px; font-size: 13px; }

.chip { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 9px; border-radius: 12px; background: var(--surface-2); font-size: 13px; font-weight: 600; white-space: nowrap; }
.chip.ok { background: rgba(31,138,76,.14); color: var(--ok); }
.chip.warn { background: rgba(214,46,37,.12); color: var(--rojo); }
.chip.amber { background: rgba(184,110,0,.14); color: var(--warn); }
.chip.route { background: color-mix(in srgb, var(--c) 14%, transparent); color: var(--c); }
@media (prefers-color-scheme: dark) { .chip.route { color: color-mix(in srgb, var(--c) 55%, white); } }

.card { background: var(--surface); border-radius: 14px; padding: 12px 14px; margin: 10px 0; }
.card.hl { background: color-mix(in srgb, var(--sol) 22%, var(--bg)); }
.card-head { display: flex; align-items: center; gap: 10px; }
.card-head .ch-main { flex: 1; min-width: 0; }
.card-kicker { font: 700 12px 'Barlow', sans-serif; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.card-title { font: 700 1.2rem/1.15 'Barlow Condensed', sans-serif; }

.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 8px 0; font-size: .95rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }

.head { display: flex; align-items: flex-start; gap: 12px; margin: 4px 0 8px; }
.head .badge { min-width: 44px; height: 44px; font-size: 19px; }
.head .h-main { flex: 1; min-width: 0; }
.back { display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; color: var(--link); padding: 4px 0; font-weight: 600; cursor: pointer; }

.notice { border-left: 4px solid var(--warn); background: rgba(184,110,0,.10); padding: 8px 12px; border-radius: 8px; margin: 8px 0; font-size: .92rem; }
.notice.info { border-color: var(--marino-2); background: rgba(43,78,140,.10); }

.people { list-style: none; margin: 6px 0; padding: 0; }
.people li { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.people li:last-child { border-bottom: 0; }
.people a { color: var(--text); font-weight: 600; text-decoration: none; flex: 1; }
.people .me { color: var(--rojo); }
.tick { color: var(--ok); font-weight: 700; font-size: .85rem; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 12px -16px 8px; padding: 0 16px; position: sticky; top: -1px; background: var(--bg); z-index: 2; }
.tabs button { border: 0; background: none; padding: 10px 10px 8px; font: 700 16px 'Barlow Condensed', sans-serif; color: var(--muted); border-bottom: 3px solid transparent; cursor: pointer; }
.tabs button[aria-selected="true"] { color: var(--text); border-color: var(--rojo); }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 8px 0; }
.stat { background: var(--surface); border-radius: 10px; padding: 6px 8px; }
.stat b { display: block; font: 700 1.25rem/1.1 'Barlow Condensed', sans-serif; }
.stat span { font-size: .78rem; color: var(--muted); }

.seg { display: inline-flex; background: var(--surface-2); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: none; padding: 6px 12px; border-radius: 8px; font: 700 15px 'Barlow Condensed', sans-serif; cursor: pointer; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--bg); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.15); }

/* Perfil de altitud */
.profile { position: relative; margin: 6px 0 4px; user-select: none; -webkit-user-select: none; }
.profile svg { display: block; width: 100%; height: 150px; touch-action: pan-y; }
.profile .pf-read { height: 22px; font-size: .9rem; font-weight: 600; display: flex; gap: 10px; }
.profile .pf-read span { color: var(--muted); font-weight: 500; }
.pf-grid { stroke: var(--line); stroke-width: 1; }
.pf-axis { fill: var(--muted); font: 500 10px 'Barlow', sans-serif; }
.pf-line { fill: none; stroke-width: 2; }
.pf-mark { font: 700 10px 'Barlow Condensed', sans-serif; fill: var(--text); }
.pf-cursor { stroke: var(--rojo); stroke-width: 1.5; }

/* Tablas de pasos */
.passes { width: 100%; border-collapse: collapse; font-size: .92rem; margin: 6px 0; }
.passes th { text-align: left; font-weight: 600; color: var(--muted); font-size: .8rem; padding: 4px 6px 4px 0; }
.passes td { padding: 6px 6px 6px 0; border-top: 1px solid var(--line); }
.passes td b { font-family: 'Barlow Condensed', sans-serif; font-size: 1.05rem; }

/* Lista de puestos */
.plist { list-style: none; margin: 0; padding: 0; }
.plist li > a { display: flex; gap: 10px; align-items: center; padding: 9px 2px; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none; }
.plist .pl-main { flex: 1; min-width: 0; }
.plist .pl-name { font-weight: 600; line-height: 1.2; }
.plist .pl-sub { font-size: .84rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.group-title { font: 700 13px 'Barlow', sans-serif; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 16px 0 2px; }

/* Programa */
.sched { width: 100%; border-collapse: collapse; }
.sched td { padding: 7px 8px 7px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.sched td:first-child { font: 700 1.05rem 'Barlow Condensed', sans-serif; width: 58px; }

/* Comentarios y fotos */
.feed-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin: 8px 0; }
.feed-photos button { padding: 0; border: 0; background: var(--surface-2); aspect-ratio: 1; border-radius: 8px; overflow: hidden; cursor: pointer; position: relative; }
.feed-photos img { width: 100%; height: 100%; object-fit: cover; display: block; }
.feed-photos .hidden-tag { position: absolute; left: 4px; top: 4px; }
.feed-photos .ph { display: flex; flex-direction: column; gap: 2px; }
.feed-photos .ph > button { width: 100%; }
.ph-actions { display: flex; gap: 10px; justify-content: center; }
.comment { padding: 8px 0; border-bottom: 1px solid var(--line); }
.comment .c-meta { font-size: .8rem; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.comment .c-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.comment.is-hidden { opacity: .5; }
.linkbtn { border: 0; background: none; color: var(--link); padding: 0; cursor: pointer; font-size: .8rem; }

.field { display: block; margin: 8px 0; }
.field > span { display: block; font-size: .85rem; font-weight: 600; color: var(--muted); margin-bottom: 3px; }
.field input, .field textarea, .field select {
  width: 100%; min-height: 44px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--text);
  padding: 8px 10px; font: 16px 'Barlow', sans-serif;
}
.field textarea { min-height: 76px; resize: vertical; }
.field-row { display: flex; gap: 8px; }
.field-row > * { flex: 1; }
.check { display: flex; align-items: center; gap: 8px; margin: 8px 0; }
.check input { width: 20px; height: 20px; }

.progress { height: 8px; background: var(--surface-2); border-radius: 4px; overflow: hidden; margin: 8px 0; }
.progress i { display: block; height: 100%; width: 0; background: var(--ok); transition: width .2s; }

/* Barra flotante (mover punto, crear punto) */
.floatbar {
  position: fixed; z-index: 45; left: 10px; right: 10px; bottom: calc(var(--sheet-h) + 10px + var(--safe-b));
  background: var(--bg); border-radius: 14px; box-shadow: var(--shadow); padding: 10px 12px;
}
@media (min-width: 900px) { .floatbar { left: 420px; right: auto; width: 460px; bottom: 20px; } }
.floatbar p { margin: 0 0 8px; font-weight: 600; }

/* Puerta con clave */
.gate { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: var(--marino); color: #fff; }
.gate-box { width: 100%; max-width: 360px; text-align: center; }
.gate-logo { width: 180px; margin: 0 auto 14px; display: block; }
.gate h1 { font-size: 2.2rem; margin: 0 0 6px; }
.gate p { opacity: .9; }
.gate input { width: 100%; height: 50px; margin: 14px 0 10px; border-radius: 12px; border: 0; padding: 0 14px; font: 500 18px 'Barlow', sans-serif; text-align: center; }
.gate .btn-primary { background: var(--rojo); border-color: var(--rojo); min-height: 50px; font-size: 17px; }
.gate-err { color: var(--sol); min-height: 1.4em; font-weight: 600; }

.toast {
  position: fixed; z-index: 120; left: 50%; bottom: calc(var(--sheet-h) + 16px + var(--safe-b)); transform: translateX(-50%) translateY(20px);
  background: var(--asfalto); color: #fff; padding: 10px 16px; border-radius: 12px; font-weight: 600; opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s; max-width: calc(100vw - 32px); text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
@media (min-width: 900px) { .toast { bottom: 24px; } }

.lightbox { position: fixed; inset: 0; z-index: 110; background: rgba(0,0,0,.92); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 16px; }
.lightbox img { max-width: 100%; max-height: 82dvh; border-radius: 8px; }
.lightbox-cap { color: #fff; margin-top: 10px; text-align: center; }
.lightbox-close { position: absolute; top: calc(10px + var(--safe-t)); right: 12px; width: 44px; height: 44px; border: 0; border-radius: 22px; background: rgba(255,255,255,.15); color: #fff; font-size: 28px; cursor: pointer; }

.loading { padding: 30px 0; text-align: center; color: var(--muted); }
.empty { color: var(--muted); font-size: .92rem; padding: 6px 0; }
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
.foot { margin-top: 22px; font-size: .78rem; color: var(--muted); }

/* ── Hojas imprimibles ───────────────────────────────────────────────── */
.print-root { position: fixed; inset: 0; z-index: 90; overflow: auto; background: #D9DDE4; color: #15181E; }
.print-toolbar { position: sticky; top: 0; z-index: 2; display: flex; gap: 8px; align-items: center; padding: 10px 14px; background: var(--marino); color: #fff; }
.print-toolbar b { flex: 1; }
.print-page { width: 210mm; min-height: 297mm; margin: 14px auto; background: #fff; padding: 14mm 14mm 12mm; box-shadow: 0 2px 10px rgba(0,0,0,.2); }
.pp-head { display: flex; align-items: center; gap: 12px; border-bottom: 3px solid #1E3A6E; padding-bottom: 8px; margin-bottom: 10px; }
.pp-head img { height: 40px; }
.pp-head .pp-ev { flex: 1; font: 600 13px 'Barlow', sans-serif; color: #5B6472; text-align: right; }
.pp-title { display: flex; align-items: center; gap: 14px; margin: 6px 0 10px; }
.pp-title .badge { min-width: 64px; height: 64px; font-size: 28px; }
.pp-title h1 { font-size: 30px; margin: 0; }
.pp-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; font-size: 14px; }
.pp-cols h3 { margin: 6px 0 4px; font-size: 16px; }
.pp-people { list-style: none; margin: 0; padding: 0; }
.pp-people li { padding: 5px 0; border-bottom: 1px solid #DDE2EA; font-size: 15px; }
.pp-people li::before { content: '☐ '; }
.smap { position: relative; overflow: hidden; border-radius: 6px; border: 1px solid #C9CFD9; background: #EEE; }
.smap img { position: absolute; width: 256px; height: 256px; max-width: none; }
.smap svg { position: absolute; inset: 0; }
.smap .smap-attr { position: absolute; right: 3px; bottom: 2px; font-size: 8px; background: rgba(255,255,255,.75); padding: 0 3px; }
.pp-maps { display: grid; grid-template-columns: 1.6fr 1fr; gap: 8px; margin: 10px 0; }
.pp-foot { margin-top: 10px; font-size: 11px; color: #5B6472; }
@media print {
  @page { size: A4; margin: 0; }
  html, body { overflow: visible !important; height: auto !important; background: #fff !important; }
  body > *:not(#print) { display: none !important; }
  .print-root { position: static; overflow: visible; background: #fff; }
  .print-toolbar { display: none; }
  .print-page { margin: 0; box-shadow: none; page-break-after: always; break-after: page; }
  .print-page:last-child { page-break-after: auto; break-after: auto; }
}
