/* Panel de administración. Hereda colores, botones, campos y modales de style.css. */
.adm-body {
  --s-transcription: #2a78d6; --s-ai: #eb6834; --s-voice: #1baf7a;   /* validada con validate_palette (todas las parejas) */
  --st-error: #d03b3b; --st-warning: #fab219; --st-good: #0ca30c;
  --grid: #E8EBF0; --side-w: 236px; --ease: cubic-bezier(.2, .7, .2, 1);
  background: var(--bg); color: var(--text); overflow: auto; height: auto; min-height: 100vh;
}
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) .adm-body { --s-transcription: #3987e5; --s-ai: #d95926; --s-voice: #199e70; --grid: #27323C; }
}
:root[data-theme="dark"] .adm-body { --s-transcription: #3987e5; --s-ai: #d95926; --s-voice: #199e70; --grid: #27323C; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.error { color: var(--danger); }
#loginMsg:empty, #ufMsg:empty, #ufHint:empty, .adm-note:empty { display: none; }
.adm-note { margin: 0; }
.adm-body svg.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.adm-body i[data-icon] { display: inline-flex; }

/* Login */
.adm-login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.adm-login-card { width: min(380px, 100%); display: grid; gap: 14px; padding: 28px; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow); }
.adm-login-card h1 { margin: 0; font-size: 20px; letter-spacing: -.01em; }
.adm-login-card p.muted { margin: 2px 0 0; }

/* Estructura */
.adm { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; transition: grid-template-columns .2s var(--ease); }
.adm.is-collapsed { --side-w: 68px; }
.adm-side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 10px; padding: 14px 12px; background: var(--surface); border-right: 1px solid var(--border); z-index: 20; }
.adm-side-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-height: 36px; }
.adm-brand { display: flex; align-items: center; gap: 9px; padding: 0 6px; font-size: 17px; font-weight: 800; letter-spacing: -.02em; color: var(--text); white-space: nowrap; }
.adm-brand:hover { text-decoration: none; }
.adm-brand small { font-size: 11px; font-weight: 700; color: var(--brand-600); background: var(--brand-50); padding: 2px 6px; border-radius: 6px; letter-spacing: 0; }
.adm-iconbtn { width: 36px; height: 36px; flex: none; display: inline-grid; place-items: center; background: transparent; color: var(--muted); border: 1px solid transparent; border-radius: var(--radius-sm); cursor: pointer; transition: background .12s, color .12s; }
.adm-iconbtn:hover { background: var(--surface-2); color: var(--text); }
.adm-iconbtn:focus-visible, .adm-nav a:focus-visible, .adm-tab:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.adm-nav { display: grid; gap: 2px; align-content: start; flex: 1; overflow-y: auto; }
.adm-nav-h { margin: 14px 10px 4px; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.adm-nav a { position: relative; display: flex; align-items: center; gap: 10px; min-height: 38px; padding: 0 10px; border-radius: var(--radius-sm); color: var(--text); font-size: 14px; font-weight: 500; white-space: nowrap; transition: background .12s; }
.adm-nav a i { color: var(--muted); }
.adm-nav a:hover { background: var(--surface-2); text-decoration: none; }
.adm-nav a.active { background: var(--brand-50); color: var(--brand-600); font-weight: 700; }
.adm-nav a.active i { color: var(--brand-600); }
.adm-badge { margin-left: auto; min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--brand); color: #fff; font-size: 11px; font-weight: 700; line-height: 19px; text-align: center; }
.adm-me { display: flex; align-items: center; gap: 9px; padding: 10px 4px 0; border-top: 1px solid var(--border); min-width: 0; }
.adm-avatar { width: 34px; height: 34px; flex: none; display: inline-grid; place-items: center; border-radius: 50%; background: var(--brand-50); color: var(--brand-600); font-size: 12px; font-weight: 700; }
.adm-me-text { flex: 1; min-width: 0; display: grid; font-size: 13px; }
.adm-me-text > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm.is-collapsed .adm-hide { display: none; }
.adm.is-collapsed .adm-side-top { flex-direction: column; }
.adm.is-collapsed .adm-nav a { justify-content: center; padding: 0; }
.adm.is-collapsed .adm-badge { position: absolute; top: 2px; right: 4px; min-width: 16px; padding: 0 4px; font-size: 10px; line-height: 15px; }
.adm.is-collapsed .adm-me { flex-direction: column; }

.adm-main { min-width: 0; display: flex; flex-direction: column; }
.adm-top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 28px; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.adm-top-title { min-width: 0; flex: 1; }
.adm-top-title h1 { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: -.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-top-title p { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-top-title p:empty { display: none; }
.adm-top-actions { display: flex; align-items: center; gap: 4px; }
.adm-month { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 8px 0 10px; margin-right: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--muted); }
.adm-month select { border: 0; background: transparent; color: var(--text); font-size: 13px; font-weight: 600; outline: 0; cursor: pointer; }
.adm-month select option { background: var(--surface); }
.adm-menu { display: none; }
.adm-page { flex: 1; padding: 22px 28px 44px; display: flex; flex-direction: column; gap: 16px; min-width: 0; outline: 0; transition: opacity .12s; }
.adm-page.is-loading { opacity: .55; pointer-events: none; }
.adm-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.adm-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.adm-filters .search { flex: 1 1 220px; }
.adm-filters .select { height: 38px; width: auto; max-width: 100%; }
.adm-back { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; color: var(--muted); align-self: flex-start; }

/* Tarjetas */
.adm-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); min-width: 0; }
.adm-card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px 8px; }
.adm-card-h h2 { margin: 0; font-size: 14px; font-weight: 700; }
.adm-card-h a { font-size: 12px; font-weight: 600; }
.adm-card-b { padding: 4px 18px 16px; }
.adm-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.adm-grid3 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; }
.adm-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.adm-tile { display: block; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); color: var(--text); transition: border-color .12s, transform .12s; }
a.adm-tile:hover { border-color: var(--border-strong); transform: translateY(-1px); text-decoration: none; }
.adm-tile-top { display: flex; align-items: center; justify-content: space-between; color: var(--muted); }
.adm-tile-label { font-size: 12px; font-weight: 600; }
.adm-tile-value { margin-top: 6px; font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.adm-tile-sub { margin-top: 2px; font-size: 12px; color: var(--muted); }

/* Total sumado */
.adm-total { display: grid; grid-template-columns: minmax(220px, auto) minmax(0, 1fr); gap: 12px 32px; padding: 18px; align-items: center; }
.adm-hero-label { font-size: 12px; font-weight: 600; color: var(--muted); }
.adm-hero { font-size: 48px; line-height: 1.1; font-weight: 800; letter-spacing: -.03em; white-space: nowrap; }
.adm-hero-sub { margin-top: 4px; font-size: 12px; color: var(--muted); display: grid; gap: 1px; }
.adm-sum { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 10px; align-items: stretch; }
.adm-sum-item { display: grid; gap: 2px; padding: 10px 12px; background: var(--surface-2); border-radius: var(--radius-sm); position: relative; min-width: 0; }
.adm-sum-item + .adm-sum-item::before { content: "+"; position: absolute; left: -11px; top: 50%; transform: translate(-50%, -50%); width: 12px; text-align: center; color: var(--muted); font-weight: 700; }
.adm-sum-name { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.adm-sum-val { font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.adm-sum-sub { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-sum-eq { display: flex; align-items: center; padding-left: 6px; font-size: 13px; font-weight: 700; color: var(--muted); }
.key { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.k-transcription { background: var(--s-transcription); } .k-ai { background: var(--s-ai); } .k-voice { background: var(--s-voice); }
.k-error { background: var(--st-error); } .k-warning { background: var(--st-warning); }
.adm-total .segbar { grid-column: 1 / -1; }
.segbar { display: flex; gap: 2px; height: 28px; }
.segbar > div { display: flex; align-items: center; min-width: 2px; padding: 0 8px; border-radius: 4px; color: #fff; font-size: 12px; font-weight: 700; white-space: nowrap; overflow: hidden; }
.segbar.thin { height: 4px; width: 110px; margin-top: 5px; }
.segbar.thin > div { padding: 0; border-radius: 2px; }

/* Gráficos */
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart { position: relative; display: grid; grid-template-columns: 52px minmax(0, 1fr); margin-top: 10px; }
.chart-y { position: relative; height: 190px; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.chart-y span { position: absolute; right: 8px; transform: translateY(50%); white-space: nowrap; }
.chart-plot { position: relative; height: 190px; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); align-items: end; border-bottom: 1px solid var(--border-strong); }
.chart-grid { position: absolute; left: 0; right: 0; height: 1px; background: var(--grid); }
.col { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; outline: 0; }
.col:hover, .col:focus-visible { background: color-mix(in srgb, var(--surface-2) 70%, transparent); }
.stack { position: relative; width: min(24px, 72%); display: flex; flex-direction: column-reverse; gap: 2px; }
.stack > div { flex: 1 1 0; min-height: 1px; }
.stack > div:last-child { border-radius: 4px 4px 0 0; }
.col-val { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); margin-bottom: 3px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.col:last-child .col-val { left: auto; right: 0; transform: none; }
.chart-x { grid-column: 2; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); margin-top: 6px; font-size: 11px; color: var(--muted); text-align: center; }
.chart-x span { white-space: nowrap; overflow: visible; }
.adm-details { margin-top: 10px; font-size: 13px; }
.adm-details summary { cursor: pointer; color: var(--muted); font-size: 12px; font-weight: 600; }
.adm-tip { position: fixed; z-index: 90; min-width: 150px; max-width: 280px; padding: 8px 10px; border-radius: 10px; background: var(--ink); color: #fff; font-size: 12px; box-shadow: var(--shadow-lg); pointer-events: none; }
:root[data-theme="dark"] .adm-tip { background: #2A3540; }
.adm-tip b { display: block; margin-bottom: 4px; font-weight: 600; opacity: .8; }
.adm-tip div { display: flex; align-items: center; gap: 8px; }
.adm-tip i { width: 12px; height: 2px; flex: none; }
.adm-tip strong { font-variant-numeric: tabular-nums; }
.adm-tip span { opacity: .8; }

.rank { display: grid; gap: 10px; }
.rank-row { display: grid; gap: 4px; font-size: 13px; }
.rank-top { display: flex; justify-content: space-between; gap: 10px; }
.rank-top span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-top strong { font-variant-numeric: tabular-nums; white-space: nowrap; }
.rank-track { height: 8px; border-radius: 4px; background: var(--surface-2); }
.rank-track div { height: 100%; border-radius: 0 4px 4px 0; min-width: 2px; }

/* Tablas */
.adm-wrap { overflow-x: auto; }
.adm-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.adm-table th { position: relative; text-align: left; padding: 10px 14px; font-size: 12px; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--border); white-space: nowrap; }
.adm-table td { padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.adm-table tbody tr:last-child td { border-bottom: 0; }
.adm-table tbody tr:hover td { background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
.adm-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.adm-table tfoot td { border-top: 2px solid var(--border-strong); border-bottom: 0; font-weight: 700; background: var(--surface-2); }
.adm-table tr.is-off td:not(.adm-actions) { opacity: .6; }
.adm-table td a { color: var(--text); font-weight: 600; }
.adm-table th button { all: unset; cursor: pointer; display: inline-flex; gap: 3px; }
.adm-table th button:focus-visible { outline: 2px solid var(--brand); }
.adm-table th[aria-sort] { color: var(--text); }
.adm-person { display: flex; align-items: center; gap: 10px; min-width: 190px; }
.adm-person .adm-avatar { width: 30px; height: 30px; font-size: 11px; }
.adm-person > div { min-width: 0; }
.adm-linkbtn { all: unset; cursor: pointer; font-weight: 600; }
.adm-linkbtn:hover { text-decoration: underline; }
.adm-linkbtn:focus-visible { outline: 2px solid var(--brand); }
.adm-sub { display: block; font-size: 12px; font-weight: 400; color: var(--muted); overflow-wrap: anywhere; }
.adm-clip { display: block; max-width: 60ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-actions { text-align: right; white-space: nowrap; }
.adm-actions .btn + .btn { margin-left: 6px; }
.adm-none td { text-align: center; padding: 30px 14px; color: var(--muted); }
.adm-empty { padding: 4px 18px 16px; margin: 0; color: var(--muted); font-size: 14px; }
.adm-list { list-style: none; margin: 0; padding: 0 0 8px; }
.adm-list a { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 18px; color: var(--text); font-size: 14px; }
.adm-list a:hover { background: var(--surface-2); text-decoration: none; }
.adm-list .t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-list .w { flex: none; color: var(--muted); font-size: 12px; }

.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 999px; white-space: nowrap; border: 1px solid var(--border-strong); color: var(--muted); }
.tag-brand { background: var(--brand-50); border-color: transparent; color: var(--brand-600); }
.tag-good { border-color: color-mix(in srgb, var(--ok) 45%, transparent); color: var(--ok); }
.tag-bad { border-color: color-mix(in srgb, var(--danger) 45%, transparent); color: var(--danger); }
.tag-off { border-style: dashed; }
.sev { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.sev svg.i { width: 15px; height: 15px; }
.sev-error svg { color: var(--st-error); } .sev-warning svg { color: var(--st-warning); }
.meter { width: 120px; height: 6px; margin-top: 4px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 3px; background: var(--brand); }
.meter.over i { background: var(--danger); }

/* Pestañas y consola */
.adm-tabs { display: inline-flex; align-self: flex-start; gap: 2px; padding: 3px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.adm-tab { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; background: transparent; color: var(--muted); border: 0; border-radius: 7px; font-size: 13px; font-weight: 600; cursor: pointer; }
.adm-tab.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.adm-bulk { display: flex; align-items: center; gap: 8px; padding: 8px 14px; background: var(--brand-50); border-radius: var(--radius-sm); font-size: 13px; font-weight: 600; }
.adm-bulk .btn { margin-left: 4px; }
.console { background: #0F1419; color: #DCE3EA; border: 1px solid #27323C; border-radius: var(--radius); overflow: hidden; }
.console-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; background: #161D24; border-bottom: 1px solid #27323C; font-size: 12px; color: #93A0AD; }
.console-live { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; }
.console-live i { width: 8px; height: 8px; border-radius: 50%; background: var(--st-good); animation: pulse 1.6s infinite; }
.console-live.is-paused i { background: #93A0AD; animation: none; }
@keyframes pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .console-live i { animation: none; } .adm, .adm-tile, .adm-drawer { transition: none; } }
.console-bar .btn { color: #DCE3EA; border-color: #465563; background: transparent; }
.console-bar .btn:hover:not(:disabled) { background: #27323C; }
.console-log { height: min(56vh, 520px); overflow: auto; padding: 6px 0; font: 12px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.console-line { display: grid; grid-template-columns: 136px 58px 70px minmax(0, 1fr); gap: 10px; padding: 1px 12px; color: inherit; }
.console-line:hover { background: #1B242C; text-decoration: none; }
.console-line .ts { color: #93A0AD; }
.console-line .lv-error { color: #FF8A7E; font-weight: 700; }
.console-line .lv-warning { color: #FAB219; font-weight: 700; }
.console-line .src { color: #93A0AD; }
.console-line .msg-t { overflow-wrap: anywhere; }
.console-line .msg-t small { color: #93A0AD; font-size: 11px; margin-left: 6px; }
.console-line.is-new { animation: flash 1.4s ease-out; }
@keyframes flash { from { background: #2A3A47; } }
.console-empty { padding: 28px 12px; text-align: center; color: #93A0AD; font-family: inherit; }

/* Detalle */
.adm-detail { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 16px; align-items: start; }
.adm-meta { display: grid; gap: 12px; padding: 14px 18px; }
.adm-meta dl { margin: 0; display: grid; gap: 10px; font-size: 13px; }
.adm-meta dt { color: var(--muted); font-size: 12px; font-weight: 600; }
.adm-meta dd { margin: 2px 0 0; overflow-wrap: anywhere; }
.adm-meta .select { width: 100%; max-width: none; }
.thread { display: grid; gap: 10px; padding: 16px 18px; }
.thread .msg { width: 100%; max-width: none; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface-2); font-size: 14px; }
.thread .msg.staff { background: var(--brand-50); }
.thread .msg.internal { background: transparent; border: 1px dashed var(--border-strong); }
.msg-head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 4px; font-size: 12px; color: var(--muted); }
.msg-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.adm-reply { display: grid; gap: 10px; padding: 0 18px 16px; }
.adm-reply textarea { width: 100%; min-height: 96px; padding: 10px 12px; resize: vertical; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); outline: 0; }
.adm-reply textarea:focus { border-color: var(--brand); }
.adm-reply-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.adm-check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.adm-pre { margin: 0; padding: 12px 18px; max-height: 460px; overflow: auto; background: #0F1419; color: #DCE3EA; border-radius: 0 0 var(--radius) var(--radius); font: 12px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.adm-msgline { padding: 0 18px 14px; margin: 0; overflow-wrap: anywhere; }
.adm-actionsbar { display: flex; gap: 8px; flex-wrap: wrap; }

/* Panel lateral */
.adm-drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 40; width: min(560px, 100%); display: flex; flex-direction: column; background: var(--bg); border-left: 1px solid var(--border); box-shadow: var(--shadow-lg); }
.adm-drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 16px 20px; background: var(--surface); border-bottom: 1px solid var(--border); }
.adm-drawer-head h2 { margin: 0; font-size: 18px; letter-spacing: -.01em; }
.adm-drawer-head p { margin: 0; }
.adm-drawer-body { flex: 1; overflow: auto; padding: 16px 20px 28px; display: grid; gap: 14px; align-content: start; }
.adm-drawer .adm-total { grid-template-columns: minmax(0, 1fr); }
.adm-drawer .adm-sum { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.adm-drawer .adm-sum-eq { display: none; }
.adm-drawer .adm-hero { font-size: 40px; }
.adm-scrim { position: fixed; inset: 0; z-index: 15; background: rgba(15, 20, 25, .45); }
.adm-scrim.over { z-index: 35; }

.adm-toasts { position: fixed; right: 18px; top: 74px; z-index: 95; display: grid; gap: 8px; }
.adm-toast { padding: 10px 14px; border-radius: 10px; background: var(--ink); color: #fff; font-size: 13px; font-weight: 600; box-shadow: var(--shadow-lg); }
.adm-toast.bad { background: var(--danger); }
.adm-form-actions { display: flex; justify-content: flex-end; align-items: center; gap: 8px; }
.adm-form-grid { display: grid; gap: 12px; }
.pack-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: end; }
.adm-table td .segbar.thin { margin-left: auto; }
.adm-meta strong { font-size: 14px; }
.adm-meta .field input { width: 100%; }
#userForm .select { width: 100%; max-width: none; }
#userForm input:disabled, #userForm select:disabled { opacity: .6; cursor: not-allowed; }
.adm-ask { width: min(440px, 100%); }
.adm-ask h2 { margin: 0; font-size: 17px; }
.adm-ask p { margin: 0; }

@media (max-width: 1180px) {
  .adm-total { grid-template-columns: minmax(0, 1fr); }
  .adm-grid3 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .adm { grid-template-columns: minmax(0, 1fr); }
  .adm-side { position: fixed; left: 0; top: 0; bottom: 0; width: 248px; transform: translateX(-100%); transition: transform .2s var(--ease); }
  .adm-side.open { transform: none; box-shadow: var(--shadow-lg); }
  .adm-collapse { display: none; }
  .adm-menu { display: inline-grid; }
  .adm-top { padding: 8px 16px; min-height: 56px; gap: 6px; }
  .adm-top-title h1 { font-size: 17px; }
  .adm-top-title p { display: none; }
  .adm-page { padding: 16px 16px 32px; }
  .adm-grid2, .adm-detail { grid-template-columns: minmax(0, 1fr); }
  .adm-clip { max-width: 34ch; }
  .console-line { grid-template-columns: 62px 48px minmax(0, 1fr); gap: 8px; }
  .console-line .src { display: none; }
}
@media (max-width: 760px) {
  .adm-sum { grid-template-columns: minmax(0, 1fr); }
  .adm-sum-item + .adm-sum-item::before { display: none; }
  .adm-sum-eq { display: none; }
  .adm-hero { font-size: 40px; }
  .adm-month select { max-width: 86px; }
  .adm-cards thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .adm-cards, .adm-cards tbody, .adm-cards tfoot, .adm-cards tr, .adm-cards td { display: block; }
  .adm-cards tr { padding: 10px 14px; border-bottom: 1px solid var(--border); }
  .adm-cards tbody tr:last-child { border-bottom: 0; }
  .adm-cards td { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; border: 0; text-align: right; }
  .adm-cards tfoot td { background: none; border-top: 0; }
  .adm-cards tfoot tr { background: var(--surface-2); }
  .adm-cards td[data-label="Usuario"] { display: block; padding-bottom: 8px; text-align: left; }
  .adm-cards td[data-label]:not([data-label="Usuario"])::before { content: attr(data-label); color: var(--muted); font-size: 12px; font-weight: 400; }
  .adm-cards td.adm-actions { justify-content: flex-end; gap: 6px; padding-top: 8px; }
  .adm-cards .adm-actions .btn + .btn { margin-left: 0; }
  .adm-cards td.adm-hide-m { display: none; }
}

/* Detalle de llamadas */
.adm-hash { padding: 8px 12px; background: var(--surface-2); border-radius: var(--radius-sm); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; overflow-wrap: anywhere; }
.adm-calls th, .adm-calls td { padding-left: 9px; padding-right: 9px; }
.adm-calls td:first-child { white-space: nowrap; }
.adm-calls td:nth-child(2) { min-width: 170px; }
.line-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; min-height: 28px; }
.line-tools { display: inline-flex; align-items: center; gap: 4px; }
.line-tools .small { margin-right: 4px; }
.line-btn { min-width: 28px; height: 28px; padding: 0 8px; background: transparent; color: var(--muted); border: 1px solid var(--border); border-radius: 7px; font-size: 13px; font-weight: 600; cursor: pointer; }
.line-btn:hover { background: var(--surface-2); color: var(--text); }
.line-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.line-hint { margin-top: 2px; }
.line-svg { display: block; width: 100%; margin-top: 8px; overflow: visible; touch-action: pan-y; user-select: none; }
.line-svg.is-zoomed { cursor: grab; }
.line-svg.is-zoomed:active { cursor: grabbing; }
@media print { .line-tools, .line-hint { display: none; } }
.line-svg .gl { stroke: var(--grid); }
.line-svg .base { stroke: var(--border-strong); }
.line-svg .cross { stroke: var(--muted); stroke-width: 1; }
.line-svg .ln { fill: none; stroke: var(--brand); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.line-svg .pt { fill: var(--brand); stroke: var(--surface); stroke-width: 2; }
.line-svg .pt.del { fill: var(--surface); stroke: var(--brand); }
.line-svg .hit { fill: transparent; outline: 0; }
.line-svg .hit:focus-visible { stroke: var(--brand); stroke-width: 1; }
.line-svg .tick { fill: var(--muted); font-size: 11px; }
.line-svg .peak { fill: var(--text); font-size: 11px; font-weight: 700; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--brand); border: 2px solid var(--brand); }
.dot.del { background: var(--surface); }
.adm-events > td { padding: 0 0 8px 14px; background: var(--surface-2); }
.adm-events .adm-table { font-size: 13px; }
.adm-events .adm-table td, .adm-events .adm-table th { padding: 6px 10px; background: none; }
.print-head { display: none; }
@media print {
  .adm-side, .adm-top, .no-print, .adm-toasts, .adm-tip, .adm-scrim { display: none !important; }
  .adm { display: block; }
  .adm-body { background: #fff; color: #000; }
  .adm-page { padding: 0; }
  .print-head { display: block; }
  .print-head h1 { margin: 0 0 4px; font-size: 18px; }
  .print-head p { margin: 0 0 12px; font-size: 12px; }
  .adm-card, .adm-tile { box-shadow: none; }
  .adm-wrap { overflow: visible; }
  .adm-table { font-size: 11px; }
  .adm-table th, .adm-table td { padding: 4px 6px; }
}
