html {
  color-scheme: light;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --body-bg: #0f172a;
  --gray-base: #cbd5e1;
  --gray-faded: #111827;
  --gray-darker: #f8fafc;
  --gray-lighter-3: #334155;
  --gray-lighter-4: #1f2937;
  --text-body-color: #cbd5e1;
  --text-heading-color: #f8fafc;
  --text-lighter-color: #94a3b8;
  --text-muted: #94a3b8;
  --ui-block-bg: #111827;
  --ui-block-bg-header: #0f172a;
  --ui-block-header-bg: #0f172a;
  --ui-block-divider-color: rgba(148, 163, 184, 0.22);
  --ui-block-border-color: rgba(148, 163, 184, 0.22);
  --ui-block-link-hover-bg: rgba(255, 255, 255, 0.05);
  --ui-block-link-active-bg: rgba(255, 255, 255, 0.08);
  --ui-nav-link-color: #cbd5e1;
  --ui-nav-link-hover-color: #ffffff;
  --ui-nav-link-active-color: #ffffff;
  --input-bg: #0f172a;
  --input-color: #f8fafc;
  --input-border-color: #334155;
  --input-focus-bg: #111827;
  --input-focus-color: #ffffff;
  --input-hover-bg: #111827;
  --table-container-bg: #111827;
  --table-container-header-bg: #0f172a;
  --dropdown-bg: #111827;
  --dropdown-link-color: #cbd5e1;
  --dropdown-link-hover-color: #ffffff;
  --tooltip-bg: #111827;
  --tooltip-color: #f8fafc;
  --popover-bg: #111827;
  background: #0f172a;
}

html[data-theme="dark"] body,
html[data-theme="dark"] #content,
html[data-theme="dark"] .content-row {
  background-color: #0f172a;
  color: #cbd5e1;
}

html[data-theme="dark"] .content-row-gray,
html[data-theme="dark"] .content-box,
html[data-theme="dark"] .product-box,
html[data-theme="dark"] .feature-box,
html[data-theme="dark"] .network-map,
html[data-theme="dark"] .column-box,
html[data-theme="dark"] .pricing-column,
html[data-theme="dark"] .dataTables_wrapper,
html[data-theme="dark"] .main-body,
html[data-theme="dark"] .app-main,
html[data-theme="dark"] .panel,
html[data-theme="dark"] .card,
html[data-theme="dark"] .tile,
html[data-theme="dark"] .table-container {
  background-color: #111827 !important;
  border-color: rgba(148, 163, 184, 0.22) !important;
  color: #cbd5e1;
}

html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] h4,
html[data-theme="dark"] h5,
html[data-theme="dark"] h6,
html[data-theme="dark"] .text-color-title,
html[data-theme="dark"] .text-heading,
html[data-theme="dark"] .main-header-title,
html[data-theme="dark"] .panel-title {
  color: #f8fafc !important;
}

html[data-theme="dark"] p,
html[data-theme="dark"] li,
html[data-theme="dark"] td,
html[data-theme="dark"] th,
html[data-theme="dark"] label,
html[data-theme="dark"] .text-color-gray,
html[data-theme="dark"] .text-muted,
html[data-theme="dark"] .small,
html[data-theme="dark"] .list-info {
  color: #cbd5e1 !important;
}

html[data-theme="dark"] .header-light,
html[data-theme="dark"] .header-dynamic,
html[data-theme="dark"] .app-nav,
html[data-theme="dark"] .topbar,
html[data-theme="dark"] .navbar-main {
  background: rgba(15, 23, 42, 0.94) !important;
  border-color: rgba(148, 163, 184, 0.18) !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
}

html[data-theme="dark"] .header-light a,
html[data-theme="dark"] .nav-primary a,
html[data-theme="dark"] .navbar-main a {
  color: #e2e8f0;
}

html[data-theme="dark"] .nav-primary ul,
html[data-theme="dark"] .dropdown-menu,
html[data-theme="dark"] .menu,
html[data-theme="dark"] .modal-content {
  background: #111827 !important;
  border-color: rgba(148, 163, 184, 0.22) !important;
}

html[data-theme="dark"] input:not(.no-custom-style):not([type="checkbox"]):not([type="radio"]),
html[data-theme="dark"] select:not(.no-custom-style),
html[data-theme="dark"] textarea:not(.no-custom-style),
html[data-theme="dark"] .form-control {
  background-color: #0f172a !important;
  border-color: #334155 !important;
  color: #f8fafc !important;
}

html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
  color: #94a3b8 !important;
}

html[data-theme="dark"] img[src*="clouds-light"],
html[data-theme="dark"] img[src*="map-light"] {
  filter: brightness(0.78) contrast(1.12);
}

.theme-toggle {
  display: none !important;
}

.theme-toggle--header {
  position: static;
  width: 38px;
  height: 38px;
  min-width: 38px;
  margin-inline-start: 10px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
  vertical-align: middle;
}

.theme-toggle--header .theme-toggle__icon {
  width: 17px;
  height: 17px;
}

.theme-toggle--header .theme-toggle__icon::after {
  width: 15px;
  height: 15px;
  inset-inline-start: 7px;
  inset-block-start: -4px;
}

.theme-toggle-nav-item {
  display: flex !important;
  align-items: center;
}

.fixed.top-6 .theme-toggle--header {
  margin-inline-start: 14px;
}

.theme-toggle:hover {
  transform: translateY(-2px);
}

.theme-toggle:focus-visible {
  outline: 3px solid rgba(25, 102, 255, 0.32);
  outline-offset: 3px;
}

.theme-toggle__icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #f59e0b;
  box-shadow:
    0 -11px 0 -7px #f59e0b,
    0 11px 0 -7px #f59e0b,
    11px 0 0 -7px #f59e0b,
    -11px 0 0 -7px #f59e0b,
    8px 8px 0 -7px #f59e0b,
    -8px 8px 0 -7px #f59e0b,
    8px -8px 0 -7px #f59e0b,
    -8px -8px 0 -7px #f59e0b,
    0 0 0 4px rgba(245, 158, 11, 0.14);
  position: relative;
}

.theme-toggle__icon::after {
  content: "";
  position: absolute;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #ffffff;
  inset-inline-start: 8px;
  inset-block-start: -4px;
  opacity: 0;
  transition: opacity 160ms ease, background 160ms ease;
}

html[data-theme="dark"] .theme-toggle {
  background: rgba(17, 24, 39, 0.94);
  color: #f8fafc;
  border-color: rgba(148, 163, 184, 0.38);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.36);
}

html[data-theme="dark"] .theme-toggle__icon::after {
  opacity: 1;
  background: #111827;
}

html[data-theme="dark"] .theme-toggle__icon {
  background: currentColor;
  box-shadow: 0 0 0 4px rgba(25, 102, 255, 0.12);
}

.bot-float {
  position: fixed;
  z-index: 9998;
  inset-inline-end: 18px;
  inset-block-end: 78px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #ffffff;
  color: #229ed9;
  border: 1px solid rgba(34, 158, 217, 0.18);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.26);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 160ms ease, background 160ms ease;
}

.bot-float:hover {
  transform: translateY(-2px);
  background: #f1f8fc;
  color: #168ac0;
}

.bot-float__icon {
  width: 24px;
  height: 24px;
  display: block;
  fill: currentColor;
  transform: translateX(-1px) rotate(-8deg);
}

@media (max-width: 640px) {
  .theme-toggle {
    inset-inline-end: 12px;
    inset-block-end: 12px;
    width: 42px;
    height: 42px;
  }

  .bot-float {
    inset-inline-end: 12px;
    inset-block-end: 66px;
    width: 42px;
    height: 42px;
  }
}

html[data-theme="light"] body.bg-black {
  background: #f8fafc !important;
  color: #0f172a !important;
}

html[data-theme="light"] .snap-container .snap-section,
html[data-theme="light"] .snap-container .bg-gray-800,
html[data-theme="light"] .snap-container .bg-gray-900 {
  background: #f8fafc !important;
  color: #0f172a !important;
}

html[data-theme="light"] .snap-container .text-white,
html[data-theme="light"] .snap-container h1,
html[data-theme="light"] .snap-container h2,
html[data-theme="light"] .snap-container h3 {
  color: #0f172a !important;
}

html[data-theme="light"] .snap-container .text-gray-300 {
  color: #475569 !important;
}

html[data-theme="light"] .glass-effect {
  background: rgba(255, 255, 255, 0.82) !important;
  border: 1px solid rgba(148, 163, 184, 0.28) !important;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.12) !important;
}

html[data-theme="dark"] body.lagom {
  background: #0b1120 !important;
}

html[data-theme="dark"] .app-nav,
html[data-theme="dark"] .app-nav-header,
html[data-theme="dark"] .app-nav-menu,
html[data-theme="dark"] .app-nav-header .container,
html[data-theme="dark"] .app-nav-menu .container {
  background: #0f172a !important;
  border-color: rgba(148, 163, 184, 0.18) !important;
}

html[data-theme="dark"] .app-nav-header {
  border-bottom: 1px solid rgba(148, 163, 184, 0.2) !important;
}

html[data-theme="dark"] .app-nav-menu {
  border-bottom: 1px solid rgba(25, 102, 255, 0.24) !important;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28) !important;
}

html[data-theme="dark"] .app-nav .logo,
html[data-theme="dark"] .app-nav .logo:hover,
html[data-theme="dark"] .app-nav .logo:focus {
  background: transparent !important;
}

html[data-theme="dark"] .app-nav .logo img {
  filter: drop-shadow(0 0 10px rgba(25, 102, 255, 0.22));
}

html[data-theme="dark"] .top-nav > li > a,
html[data-theme="dark"] .menu-primary > li > a,
html[data-theme="dark"] .menu-primary > li > a > .item-text,
html[data-theme="dark"] .active-client,
html[data-theme="dark"] .active-client .item-text {
  color: #e5edf8 !important;
}

html[data-theme="dark"] .top-nav > li > a:hover,
html[data-theme="dark"] .top-nav > li.open > a,
html[data-theme="dark"] .menu-primary > li > a:hover,
html[data-theme="dark"] .menu-primary > li.open > a,
html[data-theme="dark"] .menu-primary > li.active > a {
  background: rgba(25, 102, 255, 0.12) !important;
  color: #ffffff !important;
}

html[data-theme="dark"] .main-header {
  background: linear-gradient(135deg, #1d4ed8 0%, #0ea5e9 100%) !important;
  border-bottom: 1px solid rgba(147, 197, 253, 0.28) !important;
}

html[data-theme="dark"] .main-header-title,
html[data-theme="dark"] .main-header .breadcrumb,
html[data-theme="dark"] .main-header .breadcrumb a,
html[data-theme="dark"] .main-header-bottom {
  color: #ffffff !important;
}

html[data-theme="dark"] .app-main,
html[data-theme="dark"] .main-body,
html[data-theme="dark"] .main-content {
  background: #0b1120 !important;
}

html[data-theme="dark"] .tile,
html[data-theme="dark"] .panel,
html[data-theme="dark"] .panel-default,
html[data-theme="dark"] .panel-sidebar,
html[data-theme="dark"] .client-home-panels .panel {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.98) 0%, rgba(11, 17, 32, 0.98) 100%) !important;
  border: 1px solid rgba(148, 163, 184, 0.24) !important;
  border-radius: 10px !important;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28) !important;
  color: #e5edf8 !important;
}

html[data-theme="dark"] .tile {
  min-height: 178px;
}

html[data-theme="dark"] .tile:hover,
html[data-theme="dark"] .panel:hover {
  border-color: rgba(96, 165, 250, 0.48) !important;
}

html[data-theme="dark"] .panel-heading,
html[data-theme="dark"] .panel-footer {
  background: rgba(15, 23, 42, 0.98) !important;
  border-color: rgba(148, 163, 184, 0.24) !important;
}

html[data-theme="dark"] .panel-body {
  background: rgba(11, 17, 32, 0.72) !important;
  color: #dbeafe !important;
}

html[data-theme="dark"] .panel-sidebar-primary {
  background: linear-gradient(160deg, #2563eb 0%, #0ea5e9 100%) !important;
  border-color: rgba(147, 197, 253, 0.42) !important;
}

html[data-theme="dark"] .panel-sidebar-primary .panel-body,
html[data-theme="dark"] .panel-sidebar-primary .panel-heading,
html[data-theme="dark"] .panel-sidebar-primary .panel-footer {
  background: transparent !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
}

html[data-theme="dark"] .list-group-item {
  background: rgba(15, 23, 42, 0.92) !important;
  border-color: rgba(148, 163, 184, 0.22) !important;
  color: #dbeafe !important;
}

html[data-theme="dark"] .list-group-item:hover,
html[data-theme="dark"] .list-group-item:focus {
  background: rgba(25, 102, 255, 0.14) !important;
  color: #ffffff !important;
}

html[data-theme="dark"] .dropdown-menu,
html[data-theme="dark"] .dropdown-header {
  background: #0f172a !important;
  border-color: rgba(148, 163, 184, 0.24) !important;
  color: #dbeafe !important;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34) !important;
}

html[data-theme="dark"] .dropdown-menu > li > a {
  color: #dbeafe !important;
}

html[data-theme="dark"] .dropdown-menu > li > a:hover,
html[data-theme="dark"] .dropdown-menu > li > a:focus {
  background: rgba(25, 102, 255, 0.14) !important;
  color: #ffffff !important;
}

html[data-theme="dark"] .svg-icon-outline-s,
html[data-theme="dark"] .svg-icon-outline-i {
  stroke: #cbd5e1 !important;
}

html[data-theme="dark"] .svg-icon-prime,
html[data-theme="dark"] .svg-icon-prime-l {
  fill: #1966ff !important;
}

html[data-theme="dark"] .client-home-panels .none,
html[data-theme="dark"] .empty-state,
html[data-theme="dark"] .message {
  color: #dbeafe !important;
}

html[data-theme="dark"] .main-footer,
html[data-theme="dark"] .footer,
html[data-theme="dark"] .footer-bottom,
html[data-theme="dark"] .site-footer {
  background: #0f172a !important;
  border-top: 1px solid rgba(148, 163, 184, 0.22) !important;
  color: #cbd5e1 !important;
  box-shadow: 0 -18px 42px rgba(0, 0, 0, 0.18) !important;
}

html[data-theme="dark"] .main-footer .container,
html[data-theme="dark"] .footer-bottom .container {
  background: transparent !important;
}

html[data-theme="dark"] .footer-copyright,
html[data-theme="dark"] .footer-nav,
html[data-theme="dark"] .footer-nav li,
html[data-theme="dark"] .footer-nav a {
  color: #cbd5e1 !important;
}

html[data-theme="dark"] .footer-nav a:hover,
html[data-theme="dark"] .footer-nav a:focus {
  color: #ffffff !important;
}

html[data-theme="dark"] .footer-nav .btn,
html[data-theme="dark"] .footer .btn {
  background: rgba(15, 23, 42, 0.95) !important;
  border-color: rgba(148, 163, 184, 0.28) !important;
  color: #dbeafe !important;
}
