/* xPanel · app.css · Estilos globales */

:root {
  --bg:           #0f1117;
  --sidebar-bg:   #161b27;
  --surface:      #1a2035;
  --surface2:     #202840;
  --border:       #2a3450;
  --border-bright:#3a4870;
  --accent:       #3b82f6;
  --accent-dim:   #1d4ed8;
  --accent-glow:  rgba(59,130,246,0.15);
  --warning:      #f59e0b;
  --danger:       #ef4444;
  --success:      #10b981;
  --text:         #e2e8f0;
  --text-dim:     #8899bb;
  --text-muted:   #4a5578;
  --header-h:     42px;
  --sidebar-w:    200px;
  --toolbar-h:    32px;
  --mono:         'IBM Plex Mono', monospace;
  --sans:         'IBM Plex Sans', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 13px;
}

/* ── App shell ── */
.app-shell { display: flex; flex-direction: column; height: 100vh; overflow: hidden; }
.app-main   { flex: 1; display: flex; overflow: hidden; }
.app-content{ flex: 1; display: flex; flex-direction: column; overflow: hidden; }

/* ── Top header ── */
.top-header {
  height: var(--header-h);
  background: linear-gradient(90deg, #0d1829, #13203d 60%, #0d1829);
  border-bottom: 1px solid var(--border-bright);
  display: flex; align-items: center; padding: 0 16px; gap: 16px;
  flex-shrink: 0; position: relative; z-index: 10;
}
.top-header::after {
  content:''; position:absolute; bottom:-3px; left:0; right:0;
  height:2px; background:linear-gradient(90deg,transparent,var(--accent),transparent); opacity:.5;
}
.logo { font-family:var(--mono); font-size:15px; font-weight:600; letter-spacing:.08em; color:#fff; display:flex; align-items:center; gap:8px; }
.logo-dot { width:8px; height:8px; background:var(--accent); border-radius:50%; box-shadow:0 0 8px var(--accent); animation:pulse 2s ease-in-out infinite; }
@keyframes pulse { 0%,100%{box-shadow:0 0 6px var(--accent)}50%{box-shadow:0 0 14px var(--accent)} }
.header-breadcrumb { color:var(--text-dim); font-size:11px; font-family:var(--mono); display:flex; align-items:center; gap:6px; }
.header-breadcrumb span { color:var(--accent); }
.header-right { margin-left:auto; display:flex; align-items:center; gap:12px; }
.header-badge { background:var(--accent-glow); border:1px solid var(--accent); color:var(--accent); font-family:var(--mono); font-size:10px; padding:2px 8px; border-radius:3px; }
.header-user  { display:flex; align-items:center; gap:6px; color:var(--text-dim); font-size:11px; }
.avatar { width:26px; height:26px; background:linear-gradient(135deg,var(--accent-dim),var(--accent)); border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:11px; font-weight:600; color:#fff; }

/* ── Sidebar ── */
.sidebar { width:var(--sidebar-w); background:var(--sidebar-bg); border-right:1px solid var(--border); display:flex; flex-direction:column; overflow:hidden; overflow-y:auto; flex-shrink:0; }
.sidebar-section { border-bottom:1px solid var(--border); }
.sidebar-item { display:flex; align-items:center; padding:8px 14px; gap:8px; color:var(--text-dim); font-size:12px; cursor:pointer; transition:all .15s; text-decoration:none; border-left:2px solid transparent; }
.sidebar-item:hover { background:rgba(59,130,246,.06); color:var(--text); border-left-color:var(--border-bright); }
.sidebar-item.active,.sidebar-item:active { background:rgba(59,130,246,.10); color:#fff; border-left-color:var(--accent); }
.sidebar-group-header { padding:6px 14px 4px; font-family:var(--mono); font-size:10px; letter-spacing:.1em; color:var(--accent); text-transform:uppercase; display:flex; align-items:center; justify-content:space-between; cursor:pointer; user-select:none; }
.sidebar-group-header:hover { background:rgba(255,255,255,.02); }
.sidebar-group-items {}
.sidebar-sub-item { display:flex; align-items:center; padding:6px 14px 6px 28px; gap:6px; color:var(--text-dim); font-size:12px; cursor:pointer; transition:all .15s; border-left:2px solid transparent; text-decoration:none; }
.sidebar-sub-item:hover { background:rgba(59,130,246,.06); color:var(--text); }
.sidebar-sub-item.active { background:rgba(59,130,246,.12); color:#fff; border-left-color:var(--accent); }
.si-icon { font-size:13px; width:14px; flex-shrink:0; }
.si-dot { width:5px; height:5px; border-radius:50%; background:var(--text-muted); flex-shrink:0; }
.sidebar-sub-item.active .si-dot { background:var(--accent); }

/* ── Toolbar ── */
.toolbar { height:var(--toolbar-h); background:var(--surface); border-bottom:1px solid var(--border); display:flex; align-items:center; padding:0 8px; gap:2px; flex-shrink:0; }
.tb-btn { height:24px; padding:0 10px; background:transparent; border:1px solid transparent; border-radius:3px; color:var(--text-dim); font-family:var(--sans); font-size:12px; cursor:pointer; display:flex; align-items:center; gap:5px; transition:all .15s; white-space:nowrap; }
.tb-btn:hover { background:rgba(255,255,255,.05); border-color:var(--border); color:var(--text); }
.tb-btn.primary { background:var(--accent-glow); border-color:var(--accent); color:var(--accent); }
.tb-btn.primary:hover { background:rgba(59,130,246,.25); }
.tb-btn .shortcut { font-family:var(--mono); font-size:9px; color:var(--text-muted); background:rgba(255,255,255,.06); border-radius:2px; padding:1px 4px; }
.tb-sep { width:1px; height:18px; background:var(--border); margin:0 4px; }

/* ── Page title bar ── */
.page-title-bar { height:36px; background:var(--surface); border-bottom:1px solid var(--border); display:flex; align-items:center; padding:0 16px; gap:10px; flex-shrink:0; }
.page-title { font-family:var(--mono); font-size:11px; color:var(--text-dim); letter-spacing:.05em; display:flex; align-items:center; gap:6px; }
.page-title strong { color:var(--text); font-weight:500; }
.page-title .sep { color:var(--text-muted); }
.record-count { margin-left:auto; font-family:var(--mono); font-size:10px; color:var(--text-muted); background:rgba(255,255,255,.04); border:1px solid var(--border); border-radius:3px; padding:2px 8px; }
.record-count span { color:var(--warning); }

/* ── Splitter ── */
.splitter-container { flex:1; display:flex; flex-direction:column; overflow:hidden; }
.panel-top    { display:flex; flex-direction:column; overflow:hidden; flex: 1 1 55%; min-height:120px; }
.panel-bottom { display:flex; flex-direction:column; overflow:hidden; flex: 1 1 45%; min-height:100px; }
.splitter-bar { height:6px; background:var(--bg); border-top:1px solid var(--border); border-bottom:1px solid var(--border); cursor:row-resize; display:flex; align-items:center; justify-content:center; flex-shrink:0; transition:background .15s; }
.splitter-bar:hover { background:var(--accent-glow); }
.splitter-handle { display:flex; gap:3px; }
.splitter-handle div { width:24px; height:2px; background:var(--border-bright); border-radius:2px; }

/* ── Panel header ── */
.panel-header { height:30px; background:var(--surface2); border-bottom:1px solid var(--border); display:flex; align-items:center; padding:0 12px; gap:8px; flex-shrink:0; }
.panel-header-title { font-family:var(--mono); font-size:11px; color:var(--text-dim); letter-spacing:.04em; }
.panel-header-title .hl { color:var(--accent); }
.panel-count { font-family:var(--mono); font-size:10px; color:var(--warning); background:rgba(245,158,11,.1); border:1px solid rgba(245,158,11,.3); border-radius:3px; padding:1px 6px; }

/* ── Bottom toolbar ── */
.bottom-toolbar { height:var(--toolbar-h); background:var(--surface); border-bottom:1px solid var(--border); display:flex; align-items:center; padding:0 8px; gap:6px; flex-shrink:0; }
.selected-event-label { font-size:11px; color:var(--text-dim); white-space:nowrap; }
.selected-event-box { flex:1; max-width:420px; height:22px; background:var(--bg); border:1px solid var(--border); border-radius:3px; padding:0 8px; font-family:var(--mono); font-size:11px; color:var(--accent); display:flex; align-items:center; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; cursor:default; }
.selected-event-box.empty { color:var(--text-muted); }

/* ── Grid ── */
.grid-wrapper { flex:1; overflow:auto; position:relative; }
table { width:100%; border-collapse:collapse; font-size:12px; }
thead { position:sticky; top:0; z-index:2; }
th { background:var(--surface2); border-right:1px solid var(--border); border-bottom:2px solid var(--border-bright); padding:0 10px; height:32px; text-align:left; font-family:var(--mono); font-size:10px; font-weight:600; color:var(--text-dim); letter-spacing:.06em; text-transform:uppercase; white-space:nowrap; cursor:pointer; user-select:none; transition:color .1s; }
th:hover { color:var(--text); }
th.sorted { color:var(--accent); }
th .sort-icon { margin-left:4px; opacity:.5; font-size:9px; }
.filter-row td { background:rgba(0,0,0,.3); border-bottom:1px solid var(--border-bright); padding:2px 4px; }
.filter-input { width:100%; height:20px; background:var(--bg); border:1px solid var(--border); border-radius:2px; padding:0 6px; color:var(--text); font-family:var(--mono); font-size:10px; outline:none; transition:border-color .15s; }
.filter-input:focus { border-color:var(--accent); }
.filter-input::placeholder { color:var(--text-muted); }
tbody tr { border-bottom:1px solid rgba(42,52,80,.7); transition:background .1s; cursor:pointer; }
tbody tr:nth-child(even) { background:rgba(255,255,255,.02); }
tbody tr:hover { background:rgba(59,130,246,.07) !important; }
tbody tr.selected { background:rgba(59,130,246,.14) !important; outline:1px solid rgba(59,130,246,.4); outline-offset:-1px; }
td { padding:4px 10px; height:24px; border-right:1px solid rgba(42,52,80,.5); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:180px; }
td:first-child { text-align:center; color:var(--text-muted); font-family:var(--mono); font-size:10px; width:36px; max-width:36px; }
td.cmd-col { text-align:center; width:44px; max-width:44px; }
.edit-btn { background:transparent; border:1px solid var(--border); border-radius:2px; color:var(--text-dim); font-size:11px; padding:1px 6px; cursor:pointer; transition:all .15s; font-family:var(--mono); }
.edit-btn:hover { border-color:var(--accent); color:var(--accent); background:var(--accent-glow); }

/* ── Badges ── */
.badge { display:inline-flex; align-items:center; border-radius:3px; padding:1px 6px; font-family:var(--mono); font-size:10px; font-weight:500; white-space:nowrap; }
.badge-ok      { background:rgba(16,185,129,.12); color:var(--success); border:1px solid rgba(16,185,129,.3); }
.badge-warn    { background:rgba(245,158,11,.12);  color:var(--warning); border:1px solid rgba(245,158,11,.3); }
.badge-danger  { background:rgba(239,68,68,.12);   color:var(--danger);  border:1px solid rgba(239,68,68,.3); }
.badge-info    { background:rgba(59,130,246,.12);  color:var(--accent);  border:1px solid rgba(59,130,246,.3); }
.badge-neutral { background:rgba(255,255,255,.06); color:var(--text-dim);border:1px solid var(--border); }
.alarm-count { display:inline-flex; align-items:center; justify-content:center; min-width:20px; height:18px; border-radius:9px; font-family:var(--mono); font-size:10px; font-weight:600; padding:0 6px; }
.alarm-count.zero { background:rgba(255,255,255,.05); color:var(--text-muted); }
.alarm-count.low  { background:rgba(245,158,11,.15);  color:var(--warning); }
.alarm-count.high { background:rgba(239,68,68,.15);   color:var(--danger); }

/* ── Pager ── */
.pager { height:32px; background:var(--surface2); border-top:1px solid var(--border); display:flex; align-items:center; padding:0 10px; gap:4px; flex-shrink:0; }
.pg-btn { width:22px; height:22px; background:transparent; border:1px solid var(--border); border-radius:2px; color:var(--text-dim); font-size:11px; cursor:pointer; display:flex; align-items:center; justify-content:center; transition:all .15s; }
.pg-btn:hover { background:var(--accent-glow); border-color:var(--accent); color:var(--accent); }
.pg-btn:disabled { opacity:.3; cursor:not-allowed; }
.pg-num { width:24px; height:22px; display:flex; align-items:center; justify-content:center; border-radius:2px; font-family:var(--mono); font-size:11px; color:var(--text-dim); cursor:pointer; transition:all .15s; border:1px solid transparent; background:transparent; }
.pg-num:hover { background:rgba(255,255,255,.05); }
.pg-num.active { background:var(--accent-glow); border-color:var(--accent); color:var(--accent); }
.pg-summary { margin-left:auto; font-family:var(--mono); font-size:10px; color:var(--text-muted); }
.pg-summary span { color:var(--text-dim); }

/* ── Modal ── */
.modal-overlay { position:fixed; inset:0; background:rgba(0,0,0,.7); z-index:100; display:flex; align-items:center; justify-content:center; opacity:0; pointer-events:none; transition:opacity .2s; }
.modal-overlay.open { opacity:1; pointer-events:all; }
.modal { background:var(--surface); border:1px solid var(--border-bright); border-radius:6px; width:520px; box-shadow:0 24px 60px rgba(0,0,0,.6); }
.modal-header { height:40px; background:var(--surface2); border-bottom:1px solid var(--border); border-radius:6px 6px 0 0; display:flex; align-items:center; padding:0 16px; gap:8px; }
.modal-title { font-family:var(--mono); font-size:12px; color:var(--text); flex:1; letter-spacing:.04em; }
.modal-close { background:transparent; border:none; color:var(--text-muted); font-size:16px; cursor:pointer; width:24px; height:24px; border-radius:3px; display:flex; align-items:center; justify-content:center; transition:all .15s; }
.modal-close:hover { background:rgba(239,68,68,.15); color:var(--danger); }
.modal-body { padding:20px 16px; display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.field-group { display:flex; flex-direction:column; gap:4px; }
.field-group.full { grid-column:1/-1; }
.field-label { font-size:10px; font-family:var(--mono); color:var(--text-dim); text-transform:uppercase; letter-spacing:.06em; }
.field-input,.field-select { height:30px; background:var(--bg); border:1px solid var(--border); border-radius:3px; padding:0 10px; color:var(--text); font-family:var(--mono); font-size:12px; outline:none; transition:border-color .15s; }
.field-input:focus,.field-select:focus { border-color:var(--accent); }
.field-select { cursor:pointer; appearance:none; background-image:url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%238899bb' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat:no-repeat; background-position:right 8px center; padding-right:24px; }
.modal-footer { padding:12px 16px; border-top:1px solid var(--border); display:flex; justify-content:flex-end; gap:8px; }
.btn { height:30px; padding:0 16px; border-radius:3px; font-family:var(--sans); font-size:12px; cursor:pointer; border:1px solid var(--border); transition:all .15s; }
.btn-cancel { background:transparent; color:var(--text-dim); }
.btn-cancel:hover { background:rgba(255,255,255,.05); color:var(--text); }
.btn-primary { background:var(--accent); border-color:var(--accent); color:#fff; font-weight:500; }
.btn-primary:hover { background:var(--accent-dim); }

/* ── Status bar ── */
.status-bar { height:22px; background:var(--bg); border-top:1px solid var(--border); display:flex; align-items:center; padding:0 12px; gap:16px; flex-shrink:0; }
.status-item { display:flex; align-items:center; gap:4px; font-family:var(--mono); font-size:10px; color:var(--text-muted); }
.status-dot { width:5px; height:5px; border-radius:50%; background:var(--success); }

/* ── Login page ── */
.login-shell { display:flex; align-items:center; justify-content:center; min-height:100vh; }
.bg-grid { position:fixed; inset:0; background-image:linear-gradient(rgba(59,130,246,.04) 1px,transparent 1px),linear-gradient(90deg,rgba(59,130,246,.04) 1px,transparent 1px); background-size:40px 40px; pointer-events:none; }
.bg-glow { position:fixed; width:600px; height:600px; border-radius:50%; background:radial-gradient(circle,rgba(59,130,246,.08) 0%,transparent 70%); top:50%; left:50%; transform:translate(-50%,-50%); pointer-events:none; }
.card { position:relative; z-index:5; width:420px; background:var(--surface); border:1px solid var(--border-bright); border-radius:8px; box-shadow:0 32px 80px rgba(0,0,0,.6); overflow:hidden; animation:cardIn .5s cubic-bezier(.17,.84,.44,1) both; }
@keyframes cardIn { from{opacity:0;transform:translateY(24px) scale(.97)}to{opacity:1;transform:translateY(0) scale(1)} }
.card-header { background:linear-gradient(135deg,#0d1829,#13203d); border-bottom:1px solid var(--border-bright); padding:28px 28px 24px; position:relative; overflow:hidden; }
.card-header::after { content:''; position:absolute; bottom:0; left:0; right:0; height:1px; background:linear-gradient(90deg,transparent,var(--accent),transparent); opacity:.6; }
.logo-row { display:flex; align-items:center; gap:12px; margin-bottom:16px; }
.logo-icon { width:40px; height:40px; background:var(--accent-glow); border:1px solid var(--accent); border-radius:8px; display:flex; align-items:center; justify-content:center; }
.logo-x { font-family:var(--mono); font-size:18px; font-weight:600; color:var(--accent); }
.logo-text { font-family:var(--mono); font-size:18px; font-weight:600; color:#fff; letter-spacing:.04em; }
.logo-text span { color:var(--accent); }
.card-subtitle { font-family:var(--mono); font-size:11px; color:var(--text-muted); letter-spacing:.06em; }
.card-body { padding:24px 28px 28px; }
.lang-row { display:flex; align-items:center; gap:8px; margin-bottom:20px; }
.lang-label { font-size:11px; color:var(--text-muted); font-family:var(--mono); white-space:nowrap; }
.lang-select { flex:1; height:28px; background:var(--bg); border:1px solid var(--border); border-radius:3px; padding:0 8px; color:var(--text-dim); font-family:var(--mono); font-size:11px; outline:none; cursor:pointer; appearance:none; background-image:url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%234a5578' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat:no-repeat; background-position:right 8px center; padding-right:24px; transition:border-color .15s; }
.field { margin-bottom:16px; }
.field-label { display:flex; align-items:center; justify-content:space-between; margin-bottom:5px; }
.field-label-text { font-family:var(--mono); font-size:10px; color:var(--text-dim); text-transform:uppercase; letter-spacing:.08em; }
.field-wrap { position:relative; }
.field-icon { position:absolute; left:10px; top:50%; transform:translateY(-50%); color:var(--text-muted); font-size:13px; pointer-events:none; }
.field-input { width:100%; height:38px; background:var(--bg); border:1px solid var(--border); border-radius:4px; padding:0 12px 0 34px; color:var(--text); font-family:var(--mono); font-size:13px; outline:none; transition:border-color .2s,box-shadow .2s; }
.field-input:focus { border-color:var(--accent); box-shadow:0 0 0 3px rgba(59,130,246,.1); }
.field-input::placeholder { color:var(--text-muted); }
.field-input.error { border-color:var(--danger); }
.pwd-toggle { position:absolute; right:10px; top:50%; transform:translateY(-50%); background:none; border:none; color:var(--text-muted); cursor:pointer; font-size:13px; padding:2px; transition:color .15s; }
.pwd-toggle:hover { color:var(--text-dim); }
.error-msg { font-family:var(--mono); font-size:10px; color:var(--danger); margin-top:4px; display:none; }
.error-msg.show { display:block; }
.remember-row { display:flex; align-items:center; justify-content:space-between; margin-bottom:20px; }
.remember-check { display:flex; align-items:center; gap:6px; cursor:pointer; }
.remember-check input { accent-color:var(--accent); width:13px; height:13px; cursor:pointer; }
.remember-check span { font-size:11px; color:var(--text-dim); font-family:var(--mono); }
.forgot-link { font-family:var(--mono); font-size:11px; color:var(--accent); text-decoration:none; transition:color .15s; }
.forgot-link:hover { color:#93c5fd; text-decoration:underline; }
.submit-btn { width:100%; height:42px; background:linear-gradient(135deg,var(--accent),var(--accent-dim)); border:none; border-radius:4px; color:#fff; font-family:var(--mono); font-size:13px; font-weight:600; letter-spacing:.06em; cursor:pointer; transition:all .2s; position:relative; overflow:hidden; }
.submit-btn:hover { transform:translateY(-1px); box-shadow:0 8px 24px rgba(59,130,246,.35); }
.submit-btn.loading { pointer-events:none; opacity:.8; }
.btn-text { transition:opacity .2s; }
.submit-btn.loading .btn-text { opacity:0; }
.btn-spinner { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; opacity:0; transition:opacity .2s; }
.submit-btn.loading .btn-spinner { opacity:1; }
.spinner { width:18px; height:18px; border:2px solid rgba(255,255,255,.3); border-top-color:#fff; border-radius:50%; animation:spin .7s linear infinite; }
@keyframes spin { to{transform:rotate(360deg)} }
.card-footer { border-top:1px solid var(--border); padding:14px 28px; background:rgba(0,0,0,.15); display:flex; align-items:center; justify-content:center; gap:6px; }
.cf-text { font-family:var(--mono); font-size:10px; color:var(--text-muted); }
.cf-version { background:rgba(255,255,255,.05); border:1px solid var(--border); border-radius:3px; padding:1px 7px; font-family:var(--mono); font-size:10px; color:var(--text-muted); }
.success-overlay { position:absolute; inset:0; background:var(--surface); display:flex; flex-direction:column; align-items:center; justify-content:center; gap:12px; opacity:0; pointer-events:none; transition:opacity .4s; z-index:10; border-radius:8px; }
.success-overlay.show { opacity:1; pointer-events:all; }
.success-icon { width:56px; height:56px; border:2px solid var(--success); border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:22px; color:var(--success); background:rgba(16,185,129,.1); animation:popIn .4s cubic-bezier(.17,.84,.44,1) both; }
@keyframes popIn { from{transform:scale(.5);opacity:0}to{transform:scale(1);opacity:1} }
.success-text { font-family:var(--mono); font-size:13px; color:var(--success); letter-spacing:.06em; }
.success-sub { font-size:11px; color:var(--text-muted); font-family:var(--mono); }
.redirect-bar { width:180px; height:3px; background:var(--border); border-radius:3px; overflow:hidden; margin-top:4px; }
.redirect-fill { height:100%; background:var(--success); border-radius:3px; transition:width 2s linear; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width:5px; height:5px; }
::-webkit-scrollbar-track { background:transparent; }
::-webkit-scrollbar-thumb { background:var(--border-bright); border-radius:3px; }
::-webkit-scrollbar-thumb:hover { background:var(--text-muted); }

/* ── Layout 3 paneles (izq + der + inferior) ── */
/* splitter-h-container ahora llena todo split-top */
.splitter-h-container { display:flex; flex-direction:row; flex:1; border-bottom:2px solid var(--border-bright); overflow:hidden; min-height:0; }
.panel-left  { flex:1; display:flex; flex-direction:column; overflow:hidden; min-width:200px; }
.panel-right { flex:1; display:flex; flex-direction:column; overflow:hidden; min-width:200px; }
.splitter-v-bar { width:6px; background:var(--bg); border-left:1px solid var(--border); border-right:1px solid var(--border); cursor:col-resize; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.splitter-v-bar:hover { background:var(--accent-glow); }
.splitter-v-handle { display:flex; flex-direction:column; gap:3px; }
.splitter-v-handle div { width:2px; height:16px; background:var(--border-bright); border-radius:2px; }

/* ── Main grid (panel inferior grande) ── */
.main-grid-container { flex:1; display:flex; flex-direction:column; overflow:hidden; min-height:0; }

/* ── Icon buttons in grid rows ── */
.icon-btn { background:transparent; border:1px solid transparent; border-radius:2px; color:var(--text-dim); font-size:11px; padding:1px 3px; cursor:pointer; transition:all .15s; line-height:1; }
.icon-btn:hover { border-color:var(--border); color:var(--text); background:rgba(255,255,255,.05); }
.icon-btn.danger:hover  { border-color:var(--danger);  color:var(--danger);  background:rgba(239,68,68,.1); }
.icon-btn.success:hover { border-color:var(--success); color:var(--success); background:rgba(16,185,129,.1); }

/* ── Empty / loading ── */
.empty-msg   { text-align:center; padding:20px; color:var(--text-muted); font-family:var(--mono); font-size:11px; }
.loading-msg { text-align:center; padding:20px; color:var(--text-muted); font-family:var(--mono); font-size:11px; }

/* ── Filtro activo en toolbar ── */
.tb-btn.active { background:rgba(59,130,246,.15); border-color:var(--accent); color:var(--accent); }

/* ── Splitters draggables ──────────────────────────────────────── */

/* Contenedor vertical (split top + bar + bottom) */
.v-split-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
    min-height: 0;
    height: 100%;
}

.split-top {
    display: flex;
    flex-direction: column;
    flex: none;
    height: 300px;   /* altura inicial — el JS la sobreescribe al arrastrar */
    min-height: 80px;
    overflow: hidden;
}

.split-bottom {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 80px;
    overflow: hidden;
    min-height: 0;
}

/* Barra horizontal (arrastra arriba/abajo) */
.splitter-h-bar {
    flex: none;
    height: 6px;
    background: var(--border);
    cursor: row-resize;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
    z-index: 10;
}
.splitter-h-bar:hover,
.splitter-h-bar:active {
    background: var(--accent);
}
.splitter-h-handle {
    display: flex;
    gap: 3px;
    pointer-events: none;
}
.splitter-h-handle div {
    width: 24px;
    height: 2px;
    background: var(--text-muted);
    border-radius: 2px;
}
.splitter-h-bar:hover .splitter-h-handle div,
.splitter-h-bar:active .splitter-h-handle div {
    background: var(--accent);
}

/* Barra vertical (arrastra izq/der) — mejorada */
.splitter-v-bar {
    flex: none;
    width: 6px;
    background: var(--border);
    cursor: col-resize;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
    z-index: 10;
}
.splitter-v-bar:hover,
.splitter-v-bar:active {
    background: var(--accent);
}
.splitter-v-handle {
    display: flex;
    flex-direction: column;
    gap: 3px;
    pointer-events: none;
}
.splitter-v-handle div {
    width: 2px;
    height: 20px;
    background: var(--text-muted);
    border-radius: 2px;
}
.splitter-v-bar:hover .splitter-v-handle div,
.splitter-v-bar:active .splitter-v-handle div {
    background: var(--accent);
}
