/* ============================================
   CAPA DE MODERNIZACIÓN PARA BOOTSTRAP 5
   Cárgala DESPUÉS del CSS de Bootstrap:

   <link href="bootstrap.min.css" rel="stylesheet">
   <link href="bootstrap5-modern.css" rel="stylesheet">

   Funciona redefiniendo las CSS variables nativas
   de Bootstrap (--bs-*), así que no hay que tocar
   el core ni recompilar Sass.
   ============================================ */

:root {
  /* --- Paleta --- */
  --bs-primary: #4f46e5;
  --bs-primary-rgb: 79, 70, 229;
  --bs-secondary: #64748b;
  --bs-secondary-rgb: 100, 116, 139;
  --bs-success: #10b981;
  --bs-success-rgb: 16, 185, 129;
  --bs-danger: #ef4444;
  --bs-danger-rgb: 239, 68, 68;
  --bs-warning: #f59e0b;
  --bs-warning-rgb: 245, 158, 11;
  --bs-info: #06b6d4;
  --bs-info-rgb: 6, 182, 212;

  --bs-body-bg: #f8fafc;
  --bs-body-color: #1e293b;
  --bs-border-color: #e2e8f0;

  /* --- Tipografía tipo Inter --- */
  --bs-body-font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --bs-body-font-size: 0.9375rem;
  --bs-body-font-weight: 400;
  --bs-body-line-height: 1.6;

  /* --- Radios más generosos --- */
  --bs-border-radius: 0.5rem;
  --bs-border-radius-sm: 0.375rem;
  --bs-border-radius-lg: 0.75rem;
  --bs-border-radius-xl: 1rem;
  --bs-border-radius-2xl: 1.25rem;

  /* Sombras suaves estilo Tailwind (shadow-sm / shadow) */
  --shadow-soft: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-card: 0 1px 3px 0 rgb(0 0 0 / 0.07), 0 1px 2px -1px rgb(0 0 0 / 0.06);
  --shadow-lift: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.05);
}

body {
  font-feature-settings: "cv11", "ss01";
  letter-spacing: -0.011em;
}

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* --- Botones --- */
.btn {
  font-weight: 500;
  border-width: 1.5px;
  box-shadow: none;
  transition: all .15s ease;
}
.btn-primary,
.btn-success,
.btn-danger,
.btn-warning,
.btn-info {
  border: none;
  box-shadow: var(--shadow-soft);
}
.btn-primary:hover { box-shadow: 0 4px 12px rgb(var(--bs-primary-rgb) / 0.35); transform: translateY(-1px); }
.btn-outline-primary {
  border-color: var(--bs-border-color);
  color: var(--bs-body-color);
}
.btn-outline-primary:hover {
  background: var(--bs-primary);
  border-color: var(--bs-primary);
}
.btn:focus-visible { box-shadow: 0 0 0 3px rgb(var(--bs-primary-rgb) / 0.25); }

/* --- Cards --- */
.card {
  border: 1px solid var(--bs-border-color);
  box-shadow: var(--shadow-card);
  border-radius: var(--bs-border-radius-lg);
}
.card:hover { box-shadow: var(--shadow-lift); }
.card-header {
  background: transparent;
  border-bottom: 1px solid var(--bs-border-color);
  font-weight: 600;
}

/* --- Formularios --- */
.form-control, .form-select {
  border-color: var(--bs-border-color);
  box-shadow: none;
  padding: 0.55rem 0.85rem;
}
.form-control:focus, .form-select:focus {
  border-color: var(--bs-primary);
  box-shadow: 0 0 0 3px rgb(var(--bs-primary-rgb) / 0.15);
}
.form-label { font-weight: 500; font-size: 0.875rem; margin-bottom: 0.4rem; }

/* --- Badges --- */
.badge { font-weight: 600; padding: 0.4em 0.75em; border-radius: 999px; }
.text-bg-primary { background: rgb(var(--bs-primary-rgb) / 0.1) !important; color: var(--bs-primary) !important; }
.text-bg-success { background: rgb(var(--bs-success-rgb) / 0.1) !important; color: var(--bs-success) !important; }
.text-bg-danger  { background: rgb(var(--bs-danger-rgb) / 0.1) !important; color: var(--bs-danger) !important; }

/* --- Navbar --- */
.navbar {
  background: #fff !important;
  border-bottom: 1px solid var(--bs-border-color);
  box-shadow: var(--shadow-soft);
}
.navbar-brand { font-weight: 800; letter-spacing: -0.03em; }
.nav-link { font-weight: 500; }

/* --- Alerts --- */
.alert { border: none; border-left: 3px solid; box-shadow: var(--shadow-soft); }
.alert-primary { border-left-color: var(--bs-primary); background: rgb(var(--bs-primary-rgb) / 0.08); color: #3730a3; }

/* --- Tablas --- */
.table { --bs-table-border-color: var(--bs-border-color); }
.table thead th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  font-weight: 600;
  border-bottom-width: 1px;
}

/* --- Sombras generales (sobreescribe utilities shadow-*) --- */
.shadow-sm { box-shadow: var(--shadow-soft) !important; }
.shadow    { box-shadow: var(--shadow-card) !important; }
.shadow-lg { box-shadow: var(--shadow-lift) !important; }

/* --- Acme UI: composition and polish --- */
:root {
  --ink: #111827;
  --muted: #64748b;
  --surface: #ffffff;
  --purple-soft: #eef2ff;
  --grid-dot: #dbe3f0;
  --hero-glow: #ddd6fe;
}

body {
  background: #f8fafc;
  background-image: radial-gradient(var(--grid-dot) 0.7px, transparent 0.7px);
  background-size: 22px 22px;
}

.navbar { background: rgba(255,255,255,.86) !important; backdrop-filter: blur(14px); }
.theme-toggle { display: inline-grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 1px solid var(--bs-border-color); border-radius: 9px; background: transparent; color: var(--muted); cursor: pointer; transition: .2s ease; }
.theme-toggle:hover { background: var(--purple-soft); color: var(--bs-primary); transform: rotate(-10deg); }
.theme-icon { font-size: 1rem; line-height: 1; }
.theme-select { max-width: 92px; padding: .35rem 1.5rem .35rem .55rem; border: 1px solid var(--bs-border-color); border-radius: 9px; background-color: var(--surface); color: var(--muted); font-size: .68rem; cursor: pointer; }
.navbar-brand { color: var(--ink); display: inline-flex; align-items: center; gap: .5rem; }
.brand-mark { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; color: white; background: var(--bs-primary); font-size: .8rem; }
.brand-dot { color: var(--bs-primary); }
.nav-link { color: var(--muted); font-size: .875rem; }
.nav-link:hover { color: var(--bs-primary); }
.btn-light { background: transparent; border-color: transparent; color: var(--muted); }
.btn-light:hover { background: #f1f5f9; color: var(--ink); }
.btn-white { background: var(--surface); border-color: var(--bs-border-color); color: var(--ink); box-shadow: var(--shadow-soft); }
.btn-white:hover { border-color: #cbd5e1; background: #fff; transform: translateY(-1px); }
.btn-lg { padding: .75rem 1.05rem; font-size: .9rem; border-radius: .7rem; }
.py-lg-6 { padding-top: 5rem !important; padding-bottom: 5rem !important; }
.hero { position: relative; }
.hero:before { content: ''; position: absolute; width: 420px; height: 420px; top: 0; left: 36%; background: var(--hero-glow); filter: blur(90px); opacity: .3; pointer-events: none; }
.hero > .row { position: relative; }
.eyebrow { color: var(--bs-primary); font-size: .7rem; font-weight: 700; letter-spacing: .13em; }
.pulse-dot { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 4px #dcfce7; }
.display-3 { max-width: 700px; color: var(--ink); font-size: clamp(2.65rem, 5vw, 4.35rem); font-weight: 800; line-height: 1.04; letter-spacing: -.055em; }
.lead { max-width: 560px; font-size: 1.05rem; line-height: 1.65; }
.text-gradient { background: linear-gradient(100deg, #4f46e5, #8b5cf6 65%, #c084fc); background-clip: text; -webkit-background-clip: text; color: transparent; }
.avatar-stack { display: flex; }
.avatar-stack span { display: grid; place-items: center; width: 28px; height: 28px; margin-left: -6px; border: 2px solid #f8fafc; border-radius: 50%; background: #c7d2fe; color: #3730a3; font-size: .57rem; font-weight: 700; }
.avatar-stack span:first-child { margin-left: 0; background: #fecdd3; color: #9f1239; }
.avatar-stack span:last-child { background: #e2e8f0; color: #475569; }
.preview-window { overflow: hidden; border: 1px solid #dbe3f0; border-radius: 1rem; background: rgba(255,255,255,.94); box-shadow: 0 25px 60px -25px rgb(79 70 229 / .28), var(--shadow-card); transform: rotate(2deg); }
.window-bar { display: flex; align-items: center; gap: 5px; padding: 13px 16px; border-bottom: 1px solid #eef2f7; background: #fbfdff; }
.window-bar span { width: 7px; height: 7px; border-radius: 50%; background: #cbd5e1; }.window-bar span:first-child { background: #fda4af; }.window-bar span:nth-child(2) { background: #fde68a; }.window-bar span:nth-child(3) { background: #86efac; }
.window-bar small { margin-left: 9px; color: #94a3b8; font-size: .58rem; }
.preview-body { padding: 24px; }.muted-label { color: #94a3b8; font-size: .6rem; font-weight: 700; letter-spacing: .11em; }.preview-number { color: var(--ink); font-size: 2rem; font-weight: 800; letter-spacing: -.05em; }.preview-body .badge { font-size: .65rem; }
.chart { display: flex; align-items: end; gap: 8px; height: 90px; padding: 0 4px; border-bottom: 1px solid #e2e8f0; background: repeating-linear-gradient(to bottom, transparent 0, transparent 29px, #f1f5f9 30px); }.chart i { flex: 1; border-radius: 4px 4px 0 0; background: linear-gradient(#818cf8, #c4b5fd); }.chart i:nth-child(1){height:30%}.chart i:nth-child(2){height:45%}.chart i:nth-child(3){height:38%}.chart i:nth-child(4){height:66%}.chart i:nth-child(5){height:55%}.chart i:nth-child(6){height:78%}.chart i:nth-child(7){height:68%}.chart i:nth-child(8){height:94%}
.preview-list { border-top: 1px solid #eef2f7; }.preview-list > div { display: flex; align-items: center; gap: 9px; padding-top: 13px; color: #475569; font-size: .72rem; }.preview-list strong { margin-left: auto; color: var(--ink); }.list-icon, .feature-icon { display: grid; place-items: center; border-radius: 8px; font-weight: 700; }.list-icon { width: 24px; height: 24px; font-size: .7rem; }.purple { background: var(--purple-soft); color: #4f46e5; }.green { background: #ecfdf5; color: #059669; }.orange { background: #fff7ed; color: #ea580c; }
.section-heading h2 { color: var(--ink); font-size: clamp(1.7rem, 3vw, 2.35rem); line-height: 1.12; letter-spacing: -.045em; }
.feature-card { padding: 1.35rem; transition: transform .2s ease, box-shadow .2s ease; }.feature-card:hover { transform: translateY(-4px); }.feature-icon { width: 38px; height: 38px; margin-bottom: 1.25rem; font-size: 1rem; }.feature-card h5 { color: var(--ink); font-size: 1rem; }.feature-card p { font-size: .86rem; line-height: 1.6; }
.activity-card { overflow: hidden; }.activity-card .card-header { padding: 1.25rem 1.35rem; }.activity-card .card-header h5 { color: var(--ink); font-size: 1rem; }.modern-table { min-width: 720px; }.modern-table th { padding: 1rem 1.35rem; background: #fbfdff; }.modern-table td { padding: 1.05rem 1.35rem; color: var(--muted); font-size: .82rem; }.modern-table tbody tr { transition: background .15s ease; }.modern-table tbody tr:hover { background: #fafbff; }.modern-table td:first-child strong { display: block; color: var(--ink); font-size: .84rem; }.modern-table td:first-child small { display: block; margin-top: .15rem; color: #94a3b8; font-size: .7rem; }.person { display: inline-flex; align-items: center; gap: .5rem; color: var(--ink); white-space: nowrap; }.person-avatar { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; font-size: .58rem; font-weight: 700; }.violet { background: #ede9fe; color: #6d28d9; }.blue { background: #dbeafe; color: #1d4ed8; }.status { display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .6rem; border-radius: 999px; font-size: .68rem; font-weight: 600; }.status i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }.status-success { color: #059669; background: #ecfdf5; }.status-primary { color: #4f46e5; background: #eef2ff; }.status-danger { color: #dc2626; background: #fef2f2; }.table-action { padding: 0; border: 0; background: none; color: var(--bs-primary); font-size: .76rem; font-weight: 600; }.table-action:hover { text-decoration: underline; }
footer { border-color: #e2e8f0 !important; }
@media (max-width: 991.98px) { .preview-window { max-width: 560px; margin: 0 auto; transform: rotate(1deg); } }
@media (max-width: 575.98px) { .navbar .btn-light { display: none; }.hero { padding-top: 3.5rem !important; }.preview-body { padding: 18px; }.preview-window { transform: none; }.display-3 { font-size: 2.7rem; } footer { display: block !important; } footer small { display: block; margin-bottom: .35rem; } }

[data-theme="neon"] { --bs-primary: #00d9a6; --bs-primary-rgb: 0, 217, 166; --bs-body-bg: #080b14; --bs-body-color: #d9fdf3; --bs-border-color: #213b41; --ink: #f0fffb; --muted: #89aaa7; --surface: #0e1720; --purple-soft: #123b3b; --grid-dot: #17302f; --hero-glow: #064e4b; }
[data-theme="pastel"] { --bs-primary: #d16ba5; --bs-primary-rgb: 209, 107, 165; --bs-body-bg: #fff8fb; --bs-body-color: #59485d; --bs-border-color: #f2dce9; --ink: #4c3b50; --muted: #927b91; --surface: #fffdfd; --purple-soft: #fbe7f2; --grid-dot: #f4dce9; --hero-glow: #fbcfe8; }
[data-theme="slate"] { --bs-primary: #475569; --bs-primary-rgb: 71, 85, 105; --bs-body-bg: #f1f3f5; --bs-body-color: #343b46; --bs-border-color: #d5d9df; --ink: #202630; --muted: #687384; --surface: #ffffff; --purple-soft: #e4e7eb; --grid-dot: #d9dde3; --hero-glow: #cbd5e1; }
[data-theme] body { background-color: var(--bs-body-bg); }
[data-theme="dark"] {
  --bs-body-bg: #0b1120;
  --bs-body-color: #e2e8f0;
  --bs-border-color: #25324a;
  --ink: #f8fafc;
  --muted: #94a3b8;
  --surface: #111a2d;
  --purple-soft: #25245a;
  --grid-dot: #1c2940;
  --hero-glow: #312e81;
  color-scheme: dark;
}
[data-theme="dark"] body { background-color: #0b1120; }
[data-theme="dark"] .navbar { background: rgba(11,17,32,.86) !important; }
[data-theme="dark"] .navbar-brand, [data-theme="dark"] .btn-white { color: var(--ink); }
[data-theme="dark"] .btn-light { color: var(--muted); }
[data-theme="dark"] .btn-light:hover, [data-theme="dark"] .btn-white:hover { background: #18243a; color: var(--ink); }
[data-theme="dark"] .preview-window, [data-theme="dark"] .card { background: var(--surface); border-color: var(--bs-border-color); }
[data-theme="dark"] .window-bar { background: #0f172a; border-color: var(--bs-border-color); }
[data-theme="dark"] .chart { border-color: var(--bs-border-color); background: repeating-linear-gradient(to bottom, transparent 0, transparent 29px, #1c2940 30px); }
[data-theme="dark"] .preview-list, [data-theme="dark"] footer { border-color: var(--bs-border-color) !important; }
[data-theme="dark"] .theme-toggle { background: #18243a; color: #fbbf24; }
[data-theme="dark"] .theme-select { background: #18243a; color: #cbd5e1; }
[data-theme="dark"] .feature-card p, [data-theme="dark"] .text-secondary { color: var(--muted) !important; }
[data-theme="dark"] .modern-table th { background: #0f172a; }.modern-table tbody tr:hover { background: #162238; }.modern-table td { border-color: var(--bs-border-color); }.modern-table td:first-child small { color: #64748b; }.status-danger { background: #3a1d2a; }.violet { background: #30245e; }.blue { background: #1e355e; }.orange { background: #4a2c1d; }
