/* TRACE · capa propia sobre ie.css (OnKaizen Enterprise UI). Solo tokens de ie.css; nada de hex sueltos. */

html, body { height: 100%; }
body { overflow-x: hidden; }
a { color: var(--accent-strong); }
a.ie-btn { text-decoration: none; }
[hidden] { display: none !important; }

/* ---------- Marco ---------- */
.t-app { display: flex; min-height: 100vh; }
.t-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.t-content { flex: 1; min-width: 0; padding: 14px max(20px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left)); display: flex; flex-direction: column; gap: 12px; }
.ie-side { background: var(--surface); border-right: 1px solid var(--line); padding: 14px 12px; }
.ie-brand img { width: 150px; height: auto; }
.ie-brand .ie-system { padding-left: 2px; }
.ie-session { border-block: 1px solid var(--line); padding: 10px 0; }
.ie-icon-btn { position: relative; }
.ie-icon-btn svg { width: 16px; height: 16px; }
.ie-icon-btn .badge { position: absolute; top: 3px; right: 3px; width: 7px; height: 7px; border-radius: 50%; background: var(--bad); }
.ie-side-foot .mono { font-size: 11px; }
.t-topbar { display: none; }
.t-scrim { display: none; }

@media (max-width: 1023px) {
  .t-topbar { display: flex; align-items: center; gap: 10px; height: calc(48px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) max(12px, env(safe-area-inset-right)) 0 max(12px, env(safe-area-inset-left)); background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
  .t-topbar img { height: 22px; }
  .t-topbar .ie-icon-btn { margin-left: auto; }
  html.ie-nav-collapsed .ie-side { visibility: hidden; overflow: hidden; }
  html:not(.ie-nav-collapsed) .t-scrim { display: block; position: fixed; inset: 0; z-index: 29; background: rgba(15, 17, 19, .4); }
  .t-content { padding: 12px max(16px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); }
}

/* ---------- Encabezado de pantalla ---------- */
.t-head { display: flex; flex-direction: column; gap: 2px; }
.t-head .ie-head > div:last-child { display: flex; gap: 8px; flex-wrap: wrap; }
.t-head .ie-meta { margin-top: 2px; }
.ie-tabs { margin-top: 6px; overflow-x: auto; }
.ie-tabs a { white-space: nowrap; }

/* ---------- Paneles y tablas ---------- */
.ie-panel { overflow: hidden; }
.ie-toolbar .grow { flex: 1; }
.ie-toolbar .ie-input, .ie-toolbar select.ie-input { height: 26px; font-size: var(--fs-aux); padding: 0 6px; }
.ie-toolbar .t-search { width: 220px; max-width: 100%; }
.ie-toolbar label.t-inline { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-aux); color: var(--text-2); }
.ie-table td.wrap, .ie-table th.wrap { white-space: normal; overflow-wrap: anywhere; min-width: 160px; max-width: 520px; }
.ie-table td.wrap { padding-block: 4px; line-height: 1.35; }
.ie-table tbody tr { cursor: default; }
.ie-table tbody tr.click { cursor: pointer; }
.ie-table td.n.bad, .t-bad { color: var(--bad-text); }
.ie-table td.muted, .t-muted { color: var(--text-3); }
.ie-table td a { text-decoration: none; }
.ie-table td a:hover { text-decoration: underline; }
.ie-table td.mono, .ie-table td.id { font-family: var(--font-mono); font-size: 12.5px; }
.ie-table .chk { width: 28px; text-align: center; }
.ie-table caption { caption-side: top; text-align: left; padding: 8px 12px; font-size: var(--fs-table); font-weight: 600; background: var(--surface-sunken); border: 1px solid var(--line); border-bottom: 0; }
.t-tablebox { max-height: calc(100vh - 260px); overflow: auto; }
.t-tablebox.free { max-height: none; }
.ie-pager .ie-tools .ie-tool { height: 24px; }

.t-split { display: flex; min-height: 0; align-items: stretch; }
.t-split > .t-list { flex: 1; min-width: 0; }
.t-split > .ie-drawer { flex: none; width: 420px; min-width: 0; box-shadow: none; display: flex; flex-direction: column; max-height: calc(100vh - 200px); position: sticky; top: 0; }
.t-split.open .sec { display: none; }
.ie-drawer .t-drawer-head { padding: 10px 14px; border-bottom: 1px solid var(--line); display: flex; align-items: flex-start; gap: 8px; }
.ie-drawer .t-drawer-head h2 { margin: 0; font-family: var(--font-display); font-size: var(--fs-panel); font-weight: 600; }
.ie-drawer .t-drawer-head .ie-icon-btn { margin-left: auto; flex: none; }
.ie-drawer .t-drawer-body { padding: 12px 14px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.ie-drawer .t-drawer-foot { padding: 10px 14px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
@media (max-width: 1100px) {
  .t-split.open > .t-list { display: none; }
  .t-split > .ie-drawer { width: 100%; max-height: none; position: static; border-left: 0; }
}

.t-section-title { font-size: var(--fs-aux); font-weight: 600; color: var(--text-2); margin: 0; }
.t-text { font-size: var(--fs-table); line-height: 1.45; margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.t-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
@media (max-width: 1100px) { .t-two { grid-template-columns: 1fr; } }
.t-history { list-style: none; margin: 0; padding: 0; font-size: var(--fs-aux); }
.t-history li { display: grid; grid-template-columns: 128px 1fr; gap: 8px; padding: 4px 0; border-bottom: 1px solid var(--line); }
.t-history li time { font-family: var(--font-mono); color: var(--text-2); }

/* ---------- Franja y gráficas ---------- */
.ie-strip { background: var(--surface); }
.ie-strip > a { min-width: 150px; }
.ie-strip .spark { display: block; margin-top: 4px; width: 96px; height: 18px; }
.ie-strip .spark polyline { fill: none; stroke: var(--neutral); stroke-width: 1.4; }
.ie-strip .spark circle { fill: var(--text-2); }
.ie-strip .spark.bad polyline { stroke: var(--bad); }
.ie-strip .value.bad { color: var(--bad-text); }
.t-chart { width: 100%; height: auto; display: block; }
.t-chart .grid line { stroke: var(--line); }
.t-chart .axis text, .t-chart text { fill: var(--text-2); font-size: 11px; font-family: var(--font); }
.t-chart .s-main { fill: none; stroke: var(--accent); stroke-width: 2; }
.t-chart .s-alt { fill: none; stroke: var(--neutral); stroke-width: 1.4; }
.t-chart .s-alt2 { fill: none; stroke: var(--text-2); stroke-width: 1.2; stroke-dasharray: 4 3; }
.t-chart .s-goal { stroke: var(--neutral); stroke-dasharray: 3 3; }
.t-chart .bar { fill: var(--neutral); }
.t-chart .bar.main { fill: var(--accent); }
.t-chart .dot { fill: var(--accent); }
.t-chart .lbl { font-family: var(--font-mono); font-size: 10.5px; }
.t-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: var(--fs-aux); color: var(--text-2); padding: 0 12px 8px; }
.t-legend i { display: inline-block; width: 14px; height: 2px; vertical-align: middle; margin-right: 6px; background: var(--neutral); }
.t-legend i.main { background: var(--accent); height: 2px; }
.t-legend i.dash { background: none; border-top: 1.5px dashed var(--text-2); }
.t-chartbox { padding: 8px 12px 4px; }

.t-bar { display: inline-block; width: 46px; height: 5px; background: var(--surface-hover); vertical-align: middle; margin-left: 6px; position: relative; }
.t-bar > i { position: absolute; inset: 0 auto 0 0; background: var(--neutral); }
.t-bar.bad > i { background: var(--bad); }

/* ---------- Pasos del proceso ---------- */
.t-steps { display: flex; gap: 0; border: 1px solid var(--line); border-radius: var(--r-panel); overflow: hidden; }
.t-steps li { list-style: none; flex: 1; min-width: 0; padding: 6px 8px; font-size: var(--fs-aux); line-height: 1.3; color: var(--text-2); border-right: 1px solid var(--line); background: var(--surface); }
.t-steps li:last-child { border-right: 0; }
.t-steps li.done { color: var(--text); }
.t-steps li.current { color: var(--text); font-weight: 600; box-shadow: inset 0 -2px 0 var(--accent); background: var(--surface-sunken); }
.t-steps { padding: 0; margin: 0; }

/* ---------- Captura (piso, celular) ---------- */
.t-capture { max-width: 860px; width: 100%; }
.t-q { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.t-q:last-child { border-bottom: 0; }
.t-q .q-code { font-family: var(--font-mono); font-size: 12px; color: var(--text-2); }
.t-q .q-text { font-size: var(--fs-body); line-height: 1.4; margin-top: 2px; }
.t-q .q-meta { font-size: var(--fs-aux); color: var(--text-3); margin-top: 2px; }
.t-q .q-detail { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 10px; padding: 10px 12px; background: var(--surface-sunken); border: 1px solid var(--line); border-radius: var(--r-control); }
.t-q.missing { box-shadow: inset 2px 0 0 var(--bad); }
.t-q .q-why { margin-top: 6px; font-size: var(--fs-aux); color: var(--text-2); }
.t-q .q-why summary { cursor: pointer; color: var(--accent-strong); font-weight: 500; width: max-content; }
.t-q .q-why p { margin: 4px 0 0; line-height: 1.4; max-width: 70ch; }
.t-q .q-ref { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; font-size: var(--fs-aux); color: var(--ok-text); text-decoration: none; }
.t-q .q-ref img { width: 56px; height: 42px; object-fit: cover; border-radius: 4px; border: 2px solid var(--ok); }
.t-reaction { border: 1px solid color-mix(in srgb, var(--warn) 45%, transparent); background: var(--warn-bg); border-radius: var(--r-control); padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; }
.t-reaction-h { display: flex; align-items: center; gap: 6px; font-weight: 600; color: var(--warn-text); font-size: var(--fs-aux); text-transform: uppercase; letter-spacing: .03em; }
.t-reaction-h svg { width: 14px; height: 14px; }
.t-reaction p { margin: 0; line-height: 1.45; }
.t-sample { display: flex; gap: 8px; align-items: flex-start; padding: 8px 14px; font-size: var(--fs-aux); color: var(--text-2); border-bottom: 1px solid var(--line); background: var(--surface-sunken); }
.t-sample svg { width: 14px; height: 14px; flex: none; margin-top: 1px; color: var(--accent-strong); }
.t-timer { padding: 1px 8px; border-radius: 10px; background: var(--surface-sunken); }
.t-timer:empty { display: none; }
.t-timer.over { background: var(--warn-bg); color: var(--warn-text) !important; }
.t-warn-text { color: var(--warn-text); }
.t-lint { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.t-lint:empty { display: none; }
.t-lint div { font-size: var(--fs-aux); color: var(--warn-text); background: var(--warn-bg); border-radius: 4px; padding: 4px 8px; }
.t-lint.ok div { color: var(--ok-text); background: var(--ok-bg); }
.t-refpick { display: flex; align-items: center; gap: 10px; }
.t-refpick img { width: 72px; height: 54px; object-fit: cover; border-radius: 4px; border: 2px solid var(--ok); }
.t-cov td.c { text-align: center; font-family: var(--font-mono); font-size: 12px; }
.t-cov td.c.gap { background: var(--bad-bg); color: var(--bad-text); }
.t-cov td.c.plan { background: var(--warn-bg); color: var(--warn-text); }
.t-cov td.c.done { background: var(--ok-bg); color: var(--ok-text); }
.t-month td.c { text-align: center; font-family: var(--font-mono); font-size: 12px; white-space: nowrap; }
.t-month td.c .bar { display: block; height: 4px; border-radius: 2px; background: var(--line); margin-top: 3px; overflow: hidden; }
.t-month td.c .bar i { display: block; height: 100%; background: var(--accent-strong); }
.t-month td.c.low { color: var(--bad-text); }
.t-month td.c.low .bar i { background: var(--bad); }
.t-voice { list-style: none; margin: 0; padding: 0; }
.t-voice li { padding: 8px 14px; border-bottom: 1px solid var(--line); display: grid; gap: 2px; }
.t-voice li:last-child { border-bottom: 0; }
.t-voice .k { font-size: var(--fs-aux); color: var(--text-3); }
.t-voice .idea::before { content: "Idea · "; color: var(--accent-strong); font-weight: 600; }
.t-voice .concern::before { content: "Preocupación · "; color: var(--warn-text); font-weight: 600; }
.t-seg { display: inline-flex; align-self: start; }
.t-seg button { min-width: 56px; height: 40px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); font: inherit; font-weight: 500; cursor: pointer; margin-right: -1px; }
.t-seg button:first-child { border-radius: var(--r-control) 0 0 var(--r-control); }
.t-seg button:last-child { border-radius: 0 var(--r-control) var(--r-control) 0; margin-right: 0; }
.t-seg button[aria-pressed="true"] { background: var(--text); color: var(--surface); border-color: var(--text); position: relative; z-index: 1; }
.t-seg button.nok[aria-pressed="true"] { background: var(--bad-text); border-color: var(--bad-text); color: var(--surface); }
.t-seg button:focus-visible { outline: none; box-shadow: var(--focus); position: relative; z-index: 2; }
.t-check { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-table); }
.t-check input { width: 18px; height: 18px; accent-color: var(--accent-strong); }
textarea.ie-input { height: auto; min-height: 64px; padding: 6px 8px; resize: vertical; line-height: 1.4; }
select.ie-input { padding-right: 4px; }
.t-photo { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.t-photo img { width: 72px; height: 72px; object-fit: cover; border: 1px solid var(--line); border-radius: var(--r-control); }
.t-capbar { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; gap: 10px; padding: 10px 14px; padding-bottom: max(10px, env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); flex-wrap: wrap; }
.t-capbar .grow { flex: 1; }
.t-capbar .mono { font-size: 12.5px; color: var(--text-2); }
.t-cat { padding: 6px 14px; font-size: var(--fs-aux); font-weight: 600; color: var(--text-2); background: var(--surface-sunken); border-bottom: 1px solid var(--line); }
@media (max-width: 640px) {
  .t-q { grid-template-columns: 1fr; }
  .t-seg { width: 100%; }
  .t-seg button { flex: 1; height: 44px; }
}

/* ---------- Diálogo ---------- */
.t-dialog-wrap { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: rgba(15, 17, 19, .45); padding: 16px; }
.t-dialog { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); box-shadow: var(--shadow-overlay); width: min(560px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; }
.t-dialog.wide { width: min(760px, 100%); }
.t-dialog header { padding: 12px 16px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 8px; }
.t-dialog header h2 { margin: 0; font-family: var(--font-display); font-size: var(--fs-panel); font-weight: 600; }
.t-dialog header .ie-icon-btn { margin-left: auto; }
.t-dialog .t-dialog-body { padding: 14px 16px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.t-dialog footer { padding: 10px 16px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; }
.t-dialog .ie-notice { margin: 0; }
.t-multi { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 4px 12px; max-height: 180px; overflow-y: auto; padding: 6px 8px; border: 1px solid var(--line-strong); border-radius: var(--r-control); }
.t-multi label { font-size: var(--fs-table); display: flex; gap: 6px; align-items: center; color: var(--text); font-weight: 400; }

/* ---------- Avisos (popover) ---------- */
.t-pop { position: fixed; z-index: 45; width: 360px; max-height: 70vh; overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); box-shadow: var(--shadow-menu); }
.t-pop .ie-band { display: flex; justify-content: space-between; align-items: center; }
.t-pop a.t-notif { display: block; padding: 8px 12px; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none; font-size: var(--fs-table); }
.t-pop a.t-notif:hover { background: var(--surface-hover); }
.t-pop a.t-notif.unread { box-shadow: inset 2px 0 0 var(--accent); }
.t-pop a.t-notif small { display: block; color: var(--text-3); font-family: var(--font-mono); font-size: 11px; }

/* ---------- Toasts ---------- */
.ie-toast.bad { background: var(--bad-text); }

/* ---------- Entrada ---------- */
.t-login { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: var(--bg); }
.t-login .ie-panel { width: min(400px, 100%); }
.t-login .t-login-head { padding: 22px 20px 14px; border-bottom: 1px solid var(--line); }
.t-login .t-login-head img { width: 168px; display: block; }
.t-login .t-login-head p { margin: 8px 0 0; font-size: var(--fs-aux); color: var(--text-2); }
.t-login form { padding: 16px 20px 20px; display: flex; flex-direction: column; gap: 12px; }
.t-login .ie-btn.primary { height: 34px; justify-content: center; }
.t-login .t-login-foot { display: flex; justify-content: space-between; font-size: var(--fs-aux); padding: 0 20px 16px; color: var(--text-3); }
.t-logo-dark { display: none !important; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .t-logo-light { display: none !important; } :root:not([data-theme="light"]) .t-logo-dark { display: block !important; } }
:root[data-theme="dark"] .t-logo-light { display: none !important; }
:root[data-theme="dark"] .t-logo-dark { display: block !important; }

/* ---------- Estados ---------- */
.t-empty { padding: 28px 16px; text-align: center; font-size: var(--fs-table); color: var(--text-2); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.t-skel td { position: relative; }
.t-skel td::after { content: ""; position: absolute; inset: 9px 6px; background: var(--surface-hover); border-radius: 2px; }
.t-blocked { max-width: 560px; }

/* ---------- Matriz ---------- */
.t-matrix td.n { min-width: 64px; }
.t-matrix td.zero { color: var(--text-3); }
.t-matrix td.h1 { background: color-mix(in srgb, var(--accent) 10%, var(--surface)) !important; }
.t-matrix td.h2 { background: color-mix(in srgb, var(--accent) 22%, var(--surface)) !important; }
.t-matrix td.h3 { background: color-mix(in srgb, var(--accent) 36%, var(--surface)) !important; }
.t-matrix th.v { writing-mode: vertical-rl; transform: rotate(180deg); height: 120px; white-space: nowrap; vertical-align: bottom; padding: 6px 2px; text-align: left; }

/* ---------- Varios ---------- */
@media (max-width: 640px) { .m-hide { display: none; } .ie-table td.m-wrap { white-space: normal; } .ie-table td .ie-btn { padding: 0 8px; } }
.t-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.t-kpi-line { font-size: var(--fs-table); color: var(--text-2); padding: 6px 12px; border-bottom: 1px solid var(--line); background: var(--surface); }
.t-kpi-line b { color: var(--text); font-weight: 500; font-family: var(--font-mono); }
.t-tip { border-bottom: 1px dotted var(--text-3); cursor: help; }
kbd { font-family: var(--font-mono); font-size: 11px; border: 1px solid var(--line-strong); border-radius: 3px; padding: 0 4px; }
@media print { .ie-side, .t-topbar, .ie-toolbar, .t-capbar { display: none !important; } }

/* ---------- Marca OnKaizen y ayuda ---------- */
.ie-session { grid-template-columns: repeat(4, 32px) minmax(0, 1fr); }
.ie-side-foot { display: flex; flex-direction: column; gap: 2px; }
.ie-side-foot b { font-weight: 600; color: var(--text-2); }
.ie-side-foot a { color: var(--text-2); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ie-side-foot a:hover { color: var(--accent-strong); text-decoration: underline; }
.t-login-col { width: min(400px, 100%); display: flex; flex-direction: column; gap: 12px; }
.t-login-col .ie-panel { width: 100%; }
.t-powered { margin: 0; text-align: center; font-size: var(--fs-aux); color: var(--text-3); }
.t-powered b { color: var(--text-2); font-weight: 600; }
.t-powered a { color: var(--text-2); }
.t-help { width: 290px; }
.t-menu-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--text); font: inherit; font-size: var(--fs-table); text-align: left; text-decoration: none; cursor: pointer; }
.t-menu-item svg { width: 15px; height: 15px; color: var(--text-2); flex: none; }
.t-menu-item:hover { background: var(--surface-hover); }
.t-menu-foot { padding: 8px 12px; font-size: 11px; color: var(--text-3); }

/* ---------- Conversación de tickets ---------- */
.t-thread { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.t-thread li { padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-panel); background: var(--surface); }
.t-thread li.onkaizen { background: var(--surface-sunken); box-shadow: inset 2px 0 0 var(--accent); }
.t-msg-head { display: flex; justify-content: space-between; gap: 8px; font-size: var(--fs-aux); color: var(--text-2); margin-bottom: 4px; }
.t-msg-head b { color: var(--text); font-weight: 600; }
.t-msg-head time { font-family: var(--font-mono); }
.t-reply { flex-direction: column; align-items: stretch; }
.t-reply .ie-btn { align-self: flex-end; }
.t-health { white-space: normal; }

/* Menú abierto en celular: el árbol vive dentro del marco, no flota encima de él. */
@media (max-width: 1023px) {
  .ie-side { width: 272px; overflow-y: auto; }
  .ie-side .ie-nav { position: static; inset: auto; width: auto; z-index: auto; box-shadow: none; flex: 0 0 auto; overflow: visible; }
}

/* ---------- Accesos ---------- */
.t-radios { display: flex; flex-direction: column; gap: 6px; }
.t-radio { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: var(--r-control); font-size: var(--fs-table); cursor: pointer; }
.t-radio input { margin-top: 3px; accent-color: var(--accent-strong); }
.t-radio:has(input:checked) { border-color: var(--accent); box-shadow: inset 2px 0 0 var(--accent); }
.t-radio b { font-weight: 600; }
.t-perm-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; max-height: 340px; overflow-y: auto; }
.t-perm-pick fieldset { border: 1px solid var(--line); border-radius: var(--r-control); padding: 6px 10px 8px; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.t-perm-pick legend { font-size: var(--fs-aux); font-weight: 600; color: var(--text-2); padding: 0 4px; }
.t-perm-pick .t-check { font-size: var(--fs-aux); align-items: flex-start; }
.t-perm-pick .t-check input { width: 15px; height: 15px; margin-top: 1px; }
.t-perm-sum { font-size: var(--fs-aux); }
.t-explain { margin: 0; padding-left: 18px; font-size: var(--fs-table); line-height: 1.5; }
.t-perm-matrix td.n, .t-perm-matrix th.n { text-align: center; min-width: 88px; }
.t-secret { letter-spacing: 1px; font-size: 14px; }
.t-refimg { display: block; max-width: 100%; max-height: 180px; border-radius: var(--r-control); border: 2px solid var(--ok); margin-bottom: 10px; }
/* Franja con más indicadores: se reparten el ancho; en pantallas angostas se desplaza. */
.ie-strip > a { flex: 1 1 0; min-width: 118px; padding-left: 14px; padding-right: 14px; }
.ie-btn.primary.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.ie-btn.primary.danger:hover { background: color-mix(in srgb, var(--bad) 88%, #000); }
.t-diag td.wrap { max-width: 520px; }
.t-muted-2 { color: var(--text-2); font-size: var(--fs-aux); line-height: 1.4; }
.ie-table td.t-best { color: var(--ok-text); font-weight: 600; }
.t-offline { margin: 8px 16px 0; }
.t-assist { border: 1px solid var(--line); background: var(--surface-sunken); border-radius: var(--r-control); padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; font-size: var(--fs-aux); }
.t-assist-s { font-size: var(--fs-body); color: var(--text); line-height: 1.45; }
.t-gen td { vertical-align: top; }
.t-lang span { font-family: "IBM Plex Mono", monospace; font-size: 11px; font-weight: 500; letter-spacing: .5px; }
.t-orig { display: inline-block; margin-left: 6px; padding: 0 6px; border: 1px solid var(--line); border-radius: 3px; font-size: 11px; color: var(--text-2); vertical-align: 1px; white-space: nowrap; }
.t-tr-band { margin-top: 6px; }

/* ---------- movimiento sutil (js/motion.js) ---------- */
@keyframes t-enter { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.t-content.t-enter { animation: t-enter .16s cubic-bezier(.2, .7, .2, 1); }
.t-rv { transition: opacity .32s cubic-bezier(.2, .7, .2, 1), transform .32s cubic-bezier(.2, .7, .2, 1); }
.t-rv.t-rv-pre { opacity: 0; transform: translateY(8px); }
.t-login { position: relative; overflow: hidden; --wave: #4a9b3a; }
.t-login > .t-waves { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.t-login > .t-login-col { position: relative; z-index: 1; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .t-login { --wave: #6abf56; } }
:root[data-theme="dark"] .t-login { --wave: #6abf56; }
@media (prefers-reduced-motion: reduce) {
  .t-content.t-enter { animation: none; }
  .t-rv.t-rv-pre { opacity: 1; transform: none; }
}
@media print { .t-rv.t-rv-pre { opacity: 1; transform: none; } .t-waves { display: none; } }

/* Pendientes por enviar (indicador en el encabezado) */
.t-pending { grid-column: 1 / -1; font-size: var(--fs-table); font-weight: 600; text-decoration: none; }
.t-pending[hidden] { display: none; }
.t-topbar .t-pending { margin-left: auto; height: 30px; padding: 0 10px; }
@media (min-width: 1024px) { .t-topbar .t-pending { display: none; } }
