/* ═══════════════════════════════════════════════
   NexoConta AI — Premium Design System v2
   Modern · Futuristic · SaaS-grade
═══════════════════════════════════════════════ */

:root {
  /* Backgrounds */
  --bg:           #050510;
  --bg2:          #09091a;
  --bg3:          #0e0e24;
  --surface:      rgba(255,255,255,0.035);
  --surface2:     rgba(255,255,255,0.06);
  --surface3:     rgba(255,255,255,0.09);
  --border:       rgba(255,255,255,0.07);
  --border2:      rgba(255,255,255,0.13);

  /* Brand */
  --purple:       #7c3aed;
  --purple-light: #a855f7;
  --purple-dim:   rgba(124,58,237,0.12);
  --cyan:         #06b6d4;
  --cyan-dim:     rgba(6,182,212,0.12);
  --green:        #10b981;
  --green-dim:    rgba(16,185,129,0.12);
  --red:          #ef4444;
  --red-dim:      rgba(239,68,68,0.12);
  --yellow:       #f59e0b;
  --yellow-dim:   rgba(245,158,11,0.12);

  /* Gradients */
  --grad:       linear-gradient(135deg, #7c3aed 0%, #06b6d4 100%);
  --grad-soft:  linear-gradient(135deg, rgba(124,58,237,0.18) 0%, rgba(6,182,212,0.18) 100%);
  --grad-green: linear-gradient(135deg, #10b981, #06b6d4);
  --grad-red:   linear-gradient(135deg, #ef4444, #f59e0b);

  /* Typography */
  --text:   #e2e8f0;
  --muted:  #64748b;
  --muted2: #94a3b8;

  /* Shape */
  --radius:    14px;
  --radius-lg: 20px;
  --radius-sm: 9px;

  /* Shadows */
  --shadow:      0 8px 40px rgba(0,0,0,0.55);
  --shadow-sm:   0 2px 16px rgba(0,0,0,0.35);
  --shadow-glow: 0 0 50px rgba(124,58,237,0.18);

  /* Layout */
  --sidebar-w: 256px;
  --navbar-h:  64px;

  /* Motion */
  --transition: all .2s cubic-bezier(.4,0,.2,1);

  /* Custom select arrow */
  --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2394a3b8' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* ── Reset ───────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Ambient glow orbs */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 15% 0%,   rgba(124,58,237,0.07) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 85% 100%,  rgba(6,182,212,0.05)  0%, transparent 55%);
  pointer-events: none;
  z-index: 0;
}

/* Scrollbar */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(124,58,237,0.35); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--purple); }

/* ══════════════════════════════════════
   PÁGINAS
══════════════════════════════════════ */
.page { display: none; position: relative; z-index: 1; }
.page.active { display: block; }

/* ══════════════════════════════════════
   AUTH
══════════════════════════════════════ */
.auth-bg {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(ellipse 60% 60% at 20% 50%, rgba(124,58,237,0.13) 0%, transparent 60%),
    radial-gradient(ellipse 50% 50% at 80% 20%, rgba(6,182,212,0.09)  0%, transparent 55%),
    var(--bg);
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  padding: 48px;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: var(--shadow), 0 0 80px rgba(124,58,237,0.06);
  animation: cardIn .5s cubic-bezier(.4,0,.2,1);
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.auth-logo {
  text-align: center;
  margin-bottom: 36px;
}

.logo-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 18px;
  background: var(--grad);
  font-size: 26px;
  margin-bottom: 16px;
  box-shadow: 0 0 40px rgba(124,58,237,0.5), 0 8px 24px rgba(0,0,0,0.4);
  animation: logoPulse 3s ease-in-out infinite;
}

@keyframes logoPulse {
  0%, 100% { box-shadow: 0 0 40px rgba(124,58,237,0.45), 0 8px 24px rgba(0,0,0,0.4); }
  50%       { box-shadow: 0 0 65px rgba(124,58,237,0.7),  0 8px 24px rgba(0,0,0,0.4); }
}

.auth-logo h1 {
  font-size: 24px;
  font-weight: 800;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -.5px;
  margin-bottom: 6px;
}

.auth-logo p { color: var(--muted2); font-size: 13px; }

.auth-tabs {
  display: flex;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 4px;
  margin-bottom: 28px;
  gap: 4px;
}

.auth-tab {
  flex: 1;
  background: none;
  border: none;
  color: var(--muted2);
  font-size: 13px;
  font-weight: 600;
  padding: 9px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}

.auth-tab.active {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 2px 16px rgba(124,58,237,0.45);
}

/* ══════════════════════════════════════
   ONBOARDING
══════════════════════════════════════ */
.onboarding-bg {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 24px;
  background:
    radial-gradient(ellipse 60% 50% at 30% 60%, rgba(124,58,237,0.1) 0%, transparent 55%),
    radial-gradient(ellipse 50% 40% at 70% 30%, rgba(6,182,212,0.07) 0%, transparent 50%),
    var(--bg);
}

.onboarding-card {
  width: 100%;
  max-width: 600px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  padding: 48px;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: var(--shadow);
  animation: cardIn .5s cubic-bezier(.4,0,.2,1);
}

.ob-progress {
  display: flex;
  gap: 6px;
  margin-bottom: 36px;
}

.ob-dot {
  height: 4px;
  flex: 1;
  background: var(--surface3);
  border-radius: 2px;
  transition: background .5s cubic-bezier(.4,0,.2,1);
}

.ob-dot.active { background: var(--grad); }
.ob-dot.done   { background: var(--purple); }

.ob-step        { display: none; }
.ob-step.active { display: block; animation: stepIn .3s ease; }

@keyframes stepIn {
  from { opacity: 0; transform: translateX(10px); }
  to   { opacity: 1; transform: translateX(0); }
}

.ob-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -.3px;
}

.ob-subtitle {
  color: var(--muted2);
  font-size: 13px;
  margin-bottom: 28px;
  line-height: 1.6;
}

/* ══════════════════════════════════════
   HAMBURGER (mobile)
══════════════════════════════════════ */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 10px;
  cursor: pointer;
  padding: 9px 8px;
  transition: var(--transition);
  flex-shrink: 0;
}

.hamburger span {
  display: block;
  height: 2px;
  background: var(--muted2);
  border-radius: 1px;
  transition: var(--transition);
}

.hamburger:hover { background: var(--surface3); border-color: var(--purple); }
.hamburger:hover span { background: var(--purple-light); }

/* ══════════════════════════════════════
   SIDEBAR
══════════════════════════════════════ */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: rgba(5,5,16,0.98);
  border-right: 1px solid var(--border);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  display: flex;
  flex-direction: column;
  z-index: 101;
  overflow-y: auto;
  overflow-x: hidden;
  transition: transform .3s cubic-bezier(.4,0,.2,1);
}

.sidebar-logo {
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  height: var(--navbar-h);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--grad);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  box-shadow: 0 0 22px rgba(124,58,237,0.5);
  transition: var(--transition);
}

.sidebar-logo:hover .logo-mark {
  box-shadow: 0 0 32px rgba(124,58,237,0.75);
  transform: rotate(-6deg) scale(1.06);
}

.logo-text {
  font-size: 15px;
  font-weight: 700;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
  letter-spacing: -.3px;
}

.sidebar-nav { flex: 1; padding: 14px 10px; }

.nav-section {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--muted);
  padding: 18px 10px 6px;
  opacity: .6;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  color: var(--muted2);
  cursor: pointer;
  transition: var(--transition);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 2px;
  position: relative;
  user-select: none;
}

.nav-item:hover {
  background: var(--surface2);
  color: var(--text);
}

.nav-item.active {
  background: var(--purple-dim);
  color: var(--purple-light);
  font-weight: 600;
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 65%;
  background: var(--grad);
  border-radius: 0 3px 3px 0;
  box-shadow: 0 0 10px rgba(124,58,237,0.7);
}

.nav-icon { font-size: 15px; width: 20px; text-align: center; flex-shrink: 0; }

.sidebar-footer {
  padding: 12px 10px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

/* Sidebar backdrop (mobile overlay) */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 100;
  animation: fadeIn .2s ease;
}

body.sidebar-open .sidebar-backdrop { display: block; }
body.sidebar-open .sidebar          { transform: translateX(0) !important; }

/* ══════════════════════════════════════
   NAVBAR
══════════════════════════════════════ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--navbar-h);
  z-index: 99;
  background: rgba(5,5,16,0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px 0 calc(var(--sidebar-w) + 24px);
  justify-content: space-between;
  gap: 16px;
}

/* Gradient accent line */
.navbar::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: var(--sidebar-w);
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(124,58,237,0.5), rgba(6,182,212,0.25), transparent 70%);
}

.navbar-left { display: flex; align-items: center; gap: 12px; flex: 1; }

.navbar-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -.3px;
}

.navbar-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.navbar-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 24px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted2);
  white-space: nowrap;
}

.navbar-badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  flex-shrink: 0;
  animation: dotPulse 2.5s ease-in-out infinite;
}

@keyframes dotPulse {
  0%, 100% { box-shadow: 0 0 6px var(--green); }
  50%       { box-shadow: 0 0 16px var(--green); }
}

/* ══════════════════════════════════════
   APP LAYOUT
══════════════════════════════════════ */
.app-layout {
  padding-top: var(--navbar-h);
  padding-left: var(--sidebar-w);
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

.main-content {
  padding: 32px;
  max-width: 1440px;
}

/* ══════════════════════════════════════
   PAGE HEADER
══════════════════════════════════════ */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 16px;
}

.page-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -.5px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.page-subtitle { font-size: 13px; color: var(--muted); margin-top: 4px; }

/* ══════════════════════════════════════
   CARDS
══════════════════════════════════════ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  position: relative;
  transition: border-color .2s, box-shadow .2s;
  margin-bottom: 20px;
  overflow: hidden;
}

/* top shimmer line on hover */
.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(124,58,237,0.5) 50%, transparent 100%);
  opacity: 0;
  transition: opacity .3s;
}

.card:last-child { margin-bottom: 0; }
.card:hover { border-color: var(--border2); }
.card:hover::before { opacity: 1; }

.card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -.2px;
}

/* ── Stat cards ──────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px 20px;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
  color: var(--text);        /* evita que <button> use color negro por defecto */
  font-family: inherit;      /* idem para font */
}

/* Always-on colored top bar */
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--grad);
  border-radius: var(--radius) var(--radius) 0 0;
}

.stat-card.green::before  { background: var(--grad-green); }
.stat-card.red::before    { background: var(--grad-red); }
.stat-card.yellow::before { background: linear-gradient(135deg, #f59e0b, #fbbf24); }
.stat-card.cyan::before   { background: linear-gradient(135deg, #06b6d4, #67e8f9); }
.stat-card.purple::before { background: linear-gradient(135deg, #7c3aed, #a855f7); }

.stat-card:hover {
  border-color: var(--border2);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.35);
}

.stat-icon { font-size: 20px; margin-bottom: 14px; display: block; }

.stat-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  margin-bottom: 8px;
}

.stat-value {
  font-size: 26px;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 6px;
  letter-spacing: -1px;
}

.stat-sub { font-size: 11px; color: var(--muted2); margin-top: 4px; }

.stat-card.green  .stat-value { color: var(--green); }
.stat-card.red    .stat-value { color: var(--red); }
.stat-card.yellow .stat-value { color: var(--yellow); }
.stat-card.purple .stat-value { color: var(--purple-light); }
.stat-card.cyan   .stat-value { color: var(--cyan); }

.stat-card.glow-purple { box-shadow: 0 0 30px rgba(124,58,237,0.1); }
.stat-card.glow-green  { box-shadow: 0 0 30px rgba(16,185,129,0.1); }
.stat-card.glow-red    { box-shadow: 0 0 30px rgba(239,68,68,0.1); }

/* ══════════════════════════════════════
   FORMULARIOS
══════════════════════════════════════ */
.form-group { margin-bottom: 18px; }

.form-group label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted2);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border2);
  border-radius: 10px;
  color: var(--text);
  padding: 11px 14px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: var(--transition);
}

.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--muted); font-size: 13px; }

.form-group input:hover:not(:focus),
.form-group select:hover:not(:focus),
.form-group textarea:hover:not(:focus) { border-color: rgba(255,255,255,0.2); }

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--purple);
  background: rgba(124,58,237,0.05);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.15), 0 0 20px rgba(124,58,237,0.07);
}

/* Custom select arrow */
.form-group select {
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  padding-right: 42px;
  background-image: var(--select-arrow);
  background-repeat: no-repeat;
  background-position: right 14px center;
}

.form-group select option {
  background-color: #09091a;
  color: #e2e8f0;
}

.form-group textarea { resize: vertical; min-height: 88px; }

.form-row   { display: grid; grid-template-columns: 1fr 1fr;       gap: 16px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr;   gap: 16px; }

/* ══════════════════════════════════════
   BOTONES
══════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  border: none;
  background: none;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
  font-family: inherit;
  user-select: none;
  letter-spacing: .01em;
  position: relative;
  overflow: hidden;
}

.btn:disabled { opacity: .4; cursor: not-allowed; pointer-events: none; }

/* Primary */
.btn-primary {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 4px 20px rgba(124,58,237,0.4);
}

.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.18) 0%, transparent 60%);
  opacity: 0;
  transition: opacity .2s;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 28px rgba(124,58,237,0.55);
}

.btn-primary:hover:not(:disabled)::after { opacity: 1; }

/* Secondary */
.btn-secondary {
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border2);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--surface3);
  border-color: var(--purple);
  color: var(--purple-light);
}

/* Success */
.btn-success {
  background: var(--green);
  color: #fff;
  box-shadow: 0 4px 16px rgba(16,185,129,0.35);
}

.btn-success:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(16,185,129,0.45);
}

/* Danger */
.btn-danger {
  background: var(--red);
  color: #fff;
  box-shadow: 0 4px 16px rgba(239,68,68,0.3);
}

.btn-danger:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(239,68,68,0.4);
}

/* Warning */
.btn-warning {
  background: var(--yellow);
  color: #000;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(245,158,11,0.3);
}

.btn-warning:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(245,158,11,0.4);
}

/* Ghost */
.btn-ghost {
  background: transparent;
  color: var(--muted2);
  border: 1px solid var(--border);
}

.btn-ghost:hover:not(:disabled) {
  background: var(--surface2);
  color: var(--text);
  border-color: var(--border2);
}

.btn-sm   { padding: 7px 13px; font-size: 12px; border-radius: 8px; }
.btn-lg   { padding: 13px 28px; font-size: 15px; }
.btn-full { width: 100%; }
.btn-icon { padding: 9px; aspect-ratio: 1; }

/* ══════════════════════════════════════
   ALERTAS
══════════════════════════════════════ */
.alert {
  display: none;
  padding: 13px 16px;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 16px;
  border: 1px solid transparent;
  border-left-width: 3px;
  line-height: 1.5;
}

.alert.show {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  animation: alertIn .25s ease;
}

@keyframes alertIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.alert-error   { background: rgba(239,68,68,0.08);   border-color: rgba(239,68,68,0.2);   border-left-color: var(--red);    color: #fca5a5; }
.alert-success { background: rgba(16,185,129,0.08);  border-color: rgba(16,185,129,0.2);  border-left-color: var(--green);  color: #6ee7b7; }
.alert-warning { background: rgba(245,158,11,0.08);  border-color: rgba(245,158,11,0.2);  border-left-color: var(--yellow); color: #fcd34d; }
.alert-info    { background: rgba(6,182,212,0.08);   border-color: rgba(6,182,212,0.2);   border-left-color: var(--cyan);   color: #67e8f9; }

/* ══════════════════════════════════════
   TABLAS
══════════════════════════════════════ */
.table-wrap { overflow-x: auto; border-radius: 10px; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }

thead tr {
  background: rgba(255,255,255,0.04);
  border-bottom: 1px solid var(--border2);
}

th {
  text-align: left;
  padding: 12px 16px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  white-space: nowrap;
}

td {
  padding: 13px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  vertical-align: middle;
  color: var(--text);
}

tr:last-child td { border-bottom: none; }

tbody tr { transition: background .12s; }
tbody tr:nth-child(even) td { background: rgba(255,255,255,0.012); }
tbody tr:hover td { background: rgba(124,58,237,0.07) !important; }

/* ══════════════════════════════════════
   BADGES
══════════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.badge-green  { background: rgba(16,185,129,0.12);  color: #6ee7b7;  border: 1px solid rgba(16,185,129,0.25); }
.badge-red    { background: rgba(239,68,68,0.12);   color: #fca5a5;  border: 1px solid rgba(239,68,68,0.25); }
.badge-yellow { background: rgba(245,158,11,0.12);  color: #fcd34d;  border: 1px solid rgba(245,158,11,0.25); }
.badge-purple { background: rgba(124,58,237,0.12);  color: #c4b5fd;  border: 1px solid rgba(124,58,237,0.25); }
.badge-cyan   { background: rgba(6,182,212,0.12);   color: #67e8f9;  border: 1px solid rgba(6,182,212,0.25); }
.badge-gray   { background: var(--surface2);        color: var(--muted2); border: 1px solid var(--border2); }

/* ══════════════════════════════════════
   MODAL
══════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,8,0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.open { display: flex; animation: fadeIn .2s ease; }

.modal {
  background: #09091c;
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 520px;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: var(--shadow), 0 0 80px rgba(124,58,237,0.12);
  animation: slideUp .25s cubic-bezier(.4,0,.2,1);
}

.modal-lg { max-width: 680px; }
.modal-xl { max-width: 860px; }

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px) scale(.97); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 28px;
  border-bottom: 1px solid var(--border);
}

.modal-header h3 {
  font-size: 16px;
  font-weight: 700;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -.2px;
}

.modal-close {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--muted2);
  font-size: 15px;
  cursor: pointer;
  border-radius: 8px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  font-family: inherit;
  flex-shrink: 0;
}

.modal-close:hover { background: rgba(239,68,68,0.12); color: var(--red); border-color: rgba(239,68,68,0.3); }

.modal-body   { padding: 28px; }
.modal-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 18px 28px;
  border-top: 1px solid var(--border);
}

/* ══════════════════════════════════════
   AI CHAT
══════════════════════════════════════ */
.chat-container {
  display: flex;
  flex-direction: column;
  height: calc(100vh - var(--navbar-h) - 64px);
  min-height: 440px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

/* Chat header bar */
.chat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: rgba(124,58,237,0.05);
  flex-shrink: 0;
}

.chat-header-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--grad);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
  box-shadow: 0 0 16px rgba(124,58,237,0.4);
}

.chat-header-info { flex: 1; }
.chat-header-title  { font-size: 14px; font-weight: 700; color: var(--text); }
.chat-header-status { font-size: 11px; color: var(--green); display: flex; align-items: center; gap: 5px; }
.chat-header-status::before {
  content: '';
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.chat-msg {
  max-width: 80%;
  padding: 13px 18px;
  border-radius: 16px;
  font-size: 13.5px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
  animation: msgIn .25s cubic-bezier(.4,0,.2,1);
}

@keyframes msgIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.chat-msg.user {
  background: var(--grad);
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
  box-shadow: 0 4px 20px rgba(124,58,237,0.35);
}

.chat-msg.model {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border2);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  color: var(--text);
}

.chat-input-area {
  display: flex;
  gap: 10px;
  padding: 18px 20px;
  border-top: 1px solid var(--border);
  background: rgba(5,5,16,0.7);
  flex-shrink: 0;
}

.chat-input {
  flex: 1;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border2);
  border-radius: 24px;
  color: var(--text);
  padding: 12px 20px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: var(--transition);
}

.chat-input:focus {
  border-color: var(--purple);
  background: rgba(124,58,237,0.05);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.12);
}

.chat-input::placeholder { color: var(--muted); }

/* ══════════════════════════════════════
   DATE CARDS
══════════════════════════════════════ */
.dates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
}

.date-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.date-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--grad-soft);
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
}

.date-card:hover { border-color: var(--purple); transform: translateY(-2px); box-shadow: 0 12px 30px rgba(0,0,0,0.3); }
.date-card:hover::after { opacity: 1; }

.date-card .emoji  { font-size: 30px; margin-bottom: 12px; display: block; position: relative; z-index: 1; }
.date-card .name   { font-size: 14px; font-weight: 700; margin-bottom: 4px; position: relative; z-index: 1; }
.date-card .date   { font-size: 12px; color: var(--muted2); margin-bottom: 12px; position: relative; z-index: 1; }
.date-card .days   { font-size: 24px; font-weight: 800; position: relative; z-index: 1; letter-spacing: -1px; }

.date-card.urgent { border-color: rgba(239,68,68,0.35);   box-shadow: 0 0 24px rgba(239,68,68,0.08); }
.date-card.soon   { border-color: rgba(245,158,11,0.35);  box-shadow: 0 0 24px rgba(245,158,11,0.08); }
.date-card.ok     { border-color: rgba(16,185,129,0.25); }
.date-card.past   { opacity: .55; filter: saturate(.5); }

.date-card .tip {
  font-size: 11px;
  color: var(--muted2);
  margin-top: 10px;
  line-height: 1.5;
  position: relative;
  z-index: 1;
}

/* ══════════════════════════════════════
   EMPTY STATES
══════════════════════════════════════ */
.empty-state {
  text-align: center;
  padding: 72px 24px;
  color: var(--muted);
}

.empty-state .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  border-radius: 24px;
  background: var(--grad-soft);
  border: 1px solid var(--border2);
  font-size: 36px;
  margin-bottom: 20px;
}

.empty-state h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--muted2);
  margin-bottom: 10px;
}

.empty-state p {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 24px;
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

/* ══════════════════════════════════════
   SPINNER / LOADING
══════════════════════════════════════ */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,0.15);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  display: inline-block;
  flex-shrink: 0;
}

.spinner-lg     { width: 40px; height: 40px; border-width: 3px; }
.spinner-purple { border-top-color: var(--purple-light); border-color: rgba(124,58,237,0.2); }

@keyframes spin { to { transform: rotate(360deg); } }

.loading-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 100px 20px;
  gap: 16px;
  color: var(--muted);
  font-size: 13px;
}

/* ══════════════════════════════════════
   CODE
══════════════════════════════════════ */
code {
  font-family: 'Courier New', monospace;
  font-size: 12px;
  background: var(--surface3);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--cyan);
}

/* ══════════════════════════════════════
   UTILIDADES
══════════════════════════════════════ */
.flex   { display: flex; }
.grid   { display: grid; }
.block  { display: block; }
.hidden { display: none !important; }

.items-center    { align-items: center; }
.items-start     { align-items: flex-start; }
.items-end       { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.justify-center  { justify-content: center; }
.justify-end     { justify-content: flex-end; }
.flex-col        { flex-direction: column; }
.flex-wrap       { flex-wrap: wrap; }
.flex-1          { flex: 1; }

.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }

.p-0 { padding: 0; }

.text-xs   { font-size: 11px; }
.text-sm   { font-size: 13px; }
.text-base { font-size: 14px; }
.text-lg   { font-size: 16px; }
.text-xl   { font-size: 20px; }
.text-2xl  { font-size: 24px; }

.font-medium   { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold     { font-weight: 700; }

.text-muted  { color: var(--muted); }
.text-muted2 { color: var(--muted2); }
.text-green  { color: var(--green); }
.text-red    { color: var(--red); }
.text-yellow { color: var(--yellow); }
.text-purple { color: var(--purple-light); }
.text-cyan   { color: var(--cyan); }
.text-white  { color: #fff; }

.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-left   { text-align: left; }

.w-full  { width: 100%; }
.h-full  { height: 100%; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nowrap  { white-space: nowrap; }

.relative        { position: relative; }
.overflow-hidden { overflow: hidden; }

.rounded      { border-radius: var(--radius); }
.rounded-sm   { border-radius: var(--radius-sm); }
.rounded-lg   { border-radius: var(--radius-lg); }
.rounded-full { border-radius: 9999px; }

.opacity-50 { opacity: .5; }
.opacity-75 { opacity: .75; }

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 24px 0;
}

/* ══════════════════════════════════════
   SETTINGS — Toggle switches & helpers
══════════════════════════════════════ */

/* Row with label on left, toggle on right */
.settings-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: background .2s, border-color .2s;
}
.settings-toggle:hover {
  background: var(--surface2);
  border-color: var(--border2);
}

.settings-toggle-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 3px;
}
.settings-toggle-desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}

/* Toggle pill */
.toggle-wrap {
  flex-shrink: 0;
  position: relative;
  width: 44px;
  height: 24px;
}
.toggle-wrap input[type="checkbox"] {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}
.toggle-slider {
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  background: var(--surface3);
  border: 1px solid var(--border2);
  transition: background .25s, border-color .25s;
  cursor: pointer;
}
.toggle-slider::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--muted2);
  transition: transform .25s, background .25s;
}
.toggle-wrap input:checked + .toggle-slider {
  background: var(--purple);
  border-color: var(--purple);
}
.toggle-wrap input:checked + .toggle-slider::after {
  transform: translateX(20px);
  background: #fff;
}
.toggle-wrap input:focus-visible + .toggle-slider {
  outline: 2px solid var(--purple);
  outline-offset: 2px;
}

/* Small hint text below inputs */
.form-hint {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.4;
}

/* ══════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════ */
@media (max-width: 1024px) {
  :root { --sidebar-w: 220px; }
}

@media (max-width: 768px) {
  :root { --sidebar-w: 256px; }

  .sidebar      { transform: translateX(-100%); }
  .hamburger    { display: flex; }
  .navbar       { padding-left: 16px; }
  .navbar::after { left: 0; }
  .app-layout   { padding-left: 0; }
  .main-content { padding: 20px 16px; }

  .stats-grid      { grid-template-columns: 1fr 1fr; }
  .form-row        { grid-template-columns: 1fr; }
  .form-row-3      { grid-template-columns: 1fr; }
  .modal           { margin: 10px; max-height: 95vh; }
  .chat-msg        { max-width: 92%; }
  .dates-grid      { grid-template-columns: 1fr 1fr; }
  .onboarding-card { padding: 32px 24px; }
  .auth-card       { padding: 32px 24px; }
  .stat-value      { font-size: 22px; }
  .chat-container  { height: calc(100vh - var(--navbar-h) - 48px); }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .dates-grid { grid-template-columns: 1fr; }
  .main-content { padding: 16px 12px; }
  .modal-body   { padding: 20px; }
  .modal-header { padding: 16px 20px; }
  .navbar-badge span:last-child { display: none; }
}

/* ── Responsive: grids con columnas fijas en páginas de secciones ── */
@media (max-width: 768px) {
  /* Dashboard: gráfico + obligaciones apilan en columna */
  .dash-chart-grid { grid-template-columns: 1fr !important; }
  /* Rentabilidad / P&L: tarjetas en columna */
  .pl-grid { grid-template-columns: 1fr 1fr !important; }
  /* Finanzas personales: dos columnas apilan */
  .personal-grid { grid-template-columns: 1fr !important; }
  /* Acciones IA: una columna */
  .ai-actions-grid { grid-template-columns: 1fr !important; }
}
@media (max-width: 480px) {
  .pl-grid { grid-template-columns: 1fr !important; }
}

/* ════════════════════════════════════════════════════
   MODO CLARO — Premium light theme
   Se activa con: <body class="theme-light">
════════════════════════════════════════════════════ */
body.theme-light {
  --bg:           #f6f7fb;
  --bg2:          #eef0f8;
  --bg3:          #e6e9f4;
  --surface:      rgba(255,255,255,0.9);
  --surface2:     rgba(255,255,255,0.7);
  --surface3:     rgba(255,255,255,0.5);
  --border:       rgba(99,102,120,0.12);
  --border2:      rgba(99,102,120,0.22);
  --text:         #1a1d2e;
  --muted:        #6b7280;
  --muted2:       #4b5563;
  --shadow:       0 8px 40px rgba(0,0,0,0.10);
  --shadow-sm:    0 2px 16px rgba(0,0,0,0.06);
  --shadow-glow:  0 0 50px rgba(124,58,237,0.10);
  --purple-dim:   rgba(124,58,237,0.08);
  --cyan-dim:     rgba(6,182,212,0.08);
  --green-dim:    rgba(16,185,129,0.08);
  --red-dim:      rgba(239,68,68,0.08);
  --yellow-dim:   rgba(245,158,11,0.08);
  --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7280' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* Background ambient — luz en claro */
body.theme-light::before {
  background:
    radial-gradient(ellipse 70% 50% at 15% 0%,   rgba(124,58,237,0.04) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 85% 100%,  rgba(6,182,212,0.03)  0%, transparent 55%);
}

/* Sidebar en modo claro */
body.theme-light .sidebar {
  background: rgba(255,255,255,0.97);
  border-right-color: var(--border);
  box-shadow: 4px 0 24px rgba(0,0,0,0.06);
}
body.theme-light .nav-item:hover   { background: rgba(124,58,237,0.06); }
body.theme-light .nav-item.active  { background: rgba(124,58,237,0.09); color: var(--purple); }
body.theme-light .sidebar-footer   { border-top-color: var(--border); }

/* Navbar en modo claro */
body.theme-light .navbar {
  background: rgba(255,255,255,0.95);
  border-bottom-color: var(--border);
  box-shadow: 0 1px 20px rgba(0,0,0,0.06);
}
body.theme-light .navbar-badge {
  background: var(--bg2);
  border-color: var(--border2);
}

/* Auth card en modo claro */
body.theme-light .auth-bg {
  background:
    radial-gradient(ellipse 60% 60% at 20% 50%, rgba(124,58,237,0.07) 0%, transparent 60%),
    radial-gradient(ellipse 50% 50% at 80% 20%, rgba(6,182,212,0.05)  0%, transparent 55%),
    var(--bg);
}
body.theme-light .auth-card,
body.theme-light .onboarding-card {
  background: rgba(255,255,255,0.95);
  border-color: var(--border2);
  box-shadow: 0 8px 48px rgba(0,0,0,0.10), 0 0 0 1px rgba(255,255,255,0.5);
}
body.theme-light .auth-tabs       { background: rgba(0,0,0,0.04); border-color: var(--border); }
body.theme-light .ob-dot          { background: rgba(0,0,0,0.1); }

/* Cards en modo claro */
body.theme-light .card,
body.theme-light .stat-card {
  background: rgba(255,255,255,0.95);
  border-color: var(--border);
  box-shadow: 0 2px 16px rgba(0,0,0,0.05);
}
body.theme-light .card:hover      { border-color: rgba(124,58,237,0.3); box-shadow: 0 4px 24px rgba(0,0,0,0.08); }

/* Tablas en modo claro */
body.theme-light table thead th   { background: rgba(0,0,0,0.03); border-bottom-color: var(--border2); color: var(--muted2); }
body.theme-light tbody tr:nth-child(even) td { background: rgba(0,0,0,0.015); }
body.theme-light tbody tr:hover td { background: rgba(124,58,237,0.05) !important; }
body.theme-light td               { border-bottom-color: var(--border); }

/* Modal en modo claro */
body.theme-light .modal           { background: #fff; border-color: var(--border2); box-shadow: 0 20px 60px rgba(0,0,0,0.15); }
body.theme-light .modal-overlay   { background: rgba(30,30,60,0.45); }

/* Inputs y forms en modo claro */
body.theme-light input,
body.theme-light select,
body.theme-light textarea {
  background: #fff;
  border-color: var(--border2);
  color: var(--text);
}
body.theme-light input:focus,
body.theme-light select:focus,
body.theme-light textarea:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.10);
  background: #fff;
}
body.theme-light input::placeholder,
body.theme-light textarea::placeholder { color: var(--muted); }

/* Badges en modo claro */
body.theme-light .badge-green  { background: rgba(16,185,129,0.10); color: #059669; border-color: rgba(16,185,129,0.20); }
body.theme-light .badge-red    { background: rgba(239,68,68,0.10);  color: #dc2626; border-color: rgba(239,68,68,0.20); }
body.theme-light .badge-yellow { background: rgba(245,158,11,0.10); color: #d97706; border-color: rgba(245,158,11,0.20); }
body.theme-light .badge-purple { background: rgba(124,58,237,0.10); color: #7c3aed; border-color: rgba(124,58,237,0.20); }
body.theme-light .badge-cyan   { background: rgba(6,182,212,0.10);  color: #0891b2; border-color: rgba(6,182,212,0.20); }
body.theme-light .badge-gray   { background: var(--bg2);            color: var(--muted2); border-color: var(--border2); }

/* Textos de colores en modo claro — mejor contraste */
body.theme-light .text-green  { color: #059669; }
body.theme-light .text-red    { color: #dc2626; }
body.theme-light .text-yellow { color: #b45309; }
body.theme-light .text-purple { color: #7c3aed; }
body.theme-light .text-cyan   { color: #0891b2; }
body.theme-light .text-muted  { color: var(--muted); }
body.theme-light .text-muted2 { color: var(--muted2); }

/* Alerts en modo claro */
body.theme-light .alert-error   { background: rgba(239,68,68,0.08);  border-color: rgba(239,68,68,0.25);   color: #dc2626; }
body.theme-light .alert-warning { background: rgba(245,158,11,0.08); border-color: rgba(245,158,11,0.25);  color: #b45309; }
body.theme-light .alert-success { background: rgba(16,185,129,0.08); border-color: rgba(16,185,129,0.25);  color: #059669; }
body.theme-light .alert-info    { background: rgba(6,182,212,0.08);  border-color: rgba(6,182,212,0.25);   color: #0891b2; }

/* Chat en modo claro */
body.theme-light .chat-container  { background: #fff; }
body.theme-light .chat-input-area { background: var(--bg2); }
body.theme-light .chat-input      { background: #fff; border-color: var(--border2); }
body.theme-light .chat-msg.model  { background: var(--bg2); border-color: var(--border); }

/* Botones en modo claro */
body.theme-light .btn-secondary { background: var(--bg2); border-color: var(--border2); color: var(--muted2); }
body.theme-light .btn-secondary:hover { background: var(--bg3); }
body.theme-light .btn-ghost     { color: var(--muted2); }
body.theme-light .btn-ghost:hover { background: var(--bg2); }

/* Scrollbar en modo claro */
body.theme-light ::-webkit-scrollbar-track { background: var(--bg2); }
body.theme-light ::-webkit-scrollbar-thumb { background: rgba(124,58,237,0.25); }

/* Settings toggle en modo claro */
body.theme-light .settings-toggle { background: #fff; border-color: var(--border); }
body.theme-light .settings-toggle:hover { background: var(--bg2); }

/* Onboarding background */
body.theme-light .onboarding-bg {
  background:
    radial-gradient(ellipse 60% 50% at 30% 60%, rgba(124,58,237,0.06) 0%, transparent 55%),
    radial-gradient(ellipse 50% 40% at 70% 30%, rgba(6,182,212,0.04) 0%, transparent 50%),
    var(--bg);
}

/* Date cards en modo claro */
body.theme-light .date-card { background: #fff; border-color: var(--border); box-shadow: 0 2px 12px rgba(0,0,0,0.05); }

/* Dropdown en modo claro */
body.theme-light #biz-dropdown { background: #fff !important; }

/* ── Botón tema rápido en navbar ─────────────────── */
.theme-toggle-btn {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  color: var(--muted2);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  transition: var(--transition);
  flex-shrink: 0;
}
.theme-toggle-btn:hover { background: var(--surface3); border-color: var(--purple); color: var(--text); }
