/* =========================================================================
   Alona · Sesiones — estilos de facilitador (index.html) y participante (mesa.html).
   Portado del prototipo aprobado. Fluido por construcción: flex-wrap, auto-fit, clamp(),
   100dvh y área segura; sin dependencias de un ancho concreto.
   ========================================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--df-bg-muted); min-height: 100vh; min-height: 100dvh; }
[hidden] { display: none !important; }
.ic { flex: none; }
.spin { animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

.page { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }

/* ---------- cabecera ---------- */
.app-header {
  flex: none; min-height: 64px; padding: 12px clamp(16px, 4vw, 32px);
  background: #fff; border-bottom: 1px solid var(--df-border-soft);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
}
.brand { display: flex; align-items: center; gap: 12px; }
/* Wordmark Alona: A naranja (primera letra) + LONA en mayúsculas espaciadas; escala con font-size */
.wm { display: inline-flex; align-items: center; gap: .08em; font-size: 18px; line-height: 1; }
.wm-a { height: 1.08em; width: 1.03em; flex: none; overflow: visible; }
.wm-t { font-weight: 500; letter-spacing: 0.12em; color: var(--df-text); }
.header-right { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 12px 16px; }
.lbl { font-family: var(--df-font-mono); font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--df-text-3); }

/* ---------- contenedores ---------- */
.container {
  flex: 1; width: 100%; max-width: 1200px; margin: 0 auto;
  padding: clamp(24px, 5vw, 48px) clamp(16px, 4vw, 64px);
  display: flex; flex-direction: column; gap: 24px;
}
.title-block { display: flex; flex-direction: column; gap: 8px; }
.title-block h1 { font-size: clamp(28px, 5vw, 40px); }
.title-block p { max-width: 640px; color: var(--df-text-2); }
.row-wrap { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.card {
  background: #fff; border: 1px solid var(--df-border-soft); border-radius: 16px;
  padding: clamp(20px, 4vw, 32px); box-shadow: var(--df-shadow-sm); min-width: 0;
}
.card.pad-md { padding: 24px; }
.stack { display: flex; flex-direction: column; gap: 24px; }
.stack-sm { display: flex; flex-direction: column; gap: 12px; }

/* ---------- campos ---------- */
.field { display: flex; flex-direction: column; gap: 8px; }
.hint { font-size: 12px; line-height: 1.5; color: var(--df-text-3); }
.input, textarea.input, select.input {
  width: 100%; min-height: 44px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--df-border);
  background: #fff; font-family: var(--df-font-body); font-size: 16px; color: var(--df-text); outline: none;
  transition: border var(--df-dur-fast), box-shadow var(--df-dur-fast);
}
textarea.input { padding: 12px 14px; min-height: 96px; resize: vertical; line-height: 1.5; }
select.input { min-height: 48px; appearance: none; background-image: linear-gradient(45deg, transparent 50%, #6B7280 50%), linear-gradient(135deg, #6B7280 50%, transparent 50%); background-position: calc(100% - 20px) 55%, calc(100% - 14px) 55%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 36px; }
.input:focus { border-color: var(--df-secondary); box-shadow: var(--df-shadow-glow); }
.input::placeholder { color: var(--df-text-3); }
.stepper { display: flex; align-items: center; gap: 12px; }
.stepper b { min-width: 56px; text-align: center; font-family: var(--df-font-mono); font-size: 20px; font-weight: 600; }
.note { display: flex; gap: 12px; align-items: flex-start; padding: 16px; border-radius: 8px; background: var(--df-bg-muted); font-size: 13px; line-height: 1.55; color: var(--df-text-2); }
.note .ic { color: var(--df-primary-deep); margin-top: 1px; }
.toggle { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; min-height: 44px; }
.toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.toggle .track { width: 40px; height: 22px; border-radius: 999px; background: var(--df-border-strong); position: relative; transition: background var(--df-dur-base) var(--df-ease-out); flex: none; }
.toggle .track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 999px; background: #fff; box-shadow: var(--df-shadow-sm); transition: transform var(--df-dur-base) var(--df-ease-out); }
.toggle input:checked + .track { background: var(--df-secondary); }
.toggle input:checked + .track::after { transform: translateX(18px); }
.toggle input:focus-visible + .track, .check input:focus-visible + .box { box-shadow: var(--df-shadow-glow); }
.check { display: flex; gap: 12px; align-items: center; min-height: 48px; cursor: pointer; font-weight: 500; line-height: 1.5; }
.check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check .box { flex: none; width: 28px; height: 28px; border-radius: 8px; border: 1.5px solid var(--df-border-strong); background: #fff; display: grid; place-items: center; color: #fff; transition: all var(--df-dur-fast); }
.check input:checked + .box { background: var(--df-secondary); border-color: var(--df-secondary); }
.check .box .ic { opacity: 0; }
.check input:checked + .box .ic { opacity: 1; }

/* ---------- botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px;
  border-radius: 8px; border: 1px solid transparent; font-family: var(--df-font-body); font-size: 14px; font-weight: 600;
  line-height: 1; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: all var(--df-dur-base) var(--df-ease-out);
}
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; }
.btn:focus-visible { outline: none; box-shadow: var(--df-shadow-glow); }
.btn-primary { background: var(--df-secondary); color: #fff; box-shadow: 0 1px 2px rgba(17,24,39,0.08); }
.btn-primary:not(:disabled):hover { background: var(--df-primary-deep); box-shadow: 0 6px 16px rgba(199,106,58,0.28); color: #fff; }
.btn-ghost { background: #fff; color: var(--df-text); border-color: var(--df-border); }
.btn-ghost:not(:disabled):hover { background: var(--df-bg-muted); }
.btn-danger { background: #fff; color: var(--df-danger); border-color: var(--df-border); }
.btn-danger:not(:disabled):hover { background: #FBECEC; border-color: var(--df-danger); }
.btn-dark { background: transparent; color: var(--df-surface-ink); border-color: rgba(232,236,243,0.28); min-height: 40px; padding: 0 14px; font-size: 13px; }
.btn-dark:not(:disabled):hover { background: rgba(232,236,243,0.10); }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: 13px; }
.btn-lg { min-height: 52px; font-size: 15px; }
.btn-xl { min-height: 56px; font-size: 15px; }
.btn-block { width: 100%; }
.btn-icon { padding: 0; min-width: 44px; }
.btn-dark.btn-icon { min-width: 40px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.err { color: var(--df-danger); font-size: 13px; min-height: 18px; }

/* ---------- badges y chips ---------- */
.badge { display: inline-flex; align-items: center; gap: 8px; height: 26px; padding: 0 12px; border-radius: 999px; font-family: var(--df-font-mono); font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; }
.badge::before { content: ""; width: 8px; height: 8px; border-radius: 999px; background: currentColor; }
.badge.live { background: rgba(242,139,139,0.16); color: #F6A3A3; }
.badge.pause { background: rgba(240,190,98,0.16); color: #F0BE62; }
.badge.done { background: rgba(111,211,165,0.16); color: #6FD3A5; }
.badge.idle { background: rgba(195,202,216,0.14); color: #C3CAD8; }
.badge.soft { background: var(--df-primary-soft); color: var(--df-primary-deep); }
.badge.soft::before { display: none; }
.badge.light-live { background: #FBECEC; color: var(--df-danger); }
.badge.light-ok { background: #E4F3EC; color: #1F6F4D; }
.badge.light-err { background: #FBECEC; color: var(--df-danger); }
.badge.light-live::before { animation: pulse 1.2s var(--df-ease-in-out) infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }
.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; padding: 4px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--df-border-soft); font-size: 13px; color: var(--df-text-2); }
.chip.ok { color: #1F6F4D; } .chip.warn { color: #8A5A00; border-color: #F0D9A8; background: #FFF7E3; } .chip.bad { color: var(--df-danger); border-color: #F2C5C5; background: #FBECEC; }

/* ---------- panel del facilitador (pizarra) ---------- */
.slate { background: var(--df-surface); border-radius: 24px; padding: clamp(12px, 3vw, 24px); }
.mesa-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.mesa-card { background: var(--df-surface-2); border-radius: 16px; padding: 24px; display: flex; flex-direction: column; gap: 16px; color: var(--df-surface-ink); min-width: 0; }
.mesa-card h3 { color: var(--df-surface-ink); font-size: 18px; }
.mesa-card .lbl { color: #C3CAD8; }
.mesa-card .time { font-family: var(--df-font-mono); font-size: 30px; font-weight: 500; letter-spacing: -0.01em; }
.mesa-card .facts { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 13px; color: #C3CAD8; align-items: center; }
.mesa-card .facts .ok { color: #6FD3A5; } .mesa-card .facts .warn { color: #F0BE62; }
.mesa-card hr { border: 0; height: 1px; background: rgba(232,236,243,0.14); margin: 0; }
.mesa-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.sinsenal { display: flex; gap: 8px; align-items: center; padding: 8px 12px; border-radius: 8px; background: rgba(240,190,98,0.16); color: #F0BE62; font-size: 13px; }
.bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; }
.bar .grow { flex: 1 1 280px; display: flex; flex-direction: column; gap: 4px; }
.bar strong { font-size: 16px; } .bar span { font-size: 14px; line-height: 1.55; color: var(--df-text-2); }
.steps-list { display: flex; flex-direction: column; gap: 24px; margin-top: 20px; }
.steps-list .s { display: flex; gap: 16px; align-items: flex-start; }
.steps-list .n { flex: none; width: 28px; height: 28px; border-radius: 999px; background: var(--df-primary-soft); color: var(--df-primary-deep); display: grid; place-items: center; font-family: var(--df-font-mono); font-size: 12px; font-weight: 700; }
.steps-list b { display: block; font-size: 15px; margin-bottom: 4px; } .steps-list span { font-size: 14px; line-height: 1.55; color: var(--df-text-2); }

/* ---------- medidor ---------- */
.meter { display: flex; align-items: flex-end; gap: 4px; height: 96px; }
.meter i { flex: 1; border-radius: 3px; background: var(--df-border-soft); transition: background 80ms linear; min-width: 2px; }
.meter i.on { background: var(--df-secondary); }
.meter.rec i.on { background: var(--df-danger); }
.meter.sm { height: 28px; gap: 3px; } .meter.sm i { background: rgba(232,236,243,0.14); } .meter.sm.rec i.on { background: #F6A3A3; }

/* ---------- participante ---------- */
.m-main { flex: 1; width: 100%; max-width: 480px; margin: 0 auto; display: flex; flex-direction: column; }
.m-body { flex: 1; padding: 24px 20px 16px; display: flex; flex-direction: column; gap: 20px; }
.m-foot { position: sticky; bottom: 0; padding: 16px 20px max(24px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 12px; background: var(--df-bg-muted); box-shadow: 0 -1px 0 var(--df-border-soft); }
.m-title { display: flex; flex-direction: column; gap: 8px; }
.m-title h1 { font-size: 28px; }
.progress { display: flex; gap: 6px; }
.progress i { flex: 1; height: 4px; border-radius: 2px; background: var(--df-border); }
.progress i.on { background: var(--df-secondary); }
.icon-tile { width: 44px; height: 44px; border-radius: 12px; background: var(--df-primary-soft); color: var(--df-primary-deep); display: grid; place-items: center; }
.verdict { display: flex; gap: 12px; align-items: center; padding: 16px; border-radius: 12px; font-size: 14px; line-height: 1.5; font-weight: 600; }
.verdict.ok { background: #E4F3EC; color: #1F6F4D; } .verdict.warn { background: #FFF7E3; color: #8A5A00; } .verdict.wait { background: var(--df-bg-muted); color: var(--df-text-2); font-weight: 500; }
.rec-center { display: flex; flex-direction: column; align-items: center; gap: 12px; padding-top: 8px; text-align: center; }
.timer { font-family: var(--df-font-mono); font-size: clamp(44px, 15vw, 60px); font-weight: 500; letter-spacing: -0.02em; line-height: 1; }
.take { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.take .info { flex: 1; min-width: 140px; display: flex; flex-direction: column; gap: 4px; }
.take .info b { font-size: 15px; } .take .info span { font-family: var(--df-font-mono); font-size: 12px; color: var(--df-text-2); }
.take audio { width: 100%; height: 40px; }
.takes { display: flex; flex-direction: column; gap: 12px; }
.banner { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 12px; font-size: 14px; line-height: 1.5; }
.banner.warn { background: #FFF7E3; color: #7A5200; border: 1px solid #F0D9A8; }
.banner.bad { background: #FBECEC; color: #9C2B2B; border: 1px solid #F2C5C5; }
.banner.info { background: #EEF3FD; color: #2A4F95; border: 1px solid #CBD9F4; }
.center-msg { text-align: center; padding: 48px 20px; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.confirm { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 12px; background: #FFF; border: 1px solid var(--df-border); }

/* ---------- resultados / estado ---------- */
.steps-state { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.step { font-family: var(--df-font-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--df-text-3); padding: 4px 10px; border-radius: 999px; border: 1px solid var(--df-border-soft); }
.step.active { color: var(--df-primary-deep); border-color: var(--df-primary-soft); background: var(--df-primary-soft); }
.step.ok { color: var(--df-success); border-color: #CDE8DA; }
.result-block { margin-top: 20px; }
.result-block pre { font-family: var(--df-font-mono); font-size: 12.5px; line-height: 1.6; background: var(--df-bg-muted); border: 1px solid var(--df-border-soft); border-radius: 8px; padding: 16px; white-space: pre-wrap; overflow-x: auto; margin: 8px 0 0; }

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; background: rgba(17,24,39,0.55); display: grid; place-items: center; padding: 16px; z-index: 50; }
.modal .box { background: #fff; border-radius: 16px; padding: 24px; max-width: 360px; width: 100%; display: flex; flex-direction: column; gap: 16px; align-items: center; text-align: center; box-shadow: var(--df-shadow-lg); }
.modal svg.qr { width: min(100%, 280px); height: auto; }
.toast { position: fixed; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--df-text); color: #fff; padding: 12px 20px; border-radius: 999px; font-size: 14px; z-index: 60; box-shadow: var(--df-shadow-lg); max-width: calc(100vw - 32px); }
.gate-wrap { flex: 1; display: grid; place-items: center; padding: 32px 16px; }
.gate { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 20px; text-align: center; }
.gate .mark-lg { margin: 0 auto; }

/* ---------- acceso (inicio de sesión, MFA, contraseña) ---------- */
.auth-wrap { flex: 1; width: 100%; max-width: 440px; margin: 0 auto; padding: clamp(24px, 6vw, 56px) 16px; display: flex; flex-direction: column; gap: 24px; }
.auth-head { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.auth-head h1 { font-size: clamp(24px, 6vw, 32px); }
.auth-head p { color: var(--df-text-2); font-size: 15px; }
.auth-links { display: flex; flex-direction: column; gap: 12px; align-items: center; text-align: center; font-size: 14px; }
.auth-links a, .linkbtn { color: var(--df-text); font-weight: 600; text-decoration: underline; background: none; border: 0; cursor: pointer; font-size: 14px; font-family: inherit; padding: 8px; min-height: 44px; }
.auth-links .muted { color: var(--df-text-3); font-weight: 400; text-decoration: none; }
.pw { position: relative; }
.pw .input { padding-right: 52px; }
.pw .eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border: 0; background: none; color: var(--df-text-3); cursor: pointer; display: grid; place-items: center; border-radius: 8px; }
.pw .eye:hover { color: var(--df-text); background: var(--df-bg-muted); }
.pw .eye:focus-visible { outline: none; box-shadow: var(--df-shadow-glow); }
.input.bad { border-color: var(--df-danger); }
.rules { display: flex; flex-direction: column; gap: 10px; }
.rule { display: flex; gap: 10px; align-items: center; font-size: 14px; line-height: 1.4; color: var(--df-text-3); }
.rule.ok { color: #1F6F4D; font-weight: 500; }
.fort { display: flex; flex-direction: column; gap: 8px; }
.fort-bar { display: flex; gap: 6px; }
.fort-bar i { flex: 1; height: 6px; border-radius: 3px; background: var(--df-border-soft); transition: background var(--df-dur-base); }
.fort-bar.n1 i:nth-child(-n+1) { background: var(--df-danger); }
.fort-bar.n2 i:nth-child(-n+2) { background: var(--df-warning); }
.fort-bar.n3 i:nth-child(-n+3) { background: #7BB661; }
.fort-bar.n4 i { background: var(--df-success); }
.fort-row { display: flex; justify-content: space-between; align-items: center; }
.fort-lbl { font-size: 13px; font-weight: 600; }
.otp { display: flex; gap: 8px; }
.otp input { flex: 1; min-width: 0; height: 56px; text-align: center; font-family: var(--df-font-mono); font-size: 24px; font-weight: 600; border: 1px solid var(--df-border); border-radius: 8px; background: #fff; color: var(--df-text); outline: none; padding: 0; }
.otp input:focus { border: 2px solid var(--df-secondary); box-shadow: var(--df-shadow-glow); }
.qr-box { display: grid; place-items: center; padding: 16px; border-radius: 12px; background: #fff; border: 1px solid var(--df-border-soft); }
.qr-box svg { width: min(100%, 280px); height: auto; display: block; }
.manual .kg { display: inline-block; margin-right: .6em; }
.manual .kg:last-child { margin-right: 0; }
.manual { font-family: var(--df-font-mono); font-size: 14px; font-weight: 600; letter-spacing: 0.08em; padding: 12px 14px; border-radius: 8px; background: var(--df-bg-muted); word-break: break-all; }
.codes { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; }
.codes div { font-family: var(--df-font-mono); font-size: 14px; font-weight: 600; letter-spacing: 0.04em; padding: 12px; border-radius: 8px; background: var(--df-bg-muted); text-align: center; user-select: all; }

/* ---------- administración de usuarios ---------- */
.nav { display: flex; flex-wrap: wrap; gap: 4px; }
.nav button { background: none; border: 0; font: 600 14px var(--df-font-body); color: var(--df-text-3); padding: 8px 14px; border-radius: 8px; cursor: pointer; min-height: 40px; }
.nav button[aria-current="page"] { background: var(--df-primary-soft); color: var(--df-primary-deep); }
.nav button:hover:not([aria-current="page"]) { background: var(--df-bg-muted); color: var(--df-text); }
.user-row { display: flex; flex-wrap: wrap; gap: 16px 20px; align-items: center; padding: 16px 0; border-top: 1px solid var(--df-border-soft); }
.user-row:first-child { border-top: 0; }
.user-who { flex: 1 1 260px; display: flex; gap: 14px; align-items: center; min-width: 0; }
.avatar { flex: none; width: 40px; height: 40px; border-radius: 999px; background: var(--df-bg-muted); display: grid; place-items: center; color: var(--df-text-2); font-family: var(--df-font-mono); font-weight: 700; }
.user-who .n { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.user-who b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; }
.user-who span { font-size: 13px; color: var(--df-text-3); overflow: hidden; text-overflow: ellipsis; }
.tags { flex: 1 1 200px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tag { height: 24px; padding: 0 10px; border-radius: 999px; display: inline-flex; align-items: center; font-family: var(--df-font-mono); font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; background: var(--df-primary-soft); color: var(--df-primary-deep); }
.tag.ok { background: #E4F3EC; color: #1F6F4D; } .tag.warn { background: #FFF7E3; color: #7A5200; } .tag.off { background: var(--df-border-soft); color: var(--df-text-2); }
.user-last { flex: 1 1 130px; display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: var(--df-text-2); }
.temp-card { border-color: var(--df-primary-soft); }
.temp-pw { font-family: var(--df-font-mono); font-size: 15px; font-weight: 600; padding: 12px 14px; border-radius: 8px; background: var(--df-bg-muted); user-select: all; word-break: break-all; }
.audit { display: flex; flex-direction: column; font-size: 13px; }
.audit div { display: flex; flex-wrap: wrap; gap: 4px 16px; padding: 10px 0; border-top: 1px solid var(--df-border-soft); }
.audit div:first-child { border-top: 0; }
.audit time { font-family: var(--df-font-mono); color: var(--df-text-3); flex: 0 0 150px; }
.audit b { flex: 0 0 170px; font-family: var(--df-font-mono); font-size: 12px; }
.audit span { flex: 1 1 200px; color: var(--df-text-2); overflow-wrap: anywhere; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Asistente de configuración inicial */
.pasos { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 14px; color: var(--df-text-2); }
.pasos li { display: flex; align-items: center; gap: 8px; }
.pasos b { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--df-bg-muted); font-family: var(--df-font-mono); font-size: 12px; color: var(--df-text); }
.input.mono { font-family: var(--df-font-mono); letter-spacing: .08em; text-transform: uppercase; }

/* Ayuda */
.ay-buscar { position: relative; max-width: 640px; }
.ay-buscar > .ic { position: absolute; left: 14px; top: 15px; color: var(--df-text-3); pointer-events: none; }
.ay-buscar .input { padding-left: 42px; }
.ay-layout { display: flex; flex-wrap: wrap; gap: 24px 32px; align-items: flex-start; }
.ay-nav { flex: 1 1 240px; max-width: 300px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 16px; }
.ay-nav .lbl { padding: 0 14px 6px; }
.ay-tema { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px; border-radius: 8px; color: var(--df-text-2); font-weight: 500; font-size: 14px; text-decoration: none; }
.ay-tema:hover { background: var(--df-bg-muted); color: var(--df-text); }
.ay-tema[aria-current="page"] { background: #fff; color: var(--df-text); font-weight: 600; box-shadow: var(--df-shadow-sm, 0 1px 2px rgba(17,24,39,.06)), inset 3px 0 0 var(--df-primary); }
.ay-tag { margin-left: auto; height: 20px; padding: 0 8px; border-radius: 999px; background: var(--df-primary-soft); color: var(--df-primary-deep); display: inline-flex; align-items: center; font-family: var(--df-font-mono); font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.ay-main { flex: 2 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.ay-art { display: flex; flex-direction: column; gap: 16px; padding: 32px; }
.ay-art h2 { font-size: 24px; margin: 0; }
.ay-intro { margin: 0; color: var(--df-text-2); line-height: 1.6; }
.ay-pasos { display: flex; flex-direction: column; gap: 20px; }
.ay-paso { display: flex; gap: 16px; align-items: flex-start; }
.ay-paso .n { flex: none; width: 32px; height: 32px; border-radius: 999px; background: var(--df-primary-soft); color: var(--df-primary-deep); display: grid; place-items: center; font-family: var(--df-font-mono); font-size: 13px; font-weight: 700; }
.ay-paso b { display: block; font-size: 15px; margin-bottom: 4px; } .ay-paso span { font-size: 14px; line-height: 1.6; color: var(--df-text-2); }
.ay-lista { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 12px; font-size: 14px; line-height: 1.6; color: var(--df-text-2); }
.ay-lista b { color: var(--df-text); }
.ay-faq details { border-top: 1px solid var(--df-border-soft); }
.ay-faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 44px; padding: 14px 0; font-weight: 600; font-size: 15px; line-height: 1.4; }
.ay-faq summary::-webkit-details-marker { display: none; }
.ay-faq summary .ic { transition: transform var(--df-dur-fast, .15s); color: var(--df-text-3); }
.ay-faq details[open] summary .ic { transform: rotate(180deg); }
.ay-faq p { margin: 0; padding: 0 0 16px; font-size: 14px; line-height: 1.6; color: var(--df-text-2); }
.ay-faq code { font-family: var(--df-font-mono); font-size: 12.5px; background: var(--df-bg-muted); padding: 2px 6px; border-radius: 6px; word-break: break-word; }
.modal .box.ayuda-box { max-width: 460px; max-height: calc(100dvh - 32px); overflow-y: auto; align-items: stretch; text-align: left; }
.ay-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.ay-head h3 { margin: 4px 0 0; font-size: 22px; }
.ay-item { display: flex; gap: 14px; align-items: flex-start; }
.ay-ico { flex: none; width: 36px; height: 36px; border-radius: 10px; background: var(--df-primary-soft); color: var(--df-primary-deep); display: grid; place-items: center; }
.ay-item b { display: block; font-size: 15px; margin-bottom: 2px; } .ay-item span { font-size: 14px; line-height: 1.55; color: var(--df-text-2); }
@media (max-width: 760px) {
  .ay-nav { position: static; flex: 1 1 100%; max-width: none; flex-direction: row; flex-wrap: wrap; gap: 8px; }
  .ay-nav .lbl { flex: 1 1 100%; padding: 0; }
  .ay-tema { border: 1px solid var(--df-border); background: #fff; }
  .ay-tema[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--df-primary); }
  .ay-art { padding: 20px; }
}

/* Contexto por mesa */
.ctx-mesas { display: flex; flex-direction: column; margin-top: 8px; border-bottom: 1px solid var(--df-border-soft); }
.ctx-mesa { border-top: 1px solid var(--df-border-soft); }
.ctx-mesa summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; font-weight: 600; font-size: 15px; }
.ctx-mesa summary::-webkit-details-marker { display: none; }
.ctx-tit { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ctx-tit .ic { color: var(--df-text-3); transition: transform var(--df-dur-fast, .15s); transform: rotate(-90deg); flex: none; }
.ctx-mesa[open] .ctx-tit .ic { transform: none; }
.ctx-nom { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ctx-res { font-size: 13px; font-weight: 500; color: var(--df-text-3); white-space: nowrap; }
.ctx-cuerpo { padding: 8px 0 16px; gap: 20px; }
.ctx-pie { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.ctx-cuenta { font-family: var(--df-font-mono); font-size: 12px; color: var(--df-text-3); }
.ctx-cuenta.over { color: var(--df-danger); }
.ctx-resumen { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 12px; background: rgba(17,24,39,0.22); font-size: 13px; line-height: 1.5; color: var(--df-ink-1, #E8ECF3); }
.ctx-resumen .ic { margin-top: 1px; color: #F6C9AE; flex: none; }
.ctx-resumen.vacio { background: transparent; border: 1px dashed rgba(232,236,243,0.28); color: rgba(232,236,243,0.72); align-items: center; }
.modal .box.ctx-modal { max-width: 560px; max-height: calc(100dvh - 32px); overflow-y: auto; align-items: stretch; text-align: left; }
.tema-mesa { display: flex; flex-direction: column; gap: 12px; }
.tema-mesa summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
.tema-mesa summary::-webkit-details-marker { display: none; }
.tema-mesa .tm-cab { display: flex; align-items: center; gap: 10px; }
.tema-mesa .tm-ico { width: 32px; height: 32px; border-radius: 10px; background: var(--df-primary-soft); color: var(--df-primary-deep); display: grid; place-items: center; flex: none; }
.tema-mesa .chev { color: var(--df-text-3); transition: transform var(--df-dur-fast, .15s); }
.tema-mesa[open] .chev { transform: rotate(180deg); }
.tema-mesa p { margin: 12px 0 0; font-size: 15px; line-height: 1.55; }
.tema-mesa ul { margin: 12px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.tema-mesa li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.5; color: var(--df-text-2); }
.tema-mesa li::before { content: ""; flex: none; margin-top: 7px; width: 6px; height: 6px; border-radius: 999px; background: var(--df-primary); }

/* Fila de acciones de la tarjeta de mesa: una sola línea (copiar enlace flexible + iconos fijos) */
.mesa-acciones { display: flex; flex-wrap: nowrap; align-items: center; gap: 8px; }
.mesa-acciones [data-copiar] { flex: 1 1 auto; min-width: 0; justify-content: center; padding: 0 10px; white-space: nowrap; }
.mesa-acciones [data-copiar] span { overflow: hidden; text-overflow: ellipsis; }
.mesa-acciones .btn-icon { flex: none; }

/* Etiqueta (tooltip) de los botones de solo icono: con mouse y con foco de teclado. Usa data-tip o, si no hay, aria-label. */
.btn-icon { position: relative; }   /* .pw .eye ya es absolute: también sirve de referencia para su etiqueta */
.btn-icon[aria-label]::after, .btn-icon[data-tip]::after, .pw .eye[aria-label]::after,
.btn-icon[aria-label]::before, .btn-icon[data-tip]::before, .pw .eye[aria-label]::before { opacity: 0; visibility: hidden; pointer-events: none; position: absolute; z-index: 60; transition: opacity var(--df-dur-fast, .14s) ease 0s, visibility 0s linear var(--df-dur-fast, .14s); }
.btn-icon[aria-label]::after, .pw .eye[aria-label]::after { content: attr(aria-label); }
.btn-icon[data-tip]::after { content: attr(data-tip); }
.btn-icon[aria-label]::after, .btn-icon[data-tip]::after, .pw .eye[aria-label]::after {
  left: 50%; bottom: calc(100% + 10px); transform: translateX(-50%); white-space: nowrap; background: #111827; color: #fff;
  border: 1px solid rgba(255,255,255,0.22); border-radius: 8px; padding: 7px 10px; font: 500 12px/1.2 var(--df-font-body); letter-spacing: 0; text-transform: none; box-shadow: 0 6px 18px rgba(17,24,39,0.35); }
.btn-icon[aria-label]::before, .btn-icon[data-tip]::before, .pw .eye[aria-label]::before {
  content: ""; left: 50%; bottom: calc(100% + 6px); width: 8px; height: 8px; background: #111827; transform: translateX(-50%) rotate(45deg);
  border-right: 1px solid rgba(255,255,255,0.22); border-bottom: 1px solid rgba(255,255,255,0.22); }
/* El último botón de una fila no se sale de la tarjeta: la etiqueta se ancla a su borde derecho */
.mesa-acciones .btn-icon:last-child::after { left: auto; right: 0; transform: none; }
.mesa-acciones .btn-icon:last-child::before { left: auto; right: 15px; transform: rotate(45deg); }
@media (hover: hover) {
  .btn-icon:hover::after, .btn-icon:hover::before, .pw .eye:hover::after, .pw .eye:hover::before { opacity: 1; visibility: visible; transition-delay: 350ms, 350ms; }
}
.btn-icon:focus-visible::after, .btn-icon:focus-visible::before, .pw .eye:focus-visible::after, .pw .eye:focus-visible::before { opacity: 1; visibility: visible; transition-delay: 0s, 0s; }

/* Informes de la sesión (descargas + correo) */
.informes { display: flex; flex-direction: column; gap: 16px; margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--df-border-soft); }
.informes h3 { margin: 0; }
.informes-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.informe-card { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 20px; border: 1px solid var(--df-border-soft); border-radius: 14px; background: #fff; }
.informe-card .ic { color: var(--df-primary-deep); }
.informe-card b { font-size: 16px; } .informe-card span { font-size: 13px; line-height: 1.55; color: var(--df-text-2); }
.informe-card .btn { text-decoration: none; margin-top: 4px; }
.informes-correo { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding: 16px; border-radius: 12px; background: var(--df-bg-muted); }
.informes-correo > div { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.55; color: var(--df-text-2); }
.informes-correo b { color: var(--df-text); word-break: break-word; }
.texto-consolidados { margin-top: 16px; }
.texto-consolidados summary { cursor: pointer; font-weight: 600; font-size: 14px; min-height: 44px; display: flex; align-items: center; }

/* ---- Un solo grabador por mesa: nombre, «Unirme», sala en vivo ---- */
.sug { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-sel { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--df-border); background: #fff; color: var(--df-text); font: 500 14px/1 var(--df-font-sans); cursor: pointer; transition: all var(--df-dur-fast); }
.chip-sel:hover { border-color: var(--df-secondary); }
.chip-sel.on { background: var(--df-primary-soft, #F6C9AE); border-color: var(--df-secondary); color: #8A4520; }
.chip-sel:focus-visible { box-shadow: var(--df-shadow-glow); outline: none; }
.persona { display: flex; align-items: center; gap: 12px; min-height: 44px; }
.persona .av { flex: none; width: 36px; height: 36px; border-radius: 999px; background: var(--df-border-soft); color: var(--df-text-2); display: grid; place-items: center; font-family: var(--df-font-mono); font-size: 12px; font-weight: 600; }
.persona .av.rec { background: #F6C9AE; color: #8A4520; }
.persona .p-nom { flex: 1; font-size: 15px; font-weight: 500; overflow-wrap: anywhere; }
.persona .p-est { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--df-text-3); white-space: nowrap; }
.persona .p-est.bad { color: var(--df-danger); }
.persona .dot { width: 8px; height: 8px; border-radius: 999px; background: var(--df-danger); }
.timer.sm { font-size: 34px; }
.rec-center.tenue .timer { opacity: .55; }
.takeover { display: flex; flex-direction: column; gap: 14px; padding: 18px; border-radius: 16px; background: #FFF7E3; border: 1px solid #F0D9A0; color: #7A5A12; font-size: 15px; line-height: 1.5; }
.takeover > svg { align-self: flex-start; }
.takeover small { font-size: 12px; line-height: 1.5; }
.mesa-grabador { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 12px; background: rgba(17,24,39,0.22); font-size: 13px; color: var(--df-ink, #E8ECF3); }
.mesa-grabador .mg-cab { display: flex; align-items: center; gap: 8px; }
.mesa-grabador .mg-fila { display: flex; align-items: center; gap: 8px; }
.mesa-grabador .mg-fila .dot { width: 8px; height: 8px; border-radius: 999px; background: #F28B8B; }
.mesa-grabador .mg-fila.warn { color: #F0BE62; }
.mesa-grabador .mg-unidos { opacity: .85; }

/* ---- Teléfonos de apoyo (capa 2a) ---- */
.badge.apoyo { background: #FFF1D6; color: #8A5A00; }
.meter.apoyo i.on { background: #E0A23A; }
.banner.ok-relevo { background: #E4F3EC; color: #1F6F4D; border: 1px solid #B9E0CB; font-size: 15px; }
.banner.nota-apoyo { background: #fff; color: var(--df-text-2); border-color: var(--df-border-soft); }
.banner.nota-apoyo b { color: var(--df-text); }
.mesa-grabador .mg-fila .dot.apoyo { background: #F0BE62; }
.mesa-respaldo { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 12px; background: rgba(111,211,165,0.14); font-size: 13px; line-height: 1.5; color: #BFF0D8; }

/* ---- Identificar quién habla (muestras de voz opcionales) ---- */
.opcion-voz { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--df-border-soft); background: #fff; }
.opcion-voz .hint .ic { vertical-align: -2px; }
.voz-modal { display: flex; flex-direction: column; gap: 14px; max-width: 600px; }
.voz-punto { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; line-height: 1.55; color: var(--df-text-2); }
.voz-punto b { color: var(--df-text); }
.voz-punto .vp-ico { flex: none; width: 32px; height: 32px; border-radius: 10px; background: #F6C9AE; color: #8A4520; display: grid; place-items: center; }
.voz-mia { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 14px; border-radius: 12px; background: #fff; border: 1px solid var(--df-border-soft); font-size: 13px; line-height: 1.5; color: var(--df-text-2); }
.voz-mia span { flex: 1; min-width: 180px; }
.banner.ok-voz { background: #E4F3EC; color: #1F6F4D; border: 1px solid #B9E0CB; }
.modal .box.voz-modal { max-width: 600px; max-height: calc(100dvh - 32px); overflow-y: auto; align-items: stretch; text-align: left; gap: 14px; }
/* la casilla de verificación también usa .box: dentro de un modal no debe heredar el estilo de la caja del modal */
.modal .check .box { width: 28px; height: 28px; padding: 0; max-width: none; border-radius: 8px; box-shadow: none; display: grid; place-items: center; gap: 0; flex: none; background: #fff; border: 1.5px solid var(--df-border-strong); }
.modal .check input:checked + .box { background: var(--df-secondary); border-color: var(--df-secondary); }

/* ---- Seguridad S2: audio por el enlace y descargas del facilitador ---- */
.aviso-guardado { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; line-height: 1.55; color: var(--df-text-2); }
.aviso-guardado b { color: var(--df-text); }
.lista-mono { font-family: var(--df-font-mono); font-size: 13px; line-height: 1.8; color: var(--df-text-2); }
.btn-grabs { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px; border-radius: 8px; border: 1px solid rgba(232,236,243,0.4); background: transparent; color: var(--df-ink, #E8ECF3); font: 600 13px/1 var(--df-font-sans); cursor: pointer; }
.btn-grabs:hover { border-color: #fff; }
.modal .box.grabs-modal { max-width: 640px; max-height: calc(100dvh - 32px); overflow-y: auto; align-items: stretch; text-align: left; gap: 12px; }
.grab-fila { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 0; border-bottom: 1px solid var(--df-border-soft); }
.grab-fila .gf-info { flex: 1; min-width: 180px; display: flex; flex-direction: column; gap: 4px; }
.grab-fila .gf-info b { display: flex; gap: 8px; align-items: center; font-size: 15px; }
.grab-fila .gf-info span { font-family: var(--df-font-mono); font-size: 12px; color: var(--df-text-2); }
.grab-fila audio { width: 100%; height: 36px; }
.rol-pill { font-size: 11px; padding: 2px 8px; border-radius: 999px; background: var(--df-bg-muted); color: var(--df-text-2); font-weight: 500; }
.rol-pill.apoyo { background: #FFF1D6; color: #8A5A00; }
.grab-fila .gf-audio { flex: 1 1 100%; }

/* ---- Seguridad S3: aviso de inactividad y estados de cuenta ---- */
.tag.bad { background: #FBECEC; color: #9C2B2B; }
.modal .box.sigues-ahi { max-width: 400px; gap: 12px; }
.sigues-ahi .sa-ico { width: 52px; height: 52px; border-radius: 14px; background: #F6C9AE; color: #8A4520; display: grid; place-items: center; }
.sigues-ahi .sa-cuenta { font-family: var(--df-font-mono); font-size: 40px; font-weight: 500; }
.sigues-ahi p { margin: 0; color: var(--df-text-2); }

/* ---- S4: retención y eliminación de sesiones ---- */
.btn-danger-solid { background: #C0392B; color: #fff; border-color: #C0392B; }
.btn-danger-solid:not(:disabled):hover { background: #A93226; border-color: #A93226; }
.btn-danger-solid:disabled { opacity: .45; }
.retencion-pie, .retencion-abierta { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin: 0; }
.modal .box.elim-modal { max-width: 520px; max-height: calc(100dvh - 32px); overflow-y: auto; text-align: left; display: flex; flex-direction: column; align-items: stretch; gap: 14px; }
.modal .box.elim-modal .field, .modal .box.elim-modal .input { width: 100%; }
.elim-modal h3 { margin: 0; font-size: 22px; }
.elim-ico { align-self: flex-start; width: 48px; height: 48px; border-radius: 14px; background: #FBECEC; color: var(--df-danger); display: grid; place-items: center; }
.elim-punto { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.55; color: var(--df-text-2); }
.elim-punto > svg { flex: none; margin-top: 2px; }
.elim-punto.warn { color: #7A5200; }

/* ---- Historial de sesiones (pestaña «Sesiones») ---- */
.linkbtn.volver { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: var(--df-text-2); padding: 8px 0; align-self: flex-start; }
.linkbtn.volver:hover { color: var(--df-text); }
.hist-cab { align-items: flex-end; }
.hist-herr { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hist-busca { flex: 1 1 280px; display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px; border: 1px solid var(--df-border); border-radius: 8px; background: #fff; color: var(--df-text-3); box-sizing: border-box; }
.hist-busca:focus-within { border-color: #ED7B46; box-shadow: 0 0 0 3px rgba(237,123,70,.18); }
.hist-busca input { flex: 1; min-width: 0; border: 0; outline: 0; font: inherit; font-size: 14px; color: var(--df-text); background: transparent; min-height: 42px; }
.hist-filtros { display: flex; flex-wrap: wrap; gap: 8px; }
.hist-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--df-border); background: #fff; color: var(--df-text-2); font: 600 13px/1 inherit; font-family: inherit; cursor: pointer; }
.hist-chip span { opacity: .7; }
.hist-chip[aria-pressed="true"] { border-color: #ED7B46; background: #FFF4EE; color: #C76A3A; }
.hist-lista { padding: 0; overflow: hidden; }
.hist-fila { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding: 16px 20px; border-bottom: 1px solid var(--df-border-soft, #ECEDF0); }
.hist-fila:last-child { border-bottom: 0; }
.hist-info { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.hist-tit { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.hist-tit b { font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }
.hist-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--df-text-2); }
.hist-det { font-size: 12px; color: var(--df-text-3); overflow-wrap: anywhere; }
.hist-vivo { display: inline-flex; align-items: center; gap: 6px; color: #9C2B2B; }
.hist-vivo i { width: 8px; height: 8px; border-radius: 999px; background: var(--df-danger); }
.hist-elim { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--df-text-3); }
.hist-acc { display: flex; gap: 8px; flex: none; }
.hist-est { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.hist-est.curso { background: #EEF3FD; color: #2A4F95; } .hist-est.proc { background: #FFF7E3; color: #7A5200; }
.hist-est.listo { background: #E6F4EC; color: #1F6F4D; } .hist-est.error { background: #FBECEC; color: #9C2B2B; }
.hist-vacio { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 48px 24px; text-align: center; color: var(--df-text-2); }
.hist-vacio b { font-size: 17px; color: var(--df-text); }
.hist-vacio > span:not(.hv-ico) { max-width: 440px; line-height: 1.55; font-size: 14px; }
.hv-ico { width: 56px; height: 56px; border-radius: 16px; background: #FFF4EE; color: #C76A3A; display: grid; place-items: center; }
.hist-cab .btn span, .hist-cab #histDias { color: inherit; font-size: inherit; line-height: inherit; }

/* ---- Menú de la cuenta: avatar con iniciales ---- */
.cuenta { position: relative; }
.cuenta-btn { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 4px 6px 4px 4px; border: 0; border-radius: 999px; background: transparent; cursor: pointer; color: var(--df-text-3); font-family: inherit; }
.cuenta-btn:hover, .cuenta-btn[aria-expanded="true"] { background: var(--df-bg-muted); }
.cuenta-btn[aria-expanded="true"] .cuenta-flecha { transform: rotate(180deg); }
.cuenta-flecha { display: inline-flex; transition: transform var(--df-dur-fast, .14s) ease; }
.av-cuenta { width: 36px; height: 36px; border-radius: 999px; background: #FFF4EE; color: #C76A3A; border: 1px solid #F6C9AE; display: grid; place-items: center; font: 600 14px/1 var(--df-font-body); letter-spacing: .02em; box-sizing: border-box; flex: none; transition: box-shadow var(--df-dur-fast, .14s), border-color var(--df-dur-fast, .14s); }
.av-cuenta.grande { width: 44px; height: 44px; font-size: 17px; }
.cuenta-btn:hover .av-cuenta, .cuenta-btn:focus-visible .av-cuenta, .cuenta-btn[aria-expanded="true"] .av-cuenta { border-color: #ED7B46; box-shadow: 0 0 0 3px rgba(237,123,70,.28); }
.cuenta-btn:focus-visible { outline: none; }
.cuenta-menu { position: absolute; top: calc(100% + 8px); right: 0; z-index: 70; width: min(280px, calc(100vw - 24px)); background: #fff; border: 1px solid var(--df-border-soft); border-radius: 12px; box-shadow: 0 12px 32px rgba(17,24,39,.14); padding: 8px; box-sizing: border-box; }
.cm-id { display: flex; gap: 12px; align-items: center; padding: 10px 10px 12px; }
.cm-txt { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.cm-txt b { font-size: 15px; font-weight: 600; color: var(--df-text); overflow-wrap: anywhere; }
.cm-mail { font-size: 13px; color: var(--df-text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-rol { align-self: flex-start; margin-top: 3px; height: 22px; display: inline-flex; align-items: center; padding: 0 9px; border-radius: 999px; background: var(--df-bg-muted); color: var(--df-text-2); font-family: var(--df-font-mono); font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.cm-info { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px 10px; font-size: 12px; line-height: 1.45; color: var(--df-text-3); }
.cm-info svg { flex: none; margin-top: 1px; }
.cm-sep { height: 1px; background: var(--df-border-soft); margin: 0 4px 6px; }
.cm-salir { display: flex; width: 100%; align-items: center; gap: 10px; min-height: 44px; padding: 0 10px; border: 0; border-radius: 8px; background: none; color: #9C2B2B; font: 600 14px/1 var(--df-font-body); cursor: pointer; text-align: left; }
.cm-salir:hover, .cm-salir:focus-visible { background: #FBECEC; outline: none; }
/* Teléfono: cabecera en una sola fila (marca · pestañas · avatar) */
@media (max-width: 480px) {
  .app-header { flex-wrap: nowrap; padding: 8px 12px; gap: 8px; min-height: 60px; }
  .app-header .wm { font-size: 15px; }
  .header-right { flex-wrap: nowrap; gap: 4px; min-width: 0; }
  .nav { flex-wrap: nowrap; gap: 2px; }
  .nav button { padding: 8px 8px; font-size: 13px; white-space: nowrap; }
  .cuenta-flecha { display: none; }
  .cuenta-btn { padding: 4px; }
}
.icon-tile.warn { background: #FFF7E3; color: #7A5200; }

/* ---- Invitaciones (Usuarios) ---- */
.tag.info { background: #EEF3FD; color: #2A4F95; }
.inv-card { display: flex; flex-direction: column; gap: 12px; }
.inv-card.ok { flex-direction: row; gap: 14px; align-items: flex-start; border-color: #BFE3CF; }
.inv-card.warn { border-color: #F0D9A8; }
.inv-top { display: flex; gap: 14px; align-items: flex-start; }
.inv-card .grow { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.inv-card strong { font-size: 15px; overflow-wrap: anywhere; } .inv-card .grow span { font-size: 14px; line-height: 1.55; color: var(--df-text-2); }
.inv-ico { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: #E6F4EC; color: #1F6F4D; }
.inv-card.warn .inv-ico { background: #FFF7E3; color: #7A5200; }
.inv-enlace { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.inv-enlace code { flex: 1 1 260px; min-width: 0; font-family: var(--df-font-mono); font-size: 13px; padding: 12px 14px; border-radius: 8px; background: var(--df-bg-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar .btn span { color: inherit; font-size: inherit; line-height: inherit; }   /* los botones dentro de .bar no heredan el gris de .bar span */
