/* Estructura y piezas del Kit vivo de @escala-dev/ui-components-react (spec 250 y 251) con la paleta de Construcciones Shaddai. */
@import url('https://fonts.googleapis.com/css2?family=Instrument+Sans:wght@400..700&display=swap');

:root {
  color-scheme: light;
  /* Paleta de Shaddai: teal #337A88, azul petróleo #1A3E45, celeste #90CAD5, tinta #20303C y fondo #F7F9FA. */
  --frame: 26 62 69;
  --frame-interactive: 49 87 95;
  --workspace: 247 249 250;
  --raised: 255 255 255;
  --card: 241 245 246;
  --interactive: 234 241 243;
  --interactive-hover: 222 233 236;
  --line: 228 235 238;
  --heading: 26 62 69;
  --fg: 32 48 60;
  --fg-secondary: 69 90 102;
  --fg-muted: 102 121 133;
  --accent: 51 122 136;
  --accent-hover: 43 104 116;
  --action: 51 122 136;
  --action-hover: 26 62 69;
  --sky: 144 202 213;
  --soft: 234 245 247;
  --success: 52 115 78;
  --success-soft: 234 247 239;
  --warning: 154 104 47;
  --warning-soft: 255 245 231;
  --danger: 180 69 60;
  --danger-soft: 253 236 234;
  --info: 69 90 102;
  --font-sans: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-tile: 30px;
  --workspace-inset: 12px;
  --workspace-radius: 22px;
  --sidebar-width: 252px;
  --hairline: 1px solid rgb(var(--fg) / 0.05);
  --shadow-control: 0 3px 8px rgb(51 122 136 / 0.17);
  --shadow-tile: 0 0 0 1px rgb(var(--line)), 0 8px 24px rgb(26 62 69 / 0.06);
  --shadow-raised: 0 0 0 1px rgb(var(--line)), 0 8px 24px rgb(26 62 69 / 0.12);
  --shadow-overlay: 0 20px 60px rgb(0 0 0 / 0.18);
  --duration-fast: 160ms;
  --duration-overlay: 240ms;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --living-spring: cubic-bezier(0.22, 1.12, 0.36, 1);
  --living-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  /* Resortes de spec 242; los navegadores sin linear() usan la curva estándar con duraciones parecidas. */
  --spring-smooth: var(--ease-out); --spring-smooth-duration: 420ms;
  --spring-snappy: var(--ease-out); --spring-snappy-duration: 300ms;
  --spring-press: var(--ease-out); --spring-press-duration: 200ms;
  --select-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23667985' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E");
  font-family: var(--font-sans);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: rgb(var(--fg));
  background: rgb(var(--frame));
}

@supports (transition-timing-function: linear(0, 1)) {
  :root:root {
    --spring-smooth: linear(0, 0.019, 0.068, 0.134, 0.208, 0.286, 0.363, 0.436, 0.505, 0.568, 0.625, 0.676, 0.721, 0.761, 0.795, 0.826, 0.852, 0.874, 0.894, 0.91, 0.924, 0.936, 0.946, 0.955, 0.962, 0.968, 0.974, 0.978, 0.982, 0.985, 0.987, 0.989, 0.991, 0.993, 0.994, 0.995, 0.996, 0.997, 0.997, 0.998, 1);
    --spring-smooth-duration: 674ms;
    --spring-snappy: linear(0, 0.018, 0.065, 0.131, 0.207, 0.289, 0.371, 0.451, 0.527, 0.597, 0.661, 0.717, 0.767, 0.811, 0.848, 0.88, 0.907, 0.929, 0.947, 0.962, 0.973, 0.983, 0.99, 0.995, 0.999, 1.002, 1.004, 1.005, 1.006, 1.006, 1.006, 1.006, 1.006, 1.005, 1.005, 1.004, 1.004, 1.003, 1.003, 1.002, 1);
    --spring-snappy-duration: 451ms;
    --spring-press: linear(0, 0.01, 0.035, 0.073, 0.119, 0.171, 0.226, 0.283, 0.34, 0.397, 0.451, 0.503, 0.552, 0.599, 0.642, 0.681, 0.718, 0.751, 0.782, 0.809, 0.834, 0.856, 0.875, 0.893, 0.908, 0.922, 0.934, 0.944, 0.953, 0.961, 0.968, 0.973, 0.978, 0.983, 0.986, 0.989, 0.992, 0.994, 0.995, 0.997, 1);
    --spring-press-duration: 231ms;
  }
}

* { box-sizing: border-box; }
.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; }
body { margin: 0; min-height: 100vh; font-size: 0.9375rem; line-height: 1.45; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
::selection { background: rgb(var(--accent) / 0.3); }
:focus-visible { outline: 2px solid rgb(var(--accent)); outline-offset: 2px; }
[hidden] { display: none !important; }
.icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

/* Marco y menú lateral (kit "Menú lateral"): grupos con nombre, fila activa en el tercer tono y su ícono en naranja. */
.app-shell { display: flex; min-height: 100vh; }
.sidebar { --fg: 255 255 255; --fg-secondary: 209 223 224; --fg-muted: 169 194 197; color: rgb(var(--fg)); position: fixed; inset: 0 auto 0 0; z-index: 30; width: var(--sidebar-width); display: flex; flex-direction: column; padding: 18px 12px 14px; overflow-y: auto; background: rgb(var(--frame)); scrollbar-width: thin; scrollbar-color: transparent transparent; }
.sidebar:hover { scrollbar-color: rgb(var(--frame-interactive)) transparent; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 20px; color: inherit; text-decoration: none; border-radius: var(--radius-lg); }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.55); color: rgb(var(--sky)); font-size: 0.9375rem; font-weight: 600; }
.brand-text b { display: block; font-size: 0.9375rem; font-weight: 600; letter-spacing: -0.01em; }
.brand-text small { display: block; font-size: 0.71875rem; color: rgb(var(--fg-muted)); }
.nav-list { position: relative; display: grid; gap: 14px; }
/* Spec 250: un solo resaltado se desliza hasta la vista elegida en lugar de repintar cada fila. */
.nav-highlight { position: absolute; left: 0; right: 0; top: 0; z-index: 0; height: var(--nav-h, 0); border-radius: var(--radius-lg); background: rgb(var(--sky) / 0.15); box-shadow: inset 3px 0 rgb(var(--sky)); transform: translateY(var(--nav-y, 0)); pointer-events: none; transition: transform 450ms var(--living-spring), height 450ms var(--living-spring), opacity 200ms var(--living-ease); }
.nav-highlight[data-ready="false"] { transition: none; }
.nav-highlight[data-visible="false"] { opacity: 0; }
.nav-list[data-highlight="ready"] .nav-item.active { background: transparent; box-shadow: none; }
.nav-group, .nav-item { position: relative; z-index: 1; }
.nav-list.entering .nav-item:not([hidden]) { animation: nav-in 420ms var(--living-spring) backwards; animation-delay: calc(var(--i, 0) * 28ms); }
@keyframes nav-in { from { opacity: 0; transform: translateX(-8px); } }
.nav-group { display: grid; gap: 1px; }
.nav-group-label { margin: 0; padding: 0 10px 4px; font-size: 0.71875rem; color: rgb(var(--fg-muted)); }
.nav-item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 38px; padding: 0 10px; border: 0; border-radius: var(--radius-lg); background: none; color: rgb(var(--fg-secondary)); font-size: 0.875rem; text-align: left; cursor: pointer; transition: background-color 300ms ease-out, color var(--duration-fast) ease-out, transform var(--spring-press-duration) var(--spring-press); }
.nav-item .icon { width: 17px; height: 17px; color: rgb(var(--fg-muted)); transition: color var(--duration-fast) ease-out; }
.nav-item:hover { background: rgb(var(--sky) / 0.1); color: rgb(var(--fg)); }
.nav-item.active { background: rgb(var(--sky) / 0.15); color: rgb(var(--fg)); font-weight: 500; box-shadow: inset 3px 0 rgb(var(--sky)); }
.nav-item.active .icon { color: rgb(var(--sky)); }
.nav-item:active { transform: scale(0.98); transition-duration: 300ms, var(--duration-fast), 90ms; }
.nav-item i { margin-left: auto; min-width: 20px; padding: 1px 7px; border-radius: 999px; background: rgb(var(--frame-interactive)); font-style: normal; font-size: 0.71875rem; font-weight: 500; text-align: center; color: rgb(var(--fg-secondary)); font-variant-numeric: tabular-nums; }
.sidebar-footer { margin-top: auto; display: grid; gap: 10px; padding-top: 18px; }
.account { display: flex; align-items: center; gap: 10px; padding: 0 6px; min-width: 0; }
.avatar { width: 32px; height: 32px; flex: none; border: 0; border-radius: 50%; background: rgb(var(--soft)); color: rgb(var(--heading)); font-size: 0.75rem; font-weight: 600; }
.account-text { min-width: 0; }
.account-text strong { display: block; overflow: hidden; font-size: 0.875rem; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.account-text small { display: block; font-size: 0.71875rem; color: rgb(var(--fg-muted)); }
.sidebar-bottom { display: flex; align-items: center; gap: 8px; padding: 2px 8px 0; font-size: 0.75rem; color: rgb(var(--fg-muted)); }
.status-dot { width: 6px; height: 6px; flex: none; border-radius: 50%; background: rgb(var(--fg-muted)); }
.status-dot.live { background: rgb(112 199 163); }
.demo-tag { margin-left: auto; padding: 3px 9px; border-radius: 999px; background: rgb(var(--frame-interactive)); color: rgb(var(--fg-secondary)); font-size: 0.71875rem; font-weight: 500; }

/* Lienzo del kit: el espacio de trabajo casi negro y las piezas flotan sobre él como tiles. */
.main-area { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: calc(100vh - 2 * var(--workspace-inset)); margin: var(--workspace-inset) var(--workspace-inset) var(--workspace-inset) var(--sidebar-width); border-radius: var(--workspace-radius); background: rgb(var(--workspace)); }
.topbar { display: none; }
.notice { display: flex; align-items: center; gap: 8px; width: fit-content; max-width: calc(100% - 64px); margin: 22px 32px 0; padding: 7px 14px; border-radius: 999px; background: rgb(241 248 249); box-shadow: inset 0 0 0 1px rgb(215 234 237); color: rgb(69 101 107); font-size: 0.8125rem; }
.notice > .icon { width: 15px; height: 15px; color: rgb(var(--accent)); }
.notice > .icon.live { color: rgb(var(--success)); }
.notice strong { color: rgb(var(--heading)); font-weight: 500; }
.page-content { flex: 1; display: grid; align-content: start; gap: 22px; width: 100%; max-width: 1440px; margin: 0 auto; padding: 26px 32px 36px; }
footer { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 32px 18px; border-top: var(--hairline); font-size: 0.75rem; color: rgb(var(--fg-muted)); }
.footer-right { margin-left: auto; }

/* Encabezado de pantalla (KitPageHead): título grande y ligero, una línea apagada y las acciones a la derecha. */
.screen-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.screen-head-text { flex: 1 1 20rem; min-width: 0; }
.trail { margin: 0 0 8px; font-size: 0.8125rem; color: rgb(var(--fg-muted)); }
.trail .sep { margin: 0 7px; }
.trail .current { color: rgb(var(--fg-secondary)); }
.screen-head h1 { margin: 0; color: rgb(var(--heading)); font-size: 2.25rem; font-weight: 400; line-height: 1.25; letter-spacing: -0.025em; }
.screen-head.large h1 { font-size: 2.5rem; }
.screen-head .subtitle { margin: 6px 0 0; font-size: 1rem; color: rgb(var(--fg-muted)); }
.screen-head-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.screen-head-actions .button { height: 46px; padding: 0 18px; font-size: 0.9375rem; }

/* Botones: píldoras; el naranja profundo lleva la acción principal con texto blanco. */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border: 0; border-radius: 999px; background: rgb(var(--action)); color: #fff; font-size: 0.875rem; font-weight: 500; white-space: nowrap; cursor: pointer; box-shadow: var(--shadow-control); transition: background-color var(--duration-fast) ease-out, transform var(--spring-press-duration) var(--spring-press); }
.button:hover { background: rgb(var(--action-hover)); }
.button:active { transform: scale(0.96); transition-duration: var(--duration-fast), 90ms; }
.button .icon { width: 16px; height: 16px; }
.button.secondary { background: rgb(var(--interactive)); color: rgb(var(--fg)); box-shadow: none; }
.button.secondary:hover { background: rgb(var(--interactive-hover)); }
.button.ghost { background: transparent; color: rgb(var(--fg-muted)); box-shadow: none; }
.button.ghost:hover { background: rgb(var(--interactive)); color: rgb(var(--fg)); }
.button.small { height: 30px; padding: 0 12px; font-size: 0.75rem; }

/* StatStrip: las cifras con que abre la pantalla, en una fila sin caja. */
.figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr)); gap: 22px 28px; margin: 4px 0 2px; }
.figure { min-width: 0; }
.figure dt { font-size: 0.9375rem; color: rgb(var(--fg-muted)); }
.figure dd { margin: 0; }
.figure .value { margin-top: 10px; color: rgb(var(--heading)); font-size: 2.625rem; font-weight: 400; line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.figure .caption { margin-top: 8px; font-size: 0.8125rem; color: rgb(var(--fg-muted)); }
.figures.quad { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px 16px; }
.figures.quad .value { font-size: 2rem; }
.figure.attention dt { color: rgb(var(--warning)); }

/* Tile (spec 250): una pieza de la pantalla flotando sobre el lienzo, con título pequeño y el contenido directo sobre ella. */
.layout-main { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(300px, 1fr); gap: 14px; align-items: start; }
.layout-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.layout-thirds { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: stretch; }
.stack { display: grid; gap: 14px; min-width: 0; }
.layout-paired { align-items: stretch; }
.layout-paired > .stack { grid-row: span 2; grid-template-rows: subgrid; }
.layout-paired .hatch-columns { flex: 1; align-items: stretch; }
.layout-paired .hatch-track { flex: 1; height: auto; min-height: 132px; }
/* Columnas de igual alto: la última pieza de cada columna crece hasta cerrar el hueco. */
.layout-fill { align-items: stretch; }
.layout-fill > .stack { display: flex; flex-direction: column; }
.layout-fill > .stack > :last-child { flex: 1; }
.layout-fill .panel > .panel-card:last-child { display: flex; flex: 1; flex-direction: column; }
.layout-fill .panel-card > .rows:only-child { flex: 1; align-content: start; }
.layout-fill .panel-card > .rows:has(> .empty:only-child) { align-content: stretch; }
.rows > .empty:only-child { display: grid; place-items: center; }
.rows.grid-rows { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); column-gap: 28px; }
.panel { display: flex; flex-direction: column; min-width: 0; padding: 18px; border-radius: var(--radius-tile); background: rgb(var(--raised)); box-shadow: var(--shadow-tile); font-size: 0.8125rem; line-height: 1.35; }
.panel-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; min-height: 24px; margin-bottom: 12px; }
.panel-head > div { flex: 1 1 8rem; min-width: 0; }
.panel-head h2 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; color: rgb(var(--heading)); font-size: 0.875rem; font-weight: 600; line-height: 1.35; }
.panel-head p { margin: 2px 0 0; font-size: 0.71875rem; line-height: 1.4; color: rgb(var(--fg-muted)); }
.panel-caption { flex: none; font-size: 0.71875rem; color: rgb(var(--fg-muted)); font-variant-numeric: tabular-nums; }
.count { padding: 2px 8px; border-radius: 999px; background: rgb(var(--interactive)); font-size: 0.71875rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.panel-card { min-width: 0; }
.panel-card.grow { flex: 1; }
.panel-card + .panel-card { margin-top: 14px; padding-top: 14px; border-top: var(--hairline); }
.card-title { margin: 0 0 10px; font-size: 0.71875rem; color: rgb(var(--fg-muted)); }
.panel-note { margin: 12px 0 0; font-size: 0.71875rem; line-height: 1.45; color: rgb(var(--fg-muted)); }
.kpi-value { margin: 2px 0 0; color: rgb(var(--heading)); font-size: 2.125rem; font-weight: 600; line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.kpi-note { margin: 4px 0 0; font-size: 0.71875rem; color: rgb(var(--fg-muted)); }

/* KitList y KitRow: filas directas sobre el tile, ícono en un cuadrado redondeado y respuesta tonal al puntero. */
.rows { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; }
.row { display: flex; align-items: center; gap: 10px; min-width: 0; min-height: 44px; padding: 6px 10px; margin: 0 -10px; border-radius: var(--radius-lg); font-size: 0.9375rem; transition: background-color 300ms ease-out; animation: row-in 400ms var(--living-spring) both; }
.row:hover { background: rgb(var(--interactive) / 0.5); }
.row-main { flex: 1; min-width: 0; }
.row-main strong { display: block; overflow: hidden; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.row-main small { display: block; overflow: hidden; font-size: 0.8125rem; color: rgb(var(--fg-muted)); text-overflow: ellipsis; white-space: nowrap; }
.row-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
.initials { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 50%; background: rgb(var(--interactive)); font-size: 0.71875rem; font-weight: 600; color: rgb(var(--fg)); }
.kit-icon { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 10px; background: rgb(var(--interactive)); color: rgb(var(--fg-secondary)); }
.kit-icon .icon { width: 15px; height: 15px; }
.kit-icon.on { background: rgb(var(--action)); color: #fff; }
.date-block { width: 42px; flex: none; display: flex; flex-direction: column; align-items: center; padding: 4px 0; border-radius: var(--radius-lg); box-shadow: inset 0 0 0 1.5px rgb(var(--fg) / 0.08); text-align: center; line-height: 1.15; }
.date-block.on { box-shadow: inset 0 0 0 1.5px rgb(var(--accent)); }
.date-block b { font-size: 1rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.date-block small { font-size: 0.59375rem; letter-spacing: 0.04em; text-transform: uppercase; color: rgb(var(--fg-muted)); }
.empty { padding: 24px 8px; font-size: 0.8125rem; text-align: center; color: rgb(var(--fg-muted)); }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 24px; max-width: 100%; flex: none; padding: 0 10px; border-radius: 999px; background: rgb(var(--interactive)); color: rgb(var(--fg-secondary)); font-size: 0.71875rem; font-weight: 500; line-height: 1; white-space: nowrap; transition: color 300ms ease-out; }
.chip::before { content: ""; width: 6px; height: 6px; flex: none; border-radius: 50%; background: rgb(var(--fg)); }
.chip.idle::before { background: rgb(var(--fg-muted)); }
.chip.success { background: rgb(var(--success-soft)); color: rgb(var(--success)); }
.chip.success::before { background: rgb(var(--success)); }
.chip.warning { background: rgb(var(--warning-soft)); color: rgb(var(--warning)); }
.chip.warning::before { background: rgb(var(--warning)); }
.chip.danger { background: rgb(var(--danger-soft)); color: rgb(var(--danger)); }
.chip.danger::before { background: rgb(var(--danger)); }
.chip.accent { background: rgb(var(--soft)); color: rgb(var(--heading)); }
.chip.accent::before { background: rgb(var(--accent)); }
.chip.plain::before { display: none; }
.chip-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.row-copy { display: -webkit-box; margin: 4px 0 0; overflow: hidden; font-size: 0.8125rem; line-height: 1.45; color: rgb(var(--fg-secondary)); -webkit-box-orient: vertical; -webkit-line-clamp: 2; }

/* Tonos de los gráficos vivos: el naranja muestra progreso y lo principal; verde terminó bien, ámbar espera a alguien y rojo falló. */
.t-accent { color: rgb(var(--accent)); }
.t-warning { color: rgb(var(--warning)); }
.t-success { color: rgb(var(--success)); }
.t-danger { color: rgb(var(--danger)); }
.t-neutral { color: rgb(var(--fg-muted)); }
.t-sky { color: rgb(var(--sky)); }
.t-secondary { color: rgb(var(--fg-secondary)); }
.bar-list { display: grid; padding: 0; margin: 0; list-style: none; }
.bar-item { display: grid; grid-template-columns: minmax(0, 8rem) minmax(0, 1fr) 2.75rem; align-items: center; gap: 12px; padding: 8px 0; font-size: 0.8125rem; }
.bar-label { overflow: hidden; color: rgb(var(--fg-secondary)); text-overflow: ellipsis; white-space: nowrap; }
.bar-track { height: 8px; overflow: hidden; border-radius: 4px; background: rgb(var(--interactive)); }
.bar-fill { display: block; height: 100%; border-radius: 4px; background: currentColor; transform-origin: left; animation: grow-x 800ms var(--living-spring) both; }
.bar-value { text-align: right; color: rgb(var(--fg-muted)); font-variant-numeric: tabular-nums; white-space: nowrap; }
.segments { display: flex; gap: 3px; height: 10px; }
.segment { min-width: 4px; flex-basis: 0; border-radius: 6px; background: currentColor; transform-origin: left; animation: grow-x 900ms var(--living-spring) both; }
.segments-empty { flex: 1; border-radius: 6px; background: rgb(var(--interactive)); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 10px 0 0; padding: 0; list-style: none; font-size: 0.75rem; color: rgb(var(--fg-muted)); }
.legend li { display: inline-flex; align-items: center; gap: 6px; }
.legend b { color: rgb(var(--fg-secondary)); font-weight: 400; font-variant-numeric: tabular-nums; }
.legend.vertical { display: grid; gap: 8px; flex: 1; min-width: 0; margin: 0; font-size: 0.8125rem; }
.legend.vertical li { gap: 8px; }
.legend.vertical li > span { flex: 1; min-width: 0; overflow: hidden; color: rgb(var(--fg-secondary)); text-overflow: ellipsis; white-space: nowrap; }
.legend.vertical b { color: rgb(var(--fg)); }
.swatch { width: 8px; height: 8px; flex: none; border-radius: 50%; background: currentColor; }
.chart-empty { margin: 0; padding: 14px 0; font-size: 0.8125rem; color: rgb(var(--fg-muted)); }
.donut-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.donut-box { position: relative; width: 120px; height: 120px; flex: none; display: grid; place-items: center; }
.donut { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.donut circle { fill: none; stroke-width: 4; }
.donut .track { stroke: rgb(var(--interactive)); }
.donut .seg { stroke: currentColor; animation: donut-in 900ms var(--living-spring) both; }
.donut-figure { position: relative; text-align: center; }
.donut-figure b { display: block; font-size: 1.125rem; font-weight: 600; line-height: 1.2; font-variant-numeric: tabular-nums; }
.donut-figure small { display: block; font-size: 0.625rem; color: rgb(var(--fg-muted)); }
.stack-rows { display: grid; gap: 14px; }
.stack-row { display: grid; gap: 7px; font-size: 0.8125rem; }
.stack-row > div:first-child { display: flex; justify-content: space-between; gap: 12px; color: rgb(var(--fg-secondary)); }
.stack-row b { color: rgb(var(--fg)); font-weight: 500; font-variant-numeric: tabular-nums; }
.funnel { display: flex; flex-direction: column; margin: 2px 0 0; padding: 0; list-style: none; }
.funnel li { display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 30px; margin: 0 auto 6px; padding: 0 12px; overflow: hidden; border-radius: 10px; color: #fff; font-size: 0.75rem; white-space: nowrap; animation: funnel-open 800ms var(--living-spring) both; }
.funnel li span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.funnel li span:last-child { font-variant-numeric: tabular-nums; }
.funnel .f-0 { background: rgb(var(--accent)); }
.funnel .f-1 { background: rgb(var(--accent-hover)); }
.funnel .f-2 { background: rgb(34 85 95); }
.funnel .f-3 { background: rgb(var(--heading)); }
.board { display: grid; gap: 10px; margin-top: 4px; }
.board-column { min-width: 0; }
.board-column > p { display: flex; justify-content: space-between; margin: 0 0 6px; padding: 0 2px 6px; border-bottom: 1px solid rgb(var(--fg) / 0.06); font-size: 0.71875rem; color: rgb(var(--fg-muted)); }
.board-column ul { margin: 0; padding: 0; list-style: none; }
.board-card { margin-top: 6px; padding: 7px 8px; border-radius: 10px; box-shadow: inset 0 0 0 1.5px rgb(var(--fg) / 0.08); font-size: 0.71875rem; }
.board-card.active { box-shadow: inset 0 0 0 1.5px rgb(var(--accent)); }
.board-card b { display: block; overflow: hidden; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.board-card span { display: block; overflow: hidden; font-size: 0.65625rem; color: rgb(var(--fg-muted)); text-overflow: ellipsis; white-space: nowrap; }
.board-empty { margin-top: 6px; padding: 7px 8px; border-radius: 10px; border: 1px dashed rgb(var(--fg) / 0.08); font-size: 0.65625rem; color: rgb(var(--fg-muted)); }
.event-rows { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.event-rows li { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 7px 0; border-top: var(--hairline); font-size: 0.75rem; animation: row-in 400ms var(--living-spring) both; }
.event-rows li:first-child { border-top: 0; }
.event-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.event-text.mono { font-family: var(--font-mono); font-size: 0.71875rem; color: rgb(var(--fg-secondary)); }
.event-trailing { display: flex; flex: none; align-items: center; gap: 8px; font-size: 0.71875rem; color: rgb(var(--fg-muted)); }
.event-trailing .chip { height: 22px; }
.hatch-columns { position: relative; display: grid; align-items: end; gap: 16px; }
.hatch-column { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.hatch-track { display: flex; align-items: flex-end; height: 132px; overflow: hidden; border-radius: var(--radius-lg); background: rgb(var(--card)); }
.hatch-fill { width: 100%; border-radius: var(--radius-lg); --hatch: var(--fg-secondary); background: repeating-linear-gradient(135deg, rgb(var(--hatch) / 0.8) 0 2px, rgb(var(--hatch) / 0.16) 2px 6px); transform-origin: bottom; animation: grow-y 700ms var(--living-spring) both; }
.hatch-fill.accent { --hatch: var(--accent); }
.hatch-column p { display: flex; justify-content: space-between; gap: 6px; margin: 0; font-size: 0.8125rem; }
.hatch-column p span:first-child { overflow: hidden; color: rgb(var(--fg-secondary)); text-overflow: ellipsis; white-space: nowrap; }
.hatch-column.today p span:first-child { color: rgb(var(--fg)); font-weight: 500; }
.hatch-column p span:last-child { color: rgb(var(--fg-muted)); font-variant-numeric: tabular-nums; }
.trend { display: block; width: 100%; height: auto; margin-top: 10px; overflow: visible; color: rgb(var(--accent)); }
.trend .area { animation: fade-in 800ms ease-out 500ms both; }
.trend .line { stroke-dasharray: 1; stroke-dashoffset: 0; animation: draw 900ms var(--ease-out) both; }
@keyframes grow-x { from { transform: scaleX(0); } }
@keyframes grow-y { from { transform: scaleY(0); } }
@keyframes donut-in { from { stroke-dasharray: 0 1; } }
@keyframes funnel-open { from { width: 30%; } }
@keyframes draw { from { stroke-dashoffset: 1; } }
@keyframes row-in { from { opacity: 0; transform: translateY(-6px); } }

/* RollingNumber: cada dígito es una columna que se desliza con el resorte del kit; el resto de caracteres queda como texto. */
.roll { display: inline-flex; flex-wrap: nowrap; vertical-align: bottom; line-height: 1.1em; }
.roll-cell { display: inline-block; height: 1.1em; overflow: hidden; }
.roll-digit { display: block; transition: transform 550ms var(--living-spring); }
.roll-digit::before { content: "0\A 1\A 2\A 3\A 4\A 5\A 6\A 7\A 8\A 9"; display: block; white-space: pre; line-height: 1.1em; }
.roll-text { white-space: pre; }
.roll-text::before { content: attr(data-character); }

/* Cascada (es-cascade): las piezas de la pantalla entran una tras otra. */
.page-content > *, .stack > *, .layout-split > *, .layout-thirds > * { animation: tile-in 500ms var(--living-spring) both; animation-delay: calc(var(--cascade-i, 8) * 45ms); }
:is(.page-content, .stack, .layout-split, .layout-thirds) > :nth-child(1) { --cascade-i: 0; }
:is(.page-content, .stack, .layout-split, .layout-thirds) > :nth-child(2) { --cascade-i: 1; }
:is(.page-content, .stack, .layout-split, .layout-thirds) > :nth-child(3) { --cascade-i: 2; }
:is(.page-content, .stack, .layout-split, .layout-thirds) > :nth-child(4) { --cascade-i: 3; }
:is(.page-content, .stack, .layout-split, .layout-thirds) > :nth-child(5) { --cascade-i: 4; }
:is(.page-content, .stack, .layout-split, .layout-thirds) > :nth-child(6) { --cascade-i: 5; }
:is(.page-content, .stack, .layout-split, .layout-thirds) > :nth-child(7) { --cascade-i: 6; }
.stack > *, .layout-split > *, .layout-thirds > * { animation-delay: calc((var(--cascade-i, 8) + 3) * 45ms); }
@keyframes tile-in { from { opacity: 0; transform: translateY(8px) scale(0.96); } }

/* Entrada del contenido (es-enter) al cambiar de vista. */
.page-content.enter { animation: content-enter 200ms var(--ease-out) both; }
@keyframes content-enter { from { opacity: 0; } }

/* Pop (es-pop): lo que acaba de llegar o es lo próximo aparece con un pequeño rebote. */
.trend circle, .board-card.active, .date-block.on, .kit-icon.on { animation: pop 400ms var(--living-spring) both; animation-delay: 500ms; }
.trend circle { transform-box: fill-box; transform-origin: center; animation-delay: 900ms; }
@keyframes pop { from { transform: scale(0.7); } }

/* Tablas sobre el tile: sin caja propia, separadas por líneas finas. */
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.table-wrap { overflow-x: auto; margin: 0 -4px; }
.data-table { width: 100%; min-width: 680px; border-collapse: collapse; font-size: 0.8125rem; }
.data-table th { padding: 8px; border-bottom: 1px solid rgb(var(--fg) / 0.06); font-size: 0.71875rem; font-weight: 400; text-align: left; color: rgb(var(--fg-muted)); white-space: nowrap; }
.data-table td { padding: 10px 8px; border-bottom: var(--hairline); vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr { transition: background-color 300ms ease-out; }
.data-table tbody tr:hover { background: rgb(var(--interactive) / 0.35); }
.data-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.data-table .muted { color: rgb(var(--fg-muted)); }
.person { display: flex; align-items: center; gap: 10px; min-width: 0; }
.person strong { display: block; font-weight: 500; }
.person span { display: block; font-size: 0.71875rem; color: rgb(var(--fg-muted)); }
.cell-actions { display: flex; flex-wrap: wrap; gap: 6px; }

/* Campos: píldoras rellenas con el tono de tarjeta y contorno solo al pasar o enfocar. */
.search, .filter, .role-switch, .field input:not([type="checkbox"]), .field select, .field textarea { height: 40px; padding: 0 16px; border: 1px solid rgb(var(--line)); border-radius: 999px; background-color: rgb(var(--raised)); color: rgb(var(--fg)); font-size: 0.8125rem; transition: border-color var(--duration-fast) ease-out, box-shadow var(--duration-fast) ease-out; }
:is(.search, .filter, .role-switch, .field input, .field select, .field textarea):hover { border-color: rgb(167 207 212); }
:is(.search, .filter, .role-switch, .field input, .field select, .field textarea):focus { outline: none; border-color: rgb(var(--accent)); box-shadow: 0 0 0 3px rgb(var(--accent) / 0.2); }
::placeholder { color: rgb(var(--fg-muted)); }
.search { flex: 1 1 240px; max-width: 360px; padding-left: 40px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239ca3a8' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E"); background-position: 15px center; background-repeat: no-repeat; }
.filter, .role-switch, .field select { appearance: none; padding-right: 40px; background-image: var(--select-chevron); background-position: right 14px center; background-repeat: no-repeat; cursor: pointer; }
.role-switch { width: 100%; height: 36px; background-color: rgb(var(--frame-interactive)); border-color: rgb(var(--frame-interactive)); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23a9c2c5' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E"); }
.field { display: grid; gap: 6px; margin: 14px 0; }
.field > label { font-size: 0.75rem; color: rgb(var(--fg-muted)); }
.field textarea { height: auto; min-height: 104px; padding: 12px 16px; border-radius: 20px; resize: vertical; }
.field label:has(> input[type="checkbox"]), .check { display: flex; align-items: center; gap: 10px; min-height: 32px; font-size: 0.875rem; color: rgb(var(--fg)); cursor: pointer; }
input[type="checkbox"] { width: 16px; height: 16px; margin: 0; accent-color: rgb(var(--action)); }

/* Diálogo sólido sobre el fondo atenuado; las acciones quedan fijas al desplazar. */
.modal-backdrop { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px; background: rgb(18 40 45 / 0.42); backdrop-filter: blur(2px); animation: fade-in var(--duration-overlay) var(--ease-out); }
.modal { width: min(460px, 100%); max-height: calc(100vh - 40px); overflow: auto; padding: 22px 22px 0; border-radius: var(--radius-xl); background: rgb(var(--raised)); box-shadow: var(--shadow-overlay); animation: dialog-in var(--spring-smooth-duration) var(--spring-smooth); }
.modal h2 { margin: 0 0 4px; color: rgb(var(--heading)); font-size: 1.0625rem; font-weight: 600; line-height: 1.35; }
.modal-actions { position: sticky; bottom: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 18px -22px 0; padding: 14px 22px 20px; background: rgb(var(--raised)); }
.modal-actions .button { height: 42px; }
@keyframes fade-in { from { opacity: 0; } }
@keyframes dialog-in { from { opacity: 0; transform: translateY(12px) scale(0.98); } }

.toast { position: fixed; right: 24px; bottom: 24px; z-index: 60; max-width: min(420px, calc(100vw - 48px)); padding: 12px 16px; border-radius: var(--radius-lg); background: rgb(var(--heading)); color: #fff; font-size: 0.8125rem; box-shadow: var(--shadow-raised); opacity: 0; transform: translateY(30px); transition: opacity 350ms var(--living-ease), transform var(--spring-snappy-duration) var(--spring-snappy); pointer-events: none; backdrop-filter: blur(8px); }
.toast.show { opacity: 1; transform: none; }

/* Atajos: filas del kit que son una elección. */
.quick-actions { display: grid; gap: 2px; }
.quick-actions button { display: flex; align-items: center; gap: 10px; min-height: 44px; margin: 0 -10px; padding: 6px 10px; border: 0; border-radius: var(--radius-lg); background: none; color: rgb(var(--fg)); font-size: 0.9375rem; font-weight: 500; text-align: left; cursor: pointer; transition: background-color 300ms ease-out; }
.quick-actions button:hover { background: rgb(var(--interactive)); }
.quick-actions button > span:not(.kit-icon) { flex: 1; }
.quick-actions button > .icon { width: 16px; height: 16px; color: rgb(var(--fg-muted)); }
.login-panel { width: min(420px, 100%); }
.login-panel .button { width: 100%; margin-top: 6px; }
.form-message { margin: 0 0 12px; font-size: 0.8125rem; color: rgb(var(--warning)); }

/* Configuración guiada, ficha de lead y conversaciones (spec 253). */
.progress { height: 10px; overflow: hidden; border-radius: 999px; background: rgb(var(--interactive)); }
.progress span { display: block; height: 100%; border-radius: 999px; background: rgb(var(--accent)); transform-origin: left; animation: grow-x 900ms var(--living-spring) both; }
.button.spaced { margin-top: 12px; }
.link-button { padding: 0; border: 0; background: none; color: rgb(var(--accent)); font: inherit; font-weight: 500; text-decoration: underline; cursor: pointer; }
.logout { width: 100%; justify-content: flex-start; color: rgb(var(--fg-secondary)); }
.logout:hover { background: rgb(var(--frame-interactive)); color: rgb(var(--fg)); }
.modal.wide { width: min(720px, 100%); }
.modal-intro { margin: 0 0 8px; font-size: 0.8125rem; line-height: 1.45; color: rgb(var(--fg-muted)); }
.modal-subtitle { margin: 16px 0 6px; font-size: 0.8125rem; font-weight: 600; color: rgb(var(--heading)); }
.form-error { margin: 12px 0 0; padding: 10px 14px; border-radius: var(--radius-lg); background: rgb(var(--danger-soft)); color: rgb(var(--danger)); font-size: 0.8125rem; line-height: 1.45; }
.preview { margin: 8px 0; padding: 10px 14px; border-radius: var(--radius-lg); background: rgb(var(--card)); font-size: 0.8125rem; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.preview.mono { font-family: var(--font-mono); font-size: 0.75rem; }
.reason-list { display: grid; gap: 6px; margin: 10px 0 0; padding: 0; list-style: none; font-size: 0.8125rem; }
.reason-list li { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 7px 0; border-top: var(--hairline); color: rgb(var(--fg-secondary)); }
.reason-list li:first-child { border-top: 0; }
.reason-list b { flex: none; color: rgb(var(--heading)); font-variant-numeric: tabular-nums; }
.panel-note.big { font-size: 0.875rem; line-height: 1.55; color: rgb(var(--fg-secondary)); }
.warning-note { color: rgb(var(--warning)); }
.error-text { color: rgb(var(--danger)) !important; white-space: normal !important; }
.pending-note { color: rgb(var(--warning)) !important; }
.row-main small { white-space: normal; }
.data-table.compact { min-width: 0; font-size: 0.75rem; }
.kb-search { display: flex; gap: 8px; margin-bottom: 12px; }
.kb-search .search { max-width: none; }

.thread { display: flex; flex-direction: column; gap: 10px; max-height: 420px; margin: 0; padding: 4px 2px; overflow-y: auto; list-style: none; }
.bubble { max-width: 82%; padding: 9px 14px; border-radius: 18px; font-size: 0.875rem; line-height: 1.45; }
.bubble p { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.bubble span { display: block; margin-top: 4px; font-size: 0.6875rem; color: rgb(var(--fg-muted)); }
.bubble em { color: rgb(var(--danger)); font-style: normal; }
.bubble.in { align-self: flex-start; border-bottom-left-radius: 6px; background: rgb(var(--interactive)); }
.bubble.out { align-self: flex-end; border-bottom-right-radius: 6px; background: rgb(var(--soft)); box-shadow: inset 0 0 0 1px rgb(var(--sky) / 0.5); }
.reply-form { display: grid; gap: 8px; }
.reply-form textarea { min-height: 72px; padding: 12px 16px; border: 1px solid rgb(var(--line)); border-radius: 20px; background: rgb(var(--raised)); font-size: 0.875rem; resize: vertical; }
.reply-form textarea:focus { outline: none; border-color: rgb(var(--accent)); box-shadow: 0 0 0 3px rgb(var(--accent) / 0.2); }
.reply-form .button { justify-self: end; }

.stepper { display: flex; flex-wrap: wrap; gap: 6px; }
.step { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px 0 6px; border: 0; border-radius: 999px; background: rgb(var(--raised)); box-shadow: 0 0 0 1px rgb(var(--line)); color: rgb(var(--fg-secondary)); font-size: 0.8125rem; cursor: pointer; transition: background-color 200ms ease-out; }
.step:hover { background: rgb(var(--interactive)); }
.step i { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: rgb(var(--interactive)); font-size: 0.6875rem; font-style: normal; font-weight: 600; }
.step.done i { background: rgb(var(--success-soft)); color: rgb(var(--success)); }
.step.current { background: rgb(var(--soft)); box-shadow: 0 0 0 1.5px rgb(var(--accent)); color: rgb(var(--heading)); font-weight: 500; }
.step.current i { background: rgb(var(--accent)); color: #fff; }

#settings-form .field { margin: 18px 0; }
#settings-form .field > label:first-child, .secret-form .field > label:first-child { font-size: 0.8125rem; font-weight: 500; color: rgb(var(--heading)); }
.help { font-size: 0.75rem; line-height: 1.4; color: rgb(var(--fg-muted)); }
.field input[type="number"], .field input[type="date"] { max-width: 260px; }
.field textarea { width: 100%; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 2px 16px; }
.option-cards { display: grid; gap: 8px; }
.option-card { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border-radius: var(--radius-lg); box-shadow: inset 0 0 0 1.5px rgb(var(--fg) / 0.08); cursor: pointer; transition: box-shadow 200ms ease-out, background-color 200ms ease-out; }
.option-card:hover { background: rgb(var(--interactive) / 0.5); }
.option-card:has(input:checked) { background: rgb(var(--soft)); box-shadow: inset 0 0 0 1.5px rgb(var(--accent)); }
.option-card input { margin-top: 3px; accent-color: rgb(var(--action)); }
.option-card b { display: block; font-size: 0.875rem; font-weight: 600; color: rgb(var(--heading)); }
.option-card small { display: block; margin-top: 2px; font-size: 0.75rem; line-height: 1.45; color: rgb(var(--fg-muted)); }
.list-rows { display: grid; gap: 10px; margin: 8px 0; }
.list-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); align-items: end; gap: 4px 12px; padding: 10px 14px 6px; border-radius: var(--radius-lg); background: rgb(var(--card) / 0.7); }
.list-row .field { margin: 6px 0; }
.list-row .button.ghost { justify-self: end; margin-bottom: 8px; }
.list-row .row-label { grid-column: 1 / -1; margin: 0; font-size: 0.8125rem; font-weight: 500; color: rgb(var(--fg-secondary)); }
.list-row > input:not([type="hidden"]) { width: 100%; height: 40px; padding: 0 16px; border: 1px solid rgb(var(--line)); border-radius: 999px; background: rgb(var(--raised)); font-size: 0.8125rem; }
.form-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; padding-top: 16px; border-top: var(--hairline); }
.secret-form .field { margin: 12px 0; }
.secret-form .field input { width: 100%; max-width: 420px; }

@media (max-width: 1180px) {
  .layout-main { grid-template-columns: minmax(0, 1fr); }
  .layout-thirds { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .layout-thirds > :last-child { grid-column: 1 / -1; }
}

@media (max-width: 767px) {
  .sidebar { width: min(300px, 86vw); transform: translateX(-100%); transition: transform var(--spring-smooth-duration) var(--spring-smooth); }
  .sidebar.open { transform: none; box-shadow: var(--shadow-overlay); }
  .sidebar-scrim { position: fixed; inset: 0; z-index: 25; background: rgb(18 40 45 / 0.42); animation: fade-in 240ms var(--living-ease); }
  .nav-item { min-height: 44px; }
  .main-area { margin: 0; min-height: 100vh; border-radius: 0; }
  .topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 4px; height: 56px; padding: 0 12px 0 6px; border-bottom: var(--hairline); background: rgb(var(--workspace) / 0.92); backdrop-filter: blur(8px); }
  .mobile-menu { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: rgb(var(--fg)); }
  .mobile-menu .icon { width: 22px; height: 22px; }
  .breadcrumb { display: flex; flex: 1; align-items: center; gap: 8px; min-width: 0; font-size: 0.9375rem; color: rgb(var(--fg-muted)); }
  .breadcrumb b { font-weight: 400; }
  .breadcrumb strong { overflow: hidden; font-weight: 500; color: rgb(var(--fg)); text-overflow: ellipsis; white-space: nowrap; }
  .today { font-size: 0.8125rem; color: rgb(var(--fg-muted)); white-space: nowrap; }
  .notice { align-items: flex-start; max-width: none; width: auto; margin: 14px 14px 0; padding: 10px 14px; border-radius: var(--radius-xl); }
  .notice > .icon { margin-top: 2px; }
  .page-content { gap: 16px; padding: 18px 14px 28px; }
  .screen-head h1, .screen-head.large h1 { font-size: 1.875rem; }
  .screen-head-actions { width: 100%; }
  .screen-head-actions .button { flex: 1; height: 44px; }
  .layout-split, .layout-thirds { grid-template-columns: minmax(0, 1fr); }
  .figures, .figures.quad { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 16px; }
  .figure dt { font-size: 0.8125rem; }
  .figure .value { margin-top: 6px; font-size: 2rem; }
  .panel { padding: 16px; border-radius: 24px; }
  .row { flex-wrap: wrap; }
  .row-actions { width: 100%; justify-content: flex-start; padding-left: 40px; }
  .search { max-width: none; flex-basis: 100%; }
  .filter { flex: 1; }
  .board { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .hatch-columns { gap: 8px; }
  .hatch-column p { flex-direction: column; gap: 0; font-size: 0.75rem; }
  .toast { right: 14px; bottom: 14px; left: 14px; max-width: none; }
  footer { padding: 14px; }
  .footer-right { margin-left: 0; width: 100%; }
}

@media (max-width: 340px) {
  .figures, .figures.quad { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .bar-fill, .segment, .hatch-fill, .donut .seg, .funnel li, .trend .area, .trend .line, .trend circle, .row, .event-rows li, .modal, .modal-backdrop, .sidebar-scrim, .board-card.active, .date-block.on, .kit-icon.on, .page-content.enter, .nav-list.entering .nav-item:not([hidden]), .page-content > *, .stack > *, .layout-split > *, .layout-thirds > * { animation: none; }
  .nav-item, .button, .sidebar, .toast, .row, .quick-actions button, .roll-digit, .nav-highlight { transition: none; }
  .nav-item:active, .button:active { transform: none; }
}

@media (forced-colors: active) {
  .main-area, .panel, .modal { border: 1px solid CanvasText; }
  .bar-fill, .segment, .swatch, .hatch-fill, .funnel li { forced-color-adjust: none; }
}

/* Pantalla de acceso: sin menú, aviso ni pie; marca a la izquierda y formulario centrado a la derecha. */
body.auth-mode .sidebar, body.auth-mode .sidebar-scrim, body.auth-mode .topbar, body.auth-mode .notice, body.auth-mode footer { display: none; }
body.auth-mode .main-area { margin: var(--workspace-inset); }
body.auth-mode .page-content { max-width: none; padding: 0; }
.auth-screen { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: calc(100vh - 2 * var(--workspace-inset)); }
.auth-brand { --fg: 255 255 255; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; margin: 12px; padding: 36px 40px; border-radius: calc(var(--workspace-radius) - 6px); background: radial-gradient(120% 80% at 0% 100%, rgb(var(--accent) / 0.55), transparent 60%), rgb(var(--frame)); color: rgb(var(--fg)); }
.auth-brand-top { display: flex; align-items: center; gap: 12px; }
.auth-brand-name { display: grid; line-height: 1.2; } .auth-brand-name b { font-size: 1rem; font-weight: 600; } .auth-brand-name small { font-size: 0.75rem; color: rgb(169 194 197); }
.auth-brand-body h2 { max-width: 30ch; margin: 0 0 22px; font-size: clamp(1.5rem, 2.4vw, 2.125rem); font-weight: 600; line-height: 1.15; letter-spacing: -0.02em; color: #fff; }
.auth-brand-body ul { display: grid; gap: 12px; max-width: 42ch; margin: 0; padding: 0; list-style: none; font-size: 0.9375rem; line-height: 1.45; color: rgb(209 223 224); }
.auth-brand-body li { position: relative; padding-left: 24px; } .auth-brand-body li::before { content: ""; position: absolute; left: 0; top: 0.5em; width: 10px; height: 10px; border-radius: 3px; background: rgb(var(--sky)); }
.auth-brand-foot { margin: 0; font-size: 0.75rem; color: rgb(169 194 197); }
.auth-form { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 48px 24px; }
.auth-card { width: min(400px, 100%); }
.auth-card h1 { margin: 0 0 6px; font-size: 1.75rem; font-weight: 600; letter-spacing: -0.02em; color: rgb(var(--heading)); }
.auth-lead { margin: 0 0 8px; font-size: 0.9375rem; color: rgb(var(--fg-secondary)); }
.auth-card .button[type="submit"] { width: 100%; margin-top: 6px; }
.auth-help { width: min(400px, 100%); margin: 0; font-size: 0.78125rem; line-height: 1.5; color: rgb(var(--fg-muted)); }
.auth-mobile-brand { display: none; }
@media (max-width: 860px) {
  .auth-screen { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .auth-form { justify-content: flex-start; padding: 40px 20px; }
  .auth-mobile-brand { display: flex; align-items: center; gap: 10px; width: min(400px, 100%); margin-bottom: 18px; color: rgb(var(--heading)); }
  .auth-mobile-brand .brand-mark { background: rgb(var(--frame)); }
}
