
/* PAPE — Dark mode professional global refinements */
html[data-bs-theme="dark"],
body.theme-dark,
body.dark-mode,
body[data-theme="dark"]{
  color-scheme: dark;
}

html[data-bs-theme="dark"] body,
body.theme-dark,
body.dark-mode,
body[data-theme="dark"]{
  background:
    radial-gradient(circle at top right, rgba(91,43,224,.18), transparent 28%),
    linear-gradient(135deg, #0b1220 0%, #111827 45%, #1b1b3a 100%) !important;
  color: #eef2ff !important;
}

html[data-bs-theme="dark"] .topbar,
body.theme-dark .topbar,
body.dark-mode .topbar,
body[data-theme="dark"] .topbar{
  background: rgba(10,16,29,.88) !important;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,.08) !important;
  box-shadow: 0 6px 24px rgba(0,0,0,.28) !important;
}

html[data-bs-theme="dark"] .card,
html[data-bs-theme="dark"] .panel-card,
html[data-bs-theme="dark"] .kpi-card,
html[data-bs-theme="dark"] .module-card,
html[data-bs-theme="dark"] .summary-card,
html[data-bs-theme="dark"] .widget-card,
html[data-bs-theme="dark"] .student-card,
html[data-bs-theme="dark"] .report-card,
html[data-bs-theme="dark"] .plan-card,
html[data-bs-theme="dark"] .content-card,
html[data-bs-theme="dark"] .glass-card,
body.theme-dark .card,
body.theme-dark .panel-card,
body.theme-dark .kpi-card,
body.theme-dark .module-card,
body.theme-dark .summary-card,
body.theme-dark .widget-card,
body.theme-dark .student-card,
body.theme-dark .report-card,
body.theme-dark .plan-card,
body.theme-dark .content-card,
body.theme-dark .glass-card,
body.dark-mode .card,
body.dark-mode .panel-card,
body.dark-mode .kpi-card,
body.dark-mode .module-card,
body.dark-mode .summary-card,
body.dark-mode .widget-card,
body.dark-mode .student-card,
body.dark-mode .report-card,
body.dark-mode .plan-card,
body.dark-mode .content-card,
body.dark-mode .glass-card,
body[data-theme="dark"] .card,
body[data-theme="dark"] .panel-card,
body[data-theme="dark"] .kpi-card,
body[data-theme="dark"] .module-card,
body[data-theme="dark"] .summary-card,
body[data-theme="dark"] .widget-card,
body[data-theme="dark"] .student-card,
body[data-theme="dark"] .report-card,
body[data-theme="dark"] .plan-card,
body[data-theme="dark"] .content-card,
body[data-theme="dark"] .glass-card{
  background: rgba(255,255,255,.045) !important;
  border: 1px solid rgba(255,255,255,.10) !important;
  color: #eef2ff !important;
  box-shadow: 0 12px 30px rgba(0,0,0,.20) !important;
  backdrop-filter: blur(8px);
}

html[data-bs-theme="dark"] .student-header,
html[data-bs-theme="dark"] .page-hero,
html[data-bs-theme="dark"] .student-hero,
html[data-bs-theme="dark"] .hero-card,
body.theme-dark .student-header,
body.theme-dark .page-hero,
body.theme-dark .student-hero,
body.theme-dark .hero-card,
body.dark-mode .student-header,
body.dark-mode .page-hero,
body.dark-mode .student-hero,
body.dark-mode .hero-card,
body[data-theme="dark"] .student-header,
body[data-theme="dark"] .page-hero,
body[data-theme="dark"] .student-hero,
body[data-theme="dark"] .hero-card{
  background: linear-gradient(135deg, rgba(91,43,224,.94), rgba(37,99,235,.78)) !important;
  border: 1px solid rgba(255,255,255,.12) !important;
  color: #fff !important;
}

html[data-bs-theme="dark"] input,
html[data-bs-theme="dark"] textarea,
html[data-bs-theme="dark"] select,
html[data-bs-theme="dark"] .form-control,
html[data-bs-theme="dark"] .form-select,
body.theme-dark input,
body.theme-dark textarea,
body.theme-dark select,
body.theme-dark .form-control,
body.theme-dark .form-select,
body.dark-mode input,
body.dark-mode textarea,
body.dark-mode select,
body.dark-mode .form-control,
body.dark-mode .form-select,
body[data-theme="dark"] input,
body[data-theme="dark"] textarea,
body[data-theme="dark"] select,
body[data-theme="dark"] .form-control,
body[data-theme="dark"] .form-select{
  background: rgba(255,255,255,.05) !important;
  border: 1px solid rgba(255,255,255,.12) !important;
  color: #f8fafc !important;
  box-shadow: none !important;
}

html[data-bs-theme="dark"] input::placeholder,
html[data-bs-theme="dark"] textarea::placeholder,
body.theme-dark input::placeholder,
body.theme-dark textarea::placeholder,
body.dark-mode input::placeholder,
body.dark-mode textarea::placeholder,
body[data-theme="dark"] input::placeholder,
body[data-theme="dark"] textarea::placeholder{
  color: rgba(255,255,255,.45) !important;
}

html[data-bs-theme="dark"] input:focus,
html[data-bs-theme="dark"] textarea:focus,
html[data-bs-theme="dark"] select:focus,
html[data-bs-theme="dark"] .form-control:focus,
html[data-bs-theme="dark"] .form-select:focus,
body.theme-dark input:focus,
body.theme-dark textarea:focus,
body.theme-dark select:focus,
body.theme-dark .form-control:focus,
body.theme-dark .form-select:focus,
body.dark-mode input:focus,
body.dark-mode textarea:focus,
body.dark-mode select:focus,
body.dark-mode .form-control:focus,
body.dark-mode .form-select:focus,
body[data-theme="dark"] input:focus,
body[data-theme="dark"] textarea:focus,
body[data-theme="dark"] select:focus,
body[data-theme="dark"] .form-control:focus,
body[data-theme="dark"] .form-select:focus{
  border-color: rgba(123,87,241,.8) !important;
  box-shadow: 0 0 0 .2rem rgba(123,87,241,.18) !important;
}

html[data-bs-theme="dark"] .btn-primary,
body.theme-dark .btn-primary,
body.dark-mode .btn-primary,
body[data-theme="dark"] .btn-primary{
  background: linear-gradient(135deg, #5b2be0, #2563eb) !important;
  border: none !important;
  color: #fff !important;
  box-shadow: 0 8px 18px rgba(37,99,235,.28) !important;
}

html[data-bs-theme="dark"] .btn-success,
body.theme-dark .btn-success,
body.dark-mode .btn-success,
body[data-theme="dark"] .btn-success{
  background: linear-gradient(135deg, #159570, #0ea56f) !important;
  border: none !important;
  color: #fff !important;
}

html[data-bs-theme="dark"] .btn-outline-secondary,
html[data-bs-theme="dark"] .btn-outline-primary,
html[data-bs-theme="dark"] .btn-light,
body.theme-dark .btn-outline-secondary,
body.theme-dark .btn-outline-primary,
body.theme-dark .btn-light,
body.dark-mode .btn-outline-secondary,
body.dark-mode .btn-outline-primary,
body.dark-mode .btn-light,
body[data-theme="dark"] .btn-outline-secondary,
body[data-theme="dark"] .btn-outline-primary,
body[data-theme="dark"] .btn-light{
  background: rgba(255,255,255,.06) !important;
  border: 1px solid rgba(255,255,255,.14) !important;
  color: #eef2ff !important;
}

html[data-bs-theme="dark"] .table,
body.theme-dark .table,
body.dark-mode .table,
body[data-theme="dark"] .table{
  --bs-table-color: #eef2ff;
  --bs-table-bg: transparent;
  --bs-table-border-color: rgba(255,255,255,.10);
}

html[data-bs-theme="dark"] .text-muted,
html[data-bs-theme="dark"] .muted,
html[data-bs-theme="dark"] .small-muted,
body.theme-dark .text-muted,
body.theme-dark .muted,
body.theme-dark .small-muted,
body.dark-mode .text-muted,
body.dark-mode .muted,
body.dark-mode .small-muted,
body[data-theme="dark"] .text-muted,
body[data-theme="dark"] .muted,
body[data-theme="dark"] .small-muted{
  color: rgba(226,232,240,.72) !important;
}

html[data-bs-theme="dark"] .badge,
html[data-bs-theme="dark"] .chip,
body.theme-dark .badge,
body.theme-dark .chip,
body.dark-mode .badge,
body.dark-mode .chip,
body[data-theme="dark"] .badge,
body[data-theme="dark"] .chip{
  border: 1px solid rgba(255,255,255,.14) !important;
}

html[data-bs-theme="dark"] .sidebar-link.active,
body.theme-dark .sidebar-link.active,
body.dark-mode .sidebar-link.active,
body[data-theme="dark"] .sidebar-link.active{
  background: rgba(255,255,255,.12) !important;
  border-color: rgba(255,255,255,.10) !important;
}

html[data-bs-theme="dark"] .nav-tabs .nav-link.active,
html[data-bs-theme="dark"] .tab.active,
html[data-bs-theme="dark"] .tab.is-active,
body.theme-dark .nav-tabs .nav-link.active,
body.theme-dark .tab.active,
body.theme-dark .tab.is-active,
body.dark-mode .nav-tabs .nav-link.active,
body.dark-mode .tab.active,
body.dark-mode .tab.is-active,
body[data-theme="dark"] .nav-tabs .nav-link.active,
body[data-theme="dark"] .tab.active,
body[data-theme="dark"] .tab.is-active{
  background: linear-gradient(135deg, #5b2be0, #2563eb) !important;
  color: #fff !important;
  border-color: transparent !important;
}

html[data-bs-theme="dark"] .nav-tabs .nav-link,
html[data-bs-theme="dark"] .tab,
body.theme-dark .nav-tabs .nav-link,
body.theme-dark .tab,
body.dark-mode .nav-tabs .nav-link,
body.dark-mode .tab,
body[data-theme="dark"] .nav-tabs .nav-link,
body[data-theme="dark"] .tab{
  background: rgba(255,255,255,.05) !important;
  color: #e5e7eb !important;
  border: 1px solid rgba(255,255,255,.10) !important;
}

html[data-bs-theme="dark"] .dropdown-menu,
body.theme-dark .dropdown-menu,
body.dark-mode .dropdown-menu,
body[data-theme="dark"] .dropdown-menu{
  background: #101827 !important;
  border: 1px solid rgba(255,255,255,.08) !important;
  color: #eef2ff !important;
}
html[data-bs-theme="dark"] .dropdown-item,
body.theme-dark .dropdown-item,
body.dark-mode .dropdown-item,
body[data-theme="dark"] .dropdown-item{
  color: #eef2ff !important;
}
html[data-bs-theme="dark"] .dropdown-item:hover,
body.theme-dark .dropdown-item:hover,
body.dark-mode .dropdown-item:hover,
body[data-theme="dark"] .dropdown-item:hover{
  background: rgba(255,255,255,.08) !important;
}

html[data-bs-theme="dark"] hr,
body.theme-dark hr,
body.dark-mode hr,
body[data-theme="dark"] hr{
  border-color: rgba(255,255,255,.10) !important;
}
