/* Tokens y tema: ver el bloque «Estilo JRV Consulting» al final de este archivo. */
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.55 var(--font-body); background-image: var(--glow); background-repeat: no-repeat; background-attachment: fixed; }
h1, h2, h3 { line-height: 1.25; margin: 0; }
h1 { font-size: 1.5rem; } h2 { font-size: 1.15rem; } h3 { font-size: 1rem; }
a { color: var(--brand); }
.skip { position: absolute; left: -999px; } .skip:focus { left: 8px; top: 8px; background: var(--surface); padding: 8px; z-index: 99; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.shell { display: grid; grid-template-columns: 220px 1fr; grid-template-rows: auto auto 1fr; min-height: 100vh; }
.devbar { grid-column: 1 / -1; background: var(--warn-soft); color: var(--warn); padding: 6px 16px; font-size: .82rem; }
.topbar { grid-column: 1 / -1; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 10px 16px; background: var(--surface); border-bottom: 1px solid var(--border); }
.brand { font-weight: 700; display: flex; align-items: center; gap: 8px; margin-right: auto; }
.brand-mark { width: 26px; height: 26px; border-radius: 7px; background: var(--brand); display: inline-block; }
.who { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.who label { font-size: .8rem; color: var(--muted); }
.nav { background: var(--surface); border-right: 1px solid var(--border); padding: 12px; display: flex; flex-direction: column; gap: 4px; }
.nav a { padding: 8px 12px; border-radius: 8px; color: var(--text); text-decoration: none; }
.nav a:hover { background: var(--surface-2); }
.nav a[aria-current="page"] { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
main { padding: 24px; max-width: 1100px; width: 100%; }
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  .nav { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--border); }
  main { padding: 16px; }
}

.page-head { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; margin-bottom: 18px; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.muted { color: var(--muted); } .small { font-size: .85rem; } .mono { font-family: ui-monospace, Menlo, monospace; font-size: .82rem; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

button, .btn { font: inherit; border: 1px solid var(--border); background: var(--surface); color: var(--text); padding: 7px 14px; border-radius: 8px; cursor: pointer; }
button:hover:not(:disabled) { background: var(--surface-2); }
button:disabled { opacity: .55; cursor: not-allowed; }
.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); font-weight: 600; }
.primary:hover:not(:disabled) { background: var(--brand); filter: brightness(1.08); }
.danger { color: var(--bad); border-color: var(--bad); }
.icon-btn { padding: 2px 9px; border: 0; background: transparent; }
input, select, textarea { font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; width: 100%; }
textarea { min-height: 96px; resize: vertical; }
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.field label { font-weight: 600; font-size: .88rem; }
.hint { margin: 0; color: var(--muted); font-size: .8rem; }
.checks { display: flex; gap: 14px; flex-wrap: wrap; }
.checks label { display: flex; gap: 6px; align-items: center; font-weight: 400; }
.checks input { width: auto; }
.form-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.filters input { max-width: 280px; } .filters select { max-width: 200px; }

.badge { display: inline-block; padding: 1px 9px; border-radius: 99px; font-size: .75rem; font-weight: 600; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.badge-ok { background: var(--ok-soft); color: var(--ok); } .badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-bad { background: var(--bad-soft); color: var(--bad); } .badge-info { background: var(--info-soft); color: var(--info); }
.badge-brand { background: var(--brand-soft); color: var(--brand); }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.table-wrap { overflow-x: auto; padding: 0; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 16px; overflow-x: auto; }
.tabs button { border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: none; }
.tabs button[aria-selected="true"] { border-bottom-color: var(--brand); color: var(--brand); font-weight: 600; }

.empty { text-align: center; padding: 36px 16px; color: var(--muted); background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius); }
.empty p { margin: 6px 0 0; }
.notice { padding: 10px 14px; border-radius: 8px; background: var(--info-soft); color: var(--info); font-size: .88rem; }
.notice.warn { background: var(--warn-soft); color: var(--warn); }
.check-list { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 4px; }
.check-list li { display: flex; gap: 8px; align-items: center; font-size: .86rem; }
.hit { border-left: 3px solid var(--brand); padding-left: 12px; }
.hit p { margin: 4px 0; white-space: pre-wrap; }
.skeleton { height: 90px; border-radius: var(--radius); background: linear-gradient(90deg, var(--surface-2), var(--surface), var(--surface-2)); background-size: 200% 100%; animation: sk 1.2s linear infinite; }
@keyframes sk { to { background-position: -200% 0; } }

.modal { border: 1px solid var(--border); border-radius: 14px; padding: 0; background: var(--surface); color: var(--text); width: min(520px, calc(100vw - 24px)); box-shadow: 0 20px 60px rgb(0 0 0 / .35); }
.modal.wide { width: min(760px, calc(100vw - 24px)); }
.modal::backdrop { background: rgb(10 12 25 / .55); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.modal-body { padding: 18px; max-height: 75vh; overflow: auto; }

#toasts { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 100; max-width: min(420px, calc(100vw - 32px)); }
.toast { padding: 10px 14px; border-radius: 8px; background: var(--ok-soft); color: var(--ok); box-shadow: var(--shadow); border: 1px solid var(--border); }
.toast-error { background: var(--bad-soft); color: var(--bad); }
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; } }
.grid > .empty { grid-column: 1 / -1; }
a.card { text-decoration: none; color: inherit; display: block; }
a.card:hover { border-color: var(--brand); }
.who select { width: auto; max-width: 300px; }
.nav, main, .topbar { min-width: 0; }
.card > .actions { margin-top: 12px; }

/* ---- Tema de la plataforma ---- */
h1, h2, h3, .brand { font-family: var(--font-head); }
h1 { font-size: clamp(1.6rem, 3.2vw, 2.15rem); font-weight: 700; letter-spacing: -.02em; line-height: 1.12; }
h2 { font-weight: 700; letter-spacing: -.01em; } h3 { font-weight: 600; }
.topbar { background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); padding: 12px 24px; }
.brand { flex-direction: column; align-items: flex-start; gap: 1px; line-height: 1.1; }
.wordmark { font-size: 1.25rem; font-weight: 700; letter-spacing: -.02em; }
.tagline, main[data-section] .page-head h1::before { text-transform: uppercase; letter-spacing: .16em; font-weight: 600; }
.tagline { font-size: .62rem; color: var(--muted); }
.devbar { background: var(--warn-soft); border-bottom: 1px solid var(--border); text-align: center; letter-spacing: .02em; }
.nav { background: transparent; padding: 18px 14px; gap: 2px; }
.nav a { border-radius: 8px; color: var(--muted); font-weight: 500; border-left: 2px solid transparent; border-radius: 0 8px 8px 0; }
.nav a:hover { background: var(--surface); color: var(--text); }
.nav a[aria-current="page"] { background: var(--brand-soft); color: var(--text); border-left-color: var(--brand); }
main[data-section] .page-head h1::before { display: block; font-family: var(--font-body); font-size: .7rem; color: var(--brand); margin-bottom: 8px; }
main[data-section="personas"] .page-head h1::before { content: "Catálogo"; }
main[data-section="knowledge"] .page-head h1::before { content: "Conocimiento"; }
main[data-section="team"] .page-head h1::before { content: "Acceso y roles"; }
main[data-section="audit"] .page-head h1::before { content: "Trazabilidad"; }
.card, .empty, .modal { background: var(--surface); border-color: var(--border); box-shadow: var(--shadow); }
.card { border-radius: 8px; }
.empty { border-style: dashed; }
a.card:hover { border-color: var(--brand); transform: translateY(-1px); transition: transform .15s, border-color .15s; }
button, .btn { border: 1px solid var(--btn-border); background: transparent; border-radius: 8px; font-weight: 500; padding: 8px 16px; transition: background .15s, border-color .15s; }
button:hover:not(:disabled) { background: var(--brand-soft); border-color: var(--brand); }
.primary { background: var(--primary-bg); border-color: var(--primary-bg); color: var(--primary-fg); font-weight: 600; }
.primary:hover:not(:disabled) { background: var(--primary-bg); border-color: var(--primary-bg); filter: brightness(1.1); }
.danger { color: var(--bad); border-color: var(--bad); }
.danger:hover:not(:disabled) { background: var(--bad-soft); border-color: var(--bad); }
input, select, textarea { background: var(--input-bg); border-color: var(--border); border-radius: 8px; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px var(--brand-soft); }
th { letter-spacing: .12em; font-size: .7rem; }
tbody tr:hover { background: var(--brand-soft); }
.badge { letter-spacing: .02em; border: 1px solid transparent; }
.badge-neutral { border-color: var(--border); }
.badge-brand { background: var(--brand-soft); color: var(--brand); }
.tabs { border-bottom-color: var(--border); }
.tabs button { color: var(--muted); }
.tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--brand); }
.notice { border: 1px solid var(--border); }
.hit { border-left-color: var(--brand); }
.toast { background: var(--surface-2); color: var(--text); border: 1px solid var(--ok); }
.toast-error { border-color: var(--bad); }
.modal::backdrop { background: rgb(3 12 22 / .7); backdrop-filter: blur(2px); }
.skeleton { background: linear-gradient(90deg, var(--surface), var(--surface-2), var(--surface)); background-size: 200% 100%; }
::selection { background: var(--brand-soft); }

/* Chat y aprobaciones */
main[data-section="chat"] .page-head h1::before { content: "Runtime"; }
main[data-section="approvals"] .page-head h1::before { content: "Herramientas"; }
.chat-layout { display: grid; grid-template-columns: 280px 1fr; gap: 14px; align-items: start; }
@media (max-width: 900px) { .chat-layout { grid-template-columns: 1fr; } }
.conv-link { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 8px; color: var(--text); text-decoration: none; border: 1px solid transparent; }
.conv-link:hover, .conv-link[aria-current="true"] { background: var(--brand-soft); border-color: var(--border); }
.chat-pane { display: flex; flex-direction: column; min-height: 420px; padding: 0; overflow: hidden; }
.thread { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; max-height: 58vh; }
.msg { max-width: 82%; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); }
.msg-user { align-self: flex-end; background: var(--brand-soft); }
.msg-role { font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
.msg-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.cites { margin-top: 8px; }
.composer { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--border); align-items: flex-end; }
.composer textarea { min-height: 52px; max-height: 140px; }

/* M08 · contenido, soporte y avisos */
main[data-section="content"] .page-head h1::before { content: "Editorial"; }
main[data-section="support"] .page-head h1::before { content: "Atención"; }
main[data-section="notifications"] .page-head h1::before { content: "Bandeja"; }
.prose { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6; }

/* M09 · analítica y exportaciones */
main[data-section="analytics"] .page-head h1::before { content: "Métricas"; }
main[data-section="exports"] .page-head h1::before { content: "Datos"; }
.tile-value { margin: 2px 0; font: 600 1.7rem/1.1 var(--font-head); }
.tile-bad { color: var(--bad); } .tile-warn { color: var(--warn); }
.bars { display: grid; gap: 6px; }
.bar-row { display: grid; grid-template-columns: 44px 1fr 64px; gap: 8px; align-items: center; }
.bar-track { background: var(--surface-2); border-radius: 4px; height: 12px; overflow: hidden; }
.bar { background: var(--brand); height: 100%; min-width: 2px; }
.notice.bad { background: var(--bad-soft); color: var(--bad); }

/* Inicio de sesión (OIDC) */
.signin { display: grid; place-items: center; min-height: 100vh; padding: 16px; }
.signin .card { max-width: 420px; width: 100%; }
a.button { display: inline-block; text-align: center; text-decoration: none; padding: 9px 16px; border-radius: 8px; border: 1px solid var(--btn-border); }
a.button.primary { background: var(--primary-bg); color: var(--primary-fg); border-color: transparent; font-weight: 600; }

/* ---- Consola de plataforma y nueva barra lateral ---- */
:root { --pill: 9999px; --card-r: 16px; --side-w: 264px; }
.shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; }
.shell.is-collapsed { --side-w: 72px; }
.sidebar { position: sticky; top: 0; align-self: start; height: 100vh; overflow-y: auto; background: var(--surface); border-right: 1px solid var(--border); padding: 16px 12px; display: flex; flex-direction: column; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 700; padding: 4px 6px; }
.logo-mark { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--brand); color: var(--primary-fg); font-size: .8rem; font-weight: 800; flex: none; }
.brand-name sup { font-size: .55em; margin-left: 2px; }
.side-nav, .workspaces, .ws-nav { display: flex; flex-direction: column; gap: 2px; }
.side-link, .ws-head { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); text-decoration: none; font-weight: 500; text-align: left; cursor: pointer; }
.side-link:hover, .ws-head:hover { background: var(--brand-soft); color: var(--text); }
.side-link[aria-current="page"] { background: var(--brand-soft); color: var(--text); font-weight: 600; }
.side-eyebrow { margin: 8px 10px 2px; font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ws-nav { margin: 2px 0 6px 18px; padding-left: 8px; border-left: 1px solid var(--border); }
.ws-avatar { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; color: #fff; font-size: .7rem; font-weight: 700; flex: none; background: var(--brand); }
.ws-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.ws-role { font-size: .62rem; }
.workspace.open > .ws-head { background: var(--brand-soft); }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
.view-as label { display: flex; align-items: center; gap: 6px; font-size: .78rem; color: var(--muted); margin-bottom: 4px; }
.env-banner { text-align: center; font-size: .68rem; font-weight: 700; letter-spacing: .1em; padding: 4px; border-radius: var(--pill); }
.env-dev { background: var(--warn-soft); color: var(--warn); } .env-staging { background: var(--info-soft); color: var(--info); } .env-prod { background: var(--ok-soft); color: var(--ok); }
.account { display: flex; align-items: center; gap: 8px; }
.avatar { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); font-weight: 700; font-size: .78rem; flex: none; }
.account-text { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.2; } .account-text small { color: var(--muted); }
.icon-link { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; color: var(--muted); } .icon-link:hover { background: var(--brand-soft); color: var(--text); }
.account-actions { gap: 6px; } .account-actions button { flex: 1; padding: 6px 8px; font-size: .78rem; }
.is-collapsed .label, .is-collapsed .brand-name, .is-collapsed .ws-name, .is-collapsed .ws-role, .is-collapsed .side-eyebrow, .is-collapsed .ws-nav, .is-collapsed .view-as, .is-collapsed .account-text, .is-collapsed .account-actions, .is-collapsed .icon-link { display: none; }
.content { min-width: 0; padding: 0 28px 48px; }
.content-top { display: flex; align-items: center; gap: 12px; padding: 14px 0; }
.crumbs { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: .85rem; } .crumbs a { color: var(--muted); display: inline-grid; } .crumb-now { color: var(--text); font-weight: 600; }
.menu-toggle { display: none; padding: 6px; border-radius: 10px; }
.dev-note { margin: 0 0 12px; font-size: .78rem; color: var(--muted); }
main#main { max-width: 1180px; }
.icon { vertical-align: -3px; flex: none; }
.pill, .primary { border-radius: var(--pill); }
.card { border-radius: var(--card-r); }
.block { display: flex; justify-content: center; align-items: center; gap: 6px; width: 100%; text-align: center; }
.admin-head { display: flex; align-items: center; gap: 16px; padding: 20px 24px; margin-bottom: 16px; }
.admin-head > div { flex: 1; } .admin-head h1 { margin: 0; } .admin-head p { margin: 2px 0 0; }
.admin-mark { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--brand-soft); color: var(--brand); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 0 0 16px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--card-r); padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; box-shadow: var(--shadow); }
.kpi-label { font-size: .75rem; color: var(--muted); } .kpi-value { font-size: 1.6rem; font-family: var(--font-head); }
.kpi-warn .kpi-value { color: var(--warn); } .kpi-ok .kpi-value { color: var(--ok); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; margin: 0 0 16px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border: 1px solid var(--btn-border); border-radius: var(--pill); color: var(--text); text-decoration: none; background: var(--surface); cursor: pointer; font-weight: 500; list-style: none; }
.chip:hover { border-color: var(--brand); }
.chip[aria-current="page"] { background: var(--primary-bg); color: var(--primary-fg); border-color: var(--primary-bg); }
.room-title { margin: 8px 0 12px; } .room-title h2 { margin: 0; } .room-title p { margin: 2px 0 0; }
.admin-card { margin-bottom: 16px; } .card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; } .card-head h2 { margin: 0; font-size: 1.05rem; } .card-head p { margin: 2px 0 0; }
.stack.tight { gap: 6px; }
.assign { display: flex; align-items: center; gap: 6px; } .assign-name { min-width: 90px; font-weight: 500; } .assign select { width: auto; padding: 4px 8px; }
.icon-btn { padding: 4px; border-radius: 50%; line-height: 0; }
.narrow { width: 90px; }
ul.plain, ol.plain { margin: 0; padding-left: 20px; }
pre.prompt { white-space: pre-wrap; margin: 0; padding: 12px; border-radius: 10px; background: var(--surface-2); font: .85rem/1.5 ui-monospace, Menlo, monospace; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; } .filters > * { width: auto; min-width: 150px; }
/* Pantalla de acceso */
.signin-page { min-height: 100vh; display: flex; flex-direction: column; background: radial-gradient(60% 50% at 80% 0%, #0D1B2E 0%, #050A14 70%); color: #fff; }
.signin-top { padding: 20px 32px; } .signin-page .wordmark { font-family: var(--font-head); font-weight: 700; letter-spacing: .02em; }
.signin-page .signin { flex: 1; } .signin-card { width: min(440px, 100%); padding: 32px; border-radius: 20px; background: #0D1B2E; border: 1px solid #1A2E45; box-shadow: 0 30px 80px -30px rgb(0 0 0 / .7); }
.signin-card h1 { margin: 0; font-size: 1.8rem; color: #fff; } .signin-card .muted { color: #8899AA; }
.eyebrow { margin: 0; font-size: .7rem; letter-spacing: .16em; color: #00C2FF; font-weight: 700; }
.return-box { display: flex; gap: 8px; align-items: center; padding: 10px 12px; border-radius: 10px; background: #091525; font-size: .85rem; color: #F0F4FF; }
.signin-card .primary { background: #00C2FF; color: #050A14; border-color: #00C2FF; padding: 11px 16px; text-decoration: none; font-weight: 600; }
.divider { display: flex; align-items: center; gap: 10px; color: #8899AA; font-size: .8rem; } .divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: #1A2E45; }
.center { text-align: center; } .signin-card a { color: #00C2FF; }
.signin-foot { padding: 20px; text-align: center; font-size: .78rem; color: #8899AA; }
@media (max-width: 860px) {
  .shell, .shell.is-collapsed { display: block; --side-w: 264px; }
  .sidebar { position: fixed; z-index: 40; inset: 0 auto 0 0; width: var(--side-w); transform: translateX(-105%); transition: transform .2s; }
  .sidebar.open { transform: none; } .is-collapsed .label, .is-collapsed .brand-name, .is-collapsed .ws-name, .is-collapsed .ws-role, .is-collapsed .side-eyebrow, .is-collapsed .ws-nav, .is-collapsed .account-text { display: revert; }
  .content { padding: 0 16px 40px; } .menu-toggle { display: inline-flex; } .collapse { display: none; }
  .admin-head { flex-wrap: wrap; } .assign { flex-wrap: wrap; }
}
td select { width: auto; min-width: 120px; } .table-wrap .row { flex-wrap: nowrap; }
.stack.tight { align-items: flex-start; } td .pill { width: auto; white-space: nowrap; }
.ws-group .side-eyebrow { margin-top: 6px; }
.company-head { margin: 4px 0 12px; } .company-head h1 { margin: 6px 0 0; } .company-head p { margin: 4px 0 0; }
.ws-avatar.big { width: 40px; height: 40px; font-size: .95rem; border-radius: 12px; }
.tab-links { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 16px; overflow-x: auto; }
.tab-link { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; white-space: nowrap; }
.tab-link:hover { color: var(--text); } .tab-link[aria-current="page"] { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }
.link-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.tile { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; color: var(--text); text-decoration: none; background: var(--surface); }
.tile > span { flex: 1; min-width: 0; } .tile small { display: block; } .tile:hover { border-color: var(--brand); }
.empty-slot { border: 1px dashed var(--border); border-radius: 12px; padding: 24px; text-align: center; color: var(--muted); }
dl.details { display: grid; grid-template-columns: max-content 1fr; gap: 8px 24px; margin: 0; } dl.details dt { color: var(--muted); } dl.details dd { margin: 0; }
/* Guía y Markdown */
.guide { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 16px; align-items: start; }
.guide-toc { position: sticky; top: 12px; display: flex; flex-direction: column; gap: 2px; padding: 12px; }
.guide-toc a { padding: 7px 10px; border-radius: 10px; color: var(--muted); text-decoration: none; font-size: .9rem; }
.guide-toc a:hover, .guide-toc a[aria-current="page"] { background: var(--brand-soft); color: var(--text); } .guide-toc a[aria-current="page"] { font-weight: 600; }
.guide-card { padding: 24px 28px; } .guide-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--border); }
.guide-nav a { text-decoration: none; font-weight: 500; } .guide-next { margin-left: auto; }
.md > :first-child { margin-top: 0; } .md h2 { font-size: 1.6rem; margin: 0 0 12px; } .md h3 { font-size: 1.2rem; margin: 28px 0 10px; } .md h4 { font-size: 1.02rem; margin: 20px 0 8px; }
.md p, .md li { line-height: 1.65; } .md ul, .md ol { padding-left: 22px; } .md code { font-family: ui-monospace, Menlo, monospace; font-size: .85em; background: var(--surface-2); padding: 1px 6px; border-radius: 6px; }
.md pre.md-code { overflow-x: auto; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); } .md pre code { background: none; padding: 0; }
.md blockquote { margin: 12px 0; padding: 8px 14px; border-left: 3px solid var(--brand); background: var(--brand-soft); border-radius: 0 10px 10px 0; }
.md .table-wrap { margin: 12px 0; border: 1px solid var(--border); border-radius: 12px; }
.diagram-wrap { margin: 16px 0; padding: 16px; overflow-x: auto; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-2); }
.diagram { display: block; margin: 0 auto; max-width: none; height: auto; }
.dg-node { fill: var(--surface); stroke: var(--brand); stroke-width: 1.4; } .dg-decision { fill: var(--warn-soft); stroke: var(--warn); } .dg-dot { fill: var(--brand); }
.dg-text { fill: var(--text); font: 12px var(--font-body); } .dg-label { fill: var(--muted); font: 11px var(--font-body); paint-order: stroke; stroke: var(--surface-2); stroke-width: 4px; }
.dg-edge { fill: none; stroke: var(--muted); stroke-width: 1.4; } .dg-arrow { fill: var(--muted); }
@media (max-width: 860px) { .guide { grid-template-columns: 1fr; } .guide-toc { position: static; flex-direction: row; overflow-x: auto; } .guide-toc .side-eyebrow { display: none; } .guide-toc a { white-space: nowrap; } .guide-card { padding: 16px; } }
/* Inicio: selección de empresa */
.home-head { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; padding: 28px; margin-bottom: 16px; border-radius: 24px; }
.home-head h1 { margin: 10px 0 6px; font-size: 2rem; } .home-head p { margin: 0; max-width: 46ch; }
.home-stats { display: flex; gap: 12px; flex-wrap: wrap; }
.home-stat { min-width: 110px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); display: flex; flex-direction: column; gap: 4px; box-shadow: var(--shadow); }
.home-stat span { font-size: .8rem; color: var(--muted); } .home-stat strong { font-size: 1.7rem; font-family: var(--font-head); }
.company-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.company-card { display: flex; flex-direction: column; gap: 8px; padding: 20px; border: 1px solid var(--border); border-radius: 22px; background: var(--surface); color: var(--text); text-decoration: none; box-shadow: var(--shadow); transition: transform .15s, border-color .15s; }
.company-card:hover { transform: translateY(-2px); border-color: var(--brand); }
.company-card h3 { margin: 6px 0 0; font-size: 1.1rem; } .company-card p { margin: 0; font-size: .9rem; }
.cc-top { display: flex; justify-content: space-between; align-items: flex-start; color: var(--muted); }
.cc-icon { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); }
.cc-open { margin-top: auto; padding-top: 8px; color: var(--brand); font-weight: 600; font-size: .9rem; }

/* Cuenta y menú contraído */
.account-wrap { position: relative; } .account { width: 100%; padding: 6px; border: 0; border-radius: 12px; background: transparent; text-align: left; } .account:hover { background: var(--brand-soft); }
.foot-icons { display: flex; justify-content: space-around; gap: 4px; }
.account-pop { position: fixed; z-index: 60; width: 260px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 24px 60px -20px rgb(0 0 0 / .55); overflow: hidden; }
.pop-head { display: flex; flex-direction: column; padding: 14px 16px; border-bottom: 1px solid var(--border); overflow-wrap: anywhere; } .pop-head small { color: var(--muted); }
.pop-sec { padding: 8px; } .pop-sec + .pop-sec { border-top: 1px solid var(--border); } .pop-sec .side-eyebrow { margin: 4px 8px 6px; }
.pop-item { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; border-radius: 10px; padding: 9px 10px; background: transparent; text-align: left; }
.seg { display: flex; gap: 2px; padding: 3px; border: 1px solid var(--border); border-radius: var(--pill); background: var(--surface-2); }
.seg button { flex: 1; display: inline-flex; justify-content: center; align-items: center; gap: 4px; padding: 5px 6px; border: 0; border-radius: var(--pill); font-size: .78rem; }
.seg button[aria-pressed="true"] { background: var(--surface); box-shadow: var(--shadow); font-weight: 600; }
.is-collapsed .sidebar { align-items: center; padding: 12px 8px; } .is-collapsed .side-nav, .is-collapsed .workspaces, .is-collapsed .side-foot { align-items: center; width: 100%; }
.is-collapsed .brand { justify-content: center; padding: 0; } .is-collapsed .side-link { justify-content: center; width: 44px; padding: 10px 0; }
.is-collapsed .account { width: auto; padding: 4px; } .is-collapsed .foot-icons { flex-direction: column; align-items: center; } .is-collapsed .icon-link { display: inline-grid; }
.is-collapsed .env-banner { font-size: 0; padding: 4px 8px; } .is-collapsed .env-banner::after { content: attr(data-short); font-size: .65rem; }
.is-collapsed .workspaces { gap: 10px; }
.ws-pill { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 6px; border: 1px solid var(--border); border-radius: 26px; background: var(--surface-2); }
.ws-pill.open { background: var(--brand-soft); border-color: var(--brand); }
.rail-avatar { border: 0; cursor: pointer; width: 36px; height: 36px; padding: 0; }
.rail-div { width: 20px; height: 1px; background: var(--border); }
.rail-link { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: var(--muted); } .rail-link:hover { background: var(--surface); color: var(--text); }
.rail-link[aria-current="page"] { background: var(--primary-bg); color: var(--primary-fg); }
.brand-name { white-space: nowrap; font-size: .9rem; letter-spacing: -.01em; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.signin-card h1 { white-space: nowrap; font-size: clamp(1.3rem, 6vw, 1.8rem); }
/* Marca en una línea con separador, como en la referencia */
:root { --side-w: 300px; }
.brand { gap: 12px; padding: 4px 6px 16px; margin: 0 -12px 4px; padding-left: 18px; padding-right: 18px; border-bottom: 1px solid var(--border); }
.logo-mark { width: 40px; height: 40px; border-radius: 12px; font-size: .95rem; }
.brand-name { font-size: 1.02rem; font-weight: 700; letter-spacing: -.015em; }
.is-collapsed .brand { margin: 0 -8px 4px; padding: 4px 0 14px; justify-content: center; width: calc(100% + 16px); }
.brand { flex-direction: row; align-items: center; justify-content: flex-start; }
.is-collapsed .brand { justify-content: center; }
:root { --side-w: 308px; } .brand { gap: 10px; padding-left: 16px; padding-right: 16px; } .brand-name { font-size: .95rem; overflow: visible; }

/* ---------- Movimiento y visuales (quick wins) ---------- */
@keyframes view-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes toast-in { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateX(24px); } }

#main > div { animation: view-in .28s cubic-bezier(.2, .7, .2, 1) both; }
.rise { animation: rise .45s cubic-bezier(.2, .7, .2, 1) both; animation-delay: var(--i, 0ms); }

.card, a.card, .company-card { transition: transform .18s, border-color .18s, box-shadow .18s; }
.metric:hover, .company-card:hover { transform: translateY(-2px); box-shadow: 0 14px 28px -18px rgb(15 23 42 / .35); border-color: var(--brand); }
button:active:not(:disabled), .btn:active { transform: scale(.97); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.metric { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.metric-main { min-width: 0; }
.metric .tile-value { white-space: nowrap; font-variant-numeric: tabular-nums; }
.metric-visual { flex: none; display: flex; align-items: center; }
.spark { display: block; width: 96px; height: 32px; overflow: visible; }
.spark-line { fill: none; stroke: var(--brand); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; animation: draw .9s .15s ease-out both; vector-effect: non-scaling-stroke; }
.spark-area { fill: var(--brand-soft); stroke: none; animation: fade-in .9s .3s both; }
.ring { display: block; }
.ring-bg { fill: none; stroke: var(--border); stroke-width: 6; }
.ring-fg { fill: none; stroke: var(--brand); stroke-width: 6; stroke-linecap: round; transition: stroke-dasharray .8s cubic-bezier(.2, .7, .2, 1); }
.ring-warn .ring-fg { stroke: var(--warn); } .ring-bad .ring-fg { stroke: var(--bad); }

.bar { transform-origin: left center; animation: grow .6s cubic-bezier(.2, .7, .2, 1) both; }

.toast { display: flex; align-items: center; gap: 8px; animation: toast-in .25s cubic-bezier(.2, .7, .2, 1) both; }
.toast-out { animation: toast-out .2s ease-in both; }

.empty-icon { display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; margin-bottom: 10px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); }
.empty-action { margin-top: 14px; }
.empty strong { display: block; color: var(--text); }

@media (prefers-reduced-motion: reduce) {
  #main > div, .rise, .bar, .spark-line, .spark-area, .toast, .toast-out { animation: none; }
  .card, a.card, .company-card, .ring-fg { transition: none; }
}

/* Nombre unificado: «by JRVConsulting» bajo el nombre de la plataforma */
.brand-name { display: flex; flex-direction: column; line-height: 1.15; white-space: normal; }
.brand-by { font-size: .68rem; font-weight: 500; color: var(--muted); letter-spacing: .02em; }
.signin-by { display: block; margin-top: 4px; font-size: .95rem; font-weight: 500; letter-spacing: .02em; color: #8fb4d6; }

/* ====================================================================================================
   Estilo JRV Consulting (sistema de diseño «JRV Consulting»): marca oscura por defecto, claro «documento».
   Space Grotesk para títulos y cifras, Inter para texto. Tokens fieles al sistema; en el tema claro los
   colores de estado se oscurecen para cumplir contraste 4.5:1 como texto.
   ==================================================================================================== */
@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 300 700; font-display: swap; src: url("/fonts/space-grotesk-latin-wght-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("/fonts/inter-latin-wght-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
:root {
  color-scheme: dark;
  --bg: #050A14; --surface: #0D1B2E; --surface-2: #091525; --border: #1A2E45; --input-bg: #091525;
  --text: #F0F4FF; --muted: #8899AA;
  --brand: #00C2FF; --brand-soft: rgb(0 194 255 / .14); --accent-deep: #0080FF; --accent-soft: #33CFFF; --gold: #F2C022;
  --primary-bg: #00C2FF; --primary-fg: #050A14; --primary-hover: #33CFFF; --btn-border: #2A4562;
  --ok: #00FF88; --ok-soft: rgb(0 255 136 / .12); --warn: #E8A317; --warn-soft: rgb(232 163 23 / .14);
  --bad: #FF6B7D; --bad-soft: rgb(255 107 125 / .14); --info: #33CFFF; --info-soft: rgb(51 207 255 / .14);
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 24px; --radius: 12px; --card-r: 16px;
  --shadow: none; --glow: radial-gradient(55% 60% at 85% -8%, rgb(0 194 255 / .12) 0%, rgb(0 194 255 / 0) 70%);
  --font-head: "Space Grotesk", "Aptos", "Helvetica Neue", Arial, system-ui, sans-serif;
  --font-body: "Inter", "Aptos", "Helvetica Neue", Arial, system-ui, sans-serif;
  --brand-bar: linear-gradient(90deg, #00C2FF, #0080FF, #00C2FF);
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    color-scheme: light;
    --bg: #FFFFFF; --surface: #F5F8FC; --surface-2: #EBF1F8; --border: #D8E0E8; --input-bg: #FFFFFF;
    --text: #0D1B2E; --muted: #56687E;
    --brand: #0069B3; --brand-soft: rgb(0 105 179 / .1);
    --primary-bg: #0069B3; --primary-fg: #FFFFFF; --primary-hover: #005A99; --btn-border: #C3CFDB;
    --ok: #00775A; --ok-soft: rgb(0 168 120 / .12); --warn: #8F5F00; --warn-soft: rgb(232 163 23 / .16);
    --bad: #C23A4E; --bad-soft: rgb(224 71 91 / .1); --info: #0069B3; --info-soft: rgb(0 105 179 / .1);
    --shadow: 0 10px 30px -18px rgb(5 10 20 / .28); --glow: none;
  }
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #FFFFFF; --surface: #F5F8FC; --surface-2: #EBF1F8; --border: #D8E0E8; --input-bg: #FFFFFF;
  --text: #0D1B2E; --muted: #56687E;
  --brand: #0069B3; --brand-soft: rgb(0 105 179 / .1);
  --primary-bg: #0069B3; --primary-fg: #FFFFFF; --primary-hover: #005A99; --btn-border: #C3CFDB;
  --ok: #00775A; --ok-soft: rgb(0 168 120 / .12); --warn: #8F5F00; --warn-soft: rgb(232 163 23 / .16);
  --bad: #C23A4E; --bad-soft: rgb(224 71 91 / .1); --info: #0069B3; --info-soft: rgb(0 105 179 / .1);
  --shadow: 0 10px 30px -18px rgb(5 10 20 / .28); --glow: none;
}
body { font-family: var(--font-body); }
h1, h2, h3, .brand, .wordmark, .kpi-value, .home-stat strong, .tile-value { font-family: var(--font-head); }
h1 { letter-spacing: -.02em; } h2 { letter-spacing: -.01em; }
/* Título de sección con la barra de acento de la marca (56×3) */
.page-head h1::after { content: ''; display: block; width: 56px; height: 3px; margin-top: 10px; border-radius: 2px; background: var(--brand-bar); }
.eyebrow, .side-eyebrow, main[data-section] .page-head h1::before { font-family: var(--font-head); color: var(--brand); }
a { color: var(--brand); }
:focus-visible { outline-color: var(--brand); }
/* Tarjetas: radio 16 y borde de 1 px; botones 8; campos 12 */
.card, .empty, .modal, .kpi, .home-stat, .company-card, .metric { border-radius: var(--r-lg); }
.home-head { border-radius: var(--r-xl); }
button, .btn, a.button, .pill, .primary { border-radius: var(--r-sm); }
input, select, textarea { border-radius: var(--r-md); }
.primary:hover:not(:disabled), a.button.primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); filter: none; }
.badge { border-radius: var(--pill); }
/* Isotipo (SVG dorado oficial): sin caja de color ni recolorear */
img.logo-mark { display: block; width: 40px; height: 40px; border-radius: 0; background: none; object-fit: contain; flex: none; }
.brand-by { color: var(--muted); }
/* Pantalla de acceso: pieza de marca oscura, con independencia del tema del sistema */
.signin-page { background: radial-gradient(60% 50% at 82% -5%, rgb(0 194 255 / .16) 0%, rgb(0 194 255 / 0) 70%), #050A14; color: #F0F4FF; }
.signin-top { display: flex; align-items: center; gap: 12px; }
.signin-card { background: #0D1B2E; border: 1px solid #1A2E45; border-radius: var(--r-xl); box-shadow: 0 18px 40px rgb(5 10 20 / .5); }
.signin-card h1 { color: #F0F4FF; font-family: var(--font-head); }
.signin-card h1::after { content: ''; display: block; width: 56px; height: 3px; margin-top: 14px; border-radius: 2px; background: var(--brand-bar); }
.signin-by { color: #00C2FF; font-family: var(--font-head); }
.signin-card .muted, .divider, .signin-foot { color: #8899AA; }
.divider::before, .divider::after { background: #1A2E45; }
.return-box { background: #091525; border: 1px solid #1A2E45; color: #F0F4FF; border-radius: var(--r-md); }
.signin-card a, .signin-card .center a { color: #00C2FF; }
.signin-card .primary { background: #00C2FF; border-color: #00C2FF; color: #050A14; border-radius: var(--r-sm); }
.signin-card .primary:hover { background: #33CFFF; border-color: #33CFFF; }
.signin-card button:not(.primary) { color: #F0F4FF; border-color: #2A4562; }
.home-head h1::after, .admin-head h1::after { content: ''; display: block; width: 56px; height: 3px; margin-top: 10px; border-radius: 2px; background: var(--brand-bar); }
/* Espacio de persona digital (vista de revisión) */
.pw-head { display: flex; flex-direction: column; gap: 14px; background: var(--surface); border-radius: var(--r-xl); }
.pw-head h2 { margin: 0; font-family: var(--font-head); font-size: 1.5rem; }
.pw-head p { margin: 2px 0 0; }
.pw-who { gap: 16px; }
.pw-avatar { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); font: 700 1.05rem var(--font-head); flex: none; }
.pw-avatar.lg { width: 72px; height: 72px; font-size: 1.4rem; background: rgb(255 255 255 / .18); color: #fff; }
.pw-layout { display: grid; gap: 16px; grid-template-columns: minmax(210px, 260px) 1fr; align-items: start; }
.pw-nav { display: flex; flex-direction: column; gap: 4px; padding: 10px; }
.pw-nav-item { display: flex; gap: 12px; align-items: flex-start; text-align: left; border: 0; border-radius: var(--r-md); background: none; padding: 10px 12px; color: var(--text); }
.pw-nav-item:hover { background: var(--surface-2); }
.pw-nav-item[aria-current="true"] { background: var(--brand-soft); color: var(--brand); }
.pw-nav-item span { display: flex; flex-direction: column; gap: 2px; }
.pw-nav-item small { color: var(--muted); font-weight: 400; font-size: .78rem; line-height: 1.35; }
.pw-banner { display: flex; gap: 18px; align-items: center; padding: 22px; border-radius: var(--r-lg); color: #fff; background: linear-gradient(135deg, #0069B3, #0080FF); }
.pw-banner h3 { margin: 0 0 6px; color: #fff; font-family: var(--font-head); font-size: 1.35rem; }
.pw-card h3 { margin: 0 0 10px; font-family: var(--font-head); font-size: 1rem; }
.kv-grid { display: grid; gap: 14px 22px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin: 0; }
.kv dt { color: var(--muted); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }
.kv dd { margin: 2px 0 0; overflow-wrap: anywhere; }
.pw-list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.pw-two { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.pw-traits { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.pw-traits li { display: grid; grid-template-columns: minmax(120px, 1fr) minmax(120px, 2fr) 2ch; gap: 12px; align-items: center; }
.pw-traits meter { width: 100%; height: 10px; }
.pw-pre { margin: 0; padding: 12px; overflow: auto; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--border); font: .82rem/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; }
.chip { padding: 2px 10px; border-radius: var(--pill); background: var(--surface-2); border: 1px solid var(--border); }
@media (max-width: 800px) { .pw-layout { grid-template-columns: 1fr; } .pw-nav { flex-direction: row; overflow-x: auto; } .pw-nav-item small { display: none; } }
.pw-banner .badge { background: rgb(255 255 255 / .22); color: #fff; }
/* Formulario de parámetros de persona */
.pf-section > summary { display: flex; flex-direction: column; gap: 2px; cursor: pointer; list-style: none; }
.pf-section > summary::-webkit-details-marker { display: none; }
.pf-section > summary strong { font-family: var(--font-head); font-size: 1.02rem; }
.pf-body { margin-top: 14px; }
.pf-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.pf-channels { display: flex; gap: 18px; flex-wrap: wrap; border: 1px solid var(--border); border-radius: var(--r-md); padding: 10px 14px; }
.pf-check { display: inline-flex; align-items: center; gap: 8px; }
.pf-check input { width: auto; }
.pf-trait { display: grid; grid-template-columns: minmax(80px, 110px) 1fr minmax(80px, 110px) 2ch; gap: 12px; align-items: center; }
.pf-trait input[type="range"] { width: 100%; }
.pf-trait span:nth-of-type(2) { text-align: right; }
.pf-trait-val { font-variant-numeric: tabular-nums; color: var(--muted); }
.pf-row { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface-2); }
.pf-row-fields { flex: 1; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.pf-error { color: var(--danger, #d64545); font-weight: 600; }
.pf [aria-invalid="true"] { border-color: var(--danger, #d64545); }
.modal.wide { width: min(980px, 96vw); }
@media (max-width: 640px) { .pf-trait { grid-template-columns: 1fr 2ch; } .pf-trait span { display: none; } .pf-trait input { grid-column: 1; } }

/* Consola de administración: todas las salas en un tablero único */
.admin-board { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px 28px; padding: 16px 18px; margin: 0 0 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--card-r); }
.admin-board-group:first-child { grid-column: 1 / -1; }
.admin-board .chips { margin: 0; }

/* Admin · Infraestructura: tarjetas por recurso */
.infra-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.infra-card { display: flex; flex-direction: column; gap: 10px; padding: 18px; background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--border); border-radius: var(--card-r); }
.infra-card.infra-ok { border-left-color: var(--ok, #2f9e6b); } .infra-card.infra-unconfigured { border-left-color: var(--warn, #d9822b); }
.infra-card header { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.infra-card h3 { margin: 0; font-family: var(--font-head); font-size: 1.05rem; }
.infra-card > .badge { align-self: flex-start; }
.infra-note { margin: 0; color: var(--warn, #d9822b); font-size: .9rem; }
.infra-vars { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--border); }
.infra-var-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.infra-var { padding: 3px 8px; border-radius: var(--r-sm); background: var(--surface-2); font-size: .8rem; word-break: break-all; }
.infra-var-secret::before { content: "🔒 "; }
.kpi-site .kpi-value { font-size: 1.05rem; overflow-wrap: anywhere; }
