/* Optional purple/gold dark mode. This file can be removed to return to the original theme. */
.theme-toggle{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-width:44px;min-height:38px;border:1px solid #dccba7;border-radius:10px;padding:7px 10px;background:#fffcf5;color:#936e3d;font-size:11px;box-shadow:0 2px 8px #714b8310;flex-shrink:0;cursor:pointer}.theme-toggle svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.theme-toggle svg[hidden]{display:none}.theme-toggle:hover{border-color:#bd9853;background:#f8efd9}.login-body>.theme-toggle{position:fixed;top:18px;right:22px;z-index:20}
:root[data-theme=dark]{color-scheme:dark;--ink:#f0e5f5;--muted:#b7a1c6;--line:#4d375c;--bg:#1d1428;--purple:#bb97d8;--purple-deep:#d0b2e6;--lavender:#392647}
:root[data-theme=dark] body{background:#1d1428;color:#eee1f4}
:root[data-theme=dark] .topbar{background:#261a32;border-color:#4d365b}
:root[data-theme=dark] .content .panel,:root[data-theme=dark] .filter-bar,:root[data-theme=dark] .heading-tag,:root[data-theme=dark] .summary-mini-chart,:root[data-theme=dark] .insight-ribbon{background:linear-gradient(135deg,#2e203b,#271b32)!important;border-color:#50385f;color:#dfcce9;box-shadow:0 5px 20px #100a1718}
:root[data-theme=dark] .content h1,:root[data-theme=dark] .content h2,:root[data-theme=dark] .content h3,:root[data-theme=dark] .topbar strong{color:#efdfc2}
:root[data-theme=dark] .content p,:root[data-theme=dark] .content label,:root[data-theme=dark] .breadcrumb,:root[data-theme=dark] .account small{color:#bfa8ce}
:root[data-theme=dark] .content input,:root[data-theme=dark] .content select,:root[data-theme=dark] .content textarea{background:#24182e!important;border-color:#624776;color:#e6d4f0}
:root[data-theme=dark] input::placeholder,:root[data-theme=dark] textarea::placeholder{color:#957ea4}
:root[data-theme=dark] .content input[readonly]{background:#35263f!important;color:#c7b2d4}
:root[data-theme=dark] .content table thead th{background:#3c294a;color:#dbc19b;border-color:#624776}
:root[data-theme=dark] .content table tbody tr,:root[data-theme=dark] .content table tbody td{background-color:#2b1e37;color:#d8c4e5;border-color:#4a3459}
:root[data-theme=dark] .content table tbody tr:nth-child(even)>td{background-color:#30223d}
:root[data-theme=dark] .content table tbody tr:hover>td,:root[data-theme=dark] .content table tbody tr:focus-within>td{background-color:#493052!important}
:root[data-theme=dark] .content table tfoot th,:root[data-theme=dark] .content table tfoot td{background:#44304f;color:#e4c691}
:root[data-theme=dark] .outcome-tile,:root[data-theme=dark] .result-feature-card{background:linear-gradient(120deg,#402b50,#2d213a)!important;border-color:#684b7b}
:root[data-theme=dark] .outcome-tile strong,:root[data-theme=dark] .result-card-number,:root[data-theme=dark] .summary-mini-copy strong,:root[data-theme=dark] .tracking-coverage-center strong{color:#e5c58e}
:root[data-theme=dark] .outcome-tile>span,:root[data-theme=dark] .result-feature-card h3{color:#ceb0df!important}
:root[data-theme=dark] .outcome-icon,:root[data-theme=dark] .heading-symbol,:root[data-theme=dark] .activity-symbol,:root[data-theme=dark] .media-link-icon{background:#4c335b;color:#c9a6df}
:root[data-theme=dark] .outcome-comparison-chart,:root[data-theme=dark] .tracking-coverage-chart,:root[data-theme=dark] .district-map-info,:root[data-theme=dark] .tracking-group,:root[data-theme=dark] .activity-media-link,:root[data-theme=dark] .detail-grid>div,:root[data-theme=dark] .followed-age-fields{background:linear-gradient(135deg,#30213c,#372641)!important;border-color:#614472}
:root[data-theme=dark] .district-map-stage{background:radial-gradient(ellipse at center,#654c2945,#281c34 76%)}
:root[data-theme=dark] .district-map-content{background:radial-gradient(ellipse at 35% 55%,#d4b36a10,transparent 65%)}
:root[data-theme=dark] .district-map-info h3,:root[data-theme=dark] .district-map-info dd,:root[data-theme=dark] .report-dot-row>strong,:root[data-theme=dark] .report-age-legend strong,:root[data-theme=dark] .waffle-total strong{color:#e3c38c}
:root[data-theme=dark] .outcome-chart-inner text,:root[data-theme=dark] .course-ring-value,:root[data-theme=dark] .income-ring-value,:root[data-theme=dark] .course-ring-total,:root[data-theme=dark] .income-ring-total{fill:#d9b9ed}
:root[data-theme=dark] .outcome-chart-inner text[fill="#a58247"]{fill:#e9c77b}
:root[data-theme=dark] .mini-note,:root[data-theme=dark] .soft-label,:root[data-theme=dark] .active-category-scope,:root[data-theme=dark] .completion-status,:root[data-theme=dark] .income-status-summary>span,:root[data-theme=dark] .podium-runner,:root[data-theme=dark] .pyramid-legend{background:#3b2948;color:#c9acd9;border-color:#634773}
:root[data-theme=dark] .bar-track,:root[data-theme=dark] .pyramid-track,:root[data-theme=dark] .summary-mini-ring{background-color:#453152}
:root[data-theme=dark] .btn.secondary,:root[data-theme=dark] .photo-link-button{background:#382740;color:#e0c18c;border-color:#896b3f}
:root[data-theme=dark] .activity-tabs{background:#2e203a;border-color:#6f543a}
:root[data-theme=dark] .activity-tabs button{color:#c9abd9}
:root[data-theme=dark] .site-footer{border-color:#624b3c;color:#b69bc5}
:root[data-theme=dark] .theme-toggle{background:#3b2945;border-color:#9d7b43;color:#e8cb93}
:root[data-theme=dark] .page-loading{background:#1c1229b5}
:root[data-theme=dark] .page-loading-card{background:radial-gradient(circle at top,#49334d,#2c1c38 75%);border-color:#a1834f}
:root[data-theme=dark] .page-loading-card>strong{color:#ead4ae}
:root[data-theme=dark] .login-body .login-screen-card{background:linear-gradient(120deg,#31213def,#26192fed)!important;border-color:#9c7d4d80}
:root[data-theme=dark] .login-screen-card h1{color:#e0c392}
:root[data-theme=dark] .login-screen-card p,:root[data-theme=dark] .login-screen-card label,:root[data-theme=dark] .login-credit{color:#c4abd4}
:root[data-theme=dark] .login-screen-card input{background:#24162e;color:#eadff0;border-color:#71527f}
@media(max-width:640px){.theme-toggle{padding:7px;min-width:38px}.theme-toggle>span{display:none}.login-body>.theme-toggle{right:12px;top:12px}}

:root[data-theme=dark] .public-brand .expanded-site-title{color:#e6c990!important}
:root[data-theme=dark] .summary-mini-ring>span{background:#2c2037;color:#dabcdf}
:root[data-theme=dark] .thai-calendar-panel,:root[data-theme=dark] .thai-calendar-toggle{background:#30213c;border-color:#6c4e7e;color:#e5ceef}
:root[data-theme=dark] .thai-calendar-grid button{color:#d7bfe4}
:root[data-theme=dark] .activity-map-details,:root[data-theme=dark] .photo-upload-button,:root[data-theme=dark] .activity-evidence{background:#30213c;border-color:#654974;color:#c8a7dc}
:root[data-theme=dark] .income-legend>div,:root[data-theme=dark] .podium-runner,:root[data-theme=dark] .report-age-legend>div{border-color:#573f67}

/* Icon-only theme switch. */
.theme-toggle{position:relative;width:66px;min-width:66px;height:34px;min-height:34px;border-radius:20px;padding:5px 7px;justify-content:space-between;gap:0;background:#f3e8ca;border-color:#d1b579;box-shadow:inset 0 1px 3px #aa884523}
.theme-toggle>svg{position:relative;z-index:2;width:18px;height:18px;flex-shrink:0;pointer-events:none}.theme-toggle .theme-sun{order:0;color:#9f752c}.theme-toggle .theme-moon{order:1;color:#9a7ab0}.theme-toggle .theme-toggle-thumb{display:block!important;position:absolute;top:3px;left:3px;width:26px;height:26px;border-radius:50%;background:#fffcf5;box-shadow:0 2px 5px #75533730;transition:transform .22s ease,background-color .22s ease;pointer-events:none;z-index:1}
:root[data-theme=dark] .theme-toggle{background:#493255;border-color:#927045}:root[data-theme=dark] .theme-toggle .theme-toggle-thumb{transform:translateX(30px);background:#68477c}:root[data-theme=dark] .theme-toggle .theme-moon{color:#f3d99e}:root[data-theme=dark] .theme-toggle .theme-sun{color:#a38baf}.theme-toggle:focus-visible{outline:3px solid #c8a665;outline-offset:3px}
@media(max-width:640px){.theme-toggle{width:62px;min-width:62px;padding:5px 6px}:root[data-theme=dark] .theme-toggle .theme-toggle-thumb{transform:translateX(26px)}}
@media(prefers-reduced-motion:reduce){.theme-toggle .theme-toggle-thumb{transition:none}}
