/* ============================================================
   Explorador y demostraciones
   Marco común (dp) + cinco paneles con identidad propia:
   A atención (oscuro) · E operaciones (claro, tablero)
   B contenido (claro, tarjetas) · C video (oscuro, carril de iconos)
   D organización (oscuro, foco centrado)
   ============================================================ */

/* ---------- Explorador ---------- */
.ex { overflow-x: clip; }
.ex__notice { margin-top: var(--s-3); display: flex; align-items: center; gap: var(--s-1); font-size: var(--fs-small); color: var(--text-muted); }
.ex__notice-ic { width: 9px; height: 9px; background: var(--violet); box-shadow: 9px 0 0 var(--violet-soft); margin-right: 9px; flex: none; }
.ex__bar { display: grid; gap: var(--s-2); margin-bottom: var(--s-4); }
.ex__filters { display: flex; flex-wrap: wrap; gap: var(--s-1); }
html:not(.js) .ex__filters { display: none; }
.fbtn {
  min-height: 40px; padding: 0 var(--s-2); border: 1px solid var(--rule-control); background: transparent; cursor: pointer;
  font-size: var(--fs-small); font-weight: 500; color: var(--text-muted); border-radius: var(--radius-pill);
}
.fbtn:hover { color: var(--text); border-color: var(--violet-soft); }
.fbtn[aria-pressed="true"] { background: var(--ivory); color: var(--ink); border-color: var(--ivory); font-weight: 600; }
.ex__tabs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; border: 1px solid var(--rule); }
.tab {
  display: flex; align-items: center; gap: var(--s-2); min-height: calc(var(--cell) * 8); padding: var(--s-1) var(--s-2);
  text-decoration: none; font-weight: 600; font-size: var(--fs-small); line-height: 1.25; color: var(--text-muted);
  border-right: 1px solid var(--rule); position: relative;
}
.tab:last-child { border-right: 0; }
.tab:hover { color: var(--text); background: var(--ink-2); }
.tab__ic { width: 36px; height: 36px; margin-right: -9px; transform: scale(0.75); transform-origin: left center; flex: none; }
.tab[aria-selected="true"] { color: var(--text); background: var(--ink-3); }
.tab[aria-selected="true"]::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--violet); }
@media (max-width: 1023px) {
  .ex__tabs { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; border: 0; gap: var(--s-1); padding-bottom: 4px; }
  .tab { flex: 0 0 auto; border: 1px solid var(--rule); scroll-snap-align: start; min-height: 56px; }
  .tab:last-child { border-right: 1px solid var(--rule); }
}
html:not(.js) .ex__tabs { display: flex; flex-wrap: wrap; border: 0; gap: var(--s-1); }
html:not(.js) .tab { border: 1px solid var(--rule); }

.ex__panels { position: relative; }
.ex__wipe { position: absolute; inset: 0; z-index: 6; pointer-events: none; display: grid; grid-template-columns: repeat(var(--cols, 14), 1fr); grid-auto-rows: 1fr; }
.ex__wipe i { background: var(--violet); }
.ex__wipe i:nth-child(3n) { background: var(--violet-soft); }
.ex__wipe i:nth-child(7n) { background: var(--ink-3); }
html:not(.js) .ex__wipe { display: none; }
html:not(.js) .dp + .dp { margin-top: var(--s-12); padding-top: var(--s-6); border-top: 1px solid var(--rule); }

/* ---------- Marco de cada demo ---------- */
.dp { display: grid; gap: var(--s-4); outline: none; }
.dp__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--s-2) var(--s-4); }
.dp__title { font-family: var(--font-display); font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.75rem); line-height: var(--lh-head); letter-spacing: -0.025em; }
.dp__sub { margin-top: var(--s-1); color: var(--text-muted); font-size: var(--fs-small); }
.dp__label { display: inline-flex; align-items: center; gap: var(--s-1); padding: 6px var(--s-2); background: var(--ink-3); border: 1px solid var(--rule-strong); font-size: var(--fs-micro); font-weight: 600; }
.dp__label-dot { width: 9px; height: 9px; background: var(--violet); box-shadow: 9px 0 0 var(--violet-soft); margin-right: 9px; }
.dp__body { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-4); grid-template-areas: "main" "steps"; }
@media (min-width: 1100px) { .dp__body { grid-template-columns: 300px minmax(0, 1fr); column-gap: var(--s-6); grid-template-areas: "steps main"; } }
.dp__steps { grid-area: steps; }
.dp__main { grid-area: main; min-width: 0; }
.dp__h { font-family: var(--font-text); font-size: var(--fs-small); font-weight: 600; color: var(--text); margin-bottom: var(--s-2); }
.dp__note { margin-top: var(--s-2); font-size: var(--fs-micro); color: var(--text-muted); }
.dp__info { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-4); padding-top: var(--s-4); border-top: 1px solid var(--rule); }
.dp__info p, .adapt { font-size: var(--fs-small); color: var(--text-muted); }
.adapt { list-style: none; padding: 0; display: grid; gap: var(--s-1); }
.adapt strong { color: var(--text); font-weight: 600; }
.dp__cta { display: flex; flex-direction: column; gap: var(--s-2); }
.dp__cta > p { color: var(--text); font-weight: 600; }
@media (max-width: 899px) { .dp__info { grid-template-columns: 1fr; } }

.steps { list-style: none; padding: 0; border-top: 1px solid var(--rule); }
.steps__item { border-bottom: 1px solid var(--rule); padding: var(--s-1) 0 var(--s-2); position: relative; }
.steps__item::before { content: ''; position: absolute; left: -1px; top: -1px; width: 2px; height: calc(100% + 1px); background: var(--violet-soft); transform: scaleY(0); transform-origin: top; transition: transform var(--dur-ui) var(--ease-out); }
.steps__item[aria-current="step"]::before { transform: scaleY(1); }
.steps__btn { display: flex; align-items: center; gap: var(--s-2); width: 100%; min-height: 44px; padding: 0 0 0 var(--s-2); background: none; border: 0; text-align: left; cursor: pointer; font-weight: 600; font-size: var(--fs-small); }
.steps__n { flex: none; width: 27px; height: 27px; display: grid; place-items: center; border: 1px solid var(--rule-control); font-size: var(--fs-micro); font-weight: 600; color: var(--text-muted); }
.steps__item[aria-current="step"] .steps__n { background: var(--violet); border-color: var(--violet); color: var(--ivory); }
.steps__item.is-done .steps__n { border-color: var(--violet-soft); color: var(--violet-soft); }
.steps__item p { padding-left: calc(var(--s-2) + 27px + var(--s-2)); font-size: var(--fs-small); color: var(--text-muted); line-height: 1.5; }
.steps__btn:hover .steps__t { text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--rule-strong); }
.tag { display: inline-block; padding: 1px 6px; margin-left: 2px; border: 1px dashed var(--rule-strong); font-size: 0.75rem; font-weight: 600; color: var(--text); white-space: nowrap; vertical-align: 1px; }
html:not(.js) .steps__btn { cursor: default; }

.dp__stage { position: relative; }
.dp__corner { position: absolute; width: 23px; height: 23px; z-index: 2; pointer-events: none; }
.dp__corner i { position: absolute; width: 7px; height: 7px; background: var(--violet); }
.dp__corner i:nth-child(1) { left: 0; top: 0; } .dp__corner i:nth-child(2) { left: 8px; top: 0; }
.dp__corner i:nth-child(3) { left: 16px; top: 0; background: var(--violet-soft); } .dp__corner i:nth-child(4) { left: 0; top: 8px; }
.dp__corner i:nth-child(5) { left: 0; top: 16px; background: var(--violet-soft); }
.dp__corner--tl { left: -12px; top: -12px; } .dp__corner--tr { right: -12px; top: -12px; transform: scaleX(-1); }
.dp__corner--bl { left: -12px; bottom: -12px; transform: scaleY(-1); } .dp__corner--br { right: -12px; bottom: -12px; transform: scale(-1, -1); }
@media (max-width: 599px) { .dp__corner { display: none; } }

.controls { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-1); margin-top: var(--s-3); }
.ctl { display: inline-flex; align-items: center; gap: var(--s-1); min-height: 44px; padding: 0 var(--s-2); background: transparent; border: 1px solid var(--rule-control); border-radius: var(--radius-site); font-size: var(--fs-small); font-weight: 500; cursor: pointer; transition: border-color var(--dur-ui) var(--ease-out); }
.ctl:hover { border-color: var(--violet-soft); }
.ctl:disabled { opacity: 0.45; cursor: not-allowed; }
.ctl--main { background: var(--ink-3); min-width: 150px; }
.ctl__ic { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.ctl__ic--play { fill: currentColor; stroke: none; }
.ctl[data-state="playing"] .ctl__ic--play, .ctl:not([data-state="playing"]) .ctl__ic--pause { display: none; }
.controls__status { margin-left: auto; font-size: var(--fs-micro); color: var(--text-muted); font-variant-numeric: tabular-nums; }
html:not(.js) .controls { display: none; }
.reduced [data-ctl="toggle"] { display: none; }
@media (max-width: 599px) {
  .controls { display: grid; grid-template-columns: 1fr 1fr; }
  .ctl { justify-content: center; } .ctl--main { grid-column: 1 / -1; }
  .controls__status { grid-column: 1 / -1; margin-left: 0; }
}

.packet { position: absolute; left: 0; top: 0; z-index: 4; width: 20px; height: 20px; display: grid; grid-template-columns: repeat(3, 6px); gap: 1px; opacity: 0; visibility: hidden; pointer-events: none; }
.packet i { background: var(--violet-soft); } .packet i:nth-child(odd) { background: var(--ivory); } .packet i:nth-child(5) { background: var(--violet); }

/* ---------- Ventana común ---------- */
.app { position: relative; z-index: 1; border-radius: var(--radius-app); overflow: hidden; height: 600px; font-size: 14px; line-height: 1.35; box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.7); }
.app svg:not(.o__svg):not(.k__spark) { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.o__svg, .k__spark { overflow: visible; }

/* Chips de estado (forma de píldora de los paneles originales) */
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: var(--radius-pill); font-size: 11px; font-weight: 600; letter-spacing: 0.01em; border: 1px solid currentColor; white-space: nowrap; line-height: 1.4; }
.chip::before { content: ''; width: 5px; height: 5px; background: currentColor; flex: none; }
.chip[data-tone="ai"] { color: var(--state-ai); }
.chip[data-tone="human"] { color: var(--state-human); }
.chip[data-tone="open"] { color: var(--state-open); }
.chip[data-tone="pending"] { color: var(--state-pending); }
.chip[data-tone="closed"] { color: var(--state-closed); }
.chip[data-tone="urgent"] { color: #F08A75; }

/* ============ A · Atención (aprobada en el laboratorio) ============ */
.app--a { --app-bg: #101014; --app-panel: #15151B; --app-line: rgba(248, 246, 244, 0.08); background: var(--app-bg); border: 1px solid var(--rule-strong); display: grid; grid-template-rows: auto minmax(0, 1fr); color: var(--ivory); }
.app__bar { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-bottom: 1px solid var(--app-line); background: var(--app-panel); }
.app__brand { display: flex; align-items: center; gap: 10px; margin-right: auto; min-width: 0; }
.app__mark { width: 30px; height: 30px; border-radius: 9px; background: var(--violet); display: grid; grid-template-columns: repeat(2, 6px); gap: 2px; place-content: center; flex: none; }
.app__mark i { width: 6px; height: 6px; background: var(--ivory); }
.app__mark i:nth-child(2), .app__mark i:nth-child(3) { background: rgba(248, 246, 244, 0.45); }
.app__brand-t { display: flex; flex-direction: column; min-width: 0; }
.app__brand-t strong { font-weight: 600; font-size: 14px; }
.app__brand-t span { font-size: 12px; color: var(--text-muted); }
.app__status { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border-radius: var(--radius-pill); border: 1px solid var(--rule-strong); font-size: 12px; font-weight: 500; color: var(--text-muted); white-space: nowrap; }
.app__status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--state-closed); }
.app__user { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-muted); }
.app__user-av { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--ink-4); color: var(--ivory); font-weight: 600; font-size: 11px; }
.app__body { display: grid; grid-template-columns: 196px 296px minmax(0, 1fr); min-height: 0; }
.app__side { padding: 12px 10px; border-right: 1px solid var(--app-line); background: var(--app-panel); display: flex; flex-direction: column; gap: 2px; overflow: hidden; }
.app__group { font-size: 11px; font-weight: 600; color: var(--text-faint); padding: 10px 10px 4px; letter-spacing: 0.02em; }
.app__group:first-child { padding-top: 2px; }
.app__item { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; color: var(--text-muted); font-size: 13px; white-space: nowrap; }
.app__item b { margin-left: auto; min-width: 22px; height: 20px; padding: 0 6px; border-radius: var(--radius-pill); background: rgba(248, 246, 244, 0.06); font-size: 11px; font-weight: 600; display: grid; place-items: center; color: var(--text-muted); }
.app__item.is-active { background: var(--violet-wash); color: var(--ivory); box-shadow: inset 2px 0 0 var(--violet-soft); }
.app__item.is-active b { background: var(--violet); color: var(--ivory); }
.app__list { border-right: 1px solid var(--app-line); display: flex; flex-direction: column; min-height: 0; }
.app__list-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 10px; font-size: 12px; font-weight: 600; color: var(--text-muted); letter-spacing: 0.02em; }
.app__list-head b { min-width: 22px; height: 20px; padding: 0 6px; border-radius: var(--radius-pill); background: rgba(248, 246, 244, 0.06); font-size: 11px; display: grid; place-items: center; }
.app__rows { list-style: none; margin: 0; padding: 0 8px; overflow: hidden; }
.row__in { display: flex; gap: 11px; padding: 11px 10px; border-radius: var(--radius-ui); margin-bottom: 2px; position: relative; }
.row[data-selected="true"] .row__in { background: rgba(124, 120, 246, 0.12); box-shadow: inset 0 0 0 1px rgba(124, 120, 246, 0.35); }
.row__main { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.row__top { display: flex; align-items: baseline; gap: 8px; }
.row__top strong { font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row__top time { margin-left: auto; font-size: 11px; color: var(--text-faint); white-space: nowrap; }
.row__prev { font-size: 12.5px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row__chips { display: flex; gap: 5px; margin-top: 3px; }
.row__unread { position: absolute; right: 10px; top: 32px; min-width: 20px; height: 20px; border-radius: var(--radius-pill); background: var(--violet); color: var(--ivory); font-size: 11px; font-weight: 600; display: grid; place-items: center; }
html:not(.js) .row__unread { display: none; }
.pav { width: 38px; height: 38px; border-radius: 11px; background: var(--ink-4); display: grid; grid-template-columns: repeat(3, 7px); gap: 2px; place-content: center; flex: none; }
.pav i { width: 7px; height: 7px; background: transparent; }
.pav--sm { width: 32px; height: 32px; border-radius: 9px; grid-template-columns: repeat(3, 6px); }
.pav--sm i { width: 6px; height: 6px; }
.pav--a i:nth-child(1), .pav--a i:nth-child(3), .pav--a i:nth-child(5), .pav--a i:nth-child(8) { background: var(--violet-soft); }
.pav--b i:nth-child(2), .pav--b i:nth-child(4), .pav--b i:nth-child(6), .pav--b i:nth-child(7), .pav--b i:nth-child(9) { background: var(--ivory-3); }
.pav--c i:nth-child(1), .pav--c i:nth-child(2), .pav--c i:nth-child(5), .pav--c i:nth-child(9) { background: var(--state-pending); }
.pav--d i:nth-child(3), .pav--d i:nth-child(5), .pav--d i:nth-child(7), .pav--d i:nth-child(8) { background: var(--state-closed); }
.app__chat { position: relative; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.chat__empty { position: absolute; inset: 0; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; padding: 24px; color: var(--text-muted); font-size: 13px; }
.chat__empty strong { color: var(--ivory); font-weight: 600; font-size: 14px; }
.chat__empty-ic { width: 44px; height: 44px; border-radius: 12px; background: var(--violet-wash); display: grid; place-items: center; color: var(--violet-soft); margin-bottom: 6px; }
.chat__view { display: flex; flex-direction: column; min-height: 0; height: 100%; }
.chat__head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--app-line); }
.chat__ctl { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 10px; border-top: 1px dashed var(--app-line); font-size: 12px; font-weight: 600; color: var(--text-muted); }
.chat__who { display: flex; flex-direction: column; min-width: 0; }
.chat__who strong, .chat__who span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat__who strong { font-weight: 600; font-size: 14px; }
.chat__who span { font-size: 12px; color: var(--text-muted); }
.chat__chips { display: flex; gap: 5px; }
.toggle { position: relative; display: inline-grid; grid-template-columns: 1fr 1fr; padding: 3px; border-radius: var(--radius-pill); background: rgba(248, 246, 244, 0.06); border: 1px solid var(--app-line); font-size: 12px; font-weight: 600; }
.toggle__opt { position: relative; z-index: 1; padding: 4px 12px 4px 26px; text-align: left; color: var(--text-muted); }
.toggle__knob { position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc(50% - 3px); border-radius: var(--radius-pill); background: var(--ink-4); display: grid; grid-template-columns: repeat(2, 4px); gap: 2px; align-content: center; padding-left: 10px; }
.toggle__knob i { width: 4px; height: 4px; background: var(--violet-soft); }
.toggle[data-mode="ai"] .toggle__opt:nth-of-type(1), .toggle[data-mode="human"] .toggle__opt:nth-of-type(2) { color: var(--ivory); }
.toggle[data-mode="human"] .toggle__knob { transform: translateX(100%); }
.chat__msgs { flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; gap: 10px; padding: 16px 18px; }
.msg { display: flex; flex-direction: column; max-width: 78%; gap: 4px; }
.msg__b { padding: 10px 13px; border-radius: var(--radius-bubble); font-size: 13.5px; line-height: 1.45; }
.msg__by { font-size: 11px; font-weight: 600; color: var(--text-faint); }
.msg--in { align-self: flex-start; } .msg--in .msg__b { background: var(--ink-4); border-bottom-left-radius: 4px; }
.msg--out { align-self: flex-end; align-items: flex-end; }
.msg--ai .msg__b { background: var(--violet-wash); border: 1px solid rgba(124, 120, 246, 0.35); border-bottom-right-radius: 4px; }
.msg--ai .msg__by { color: var(--state-ai); }
.msg--human .msg__b { background: var(--ivory-2); color: var(--ink); border-bottom-right-radius: 4px; }
.msg--note { align-self: center; max-width: 100%; font-size: 12px; color: var(--text-muted); }
.msg--note span { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px; border-radius: var(--radius-pill); border: 1px dashed var(--rule-strong); }
.msg--note span::before { content: ''; width: 6px; height: 6px; background: var(--state-human); }
.msg--closed span::before { background: var(--state-closed); }
.msg--typing { display: none; }
.msg--typing .msg__b { display: inline-flex; gap: 4px; padding: 13px 14px; }
.msg--typing i { width: 6px; height: 6px; background: var(--violet-soft); }
.chat__composer { display: flex; align-items: center; gap: 10px; margin: 0 16px 16px; padding: 8px 8px 8px 14px; border-radius: 12px; border: 1px solid var(--app-line); background: var(--app-panel); }
.chat__input { flex: 1; font-size: 13px; color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 20px; }
.chat__input[data-typing="true"] { color: var(--ivory); }
.chat__send { width: 32px; height: 32px; border-radius: 9px; background: var(--violet); color: var(--ivory); display: grid; place-items: center; flex: none; }
@media (max-width: 1239px) { .app__body { grid-template-columns: 172px 268px minmax(0, 1fr); } }
@media (max-width: 979px) { .app__body { grid-template-columns: 250px minmax(0, 1fr); } .app__side { display: none; } }
@media (max-width: 679px) {
  .app--a { height: 560px; font-size: 13px; }
  .app__body { grid-template-columns: minmax(0, 1fr); }
  .app__user-n, .app__status { display: none; }
  .js .app__list, .js .app__chat { grid-column: 1; grid-row: 1; }
  .js .app--a[data-view="list"] .app__chat { visibility: hidden; }
  .js .app--a[data-view="chat"] .app__list { visibility: hidden; }
  .chat__head { padding: 10px 12px; } .chat__msgs { padding: 12px; } .msg { max-width: 88%; } .chat__composer { margin: 0 12px 12px; }
}
@media (max-width: 359px) { .chat__chips { display: none; } .app--a { height: 540px; } }

/* ============ E · Operaciones (claro, tablero) ============ */
.app--o {
  --o-bg: #F4F2EF; --o-card: #FFFFFF; --o-line: #E3DFDA; --o-text: #1A1A1F; --o-muted: #5E5C5A;
  --o-p: #C2412D; --o-e: #9A6200; --o-r: #2E7D57;
  height: 640px; background: var(--o-bg); color: var(--o-text); border: 1px solid var(--o-line);
  display: grid; grid-template-columns: 168px minmax(0, 1fr); font-size: 13px;
}
.o__side { background: #ECE8E3; border-right: 1px solid var(--o-line); padding: 14px 10px; display: flex; flex-direction: column; gap: 2px; }
.o__brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 13px; padding: 2px 8px 14px; }
.o__mark { width: 22px; height: 22px; border-radius: 6px; background: var(--violet); box-shadow: inset 0 0 0 5px var(--violet), inset 0 0 0 11px var(--ivory); }
.o__nav { padding: 7px 10px; border-radius: 8px; color: var(--o-muted); font-weight: 500; }
.o__nav.is-active { background: var(--o-card); color: var(--violet-deep); font-weight: 600; box-shadow: 0 1px 0 var(--o-line); }
.o__main { min-width: 0; padding: 14px 16px; display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto auto; gap: 10px; overflow: hidden; }
.o__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.o__head div { display: flex; flex-direction: column; }
.o__head strong { font-family: var(--font-display); font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.o__head div span { color: var(--o-muted); font-size: 12px; }
.o__search { padding: 7px 14px; border-radius: var(--radius-pill); border: 1px solid var(--o-line); background: var(--o-card); color: var(--o-muted); font-size: 12px; white-space: nowrap; }
.o__kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.kpi { background: var(--o-card); border: 1px solid var(--o-line); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; }
.kpi span { font-size: 11px; color: var(--o-muted); font-weight: 500; }
.kpi b { font-family: var(--font-display); font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1; }
.kpi--p b { color: var(--o-p); } .kpi--e b { color: var(--o-e); } .kpi--r b { color: var(--o-r); }
.o__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; min-height: 0; }
.o__card { background: var(--o-card); border: 1px solid var(--o-line); border-radius: 12px; padding: 10px 12px; min-height: 0; }
.o__card h5 { font-size: 12px; font-weight: 600; margin-bottom: 6px; }
.o__card h5 em { font-style: normal; color: var(--o-muted); font-weight: 500; }
.o__chart { display: flex; flex-direction: column; }
.o__svg { width: 100%; height: 100%; min-height: 70px; flex: 1; }
.o__svg path.o__gl { stroke: var(--o-line); stroke-width: 1; fill: none; vector-effect: non-scaling-stroke; }
.o__l { fill: none; stroke-width: 2.5; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.o__l--r { stroke: var(--o-r); } .o__l--e { stroke: var(--o-e); } .o__l--p { stroke: var(--o-p); }
.o__dot--r { fill: var(--o-r); }
.o__legend { display: flex; gap: 10px; font-size: 11px; color: var(--o-muted); margin-top: 4px; }
.lg::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-right: 5px; vertical-align: 0; }
.lg--r::before { background: var(--o-r); } .lg--e::before { background: var(--o-e); } .lg--p::before { background: var(--o-p); }
/* Mapa abstracto de celdas: cinco zonas genéricas, sin geografía real */
.map { position: relative; height: calc(100% - 22px); min-height: 110px; display: grid; grid-template-columns: repeat(16, 1fr); grid-template-rows: repeat(10, 1fr); gap: 2px;
  background-image: linear-gradient(to right, var(--o-card) 2px, transparent 2px), linear-gradient(to bottom, var(--o-card) 2px, transparent 2px);
  background-size: calc(100% / 16) calc(100% / 10); }
.map__z { display: flex; align-items: flex-start; justify-content: flex-start; padding: 4px 6px; font-size: 9.5px; font-weight: 600; color: var(--o-muted); border-radius: 2px; }
.map__z--n { grid-area: 1 / 1 / 4 / 12; background: #E7E4F7; } .map__z--o { grid-area: 4 / 1 / 9 / 6; background: #ECEAF6; }
.map__z--c { grid-area: 4 / 6 / 8 / 12; background: #DCD9F7; } .map__z--e { grid-area: 1 / 12 / 9 / 17; background: #E4E2F3; }
.map__z--s { grid-area: 8 / 6 / 11 / 17; background: #EEECF7; }
.pin { grid-area: calc(var(--y) + 1) / calc(var(--x) + 1); width: 9px; height: 9px; align-self: center; justify-self: center; z-index: 1; box-shadow: 0 0 0 2px var(--o-card); }
.pin[data-s="p"] { background: var(--o-p); } .pin[data-s="e"] { background: #D99528; } .pin[data-s="r"] { background: #3E9F72; }
.pin--new { width: 12px; height: 12px; outline: 2px solid var(--violet); outline-offset: 2px; }
.o__entry { padding: 8px 12px; }
.o__flow { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; counter-reset: f; }
.o__flow li { counter-increment: f; display: flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 8px; border: 1px dashed var(--o-line); color: var(--o-muted); font-size: 11.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.o__flow li::before { content: counter(f); width: 16px; height: 16px; border-radius: 4px; background: var(--o-line); display: grid; place-items: center; font-size: 10px; font-weight: 700; flex: none; color: var(--o-text); }
.o__flow li[data-on="true"] { border-style: solid; border-color: var(--violet); color: var(--o-text); }
.o__flow li[data-on="true"]::before { background: var(--violet); color: var(--ivory); }
.o__table { padding: 4px 0; overflow: hidden; }
.o__rows { overflow: hidden; }
.tr { display: grid; grid-template-columns: 74px 64px minmax(0, 1.6fr) 96px 72px 56px; gap: 8px; align-items: center; padding: 6px 12px; border-top: 1px solid var(--o-line); font-size: 12px; white-space: nowrap; }
.tr > span { overflow: hidden; text-overflow: ellipsis; }
.tr--h { border-top: 0; font-size: 11px; font-weight: 600; color: var(--o-muted); }
.tr--new[data-hl="true"] { background: #EEEDFD; }
.chip--o { font-size: 10.5px; padding: 1px 7px; }
.app--o .chip[data-tone="closed"] { color: var(--o-r); } .app--o .chip[data-tone="pending"] { color: var(--o-e); } .app--o .chip[data-tone="urgent"] { color: var(--o-p); }
@media (max-width: 1239px) { .app--o { grid-template-columns: minmax(0, 1fr); } .o__side { display: none; } }
@media (max-width: 899px) { .tr { grid-template-columns: 70px minmax(0, 1fr) 92px 68px; } .tr > span:nth-child(2), .tr > span:nth-child(6) { display: none; } }
@media (max-width: 679px) {
  .app--o { height: 600px; }
  .o__main { grid-template-rows: auto; align-content: start; padding: 12px; }
  .o__search { display: none; }
  .o__kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .o__kpis .kpi:last-child { grid-column: 1 / -1; }
  .o__grid { grid-template-columns: 1fr; }
  .o__chart { display: none; }
  .map { height: 150px; }
  .o__flow { grid-template-columns: 1fr 1fr; }
  .tr { grid-template-columns: 70px minmax(0, 1fr) 88px; } .tr > span:nth-child(5) { display: none; }
  .js .app--o[data-view="registro"] .o__kpis, .js .app--o[data-view="registro"] .o__grid { display: none; }
  .js .app--o[data-view="resumen"] .o__entry, .js .app--o[data-view="resumen"] .o__table { display: none; }
}

/* ============ B · Contenido y redes (claro, tarjetas) ============ */
.app--k {
  --k-bg: #F8F6F4; --k-card: #FFFFFF; --k-line: #E6E1DC; --k-text: #171717; --k-muted: #5A5856;
  background: var(--k-bg); color: var(--k-text); border: 1px solid var(--k-line);
  display: grid; grid-template-columns: 180px minmax(0, 1fr); height: 620px;
}
.k__side { background: #FFFFFF; border-right: 1px solid var(--k-line); padding: 16px 12px; display: flex; flex-direction: column; gap: 2px; }
.k__brand { display: flex; align-items: center; gap: 8px; font-weight: 700; padding: 0 8px 14px; }
.k__mark { width: 22px; height: 22px; background: var(--violet); clip-path: polygon(0 0, 45% 0, 45% 55%, 100% 0, 100% 45%, 55% 100%, 0 100%); }
.k__nav { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px; border-radius: 10px; color: var(--k-muted); font-weight: 500; }
.k__nav b { background: var(--violet); color: var(--ivory); border-radius: var(--radius-pill); font-size: 11px; min-width: 20px; height: 20px; display: grid; place-items: center; }
.k__nav.is-active { background: #EFEEFD; color: var(--violet-deep); font-weight: 600; }
.k__main { min-width: 0; padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; overflow: hidden; }
.k__top strong { font-family: var(--font-display); font-size: 22px; font-weight: 700; letter-spacing: -0.01em; display: block; }
.k__top span { color: var(--k-muted); font-size: 12px; }
.k__grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); grid-template-areas: "week today" "week res" "auto res"; gap: 12px; min-height: 0; flex: 1; }
.k__card { background: var(--k-card); border: 1px solid var(--k-line); border-radius: 14px; padding: 12px 14px; position: relative; min-height: 0; }
.k__card h5 { font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.k__card h5 em { font-style: normal; font-weight: 500; color: var(--k-muted); font-size: 11px; margin-left: 4px; }
.k__week { grid-area: week; display: flex; flex-direction: column; gap: 10px; }
.k__today { grid-area: today; } .k__res { grid-area: res; } .k__auto { grid-area: auto; }
.k__ch { display: flex; flex-direction: column; gap: 4px; }
.k__ch h5 { margin: 0; }
.k__stats { display: flex; gap: 12px; font-size: 11.5px; color: var(--k-muted); }
.k__stats b { color: var(--k-text); font-family: var(--font-display); font-size: 16px; margin-right: 2px; }
.k__days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.day { min-height: 74px; border-radius: 8px; background: var(--k-bg); padding: 5px; display: flex; flex-direction: column; gap: 4px; font-size: 10.5px; color: var(--k-muted); font-weight: 600; }
.day--target[data-hl="true"] { box-shadow: inset 0 0 0 2px var(--violet); }
.post { font-style: normal; font-size: 9.5px; text-align: center; font-weight: 600; padding: 4px 2px; border-radius: 6px; background: #E9E7FD; color: var(--violet-deep); line-height: 1.2; overflow: hidden; white-space: nowrap; }
.post--done { background: #E3F2EA; color: #24603F; }
.post--new { background: var(--violet); color: var(--ivory); white-space: normal; position: relative; z-index: 2; }
.k__ideas { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding-top: 8px; border-top: 1px dashed var(--k-line); }
.k__ideas-t { font-size: 11px; font-weight: 600; color: var(--k-muted); margin-right: 4px; }
.idea { font-style: normal; font-size: 11px; font-weight: 600; padding: 4px 8px; border-radius: 6px; border: 1px dashed #B9B4F5; color: var(--violet-deep); }
.idea--ghost { visibility: hidden; }
.k__next { font-family: var(--font-display); font-size: 17px; font-weight: 700; line-height: 1.2; margin-bottom: 10px; }
.k__nums { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.k__nums small { display: block; font-size: 10.5px; color: var(--k-muted); }
.k__nums b { font-family: var(--font-display); font-size: 24px; font-variant-numeric: tabular-nums; }
.k__spark { width: 100%; height: auto; margin-top: 8px; }
.k__spark path { fill: none; stroke: var(--violet); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.k__chain { list-style: none; padding: 0; display: grid; gap: 6px; }
.k__chain li { position: relative; padding: 5px 10px 5px 12px; border-radius: 9px; border: 1px solid var(--k-line); font-size: 12px; font-weight: 500; background: #FBFAF9; }
.k__chain li small { display: block; font-size: 10px; font-weight: 700; color: var(--violet-deep); letter-spacing: 0.02em; }
.k__chain li[data-on="true"] { border-color: var(--violet); background: #F1F0FE; }
.k__packet { position: absolute; right: 22px; top: 44px; width: 10px; height: 10px; display: grid; grid-template-columns: repeat(2, 4px); gap: 2px; opacity: 0; visibility: hidden; }
.k__packet i { background: var(--violet); } .k__packet i:nth-child(2) { background: var(--violet-soft); }
.k__auto-n { margin-top: 8px; font-size: 11.5px; color: var(--k-muted); }
.k__auto-n b { color: var(--k-text); }
.app--k .chip[data-tone="closed"] { color: #24603F; } .app--k .chip[data-tone="pending"] { color: #8A5A00; }
@media (max-width: 1239px) { .app--k { grid-template-columns: minmax(0, 1fr); } .k__side { display: none; } }
@media (max-width: 679px) {
  .app--k { height: 560px; }
  .k__main { padding: 14px; }
  .k__grid { grid-template-columns: 1fr; grid-template-areas: "card"; }
  .js .k__card { grid-area: card; align-self: start; }
  html:not(.js) .k__grid { grid-template-areas: none; }
  .js .app--k:not([data-view="week"]) .k__week, .js .app--k:not([data-view="today"]) .k__today, .js .app--k:not([data-view="res"]) .k__res, .js .app--k:not([data-view="auto"]) .k__auto { visibility: hidden; }
  .day { min-height: 92px; }
  .post { white-space: normal; }
}

/* ============ C · Video (oscuro, carril de iconos) ============ */
.app--v { height: 540px; --v-bg: #0C0C10; --v-panel: #141419; --v-line: rgba(248, 246, 244, 0.08); background: var(--v-bg); color: var(--ivory); border: 1px solid var(--rule-strong); display: grid; grid-template-columns: 78px minmax(0, 1fr); }
.v__rail { border-right: 1px solid var(--v-line); padding: 12px 6px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.v__logo { width: 38px; height: 38px; border-radius: 11px; background: linear-gradient(135deg, var(--violet-soft), var(--violet)); display: grid; place-items: center; margin-bottom: 8px; }
.v__it { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 100%; padding: 7px 2px; border-radius: 10px; font-size: 10px; color: var(--text-faint); font-weight: 500; text-align: center; }
.v__it.is-active { background: var(--ink-3); color: var(--ivory); }
.v__main { min-width: 0; padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; overflow: hidden; }
.v__head { display: flex; align-items: center; gap: 10px; }
.v__head div { display: flex; flex-direction: column; margin-right: auto; }
.v__head strong { font-family: var(--font-display); font-size: 22px; font-weight: 700; letter-spacing: -0.01em; }
.v__head div span { font-size: 12px; color: var(--text-muted); }
.v__btn { padding: 8px 14px; border-radius: 10px; background: var(--violet-soft); color: var(--ink); font-weight: 600; font-size: 12px; white-space: nowrap; }
.v__btn--ghost { background: transparent; border: 1px solid var(--v-line); color: var(--ivory); }
.v__drop { display: none; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; min-height: 180px; border: 1.5px dashed rgba(124, 120, 246, 0.45); border-radius: 16px; font-size: 13px; color: var(--text-muted); position: relative; }
.v__drop strong { color: var(--ivory); font-size: 15px; }
.v__drop[data-over="true"] { border-color: var(--violet-soft); background: rgba(87, 82, 242, 0.08); }
.v__drop-ic { width: 46px; height: 46px; border-radius: 12px; background: linear-gradient(135deg, var(--violet-soft), var(--violet)); display: grid; place-items: center; color: var(--ivory); margin-bottom: 4px; }
.v__file { position: absolute; top: 16px; right: 16px; display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 8px; background: var(--ink-4); color: var(--ivory); font-size: 12px; font-weight: 600; }
.v__file i { width: 10px; height: 14px; background: var(--violet-soft); }
.v__project { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 16px; padding: 14px; border-radius: 14px; background: var(--v-panel); border: 1px solid var(--v-line); }
.v__thumb { width: 92px; height: 148px; border-radius: 10px; background: var(--ink-3); display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 1fr; gap: 3px; padding: 6px; }
.v__thumb i { background: var(--violet); border-radius: 1px; }
.v__thumb i:nth-child(3n) { background: var(--violet-soft); } .v__thumb i:nth-child(5n) { background: var(--ivory-3); } .v__thumb i:nth-child(7n) { background: var(--ink-4); }
.v__pinfo { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.v__pname { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.v__pname span { font-size: 12px; color: var(--text-muted); }
.v__stages { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.v__stages li { display: flex; flex-direction: column; gap: 6px; font-size: 11.5px; font-weight: 600; color: var(--text-muted); }
.v__stages li[data-st="run"] { color: var(--ivory); } .v__stages li[data-st="done"] { color: var(--violet-soft); }
.v__bar { height: 6px; border-radius: 3px; background: var(--ink-4); overflow: hidden; }
.v__bar i { display: block; height: 100%; background: var(--violet-soft); transform-origin: left; }
.v__state { font-size: 12px; color: var(--text-muted); }
.v__prod h5 { font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.v__pieces { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.v__piece { display: grid; grid-template-columns: 40px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 10px; row-gap: 3px; align-items: center; padding: 10px; border-radius: 12px; background: var(--v-panel); border: 1px solid var(--v-line); font-size: 12px; }
.v__pthumb { grid-row: 1 / 3; width: 40px; height: 52px; border-radius: 6px; background: linear-gradient(var(--violet), var(--violet-wash)); }
.v__piece--empty .v__pthumb { background: var(--ink-4); }
.v__piece .chip { justify-self: start; }
.v__muted { color: var(--text-faint); }
@media (max-width: 679px) {
  .app--v { grid-template-columns: minmax(0, 1fr); height: 560px; }
  .v__rail { display: none; }
  .v__main { padding: 14px; }
  .v__btn--ghost { display: none; }
  .v__project { grid-template-columns: 64px minmax(0, 1fr); }
  .v__thumb { width: 64px; height: 104px; }
  .v__stages { grid-template-columns: 1fr 1fr; }
  .v__pieces { grid-template-columns: 1fr; }
  .v__piece--empty { display: none; }
}

/* ============ D · Organización (oscuro, foco centrado) ============ */
.app--m { background: radial-gradient(ellipse 80% 60% at 50% 30%, #16161C 0%, #0D0D11 70%); color: var(--ivory); border: 1px solid var(--rule-strong); display: flex; flex-direction: column; }
.m__nav { display: flex; align-items: center; gap: 18px; padding: 14px 18px; border-bottom: 1px solid rgba(248, 246, 244, 0.06); }
.m__brand { font-family: var(--font-display); font-weight: 800; letter-spacing: 0.08em; color: var(--violet-soft); font-size: 14px; }
.m__tabs { display: flex; gap: 14px; margin-right: auto; color: var(--text-faint); font-weight: 500; }
.m__tabs .is-active { color: var(--ivory); }
.m__cap { padding: 7px 12px; border-radius: 10px; border: 1px solid var(--rule-strong); font-weight: 600; font-size: 12.5px; white-space: nowrap; }
.m__pop { display: none; align-items: center; gap: 8px; position: absolute; right: 18px; top: 60px; z-index: 3; width: min(360px, calc(100% - 36px)); padding: 8px; border-radius: 12px; background: var(--ink-3); border: 1px solid var(--rule-strong); box-shadow: 0 20px 40px -20px #000; }
.m__input { flex: 1; padding: 6px 8px; font-size: 13px; color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m__input[data-typing="true"] { color: var(--ivory); }
.m__save { padding: 6px 10px; border-radius: 8px; background: var(--violet); font-weight: 600; font-size: 12px; }
.m__center { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 6px; padding: 16px; }
.m__clock { font-family: var(--font-display); font-weight: 500; font-size: clamp(56px, 7vw, 84px); line-height: 1; letter-spacing: 0.02em; font-variant-numeric: tabular-nums; }
.m__hello { color: var(--text-muted); font-size: 15px; }
.m__task { margin-top: 14px; font-family: var(--font-display); font-weight: 700; font-size: clamp(22px, 2.4vw, 32px); line-height: 1.1; max-width: 18ch; }
.m__task[data-empty="true"] { color: var(--text-faint); font-weight: 500; }
.m__meta { display: flex; align-items: center; gap: 10px; }
.m__cat { font-size: 11px; font-weight: 700; letter-spacing: 0.14em; color: var(--violet-soft); }
.m__btn { margin-top: 14px; padding: 12px 26px; border-radius: var(--radius-pill); background: var(--violet); color: var(--ivory); font-weight: 600; font-size: 14px; font-variant-numeric: tabular-nums; }
.m__btn[data-state="run"] { background: var(--ink-3); box-shadow: inset 0 0 0 1px var(--violet-soft); }
.m__btn[data-state="done"] { background: transparent; box-shadow: inset 0 0 0 1px var(--state-closed); color: var(--state-closed); }
.m__week { font-size: 12px; color: var(--text-faint); }
.m__week b { color: var(--ivory); }
.m__horizon { display: grid; grid-template-columns: repeat(24, 1fr); gap: 3px; padding: 0 18px 18px; }
.m__horizon i { height: 12px; background: rgba(248, 246, 244, 0.06); }
.m__horizon i[data-on="true"] { background: var(--violet); }
.m__horizon i:nth-child(n+25)[data-on="true"] { background: var(--violet-soft); }
@media (max-width: 679px) {
  .app--m { height: 540px; }
  .m__tabs span:not(.is-active) { display: none; }
  .m__nav { gap: 12px; padding: 12px; }
  .m__horizon { padding: 0 12px 12px; gap: 2px; }
}

/* Sin JS en móvil: sin vistas por paso; el panel crece y se lee completo. */
@media (max-width: 679px) {
  html:not(.js) .app { height: auto; }
  html:not(.js) .app__chat { min-height: 440px; }
  html:not(.js) .app--a .app__list { border-right: 0; border-bottom: 1px solid var(--app-line); }
}
