@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');
:root {
  --text-xs:   12px;
  --text-sm:   14px;
  --text-base: 16px;
  --text-lg:   18px;
  --text-xl:   20px;
  --text-2xl:  24px;
  --text-3xl:  32px;
  --text-4xl:  40px;
  --weight-normal:   400;
  --weight-medium:   500;
  --weight-semibold: 600;
  --weight-bold:     700;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', ui-monospace, monospace;
  --leading-tight:  1.25;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;
  --sp-1:  4px;
  --sp-2:  8px;
  --sp-3:  12px;
  --sp-4:  16px;
  --sp-5:  20px;
  --sp-6:  24px;
  --sp-8:  32px;
  --sp-10: 40px;
  --sp-12: 48px;
  --sp-16: 64px;
  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  12px;
  --radius-xl:  16px;
  --radius-full: 9999px;
  --color-primary-50:  #eff6ff;
  --color-primary-100: #dbeafe;
  --color-primary-200: #bfdbfe;
  --color-primary-300: #93c5fd;
  --color-primary-400: #60a5fa;
  --color-primary-500: #3f92d6;
  --color-primary-600: #1E73BE;
  --color-primary-700: #15588f;
  --color-primary-800: #1e40af;
  --color-primary-900: #1e3a8a;
  --color-slate-50:  #f8fafc;
  --color-slate-100: #f1f5f9;
  --color-slate-200: #e2e8f0;
  --color-slate-300: #cbd5e1;
  --color-slate-400: #94a3b8;
  --color-slate-500: #64748b;
  --color-slate-600: #475569;
  --color-slate-700: #334155;
  --color-slate-800: #1e293b;
  --color-slate-900: #0f172a;
  --color-slate-950: #020617;
  --color-success-50:  #f0fdf4;
  --color-success-100: #dcfce7;
  --color-success-500: #22c55e;
  --color-success-600: #16a34a;
  --color-success-700: #15803d;
  --color-warning-50:  #fffbeb;
  --color-warning-100: #fef3c7;
  --color-warning-500: #f59e0b;
  --color-warning-600: #d97706;
  --color-warning-700: #b45309;
  --color-danger-50:  #fff1f2;
  --color-danger-100: #ffe4e6;
  --color-danger-500: #ef4444;
  --color-danger-600: #dc2626;
  --color-danger-700: #b91c1c;
  --color-info-50:  #eff6ff;
  --color-info-100: #dbeafe;
  --color-info-500: #3b82f6;
  --color-info-600: #1E73BE;
  --chart-1: #1E73BE;
  --chart-2: #0891b2;
  --chart-3: #7c3aed;
  --chart-4: #db2777;
  --chart-5: #ea580c;
  --chart-6: #16a34a;
  --chart-7: #ca8a04;
  --chart-8: #64748b;
  --bg-page:        var(--color-slate-50);
  --bg-surface:     #ffffff;
  --bg-surface-2:   var(--color-slate-100);
  --bg-surface-3:   var(--color-slate-200);
  --border-color:   var(--color-slate-200);
  --border-strong:  var(--color-slate-300);
  --text-primary:   var(--color-slate-900);
  --text-secondary: var(--color-slate-600);
  --text-tertiary:  var(--color-slate-500);
  --text-inverse:   #ffffff;
  --text-link:      var(--color-primary-600);
  --shadow-xs:  0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-sm:  0 1px 3px 0 rgb(0 0 0 / 0.08), 0 1px 2px -1px rgb(0 0 0 / 0.06);
  --shadow-md:  0 4px 6px -1px rgb(0 0 0 / 0.08), 0 2px 4px -2px rgb(0 0 0 / 0.06);
  --shadow-lg:  0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.05);
  --shadow-xl:  0 20px 25px -5px rgb(0 0 0 / 0.08), 0 8px 10px -6px rgb(0 0 0 / 0.04);
  --topnav-height: 56px;
  --sidebar-width: 260px;
  --transition-fast:   150ms ease;
  --transition-base:   200ms ease;
  --transition-slow:   300ms ease;
}
.dark {
  --color-primary-50:  #132a45;
  --color-primary-100: #173352;
  --color-primary-200: #1d4370;
  --color-success-50:  #0e2a1b;
  --color-success-100: #123823;
  --color-warning-50:  #2c2006;
  --color-warning-100: #3b2b08;
  --color-danger-50:   #2c1315;
  --color-danger-100:  #3a191c;
  --color-info-50:     #132a45;
  --color-info-100:    #173352;
  --color-primary-700: #93c5fd;
  --color-success-700: #86efac;
  --color-warning-700: #fcd34d;
  --color-danger-700:  #fca5a5;
  --color-info-600:    #93c5fd;
  --bg-page:        var(--color-slate-950);
  --bg-surface:     var(--color-slate-900);
  --bg-surface-2:   var(--color-slate-800);
  --bg-surface-3:   var(--color-slate-700);
  --border-color:   var(--color-slate-700);
  --border-strong:  var(--color-slate-600);
  --text-primary:   var(--color-slate-50);
  --text-secondary: var(--color-slate-300);
  --text-tertiary:  var(--color-slate-400);
  --text-inverse:   var(--color-slate-900);
  --text-link:      var(--color-primary-400);
  --shadow-xs:  0 1px 2px 0 rgb(0 0 0 / 0.3);
  --shadow-sm:  0 1px 3px 0 rgb(0 0 0 / 0.35), 0 1px 2px -1px rgb(0 0 0 / 0.3);
  --shadow-md:  0 4px 6px -1px rgb(0 0 0 / 0.35), 0 2px 4px -2px rgb(0 0 0 / 0.3);
  --shadow-lg:  0 10px 15px -3px rgb(0 0 0 / 0.35), 0 4px 6px -4px rgb(0 0 0 / 0.25);
  --shadow-xl:  0 20px 25px -5px rgb(0 0 0 / 0.4), 0 8px 10px -6px rgb(0 0 0 / 0.3);
}
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  font-size: var(--text-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: var(--weight-normal);
  line-height: var(--leading-normal);
  color: var(--text-primary);
  background: linear-gradient(135deg, #EFF6FF 0%, #F0F0FF 50%, #F9FAFB 100%);
  background-attachment: fixed;
  min-height: 100vh;
}
.dark body {
  background: linear-gradient(135deg, #0B1220 0%, #101024 50%, #020617 100%);
  background-attachment: fixed;
}
html {
  color-scheme: light;
}
html.dark {
  color-scheme: dark;
}
.num, .nf-kpi-value, td.num, .nf-badge,
[data-numeric], .nf-trend {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}
a {
  color: var(--text-link);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover { color: var(--color-primary-700); }
h1, h2, h3, h4, h5, h6 {
  font-weight: var(--weight-semibold);
  line-height: var(--leading-tight);
  color: var(--text-primary);
}
.nf-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-color: var(--bg-page);
}
.nf-topnav {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--topnav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--sp-6);
  gap: var(--sp-6);
  background: linear-gradient(135deg, #001F4D 0%, #1E73BE 100%);
  border-bottom: none;
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}
.dark .nf-topnav {
  background-color: rgba(15 23 42 / 0.85);
}
.nf-topnav__logo {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--text-base);
  font-weight: var(--weight-bold);
  color: #ffffff;
  white-space: nowrap;
  flex-shrink: 0;
}
.nf-topnav__logo span {
  color: rgba(255,255,255,0.7);
}
.nf-topnav__nav {
  display: flex;
  align-items: center;
  gap: 0;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}
.nf-topnav__tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 0 var(--sp-4);
  height: var(--topnav-height);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: rgba(255,255,255,0.6);
  cursor: pointer;
  border: none;
  background: none;
  transition: color var(--transition-fast);
  white-space: nowrap;
}
.nf-topnav__tab:hover {
  color: #ffffff;
}
.nf-topnav__tab.active {
  color: #ffffff;
  font-weight: var(--weight-semibold);
}
.nf-topnav__tab.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: var(--sp-4);
  right: var(--sp-4);
  height: 2px;
  background-color: #ffffff;
  border-radius: var(--radius-full) var(--radius-full) 0 0;
}
.nf-topnav__tema {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; padding: 0; margin-right: var(--sp-1);
  background: none; border: 1px solid rgba(255,255,255,0.22); border-radius: 8px;
  color: rgba(255,255,255,0.75); cursor: pointer; flex-shrink: 0;
  transition: color .15s ease, border-color .15s ease, background-color .15s ease;
}
.nf-topnav__tema svg { width: 15px; height: 15px; }
.nf-topnav__tema:hover { color: #fff; border-color: rgba(255,255,255,0.5); background: rgba(255,255,255,0.08); }
.nf-topnav__tema:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
.nf-topnav__status {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.5);
  flex-shrink: 0;
}
.nf-topnav__status-dot {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background-color: var(--color-success-500);
  flex-shrink: 0;
}
.nf-layout {
  display: flex;
  align-items: flex-start;
}
.nf-sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  position: sticky;
  top: var(--topnav-height);
  align-self: flex-start;
  height: calc(100vh - var(--topnav-height));
  overflow-y: auto;
  overflow-x: hidden;
  background-color: var(--bg-surface);
  border-right: 1px solid var(--border-color);
  padding: var(--sp-4) 0;
  scrollbar-width: thin;
  scrollbar-color: var(--border-color) transparent;
}
.nf-sidebar::-webkit-scrollbar { width: 4px; }
.nf-sidebar::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: var(--radius-full); }
.nf-sidebar__section-title {
  padding: var(--sp-3) var(--sp-4) var(--sp-1);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.nf-sidebar__item {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-4);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: var(--radius-md);
  margin: 1px var(--sp-2);
  transition: background-color var(--transition-fast), color var(--transition-fast);
  text-decoration: none;
}
.nf-sidebar__item:hover {
  background-color: var(--bg-surface-2);
  color: var(--text-primary);
}
.nf-sidebar__item.active {
  background-color: var(--color-primary-50);
  color: var(--color-primary-700);
  font-weight: var(--weight-semibold);
}
.dark .nf-sidebar__item.active {
  background-color: rgba(37 99 235 / 0.15);
  color: var(--color-primary-400);
}
.nf-sidebar__divider {
  height: 1px;
  background-color: var(--border-color);
  margin: var(--sp-3) var(--sp-4);
}
.nf-main {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: var(--sp-4) 0 0 var(--sp-8);
  scrollbar-width: thin;
  scrollbar-color: var(--border-color) transparent;
}
.nf-main::-webkit-scrollbar { width: 6px; }
.nf-main::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: var(--radius-full); }
.nf-page-header {
  margin-bottom: var(--sp-8);
}
.nf-page-header h1 {
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  letter-spacing: -0.02em;
  color: var(--text-primary);
}
.nf-page-header p {
  margin-top: var(--sp-1);
  font-size: var(--text-sm);
  color: var(--text-secondary);
}
.nf-pagina {
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  padding: var(--sp-6) var(--sp-5) 90px;
}
.nf-pagina__cab {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-5);
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.nf-pagina__cab h1 {
  font-size: var(--text-2xl, 24px);
  font-weight: var(--weight-semibold, 600);
  color: var(--text-primary);
  letter-spacing: -.01em;
  margin: 0 0 3px;
}
.nf-pagina__cab p {
  margin: 0;
  font-size: var(--text-sm, 14px);
  color: var(--text-secondary);
}
.nf-subtabs {
  display: inline-flex;
  flex-wrap: nowrap;
  max-width: 100%;
  gap: 4px;
  padding: 4px;
  margin: 0 0 18px;
  background: var(--bg-surface-2, #f1f5f9);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 10px;
}
.nf-subtabs a,
.nf-subtabs button {
  position: relative;
  padding: 9px 18px;
  font: inherit;
  font-size: var(--text-sm, 14px);
  font-weight: var(--weight-medium, 500);
  color: var(--text-secondary, #475569);
  text-decoration: none;
  white-space: nowrap;
  background: none;
  border: none;
  border-radius: 7px;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}
.nf-subtabs a:hover,
.nf-subtabs button:hover {
  color: var(--text-primary, #0f172a);
  background: var(--bg-surface, #ffffff);
}
.nf-subtabs [aria-current="page"] {
  color: #ffffff;
  background: var(--color-primary-600, #1E73BE);
  font-weight: var(--weight-semibold, 600);
  box-shadow: var(--shadow-xs, 0 1px 2px 0 rgb(0 0 0 / 0.05));
}
.nf-subtabs [aria-current="page"]:hover {
  color: #ffffff;
  background: var(--color-primary-600, #1E73BE);
}
.nf-subtabs [aria-current="page"]::after { content: none; }
@media (max-width: 700px) {
  .nf-subtabs {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .nf-subtabs::-webkit-scrollbar { display: none; }
  .nf-subtabs a,
  .nf-subtabs button { flex: none; }
}
.nf-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  overflow: hidden;
  transition: box-shadow var(--transition-base), transform var(--transition-base);
}
.nf-card:hover {
  box-shadow: 0 12px 40px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}
.nf-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--border-color);
}
.nf-card-header__title {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
  letter-spacing: -0.01em;
}
.nf-card-header__subtitle {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  margin-top: 2px;
}
.nf-card-header__actions {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
}
.nf-card-header__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-tertiary);
  cursor: pointer;
  font-size: var(--text-xs);
  transition: background-color var(--transition-fast), color var(--transition-fast);
}
.nf-card-header__btn:hover {
  background-color: var(--bg-surface-2);
  color: var(--text-primary);
}
.nf-card-body {
  padding: var(--sp-5);
}
.nf-kpi {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--sp-5) var(--sp-5) var(--sp-4);
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  position: relative;
  overflow: hidden;
  transition: box-shadow var(--transition-base), transform var(--transition-base);
}
.nf-kpi:hover {
  box-shadow: 0 12px 40px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}
.nf-kpi::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary-500), var(--color-primary-300));
}
.nf-kpi-label {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.nf-kpi-value {
  font-size: var(--text-3xl);
  font-weight: var(--weight-bold);
  color: var(--text-primary);
  letter-spacing: -0.03em;
  line-height: 1;
}
.nf-kpi-trend {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  padding: 2px var(--sp-2);
  border-radius: var(--radius-full);
  width: fit-content;
}
.nf-kpi-trend--up {
  color: var(--color-success-700);
  background-color: var(--color-success-50);
}
.nf-kpi-trend--up::before { content: '↑ '; }
.nf-kpi-trend--down {
  color: var(--color-danger-700);
  background-color: var(--color-danger-50);
}
.nf-kpi-trend--down::before { content: '↓ '; }
.nf-kpi-trend--neutral {
  color: var(--text-secondary);
  background-color: var(--bg-surface-2);
}
.nf-kpi-sparkline {
  height: 40px;
  width: 100%;
  margin-top: var(--sp-1);
  border-radius: var(--radius-sm);
  background-color: var(--bg-surface-2);
  overflow: hidden;
}
.nf-kpi--sm .nf-kpi-value { font-size: var(--text-2xl); }
.nf-kpi--sm { padding: var(--sp-4); }
.nf-alert-card {
  position: relative;
  display: block;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--color-slate-300);
  border-radius: var(--radius-lg);
  padding: var(--sp-4) var(--sp-5);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition:
    box-shadow var(--transition-fast),
    transform var(--transition-fast),
    border-left-color var(--transition-fast);
}
.nf-alert-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.nf-alert-card--urgent  { border-left-color: var(--color-danger-500); }
.nf-alert-card--follow  { border-left-color: var(--color-warning-500); }
.nf-alert-card--opportunity { border-left-color: var(--color-success-500); }
.nf-alert-card__signal {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
  line-height: var(--leading-tight);
  margin-bottom: var(--sp-1);
}
.nf-alert-card__mechanism {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: var(--leading-normal);
  margin-bottom: var(--sp-3);
}
.nf-alert-card__footer {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-wrap: wrap;
}
.nf-alert-card__impact {
  display: inline-flex;
  align-items: center;
  padding: 2px var(--sp-2);
  border-radius: var(--radius-full);
  background-color: var(--color-primary-600);
  color: #ffffff;
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}
.nf-alert-card__owner {
  display: inline-flex;
  align-items: center;
  padding: 2px var(--sp-2);
  border-radius: var(--radius-full);
  background-color: var(--bg-surface-2);
  color: var(--text-secondary);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  border: 1px solid var(--border-color);
}
.nf-alert-card__lever {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  font-style: italic;
}
.nf-table-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
}
.nf-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
  color: var(--text-primary);
}
.nf-table thead {
  position: sticky;
  top: 0;
  z-index: 2;
  background-color: var(--bg-surface-2);
}
.nf-table thead th {
  padding: var(--sp-3) var(--sp-4);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--text-secondary);
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border-strong);
  white-space: nowrap;
}
.nf-table thead th.num { text-align: right; }
.nf-table tbody tr {
  border-bottom: 1px solid var(--border-color);
  transition: background-color var(--transition-fast);
}
.nf-table tbody tr:nth-child(even) {
  background-color: rgba(248 250 252 / 0.6);
}
.dark .nf-table tbody tr:nth-child(even) {
  background-color: rgba(255 255 255 / 0.02);
}
.nf-table tbody tr:hover {
  background-color: var(--color-primary-50);
}
.dark .nf-table tbody tr:hover {
  background-color: rgba(37 99 235 / 0.08);
}
.nf-table tbody tr:last-child {
  border-bottom: none;
}
.nf-table tbody td {
  padding: var(--sp-3) var(--sp-4);
  font-size: var(--text-sm);
  color: var(--text-primary);
  white-space: nowrap;
}
.nf-table td.num,
.nf-table th.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}
.nf-table td.num-primary {
  text-align: right;
  font-weight: var(--weight-semibold);
  color: var(--color-primary-600);
  font-variant-numeric: tabular-nums;
}
.nf-table tbody tr.nf-table__row--total {
  background-color: var(--bg-surface-2);
  font-weight: var(--weight-semibold);
  border-top: 2px solid var(--border-strong);
}
.nf-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.nf-badge--high    { background-color: var(--color-success-100); color: var(--color-success-700); }
.nf-badge--mid     { background-color: var(--color-warning-100); color: var(--color-warning-700); }
.nf-badge--low     { background-color: var(--color-danger-100);  color: var(--color-danger-700); }
.nf-badge--neutral { background-color: var(--bg-surface-2);      color: var(--text-tertiary);    }
.nf-badge--info    { background-color: var(--color-info-100);    color: var(--color-info-600); }
.nf-callout {
  margin-top: var(--sp-4);
  padding: var(--sp-3) var(--sp-4);
  background-color: var(--color-primary-50);
  border-left: 3px solid var(--color-primary-400);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-size: var(--text-sm);
  font-style: italic;
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
}
.dark .nf-callout {
  background-color: rgba(37 99 235 / 0.08);
  border-left-color: var(--color-primary-500);
}
.nf-callout strong {
  font-style: normal;
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
}
.nf-tooltip {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: help;
}
.nf-tooltip__trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: var(--radius-full);
  background-color: var(--color-slate-300);
  color: var(--color-slate-600);
  font-size: 9px;
  font-weight: var(--weight-bold);
  font-style: normal;
  line-height: 1;
  vertical-align: middle;
  margin-left: var(--sp-1);
  flex-shrink: 0;
}
.nf-tooltip__trigger::after {
  content: '?';
}
.nf-tooltip__content {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  width: 220px;
  padding: var(--sp-2) var(--sp-3);
  background-color: var(--color-slate-900);
  color: #ffffff;
  font-size: var(--text-xs);
  font-style: normal;
  font-weight: var(--weight-normal);
  line-height: var(--leading-normal);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-fast), visibility var(--transition-fast);
  white-space: normal;
}
.nf-tooltip__content::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--color-slate-900);
}
.nf-tooltip:hover .nf-tooltip__content {
  opacity: 1;
  visibility: visible;
}
@keyframes nf-shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
.nf-skeleton {
  background-color: var(--bg-surface-2);
  background-image: linear-gradient(
    90deg,
    var(--bg-surface-2) 0px,
    var(--bg-surface-3) 80px,
    var(--bg-surface-2) 160px
  );
  background-size: 800px 100%;
  animation: nf-shimmer 1.5s infinite linear;
  border-radius: var(--radius-md);
}
.nf-skeleton--line {
  height: 14px;
  width: 100%;
  margin-bottom: var(--sp-2);
}
.nf-skeleton--line:last-child { width: 70%; }
.nf-skeleton--chart {
  height: 200px;
  width: 100%;
  border-radius: var(--radius-md);
}
.nf-skeleton--kpi {
  height: 100px;
  width: 100%;
  border-radius: var(--radius-lg);
}
.nf-skeleton--table {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.nf-skeleton--table .nf-skeleton--row {
  height: 40px;
  width: 100%;
  border-radius: var(--radius-sm);
}
.nf-skeleton--table .nf-skeleton--row:first-child {
  background-color: var(--bg-surface-3);
  background-image: none;
  animation: none;
}
.nf-group {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--sp-4);
}
.nf-group__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-4) var(--sp-5);
  cursor: pointer;
  user-select: none;
  background-color: var(--bg-surface-2);
  border-bottom: 1px solid var(--border-color);
  transition: background-color var(--transition-fast);
}
.nf-group__header:hover {
  background-color: var(--bg-surface-3);
}
.nf-group__title {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
}
.nf-group__summary {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  font-size: var(--text-xs);
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}
.nf-group__chevron {
  display: inline-block;
  width: 16px;
  height: 16px;
  color: var(--text-tertiary);
  transition: transform var(--transition-slow);
  flex-shrink: 0;
}
.nf-group__chevron::before {
  content: '';
  display: block;
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  margin: 2px auto;
  transition: transform var(--transition-slow);
}
.nf-group__body {
  max-height: 2000px;
  overflow: hidden;
  transition: max-height var(--transition-slow) ease-in-out;
}
.nf-group.collapsed .nf-group__body {
  max-height: 0;
}
.nf-group.collapsed .nf-group__chevron::before {
  transform: rotate(-45deg);
}
.nf-group.collapsed .nf-group__header {
  border-bottom-color: transparent;
}
.nf-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--sp-16) var(--sp-8);
  text-align: center;
  color: var(--text-secondary);
}
.nf-empty__icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  background-color: var(--bg-surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--sp-4);
  font-size: 20px;
  color: var(--text-tertiary);
}
.nf-empty__title {
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
  margin-bottom: var(--sp-1);
}
.nf-empty__desc {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  max-width: 320px;
  line-height: var(--leading-relaxed);
}
.nf-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px var(--sp-2);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  border: 1px solid transparent;
}
.nf-pill--blue    { background: var(--color-primary-50);   color: var(--color-primary-700);  border-color: var(--color-primary-200); }
.nf-pill--green   { background: var(--color-success-50);   color: var(--color-success-700);  border-color: var(--color-success-100); }
.nf-pill--amber   { background: var(--color-warning-50);   color: var(--color-warning-700);  border-color: var(--color-warning-100); }
.nf-pill--red     { background: var(--color-danger-50);    color: var(--color-danger-700);   border-color: var(--color-danger-100); }
.nf-pill--slate   { background: var(--bg-surface-2);        color: var(--text-secondary);     border-color: var(--border-color); }
.text-left    { text-align: left; }
.text-center  { text-align: center; }
.text-right   { text-align: right; }
.text-xs   { font-size: var(--text-xs); }
.text-sm   { font-size: var(--text-sm); }
.text-base { font-size: var(--text-base); }
.text-lg   { font-size: var(--text-lg); }
.font-normal   { font-weight: var(--weight-normal); }
.font-medium   { font-weight: var(--weight-medium); }
.font-semibold { font-weight: var(--weight-semibold); }
.font-bold     { font-weight: var(--weight-bold); }
.text-primary   { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-tertiary  { color: var(--text-tertiary); }
.text-success   { color: var(--color-success-600); }
.text-danger    { color: var(--color-danger-600); }
.text-warning   { color: var(--color-warning-600); }
.text-blue      { color: var(--color-primary-600); }
.mt-1  { margin-top: var(--sp-1); }
.mt-2  { margin-top: var(--sp-2); }
.mt-3  { margin-top: var(--sp-3); }
.mt-4  { margin-top: var(--sp-4); }
.mt-6  { margin-top: var(--sp-6); }
.mt-8  { margin-top: var(--sp-8); }
.mb-1  { margin-bottom: var(--sp-1); }
.mb-2  { margin-bottom: var(--sp-2); }
.mb-3  { margin-bottom: var(--sp-3); }
.mb-4  { margin-bottom: var(--sp-4); }
.mb-6  { margin-bottom: var(--sp-6); }
.mb-8  { margin-bottom: var(--sp-8); }
.gap-1 { gap: var(--sp-1); }
.gap-2 { gap: var(--sp-2); }
.gap-3 { gap: var(--sp-3); }
.gap-4 { gap: var(--sp-4); }
.gap-6 { gap: var(--sp-6); }
.gap-8 { gap: var(--sp-8); }
.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-end     { justify-content: flex-end; }
.flex-wrap    { flex-wrap: wrap; }
.flex-1       { flex: 1; }
.grid-2,
.grid-3,
.grid-4 {
  display: grid;
  gap: var(--sp-4);
}
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.nf-divider {
  height: 1px;
  background-color: var(--border-color);
  margin: var(--sp-6) 0;
}
.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}
@media (max-width: 1024px) {
  .nf-layout {
    position: relative;
  }
  .nf-sidebar {
    position: fixed;
    top: var(--topnav-height);
    left: 0;
    height: calc(100vh - var(--topnav-height));
    z-index: 500;
    transform: translateX(-100%);
    transition: transform var(--transition-slow);
    box-shadow: var(--shadow-xl);
  }
  .nf-sidebar.open {
    transform: translateX(0);
  }
  .nf-main {
    padding: var(--sp-4) 0 0;
  }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .nf-topnav__nav {
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}
@media (max-width: 767px) {
  .nf-topnav {
    padding: 0 var(--sp-4);
    gap: var(--sp-3);
  }
  .nf-topnav__nav {
    display: none;
  }
  .nf-main {
    padding: var(--sp-3) 0 0;
  }
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
  .nf-kpi-value {
    font-size: var(--text-2xl);
  }
  .nf-pagina__cab h1 {
    font-size: var(--text-xl);
  }
  .nf-table-wrapper {
    border-radius: var(--radius-md);
  }
  .nf-card-body {
    padding: var(--sp-4);
  }
}
.nf-topnav__tab-icon {
  width: 16px;
  height: 16px;
  margin-right: 7px;
  opacity: .7;
  flex-shrink: 0;
}
.nf-props {
  border: 1px solid var(--color-warning-500, #f59e0b);
  background: var(--color-warning-50, #fffbeb);
  border-radius: var(--radius-md, 8px);
  margin-bottom: 18px;
  overflow: hidden;
}
.dark .nf-props { background: rgba(245, 158, 11, .08); }
.nf-props__caja { display: block; }
.nf-props__cab {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 14px;
  font-size: 13px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.nf-props__cab::-webkit-details-marker { display: none; }
.nf-props__cab::before {
  content: "";
  width: 0; height: 0; flex-shrink: 0;
  border-left: 5px solid currentColor;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  transition: transform .15s ease;
  opacity: .65;
}
.nf-props__caja[open] > .nf-props__cab::before { transform: rotate(90deg); }
.nf-props__caja[open] > .nf-props__cab {
  border-bottom: 1px solid var(--color-warning-500, #f59e0b);
}
.nf-props__cab:hover { background: rgba(245, 158, 11, .08); }
.nf-props__caja:not([open]) > .nf-props__cab > span { display: none; }
.nf-props__cab span { color: var(--text-secondary, #475569); font-size: 12px; }
.nf-props__cab button {
  margin-left: auto;
  border: 1px solid var(--color-warning-700, #b45309);
  background: var(--color-warning-700, #b45309); color: #fff;
  border-radius: var(--radius-md, 8px); padding: 5px 12px;
  font-size: 12px; cursor: pointer;
}
.nf-props__cab button:disabled { opacity: .6; cursor: default; }
.nf-props__lista { list-style: none; margin: 0; padding: 0; }
.nf-prop {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 10px 14px;
  border-top: 1px solid var(--border-color, #e2e8f0);
}
.nf-prop:first-child { border-top: 0; }
.nf-prop__cuerpo { flex: 1; min-width: 0; }
.nf-prop__donde {
  font-size: 11px; letter-spacing: .02em; text-transform: uppercase;
  color: var(--text-secondary, #475569); margin-bottom: 2px;
}
.nf-prop__que { font-size: 14px; line-height: 1.4; }
.nf-prop__que s { color: var(--text-secondary, #475569); text-decoration-thickness: 1px; }
.nf-prop__que b { font-weight: 600; }
.nf-prop__porque {
  color: var(--text-secondary, #475569); font-size: 12px; margin-top: 4px; line-height: 1.45;
}
.nf-prop__porque > summary {
  cursor: pointer; font-size: 11px; color: var(--color-info-600, #1E73BE);
  list-style: none; display: inline-block;
}
.nf-prop__porque > summary::-webkit-details-marker { display: none; }
.nf-prop__porque > summary::after { content: " +"; }
.nf-prop__porque[open] > summary::after { content: " -"; }
.nf-prop__porque[open] > summary { margin-bottom: 3px; }
.nf-prop__editor { display: grid; gap: 8px; margin-top: 8px; max-width: 560px; }
.nf-prop__editor[hidden] { display: none; }
.nf-prop__editor label {
  display: block; font-size: 11px; color: var(--text-secondary, #475569);
}
.nf-prop__editor input, .nf-prop__editor textarea, .nf-prop__editor select {
  width: 100%; margin-top: 3px; padding: 6px 8px; font: inherit; font-size: 12px;
  border: 1px solid var(--border-color, #e2e8f0); border-radius: var(--radius-md, 8px);
  background: var(--bg-surface, #fff); color: inherit;
}
.nf-prop__botones { display: flex; gap: 6px; flex-shrink: 0; }
.nf-prop__botones button {
  border: 1px solid var(--border-strong, #cbd5e1); background: var(--bg-surface, #fff);
  color: inherit; border-radius: var(--radius-md, 8px); padding: 4px 10px;
  font-size: 12px; cursor: pointer;
}
.nf-prop__botones button[data-hacer="aceptar"] {
  border-color: var(--color-success-700, #15803d); color: var(--color-success-700, #15803d);
}
.nf-prop__botones button:hover { background: var(--bg-surface-2, #f1f5f9); }
.dark .nf-prop__botones button { background: var(--bg-surface-2, #1e293b); }
.nf-props__confirmar {
  margin: 0; padding: 12px 14px;
  background: var(--bg-surface, #fff);
  border-top: 1px solid var(--color-warning-500, #f59e0b);
  border-bottom: 1px solid var(--color-warning-500, #f59e0b);
  font-size: 13px;
}
.dark .nf-props__confirmar { background: var(--bg-surface-2, #1e293b); }
.dark .nf-props__cab button,
.dark .nf-props__confirmar button[data-si] {
  background: #3b2b08; border-color: #6b4f10; color: #fcd34d;
}
.nf-props__confirmar > p { margin: 0 0 8px; }
.nf-props__confirmar > ul {
  margin: 0 0 12px; padding-left: 18px; max-height: 220px; overflow-y: auto;
}
.nf-props__confirmar > ul > li { margin-bottom: 7px; line-height: 1.4; }
.nf-props__confirmar > ul > li > b {
  font-weight: 400; font-size: 11px; text-transform: uppercase;
  letter-spacing: .02em; color: var(--text-secondary, #475569);
}
.nf-props__confirmar-bot { display: flex; gap: 8px; }
.nf-props__confirmar-bot button {
  border-radius: var(--radius-md, 8px); padding: 6px 14px; font-size: 13px; cursor: pointer;
  border: 1px solid var(--border-strong, #cbd5e1); background: var(--bg-surface, #fff); color: inherit;
}
.nf-props__confirmar-bot #nf-props-si {
  border-color: var(--color-warning-700, #b45309);
  background: var(--color-warning-700, #b45309); color: #fff;
}
.nf-props__confirmar-bot button:disabled { opacity: .6; cursor: default; }
.nf-props__aviso {
  padding: 8px 14px; font-size: 12px;
  color: var(--color-danger-700, #b91c1c);
  border-top: 1px solid var(--border-color, #e2e8f0);
}
.nf-props__aviso[hidden] { display: none; }
@media (max-width: 700px) {
  .nf-prop { flex-direction: column; }
  .nf-prop__botones { width: 100%; }
}
