/* Administración de Nuria · con el kit de marca de Unisoftland (como el Panel de Socios).
   Marca: Naranja #FF8A42 · Terracota #B94C29 · Carbón #292722 · Blanco cálido #FFFEFD · Outfit.
   Capas: 0 = fondo cálido con el brillo de la isla, 1 = mosaicos de cristal, 2 = contenido plano. */
@font-face { font-family: "Outfit"; src: url("nuria/fonts/outfit-variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --bg: #F6F3EF; --paper: #FFFEFD; --ink: #292722; --ink-2: #57514A; --ink-3: #736D65;
  --naranja: #FF8A42; --terracota: #B94C29; --accent-ink: #B94C29; --late-ink: #A83F20; --pause: #8C8378;
  --ok: #2E7D5B; --ok-bg: rgba(46,125,91,.12);
  --glass: rgba(255,254,253,.56); --glass-strong: rgba(255,254,253,.9); --glass-edge: rgba(255,255,255,.92); --glass-hi: rgba(255,255,255,1);
  --row-btn: rgba(255,254,253,.82); --inner: rgba(255,254,253,.72); --inner-edge: rgba(41,39,34,.08); --line: rgba(41,39,34,.09);
  --shadow: rgba(110,58,24,.16); --field: rgba(255,254,253,.86);
  --blob-a: rgba(255,138,66,.34); --blob-b: rgba(185,76,41,.16); --blob-c: rgba(255,178,120,.30); --blob-d: rgba(229,214,196,.70);
  --scrim: rgba(41,39,34,.30); --solid: #292722; --on-solid: #FFFEFD; --on-accent: #292722;
  --logo-island: #FF8A42; --logo-ink: #292722; --logo-cursor: #B94C29;
  --f: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r-tile: 26px; --r-inner: 16px; --r-pill: 999px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1C1A17; --paper: #24221E; --ink: #FFFEFD; --ink-2: #D3CCC2; --ink-3: #A89F93;
    --accent-ink: #FF9D5E; --late-ink: #FF9D5E; --pause: #A89F93; --ok: #7BD3A6; --ok-bg: rgba(123,211,166,.14);
    --glass: rgba(58,54,47,.46); --glass-strong: rgba(44,41,36,.94); --glass-edge: rgba(255,255,255,.11); --glass-hi: rgba(255,255,255,.17);
    --row-btn: rgba(52,48,42,.86); --inner: rgba(255,255,255,.05); --inner-edge: rgba(255,255,255,.08); --line: rgba(255,255,255,.09);
    --shadow: rgba(0,0,0,.55); --field: rgba(255,255,255,.06);
    --blob-a: rgba(255,138,66,.20); --blob-b: rgba(185,76,41,.30); --blob-c: rgba(255,138,66,.10); --blob-d: rgba(120,100,80,.25);
    --scrim: rgba(0,0,0,.55); --solid: #FFFEFD; --on-solid: #292722;
    --logo-island: #FFFFFF; --logo-ink: #FFFFFF; --logo-cursor: #FFFFFF;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #1C1A17; --paper: #24221E; --ink: #FFFEFD; --ink-2: #D3CCC2; --ink-3: #A89F93;
  --accent-ink: #FF9D5E; --late-ink: #FF9D5E; --pause: #A89F93; --ok: #7BD3A6; --ok-bg: rgba(123,211,166,.14);
  --glass: rgba(58,54,47,.46); --glass-strong: rgba(44,41,36,.94); --glass-edge: rgba(255,255,255,.11); --glass-hi: rgba(255,255,255,.17);
  --row-btn: rgba(52,48,42,.86); --inner: rgba(255,255,255,.05); --inner-edge: rgba(255,255,255,.08); --line: rgba(255,255,255,.09);
  --shadow: rgba(0,0,0,.55); --field: rgba(255,255,255,.06);
  --blob-a: rgba(255,138,66,.20); --blob-b: rgba(185,76,41,.30); --blob-c: rgba(255,138,66,.10); --blob-d: rgba(120,100,80,.25);
  --scrim: rgba(0,0,0,.55); --solid: #FFFEFD; --on-solid: #292722;
  --logo-island: #FFFFFF; --logo-ink: #FFFFFF; --logo-cursor: #FFFFFF;
  color-scheme: dark;
}

[hidden] { display: none !important; }
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font-family: var(--f); font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased;
  min-height: 100vh; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--naranja); outline-offset: 2px; }
[tabindex="-1"]:focus { outline: none; }
h1, h2, h3, p { margin: 0; }
.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; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 60; padding: 10px 16px; border-radius: var(--r-pill); background: var(--solid); color: var(--on-solid); text-decoration: none; font-weight: 600; }
.skip:focus { top: 12px; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-3); }

.ambient { position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(42vmax 38vmax at 8% 4%, var(--blob-a), transparent 70%),
    radial-gradient(34vmax 30vmax at 92% 12%, var(--blob-b), transparent 70%),
    radial-gradient(46vmax 40vmax at 78% 96%, var(--blob-c), transparent 70%),
    radial-gradient(36vmax 32vmax at 18% 88%, var(--blob-d), transparent 70%); }
.wrap { max-width: 1320px; margin: 0 auto; padding-inline: clamp(16px, 3vw, 32px); padding-block: 22px 64px; display: flex; flex-direction: column; gap: 20px; }

/* ---------- Barra superior (capa 0, sin cristal) ---------- */
.top { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; margin-right: auto; min-width: 0; color: inherit; text-decoration: none; }
.brand-mark { width: 42px; height: 42px; border-radius: 14px; background: var(--paper); border: 1px solid var(--glass-edge); display: grid; place-items: center;
  box-shadow: 0 8px 20px -12px var(--shadow); flex: none; }
.brand-mark img { width: 30px; height: 30px; display: block; }
.brand-word { font-size: 26px; font-weight: 600; letter-spacing: -.03em; line-height: 1; }
.brand-rule { width: 1px; height: 26px; background: var(--terracota); flex: none; }
.brand-sub { font-size: 16px; color: var(--ink-2); white-space: nowrap; }
.cursor { color: var(--terracota); font-weight: 500; margin-left: 1px; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.seg { display: flex; padding: 4px; gap: 2px; border-radius: var(--r-pill); background: var(--glass); border: 1px solid var(--glass-edge);
  backdrop-filter: blur(24px) saturate(170%); -webkit-backdrop-filter: blur(24px) saturate(170%); box-shadow: inset 0 1px 0 var(--glass-hi);
  overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.seg::-webkit-scrollbar { display: none; }
.seg button { border: 0; background: transparent; padding: 8px 16px; border-radius: var(--r-pill); font-weight: 500; color: var(--ink-2); white-space: nowrap;
  display: inline-flex; align-items: center; gap: 7px; transition: background .15s ease, color .15s ease; }
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"], .seg button[aria-current="page"] { background: var(--solid); color: var(--on-solid); }
.seg .n { font-size: 12px; font-weight: 600; min-width: 20px; padding: 1px 6px; border-radius: var(--r-pill); background: var(--naranja); color: #292722; text-align: center; }
.seg button[aria-pressed="true"] .n, .seg button[aria-current="page"] .n { background: var(--naranja); }
.search { position: relative; flex: 1 1 220px; max-width: 320px; }
.search input { width: 100%; padding: 10px 14px 10px 38px; border-radius: var(--r-pill); border: 1px solid var(--glass-edge); background: var(--glass);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); box-shadow: inset 0 1px 0 var(--glass-hi); }
.search input::placeholder { color: var(--ink-3); }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--ink-3); pointer-events: none; }
.session { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: var(--r-pill); background: var(--glass); border: 1px solid var(--glass-edge);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); box-shadow: inset 0 1px 0 var(--glass-hi); font-size: 14px; font-weight: 500; white-space: nowrap; max-width: 300px; min-width: 0; }
.session .who { overflow: hidden; text-overflow: ellipsis; }
.session em { font-style: normal; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: var(--r-pill); background: rgba(255,138,66,.18); color: var(--accent-ink); }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 12px; font-weight: 600; background: var(--solid); color: var(--on-solid); flex: none; }
.avatar.lg { width: 44px; height: 44px; font-size: 15px; }
.avatar.warm { background: linear-gradient(145deg, var(--naranja), var(--terracota)); color: #FFFEFD; }

/* ---------- Botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; padding: 10px 18px; border-radius: var(--r-pill);
  font-weight: 600; white-space: nowrap; text-decoration: none; color: inherit; background: none; transition: transform .15s ease, filter .15s ease, background .15s ease; min-height: 42px; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn svg { width: 17px; height: 17px; flex: none; }
.btn-primary { background: var(--naranja); color: var(--on-accent); box-shadow: 0 6px 18px -6px rgba(255,138,66,.6), inset 0 1px 0 rgba(255,255,255,.45); }
.btn-primary:hover:not(:disabled) { filter: brightness(1.05); }
.btn-solid { background: var(--solid); color: var(--on-solid); }
.btn-ghost { background: var(--glass); border-color: var(--glass-edge); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); color: var(--ink); }
.btn-ghost:hover:not(:disabled) { background: var(--glass-strong); }
.rows .btn-ghost, .table .btn-ghost, .sheet .btn-ghost, .btn-ghost.mini { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--row-btn); border-color: var(--inner-edge); }
.btn-danger { background: transparent; color: var(--late-ink); border-color: currentColor; }
.btn-danger.solid { background: var(--terracota); color: #FFFEFD; border-color: transparent; }
.btn.mini { padding: 6px 12px; font-size: 13px; min-height: 32px; }
.btn.wide { width: 100%; }
.icon-btn { width: 42px; height: 42px; padding: 0; }
.icon-btn svg { width: 18px; height: 18px; }
.link { background: none; border: 0; padding: 0; color: var(--accent-ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.acts { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ---------- Aviso y toast ---------- */
.notice { padding: 12px 16px; border-radius: var(--r-inner); background: var(--glass); border: 1px solid var(--glass-edge); color: var(--ink-2);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); display: flex; gap: 10px; align-items: flex-start; }
.notice[data-tone="error"] { border-color: rgba(185,76,41,.35); color: var(--late-ink); }
.notice[data-tone="ok"] { color: var(--ok); }
.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 70; padding: 11px 18px; border-radius: var(--r-pill);
  background: var(--solid); color: var(--on-solid); font-size: 14px; font-weight: 500; box-shadow: 0 12px 30px -10px var(--shadow); max-width: calc(100vw - 32px); text-align: center; }
.toast[data-tone="error"] { background: var(--terracota); color: #FFFEFD; }

/* ---------- Mosaico de cristal (capa 1) ---------- */
.tile { position: relative; background: var(--glass); border: 1px solid var(--glass-edge); border-radius: var(--r-tile);
  backdrop-filter: blur(30px) saturate(175%); -webkit-backdrop-filter: blur(30px) saturate(175%);
  box-shadow: inset 0 1px 0 var(--glass-hi), 0 18px 40px -22px var(--shadow); padding: 22px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.tile::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: linear-gradient(165deg, var(--glass-hi) 0%, transparent 28%); opacity: .35; }
.tile > * { position: relative; }
button.tile { text-align: left; font: inherit; color: inherit; cursor: pointer; transition: transform .15s ease; }
button.tile:hover { transform: translateY(-1px); }
.eyebrow { font-size: 12.5px; font-weight: 500; letter-spacing: .05em; text-transform: uppercase; color: var(--accent-ink); display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.eyebrow .link, .eyebrow a { letter-spacing: 0; text-transform: none; font-size: 13px; font-weight: 500; text-decoration: none; }
.eyebrow .chip { letter-spacing: 0; text-transform: none; }
.big { font-weight: 500; font-size: clamp(42px, 5.4vw, 64px); line-height: .95; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.mid { font-weight: 500; font-size: 32px; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.sub { color: var(--ink-2); font-size: 14px; }
.mosaic { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; grid-auto-flow: dense; }
.s1 { grid-column: span 1; } .s2 { grid-column: span 2; } .s3 { grid-column: span 3; } .s4 { grid-column: span 4; } .s6 { grid-column: span 6; }
@media (max-width: 1100px) {
  .mosaic { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .s6, .s4 { grid-column: span 4; } .s3 { grid-column: span 2; } .s1 { grid-column: span 1; }
  .mosaic .kpi.s1 { grid-column: span 2; }
}
@media (max-width: 680px) {
  .mosaic { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .s2, .s3, .s4, .s6 { grid-column: span 2; } .s1 { grid-column: span 1; }
  .tile { padding: 18px; border-radius: 22px; }
}

/* Bienvenida */
.welcome { flex-direction: row; align-items: center; gap: 22px; flex-wrap: wrap; }
.welcome-art { width: 92px; height: 92px; border-radius: 28px; background: var(--paper); display: grid; place-items: center; flex: none;
  box-shadow: inset 0 1px 0 var(--glass-hi), 0 14px 30px -18px var(--shadow); border: 1px solid var(--glass-edge); }
.welcome-art img { width: 64px; height: 64px; }
.welcome h1 { font-size: clamp(24px, 3vw, 30px); font-weight: 500; letter-spacing: -.02em; text-wrap: balance; }
.welcome p { margin-top: 6px; color: var(--ink-2); max-width: 62ch; }
.welcome .grow { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.today { display: flex; flex-wrap: wrap; gap: 8px; }
.today .chip { font-size: 12.5px; padding: 4px 12px; }
.kpi .big { font-size: clamp(38px, 4.4vw, 56px); }
@media (max-width: 680px) { .welcome .acts { width: 100%; } .welcome .acts .btn { flex: 1; } .welcome-art { width: 64px; height: 64px; border-radius: 20px; } .welcome-art img { width: 44px; height: 44px; } }

/* Listas dentro de mosaicos (capa 2) */
.rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.rows li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); min-width: 0; }
.rows li:first-child { border-top: 0; }
.rows .t { min-width: 0; flex: 1; }
.rows .t strong { display: block; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rows .t span { display: block; font-size: 12.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rowbtn { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 12px; width: 100%; cursor: pointer; min-width: 0; border-radius: 12px; padding: 2px 4px; margin: -2px -4px; }
.rowbtn:hover { background: var(--inner); }
.rowbtn:focus-visible { outline: 2px solid var(--naranja); outline-offset: 2px; }
.empty { color: var(--ink-3); font-size: 14px; padding: 6px 0; }
.chev { width: 16px; height: 16px; color: var(--ink-3); flex: none; }

/* Estado de la plataforma */
.state { display: flex; align-items: center; gap: 12px; }
.state .ico { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: var(--inner); border: 1px solid var(--inner-edge); flex: none; color: var(--ink-2); }
.state .ico svg { width: 17px; height: 17px; }
.state[data-tone="ok"] .ico { color: var(--ok); background: var(--ok-bg); border-color: transparent; }
.state[data-tone="warn"] .ico { color: var(--accent-ink); background: rgba(255,138,66,.16); border-color: transparent; }

/* Chips de estado */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: var(--r-pill); font-size: 12px; font-weight: 500; white-space: nowrap; border: 1px solid transparent; line-height: 1.5; }
.chip i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; display: block; }
.chip[data-st="approved"], .chip[data-tone="ok"] { background: var(--ok-bg); color: var(--ok); }
.chip[data-st="pending"], .chip[data-tone="warn"] { background: rgba(255,138,66,.18); color: var(--accent-ink); }
.chip[data-st="suspended"], .chip[data-tone="pause"] { background: rgba(140,131,120,.16); color: var(--pause); }
.chip[data-st="rejected"], .chip[data-tone="off"] { color: var(--ink-3); border-color: var(--line); }
.chip[data-tone="solid"] { background: var(--solid); color: var(--on-solid); }

/* Canales */
.channels { display: inline-flex; gap: 6px; }
.ch { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--inner); border: 1px solid var(--inner-edge); color: var(--ink-3); }
.ch svg { width: 15px; height: 15px; }
.ch[data-on="true"] { background: var(--ok-bg); border-color: transparent; color: var(--ok); }

/* Gráfico de mensajes */
.spark { width: 100%; height: 120px; display: block; margin-top: auto; overflow: visible; }
.spark .area { fill: url(#adm-spark-fill); }
.spark .line { fill: none; stroke: var(--naranja); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.spark .dot { fill: var(--paper); stroke: var(--terracota); stroke-width: 2; }
.spark .base { stroke: var(--line); stroke-width: 1; }
.spark-days { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--ink-3); }
.kpi-row { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }

/* ---------- Clientes ---------- */
.bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.bar h1 { font-size: 30px; font-weight: 500; letter-spacing: -.02em; margin-right: auto; }
.bar .count { font-size: 13px; color: var(--ink-3); }
.table-tile { padding: 8px 8px 4px; }
.tablebox { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; min-width: 880px; }
.table th { font-size: 12px; font-weight: 500; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
.table tbody tr { cursor: pointer; transition: background .12s ease; }
.table tbody tr:hover { background: var(--inner); }
.table tbody tr:last-child td { border-bottom: 0; }
.table td.name { white-space: normal; min-width: 240px; }
.table .who { display: flex; align-items: center; gap: 12px; }
.table .who .nm { display: flex; flex-direction: column; min-width: 0; }
.table .who .nm strong { font-weight: 600; }
.table .who .nm span { font-size: 12.5px; color: var(--ink-3); }
.table .right { text-align: right; }
.fbar { display: inline-flex; gap: 3px; align-items: center; }
.fbar i { width: 7px; height: 14px; border-radius: 3px; background: var(--naranja); display: block; }
.fbar i.off { background: var(--line); }
.cards { display: none; }
@media (max-width: 820px) {
  .table-tile { display: none; }
  .cards { display: flex; flex-direction: column; gap: 10px; }
  .card { all: unset; box-sizing: border-box; display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 20px; background: var(--glass); border: 1px solid var(--glass-edge);
    backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); box-shadow: inset 0 1px 0 var(--glass-hi), 0 12px 30px -22px var(--shadow); cursor: pointer; }
  .card:focus-visible { outline: 2px solid var(--naranja); outline-offset: 2px; }
  .card .top-line { display: flex; align-items: center; gap: 12px; }
  .card .top-line .t { flex: 1; min-width: 0; }
  .card .top-line strong { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .card .top-line span { display: block; font-size: 12.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .card .meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); align-items: center; }
}
.pager { display: flex; align-items: center; justify-content: center; gap: 12px; font-size: 13px; color: var(--ink-3); }

/* ---------- Hoja lateral (cliente) ---------- */
.scrim { position: fixed; inset: 0; background: var(--scrim); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); z-index: 30; opacity: 0; transition: opacity .2s ease; }
.scrim.on { opacity: 1; }
.sheet { position: fixed; z-index: 31; top: 12px; right: 12px; bottom: 12px; width: min(640px, calc(100vw - 24px)); background: var(--glass-strong); border: 1px solid var(--glass-edge);
  border-radius: var(--r-tile); backdrop-filter: blur(40px) saturate(180%); -webkit-backdrop-filter: blur(40px) saturate(180%);
  box-shadow: inset 0 1px 0 var(--glass-hi), 0 30px 80px -20px var(--shadow); display: flex; flex-direction: column; overflow: hidden;
  transform: translateX(24px); opacity: 0; transition: transform .25s cubic-bezier(.2,.8,.2,1), opacity .2s ease;
  margin-top: env(safe-area-inset-top, 0px); margin-bottom: env(safe-area-inset-bottom, 0px); }
.sheet.on { transform: none; opacity: 1; }
.sheet-h { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.sheet-h .t { flex: 1; min-width: 0; }
.sheet-h h2 { font-size: 20px; font-weight: 600; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheet-h p { font-size: 13px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheet-b { flex: 1; overflow-y: auto; padding: 18px 22px 28px; display: flex; flex-direction: column; gap: 22px; overscroll-behavior: contain; }
.sheet-intro { display: flex; flex-direction: column; gap: 8px; }
.sheet-intro .status-line:empty { min-height: 0; }
.sheet-f { padding: 12px 20px; border-top: 1px solid var(--line); font-size: 12px; color: var(--ink-3); display: flex; gap: 12px; flex-wrap: wrap; }
.sec { display: flex; flex-direction: column; gap: 12px; }
.sec-h { font-size: 12.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--accent-ink); display: flex; align-items: center; gap: 8px; }
.sec-h .chip { text-transform: none; letter-spacing: 0; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.fact { padding: 12px 14px; border-radius: var(--r-inner); background: var(--inner); border: 1px solid var(--inner-edge); min-width: 0; }
.fact b { display: block; font-size: 22px; font-weight: 500; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.fact span { display: block; font-size: 12.5px; color: var(--ink-3); }
.contact { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 14px; color: var(--ink-2); }
.contact a { color: inherit; text-decoration: none; border-bottom: 1px dotted var(--ink-3); }
.confirm { padding: 14px; border-radius: var(--r-inner); background: rgba(255,138,66,.10); border: 1px solid rgba(255,138,66,.30); display: flex; flex-direction: column; gap: 12px; }
.confirm p { color: var(--ink-2); font-size: 14px; }
.linkbox { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: var(--r-inner); background: var(--inner); border: 1px solid var(--inner-edge); }
.linkbox input { width: 100%; }
@media (max-width: 560px) { .sheet { top: 8px; right: 8px; left: 8px; bottom: 8px; width: auto; } .sheet-b { padding: 16px 16px 24px; } }

/* Funciones: interruptores */
.switches { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; border-radius: var(--r-inner); background: var(--inner); border: 1px solid var(--inner-edge); }
.switches li { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-top: 1px solid var(--line); }
.switches li:first-child { border-top: 0; }
.switches .t { flex: 1; min-width: 0; }
.switches .t strong { display: block; font-weight: 500; }
.switches .t span { display: block; font-size: 12.5px; color: var(--ink-3); }
.switch { position: relative; width: 46px; height: 28px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: var(--r-pill); background: var(--line); border: 1px solid var(--inner-edge); transition: background .18s ease; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #FFFEFD; box-shadow: 0 2px 6px rgba(0,0,0,.18); transition: transform .18s ease; }
.switch input:checked + span { background: var(--naranja); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 2px solid var(--naranja); outline-offset: 2px; }
.limit { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.limit label { font-size: 14px; flex: 1 1 200px; }
.limit input { width: 130px; }
.switch input:disabled { cursor: not-allowed; }
.switch input:disabled + span { opacity: .55; }

/* Calidad de Nuria (el regulador): el mosaico del Resumen, las tarjetas por consulta y su sección en la hoja */
.q-kpi .q-top { display: flex; flex-wrap: wrap; gap: 6px; }
.q-kpi .q-top .chip { white-space: normal; text-align: left; }
.q-head { display: flex; align-items: center; gap: 12px; }
.q-head .t { flex: 1; min-width: 0; }
.q-head h2 { font-size: 18px; font-weight: 600; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-head p { font-size: 13px; color: var(--ink-3); }
.q-card .status-line:empty { min-height: 0; }
.q-body { display: flex; flex-direction: column; gap: 12px; }
.q-h { font-size: 13px; font-weight: 600; color: var(--ink-2); margin-top: 4px; }
.q-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.q-table th, .q-table td { padding: 8px 10px; text-align: right; border-bottom: 1px solid var(--line); }
.q-table thead th { font-size: 12px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); vertical-align: bottom; }
.q-table tbody th { text-align: left; font-weight: 500; color: var(--ink-2); white-space: nowrap; }
.q-table td { font-size: 18px; font-weight: 500; font-variant-numeric: tabular-nums; }
.q-table td[data-tone="warn"] { color: var(--accent-ink); }
.q-table tbody tr:last-child > * { border-bottom: 0; }
.q-cats { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.q-cats li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.q-cats li:first-child { border-top: 0; }
.q-cats .t { flex: 1; min-width: 0; color: var(--ink-2); }
.q-cats .num { font-weight: 600; min-width: 2ch; text-align: right; }
.q-lessons .t .q-state { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 4px; }
@media (max-width: 560px) { .q-table th, .q-table td { padding: 8px 6px; } .q-table td { font-size: 16px; } }

/* Correo por cliente */
.choice { display: flex; flex-direction: column; gap: 10px; }
.opt { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: var(--r-inner); background: var(--inner); border: 1px solid var(--inner-edge); cursor: pointer; }
.opt input { margin-top: 3px; accent-color: var(--naranja); }
.opt .o-t { display: flex; flex-direction: column; min-width: 0; }
.opt .o-t strong { font-weight: 500; }
.opt .o-t span { font-size: 12.5px; color: var(--ink-3); }
.opt:has(input:checked) { border-color: rgba(255,138,66,.55); background: rgba(255,138,66,.08); }

/* ---------- Formularios ---------- */
.form { display: flex; flex-direction: column; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--ink-2); }
.field > span { font-weight: 500; }
.in, .form input:not([type="checkbox"]):not([type="radio"]), .form select { width: 100%; padding: 10px 14px; border-radius: 14px; border: 1px solid var(--inner-edge); background: var(--field); min-width: 0; color: var(--ink); }
.in:focus, .form input:focus, .form select:focus { outline: 2px solid var(--naranja); outline-offset: 0; border-color: transparent; }
.steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--ink-2); }
.help { font-size: 13px; color: var(--ink-3); }
.status-line { font-size: 13.5px; color: var(--ink-2); min-height: 1.4em; }
.status-line[data-tone="error"] { color: var(--late-ink); }
.status-line[data-tone="ok"] { color: var(--ok); }
.code { font-variant-numeric: tabular-nums; letter-spacing: .02em; font-size: 13px; padding: 2px 8px; border-radius: 8px; background: var(--inner); border: 1px solid var(--inner-edge); }

/* ---------- Acceso ---------- */
body.locked .top .seg, body.locked .top .search, body.locked .session, body.locked #adm-logout { display: none; }
.lock { max-width: 520px; width: 100%; margin: 6vh auto 0; align-items: center; text-align: center; padding: 38px 32px 30px; gap: 16px; }
.lock .mascot { width: 96px; height: 96px; border-radius: 30px; background: var(--paper); display: grid; place-items: center; border: 1px solid var(--glass-edge); box-shadow: 0 16px 34px -20px var(--shadow); }
.lock .mascot img { width: 68px; height: 68px; }
.lock h1 { font-size: 28px; font-weight: 500; letter-spacing: -.02em; text-wrap: balance; }
.lock p { color: var(--ink-2); max-width: 44ch; }
.lock .acts { width: 100%; flex-direction: column; }
.lock .acts .btn { width: 100%; }
.sso { gap: 12px; padding: 13px 20px; font-size: 16px; }
.sso .isla { width: 30px; height: 22px; }
.sso-sub { font-size: 13px; color: var(--ink-3); }
.or { display: flex; align-items: center; gap: 12px; width: 100%; color: var(--ink-3); font-size: 13px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.lock form { width: 100%; text-align: left; }
.lock .status-line { text-align: center; }
.lock .foot { font-size: 13px; color: var(--ink-3); display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.keystep { width: 100%; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.keystep .key-ico { width: 54px; height: 54px; border-radius: 18px; display: grid; place-items: center; background: rgba(255,138,66,.16); color: var(--accent-ink); }
.keystep .key-ico svg { width: 26px; height: 26px; }
.isla .i-island { fill: var(--logo-island); } .isla .i-ink { fill: var(--logo-ink); }
.btn-primary .isla .i-island, .btn-solid .isla .i-island { fill: #FFFEFD; } .btn-primary .isla .i-ink { fill: #292722; } .btn-solid .isla .i-ink { fill: var(--on-solid); }

/* ---------- Pie ---------- */
.foot-bar { display: flex; align-items: center; gap: 10px; justify-content: center; color: var(--ink-3); font-size: 12.5px; padding-top: 8px; }
.foot-bar .isla { width: 22px; height: 16px; }

/* ---------- Seguridad y accesos (módulo compartido con el panel de la consulta) ---------- */
.adm .sec-card { display: flex; flex-direction: column; gap: 16px; }
.adm .sec-card h2 { font-size: 20px; font-weight: 600; }
.adm .sec-card h3 { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.adm .sec-head { display: flex; gap: 12px; align-items: flex-start; }
.adm .sec-badge, .adm .sec-icon, .adm .sec-log-icon, .adm .sec-alert-icon { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: var(--inner); border: 1px solid var(--inner-edge); flex: none; color: var(--ink-2); }
.adm .sec-badge svg, .adm .sec-icon svg, .adm .sec-log-icon svg, .adm .sec-alert-icon svg { width: 18px; height: 18px; }
.adm .sec-card .help-text { font-size: 13px; color: var(--ink-3); }
.adm .sec-status { font-size: 13.5px; color: var(--ink-2); }
.adm .sec-status:empty { display: none; }
.adm .sec-status[data-tone="error"] { color: var(--late-ink); }
.adm .sec-status[data-tone="success"] { color: var(--ok); }
.adm .sec-block { display: flex; flex-direction: column; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.adm .sec-summary, .adm .sec-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.adm .sec-chip, .adm .sec-tag { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: var(--r-pill); font-size: 12px; font-weight: 500; background: var(--inner); border: 1px solid var(--inner-edge); color: var(--ink-2); }
.adm .sec-chip[data-tone="ok"], .adm .sec-tag { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.adm .sec-chip[data-tone="warn"] { background: rgba(255,138,66,.16); color: var(--accent-ink); border-color: transparent; }
.adm .sec-list, .adm .sec-log { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.adm .sec-row, .adm .sec-log-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.adm .sec-row:first-child, .adm .sec-log-row:first-child { border-top: 0; }
.adm .sec-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.adm .sec-text strong { font-weight: 500; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.adm .sec-text small, .adm .sec-log-row time { font-size: 12.5px; color: var(--ink-3); }
.adm .sec-log-row[data-tone="bad"] .sec-log-icon { color: var(--late-ink); background: rgba(185,76,41,.12); border-color: transparent; }
.adm .sec-log-row[data-tone="ok"] .sec-log-icon { color: var(--ok); background: var(--ok-bg); border-color: transparent; }
.adm .sec-alert { display: flex; gap: 12px; padding: 14px; border-radius: var(--r-inner); background: rgba(255,138,66,.12); border: 1px solid rgba(255,138,66,.3); color: var(--ink); }
.adm .sec-alert p { font-size: 13px; color: var(--ink-2); margin-top: 4px; }
.adm .sec-form { display: flex; flex-direction: column; gap: 10px; max-width: 460px; }
.adm .sec-field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 500; color: var(--ink-2); }
.adm .sec-field input { padding: 10px 14px; border-radius: 14px; border: 1px solid var(--inner-edge); background: var(--field); }
.adm .sec-touch, .adm .sec-codes { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: var(--r-inner); background: var(--inner); border: 1px solid var(--inner-edge); }
.adm .sec-code-list { columns: 2; margin: 0; padding-left: 22px; font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.adm .sec-card .button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--inner-edge); padding: 8px 14px; border-radius: var(--r-pill);
  font-weight: 600; font-size: 13.5px; background: var(--row-btn); color: var(--ink); min-height: 36px; }
.adm .sec-card .button.primary { background: var(--naranja); color: #292722; border-color: transparent; }
.adm .sec-card .button.quiet-button { background: transparent; border-color: transparent; color: var(--accent-ink); }
.adm .sec-card .button:disabled { opacity: .55; }

/* Desplegables con flecha propia */
.adm details > summary { list-style: none; cursor: pointer; font-weight: 600; color: var(--accent-ink); display: inline-flex; align-items: center; gap: 8px; }
.adm details > summary::-webkit-details-marker { display: none; }
.adm details > summary::before { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .15s ease; margin-right: 2px; }
.adm details[open] > summary::before { transform: rotate(45deg); }
.adm details > summary + * { margin-top: 12px; }

@media (max-width: 1440px) { .brand-rule, .brand-sub { display: none; } }
@media (max-width: 760px) {
  .top { gap: 10px; }
  .seg { order: 3; width: 100%; }
  .search { order: 4; max-width: none; flex-basis: 100%; }
  .session .who, .session em { display: none; }
  .session { padding: 4px; }
  .bar h1 { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
