/* Panel de comunicación · wg-catCloud
   Mundo: manual de identidad corporativa. El color de la organización (--org) es el campo;
   papel y tinta para el trabajo; un único color de acción, --send, sólo para «Enviar». */

@font-face {
  font-family: "Schibsted Grotesk";
  src: url("fonts/schibsted-grotesk-latin.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Schibsted Grotesk";
  src: url("fonts/schibsted-grotesk-latin-ext.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --org: #0f5b52;           /* lo cambia app.js con el color de la organización */
  --on-org: #ffffff;
  --on-org-2: color-mix(in oklab, var(--on-org) 82%, var(--org));
  --org-deep: color-mix(in oklab, var(--org) 78%, #000);
  --org-tint: color-mix(in oklab, var(--org) 9%, var(--sheet));
  --org-line: color-mix(in oklab, var(--org) 28%, var(--sheet));
  --org-ink: color-mix(in oklab, var(--org) 88%, var(--ink));   /* texto, enlaces e iconos en el color de la organización */
  --org-ack: var(--org-deep);                                     /* "confirmado", distinto de "leído" */

  --paper: #f5f6f3;
  --sheet: #ffffff;
  --ink: #16181d;
  --ink-2: #454a52;
  --ink-3: #636973;
  --rule: #d9ddd6;
  --rule-2: #eaece7;
  --field-bg: #ffffff;

  --send: #c64508;          /* único color de acción: «Enviar» */
  --send-hover: #ad3b06;
  --on-send: #ffffff;

  --ok: #1f7a4d;
  --warn: #9a5b00;
  --danger: #b3261e;

  --radius: 12px;
  --radius-s: 8px;
  --shadow-pop: 0 18px 50px -12px rgb(20 24 30 / 0.28), 0 2px 8px rgb(20 24 30 / 0.08);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  --font: "Schibsted Grotesk", "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #111315;
    --sheet: #181b1e;
    --ink: #eceeec;
    --ink-2: #b8bdc2;
    --ink-3: #8f969d;
    --rule: #2d3236;
    --rule-2: #23272a;
    --field-bg: #121517;
    --org-deep: color-mix(in oklab, var(--org) 62%, #000);
    --org-tint: color-mix(in oklab, var(--org) 16%, var(--sheet));
    --org-line: color-mix(in oklab, var(--org) 40%, var(--sheet));
    --org-ink: color-mix(in oklab, var(--org) 55%, #ffffff);
    --org-ack: color-mix(in oklab, var(--org) 22%, #ffffff);
    --send: #ff7a2e;
    --send-hover: #ff8f4d;
    --on-send: #1c0c02;
    --ok: #57c48a;
    --warn: #e0a445;
    --danger: #ff8a80;
    --shadow-pop: 0 18px 50px -12px rgb(0 0 0 / 0.6), 0 2px 8px rgb(0 0 0 / 0.4);
    color-scheme: dark;
  }
}

/* ---------- base ---------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 15px/1.5 var(--font);
  font-feature-settings: "ss01";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
[hidden] { display: none !important; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; }
code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 0.92em; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: color-mix(in oklab, var(--org) 26%, transparent); color: inherit; }
:focus-visible { outline: 2px solid var(--org); outline-offset: 2px; border-radius: 6px; }
input, textarea { caret-color: var(--org); }
* { scrollbar-width: thin; scrollbar-color: var(--rule) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--rule); border-radius: 10px; border: 3px solid var(--paper); }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ficha b, .bar-label b, .big-read { font-variant-numeric: tabular-nums; }

.ic { width: 18px; height: 18px; flex: none; }
.ramp { width: 18px; height: 14px; flex: none; }
.ic-xs { width: 14px; height: 14px; flex: none; color: var(--org-ink); vertical-align: -2px; }

/* ---------- controles ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 15px;
  border: 1px solid transparent; border-radius: var(--radius-s);
  font-size: 14px; font-weight: 600; letter-spacing: -0.005em;
  cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: background-color 160ms, border-color 160ms, color 160ms, transform 120ms;
}
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-busy="true"] { opacity: 0.55; cursor: default; transform: none; }
.btn.send { background: var(--send); color: var(--on-send); }
.btn.send:hover { background: var(--send-hover); }
.btn.primary-ink { background: var(--ink); color: var(--paper); }
.btn.primary-ink:hover { background: color-mix(in oklab, var(--ink) 86%, var(--org)); }
.btn.quiet { background: var(--sheet); border-color: var(--rule); color: var(--ink); }
.btn.quiet:hover { border-color: color-mix(in oklab, var(--rule) 40%, var(--ink)); }
.btn.danger { background: transparent; border-color: color-mix(in oklab, var(--danger) 45%, var(--rule)); color: var(--danger); }
.btn.danger:hover { background: color-mix(in oklab, var(--danger) 8%, transparent); }
.btn.small { height: 32px; padding: 0 11px; font-size: 13px; }

.link-btn, .link { background: none; border: 0; padding: 0; cursor: pointer; font-weight: 600; font-size: 14px; color: var(--org-ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.link-btn:hover, .link:hover { text-decoration-thickness: 2px; }

.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: var(--radius-s); background: transparent; color: var(--ink-3); cursor: pointer; }
.icon-btn:hover { background: var(--rule-2); color: var(--ink); }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field > span em, .field em { font-style: normal; font-weight: 400; color: var(--ink-3); }
input:not([type="checkbox"]):not([type="radio"]):not([type="color"]), select, textarea {
  width: 100%; min-height: 40px; padding: 9px 12px;
  background: var(--field-bg); border: 1px solid var(--rule); border-radius: var(--radius-s);
  transition: border-color 150ms, box-shadow 150ms;
}
textarea { resize: vertical; line-height: 1.55; }
input::placeholder, textarea::placeholder { color: var(--ink-3); opacity: 1; }
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: none; border-color: var(--org); box-shadow: 0 0 0 3px color-mix(in oklab, var(--org) 22%, transparent);
}
select { appearance: none; padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m7 10 5 5 5-5' fill='none' stroke='%23636973' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 18px; }
.input-row { display: flex; gap: 8px; }
.input-row input { flex: 1; min-width: 0; }

.check { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 0; accent-color: var(--org); }

/* control segmentado: la rampa de urgencia vive aquí */
.seg { display: inline-flex; margin: 0; padding: 3px; border: 1px solid var(--rule); border-radius: 10px; background: var(--paper); gap: 2px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; border-radius: 7px; font-size: 14px; font-weight: 600; color: var(--ink-2); transition: background-color 160ms, color 160ms, box-shadow 160ms; }
.seg input:checked + span { background: var(--sheet); color: var(--ink); box-shadow: 0 1px 2px color-mix(in srgb, var(--ink) 14%, transparent), 0 0 0 1px var(--rule); }
.seg input:focus-visible + span { outline: 2px solid var(--org); outline-offset: 1px; }
.seg input:checked + span .ramp { color: var(--org-ink); }
.seg.small span { height: 30px; padding: 0 12px; font-size: 13px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border: 1px solid var(--rule); border-radius: 999px; background: var(--sheet); font-size: 13px; font-weight: 550; cursor: pointer; color: var(--ink-2); }
.chip[aria-pressed="true"] { background: var(--org); border-color: var(--org); color: var(--on-org); }
.chip:hover { border-color: color-mix(in oklab, var(--rule) 40%, var(--ink)); }
.tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; background: var(--org-tint); color: var(--org-ink); font-size: 12px; font-weight: 600; white-space: nowrap; }

.form-msg { font-size: 13.5px; color: var(--ink-2); min-height: 1.2em; }
.form-msg.error { color: var(--danger); }
.form-msg.ok { color: var(--ok); }

/* ---------- entrar ---------- */

.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(380px, 0.9fr); }
.auth-field {
  background: var(--org); color: var(--on-org);
  padding: clamp(32px, 6vw, 88px); display: flex; flex-direction: column; justify-content: flex-end; gap: 28px;
  --eye: var(--org);
}
.auth-mark { width: clamp(64px, 8vw, 104px); height: clamp(64px, 8vw, 104px); color: var(--on-org); }
.auth-line { font-size: clamp(30px, 3.6vw, 52px); line-height: 1.05; font-weight: 750; letter-spacing: -0.03em; max-width: 14ch; }
.auth-sheet { display: flex; flex-direction: column; justify-content: center; padding: clamp(28px, 5vw, 72px); gap: 40px; background: var(--sheet); }
.auth-form { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 22px; }
.auth-form h1 { font-size: 28px; font-weight: 750; letter-spacing: -0.02em; }
.auth-form .btn { height: 44px; font-size: 15px; }
.auth-switch { font-size: 14px; color: var(--ink-2); }
.stack { display: flex; flex-direction: column; gap: 16px; }

.signature { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--ink-3); --eye: var(--sheet); }
.sig-mark { width: 18px; height: 18px; color: var(--ink-3); }
.signature.on-field { color: var(--on-org-2); --eye: var(--org); }
.signature.on-field .sig-mark { color: var(--on-org-2); }

/* ---------- estructura ---------- */

.app { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100vh; }
.side, .content { min-width: 0; }
.side {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 36px;
  padding: 28px 18px 22px;
  background: var(--org); color: var(--on-org);
}
.side-org { display: flex; flex-direction: column; gap: 10px; padding: 0 10px; }
.org-name { font-size: clamp(24px, 2.1vw, 30px); line-height: 1.05; font-weight: 800; letter-spacing: -0.028em; overflow-wrap: anywhere; }
.org-live { font-size: 13px; color: var(--on-org-2); display: inline-flex; align-items: center; gap: 8px; }
.org-live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--on-org); box-shadow: 0 0 0 3px color-mix(in oklab, var(--on-org) 22%, transparent); }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav a {
  display: flex; align-items: center; height: 40px; padding: 0 12px; border-radius: 9px;
  text-decoration: none; font-size: 15px; font-weight: 550; color: var(--on-org-2);
  transition: background-color 140ms, color 140ms;
}
.side-nav a:hover { background: color-mix(in oklab, var(--on-org) 9%, transparent); color: var(--on-org); }
.side-nav a[aria-current="page"] { background: color-mix(in oklab, var(--on-org) 15%, transparent); color: var(--on-org); font-weight: 700; }
.side-nav a:focus-visible, .side .link-btn:focus-visible { outline-color: var(--on-org); }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 14px; padding: 0 10px; }
.side-me { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: 14px; font-weight: 600; }
.side-me span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side .link-btn { color: var(--on-org); font-size: 13px; }

.content { padding: 44px clamp(24px, 4vw, 56px) 80px; max-width: 1120px; width: 100%; }
.page { display: flex; flex-direction: column; gap: 22px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 4px; }
.page-head h1 { font-size: 34px; line-height: 1.05; font-weight: 800; letter-spacing: -0.028em; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.head-meta { font-size: 14px; color: var(--ink-3); }
.lede { color: var(--ink-2); max-width: 68ch; }
h2 { font-size: 18px; font-weight: 750; letter-spacing: -0.015em; }

/* ---------- resumen ---------- */

/* La ficha: lecturas en vivo compuestas como una línea, no como tarjetas */
.ficha { font-size: 16px; color: var(--ink-2); line-height: 1.7; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 0; }
.ficha .reading { white-space: nowrap; }
.ficha b { font-size: 24px; font-weight: 750; color: var(--ink); letter-spacing: -0.02em; margin-right: 6px; }
.ficha .sep { margin: 0 14px; opacity: 0.45; }
.ficha a.reading { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.ficha a.reading:hover { text-decoration-thickness: 2px; }

/* La portada del manual: el nombre de la organización, grande, sobre su color */
.cover {
  margin: -44px calc(-1 * clamp(24px, 4vw, 56px)) 6px;
  padding: 44px clamp(24px, 4vw, 56px) 30px;
  background: var(--org); color: var(--on-org);
  display: flex; flex-direction: column; gap: 22px;
}
/* el campo llega hasta el borde derecho de la ventana, aunque el contenido tenga ancho máximo */
.cover { box-shadow: 0 0 0 100vmax var(--org); clip-path: inset(0 -100vmax 0 0); }
.cover-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.cover-name { font-size: clamp(40px, 5.2vw, 72px); line-height: 0.98; font-weight: 800; letter-spacing: -0.035em; max-width: 16ch; }
.cover .ficha { color: var(--on-org-2); padding-top: 18px; border-top: 1px solid color-mix(in oklab, var(--on-org) 24%, transparent); }
.cover .ficha b { color: var(--on-org); }
.cover .btn.send { box-shadow: 0 1px 0 rgb(0 0 0 / 0.12), 0 6px 18px -8px rgb(0 0 0 / 0.45); flex: none; }
.cover a.reading:focus-visible, .cover .btn:focus-visible { outline-color: var(--on-org); }
.content:has(.cover:not([hidden])) { padding-top: 44px; }

/* IA: plegada para la persona de TI, con su estado a la vista */
.sheet.tech { gap: 0; }
.sheet.tech summary { display: flex; align-items: center; gap: 14px; cursor: pointer; list-style: none; }
.sheet.tech summary::-webkit-details-marker { display: none; }
.tech-title { font-size: 18px; font-weight: 750; letter-spacing: -0.015em; }
.tech-title em { font-style: normal; font-size: 13px; font-weight: 500; color: var(--ink-3); margin-left: 8px; }
.tech-status { margin-left: auto; font-size: 13.5px; color: var(--ink-2); display: inline-flex; align-items: center; gap: 8px; }
.tech-status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); }
.tech-status.ok::before { background: var(--ok); }
.tech-chev { color: var(--ink-3); transition: transform 200ms var(--ease); }
.sheet.tech[open] .tech-chev { transform: rotate(90deg); }
.sheet.tech[open] summary { margin-bottom: 18px; }
.side-logout-m { display: none; }

.setup { display: flex; flex-direction: column; gap: 14px; padding: 22px 24px; background: var(--org-tint); border-radius: var(--radius); }
.setup-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; counter-reset: s; }
.setup-list li { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 12px; font-size: 14.5px; }
.setup-list li::before { counter-increment: s; content: counter(s); display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--org-ink); color: var(--org-ink); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.setup-list li.done::before { content: "✓"; border-color: var(--org); background: var(--org); color: var(--on-org); font-size: 15px; }
.setup-list li.done { color: var(--ink-3); }
.setup-list li.done b { font-weight: 600; }

/* La lámina: el último comunicado a tamaño de lámina de manual */
.lamina {
  display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 28px 40px;
  padding: 30px 32px; background: var(--sheet); border: 1px solid var(--rule); border-radius: 16px;
}
.lamina-main { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.lamina h2 { font-size: clamp(24px, 2.4vw, 32px); line-height: 1.1; font-weight: 800; letter-spacing: -0.025em; }
.lamina .body { color: var(--ink-2); max-width: 62ch; white-space: pre-line; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 13px; color: var(--ink-3); }
.meta .kind { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); font-weight: 600; }
.meta .kind .ramp { color: var(--org-ink); }
.lamina-reads { display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; gap: 12px; padding-left: 28px; border-left: 1px solid var(--rule); }
.lamina-reads .bar { width: 100%; }
.big-read { font-size: 56px; line-height: 0.95; font-weight: 800; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.big-read small { font-size: 22px; font-weight: 700; color: var(--ink-3); letter-spacing: -0.02em; }

/* barra de lecturas: la firma del panel — se llena en vivo a medida que leen */
.bar { position: relative; height: 8px; border-radius: 8px; background: var(--rule-2); overflow: hidden; }
/* se recorta (no se cambia el ancho): la barra se llena sin recalcular la maqueta */
.bar i { position: absolute; inset: 0; background: var(--org-ink); clip-path: inset(0 calc(100% - var(--w, 0%)) 0 0 round 8px); transition: clip-path 900ms var(--ease); }
.bar i.ack { background: var(--org-ack); }
.bar-label { font-size: 13px; color: var(--ink-3); }
.bar-label b { color: var(--ink); font-weight: 700; }

.block { display: flex; flex-direction: column; gap: 10px; }
.block-head { display: flex; align-items: baseline; justify-content: space-between; }

/* ---------- avisos ---------- */

.composer { display: flex; flex-direction: column; gap: 16px; padding: 24px 26px; background: var(--sheet); border: 1px solid var(--rule); border-radius: 16px; }
.hint { font-size: 13.5px; color: var(--ink-3); margin-top: -6px; }
#composer input.title-input { border: 0; border-bottom: 1px solid var(--rule); border-radius: 0; padding: 8px 0 10px; min-height: 0; font-size: 26px; font-weight: 750; letter-spacing: -0.022em; background: transparent; box-shadow: none; }
#composer input.title-input:focus-visible { border-bottom-color: var(--org); box-shadow: 0 1px 0 var(--org); }
.composer .body-input { font-size: 15px; }
.composer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 28px; padding-top: 4px; }
.composer-grid > div { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; min-width: 0; }
.cg-label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field.inline { flex-direction: row; align-items: center; gap: 10px; }
.field.inline select { width: auto; min-width: 190px; }
.composer-foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding-top: 16px; border-top: 1px solid var(--rule-2); }
.composer-foot .form-msg { margin-left: auto; }
.composer-foot .check { margin-right: auto; }
.composer-foot .form-msg:empty { display: none; }

.notice-list { list-style: none; margin: 0; padding: 0; background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; }
.notice-list:empty { display: none; }
.n-row { border-top: 1px solid var(--rule-2); }
.n-row:first-child { border-top: 0; }
.n-head {
  display: grid; grid-template-columns: 58px minmax(0, 1fr) 170px 200px 24px; align-items: center; gap: 18px;
  width: 100%; padding: 16px 20px; background: none; border: 0; text-align: left; cursor: pointer;
}
.n-head:hover { background: color-mix(in oklab, var(--org-tint) 55%, transparent); }
.n-no { font-size: 13px; font-weight: 700; color: var(--ink-3); }
.n-title { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.n-title strong { font-size: 15.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.n-row.alarma .n-title strong { font-weight: 800; }
.n-to { font-size: 13.5px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.n-reads { display: flex; flex-direction: column; gap: 6px; }
.n-chev { color: var(--ink-3); transition: transform 200ms var(--ease); }
.n-row[aria-expanded="true"] .n-chev { transform: rotate(90deg); }
.n-row.paused .n-title strong, .n-row.paused .n-to { color: var(--ink-3); }
.n-detail { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px 28px; padding: 4px 20px 22px 96px; }
.n-detail .body { color: var(--ink-2); white-space: pre-line; max-width: 64ch; }
.n-actions { display: flex; gap: 8px; align-items: flex-start; }
.receipts { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px 32px; padding-top: 14px; border-top: 1px solid var(--rule-2); }
.rc-group { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.rc-group h3 { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.rc-group h3 b { color: var(--ink); }
.rc-names { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 14px; }
.rc-names span { display: inline-flex; align-items: center; gap: 7px; }
.rc-names em { font-style: normal; font-size: 12.5px; color: var(--ink-3); }
.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; border: 1.5px solid var(--ink-3); }
.dot.on { background: transparent; border-color: var(--org-ink); border-width: 2px; }
.dot.read { background: var(--org-ink); border-color: var(--org-ink); }
.dot.wait { border-style: dashed; }

/* ---------- conocimiento ---------- */

.probe { display: flex; align-items: center; gap: 12px; padding: 6px 6px 6px 16px; background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius); }
.probe .ic { color: var(--ink-3); }
.probe input { border: 0 !important; box-shadow: none !important; padding: 8px 0 !important; background: transparent !important; }
.probe:focus-within { border-color: var(--org); box-shadow: 0 0 0 3px color-mix(in oklab, var(--org) 18%, transparent); }
.probe-results { display: grid; gap: 8px; }
.probe-results:empty { display: none; }
.hit { padding: 14px 18px; background: var(--org-tint); border-radius: var(--radius); display: flex; flex-direction: column; gap: 6px; }
.hit .where { font-size: 13px; font-weight: 700; color: var(--org-ink); }
.hit p { font-size: 14px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.probe-none { font-size: 14px; color: var(--ink-2); padding: 4px 2px; }

.kb-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: start; }
.kb-layout.editing { grid-template-columns: minmax(240px, 0.8fr) minmax(0, 1.6fr); }
.doc-list { list-style: none; margin: 0; padding: 0; background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; }
.doc-list:empty { display: none; }
.doc-list li { border-top: 1px solid var(--rule-2); }
.doc-list li:first-child { border-top: 0; }
.doc-list button { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 16px; width: 100%; padding: 13px 18px; background: none; border: 0; text-align: left; cursor: pointer; }
.doc-list button:hover { background: color-mix(in oklab, var(--org-tint) 55%, transparent); }
.doc-list button[aria-current="true"] { background: var(--org-tint); }
.doc-path { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-path .dir { color: var(--ink-3); font-weight: 500; }
.doc-meta { grid-column: 1; font-size: 12.5px; color: var(--ink-3); }
.doc-size { grid-row: 1 / span 2; grid-column: 2; align-self: center; font-size: 12.5px; color: var(--ink-3); }
.kb-layout.editing .doc-size { display: none; }
.editor { position: sticky; top: 20px; display: flex; flex-direction: column; background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; }
.editor-head { display: flex; align-items: center; gap: 4px; padding: 8px 8px 8px 14px; border-bottom: 1px solid var(--rule-2); }
.editor .path-input { border: 0 !important; box-shadow: none !important; background: transparent !important; font-weight: 700; padding-left: 0 !important; }
.editor .md-input { min-height: min(62vh, 560px); border: 0 !important; border-radius: 0 !important; box-shadow: none !important; padding: 16px 18px !important; font: 400 14px/1.65 ui-monospace, "Cascadia Mono", Consolas, monospace; background: transparent !important; resize: none; }
.editor-foot { display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding: 10px 12px; border-top: 1px solid var(--rule-2); }

/* ---------- personas y administradores ---------- */

.add-row { display: grid; grid-template-columns: 1.2fr 1.2fr 1fr auto; gap: 8px; padding: 10px; background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius); }
#admin-add { grid-template-columns: 1fr 1.2fr 1fr auto; }
.filter-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.filter-row input { max-width: 280px; }

.table-wrap { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius); overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.table th { text-align: left; font-size: 12.5px; font-weight: 650; color: var(--ink-3); padding: 12px 18px; border-bottom: 1px solid var(--rule); white-space: nowrap; }
.table td { padding: 12px 18px; border-bottom: 1px solid var(--rule-2); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: color-mix(in oklab, var(--org-tint) 45%, transparent); }
.p-name { display: flex; flex-direction: column; gap: 1px; }
.p-name strong { font-weight: 650; }
.p-name small { font-size: 12.5px; color: var(--ink-3); }
.p-groups { display: flex; flex-wrap: wrap; gap: 4px; }
.state { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-2); white-space: nowrap; }
.state.off { color: var(--ink-3); }
.hint-code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 13px; color: var(--ink-3); letter-spacing: 0.04em; }
.row-actions { display: flex; justify-content: flex-end; align-items: center; gap: 2px; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); padding: 0 10px; }
.btn.ghost:hover { background: var(--rule-2); color: var(--ink); }
.table tbody tr .row-actions { opacity: 0.72; transition: opacity 150ms; }
.table tbody tr:hover .row-actions, .table tbody tr:focus-within .row-actions { opacity: 1; }
tr.inactive td { color: var(--ink-3); }
tr.editing td { background: var(--org-tint); }
tr.editing input { min-height: 34px !important; padding: 6px 10px !important; }

/* ---------- organización e IA ---------- */

.sheet { display: flex; flex-direction: column; gap: 18px; padding: 26px 28px; background: var(--sheet); border: 1px solid var(--rule); border-radius: 16px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; }
.sheet-foot { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding-top: 4px; }
.sheet-foot .form-msg { margin-right: auto; }
.color-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.color-row input[type="color"] { width: 46px; height: 40px; padding: 3px; border: 1px solid var(--rule); border-radius: var(--radius-s); background: var(--field-bg); cursor: pointer; }
.color-row code { font-size: 13px; color: var(--ink-2); min-width: 64px; }
.swatches { display: flex; gap: 6px; }
.swatches button { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--sheet); box-shadow: 0 0 0 1px var(--rule); cursor: pointer; }
.swatches button[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--ink); }

/* ---------- estados vacíos, diálogo, aviso flotante ---------- */

.empty { display: flex; align-items: center; gap: 18px; padding: 26px 28px; background: var(--sheet); border: 1px dashed var(--rule); border-radius: var(--radius); color: var(--ink-2); --eye: var(--sheet); }
.empty-mark { width: 44px; height: 44px; flex: none; color: var(--org-ink); }
.empty b { color: var(--ink); }

.dlg { width: min(520px, calc(100vw - 32px)); padding: 0; border: 0; border-radius: 16px; background: var(--sheet); color: var(--ink); box-shadow: var(--shadow-pop); }
.dlg::backdrop { background: color-mix(in oklab, var(--org-deep) 55%, transparent); backdrop-filter: blur(2px); }
.dlg[open] { animation: dlg-in 260ms var(--ease); }
@keyframes dlg-in { from { opacity: 0; transform: translateY(8px) scale(0.985); } }
.dlg-body { display: flex; flex-direction: column; gap: 16px; padding: 26px 28px; }
.dlg-body h2 { font-size: 22px; }
.token-box { display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 18px; background: var(--org-tint); border: 1px solid var(--org-line); border-radius: var(--radius); }
.token-box code { flex: 1; font-size: 17px; font-weight: 600; letter-spacing: 0.06em; color: var(--ink); overflow-wrap: anywhere; }
.token-meta { display: flex; gap: 10px; margin: 0; font-size: 13.5px; }
.token-meta dt { color: var(--ink-3); }
.token-meta dd { margin: 0; }
.fine { font-size: 13px; color: var(--ink-3); }
.dlg-foot { display: flex; justify-content: flex-end; }

.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 50;
  padding: 11px 18px; border-radius: 10px; background: var(--ink); color: var(--paper);
  font-size: 14px; font-weight: 600; box-shadow: var(--shadow-pop);
  opacity: 0; transform: translate(-50%, 10px); pointer-events: none;
  transition: opacity 220ms var(--ease), transform 220ms var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: var(--danger); color: var(--on-send); }

/* ---------- pantallas estrechas ---------- */

@media (max-width: 980px) {
  .lamina { grid-template-columns: minmax(0, 1fr); }
  .lamina-reads { padding-left: 0; border-left: 0; padding-top: 20px; border-top: 1px solid var(--rule); }
  .n-head { grid-template-columns: 48px minmax(0, 1fr) 150px 24px; }
  .n-head .n-to { display: none; }
  .kb-layout.editing { grid-template-columns: 1fr; }
  .kb-layout.editing .doc-list { display: none; }
}

@media (max-width: 760px) {
  body { font-size: 15px; }
  .auth { grid-template-columns: 1fr; }
  .auth-field { min-height: 38vh; }
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { position: sticky; top: 0; z-index: 10; height: auto; flex-direction: column; gap: 12px; padding: 14px 16px 10px; }
  .side-org { flex-direction: row; align-items: baseline; justify-content: space-between; gap: 12px; padding: 0; }
  .org-name { font-size: 20px; }
  .org-live { display: none; }
  .side-logout-m { display: inline; color: var(--on-org); font-size: 13px; }
  .side-nav { flex-direction: row; flex-wrap: wrap; gap: 4px; }
  .side-nav a { height: 34px; flex: none; font-size: 14px; padding: 0 11px; }
  .side-foot { display: none; }
  .content { padding: 24px 16px 64px; }
  .page-head h1 { font-size: 28px; }
  .ficha { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; }
  .ficha .sep { display: none; }
  .ficha .reading { display: flex; flex-direction: column; white-space: normal; line-height: 1.3; }
  .ficha b { font-size: 26px; }
  .cover { margin: -24px -16px 4px; padding: 26px 16px 22px; gap: 18px; }
  .cover-top { flex-direction: column; }
  .cover-name { font-size: 40px; }
  .content:has(.cover:not([hidden])) { padding-top: 24px; }
  .filter-row input { max-width: none; width: 100%; }
  .lamina, .composer, .sheet { padding: 20px; }
  .big-read { font-size: 44px; }
  .composer-grid, .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .receipts { grid-template-columns: minmax(0, 1fr); }
  .field.inline select { min-width: 0; }
  .seg { flex-wrap: wrap; }
  .n-head { grid-template-columns: minmax(0, 1fr) 24px; gap: 10px; padding: 14px 16px; }
  .n-head .n-no { display: none; }
  .n-head .n-reads { grid-column: 1; grid-row: 2; }
  .n-head .n-chev { grid-row: 1 / span 2; grid-column: 2; }
  .n-detail { grid-template-columns: 1fr; padding: 0 16px 18px; }
  .add-row, #admin-add { grid-template-columns: 1fr; }
  /* personas y administradores: cada fila como una ficha apilada */
  .table-wrap { overflow: visible; }
  .table thead { display: none; }
  .table, .table tbody { display: block; }
  .table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; padding: 14px 16px; border-bottom: 1px solid var(--rule-2); }
  .table tr:last-child { border-bottom: 0; }
  .table td { display: block; padding: 0; border: 0; min-width: 0; }
  .table td:first-child { grid-column: 1 / -1; }
  .p-name small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
  .table td:nth-child(4) { display: none; }
  .table td:last-child { grid-column: 1 / -1; }
  .table tbody tr .row-actions { opacity: 1; justify-content: flex-start; flex-wrap: wrap; margin-left: -10px; }
  #admins-table td:nth-child(2) { grid-column: 1 / -1; font-size: 13.5px; color: var(--ink-2); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0ms !important; animation-duration: 0ms !important; }
}

/* ---------- mascota ---------- */
.stack-s { display: flex; flex-direction: column; gap: 6px; }
.fine { font-size: 12.5px; color: var(--ink-3); }
.pet-stage { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 28px; align-items: end; }
.pet-floor { display: grid; place-items: end center; height: 240px; padding-bottom: 14px; border-radius: var(--radius); background: linear-gradient(to top, var(--org-tint) 0 22%, transparent 22%), var(--paper); border: 1px solid var(--rule-2); }
.pet-live { width: 170px; }
.pet-id { display: flex; flex-direction: column; gap: 18px; padding-bottom: 4px; }
.rate-row { display: flex; align-items: center; gap: 10px; }
.rate-row input[type="range"] { flex: 1; min-width: 0; accent-color: var(--org); }
.rate-end { font-size: 12.5px; color: var(--ink-3); }

.pet-gallery { display: flex; flex-direction: column; gap: 14px; padding-top: 18px; border-top: 1px solid var(--rule-2); }
.pet-group { display: flex; flex-direction: column; gap: 8px; }
.pet-group-name { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.pet-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.pet-tile { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 6px 8px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--sheet); color: var(--ink-2); font: inherit; font-size: 12.5px; cursor: pointer; transition: border-color 160ms var(--ease), background 160ms var(--ease); }
.pet-tile:hover { border-color: color-mix(in oklab, var(--rule) 40%, var(--ink)); }
.pet-tile[aria-checked="true"] { border-color: var(--org-ink); background: var(--org-tint); color: var(--ink); font-weight: 600; box-shadow: inset 0 0 0 1px var(--org-ink); }
.pet-tile:focus-visible { outline: 2px solid var(--org); outline-offset: 2px; }
.pet-tile:disabled { cursor: default; opacity: 0.6; }
.pet-tile .pet-thumb { width: 62px; }
.pet-tile .pet-none { width: 62px; }
.pet-none { aspect-ratio: 140 / 180; border: 1.5px dashed color-mix(in oklab, var(--ink-3) 55%, transparent); border-radius: 10px; display: grid; place-items: center; color: var(--ink-3); }

.pet-anim { width: 100%; aspect-ratio: 140 / 180; background-repeat: no-repeat; }
.anim-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.pet-tile .pet-thumb, .anim-prev, .pet-live { display: grid; place-items: end center; }
.pet-thumb { height: 80px; }
.pet-thumb > *, .pet-live > *, .anim-prev > * { width: 100%; }
.pet-svg svg { display: block; width: 100%; height: auto; overflow: visible; }
.pet-svg .rig { transform-box: view-box; transform-origin: 70px 176px; }
.pet-live .pet-svg .rig { animation: pet-breathe 2.6s ease-in-out infinite; }
@keyframes pet-breathe { 50% { transform: scale(1.025, 0.975); } }

.anim-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; border-top: 1px solid var(--rule-2); }
.anim-row { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--rule-2); }
.anim-prev { width: 56px; justify-self: center; }
.anim-prev .pet-none { width: 56px; }
.anim-name { font-weight: 650; }
.anim-name em { font-style: normal; font-weight: 500; font-size: 12.5px; color: var(--org-ink); margin-left: 6px; }
.anim-desc { font-size: 13.5px; color: var(--ink-2); }
.anim-tune { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; font-size: 13px; color: var(--ink-2); }
.anim-tune label { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
#anim-list .anim-tune input { width: 68px; flex: none; min-height: 32px; height: 32px; padding: 0 8px; font-variant-numeric: tabular-nums; }
.anim-tune .dim { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.anim-actions { display: flex; gap: 6px; }

@media (max-width: 760px) {
  .pet-stage { grid-template-columns: minmax(0, 1fr); }
  .pet-floor { height: 210px; }
  .anim-row { grid-template-columns: 56px minmax(0, 1fr); }
  .anim-actions { grid-column: 2; }
  .anim-tune { display: grid; grid-template-columns: 1fr 1fr; }
  .anim-tune .dim { grid-column: 1 / -1; }
  .anim-tune label { justify-content: space-between; }
}
@media (prefers-reduced-motion: reduce) {
  .pet-live .pet-svg .rig { animation: none; }
}

/* ---------- solicitudes ---------- */
.req-list { list-style: none; margin: 0; padding: 0; background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; }
.req-list:empty { display: none; }
.req-row { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; gap: 16px; align-items: start; padding: 16px 20px; border-top: 1px solid var(--rule-2); }
.req-row:first-child { border-top: 0; }
.req-kind { font-size: 12.5px; font-weight: 650; color: var(--ink-2); padding-top: 2px; }
.req-main { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.req-title { font-weight: 650; font-size: 15.5px; }
.req-detail { color: var(--ink-2); font-size: 14px; white-space: pre-line; }
.req-answer { margin: 4px 0 0; padding: 8px 12px; border-left: 3px solid var(--org-line); background: var(--org-tint); border-radius: 0 var(--radius-s) var(--radius-s) 0; font-size: 14px; color: var(--ink-2); }
.req-state { font-size: 13px; font-weight: 600; color: var(--ink-2); white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; padding-top: 2px; }
.req-state::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--warn); }
.req-row.en_curso .req-state::before { background: var(--org-ink); }
.req-row.resuelta .req-state::before, .req-row.cerrada .req-state::before { background: var(--ok); }
.req-row.resuelta .req-title, .req-row.cerrada .req-title { color: var(--ink-2); }
.team-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; border-top: 1px solid var(--rule-2); }
.team-row { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 16px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--rule-2); }
.team-row input:disabled { opacity: 0.55; }
@media (max-width: 760px) {
  .req-row { grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 14px 16px; }
  .team-row { grid-template-columns: minmax(0, 1fr); gap: 8px; }
}
#req-filter { align-self: flex-start; }

.pet-roam { align-items: flex-start; padding-top: 14px; border-top: 1px solid var(--rule-2); font-size: 14px; color: var(--ink-2); }
.pet-roam input { margin-top: 2px; }

/* ---------- wg-hubmy: entrada con Hubmy, invitación, mascotas instaladas e instaladores ---------- */
.hubmy-btn { align-self: flex-start; display: inline-flex; align-items: center; gap: 10px; height: 46px; padding: 0 18px; border-radius: var(--radius-s); background: #fff; color: #1c1c1c; border: 1px solid #e2e2e2; font-weight: 650; text-decoration: none; }
.hubmy-btn img { height: 18px; width: auto; display: block; }
.hubmy-btn:hover { border-color: #c9c9c9; }
.hubmy-btn[aria-disabled] { opacity: 0.5; pointer-events: none; }
.invite { display: grid; gap: 14px; margin-bottom: 22px; }
.invite .token-box code { font-size: 15px; letter-spacing: 0; }
.invite.closed .token-box { opacity: 0.55; }
.invite-actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.device-list { list-style: none; margin: 0; padding: 6px 0; display: grid; gap: 6px; }
.device-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--ink-2); }
.devices-row td { background: var(--org-tint); }
.dl-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.dl-list li { display: grid; grid-template-columns: 90px 1fr; gap: 4px 12px; font-size: 14px; align-items: baseline; }
.dl-list li > span { grid-column: 2; overflow-wrap: anywhere; }
.dl-list li.missing b { color: var(--ink-3); }
.swatch-pick { display: inline-flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; color: var(--ink-2); }
.swatch-pick input:disabled { opacity: 0.35; cursor: not-allowed; }
.check.small { font-size: 13px; }
.team-switch select { width: 100%; margin-bottom: 10px; }
.bad { color: var(--danger); }
.logo-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.logo-box { width: 120px; height: 64px; border: 1px dashed var(--rule); border-radius: var(--radius-s); display: grid; place-items: center; background: var(--sheet); overflow: hidden; }
.logo-box img { max-width: 100%; max-height: 100%; object-fit: contain; }

/* ----- grupos y uniformes ----- */
.groups-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 24px; }
.groups-head > div { max-width: 62ch; }
.group-new { display: flex; gap: 8px; }
.group-new input { width: 240px; }
.group-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 12px; }
.group-card { display: flex; gap: 14px; padding: 12px 14px; border: 1px solid var(--rule); border-radius: 12px; background: var(--sheet); }
.group-card.plain .group-prev { opacity: 0.75; }
.group-prev { flex: 0 0 82px; display: grid; place-items: end center; }
.group-prev .pet-svg { width: 82px; }
.group-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.group-title { display: flex; align-items: center; gap: 10px; }
.group-title input { flex: 1; min-width: 0; font-weight: 650; }
.group-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.group-badge { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.icon-picks { display: flex; flex-wrap: wrap; gap: 4px; }
.icon-pick { width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid var(--rule); border-radius: 8px; background: var(--sheet); color: var(--ink-2); cursor: pointer; font-size: 13px; padding: 0; }
.icon-pick svg { width: 16px; height: 16px; fill: currentColor; }
.icon-pick:hover { border-color: color-mix(in oklab, var(--rule) 40%, var(--ink)); }
.icon-pick[aria-pressed="true"] { background: var(--org); border-color: var(--org); color: var(--on-org); }
@media (max-width: 560px) {
  .group-grid { grid-template-columns: 1fr; }
  .group-new { width: 100%; }
  .group-new input { flex: 1; width: auto; }
}

/* ----- edificio: decorar ----- */
.decor-save { display: flex; align-items: center; gap: 8px; }
.decor-editor { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 24px; align-items: start; }
.decor-stage-wrap { border: 1px solid var(--rule); border-radius: 12px; background: color-mix(in oklab, var(--sheet) 70%, var(--rule)); padding: 6px; }
.decor-stage { display: block; width: 100%; height: auto; touch-action: none; user-select: none; outline: none; border-radius: 8px; }
.decor-stage:focus-visible { box-shadow: 0 0 0 2px var(--org); }
.decor-stage .dz { cursor: grab; }
.decor-stage .dz:active { cursor: grabbing; }
.decor-tools { display: flex; flex-direction: column; gap: 12px; position: sticky; top: 16px; }
.decor-floor { display: flex; align-items: baseline; gap: 10px; }
.decor-sel { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border: 1px solid var(--rule); border-radius: 10px; background: var(--org-tint); }
.decor-sel-btns, .decor-row { display: flex; flex-wrap: wrap; gap: 6px; }
.decor-palette { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 6px; }
.decor-pick { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 4px; border: 1px solid var(--rule); border-radius: 10px; background: var(--sheet); cursor: pointer; font-size: 12px; color: var(--ink-2); }
.decor-pick svg { width: 64px; height: 54px; }
.decor-pick:hover { border-color: var(--org); color: var(--ink); }
kbd { font: 600 11px/1 var(--mono, monospace); padding: 2px 5px; border: 1px solid var(--rule); border-radius: 4px; }
@media (max-width: 860px) {
  .decor-editor { grid-template-columns: minmax(0, 1fr); }
  .decor-tools { position: static; }
}

/* grupos de una persona: se marcan, no se escriben */
.group-picker .chip { height: 28px; padding: 0 10px; }
.gdot { width: 10px; height: 10px; border-radius: 50%; box-shadow: 0 0 0 1.5px var(--sheet); }

/* ----- reuniones ----- */
.calls-layout { display: grid; grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.5fr); gap: 20px; align-items: start; }
.calls-list { display: flex; flex-direction: column; gap: 6px; }
.call-row { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 4px 14px; padding: 12px 14px; border: 1px solid var(--rule); border-radius: 12px; background: var(--sheet); text-align: left; cursor: pointer; color: var(--ink); font: inherit; }
.call-row:hover { border-color: color-mix(in oklab, var(--rule) 40%, var(--ink)); }
.call-row.on { border-color: var(--org); box-shadow: 0 0 0 1px var(--org); }
.call-when, .call-topic { display: flex; flex-direction: column; min-width: 0; font-weight: 650; }
.call-when { font-size: 13px; }
.call-row small { font-weight: 450; color: var(--ink-2); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.call-tags { grid-column: 2; display: flex; flex-wrap: wrap; gap: 4px; }
.live { color: #c0392b; }
.call-detail { position: sticky; top: 16px; gap: 22px; }
.call-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.call-head h2 { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.call-sec { display: flex; flex-direction: column; gap: 10px; }
.call-sec h3 { font-size: 15px; font-weight: 750; }
.call-sec-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.minutes { margin: 0; padding: 14px 16px; border-radius: 10px; background: var(--org-tint); white-space: pre-wrap; font: inherit; font-size: 14px; line-height: 1.55; }
.call-video { width: 100%; max-height: 380px; border-radius: 10px; background: #000; }
.call-files { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.call-files li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--rule); border-radius: 10px; }
.call-lines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 360px; overflow-y: auto; }
.call-lines li { display: flex; gap: 10px; font-size: 14px; }
.call-lines time { flex: none; width: 44px; color: var(--ink-2); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.call-lines .k-say { color: var(--ink-2); font-style: italic; }
@media (max-width: 900px) { .calls-layout { grid-template-columns: minmax(0, 1fr); } .call-detail { position: static; } }
