/* Sistema de diseño Kalimo (manual «KALIMO / IDENTIDAD VISUAL v1.0»): Fucsia #FF2D8B (relleno de acento: CTA, navegación activa,
   foco; ~10 %), Magenta #D1006B (texto/enlaces de acento sobre claro), Carbón #0B1220 (texto y superficies oscuras), Arena #F7F4ED
   (superficies claras cálidas), Blanco. Grises con un ligero tinte azul a juego con el carbón; el oscuro sale del carbón (#0B1220/#121A2B/#1A2336).
   --accent = rosa para texto, iconos y bordes · --accent-fill = relleno (botones, chips activos) · --accent-ink = texto sobre el relleno (carbón, 5,35:1).
   Colores planos en la interfaz. Estados con colores semánticos propios: nunca el rosa como único indicador.
   Tipografía: Fredoka (títulos, 300–700) e Inter (interfaz y texto), autoalojadas en /static/fonts (subconjunto latino). */
@font-face { font-family: "Fredoka"; src: url("../fonts/fredoka-var.woff2") format("woff2"); font-weight: 300 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-var.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
:root, [data-theme="dark"] {
  --bg: #0b1220; --bg-2: #121a2b; --ink-1: #263047; --ink-2: #1a2336; --ink-3: #121a2b;
  --panel: rgba(18, 26, 43, .72); --panel-solid: #121a2b; --panel-2: rgba(26, 35, 54, .62); --line: rgba(255, 255, 255, .10);
  --line-2: rgba(255, 255, 255, .07); --text: #f3f5f9; --text-2: #b3bac7; --text-3: #8b94a5;
  --accent: #ff2d8b; --accent-fill: #ff2d8b; --accent-2: #ff74b3; --accent-ink: #0b1220; --accent-rgb: 255,45,139;
  --teal: #a3aab8; --teal-2: #5b6474; --teal-rgb: 163, 170, 184;
  --ok: #4ade80; --warn: #fbbf24; --bad: #ff6b5e; --info: #60a5fa; --violet: #c4a1ff;
  --grad: linear-gradient(var(--accent), var(--accent));
  --glow: 0 0 0 1px rgba(255,45,139,.22), 0 10px 40px -12px rgba(255,45,139,.22);
  --shadow: 0 30px 80px -30px rgba(0,0,0,.75), 0 1px 0 rgba(255,255,255,.04) inset;
  --radius: 18px; --radius-s: 12px; --blur: saturate(140%) blur(18px);
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Fredoka", "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #f3f5f9; --bg-2: #ffffff; --ink-1: #e3e6ec; --ink-2: #ffffff; --ink-3: #fbfbfc;
  --panel: rgba(255,255,255,.82); --panel-solid: #ffffff; --panel-2: rgba(247,244,237,.45); --line: rgba(11,18,32,.12);
  --line-2: rgba(11,18,32,.08); --text: #0b1220; --text-2: #3d4556; --text-3: #566072;
  --accent: #d1006b; --accent-fill: #ff2d8b; --accent-2: #a8005a; --accent-ink: #0b1220; --accent-rgb: 255,45,139;
  --teal: #566072; --teal-2: #3d4556; --teal-rgb: 91, 100, 116;
  --ok: #15803d; --warn: #b45309; --bad: #c42b1c; --info: #1d4ed8; --violet: #6d3fc0;
  --grad: linear-gradient(var(--accent), var(--accent));
  --glow: 0 0 0 1px rgba(209,0,107,.22), 0 10px 30px -12px rgba(209,0,107,.22);
  --shadow: 0 30px 70px -40px rgba(11,18,32,.35);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--accent-fill); color: var(--accent-ink); }
::-webkit-scrollbar { width: 10px; height: 10px; } ::-webkit-scrollbar-thumb { background: var(--ink-1); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }

/* ---------- fondo vivo: aurora + rejilla + grano */
.aurora { position: fixed; inset: -20%; z-index: 0; pointer-events: none; filter: blur(70px); opacity: .55; }
.aurora i { position: absolute; width: 46vmax; height: 46vmax; border-radius: 50%; mix-blend-mode: screen; animation: drift 28s ease-in-out infinite alternate; }
.aurora i:nth-child(1) { background: radial-gradient(circle, rgba(var(--accent-rgb), .12), transparent 60%); left: 10%; top: 0; }
.aurora i:nth-child(2) { background: radial-gradient(circle, rgba(var(--teal-rgb), .16), transparent 60%); right: 0; top: 20%; animation-duration: 34s; }
.aurora i:nth-child(3) { background: radial-gradient(circle, rgba(247,244,237,.10), transparent 60%); left: 30%; bottom: -10%; animation-duration: 40s; }
[data-theme="light"] .aurora { opacity: .35; } [data-theme="light"] .aurora i { mix-blend-mode: multiply; }
@keyframes drift { 0% { transform: translate(0,0) scale(1); } 50% { transform: translate(6vw,4vh) scale(1.15); } 100% { transform: translate(-4vw,8vh) scale(.95); } }
.grid-bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(var(--line-2) 1px, transparent 1px), linear-gradient(90deg, var(--line-2) 1px, transparent 1px);
  background-size: 56px 56px; mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 70%); }

/* ---------- estructura (barra superior + vista; ver «Rediseño 2026» al final) */
.main { display: flex; flex-direction: column; height: 100vh; min-width: 0; }
.top { display: flex; align-items: center; gap: 12px; padding: 14px 26px; border-bottom: 1px solid var(--line-2); backdrop-filter: var(--blur); background: rgba(11,18,32,.35); z-index: 5; }
[data-theme="light"] .top { background: rgba(255,255,255,.5); }
.top .search { flex: 1; max-width: 560px; display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-radius: 14px; background: var(--panel-2);
  border: 1px solid var(--line-2); color: var(--text-3); cursor: text; transition: .2s; }
.top .search:hover { border-color: var(--line); color: var(--text-2); }
.top .search > span:not(.kbd):not(.sp) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
@media (max-width: 1200px) { .top .live { display: none; } }
.kbd { white-space: nowrap; font: 500 11px var(--mono); padding: 2px 6px; border-radius: 6px; border: 1px solid var(--line-2); color: var(--text-3); background: var(--ink-3); }
.top .sp { flex: 1; }
.live { display: inline-flex; align-items: center; gap: 8px; font: 500 11px var(--mono); color: var(--text-3); letter-spacing: .08em; }
.live i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-fill); box-shadow: 0 0 0 0 rgba(var(--accent-rgb), .6); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), .55); } 70% { box-shadow: 0 0 0 10px rgba(var(--accent-rgb), 0); } 100% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0); } }
.iconbtn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; border: 1px solid var(--line-2); background: var(--panel-2);
  cursor: pointer; position: relative; transition: .2s; color: var(--text-2); }
.iconbtn:hover { color: var(--accent); border-color: var(--line); box-shadow: var(--glow); }
.iconbtn .dot { position: absolute; top: 7px; right: 8px; min-width: 16px; height: 16px; border-radius: 9px; background: var(--accent-fill); color: var(--accent-ink); font: 700 10px/16px var(--mono); text-align: center; padding: 0 4px; }
.brandsel { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--panel-2); cursor: pointer; }
.brandsel select { background: transparent; border: 0; outline: 0; cursor: pointer; } .brandsel select option { background: var(--panel-solid); }
.view { flex: 1; overflow: auto; padding: 28px 30px 60px; position: relative; scroll-behavior: smooth; }

/* ---------- tipografía */
.eyebrow { font: 600 11px/1 var(--font); letter-spacing: .2em; text-transform: uppercase; color: var(--accent); display: inline-flex; gap: 8px; align-items: center; }
.eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 10px currentColor; }
h1.hero { font-family: var(--font-display); font-size: clamp(30px, 3.4vw, 50px); line-height: 1.08; letter-spacing: -.012em; margin: 10px 0 8px; font-weight: 700; }
h1.hero em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
h2 { font-family: var(--font-display); font-size: 20px; letter-spacing: 0; margin: 0; font-weight: 700; } h3 { font-family: var(--font-display); font-size: 15px; margin: 0; font-weight: 650; }
.sub { color: var(--text-2); max-width: 760px; } .muted { color: var(--text-3); } .mono { font-family: var(--mono); }
.tag { font: 600 11px/1.2 var(--font); letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); }

/* ---------- paneles */
.panel { position: relative; background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--radius); backdrop-filter: var(--blur); box-shadow: var(--shadow);
  padding: 20px; overflow: hidden; isolation: isolate; }
.panel::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(var(--accent-rgb), .09), transparent 45%); }
.panel:hover::after { opacity: 1; }
.panel-h { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; } .panel-h .sp { flex: 1; }
.grid { display: grid; gap: 18px; }
.g-12 { grid-template-columns: repeat(12, 1fr); }
.c3 { grid-column: span 3; } .c4 { grid-column: span 4; } .c5 { grid-column: span 5; } .c6 { grid-column: span 6; } .c7 { grid-column: span 7; } .c8 { grid-column: span 8; } .c12 { grid-column: span 12; }
@media (max-width: 1180px) { .c3 { grid-column: span 6; } .c4, .c5, .c6, .c7, .c8 { grid-column: span 12; } }
@media (max-width: 900px) { .c3, .c4, .c5, .c6 { grid-column: span 12; } .view { padding: 18px 16px 60px; } .top { padding: 12px 16px; } }

/* entrada escalonada */
.rise { animation: rise .7s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i, 0) * 55ms); }
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(.985); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .28s; }

/* ---------- KPIs */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.kpi { padding: 16px 18px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line-2); backdrop-filter: var(--blur); position: relative; overflow: hidden; }
.kpi .v { font: 700 34px/1 var(--font-display); letter-spacing: -.008em; margin: 10px 0 4px; display: flex; align-items: baseline; gap: 4px; }
.kpi .v small { font-size: 15px; color: var(--text-3); font-weight: 500; } .kpi .d { font-size: 12px; color: var(--text-3); }
.kpi.hot { border-color: rgba(255,107,94,.35); } .kpi.hot .v { color: var(--bad); } .kpi.good .v { color: var(--ok); }
.kpi svg.spark { position: absolute; right: 10px; bottom: 10px; opacity: .8; }

/* ---------- botones, chips, campos */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; border-radius: 40px; border: 1px solid var(--line-2);
  background: var(--panel-2); cursor: pointer; font-weight: 600; font-size: 13.5px; transition: .2s; white-space: nowrap; }
.btn:hover { border-color: var(--line); color: var(--accent); }
.btn.primary { background: var(--accent-fill); color: var(--accent-ink); border-color: transparent; box-shadow: 0 8px 30px -10px rgba(var(--accent-rgb), .65); }
.btn.primary:hover { transform: translateY(-1px); box-shadow: 0 14px 34px -10px rgba(var(--accent-rgb), .8); color: var(--accent-ink); }
.btn.danger { color: var(--bad); border-color: rgba(255,107,94,.35); } .btn.danger:hover { background: rgba(255,107,94,.12); }
.btn.ghost { background: transparent; } .btn.sm { padding: 6px 12px; font-size: 12.5px; } .btn .ic { width: 17px; height: 17px; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 30px; font-size: 12px; border: 1px solid var(--line-2); background: var(--panel-2); white-space: nowrap; }
.chip i.sw { width: 8px; height: 8px; border-radius: 50%; }
.st { font: 600 10.5px/1 var(--font); letter-spacing: .08em; text-transform: uppercase; padding: 5px 9px; border-radius: 20px; white-space: nowrap; }
.st.ontime { color: var(--ok); background: rgba(124,242,156,.12); } .st.alert { color: var(--warn); background: rgba(255,211,110,.13); }
.st.late { color: var(--bad); background: rgba(255,107,94,.13); } .st.done { color: var(--teal); background: rgba(var(--teal-rgb), .15); }
.st.pending { color: var(--info); background: rgba(142,203,255,.12); } .st.paused, .st.stopped { color: var(--text-3); background: var(--panel-2); }
.st.review { color: var(--info); background: rgba(142,203,255,.12); } .st.approved { color: var(--ok); background: rgba(124,242,156,.12); } .st.rejected { color: var(--bad); background: rgba(255,107,94,.12); }
.st.tone { color: #121a2b; background: var(--c); box-shadow: 0 0 0 1px rgba(0,0,0,.06) inset; }
.st.approved_changes { color: var(--warn); background: rgba(255,211,110,.12); }
.field { display: flex; flex-direction: column; gap: 6px; } .field label { font: 600 11px var(--font); letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); }
.input, select.input, textarea.input { width: 100%; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--ink-3); outline: none; transition: .2s; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(var(--accent-rgb), .12); }
textarea.input { resize: vertical; min-height: 90px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; } .row.end { justify-content: flex-end; } .row .sp { flex: 1; }
.cols2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; } .cols3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.seg { display: inline-flex; padding: 4px; border-radius: 40px; background: var(--panel-2); border: 1px solid var(--line-2); gap: 2px; }
.seg button, .seg a { border: 0; background: transparent; padding: 7px 14px; border-radius: 30px; cursor: pointer; color: var(--text-2); display: inline-flex; gap: 6px; align-items: center; font-size: 13px; text-decoration: none; }
.seg button.on, .seg a.on { background: var(--accent-fill); color: var(--accent-ink); font-weight: 600; }
.seg button .ic { width: 16px; height: 16px; }
.av { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font: 700 11px var(--font); color: #0b1220; flex: none; box-shadow: 0 0 0 2px var(--bg); }
.av.lg { width: 40px; height: 40px; font-size: 13px; } .avs { display: flex; } .avs .av + .av { margin-left: -8px; }
.ic { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.empty { padding: 40px; text-align: center; color: var(--text-3); }
.hr { height: 1px; background: var(--line-2); margin: 14px 0; }

/* ---------- listas y tablas */
.list { display: flex; flex-direction: column; } .li { display: flex; align-items: center; gap: 14px; padding: 12px 10px; border-radius: 12px; cursor: pointer; transition: .18s; border-bottom: 1px solid var(--line-2); }
.li:last-child { border-bottom: 0; } .li:hover { background: var(--panel-2); transform: translateX(2px); }
.li .t { flex: 1; min-width: 0; } .li .t b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .li .t span { font-size: 12.5px; color: var(--text-3); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; font: 600 11px var(--font); letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); padding: 10px 12px; border-bottom: 1px solid var(--line-2); position: sticky; top: 0; background: var(--panel-solid); z-index: 1; }
.tbl td { padding: 11px 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; } .tbl tr:hover td { background: var(--panel-2); } .tbl tr.click { cursor: pointer; }

/* ---------- bandeja (dashboard) */
.inbox .item { display: grid; grid-template-columns: 56px 1fr auto; gap: 14px; align-items: center; padding: 12px; border-radius: 14px; cursor: pointer; transition: .2s; border: 1px solid transparent; }
.inbox .item:hover { background: var(--panel-2); border-color: var(--line); }
.inbox .thumb { width: 56px; height: 56px; border-radius: 12px; background: var(--ink-1) center/cover; border: 1px solid var(--line-2); display: grid; place-items: center; color: var(--text-3); }
.due { font: 600 11px var(--mono); padding: 4px 8px; border-radius: 8px; }
.due.late { color: var(--bad); background: rgba(255,107,94,.12); } .due.today { color: var(--warn); background: rgba(255,211,110,.12); } .due.ok { color: var(--ok); background: rgba(124,242,156,.1); }
.summary-line { font-size: 18px; color: var(--text-2); } .summary-line b { color: var(--text); }
.ring-wrap { display: grid; place-items: center; position: relative; } .ring-wrap .center { position: absolute; text-align: center; } .ring-wrap .center b { font-size: 30px; display: block; line-height: 1; }
.legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--text-2); } .legend span { display: inline-flex; gap: 6px; align-items: center; } .legend i { width: 9px; height: 9px; border-radius: 3px; }
.heat { display: grid; gap: 4px; font-size: 12px; } .heat .r { display: grid; grid-template-columns: 130px repeat(10, 1fr); gap: 4px; align-items: center; }
.heat .cell { height: 22px; border-radius: 6px; background: var(--panel-2); transition: transform .2s; } .heat .cell:hover { transform: scale(1.15); }
.heat .hd { font: 500 10px var(--mono); color: var(--text-3); text-align: center; }
.bar { height: 8px; border-radius: 8px; background: var(--panel-2); overflow: hidden; } .bar > i { display: block; height: 100%; border-radius: 8px; background: var(--accent-fill); transform-origin: left; animation: grow 1.1s cubic-bezier(.2,.8,.2,1) both; }
@keyframes grow { from { transform: scaleX(0); } }
.feed .ev { display: grid; grid-template-columns: 30px 1fr; gap: 10px; padding: 9px 4px; position: relative; } .feed .ev + .ev::before { content: ""; position: absolute; left: 18px; top: -12px; height: 16px; width: 1px; background: var(--line-2); }
.feed .ev .what { font-size: 13px; } .feed .ev .what b { font-weight: 600; } .feed .ev .when { font: 500 11px var(--mono); color: var(--text-3); }
.feed .ev.new { animation: flash 1.6s ease-out; } @keyframes flash { 0% { background: rgba(var(--accent-rgb), .22); } 100% { background: transparent; } }
.risk-row { display: grid; grid-template-columns: 46px 1fr auto; gap: 12px; align-items: center; padding: 10px; border-radius: 12px; cursor: pointer; }
.risk-row:hover { background: var(--panel-2); }
.pipeline { display: flex; gap: 6px; align-items: flex-end; height: 150px; }
.pipeline .col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; min-width: 0; }
.pipeline .col .b { width: 100%; border-radius: 10px 10px 4px 4px; background: var(--accent-fill); animation: up 1s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i) * 70ms); transform-origin: bottom; position: relative; }
.pipeline .col .b span { position: absolute; top: -20px; left: 0; right: 0; text-align: center; font: 700 13px var(--mono); }
.pipeline .col small { font-size: 10.5px; color: var(--text-3); text-align: center; line-height: 1.15; height: 26px; overflow: hidden; }
@keyframes up { from { transform: scaleY(0); } }

/* ---------- proyectos */
.board { display: grid; grid-template-columns: repeat(5, minmax(250px, 1fr)); gap: 14px; overflow-x: auto; padding-bottom: 10px; }
.lane { background: var(--panel-2); border-radius: 16px; padding: 12px; min-height: 300px; border: 1px solid var(--line-2); }
.lane h4 { margin: 2px 4px 12px; display: flex; gap: 8px; align-items: center; font-size: 13px; } .lane h4 .n { margin-left: auto; font: 600 11px var(--mono); color: var(--text-3); }
.pcard { display: block; background: var(--panel-solid); border-radius: 14px; padding: 12px; margin-bottom: 10px; border: 1px solid var(--line-2); cursor: pointer; transition: .22s; position: relative; overflow: hidden; }
.pcard:hover { transform: translateY(-3px); box-shadow: var(--glow); border-color: var(--line); }
.pcard .img { height: 110px; margin: -12px -12px 10px; background: var(--ink-1) center/cover no-repeat; border-bottom: 1px solid var(--line-2); }
.pcard .code { font: 600 11px var(--mono); color: var(--text-3); letter-spacing: .06em; } .pcard b { display: block; margin: 2px 0 8px; font-size: 14px; line-height: 1.25; }
.prog { height: 4px; border-radius: 4px; background: var(--ink-1); overflow: hidden; } .prog i { display: block; height: 100%; background: var(--accent-fill); border-radius: 4px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.gantt { position: relative; overflow-x: auto; } .gantt .gr { display: grid; grid-template-columns: 260px 1fr; align-items: center; min-height: 40px; border-bottom: 1px solid var(--line-2); }
.gantt .track { position: relative; height: 40px; } .gantt .gb { position: absolute; top: 10px; height: 20px; border-radius: 10px; background: linear-gradient(90deg, rgba(var(--teal-rgb), .4), rgba(var(--accent-rgb), .7)); box-shadow: var(--glow); }
.gantt .gb.late { background: linear-gradient(90deg, rgba(255,107,94,.4), rgba(255,107,94,.85)); } .gantt .gb.done { background: rgba(var(--teal-rgb), .45); box-shadow: none; }
.gantt .gb .pg { position: absolute; inset: 0; border-radius: 10px; background: rgba(255,255,255,.18); transform-origin: left; }
.gantt .today { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--accent-fill); box-shadow: 0 0 12px var(--accent); z-index: 2; }
.gantt .eta { position: absolute; top: 14px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--warn); background: var(--bg); transform: translateX(-6px); }

/* río del flujo */
.river { display: flex; gap: 0; overflow-x: auto; padding: 8px 2px 18px; }
.river .stp { min-width: 210px; padding: 0 12px; position: relative; }
.river .stp + .stp::before { content: ""; position: absolute; left: -14px; top: 34px; width: 28px; height: 2px; background: var(--accent); }
.river .stp .sn { font: 500 10.5px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); margin-bottom: 8px; display: flex; gap: 6px; align-items: center; }
.river .stp .sn b { color: var(--text); font-family: var(--font); letter-spacing: 0; text-transform: none; font-size: 13px; }
.tnode { padding: 12px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--panel-solid); margin-bottom: 8px; cursor: pointer; transition: .2s; position: relative; }
.tnode:hover { border-color: var(--line); transform: translateY(-2px); }
.tnode.active { border-color: var(--accent); box-shadow: var(--glow); } .tnode.active::after { content: ""; position: absolute; inset: -1px; border-radius: 14px; border: 1px solid var(--accent); animation: ping 2s infinite; }
@keyframes ping { 0% { opacity: .8; transform: scale(1); } 100% { opacity: 0; transform: scale(1.06); } }
.tnode.done { opacity: .75; } .tnode.done .tt::before { content: "✓ "; color: var(--ok); } .tnode.waiting { opacity: .55; }
.tnode .tt { font-weight: 600; font-size: 13px; } .tnode .tm { font-size: 11.5px; color: var(--text-3); display: flex; gap: 8px; align-items: center; margin-top: 6px; }

/* ---------- visor (Proof Studio) */
.studio { position: fixed; inset: 0; z-index: 40; background: #070b14; display: grid; grid-template-rows: 58px 1fr 64px; grid-template-columns: 200px 1fr 380px; animation: zin .35s cubic-bezier(.2,.8,.2,1); }
[data-theme="light"] .studio { background: #eceef2; }
@keyframes zin { from { opacity: 0; transform: scale(1.02); } }
.studio .sbar { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; padding: 0 14px; border-bottom: 1px solid var(--line-2); background: rgba(24,25,28,.9); backdrop-filter: var(--blur); }
[data-theme="light"] .studio .sbar, [data-theme="light"] .studio .sfoot, [data-theme="light"] .studio .side, [data-theme="light"] .studio .pages { background: rgba(255,255,255,.85); }
.studio .ttl { line-height: 1.15; min-width: 0; } .studio .ttl b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 32vw; } .studio .ttl span { font: 500 11px var(--mono); color: var(--text-3); }
.tools { display: flex; gap: 3px; padding: 4px; border-radius: 14px; background: var(--panel-2); border: 1px solid var(--line-2); }
.tool { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; border: 0; background: transparent; cursor: pointer; color: var(--text-2); position: relative; }
.tool:hover { color: var(--text); background: var(--ink-1); } .tool.on { background: var(--accent-fill); color: var(--accent-ink); }
.tool[data-tip]:hover::after { content: attr(data-tip); position: absolute; top: 44px; left: 50%; transform: translateX(-50%); white-space: nowrap; background: var(--panel-solid); color: var(--text);
  border: 1px solid var(--line-2); padding: 5px 9px; border-radius: 8px; font-size: 12px; z-index: 20; pointer-events: none; box-shadow: var(--shadow); }
.studio .pages { grid-row: 2; overflow: auto; padding: 12px; border-right: 1px solid var(--line-2); background: rgba(24,25,28,.6); }
.studio .pages .pg { border-radius: 10px; overflow: hidden; border: 2px solid transparent; margin-bottom: 10px; cursor: pointer; background: #fff; }
.studio .pages .pg.on { border-color: var(--accent); box-shadow: var(--glow); } .studio .pages .pg img { width: 100%; display: block; }
.vers { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.vers .v { display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 10px; cursor: pointer; font-size: 12.5px; border: 1px solid var(--line-2); }
.vers .v.on { border-color: var(--accent); background: rgba(var(--accent-rgb), .08); } .vers .v.cmp { border-color: var(--violet); background: rgba(195,155,255,.08); }
.stage { grid-row: 2; position: relative; overflow: hidden; cursor: grab; background:
  radial-gradient(circle at 50% 50%, rgba(var(--teal-rgb), .08), transparent 60%), repeating-conic-gradient(rgba(255,255,255,.025) 0 25%, transparent 0 50%) 0 0 / 24px 24px; }
.stage.drawing { cursor: crosshair; } .stage.panning { cursor: grabbing; }
.canvas { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; box-shadow: 0 30px 90px rgba(0,0,0,.6); }
.canvas img.art, .canvas canvas.art { display: block; user-select: none; -webkit-user-drag: none; }
.layer { position: absolute; inset: 0; pointer-events: none; } .layer svg { width: 100%; height: 100%; overflow: visible; }
.layer .hit { pointer-events: auto; cursor: pointer; }
.pin { position: absolute; width: 30px; height: 30px; margin: -30px 0 0 -4px; pointer-events: auto; cursor: pointer; transform-origin: 4px 30px; animation: drop .45s cubic-bezier(.3,1.6,.5,1) both; }
.pin div { width: 30px; height: 30px; border-radius: 15px 15px 15px 3px; background: var(--accent-fill); color: var(--accent-ink); display: grid; place-items: center; font: 700 12px var(--mono); box-shadow: 0 6px 18px rgba(0,0,0,.45), 0 0 0 3px rgba(11,18,32,.6); }
.pin.res div { background: var(--teal); opacity: .6; } .pin.sel div { transform: scale(1.2); box-shadow: 0 0 0 4px var(--accent), 0 0 30px var(--accent); }
@keyframes drop { from { transform: translateY(-30px) scale(.4); opacity: 0; } }
.zoomhud { position: absolute; left: 16px; bottom: 16px; display: flex; gap: 6px; align-items: center; padding: 6px; border-radius: 14px; background: var(--panel); backdrop-filter: var(--blur); border: 1px solid var(--line-2); z-index: 5; }
.zoomhud span { font: 600 12px var(--mono); min-width: 52px; text-align: center; }
.densi { position: absolute; z-index: 6; pointer-events: none; padding: 10px 12px; border-radius: 12px; background: var(--panel-solid); border: 1px solid var(--line); box-shadow: var(--shadow); font: 500 12px var(--mono); min-width: 150px; }
.densi .sw { height: 26px; border-radius: 6px; margin-bottom: 8px; border: 1px solid var(--line-2); } .densi .k { display: grid; grid-template-columns: 18px 1fr 36px; gap: 6px; align-items: center; }
.densi .k i { height: 6px; border-radius: 4px; display: block; }
.seps { position: absolute; right: 16px; top: 16px; z-index: 5; display: flex; flex-direction: column; gap: 6px; padding: 10px; border-radius: 14px; background: var(--panel); backdrop-filter: var(--blur); border: 1px solid var(--line-2); }
.seps label { display: flex; gap: 8px; align-items: center; font: 600 12px var(--mono); cursor: pointer; } .seps label i { width: 14px; height: 14px; border-radius: 4px; }
.swipe-handle { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--accent-fill); box-shadow: 0 0 18px var(--accent); z-index: 4; pointer-events: auto; cursor: ew-resize; }
.swipe-handle::after { content: "⟷"; position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 34px; height: 34px; border-radius: 50%; background: var(--accent-fill); color: var(--accent-ink); display: grid; place-items: center; font-weight: 700; }
.studio .side { grid-row: 2; border-left: 1px solid var(--line-2); display: flex; flex-direction: column; min-height: 0; background: rgba(24,25,28,.75); backdrop-filter: var(--blur); }
.tabs { display: flex; gap: 2px; padding: 8px; border-bottom: 1px solid var(--line-2); overflow-x: auto; }
.tabs button { flex: none; border: 0; background: transparent; padding: 8px 10px; border-radius: 10px; cursor: pointer; color: var(--text-3); display: inline-flex; gap: 6px; align-items: center; font-size: 12.5px; }
.tabs button.on { background: var(--panel-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); } .tabs button .n { font: 600 10px var(--mono); background: var(--ink-1); border-radius: 10px; padding: 1px 6px; }
.side .body { flex: 1; overflow: auto; padding: 14px; }
.cmt { padding: 12px; border-radius: 14px; border: 1px solid var(--line-2); margin-bottom: 10px; cursor: pointer; transition: .2s; background: var(--panel-2); }
.cmt:hover, .cmt.sel { border-color: var(--accent); } .cmt.res { opacity: .55; }
.cmt .hd { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 12.5px; } .cmt .hd .n { font: 700 11px var(--mono); width: 22px; height: 22px; border-radius: 6px 6px 6px 2px; background: var(--accent-fill); color: var(--accent-ink); display: grid; place-items: center; }
.cmt .bd { font-size: 13.5px; } .cmt .rep { margin: 8px 0 0 14px; padding-left: 10px; border-left: 2px solid var(--line-2); font-size: 13px; }
.chk { display: grid; grid-template-columns: 26px 1fr; gap: 10px; padding: 10px; border-radius: 12px; margin-bottom: 8px; background: var(--panel-2); border: 1px solid var(--line-2); cursor: pointer; }
.chk .s { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-weight: 800; }
.chk.pass .s { background: rgba(124,242,156,.15); color: var(--ok); } .chk.warn .s { background: rgba(255,211,110,.15); color: var(--warn); } .chk.fail .s { background: rgba(255,107,94,.15); color: var(--bad); } .chk.info .s { background: rgba(142,203,255,.15); color: var(--info); }
.chk b { font-size: 13px; display: block; } .chk span { font-size: 12.5px; color: var(--text-2); }
.copilot-hd { padding: 14px; border-radius: 16px; margin-bottom: 12px; background: linear-gradient(135deg, rgba(var(--accent-rgb), .14), rgba(var(--teal-rgb), .08)); border: 1px solid var(--line); }
.score { display: flex; align-items: center; gap: 14px; }
.diffl { padding: 10px; border-radius: 12px; border: 1px solid var(--line-2); margin-bottom: 8px; cursor: pointer; font-size: 13px; background: var(--panel-2); }
.diffl:hover { border-color: var(--violet); } .diffl del { color: var(--bad); text-decoration: line-through; background: rgba(255,107,94,.1); padding: 0 3px; border-radius: 4px; }
.diffl ins { color: var(--ok); text-decoration: none; background: rgba(124,242,156,.12); padding: 0 3px; border-radius: 4px; }
.studio .sfoot { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; padding: 0 16px; border-top: 1px solid var(--line-2); background: rgba(24,25,28,.92); backdrop-filter: var(--blur); }
.palette-sw { display: flex; gap: 6px; flex-wrap: wrap; } .palette-sw div { width: 52px; } .palette-sw i { display: block; height: 34px; border-radius: 8px; border: 1px solid var(--line-2); }
.palette-sw small { font: 500 9.5px var(--mono); color: var(--text-3); display: block; margin-top: 3px; }
.mock3d { position: absolute; inset: 0; display: grid; place-items: center; perspective: 1600px; z-index: 3; background: radial-gradient(circle at 50% 40%, rgba(var(--accent-rgb), .12), transparent 55%), #070b14; }
.mock3d .obj { position: relative; transform-style: preserve-3d; animation: spin 16s linear infinite; }
.mock3d .obj:hover { animation-play-state: paused; } .mock3d .face { position: absolute; background-repeat: no-repeat; backface-visibility: hidden; box-shadow: inset 0 0 60px rgba(0,0,0,.15); }
.mock3d .floor { position: absolute; width: 520px; height: 520px; border-radius: 50%; background: radial-gradient(circle, rgba(0,0,0,.55), transparent 60%); transform: rotateX(90deg) translateZ(-230px); }
@keyframes spin { from { transform: rotateX(-14deg) rotateY(0deg); } to { transform: rotateX(-14deg) rotateY(360deg); } }

/* ---------- modales, cajones, toasts, paleta de comandos */
.veil { position: fixed; inset: 0; z-index: 60; background: rgba(8,8,10,.55); backdrop-filter: blur(8px); display: grid; place-items: center; animation: fade .25s; padding: 20px; }
@keyframes fade { from { opacity: 0; } }
.modal { width: min(720px, 100%); max-height: 90vh; overflow: auto; background: var(--panel-solid); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow), var(--glow); padding: 24px; animation: pop .35s cubic-bezier(.2,1.2,.3,1); }
.modal.wide { width: min(1040px, 100%); } @keyframes pop { from { opacity: 0; transform: translateY(16px) scale(.97); } }
.modal .mh { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; } .modal .mh .sp { flex: 1; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(460px, 100%); z-index: 55; background: var(--panel-solid); border-left: 1px solid var(--line); box-shadow: var(--shadow);
  padding: 22px; overflow: auto; animation: slide .35s cubic-bezier(.2,.8,.2,1); }
@keyframes slide { from { transform: translateX(40px); opacity: 0; } }
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 80; display: flex; flex-direction: column; gap: 10px; }
.toast { min-width: 280px; max-width: 420px; padding: 12px 16px; border-radius: 14px; background: var(--panel-solid); border: 1px solid var(--line); box-shadow: var(--shadow); display: flex; gap: 10px; align-items: center; animation: tin .4s cubic-bezier(.2,1.3,.3,1); font-size: 13.5px; }
.toast.bad { border-color: rgba(255,107,94,.4); } .toast .ic { color: var(--accent); } .toast.bad .ic { color: var(--bad); }
@keyframes tin { from { transform: translateY(20px) scale(.95); opacity: 0; } }
.palette { width: min(640px, 100%); background: var(--panel-solid); border-radius: 20px; border: 1px solid var(--line); box-shadow: var(--shadow), var(--glow); overflow: hidden; align-self: start; margin-top: 12vh; animation: pop .3s cubic-bezier(.2,1.2,.3,1); }
.palette input { width: 100%; padding: 18px 20px; border: 0; outline: 0; background: transparent; font-size: 17px; border-bottom: 1px solid var(--line-2); }
.palette .res { max-height: 50vh; overflow: auto; padding: 8px; } .palette .it { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 12px; cursor: pointer; }
.palette .it.on, .palette .it:hover { background: rgba(var(--accent-rgb), .1); } .palette .it .k { margin-left: auto; font: 500 10px var(--mono); color: var(--text-3); text-transform: uppercase; letter-spacing: .1em; }
.dz { border: 1.5px dashed var(--line); border-radius: 18px; padding: 26px; text-align: center; color: var(--text-2); cursor: pointer; transition: .2s; background: rgba(var(--accent-rgb), .03); }
.dz:hover, .dz.over { border-color: var(--accent); background: rgba(var(--accent-rgb), .08); color: var(--text); }
.scan { position: relative; overflow: hidden; } .scan::after { content: ""; position: absolute; left: 0; right: 0; height: 40%; top: -40%; background: linear-gradient(180deg, transparent, rgba(var(--accent-rgb), .25), transparent); animation: scan 1.6s linear infinite; }
@keyframes scan { to { top: 100%; } }
.skel { background: linear-gradient(90deg, var(--panel-2), var(--ink-1), var(--panel-2)); background-size: 200% 100%; animation: sh 1.4s infinite; border-radius: 12px; }
@keyframes sh { to { background-position: -200% 0; } }

/* ---------- login */
.login { position: fixed; inset: 0; display: grid; grid-template-columns: 1.1fr .9fr; z-index: 2; }
.login .art { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: 48px; }
.login .beam { position: absolute; inset: 0; background: repeating-linear-gradient(100deg, transparent 0 28px, rgba(var(--accent-rgb), .06) 28px 30px); mask-image: linear-gradient(180deg, transparent, #000 40%, transparent); animation: beam 9s linear infinite; }
@keyframes beam { to { background-position: 600px 0; } }
.login h1 { font-family: var(--font-display); font-size: clamp(44px, 6vw, 92px); line-height: .98; letter-spacing: -.012em; margin: 0; font-weight: 700; text-transform: uppercase; }
.login h1 em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.login .formside { display: grid; place-items: center; padding: 40px; }
.login form { width: min(400px, 100%); display: flex; flex-direction: column; gap: 14px; padding: 32px; border-radius: 24px; background: var(--panel); border: 1px solid var(--line); backdrop-filter: var(--blur); box-shadow: var(--shadow); }
.login .err { color: var(--bad); font-size: 13px; min-height: 18px; }
.login .stats { display: flex; gap: 34px; } .login .stats b { font-size: 34px; display: block; color: var(--accent); letter-spacing: -.008em; } .login .stats span { font: 500 10.5px var(--mono); color: var(--text-3); letter-spacing: .12em; text-transform: uppercase; }
@media (max-width: 900px) { .login { grid-template-columns: 1fr; } .login .art { display: none; } }

/* calendario */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; } .cal .dh { font: 500 10.5px var(--mono); color: var(--text-3); text-align: center; letter-spacing: .1em; }
.cal .d { min-height: 112px; border-radius: 14px; background: var(--panel-2); border: 1px solid var(--line-2); padding: 8px; font-size: 12px; display: flex; flex-direction: column; gap: 4px; overflow: hidden; }
.cal .d.out { opacity: .35; } .cal .d.today { border-color: var(--accent); box-shadow: var(--glow); } .cal .d .n { font: 700 13px var(--mono); color: var(--text-2); }
.cal .e { padding: 3px 7px; border-radius: 7px; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; border-left: 3px solid var(--accent); background: rgba(var(--accent-rgb), .08); }
.cal .e.task { border-color: var(--teal); background: rgba(var(--teal-rgb), .1); } .cal .e.fair, .cal .e.launch { border-color: var(--violet); background: rgba(195,155,255,.1); } .cal .e.regulation, .cal .e.audit { border-color: var(--warn); background: rgba(255,211,110,.1); }

/* DAM */
.masonry { columns: 4 240px; column-gap: 16px; } .asset { break-inside: avoid; margin-bottom: 16px; border-radius: 16px; overflow: hidden; background: var(--panel); border: 1px solid var(--line-2); cursor: pointer; transition: .25s; position: relative; }
.asset:hover { transform: translateY(-4px); box-shadow: var(--glow); } .asset img { width: 100%; display: block; background: #fff; }
.asset .meta { padding: 12px; } .asset .meta b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.asset .sel { position: absolute; top: 10px; right: 10px; width: 26px; height: 26px; border-radius: 8px; background: rgba(11,18,32,.6); border: 1px solid var(--line); display: grid; place-items: center; }
.asset.on { box-shadow: 0 0 0 2px var(--accent); } .asset.on .sel { background: var(--accent-fill); color: var(--accent-ink); }

/* diseñador de flujos */
.wfd { display: flex; gap: 14px; overflow-x: auto; padding: 6px 2px 16px; } .wfd .stc { min-width: 250px; background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 16px; padding: 12px; }
.wfd .stc .tc { background: var(--panel-solid); border-radius: 12px; padding: 10px; margin-bottom: 8px; border: 1px solid var(--line-2); display: grid; gap: 6px; }
.wfd .stc .tc .input { padding: 7px 9px; font-size: 12.5px; border-radius: 9px; }
.diffview { font: 14px/1.7 var(--font); padding: 16px; border-radius: 14px; background: var(--ink-3); border: 1px solid var(--line-2); white-space: pre-wrap; }
.diffview del { color: var(--bad); background: rgba(255,107,94,.12); text-decoration: line-through; border-radius: 4px; padding: 0 2px; }
.diffview ins { color: var(--ok); background: rgba(124,242,156,.14); text-decoration: none; border-radius: 4px; padding: 0 2px; }
.dynform .fblock { padding: 16px; border-radius: 16px; background: var(--panel-2); border: 1px solid var(--line-2); margin-bottom: 14px; }
.dynform .fblock h3 { margin-bottom: 12px; } .dynform .ff { min-width: 160px; } .dynform .ff.err .input, .dynform .ff.err { outline: 2px solid var(--bad); border-radius: 12px; }
.dynform .slid { flex: 0 0 100%; padding: 12px; border-radius: 12px; border: 1px dashed var(--line); margin: 6px 0; }
.braille { font-size: 28px; letter-spacing: 4px; color: var(--accent); }
.hash { font: 500 11px var(--mono); color: var(--text-3); word-break: break-all; }
.mobile-only { display: none; } @media (max-width: 900px) { .mobile-only { display: grid; } .studio { grid-template-columns: 1fr; grid-template-rows: 58px 1fr 45vh 64px; } .studio .pages { display: none; } .studio .side { grid-row: 3; } }
.tbl tr.unav td { opacity: .5; cursor: not-allowed; }
.acc + .acc { border-top: 1px solid var(--line-2); } .acc .li { border-bottom: 0; } .acc-b { padding: 0 8px 12px; }
.c9 { grid-column: span 9; } @media (max-width: 1180px) { .c9 { grid-column: span 12; } }
.tbl tr.grp td { background: var(--panel-2); }
.userpick { max-height: 150px; overflow: auto; padding: 8px 10px; border-radius: 12px; background: var(--ink-3); border: 1px solid var(--line-2); display: grid; gap: 4px; }
.asset.expired img { filter: grayscale(1) opacity(.55); } .asset.expired .meta b { text-decoration: line-through; }
.cal .d { cursor: pointer; user-select: none; } .cal .d.ranging { background: rgba(var(--accent-rgb), .12); border-color: var(--accent); }

/* ---------- modo día / noche */
:root, [data-theme="dark"] { --halo: rgba(255,45,139,.16); --stage: #070b14; }
[data-theme="light"] { --halo: rgba(255,45,139,.10); --stage: #e9ebef; --shadow: 0 24px 60px -34px rgba(11,18,32,.30), 0 1px 0 rgba(255,255,255,.9) inset; }
html.theme-anim, html.theme-anim * { transition: background-color .5s, color .5s, border-color .5s, fill .5s, stroke .5s, box-shadow .5s !important; }
.themesw { position: relative; display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: 30px; border: 1px solid var(--line-2); background: var(--panel-2); }
.themesw button { position: relative; z-index: 1; width: 34px; height: 32px; border-radius: 30px; border: 0; background: transparent; color: var(--text-3); display: grid; place-items: center; cursor: pointer; transition: color .3s; }
.themesw button .ic { width: 17px; height: 17px; }
.themesw i { position: absolute; top: 3px; left: 3px; width: 34px; height: 32px; border-radius: 30px; background: var(--accent-fill); box-shadow: 0 4px 18px -4px var(--accent); transition: transform .45s cubic-bezier(.3,1.4,.5,1); }
[data-theme="dark"] .themesw i { transform: translateX(36px); }
[data-theme="dark"] .themesw [data-th="dark"], [data-theme="light"] .themesw [data-th="light"] { color: var(--accent-ink); }
[data-theme="light"] .top { background: rgba(255,255,255,.62); }
[data-theme="light"] .btn.primary { box-shadow: 0 8px 24px -10px rgba(var(--accent-rgb), .6); }
[data-theme="light"] .input:focus { box-shadow: 0 0 0 4px rgba(var(--accent-rgb), .14); }
[data-theme="light"] .palette .it.on, [data-theme="light"] .palette .it:hover { background: rgba(var(--accent-rgb), .1); }
[data-theme="light"] .veil { background: rgba(11,18,32,.28); }
[data-theme="light"] .studio { background: var(--stage); }
[data-theme="light"] .stage { background: radial-gradient(circle at 50% 50%, rgba(var(--teal-rgb), .08), transparent 60%), repeating-conic-gradient(rgba(11,18,32,.035) 0 25%, transparent 0 50%) 0 0 / 24px 24px; }
[data-theme="light"] .canvas { box-shadow: 0 30px 80px -20px rgba(42,44,49,.35); }
[data-theme="light"] .login .beam { background: repeating-linear-gradient(100deg, transparent 0 28px, rgba(var(--accent-rgb), .07) 28px 30px); }
[data-theme="light"] .mock3d { background: radial-gradient(circle at 50% 40%, rgba(var(--accent-rgb), .14), transparent 55%), #e9ebef; }
[data-theme="light"] .studio .side, [data-theme="light"] .studio .pages { background: rgba(255,255,255,.88); }
[data-theme="light"] .kpi.hot { border-color: rgba(196,43,28,.35); }
[data-theme="light"] .pin div { box-shadow: 0 6px 18px rgba(11,18,32,.25), 0 0 0 3px rgba(255,255,255,.8); }
[data-theme="light"] .aurora i:nth-child(1) { background: radial-gradient(circle, rgba(var(--accent-rgb), .16), transparent 60%); }
[data-theme="light"] .aurora i:nth-child(2) { background: radial-gradient(circle, rgba(var(--teal-rgb), .18), transparent 60%); }

/* ---------- símbolo animado del acceso (icons.XMARK): los dos trazos entran en movimiento y el punto «llega»; una sola vez.
   Sin sombras ni deformaciones (normas de marca). Con prefers-reduced-motion, estático. */
.xmark { width: 100%; height: auto; overflow: visible; display: block; color: var(--text); }
.xmark .xm-b1, .xmark .xm-b2, .xmark .xm-dot, .xmark .xm-word { transform-box: fill-box; transform-origin: center; }
.xmark .xm-b1 { animation: xbar .9s cubic-bezier(.2,.8,.2,1) .15s both; }
.xmark .xm-b2 { animation: xbar .9s cubic-bezier(.2,.8,.2,1) .32s both; }
.xmark .xm-dot { animation: xdot .75s cubic-bezier(.3,1.45,.55,1) .8s both; }
.xmark .xm-word { animation: xword .7s ease-out 1.05s both; }
@keyframes xbar { from { transform: translateX(-70%); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes xdot { from { transform: translateY(-180%); opacity: 0; } 50% { opacity: 1; } to { transform: none; opacity: 1; } }
@keyframes xword { from { transform: translateY(14%); opacity: 0; } to { transform: none; opacity: 1; } }
.xwrap .xmark, .xmini .xmark { transition: opacity .45s ease, transform .45s ease; }
.xwrap.go .xmark, .xmini.go .xmark { opacity: 0; transform: translateX(6%); }
@media (prefers-reduced-motion: reduce) { .xmark * { animation: none !important; } .xwrap .xmark, .xmini .xmark { transition: none; } }
.xwrap { width: clamp(160px, 14vw, 230px); flex: none; position: relative; }
.login h1.claim { text-transform: none; font-size: clamp(34px, 4vw, 60px); line-height: 1.05; font-weight: 800; letter-spacing: -.015em; }
.login h1.claim em { font-style: normal; color: var(--accent); background: none; }
.login .tagline { font: 600 12px/1 var(--font); letter-spacing: .32em; text-transform: uppercase; color: var(--text-2); }
.login .hero2 { position: relative; display: flex; align-items: center; gap: clamp(20px, 3vw, 56px); }
.login .hero2 h1 { font-size: clamp(42px, 4.8vw, 80px); }
.login-theme { position: absolute; top: 22px; right: 24px; z-index: 3; }
.login .formside { position: relative; }
.xmini { display: none; width: 92px; margin: -6px auto 4px; }
@media (max-width: 1180px) { .xwrap { width: clamp(140px, 16vw, 200px); } }
@media (max-width: 900px) { .xmini { display: block; } }
.langsw { display: inline-flex; gap: 2px; padding: 3px; border-radius: 30px; border: 1px solid var(--line-2); background: var(--panel-2); }
.langsw button { border: 0; background: transparent; color: var(--text-3); font: 600 11px var(--mono); letter-spacing: .06em; padding: 0 9px; height: 30px; border-radius: 30px; cursor: pointer; transition: .25s; }
.langsw button:hover { color: var(--text); } .langsw button.on { background: var(--accent-fill); color: var(--accent-ink); }
.av.xl { width: 72px; height: 72px; font-size: 22px; box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--accent); }
.top-me { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 30px; border: 1px solid var(--line-2); background: var(--panel-2); transition: .2s; }
.top-me:hover { border-color: var(--line); box-shadow: var(--glow); } .top-me .av { width: 32px; height: 32px; box-shadow: 0 0 0 2px var(--accent); }
.top-me .who { font-size: 13px; font-weight: 600; white-space: nowrap; max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
.pwrules { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 12px; font-size: 12.5px; color: var(--text-3); }
.pwrules span { display: inline-flex; align-items: center; gap: 5px; transition: color .2s; } .pwrules .ic { width: 15px; height: 15px; opacity: .35; }
.pwrules span.ok { color: var(--ok); } .pwrules span.ok .ic { opacity: 1; }
.ferr { color: var(--bad); font-size: 12.5px; min-height: 0; } .pwf.bad .input { border-color: var(--bad); box-shadow: 0 0 0 4px rgba(255,107,94,.12); }

/* ---------- responsive: barra superior, rejillas, tablas y formularios en cualquier ancho */
.main, .view, .top { min-width: 0; } .top > * { flex-shrink: 0; } .top .search { flex-shrink: 1; min-width: 0; }
.brandsel select { max-width: 200px; text-overflow: ellipsis; }
@media (max-width: 1280px) { .top-me .who { display: none; } .top-me { padding: 3px; } }
@media (max-width: 1100px) { .top .search .kbd { display: none; } }
@media (max-width: 900px) {
  .top { gap: 8px; }
  .top .search { flex: 1 1 40px; padding: 9px 11px; } .top .search > span { display: none; }
  .brandsel { padding: 8px 10px; } .brandsel select { max-width: 120px; }
  .langsw button { padding: 0 7px; }
  .cols3 { grid-template-columns: 1fr 1fr; }
  .modal, .modal.wide { width: 100%; padding: 18px; border-radius: 18px; max-height: 92vh; }
  .veil { padding: 10px; }
  .tbl { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .tbl th, .tbl td { white-space: nowrap; }
  .tbl td[style*="max-width"] { white-space: normal; min-width: 220px; }
}
@media (max-width: 640px) {
  .top { padding: 10px 12px; }
  .top .live, .brandsel > .ic { display: none; }
  .brandsel select { max-width: 92px; }
  .themesw button { width: 30px; } .themesw i { width: 30px; } [data-theme="dark"] .themesw i { transform: translateX(32px); }
  .view { padding: 16px 12px 70px; }
  .cols2, .cols3 { grid-template-columns: 1fr; }
  .panel { padding: 14px; border-radius: 16px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .kpi { padding: 12px 14px; } .kpi .v { font-size: 26px; }
  h1.hero { font-size: 28px !important; } h2 { font-size: 18px; }
  .row { min-width: 0; } .btn { white-space: normal; }
  .cards { grid-template-columns: 1fr; }
  .seg { max-width: 100%; overflow-x: auto; } .seg button { flex: none; }
  .toasts { left: 12px; right: 12px; bottom: 12px; } .toast { min-width: 0; max-width: none; }
  .inbox .item { grid-template-columns: 44px 1fr; } .inbox .item > :last-child { grid-column: 2; justify-self: start; } .inbox .thumb { width: 44px; height: 44px; }
  .palette { margin-top: 6vh; }
  .login form { padding: 22px; } .login .formside { padding: 64px 14px 24px; align-items: start; }
}

/* ---------- acabado tipográfico y botones: textos cuadrados y legibles, botones de tamaño uniforme */
html { -webkit-text-size-adjust: 100%; text-rendering: optimizeLegibility; font-kerning: normal; }
h1, h2, h3, .hero, .login h1 { text-wrap: balance; }
p, .sub, .muted, .li .t span, .chk span, .cmt .bd { text-wrap: pretty; }
/* párrafos de lectura: justificados con guiones para que el bloque quede cuadrado sin «ríos» */
p.sub, .panel > p, .modal p.sub, details p, .pcard > p, .faq p, .copilot-hd .muted, .chk span, .cmt .bd, .login .sub {
  text-align: justify; text-justify: inter-word; hyphens: auto; -webkit-hyphens: auto; hyphenate-limit-chars: 7 3 3; }
.sub { line-height: 1.6; } p { line-height: 1.6; }
/* botones: misma altura, mismo radio, iconos y texto centrados */
.btn { min-height: 40px; padding: 0 18px; line-height: 1.15; text-align: center; vertical-align: middle; }
.btn.sm { min-height: 32px; padding: 0 13px; }
.btn .ic { flex: none; } .iconbtn { flex: none; }
.row.end .btn, .mh .btn, .panel-h .btn { min-width: 112px; }
.row.end .btn.sm, .panel-h .btn.sm { min-width: 0; }
.row.end { gap: 10px; }
.modal .row.end { padding-top: 6px; border-top: 1px solid var(--line-2); margin-top: 18px !important; padding-top: 16px; }
.panel-h { flex-wrap: wrap; row-gap: 8px; } .panel-h h2, .panel-h h3 { margin-right: auto; }
.panel-h .sp { display: none; }
/* las celdas de las rejillas pueden encoger (tablas y bloques de código hacen scroll dentro, no rompen la página) */
.grid > *, .cols2 > *, .cols3 > *, .row > .field { min-width: 0; }
.row > .field { flex: 1 1 150px; }
@media (max-width: 640px) {
  .row.end { justify-content: stretch; } .row.end > .btn { flex: 1 1 auto; min-width: 0; } .row.end > .sp { display: none; }
  .modal .row.end { flex-wrap: wrap; } .modal .row.end > .btn { flex: 1 1 40%; }
  p.sub, .panel > p { text-align: left; hyphens: manual; }
}
.input { min-width: 0; }
@media (max-width: 900px) {
  .studio .sbar .ttl b { max-width: 46vw; }
  .studio .sfoot { overflow-x: auto; scrollbar-width: none; gap: 8px; } .studio .sfoot .tag { display: none; }
  .studio .sfoot .btn { flex: none; min-width: 0; padding: 0 12px; }
}
/* grupos de botones de acción: misma anchura por fila, sin huecos desiguales */
.actions { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 10px; max-width: 760px; }
.actions .btn { width: 100%; }
@media (max-width: 640px) { .actions { grid-template-columns: 1fr 1fr; } .actions .btn.primary:first-child { grid-column: 1 / -1; } }
.app, .main { height: 100vh; height: 100dvh; }
@media (max-width: 900px) {
  .studio { grid-template-rows: 56px minmax(240px, 1fr) min(40vh, 360px) 60px; }
  .studio .ttl { min-width: 120px; flex: 1 1 140px; } .studio .ttl span { display: none; } .studio .ttl b { max-width: 100%; }
  .studio .sbar > .st { display: none; }
  .studio .sfoot > b, .studio .sfoot > .live, .studio .sfoot > .muted { display: none; }
  .studio .sfoot { justify-content: flex-end; }
  .zoomhud { left: 10px; bottom: 10px; padding: 4px; } .zoomhud .tool { width: 32px; height: 32px; }
}
/* calendario en móvil: agenda por días con los textos completos */
.agenda { display: none; padding: 6px 14px; }
.ag-day { display: grid; grid-template-columns: 46px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.ag-day:last-child { border-bottom: 0; } .ag-day.today .ag-date b { background: var(--accent-fill); color: var(--accent-ink); }
.ag-date { text-align: center; } .ag-date b { display: grid; place-items: center; width: 38px; height: 38px; margin: 0 auto; border-radius: 12px; font: 700 16px var(--mono); background: var(--panel-2); }
.ag-date span { font: 500 10.5px var(--mono); color: var(--text-3); }
.ag-ev { display: grid; gap: 6px; min-width: 0; } .ag-ev .e { white-space: normal; font-size: 12.5px; padding: 6px 9px; line-height: 1.35; }
@media (max-width: 700px) { .cal-wrap { display: none; } .agenda { display: block; } }
/* comparar texto aprobado frente al arte */
.tc-grid { align-items: stretch; } .tc-side { grid-column: span 6; display: flex; flex-direction: column; } @media (max-width: 900px) { .tc-side { grid-column: span 12; } }
.tc-dz { flex: 1; min-height: 190px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; }
.tc-dz .ic { width: 30px; height: 30px; color: var(--accent); } .tc-dz b { font-size: 15px; } .tc-dz span { font-size: 12.5px; color: var(--text-3); }
.tc-file { flex: 1; min-height: 190px; display: grid; grid-template-columns: 120px 1fr auto; gap: 14px; align-items: center; padding: 12px; border-radius: 14px; background: var(--panel-2); border: 1px solid var(--line-2); }
.tc-file img { width: 120px; height: 150px; object-fit: contain; background: #fff; border-radius: 10px; box-shadow: var(--shadow); }
.tc-ico { width: 120px; height: 150px; display: grid; place-items: center; border-radius: 10px; background: var(--ink-1); color: var(--text-3); } .tc-ico .ic { width: 40px; height: 40px; }
.tc-file .t { min-width: 0; } .tc-file .t b { display: block; overflow-wrap: anywhere; } .tc-file .t span { font: 500 11.5px var(--mono); color: var(--text-3); }
.tc-res { display: grid; grid-template-columns: minmax(280px, 380px) 1fr; gap: 18px; align-items: start; }
@media (max-width: 1000px) { .tc-res { grid-template-columns: 1fr; } }
.tc-list { max-height: 70vh; overflow: auto; display: grid; gap: 8px; align-content: start; }
.tc-ch { text-align: left; display: grid; gap: 4px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--panel-2); cursor: pointer; font-size: 13.5px; transition: .2s; }
.tc-ch:hover, .tc-ch.on { border-color: var(--warn); box-shadow: 0 0 0 3px rgba(255,211,110,.18); }
.tc-ch.delete .tag { color: var(--bad); } .tc-ch.insert .tag { color: var(--info); } .tc-ch.replace .tag { color: var(--warn); }
.tc-ch del { color: var(--bad); background: rgba(255,107,94,.12); text-decoration: line-through; border-radius: 4px; padding: 0 3px; }
.tc-ch ins { color: var(--ok); background: rgba(124,242,156,.14); text-decoration: none; border-radius: 4px; padding: 0 3px; }
.tc-art { min-width: 0; } .tc-canvas { position: relative; border-radius: 12px; overflow: hidden; background: #fff; box-shadow: var(--shadow); }
.tc-canvas img { display: block; width: 100%; height: auto; } .tc-canvas svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.tc-canvas rect { fill: rgba(255,107,94,.18); stroke: #ff5a4a; stroke-width: 2; vector-effect: non-scaling-stroke; cursor: pointer; }
.tc-canvas rect.on { fill: rgba(255,211,110,.35); stroke: #e0a800; stroke-width: 3; }
.tc-zoom { position: relative; height: 190px; overflow: hidden; border-radius: 12px; background: #fff; margin-bottom: 12px; box-shadow: var(--shadow); border: 2px solid var(--warn); }
.tc-zwrap { position: absolute; left: 50%; top: 50%; } .tc-zwrap img { display: block; width: 100%; height: auto; }
.tc-zwrap svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.tc-zwrap rect { fill: rgba(255,211,110,.3); stroke: #e0a800; stroke-width: 2.5; vector-effect: non-scaling-stroke; }
.tc-zoom > .chip { position: absolute; left: 10px; bottom: 10px; background: var(--panel-solid); box-shadow: var(--shadow); }
.tc-zoom del { color: var(--bad); } .tc-zoom ins { color: var(--ok); text-decoration: none; font-weight: 700; }
/* maqueta 3D: girarla con la mano */
.mock3d { touch-action: none; user-select: none; } .mock3d.grab { cursor: grab; } .mock3d.grabbing { cursor: grabbing; }
.mock3d.grabbing .obj, .mock3d .obj[style*="animation: none"] { transition: none; }
.m3d-hint { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--panel-solid); box-shadow: var(--shadow); pointer-events: none; }
.stage:has(.mock3d) .zoomhud, .stage:has(.mock3d) .seps { display: none; }
.btn.busy { opacity: .85; cursor: progress; } .btn[disabled].busy { pointer-events: none; }
.spin { width: 15px; height: 15px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; display: inline-block; animation: spin360 .7s linear infinite; flex: none; }
@keyframes spin360 { to { transform: rotate(360deg); } }
.toast.ok-big { border-color: var(--ok); box-shadow: var(--shadow), var(--glow); padding: 14px 18px; }
.toast .okmark { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--ok); color: var(--bg); flex: none; animation: pop .5s cubic-bezier(.2,1.6,.3,1); }
.toast .okmark .ic { color: var(--bg); width: 20px; height: 20px; }
.asset.flash { animation: flashring 2.4s ease-out 2; } @keyframes flashring { 0% { box-shadow: 0 0 0 0 var(--accent); } 30% { box-shadow: 0 0 0 6px var(--accent), var(--glow); } 100% { box-shadow: 0 0 0 0 transparent; } }
.field.err .input { border-color: var(--bad); box-shadow: 0 0 0 4px rgba(255,107,94,.14); }
.mock3d .fit { transform-style: preserve-3d; display: grid; place-items: center; }
/* maqueta 3D: selector de forma y editor de pliegues */
.mock3d .face.lid { background: #f1ede4; box-shadow: inset 0 0 40px rgba(0,0,0,.12); }
.m3d-bar { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); z-index: 4; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: center; max-width: calc(100% - 24px); }
.m3d-bar .seg { background: var(--panel-solid); box-shadow: var(--shadow); } .m3d-bar .chip { background: var(--panel-solid); box-shadow: var(--shadow); } .m3d-bar .chip.warn { color: var(--warn); }
.m3d-bar .btn { background: var(--panel-solid); box-shadow: var(--shadow); }
.foldedit { position: absolute; inset: 0; z-index: 6; pointer-events: none; }
.fe-band { position: absolute; border: 2px dashed rgba(255,170,60,.9); background: rgba(var(--accent-rgb), .07); }
.fe-v, .fe-h { position: absolute; pointer-events: auto; }
.fe-v { top: 0; bottom: 0; width: 22px; margin-left: -11px; cursor: ew-resize; } .fe-v i { position: absolute; left: 10px; top: 0; bottom: 0; width: 3px; background: #3ddc84; box-shadow: 0 0 12px #3ddc84; }
.fe-v::after { content: ""; position: absolute; left: 3px; top: 50%; width: 16px; height: 46px; margin-top: -23px; border-radius: 8px; background: #3ddc84; box-shadow: 0 4px 14px rgba(0,0,0,.35); }
.fe-h { left: 0; right: 0; height: 22px; margin-top: -11px; cursor: ns-resize; } .fe-h i { position: absolute; top: 10px; left: 0; right: 0; height: 3px; background: #ff9f3d; box-shadow: 0 0 12px #ff9f3d; }
.fe-h::after { content: ""; position: absolute; top: 3px; left: 50%; width: 46px; height: 16px; margin-left: -23px; border-radius: 8px; background: #ff9f3d; box-shadow: 0 4px 14px rgba(0,0,0,.35); }
.fe-lab { position: absolute; transform: translate(-50%, 8px); font: 700 13px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: #0b1220; background: #3ddc84; padding: 3px 9px; border-radius: 8px; white-space: nowrap; }
.foldbar { position: absolute; left: 12px; right: 12px; top: 12px; z-index: 8; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 10px 12px; border-radius: 14px; background: var(--panel-solid); border: 1px solid var(--line); box-shadow: var(--shadow); }
.foldedit { --u: calc(1px * var(--iz, 1)); }
.fe-band { border-width: calc(2 * var(--u)); }
.fe-v { width: calc(22 * var(--u)); margin-left: calc(-11 * var(--u)); } .fe-v i { left: calc(10 * var(--u)); width: calc(3 * var(--u)); }
.fe-v::after { left: calc(3 * var(--u)); width: calc(16 * var(--u)); height: calc(46 * var(--u)); margin-top: calc(-23 * var(--u)); border-radius: calc(8 * var(--u)); }
.fe-h { height: calc(22 * var(--u)); margin-top: calc(-11 * var(--u)); } .fe-h i { top: calc(10 * var(--u)); height: calc(3 * var(--u)); }
.fe-h::after { top: calc(3 * var(--u)); width: calc(46 * var(--u)); height: calc(16 * var(--u)); margin-left: calc(-23 * var(--u)); border-radius: calc(8 * var(--u)); }
.fe-lab { font-size: calc(13 * var(--u)); padding: calc(3 * var(--u)) calc(9 * var(--u)); border-radius: calc(8 * var(--u)); transform: translate(-50%, calc(8 * var(--u))); }
.fe-lab.pick { pointer-events: auto; cursor: pointer; background: #e9f7ee; color: #1f5132; } .fe-lab.front { background: #3ddc84; color: #0b1220; }
.fe-lab:not(.pick) { background: rgba(255,255,255,.9); color: #363f55; }
.fe-lab { transform: translate(-50%, -50%); } .fe-v.drag i, .fe-h.drag i { filter: brightness(1.25); } .fe-v.drag::after, .fe-h.drag::after { transform: scale(1.15); }
.fe-h { z-index: 3; } .fe-v { z-index: 2; } .fe-lab { z-index: 1; }
.fe-h { height: calc(34 * var(--u)); margin-top: calc(-17 * var(--u)); } .fe-h i { top: calc(16 * var(--u)); }
.fe-h::after { top: calc(9 * var(--u)); width: calc(64 * var(--u)); }
.fe-v { width: calc(30 * var(--u)); margin-left: calc(-15 * var(--u)); } .fe-v i { left: calc(14 * var(--u)); } .fe-v::after { left: calc(7 * var(--u)); }


/* ---------- calendario estilo Google Calendar */
.cal-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.cal-title { font-size: 24px; margin: 0 0 0 6px; letter-spacing: -.01em; text-transform: capitalize; }
.cal-filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; } .cal-filters .chip { cursor: pointer; } .cal-hint { font-size: 12px; margin-left: auto; }
.cal-body { overflow: hidden; }
.cal { padding: 10px; gap: 6px; } .cal .dh { text-transform: capitalize; padding-bottom: 4px; }
.cal .d { min-height: 118px; cursor: pointer; } .cal .d .n { align-self: flex-start; padding: 1px 6px; border-radius: 12px; }
.cal .d.today .n { background: var(--accent-fill); color: var(--accent-ink); }
.cal .e { --c: #5aa0ff; border-left: 0; background: transparent; padding: 2px 6px; font-size: 11.5px; display: flex; align-items: center; gap: 4px; }
.cal .e.bar { background: color-mix(in srgb, var(--c) 22%, transparent); color: var(--text); border-left: 3px solid var(--c); }
.cal .e.dot i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); flex: none; } .cal .e.dot b { font: 600 10.5px var(--mono); color: var(--text-3); }
.cal .e:hover { filter: brightness(1.1); background: color-mix(in srgb, var(--c) 30%, transparent); }
.cal .more { border: 0; background: none; color: var(--text-3); font-size: 11.5px; text-align: left; padding: 1px 6px; cursor: pointer; } .cal .more:hover { color: var(--accent); }
.agenda2 { padding: 6px 16px; } .agenda2 .ag-date small { display: block; font: 500 10px var(--mono); color: var(--text-3); text-transform: uppercase; }
.ag-item { --c: #5aa0ff; display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--panel-2); cursor: pointer; text-align: left; font-size: 13.5px; flex-wrap: wrap; }
.ag-item:hover { border-color: var(--c); } .ag-item i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex: none; } .ag-item .tm { font: 600 12px var(--mono); color: var(--text-3); min-width: 108px; }
/* semana / día */
.tv { --n: 7; display: flex; flex-direction: column; height: calc(100dvh - 250px); min-height: 460px; }
.tv-head, .tv-all, .tv-grid { display: grid; grid-template-columns: 58px repeat(var(--n), 1fr); }
.tv-head { border-bottom: 1px solid var(--line-2); } .tv-dh { text-align: center; padding: 8px 4px; cursor: pointer; } .tv-dh span { display: block; font: 500 11px var(--mono); text-transform: uppercase; color: var(--text-3); }
.tv-dh b { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; font-size: 20px; } .tv-dh.today b { background: var(--accent-fill); color: var(--accent-ink); } .tv-dh:hover b { background: var(--panel-2); }
.tv-all { border-bottom: 1px solid var(--line-2); min-height: 30px; } .tv-allcol { border-left: 1px solid var(--line-2); padding: 3px; display: grid; gap: 2px; align-content: start; cursor: pointer; }
.tv-allcol .e { --c: #5aa0ff; font-size: 11.5px; padding: 2px 6px; border-radius: 6px; background: color-mix(in srgb, var(--c) 25%, transparent); border-left: 3px solid var(--c); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.tv-gut small { font: 500 10px var(--mono); color: var(--text-3); display: block; padding: 8px 4px; text-align: right; }
.tv-scroll { flex: 1; overflow: auto; position: relative; }
.tv-grid { position: relative; } .tv-hl { height: var(--hour); position: relative; } .tv-hl span { position: absolute; top: -7px; right: 8px; font: 500 10.5px var(--mono); color: var(--text-3); }
.tv-col { position: relative; border-left: 1px solid var(--line-2); cursor: cell; user-select: none; } .tv-col.today { background: color-mix(in srgb, var(--accent) 4%, transparent); }
.tv-cell { height: var(--hour); border-top: 1px solid var(--line-2); } .tv-cell:nth-child(odd) { }
.tv-ev { --c: #5aa0ff; position: absolute; border-radius: 8px; padding: 3px 6px; overflow: hidden; background: color-mix(in srgb, var(--c) 30%, var(--panel-solid)); border-left: 4px solid var(--c); font-size: 12px; cursor: pointer; box-shadow: 0 6px 16px -10px rgba(0,0,0,.5); line-height: 1.25; z-index: 2; }
.tv-ev b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .tv-ev span { font: 500 10.5px var(--mono); opacity: .8; }
.tv-ev.mov { cursor: grab; } .tv-ev.dragging { cursor: grabbing; opacity: .85; box-shadow: var(--glow); z-index: 5; }
.tv-ev .rsz { position: absolute; left: 0; right: 0; bottom: 0; height: 7px; cursor: ns-resize; } .tv-ev:not(.mov) .rsz { display: none; }
.tv-now { position: absolute; left: 0; right: 0; height: 2px; background: var(--bad); z-index: 3; } .tv-now::before { content: ""; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--bad); }
.tv-ghost { position: absolute; left: 2px; right: 2px; border-radius: 8px; background: color-mix(in srgb, var(--accent) 35%, transparent); border: 2px solid var(--accent); font: 600 11px var(--mono); padding: 3px 6px; z-index: 4; pointer-events: none; }
/* detalle y editor */
.ev-sw { width: 14px; height: 14px; border-radius: 4px; flex: none; } .ev-info { display: grid; gap: 12px; } .ev-info > div { display: grid; grid-template-columns: 24px 1fr; gap: 10px; align-items: start; font-size: 14px; }
.ev-info .ic { color: var(--text-3); margin-top: 2px; } .ev-info .chip .av { width: 20px; height: 20px; font-size: 9px; }
.ev-title { font-size: 20px; font-weight: 600; padding: 12px 14px; margin-bottom: 14px; } .ev-grid { display: grid; gap: 14px; margin-bottom: 16px; }
.ev-col { width: 26px; height: 26px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; } .ev-col.on { border-color: var(--text); box-shadow: 0 0 0 2px var(--bg) inset; }
@media (max-width: 700px) { .cal-hint { display: none; } .tv { height: calc(100dvh - 300px); } .tv-head, .tv-all, .tv-grid { grid-template-columns: 44px repeat(var(--n), minmax(0, 1fr)); } .cal .d { min-height: 80px; } }
/* revisor externo */
.guest-wrap { position: relative; z-index: 1; height: 100dvh; display: grid; grid-template-rows: auto 1fr; }
.guest-wrap .top { flex-wrap: wrap; row-gap: 8px; } .guest-meta { font-size: 12.5px; }
.guest-body { display: grid; grid-template-columns: 1fr 360px; min-height: 0; }
.guest-stage { overflow: auto; padding: 30px; display: grid; place-items: center; align-content: start; gap: 16px; }
.guest-side { display: block; overflow: auto; padding: 16px; border-left: 1px solid var(--line-2); } .guest-side .cmt { cursor: pointer; }
@media (max-width: 800px) { .guest-wrap { height: auto; min-height: 100dvh; } .guest-body { grid-template-columns: 1fr; } .guest-stage { padding: 14px; } .guest-side { border-left: 0; border-top: 1px solid var(--line-2); } .guest-meta { flex-basis: 100%; order: 9; } }
.emoji-pop { position: fixed; z-index: 400; width: min(340px, calc(100vw - 16px)); background: var(--panel-solid); border: 1px solid var(--line-2); border-radius: 16px; box-shadow: 0 24px 60px -20px rgba(0,0,0,.55); padding: 8px; display: grid; gap: 8px; }
.emoji-tabs { display: flex; gap: 2px; } .emoji-tabs button { flex: 1; border: 0; background: none; font-size: 18px; padding: 6px 0; border-radius: 10px; cursor: pointer; opacity: .6; } .emoji-tabs button.on, .emoji-tabs button:hover { opacity: 1; background: var(--panel-2); }
.emoji-q { height: 34px; font-size: 13px; }
.emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; max-height: 230px; overflow: auto; }
.emoji-grid button { border: 0; background: none; font-size: 22px; aspect-ratio: 1; border-radius: 10px; cursor: pointer; } .emoji-grid button:hover { background: var(--panel-2); transform: scale(1.12); }
.del-opt { width: 100%; text-align: left; cursor: pointer; border: 1px solid var(--line-2); background: var(--panel-2); border-radius: 14px; padding: 12px; display: flex; gap: 12px; align-items: flex-start; margin-bottom: 8px; color: var(--text); }
.del-opt .t { display: grid; gap: 3px; } .del-opt .t span { font-size: 12.5px; color: var(--text-3); } .del-opt:hover { border-color: var(--accent); } .del-opt.danger:hover { border-color: var(--bad); } .del-opt.danger b { color: var(--bad); }
.emoji-grid button { padding: 0; min-width: 0; display: grid; place-items: center; } .emoji-grid { overflow-x: hidden; }
.ev-when { gap: 8px; flex-wrap: wrap; } .ev-when .input { width: auto; flex: 0 1 auto; min-width: 0; } .ev-when input[type=date] { max-width: 170px; } .ev-when input[type=time] { max-width: 120px; }
.cal-title { text-transform: none; } .cal-title::first-letter { text-transform: uppercase; }
.tv-ev.mov { touch-action: none; }
/* Proof Studio: lupa, reglas, superposición, daltonismo, mapa de tinta, atajos y comentarios asignados */
.stage .ruler { position: absolute; z-index: 6; background: color-mix(in srgb, var(--panel-solid) 92%, transparent); backdrop-filter: blur(6px); pointer-events: none; }
.stage .ruler.rx { left: 0; top: 0; border-bottom: 1px solid var(--line-2); } .stage .ruler.ry { left: 0; top: 0; border-right: 1px solid var(--line-2); }
.stage .ruler-o { position: absolute; left: 0; top: 0; width: 22px; height: 22px; z-index: 7; display: grid; place-items: center; font: 600 8px var(--mono); color: var(--accent); background: var(--panel-solid); border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.stage .ruler[hidden], .stage .ruler-o[hidden] { display: none; }
.loupe { position: absolute; z-index: 8; width: 190px; height: 190px; border-radius: 50%; pointer-events: none; background-color: #fff; background-repeat: no-repeat;
  border: 3px solid var(--accent); box-shadow: 0 18px 50px -12px rgba(0,0,0,.6), inset 0 0 0 1px rgba(0,0,0,.15); image-rendering: auto; }
.loupe::after { content: "×4"; position: absolute; right: 14px; bottom: 10px; font: 700 10px var(--mono); color: #0b1220; background: var(--accent-fill); border-radius: 8px; padding: 1px 5px; }
.loupe[hidden] { display: none; }
.ovhud { position: absolute; left: 50%; bottom: 70px; transform: translateX(-50%); z-index: 7; display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-radius: 30px;
  background: color-mix(in srgb, var(--panel-solid) 90%, transparent); border: 1px solid var(--line-2); box-shadow: var(--shadow); backdrop-filter: blur(10px); }
.ovhud input[type=range] { width: min(320px, 50vw); accent-color: var(--accent); }
.stage.cvd-protan .canvas img.art, .stage.cvd-protan .canvas canvas.art { filter: url(#cvd-protan); }
.stage.cvd-deutan .canvas img.art, .stage.cvd-deutan .canvas canvas.art { filter: url(#cvd-deutan); }
.stage.cvd-tritan .canvas img.art, .stage.cvd-tritan .canvas canvas.art { filter: url(#cvd-tritan); }
.stage.cvd-achro .canvas img.art, .stage.cvd-achro .canvas canvas.art { filter: url(#cvd-achro); }
.cvd-badge { position: absolute; top: 34px; left: 50%; transform: translateX(-50%); z-index: 7; padding: 5px 12px; border-radius: 20px; font: 600 11.5px var(--font); background: var(--violet, #c39bff); color: #0b1220; display: flex; align-items: center; gap: 6px; }
.cvd-pop { position: fixed; z-index: 60; padding: 10px; display: grid; gap: 4px; min-width: 240px; }
.cvd-pop button { text-align: left; border: 0; background: none; color: var(--text); padding: 8px 10px; border-radius: 10px; cursor: pointer; font-size: 13px; }
.cvd-pop button:hover { background: var(--panel-2); } .cvd-pop button.on { background: color-mix(in srgb, var(--accent) 20%, transparent); font-weight: 600; }
.seps.tacp { top: auto; bottom: 70px; } .seps .k i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.keys-help { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 18px; }
.keys-help div { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.keys-help kbd { min-width: 54px; text-align: center; font: 600 11px var(--mono); padding: 4px 6px; border-radius: 7px; border: 1px solid var(--line-2); border-bottom-width: 2px; background: var(--panel-2); }
.cmt .asg { gap: 5px; } .cmt .asg .av { width: 18px; height: 18px; font-size: 8px; } .cmt .asg.late { color: var(--bad); border-color: var(--bad); }
.cfilter { display: flex; } .cfilter button { flex: 1; font-size: 12px; }
@media (max-width: 700px) { .keys-help { grid-template-columns: 1fr; } .hide-sm { display: none; } .loupe { width: 140px; height: 140px; } }
/* barra de Proof Studio: el título nunca se aplasta; lo que no cabe pasa al desplegable «Más ⋯» (overflowMenu en ui.js) */
.studio .sbar { overflow: visible; position: relative; z-index: 30; } .studio > * { min-width: 0; }  /* sin min-width:0 la rejilla se ensancha al contenido */
.studio .sbar .ttl { flex: 0 1 260px; min-width: 150px; overflow: hidden; } .studio .sbar .ttl b, .studio .sbar .ttl span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.studio .sbar .tools, .studio .sbar > .iconbtn, .studio .sbar > .st, .studio .sbar > .chip { flex: none; }

/* =================================================================== chat (premium) */
.chatwrap { display: grid; grid-template-columns: 340px 1fr; gap: 16px; height: calc(100dvh - 150px); min-height: 480px; }
.chat-list, .chat-main { background: var(--panel); border: 1px solid var(--line-2); border-radius: 22px; backdrop-filter: var(--blur); display: flex; flex-direction: column; min-height: 0; overflow: hidden; box-shadow: 0 24px 60px -40px rgba(0,0,0,.6); }
.chat-lh { display: flex; align-items: center; gap: 8px; padding: 18px 16px 10px; } .chat-lh h2 { margin: 0; font-size: 20px; letter-spacing: -.01em; }
.chat-search { margin: 0 12px 8px; display: flex; gap: 8px; align-items: center; padding: 9px 12px; border-radius: 14px; background: var(--panel-2); border: 1px solid transparent; transition: border-color .15s; }
.chat-search:focus-within { border-color: var(--accent); } .chat-search input { background: none; border: 0; outline: 0; color: inherit; width: 100%; font-size: 13.5px; }
.chat-tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 2px 12px 8px; }  /* sin desplazamiento oculto: si no caben, bajan de línea */
.chat-tabs button { flex: none; border: 1px solid var(--line-2); background: transparent; color: var(--text-2); border-radius: 20px; padding: 5px 11px; font: 600 12px var(--font); cursor: pointer; display: inline-flex; gap: 6px; align-items: center; transition: .15s; }
.chat-tabs button:hover { color: var(--text); border-color: var(--line); } .chat-tabs button.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.chat-tabs button i { font: 700 10px var(--mono); font-style: normal; background: var(--accent-fill); color: var(--accent-ink); border-radius: 10px; padding: 1px 6px; }
.chat-items { overflow: auto; flex: 1; padding: 2px 8px 12px; }
.chat-it { display: grid; grid-template-columns: 46px 1fr; gap: 12px; align-items: center; padding: 10px; border-radius: 16px; color: inherit; text-decoration: none; transition: background .15s; position: relative; }
.chat-it:hover { background: var(--panel-2); } .chat-it.on { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.chat-it.on::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 3px; background: var(--accent-fill); }
.chat-it .t { min-width: 0; display: grid; gap: 2px; } .chat-it .l1, .chat-it .l2 { display: flex; align-items: center; gap: 6px; min-width: 0; }
.chat-it b { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }
.chat-it small { font: 500 11px var(--mono); color: var(--text-3); white-space: nowrap; }
.chat-it .prev { font-size: 12.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; } .chat-it .prev .you { color: var(--text-2); }
.chat-it .typing-prev { color: var(--accent); font-style: italic; }
.chat-it.unread b { font-weight: 800; } .chat-it.unread .prev { color: var(--text); font-weight: 600; } .chat-it.unread small { color: var(--accent); }
.chat-it .count { font: 700 11px var(--mono); background: var(--accent-fill); color: var(--accent-ink); border-radius: 12px; min-width: 20px; height: 20px; display: grid; place-items: center; padding: 0 6px; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.chat-it .mut { color: var(--text-3); display: grid; } .chat-it .mut .ic { width: 14px; height: 14px; }
/* avatares con presencia */
.cav { position: relative; display: inline-grid; flex: none; } .cav .av { width: 46px; height: 46px; font-size: 15px; }
.cav.sm .av { width: 28px; height: 28px; font-size: 10px; } .cav.lg .av { width: 42px; height: 42px; } .cav.xl .av { width: 84px; height: 84px; font-size: 26px; }
.cav .pres { position: absolute; right: 0; bottom: 0; width: 12px; height: 12px; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 0 2.5px var(--panel-solid); }
.cav.sm .pres { width: 8px; height: 8px; } .cav.xl .pres { width: 18px; height: 18px; right: 4px; bottom: 4px; }
.chat-ic { background: var(--ink-1); color: var(--accent); display: grid; place-items: center; } .chat-ic.project { background: rgba(var(--teal-rgb), .2); color: var(--teal); } .chat-ic .ic { width: 50%; height: 50%; }
/* conversación */
.chat-empty { margin: auto; max-width: 440px; text-align: center; padding: 24px; display: grid; gap: 10px; justify-items: center; }
.chat-empty .ce-art { width: 84px; height: 84px; border-radius: 28px; display: grid; place-items: center; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 30%, transparent), color-mix(in srgb, var(--teal) 30%, transparent)); color: var(--accent); }
.chat-empty .ce-art .ic { width: 40px; height: 40px; } .chat-empty h2 { margin: 6px 0 0; }
.chat-h { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line-2); background: color-mix(in srgb, var(--panel-solid) 60%, transparent); }
.chat-h .t { line-height: 1.25; min-width: 0; display: grid; } .chat-h .t b { font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-h .t span { font-size: 12.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-h .iconbtn.on { color: var(--warn); }
.st-on { color: #3ddc84; font-weight: 600; } .st-typing { color: var(--accent); font-weight: 600; display: inline-flex; align-items: baseline; gap: 1px; }
.st-typing i { width: 3px; height: 3px; border-radius: 50%; background: currentColor; display: inline-block; margin-left: 2px; animation: tdot 1.2s infinite; } .st-typing i:nth-child(2) { animation-delay: .15s; } .st-typing i:nth-child(3) { animation-delay: .3s; }
.chat-find { padding: 10px 14px; border-bottom: 1px solid var(--line-2); display: grid; gap: 6px; } .chat-find[hidden] { display: none; }
.chat-find .search { display: flex; gap: 8px; align-items: center; padding: 8px 12px; border-radius: 12px; background: var(--panel-2); } .chat-find input { background: none; border: 0; outline: 0; color: inherit; width: 100%; }
.find-res { max-height: 200px; overflow: auto; display: grid; gap: 2px; }
.find-res .fr { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; text-align: left; border: 0; background: none; color: inherit; padding: 7px 10px; border-radius: 10px; cursor: pointer; font-size: 12.5px; }
.find-res .fr:hover { background: var(--panel-2); } .find-res .fr span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); } .find-res .fr small { font: 500 11px var(--mono); color: var(--text-3); }
.chat-body { flex: 1; min-height: 0; position: relative; display: flex; }
.chat-msgs { flex: 1; overflow: auto; padding: 18px 20px 10px; display: flex; flex-direction: column; gap: 2px;
  background: radial-gradient(1200px 400px at 100% 0, color-mix(in srgb, var(--accent) 4%, transparent), transparent 70%), radial-gradient(900px 400px at 0 100%, color-mix(in srgb, var(--teal) 5%, transparent), transparent 70%); }
.drop-veil { position: absolute; inset: 10px; border-radius: 18px; border: 2px dashed var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--panel-solid)); display: none; place-items: center; align-content: center; gap: 8px; z-index: 5; color: var(--accent); pointer-events: none; }
.drop-veil .ic { width: 34px; height: 34px; } .chat-body.over .drop-veil { display: grid; }
.chat-fab { position: absolute; right: 18px; bottom: 14px; z-index: 4; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel-solid); color: var(--text); display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow); }
.chat-fab[hidden] { display: none; } .chat-fab i { position: absolute; top: -6px; right: -4px; font: 700 10px var(--mono); font-style: normal; background: var(--accent-fill); color: var(--accent-ink); border-radius: 10px; padding: 1px 6px; }
.chat-day { text-align: center; margin: 14px 0 8px; position: sticky; top: 0; z-index: 2; pointer-events: none; }
.chat-day span { font: 600 11px var(--font); letter-spacing: .02em; color: var(--text-2); background: color-mix(in srgb, var(--panel-solid) 88%, transparent); backdrop-filter: blur(8px); border: 1px solid var(--line-2); padding: 4px 12px; border-radius: 20px; text-transform: capitalize; box-shadow: 0 4px 14px -8px rgba(0,0,0,.4); }
.chat-new { display: flex; align-items: center; gap: 10px; margin: 10px 0; color: var(--accent); font: 700 11px var(--font); text-transform: uppercase; letter-spacing: .08em; }
.chat-new::before, .chat-new::after { content: ""; flex: 1; height: 1px; background: color-mix(in srgb, var(--accent) 50%, transparent); }
.chat-sys { text-align: center; font-size: 12px; color: var(--text-3); margin: 8px 0; }
.chat-start { margin: auto; text-align: center; display: grid; justify-items: center; gap: 6px; } .chat-start h3 { margin: 8px 0 0; }
/* burbujas */
.msg { display: flex; align-items: flex-end; gap: 8px; max-width: min(74%, 620px); position: relative; margin-top: 1px; animation: msgin .22s ease-out both; }
.msg.first { margin-top: 10px; } .msg.me { align-self: flex-end; flex-direction: row-reverse; }
.msg .av-sp { width: 28px; flex: none; } .bwrap { display: grid; min-width: 0; } .msg.me .bwrap { justify-items: end; }
.msg .who { font-size: 12px; font-weight: 700; margin: 0 0 3px 12px; }
.bub { padding: 8px 12px 6px; border-radius: 18px; background: var(--panel-solid); border: 1px solid var(--line-2); position: relative; min-width: 64px; max-width: 100%; box-shadow: 0 1px 1px rgba(0,0,0,.06), 0 8px 24px -18px rgba(0,0,0,.45); }
.msg:not(.me):not(.first) .bub { border-top-left-radius: 6px; } .msg:not(.me):not(.last) .bub { border-bottom-left-radius: 6px; } .msg:not(.me).last .bub { border-bottom-left-radius: 4px; }
.msg.me .bub { background: color-mix(in srgb, var(--accent-fill) 16%, var(--panel-solid)); color: var(--text); border-color: color-mix(in srgb, var(--accent-fill) 35%, transparent); }
.msg.me:not(.first) .bub { border-top-right-radius: 6px; } .msg.me:not(.last) .bub { border-bottom-right-radius: 6px; } .msg.me.last .bub { border-bottom-right-radius: 4px; }
.bub .txt { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14.5px; line-height: 1.45; display: inline; }
.bub .meta { float: right; margin: 6px -4px -2px 10px; font: 500 10.5px var(--mono); opacity: .62; display: inline-flex; gap: 5px; align-items: center; white-space: nowrap; }
.bub .meta em { font-style: italic; font-family: var(--font); }
.rcpt { letter-spacing: -3px; font-weight: 800; font-size: 12px; padding-right: 3px; } .rcpt.seen { color: var(--info); } .msg.me .bub .meta { opacity: .8; }
.msg.big .bub { background: transparent !important; border-color: transparent; box-shadow: none; padding: 0 2px; } .msg.big .bub .meta { color: var(--text-3); opacity: .8; }
.bub .txt.big { font-size: 42px; line-height: 1.1; }
.bub .mention { color: var(--teal); font-weight: 700; } .msg.me .bub .mention { color: inherit; text-decoration: underline; } .bub a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.bub.del { opacity: .65; font-size: 13px; } .bub.del .ic { width: 13px; height: 13px; vertical-align: -2px; }
.bub .quote { display: grid; text-align: left; width: 100%; border: 0; border-left: 3px solid var(--teal); padding: 5px 9px; margin: 0 0 6px; border-radius: 8px; background: rgba(var(--teal-rgb), .14); font-size: 12.5px; color: inherit; cursor: pointer; }
.bub .quote b { font-size: 12px; } .bub .quote span { opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 340px; }
.msg.me .bub .quote { background: rgba(255,255,255,.28); border-color: rgba(11,18,32,.45); }
.bub .att.img { display: block; border: 0; padding: 0; margin: -4px -8px 6px; border-radius: 14px; overflow: hidden; cursor: zoom-in; background: #fff; max-width: 340px; }
.bub.media { padding: 4px 4px 6px; } .bub.media .att.img { margin: 0 0 2px; } .bub.media .meta { position: absolute; right: 12px; bottom: 10px; background: rgba(11,18,32,.6); color: #fff; opacity: 1; padding: 2px 7px; border-radius: 10px; margin: 0; }
.bub .att.img img { display: block; width: 100%; max-height: 280px; object-fit: contain; }
.bub .att.file { display: flex; align-items: center; gap: 10px; padding: 8px 10px; margin: 0 -4px 6px; border-radius: 12px; background: rgba(var(--teal-rgb), .12); color: inherit; text-decoration: none; min-width: 220px; }
.msg.me .bub .att.file { background: rgba(255,255,255,.3); }
.fi { width: 38px; height: 44px; border-radius: 8px; background: var(--teal); color: #0b1220; display: grid; place-items: center; font: 800 10px var(--mono); flex: none; }
.att.file .fn { display: grid; min-width: 0; flex: 1; } .att.file .fn b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .att.file .fn small { font: 500 11px var(--mono); opacity: .7; }
.msg.flash .bub { animation: flash 1.4s ease; }
.reacts { display: flex; flex-wrap: wrap; gap: 4px; margin: -6px 8px 0; position: relative; z-index: 1; }
.react { display: inline-flex; align-items: center; gap: 3px; border: 1.5px solid var(--panel-solid); background: var(--panel-2); color: var(--text); border-radius: 14px; padding: 1px 7px; font-size: 13px; cursor: pointer; box-shadow: 0 2px 6px -2px rgba(0,0,0,.3); transition: transform .12s; }
.react:hover { transform: scale(1.08); } .react b { font: 700 10.5px var(--mono); } .react.mine { background: color-mix(in srgb, var(--accent) 30%, var(--panel-2)); }
/* acciones al pasar el ratón */
.msg-act { display: none; gap: 2px; align-self: center; align-items: center; padding: 2px; border-radius: 22px; background: var(--panel-solid); border: 1px solid var(--line-2); box-shadow: var(--shadow); }
.msg:hover .msg-act, .msg.act .msg-act { display: flex; } .msg-act .tool { width: 28px; height: 28px; }
.quick-react { display: flex; align-items: center; gap: 1px; padding-right: 2px; border-right: 1px solid var(--line-2); margin-right: 2px; }
.quick-react button:not(.tool) { border: 0; background: none; font-size: 17px; line-height: 1; padding: 4px; border-radius: 50%; cursor: pointer; transition: transform .12s; }
.quick-react button:not(.tool):hover { transform: scale(1.3); background: var(--panel-2); } .quick-react .tool { width: 26px !important; height: 26px !important; }
/* escribiendo… */
.bub.typing { display: inline-flex; gap: 4px; padding: 13px 14px; min-width: 0; } .bub.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); animation: tdot 1.2s infinite; }
.bub.typing i:nth-child(2) { animation-delay: .15s; } .bub.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes tdot { 0%, 60%, 100% { transform: translateY(0); opacity: .45; } 30% { transform: translateY(-4px); opacity: 1; } }
@keyframes msgin { from { opacity: 0; transform: translateY(6px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes flash { 0%, 100% { box-shadow: 0 0 0 0 transparent; } 30% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 55%, transparent); } }
/* barra de respuesta / edición / adjuntos y escritura */
.chat-bar { border-top: 1px solid var(--line-2); padding: 8px 14px; display: grid; gap: 8px; background: color-mix(in srgb, var(--panel-solid) 70%, transparent); } .chat-bar[hidden] { display: none; }
.cb-ref { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-left: 3px solid var(--teal); border-radius: 8px; background: rgba(var(--teal-rgb), .12); }
.cb-ref.edit { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); } .cb-ref .t { display: grid; min-width: 0; flex: 1; font-size: 12.5px; }
.cb-ref .t span { color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cb-files { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.cb-f { flex: none; display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line-2); max-width: 240px; }
.cb-f img { width: 40px; height: 40px; object-fit: cover; border-radius: 8px; } .cb-f .fi { width: 34px; height: 40px; } .cb-f .fn { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-in { display: flex; align-items: flex-end; gap: 10px; padding: 12px 14px 14px; position: relative; }
.ci-pill { flex: 1; display: flex; align-items: flex-end; gap: 2px; padding: 4px; border-radius: 24px; background: var(--panel-2); border: 1px solid var(--line-2); transition: border-color .15s, box-shadow .15s; }
.ci-pill:focus-within { border-color: color-mix(in srgb, var(--accent) 70%, transparent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent); }
.ci-pill textarea { flex: 1; resize: none; border: 0; outline: 0; background: none; color: inherit; font: 14.5px/1.45 var(--font); padding: 8px 4px; min-height: 22px; max-height: 180px; }
.ci-pill .iconbtn { width: 36px; height: 36px; border: 0; background: none; }
.ci-send { width: 46px; height: 46px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; background: var(--panel-2); color: var(--text-3); transition: background .2s, color .2s, transform .15s; flex: none; }
.ci-send.ready { background: var(--accent-fill); color: var(--accent-ink); box-shadow: 0 10px 24px -10px color-mix(in srgb, var(--accent) 80%, transparent); }
.ci-send.ready:hover { transform: scale(1.06); } .ci-send .ic { width: 20px; height: 20px; }
.mention-pop { position: absolute; left: 60px; bottom: 66px; background: var(--panel-solid); border: 1px solid var(--line); border-radius: 14px; padding: 6px; display: grid; gap: 2px; z-index: 6; box-shadow: var(--shadow); min-width: 220px; }
.mention-pop[hidden] { display: none !important; }
.mention-pop button { display: flex; gap: 8px; align-items: center; border: 0; background: transparent; padding: 6px 8px; border-radius: 10px; color: inherit; cursor: pointer; text-align: left; }
.mention-pop button:hover, .mention-pop button.on { background: var(--panel-2); } .mention-pop .av { width: 24px; height: 24px; }
.pick-list { display: grid; gap: 4px; max-height: 50vh; overflow: auto; margin-top: 8px; }
.pick { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--panel-2); color: inherit; cursor: pointer; text-align: left; width: 100%; }
.pick:hover { border-color: var(--line); } .pick.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.pick .t { flex: 1; display: grid; min-width: 0; } .pick .t span { font-size: 12px; color: var(--text-3); } .pick .cav .av { width: 36px; height: 36px; }
.pick .chk2 { width: 22px; height: 22px; border-radius: 7px; border: 1.5px solid var(--line); display: grid; place-items: center; color: var(--accent); }
.li.tg { display: flex; align-items: center; gap: 12px; cursor: pointer; } .li.tg .t { flex: 1; display: grid; gap: 2px; } .li.tg .t span { font-size: 12.5px; color: var(--text-3); }
.li.tg input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--accent); }
/* visor de imagen */
.lightbox { position: fixed; inset: 0; z-index: 500; background: rgba(8,8,10,.88); backdrop-filter: blur(6px); display: grid; grid-template-rows: auto 1fr; animation: msgin .2s ease-out; }
.lb-top { display: flex; align-items: center; gap: 8px; padding: 12px 16px; color: #fff; } .lb-top b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lightbox img { max-width: calc(100vw - 32px); max-height: calc(100dvh - 90px); margin: auto; object-fit: contain; border-radius: 10px; background: #fff; box-shadow: 0 30px 80px -20px #000; }
/* avisos de mensajes (tarjeta con respuesta rápida) */
.chat-toasts { position: fixed; right: 18px; top: 74px; z-index: 450; display: grid; gap: 10px; width: min(380px, calc(100vw - 24px)); }
.chat-toast { display: flex; gap: 12px; padding: 12px 12px 12px 14px; border-radius: 20px; cursor: pointer; background: color-mix(in srgb, var(--panel-solid) 92%, transparent); backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid var(--line); box-shadow: 0 24px 60px -24px rgba(0,0,0,.65), 0 0 0 1px color-mix(in srgb, var(--accent) 10%, transparent); transform: translateX(30px); opacity: 0; transition: transform .3s cubic-bezier(.2,1.2,.3,1), opacity .25s; }
.chat-toast.in { transform: none; opacity: 1; } .chat-toast.out { transform: translateX(40px); opacity: 0; } .chat-toast.sent { box-shadow: 0 0 0 2px var(--accent), 0 24px 60px -24px rgba(0,0,0,.65); }
.ct-av { position: relative; flex: none; } .ct-av .av { width: 44px; height: 44px; }
.ct-kind { position: absolute; right: -4px; bottom: -4px; width: 20px; height: 20px; border-radius: 50%; background: var(--teal); color: #0b1220; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--panel-solid); } .ct-kind .ic { width: 12px; height: 12px; }
.ct-body { flex: 1; min-width: 0; display: grid; gap: 3px; } .ct-top { display: flex; align-items: center; gap: 8px; } .ct-top b { flex: 1; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ct-time { font: 500 10.5px var(--mono); color: var(--accent); } .ct-x { border: 0; background: none; color: var(--text-3); cursor: pointer; padding: 2px; display: grid; } .ct-x .ic { width: 15px; height: 15px; }
.ct-msg { font-size: 13px; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ct-reply { display: flex; gap: 6px; margin-top: 6px; } .ct-in { flex: 1; min-width: 0; border-radius: 14px; border: 1px solid var(--line-2); background: var(--panel-2); color: inherit; padding: 7px 11px; font: 13px var(--font); outline: 0; }
.ct-in:focus { border-color: var(--accent); } .ct-send { width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--accent-fill); color: var(--accent-ink); display: grid; place-items: center; cursor: pointer; } .ct-send .ic { width: 15px; height: 15px; }
@media (max-width: 900px) {
  .chatwrap { grid-template-columns: 1fr; height: calc(100dvh - 120px); } .chatwrap .chat-main { display: none; } .chatwrap.open .chat-list { display: none; } .chatwrap.open .chat-main { display: flex; }
  .msg { max-width: 88%; } .msg-act { position: absolute; top: -42px; right: 0; z-index: 3; width: max-content; max-width: calc(100vw - 40px); } .msg:not(.me) .msg-act { left: 0; right: auto; }
  .chat-toasts { top: auto; bottom: 16px; right: 12px; }
}
@media (hover: none) { .msg:hover .msg-act { display: none; } .msg.act .msg-act { display: flex; } }
@media (prefers-reduced-motion: reduce) { .msg, .chat-toast, .lightbox { animation: none; transition: none; } }
.push-box { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; border: 1px solid var(--line-2); background: var(--panel-2); flex-wrap: wrap; }
.push-box .pb-ic { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); flex: none; }
.push-box.on .pb-ic { background: color-mix(in srgb, #3ddc84 22%, transparent); color: #3ddc84; } .push-box.denied .pb-ic, .push-box.unsupported .pb-ic { background: var(--panel); color: var(--text-3); }
.push-box .t { flex: 1; min-width: 200px; display: grid; gap: 2px; } .push-box .t span { font-size: 12.5px; color: var(--text-3); } .push-box .t .ic { width: 14px; height: 14px; vertical-align: -2px; }
.push-box .pb-act { display: flex; gap: 6px; }
.login .forgot { font-size: 12.5px; color: var(--text-3); text-align: center; text-decoration: underline; text-underline-offset: 3px; }
.login .forgot:hover { color: var(--accent); } .login .ok-note { font-size: 13px; color: var(--ok); display: flex; gap: 8px; align-items: flex-start; margin: 0; }
.login.single { grid-template-columns: 1fr; max-width: 480px; margin: auto; }
/* revisión en directo */
.live-bar { display: flex; align-items: center; gap: 8px; flex: none; }
.live-avs { display: flex; align-items: center; position: relative; padding-right: 6px; }
.live-avs .lav { margin-left: -8px; border-radius: 50%; box-shadow: 0 0 0 2px var(--panel-solid); display: grid; } .live-avs .lav:first-child { margin-left: 0; }
.live-avs .lav .av { width: 28px; height: 28px; font-size: 10px; } .live-avs .lav.lead { box-shadow: 0 0 0 2px var(--accent); }
.live-avs .lav.more { width: 28px; height: 28px; background: var(--panel-2); font: 700 10px var(--mono); place-items: center; }
.live-dot { position: absolute; right: 0; top: -2px; width: 8px; height: 8px; border-radius: 50%; background: #ff523c; box-shadow: 0 0 0 0 rgba(255,82,60,.6); animation: livepulse 1.6s infinite; }
@keyframes livepulse { 0% { box-shadow: 0 0 0 0 rgba(255,82,60,.6); } 70% { box-shadow: 0 0 0 8px rgba(255,82,60,0); } 100% { box-shadow: 0 0 0 0 rgba(255,82,60,0); } }
.btn.live-on { background: color-mix(in srgb, #ff523c 18%, transparent); border-color: #ff523c; color: var(--text); }
.live-cursor { position: absolute; z-index: 7; pointer-events: none; transform: scale(var(--iz, 1)); transform-origin: 0 0; transition: left .12s linear, top .12s linear, opacity .4s; display: flex; align-items: flex-start; gap: 2px; }
.live-cursor svg { width: 22px; height: 22px; fill: var(--c); stroke: #fff; stroke-width: 1.5; filter: drop-shadow(0 2px 4px rgba(0,0,0,.4)); }
.live-cursor span { margin-top: 16px; background: var(--c); color: #0b1220; font: 700 11px var(--font); padding: 2px 7px; border-radius: 8px; white-space: nowrap; }
.live-cursor.gone { opacity: 0; }
/* aprobar varios */
.batch-list { display: grid; gap: 6px; max-height: 46vh; overflow: auto; }
.batch-it { display: grid; grid-template-columns: auto 56px 1fr auto; gap: 12px; align-items: center; padding: 8px 10px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--panel-2); cursor: pointer; }
.batch-it:has(input:checked) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); } .batch-it input { width: 18px; height: 18px; accent-color: var(--accent); }
.batch-it img { width: 56px; height: 40px; object-fit: contain; background: #fff; border-radius: 6px; } .batch-it .t { display: grid; min-width: 0; } .batch-it .t span { font-size: 12px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.batch-it .due { font: 500 11px var(--mono); color: var(--text-3); } .batch-it .due.late { color: var(--bad); }

/* Tutorial interno */
.tut { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
.tut-player { overflow: hidden; }
.tut-player video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #000; }
.tut-ch { max-height: calc(100vh - 190px); display: flex; flex-direction: column; }
.tut-list { overflow: auto; display: flex; flex-direction: column; gap: 2px; }
.tut-it { display: flex; gap: 10px; align-items: baseline; text-align: left; padding: 7px 9px; border-radius: 9px; border: 0; background: none; color: var(--text); cursor: pointer; font: inherit; font-size: 13px; }
.tut-it .mono { color: var(--text-3); font-size: 11.5px; min-width: 38px; }
.tut-it b { font-weight: 500; }
.tut-it:hover { background: var(--panel-2); }
.tut-it.on { background: color-mix(in srgb, var(--accent) 16%, transparent); }
.tut-it.on b { color: var(--accent); font-weight: 600; }
@media (max-width: 980px) { .tut { grid-template-columns: 1fr; } .tut-ch { max-height: 420px; } }

/* Subida por partes */
.upbar { position: fixed; right: 18px; bottom: 18px; z-index: 9000; width: 300px; padding: 12px 14px; border-radius: 14px; background: var(--panel-solid); border: 1px solid var(--line); box-shadow: var(--shadow); display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; font-size: 12.5px; }
.upbar b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.upbar span { color: var(--text-3); font-family: var(--mono); }
.upbar i { grid-column: 1 / -1; height: 5px; border-radius: 9px; background: var(--panel-2); overflow: hidden; }
.upbar u { display: block; height: 100%; width: 0; background: var(--accent-fill); transition: width .3s; }

/* Proof Studio · vídeo y audio */
.studio .mtl { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); width: min(920px, calc(100% - 140px)); z-index: 6; display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: 14px; background: color-mix(in srgb, var(--panel-solid) 92%, transparent); border: 1px solid var(--line); box-shadow: var(--shadow); backdrop-filter: blur(10px); }
.studio .mtl .tool { width: 32px; height: 32px; font-size: 13px; }
.studio .mtl #mt { font-size: 12px; color: var(--text-2); min-width: 92px; text-align: center; }
.studio .mtl select { width: auto; padding: 5px 8px; font-size: 12px; }
.studio .msc { position: relative; flex: 1; height: 26px; border-radius: 8px; background: var(--panel-2); cursor: pointer; touch-action: none; }
.studio .mfill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 8px; background: color-mix(in srgb, var(--accent) 28%, transparent); border-right: 2px solid var(--accent); pointer-events: none; }
.studio .mk { position: absolute; top: 3px; height: 20px; min-width: 20px; margin-left: -10px; padding: 0 4px; border: 0; border-radius: 10px; background: var(--accent-fill); color: #0b1220;
  font: 700 10.5px/20px var(--mono); cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.35); }
.studio .mk.rg { margin-left: 0; border-radius: 6px; background: color-mix(in srgb, var(--accent) 70%, transparent); text-align: left; }
.studio .mk.res { background: var(--text-3); }
.studio .playhead { position: absolute; top: 0; bottom: 0; left: 0; width: 2px; background: var(--accent-fill); box-shadow: 0 0 10px var(--accent); pointer-events: none; }
.studio .cmt .tc { display: inline-flex; align-items: center; gap: 4px; margin-left: 6px; padding: 1px 7px; border-radius: 8px; background: var(--panel-2); font: 600 11px var(--mono); color: var(--accent); }
.studio .cmt .tc svg { width: 11px; height: 11px; }

/* Acceso: 2FA y SSO */
.login .or { display: flex; align-items: center; gap: 10px; color: var(--text-3); font-size: 12px; margin: 4px 0 2px; }
.login .or::before, .login .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.sso-btn { width: 100%; justify-content: center; gap: 10px; margin-top: 6px; }
.mfa-code { font: 600 22px/1 var(--mono); letter-spacing: .25em; text-align: center; }
.mfa-qr { display: flex; justify-content: center; }
.mfa-qr svg { width: 196px; height: 196px; border-radius: 12px; background: #fff; padding: 6px; }
.rc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; padding: 12px 14px; border-radius: 12px; background: var(--panel-2); font-size: 14px; }

/* Plantillas de proyecto */
.tpl-bar { display: flex; align-items: flex-end; gap: 10px; padding: 10px 12px; margin-bottom: 14px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 7%, var(--panel-2)); border: 1px dashed color-mix(in srgb, var(--accent) 40%, var(--line)); }
.tpl-bar > svg { width: 18px; height: 18px; color: var(--accent); margin-bottom: 10px; }

/* Braille */
.br-read { padding: 14px 16px; border-radius: 12px; background: var(--panel-2); margin-bottom: 10px; }
.br-read .braille { font-size: 26px; letter-spacing: .12em; line-height: 1.4; white-space: pre-wrap; color: var(--accent); }
.br-read .br-text { font: 600 17px var(--font); margin: 6px 0 4px; white-space: pre-wrap; }

/* Calidad de códigos ISO 15416 */
.bgrade { padding: 10px 0; border-top: 1px solid var(--line); }
.bgrade:first-of-type { border-top: 0; }
.bg-big { width: 42px; height: 42px; flex: none; border-radius: 12px; display: grid; place-items: center; font: 800 22px var(--font); color: #0b1220; background: var(--c); }
.bg-params { display: flex; flex-wrap: wrap; gap: 6px 10px; margin-top: 8px; font-size: 11.5px; color: var(--text-2); }
.bg-params span { display: inline-flex; align-items: center; gap: 5px; }
.bg-params i { width: 18px; height: 18px; border-radius: 5px; display: grid; place-items: center; font: 700 11px var(--font); font-style: normal; color: #0b1220; }

/* Pasaporte del arte */
.pass-grid { display: grid; grid-template-columns: 210px 1fr; gap: 18px; align-items: center; }
@media (max-width: 640px) { .pass-grid { grid-template-columns: 1fr; } }

/* Copiloto: propuesta de corrección */
.fixbox { margin-top: 8px; padding: 9px 11px; border-radius: 10px; background: color-mix(in srgb, var(--accent) 7%, var(--panel-2)); border: 1px solid color-mix(in srgb, var(--accent) 25%, var(--line)); }
.fix-h { display: flex; align-items: center; gap: 5px; font: 700 10.5px var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.fix-h svg { width: 12px; height: 12px; }
.fix-n { font-size: 12px; color: var(--text-2); margin: 3px 0 5px; }
.fix-diff { font-size: 12.5px; line-height: 1.55; margin-top: 3px; }
.fix-diff del { color: var(--bad); text-decoration: line-through; background: color-mix(in srgb, var(--bad) 12%, transparent); border-radius: 3px; padding: 0 2px; }
.fix-diff ins { color: var(--ok); text-decoration: none; background: color-mix(in srgb, var(--ok) 14%, transparent); border-radius: 3px; padding: 0 2px; font-weight: 600; }

/* Inspección de la pieza impresa */
.insp-dz { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 18px; cursor: pointer; }
.insp-res { margin-top: 12px; }
.insp-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 10px; }
.insp-kpis div { padding: 10px; border-radius: 10px; background: var(--panel-2); text-align: center; }
.insp-kpis b { display: block; font: 700 18px var(--font); }
.insp-kpis span { font-size: 11.5px; color: var(--text-3); }
.insp-imgs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.insp-imgs figure { margin: 0; }
.insp-imgs img { width: 100%; border-radius: 8px; border: 1px solid var(--line); background: #fff; display: block; }
.insp-imgs figcaption { font-size: 11.5px; color: var(--text-3); margin-top: 3px; text-align: center; }
.insp-row { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-top: 1px solid var(--line); cursor: pointer; font-size: 13px; }
@media (max-width: 640px) { .insp-kpis, .insp-imgs { grid-template-columns: 1fr 1fr; } }

/* Radar normativo y previsión */
.rhit { padding: 12px 0; border-top: 1px solid var(--line); }
.rhit:first-of-type { border-top: 0; }
.rhit.ack, .rhit.change { opacity: .7; }
.rdot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.ragenda { display: flex; flex-direction: column; gap: 8px; }
.ra { display: grid; gap: 1px; padding: 9px 11px; border-radius: 10px; background: var(--panel-2); font-size: 12.5px; border-left: 3px solid var(--text-3); }
.ra.next { border-left-color: var(--warn); }
.ra .mono { font-size: 11px; color: var(--text-3); }
.ra small { color: var(--text-3); font-size: 11px; }
.rev { display: grid; gap: 2px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 12.5px; }
.fc-wrap { overflow-x: auto; }
.fc td, .fc th { text-align: center; }
.fc td:first-child, .fc th:first-child { text-align: left; }
.fc-cell { min-width: 44px; height: 30px; border-radius: 8px; display: grid; place-items: center; font: 700 13px var(--mono); color: #0b1220;
  background: color-mix(in srgb, var(--c) 70%, transparent); }
.kit-hd { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.kitbar { display: flex; align-items: center; gap: 8px; }
.app-version { margin: 22px 0 6px; text-align: center; font-size: 12px; color: var(--text-3); }
.app-version b { color: var(--text-2); font-weight: 600; }
/* barras de filtros (Auditoría, Tiempos por fase, Informes): los campos nunca se aplastan; si no caben, pasan a la línea siguiente */
.panel > .row > .field { flex: 1 1 150px; min-width: 140px; }
.panel > .row > .field[style*="flex:1"] { flex: 2 1 220px; min-width: 200px; }
.panel > .row > .field select.input, .panel > .row > .field input.input { width: 100%; }
/* calendario: el texto de cada evento cabe entero en altura y los tramos de continuación se distinguen sin quedarse vacíos */
.cal .e, .tv-allcol .e { line-height: 1.4; min-height: 20px; }
.cal .e { display: block; }
.cal .e.dot i { display: inline-block; vertical-align: middle; margin-right: 4px; }
.cal .e.cont { opacity: .72; }
[data-theme="light"] .cal .e.bar, [data-theme="light"] .tv-allcol .e { background: color-mix(in srgb, var(--c) 30%, #fff); color: #0b1220; }
input[type="time"].input { min-width: 112px; } input[type="date"].input { min-width: 140px; }
/* Proof Studio: las 6 pestañas caben siempre; la activa lleva su nombre y las demás, icono (nombre al pasar el ratón) */
.studio .side .tabs { overflow: visible; position: relative; z-index: 4; }
.studio .side .tabs button { padding: 8px 9px; }
.studio .side .tabs button:not(.on) .lbl { display: none; }
.palette-sw div { width: 74px; } .palette-sw small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.copilot-hd .muted, .chk span, .cmt .bd, .side p, .side .muted { text-align: left; hyphens: manual; }  /* en columnas estrechas el justificado deja huecos */
/* selector de color: una muestra grande y clicable (no una línea) */
input[type="color"].input { height: 42px; width: 100%; max-width: 160px; padding: 4px; cursor: pointer; background: var(--panel-2); }
input[type="color"].input::-webkit-color-swatch-wrapper { padding: 0; } input[type="color"].input::-webkit-color-swatch { border: 0; border-radius: 8px; }
input[type="color"].input::-moz-color-swatch { border: 0; border-radius: 8px; }
.steps-help { margin: 0; padding-left: 20px; display: grid; gap: 8px; font-size: 13.5px; line-height: 1.5; } .steps-help a { color: var(--accent); }
/* móvil (QA 14/10/2026): buscador en icono para que quepa todo en la cabecera, y tablas que se desplazan en vez de cortarse */
@media (max-width: 640px) {

  .top .search { flex: 0 0 auto; width: 40px; padding: 0; justify-content: center; } .top .search > span { display: none; }
  .brandsel select { max-width: 130px; }
  .panel .tbl { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .panel .tbl thead, .panel .tbl tbody { display: table; width: max-content; min-width: 100%; }
  .seg { flex-wrap: nowrap; }
}
[data-theme="light"] .st.tone { box-shadow: 0 0 0 1px rgba(0,0,0,.16) inset; }  /* estados pálidos (A tiempo, En pausa) visibles sobre blanco */
.gantt .gaxis { min-height: 28px; } .gantt .gaxis .track { height: 28px; }
.gantt .gaxis .mlbl { position: absolute; top: 6px; font: 500 11px var(--mono); color: var(--text-3); border-left: 1px solid var(--line-2); padding-left: 5px; white-space: nowrap; }
.gantt .gaxis .tlbl { position: absolute; top: 4px; transform: translateX(-50%); font: 700 10.5px var(--font); color: #0b1220; background: var(--accent-fill); padding: 1px 6px; border-radius: 6px; z-index: 3; }
.legend.gleg { margin-top: 12px; font-size: 12px; gap: 14px; } .legend.gleg i { display: inline-block; width: 12px; height: 10px; border-radius: 4px; margin-right: 6px; vertical-align: middle; }
.pcard > p { text-align: left; hyphens: manual; }  /* tarjetas estrechas: sin huecos del justificado */
[hidden] { display: none !important; }  /* «hidden» manda siempre (el display de .btn, .chip… lo anulaba y se veían botones ocultos) */
.tc-sec { display: inline-block; font: 600 11px var(--mono); color: var(--accent); text-transform: uppercase; letter-spacing: .04em; margin-top: 8px; }
.tc-unm { font-size: 12.5px; padding: 8px 10px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line-2); margin-top: 6px; line-height: 1.45; }
/* calendario: arrastrar eventos de día completo y estirar su último día */
.cal .e.mv, .tv-allcol .e.mv { cursor: grab; touch-action: none; position: relative; }
.cal .e.dragging, .tv-allcol .e.dragging { opacity: .45; cursor: grabbing; }
.cal .d.drop, .tv-allcol.drop, .tv-col.drop { background: color-mix(in srgb, var(--accent) 12%, transparent); outline: 1px dashed var(--accent); outline-offset: -2px; }
.e .rszx { position: absolute; top: 0; right: 0; bottom: 0; width: 7px; cursor: ew-resize; }
/* barras que caben en cualquier ancho: lo que no cabe pasa al desplegable «Más ⋯» (overflowMenu en ui.js), en día y en noche */
.top { position: relative; z-index: 20; }
.top .search { min-width: 180px; } @media (max-width: 900px) { .top .search { min-width: 40px; } }
.ovf { position: relative; flex: none; display: flex; align-items: center; }
.ovf-btn { width: auto; min-width: 40px; padding: 0 12px; display: inline-flex; align-items: center; gap: 6px; font: 600 12.5px var(--font); white-space: nowrap; }
.ovf-btn b { font-size: 16px; line-height: 1; letter-spacing: -.05em; }
.ovf.open .ovf-btn { color: var(--accent); border-color: var(--line); box-shadow: var(--glow); }
.ovf-pop { position: absolute; right: 0; top: calc(100% + 8px); z-index: 70; display: flex; flex-direction: column; align-items: stretch; gap: 6px;
  min-width: 230px; max-width: min(340px, calc(100vw - 16px)); max-height: calc(100vh - 90px); max-height: calc(100dvh - 90px); overflow: auto; overscroll-behavior: contain;
  padding: 8px; background: var(--panel-solid); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow), var(--glow); animation: pop .2s cubic-bezier(.2,1.2,.3,1); }
.ovf-pop > * { flex: none; }
/* en el desplegable cada herramienta es una fila con su icono y su nombre (el de su ayuda emergente o su título) */
.ovf-pop .tools { flex-direction: column; gap: 2px; padding: 4px; }
.ovf-pop .tool { width: 100%; height: 36px; display: flex; align-items: center; justify-content: flex-start; gap: 10px; padding: 0 10px; text-align: left; }
.ovf-pop .tool[data-tip]::after, .ovf-pop .tool[data-tip]:hover::after { content: attr(data-tip); position: static; transform: none; background: none; border: 0; padding: 0; box-shadow: none;
  color: inherit; font: 500 13px var(--font); white-space: normal; pointer-events: none; }
.ovf-pop > .iconbtn, .ovf-pop > a.iconbtn { width: 100%; height: 40px; display: flex; align-items: center; justify-content: flex-start; gap: 10px; padding: 0 12px; }
.ovf-pop > .iconbtn[title]::after { content: attr(title); font: 500 13px var(--font); color: var(--text); text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ovf-pop > .iconbtn .dot { position: static; margin-left: auto; order: 2; }
.ovf-pop > .top-me { width: 100%; padding: 4px 12px 4px 4px; } .ovf-pop > .top-me .who { display: inline; max-width: none; }
.ovf-pop > .brandsel { width: 100%; } .ovf-pop > .brandsel select { max-width: none; flex: 1; }
.ovf-pop > .langsw, .ovf-pop > .themesw { align-self: flex-start; }
.ovf-pop > .live { display: inline-flex; padding: 4px 6px; }
.ovf-pop > .live-bar, .ovf-pop > .chip { align-self: flex-start; }
/* pestañas del panel lateral de Proof Studio */
.tabs .ovf-btn { height: 33px; min-width: 0; padding: 0 10px; border-radius: 10px; }
.studio .side .tabs .ovf-pop button { width: 100%; justify-content: flex-start; } .studio .side .tabs .ovf-pop button .lbl { display: inline; }
@media (max-width: 640px) { .ovf-btn > span { display: none; } .ovf-btn { padding: 0; width: 40px; justify-content: center; } }
/* Proof Studio: el visor gestiona sus propios gestos (pellizcar = zoom, arrastrar = mover); sin ello el navegador ampliaba la página entera */
.stage { touch-action: none; overscroll-behavior: contain; }

/* =====================================================================================================================
   REDISEÑO 2026 (26/10/2026): distribución propia de Kalimo. Superficies claras, textos carbón, acentos fucsia discretos
   (solo acciones clave, navegación activa y foco), planos (sin degradados, brillos ni desenfoques), márgenes generosos.
   Claro por defecto (ui.setTheme); el oscuro mantiene la misma estructura. Navegación: barra superior con pestañas + «Más»
   (escritorio) y barra inferior + hoja «Más» (móvil). Este bloque manda sobre lo anterior.
   ===================================================================================================================== */
:root, [data-theme="light"] {
  --bg: #f7f4ed; --bg-2: #ffffff; --ink-1: #e3e6ec; --ink-2: #ffffff; --ink-3: #ffffff;
  --panel: #ffffff; --panel-solid: #ffffff; --panel-2: #f3f5f9; --line: #dcdfe5; --line-2: #e9ebef;
  --text: #0b1220; --text-2: #3d4556; --text-3: #566072;
  --accent: #d1006b; --accent-fill: #ff2d8b; --accent-2: #a8005a; --accent-ink: #0b1220; --accent-rgb: 255,45,139;
  --teal: #5b6474; --teal-2: #3d4556; --teal-rgb: 91, 100, 116;
  --ok: #15803d; --warn: #b45309; --bad: #c42b1c; --info: #1d4ed8; --violet: #6d3fc0;
  --glow: 0 0 0 1px var(--line); --shadow: 0 1px 2px rgba(11,18,32,.04); --lift: 0 12px 32px -16px rgba(11,18,32,.22);
  --radius: 14px; --radius-s: 10px; --blur: none; --stage: #e9ebef; --arena: #f7f4ed; --wrap: 1280px;
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #0b1220; --bg-2: #121a2b; --ink-1: #263047; --ink-2: #1a2336; --ink-3: #121a2b;
  --panel: #121a2b; --panel-solid: #121a2b; --panel-2: #1a2336; --line: #2e3850; --line-2: #222b3e;
  --text: #f3f5f9; --text-2: #c3c9d5; --text-3: #9ba4b4;
  --accent: #ff4f9e; --accent-fill: #ff2d8b; --accent-2: #ff74b3; --accent-ink: #0b1220;
  --teal: #a3aab8; --teal-2: #5b6474; --teal-rgb: 163, 170, 184;
  --ok: #4ade80; --warn: #fbbf24; --bad: #ff6b5e; --info: #60a5fa; --violet: #c4a1ff;
  --glow: 0 0 0 1px var(--line); --shadow: none; --lift: 0 14px 36px -16px rgba(0,0,0,.7); --stage: #070b14; --arena: #121a2b;
  color-scheme: dark;
}
body { background: var(--bg); font-size: 14.5px; }
.aurora, .grid-bg { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.input:focus-visible, .ci-pill textarea:focus-visible, .palette input:focus-visible { outline: none; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 200; padding: 10px 14px; border-radius: 10px; border: 0; background: var(--text); color: var(--bg); font-weight: 600; cursor: pointer; }
.skip:focus { top: 10px; }

/* ---------- estructura: barra superior, vista centrada, barra inferior (móvil) */
.app { position: relative; z-index: 1; display: flex; flex-direction: column; height: 100vh; height: 100dvh; }
.tbar { flex: none; position: relative; z-index: 20; display: flex; align-items: center; gap: 8px; height: 64px;
  padding: 0 max(20px, calc((100% - 1440px) / 2)); background: var(--panel-solid); border-bottom: 1px solid var(--line-2); }
.tbar > * { flex-shrink: 0; } .tbar .sp { flex: 1 1 0; min-width: 8px; }
.tlogo { display: flex; align-items: center; padding: 6px 8px; margin: 0 14px 0 -8px; border-radius: 8px; color: var(--text); }
.tlogo svg { height: 30px; width: auto; display: block; }
.tnav { display: flex; align-items: stretch; align-self: stretch; gap: 2px; min-width: 0; }
.tab { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 100%; padding: 0 12px; border: 0; background: none; cursor: pointer;
  font: 500 14px/1 var(--font); color: var(--text-2); white-space: nowrap; transition: color .15s; }
.tab:hover { color: var(--text); }
.tab::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: transparent; transition: background .2s; }
.tab.on { color: var(--text); font-weight: 600; } .tab.on::after { background: var(--accent-fill); }
.tab:focus-visible { outline-offset: -4px; border-radius: 8px; }
.more-btn .chev { opacity: .6; transition: transform .2s; } .more-btn[aria-expanded="true"] .chev { transform: rotate(180deg); }
.count { font: 700 10.5px/1 var(--mono); background: var(--accent-fill); color: var(--accent-ink); border-radius: 20px; padding: 3px 6px; min-width: 18px; text-align: center; }
.cmdk { display: inline-flex; align-items: center; gap: 8px; height: 38px; min-width: 230px; padding: 0 6px 0 12px; border-radius: 10px; border: 1px solid var(--line-2);
  background: var(--panel-2); color: var(--text-3); cursor: pointer; font-size: 13.5px; transition: border-color .15s, color .15s; }
.cmdk:hover { border-color: var(--line); color: var(--text-2); } .cmdk .lbl { flex: 1; text-align: left; } .cmdk .ic { width: 18px; height: 18px; }
.cmdk .kbd { background: var(--panel-solid); }
.tbar .brandsel { height: 38px; padding: 0 10px; gap: 6px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--panel-solid); }
.tbar .brandsel .ic { width: 17px; height: 17px; color: var(--text-3); } .brandsel select { max-width: 170px; font-size: 13.5px; }
.tbar .iconbtn { border-color: transparent; background: transparent; }
.iconbtn { border-radius: 10px; } .iconbtn:hover { color: var(--text); background: var(--panel-2); border-color: var(--line-2); box-shadow: none; }
.iconbtn .dot { top: 5px; right: 5px; }
.top-me { padding: 2px; border: 0; border-radius: 50%; background: none; cursor: pointer; } .top-me:hover { box-shadow: none; }
.top-me .who { display: none; } .top-me .av { width: 34px; height: 34px; box-shadow: 0 0 0 2px var(--panel-solid), 0 0 0 3px var(--line); }
.top-me[aria-expanded="true"] .av { box-shadow: 0 0 0 2px var(--panel-solid), 0 0 0 4px var(--accent-fill); }
.view { flex: 1; overflow: auto; padding: 36px max(28px, calc((100% - var(--wrap)) / 2)) 80px; scroll-behavior: smooth; }
.view:focus { outline: none; }
.bbar { display: none; }
.scrim { position: fixed; inset: 0; z-index: 65; background: rgba(11,18,32,.42); animation: fade .2s; }

/* menús de la barra («Más» y cuenta) */
.pop { position: fixed; z-index: 70; padding: 10px; background: var(--panel-solid); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--lift);
  max-height: calc(100dvh - 90px); overflow: auto; overscroll-behavior: contain; animation: popin .16s ease-out; }
@keyframes popin { from { opacity: 0; transform: translateY(-4px); } }
.sheet-grip { display: none; }
.more-pop { display: grid; grid-template-columns: repeat(3, minmax(190px, 1fr)); gap: 4px 18px; width: min(700px, calc(100vw - 24px)); padding: 16px; }
.mgrp { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mgrp-h { font: 600 11px/1 var(--font); letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); padding: 8px 10px 8px; }
.mi { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--text-2); font-size: 14px; }
.mi .ic { width: 18px; height: 18px; color: var(--text-3); } .mi span:not(.count) { flex: 1; min-width: 0; }
.mi:hover, .mi:focus-visible { background: var(--panel-2); color: var(--text); }
.mi.on { color: var(--text); font-weight: 600; background: var(--panel-2); } .mi.on .ic { color: var(--accent); }
@media (min-width: 901px) { .more-pop .prim { display: none; } }
.acct-pop { width: 290px; display: flex; flex-direction: column; gap: 2px; }
.acct-me { display: flex; align-items: center; gap: 12px; padding: 10px; margin-bottom: 6px; border-radius: 10px; border-bottom: 1px solid var(--line-2); }
.acct-me:hover { background: var(--panel-2); } .acct-me .av { width: 40px; height: 40px; }
.acct-me .who { min-width: 0; line-height: 1.25; } .acct-me .who b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acct-me .who span { font-size: 12.5px; color: var(--text-3); }
.acct-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 10px; font-size: 13.5px; color: var(--text-2); }
.acct-it { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: 8px; background: none; color: var(--text-2); cursor: pointer; font-size: 14px; text-align: left; }
.acct-it:hover { background: var(--panel-2); color: var(--text); } .acct-it .ic { width: 18px; height: 18px; }
.acct-it[data-logout] { border-top: 1px solid var(--line-2); border-radius: 0 0 8px 8px; margin-top: 4px; padding-top: 12px; }
.live i { animation: none; box-shadow: none; background: var(--ok); }

/* «Más ⋯» automático de la barra (overflowMenu) con pestañas dentro */
.ovf-pop { border-radius: 12px; box-shadow: var(--lift); }
.ovf-pop > .tab { height: 40px; width: 100%; padding: 0 12px; border-radius: 8px; justify-content: flex-start; } .ovf-pop > .tab::after { display: none; }
.ovf-pop > .tab.on { background: var(--panel-2); } .ovf.open .ovf-btn { box-shadow: none; color: var(--text); }

/* ---------- tipografía y cabeceras de página */
.eyebrow { font: 500 12.5px/1.2 var(--font); letter-spacing: .01em; text-transform: none; color: var(--text-3); gap: 6px; }
.eyebrow::before { display: none; }
h1.hero { font-family: var(--font-display); font-weight: 700; letter-spacing: -.02em; line-height: 1.1; color: var(--text); }
h1.hero em { background: none; -webkit-background-clip: border-box; background-clip: border-box; color: var(--text-3); font-weight: 600; }
.view h1.hero { font-size: clamp(26px, 2.5vw, 36px) !important; margin: 8px 0 0; }
h2 { font-weight: 650; letter-spacing: -.01em; } h3 { font-weight: 650; font-size: 15.5px; }
.tag { font: 500 12px/1.3 var(--font); letter-spacing: 0; text-transform: none; color: var(--text-3); }
/* cabecera de página: miga (Inicio › Sección), título grande y acciones a la derecha, separada por una línea fina */
.view > .row.rise:first-child { align-items: flex-end; gap: 14px 18px; padding-bottom: 22px; margin-bottom: 28px !important; border-bottom: 1px solid var(--line-2); }
.view > .row.rise:first-child > div:first-child .eyebrow { gap: 8px; }
.view > .row.rise:first-child > div:first-child .eyebrow::before { content: ""; display: inline-block; flex: none; width: 27px; height: 16px; border-radius: 0; box-shadow: none; background: currentColor;
  -webkit-mask: var(--crumb) center/contain no-repeat; mask: var(--crumb) center/contain no-repeat; }
:root { --crumb: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 11.5 12 5l8 6.5V20h-5.5v-5h-5v5H4z'/%3E%3Cpath d='M30 8l4 4-4 4'/%3E%3C/svg%3E"); }
.view > .row.rise:first-child .sub { margin-top: 6px; }
.summary-line { font-size: 16px; line-height: 1.55; color: var(--text-2); max-width: 820px; }

/* ---------- superficies: planas, borde fino, radio suave */
.panel { background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--radius); box-shadow: none; backdrop-filter: none; padding: 22px 24px; }
.panel::after { display: none; }
.panel-h { margin-bottom: 18px; } .panel-h h2 { font-size: 18px; }
.grid { gap: 20px; }
.rise { animation: rise2 .45s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i, 0) * 40ms); }
@keyframes rise2 { from { opacity: 0; transform: translateY(6px); } }
.kpi { background: var(--panel); border: 1px solid var(--line-2); border-radius: 12px; backdrop-filter: none; }
.kpi .v { font-weight: 650; letter-spacing: -.02em; }
.kpi.hot { border-color: var(--line-2); }
.modal { border-radius: 16px; border-color: var(--line); box-shadow: var(--lift), 0 0 0 1px rgba(11,18,32,.02); animation: pop2 .2s ease-out; }
@keyframes pop2 { from { opacity: 0; transform: translateY(8px); } }
.veil { background: rgba(11,18,32,.38); backdrop-filter: none; }
[data-theme="dark"] .veil { background: rgba(0,0,0,.55); }
.drawer { border-left: 1px solid var(--line); box-shadow: var(--lift); padding: 24px; }
.palette { border-radius: 14px; box-shadow: var(--lift); border-color: var(--line); }
.palette .it.on, .palette .it:hover { background: var(--panel-2); } .palette .it.on { box-shadow: inset 3px 0 0 var(--accent-fill); }
.toast { border-radius: 12px; box-shadow: var(--lift); } .toast.ok-big { box-shadow: var(--lift); }
.empty { padding: 36px 20px; }

/* ---------- botones, chips, estados, campos */
.btn { border-radius: 10px; border: 1px solid var(--line); background: var(--panel-solid); font-weight: 600; font-size: 13.5px; min-height: 40px; transition: background .15s, border-color .15s, color .15s; }
.btn:hover { color: var(--text); border-color: var(--text-3); background: var(--panel-solid); }
.btn.primary { background: var(--accent-fill); color: var(--accent-ink); border-color: var(--accent-fill); box-shadow: none; }
.btn.primary:hover { background: #ff4a9e; border-color: #ff4a9e; transform: none; box-shadow: none; color: var(--accent-ink); }
.btn.ghost { background: transparent; border-color: transparent; } .btn.ghost:hover { background: var(--panel-2); border-color: transparent; }
.btn.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, transparent); background: var(--panel-solid); }
.btn.danger:hover { background: color-mix(in srgb, var(--bad) 8%, var(--panel-solid)); color: var(--bad); }
.btn.sm { min-height: 32px; border-radius: 8px; }
.chip { border-radius: 6px; background: var(--panel-2); border-color: var(--line-2); padding: 3px 8px; }
.st { font: 600 11.5px/1 var(--font); letter-spacing: 0; text-transform: none; border-radius: 6px; padding: 5px 8px; }
.seg { border-radius: 10px; background: var(--panel-2); border-color: var(--line-2); padding: 3px; }
.seg button, .seg a { border-radius: 7px; padding: 6px 12px; }
.seg button.on, .seg a.on { background: var(--panel-solid); color: var(--text); box-shadow: 0 1px 2px rgba(11,18,32,.08), 0 0 0 1px var(--line-2); }
[data-theme="dark"] .seg button.on, [data-theme="dark"] .seg a.on { background: var(--ink-1); }
.field label { font: 600 12.5px var(--font); letter-spacing: 0; text-transform: none; color: var(--text-2); }
.input, select.input, textarea.input { border-radius: 10px; border: 1px solid var(--line); background: var(--panel-solid); }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .18); }
[data-theme="light"] .input:focus { box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .18); }
.themesw, .langsw { border-radius: 10px; background: var(--panel-2); border-color: var(--line-2); }
.themesw i { border-radius: 8px; background: var(--panel-solid); box-shadow: 0 1px 2px rgba(11,18,32,.12), 0 0 0 1px var(--line-2); }
[data-theme="dark"] .themesw i { background: var(--ink-1); box-shadow: none; }
.themesw button { border-radius: 8px; }
[data-theme="dark"] .themesw [data-th="dark"], [data-theme="light"] .themesw [data-th="light"] { color: var(--text); }
.langsw button { border-radius: 8px; } .langsw button.on { background: var(--panel-solid); color: var(--text); box-shadow: 0 1px 2px rgba(11,18,32,.12), 0 0 0 1px var(--line-2); }
[data-theme="dark"] .langsw button.on { background: var(--ink-1); }

/* ---------- listas, tablas (más aire), tarjetas */
.li { border-radius: 10px; padding: 12px; } .li:hover { transform: none; background: var(--panel-2); }
.tbl th { font: 600 12px var(--font); letter-spacing: 0; text-transform: none; color: var(--text-3); padding: 12px 14px; background: var(--panel-solid); border-bottom: 1px solid var(--line); }
.tbl td { padding: 13px 14px; border-bottom: 1px solid var(--line-2); }
.tbl tr:hover td { background: var(--panel-2); }
.pcard { border-radius: 12px; border-color: var(--line-2); background: var(--panel-solid); } .pcard:hover { transform: translateY(-2px); box-shadow: var(--lift); border-color: var(--line); }
.lane { border-radius: 12px; background: var(--panel-2); border-color: var(--line-2); }
.tnode { border-radius: 10px; } .tnode.active { box-shadow: 0 0 0 1px var(--accent); } .tnode.active::after { display: none; }
.asset { border-radius: 12px; border-color: var(--line-2); background: var(--panel-solid); } .asset:hover { transform: translateY(-2px); box-shadow: var(--lift); }
.dz { border-radius: 12px; background: var(--panel-2); } .dz:hover, .dz.over { background: color-mix(in srgb, var(--accent-fill) 6%, var(--panel-solid)); }
.cal .d { border-radius: 8px; background: var(--panel-solid); } .cal .d.today { box-shadow: none; }
.inbox .item:hover { border-color: var(--line-2); }
.gantt .gb { background: color-mix(in srgb, var(--text) 55%, transparent); box-shadow: none; }
.gantt .gb.late { background: var(--bad); } .gantt .gb.done { background: var(--ink-1); }
.gantt .today { box-shadow: none; }
.pipeline .col .b { background: color-mix(in srgb, var(--text) 78%, transparent); border-radius: 6px 6px 2px 2px; }
.copilot-hd { background: var(--panel-2); border-color: var(--line-2); }
.swipe-handle { box-shadow: none; } .pages .pg.on, .studio .pages .pg.on { box-shadow: none; }
.av.xl { box-shadow: 0 0 0 3px var(--panel-solid), 0 0 0 4px var(--line); }
.chat-list, .chat-main { border-radius: 14px; box-shadow: none; backdrop-filter: none; background: var(--panel); }
.chat-msgs { background: var(--bg); }
.chat-empty .ce-art { background: var(--panel-2); }

/* ---------- pantalla principal */
.dash { display: flex; flex-direction: column; gap: 32px; }
.dash-hd { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px 28px; flex-wrap: wrap; }
.dash-hi { min-width: 0; flex: 1 1 520px; } .dash-hi .eyebrow { text-transform: capitalize; }
.dash-hd h1.hero { font-size: clamp(30px, 3vw, 44px) !important; margin: 6px 0 8px; }
.dash-act { display: flex; gap: 10px; flex-wrap: wrap; }
.dsec-h { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; } .dsec-h h2 { font-size: 20px; } .dsec-h .sp { flex: 1; }
.today { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 14px; }
.tcard { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.tcard:hover { border-color: var(--line); box-shadow: var(--lift); }
.tc-th { position: relative; height: 112px; background: var(--panel-2) center/contain no-repeat; border-bottom: 1px solid var(--line-2); display: grid; place-items: center; color: var(--text-3); }
[data-theme="light"] .tc-th[style*="background-image"] { background-color: #fff; }
.tc-th .ic { width: 28px; height: 28px; } .tc-th .chip { position: absolute; right: 8px; top: 8px; background: var(--panel-solid); }
.tc-b { padding: 12px 14px 4px; display: grid; gap: 3px; min-width: 0; }
.tc-b b { font-size: 14px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tc-b .muted { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .tc-b .chip { justify-self: start; margin-top: 4px; }
.tc-f { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 14px 12px; margin-top: auto; }
.today-empty { background: var(--panel); border: 1px dashed var(--line); border-radius: 12px; }
.agenda-strip { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 14px; } .agenda-strip .tag { display: inline-flex; gap: 6px; align-items: center; }
.agenda-strip .ic { width: 16px; height: 16px; }
.kstrip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--panel); border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden; }
.kstrip .kpi { border: 0; border-radius: 0; background: none; padding: 14px 18px; box-shadow: inset -1px 0 0 var(--line-2), inset 0 -1px 0 var(--line-2); }
.kstrip .kpi .tag { display: flex; align-items: center; gap: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .kstrip .kpi .tag .ic { width: 15px; height: 15px; flex: none; }
.kstrip .kpi .v { font-size: 26px; margin: 6px 0 0; } .kstrip .kpi svg.spark { right: 14px; bottom: 14px; opacity: .55; }
@media (min-width: 1280px) { .kstrip { grid-template-columns: repeat(8, minmax(0, 1fr)); } .kstrip .kpi .tag { white-space: normal; min-height: 31px; align-items: flex-start; } .kstrip .kpi svg.spark { display: none; } }
.kstrip .kpi.hot .v { color: var(--bad); } .kstrip .kpi.good .v { color: var(--ok); }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.pc2 { display: grid; grid-template-columns: 88px minmax(0, 1fr); background: var(--panel); border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.pc2:hover { border-color: var(--line); box-shadow: var(--lift); }
.pc2-th { background: var(--panel-2) center/contain no-repeat; border-right: 1px solid var(--line-2); display: grid; place-items: center; color: var(--text-3); min-height: 104px; }
[data-theme="light"] .pc2-th[style*="background-image"] { background-color: #fff; }
.pc2-b { padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.pc2-b b { font-size: 13.5px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pc2-b .row { flex-wrap: nowrap; overflow: hidden; } .pc2-b .chip { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.pc2-f { display: flex; align-items: center; gap: 6px; font-size: 12px; margin-top: auto; } .pc2-f .ic { width: 14px; height: 14px; vertical-align: -2px; }
.prog { height: 4px; background: var(--ink-1); } .prog i { background: var(--text); }
[data-theme="dark"] .prog i { background: var(--text-2); }
.dash-an .panel { padding: 20px 22px; }
@media (max-width: 1180px) { .kstrip { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .dash { gap: 24px; } .dash-act { width: 100%; } .dash-act .btn { flex: 1 1 140px; }
  .kstrip { grid-template-columns: repeat(2, minmax(0, 1fr)); } .kstrip .kpi .v { font-size: 22px; }
  .today { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 78%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; }
  .tcard { scroll-snap-align: start; }
  .pgrid { grid-template-columns: 1fr; }
}

/* ---------- acceso (portada): pantalla partida */
.login { position: fixed; inset: 0; z-index: 2; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); background: var(--panel-solid); overflow: auto; }
.lp-brand { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; padding: 64px clamp(40px, 6vw, 96px); background: var(--arena); color: #0b1220; }
[data-theme="dark"] .lp-brand { background: #0b1220; color: #f3f5f9; border-right: 1px solid var(--line-2); }
.lp-pat { position: absolute; inset: 0; width: 100%; height: 100%; color: rgba(255,45,139,.075); pointer-events: none; }
[data-theme="dark"] .lp-pat { color: rgba(255,45,139,.06); }
.lp-in { position: relative; width: min(470px, 100%); display: flex; flex-direction: column; gap: 22px; }
.lp-logo { width: clamp(210px, 21vw, 300px); margin-bottom: 18px; animation: lpin .9s cubic-bezier(.2,.8,.2,1) both; }
@keyframes lpin { from { opacity: 0; transform: translateY(8px); } }
.lg-img { display: block; width: 100%; height: auto; }
[data-theme="light"] .lg-white, [data-theme="dark"] .lg-color { display: none; }
/* símbolo con degradado solo por encima de 48 px: la banda móvil y el logotipo pequeño usan el horizontal plano (icons.LOGO) */
.lg-flat { display: none; color: inherit; } .lg-flat svg { display: block; width: 100%; height: auto; }
.lp-mini .lg-img { display: none !important; } .lp-mini .lg-flat { display: block; color: var(--text); }
.login .tagline { font: 500 17px/1.3 var(--font-display); letter-spacing: .01em; text-transform: none; color: #d1006b; }
[data-theme="dark"] .login .tagline { color: #ff4f9e; }
.login h1.claim { font: 700 clamp(30px, 3vw, 46px)/1.1 var(--font-display); letter-spacing: -.02em; text-transform: none; margin: 0; color: inherit; }
.lp-desc { margin: 0; max-width: 430px; font-size: 15.5px; line-height: 1.6; color: #3d4556; text-align: left !important; hyphens: manual !important; }
[data-theme="dark"] .lp-desc { color: #c3c9d5; }
.login .formside { position: relative; display: grid; place-items: center; padding: 72px 48px 48px; background: var(--panel-solid); }
.login form { width: min(372px, 100%); gap: 16px; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; backdrop-filter: none; }
.login .eyebrow { color: var(--text-3); }
.lf-title { font-size: 30px; font-weight: 700; letter-spacing: -.015em; } .lf-sub { margin: -8px 0 8px; font-size: 14px; color: var(--text-3); }
.login form .btn.primary { min-height: 46px; font-size: 14.5px; }
.lf-foot { font-size: 12px; margin: 8px 0 0; text-align: center; }
.login-theme { top: 24px; right: 28px; }
.xmini, .xwrap { display: none !important; }
.lp-mini { width: 150px; margin: 0 auto 10px; }
.login.single { grid-template-columns: 1fr; max-width: none; margin: 0; background: var(--bg); }
.login.single .formside { background: var(--bg); }
.login.single form { padding: 32px; background: var(--panel-solid); border: 1px solid var(--line-2); border-radius: 16px; width: min(440px, 100%); }
@media (prefers-reduced-motion: reduce) { .lp-logo, .rise, .pop, .modal { animation: none !important; } .tab::after, .cmdk { transition: none; } }
@media (max-width: 900px) {
  .login { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .lp-brand { justify-content: flex-start; padding: 26px 22px 24px; }
  .lp-in { gap: 10px; } .lp-logo { width: 128px; margin-bottom: 6px; } .lp-logo .lg-img { display: none !important; } .lp-logo .lg-flat { display: block; } .login h1.claim { font-size: 21px; } .lp-desc { display: none; }
  .login .tagline { font-size: 13.5px; }
  .login .formside { display: flex; flex-direction: column; align-items: center; padding: 18px 20px 40px; }
  .login-theme { position: static; align-self: flex-end; margin-bottom: 22px; }
  .login form { padding: 0 !important; } .lf-title { font-size: 26px; }
}

/* ---------- Proof Studio: paleta vertical flotante, comparar abajo al centro, panel lateral estrecho */
.studio { grid-template-columns: 172px minmax(0, 1fr) 340px; grid-template-rows: 56px minmax(0, 1fr) 60px; background: var(--stage); }
[data-theme="light"] .studio { background: var(--stage); }
.studio .pages { grid-column: 1; } .studio .stage { grid-column: 2; } .studio .side { grid-column: 3; }
.studio .sbar, [data-theme="light"] .studio .sbar { background: var(--panel-solid); backdrop-filter: none; border-bottom: 1px solid var(--line-2); gap: 8px; }
.studio .sfoot, [data-theme="light"] .studio .sfoot { background: var(--panel-solid); backdrop-filter: none; border-top: 1px solid var(--line-2); }
.studio .pages, [data-theme="light"] .studio .pages { background: var(--panel-solid); border-right: 1px solid var(--line-2); padding: 12px 10px; }
.studio .side, [data-theme="light"] .studio .side { background: var(--panel-solid); backdrop-filter: none; border-left: 1px solid var(--line-2); }
.studio .pages .pg { border-radius: 6px; border-width: 1px; border-color: var(--line-2); } .studio .pages .pg.on { border-color: var(--accent); outline: 2px solid var(--accent-fill); outline-offset: 1px; }
.vers .v { border-radius: 8px; flex-wrap: wrap; row-gap: 4px; padding: 7px; } .vers .v .st { font-size: 10.5px; }
.stage, [data-theme="light"] .stage { background: var(--stage); }
.canvas, [data-theme="light"] .canvas { box-shadow: 0 1px 3px rgba(11,18,32,.12), 0 18px 40px -24px rgba(11,18,32,.35); }
.tools { border-radius: 10px; }
.tool { border-radius: 8px; } .tool:hover { background: var(--panel-2); } .tool.on { background: var(--text); color: var(--panel-solid); }
.tool[data-tip]:hover::after { border-radius: 6px; box-shadow: var(--lift); background: var(--text); color: var(--panel-solid); border-color: transparent; font-weight: 500; }
.tpal { grid-row: 2; grid-column: 2; align-self: center; justify-self: start; z-index: 8; margin-left: 14px; display: flex; flex-direction: column; gap: 6px; padding: 6px;
  border-radius: 12px; background: var(--panel-solid); border: 1px solid var(--line); box-shadow: var(--lift); }
.tpal .tools { display: grid; grid-auto-flow: row; gap: 2px; padding: 0; border: 0; border-radius: 0; background: none; }
.tpal .tools + .tools { border-top: 1px solid var(--line-2); padding-top: 6px; }
.tpal .tool { width: 36px; height: 36px; }
.tpal .tool[data-tip]:hover::after { top: 50%; left: calc(100% + 12px); transform: translateY(-50%); }
.studio:has(.ruler.ry:not([hidden])) .tpal { margin-left: 36px; }
@media (max-height: 820px) and (min-width: 901px) { .tpal .tools { grid-template-columns: repeat(2, 34px); } .tpal .tool { width: 34px; height: 34px; } }
.cmpbar { grid-row: 2; grid-column: 2; align-self: end; justify-self: center; z-index: 8; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; padding: 4px 4px 4px 12px;
  border-radius: 12px; background: var(--panel-solid); border: 1px solid var(--line); box-shadow: var(--lift); }
.cmpbar:not(:has(.tool)) { display: none; }
.cmp-l { display: inline-flex; align-items: center; gap: 6px; font: 600 12.5px var(--font); color: var(--text-3); white-space: nowrap; } .cmp-l .ic { width: 16px; height: 16px; }
.cmpbar .tools { padding: 0; border: 0; background: var(--panel-2); padding: 3px; }
.cmpbar .tool[data-tip]:hover::after { top: auto; bottom: calc(100% + 10px); }
.studio:has(.mtl) .cmpbar { margin-bottom: 78px; }
.zoomhud { left: auto; right: 16px; background: var(--panel-solid); border-color: var(--line); backdrop-filter: none; box-shadow: var(--lift); border-radius: 12px; }
.seps { background: var(--panel-solid); backdrop-filter: none; border-color: var(--line); box-shadow: var(--lift); border-radius: 12px; }
.seps.tacp { bottom: 76px; }
.ovhud { bottom: 84px; }
.studio .side .tabs { gap: 0; padding: 0 6px; border-bottom: 1px solid var(--line-2); }
.studio .side .tabs button { border-radius: 0; padding: 14px 10px 12px; color: var(--text-3); }
.studio .side .tabs button.on { background: none; box-shadow: inset 0 -2px 0 var(--accent-fill); color: var(--text); font-weight: 600; }
.studio .side .tabs .ovf-btn { height: 34px; margin: 8px 0; border-radius: 8px; }
.cmt { border-radius: 10px; background: var(--panel-solid); } .cmt:hover, .cmt.sel { border-color: var(--text-3); } .cmt.sel { box-shadow: inset 3px 0 0 var(--accent-fill); }
.chk, .diffl { border-radius: 10px; }
.pin div { box-shadow: 0 4px 12px rgba(11,18,32,.3), 0 0 0 2px #fff; }
@media (max-width: 900px) {
  .studio { grid-template-columns: minmax(0, 1fr); grid-template-rows: 56px minmax(240px, 1fr) min(40vh, 360px) 60px; }
  .studio .stage, .tpal, .cmpbar { grid-column: 1; } .studio .side { grid-column: 1; grid-row: 3; }
  .tpal { flex-direction: row; align-self: start; justify-self: stretch; margin: 8px; max-width: calc(100% - 16px); overflow-x: auto; scrollbar-width: none; }
  .tpal .tools { grid-auto-flow: column; grid-template-columns: none; }
  .tpal .tools + .tools { border-top: 0; padding-top: 0; border-left: 1px solid var(--line-2); padding-left: 6px; }
  .tpal .tool[data-tip]:hover::after { display: none; }
  .cmpbar { margin-bottom: 10px; } .cmp-l { display: none; } .cmpbar { padding: 4px; }
  .studio:has(.ruler.ry:not([hidden])) .tpal { margin-left: 8px; }
  .zoomhud { right: 10px; }
}

/* ---------- móvil: barra inferior y hojas */
@media (max-width: 1240px) { .cmdk { min-width: 0; } .cmdk .kbd { display: none; } }
@media (max-width: 1080px) { .cmdk .lbl { display: none; } .cmdk { width: 40px; padding: 0; justify-content: center; } }
@media (max-width: 900px) {
  .tbar { height: 56px; padding: 0 12px; gap: 4px; }
  .tlogo { margin-right: 4px; } .tlogo svg { height: 26px; }
  .tnav { display: none; }
  .cmdk { border-color: transparent; background: transparent; }
  .tbar .brandsel { padding: 0 8px; } .tbar .brandsel select { max-width: 110px; }
  .view { padding: 22px 16px 32px; }
  .bbar { display: flex; flex: none; position: relative; z-index: 25; align-items: stretch; height: calc(62px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    background: var(--panel-solid); border-top: 1px solid var(--line-2); }
  .bt { flex: 1 1 0; min-width: 0; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: 0; background: none;
    color: var(--text-3); font: 500 11px/1.1 var(--font); cursor: pointer; }
  .bt > span:not(.count) { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 2px; }
  .bt .ic { width: 23px; height: 23px; stroke-width: 1.7; }
  .bt.on { color: var(--text); font-weight: 600; } .bt.on::before { content: ""; position: absolute; top: -1px; left: 28%; right: 28%; height: 3px; border-radius: 0 0 3px 3px; background: var(--accent-fill); }
  .bt.on .ic { color: var(--accent); }
  .bt .count { position: absolute; top: 6px; left: calc(50% + 5px); font-size: 9.5px; padding: 2px 5px; }
  .bt:focus-visible { outline-offset: -4px; border-radius: 10px; }
  .pop { left: 0 !important; right: 0; top: auto !important; bottom: 0; width: auto !important; max-width: none; max-height: 82dvh; border-radius: 18px 18px 0 0; border-bottom: 0;
    padding: 6px 14px calc(18px + env(safe-area-inset-bottom)); animation: sheetin .22s cubic-bezier(.2,.8,.2,1); }
  @keyframes sheetin { from { transform: translateY(30%); opacity: 0; } }
  .sheet-grip { display: block; width: 42px; height: 4px; border-radius: 4px; background: var(--ink-1); margin: 6px auto 10px; grid-column: 1 / -1; }
  .more-pop { grid-template-columns: 1fr 1fr; gap: 2px 10px; }
  .mi { padding: 10px; }
  .chatwrap { height: calc(100dvh - 56px - 62px - 54px - env(safe-area-inset-bottom)); }
  .view > .row.rise:first-child { padding-bottom: 16px; margin-bottom: 20px !important; }
  .toasts { bottom: calc(74px + env(safe-area-inset-bottom)); }
  .upbar { bottom: calc(74px + env(safe-area-inset-bottom)); }
}
@media (max-width: 640px) {
  .panel { padding: 16px; border-radius: 12px; }
  .tbar .brandsel .ic { display: none; }
  .more-pop { grid-template-columns: 1fr; }
}
@media (max-width: 380px) { .tbar .brandsel select { max-width: 84px; } }
/* ajustes tras la revisión visual */
.dash-hi .eyebrow { text-transform: none; } .dash-hi .eyebrow::first-letter { text-transform: uppercase; }
.more-pop { display: block; columns: 2; column-gap: 22px; width: min(540px, calc(100vw - 24px)); }
.more-pop .mgrp { break-inside: avoid; margin-bottom: 8px; }
@media (max-height: 1000px) and (min-width: 901px) { .tpal .tools { grid-template-columns: repeat(2, 34px); } .tpal .tool { width: 34px; height: 34px; } }
.vers .v { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; column-gap: 6px; }
.vers .v > span.muted { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vers .v > .st { grid-column: 1 / -1; grid-row: 2; justify-self: start; }
.vers .v > .tool { grid-column: 3; grid-row: 1; }
.kstrip .kpi { display: flex; flex-direction: column; justify-content: space-between; gap: 6px; }
.field:has(> .row > input[type="date"] + input[type="date"]) { flex: 2 1 300px; }
@media (max-width: 900px) {
  .cmpbar { align-self: start; justify-self: start; margin: 66px 0 0 8px; }
  .studio:has(.mtl) .cmpbar { margin-bottom: 0; }
  .summary-line { font-size: 15px; }
  .more-pop { columns: 2; width: auto !important; }
}
@media (max-width: 640px) { .more-pop { columns: 1; } }
.sheet-grip { column-span: all; }
.dash-hi .eyebrow { display: block; }
[data-theme] .btn.primary, [data-theme] .btn.primary:hover { box-shadow: none; }
/* miga: icono de inicio enlazado */
.view > .row.rise:first-child > div:first-child .eyebrow:has(.crumb-home)::before { display: none; }
.crumb-home { display: inline-block; flex: none; width: 27px; height: 16px; background: currentColor; -webkit-mask: var(--crumb) center/contain no-repeat; mask: var(--crumb) center/contain no-repeat; border-radius: 2px; }
.crumb-home:hover { color: var(--text); background: var(--text); }
/* Proof Studio: área libre para encajar y centrar el arte (proof.js vp()): paleta a la izquierda, barras abajo */
.stage { --fit-l: 76px; --fit-t: 0px; --fit-r: 0px; --fit-b: 74px; }
.stage:has(.ruler.ry:not([hidden])) { --fit-l: 98px; }
@media (max-height: 1000px) and (min-width: 901px) { .stage { --fit-l: 110px; } .stage:has(.ruler.ry:not([hidden])) { --fit-l: 132px; } }
.studio:has(.mtl) .stage { --fit-b: 136px; }
@media (max-width: 900px) {
  .stage, .stage:has(.ruler.ry:not([hidden])) { --fit-l: 0px; --fit-t: 120px; --fit-b: 62px; }
  .studio:has(.mtl) .stage { --fit-b: 76px; }
  .studio:not(:has(.cmpbar .tool)) .stage { --fit-t: 66px; }
}
/* ---------- troquel real (corte / hendido) y maqueta 3D plegada por sus hendidos (die3d.js). Corte rojo, hendido azul y
   corte-hendido violeta son colores semánticos (no el rosa de marca); el panel va en el área libre (--fit-*), nunca bajo la paleta. */
.diepanel { position: absolute; left: calc(var(--fit-l, 0px) + 12px); top: calc(var(--fit-t, 0px) + 12px); z-index: 6; display: flex; flex-direction: column; gap: 7px;
  padding: 10px 12px; border-radius: 12px; background: var(--panel-solid); border: 1px solid var(--line); box-shadow: var(--lift); width: max-content; max-width: 280px;
  font-size: 12px; max-height: calc(100% - var(--fit-t, 0px) - var(--fit-b, 0px) - 24px); overflow-y: auto; overscroll-behavior: contain; }
.diepanel .tag { margin: 0; }
.stage:has(.mock3d) .diepanel.d2 { display: none; }
.mock3d .diepanel.d3 { top: calc(var(--fit-t, 0px) + 64px); max-height: calc(100% - var(--fit-t, 0px) - var(--fit-b, 0px) - 76px); cursor: default; }
.mock3d .m3d-bar { top: calc(var(--fit-t, 0px) + 14px); left: calc(var(--fit-l, 0px) + 12px); right: calc(var(--fit-r, 0px) + 12px); width: max-content; max-width: none; margin: 0 auto; transform: none; }
.mock3d.die3d { padding: var(--fit-t, 0px) var(--fit-r, 0px) var(--fit-b, 0px) var(--fit-l, 0px); }
.mock3d .m3d-hint { bottom: calc(var(--fit-b, 0px) + 6px); }
.die-leg { display: flex; flex-direction: column; gap: 3px; } .die-leg span { display: flex; align-items: center; gap: 7px; } .die-leg b { margin-left: auto; padding-left: 10px; }
.die-row { display: flex; gap: 6px; align-items: center; } .die-row > span:first-child { min-width: 52px; color: var(--text-3); } .die-row input[type=range] { flex: 1; min-width: 90px; accent-color: var(--accent-fill); }
.die-sel { display: flex; flex-direction: column; gap: 6px; padding-top: 8px; border-top: 1px solid var(--line-2); }
.layer .dieov [data-dface], .layer .dieov .diehit { pointer-events: auto; }
.mock3d .die-c { position: relative; width: 0; height: 0; } .mock3d .die-proxy { position: absolute; width: 0; height: 0; visibility: hidden; }
.mock3d.die3d:has(.die-c:hover) .obj { animation-play-state: paused; }
.mock3d .dface { position: absolute; left: 0; top: 0; transform-origin: 0 0; background-repeat: no-repeat; }
.mock3d .dface.back { background: #e4dac8 linear-gradient(135deg, rgba(255,255,255,.28), rgba(0,0,0,.05)); }
.mock3d .dhinge { position: absolute; left: 0; top: 0; height: 5px; transform-origin: 0 0; background: var(--accent-fill); box-shadow: 0 0 10px var(--accent-fill); pointer-events: none; }
@media (max-width: 900px) {
  .diepanel { left: 8px; right: 8px; top: auto; bottom: calc(var(--fit-b, 0px) + 6px); width: auto; max-width: none; max-height: 46%; padding: 8px 10px; }
  .diepanel .die-leg { flex-direction: row; flex-wrap: wrap; gap: 3px 12px; } .diepanel .die-leg b { margin-left: 0; padding-left: 2px; }
  .mock3d .diepanel.d3 { top: auto; max-height: 42%; }
  .mock3d .m3d-hint { display: none; }
  .diepanel > .tag:first-child { cursor: pointer; } .diepanel > .tag:first-child::after { content: "\25BE"; margin-left: auto; padding-left: 10px; font-size: 13px; }
  .diepanel.open > .tag:first-child::after { content: "\25B4"; }
  .diepanel:not(.open) > :not(.tag:first-child) { display: none; } .diepanel > .tag:first-child { display: flex; align-items: center; gap: 6px; }
  .mock3d .m3d-bar .chip { display: none; } .mock3d .m3d-bar [data-dview] { font-size: 0; gap: 0; padding: 8px 10px; } .mock3d .m3d-bar [data-dview] .ic { width: 16px; height: 16px; } .mock3d .m3d-bar { flex-wrap: nowrap; max-width: calc(100% - 24px); }
}

/* =====================================================================================================================
   KALIMO · OCT. 2026 (2): oscuro propio, selector de idioma y de tema, símbolo animado y nueva pantalla principal.
   Este bloque manda sobre lo anterior.
   ===================================================================================================================== */

/* ---------- Oscuro Kalimo: navy profundo del Carbón (#0B1220), superficies elevadas con tinte azul frío, filetes muy finos,
   luz superior interior en las tarjetas (en vez de sombras o brillos) y un toque cálido de Arena en las selecciones.
   Contrastes (WCAG) sobre la superficie más clara #1E2A44: texto 13,1 · secundario 7,1 · terciario 5,0 · acento #FF5FA6 5,1 ·
   ok 8,2 · aviso 8,6 · error 5,1 · info 5,6 · violeta 6,7. Carbón sobre fucsia (botones) 5,35. */
[data-theme="dark"] {
  --bg: #0b1220; --bg-2: #111a2e; --ink-1: #1e2a44; --ink-2: #172238; --ink-3: #111a2e;
  --panel: #111a2e; --panel-solid: #111a2e; --panel-2: #172238; --panel-3: #1e2a44;
  --line: rgba(255,255,255,.13); --line-2: rgba(255,255,255,.08);
  --text: #f3f5f9; --text-2: #aeb7c8; --text-3: #8e99ad;
  --accent: #ff5fa6; --accent-fill: #ff2d8b; --accent-2: #ff8fc0; --accent-ink: #0b1220; --accent-rgb: 255,45,139;
  --ok: #4ade80; --warn: #fbbf24; --bad: #ff6b5e; --info: #60a5fa; --violet: #c4a1ff;
  --sand: 247,244,237;
  --hl: inset 0 1px 0 rgba(255,255,255,.04);
  --glow: 0 0 0 1px var(--line); --shadow: var(--hl); --lift: 0 18px 40px -22px rgba(2,6,16,.9), var(--hl);
  --stage: #070c18; --arena: #0b1220; --scrim: rgba(3,6,14,.62);
  color-scheme: dark;
}
[data-theme="dark"] body { background: var(--bg); }
[data-theme="dark"] :focus-visible { outline-color: #ff2d8b; }
[data-theme="dark"] .input:focus { border-color: #ff2d8b; box-shadow: 0 0 0 3px rgba(255,45,139,.28); }
[data-theme="dark"] .tbar { background: #0b1220; border-bottom-color: var(--line-2); }
[data-theme="dark"] .top-me .av { box-shadow: 0 0 0 2px #0b1220, 0 0 0 3px var(--line); }
[data-theme="dark"] .cmdk { background: #111a2e; border-color: var(--line-2); }
[data-theme="dark"] .tbar .brandsel { background: #111a2e; }
[data-theme="dark"] .panel, [data-theme="dark"] .kpi, [data-theme="dark"] .tcard, [data-theme="dark"] .pc2, [data-theme="dark"] .pcard, [data-theme="dark"] .asset,
[data-theme="dark"] .chat-list, [data-theme="dark"] .chat-main, [data-theme="dark"] .kcard, [data-theme="dark"] .kside, [data-theme="dark"] .kart, [data-theme="dark"] .kh-focus,
[data-theme="dark"] .login.single form { background: #111a2e; border-color: var(--line-2); box-shadow: var(--hl); }
[data-theme="dark"] .pop, [data-theme="dark"] .modal, [data-theme="dark"] .drawer, [data-theme="dark"] .palette, [data-theme="dark"] .toast, [data-theme="dark"] .ovf-pop, [data-theme="dark"] .langmenu {
  background: #172238; border-color: var(--line); box-shadow: var(--lift); }
[data-theme="dark"] .veil, [data-theme="dark"] .scrim { background: var(--scrim); }
[data-theme="dark"] .btn { background: #172238; border-color: var(--line); }
[data-theme="dark"] .btn:hover { background: #1e2a44; border-color: rgba(255,255,255,.2); }
[data-theme="dark"] .btn.ghost { background: transparent; border-color: transparent; } [data-theme="dark"] .btn.ghost:hover { background: rgba(var(--sand), .06); }
[data-theme="dark"] .btn.primary { background: #ff2d8b; border-color: #ff2d8b; color: #0b1220; box-shadow: none; }
[data-theme="dark"] .btn.primary:hover { background: #ff4f9e; border-color: #ff4f9e; }
[data-theme="dark"] .btn.danger { background: #172238; }
[data-theme="dark"] .input, [data-theme="dark"] select.input, [data-theme="dark"] textarea.input { background: #0d1526; border-color: var(--line); }
[data-theme="dark"] .chip { background: #172238; border-color: var(--line-2); }
[data-theme="dark"] .seg { background: #0d1526; } [data-theme="dark"] .seg button.on, [data-theme="dark"] .seg a.on { background: #1e2a44; box-shadow: var(--hl), 0 0 0 1px var(--line-2); }
[data-theme="dark"] .tbl th { background: #111a2e; border-bottom-color: var(--line); }
[data-theme="dark"] .tbl tr:hover td, [data-theme="dark"] .li:hover, [data-theme="dark"] .mi:hover, [data-theme="dark"] .mi:focus-visible, [data-theme="dark"] .acct-it:hover,
[data-theme="dark"] .acct-me:hover, [data-theme="dark"] .palette .it:hover { background: rgba(var(--sand), .045); }
[data-theme="dark"] .tbl tr.on td, [data-theme="dark"] .tbl tr.sel td, [data-theme="dark"] .mi.on, [data-theme="dark"] .palette .it.on, [data-theme="dark"] .ovf-pop > .tab.on,
[data-theme="dark"] .pages .pg.on, [data-theme="dark"] .asset.on { background: rgba(var(--sand), .075); }
[data-theme="dark"] ::selection { background: rgba(255,45,139,.85); color: #0b1220; }
[data-theme="dark"] .lane, [data-theme="dark"] .dz, [data-theme="dark"] .copilot-hd { background: #0f1729; }
[data-theme="dark"] .bar, [data-theme="dark"] .prog { background: #1e2a44; }
[data-theme="dark"] .heat .cell { background-color: #172238; }
[data-theme="dark"] .chat-msgs { background: #0b1220; }
[data-theme="dark"] .studio .sbar, [data-theme="dark"] .studio .sfoot, [data-theme="dark"] .studio .pages, [data-theme="dark"] .studio .side { background: #0e1628; }
[data-theme="dark"] .cal .d { background: #111a2e; }
[data-theme="dark"] ::-webkit-scrollbar-thumb { background: #26324d; }

/* ---------- botón de tema: uno solo, redondo; sol, luna y automático (medio círculo) */
.thbtn { position: relative; width: 38px; height: 38px; flex: none; display: grid; place-items: center; padding: 0; border-radius: 50%; border: 1px solid var(--line);
  background: var(--panel-solid); color: var(--text); cursor: pointer; transition: border-color .2s, background-color .2s, transform .2s; }
.thbtn:hover { border-color: var(--text-3); } .thbtn:active { transform: scale(.94); }
.thbtn svg { width: 20px; height: 20px; overflow: visible; }
.thbtn .th-core { transform-box: fill-box; transform-origin: center; transition: transform .5s cubic-bezier(.3,1.35,.5,1); }
.thbtn .th-rays { transform-origin: 12px 12px; transition: transform .5s cubic-bezier(.3,1.35,.5,1), opacity .3s; }
.thbtn .th-bite { transition: transform .5s cubic-bezier(.4,0,.2,1); }
.thbtn .th-half { transform-box: fill-box; transform-origin: 100% 50%; transition: transform .45s cubic-bezier(.4,0,.2,1); }
.thbtn .th-ring { opacity: 0; transform-box: fill-box; transform-origin: center; transition: opacity .3s, transform .45s cubic-bezier(.3,1.35,.5,1); transform: scale(.7); }
.thbtn[data-state="light"] .th-core { transform: scale(.56); }
.thbtn[data-state="light"] .th-bite { transform: translate(9px, -9px); }
.thbtn[data-state="light"] .th-half { transform: scaleX(0); }
.thbtn[data-state="dark"] .th-rays { opacity: 0; transform: rotate(-60deg) scale(.4); }
.thbtn[data-state="dark"] .th-half { transform: scaleX(0); }
.thbtn[data-state="auto"] .th-rays { opacity: 0; transform: rotate(60deg) scale(.4); }
.thbtn[data-state="auto"] .th-bite { transform: translate(9px, -9px); }
.thbtn[data-state="auto"] .th-ring { opacity: 1; transform: none; }
[data-theme="dark"] .thbtn { background: #111a2e; border-color: var(--line); }
[data-theme="dark"] .thbtn[data-state="dark"] { color: #ffd9ea; }

/* ---------- selector de idioma: globo + nombre nativo y menú pequeño con marca */
.langdd { position: relative; display: inline-flex; }
.langbtn { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 10px 0 11px; border-radius: 19px; border: 1px solid var(--line); background: var(--panel-solid);
  color: var(--text); font: 500 13.5px/1 var(--font); cursor: pointer; transition: border-color .2s, background-color .2s; }
.langbtn:hover { border-color: var(--text-3); }
.langbtn .ic { width: 17px; height: 17px; color: var(--text-2); } .langbtn .chev { opacity: .6; transition: transform .2s; }
.langdd.open .langbtn .chev { transform: rotate(180deg); }
.langmenu { position: absolute; top: calc(100% + 6px); right: 0; z-index: 90; min-width: 170px; padding: 5px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--panel-solid); box-shadow: var(--lift); display: flex; flex-direction: column; gap: 2px; animation: popin .14s ease-out; }
.langmenu[hidden] { display: none; }
.langmenu button { display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%; padding: 9px 10px; border: 0; border-radius: 8px; background: none;
  color: var(--text-2); font: 500 14px var(--font); text-align: left; cursor: pointer; }
.langmenu button:hover, .langmenu button:focus-visible { background: var(--panel-2); color: var(--text); outline: none; }
.langmenu button .ic { width: 16px; height: 16px; color: var(--accent); visibility: hidden; }
.langmenu button[aria-checked="true"] { color: var(--text); font-weight: 600; } .langmenu button[aria-checked="true"] .ic { visibility: visible; }
[data-theme="dark"] .langbtn { background: #111a2e; }
[data-theme="dark"] .langmenu button:hover, [data-theme="dark"] .langmenu button:focus-visible { background: rgba(var(--sand), .06); }
.acct-row .langbtn { height: 34px; } .acct-row .thbtn { width: 34px; height: 34px; }
.acct-row .langmenu { min-width: 150px; }
.acct-pop { overflow: visible; }
.login-theme { display: flex; align-items: center; gap: 8px; }
@media (prefers-reduced-motion: reduce) { .thbtn, .thbtn * { transition: none !important; } .langmenu { animation: none; } }

/* ---------- símbolo animado (KMARK) */
.kmark { display: block; width: 100%; height: auto; overflow: visible; }
.kmark .km-lo, .kmark .km-up { stroke-dasharray: 1 1; stroke-dashoffset: 0; }
.kmark .km-dot { transform-box: fill-box; transform-origin: center; }
.play .kmark .km-lo { animation: kmDraw .55s cubic-bezier(.35,.75,.25,1) .12s both; }
.play .kmark .km-up { animation: kmDraw .5s cubic-bezier(.35,.75,.25,1) .5s both; }
.play .kmark .km-dot { animation: kmPop .6s cubic-bezier(.3,1.7,.5,1) .88s both, kmHop 6s ease-in-out 3s infinite; }
.play .kmark .km-word { animation: kmWord .6s ease-out 1.05s both; }
@keyframes kmDraw { 0% { stroke-dashoffset: 1; opacity: 0; } 4% { opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 1; } }
@keyframes kmPop { 0% { transform: scale(0); } 100% { transform: scale(1); } }
@keyframes kmHop { 0%, 84%, 100% { transform: translateY(0) scale(1); } 88% { transform: translateY(-16%) scale(1); } 92% { transform: translateY(0) scale(1.06, .94); } 95% { transform: translateY(-4%) scale(1); } }
@keyframes kmWord { from { opacity: 0; transform: translateX(-40px); } }
.login .lp-logo { animation: none; }
@media (max-width: 900px) { .kmark .km-lo { stroke: #d1006b; } .kmark .km-up { stroke: #ff2d8b; } }
.lp-mini .kmark .km-lo { stroke: #d1006b; } .lp-mini .kmark .km-up { stroke: #ff2d8b; } .lp-mini { color: var(--text); }
.tlogo .km-dot { transform-box: fill-box; transform-origin: center; transition: transform .35s cubic-bezier(.3,1.6,.5,1); }
.tlogo:hover .km-dot, .tlogo:focus-visible .km-dot { transform: translateX(22%); }
.kload { display: grid; place-items: center; min-height: 46vh; animation: kmFadeIn .3s ease-out .15s both; }
.kload svg { width: 46px; height: auto; overflow: visible; }
.kload .kl-lo, .kload .kl-up { animation: klBar 1.2s ease-in-out infinite; } .kload .kl-up { animation-delay: .15s; }
.kload .kl-dot { transform-box: fill-box; transform-origin: center; animation: klDot 1.2s cubic-bezier(.45,0,.55,1) infinite; }
@keyframes kmFadeIn { from { opacity: 0; } }
@keyframes klBar { 0%, 100% { opacity: .35; } 45% { opacity: 1; } }
@keyframes klDot { 0% { transform: translateX(-120%) scale(.6); opacity: 0; } 30% { opacity: 1; } 55% { transform: translateX(0) scale(1); } 75% { transform: translateY(-12%); } 100% { transform: translateX(0) scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .play .kmark *, .kload *, .kload { animation: none !important; } .tlogo .km-dot { transition: none; } .tlogo:hover .km-dot { transform: none; }
}

/* ---------- pantalla principal (Inicio) */
.home { display: flex; flex-direction: column; gap: 34px; }
.kh-hero { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 400px); gap: 28px 40px; align-items: stretch;
  padding: 34px 36px; border-radius: 22px; background: #f0ebe0; border: 1px solid rgba(11,18,32,.06); overflow: hidden; }
[data-theme="dark"] .kh-hero { background: #111a2e; border-color: var(--line-2); box-shadow: var(--hl); }
.kh-hi { position: relative; z-index: 1; display: flex; flex-direction: column; justify-content: center; gap: 14px; min-width: 0; }
.kh-hi .eyebrow { text-transform: none; }
.kh-hi h1.hero { font-size: clamp(30px, 3.2vw, 46px) !important; margin: 0; }
.kh-hi .summary-line { margin: 0; }
.kh-seg { display: inline-flex; align-self: flex-start; gap: 4px; padding: 4px; border-radius: 14px; background: rgba(255,255,255,.65); border: 1px solid rgba(11,18,32,.07); }
.kh-seg button { display: inline-flex; align-items: baseline; gap: 8px; padding: 8px 14px; border: 0; border-radius: 10px; background: none; color: var(--text-2); font: 500 13.5px var(--font); cursor: pointer; transition: background-color .15s, color .15s; }
.kh-seg button b { font-size: 18px; font-weight: 700; color: var(--text); }
.kh-seg button.is-late b { color: var(--bad); }
.kh-seg button:hover { background: rgba(11,18,32,.05); color: var(--text); }
.kh-seg button[aria-pressed="true"] { background: var(--panel-solid); color: var(--text); box-shadow: 0 1px 2px rgba(11,18,32,.1), 0 0 0 1px rgba(11,18,32,.06); }
[data-theme="dark"] .kh-seg { background: #0b1220; border-color: var(--line-2); }
[data-theme="dark"] .kh-seg button:hover { background: rgba(var(--sand), .06); }
[data-theme="dark"] .kh-seg button[aria-pressed="true"] { background: #1e2a44; box-shadow: var(--hl), 0 0 0 1px var(--line-2); }
.kh-hi .agenda-strip { margin: 0; }
.kdot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #ff2d8b; flex: none; }
.kh-focus { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 14px; padding: 18px; border-radius: 18px; background: var(--panel-solid);
  border: 1px solid rgba(11,18,32,.07); box-shadow: 0 18px 40px -26px rgba(11,18,32,.35); color: var(--text); transition: transform .2s, box-shadow .2s; }
a.kh-focus:hover { transform: translateY(-2px); box-shadow: 0 24px 46px -24px rgba(11,18,32,.4); }
[data-theme="dark"] .kh-focus { background: #172238; }
[data-theme="dark"] a.kh-focus:hover { box-shadow: var(--hl), 0 0 0 1px rgba(255,255,255,.14); }
.kf-k { display: inline-flex; align-items: center; gap: 8px; font: 600 11.5px/1 var(--font); letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); }
.kh-focus.late .kf-k .kdot { background: var(--bad); } .kh-focus.alert .kf-k .kdot { background: var(--warn); }
.kf-th { display: grid; place-items: center; height: 168px; border-radius: 12px; background: var(--panel-2) center/contain no-repeat; border: 1px solid var(--line-2); color: var(--text-3); }
.kf-th .ic { width: 34px; height: 34px; }
[data-theme="light"] .kf-th[style*="background-image"], [data-theme="light"] .ktl-th[style*="background-image"], [data-theme="light"] .kart-th[style*="background-image"] { background-color: #fff; }
[data-theme="dark"] .kf-th { background-color: #0d1526; }
.kf-b { display: grid; gap: 4px; min-width: 0; } .kf-b > b { font-size: 16.5px; line-height: 1.3; } .kf-b > .muted { font-size: 13px; }
.kf-m { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; } .kf-m .tag .ic { width: 14px; height: 14px; vertical-align: -2px; }
.kf-go { justify-content: center; width: 100%; min-height: 44px; margin-top: auto; }
.kh-focus.calm { justify-content: flex-start; } .kf-calm { display: grid; place-items: center; text-align: center; gap: 8px; padding: 26px 10px; flex: 1; }
.kf-calm .ic { width: 34px; height: 34px; color: var(--ok); } .kf-calm b { font-size: 17px; }
.kh-main { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 30px; align-items: start; }
.kh-left { display: flex; flex-direction: column; gap: 34px; min-width: 0; }
.kh-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.kh-sec .dsec-h { gap: 10px; }
.kh-empty { display: grid; place-items: center; gap: 6px; padding: 30px 16px; border: 1px dashed var(--line); border-radius: 14px; color: var(--text-3); text-align: center; font-size: 13.5px; }
.kh-empty .ic { width: 24px; height: 24px; color: var(--ok); } .kh-empty p { margin: 0; } .kh-empty.sm { padding: 16px; border: 0; }
.ktl { list-style: none; margin: 0; padding: 0 0 0 4px; position: relative; }
.ktl::before { content: ""; position: absolute; left: 8px; top: 10px; bottom: 10px; width: 2px; border-radius: 2px; background: var(--line); }
.ktl-g { position: relative; padding: 0 0 18px 30px; }
.ktl-d { position: relative; display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; font: 600 14px var(--font); color: var(--text); }
.ktl-d span::first-letter { text-transform: uppercase; }
.ktl-d .kdot { position: absolute; left: -26px; top: 4px; width: 11px; height: 11px; box-shadow: 0 0 0 4px var(--bg); }
.ktl-g.late .ktl-d { color: var(--bad); } .ktl-g.late .kdot { background: var(--bad); }
.ktl-items { display: grid; gap: 8px; }
.ktl-it { display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 9px 12px 9px 9px; border-radius: 14px;
  background: var(--panel-solid); border: 1px solid var(--line-2); transition: border-color .15s, transform .15s; }
.ktl-it:hover { border-color: var(--line); transform: translateX(3px); }
[data-theme="dark"] .ktl-it { background: #111a2e; box-shadow: var(--hl); } [data-theme="dark"] .ktl-it:hover { background: #14203a; }
.ktl-th { width: 54px; height: 54px; border-radius: 10px; display: grid; place-items: center; background: var(--panel-2) center/contain no-repeat; border: 1px solid var(--line-2); color: var(--text-3); }
.ktl-th .ic { width: 20px; height: 20px; }
.ktl-b { display: grid; gap: 2px; min-width: 0; } .ktl-b b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ktl-b .muted { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ktl-m { display: flex; align-items: center; gap: 6px; }
.ktl-more { display: inline-flex; align-items: center; gap: 6px; margin-left: 34px; font-size: 13px; font-weight: 600; color: var(--accent); } .ktl-more .ic { width: 15px; height: 15px; }
.kh-ops { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.kcard, .kside { background: var(--panel-solid); border: 1px solid var(--line-2); border-radius: 16px; padding: 18px 20px; min-width: 0; }
.kcard.wide { grid-column: 1 / -1; }
.kcard-h { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; } .kcard-h h3 { margin: 0; font-size: 15px; } .kcard-h > .tag:last-child { margin-left: auto; }
.kcard-h .sp { flex: 1; }
.kfunnel { display: grid; gap: 9px; }
.kf-row { display: grid; grid-template-columns: minmax(90px, 38%) minmax(0, 1fr) 30px; align-items: center; gap: 10px; font-size: 12.5px; }
.kf-row > span { color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .kf-row b { text-align: right; font-size: 12.5px; }
.kf-bar { height: 10px; border-radius: 10px; background: var(--panel-2); overflow: hidden; }
.kf-bar i { display: block; height: 100%; border-radius: 10px; background: var(--text-2); transform-origin: left; animation: grow .9s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i) * 50ms); }
.kf-row:first-child .kf-bar i { background: #ff2d8b; }
[data-theme="dark"] .kf-bar { background: #1e2a44; }
.kbn { margin-bottom: 12px; } .kbn .row { margin-bottom: 5px; gap: 8px; } .kbn .row > span:nth-child(2) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kside-h { font-size: 15px; margin: 0 0 12px; }
.kmini { display: grid; gap: 8px; }
.km { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--panel-2); }
[data-theme="dark"] .km { background: #172238; box-shadow: var(--hl); }
.km-l { display: flex; align-items: center; gap: 7px; min-width: 0; font-size: 12.5px; color: var(--text-2); } .km-l .ic { width: 15px; height: 15px; color: var(--text-3); flex: none; }
.km-l span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.km-v { font: 700 19px/1 var(--font); letter-spacing: -.02em; text-align: right; } .km-v small { font-size: 12px; font-weight: 500; color: var(--text-3); margin-left: 1px; }
.km.hot .km-v { color: var(--bad); } .km.good .km-v { color: var(--ok); }
.kb-bars, .km-p { grid-column: 1 / -1; }
.kb-bars { display: flex; align-items: flex-end; gap: 3px; height: 22px; }
.kb-bars i { flex: 1; border-radius: 2px 2px 1px 1px; background: color-mix(in srgb, var(--text) 26%, transparent); transform-origin: bottom; animation: kbUp .7s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i) * 30ms); }
.kb-bars i:last-child { background: #ff2d8b; }
@keyframes kbUp { from { transform: scaleY(0); } }
.km-p { height: 5px; border-radius: 5px; background: color-mix(in srgb, var(--text) 10%, transparent); overflow: hidden; } .km-p i { display: block; height: 100%; border-radius: 5px; background: var(--text-2); }
.km.good .km-p i { background: var(--ok); } .km.hot .km-p i { background: var(--bad); } .km-p.ghost { display: none; }
.ksla { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; } .ksla b { font-size: 30px; letter-spacing: -.02em; } .ksla small { font-size: 15px; color: var(--text-3); }
.kstack { display: flex; gap: 3px; height: 12px; border-radius: 6px; overflow: hidden; }
.kstack i { display: block; min-width: 4px; border-radius: 3px; transform-origin: left; animation: grow .8s cubic-bezier(.2,.8,.2,1) both; }
.kstack-l { display: grid; gap: 6px; margin-top: 12px; font-size: 12.5px; }
.kstack-l span { display: grid; grid-template-columns: 9px minmax(0, 1fr) auto 40px; align-items: center; gap: 8px; color: var(--text-2); }
.kstack-l span > i { width: 9px; height: 9px; border-radius: 3px; } .kstack-l small { text-align: right; font-size: 11.5px; }
.krisk { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 6px; border-radius: 10px; }
.krisk:hover { background: var(--panel-2); } [data-theme="dark"] .krisk:hover { background: rgba(var(--sand), .045); }
.krisk > span > b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .krisk .muted { font-size: 12px; display: block; }
.kr-s { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; font: 700 13px var(--mono); border: 2px solid currentColor; }
.kr-s.bad { color: var(--bad); } .kr-s.warn { color: var(--warn); } .kr-s.ok { color: var(--ok); }
.kside .feed .ev { padding: 8px 0; }
.kcar { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 250px); gap: 14px; overflow-x: auto; padding: 2px 2px 12px; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; }
.kcar.small { grid-auto-columns: 168px; }
.kcar:focus-visible { outline-offset: 4px; border-radius: 12px; }
.kart { display: flex; flex-direction: column; scroll-snap-align: start; background: var(--panel-solid); border: 1px solid var(--line-2); border-radius: 16px; overflow: hidden; transition: transform .2s, border-color .2s; }
.kart:hover { transform: translateY(-3px); border-color: var(--line); }
.kart-th { display: grid; place-items: center; height: 150px; background: var(--panel-2) center/contain no-repeat; border-bottom: 1px solid var(--line-2); color: var(--text-3); }
[data-theme="dark"] .kart-th, [data-theme="dark"] .ktl-th { background-color: #0d1526; }
.kcar.small .kart-th { height: 104px; } .kart-th .ic { width: 28px; height: 28px; }
.kart-b { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; min-width: 0; }
.kart-b b { font-size: 13.5px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.kart .prog { display: block; height: 4px; border-radius: 4px; overflow: hidden; } .kart .prog i { display: block; height: 100%; }
.kart .pc2-f { display: flex; align-items: center; gap: 6px; font-size: 12px; } .kart .pc2-f .ic { width: 14px; height: 14px; vertical-align: -2px; }
@media (max-width: 1180px) { .kh-main { grid-template-columns: minmax(0, 1fr) 300px; } .kh-ops { grid-template-columns: 1fr; } }
@media (max-width: 980px) {
  .kh-hero { grid-template-columns: 1fr; padding: 22px 20px; border-radius: 18px; }
  .kh-focus { order: -1; }
  .kh-main { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .home { gap: 26px; }
  .kh-hero { gap: 18px; }
  .kh-hi h1.hero { font-size: 28px !important; }
  .kh-seg { align-self: stretch; } .kh-seg button { flex: 1; justify-content: center; flex-direction: column; align-items: center; gap: 2px; padding: 7px 6px; font-size: 12px; }
  .kf-th { height: 140px; }
  .ktl-it { grid-template-columns: 46px minmax(0, 1fr); } .ktl-th { width: 46px; height: 46px; } .ktl-m { grid-column: 2; }
  .kcar { grid-auto-columns: 74%; }
  .dash-act { flex-wrap: wrap; } .dash-act .btn { flex: 1 1 140px; white-space: nowrap; padding: 0 12px; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) { .kb-bars i, .kstack i, .kf-bar i { animation: none; } .ktl-it:hover, .kart:hover, a.kh-focus:hover { transform: none; } }
