/* =========================================================
   Ascensores · estilos base (primero celular, después tablet y PC)
   Paleta "acero y esmalte de cabina". Tema claro/oscuro con data-theme.
   ========================================================= */

:root {
    --bg: #eef1f4;
    --surface: #ffffff;
    --surface-2: #f5f7f9;
    --ink: #1b2430;
    --ink-2: #4a5868;
    --ink-3: #566270; /* 5,5:1 sobre --bg (WCAG AA). Antes #6b7888 = 3,97:1 */
    --line: #d5dce3;
    --line-strong: #b9c3ce;
    --primary: #1f4e79;
    --primary-hover: #183f63;
    --primary-ink: #ffffff;
    --primary-soft: #e3ecf5;
    --focus: #2f7bc4;

    /* Display de piso: igual en los dos temas */
    --display-bg: #161c24;
    --display-digit: #f4b740;
    --display-dim: #4b5560;
    --display-label: #8c99a8;

    /* Semáforo (siempre acompañado de texto) */
    --sem-red: #c93838;
    --sem-amber: #d99a0b;
    --sem-green: #2e8b57;
    --sem-none: #98a4b1;

    --ok-bg: #e5f3eb; --ok-ink: #1d6b41;
    --err-bg: #fbe9e9; --err-ink: #9b2525;
    --info-bg: #e8eef5; --info-ink: #24486c;

    --radius-sm: 8px;
    --radius: 10px;
    --radius-lg: 14px;
    --shadow-overlay: 0 18px 40px rgba(17, 27, 39, .22);

    --font: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --fs-xs: .8125rem;   /* 13 */
    --fs-sm: .9375rem;   /* 15 */
    --fs-md: 1rem;       /* 16 */
    --fs-lg: 1.1875rem;  /* 19 */
    --fs-xl: 1.4375rem;  /* 23 */
    --fs-2xl: 1.75rem;   /* 28 */

    --side-w: 272px;
    --topbar-h: 56px;
    --tabbar-h: 64px;
    --safe-b: env(safe-area-inset-bottom, 0px);
    color-scheme: light;
}

:root[data-theme="dark"] {
    --bg: #12181f;
    --surface: #1a222b;
    --surface-2: #212b36;
    --ink: #e5eaf0;
    --ink-2: #a9b5c2;
    --ink-3: #8794a3;
    --line: #2c3844;
    --line-strong: #3b4957;
    --primary: #7fb0e0;
    --primary-hover: #9cc3ea;
    --primary-ink: #0e1a26;
    --primary-soft: #1e3247;
    --focus: #9cc3ea;
    --display-bg: #0b0f14;
    --sem-red: #e05a5a;
    --sem-amber: #e8ad2b;
    --sem-green: #47a873;
    --sem-none: #6f7c8a;
    --ok-bg: #173327; --ok-ink: #8fd6ad;
    --err-bg: #3a1d1f; --err-ink: #f2a7a7;
    --info-bg: #1b2b3c; --info-ink: #a9c8e8;
    --shadow-overlay: 0 18px 40px rgba(0, 0, 0, .5);
    color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    min-height: 100dvh;
    background: var(--bg);
    color: var(--ink);
    font: 400 var(--fs-md)/1.5 var(--font);
    font-feature-settings: "tnum" 1;
    -webkit-tap-highlight-color: transparent;
}
h1, h2, h3 { margin: 0; line-height: 1.25; font-weight: 600; }
p { margin: 0 0 .75em; }
p:last-child { margin-bottom: 0; }
a { color: var(--primary); text-underline-offset: 2px; }
a:hover { color: var(--primary-hover); }
img { max-width: 100%; display: block; }
code { font: 500 .95em/1.4 var(--font); }
[hidden] { display: none !important; }
.muted { color: var(--ink-3); }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.icon { flex: none; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }

.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.skip-link:focus { top: 12px; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; }
}

/* ---------- Botones y campos ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 48px; padding: 10px 18px;
    border: 1px solid transparent; border-radius: var(--radius);
    font: 600 var(--fs-md)/1.2 var(--font); text-decoration: none; cursor: pointer;
    background: var(--surface-2); color: var(--ink);
    transition: background-color .15s, border-color .15s;
}
.btn:hover { color: inherit; }
.btn--primary { background: var(--primary); color: var(--primary-ink); }
.btn--primary:hover { background: var(--primary-hover); color: var(--primary-ink); }
.btn--quiet { background: transparent; border-color: var(--line-strong); color: var(--ink); }
.btn--quiet:hover { background: var(--surface-2); }
.btn--google { background: var(--surface); border-color: var(--line-strong); color: var(--ink); }
.btn--google:hover { background: var(--surface-2); }
.btn--sm { min-height: 40px; padding: 6px 12px; font-size: var(--fs-sm); }
.btn--block { width: 100%; }

.icon-btn {
    display: inline-grid; place-items: center; width: 44px; height: 44px;
    border: 0; border-radius: var(--radius); background: transparent; color: var(--ink); cursor: pointer;
}
.icon-btn:hover { background: var(--surface-2); }

.field { display: grid; gap: 6px; }
.field__label { font-size: var(--fs-sm); font-weight: 500; color: var(--ink-2); }
.field__error { color: var(--err-ink); font-size: var(--fs-sm); margin: 0; }
input, select, textarea {
    width: 100%; min-height: 48px; padding: 10px 12px;
    font: 400 var(--fs-md)/1.4 var(--font); color: var(--ink);
    background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--focus); outline-offset: 0; border-color: var(--focus); }

.stack { display: grid; gap: 14px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

.chip {
    display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px;
    border-radius: 999px; background: var(--primary-soft); color: var(--primary);
    font-size: var(--fs-xs); font-weight: 600;
}
:root[data-theme="dark"] .chip { color: var(--primary-hover); }

.notice {
    display: flex; gap: 10px; align-items: flex-start;
    padding: 12px 14px; margin: 0 0 16px; border-radius: var(--radius);
    background: var(--info-bg); color: var(--info-ink); font-size: var(--fs-sm);
}
.notice .icon { margin-top: 1px; }
.notice--ok { background: var(--ok-bg); color: var(--ok-ink); }
.notice--error { background: var(--err-bg); color: var(--err-ink); }

/* ---------- Marca ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
.brand__name { font-weight: 700; font-size: var(--fs-lg); letter-spacing: -.01em; }
.brand-mark { width: 34px; height: 34px; flex: none; }
.brand-mark--lg { width: 64px; height: 64px; }
.brand-mark__frame { fill: var(--primary); }
.brand-mark__door { fill: var(--primary-ink); opacity: .92; }
.brand-mark__arrows { fill: none; stroke: var(--display-digit); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Indicador de período (display de piso) ---------- */
.floor {
    display: inline-flex; align-items: center; gap: 8px;
    height: 40px; padding: 0 10px 0 8px; border-radius: var(--radius-sm);
    background: var(--display-bg); color: var(--display-label);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06), inset 0 2px 6px rgba(0, 0, 0, .5);
    flex: none;
}
.floor__arrows { display: grid; gap: 3px; }
.floor__arrows i { display: block; width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; }
.floor__arrows i:first-child { border-bottom: 6px solid var(--display-digit); filter: drop-shadow(0 0 3px rgba(244, 183, 64, .6)); }
.floor__arrows i:last-child { border-top: 6px solid var(--display-dim); }
.floor__digits {
    font: 600 1.5rem/1 var(--font); font-variant-numeric: tabular-nums; letter-spacing: .04em;
    color: var(--display-digit); text-shadow: 0 0 8px rgba(244, 183, 64, .55);
}
.floor__label { font-size: 10px; line-height: 1.15; font-weight: 500; }

/* ---------- Shell: celular ---------- */
.has-shell { padding-bottom: calc(var(--tabbar-h) + var(--safe-b)); }

.topbar {
    position: sticky; top: 0; z-index: 20;
    display: flex; align-items: center; gap: 8px;
    height: var(--topbar-h); padding: 0 12px 0 6px;
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: saturate(1.4) blur(10px);
    border-bottom: 1px solid var(--line);
}
.topbar__brand { display: none; }
.topbar__title { flex: 1; min-width: 0; font-size: var(--fs-lg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.main { padding: 18px 16px 28px; max-width: 1180px; outline: none; }

.side {
    position: fixed; inset: 0 auto 0 0; z-index: 40;
    width: min(86vw, var(--side-w)); display: flex; flex-direction: column;
    background: var(--surface); border-right: 1px solid var(--line);
    transform: translateX(-102%); transition: transform .22s ease;
    overflow-y: auto; overscroll-behavior: contain;
}
.side-open .side { transform: none; box-shadow: var(--shadow-overlay); }
.scrim { position: fixed; inset: 0; z-index: 30; background: rgba(10, 16, 24, .45); }
.side__head { display: flex; align-items: center; justify-content: space-between; padding: 14px 10px 10px 16px; }
.side__nav { flex: 1 0 auto; padding: 4px 10px 12px; }
.side__group + .side__group { margin-top: 14px; }
.side__title { padding: 8px 10px 4px; font-size: var(--fs-xs); font-weight: 600; color: var(--ink-3); }
.side__nav ul { list-style: none; margin: 0; padding: 0; }
.side__link {
    display: flex; align-items: center; gap: 12px; width: 100%;
    min-height: 44px; padding: 8px 10px; border: 0; border-radius: var(--radius-sm);
    background: transparent; color: var(--ink); font: 500 var(--fs-sm)/1.2 var(--font);
    text-decoration: none; cursor: pointer; text-align: left;
}
.side__link:hover { background: var(--surface-2); color: var(--ink); }
.side__link.is-active { background: var(--primary-soft); color: var(--primary); font-weight: 600; box-shadow: inset 3px 0 0 var(--primary); }
:root[data-theme="dark"] .side__link.is-active { color: var(--primary-hover); }
.side__link.is-soon { color: var(--ink-3); cursor: default; }
.side__link.is-soon:hover { background: transparent; }
.soon { margin-left: auto; white-space: nowrap; font-size: 11px; font-weight: 500; color: var(--ink-3); border: 1px solid var(--line); border-radius: 999px; padding: 1px 7px; }
.side__foot { display: grid; gap: 6px; padding: 10px; border-top: 1px solid var(--line); background: var(--surface); }
@media (min-height: 900px) { .side__foot { position: sticky; bottom: 0; } }
.side__logout { color: var(--ink-2); }

.who { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-sm); color: var(--ink); text-decoration: none; }
.who:hover, .who.is-active { background: var(--surface-2); color: var(--ink); }
.who__text { display: grid; min-width: 0; }
.who__text strong { font-size: var(--fs-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who__text small { font-size: var(--fs-xs); color: var(--ink-3); }

.avatar {
    display: inline-grid; place-items: center; width: 36px; height: 36px; flex: none; overflow: hidden;
    border-radius: 50%; background: var(--primary-soft); color: var(--primary); font-weight: 600; font-size: var(--fs-xs);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar--lg { width: 64px; height: 64px; font-size: var(--fs-lg); }

.theme-switch fieldset { display: flex; gap: 4px; margin: 0; padding: 3px; border: 1px solid var(--line); border-radius: var(--radius); }
.theme-switch__opt { flex: 1; display: grid; place-items: center; height: 36px; border-radius: var(--radius-sm); color: var(--ink-3); cursor: pointer; }
.theme-switch__opt input { position: absolute; opacity: 0; pointer-events: none; }
.theme-switch__opt:has(input:checked) { background: var(--surface-2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong); }
.theme-switch__opt:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 1px; }

.tabbar {
    position: fixed; inset: auto 0 0 0; z-index: 20;
    display: grid; grid-template-columns: repeat(4, 1fr);
    height: calc(var(--tabbar-h) + var(--safe-b)); padding-bottom: var(--safe-b);
    background: var(--surface); border-top: 1px solid var(--line);
}
.tabbar__item {
    display: grid; place-items: center; align-content: center; gap: 3px;
    border: 0; background: transparent; color: var(--ink-2); text-decoration: none;
    font: 500 11px/1.1 var(--font); cursor: pointer;
}
.tabbar__item:hover { color: var(--ink); }
.tabbar__item.is-active { color: var(--primary); font-weight: 600; }
:root[data-theme="dark"] .tabbar__item.is-active { color: var(--primary-hover); }
.tabbar__item.is-soon { color: var(--ink-3); opacity: .55; cursor: default; }

/* ---------- Contenido ---------- */
.page-head { margin-bottom: 18px; }
.page-head__title { font-size: var(--fs-xl); letter-spacing: -.01em; }
.page-head__sub { color: var(--ink-2); margin-top: 2px; }

.panel {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
    padding: 18px 16px; margin-bottom: 16px;
}
.panel__title { font-size: var(--fs-lg); margin-bottom: 4px; }
.panel__sub { font-size: var(--fs-sm); margin-bottom: 14px; }

/* Lecturas del mes: un solo tablero dividido, no tarjetas sueltas */
.readouts {
    display: grid; grid-template-columns: 1fr 1fr; gap: 1px;
    margin-bottom: 16px; overflow: hidden;
    background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-lg);
}
.readout { display: grid; gap: 4px; padding: 14px 16px; background: var(--surface); }
.readout__label { font-size: var(--fs-sm); color: var(--ink-2); }
.readout__value { font-size: var(--fs-2xl); font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; }
.readout__value small { font-size: var(--fs-md); font-weight: 500; color: var(--ink-3); margin-left: 2px; }

.empty { display: flex; gap: 14px; align-items: flex-start; }
.empty__icon { color: var(--ink-3); margin-top: 2px; }
.empty__title { font-size: var(--fs-md); margin-bottom: 4px; }
.empty p, .panel__sub { max-width: 68ch; }

.legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.legend li { display: flex; gap: 10px; align-items: center; font-size: var(--fs-sm); }
.sem { width: 14px; height: 14px; border-radius: 50%; flex: none; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 18%, transparent); }
.sem--red { background: var(--sem-red); color: var(--sem-red); }
.sem--amber { background: var(--sem-amber); color: var(--sem-amber); }
.sem--green { background: var(--sem-green); color: var(--sem-green); }
.sem--none { background: transparent; border: 2px solid var(--sem-none); color: var(--sem-none); }

.profile { display: flex; gap: 16px; align-items: center; }
.choice-list { display: grid; gap: 8px; }
.choice {
    display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 10px 14px;
    border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer;
}
.choice input { width: 20px; height: 20px; min-height: 0; margin: 0; accent-color: var(--primary); }
.choice:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }

/* ---------- Ingreso y pantallas sueltas ---------- */
.page-auth { background: var(--bg); }
.auth { position: relative; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px 72px; overflow: hidden; }
/* Guías del pasadizo: dos rieles verticales detrás de la tarjeta */
.auth__rails {
    position: absolute; inset: 0; pointer-events: none;
    background:
        linear-gradient(90deg, transparent calc(50% - 232px), var(--line) calc(50% - 232px), var(--line) calc(50% - 230px), transparent calc(50% - 228px)),
        linear-gradient(90deg, transparent calc(50% + 228px), var(--line) calc(50% + 230px), var(--line) calc(50% + 232px), transparent calc(50% + 232px));
}
.auth__card {
    position: relative; width: 100%; max-width: 420px; display: grid; gap: 16px;
    padding: 28px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
}
.auth__brand { display: grid; justify-items: start; gap: 10px; margin-bottom: 6px; }
.auth__name { font-size: var(--fs-2xl); letter-spacing: -.02em; }
.auth__sub { color: var(--ink-2); margin: 0; }
.auth__title { font-size: var(--fs-xl); }
.auth__legal { font-size: var(--fs-xs); color: var(--ink-3); margin: 0; }
.auth .notice { margin: 0; }

.devlogin { border: 1px dashed var(--line-strong); border-radius: var(--radius); padding: 0 14px; }
.devlogin summary { min-height: 48px; display: flex; align-items: center; cursor: pointer; font-size: var(--fs-sm); color: var(--ink-2); font-weight: 500; }
.devlogin[open] { padding-bottom: 14px; }
.devlogin[open] summary { margin-bottom: 4px; }

.norole__head { display: grid; gap: 12px; justify-items: start; }
.norole__icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); }
.copybox { display: flex; gap: 8px; align-items: center; justify-content: space-between; padding: 8px 8px 8px 14px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); }
.copybox code { overflow-wrap: anywhere; font-weight: 600; }

.err__code { font: 600 3rem/1 var(--font); color: var(--display-digit); background: var(--display-bg); justify-self: start; padding: 6px 14px; border-radius: var(--radius-sm); text-shadow: 0 0 10px rgba(244, 183, 64, .5); margin: 0; }

.theme-floating { position: fixed; right: 16px; bottom: 16px; width: 140px; background: var(--surface); border-radius: var(--radius); }

.page-doc .doc { max-width: 720px; margin: 0 auto; padding: 24px 16px 48px; }
.doc__brand { margin-bottom: 24px; }
.doc__body { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px 18px; }
.doc__body h1 { font-size: var(--fs-xl); margin-bottom: 14px; }
.doc__body h2 { font-size: var(--fs-lg); margin: 20px 0 8px; }
.doc__body ul { padding-left: 20px; }
.doc__body li { margin-bottom: 6px; }
.doc__nav { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 16px; font-size: var(--fs-sm); }

/* ---------- Tablet ---------- */
@media (min-width: 640px) {
    .main { padding: 24px 24px 36px; }
    .readouts { grid-template-columns: repeat(4, 1fr); }
    .panel { padding: 20px 22px; }
    .auth__card { padding: 34px 32px; }
}

/* ---------- PC ---------- */
@media (min-width: 1024px) {
    .has-shell { padding-bottom: 0; }
    .side { transform: none; width: var(--side-w); transition: none; box-shadow: none; }
    .side-open .side { box-shadow: none; }
    .side__close, .topbar__menu, .scrim, .tabbar { display: none !important; }
    .shell { margin-left: var(--side-w); }
    .topbar { padding: 0 28px; height: 64px; }
    .topbar__title { font-size: var(--fs-xl); }
    .main { padding: 28px 28px 48px; }
}

/* =========================================================
   Etapa 1: listados, formularios, roles y permisos
   ========================================================= */
.btn--danger { background: transparent; border-color: color-mix(in srgb, var(--sem-red) 55%, transparent); color: var(--err-ink); }
.btn--danger:hover { background: var(--err-bg); color: var(--err-ink); }
.btn.is-disabled { opacity: .45; pointer-events: none; }
.icon-btn--line { border: 1px solid var(--line-strong); }
.icon-btn--danger { color: var(--err-ink); }
.icon-btn--danger:hover { background: var(--err-bg); }

.chip--muted { background: var(--surface-2); color: var(--ink-2); font-weight: 500; }
.chip--danger { background: var(--err-bg); color: var(--err-ink); }
:root[data-theme="dark"] .chip--muted { color: var(--ink-2); }
:root[data-theme="dark"] .chip--danger { color: var(--err-ink); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tag { display: inline-flex; gap: 6px; align-items: baseline; padding: 3px 9px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: var(--fs-xs); color: var(--ink-2); background: var(--surface); }
.tag b { color: var(--ink); font-weight: 600; }
.tag--warn { border-color: color-mix(in srgb, var(--sem-amber) 60%, transparent); color: var(--ink); background: color-mix(in srgb, var(--sem-amber) 12%, var(--surface)); }
.small { font-size: var(--fs-sm); }

.page-head--actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; justify-content: space-between; }
.crumbs { margin: 0 0 10px; font-size: var(--fs-sm); }
.crumbs a { text-decoration: none; }
.crumbs a::before { content: "‹ "; }

.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.toolbar select { width: auto; min-width: 150px; flex: 1 1 150px; }
.toolbar__search { position: relative; flex: 2 1 220px; display: flex; align-items: center; }
.toolbar__search .icon { position: absolute; left: 12px; color: var(--ink-3); pointer-events: none; }
.toolbar__search input { padding-left: 38px; }
.list-count { font-size: var(--fs-sm); margin: 0 0 8px; }

/* Filas: una lista dividida, no tarjetas sueltas */
.rows { list-style: none; margin: 0 0 16px; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.rows--flat { border-radius: var(--radius); margin: 0 0 12px; }
.row-item { display: flex; gap: 12px; align-items: center; padding: 14px 16px; }
.row-item + .row-item { border-top: 1px solid var(--line); }
.row-item.is-muted .row-item__main { opacity: .65; }
.row-item__link { display: flex; gap: 12px; align-items: center; flex: 1; min-width: 0; margin: -14px -16px; padding: 14px 16px; color: inherit; text-decoration: none; }
.row-item__link:hover { background: var(--surface-2); color: inherit; }
.row-item__main { flex: 1; min-width: 0; }
.row-item__title { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; }
.row-item__desc { margin: 2px 0 0; color: var(--ink-2); font-size: var(--fs-sm); overflow-wrap: anywhere; }
.row-item__actions { display: flex; gap: 6px; flex: none; }
.row-item__chev { color: var(--ink-3); }
.facts { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 8px 0 0; font-size: var(--fs-sm); }
.facts div { display: flex; gap: 6px; }
.facts dt { color: var(--ink-3); }
.facts dd { margin: 0; font-weight: 500; font-variant-numeric: tabular-nums; }

.pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 16px; }
.pager__info { font-size: var(--fs-sm); color: var(--ink-2); }

.notice--link { text-decoration: none; }
.notice--link:hover { filter: brightness(.97); }
.notice:not(.notice--ok):not(.notice--error).notice--link { background: color-mix(in srgb, var(--sem-amber) 14%, var(--surface)); color: var(--ink); }

.grid-2 { display: grid; gap: 14px; }
.grid-2 + .grid-2 { margin-top: 14px; }
.field__hint { font-size: var(--fs-xs); color: var(--ink-3); }
.panel__note { display: flex; gap: 8px; align-items: center; margin: 14px 0 0; font-size: var(--fs-sm); }
.choice--inline { align-self: end; }
.choice input[type="checkbox"] { width: 20px; height: 20px; min-height: 0; margin: 0; accent-color: var(--primary); }
.form-actions {
    position: sticky; bottom: calc(var(--tabbar-h) + var(--safe-b)); z-index: 5;
    display: flex; gap: 10px; justify-content: flex-end; padding: 12px 0;
    background: linear-gradient(to top, var(--bg) 70%, transparent);
}
.form-actions .btn { flex: 1; }
.inline-form select { max-width: 320px; margin-top: 6px; }
.add-role { display: grid; gap: 12px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.add-role__title { font-size: var(--fs-md); }
.profile__main { min-width: 0; }

/* Selector de empresa en el menú */
.company { display: grid; gap: 4px; margin: 0 16px 8px; padding: 10px 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); }
.company__label { font-size: var(--fs-xs); color: var(--ink-3); }
.company select { min-height: 40px; padding: 6px 10px; }
.company--single strong { font-size: var(--fs-sm); }

/* Switch */
.switch { position: relative; display: inline-flex; flex: none; width: 40px; height: 24px; }
.switch input { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.switch__track { width: 100%; height: 100%; border-radius: 999px; background: var(--line-strong); transition: background-color .15s; }
.switch__track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.3); transition: transform .15s; }
.switch input:checked + .switch__track { background: var(--primary); }
.switch input:checked + .switch__track::after { transform: translateX(16px); }
.switch input:indeterminate + .switch__track { background: color-mix(in srgb, var(--primary) 45%, var(--line-strong)); }
.switch input:indeterminate + .switch__track::after { transform: translateX(8px); }
.switch input:disabled { cursor: not-allowed; }
.switch input:disabled + .switch__track { opacity: .45; }
.switch input:focus-visible + .switch__track { outline: 3px solid var(--focus); outline-offset: 2px; }

/* Editor de permisos */
.perms__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px; }
.perms__count { font-size: var(--fs-sm); color: var(--ink-2); }
.perms__count strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.perms__tools { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 16px; }
.perms__tools select { width: auto; flex: 1 1 180px; }
.perms__bulk { display: flex; gap: 8px; flex: 1 1 100%; }
.perms__bulk .btn { flex: 1; }
.perms__group + .perms__group { margin-top: 18px; }
.perms__group-title { font-size: var(--fs-sm); color: var(--ink-3); font-weight: 600; margin-bottom: 8px; }
.perm-mod { margin: 0 0 10px; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); }
.perm-mod__head { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; float: left; background: var(--surface-2); border-bottom: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0; }
.perm-mod__head + * { clear: both; }
.perm-mod__name { font-weight: 600; }
.perm-mod__actions { display: grid; gap: 2px; padding: 6px; }
.perm { display: flex; gap: 12px; align-items: flex-start; padding: 8px 6px; border-radius: var(--radius-sm); cursor: pointer; }
.perm:hover { background: var(--surface-2); }
.perm .switch { margin-top: 1px; }
.perm__text { display: grid; gap: 1px; }
.perm__text strong { font-weight: 500; font-size: var(--fs-sm); }
.perm__text small { color: var(--ink-3); font-size: var(--fs-xs); }
.perm__lock { color: var(--err-ink) !important; }

/* Diálogos */
.dialog { width: min(520px, calc(100vw - 24px)); padding: 0; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-overlay); }
.dialog::backdrop { background: rgba(10, 16, 24, .5); }
.dialog__body { padding: 20px 18px; }
.dialog__title { font-size: var(--fs-lg); margin-bottom: 8px; }
.dialog__actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; }

/* Historial */
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: var(--fs-sm); }
.timeline li { display: grid; gap: 1px; padding-left: 14px; border-left: 2px solid var(--line); }
.timeline time { color: var(--ink-3); font-size: var(--fs-xs); font-variant-numeric: tabular-nums; }

.tabbar { grid-template-columns: repeat(var(--tabs, 4), 1fr); }

@media (min-width: 640px) {
    .grid-2 { grid-template-columns: 1fr 1fr; }
    .perms__bulk { flex: 0 0 auto; }
    .perm-mod__actions { grid-template-columns: 1fr 1fr; }
    .form-actions .btn { flex: 0 0 auto; }
}
@media (min-width: 1024px) {
    .form-actions { bottom: 0; }
    .perm-mod__actions { grid-template-columns: repeat(3, 1fr); }
    .row-item__link { margin: -14px -16px; }
}

/* =========================================================
   Etapa 2: archivos
   ========================================================= */
.facts--stack { display: grid; gap: 6px; margin: 0 0 14px; }
.facts--stack dd { overflow-wrap: anywhere; }
.check { margin-top: 14px; padding: 12px 14px; border-radius: var(--radius); font-size: var(--fs-sm); }
.check--ok { background: var(--ok-bg); color: var(--ok-ink); }
.check--error { background: var(--err-bg); color: var(--err-ink); }
.check__steps { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; }
.check__steps li { display: flex; gap: 8px; align-items: flex-start; }
.check__steps .icon { margin-top: 2px; }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: var(--fs-sm); }
.checklist li { display: flex; gap: 10px; align-items: flex-start; }
.checklist li .icon { margin-top: 1px; }
.checklist li.is-ok .icon { color: var(--sem-green); }
.checklist li.is-bad .icon { color: var(--sem-red); }
.checklist small { display: block; color: var(--err-ink); }

.uploader { display: grid; gap: 8px; margin-bottom: 16px; }
.uploader__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.uploader__btn { flex: 1 1 160px; cursor: pointer; }
.uploader__btn:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.uploader__queue { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.uploader__queue:empty { display: none; }
.uploader__item { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: var(--fs-sm); }
.uploader__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uploader__state { color: var(--ink-2); text-align: right; }
.uploader__item progress { grid-column: 1 / -1; width: 100%; height: 6px; accent-color: var(--primary); }
.uploader__item.is-ok { border-color: color-mix(in srgb, var(--sem-green) 50%, transparent); }
.uploader__item.is-ok .uploader__state { color: var(--ok-ink); }
.uploader__item.is-error { border-color: color-mix(in srgb, var(--sem-red) 50%, transparent); background: var(--err-bg); }
.uploader__item.is-error .uploader__state { color: var(--err-ink); grid-column: 1 / -1; text-align: left; }

.gallery { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.gallery__item { display: grid; grid-template-rows: auto 1fr auto; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.gallery__thumb { display: block; position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--surface-2); text-decoration: none; }
.gallery__thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.gallery__doc { position: absolute; inset: 0; place-content: center; }
.gallery__doc { display: grid; justify-items: center; gap: 4px; color: var(--ink-3); }
.gallery__item { align-self: start; }
.gallery__meta { display: grid; gap: 2px; padding: 8px 10px; font-size: var(--fs-xs); min-width: 0; }
.gallery__meta strong { font-size: var(--fs-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gallery__meta small { color: var(--ink-2); }
.gallery__meta a { display: inline-flex; gap: 3px; align-items: center; }
.gallery__actions { display: flex; gap: 6px; justify-content: flex-end; padding: 0 8px 8px; }
.gallery-wrap { margin-top: 8px; }
/* Etapa 3: formularios y semáforos administrativos */
.form-stack{display:grid;gap:1.25rem}.form-grid{display:grid;grid-template-columns:1fr;gap:1rem}.form-grid label,.form-stack>label{display:grid;gap:.4rem;font-weight:600}.form-grid input,.form-grid select,.form-stack textarea{width:100%}.form-actions{display:flex;justify-content:flex-end;gap:.75rem;flex-wrap:wrap}.check{display:flex!important;grid-template-columns:auto 1fr!important;align-items:center}.check input{width:1.25rem;height:1.25rem}.status-dot,.traffic{width:.85rem;height:.85rem;border-radius:50%;display:inline-block;flex:0 0 auto}.traffic--rojo{background:#dc2626}.traffic--amarillo{background:#eab308}.traffic--verde{background:#16a34a}.traffic--gris{background:#94a3b8}.notice--danger{color:#991b1b}.row-item__link>input{min-width:7rem}@media(min-width:768px){.form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
.building-map{height:18rem;border-radius:var(--radius,12px);overflow:hidden;border:1px solid var(--border)}
/* Etapa 4: asistente de control mobile-first */
.wizard-steps{display:grid;grid-template-columns:repeat(5,1fr);gap:.25rem;margin:0 0 1rem}.wizard-steps a{display:grid;justify-items:center;gap:.2rem;padding:.5rem .15rem;color:var(--ink-3);text-decoration:none;border-bottom:3px solid var(--line)}.wizard-steps a.is-active{color:var(--accent);border-color:var(--accent)}.wizard-steps span{display:grid;place-items:center;width:2rem;height:2rem;border:1px solid currentColor;border-radius:50%;font-weight:700}.wizard-steps small{font-size:.68rem}.checklist{display:grid;gap:1rem}.check-item{display:grid;gap:.8rem;border:0;border-top:1px solid var(--line);padding:1rem 0 0}.check-item legend{display:grid;gap:.25rem;width:100%}.check-item legend span,.check-item legend em{font-size:var(--fs-sm);color:var(--ink-2);font-weight:400}.answer-options{display:grid;grid-template-columns:repeat(4,1fr);gap:.4rem}.answer-options label{position:relative;display:grid;place-items:center;gap:.15rem;min-height:3.5rem;border:1px solid var(--line);border-radius:.65rem;cursor:pointer}.answer-options input{position:absolute;opacity:0}.answer-options label:has(input:checked){border-color:var(--accent);background:var(--accent-soft);color:var(--accent)}.answer-options span{font-weight:800}.answer-options small{font-size:.62rem;text-align:center}.autosave-status{min-height:1.25rem;color:var(--ink-3);font-size:var(--fs-sm)}.detail-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:1rem}.detail-grid dt{font-size:var(--fs-xs);color:var(--ink-3)}.detail-grid dd{margin:0;font-weight:600}.control-results{display:grid;gap:.5rem;list-style:none;padding:0}.control-results li{display:flex;gap:.75rem;padding:.6rem 0;border-bottom:1px solid var(--line)}.answer-badge{display:grid;place-items:center;width:2rem;height:2rem;border-radius:50%;background:var(--surface-2);font-weight:800;flex:0 0 auto}@media(min-width:768px){.wizard-steps small{font-size:var(--fs-sm)}.answer-options{max-width:34rem}}
/* Etapa 5: planificación mensual */
.toolbar,.view-tabs,.plan-danger-actions{display:flex;flex-wrap:wrap;gap:.6rem;align-items:center}.toolbar{margin-bottom:1rem}.toolbar input,.toolbar select{flex:1 1 10rem}.view-tabs{margin-bottom:.75rem}.planning-map{height:65vh;min-height:22rem;border:1px solid var(--line);border-radius:var(--radius);overflow:hidden}.planning-list{display:grid;gap:1rem}.plan-card{padding:1rem;border:1px solid var(--line);border-radius:var(--radius);background:var(--surface)}.plan-card header{display:flex;justify-content:space-between;gap:1rem;margin-bottom:1rem}.plan-card header p{margin:.2rem 0 0;color:var(--ink-2);font-size:var(--fs-sm)}.client-exports{margin-bottom:1rem}.client-exports summary{cursor:pointer;font-weight:700}.client-exports__list{display:grid;gap:.5rem;margin-top:1rem}.client-exports__list>div{display:flex;justify-content:space-between;align-items:center;gap:.75rem;padding-top:.5rem;border-top:1px solid var(--line)}.sticky-actions{position:sticky;bottom:4.5rem;z-index:5;padding:.75rem;background:color-mix(in srgb,var(--surface) 92%,transparent);backdrop-filter:blur(8px)}.plan-danger-actions{margin-top:1rem}@media(min-width:768px){.planning-list{grid-template-columns:repeat(2,minmax(0,1fr))}.sticky-actions{bottom:1rem}}
/* Etapa 6: ejecución y trabajo sin conexión */
.execution-list,.journey-list{display:grid;gap:1rem}.execution-card{padding:1rem;border:1px solid var(--line);border-radius:var(--radius);background:var(--surface)}.execution-card header,.journey-stop>header,.journey-lifts li{display:flex;align-items:center;justify-content:space-between;gap:.75rem}.execution-card header>div,.journey-stop header>div,.journey-lifts li>div{display:grid;gap:.15rem}.execution-card ul,.journey-lifts{list-style:none;margin:1rem 0 0;padding:0;display:grid;gap:.55rem}.execution-card li{display:flex;align-items:center;gap:.5rem}.execution-state{display:grid;place-items:center;width:1.6rem;height:1.6rem;border-radius:50%;background:var(--surface-2)}.execution-state--realizado{background:var(--ok-bg);color:var(--ok-ink)}.execution-state--en_curso{background:var(--warn-bg);color:var(--warn-ink)}.journey-lifts li{padding:.75rem 0;border-top:1px solid var(--line)}.route-links{position:relative}.route-links>div,.route-links[open]{display:flex;flex-wrap:wrap;gap:.65rem}.route-links a{padding:.5rem;color:var(--accent)}.offline-indicator{display:inline-flex;padding:.35rem .65rem;border-radius:999px;background:var(--ok-bg);color:var(--ok-ink);font-size:var(--fs-sm)}.offline-indicator.is-offline{background:var(--warn-bg);color:var(--warn-ink)}@media(min-width:768px){.execution-list{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* ---------- Revisión Etapas 3 a 6 ---------- */
.traffic--rojo { background: var(--sem-red); }
.traffic--amarillo { background: var(--sem-amber); }
.traffic--verde { background: var(--sem-green); }
.traffic--gris { background: var(--sem-none); }
.pre-wrap { white-space: pre-wrap; }
.panel--warn { border-color: color-mix(in srgb, var(--sem-red) 45%, var(--line)); background: var(--err-bg); }
.answer-badge--nc { background: var(--err-bg); color: var(--err-ink); }
.danger-zone { margin-top: 1rem; }
.danger-zone summary { cursor: pointer; font-weight: 600; color: var(--sem-red); min-height: 44px; display: flex; align-items: center; }
.danger-zone form { margin-top: .75rem; }

/* Planificación: un bloque por edificio con sus ascensores */
.plan-lifts { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .5rem; }
.plan-lifts li { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: .5rem 0; border-top: 1px solid var(--line); }
.plan-lifts li > div { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }

/* Ejecución: avance "1-2", tildes y pines del mapa */
.execution-card header { align-items: center; }
.execution-card--completo { opacity: .75; }
.progress-badge { margin-left: auto; padding: .15rem .55rem; border-radius: 999px; font-size: var(--fs-sm); font-weight: 700; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.progress-badge--parcial { background: color-mix(in srgb, var(--sem-amber) 25%, var(--surface)); color: var(--ink); }
.progress-badge--completo { background: color-mix(in srgb, var(--sem-green) 25%, var(--surface)); color: var(--ink); }
.map-pin span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.35); color: #fff; font: 700 11px/1 var(--font); }
.map-pin.is-selected span { outline: 3px solid var(--primary); outline-offset: 2px; }
.journey-map-panel { padding: .75rem; }
.journey-map { height: 45vh; min-height: 18rem; border-radius: var(--radius); overflow: hidden; }
.journey-map-tools { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem; margin-bottom: .5rem; }
.segmented { display: inline-flex; gap: .25rem; }
.segmented .is-active, .view-tabs .is-active { background: var(--primary-soft); color: var(--ink); }
.journey-stop--completo { opacity: .8; }
.journey-stop header small { display: block; color: var(--ink-2); }
.route-links { margin: .5rem 0; }
.route-links[open] { display: flex; flex-wrap: wrap; gap: .4rem; }
.offline-indicator:empty { display: none; }
.offline-indicator.is-offline { color: var(--err-ink); background: var(--err-bg); padding: .5rem .75rem; border-radius: var(--radius-sm); }
.execution-card header > input[type="checkbox"] { width: 1.6rem; height: 1.6rem; min-width: 0; flex: 0 0 auto; margin: 0; }
.execution-card header > div { flex: 1 1 auto; min-width: 0; }
/* Los mapas no tapan la barra inferior ni el menú (Leaflet usa z-index altos) */
.planning-map, .journey-map, .building-map { position: relative; z-index: 0; isolation: isolate; }

/* ---------- Etapa 7: Inicio, avisos y facturable ---------- */
.period-nav { display: inline-flex; align-items: center; gap: .35rem; }
.period-nav strong { min-width: 8.5rem; text-align: center; }
a.readout { color: inherit; text-decoration: none; }
a.readout:hover { background: var(--surface-2); }
.readout__hint { font-size: var(--fs-xs); color: var(--ink-2); display: inline-flex; align-items: center; gap: .3rem; }
.readout__label { display: inline-flex; align-items: center; gap: .35rem; }
.readout__value--money { font-size: var(--fs-xl); }
.readout--alert-rojo { box-shadow: inset 4px 0 0 var(--sem-red); }
.readout--alert-amarillo { box-shadow: inset 4px 0 0 var(--sem-amber); }
.meter { display: block; height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--sem-green); }
.dash-grid { display: grid; gap: 1rem; margin-bottom: 1rem; }
@media (min-width: 1024px) { .dash-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dash-grid > #informes { grid-column: 1 / -1; } }
.bell { position: relative; margin-left: auto; }
.bell__count { position: absolute; top: 4px; right: 2px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--sem-red); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.row-item.is-unread .row-item__main strong::after { content: ''; display: inline-block; width: 8px; height: 8px; margin-left: .4rem; border-radius: 50%; background: var(--primary); vertical-align: middle; }
.billing-list { display: grid; gap: .75rem; margin-bottom: 1rem; }
.billing-card summary { display: flex; justify-content: space-between; align-items: center; gap: 1rem; cursor: pointer; min-height: 44px; }
.billing-card summary > div { display: grid; }
.billing-card__total { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table-wrap { overflow-x: auto; margin: .75rem 0; }
.table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.table th, .table td { padding: .5rem; border-bottom: 1px solid var(--line); text-align: left; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.text-warn { color: var(--err-ink); }
/* Celular (2 columnas): si queda un indicador solo en la última fila, ocupa todo el ancho */
@media (max-width: 767px) { .readouts > :last-child:nth-child(odd) { grid-column: 1 / -1; } }
.bell__count { top: 2px; right: 0; }

/* ---------- Etapa 8: guías, ayuda, auditoría, accesibilidad ---------- */
/* Botones chicos: igual 44 px de alto en pantallas táctiles */
@media (pointer: coarse) { .btn--sm { min-height: 44px; } .icon-btn { min-width: 44px; min-height: 44px; } }
/* Guías (driver.js) con los colores de la app, también en modo oscuro */
body .driver-popover { background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); font-family: var(--font); max-width: min(340px, calc(100vw - 32px)); }
body .driver-popover-title { font-size: var(--fs-md); font-weight: 700; }
body .driver-popover-description { color: var(--ink-2); font-size: var(--fs-sm); line-height: 1.45; }
body .driver-popover-arrow { border-color: var(--surface); }
body .driver-popover-arrow-side-top { border-left-color: transparent; border-right-color: transparent; border-bottom-color: transparent; }
body .driver-popover-arrow-side-bottom { border-left-color: transparent; border-right-color: transparent; border-top-color: transparent; }
body .driver-popover-arrow-side-left { border-right-color: transparent; border-top-color: transparent; border-bottom-color: transparent; }
body .driver-popover-arrow-side-right { border-left-color: transparent; border-top-color: transparent; border-bottom-color: transparent; }
body .driver-popover-footer button:disabled { opacity: .45; }
body .driver-popover-footer button { min-height: 40px; padding: 6px 12px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); text-shadow: none; font: 600 var(--fs-sm) var(--font); }
body .driver-popover-footer .driver-popover-next-btn { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
body .driver-popover-close-btn { color: var(--ink-2); min-width: 32px; min-height: 32px; }
body .driver-popover-progress-text { color: var(--ink-3); }
/* Ayuda */
.faq-search { display: grid; gap: .4rem; margin-bottom: 1rem; }
.faq { margin: 0; display: grid; gap: .25rem; }
.faq__item { padding: .75rem 0; border-top: 1px solid var(--line); }
.faq__item:first-child { border-top: 0; }
.faq dt { font-weight: 600; }
.faq dd { margin: .3rem 0 0; color: var(--ink-2); }
/* Auditoría */
.audit-changes { display: block; color: var(--ink-2); overflow-wrap: anywhere; }
.timeline.panel { padding: 1rem; }
/* Textos largos (direcciones, nombres) no rompen el ancho en el celular */
.row-item__main, .row-item__main strong, .row-item__desc, .plan-card header, .journey-stop header strong { overflow-wrap: anywhere; min-width: 0; }
.toolbar label { display: inline-flex; align-items: center; gap: .4rem; }
.toolbar label { flex-wrap: wrap; max-width: 100%; min-width: 0; }
.toolbar select, .toolbar input { min-width: 0; max-width: 100%; }
/* Correcciones etapas 4 a 8: edificios del mes fuera de la jornada (gris) */
.map-pin--fuera span { width: 22px; height: 22px; background: var(--sem-none); opacity: .85; }
.map-legend { display: flex; align-items: center; gap: .4rem; margin: 0 0 .5rem; font-size: var(--fs-sm); }
/* Textos chicos del asistente: legibles en el celular (antes ~10-11 px) */
.wizard-steps small, .answer-options small { font-size: .75rem; }
