/* ============================================================
   HERMES OS — Design System
   Dark executive · acento dorado · sin gradientes en botones
   ============================================================ */
:root {
  --bg: #0B0D12;
  --bg-2: #10131B;
  --bg-3: #161A24;
  --line: #232936;
  --line-2: #2E3648;
  --text: #E8EAF0;
  --text-2: #9AA3B5;
  --text-3: #5F6878;
  --gold: #C8A24A;
  --gold-2: #E3C57C;
  --gold-dim: #2A2415;
  --green: #4CC38A;
  --green-dim: #12281D;
  --red: #E5484D;
  --red-dim: #2E1518;
  --blue: #5B9BD5;
  --blue-dim: #14202E;
  --purple: #A78BFA;
  --purple-dim: #221B33;
  --orange: #E8965A;
  --orange-dim: #2C1E12;
  --r: 14px;
  --r-sm: 9px;
  --font: 'Inter', system-ui, sans-serif;
  --font-d: 'Sora', system-ui, sans-serif;
  --font-m: 'JetBrains Mono', monospace;
  --sidebar-w: 248px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection { background: var(--gold-dim); color: var(--gold-2); }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 9px; }
::-webkit-scrollbar-track { background: transparent; }

h1,h2,h3,h4 { font-family: var(--font-d); font-weight: 700; letter-spacing: -0.01em; }
a { color: inherit; text-decoration: none; }
button { font-family: var(--font); cursor: pointer; }
input, textarea, select { font-family: var(--font); }

/* ---------- BOOT ---------- */
.boot-screen {
  position: fixed; inset: 0; z-index: 999;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  transition: opacity .5s ease;
}
.boot-screen.out { opacity: 0; pointer-events: none; }
.boot-mark { text-align: center; }
.boot-title { font-family: var(--font-d); font-size: 26px; font-weight: 800; letter-spacing: .35em; margin-top: 18px; color: var(--text); }
.boot-sub { font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: var(--text-3); margin-top: 6px; }
.boot-bar { width: 180px; height: 2px; background: var(--line); margin: 26px auto 0; border-radius: 2px; overflow: hidden; }
.boot-bar span { display: block; height: 100%; width: 40%; background: var(--gold); animation: bootslide 1.1s ease-in-out infinite; }
@keyframes bootslide { 0% { transform: translateX(-100%);} 100% { transform: translateX(450%);} }

/* ---------- SHELL ---------- */
.shell { display: flex; min-height: 100vh; min-height: 100dvh; }
.sidebar {
  width: var(--sidebar-w); flex-shrink: 0;
  background: var(--bg-2);
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 60;
  transition: transform .28s cubic-bezier(.4,0,.2,1);
}
.brand {
  display: flex; align-items: center; gap: 11px;
  padding: 20px 18px 16px;
  border-bottom: 1px solid var(--line);
}
.brand-mark { width: 34px; height: 34px; border-radius: 9px; background: var(--gold-dim); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.brand-name { font-family: var(--font-d); font-weight: 800; font-size: 15px; letter-spacing: .12em; }
.brand-tag { font-size: 9.5px; letter-spacing: .22em; text-transform: uppercase; color: var(--text-3); }
.nav-scroll { flex: 1; overflow-y: auto; padding: 10px 10px 16px; }
.nav-group { margin-top: 14px; }
.nav-group-label { font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--text-3); padding: 0 10px 6px; font-weight: 600; }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 8.5px 10px; border-radius: var(--r-sm);
  color: var(--text-2); font-size: 13.5px; font-weight: 500;
  cursor: pointer; transition: background .15s, color .15s;
  border: none; background: transparent; width: 100%; text-align: left;
  position: relative;
}
.nav-item i { width: 18px; text-align: center; font-size: 13px; }
.nav-item:hover { background: var(--bg-3); color: var(--text); }
.nav-item.active { background: var(--gold-dim); color: var(--gold-2); }
.nav-item .badge { margin-left: auto; }
.nav-item.testing::after { content: 'BETA'; margin-left: auto; font-size: 8.5px; letter-spacing: .1em; color: var(--purple); border: 1px solid var(--purple); padding: 1px 5px; border-radius: 4px; }
.sidebar-foot { padding: 12px; border-top: 1px solid var(--line); }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-sm); cursor: pointer; transition: background .15s; }
.user-chip:hover { background: var(--bg-3); }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12.5px; font-family: var(--font-d); flex-shrink: 0; }
.user-meta { min-width: 0; }
.user-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 10.5px; color: var(--gold); text-transform: uppercase; letter-spacing: .08em; }

.main { flex: 1; margin-left: var(--sidebar-w); min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 26px;
  border-bottom: 1px solid var(--line);
  background: rgba(11,13,18,.92);
  position: sticky; top: 0; z-index: 50;
}
.menu-btn { display: none; }
.page-title { font-size: 17px; font-weight: 700; }
.page-sub { font-size: 12px; color: var(--text-3); margin-top: 1px; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.icon-btn {
  width: 38px; height: 38px; border-radius: var(--r-sm);
  border: 1px solid var(--line); background: var(--bg-2);
  color: var(--text-2); font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  transition: border-color .15s, color .15s;
  position: relative;
}
.icon-btn:hover { border-color: var(--gold); color: var(--gold-2); }
.icon-btn .dot { position: absolute; top: 8px; right: 9px; width: 7px; height: 7px; border-radius: 50%; background: var(--red); }
.content { padding: 24px 26px 90px; flex: 1; max-width: 1480px; width: 100%; margin: 0 auto; }

/* ---------- COMPONENTES ---------- */
.card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 20px;
}
.card-title { display: flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 700; font-family: var(--font-d); margin-bottom: 14px; }
.card-title i { color: var(--gold); font-size: 13px; }
.card-title .right { margin-left: auto; font-size: 12px; font-weight: 500; color: var(--text-3); font-family: var(--font); }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; border-radius: var(--r-sm);
  font-size: 13px; font-weight: 600;
  border: 1px solid transparent;
  transition: opacity .15s, border-color .15s, background .15s;
}
.btn-gold { background: var(--gold); color: #14110A; }
.btn-gold:hover { background: var(--gold-2); }
.btn-ghost { background: transparent; border-color: var(--line-2); color: var(--text-2); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-2); }
.btn-danger { background: var(--red); color: #fff; }
.btn-sm { padding: 6px 11px; font-size: 12px; }
.btn-lg { padding: 14px 24px; font-size: 15px; border-radius: 12px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10.5px; font-weight: 600; letter-spacing: .04em;
  padding: 2.5px 8px; border-radius: 20px;
  text-transform: uppercase;
}
.b-gold { background: var(--gold-dim); color: var(--gold-2); }
.b-green { background: var(--green-dim); color: var(--green); }
.b-red { background: var(--red-dim); color: var(--red); }
.b-blue { background: var(--blue-dim); color: var(--blue); }
.b-purple { background: var(--purple-dim); color: var(--purple); }
.b-orange { background: var(--orange-dim); color: var(--orange); }
.b-gray { background: var(--bg-3); color: var(--text-2); }

.input, textarea.input, select.input {
  width: 100%; padding: 10px 13px;
  background: var(--bg-3); border: 1px solid var(--line-2);
  border-radius: var(--r-sm); color: var(--text);
  font-size: 13.5px; outline: none;
  transition: border-color .15s;
}
.input:focus { border-color: var(--gold); }
.input::placeholder { color: var(--text-3); }
label.field-label { display: block; font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); margin: 12px 0 6px; }

.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }

.kpi { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; }
.kpi-label { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); font-weight: 600; }
.kpi-value { font-family: var(--font-d); font-size: 27px; font-weight: 800; margin-top: 4px; }
.kpi-delta { font-size: 12px; margin-top: 2px; color: var(--text-2); }
.kpi.gold { border-left: 3px solid var(--gold); }
.kpi.green { border-left: 3px solid var(--green); }
.kpi.red { border-left: 3px solid var(--red); }
.kpi.blue { border-left: 3px solid var(--blue); }

table.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); padding: 8px 10px; border-bottom: 1px solid var(--line); font-weight: 600; }
.tbl td { padding: 11px 10px; border-bottom: 1px solid var(--line); font-size: 13.5px; vertical-align: middle; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tr.rowlink { cursor: pointer; transition: background .12s; }
.tbl tr.rowlink:hover { background: var(--bg-3); }

.list-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.list-item:last-child { border-bottom: none; }
.li-icon { width: 34px; height: 34px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 13px; flex-shrink: 0; }
.li-body { flex: 1; min-width: 0; }
.li-title { font-size: 13.5px; font-weight: 600; }
.li-sub { font-size: 12px; color: var(--text-3); margin-top: 1px; }

.progress { height: 5px; background: var(--line); border-radius: 5px; overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--gold); border-radius: 5px; }
.progress.green span { background: var(--green); }
.progress.red span { background: var(--red); }

.empty { text-align: center; padding: 44px 20px; color: var(--text-3); }
.empty i { font-size: 30px; margin-bottom: 12px; display: block; color: var(--line-2); }

/* Toggle switch */
.switch { position: relative; width: 40px; height: 22px; flex-shrink: 0; cursor: pointer; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .track { position: absolute; inset: 0; background: var(--line-2); border-radius: 22px; transition: background .2s; }
.switch .track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--text-2); transition: transform .2s, background .2s; }
.switch input:checked + .track { background: var(--gold); }
.switch input:checked + .track::after { transform: translateX(18px); background: #14110A; }

/* Tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tab {
  padding: 9px 15px; font-size: 13px; font-weight: 600; color: var(--text-3);
  border: none; background: transparent; border-bottom: 2px solid transparent;
  white-space: nowrap; transition: color .15s;
}
.tab:hover { color: var(--text-2); }
.tab.active { color: var(--gold-2); border-bottom-color: var(--gold); }

/* Modal */
.modal-wrap { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 18px; background: rgba(5,6,9,.78); }
.modal { background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 16px; width: 100%; max-width: 560px; max-height: 88vh; overflow-y: auto; padding: 24px; animation: modalin .22s cubic-bezier(.3,1.2,.4,1); }
.modal.wide { max-width: 780px; }
@keyframes modalin { from { transform: translateY(14px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.modal-title { font-size: 16px; font-weight: 700; font-family: var(--font-d); }

/* Toast */
.toast-zone { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 400; display: flex; flex-direction: column; gap: 8px; align-items: center; width: min(480px, 92vw); }
.toast {
  background: var(--bg-3); border: 1px solid var(--line-2); border-left: 3px solid var(--gold);
  border-radius: 10px; padding: 11px 16px; font-size: 13px; font-weight: 500;
  display: flex; align-items: center; gap: 10px; width: 100%;
  animation: toastin .25s ease;
}
.toast.ok { border-left-color: var(--green); }
.toast.err { border-left-color: var(--red); }
@keyframes toastin { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- HERMES DOCK ---------- */
.hermes-fab {
  position: fixed; bottom: 22px; right: 22px; z-index: 150;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--gold); color: #14110A; border: none;
  font-size: 20px; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 28px rgba(200,162,74,.35);
  transition: transform .18s;
}
.hermes-fab:hover { transform: scale(1.06); }
.hermes-panel {
  position: fixed; bottom: 0; right: 0; z-index: 180;
  width: 420px; max-width: 100vw; height: 100dvh;
  background: var(--bg-2); border-left: 1px solid var(--line-2);
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
}
.hermes-panel.open { transform: none; }
.hermes-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.hermes-orb { width: 38px; height: 38px; border-radius: 50%; background: var(--gold-dim); display: flex; align-items: center; justify-content: center; color: var(--gold); font-size: 16px; flex-shrink: 0; }
.hermes-orb.thinking { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(200,162,74,.4);} 50% { box-shadow: 0 0 0 9px rgba(200,162,74,0);} }
.hermes-msgs { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.msg { max-width: 88%; padding: 11px 14px; border-radius: 13px; font-size: 13.5px; white-space: pre-wrap; word-wrap: break-word; }
.msg.user { align-self: flex-end; background: var(--gold-dim); color: var(--gold-2); border-bottom-right-radius: 4px; }
.msg.bot { align-self: flex-start; background: var(--bg-3); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg .meta { display: block; font-size: 10px; color: var(--text-3); margin-top: 6px; font-family: var(--font-m); }
.msg .action-chip { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; padding: 5px 10px; background: var(--green-dim); color: var(--green); border-radius: 7px; font-size: 12px; font-weight: 600; }
.hermes-input-zone { padding: 14px 16px; border-top: 1px solid var(--line); display: flex; gap: 9px; align-items: flex-end; padding-bottom: max(14px, env(safe-area-inset-bottom)); }
.hermes-input { flex: 1; resize: none; max-height: 110px; min-height: 42px; }
.voice-btn { width: 42px; height: 42px; border-radius: var(--r-sm); flex-shrink: 0; border: 1px solid var(--line-2); background: var(--bg-3); color: var(--text-2); font-size: 15px; transition: all .15s; }
.voice-btn.rec { background: var(--red); border-color: var(--red); color: #fff; animation: pulse 1s infinite; }
.send-btn { width: 42px; height: 42px; border-radius: var(--r-sm); flex-shrink: 0; border: none; background: var(--gold); color: #14110A; font-size: 15px; }
.hermes-quick { display: flex; gap: 7px; padding: 0 16px 10px; flex-wrap: wrap; }
.qchip { font-size: 11.5px; padding: 5px 11px; border-radius: 16px; border: 1px solid var(--line-2); background: transparent; color: var(--text-2); transition: all .15s; }
.qchip:hover { border-color: var(--gold); color: var(--gold-2); }

/* ---------- ROLE GATE ---------- */
.role-gate { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 28px 20px; }
.role-gate-head { text-align: center; margin-bottom: 36px; }
.role-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; width: 100%; max-width: 860px; }
.role-card {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 16px;
  padding: 26px 22px; text-align: left; cursor: pointer;
  transition: border-color .18s, transform .18s; border-bottom: 3px solid var(--line);
}
.role-card:hover { border-color: var(--gold); transform: translateY(-3px); }
.role-card i { font-size: 24px; color: var(--gold); }
.role-card h3 { font-size: 17px; margin: 14px 0 4px; }
.role-card p { font-size: 12.5px; color: var(--text-3); }

/* ---------- MODO DIRECTOR ---------- */
.director { font-size: 18px; }
.director .content { max-width: 900px; }
.director-hero { padding: 28px 0 8px; }
.director-hero h1 { font-size: clamp(28px, 5vw, 40px); }
.director-hero p { font-size: 17px; color: var(--text-2); margin-top: 6px; }
.dbtn {
  display: flex; align-items: center; gap: 18px; width: 100%;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 18px;
  padding: 24px 26px; color: var(--text); text-align: left;
  font-size: 19px; font-weight: 700; font-family: var(--font-d);
  transition: border-color .15s, transform .15s; margin-bottom: 14px;
}
.dbtn:hover { border-color: var(--gold); transform: translateY(-2px); }
.dbtn i { font-size: 24px; color: var(--gold); width: 34px; text-align: center; }
.dbtn .dcount { margin-left: auto; font-size: 15px; color: var(--text-2); font-family: var(--font); font-weight: 500; }
.dbtn.talk { background: var(--gold); color: #14110A; border-color: var(--gold); }
.dbtn.talk i { color: #14110A; }
.director-item { padding: 18px 4px; border-bottom: 1px solid var(--line); font-size: 17px; }
.director-item b { display: block; font-size: 18px; }
.director-item span { color: var(--text-2); font-size: 15px; }

/* ---------- KANBAN CRM ---------- */
.kanban { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 10px; }
.kcol { min-width: 250px; width: 250px; flex-shrink: 0; }
.kcol-head { display: flex; align-items: center; gap: 8px; padding: 8px 4px 10px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); }
.kcard { background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 13px 14px; margin-bottom: 10px; cursor: pointer; transition: border-color .15s; }
.kcard:hover { border-color: var(--gold); }
.kcard-name { font-weight: 700; font-size: 13.5px; }
.kcard-co { font-size: 12px; color: var(--text-3); }
.kcard-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 9px; }
.score-ring { font-family: var(--font-m); font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 6px; }

/* ---------- TIMELINE VIDEO ---------- */
.vtimeline { background: var(--bg-3); border: 1px solid var(--line); border-radius: 10px; padding: 14px; overflow-x: auto; }
.vtrack { display: flex; gap: 4px; min-width: 500px; }
.vclip { background: var(--gold-dim); border: 1px solid var(--gold); color: var(--gold-2); border-radius: 7px; padding: 8px 10px; font-size: 11.5px; font-weight: 600; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.vruler { display: flex; justify-content: space-between; font-family: var(--font-m); font-size: 10px; color: var(--text-3); margin-top: 8px; min-width: 500px; }

/* ---------- SLIDES ---------- */
.slide-thumb { aspect-ratio: 16/9; background: var(--bg-3); border: 1px solid var(--line); border-radius: 10px; padding: 14px; display: flex; flex-direction: column; justify-content: center; overflow: hidden; }
.slide-thumb b { font-family: var(--font-d); font-size: 13px; }
.slide-thumb span { font-size: 11px; color: var(--text-2); margin-top: 4px; }
.slide-view { aspect-ratio: 16/9; background: #0E1017; border: 1px solid var(--line-2); border-radius: 14px; padding: 7%; display: flex; flex-direction: column; justify-content: center; }
.slide-view b { font-family: var(--font-d); font-size: clamp(20px, 3.4vw, 34px); }
.slide-view span { font-size: clamp(13px, 1.8vw, 18px); color: var(--text-2); margin-top: 12px; }
.slide-view .snum { position: absolute; }

/* ---------- OODA ---------- */
.ooda-track { display: flex; align-items: center; gap: 0; margin: 8px 0 4px; }
.ooda-step { flex: 1; text-align: center; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; color: var(--text-3); position: relative; padding-top: 16px; }
.ooda-step::before { content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 11px; height: 11px; border-radius: 50%; background: var(--line-2); }
.ooda-step.done::before, .ooda-step.now::before { background: var(--gold); }
.ooda-step.done, .ooda-step.now { color: var(--gold-2); }

/* Mensajería chat */
.chat-list { border-right: 1px solid var(--line); overflow-y: auto; }
.chat-thread-item { display: flex; gap: 11px; padding: 13px 14px; border-bottom: 1px solid var(--line); cursor: pointer; transition: background .12s; }
.chat-thread-item:hover, .chat-thread-item.sel { background: var(--bg-3); }
.chat-bubble { max-width: 78%; padding: 9px 13px; border-radius: 12px; font-size: 13.5px; }
.chat-bubble.in { align-self: flex-start; background: var(--bg-3); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.chat-bubble.out { align-self: flex-end; background: var(--green-dim); color: #CBEEDD; border-bottom-right-radius: 4px; }
.chat-bubble .via { display: block; font-size: 10px; color: var(--text-3); margin-top: 4px; }

/* Markdown mini */
.md h1, .md h2, .md h3 { margin: 14px 0 8px; }
.md p { margin: 8px 0; }
.md ul { margin: 8px 0 8px 20px; }
.md code { font-family: var(--font-m); background: var(--bg-3); padding: 1px 6px; border-radius: 5px; font-size: 12.5px; }

/* Overlay móvil */
.scrim { position: fixed; inset: 0; z-index: 55; background: rgba(5,6,9,.6); display: none; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1100px) {
  .g4 { grid-template-columns: repeat(2, 1fr); }
  .g3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: none; }
  .scrim.show { display: block; }
  .main { margin-left: 0; }
  .menu-btn { display: flex; }
  .content { padding: 18px 16px 110px; }
  .g2, .g3 { grid-template-columns: 1fr; }
  .g4 { grid-template-columns: repeat(2, 1fr); }
  .hermes-panel { width: 100vw; }
  .kpi-value { font-size: 22px; }
  .topbar { padding: 12px 16px; }
  .tbl th:nth-child(n+4), .tbl td:nth-child(n+4) { display: none; }
  .tbl.keep-all th, .tbl.keep-all td { display: table-cell; }
}
@media (max-width: 480px) {
  .g4 { grid-template-columns: 1fr 1fr; }
  .role-grid { grid-template-columns: 1fr; }
}

/* ---------- COMPAT: clases usadas por studio/admin/app ---------- */
.sec-title { font-family: var(--font-d); font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); margin: 18px 0 10px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi-row .kpi { display: flex; align-items: center; gap: 13px; }
.kpi-icon { width: 40px; height: 40px; border-radius: 11px; display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.kpi-val { font-family: var(--font-d); font-size: 23px; font-weight: 800; line-height: 1.1; }
.input-sm { padding: 7px 10px; font-size: 12.5px; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; padding: 10px 12px; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.table td { padding: 11px 12px; border-bottom: 1px solid var(--line); color: var(--text-2); vertical-align: top; }
.table tr:last-child td { border-bottom: none; }
.doc-body { font-size: 14px; line-height: 1.7; color: var(--text-2); }
.doc-body h2, .doc-body h3, .doc-body h4 { color: var(--text); font-family: var(--font-d); margin: 16px 0 8px; }
.doc-body li { margin-left: 18px; list-style: disc; }
.st-title { font-family: var(--font-d); font-size: 13.5px; font-weight: 700; }
.st-sub { font-size: 11px; color: var(--text-2); margin-top: 5px; }
.slide-view { position: relative; }
.sv-num { position: absolute; top: 14px; right: 18px; font-family: var(--font-m); font-size: 12px; color: var(--gold); }
.sv-title { font-family: var(--font-d); font-size: clamp(20px, 3.4vw, 32px); font-weight: 800; }
.sv-sub { font-size: clamp(13px, 1.8vw, 17px); color: var(--text-2); margin-top: 12px; line-height: 1.55; }
.vtrack { display: flex; align-items: center; gap: 10px; margin-top: 8px; min-width: 500px; }
.vtrack-label { width: 46px; font-family: var(--font-m); font-size: 9.5px; letter-spacing: .08em; flex-shrink: 0; }
.vtrack-lane { position: relative; flex: 1; height: 34px; background: var(--bg-2); border-radius: 7px; border: 1px solid var(--line); }
.vtrack-lane .vclip { position: absolute; top: 3px; bottom: 3px; padding: 0 8px; display: flex; align-items: center; font-size: 10.5px; }
#dbtns { display: flex; flex-direction: column; gap: 12px; margin-top: 18px; }
@media (max-width: 900px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid-3 { grid-template-columns: 1fr; } .hide-sm { display: none; } }
