/* Copia exacta de los estilos del diseño base (Diseño base/dashboard.html). No editar aquí: los ajustes van en consola.css. */
/* Consola de mostrador: la pregunta de recepción arriba, resultados a la izquierda y la ficha con el estado como señal grande a la derecha */
:root {
  /* Rojo vino derivado del rojo del logo ESAN (#E3163D), con grises cálidos */
  --bg: #F6F0F3;
  --bg2: #EDE1E7;
  --surface: #FFFFFF;
  --sunken: #F5EEF1;
  --ink: #2A1A1E;
  --muted: #6E5D61;
  --line: #EADFE4;
  --card-border: transparent;
  --grad: linear-gradient(135deg, #A51F46 0%, #7E1530 100%);
  --brand: #7E1530;
  --brand-fill: #7E1530;
  --brand-mid: #A51F46;
  --on-brand: #FFFFFF;
  --brand-soft: #F6E7EB;
  --accent: #E3163D;
  --ok: #1B7447; --ok-bg: #DFF2E7;
  --busy: #995F0B; --busy-bg: #FBEED6;
  --remote: #2856A8; --remote-bg: #E1EAF9;
  --off: #66676E; --off-bg: #ECEBEE;
  --absent: #BC4310; --absent-bg: #FCE8DC;
  --shadow: 0 22px 44px -28px rgba(110, 20, 45, .38), 0 2px 6px -2px rgba(110, 20, 45, .06);
  --display: "Schibsted Grotesk", "Segoe UI", system-ui, sans-serif;
  /* Texto y cifras en Figtree: legible y con el cero sin barra */
  --body: "Figtree", "Segoe UI", system-ui, sans-serif;
  --num: "Figtree", "Segoe UI", system-ui, sans-serif;
}
/* Abre siempre en claro; el botón de la barra superior activa el oscuro */
:root[data-theme="dark"] {
  --bg: #150D0F; --surface: #1F1417; --sunken: #2A1B1F; --ink: #F2E9EB; --muted: #B6A4A8; --line: #3B282D;
  --brand: #F2A8B8; --brand-fill: #9C2443; --brand-mid: #F5B3C1; --on-brand: #FFFFFF; --brand-soft: #3A1B24; --accent: #FF5470;
  --ok: #62C893; --ok-bg: #14301F; --busy: #E6A94E; --busy-bg: #33260E; --remote: #86A9EE; --remote-bg: #172849;
  --off: #A9A6AE; --off-bg: #2A2428; --absent: #F39566; --absent-bg: #3A1E12;
  --shadow: 0 22px 44px -28px rgba(0, 0, 0, .9);
  --bg2: #1C1014; --card-border: #3B282D; --grad: linear-gradient(135deg, #B42A52 0%, #8A1B38 100%);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 15px; line-height: 1.5; }
img { max-width: 100%; }
h1, h2, h3 { font-family: var(--display); line-height: 1.15; margin: 0; text-wrap: balance; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }

.wrap { max-width: 1240px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }

/* Estructura: menú lateral vino oscuro y área de trabajo con fondo rosado muy suave */
.app { display: grid; grid-template-columns: var(--side-w, 252px) minmax(0, 1fr); min-height: 100vh; transition: grid-template-columns .3s ease; }
.main { min-width: 0; background: linear-gradient(160deg, var(--bg) 0%, var(--bg2) 100%); display: flex; flex-direction: column; }
.main > main { flex: 1; width: 100%; }

/* Menú lateral */
.side { position: sticky; top: 0; height: 100vh; align-self: start; background: linear-gradient(180deg, #4C0F22 0%, #2C0711 100%); color: #FFFFFF; display: flex; flex-direction: column; gap: 14px; padding: 22px 14px 18px; overflow: hidden auto; z-index: 30; }
.side-brand { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 4px 14px 8px; border-bottom: 1px solid rgba(255, 255, 255, .12); }
.side-logo { border: 0; background: none; padding: 0; cursor: pointer; overflow: hidden; width: 146px; flex: none; transition: width .3s ease; }
.side-logo img { height: 42px; width: auto; max-width: none; display: block; }
.side-logo .wordmark { color: #FFFFFF; }
.side-toggle { width: 34px; height: 34px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .06); color: #FFFFFF; display: grid; place-items: center; cursor: pointer; flex: none; }
.side-toggle:hover { background: rgba(255, 255, 255, .14); }
.side-toggle svg { transition: transform .3s ease; }
.side-label { font-size: .78rem; color: rgba(255, 255, 255, .5); padding: 6px 12px 0; }
.side-nav { display: flex; flex-direction: column; gap: 4px; }
.nav-item { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; border: 0; background: none; color: rgba(255, 255, 255, .78); padding: 11px 12px; border-radius: 12px; cursor: pointer; font-weight: 700; text-align: left; white-space: nowrap; }
.nav-item:hover { background: rgba(255, 255, 255, .08); color: #FFFFFF; }
.nav-item[aria-current="page"] { background: linear-gradient(135deg, #C02752 0%, #8E1A3A 100%); color: #FFFFFF; box-shadow: 0 12px 26px -12px rgba(227, 22, 61, .75); }
.nav-item svg { flex: none; }
.nav-item .lbl { overflow: hidden; text-overflow: ellipsis; }
.nav-item .count { margin-left: auto; background: #FF5470; }
.side :focus-visible { outline-color: #FFFFFF; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 2px; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, .12); }
.side-foot .nav-item { font-weight: 400; padding-block: 9px; }
.scrim { position: fixed; inset: 0; background: rgba(20, 4, 10, .5); z-index: 29; }
.menu-btn { display: none; width: 42px; height: 42px; border-radius: 12px; border: 0; background: var(--surface); box-shadow: var(--shadow); place-items: center; cursor: pointer; color: var(--ink); flex: none; }
@media (min-width: 901px) {
  .app.collapsed { --side-w: 82px; }
  .app.collapsed .side-brand { flex-direction: column; padding: 0 0 14px; }
  .app.collapsed .side-logo { width: 40px; }
  .app.collapsed .side-toggle svg { transform: rotate(180deg); }
  .app.collapsed .nav-item { justify-content: center; padding-inline: 0; }
  .app.collapsed .nav-item .lbl, .app.collapsed .side-label { display: none; }
  .app.collapsed .nav-item .count { position: absolute; top: 3px; right: 8px; margin: 0; }
}
@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; left: 0; top: 0; bottom: 0; height: 100%; width: min(280px, 84vw); transform: translateX(-105%); transition: transform .3s ease; padding-top: calc(22px + env(safe-area-inset-top, 0px)); padding-left: calc(14px + env(safe-area-inset-left, 0px)); }
  .app.menu-open .side { transform: none; box-shadow: 20px 0 60px -20px rgba(0, 0, 0, .5); }
  .side-toggle { display: none; }
  .menu-btn { display: inline-grid; }
}

/* Barra superior con saludo */
.top .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding-block: 22px 6px; }
.hello { flex: 1; min-width: 0; }
.hello h1 { font-size: clamp(1.45rem, 2.6vw, 2rem); font-weight: 800; letter-spacing: -.02em; color: var(--brand); }
.hello p { color: var(--muted); }
.wordmark { font-family: var(--display); font-weight: 800; font-size: 1.35rem; letter-spacing: .04em; color: var(--brand); }
body.locked { overflow: hidden; }

/* Portada: la foto ocupa todo el fondo y un degradado vino a la izquierda sostiene el texto en blanco.
   Tiene colores propios, iguales en tema claro y oscuro. */
.cover { position: fixed; inset: 0; z-index: 50; background: #3A0814; color: #FFFFFF; overflow: auto; transition: transform .7s cubic-bezier(.7, 0, .2, 1); }
.cover.lift { transform: translateY(-100%); }
.cover.arriving { animation: cover-in .35s ease both; }
@keyframes cover-in { from { opacity: 0; } to { opacity: 1; } }
.cover-media { position: absolute; inset: 0; overflow: hidden; background-color: #6E1027; background-image: repeating-linear-gradient(90deg, rgba(255, 255, 255, .08) 0 2px, transparent 2px 72px), repeating-linear-gradient(0deg, rgba(255, 255, 255, .08) 0 2px, transparent 2px 56px); }
.cover-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 62% 32%; transition: transform 1.2s ease; }
.cover.leaving .cover-media img { transform: scale(1.06); }
.cover-shade { position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(52, 7, 18, .96) 0%, rgba(84, 12, 31, .9) 30%, rgba(110, 16, 39, .55) 52%, rgba(110, 16, 39, .08) 72%, rgba(110, 16, 39, 0) 82%),
    linear-gradient(0deg, rgba(30, 4, 11, .45) 0%, rgba(30, 4, 11, 0) 35%); }
/* Los tamaños dependen del ancho y del alto para que todo quepa en una pantalla de laptop */
.cover-text { position: relative; z-index: 2; min-height: 100%; padding-top: clamp(16px, 3.5vh, 36px); padding-bottom: clamp(20px, 5vh, 64px); padding-left: max(24px, env(safe-area-inset-left, 0px), 6vw); padding-right: clamp(24px, 4vw, 56px); display: flex; flex-direction: column; gap: clamp(10px, 2.2vh, 18px); max-width: 700px; transition: opacity .35s ease, transform .35s ease; }
/* El logo queda arriba como encabezado y el resto se centra en el espacio que sobra */
.cover-brand { margin-bottom: auto; padding-bottom: clamp(12px, 3vh, 32px); }
.cover-text::after { content: ""; margin-top: auto; }
.cover.leaving .cover-text { opacity: 0; transform: translateX(-28px); }
/* Logo monocromo blanco: el círculo en blanco y el pino calado */
.cover-logo { display: inline-flex; }
.cover-logo img { height: clamp(34px, 6vh, 50px); width: auto; display: block; filter: drop-shadow(0 2px 10px rgba(30, 4, 11, .35)); }
.cover-logo .wordmark { color: #FFFFFF; }
.cover-hello { font-family: var(--display); font-weight: 600; font-size: clamp(1rem, 2.4vh, 1.15rem); color: #F7C6D1; display: flex; align-items: center; gap: 10px; }
.cover-hello::before { content: ""; width: 28px; height: 2px; background: #FF5470; border-radius: 2px; }
.cover h1 { font-size: clamp(2.3rem, min(6.2vw, 10vh), 4.8rem); font-weight: 800; letter-spacing: -.035em; line-height: .98; color: #FFFFFF; text-shadow: 0 2px 24px rgba(30, 4, 11, .35); }
/* "ESAN" en un rosa vino claro que contrasta con el fondo */
.cover h1 .accent { color: #F6B8C5; }
.cover-lead { font-family: var(--display); font-size: clamp(1.1rem, min(2.2vw, 3.6vh), 1.6rem); font-weight: 600; margin-top: -6px; color: #FFFFFF; }
.cover-intro { font-size: clamp(.98rem, 2.2vh, 1.08rem); color: rgba(255, 255, 255, .86); max-width: 50ch; }
.cover-points { list-style: none; margin: 2px 0 6px; padding: 0; display: flex; flex-direction: column; gap: clamp(8px, 1.6vh, 12px); }
.cover-points li { display: flex; gap: 14px; align-items: center; font-family: var(--display); font-weight: 600; font-size: 1.05rem; color: #FFFFFF; }
.cover-points .ico { width: 40px; height: 40px; border-radius: 12px; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .22); color: #FFFFFF; display: grid; place-items: center; flex: none; }
.btn.big { font-size: 1.08rem; padding: 15px 30px; border-radius: 12px; align-self: flex-start; }
.btn.cover-cta { background: #FFFFFF; border-color: #FFFFFF; color: #7E1530; box-shadow: 0 14px 34px -14px rgba(0, 0, 0, .6); }
.btn.cover-cta:hover { background: #FBEFF2; filter: none; }
.cover .btn.cover-cta:focus-visible { outline-color: #FFFFFF; }

/* Adelanto del dashboard: un tablero de directorio como el de un lobby, oscuro y translúcido,
   que pertenece a la foto. Tipografía blanca, líneas finas y un punto de color por estado. */
.cover-preview { position: absolute; z-index: 3; top: clamp(16px, 4.5vh, 96px); right: clamp(24px, 5vw, 88px); width: min(420px, 32vw); max-height: calc(100% - 2 * clamp(16px, 4.5vh, 96px)); background: rgba(36, 22, 34, .8); border: 1px solid rgba(255, 255, 255, .14); color: #FFFFFF; border-radius: 14px; padding: 18px 22px 14px; box-shadow: 0 30px 60px -30px rgba(10, 1, 4, .75); display: flex; flex-direction: column; gap: 10px; overflow: hidden auto; scrollbar-width: thin; }
@supports (backdrop-filter: blur(10px)) { .cover-preview { background: rgba(36, 22, 34, .64); backdrop-filter: blur(18px) saturate(1.1); } }
.pv-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid rgba(255, 255, 255, .18); }
.pv-head { font-size: .95rem; font-weight: 700; color: rgba(255, 255, 255, .9); display: flex; align-items: center; gap: 8px; }
.pv-time { font-family: var(--display); font-size: 2.1rem; font-weight: 700; line-height: .9; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.pv-live { width: 8px; height: 8px; border-radius: 50%; background: #62C893; animation: live 2.2s ease-out infinite; }
@keyframes live { 0% { box-shadow: 0 0 0 0 rgba(98, 200, 147, .55); } 70%, 100% { box-shadow: 0 0 0 8px rgba(98, 200, 147, 0); } }
.pv-sec { font-size: .82rem; font-weight: 700; color: rgba(255, 255, 255, .7); margin-bottom: 4px; display: flex; justify-content: space-between; gap: 10px; }
.pv-sec span { font-weight: 500; color: rgba(255, 255, 255, .5); }
.pv-note { font-size: .74rem; color: rgba(255, 255, 255, .5); }
/* Agenda: hora a la izquierda, actividad y lugar a la derecha */
/* Se ven hasta 3 eventos; si hay más, la lista se desplaza dentro del tablero */
.pv-agenda { list-style: none; margin: 0; padding: 0 6px 0 0; display: flex; flex-direction: column; max-height: 11.6rem; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .3) transparent; }
.pv-empty { font-size: .9rem; color: rgba(255, 255, 255, .7); padding: 8px 0; border-top: 1px solid rgba(255, 255, 255, .12); }
.pv-agenda li { display: grid; grid-template-columns: 82px minmax(0, 1fr); gap: 0 12px; padding: 8px 0; border-top: 1px solid rgba(255, 255, 255, .12); }
.pv-agenda .h { font-family: var(--display); font-weight: 700; font-size: .9rem; font-variant-numeric: tabular-nums; line-height: 1.25; }
.pv-agenda .t { font-weight: 700; font-size: 1rem; line-height: 1.3; }
.pv-agenda .l { font-size: .84rem; color: rgba(255, 255, 255, .7); }
.pv-agenda .n { font-size: .84rem; color: #FFB3C1; font-weight: 700; margin-top: 2px; }
/* Anexos: cuadrícula de dos columnas con el número grande */
.pv-ext { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.pv-ext div { padding: 6px 0; border-top: 1px solid rgba(255, 255, 255, .12); min-width: 0; }
.pv-ext span { display: block; font-size: .84rem; color: rgba(255, 255, 255, .74); line-height: 1.25; }
.pv-ext b { font-family: var(--display); font-size: 1.35rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.2; }
.cover-preview > * { transition: opacity .2s ease; }
/* Efecto de entrada: la tarjeta crece hasta ocupar la pantalla y se convierte en el dashboard */
.cover-preview.grow { position: fixed; transition: top .7s cubic-bezier(.7, 0, .2, 1), left .7s cubic-bezier(.7, 0, .2, 1), width .7s cubic-bezier(.7, 0, .2, 1), height .7s cubic-bezier(.7, 0, .2, 1), border-radius .7s ease, background-color .5s ease; }
.cover-preview.grow > * { opacity: 0; }
.cover-preview.grow { overflow: hidden; }
/* Sin límite de alto al crecer: la tarjeta cubre toda la pantalla antes de dar paso al dashboard */
.cover-preview.full { top: 0 !important; left: 0 !important; width: 100vw !important; height: 100vh !important; max-height: none; border-radius: 0; border-color: transparent; background: var(--bg); backdrop-filter: none; box-shadow: none; }
@media (max-width: 1100px) { .cover-preview { display: none; } }

@media (max-width: 820px) {
  .cover-media { bottom: auto; height: 62%; }
  .cover-media img { object-position: 38% 50%; }
  .cover-shade { background: linear-gradient(180deg, rgba(52, 7, 18, .12) 0%, rgba(52, 7, 18, .05) 22%, rgba(70, 10, 25, .7) 44%, #3A0814 62%); }
  .cover-text { max-width: none; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .cover-brand { margin-bottom: clamp(60px, 18vh, 160px); }
  .cover h1 { font-size: clamp(2.2rem, 10vw, 3.2rem); }
  .btn.big { align-self: stretch; text-align: center; }
}

/* Entrada al dashboard */
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
body.entering .reveal { animation: rise .55s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(320ms + var(--i, 0) * 85ms); }
@keyframes slide-in { from { transform: translateX(-100%); } to { transform: none; } }
@media (min-width: 901px) { body.entering .side { animation: slide-in .6s cubic-bezier(.2, .7, .2, 1) both .2s; } }

/* Bienvenida y recorrido */
.welcome { position: fixed; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 40; width: min(360px, calc(100vw - 32px)); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; box-shadow: 0 24px 60px -24px rgba(0, 0, 0, .5); display: flex; flex-direction: column; gap: 8px; animation: rise .4s ease both; }
.welcome h2 { font-size: 1.1rem; }
.tour { position: fixed; inset: 0; z-index: 60; }
.tour-spot { position: fixed; border-radius: 14px; box-shadow: 0 0 0 9999px rgba(9, 14, 24, .62); outline: 3px solid var(--accent); outline-offset: 2px; transition: top .35s ease, left .35s ease, width .35s ease, height .35s ease; pointer-events: none; }
.tour-card { position: fixed; width: min(380px, calc(100vw - 32px)); background: var(--surface); color: var(--ink); border-radius: 14px; padding: 18px 20px; box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .55); display: flex; flex-direction: column; gap: 8px; transition: top .35s ease, left .35s ease; }
.tour-card h2 { font-size: 1.2rem; }
.tour-count { font-size: .82rem; color: var(--muted); font-weight: 700; }
.tour-card .actions { margin-top: 6px; align-items: center; }
.legend-colors { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; margin-top: 12px; font-size: .85rem; color: var(--muted); }
.top-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.sim { display: flex; align-items: center; gap: 8px; font-size: .85rem; color: var(--muted); }
.sim select { padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); font-weight: 700; color: var(--ink); }
.theme-btn { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 6px 12px; font-size: .85rem; font-weight: 700; cursor: pointer; }
.theme-btn:hover { border-color: var(--brand); }
.demo-tag { font-size: .8rem; font-weight: 700; color: var(--muted); border: 1px solid currentColor; border-radius: 999px; padding: 3px 10px; }

/* Pestañas */
/* Encabezado de cada sección y protocolos */
.panel-head { margin-bottom: 18px; display: flex; flex-direction: column; gap: 4px; }
.panel-head h2 { font-size: 1.6rem; font-weight: 800; letter-spacing: -.01em; }
.proto-block + .proto-block { margin-top: 30px; }
.proto-block > h3 { font-size: 1.1rem; margin-bottom: 12px; }
.proto-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 12px; }
.proto-steps li { background: var(--surface); border: 1px solid var(--card-border); border-radius: 20px; padding: 18px; box-shadow: var(--shadow); display: flex; gap: 12px; }
.proto-steps .n { font-family: var(--display); font-weight: 800; font-size: 1.5rem; line-height: 1; color: var(--brand); }
.proto-steps p { font-size: .9rem; color: var(--muted); margin-top: 4px; }
.proto-steps p b { color: var(--ink); }
/* Protocolos: casos que requieren cuidado en lista */
.care-list { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--card-border); border-radius: 20px; box-shadow: var(--shadow); }
.care-list > li { padding: 16px 20px; border-top: 1px solid var(--line); display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 4px 14px; }
.care-list > li:first-child { border-top: 0; }
.care-list .n { grid-row: 1 / span 3; width: 32px; height: 32px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-family: var(--num); font-weight: 800; }
.care-list h4 { margin: 0; font-family: var(--display); font-size: 1rem; }
.care-list p { color: var(--muted); font-size: .92rem; }
.empty-row td { text-align: center; color: var(--muted); padding: 24px 14px; }

/* Protocolos: flujo de cinco pasos en tarjetas unidas por flechas */
.flow5 { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 22px; }
.fstep { position: relative; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.fstep:not(:last-child)::after { content: "›"; position: absolute; top: 62px; right: -17px; font-size: 1.6rem; line-height: 1; color: var(--brand); font-weight: 700; }
/* El dibujo se ve completo dentro de su recuadro, sin recortes */
.fs-top { position: relative; height: 150px; border-radius: 16px; background: var(--brand-soft); display: grid; place-items: center; padding: 12px 10px 10px; margin-bottom: 6px; }
.fs-top img { max-width: 100%; max-height: 128px; width: auto; height: auto; object-fit: contain; display: block; }
.fs-n { position: absolute; z-index: 1; top: 10px; left: 10px; width: 30px; height: 30px; border-radius: 50%; background: var(--brand-fill); color: var(--on-brand); display: grid; place-items: center; font-family: var(--num); font-weight: 800; font-size: .95rem; }
.fs-label { font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); }
.fstep h3 { font-size: 1rem; font-weight: 800; }
.fs-text { font-size: .88rem; color: var(--muted); }
.fs-say { font-size: .84rem; font-style: italic; color: var(--ink); background: var(--sunken); border-radius: 10px; padding: 8px 10px; margin-top: auto; }
@media (max-width: 1100px) { .flow5 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .fstep::after { display: none; } }
@media (max-width: 680px) { .flow5 { grid-template-columns: minmax(0, 1fr); } }
/* Tres bloques en fila: casos especiales, buenas prácticas y guía completa */
.proto-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 20px; align-items: start; }
@media (max-width: 1000px) { .proto-row { grid-template-columns: minmax(0, 1fr); } }
/* Los tres bloques en blanco, iguales entre sí, para que destaquen sobre el fondo rosado */
.pblock { border-radius: 20px; padding: 16px; display: flex; flex-direction: column; gap: 8px; border: 1px solid var(--card-border); background: var(--surface); box-shadow: var(--shadow); }
.pblock > header { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 4px; }
.pblock > header h3 { font-size: 1.02rem; font-weight: 800; }
.pblock > header p { font-size: .8rem; color: var(--muted); }
.pb-ico { color: var(--brand); flex: none; padding-top: 2px; }
.pitem { background: var(--sunken); border-radius: 12px; }
.pitem summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 11px 12px; cursor: pointer; border-radius: 12px; }
.pitem summary::-webkit-details-marker { display: none; }
.pitem summary:hover .pi-t, .pitem-link:hover .pi-t { color: var(--brand); }
.pi-ico { color: var(--brand); display: grid; place-items: center; flex: none; }
.pi-t { flex: 1; min-width: 0; font-weight: 600; font-size: .92rem; line-height: 1.3; }
.pi-t small { display: block; font-weight: 500; font-size: .78rem; color: var(--muted); }
.pi-chev { color: var(--muted); flex: none; transition: transform .2s ease; }
.pitem[open] .pi-chev { transform: rotate(90deg); }
.pitem > p { padding: 0 14px 12px 44px; font-size: .86rem; color: var(--muted); }
.pitem-link { display: flex; align-items: center; gap: 12px; padding: 11px 12px; color: var(--ink); text-decoration: none; }

/* Flujo de atención: banda vino con los cinco pasos unidos por una línea */
.flow-block { background: var(--grad); color: #FFFFFF; border-radius: 24px; padding: 24px; box-shadow: 0 24px 50px -28px rgba(126, 21, 48, .8); }
.flow-block > h3 { color: #FFFFFF; font-size: 1.25rem; margin-bottom: 2px; }
.flow-sub { color: rgba(255, 255, 255, .78); margin-bottom: 18px; }
.proto-steps.flow li { position: relative; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18); box-shadow: none; flex-direction: column; gap: 8px; }
.proto-steps.flow .n { color: #FFFFFF; width: 38px; height: 38px; border-radius: 50%; background: rgba(255, 255, 255, .16); display: grid; place-items: center; font-size: 1.1rem; }
.proto-steps.flow b { color: #FFFFFF; font-size: 1.05rem; }
.proto-steps.flow p { color: rgba(255, 255, 255, .82); }
.proto-steps.flow p b { color: #FFFFFF; font-size: inherit; }
@media (min-width: 1100px) {
  .proto-steps.flow { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .proto-steps.flow li:not(:last-child)::after { content: ""; position: absolute; top: 37px; right: -13px; width: 14px; height: 2px; background: rgba(255, 255, 255, .55); }
}
.count { font-size: .75rem; background: var(--absent); color: #fff; border-radius: 999px; padding: 0 7px; line-height: 1.5; font-variant-numeric: tabular-nums; }
.panel { padding-block: 22px 40px; }

/* Buscador */
/* Atender: título moderado, barra de búsqueda siempre visible y filtro avanzado contraíble */
.ask-title { display: block; font-family: var(--display); font-weight: 700; font-size: 1.2rem; margin-bottom: 10px; color: var(--ink); }
.searchbar { display: flex; gap: 10px; align-items: stretch; }
.searchbar .field { position: relative; flex: 1; min-width: 0; }
.searchbar input { width: 100%; font-size: 1.05rem; padding: 15px 18px 15px 50px; border-radius: 16px; border: 2px solid transparent; background: var(--surface); box-shadow: var(--shadow); }
.searchbar input:focus { border-color: var(--brand); outline: none; }
.searchbar .search-ico { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.filter-btn { display: inline-flex; align-items: center; gap: 8px; padding: 0 18px; border-radius: 16px; border: 2px solid transparent; background: var(--surface); box-shadow: var(--shadow); font-weight: 700; cursor: pointer; color: var(--ink); white-space: nowrap; }
.filter-btn:hover, .filter-btn[aria-expanded="true"] { border-color: var(--brand); color: var(--brand); }
.f-count { background: var(--brand-fill); color: var(--on-brand); border-radius: 999px; font-size: .75rem; padding: 0 7px; line-height: 1.6; }
.filters-panel { margin-top: 10px; background: var(--surface); border: 1px solid var(--card-border); border-radius: 18px; box-shadow: var(--shadow); padding: 16px 18px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: 12px 14px; align-items: end; }
.filters-panel label { display: block; font-weight: 700; font-size: .85rem; margin-bottom: 4px; }
.filters-panel input, .filters-panel select { width: 100%; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); }
.filters-panel .link { justify-self: start; padding-bottom: 10px; }

/* Desplegables: todos usan la misma flecha */
select { appearance: none; -webkit-appearance: none; padding-right: 36px !important; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237E1530' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; }
:root[data-theme="dark"] select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23F2A8B8' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); }
/* Campo para escribir con lista: al escribir aparecen sugerencias; la flecha abre la lista completa */
.combo { position: relative; }
.combo-box { position: relative; }
.combo-box input { padding-right: 40px !important; }
.combo-arrow { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border: 0; background: none; color: var(--brand); display: grid; place-items: center; cursor: pointer; border-radius: 8px; }
.combo-arrow:hover { background: var(--brand-soft); }
.combo-arrow svg { transition: transform .2s ease; }
.combo.open .combo-arrow svg { transform: rotate(180deg); }
.combo-list { position: absolute; z-index: 25; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 6px; list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 18px 40px -18px rgba(60, 10, 25, .45); max-height: 240px; overflow-y: auto; }
.combo-list li { padding: 8px 10px; border-radius: 8px; cursor: pointer; font-size: .92rem; }
.combo-list li:hover, .combo-list li.active { background: var(--brand-soft); color: var(--brand); }
.combo-list li mark { background: none; color: inherit; font-weight: 800; }
.combo-list .none { color: var(--muted); cursor: default; }
.combo-list .none:hover { background: none; color: var(--muted); }

/* Barras de herramientas de cada sección: búsqueda y filtros */
.toolbar { display: flex; flex-wrap: wrap; gap: 12px 14px; align-items: end; margin-bottom: 18px; }
.search-mini { position: relative; flex: 1 1 260px; min-width: 0; }
.search-mini.wide { flex-basis: 100%; max-width: 560px; }
.search-mini input { width: 100%; padding: 12px 14px 12px 44px; border-radius: 14px; border: 2px solid transparent; background: var(--surface); box-shadow: var(--shadow); font-size: 1rem; }
.search-mini input:focus { border-color: var(--brand); outline: none; }
.search-mini .search-ico { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.tf label { display: block; font-size: .82rem; font-weight: 700; color: var(--muted); margin-bottom: 4px; }
.tf input, .tf select { padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); min-width: 150px; }
.toolbar .link { padding-bottom: 12px; }
@media (max-width: 560px) { .filter-btn .lbl { display: none; } .filter-btn { padding: 0 14px; } }

/* Vistas de Atender */
.view { margin-top: 24px; }
.view-head { margin-bottom: 14px; display: flex; flex-direction: column; gap: 2px; }
.view-head h2 { font-size: 1.3rem; font-weight: 800; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: .92rem; color: var(--muted); margin-bottom: 14px; }
.crumbs [aria-current] { color: var(--ink); font-weight: 700; }
.view .block { margin-top: 24px; }
.view .block > h3 { font-size: 1.05rem; margin-bottom: 10px; }
.view .block > h3 small { font-weight: 500; color: var(--muted); font-size: .85rem; margin-left: 6px; }

/* Avatar con la inicial y un punto con el estado */
.av { position: relative; display: inline-grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--grad); color: #FFFFFF; font-family: var(--display); font-weight: 700; font-size: .85rem; }
.av::after { content: ""; position: absolute; right: 0; bottom: 0; width: 28%; height: 28%; border-radius: 50%; background: var(--k); box-shadow: 0 0 0 2px var(--surface); }
.av.sm { width: 32px; height: 32px; font-size: .72rem; margin-right: -8px; box-shadow: 0 0 0 2px var(--surface); }
.av.lg { width: 64px; height: 64px; font-size: 1.3rem; }
.av.xl { width: 116px; height: 116px; font-size: 2.4rem; box-shadow: 0 0 0 5px var(--surface), var(--shadow); }
.av.xl::after { box-shadow: 0 0 0 4px var(--surface); }

/* Tarjetas de área */
/* Inicio de Atender: áreas en lista a la izquierda y eventos de hoy a la derecha */
.home-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(280px, 1fr); gap: 20px; align-items: start; }
@media (max-width: 1060px) { .home-grid { grid-template-columns: minmax(0, 1fr); } }
.panel-card { background: var(--surface); border: 1px solid var(--card-border); border-radius: 22px; box-shadow: var(--shadow); padding: 18px 20px; min-width: 0; }
.panel-card > header { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; margin-bottom: 6px; }
.panel-card > header h2 { font-size: 1.15rem; font-weight: 800; }
.panel-card > header p { font-size: .85rem; color: var(--muted); }
.area-list { list-style: none; margin: 0; padding: 0; }
.arow { width: 100%; display: grid; grid-template-columns: minmax(0, 1.4fr) auto minmax(0, 1fr) 18px; gap: 6px 16px; align-items: center; text-align: left; border: 0; border-top: 1px solid var(--line); background: none; padding: 12px 8px; cursor: pointer; color: var(--ink); }
.area-list > li:first-child .arow { border-top: 0; }
.arow:hover { background: var(--sunken); border-radius: 12px; }
.a-name b { display: block; font-family: var(--display); font-size: 1rem; line-height: 1.3; }
.a-name span { font-size: .84rem; color: var(--muted); }
.b-team { display: flex; align-items: center; padding-left: 2px; min-height: 32px; }
.b-team small { margin-left: 18px; font-size: .84rem; color: var(--muted); white-space: nowrap; }
.arow .chev { color: var(--muted); }
@media (max-width: 680px) { .arow { grid-template-columns: minmax(0, 1fr) auto; } .arow .b-team, .arow .chev { display: none; } }
/* El texto del buscador cabe en una línea en computadora */
@media (min-width: 901px) { .ask-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } }
/* Lista de áreas: la fila elige el área; la flecha abre sus temas y su equipo */
.area-list > li.pick { display: grid; grid-template-columns: minmax(0, 1fr) 40px; align-items: center; gap: 4px; border-top: 1px solid var(--line); border-radius: 12px; }
.area-list > li.pick:first-child, .area-list > li.pick.sel, .area-list > li.pick.sel + li { border-top-color: transparent; }
.area-list > li.pick .arow { grid-template-columns: minmax(0, 1.4fr) auto minmax(0, 1fr); border-top: 0; padding: 9px 12px; }
.arow-go { width: 36px; height: 36px; border: 0; background: none; border-radius: 10px; color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.arow-go:hover { background: var(--surface); color: var(--brand); }
/* La tarjeta de áreas ocupa el mismo alto que la columna derecha; la lista empieza arriba y las flechas quedan abajo */
@media (min-width: 1061px) {
  .home-grid { align-items: stretch; }
  .home-grid > .panel-card { display: flex; flex-direction: column; }
  .home-grid > .panel-card .area-list { flex: 1; }
  .home-grid > .panel-card .pager { margin-top: auto; }
}
/* Espacio libre al final para desplazarse con comodidad */
#p-atender { padding-bottom: 72px; }
.area-list > li.pick .arow:hover { background: none; }
.area-list > li.pick:hover { background: var(--sunken); }
.area-list > li.pick.sel { background: var(--brand-soft); }
@media (max-width: 680px) { .area-list > li.pick .arow { grid-template-columns: minmax(0, 1fr) auto; } }
/* Vista de área: bloque horizontal con sus datos y, debajo, temas y equipo */
.area-bar { display: grid; grid-template-columns: minmax(0, 1.15fr) repeat(3, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--card-border); border-radius: 20px; box-shadow: var(--shadow); padding: 18px 6px; margin: 4px 0 18px; }
.area-bar > div { padding: 2px 18px; min-width: 0; }
.area-bar > div + div { border-left: 1px solid var(--line); }
.ab-name { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.ab-name h2 { font-size: 1.5rem; font-weight: 800; color: var(--brand); }
.ab-item { display: flex; gap: 12px; align-items: flex-start; }
.ab-v { display: block; font-weight: 700; overflow-wrap: break-word; word-break: normal; margin-bottom: 6px; }
.ab-h { font-size: .9rem; font-weight: 600; }
@media (max-width: 1100px) { .area-bar { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); row-gap: 14px; } .area-bar > div:nth-child(odd) { border-left: 0; } }
@media (max-width: 600px) { .area-bar { grid-template-columns: minmax(0, 1fr); } .area-bar > div + div { border-left: 0; border-top: 1px solid var(--line); padding-top: 12px; } }
/* Aviso de área cerrada con aire antes y después */
.area-bar + .note { margin: -2px 0 20px; padding: 12px 16px; }
.area-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 18px; align-items: start; }
@media (max-width: 1000px) { .area-cols { grid-template-columns: minmax(0, 1fr); } }
/* Temas del área: nombre y, debajo, su concepto como subtema */
.tlist { list-style: none; margin: 0; padding: 0; }
.tlist li { padding: 11px 2px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.tlist li:first-child { border-top: 0; }
.tlist b { font-weight: 700; }
.tlist span { font-size: .86rem; color: var(--muted); }
.team { list-style: none; margin: 0; padding: 0; }
.team-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 2px; border-top: 1px solid var(--line); }
.team-row:first-child { border-top: 0; }
.tm-name { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.tm-name .link { font-weight: 700; text-align: left; }
.tm-role { font-size: .86rem; color: var(--muted); }
.tm-meta { font-size: .8rem; color: var(--muted); overflow-wrap: anywhere; }
.team-row .btn[disabled] { opacity: .45; cursor: not-allowed; }
/* Páginas de áreas: se ven pocas a la vez y se avanza con las flechas */
.pager { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--line); font-size: .85rem; color: var(--muted); }
.pager > div { display: flex; align-items: center; gap: 6px; }
.pg { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.pg:hover:not(:disabled) { color: var(--brand); border-color: var(--brand); }
.pg:disabled { opacity: .4; cursor: default; }
.pg-n { min-width: 58px; text-align: center; font-family: var(--num); font-weight: 700; color: var(--ink); }
/* Columna derecha: información del área elegida y sus temas frecuentes */
.home-side { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.panel-card > header .link { font-size: .88rem; }
.info-name { font-size: 1.15rem; font-weight: 800; color: var(--brand); margin: 6px 0 2px; }
/* Cada dato con su ícono a la izquierda; el estado del horario a la derecha */
.info-list { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.info-item { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 0 14px; align-items: start; padding: 8px 0; min-width: 0; }
.info-ico { color: var(--ink); display: grid; place-items: center; padding-top: 2px; }
.info-item .pill { align-self: center; }
.info-k { font-size: .92rem; font-weight: 700; color: var(--ink); line-height: 1.35; }
.info-v { font-size: .92rem; color: var(--muted); line-height: 1.4; overflow-wrap: anywhere; }
/* Siempre hay espacio para 3 temas, aunque el área tenga menos */
.topic-mini { list-style: none; margin: 0; padding: 0; min-height: 132px; }
.topic-mini li { padding: 10px 2px; border-top: 1px solid var(--line); color: var(--ink); }
.topic-mini li:first-child { border-top: 0; }
.trow.static { cursor: default; }
.events { list-style: none; margin: 0; padding: 0; }
.events > li { padding: 12px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 2px 12px; }
.events > li:first-child { border-top: 0; }
.events .h { font-family: var(--num); font-weight: 700; color: var(--brand); }
.events .t { font-weight: 700; line-height: 1.35; }
.events .l { font-size: .85rem; color: var(--muted); }
.events .acc { grid-column: 2; margin-top: 8px; }
.acc-btn { border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 6px 12px; font-weight: 700; font-size: .85rem; cursor: pointer; color: var(--brand); }
.acc-btn[aria-expanded="true"] { background: var(--brand-soft); border-color: transparent; }
.acc-list { margin: 8px 0 0; padding: 8px 12px; list-style: none; background: var(--sunken); border-radius: 12px; font-size: .88rem; }
.acc-list li { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-top: 1px solid var(--line); }
.acc-list li:first-child { border-top: 0; }
.acc-list .num { color: var(--muted); }
.acc-note { font-size: .78rem; color: var(--muted); margin-top: 6px; }

/* Vista de un área */
.area-hero { background: var(--surface); border: 1px solid var(--card-border); border-radius: 22px; box-shadow: var(--shadow); padding: 22px 24px; display: flex; flex-direction: column; gap: 16px; }
.area-hero header { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.area-hero h2 { font-size: 1.6rem; font-weight: 800; color: var(--brand); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 7px 14px; font-weight: 700; cursor: pointer; color: var(--ink); }
.chip:hover { border-color: var(--brand); color: var(--brand); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 185px), 1fr)); gap: 12px; }
.pcard { border: 1px solid var(--card-border); background: var(--surface); border-radius: 20px; box-shadow: var(--shadow); padding: 20px 14px 16px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; cursor: pointer; color: var(--ink); }
.pcard:hover { border-color: var(--brand); }
.pcard b { font-size: 1rem; margin-top: 4px; }
.pcard .role { font-size: .82rem; color: var(--muted); line-height: 1.3; min-height: 2.6em; }
.pcard .mod { font-size: .8rem; color: var(--muted); }
/* La etiqueta de estado se ajusta al ancho de la tarjeta y pasa a dos líneas si hace falta */
.pcard .pill, .team-list .pill { max-width: 100%; white-space: normal; line-height: 1.3; padding-block: 3px; text-align: left; }
.pcard .pill::before, .team-list .pill::before { align-self: flex-start; margin-top: .42em; }

/* Resultados de temas */
.topic-list { display: flex; flex-direction: column; gap: 8px; }
.trow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; align-items: center; text-align: left; border: 1px solid var(--card-border); background: var(--surface); border-radius: 16px; box-shadow: var(--shadow); padding: 12px 16px; cursor: pointer; color: var(--ink); }
.trow b { font-size: 1rem; }
.trow .s { grid-column: 1; font-size: .86rem; color: var(--muted); }
.trow .pill { grid-row: 1 / span 2; grid-column: 2; }

/* Credencial de la persona y su horario semanal */
.person-grid { display: grid; grid-template-columns: minmax(280px, 340px) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 1000px) { .person-grid { grid-template-columns: minmax(0, 1fr); } }
.idcard { background: var(--surface); border: 1px solid var(--card-border); border-radius: 24px; box-shadow: var(--shadow); overflow: hidden; }
.id-band { height: 96px; background: var(--grad); color: rgba(255, 255, 255, .85); font-size: .8rem; font-weight: 700; padding: 14px 18px; }
.id-body { padding: 0 22px 22px; margin-top: -58px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; }
.id-body h2 { font-size: 1.35rem; margin-top: 10px; }
.id-role { font-weight: 700; color: var(--brand); }
.id-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 4px; }
.tag { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 999px; font-size: .8rem; font-weight: 700; background: var(--sunken); color: var(--ink); }
.tag.go { background: var(--ok-bg); color: var(--ok); }
.id-facts { width: 100%; margin: 12px 0 0; display: grid; gap: 10px; text-align: left; border-top: 1px solid var(--line); padding-top: 14px; }
.id-facts dt { font-size: .8rem; color: var(--muted); }
.id-facts dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.id-facts dd.big { font-size: 1.9rem; font-weight: 800; line-height: 1.1; }
.idcard .actions { width: 100%; flex-direction: column; margin-top: 8px; }
.idcard .actions .btn, .redirect .btn { width: 100%; }
.idcard .actions .btn.small { padding-block: 12px; font-size: .98rem; }
.idcard .actions .btn[disabled], .row-tags .btn[disabled] { opacity: .45; cursor: not-allowed; }
.idcard .call { width: 100%; text-align: left; margin-top: 8px; }
.redirect { width: 100%; text-align: left; background: var(--absent-bg); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.sched { background: var(--surface); border: 1px solid var(--card-border); border-radius: 24px; box-shadow: var(--shadow); padding: 20px 22px; min-width: 0; }
.sched h3 { font-size: 1.05rem; margin-bottom: 12px; }
/* El margen interno evita que el recuadro de hoy se corte en el borde */
.cal-wrap { overflow-x: auto; padding: 4px; margin: -4px; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(80px, 1fr)); gap: 8px; min-width: 600px; }
.day { display: flex; flex-direction: column; gap: 6px; }
.day-h { font-size: .82rem; color: var(--muted); text-align: center; }
.day-h b { display: block; color: var(--ink); font-size: .92rem; text-transform: capitalize; }
.day.today .day-h b { color: var(--brand); }
.slot { border-radius: 14px; padding: 12px 8px; min-height: 132px; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: .8rem; text-align: center; }
.day.onsite .slot { background: var(--ok-bg); color: var(--ok); }
.day.remote .slot { background: var(--remote-bg); color: var(--remote); }
.day.blocked .slot { background: repeating-linear-gradient(135deg, var(--sunken) 0 8px, var(--surface) 8px 16px); color: var(--muted); }
.day.absent .slot { background: repeating-linear-gradient(135deg, var(--absent-bg) 0 8px, var(--surface) 8px 16px); color: var(--absent); }
.day.today .slot { outline: 2px solid var(--brand); outline-offset: 2px; }
.slot-t { font-weight: 800; }
.slot-h { font-family: var(--num); font-weight: 700; color: var(--ink); line-height: 1.35; }
.slot-m { background: var(--surface); color: var(--busy); border-radius: 8px; padding: 4px; font-weight: 700; line-height: 1.3; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 14px; font-size: .8rem; color: var(--muted); }
.cal-legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; background: var(--c); }
/* Columna derecha de la credencial: horario y, debajo, la lista de jefe y compañeros */
.person-side { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.list-label { font-size: .8rem; font-weight: 700; color: var(--muted); margin: 10px 0 2px; }
.list-label:first-of-type { margin-top: 0; }
.team-list { list-style: none; margin: 0; padding: 0; }
.team-list li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 10px 8px; border-top: 1px solid var(--line); }
.team-list li:first-child { border-top: 0; }
.who-t { display: flex; flex-direction: column; min-width: 0; }
.who-t .link { font-size: .98rem; }
.who-t .mail { font-size: .85rem; color: var(--muted); overflow-wrap: anywhere; }
.row-tags { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
@media (max-width: 600px) {
  .team-list li { grid-template-columns: auto minmax(0, 1fr); }
  .row-tags { grid-column: 2; justify-content: flex-start; }
}


.results { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.group h2 { font-size: .9rem; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.group ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.row { width: 100%; text-align: left; border: 1px solid transparent; background: none; border-radius: 10px; padding: 9px 12px; cursor: pointer; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; align-items: center; }
.row:hover { background: var(--surface); border-color: var(--line); }
.row[aria-current="true"] { background: var(--surface); border-color: var(--brand); }
.row .t { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .s { grid-column: 1; font-size: .85rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .pill { grid-row: 1 / span 2; grid-column: 2; }
.empty { background: var(--surface); border: 1px dashed var(--line); border-radius: 12px; padding: 16px; }
.empty p + p { margin-top: 6px; }

/* Estados */
[data-k="ok"] { --k: var(--ok); --kb: var(--ok-bg); }
[data-k="busy"] { --k: var(--busy); --kb: var(--busy-bg); }
[data-k="remote"] { --k: var(--remote); --kb: var(--remote-bg); }
[data-k="off"] { --k: var(--off); --kb: var(--off-bg); }
[data-k="absent"] { --k: var(--absent); --kb: var(--absent-bg); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: .8rem; font-weight: 700; background: var(--kb); color: var(--k); white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }

/* Ficha */
.card { background: var(--surface); border: 1px solid var(--card-border); border-radius: 22px; box-shadow: var(--shadow); overflow: hidden; min-width: 0; }
.card-in { padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 18px; }
.who { display: flex; gap: 16px; align-items: center; }
.avatar { width: 56px; height: 56px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 1.15rem; flex: none; }
.who h2 { font-size: 1.5rem; font-weight: 700; }
.who p { color: var(--muted); }
.signal { background: var(--kb); color: var(--k); padding: 16px 24px; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; }
.signal strong { font-family: var(--display); font-size: clamp(1.35rem, 2.6vw, 1.85rem); font-weight: 800; letter-spacing: -.01em; }
.signal span { font-weight: 700; }
.signal small { flex-basis: 100%; font-size: .8rem; opacity: .85; color: var(--k); }
.next { font-size: 1.02rem; }
.next b { color: var(--brand); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.btn { border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 10px 16px; font-weight: 700; cursor: pointer; }
.btn:hover { border-color: var(--brand); }
.btn.primary { background: var(--grad); border-color: transparent; color: var(--on-brand); box-shadow: 0 12px 24px -14px rgba(165, 31, 70, .7); }
.btn.primary:hover { filter: brightness(1.12); }
.btn.small { padding: 5px 10px; font-size: .85rem; }
/* Estándar de etiquetas: mismo alto, punto centrado y la misma distancia entre etiquetas y botones */
.pill, .tag { min-height: 26px; padding: 0 10px; line-height: 1.2; }
.row-tags, .tm-name { align-items: center; }
.row-tags { gap: 8px; }
.team-list .row-tags .pill { white-space: nowrap; padding-block: 0; }
.team-list .row-tags .pill::before { align-self: center; margin-top: 0; }
.row-tags .btn.small, .team-row .btn.small { height: 28px; padding: 0 12px; display: inline-flex; align-items: center; }
.link { border: 0; background: none; padding: 0; color: var(--brand); font-weight: 700; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-align: left; }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px 20px; margin: 0; }
.facts div { min-width: 0; }
.facts dt { font-size: .82rem; color: var(--muted); }
.facts dd { margin: 2px 0 0; font-weight: 700; overflow-wrap: anywhere; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.facts dd.big { font-family: var(--display); font-size: 1.6rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.copy { border: 1px solid var(--line); background: var(--surface); border-radius: 6px; font-size: .75rem; padding: 1px 8px; cursor: pointer; font-weight: 700; color: var(--muted); }

.week { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; max-width: 330px; }
.week div { text-align: center; border-radius: 8px; background: var(--sunken); padding: 4px 0; font-size: .78rem; }
.week div b { display: block; font-family: var(--display); font-size: .9rem; }
.week .P { background: var(--ok-bg); color: var(--ok); }
.week .R { background: var(--remote-bg); color: var(--remote); }
.week .today { outline: 2px solid var(--ink); outline-offset: -2px; }
.legend { font-size: .78rem; color: var(--muted); margin-top: 6px; }

section.block h3 { font-size: 1rem; font-weight: 700; margin-bottom: 8px; }
.people { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.people li { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 8px 12px; border-radius: 10px; background: var(--sunken); }
.people .role { font-size: .82rem; color: var(--muted); display: block; font-weight: 400; }
.say { margin: 0; padding: 12px 16px; border-radius: 10px; background: var(--brand-soft); font-size: 1.02rem; }
.note { padding: 10px 14px; border-radius: 10px; background: var(--busy-bg); color: var(--ink); border: 1px solid color-mix(in srgb, var(--busy) 35%, transparent); }
.note b { color: var(--busy); }
.route { font-size: .95rem; }
.checklist { margin: 0; padding-left: 20px; }
.checklist li + li { margin-top: 3px; }
.resolve { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }

.call { border: 2px solid var(--ok); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.call .clock { font-family: var(--display); font-weight: 800; font-size: 1.3rem; font-variant-numeric: tabular-nums; }

.source { font-size: .8rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 12px; }

/* Casos */
.summary { display: flex; flex-wrap: wrap; gap: 10px 32px; margin-bottom: 18px; }
.summary div { display: flex; align-items: baseline; gap: 8px; }
.summary b { font-family: var(--display); font-size: 1.8rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.filters button { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 4px 12px; cursor: pointer; font-weight: 700; font-size: .85rem; }
.filters button[aria-pressed="true"] { background: var(--brand-fill); color: var(--on-brand); border-color: var(--brand-fill); }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--card-border); border-radius: 20px; box-shadow: var(--shadow); }
table { border-collapse: collapse; width: 100%; min-width: 820px; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .82rem; color: var(--muted); font-weight: 700; background: var(--sunken); }
tr:last-child td { border-bottom: 0; }
td .sub { display: block; font-size: .82rem; color: var(--muted); }
/* Tabla de áreas: filas compactas y temas en viñetas */
.areas-table { min-width: 760px; }
.areas-table th:nth-child(1) { width: 26%; } .areas-table th:nth-child(2) { width: 26%; } .areas-table th:nth-child(3) { width: 18%; }
.areas-table td { padding: 9px 14px; font-size: .92rem; overflow-wrap: anywhere; }
.a-link { font-weight: 700; text-align: left; }
.t-bullets { margin: 0; padding-left: 18px; line-height: 1.4; }
.t-bullets li::marker { color: var(--brand); }
.th-sort { border: 0; background: none; padding: 0; font: inherit; font-weight: 700; color: inherit; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.th-sort:hover { color: var(--brand); }
.sort-tag { font-size: .72rem; font-weight: 700; color: var(--brand); background: var(--brand-soft); border-radius: 6px; padding: 1px 6px; }
.code { font-family: var(--display); font-weight: 700; font-variant-numeric: tabular-nums; }

/* Áreas */
.areas { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); gap: 12px; }
.area { background: var(--surface); border: 1px solid var(--card-border); border-radius: 20px; box-shadow: var(--shadow); padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.area header { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.area h3 { font-size: 1.05rem; }
.area .alt { font-size: .9rem; background: var(--busy-bg); border-radius: 8px; padding: 8px 10px; }
.area dl { margin: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 12px; font-size: .9rem; }
.area dt { color: var(--muted); }
.area dd { margin: 0; overflow-wrap: anywhere; }

/* Diálogo */
dialog { border: 0; border-radius: 16px; padding: 0; width: min(640px, calc(100vw - 32px)); background: var(--surface); color: var(--ink); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .5); }
dialog::backdrop { background: rgba(9, 14, 24, .55); }
.dlg { padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 16px; max-height: calc(100vh - 48px); overflow: auto; }
.dlg-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.dlg-head h2 { font-size: 1.35rem; }
/* Título en vino medio y subtítulo con ícono de correo */
#dlg-title { color: var(--brand-mid); }
.dlg-sub { display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.dlg-sub svg { flex: none; color: var(--brand-mid); }
#dv-msg { min-height: 150px; line-height: 1.5; }
/* Casos atendidos: la fila se abre con un clic o con Enter */
.case-row { cursor: pointer; }
.case-row:hover td, .case-row:focus-visible td { background: var(--sunken); }
.case-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 4px 0 14px; font-size: .88rem; color: var(--muted); }
.tcard-msg { white-space: pre-line; font-size: .92rem; padding-top: 12px; margin-top: 4px; border-top: 1px solid var(--line); }
/* Con copia a: buscador del directorio y etiquetas de los correos elegidos */
.cc-wrap { margin-bottom: 12px; }
.cc-search { position: relative; }
.cc-search > svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.f .cc-search input[type="text"] { padding-left: 38px; }
.cc-list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 5; list-style: none; margin: 0; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); max-height: 230px; overflow-y: auto; }
.cc-list li { padding: 8px 10px; border-radius: 8px; cursor: pointer; display: flex; flex-direction: column; }
.cc-list li:hover, .cc-list li.active { background: var(--sunken); }
.cc-list li b { font-size: .9rem; }
.cc-list li span { font-size: .8rem; color: var(--muted); }
.cc-msg { font-size: .8rem; color: var(--muted); margin-top: 5px; }
.cc-msg:empty { display: none; }
.cc-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.cc-chips:empty { display: none; }
.cc-chip { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 4px 0 12px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); font-size: .82rem; font-weight: 700; }
.cc-chip button { border: 0; background: none; color: inherit; cursor: pointer; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: .8rem; }
.cc-chip button:hover { background: rgba(126, 21, 48, .12); }
.x { border: 0; background: var(--sunken); width: 34px; height: 34px; border-radius: 50%; cursor: pointer; font-size: 1.1rem; flex: none; }
.to { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; background: var(--sunken); border-radius: 10px; padding: 10px 14px; }
.to-note { font-size: .9rem; color: var(--muted); }
form .grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px 14px; }
.f label, .f legend { display: block; font-weight: 700; font-size: .9rem; margin-bottom: 4px; }
.f input[type="text"], .f input[type="email"], .f select, .f textarea { width: 100%; padding: 9px 12px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); }
.f textarea { min-height: 80px; resize: vertical; }
fieldset.f { border: 0; padding: 0; margin: 0; }
.radios { display: flex; gap: 16px; flex-wrap: wrap; }
.radios label, .consent { font-weight: 400; display: flex; gap: 8px; align-items: flex-start; }
.err { color: var(--absent); font-weight: 700; font-size: .9rem; }
.done-code { font-family: var(--display); font-size: clamp(2.2rem, 7vw, 3.2rem); font-weight: 800; letter-spacing: -.02em; color: var(--brand); font-variant-numeric: tabular-nums; }
.ab-cel { margin: 4px 0 0; font-size: .85rem; color: var(--muted); }
.tcard { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; min-height: 180px; }
/* El correo se desplaza dentro de su tarjeta; el título y los botones quedan siempre a la vista */
.dlg > :not(.tcard) { flex-shrink: 0; }
.tcard-b { overflow-y: auto; min-height: 0; scrollbar-width: thin; }
.tcard-h { background: var(--sunken); color: var(--ink); font-size: .8rem; font-weight: 700; padding: 6px 12px; border-bottom: 1px solid var(--line); }
.tcard-b { padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.tcard dl { margin: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 12px; font-size: .9rem; }
.tcard dt { color: var(--muted); }
.tcard dd { margin: 0; overflow-wrap: anywhere; }
.tcard-a { display: flex; gap: 6px; flex-wrap: wrap; }
.tcard-a span { border: 1px solid var(--line); border-radius: 6px; padding: 3px 10px; font-size: .85rem; font-weight: 700; }
.tcard-a span:first-child { background: var(--grad); color: var(--on-brand); border-color: transparent; }

/* Aviso */
.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%) translateY(20px); background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 10px; font-weight: 700; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }


@media (max-width: 720px) {
  .top .wrap { gap: 10px; }
  .top-tools { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .top-tools .sim { grid-column: 1 / -1; order: 3; justify-content: space-between; }
  .top-tools .sim select { flex: 1; min-width: 0; }
  .demo-tag { display: none; }
  .card-in { padding: 18px 16px 20px; }
  .signal { padding: 14px 16px; }
}
/* Cifras (horas, anexos, códigos, contadores) en Figtree: cero sin barra y proporciones abiertas */
.num, .pv-time, .pv-agenda .h, .pv-ext b, .facts dd.big, .summary b, .code, .done-code, .count, .proto-steps .n { font-family: var(--num); }
.pv-time { font-weight: 700; font-size: 2.6rem; letter-spacing: -.01em; display: flex; align-items: baseline; gap: 6px; }
.pv-time small { font-size: .95rem; font-weight: 700; color: rgba(255, 255, 255, .8); letter-spacing: .02em; }
.pv-agenda .h { font-weight: 700; font-size: 1.05rem; }
.pv-ext b { font-weight: 700; font-size: 1.75rem; letter-spacing: .01em; }
.facts dd.big, .summary b { font-weight: 800; }

@media (prefers-reduced-motion: reduce) {
  .toast, .cover, .cover-text, .cover-media img, .cover-preview, .tour-spot, .tour-card { transition: none !important; }
  .reveal, .welcome, .cover.arriving, .pv-live { animation: none !important; }
}
