/* Botsaz Theme System — R27 Hotfix 12
   Dark is the existing baseline. Light is an isolated visual override. */

:root{
  --theme-accent:#7c3aed;
  --theme-accent-2:#9333ea;
}
html{transition:background-color .18s ease,color .18s ease}
.header-actions-wrap{display:flex;align-items:center;gap:12px}
.theme-switcher{position:relative;z-index:65}
.theme-switcher-main{
  display:inline-flex;align-items:center;gap:8px;min-height:38px;padding:8px 11px;
  border:1px solid #313857;border-radius:12px;background:#15192d;color:#c8d0ea;
  font:inherit;font-size:12px;cursor:pointer;transition:.18s ease
}
.theme-switcher-main:hover{border-color:#6d4bb8;background:#1a1733;color:#fff}
.theme-switcher-main .theme-chevron{opacity:.6;transition:transform .18s ease}
.theme-switcher.open .theme-chevron{transform:rotate(180deg)}
.theme-switcher-menu{
  position:absolute;left:0;top:calc(100% + 8px);min-width:150px;padding:7px;
  border:1px solid #303750;border-radius:14px;background:#111426;
  box-shadow:0 20px 55px rgba(0,0,0,.38);opacity:0;visibility:hidden;
  transform:translateY(-4px);transition:.18s ease
}
.theme-switcher.open .theme-switcher-menu{opacity:1;visibility:visible;transform:translateY(0)}
.theme-switcher-menu button{
  width:100%;display:flex;align-items:center;gap:9px;border:0;border-radius:10px;
  background:transparent;color:#aab4d1;padding:9px 10px;text-align:right;font:inherit;font-size:12px;cursor:pointer
}
.theme-switcher-menu button:hover{background:#171b30;color:#fff}
.theme-switcher-menu button.active{background:rgba(124,58,237,.16);color:#c4b5fd}
@media(max-width:767px){
  .header-actions-wrap{gap:7px}
  .theme-switcher-main{width:40px;height:40px;padding:0;justify-content:center}
  .theme-switcher-main>span,.theme-switcher-main .theme-chevron{display:none}
  .theme-switcher-menu{left:0}
}

/* ---------- Light theme ---------- */
/* ---------- Light theme ---------- */
html[data-theme="light"]{
  --lt-bg:#eef2f8;
  --lt-bg-2:#e9edf6;
  --lt-surface:#f8f9fd;
  --lt-card:#ffffff;
  --lt-card-soft:#f4f1fb;
  --lt-card-blue:#f1f6ff;
  --lt-card-mint:#eefaf7;
  --lt-card-warm:#fff8f1;
  --lt-sidebar:#f7f4fc;
  --lt-border:#d8dfeb;
  --lt-border-strong:#cbd4e2;
  --lt-text:#172033;
  --lt-muted:#6b768e;
  --lt-shadow:0 8px 24px rgba(36,49,83,.06);
  --lt-shadow-hover:0 16px 34px rgba(36,49,83,.10);
}
html[data-theme="light"] body{
  background:
    radial-gradient(circle at 88% 0%,rgba(124,58,237,.055),transparent 28%),
    radial-gradient(circle at 10% 18%,rgba(14,165,233,.045),transparent 24%),
    linear-gradient(180deg,var(--lt-bg),var(--lt-bg-2))!important;
  color:var(--lt-text)!important;
}
html[data-theme="light"] .content-offset{
  background:
    radial-gradient(circle at 80% 0%,rgba(124,58,237,.045),transparent 30%),
    linear-gradient(180deg,#f2f5fb 0%,#edf1f7 100%)!important;
}
html[data-theme="light"] .sidebar-fixed,
html[data-theme="light"] .mobile-drawer{
  background:
    linear-gradient(180deg,#faf8fe 0%,#f4f1fa 100%)!important;
  border-color:#ddd7e9!important;
  box-shadow:-10px 0 28px rgba(55,42,86,.045);
}
html[data-theme="light"] .glass,
html[data-theme="light"] .metric-card,
html[data-theme="light"] .quick-card,
html[data-theme="light"] .notification-row,
html[data-theme="light"] .person-row,
html[data-theme="light"] .rank-row,
html[data-theme="light"] .guide-steps li,
html[data-theme="light"] .health-list>div{
  background:linear-gradient(180deg,#ffffff 0%,#fbfcff 100%)!important;
  border-color:var(--lt-border)!important;
  color:var(--lt-text)!important;
  box-shadow:var(--lt-shadow);
}
html[data-theme="light"] .glass:nth-of-type(3n+1),
html[data-theme="light"] .metric-card:nth-of-type(3n+1),
html[data-theme="light"] .quick-card:nth-of-type(3n+1){
  background:linear-gradient(180deg,#ffffff 0%,#f6f3fc 100%)!important;
}
html[data-theme="light"] .glass:nth-of-type(3n+2),
html[data-theme="light"] .metric-card:nth-of-type(3n+2),
html[data-theme="light"] .quick-card:nth-of-type(3n+2){
  background:linear-gradient(180deg,#ffffff 0%,#f2f7ff 100%)!important;
}
html[data-theme="light"] .glass:nth-of-type(3n+3),
html[data-theme="light"] .metric-card:nth-of-type(3n+3),
html[data-theme="light"] .quick-card:nth-of-type(3n+3){
  background:linear-gradient(180deg,#ffffff 0%,#f2faf7 100%)!important;
}
html[data-theme="light"] .dash-hero,
html[data-theme="light"] .hero-guide{
  background:
    radial-gradient(circle at 100% 0%,rgba(124,58,237,.10),transparent 38%),
    linear-gradient(135deg,#ffffff 0%,#f5f1fc 55%,#eef5ff 100%)!important;
  border-color:#d7cdeb!important;
  box-shadow:0 14px 36px rgba(70,48,112,.07);
}
html[data-theme="light"] .guide-highlight{
  background:
    radial-gradient(circle at 95% 0%,rgba(124,58,237,.13),transparent 38%),
    linear-gradient(135deg,#fff 0%,#f5f0fc 100%)!important;
  border-color:#d8ccef!important;
}
html[data-theme="light"] .section-head,
html[data-theme="light"] .dashboard-section-title{
  color:#2f3650!important;
}
html[data-theme="light"] .muted,
html[data-theme="light"] .menu-link,
html[data-theme="light"] .menu-group,
html[data-theme="light"] .nav-section-toggle,
html[data-theme="light"] .metric-foot,
html[data-theme="light"] .section-head p,
html[data-theme="light"] .dash-hero p,
html[data-theme="light"] .guide-steps p,
html[data-theme="light"] .quick-card div span,
html[data-theme="light"] .person-row span,
html[data-theme="light"] .person-row small,
html[data-theme="light"] .rank-row span,
html[data-theme="light"] .health-list span{
  color:var(--lt-muted)!important;
}
html[data-theme="light"] .menu-link{
  border-color:transparent!important;
}
html[data-theme="light"] .menu-link:hover{
  background:linear-gradient(90deg,#f2ecfb,#eef3fb)!important;
  color:#342054!important;
  border-color:#dfd4ef!important
}
html[data-theme="light"] .menu-link.active{
  background:linear-gradient(90deg,rgba(124,58,237,.18),rgba(124,58,237,.065))!important;
  color:#4c1d95!important;
  border-color:#cdbbed!important;
  box-shadow:inset 0 0 0 1px rgba(124,58,237,.06);
}
html[data-theme="light"] .nav-section:has(.menu-link.active){
  border-color:rgba(124,58,237,.16)!important;
  background:linear-gradient(180deg,rgba(124,58,237,.035),rgba(14,165,233,.018))!important;
}
html[data-theme="light"] .nav-section-toggle:hover{background:#f0edf7!important;color:#34405b!important}
html[data-theme="light"] .nav-section.open>.nav-section-toggle{color:#4b5876!important}
html[data-theme="light"] .nav-section-toggle .nav-section-chevron{color:#7683a1!important}
html[data-theme="light"] .form-control,
html[data-theme="light"] input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
html[data-theme="light"] textarea,
html[data-theme="light"] select{
  background:#f9fbfe!important;
  color:var(--lt-text)!important;
  border-color:#cfd8e6!important;
  box-shadow:inset 0 1px 2px rgba(31,44,77,.025);
}
html[data-theme="light"] input::placeholder,
html[data-theme="light"] textarea::placeholder{color:#9aa5b9!important}
html[data-theme="light"] .form-control:focus,
html[data-theme="light"] input:focus,
html[data-theme="light"] textarea:focus,
html[data-theme="light"] select:focus{
  border-color:#8b5cf6!important;
  box-shadow:0 0 0 3px rgba(124,58,237,.10)!important;
  background:#fff!important;
}
html[data-theme="light"] table{
  background:rgba(255,255,255,.72)!important;
}
html[data-theme="light"] table th,
html[data-theme="light"] table td{border-color:#e0e6ef!important}
html[data-theme="light"] table th{
  color:#66728a!important;
  background:#f3f6fb!important;
}
html[data-theme="light"] table tbody tr:hover{
  background:#f8f5fd!important;
}
html[data-theme="light"] .empty-state{
  color:#7b879f!important;
  background:linear-gradient(180deg,#fafcff,#f4f7fb)!important;
  border-radius:16px;
}
html[data-theme="light"] .empty-state b{color:#39445e!important}
html[data-theme="light"] .pill,
html[data-theme="light"] .eyebrow{
  background:linear-gradient(180deg,#f8f9fd,#f2f4f9)!important;
  border-color:#d6dce8!important;
  color:#64708b!important
}
html[data-theme="light"] .mobile-nav-toggle,
html[data-theme="light"] .mobile-drawer-close,
html[data-theme="light"] .modal-close{
  background:#f9fbfe!important;
  border-color:#d4dbea!important;
  color:#4b5876!important
}
html[data-theme="light"] .mobile-nav-backdrop{background:rgba(30,41,59,.28)!important}
html[data-theme="light"] .mobile-drawer-head{border-color:#e2e7ef!important}
html[data-theme="light"] .theme-switcher-main{
  background:linear-gradient(180deg,#ffffff,#f5f7fb)!important;
  color:#4c5872!important;
  border-color:#d3dbe8!important;
  box-shadow:0 3px 10px rgba(31,44,77,.05)
}
html[data-theme="light"] .theme-switcher-main:hover{
  background:#f3eefb!important;
  color:#4c1d95!important;
  border-color:#cabbea!important
}
html[data-theme="light"] .theme-switcher-menu{
  background:#fbfcff!important;
  border-color:#d8dfeb!important;
  box-shadow:0 18px 50px rgba(31,44,77,.14)!important
}
html[data-theme="light"] .theme-switcher-menu button{color:#58657f!important}
html[data-theme="light"] .theme-switcher-menu button:hover{background:#f1f4f9!important;color:#27324b!important}
html[data-theme="light"] .theme-switcher-menu button.active{
  background:linear-gradient(90deg,#efe8fb,#f3effc)!important;
  color:#5b21b6!important
}
html[data-theme="light"] .ux-card:hover{
  border-color:#cdbcec!important;
  box-shadow:var(--lt-shadow-hover)!important;
  transform:translateY(-1px);
}
html[data-theme="light"] .purple{
  color:#fff!important;
  background:linear-gradient(135deg,#7c3aed,#9333ea)!important;
  box-shadow:0 8px 18px rgba(124,58,237,.18);
}
html[data-theme="light"] button:not(.purple):not(.menu-link):not(.theme-switcher-main){
  transition:box-shadow .16s ease,border-color .16s ease,background-color .16s ease;
}

/* Dashboard accents */
html[data-theme="light"] .metric-card:nth-child(1){border-top:3px solid #8b5cf6!important}
html[data-theme="light"] .metric-card:nth-child(2){border-top:3px solid #22c55e!important}
html[data-theme="light"] .metric-card:nth-child(3){border-top:3px solid #ec4899!important}
html[data-theme="light"] .metric-card:nth-child(4){border-top:3px solid #06b6d4!important}
html[data-theme="light"] .quick-card:nth-child(1){border-right:3px solid #8b5cf6!important}
html[data-theme="light"] .quick-card:nth-child(2){border-right:3px solid #3b82f6!important}
html[data-theme="light"] .quick-card:nth-child(3){border-right:3px solid #10b981!important}
html[data-theme="light"] .quick-card:nth-child(4){border-right:3px solid #f59e0b!important}

/* Existing hard-coded dark surfaces mapped to soft light layers */
html[data-theme="light"] .bg-\[\#080a12\],
html[data-theme="light"] .bg-\[\#090b15\],
html[data-theme="light"] .bg-\[\#090e1b\],
html[data-theme="light"] .bg-\[\#0a0916\],
html[data-theme="light"] .bg-\[\#0b0d18\],
html[data-theme="light"] .bg-\[\#0b0e19\],
html[data-theme="light"] .bg-\[\#0c1020\],
html[data-theme="light"] .bg-\[\#0d1324\],
html[data-theme="light"] .bg-\[\#0e1423\],
html[data-theme="light"] .bg-\[\#111022\],
html[data-theme="light"] .bg-\[\#12192b\],
html[data-theme="light"] .bg-\[\#14182a\],
html[data-theme="light"] .bg-\[\#15192d\],
html[data-theme="light"] .bg-\[\#16142a\],
html[data-theme="light"] .bg-\[\#171b30\],
html[data-theme="light"] .bg-\[\#182033\],
html[data-theme="light"] .bg-\[\#202741\],
html[data-theme="light"] .bg-\[\#202b46\],
html[data-theme="light"] .bg-\[\#252b45\]{
  background:linear-gradient(180deg,#ffffff,#f6f8fc)!important;
}
html[data-theme="light"] .border-\[\#20263e\],
html[data-theme="light"] .border-\[\#25213d\],
html[data-theme="light"] .border-\[\#252b45\],
html[data-theme="light"] .border-\[\#262d49\],
html[data-theme="light"] .border-\[\#26304c\],
html[data-theme="light"] .border-\[\#272343\],
html[data-theme="light"] .border-\[\#27314d\],
html[data-theme="light"] .border-\[\#292541\],
html[data-theme="light"] .border-\[\#292f49\],
html[data-theme="light"] .border-\[\#29304d\],
html[data-theme="light"] .border-\[\#2b3150\],
html[data-theme="light"] .border-\[\#303653\],
html[data-theme="light"] .border-\[\#313857\],
html[data-theme="light"] .border-\[\#332b56\],
html[data-theme="light"] .border-\[\#343a58\],
html[data-theme="light"] .border-\[\#35466e\],
html[data-theme="light"] .border-\[\#3a3558\],
html[data-theme="light"] .border-\[\#3a4268\],
html[data-theme="light"] .border-\[\#45376d\],
html[data-theme="light"] .border-\[\#454d72\],
html[data-theme="light"] .border-\[\#4a3c78\],
html[data-theme="light"] .border-\[\#52638c\]{
  border-color:#d8dfeb!important;
}
html[data-theme="light"] .text-\[\#7582a6\],
html[data-theme="light"] .text-\[\#9fb0d5\],
html[data-theme="light"] .text-\[\#c5d5fb\],
html[data-theme="light"] .text-\[\#c8b9f4\],
html[data-theme="light"] .text-\[\#c8c4df\]{
  color:#65728d!important;
}

/* Persian DateTime Picker */
html[data-theme="light"] .botsaz-dt-trigger,
html[data-theme="light"] .botsaz-dt-card,
html[data-theme="light"] .botsaz-dt-head button,
html[data-theme="light"] .botsaz-dt-toolbar button,
html[data-theme="light"] .botsaz-dt-day,
html[data-theme="light"] .botsaz-dt-time select,
html[data-theme="light"] .botsaz-dt-preview,
html[data-theme="light"] .botsaz-dt-actions button{
  background:#f9fbfe!important;
  color:#172033!important;
  border-color:#d5dce9!important
}
html[data-theme="light"] .botsaz-dt-card{
  background:linear-gradient(180deg,#fff,#f7f8fc)!important;
  box-shadow:0 30px 80px rgba(31,44,77,.20)!important
}
html[data-theme="light"] .botsaz-dt-backdrop{background:rgba(30,41,59,.30)!important}
html[data-theme="light"] .botsaz-dt-toolbar>div,
html[data-theme="light"] .botsaz-dt-preview{color:#5b21b6!important}
html[data-theme="light"] .botsaz-dt-day.selected{
  background:linear-gradient(135deg,#7c3aed,#9333ea)!important;
  color:#fff!important
}
html[data-theme="light"]{scrollbar-color:#b8c3d5 transparent}
html[data-theme="dark"]{scrollbar-color:#3a315d transparent}
