:root {
  --theme-accent: #c61f2b;
  --theme-accent-strong: #991823;
  --theme-accent-soft: rgba(198, 31, 43, 0.14);
  --theme-shadow-light: 0 18px 40px rgba(15, 23, 42, 0.08);
  --theme-shadow-dark: 0 18px 40px rgba(0, 0, 0, 0.34);
}

html[data-theme="dark"] {
  color-scheme: dark;
}

html[data-theme="light"] {
  color-scheme: light;
}

body {
  transition: background-color 0.25s ease, color 0.25s ease;
}

.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: #334155;
  padding: 0.55rem 0.95rem;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.1);
  backdrop-filter: blur(12px);
  transition: all 0.2s ease;
}

.theme-toggle-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.14);
}

.theme-toggle-btn i {
  font-size: 1rem;
}

.theme-toggle-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 0.22rem rgba(198, 31, 43, 0.22);
}

.theme-toggle-fab {
  position: fixed;
  top: 1.25rem;
  left: 1.25rem;
  z-index: 1055;
}

.theme-toggle-shell {
  display: inline-flex;
  align-items: center;
}

.theme-toggle-shell .switch {
  top: 0 !important;
}

.theme-toggle-shell .theme-toggle-hint {
  color: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  margin-inline-start: 0.75rem;
}

.theme-icon-light,
.theme-label-light {
  display: none;
}

html[data-theme="light"] .theme-icon-light,
html[data-theme="light"] .theme-label-light {
  display: inline-block;
}

html[data-theme="light"] .theme-icon-dark,
html[data-theme="light"] .theme-label-dark {
  display: none;
}

html[data-theme="dark"] .theme-icon-dark,
html[data-theme="dark"] .theme-label-dark {
  display: inline-block;
}

html[data-theme="dark"] .theme-icon-light,
html[data-theme="dark"] .theme-label-light {
  display: none;
}

html[data-theme="dark"] .theme-toggle-btn {
  background: rgba(15, 23, 42, 0.82);
  color: #e2e8f0;
  border-color: rgba(148, 163, 184, 0.22);
  box-shadow: var(--theme-shadow-dark);
}

body.panel-theme-shell {
  background: #f1f5f9;
}

html[data-theme="dark"] body.panel-theme-shell {
  background:
    radial-gradient(circle at top right, rgba(198, 31, 43, 0.12), transparent 26%),
    linear-gradient(180deg, #0b1220 0%, #111827 55%, #0f172a 100%);
  color: #cbd5e1;
}

html[data-theme="dark"] body.panel-theme-shell .topnav {
  background: rgba(15, 23, 42, 0.88) !important;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: 0 18px 35px rgba(2, 6, 23, 0.35);
}

html[data-theme="dark"] body.panel-theme-shell .topnav .navbar-brand,
html[data-theme="dark"] body.panel-theme-shell .topnav .nav-link,
html[data-theme="dark"] body.panel-theme-shell .topnav .btn,
html[data-theme="dark"] body.panel-theme-shell .topnav .input-group-text {
  color: #e2e8f0 !important;
}

html[data-theme="dark"] body.panel-theme-shell .btn-transparent-dark {
  background: rgba(30, 41, 59, 0.72);
  border-color: transparent;
  color: #e2e8f0;
}

html[data-theme="dark"] body.panel-theme-shell .btn-transparent-dark:hover,
html[data-theme="dark"] body.panel-theme-shell .btn-transparent-dark:focus {
  background: rgba(51, 65, 85, 0.92);
  color: #fff;
}

html[data-theme="dark"] body.panel-theme-shell .snav.snav-light {
  background: rgba(15, 23, 42, 0.92);
  color: #cbd5e1;
  border-left: 1px solid rgba(148, 163, 184, 0.12);
}

html[data-theme="dark"] body.panel-theme-shell .snav-light .snav-menu .snav-menu-heading {
  color: #94a3b8;
}

html[data-theme="dark"] body.panel-theme-shell .snav-light .snav-menu .nav-link {
  color: #dbe4f0;
}

html[data-theme="dark"] body.panel-theme-shell .snav-light .snav-menu .nav-link:hover,
html[data-theme="dark"] body.panel-theme-shell .snav-light .snav-menu .nav-link.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(198, 31, 43, 0.22), rgba(198, 31, 43, 0.08));
}

html[data-theme="dark"] body.panel-theme-shell .page-header.page-header-dark {
  color: rgba(226, 232, 240, 0.72);
}

html[data-theme="dark"] body.panel-theme-shell .bg-gradient-primary-to-secondary {
  background:
    linear-gradient(135deg, rgba(152, 27, 40, 0.94) 0%, rgba(91, 33, 182, 0.86) 100%) !important;
}

html[data-theme="dark"] body.panel-theme-shell .card,
html[data-theme="dark"] body.panel-theme-shell .modal-content,
html[data-theme="dark"] body.panel-theme-shell .dropdown-menu,
html[data-theme="dark"] body.panel-theme-shell .dataTable-wrapper .dataTable-container,
html[data-theme="dark"] body.panel-theme-shell .select2-dropdown,
html[data-theme="dark"] body.panel-theme-shell .list-group-item {
  background: rgba(15, 23, 42, 0.92);
  color: #d7e0ea;
  border-color: rgba(148, 163, 184, 0.16);
  box-shadow: var(--theme-shadow-dark);
}

html[data-theme="dark"] body.panel-theme-shell .card .card-header,
html[data-theme="dark"] body.panel-theme-shell .modal-header,
html[data-theme="dark"] body.panel-theme-shell .modal-footer,
html[data-theme="dark"] body.panel-theme-shell .dropdown-divider,
html[data-theme="dark"] body.panel-theme-shell .list-group-item,
html[data-theme="dark"] body.panel-theme-shell .nav-tabs,
html[data-theme="dark"] body.panel-theme-shell .nav-tabs .nav-link {
  border-color: rgba(148, 163, 184, 0.14);
}

html[data-theme="dark"] body.panel-theme-shell .card:not([class*="bg-"]) .card-header,
html[data-theme="dark"] body.panel-theme-shell .card-title,
html[data-theme="dark"] body.panel-theme-shell h1,
html[data-theme="dark"] body.panel-theme-shell h2,
html[data-theme="dark"] body.panel-theme-shell h3,
html[data-theme="dark"] body.panel-theme-shell h4,
html[data-theme="dark"] body.panel-theme-shell h5,
html[data-theme="dark"] body.panel-theme-shell h6,
html[data-theme="dark"] body.panel-theme-shell .h1,
html[data-theme="dark"] body.panel-theme-shell .h2,
html[data-theme="dark"] body.panel-theme-shell .h3,
html[data-theme="dark"] body.panel-theme-shell .h4,
html[data-theme="dark"] body.panel-theme-shell .h5,
html[data-theme="dark"] body.panel-theme-shell .h6 {
  color: #f8fafc !important;
}

html[data-theme="dark"] body.panel-theme-shell .text-muted,
html[data-theme="dark"] body.panel-theme-shell small,
html[data-theme="dark"] body.panel-theme-shell .dropdown-header,
html[data-theme="dark"] body.panel-theme-shell .page-header-subtitle,
html[data-theme="dark"] body.panel-theme-shell .dataTable-info,
html[data-theme="dark"] body.panel-theme-shell .breadcrumb-item,
html[data-theme="dark"] body.panel-theme-shell .select2-results__option[aria-selected="false"] {
  color: #94a3b8 !important;
}

html[data-theme="dark"] body.panel-theme-shell a:not(.btn):not(.nav-link) {
  color: #fca5a5;
}

html[data-theme="dark"] body.panel-theme-shell a:not(.btn):not(.nav-link):hover {
  color: #fecaca;
}

html[data-theme="dark"] body.panel-theme-shell .form-control,
html[data-theme="dark"] body.panel-theme-shell .dataTable-input,
html[data-theme="dark"] body.panel-theme-shell .form-select,
html[data-theme="dark"] body.panel-theme-shell .select2-selection,
html[data-theme="dark"] body.panel-theme-shell .input-group-text,
html[data-theme="dark"] body.panel-theme-shell .select2-search__field {
  background: rgba(15, 23, 42, 0.78) !important;
  color: #e2e8f0 !important;
  border-color: rgba(148, 163, 184, 0.18) !important;
}

html[data-theme="dark"] body.panel-theme-shell .form-control::placeholder,
html[data-theme="dark"] body.panel-theme-shell .dataTable-input::placeholder {
  color: #94a3b8;
}

html[data-theme="dark"] body.panel-theme-shell .form-control:focus,
html[data-theme="dark"] body.panel-theme-shell .dataTable-input:focus,
html[data-theme="dark"] body.panel-theme-shell .form-select:focus,
html[data-theme="dark"] body.panel-theme-shell .select2-search__field:focus {
  background: rgba(15, 23, 42, 0.94) !important;
  border-color: rgba(198, 31, 43, 0.48) !important;
  box-shadow: 0 0 0 0.25rem rgba(198, 31, 43, 0.18) !important;
}

html[data-theme="dark"] body.panel-theme-shell .select2-container--default .select2-selection--single .select2-selection__rendered,
html[data-theme="dark"] body.panel-theme-shell .select2-container--default .select2-selection--multiple .select2-selection__rendered,
html[data-theme="dark"] body.panel-theme-shell .select2-container--default .select2-search--inline .select2-search__field,
html[data-theme="dark"] body.panel-theme-shell .dropdown-item,
html[data-theme="dark"] body.panel-theme-shell .list-group-item,
html[data-theme="dark"] body.panel-theme-shell .nav-tabs .nav-link,
html[data-theme="dark"] body.panel-theme-shell .breadcrumb-item.active {
  color: #dbe4f0 !important;
}

html[data-theme="dark"] body.panel-theme-shell .dropdown-item:hover,
html[data-theme="dark"] body.panel-theme-shell .dropdown-item:focus,
html[data-theme="dark"] body.panel-theme-shell .list-group-item:hover,
html[data-theme="dark"] body.panel-theme-shell .nav-tabs .nav-link.active,
html[data-theme="dark"] body.panel-theme-shell .select2-results__option--highlighted[aria-selected] {
  background: rgba(198, 31, 43, 0.18) !important;
  color: #fff !important;
}

html[data-theme="dark"] body.panel-theme-shell .table,
html[data-theme="dark"] body.panel-theme-shell .dataTable-table {
  color: #dbe4f0;
  --bs-table-striped-color: #dbe4f0;
  --bs-table-striped-bg: rgba(148, 163, 184, 0.06);
  --bs-table-active-color: #ffffff;
  --bs-table-active-bg: rgba(198, 31, 43, 0.12);
  --bs-table-hover-color: #ffffff;
  --bs-table-hover-bg: rgba(148, 163, 184, 0.08);
}

html[data-theme="dark"] body.panel-theme-shell .table > :not(caption) > * > *,
html[data-theme="dark"] body.panel-theme-shell .dataTable-table > :not(caption) > * > * {
  border-color: rgba(148, 163, 184, 0.12);
}

html[data-theme="dark"] body.panel-theme-shell .alert:not(.alert-light) {
  border-color: rgba(148, 163, 184, 0.14);
  box-shadow: var(--theme-shadow-dark);
}

html[data-theme="dark"] body.panel-theme-shell .table-light {
  --bs-table-bg: rgba(30, 41, 59, 0.84);
  --bs-table-striped-bg: rgba(51, 65, 85, 0.74);
  --bs-table-active-bg: rgba(71, 85, 105, 0.9);
  --bs-table-hover-bg: rgba(51, 65, 85, 0.82);
  --bs-table-striped-color: #e2e8f0;
  --bs-table-active-color: #fff;
  --bs-table-hover-color: #fff;
}

html[data-theme="dark"] body.panel-theme-shell .pagination .page-link {
  background: rgba(15, 23, 42, 0.9);
  color: #cbd5e1;
  border-color: rgba(148, 163, 184, 0.14);
}

html[data-theme="dark"] body.panel-theme-shell .pagination .page-item.active .page-link,
html[data-theme="dark"] body.panel-theme-shell .page-link:hover {
  background: var(--theme-accent);
  color: #fff;
  border-color: var(--theme-accent);
}

html[data-theme="dark"] body.panel-theme-shell .badge.bg-light,
html[data-theme="dark"] body.panel-theme-shell .bg-white,
html[data-theme="dark"] body.panel-theme-shell .footer-admin.footer-light {
  background: transparent !important;
}

html[data-theme="dark"] body.panel-theme-shell .footer-admin {
  color: #94a3b8;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

body.auth-theme-shell,
body.register-theme-shell {
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.82), rgba(30, 41, 59, 0.46)),
    #0f172a;
}

body.auth-theme-shell #layoutAuthentication,
body.register-theme-shell #layoutAuthentication {
  position: relative;
  min-height: 100vh;
}

body.auth-theme-shell #layoutAuthentication_content,
body.register-theme-shell #layoutAuthentication_content {
  position: relative;
  z-index: 1;
}

html[data-theme="dark"] body.auth-theme-shell,
html[data-theme="dark"] body.register-theme-shell {
  background:
    radial-gradient(circle at top left, rgba(198, 31, 43, 0.18), transparent 22%),
    linear-gradient(160deg, #020617 0%, #0f172a 52%, #111827 100%);
}

body.auth-theme-shell #layoutAuthentication::before,
body.register-theme-shell #layoutAuthentication::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.15), rgba(15,23,42,0.35));
  pointer-events: none;
}

html[data-theme="dark"] body.auth-theme-shell #layoutAuthentication::before,
html[data-theme="dark"] body.register-theme-shell #layoutAuthentication::before {
  background: linear-gradient(180deg, rgba(15,23,42,0.12), rgba(2,6,23,0.68));
}

html[data-theme="dark"] body.auth-theme-shell .card,
html[data-theme="dark"] body.register-theme-shell .card,
html[data-theme="dark"] body.auth-theme-shell .modal-content,
html[data-theme="dark"] body.register-theme-shell .modal-content {
  background: rgba(15, 23, 42, 0.86);
  color: #dbe4f0;
  border-color: rgba(148, 163, 184, 0.14);
  box-shadow: var(--theme-shadow-dark);
}

html[data-theme="dark"] body.auth-theme-shell h1,
html[data-theme="dark"] body.auth-theme-shell h2,
html[data-theme="dark"] body.auth-theme-shell h3,
html[data-theme="dark"] body.auth-theme-shell h4,
html[data-theme="dark"] body.auth-theme-shell h5,
html[data-theme="dark"] body.auth-theme-shell h6,
html[data-theme="dark"] body.register-theme-shell h1,
html[data-theme="dark"] body.register-theme-shell h2,
html[data-theme="dark"] body.register-theme-shell h3,
html[data-theme="dark"] body.register-theme-shell h4,
html[data-theme="dark"] body.register-theme-shell h5,
html[data-theme="dark"] body.register-theme-shell h6 {
  color: #f8fafc;
}

html[data-theme="dark"] body.auth-theme-shell p,
html[data-theme="dark"] body.auth-theme-shell label,
html[data-theme="dark"] body.auth-theme-shell .small,
html[data-theme="dark"] body.register-theme-shell p,
html[data-theme="dark"] body.register-theme-shell label,
html[data-theme="dark"] body.register-theme-shell .small {
  color: #cbd5e1;
}

html[data-theme="dark"] body.auth-theme-shell .form-control,
html[data-theme="dark"] body.auth-theme-shell .form-select,
html[data-theme="dark"] body.register-theme-shell .form-control,
html[data-theme="dark"] body.register-theme-shell .form-select {
  background: rgba(2, 6, 23, 0.55);
  color: #e2e8f0;
  border-color: rgba(148, 163, 184, 0.18);
}

html[data-theme="dark"] body.auth-theme-shell .form-control::placeholder,
html[data-theme="dark"] body.register-theme-shell .form-control::placeholder {
  color: #94a3b8;
}

html[data-theme="dark"] body.auth-theme-shell .form-control:focus,
html[data-theme="dark"] body.auth-theme-shell .form-select:focus,
html[data-theme="dark"] body.register-theme-shell .form-control:focus,
html[data-theme="dark"] body.register-theme-shell .form-select:focus {
  background: rgba(2, 6, 23, 0.8);
  color: #f8fafc;
  border-color: rgba(198, 31, 43, 0.48);
  box-shadow: 0 0 0 0.25rem rgba(198, 31, 43, 0.18);
}

body.site-theme-shell {
  transition: background-color 0.25s ease, color 0.25s ease;
}

html[data-theme="dark"] body.site-theme-shell .top-header-area,
html[data-theme="dark"] body.site-theme-shell .navbar-area {
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.25);
}

html[data-theme="dark"] body.site-theme-shell .theme-toggle-shell .slider {
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

html[data-theme="dark"] body.site-theme-shell .default-btn {
  background-color: #171f2c;
  color: #f8fafc;
  border-color: rgba(148, 163, 184, 0.18);
}

html[data-theme="dark"] body.site-theme-shell .default-btn:hover {
  background-color: var(--theme-accent);
  border-color: var(--theme-accent);
}

html[data-theme="dark"] body.site-theme-shell .service-card,
html[data-theme="dark"] body.site-theme-shell .blog-card,
html[data-theme="dark"] body.site-theme-shell .team-card,
html[data-theme="dark"] body.site-theme-shell .contact-form,
html[data-theme="dark"] body.site-theme-shell .widget-area .widget,
html[data-theme="dark"] body.site-theme-shell .faq-accordion .accordion-item {
  box-shadow: var(--theme-shadow-dark);
}

html[data-theme="dark"] body.site-theme-shell .form-control,
html[data-theme="dark"] body.site-theme-shell textarea,
html[data-theme="dark"] body.site-theme-shell select {
  background-color: rgba(15, 23, 42, 0.8);
  color: #f8fafc;
  border-color: rgba(148, 163, 184, 0.18);
}

html[data-theme="dark"] body.site-theme-shell .form-control::placeholder,
html[data-theme="dark"] body.site-theme-shell textarea::placeholder {
  color: #94a3b8;
}

html[data-theme="dark"] body.site-theme-shell .form-control:focus,
html[data-theme="dark"] body.site-theme-shell textarea:focus,
html[data-theme="dark"] body.site-theme-shell select:focus {
  border-color: rgba(198, 31, 43, 0.5);
  box-shadow: 0 0 0 0.22rem rgba(198, 31, 43, 0.16);
}
