/* La Muralla · RRHH — hoja de estilos de la aplicación */
:root {
  --brand: #8E2A2F;
  --brand-d: #6E1F23;
  --brand-l: #F5E9E9;
  --gold: #B48B1E;

  --ink: #1F2328;
  --ink-2: #424A53;
  --ink-3: #636C76;
  --mute: #8A929B;
  --line: #E1E3E6;
  --line-2: #D0D4D9;
  --bg: #F4F5F6;
  --bg-2: #FAFAFB;
  --panel: #FFFFFF;
  --hover: #F2F3F5;
  --sel: #EEF1F5;

  --ok: #2E7D4F;   --ok-l: #E8F3EC;
  --warn: #B26B00; --warn-l: #FBF1E0;
  --err: #C0392B;  --err-l: #FBEAE8;
  --info: #2F5F8A; --info-l: #E8EFF6;

  --font: 'IBM Plex Sans', -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  --r: 4px;
  --sb: 232px;
  --top: 48px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 13px; -webkit-font-smoothing: antialiased; }
body { font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.45; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
table { border-collapse: collapse; width: 100%; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
.mono { font-family: var(--mono); font-size: 12px; letter-spacing: -.01em; white-space: nowrap; }
.muted { color: var(--ink-3); }
.small { font-size: 12px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.t-ok { color: var(--ok); } .t-warn { color: var(--warn); } .t-err { color: var(--err); } .t-info { color: var(--info); }
.num { font-variant-numeric: tabular-nums; }
.lnk { color: var(--info); cursor: pointer; }
.lnk:hover { text-decoration: underline; }

/* ---------- estructura ---------- */
.app { display: grid; grid-template-columns: var(--sb) 1fr; min-height: 100vh; }
.main { min-width: 0; display: flex; flex-direction: column; }
.content { padding: 18px 22px 40px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }

/* menú lateral */
.sb { position: sticky; top: 0; height: 100vh; background: #FBFBFC; border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.sb-h { display: flex; align-items: center; justify-content: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.sb-logo img { height: 58px; width: auto; }
.sb-ctx { display: flex; gap: 10px; align-items: center; margin: 10px 10px 4px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); }
.sb-ctx > span { width: 26px; height: 26px; display: grid; place-items: center; background: var(--brand-l); color: var(--brand); border-radius: 3px; font-size: 12px; }
.sb-ctx b { display: block; font-size: 12px; font-weight: 600; }
.sb-ctx small { color: var(--ink-3); font-size: 11px; }
.sb-n { flex: 1; overflow-y: auto; padding: 4px 8px 12px; }
.sb-g { margin-top: 12px; }
.sb-gt { font-size: 10.5px; font-weight: 600; color: var(--mute); text-transform: uppercase; letter-spacing: .06em; padding: 0 10px 4px; }
.sb-n a { display: flex; align-items: center; gap: 10px; padding: 5px 10px; border-radius: var(--r); color: var(--ink-2); position: relative; }
.sb-n a i { width: 16px; text-align: center; color: var(--mute); font-size: 12.5px; }
.sb-n a:hover { background: var(--hover); color: var(--ink); }
.sb-n a.on { background: var(--brand-l); color: var(--brand-d); font-weight: 600; }
.sb-n a.on i { color: var(--brand); }
.sb-n a.on::before { content: ''; position: absolute; left: -8px; top: 5px; bottom: 5px; width: 3px; background: var(--brand); border-radius: 0 2px 2px 0; }
.sb-n a span { flex: 1; }
.sb-n em { font-style: normal; font-size: 11px; font-weight: 600; color: var(--ink-3); background: var(--line); border-radius: 9px; padding: 0 6px; line-height: 17px; }
.sb-n em.warn { background: var(--warn-l); color: var(--warn); }
.sb-n em.err { background: var(--err-l); color: var(--err); }
.sb-f { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-top: 1px solid var(--line); }
.sb-f div { flex: 1; min-width: 0; }
.sb-f b { display: block; font-size: 12.5px; }
.sb-f small { color: var(--ink-3); font-size: 11px; }

/* barra superior */
.top { position: sticky; top: 0; z-index: 20; height: var(--top); display: flex; align-items: center; gap: 14px; padding: 0 22px; background: var(--panel); border-bottom: 1px solid var(--line); }
.sb-toggle { display: none; }
.crumbs { display: flex; align-items: center; gap: 8px; color: var(--ink-3); white-space: nowrap; overflow: hidden; }
.crumbs i { font-size: 9px; color: var(--mute); }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.crumbs b { color: var(--ink); font-weight: 600; }
.cmdk { margin-left: auto; display: flex; align-items: center; gap: 8px; width: 340px; max-width: 34vw; height: 30px; padding: 0 8px 0 10px; border: 1px solid var(--line-2); border-radius: var(--r); color: var(--mute); background: var(--bg-2); }
.cmdk span { flex: 1; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmdk:hover { border-color: var(--ink-3); }
kbd { font-family: var(--mono); font-size: 10.5px; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 3px; padding: 0 4px; color: var(--ink-3); background: var(--panel); }
.top-r { display: flex; align-items: center; gap: 4px; }
.sync { font-size: 11.5px; color: var(--ink-3); margin-right: 8px; white-space: nowrap; }
.sync .live { color: var(--ok); font-size: 7px; vertical-align: 2px; margin-right: 3px; }
.ib { position: relative; width: 30px; height: 30px; display: inline-grid; place-items: center; border-radius: var(--r); color: var(--ink-3); }
.ib:hover { background: var(--hover); color: var(--ink); }
.ib .dot { position: absolute; top: 6px; right: 7px; width: 6px; height: 6px; border-radius: 50%; background: var(--err); }

/* cabecera de página */
.ph { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-bottom: 2px; }
.ph h1 { font-size: 19px; font-weight: 600; letter-spacing: -.01em; }
.ph p { color: var(--ink-3); margin-top: 2px; }
.ph-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ---------- controles ---------- */
.btn { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--panel); color: var(--ink); font-weight: 500; white-space: nowrap; }
.btn:hover { background: var(--hover); border-color: #BCC2C9; }
.btn i { font-size: 12px; color: var(--ink-3); }
.btn-primary { background: var(--brand); border-color: var(--brand-d); color: #fff; }
.btn-primary i { color: #fff; opacity: .9; }
.btn-primary:hover { background: var(--brand-d); border-color: var(--brand-d); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: var(--hover); border-color: transparent; }
.btn-danger { color: var(--err); }
.btn-sm { height: 26px; padding: 0 9px; font-size: 12px; }
.btn-xs { height: 22px; padding: 0 7px; font-size: 11.5px; }
.btn-group { display: inline-flex; }
.btn-group .btn { border-radius: 0; margin-left: -1px; }
.btn-group .btn:first-child { border-radius: var(--r) 0 0 var(--r); margin-left: 0; }
.btn-group .btn:last-child { border-radius: 0 var(--r) var(--r) 0; }

.in { height: 30px; padding: 0 9px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--panel); outline: none; min-width: 0; width: 100%; }
select.in { padding-right: 24px; appearance: none; background: var(--panel) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23636C76' fill='none' stroke-width='1.4'/%3E%3C/svg%3E") no-repeat right 8px center; }
textarea.in { height: auto; min-height: 70px; padding: 7px 9px; resize: vertical; }
.in:focus { border-color: var(--info); box-shadow: 0 0 0 2px rgba(47, 95, 138, .15); }
.in-sm { height: 26px; font-size: 12px; width: auto; }
.in[readonly] { background: var(--bg-2); color: var(--ink-2); }
.fld { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.fld > span { font-size: 11.5px; font-weight: 500; color: var(--ink-2); }
.fld small { color: var(--mute); font-size: 11px; }
.form { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 14px; }
.form-3 { grid-template-columns: repeat(3, 1fr); }
.form-4 { grid-template-columns: repeat(4, 1fr); }
.span-2 { grid-column: span 2; } .span-3 { grid-column: span 3; } .span-4 { grid-column: 1 / -1; }
.form-sec { grid-column: 1 / -1; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); border-bottom: 1px solid var(--line); padding: 8px 0 4px; margin-top: 4px; }
.chk { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; }
.chk input, .ck input { accent-color: var(--brand); width: 14px; height: 14px; }
.tgl { position: relative; display: inline-block; width: 30px; height: 17px; flex: none; }
.tgl input { opacity: 0; width: 0; height: 0; }
.tgl i { position: absolute; inset: 0; background: var(--line-2); border-radius: 9px; cursor: pointer; transition: .15s; }
.tgl i::after { content: ''; position: absolute; width: 13px; height: 13px; left: 2px; top: 2px; background: #fff; border-radius: 50%; transition: .15s; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); }
.tgl input:checked + i { background: var(--ok); }
.tgl input:checked + i::after { transform: translateX(13px); }

.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: var(--r); overflow: hidden; background: var(--panel); }
.seg button { height: 28px; padding: 0 11px; color: var(--ink-2); border-left: 1px solid var(--line); font-size: 12px; }
.seg button:first-child { border-left: 0; }
.seg button.on { background: var(--sel); color: var(--ink); font-weight: 600; }
.seg-sm button { height: 24px; padding: 0 8px; }

/* estados */
.st { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-size: 12px; }
.st::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--mute); flex: none; }
.st-ok::before { background: var(--ok); } .st-warn::before { background: #D98E04; } .st-err::before { background: var(--err); } .st-info::before { background: var(--info); } .st-brand::before { background: var(--brand); } .st-muted { color: var(--ink-3); }
.tg { display: inline-block; font-size: 11px; line-height: 18px; padding: 0 6px; border-radius: 3px; background: var(--hover); color: var(--ink-2); border: 1px solid var(--line); white-space: nowrap; font-weight: 500; }
.tg-ok { background: var(--ok-l); color: var(--ok); border-color: #CBE3D3; }
.tg-warn { background: var(--warn-l); color: var(--warn); border-color: #F0DDB8; }
.tg-err { background: var(--err-l); color: var(--err); border-color: #F2CCC7; }
.tg-info { background: var(--info-l); color: var(--info); border-color: #CCDAE8; }
.tg-brand { background: var(--brand-l); color: var(--brand-d); border-color: #E7CFD0; }

.av { width: 26px; height: 26px; flex: none; border-radius: 50%; display: inline-grid; place-items: center; background: #E7E3DC; color: #5A4E3E; font-size: 10.5px; font-weight: 600; letter-spacing: .02em; }
.av.lg { width: 56px; height: 56px; font-size: 18px; }
.av.md { width: 36px; height: 36px; font-size: 13px; }
.emp { display: inline-flex; align-items: center; gap: 9px; min-width: 0; }
.emp b { display: block; font-weight: 500; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.emp small { display: block; color: var(--ink-3); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
a.emp:hover b { color: var(--info); text-decoration: underline; }

.bar { display: inline-block; width: 100%; min-width: 50px; height: 5px; background: #E9EBEE; border-radius: 3px; overflow: hidden; vertical-align: middle; }
.bar i { display: block; height: 100%; background: var(--info); }
.bar-ok i { background: var(--ok); } .bar-warn i { background: #D98E04; } .bar-err i { background: var(--err); } .bar-brand i { background: var(--brand); }

/* ---------- paneles ---------- */
.pn { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); min-width: 0; display: flex; flex-direction: column; }
.pn-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 42px; padding: 8px 14px; border-bottom: 1px solid var(--line); }
.pn-h h2 { font-size: 13px; font-weight: 600; }
.pn-h small { display: block; color: var(--ink-3); font-size: 11.5px; }
.pn-a { display: flex; align-items: center; gap: 6px; }
.pn-b { padding: 14px; flex: 1; min-width: 0; }
.pn-b.flush { padding: 0; }
.pn-f { border-top: 1px solid var(--line); padding: 8px 14px; display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--ink-3); }

.grid { display: grid; gap: 14px; min-width: 0; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.g-1-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.g-3-1 { grid-template-columns: minmax(0, 3fr) minmax(280px, 1fr); }
.g-side { grid-template-columns: 260px minmax(0, 1fr); }
.stack { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.row { display: flex; align-items: center; gap: 8px; }
.row-sb { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.wrap { flex-wrap: wrap; }

/* indicadores */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); }
.stat { padding: 11px 14px; border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.stat:first-child { border-left: 0; }
.stat-l { font-size: 11.5px; color: var(--ink-3); }
.stat-v { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.stat-v em { font-style: normal; font-size: 12px; font-weight: 500; color: var(--ink-3); margin-left: 3px; }
.stat-s { font-size: 11.5px; color: var(--ink-3); }

/* ---------- tablas ---------- */
.dt { display: flex; flex-direction: column; min-width: 0; }
.tb { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tb-sp { flex: 1; }
.tb-count { color: var(--mute); font-size: 11.5px; white-space: nowrap; }
.srch { position: relative; display: inline-flex; }
.srch i { position: absolute; left: 8px; top: 50%; transform: translateY(-50%); color: var(--mute); font-size: 11px; }
.srch .in { padding-left: 26px; width: 230px; }
.dt-scroll { overflow-x: auto; }
.tbl th { position: sticky; top: 0; text-align: left; font-weight: 600; font-size: 11.5px; color: var(--ink-3); background: var(--bg-2); padding: 7px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; user-select: none; }
.tbl th[data-sort] { cursor: pointer; }
.tbl th[data-sort]:hover { color: var(--ink); }
.tbl th[data-sort]::after { content: '\2195'; margin-left: 4px; opacity: .25; font-size: 10px; }
.tbl th.asc::after { content: '\2191'; opacity: .8; } .tbl th.desc::after { content: '\2193'; opacity: .8; }
.tbl td { padding: 6px 10px; border-bottom: 1px solid #EDEFF1; vertical-align: middle; height: 38px; }
.tbl tbody tr:hover td { background: #F8F9FA; }
.tbl tbody tr.sel td { background: var(--sel); }
.tbl tr[data-href] { cursor: pointer; }
.tbl .a-right { text-align: right; font-variant-numeric: tabular-nums; }
.tbl .a-center { text-align: center; }
.tbl .ck { width: 34px; padding-right: 0; }
.tbl tfoot td { font-weight: 600; background: var(--bg-2); border-top: 1px solid var(--line-2); }
.tbl-compact td { height: 32px; padding: 4px 10px; }
.tbl-plain td, .tbl-plain th { padding-left: 14px; }
.empty { padding: 28px; text-align: center; color: var(--mute); }
.pg { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; font-size: 12px; color: var(--ink-3); }
.pg .btn { height: 24px; padding: 0 8px; }
.bulk { display: flex; align-items: center; gap: 8px; padding: 6px 12px; background: var(--sel); border-bottom: 1px solid var(--line); font-size: 12px; }
.bulk > span { margin-right: 6px; }

/* listas clave-valor */
.kv { display: grid; gap: 10px 18px; }
.kv-1 { grid-template-columns: 1fr; } .kv-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .kv-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .kv-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kv dt { font-size: 11.5px; color: var(--ink-3); }
.kv dd { font-weight: 500; overflow-wrap: anywhere; }

/* pestañas */
.tabs > nav { display: flex; gap: 2px; border-bottom: 1px solid var(--line); padding: 0 12px; overflow-x: auto; }
.tabs > nav button { padding: 9px 10px 8px; color: var(--ink-3); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; font-weight: 500; }
.tabs > nav button:hover { color: var(--ink); }
.tabs > nav button.on { color: var(--ink); border-bottom-color: var(--brand); font-weight: 600; }
.tabs .cnt { margin-left: 6px; font-size: 11px; color: var(--ink-3); background: var(--hover); border-radius: 8px; padding: 0 5px; font-weight: 500; }
.tabs-flush > nav { padding: 0; }

/* avisos */
.nt { display: flex; gap: 10px; padding: 9px 12px; border: 1px solid; border-radius: var(--r); font-size: 12.5px; align-items: flex-start; }
.nt > i { margin-top: 2px; }
.nt-info { background: var(--info-l); border-color: #CCDAE8; color: #234A6B; }
.nt-warn { background: var(--warn-l); border-color: #F0DDB8; color: #7A4A00; }
.nt-err { background: var(--err-l); border-color: #F2CCC7; color: #8E2A20; }
.nt-ok { background: var(--ok-l); border-color: #CBE3D3; color: #1F5C39; }
.nt b { font-weight: 600; }
.nt a { text-decoration: underline; }

/* listas simples */
.list { list-style: none; }
.list > li { display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-bottom: 1px solid #EDEFF1; }
.list > li:last-child { border-bottom: 0; }
.list .grow { flex: 1; min-width: 0; }
.list small { display: block; color: var(--ink-3); font-size: 11.5px; }

/* historial */
.tl { list-style: none; position: relative; }
.tl li { position: relative; display: grid; grid-template-columns: 92px 1fr; gap: 10px; padding: 0 0 12px 14px; }
.tl li::before { content: ''; position: absolute; left: 0; top: 5px; width: 7px; height: 7px; border-radius: 50%; background: var(--line-2); }
.tl li::after { content: ''; position: absolute; left: 3px; top: 14px; bottom: 0; width: 1px; background: var(--line); }
.tl li:last-child::after { display: none; }
.tl li.tl-ok::before { background: var(--ok); } .tl li.tl-warn::before { background: #D98E04; } .tl li.tl-err::before { background: var(--err); } .tl li.tl-info::before { background: var(--info); }
.tl time { color: var(--ink-3); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.tl small { display: block; color: var(--ink-3); font-size: 11.5px; }

.chart { position: relative; width: 100%; }

/* ---------- capas ---------- */
.mdl, .drw, .pop { position: fixed; inset: 0; z-index: 100; }
.mdl-bg { position: absolute; inset: 0; background: rgba(20, 24, 28, .35); }
.pop .mdl-bg { background: transparent; }
.mdl-box { position: relative; margin: 8vh auto 0; width: min(560px, 94vw); max-height: 84vh; display: flex; flex-direction: column; background: var(--panel); border-radius: 6px; box-shadow: 0 12px 40px rgba(0, 0, 0, .18); }
.mdl-lg { width: min(860px, 94vw); }
.mdl-xl { width: min(1100px, 96vw); }
.mdl-box > header, .drw-box > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.mdl-box h3, .drw-box h3 { font-size: 14px; font-weight: 600; }
.drw-box header small { color: var(--ink-3); font-size: 12px; }
.mdl-b, .drw-b { padding: 16px; overflow-y: auto; flex: 1; }
.mdl-box > footer, .drw-box > footer { display: flex; justify-content: flex-end; gap: 8px; padding: 10px 16px; border-top: 1px solid var(--line); background: var(--bg-2); border-radius: 0 0 6px 6px; }
.drw-box { position: absolute; right: 0; top: 0; bottom: 0; width: min(560px, 96vw); background: var(--panel); display: flex; flex-direction: column; box-shadow: -8px 0 30px rgba(0, 0, 0, .12); animation: slin .18s ease-out; }
@keyframes slin { from { transform: translateX(30px); opacity: .6; } }
.pop-box { position: absolute; right: 56px; top: 44px; width: 360px; background: var(--panel); border: 1px solid var(--line-2); border-radius: 6px; box-shadow: 0 10px 30px rgba(0, 0, 0, .14); }
.pop-box header { display: flex; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 12px; }
.pop-i { display: flex; gap: 10px; padding: 9px 14px; border-bottom: 1px solid #EDEFF1; }
.pop-i:hover { background: var(--hover); }
.pop-i b { display: block; font-weight: 500; }
.pop-i small { color: var(--ink-3); font-size: 11.5px; }
.pi { width: 24px; height: 24px; flex: none; display: grid; place-items: center; border-radius: 3px; font-size: 11px; }
.pi-err { background: var(--err-l); color: var(--err); } .pi-warn { background: var(--warn-l); color: var(--warn); } .pi-info { background: var(--info-l); color: var(--info); }

.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 300; display: flex; flex-direction: column; gap: 8px; }
.toast { background: #24292F; color: #fff; padding: 9px 14px; border-radius: var(--r); font-size: 12.5px; box-shadow: 0 6px 20px rgba(0, 0, 0, .2); display: flex; gap: 9px; align-items: center; animation: tin .2s ease-out; }
.toast i { color: #6CC28A; }
@keyframes tin { from { transform: translateY(8px); opacity: 0; } }

/* búsqueda global */
.ck-box { position: relative; margin: 10vh auto 0; width: min(620px, 94vw); background: var(--panel); border-radius: 6px; box-shadow: 0 16px 50px rgba(0, 0, 0, .25); overflow: hidden; }
.ck-box input { width: 100%; border: 0; border-bottom: 1px solid var(--line); padding: 14px 16px; font-size: 15px; outline: none; }
.ck-res { max-height: 52vh; overflow-y: auto; }
.ck-res a { display: flex; align-items: center; gap: 12px; padding: 8px 16px; }
.ck-res a.on, .ck-res a:hover { background: var(--sel); }
.ck-res a i { width: 16px; color: var(--mute); text-align: center; }
.ck-res a span { flex: 1; min-width: 0; }
.ck-res a b { display: block; font-weight: 500; }
.ck-res a small { color: var(--ink-3); font-size: 11.5px; }
.ck-res em { font-style: normal; font-size: 11px; color: var(--mute); }
.ck-foot { padding: 7px 16px; border-top: 1px solid var(--line); font-size: 11px; color: var(--mute); display: flex; gap: 14px; }

/* utilidades varias usadas por varias pantallas */
.sep { height: 1px; background: var(--line); margin: 12px 0; }
.sub-h { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); margin: 0 0 8px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 11.5px; color: var(--ink-3); }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.mini-tbl td, .mini-tbl th { padding: 5px 0; border-bottom: 1px solid #EDEFF1; font-size: 12px; }
.mini-tbl th { color: var(--ink-3); font-weight: 500; text-align: left; }
.mini-tbl td:last-child, .mini-tbl th:last-child { text-align: right; }
.code { font-family: var(--mono); font-size: 12px; background: #F6F8FA; border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; white-space: pre; overflow-x: auto; color: #24292F; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border: 1px solid var(--line-2); border-radius: 12px; font-size: 12px; background: var(--panel); color: var(--ink-2); }
.chip.on { border-color: var(--ink-3); background: var(--sel); color: var(--ink); font-weight: 500; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }

/* ---------- responsive ---------- */
@media (max-width: 1280px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-3-1 { grid-template-columns: 1fr; }
}
@media (max-width: 1024px) {
  .app { grid-template-columns: 1fr; }
  .sb { position: fixed; left: 0; top: 0; z-index: 90; width: var(--sb); transform: translateX(-100%); transition: transform .2s; box-shadow: 4px 0 20px rgba(0, 0, 0, .1); }
  body.sb-open .sb { transform: none; }
  .sb-toggle { display: inline-grid; }
  .g2, .g3, .g-2-1, .g-1-2, .g-side { grid-template-columns: 1fr; }
  .sync { display: none; }
}
@media (max-width: 700px) {
  .content { padding: 14px 12px 30px; }
  .top { padding: 0 12px; }
  .cmdk span, .cmdk kbd { display: none; }
  .cmdk { width: 30px; padding: 0; justify-content: center; margin-left: auto; }
  .crumbs > a, .crumbs > i { display: none; }
  .g4 { grid-template-columns: 1fr; }
  .form, .form-3, .form-4 { grid-template-columns: 1fr; }
  .span-2, .span-3 { grid-column: auto; }
  .kv-3, .kv-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .srch .in { width: 100%; }
  .srch { flex: 1 1 100%; }
  .pop-box { right: 8px; left: 8px; width: auto; }
}
@media print {
  .sb, .top, .ph-actions, .tb, .pg { display: none !important; }
  .app { display: block; }
  body { background: #fff; }
}
.pn-b.flush { overflow-x: auto; }
