/* ============================================================
   app.css — Componentes (look iOS / flotante)
   Bootstrap aporta solo la mecanica; la estetica vive aqui.
   ============================================================ */

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 400;
  background: var(--bg-gradient, var(--bg));
  background-attachment: fixed;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  transition: background var(--transition), color var(--transition);
}

a { color: var(--brand); text-decoration: none; }

/* ---- Shell con sidebar flotante ---- */
.app-shell {
  display: flex;
  min-height: 100vh;
  gap: var(--gap);
  padding: var(--gap);
}

.sidebar {
  position: sticky;
  top: var(--gap);
  align-self: flex-start;
  width: var(--sidebar-w);
  height: calc(100vh - (var(--gap) * 2));
  background: var(--sidebar-bg);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  border: 1px solid var(--sidebar-border);
  border-radius: 30px;
  box-shadow: var(--sidebar-shadow, var(--shadow));
  display: flex;
  flex-direction: column;
  padding: 20px 0 18px 0;
  overflow: hidden;
  transition: width var(--transition);
  flex-shrink: 0;
}

.app-shell.collapsed .sidebar { width: var(--sidebar-w-collapsed); }

/* logo */
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 18px 18px 24px;
  min-height: 52px;
}
.sidebar-logo img { width: 38px; height: 38px; border-radius: 10px; object-fit: cover; background:#fff; }
.sidebar-logo .brand-name {
  font-weight: 800; font-size: 1.05rem; color: var(--sidebar-text);
  white-space: nowrap; overflow: hidden;
}
.collapsed .sidebar-logo .brand-name { display: none; }

/* navegacion */
.sidebar-nav { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding: 8px 0; }
.sidebar-nav::-webkit-scrollbar { display: none; }
.sidebar-nav { scrollbar-width: none; }
.nav-link-emp {
  display: flex; align-items: center; gap: 13px;
  padding: 13px 14px 13px 20px; min-height: 48px;
  margin: 0 0 0 14px;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  color: var(--sidebar-text);
  font-weight: 700; font-size: .94rem;
  white-space: nowrap; overflow: hidden;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition), transform var(--transition);
}
.nav-link-emp:hover { background: var(--sidebar-hover); color: var(--sidebar-text); transform: translateX(1px); }
.nav-link-emp.active {
  background: var(--sidebar-active-bg);
  color: var(--sidebar-active-text);
  box-shadow: var(--sidebar-active-shadow, var(--shadow));
}
.nav-link-emp.active:hover { transform: none; }
.nav-link-emp svg { width: 20px; height: 20px; flex-shrink: 0; }
.nav-link-emp iconify-icon { font-size: 22px; flex-shrink: 0; line-height: 0; }
.collapsed .nav-link-emp .label { display: none; }
.collapsed .nav-link-emp {
  justify-content: center;
  padding: 13px 0; margin: 0 12px;
  border-radius: var(--radius-sm);
}

/* bloque de usuario abajo */
.sidebar-user {
  border-top: 1px solid var(--sidebar-border);
  padding: 14px 14px 0; margin-top: 10px;
  display: flex; flex-direction: column; gap: 8px;
}
.user-row { display: flex; align-items: center; gap: 10px; padding: 6px 8px; }
.user-avatar {
  width: 36px; height: 36px; border-radius: var(--radius-pill);
  background: var(--brand-gradient); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; flex-shrink: 0;
}
.user-meta { overflow: hidden; }
.user-meta .name { font-weight: 800; font-size: .88rem; color: var(--sidebar-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-meta .sub  { font-size: .76rem; color: var(--sidebar-muted); }
.collapsed .user-meta, .collapsed .user-actions .label, .collapsed .theme-dots-label { display: none; }

.user-actions { display: flex; gap: 8px; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--sidebar-border); background: var(--sidebar-hover);
  color: var(--sidebar-muted); cursor: pointer;
  border-radius: var(--radius-sm); padding: 9px 12px;
  font-family: inherit; font-weight: 700; font-size: .82rem;
  transition: all var(--transition); flex: 1;
}
.icon-btn:hover { background: var(--sidebar-active-bg); color: var(--sidebar-text); }
.icon-btn svg { width: 18px; height: 18px; }

/* selector de tema (3 puntos) */
.theme-dots { display: flex; align-items: center; gap: 10px; padding: 4px 8px; }
.theme-dots-label { font-size: .76rem; color: var(--sidebar-muted); font-weight: 700; margin-right: auto; }
.tdot {
  width: 22px; height: 22px; border-radius: 50%; cursor: pointer; border: 2px solid transparent;
  box-shadow: 0 0 0 1px var(--sidebar-border); transition: all var(--transition); padding: 0;
}
.tdot:hover { transform: scale(1.12); }
.tdot.active { border-color: #fff; box-shadow: 0 0 0 2px var(--brand); }
.tdot-celeste { background: linear-gradient(135deg, #7cc4fb, #5b8def); }
.tdot-rojo    { background: linear-gradient(135deg, #f97316, #dc2626); }
.tdot-oscuro  { background: linear-gradient(135deg, #1f2937, #0b1220); }
.collapsed .theme-dots { flex-direction: column; gap: 8px; }

/* ---- Contenido ---- */
.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--gap); }
.page-head h1 { font-size: 1.5rem; font-weight: 800; margin: 4px 2px 0; }
.page-head p  { color: var(--text-muted); margin: 4px 2px 0; }

.card-emp {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  transition: box-shadow var(--transition), transform var(--transition);
}
.card-emp.hoverable:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }

.grid { display: grid; gap: var(--gap); }
.grid.kpis { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

.kpi .kpi-label { color: var(--text-muted); font-size: .85rem; font-weight: 600; }
.kpi .kpi-value { font-size: 2rem; font-weight: 800; margin-top: 6px; }
.kpi .kpi-chip {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 10px;
  font-size: .78rem; font-weight: 700; padding: 4px 10px; border-radius: var(--radius-pill);
}
.chip-success { background: var(--success-soft); color: var(--success); }
.chip-warning { background: var(--warning-soft); color: var(--warning); }
.chip-danger  { background: var(--danger-soft);  color: var(--danger); }

/* ---- Botones de marca ---- */
.btn-brand {
  background: var(--brand); color: var(--brand-contrast);
  border: none; border-radius: var(--radius-sm);
  padding: 11px 18px; font-family: inherit; font-weight: 700; cursor: pointer;
  transition: filter var(--transition), transform var(--transition);
}
.btn-brand:hover { filter: brightness(1.05); }
.btn-brand:active { transform: scale(.98); }
.btn-danger {
  background: var(--danger); color: #fff; border: none; border-radius: var(--radius-sm);
  padding: 11px 18px; font-family: inherit; font-weight: 700; cursor: pointer;
  transition: filter var(--transition), transform var(--transition);
}
.btn-danger:hover { filter: brightness(1.05); }
.btn-danger:active { transform: scale(.98); }

/* ---- Mensajes flash ---- */
.flash {
  padding: 13px 16px; border-radius: var(--radius-sm); font-weight: 600; font-size: .9rem;
  border: 1px solid transparent;
}
.flash-success { background: var(--success-soft); color: var(--success); }
.flash-warning { background: var(--warning-soft); color: var(--warning); }
.flash-danger  { background: var(--danger-soft);  color: var(--danger); }
.flash-info    { background: var(--brand-soft);   color: var(--brand); }

/* ---- Toasts (notificaciones flotantes) ---- */
.toast-stack {
  position: fixed; top: 18px; right: 18px; z-index: 1200;
  display: flex; flex-direction: column; gap: 10px; max-width: min(380px, calc(100vw - 36px));
}
.toast-emp {
  display: flex; align-items: flex-start; gap: 11px;
  background: var(--surface); border: 1px solid var(--border);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-lg);
  padding: 13px 14px; font-size: .9rem; font-weight: 600; color: var(--text);
  animation: toastIn .28s cubic-bezier(.21,1.02,.73,1);
}
.toast-emp.leaving { animation: toastOut .25s ease forwards; }
.toast-emp .toast-ic { flex-shrink: 0; width: 20px; height: 20px; margin-top: 1px; }
.toast-emp .toast-body { flex: 1; min-width: 0; }
.toast-emp .toast-close { flex-shrink: 0; background: none; border: none; cursor: pointer;
  color: var(--text-soft); padding: 2px; border-radius: 6px; line-height: 0; }
.toast-emp .toast-close:hover { color: var(--text); background: var(--surface-hover); }
.toast-emp .toast-close svg { width: 15px; height: 15px; }
.toast-success { border-left-color: var(--success); } .toast-success .toast-ic { color: var(--success); }
.toast-warning { border-left-color: var(--warning); } .toast-warning .toast-ic { color: var(--warning); }
.toast-danger  { border-left-color: var(--danger); }  .toast-danger .toast-ic  { color: var(--danger); }
.toast-info    { border-left-color: var(--brand); }   .toast-info .toast-ic    { color: var(--brand); }
@keyframes toastIn  { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(30px); height: 0; padding-top: 0; padding-bottom: 0; margin: 0; } }

/* ---- Modal de confirmación ---- */
.modal-emp {
  position: fixed; inset: 0; z-index: 1300; display: none;
  align-items: center; justify-content: center; padding: 24px;
  background: rgba(15,23,42,.45); backdrop-filter: blur(2px);
}
.modal-emp.show { display: flex; animation: fadeIn .15s ease; }
.modal-emp-card {
  background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  padding: 26px 24px 22px; max-width: 400px; width: 100%; text-align: center;
  animation: popIn .2s cubic-bezier(.21,1.02,.73,1);
}
.modal-emp-ic {
  width: 60px; height: 60px; border-radius: 50%; margin: 0 auto 14px;
  display: flex; align-items: center; justify-content: center;
  background: var(--danger-soft); color: var(--danger);
}
.modal-emp-ic svg { width: 30px; height: 30px; }
.modal-emp-card h3 { font-weight: 800; font-size: 1.15rem; margin: 0 0 6px; }
.modal-emp-card p  { color: var(--text-muted); margin: 0 0 20px; font-size: .92rem; }
.modal-emp-actions { display: flex; gap: 10px; }
.modal-emp-actions > * { flex: 1; justify-content: center; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn  { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }

/* ---- Estado vacío guiado ---- */
.empty-state { text-align: center; padding: 40px 24px; }
.empty-state .empty-ic {
  width: 64px; height: 64px; border-radius: 18px; margin: 0 auto 14px;
  display: flex; align-items: center; justify-content: center;
  background: var(--brand-soft); color: var(--brand);
}
.empty-state .empty-ic svg { width: 32px; height: 32px; }
.empty-state h3 { font-weight: 800; font-size: 1.05rem; margin: 0 0 4px; color: var(--text); }
.empty-state p  { color: var(--text-muted); margin: 0 auto 18px; font-size: .9rem; max-width: 360px; }

/* ---- Tablas ---- */
.table-emp { width: 100%; border-collapse: collapse; }
.table-emp th {
  text-align: left; font-size: .76rem; text-transform: uppercase; letter-spacing: .04em;
  color: var(--text-soft); font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--border);
}
.table-emp td { padding: 13px 12px; border-bottom: 1px solid var(--border-soft); font-size: .9rem; }
.table-emp tr:last-child td { border-bottom: none; }
.table-emp tbody tr { transition: background var(--transition); }
.table-emp tbody tr:hover { background: var(--surface-hover); }
.table-emp.striped tbody tr:nth-of-type(odd) td { background: var(--surface-2); }
.table-emp.striped tbody tr:hover td { background: var(--surface-hover); }

/* ============================================================
   Controles (casillas, desplegables, tablas) — Bootstrap tematizado
   La mecánica de Bootstrap, la estética del tema.
   ============================================================ */

/* -- Casillas y radios nativos (mejora global sin tocar markup) -- */
input[type="checkbox"],
input[type="radio"] {
  width: 18px; height: 18px; accent-color: var(--brand);
  cursor: pointer; vertical-align: -3px;
}

/* -- Bootstrap .form-check tematizado -- */
.form-check-input {
  width: 1.15em; height: 1.15em; background-color: var(--surface);
  border: 1.5px solid var(--border); cursor: pointer;
  transition: background-color var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }
.form-check-input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.form-check-input:checked[type="checkbox"] {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e");
}
.form-check-label { font-weight: 600; color: var(--text); cursor: pointer; }
.form-switch .form-check-input:checked { background-color: var(--brand); }

/* -- Interruptor (switch) reutilizable: <input type="checkbox" class="switch"> -- */
.switch, .form-field input.switch {
  appearance: none; -webkit-appearance: none;
  position: relative; flex-shrink: 0;
  width: 42px; height: 24px; padding: 0; border-radius: 999px;
  background: var(--border); border: none; cursor: pointer; vertical-align: -7px;
  transition: background var(--transition);
}
.switch::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 20px; height: 20px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(15,23,42,.25); transition: transform var(--transition);
}
.switch:checked { background: var(--brand); }
.switch:checked::after { transform: translateX(18px); }
.switch:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--brand-soft); }

/* -- Desplegables (select) con caret propio del tema -- */
.form-select,
.form-field select,
select.input-emp {
  width: 100%; padding: 11px 40px 11px 13px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background-color: var(--surface-2); color: var(--text);
  font-family: inherit; font-size: .92rem; font-weight: 600;
  -webkit-appearance: none; appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%235f6778' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.6' d='M4 6l4 4 4-4'/%3e%3c/svg%3e");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 16px;
  transition: border var(--transition), box-shadow var(--transition);
}
.form-select:focus,
.form-field select:focus,
select.input-emp:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft);
}

/* -- Select con buscador (combobox) -- */
.ss { position: relative; width: 100%; }
.ss-native { display: none !important; }
.ss-control {
  width: 100%; display: flex; align-items: center; gap: 8px;
  padding: 11px 13px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface-2); color: var(--text); font-family: inherit; font-size: .92rem; font-weight: 600;
  cursor: pointer; text-align: left; transition: border var(--transition), box-shadow var(--transition);
}
.ss-control:focus, .ss:focus-within .ss-control { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.ss-control .ss-value { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ss-control .ss-value.is-placeholder { color: var(--text-soft); font-weight: 500; }
.ss-control .ss-caret { width: 16px; height: 16px; color: var(--text-soft); flex-shrink: 0; }
.ss-pop {
  position: absolute; z-index: 50; top: calc(100% + 6px); left: 0; right: 0;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg); overflow: hidden; animation: popIn .12s ease;
}
.ss-search { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-bottom: 1px solid var(--border-soft); }
.ss-search i { width: 15px; height: 15px; color: var(--text-soft); flex-shrink: 0; }
.ss-search input { flex: 1; border: none; outline: none; background: transparent; color: var(--text); font-family: inherit; font-size: .9rem; }
.ss-list { list-style: none; margin: 0; padding: 6px; max-height: 240px; overflow-y: auto; }
.ss-opt { padding: 9px 11px; border-radius: var(--radius-xs); font-size: .9rem; font-weight: 600; cursor: pointer;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ss-opt:hover, .ss-opt.hl { background: var(--surface-hover); }
.ss-opt.sel { background: var(--brand-soft); color: var(--brand); }
.ss-empty { padding: 12px; text-align: center; color: var(--text-soft); font-size: .85rem; }
/* multi-selección: checkboxes en la lista */
.ss-checkable { display: flex; align-items: center; gap: 9px; }
.ss-checkable .ss-box { flex-shrink: 0; width: 17px; height: 17px; border-radius: 5px;
  border: 1.5px solid var(--border); background: var(--surface); position: relative; transition: all var(--transition); }
.ss-checkable.sel .ss-box { background: var(--brand); border-color: var(--brand); }
.ss-checkable.sel .ss-box::after { content: ''; position: absolute; left: 5px; top: 1.5px; width: 4px; height: 9px;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.ss-checkable.sel { background: transparent; color: var(--text); }
.ss-checkable:hover { background: var(--surface-hover); }
.ss-foot { display: flex; gap: 8px; padding: 9px 10px; border-top: 1px solid var(--border-soft); }
.ss-foot button { flex: 1; border-radius: var(--radius-xs); padding: 8px; font-family: inherit; font-weight: 700; font-size: .82rem; cursor: pointer; }
.ss-clear { background: var(--surface-2); color: var(--text-muted); border: 1px solid var(--border); }
.ss-clear:hover { background: var(--surface-hover); color: var(--text); }
.ss-apply { background: var(--brand); color: #fff; border: none; }
.ss-apply:hover { filter: brightness(1.05); }

/* -- Tablas Bootstrap (.table) tematizadas, mismo look que .table-emp -- */
.table {
  --bs-table-bg: transparent; --bs-table-color: var(--text);
  width: 100%; margin-bottom: 0; color: var(--text); vertical-align: middle;
}
.table > thead th {
  text-align: left; font-size: .76rem; text-transform: uppercase; letter-spacing: .04em;
  color: var(--text-soft); font-weight: 700; padding: 10px 12px;
  border-bottom: 1px solid var(--border); background: transparent;
}
.table > tbody td { padding: 13px 12px; border-bottom: 1px solid var(--border-soft); font-size: .9rem; }
.table > tbody tr:last-child td { border-bottom: none; }
.table-hover > tbody tr { transition: background var(--transition); }
.table-hover > tbody tr:hover { background: var(--surface-hover); }
.table-striped > tbody tr:nth-of-type(odd) td { background: var(--surface-2); }

/* ---- Badges de estado ---- */
.badge-emp {
  display: inline-flex; align-items: center; gap: 5px; font-size: .74rem; font-weight: 700;
  padding: 4px 10px; border-radius: var(--radius-pill);
}
.badge-ok   { background: var(--success-soft); color: var(--success); }
.badge-warn { background: var(--warning-soft); color: var(--warning); }
.badge-err  { background: var(--danger-soft);  color: var(--danger); }
.badge-mut  { background: var(--surface-2); color: var(--text-muted); border: 1px solid var(--border); }

/* ---- Formularios ---- */
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.form-field label { display: block; font-weight: 700; font-size: .82rem; margin-bottom: 6px; color: var(--text-muted); }
.form-field input, .form-field select, .form-field textarea {
  width: 100%; padding: 11px 13px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface-2); color: var(--text); font-family: inherit; font-size: .92rem;
  transition: border var(--transition), box-shadow var(--transition);
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft);
}
.form-actions { display: flex; gap: 10px; margin-top: 22px; }
.btn-ghost {
  background: var(--surface-2); color: var(--text-muted); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 11px 18px; font-family: inherit; font-weight: 700;
  cursor: pointer; transition: all var(--transition);
}
.btn-ghost:hover { background: var(--surface-hover); color: var(--text); }
.section-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.fieldset-title { font-weight: 800; font-size: 1rem; margin: 8px 0 2px; color: var(--text); }

/* selector de tema (chips) */
.tema-opciones { display: flex; gap: 12px; }
.tema-chip { cursor: pointer; border-radius: var(--radius-sm); padding: 4px; border: 2px solid transparent; }
.tema-chip input { display: none; }
.tema-chip .swatch { width: 64px; height: 38px; border-radius: 10px; }
.tema-chip.sel { border-color: var(--brand); }

@media (max-width: 720px) { .form-grid { grid-template-columns: 1fr; } }

/* ---- Tabs ---- */
.tabs-emp { display: flex; gap: 6px; background: var(--surface); padding: 6px; border-radius: var(--radius-pill);
  box-shadow: var(--shadow-sm); width: fit-content; }
.tab-btn {
  border: none; background: transparent; color: var(--text-muted); cursor: pointer;
  padding: 9px 18px; border-radius: var(--radius-pill); font-family: inherit; font-weight: 700; font-size: .88rem;
  transition: all var(--transition);
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { background: var(--brand); color: var(--brand-contrast); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ---- Botones rápidos de rango ---- */
.quick-range { display: flex; flex-wrap: wrap; gap: 6px; }
.qr-btn {
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text-muted);
  border-radius: var(--radius-pill); padding: 6px 13px; font-family: inherit; font-weight: 700;
  font-size: .8rem; cursor: pointer; transition: all var(--transition);
}
.qr-btn:hover { background: var(--brand-soft); color: var(--brand); border-color: var(--brand-soft); }

/* ---- Buscador de tabla ---- */
.table-search {
  display: flex; align-items: center; gap: 8px; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0 12px; max-width: 320px;
}
.table-search i { width: 16px; height: 16px; color: var(--text-soft); }
.table-search input {
  border: none; background: transparent; padding: 10px 0; font-family: inherit; font-size: .9rem;
  color: var(--text); width: 100%; outline: none;
}

/* ---- Charts ---- */
.chart-card { position: relative; }
.chart-box { position: relative; height: 260px; }
.charts-grid { display: grid; gap: var(--gap); grid-template-columns: 1.4fr 1fr; }
@media (max-width: 860px) { .charts-grid { grid-template-columns: 1fr; } }

/* ---- Modal propio ---- */
.modal-emp {
  display: none; position: fixed; inset: 0; z-index: 80;
  background: rgba(15, 23, 42, .45); align-items: center; justify-content: center; padding: 20px;
}
.modal-emp.open { display: flex; }
.modal-emp-card {
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-lg);
  padding: 26px; width: 100%; max-width: 420px; max-height: 90vh; overflow-y: auto;
}
.modal-emp-card h3 { font-weight: 800; font-size: 1.15rem; margin: 0 0 18px; }

/* ---- Hamburguesa (movil) ---- */
.menu-toggle {
  display: none; position: fixed; top: 16px; left: 16px; z-index: 50;
  width: 44px; height: 44px; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow-sm); cursor: pointer; align-items: center; justify-content: center;
}
.sidebar-backdrop { display: none; }

/* ---- Responsive ---- */
@media (max-width: 860px) {
  .app-shell { padding: 0; }
  .menu-toggle { display: inline-flex; }
  .sidebar {
    position: fixed; top: 0; left: 0; z-index: 60;
    height: 100vh; border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    transform: translateX(-110%);
  }
  .app-shell.nav-open .sidebar { transform: translateX(0); }
  .app-shell.nav-open .sidebar-backdrop {
    display: block; position: fixed; inset: 0; z-index: 55;
    background: rgba(15, 23, 42, .4);
  }
  .app-main { padding: 72px 16px 16px; }
}
