body[data-theme="dark"]{
  --kb-bg:#212121;
  --kb-column:#2f2f2f;
  --kb-card:#2f2f2f;
  --kb-border:rgba(255,255,255,.12);
  --kb-text:#f7f7f8;
  --kb-muted:rgba(247,247,248,.68);
  --kb-shadow:0 18px 44px rgba(0,0,0,.30);
  --kb-shadow-soft:0 10px 24px rgba(0,0,0,.20);
  background:#212121;
  color:#f7f7f8;
}
body[data-theme="dark"] .sidebar{background:#151e31!important;color:#ffffff!important;border-right:0!important}
body[data-theme="dark"] .main,body[data-theme="dark"] .login-page{background:#212121;color:#f7f7f8}
body[data-theme="dark"] .metric,body[data-theme="dark"] .column,body[data-theme="dark"] .card,body[data-theme="dark"] .modal,body[data-theme="dark"] .login-card,body[data-theme="dark"] .search-box,body[data-theme="dark"] .icon-btn,body[data-theme="dark"] .btn,body[data-theme="dark"] .modal-action,body[data-theme="dark"] .perm-card,body[data-theme="dark"] .user-create-card,body[data-theme="dark"] .users-table-card{background:#1f2937;color:#ffffff;border-color:rgba(185,228,245,.16)}
body[data-theme="dark"] .form-section,body[data-theme="dark"] .edit-section,body[data-theme="dark"] .info-box,body[data-theme="dark"] .form-detail-row,body[data-theme="dark"] .doc-download,body[data-theme="dark"] .stage-row,body[data-theme="dark"] .transfer-box{background:#1b1b1b;color:#ffffff;border-color:rgba(185,228,245,.14)}
body[data-theme="dark"] .users-table,body[data-theme="dark"] .users-table-head,body[data-theme="dark"] .users-table th,body[data-theme="dark"] .users-table td,body[data-theme="dark"] .users-table tbody tr:hover td,body[data-theme="dark"] .perm-checks label{background:#1b1b1b;color:#ffffff;border-color:rgba(185,228,245,.14)}
body[data-theme="dark"] .brand span,body[data-theme="dark"] .user-card span,body[data-theme="dark"] .topbar p,body[data-theme="dark"] .metric span,body[data-theme="dark"] .metric small,body[data-theme="dark"] .card-place,body[data-theme="dark"] .field label,body[data-theme="dark"] .info-box span,body[data-theme="dark"] .form-detail-row span,body[data-theme="dark"] .users-table small{color:rgba(255,255,255,.68)}
body[data-theme="dark"] .users-table strong,body[data-theme="dark"] .users-table th,body[data-theme="dark"] .form-detail-row strong,body[data-theme="dark"] .info-box strong,body[data-theme="dark"] .card-name{color:#ffffff}
body[data-theme="dark"] .field input,body[data-theme="dark"] .field select,body[data-theme="dark"] .field textarea,body[data-theme="dark"] .stage-row input[type=text],body[data-theme="dark"] .perm-card input,body[data-theme="dark"] .perm-card select{background:#121212;color:#ffffff;border-color:rgba(185,228,245,.18)}
body[data-theme="dark"] input::placeholder,body[data-theme="dark"] textarea::placeholder{color:rgba(255,255,255,.52)}
body[data-theme="dark"] .nav-item{color:#ffffff}
body[data-theme="dark"] .nav-item.active,body[data-theme="dark"] .nav-item:hover,body[data-theme="dark"] .btn.primary,body[data-theme="dark"] .save,body[data-theme="dark"] .form-btn{background:#ffafcc;color:#03045e;border-color:#ffafcc}
body[data-theme="dark"] .count,body[data-theme="dark"] .badge,body[data-theme="dark"] .pill-soft,body[data-theme="dark"] .user-badge,body[data-theme="dark"] .copy-mini,body[data-theme="dark"] .copy-field{background:rgba(185,228,245,.16);color:#ffffff;border-color:rgba(185,228,245,.18)}
body[data-theme="dark"] .brand-mark,body[data-theme="dark"] .avatar,body[data-theme="dark"] .mini-avatar,body[data-theme="dark"] .metric i{background:#ffafcc;color:#03045e}
body[data-theme="dark"] .cancel,body[data-theme="dark"] .add-card{background:transparent;color:#ffffff;border-color:rgba(185,228,245,.18)}
body[data-theme="dark"] .add-card:hover,body[data-theme="dark"] .modal-action:hover,body[data-theme="dark"] .icon-btn:hover{background:rgba(255,175,204,.14);color:#ffffff}
body[data-theme="dark"] .toast{background:#ffffff;color:#03045e}


/* Modo oscuro persistente estilo ChatGPT: solo cambia el contenido, no el sidebar */
body[data-theme="dark"] .main{background:#212121!important;color:#f7f7f8!important;}
body[data-theme="dark"] .metric,body[data-theme="dark"] .column,body[data-theme="dark"] .card,body[data-theme="dark"] .modal,body[data-theme="dark"] .search-box,body[data-theme="dark"] .icon-btn,body[data-theme="dark"] .btn,body[data-theme="dark"] .modal-action,body[data-theme="dark"] .perm-card,body[data-theme="dark"] .user-create-card,body[data-theme="dark"] .users-table-card,body[data-theme="dark"] .dashboard-card,body[data-theme="dark"] .quick-link{background:#2f2f2f!important;color:#f7f7f8!important;border-color:rgba(255,255,255,.12)!important;}
body[data-theme="dark"] .form-section,body[data-theme="dark"] .edit-section,body[data-theme="dark"] .info-box,body[data-theme="dark"] .form-detail-row,body[data-theme="dark"] .doc-download,body[data-theme="dark"] .stage-row,body[data-theme="dark"] .transfer-box,body[data-theme="dark"] .ranking-row,body[data-theme="dark"] .recent-row,body[data-theme="dark"] .alert-row{background:#262626!important;color:#f7f7f8!important;border-color:rgba(255,255,255,.12)!important;}
body[data-theme="dark"] input,body[data-theme="dark"] select,body[data-theme="dark"] textarea{background:#171717!important;color:#f7f7f8!important;border-color:rgba(255,255,255,.14)!important;}

/* Dark mode final palette: no blancos en superficies CRM */
body[data-theme="dark"]{
  --kb-bg:#010101;
  --kb-column:#161916;
  --kb-card:#161916;
  --kb-border:rgba(148,163,184,.18);
  --kb-text:#f8fafc;
  --kb-muted:#cbd5e1;
  background:#010101!important;
  color:#f8fafc!important;
}
body[data-theme="dark"] .main,
body[data-theme="dark"] .login-page{
  background:#010101!important;
  color:#f8fafc!important;
}
body[data-theme="dark"] .metric,
body[data-theme="dark"] .column,
body[data-theme="dark"] .card,
body[data-theme="dark"] .card.card-pro,
body[data-theme="dark"] .modal,
body[data-theme="dark"] .modal-body,
body[data-theme="dark"] .modal-head,
body[data-theme="dark"] .modal-foot,
body[data-theme="dark"] .search-box,
body[data-theme="dark"] .icon-btn,
body[data-theme="dark"] .btn,
body[data-theme="dark"] .modal-action,
body[data-theme="dark"] .perm-card,
body[data-theme="dark"] .user-create-card,
body[data-theme="dark"] .users-table-card,
body[data-theme="dark"] .dashboard-card,
body[data-theme="dark"] .quick-link,
body[data-theme="dark"] .form-section,
body[data-theme="dark"] .edit-section,
body[data-theme="dark"] .premium-tab-section,
body[data-theme="dark"] .info-box,
body[data-theme="dark"] .form-detail-row,
body[data-theme="dark"] .doc-download,
body[data-theme="dark"] .stage-row,
body[data-theme="dark"] .transfer-box,
body[data-theme="dark"] .ranking-row,
body[data-theme="dark"] .recent-row,
body[data-theme="dark"] .alert-row,
body[data-theme="dark"] .profile-hero,
body[data-theme="dark"] .profile-card,
body[data-theme="dark"] .profile-row,
body[data-theme="dark"] .profile-field-card,
body[data-theme="dark"] .parent-config-card,
body[data-theme="dark"] .doc-slot-card,
body[data-theme="dark"] .documents-clean-section,
body[data-theme="dark"] .candidate-result-card,
body[data-theme="dark"] .selected-candidates-box,
body[data-theme="dark"] .selected-candidate-pill,
body[data-theme="dark"] .edit-tabs,
body[data-theme="dark"] .edit-photo-section,
body[data-theme="dark"] .premium-edit-form{
  background:#161916!important;
  color:#f8fafc!important;
  border-color:rgba(148,163,184,.18)!important;
  box-shadow:none!important;
}
body[data-theme="dark"] .modal-backdrop{
  background:rgba(1,1,1,.72)!important;
}
body[data-theme="dark"] input,
body[data-theme="dark"] select,
body[data-theme="dark"] textarea,
body[data-theme="dark"] .field input,
body[data-theme="dark"] .field select,
body[data-theme="dark"] .field textarea,
body[data-theme="dark"] .stage-row input[type=text],
body[data-theme="dark"] .parent-config-card textarea,
body[data-theme="dark"] .premium-data-row textarea{
  background:#010101!important;
  color:#f8fafc!important;
  border-color:rgba(148,163,184,.22)!important;
  box-shadow:none!important;
}
body[data-theme="dark"] h1,
body[data-theme="dark"] h2,
body[data-theme="dark"] h3,
body[data-theme="dark"] .modal-head h2,
body[data-theme="dark"] .profile-hero h1,
body[data-theme="dark"] .card-name,
body[data-theme="dark"] .info-box strong,
body[data-theme="dark"] .form-detail-row strong,
body[data-theme="dark"] .premium-data-row strong,
body[data-theme="dark"] .profile-row strong,
body[data-theme="dark"] .candidate-result-info strong,
body[data-theme="dark"] .doc-slot-head strong,
body[data-theme="dark"] .visibility-switch span{
  color:#f8fafc!important;
}
body[data-theme="dark"] .topbar p,
body[data-theme="dark"] .modal-head p,
body[data-theme="dark"] .profile-hero p,
body[data-theme="dark"] .profile-hero small,
body[data-theme="dark"] .card-place,
body[data-theme="dark"] .premium-help,
body[data-theme="dark"] .edit-photo-box span,
body[data-theme="dark"] .candidate-result-info small{
  color:#cbd5e1!important;
}
body[data-theme="dark"] .field label,
body[data-theme="dark"] .info-box span,
body[data-theme="dark"] .form-detail-row span,
body[data-theme="dark"] .profile-row small,
body[data-theme="dark"] .premium-data-row span,
body[data-theme="dark"] .card-meta-pills small,
body[data-theme="dark"] .metric span,
body[data-theme="dark"] .metric small{
  color:#94a3b8!important;
  opacity:1!important;
}
body[data-theme="dark"] .tab,
body[data-theme="dark"] .edit-tab{
  color:#cbd5e1!important;
  background:transparent!important;
  box-shadow:none!important;
}
body[data-theme="dark"] .tab.active,
body[data-theme="dark"] .edit-tab.active{
  color:#f8fafc!important;
  background:#010101!important;
  border-color:rgba(255,175,204,.45)!important;
  box-shadow:none!important;
}
body[data-theme="dark"] .count,
body[data-theme="dark"] .badge,
body[data-theme="dark"] .pill-soft,
body[data-theme="dark"] .copy-mini,
body[data-theme="dark"] .copy-field,
body[data-theme="dark"] .card-meta-pills span{
  background:#010101!important;
  color:#f8fafc!important;
  border-color:rgba(148,163,184,.18)!important;
}
body[data-theme="dark"] .modal-head .close,
body[data-theme="dark"] .modal-head .close:hover,
body[data-theme="dark"] .modal-head .close:active,
body[data-theme="dark"] .modal-head .close:focus{
  background:#010101!important;
  color:#f8fafc!important;
  border-color:rgba(148,163,184,.24)!important;
  box-shadow:none!important;
}
body[data-theme="dark"] .toast{
  background:#161916!important;
  color:#f8fafc!important;
}
