/* ============================================================
   NEVOX · Global Stylesheet
   ============================================================
   Importar en todas las páginas:
   <link rel="stylesheet" href="/assets/css/style.css">
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

/* ── VARIABLES ───────────────────────────────────────────── */
:root {
  /* Marca */
  --brand:        #16A34A;
  --brand-hover:  #15803D;
  --brand-light:  #22C55E;
  --brand-pale:   #DCFCE7;
  --brand-mid:    #BBF7D0;

  /* Acción / CTA */
  --blue:         #2563EB;
  --blue-hover:   #1D4ED8;
  --blue-pale:    #DBEAFE;
  --blue-text:    #1E40AF;

  /* Estados */
  --success:      #16A34A;
  --success-pale: #DCFCE7;
  --warning:      #D97706;
  --warning-pale: #FEF3C7;
  --danger:       #DC2626;
  --danger-pale:  #FEE2E2;
  --info:         #0284C7;
  --info-pale:    #E0F2FE;
  --purple:       #7C3AED;
  --purple-pale:  #EDE9FE;

  /* Semáforo */
  --verde:        #16A34A;
  --verde-pale:   #DCFCE7;
  --amarillo:     #D97706;
  --amarillo-pale:#FEF3C7;
  --rojo:         #DC2626;
  --rojo-pale:    #FEE2E2;

  /* Neutros */
  --text:         #0F172A;
  --text2:        #475569;
  --text3:        #94A3B8;
  --border:       #E2E8F0;
  --border2:      #CBD5E1;

  /* Fondos */
  --bg:           #FFFFFF;
  --bg2:          #F8FAFC;
  --bg3:          #F1F5F9;
  --bg4:          #E2E8F0;

  /* Tipografía */
  --font:         'Plus Jakarta Sans', sans-serif;
  --font-mono:    'Courier New', monospace;

  /* Espaciado */
  --radius-sm:    6px;
  --radius:       10px;
  --radius-lg:    14px;
  --radius-xl:    20px;
  --radius-full:  999px;

  /* Sombras */
  --shadow-sm:    0 1px 3px rgba(0,0,0,0.08);
  --shadow:       0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg:    0 12px 40px rgba(0,0,0,0.1);
  --shadow-xl:    0 24px 64px rgba(0,0,0,0.12);

  /* Transición */
  --transition:   all .15s ease;
}

/* ── RESET ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: var(--font); cursor: pointer; }
input, select, textarea { font-family: var(--font); }
ul, ol { list-style: none; }

/* ── TIPOGRAFÍA ──────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.3px;
}
h1 { font-size: 2.25rem; font-weight: 800; letter-spacing: -1px; }
h2 { font-size: 1.75rem; font-weight: 800; letter-spacing: -0.5px; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }
h5 { font-size: 0.95rem; }
p  { color: var(--text2); line-height: 1.7; }
small { font-size: 0.8rem; color: var(--text3); }

/* ── LOGO ────────────────────────────────────────────────── */
.nv-logo {
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0;
  font-size: 0; /* elimina espacios entre elementos inline */
}
.nv-logo span,
.nv-logo-text {
  font-size: 22px;
  display: inline;
}
.nv-logo span { color: var(--brand); }
.nv-logo.lg span, .nv-logo.lg .nv-logo-text { font-size: 30px; }
.nv-logo.sm span, .nv-logo.sm .nv-logo-text { font-size: 17px; }
.nv-logo.white .nv-logo-text { color: #fff !important; }
.nv-logo.white span { color: var(--brand-light); }

/* ── LAYOUT ──────────────────────────────────────────────── */
.nv-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 48px;
}
.nv-container.sm { max-width: 800px; }
.nv-container.xs { max-width: 480px; }

.nv-section { padding: 80px 0; }
.nv-section.sm { padding: 48px 0; }

/* Flex helpers */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-4  { gap: 4px; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.gap-32 { gap: 32px; }
.gap-48 { gap: 48px; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }

/* Grid helpers */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

/* ── NAV ─────────────────────────────────────────────────── */
.nv-nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: 64px;
  display: flex; align-items: center;
  padding: 0 48px; gap: 32px;
}
.nv-nav-links { display: flex; gap: 28px; margin-left: auto; }
.nv-nav-links a { font-size: 14px; font-weight: 500; color: var(--text2); transition: var(--transition); }
.nv-nav-links a:hover { color: var(--text); }
.nv-nav-links a.active { color: var(--brand); font-weight: 600; }

/* ── SIDEBAR (panel interno) ─────────────────────────────── */
.nv-layout {
  display: flex;
  min-height: 100vh;
}
.nv-sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--bg);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.nv-sidebar-header {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
}
.nv-sidebar-nav { padding: 12px 10px; flex: 1; }
.nv-sidebar-section {
  font-size: 10px; font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--text3); padding: 16px 10px 6px;
}
.nv-sidebar-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: var(--radius);
  font-size: 14px; font-weight: 500; color: var(--text2);
  transition: var(--transition); cursor: pointer;
  text-decoration: none; margin-bottom: 2px;
}
.nv-sidebar-item:hover { background: var(--bg2); color: var(--text); }
.nv-sidebar-item.active { background: var(--brand-pale); color: var(--brand); font-weight: 600; }
.nv-sidebar-item .icon { font-size: 16px; width: 20px; text-align: center; }
.nv-sidebar-footer {
  padding: 12px 10px;
  border-top: 1px solid var(--border);
}

.nv-content {
  flex: 1;
  background: var(--bg2);
  overflow-x: hidden;
}
.nv-content-inner {
  padding: 32px;
  max-width: 1100px;
}

/* ── TOPBAR (panel interno) ──────────────────────────────── */
.nv-topbar {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 0 32px;
  height: 60px;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 50;
}
.nv-topbar-title { font-size: 16px; font-weight: 700; color: var(--text); }
.nv-topbar-actions { display: flex; align-items: center; gap: 12px; }

/* ── BOTONES ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius);
  border: none;
  font-family: var(--font);
  font-size: 14px; font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Tamaños */
.btn-xs  { padding: 5px 10px;  font-size: 12px; border-radius: var(--radius-sm); }
.btn-sm  { padding: 7px 14px;  font-size: 13px; }
.btn-lg  { padding: 13px 28px; font-size: 15px; }
.btn-xl  { padding: 15px 32px; font-size: 16px; }
.btn-full { width: 100%; }

/* Variantes */
.btn-primary   { background: var(--blue);    color: #fff; }
.btn-primary:hover { background: var(--blue-hover); }

.btn-brand     { background: var(--brand);   color: #fff; }
.btn-brand:hover { background: var(--brand-hover); }

.btn-success   { background: var(--success); color: #fff; }
.btn-success:hover { background: var(--brand-hover); }

.btn-danger    { background: var(--danger);  color: #fff; }
.btn-danger:hover { background: #B91C1C; }

.btn-warning   { background: var(--warning); color: #fff; }
.btn-warning:hover { background: #B45309; }

.btn-ghost     { background: var(--bg3); color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--text3); }

.btn-outline   { background: transparent; color: var(--text); border: 1.5px solid var(--border); }
.btn-outline:hover { border-color: var(--text3); }

.btn-outline-primary { background: transparent; color: var(--blue); border: 1.5px solid var(--blue); }
.btn-outline-primary:hover { background: var(--blue-pale); }

.btn-outline-brand { background: transparent; color: var(--brand); border: 1.5px solid var(--brand); }
.btn-outline-brand:hover { background: var(--brand-pale); }

.btn-link { background: transparent; color: var(--blue); padding: 0; font-weight: 500; }
.btn-link:hover { text-decoration: underline; }

/* ── BADGES / TAGS ───────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.badge-success  { background: var(--success-pale); color: var(--success); }
.badge-warning  { background: var(--warning-pale); color: var(--warning); }
.badge-danger   { background: var(--danger-pale);  color: var(--danger); }
.badge-info     { background: var(--info-pale);    color: var(--info); }
.badge-purple   { background: var(--purple-pale);  color: var(--purple); }
.badge-gray     { background: var(--bg3);          color: var(--text2); border: 1px solid var(--border); }
.badge-blue     { background: var(--blue-pale);    color: var(--blue-text); }
.badge-brand    { background: var(--brand-pale);   color: var(--brand); }

/* Semáforo */
.badge-verde    { background: var(--verde-pale);    color: var(--verde); }
.badge-amarillo { background: var(--amarillo-pale); color: var(--amarillo); }
.badge-rojo     { background: var(--rojo-pale);     color: var(--rojo); animation: alertPulse 1.5s infinite; }
@keyframes alertPulse { 0%,100%{opacity:1} 50%{opacity:.6} }

/* Section tag */
.section-tag {
  display: inline-block;
  font-size: 11px; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase; padding: 4px 12px;
  border-radius: var(--radius-full); margin-bottom: 12px;
}
.section-tag.green  { background: var(--brand-pale); color: var(--brand); }
.section-tag.blue   { background: var(--blue-pale);  color: var(--blue-text); }
.section-tag.purple { background: var(--purple-pale);color: var(--purple); }
.section-tag.amber  { background: var(--warning-pale);color: var(--warning); }
.section-tag.gray   { background: var(--bg3); color: var(--text2); border: 1px solid var(--border); }

/* ── CARDS ───────────────────────────────────────────────── */
.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.card-sm { padding: 16px; border-radius: var(--radius); }
.card-lg { padding: 32px; border-radius: var(--radius-xl); }
.card:hover { box-shadow: var(--shadow); }
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px; padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.card-title { font-size: 15px; font-weight: 700; color: var(--text); }
.card-subtitle { font-size: 13px; color: var(--text3); margin-top: 2px; }

/* Stat card */
.stat-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}
.stat-card-num {
  font-size: 32px; font-weight: 800;
  color: var(--text); letter-spacing: -1px;
  line-height: 1;
}
.stat-card-num.green  { color: var(--brand); }
.stat-card-num.blue   { color: var(--blue); }
.stat-card-num.amber  { color: var(--warning); }
.stat-card-num.red    { color: var(--danger); }
.stat-card-label { font-size: 13px; color: var(--text3); margin-top: 4px; }
.stat-card-delta { font-size: 12px; font-weight: 600; margin-top: 8px; }
.stat-card-delta.up   { color: var(--brand); }
.stat-card-delta.down { color: var(--danger); }

/* ── FORMULARIOS ─────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-group:last-child { margin-bottom: 0; }

.form-label { font-size: 13px; font-weight: 600; color: var(--text); }
.form-label.required::after { content: ' *'; color: var(--danger); }

.form-hint { font-size: 12px; color: var(--text3); margin-top: 4px; }

.form-control {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 14px; color: var(--text);
  outline: none;
  transition: border-color .15s;
}
.form-control:focus   { border-color: var(--blue); }
.form-control:disabled { background: var(--bg3); color: var(--text3); cursor: not-allowed; }
.form-control.error   { border-color: var(--danger); }
.form-control.success { border-color: var(--success); }
.form-control::placeholder { color: var(--text3); }

.form-control-sm { padding: 7px 11px; font-size: 13px; }
.form-control-lg { padding: 13px 16px; font-size: 15px; }

select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 100px; }

.form-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.form-row.col-3 { grid-template-columns: repeat(3, 1fr); }

.form-error { font-size: 12px; color: var(--danger); margin-top: 4px; display: flex; align-items: center; gap: 4px; }
.form-error::before { content: '⚠'; font-size: 11px; }

/* ── TABLAS ──────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--border); }
table.nv-table { width: 100%; border-collapse: collapse; }
.nv-table thead tr { background: var(--bg2); border-bottom: 1px solid var(--border); }
.nv-table th { padding: 11px 16px; font-size: 11px; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase; color: var(--text3); text-align: left; white-space: nowrap; }
.nv-table td { padding: 13px 16px; font-size: 14px; color: var(--text2); border-bottom: 1px solid var(--border); }
.nv-table tr:last-child td { border-bottom: none; }
.nv-table tbody tr:hover { background: var(--bg2); }
.nv-table td.bold { font-weight: 600; color: var(--text); }

/* ── ALERTS ──────────────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 13px; line-height: 1.5;
  display: flex; align-items: flex-start; gap: 10px;
  margin-bottom: 16px;
}
.alert-success { background: var(--success-pale); color: #166534; border: 1px solid var(--brand-mid); }
.alert-warning { background: var(--warning-pale); color: #92400E; border: 1px solid #FCD34D; }
.alert-danger  { background: var(--danger-pale);  color: #991B1B; border: 1px solid #FECACA; }
.alert-info    { background: var(--info-pale);    color: #075985; border: 1px solid #BAE6FD; }

/* ── MODALES ─────────────────────────────────────────────── */
.nv-overlay {
  display: none; position: fixed; inset: 0; z-index: 200;
  background: rgba(15,23,42,0.5);
  backdrop-filter: blur(6px);
  align-items: center; justify-content: center;
  padding: 20px;
}
.nv-overlay.show { display: flex; }
.nv-modal {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px;
  width: 100%; max-width: 480px;
  box-shadow: var(--shadow-xl);
  animation: popIn .2s ease;
  max-height: 90vh;
  overflow-y: auto;
}
.nv-modal.sm { max-width: 380px; }
.nv-modal.lg { max-width: 640px; }
.nv-modal.xl { max-width: 800px; }
@keyframes popIn { from{opacity:0;transform:scale(.97)} to{opacity:1;transform:scale(1)} }
.nv-modal-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 20px; }
.nv-modal-title { font-size: 18px; font-weight: 800; color: var(--text); }
.nv-modal-close { background: none; border: none; font-size: 20px; color: var(--text3); cursor: pointer; line-height: 1; padding: 0; }
.nv-modal-close:hover { color: var(--text); }
.nv-modal-footer { display: flex; gap: 10px; justify-content: flex-end; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border); }

/* ── DIVIDER ─────────────────────────────────────────────── */
.divider { height: 1px; background: var(--border); margin: 20px 0; }
.divider-text { display: flex; align-items: center; gap: 12px; color: var(--text3); font-size: 12px; text-transform: uppercase; letter-spacing: 1px; margin: 20px 0; }
.divider-text::before, .divider-text::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ── AVATAR ──────────────────────────────────────────────── */
.avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--brand-pale); color: var(--brand);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; flex-shrink: 0;
}
.avatar.sm { width: 28px; height: 28px; font-size: 11px; }
.avatar.lg { width: 48px; height: 48px; font-size: 17px; }
.avatar.xl { width: 64px; height: 64px; font-size: 22px; }

/* ── EMPTY STATE ─────────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 48px 24px;
  color: var(--text3);
}
.empty-state-icon { font-size: 40px; margin-bottom: 12px; }
.empty-state-title { font-size: 16px; font-weight: 600; color: var(--text2); margin-bottom: 6px; }
.empty-state-desc { font-size: 14px; }

/* ── LOADING ─────────────────────────────────────────────── */
.spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  flex-shrink: 0;
}
.spinner.sm { width: 14px; height: 14px; }
.spinner.lg { width: 32px; height: 32px; border-width: 3px; }
.spinner.brand { border-top-color: var(--brand); }
@keyframes spin { to { transform: rotate(360deg); } }

.loading-overlay {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(255,255,255,0.8);
  display: flex; align-items: center; justify-content: center;
  gap: 12px; font-size: 14px; color: var(--text2);
}

/* ── PAGINATION ──────────────────────────────────────────── */
.pagination { display: flex; align-items: center; gap: 4px; }
.page-btn {
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius);
  font-size: 13px; font-weight: 500; color: var(--text2);
  border: 1px solid var(--border); background: var(--bg);
  cursor: pointer; transition: var(--transition);
}
.page-btn:hover { border-color: var(--text3); color: var(--text); }
.page-btn.active { background: var(--blue); color: #fff; border-color: var(--blue); }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── BREADCRUMB ──────────────────────────────────────────── */
.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text3); margin-bottom: 20px; }
.breadcrumb a { color: var(--text3); transition: color .15s; }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb .sep { color: var(--border); }
.breadcrumb .current { color: var(--text); font-weight: 600; }

/* ── PAGE HEADER ─────────────────────────────────────────── */
.page-header { margin-bottom: 28px; }
.page-header-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.page-title { font-size: 24px; font-weight: 800; color: var(--text); letter-spacing: -0.5px; }
.page-subtitle { font-size: 14px; color: var(--text3); margin-top: 4px; }

/* ── TOOLTIP ─────────────────────────────────────────────── */
[data-tooltip] { position: relative; }
[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%);
  background: var(--text); color: #fff;
  font-size: 11px; font-weight: 500; white-space: nowrap;
  padding: 4px 8px; border-radius: var(--radius-sm);
  pointer-events: none; opacity: 0; transition: opacity .15s;
  z-index: 50;
}
[data-tooltip]:hover::after { opacity: 1; }

/* ── UTILIDADES ──────────────────────────────────────────── */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-muted  { color: var(--text3); }
.text-small  { font-size: 13px; }
.text-mono   { font-family: var(--font-mono); }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }
.mt-4  { margin-top: 4px; }
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-4  { margin-bottom: 4px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.w-full { width: 100%; }
.hidden { display: none !important; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 1024px) {
  .nv-container { padding: 0 24px; }
  .nv-nav { padding: 0 24px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .nv-container { padding: 0 16px; }
  .nv-nav { padding: 0 16px; }
  .nv-nav-links { display: none; }
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.4rem; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .nv-sidebar { display: none; }
  .nv-content-inner { padding: 20px 16px; }
  .nv-topbar { padding: 0 16px; }
  .nv-modal { padding: 24px; }
}

@media (max-width: 480px) {
  .btn-lg, .btn-xl { padding: 11px 20px; font-size: 14px; }
  .nv-section { padding: 48px 0; }
}

/* ── PRINT ───────────────────────────────────────────────── */
@media print {
  .nv-nav, .nv-sidebar, .nv-topbar, .btn, .pagination { display: none !important; }
  body { background: #fff; color: #000; }
  .card { border: 1px solid #ccc; box-shadow: none; }
}

/* ── SUPERADMIN EXTRAS ───────────────────────────────────── */
/* Stat cards con barra de color superior */
.sa-stat {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}
.sa-stat:hover { box-shadow: var(--shadow); }
.sa-stat::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
}
.sa-stat.green::before  { background: var(--brand); }
.sa-stat.blue::before   { background: var(--blue); }
.sa-stat.amber::before  { background: var(--warning); }
.sa-stat.purple::before { background: var(--purple); }
.sa-stat.red::before    { background: var(--danger); }

.sa-stat-num { font-size: 30px; font-weight: 800; letter-spacing: -1px; line-height: 1; color: var(--text); }
.sa-stat-num.green  { color: var(--brand); }
.sa-stat-num.blue   { color: var(--blue); }
.sa-stat-num.amber  { color: var(--warning); }
.sa-stat-num.purple { color: var(--purple); }
.sa-stat-num.red    { color: var(--danger); }
.sa-stat-label { font-size: 12px; color: var(--text3); margin-top: 6px; }
.sa-stat-sub { font-size: 11px; color: var(--text3); margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border); }

/* Stats grid */
.sa-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 24px; }

/* SA Cards */
.sa-card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.sa-card-head { padding: 14px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.sa-card-title { font-size: 13px; font-weight: 700; color: var(--text); }

/* SA Table */
.sa-table-wrap { overflow-x: auto; }
table.sa-table { width: 100%; border-collapse: collapse; }
.sa-table thead tr { background: var(--bg2); border-bottom: 1px solid var(--border); }
.sa-table th { padding: 10px 16px; font-size: 10px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--text3); text-align: left; white-space: nowrap; }
.sa-table td { padding: 13px 16px; font-size: 13px; color: var(--text2); border-bottom: 1px solid var(--border); }
.sa-table tr:last-child td { border-bottom: none; }
.sa-table tbody tr:hover { background: var(--bg2); }
.sa-table td.sa-bold { font-weight: 600; color: var(--text); }

/* SA Plan chips */
.sa-plan { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: var(--radius-full); }
.sa-plan.starter { background: var(--bg3); color: var(--text2); }
.sa-plan.pro     { background: var(--blue-pale); color: var(--blue-text); }
.sa-plan.premium { background: var(--purple-pale); color: var(--purple); }

/* SA Buttons */
.sa-btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: var(--radius); font-size: 12px; font-weight: 600; font-family: var(--font); cursor: pointer; border: 1px solid transparent; transition: var(--transition); text-decoration: none; white-space: nowrap; }
.sa-btn.primary { background: var(--brand); color: #fff; border-color: var(--brand); }
.sa-btn.primary:hover { background: var(--brand-hover); }
.sa-btn.ghost { background: var(--bg); color: var(--text2); border-color: var(--border); }
.sa-btn.ghost:hover { border-color: var(--border2); color: var(--text); }
.sa-btn.danger { background: var(--danger-pale); color: var(--danger); border-color: #FECACA; }
.sa-btn.danger:hover { background: #FECACA; }
.sa-btn.success { background: var(--success-pale); color: var(--success); border-color: var(--brand-mid); }

/* SA Alerts */
.sa-alert { padding: 11px 14px; border-radius: var(--radius); font-size: 13px; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.sa-alert.success { background: var(--success-pale); color: var(--success); border: 1px solid var(--brand-mid); }
.sa-alert.danger  { background: var(--danger-pale);  color: var(--danger);  border: 1px solid #FECACA; }
.sa-alert.warning { background: var(--warning-pale); color: var(--warning); border: 1px solid #FDE68A; }

/* SA Forms */
.sa-form-section { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 22px; margin-bottom: 16px; }
.sa-form-title { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.sa-label { font-size: 12px; font-weight: 600; color: var(--text2); display: block; margin-bottom: 6px; }
.sa-label.required::after { content: ' *'; color: var(--danger); }
.sa-input { width: 100%; padding: 9px 12px; background: var(--bg); border: 1.5px solid var(--border); border-radius: var(--radius); color: var(--text); font-size: 13px; font-family: var(--font); outline: none; transition: border-color .15s; }
.sa-input:focus { border-color: var(--brand); }
.sa-input::placeholder { color: var(--text3); }
.sa-input.error { border-color: var(--danger); }
.sa-hint { font-size: 11px; color: var(--text3); margin-top: 4px; }
.sa-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.sa-form-group { display: flex; flex-direction: column; margin-bottom: 14px; }

/* SA Page */
.sa-page-head { margin-bottom: 22px; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.sa-page-title { font-size: 22px; font-weight: 800; color: var(--text); letter-spacing: -0.5px; }
.sa-page-sub { font-size: 13px; color: var(--text3); margin-top: 4px; }

/* SA Breadcrumb */
.sa-breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text3); margin-bottom: 18px; }
.sa-breadcrumb a { color: var(--text3); text-decoration: none; transition: color .15s; }
.sa-breadcrumb a:hover { color: var(--text); }
.sa-breadcrumb .sep { color: var(--border2); }
.sa-breadcrumb .current { color: var(--text); font-weight: 600; }

/* SA Filters */
.sa-filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; align-items: center; }
.sa-search-wrap { position: relative; flex: 1; min-width: 200px; }
.sa-search-wrap svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--text3); pointer-events: none; }
.sa-search { width: 100%; padding: 8px 12px 8px 32px; background: var(--bg); border: 1.5px solid var(--border); border-radius: var(--radius); color: var(--text); font-size: 13px; font-family: var(--font); outline: none; transition: border-color .15s; }
.sa-search:focus { border-color: var(--brand); }
.sa-search::placeholder { color: var(--text3); }
.sa-select { padding: 8px 12px; background: var(--bg); border: 1.5px solid var(--border); border-radius: var(--radius); color: var(--text); font-size: 13px; font-family: var(--font); outline: none; cursor: pointer; }
.sa-select:focus { border-color: var(--brand); }

/* SA Pagination */
.sa-pagination { display: flex; align-items: center; gap: 4px; }
.sa-page-btn { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius-sm); font-size: 12px; font-weight: 500; color: var(--text2); border: 1px solid var(--border); background: var(--bg); cursor: pointer; text-decoration: none; transition: var(--transition); }
.sa-page-btn:hover { background: var(--bg3); color: var(--text); }
.sa-page-btn.active { background: var(--brand); color: #fff; border-color: var(--brand); font-weight: 700; }

/* SA Logs */
.sa-log { display: flex; align-items: flex-start; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--border); }
.sa-log:last-child { border: none; }
.sa-log-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; margin-top: 5px; }
.sa-log-dot.ok      { background: var(--brand); }
.sa-log-dot.error   { background: var(--danger); }
.sa-log-dot.neutral { background: var(--text3); }
.sa-log-dot.default { background: var(--blue); }
.sa-log-info { flex: 1; min-width: 0; }
.sa-log-accion { font-size: 12px; font-weight: 600; color: var(--text); }
.sa-log-desc { font-size: 11px; color: var(--text3); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sa-log-time { font-size: 11px; color: var(--text3); flex-shrink: 0; font-family: monospace; }

/* SA Danger zone */
.sa-danger-zone { border: 1px solid #FECACA; border-radius: var(--radius-lg); padding: 20px; margin-top: 20px; background: #FFF5F5; }
.sa-danger-title { font-size: 13px; font-weight: 700; color: var(--danger); margin-bottom: 14px; }

/* SA Empty */
.sa-empty { text-align: center; padding: 48px 24px; color: var(--text3); }
.sa-empty-icon { font-size: 36px; margin-bottom: 10px; opacity: 0.5; }
.sa-empty-title { font-size: 15px; font-weight: 600; color: var(--text2); margin-bottom: 6px; }

@media (max-width: 768px) {
  .sa-stats { grid-template-columns: repeat(2, 1fr); }
  .sa-form-row { grid-template-columns: 1fr; }
  .sa-filters { flex-direction: column; align-items: stretch; }
}
@media (max-width: 480px) {
  .sa-stats { grid-template-columns: 1fr 1fr; }
}