/* Cáscara del módulo Administrativo de BuildKontrol (D19): barra superior, lateral plegable, selector de proyecto,
   cambio de módulo, cabecera de página e indicadores. Estructura y medidas del sistema de diseño BK-2026
   (topbar 64 px, lateral 240 px, riel 60 px). Identidad del módulo («Claro 4», elegida por el dueño entre las maquetas
   claras): la barra superior es la misma de Obra (navy #152b47 con el wordmark blanco), el lateral es ARENA CLARO con
   texto oscuro, y el acento es el azul de marca. De reojo se distingue de Obra por el lateral claro. */
:root {
  --top: 64px; --lado: 240px; --riel: 60px;
  --obra-bg: #1e3a5f; --obra-header: #152b47;
  --adm-header: #152b47; --adm-header-ink: #e2ebf7; --adm-header-muted: #8fa3c2; --adm-header-divider: rgba(255,255,255,.08);
  --adm-bg: #f4f1ea; --adm-ink: #2b2721; --adm-muted: #6b6257; --adm-divider: rgba(43,39,33,.12); --adm-active: #e8e2d6;
  --adm-accent-bar: #1e6fd9; --adm-punto: #60a5fa; --adm-tarjeta2: #ede7db;
  --bk-text-3: #788397; --bk-text-4: #a8b0bd; --bk-border: #e1e5ee; --bk-border-strong: #c9cfdd; --bk-surface-2: #f9fafc;
  --bk-shadow-sm: 0 1px 2px rgba(15,20,25,.05), 0 1px 3px rgba(15,20,25,.06);
  --bk-shadow-md: 0 2px 4px rgba(15,20,25,.05), 0 8px 20px rgba(15,20,25,.07);
  --bk-shadow-lg: 0 12px 32px rgba(15,20,25,.12), 0 3px 8px rgba(15,20,25,.06);
  --bk-mono: "IBM Plex Mono", ui-monospace, monospace;
}
.topbar :focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.lateral :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---- barra superior ---- */
.topbar { position: fixed; top: 0; left: 0; right: 0; height: var(--top); background: var(--adm-header); color: #fff; display: flex; align-items: center; z-index: 100; }
.topbar .izq { width: var(--lado); min-width: var(--lado); height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 0 6px 0 10px; border-right: 1px solid var(--adm-header-divider); position: relative; }
/* marca + módulo en UN solo botón de 48 px: abre el cambio de módulo (o es un enlace a inicio si hay un solo módulo) */
.marca { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 3px; height: 48px; padding: 0 8px 0 6px; border: 0; background: transparent; color: #fff; border-radius: 7px; text-align: left; cursor: pointer; font: inherit; text-decoration: none; }
.marca:hover { background: rgba(255,255,255,.08); text-decoration: none; }
.marca img { height: 1.55rem; max-width: 9rem; object-fit: contain; display: block; }
.marca .mod-linea { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; letter-spacing: .02em; color: var(--adm-header-ink); }
.marca .mod-linea .punto { width: 8px; height: 8px; border-radius: 50%; background: var(--adm-punto); }
.marca .mod-linea svg { width: 12px; height: 12px; opacity: .75; }
.topbar .hamb { width: 40px; height: 40px; border: 0; background: transparent; color: #fff; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; flex: none; cursor: pointer; }
.topbar .hamb:hover { background: rgba(255,255,255,.1); }
.topbar .centro { flex: 1; display: flex; align-items: center; justify-content: center; gap: 10px; height: 100%; position: relative; min-width: 0; }
.topbar .centro .eti { font-size: 13px; color: var(--adm-header-muted); }
.selector { height: 40px; display: inline-flex; align-items: center; gap: 10px; padding: 0 12px 0 14px; border-radius: 5px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); color: #fff; font-weight: 600; font-size: 14px; min-width: 260px; max-width: 420px; cursor: pointer; font-family: inherit; }
.selector:hover { background: rgba(255,255,255,.14); }
.selector .nombre { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.selector .tipo { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--adm-header-muted); border: 1px solid rgba(255,255,255,.18); border-radius: 999px; padding: 1px 7px; white-space: nowrap; }
.selector .tipo.bk { color: #93c5fd; border-color: rgba(147,197,253,.4); }
.selector .flecha { margin-left: auto; opacity: .8; flex: none; }
/* en vistas globales (Mis tareas, Actividad…) el selector dice «Todos los proyectos» en tono apagado */
.selector.global { font-weight: 500; color: var(--adm-header-ink); border-style: dashed; }
.selector.global .tipo { display: none; }
.sel-panel { display: none; position: absolute; top: 56px; left: 50%; transform: translateX(-50%); width: 460px; max-width: calc(100vw - 24px); background: #fff; color: var(--ink); border: 1px solid var(--bk-border); border-radius: 8px; box-shadow: var(--bk-shadow-lg); padding: 10px; z-index: 120; text-align: left; }
.sel-panel.on { display: block; }
.sel-panel input { width: 100%; height: 40px; border: 1px solid var(--bk-border-strong); border-radius: 5px; padding: 0 10px 0 34px; font: inherit; font-size: 14px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23788397' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M21 21l-4.3-4.3'/%3E%3C/svg%3E") 10px center / 16px no-repeat; }
.sel-panel h5 { margin: 12px 8px 4px; font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: #5b6672; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.sel-panel h5 small { text-transform: none; letter-spacing: 0; font-weight: 400; }
.sel-panel .lista { max-height: min(52vh, 420px); overflow: auto; }
.sel-panel .op { display: flex; align-items: center; gap: 10px; width: 100%; padding: 0 10px; min-height: 48px; border: 0; border-radius: 5px; background: transparent; text-align: left; cursor: pointer; font: inherit; font-size: 14px; color: var(--ink); text-decoration: none; }
.sel-panel .op:hover { background: var(--bk-surface-2); text-decoration: none; }
.sel-panel .op.foco { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); text-decoration: none; }
.sel-panel .op[aria-selected="true"] { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.sel-panel .ico { width: 26px; height: 26px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; background: var(--bk-surface-2); color: var(--ink-2); flex: none; border: 1px solid var(--bk-border); }
.sel-panel .ico.bk { background: var(--obra-bg); color: #fff; border-color: var(--obra-bg); }
.sel-panel .ico.ind { background: var(--ambar-bg); color: var(--ambar); border-color: #f3d9a4; }
.sel-panel .op .q { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sel-panel .op .q small { display: block; color: #475467; font-size: 12px; font-weight: 400; }
.sel-panel .op .n { font-family: var(--bk-mono); font-size: 12px; color: #475467; white-space: nowrap; text-align: right; }
.sel-panel .op .n b { display: block; color: var(--ambar); font-weight: 600; }
.sel-panel .op .check { width: 16px; height: 16px; color: var(--accent); visibility: hidden; flex: none; }
.sel-panel .op[aria-selected="true"] .check { visibility: visible; }
.sel-panel .oculto { display: none !important; }
.sel-panel .vacio { padding: 14px 10px; color: var(--bk-text-3); font-size: 13px; display: none; }
.sel-panel .pie-sel { display: flex; gap: 8px; justify-content: space-between; align-items: center; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--bk-border); flex-wrap: wrap; }
.sel-panel .pie-sel a { font-size: 13px; color: var(--accent-ink); font-weight: 600; text-decoration: none; padding: 6px 4px; }
.sel-panel .ayuda { margin: 4px 8px 0; font-size: 11.5px; color: #5b6672; }
.topbar .der { display: flex; align-items: center; gap: 4px; padding-right: 1rem; position: relative; }
.topbar .ico-b { width: 40px; height: 40px; border: 0; background: transparent; color: var(--adm-header-ink); border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; position: relative; cursor: pointer; font: inherit; }
.topbar .ico-b:hover, .topbar .ico-b[aria-expanded="true"] { background: rgba(255,255,255,.1); color: #fff; }
.topbar .perfil { display: inline-flex; align-items: center; gap: 8px; margin-left: 6px; height: 44px; padding: 0 8px 0 4px; border: 0; background: transparent; color: #fff; font-size: 14px; border-radius: 7px; cursor: pointer; font-family: inherit; }
.topbar .perfil:hover, .topbar .perfil[aria-expanded="true"] { background: rgba(255,255,255,.1); }
.topbar .perfil .av { width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: #fff; border: 0; margin: 0; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }
.menu-p { display: none; position: absolute; top: 56px; right: 12px; width: 240px; background: #fff; color: var(--ink); border: 1px solid var(--bk-border); border-radius: 8px; box-shadow: var(--bk-shadow-lg); padding: 6px; z-index: 130; }
.menu-p.on { display: block; }
.menu-p .quien { padding: 8px 10px 10px; border-bottom: 1px solid var(--bk-border); margin-bottom: 4px; font-size: 13px; color: var(--ink-2); }
.menu-p .quien b { display: block; color: var(--ink); font-size: 14px; }
.menu-p a, .menu-p button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; padding: 0 10px; border: 0; background: transparent; border-radius: 5px; font: inherit; font-size: 14px; color: var(--ink); text-decoration: none; text-align: left; cursor: pointer; }
.menu-p a:hover, .menu-p button:hover { background: var(--bk-surface-2); text-decoration: none; }
.menu-p svg { width: 16px; height: 16px; color: var(--bk-text-3); flex: none; }
.menu-p .cuadro-mini { width: 18px; height: 18px; border-radius: 4px; background: var(--obra-bg); display: inline-block; flex: none; }
.menu-p form { margin: 0; }

/* ---- cambio de módulo ---- */
.mod-panel { display: none; position: fixed; top: 60px; left: 10px; width: 360px; max-width: calc(100vw - 20px); background: #fff; color: var(--ink); border: 1px solid var(--bk-border); border-radius: 8px; box-shadow: var(--bk-shadow-lg); padding: 8px; z-index: 130; }
.mod-panel.on { display: block; }
.mod-panel h5 { margin: 6px 8px 6px; font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: #5b6672; font-weight: 700; }
.mod-panel .op { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 5px; cursor: pointer; text-decoration: none; color: var(--ink); }
.mod-panel .op:hover { background: var(--bk-surface-2); text-decoration: none; }
.mod-panel .op.on { background: var(--accent-soft); }
.mod-panel .op .cuadro { width: 38px; height: 38px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; color: #fff; flex: none; }
.mod-panel .op .cuadro.obra { background: var(--obra-bg); } .mod-panel .op .cuadro.adm { background: var(--accent); }
.mod-panel .op .q b { display: block; font-size: 14px; } .mod-panel .op .q small { color: #475467; font-size: 12px; }
.mod-panel .op .q .act { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--accent-ink); margin-left: 6px; }
.mod-panel .pie-mod { border-top: 1px solid var(--bk-border); margin-top: 6px; padding: 8px 10px 2px; font-size: 12.5px; color: var(--ink-2); display: flex; align-items: center; gap: 8px; }
.mod-panel .pie-mod input { width: 16px; height: 16px; margin: 0; flex: none; }
.mod-panel .pie-mod label { display: inline; margin: 0; flex: 1; font-size: 12.5px; color: var(--ink-2); }
.mod-panel .pie-mod a { margin-left: auto; font-size: 12px; white-space: nowrap; }

/* ---- lateral ---- */
.lateral { position: fixed; top: var(--top); left: 0; bottom: 0; width: var(--lado); background: var(--adm-bg); color: var(--adm-ink); overflow-y: auto; overflow-x: hidden; z-index: 90; display: flex; flex-direction: column; border-right: 1px solid var(--adm-divider); }
.lateral .cab-lat { display: none; }
.lateral .grupo { margin: 10px 2px 0; padding: 10px 10px 6px; min-height: 36px; white-space: nowrap; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--adm-muted); display: flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; border-radius: 5px; background: transparent; border: 0; width: calc(100% - 4px); text-align: left; font-family: inherit; }
.lateral .grupo:hover { color: var(--adm-ink); }
/* el grupo del proyecto lleva el nombre del proyecto: las vistas de abajo son DE ESE proyecto */
.lateral .grupo .proy { color: var(--adm-ink); text-transform: none; letter-spacing: 0; font-size: 12px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lateral .grupo .chev { width: 14px; height: 14px; margin-left: auto; transition: transform .15s; color: var(--adm-muted); flex: none; }
.lateral .grupo .cuenta { display: none; font-family: var(--bk-mono); font-size: 10px; background: rgba(0,0,0,.06); border-radius: 999px; padding: 0 6px; color: var(--adm-ink); text-transform: none; letter-spacing: 0; margin-left: 6px; }
.lateral .seccion.cerrada .grupo .chev { transform: rotate(-90deg); }
.lateral .seccion.cerrada a, .lateral .seccion.cerrada button.item { display: none; }
.lateral .seccion.cerrada .grupo .cuenta { display: inline-flex; }
.lateral a, .lateral button.item { display: flex; align-items: center; gap: 10px; margin: 1px 8px; padding: 0 10px; min-height: 36px; white-space: nowrap; border-radius: 5px; color: var(--adm-ink); text-decoration: none; font-size: 13px; font-weight: 500; position: relative; border: 0; background: transparent; width: calc(100% - 16px); text-align: left; cursor: pointer; font-family: inherit; }
.lateral a svg, .lateral button.item svg { width: 16px; height: 16px; color: var(--adm-muted); flex: none; }
.lateral a:hover, .lateral button.item:hover { background: rgba(0,0,0,.04); color: var(--adm-ink); text-decoration: none; }
.lateral a:hover svg, .lateral button.item:hover svg { color: var(--adm-ink); }
.lateral a[aria-current="page"] { background: var(--adm-active); color: var(--accent-ink); font-weight: 600; }
.lateral a[aria-current="page"]::before { content: ""; position: absolute; left: -8px; top: 6px; bottom: 6px; width: 3px; border-radius: 0 3px 3px 0; background: var(--adm-accent-bar); }
.lateral a[aria-current="page"] svg { color: var(--accent); }
.lateral .badge { margin-left: auto; font-family: var(--bk-mono); font-size: 11px; background: rgba(0,0,0,.06); border-radius: 999px; padding: 1px 7px; color: var(--adm-ink); }
.lateral .badge.ambar { background: var(--ambar); color: #fff; }
.lateral .badge:empty { display: none !important; }
.lateral .sin-proy { margin: 2px 18px; font-size: 12px; color: var(--adm-muted); white-space: normal; }
.lateral .pie-lat { margin-top: auto; padding: 12px 14px; font-size: 12px; color: var(--adm-header-muted); background: var(--adm-header); }
.lateral .pie-lat b { color: var(--adm-header-ink); display: block; font-weight: 600; }
.velo-lat { display: none; position: fixed; inset: 0; background: rgba(16,24,40,.45); z-index: 105; }

/* modo compacto: riel de 60 px; se expande encima del contenido 250 ms después de entrar el mouse */
@media (min-width: 901px) {
  body.compacto .lateral { width: var(--riel); overflow: visible; }
  body.compacto .lateral.expandido { width: var(--lado); box-shadow: var(--bk-shadow-lg); }
  body.compacto .lateral .grupo, body.compacto .lateral .pie-lat, body.compacto .lateral .sin-proy { display: none; }
  body.compacto .lateral.expandido .grupo { display: flex; } body.compacto .lateral.expandido .pie-lat { display: block; }
  body.compacto .lateral .seccion.cerrada a, body.compacto .lateral .seccion.cerrada button.item { display: flex; }
  body.compacto .lateral.expandido .seccion.cerrada a, body.compacto .lateral.expandido .seccion.cerrada button.item { display: none; }
  body.compacto .lateral a, body.compacto .lateral button.item { justify-content: center; padding: 0; margin: 2px 8px; min-height: 40px; }
  body.compacto .lateral .txt, body.compacto .lateral .badge { display: none; }
  body.compacto .lateral a svg, body.compacto .lateral button.item svg { width: 18px; height: 18px; }
  body.compacto .lateral .badge.ambar:not(:empty) { display: block; position: absolute; top: 4px; right: 4px; width: 8px; height: 8px; padding: 0; font-size: 0; }
  body.compacto .lateral:not(.expandido) [data-tip]::after { content: attr(data-tip); position: absolute; left: calc(100% + 10px); top: 50%; transform: translateY(-50%); background: #101828; color: #fff; font-size: 12px; font-weight: 500; padding: 5px 8px; border-radius: 5px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .1s; z-index: 95; }
  body.compacto .lateral:not(.expandido) [data-tip]:hover::after, body.compacto .lateral:not(.expandido) [data-tip]:focus-visible::after { opacity: 1; }
  body.compacto .lateral.expandido a, body.compacto .lateral.expandido button.item { justify-content: flex-start; padding: 0 10px; min-height: 36px; }
  body.compacto .lateral.expandido .txt, body.compacto .lateral.expandido .badge { display: inline; }
  body.compacto .lateral.expandido .badge.ambar { position: static; width: auto; height: auto; padding: 1px 7px; font-size: 11px; }
  body.compacto .lateral .separador { height: 1px; background: var(--adm-divider); margin: 8px 14px; }
  body.compacto .lateral.expandido .separador { display: none; }
  body.con-cascara.compacto .contenido { margin-left: var(--riel); }
  body.compacto .topbar .izq { width: auto; min-width: var(--riel); padding: 0 10px; }
  body.compacto .topbar .izq .marca img { display: none; }
  body.compacto .topbar .izq .marca { height: 40px; }
}
.lateral .separador { display: none; }

/* ---- contenido y cabecera de página ---- */
body.con-cascara .contenido { margin: 0 0 0 var(--lado); max-width: none; padding: calc(var(--top) + 18px) 28px 60px; }
body.con-cascara .contenido:not(.ancho) { max-width: calc(var(--lado) + 1100px); }
body.con-cascara .contenido.centrado { min-height: calc(100vh - var(--top)); padding-top: calc(var(--top) + 8vh); }
body.con-cascara .pie { margin-left: var(--lado); }
body.compacto .pie { margin-left: var(--riel); }
.cab { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 12px; flex-wrap: wrap; }
.cab > .cab-txt { flex: 1; min-width: 0; }
.migas { font-size: 12.5px; color: #475467; display: flex; gap: 6px; align-items: center; margin-bottom: 2px; flex-wrap: wrap; }
.migas b { color: var(--ink-2); font-weight: 500; }
.migas .tipo { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; border: 1px solid var(--bk-border-strong); border-radius: 999px; padding: 1px 7px; color: #5b6672; }
.migas .tipo.bk { color: var(--obra-bg); border-color: #b9cdea; background: #eef4fc; }
.cab h1, .encabezado .titulo-pagina, .titulo-pagina { margin: 0; font-size: 1.5rem; font-weight: 700; display: flex; align-items: center; gap: 10px; line-height: 1.2; flex-wrap: wrap; }
.cab .sub, .encabezado .sub { margin: 4px 0 0; font-size: .9rem; color: #475467; }
.cab .acciones { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cab .chip-estado { font-size: 11px; font-weight: 600; color: var(--ambar); background: var(--ambar-bg); border-radius: 999px; padding: 2px 8px; letter-spacing: 0; text-transform: none; }
.cab .buscar { position: relative; margin: 0; display: block; }
.cab .buscar svg { position: absolute; left: 12px; top: 11px; color: var(--bk-text-3); pointer-events: none; }
.cab .buscar .campo { height: 38px; width: 320px; max-width: 100%; border: 1px solid var(--bk-border-strong); border-radius: 5px; background: #fff; padding: 0 10px 0 36px; font: inherit; font-size: 14px; color: var(--ink); }
.contenido .cab .btn { height: 38px; padding: 0 14px; border-radius: 5px; border: 1px solid var(--bk-border-strong); background: #fff; color: var(--ink-2); font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; text-decoration: none; font-family: inherit; }
.contenido .cab .btn:hover { border-color: var(--accent); color: var(--accent); background: #fff; text-decoration: none; }
.contenido .cab .btn.pri { background: var(--accent); border-color: var(--accent); color: #fff; }
.contenido .cab .btn.pri:hover { background: var(--accent-ink); border-color: var(--accent-ink); }
.contenido .cab .btn.ico { width: 38px; padding: 0; justify-content: center; display: none; }
.contenido .cab .btn svg { width: 16px; height: 16px; }
.fab { display: none; }
body.con-ventana .fab, body.con-ventana .fab:not([hidden]) { display: none !important; }   /* el «+» no tapa el «Listo» de la ventana */

/* ---- indicadores del tablero como tarjetas-botón (52 px, una línea), ocultables ---- */
.kpis-cab { display: flex; align-items: center; justify-content: flex-end; margin: 0 0 6px; }
.kpis-cab button { border: 0; background: transparent; color: var(--bk-text-3); font-size: 12px; font-weight: 500; display: inline-flex; align-items: center; gap: 4px; padding: 4px 6px; border-radius: 4px; min-height: 28px; cursor: pointer; font-family: inherit; }
.kpis-cab button:hover { color: var(--ink); background: rgba(0,0,0,.04); }
.kpis-cab button svg { width: 12px; height: 12px; transition: transform .15s; }
.kpis-cab button.cerrado svg { transform: rotate(-90deg); }
.v2 .indicadores.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; margin-bottom: 14px; }
.v2 .indicadores.kpis.oculto { display: none; }
.v2 .indicadores.kpis .seg { height: auto; min-height: 52px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--bk-border); background: #fff; box-shadow: var(--bk-shadow-sm); display: flex; align-items: center; gap: 10px; text-align: left; justify-content: flex-start; white-space: normal; }
.v2 .indicadores.kpis .seg:hover { box-shadow: var(--bk-shadow-md); background: #fff; }
.v2 .indicadores.kpis .seg strong { font-family: var(--bk-mono); font-size: 20px; font-weight: 600; line-height: 1; }
.v2 .indicadores.kpis .seg .txt { font-size: 11px; color: #5b6672; text-transform: uppercase; letter-spacing: .04em; font-weight: 600; line-height: 1.15; }
.v2 .indicadores.kpis .seg.on { border: 1px solid var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: var(--accent-soft); padding: 0 12px; }
.v2 .indicadores.kpis .seg.on::after { content: "✕"; margin-left: auto; font-size: 11px; color: var(--accent-ink); }
.v2 .indicadores.kpis .seg[aria-disabled="true"] { border-style: dashed; box-shadow: none; }

/* ---- celular (≤ 900 px): [☰] [Proyecto ▾] [campana] [JP]; el lateral es un cajón ---- */
@media (max-width: 900px) {
  .topbar .izq { width: auto; min-width: 0; border-right: 0; gap: 0; padding: 0 0 0 6px; }
  .topbar .izq .marca { display: none; }
  .topbar .centro { justify-content: flex-start; padding: 0 8px; }
  .topbar .centro .eti { display: none; }
  .selector { min-width: 0; max-width: none; flex: 1; height: 40px; font-size: 14px; padding: 0 10px 0 12px; }
  .selector .tipo { display: none; }
  .sel-panel { position: fixed; top: var(--top); left: 8px; right: 8px; width: auto; max-width: none; transform: none; max-height: calc(100vh - var(--top) - 16px); overflow: auto; }
  .topbar .der { padding-right: 6px; }
  .topbar .perfil .nombre-p, .topbar .perfil svg { display: none; }
  .menu-p { right: 6px; }
  .mod-panel { top: 72px; left: 8px; right: 8px; width: auto; }
  .lateral { transform: translateX(-100%); transition: transform .2s; width: min(300px, 86vw); top: 0; z-index: 110; box-shadow: none; }
  body.menu-abierto .lateral { transform: none; box-shadow: 0 0 0 1px rgba(0,0,0,.2); }
  body.menu-abierto .velo-lat { display: block; }
  .lateral .cab-lat { display: flex; align-items: center; justify-content: space-between; gap: 8px; height: var(--top); padding: 0 6px 0 14px; background: var(--adm-header); flex: none; }
  .lateral .cab-lat .marca { display: flex; }
  .lateral .cab-lat .cerrar { width: 44px; height: 44px; border: 0; background: transparent; color: #fff; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
  .lateral .cab-lat .cerrar:hover { background: rgba(255,255,255,.1); }
  .lateral a, .lateral button.item { min-height: 44px; font-size: 14px; }
  .lateral .grupo { min-height: 40px; }
  body.con-cascara .contenido, body.compacto .contenido { margin-left: 0; padding: calc(var(--top) + 12px) 12px 150px; }
  body.con-cascara .pie, body.compacto .pie { margin-left: 0; }
  .cab { margin-bottom: 8px; gap: 8px; }
  .cab h1, .titulo-pagina { font-size: 1.3rem; }
  .cab .acciones { flex: none; }
  .cab .acciones .buscar, .cab .acciones .btn:not(.ico) { display: none; }
  .contenido .cab .acciones .btn.ico { display: inline-flex; width: 44px; height: 44px; }
  .topbar .hamb, .topbar .ico-b, body .topbar .campana, .topbar .perfil { width: 44px; height: 44px; }   /* body: gana a recordatorios.css, que se carga después */
  .topbar .perfil { padding: 0; justify-content: center; margin-left: 0; }
  body.con-cascara .boton.chico { min-height: 40px; min-width: 40px; padding: 8px 12px; display: inline-flex; align-items: center; justify-content: center; }
  body.buscando .cab .acciones { width: 100%; flex-wrap: nowrap; }
  body.buscando .cab .acciones .buscar { display: block; flex: 1; width: auto; }
  body.buscando .cab .acciones .buscar .campo { width: 100%; }
  #btn-buscar .i-x, body.buscando #btn-buscar .i-lupa, body.buscando .cab .acciones .btn.ico:not(#btn-buscar) { display: none; }
  body.buscando #btn-buscar .i-x { display: block; }
  .kpis-cab { display: none; }
  /* una sola fila de indicadores con desplazamiento lateral */
  .v2 .indicadores.kpis { display: flex; overflow-x: auto; gap: 8px; margin: 0 -12px 12px; padding: 2px 12px 6px; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .v2 .indicadores.kpis::-webkit-scrollbar { display: none; }
  .v2 .indicadores.kpis .seg { flex: none; min-width: 0; min-height: 44px; scroll-snap-align: start; gap: 8px; }
  .v2 .indicadores.kpis .seg strong { font-size: 17px; } .v2 .indicadores.kpis .seg .txt { white-space: nowrap; font-size: 10.5px; }
  /* la acción primaria vive en un botón flotante de 56 px, al alcance del pulgar */
  .fab { display: inline-flex; position: fixed; right: 16px; bottom: 24px; width: 56px; height: 56px; border-radius: 50%; border: 0; background: var(--accent); color: #fff; box-shadow: 0 8px 24px rgba(0,0,0,.25); align-items: center; justify-content: center; z-index: 80; cursor: pointer; }
  .fab[hidden] { display: none; }
  .fab { transition: transform .2s, opacity .2s, visibility 0s; }
  body.bajando .fab { transform: translateY(120px); opacity: 0; pointer-events: none; visibility: hidden; transition: transform .2s, opacity .2s, visibility 0s .2s; }
  body:has(:is(input, textarea, select):focus) .fab { display: none; }   /* con el teclado abierto no tapa lo que se escribe */
  .fab svg { width: 24px; height: 24px; }
}
@media print { .cab .migas { display: flex !important; } .migas .tipo { display: none !important; } .topbar, .lateral, .velo-lat, .fab, .kpis-cab { display: none !important; } body.con-cascara .contenido { margin: 0; padding: 0; } body.con-cascara .pie { margin: 0; } }

/* ---- pantalla de entrada (/entrar): sin barra ni lateral; dos tarjetas, Obra en navy y Administrativo en arena claro ---- */
body.sin-cascara:has(.contenido.entrada) { background: radial-gradient(1200px 600px at 20% 0%, #1b2430 0%, #111822 45%, #0b1017 100%); color: #fff; min-height: 100vh; }
body.sin-cascara:has(.contenido.entrada) .pie { display: none; }
.contenido.entrada { max-width: 980px; margin: 0 auto; padding: 48px 24px 40px; }
.entrada .cab-l { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.entrada .logo-l { height: 2.2rem; }
.entrada .quien-l { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; color: #c7d2e0; }
.entrada .quien-l .av { width: 36px; height: 36px; border-radius: 50%; background: var(--accent); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; color: #fff; border: 0; margin: 0; }
.entrada .salir-l { background: none; border: 0; color: #c7d2e0; padding: 8px 4px; font: inherit; cursor: pointer; text-decoration: underline; }
.entrada h1 { font-size: 1.9rem; font-weight: 700; margin: 36px 0 6px; letter-spacing: -.01em; }
.entrada .sub-l { color: #9fb0c5; margin: 0 0 22px; font-size: 15px; }
.entrada kbd { font-family: var(--bk-mono); font-size: 12px; border: 1px solid rgba(255,255,255,.3); border-radius: 4px; padding: 0 5px; color: #fff; }
.entrada .modulos { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.entrada .tarjeta-m { border-radius: 16px; padding: 24px 24px 20px; color: #fff; text-align: left; border: 1px solid rgba(255,255,255,.12); box-shadow: 0 20px 50px rgba(0,0,0,.35); cursor: pointer; position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 10px; min-height: 240px; transition: transform .15s, box-shadow .15s; font: inherit; text-decoration: none; }
.entrada .tarjeta-m:hover { transform: translateY(-3px); box-shadow: 0 28px 60px rgba(0,0,0,.45); text-decoration: none; }
.entrada .tarjeta-m:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.entrada .tarjeta-m.obra { background: linear-gradient(160deg, #26477a, var(--obra-bg) 55%, var(--obra-header)); }
.entrada .tarjeta-m.adm { background: linear-gradient(160deg, #ffffff, var(--adm-bg) 55%, var(--adm-tarjeta2)); color: var(--adm-ink); border-color: rgba(255,255,255,.6); }
.entrada .tarjeta-m.adm .eti { color: var(--adm-muted); } .entrada .tarjeta-m.adm p { color: var(--adm-ink); opacity: .85; } .entrada .tarjeta-m.adm li { background: rgba(0,0,0,.06); }
.entrada .tarjeta-m.adm h2 kbd { border-color: rgba(0,0,0,.25); color: var(--adm-ink); } .entrada .tarjeta-m.adm .hoy { color: var(--adm-ink); } .entrada .tarjeta-m.adm .ir { color: var(--accent-ink); }
.entrada .tarjeta-m .eti { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: rgba(255,255,255,.7); }
.entrada .tarjeta-m h2 { margin: 0; font-size: 1.5rem; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.entrada .tarjeta-m h2 .punto { width: 12px; height: 12px; border-radius: 50%; }
.entrada .tarjeta-m.obra h2 .punto { background: #60a5fa; } .entrada .tarjeta-m.adm h2 .punto { background: var(--accent); }
.entrada .tarjeta-m h2 kbd { margin-left: auto; font-size: 13px; font-weight: 500; border-radius: 5px; padding: 1px 8px; color: rgba(255,255,255,.85); }
.entrada .tarjeta-m p { margin: 0; color: rgba(255,255,255,.82); font-size: 14px; line-height: 1.45; }
.entrada .tarjeta-m ul { margin: 4px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.entrada .tarjeta-m li { font-size: 12px; background: rgba(255,255,255,.12); border-radius: 999px; padding: 3px 10px; }
.entrada .tarjeta-m .hoy { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: #fff; }
.entrada .tarjeta-m .hoy .punto-a { width: 8px; height: 8px; border-radius: 50%; background: #fbbf24; }
.entrada .tarjeta-m .ir { margin-top: auto; display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; padding-top: 12px; }
.entrada .pie-l { margin-top: 20px; display: flex; align-items: center; gap: 10px; color: #c7d2e0; font-size: 13.5px; flex-wrap: wrap; }
.entrada .pie-l label { display: inline-flex; flex-direction: row; align-items: center; gap: 10px; cursor: pointer; min-height: 44px; color: #c7d2e0; font-size: 13.5px; }
.entrada .pie-l input { width: 22px; height: 22px; margin: 0; flex: none; }
@media (hover: none) { .entrada .atajos-l, .entrada .tarjeta-m h2 kbd { display: none; } }   /* en el teléfono no hay teclado: sin «Pulsa 1 o 2» */
.entrada .nota-l { margin-left: auto; font-size: 12px; color: #7f91a8; }
@media (max-width: 900px) {
  .contenido.entrada { padding: 28px 20px 32px; }
  .entrada h1 { font-size: 1.45rem; margin-top: 24px; }
  .entrada .sub-l { font-size: 14px; margin-bottom: 14px; }
  .entrada .modulos { grid-template-columns: 1fr; gap: 12px; }
  .entrada .tarjeta-m { min-height: 0; padding: 16px 18px 14px; gap: 6px; }
  .entrada .tarjeta-m ul { display: none; }
  .entrada .tarjeta-m p { font-size: 13.5px; }
  .entrada .tarjeta-m .ir { padding-top: 6px; }
  .entrada .nota-l { display: none; }
}
