/* Dark mode refinement. Everything here is scoped to html[data-theme="dark"], so the light theme is untouched. */
html[data-theme="dark"]{--bg:#09151c;--panel:#0f222b;--panel2:#132a35;--panel3:#193644;--line:rgba(200,235,240,.10);--dk-accent:#2fd0a6;--dk-card:linear-gradient(180deg,#112a35,#0d212b)}
html[data-theme="dark"] body{background:var(--bg)}
html[data-theme="dark"] .shell{background:radial-gradient(circle at 25% 0%,rgba(47,208,166,.08),transparent 32%),radial-gradient(circle at 85% 8%,rgba(111,145,255,.07),transparent 30%),var(--bg)}
/* Header hero: keep the scenery but dim it so the words are always readable */
html[data-theme="dark"] .premium-workspace-hero{box-shadow:inset 0 0 0 999px rgba(5,18,26,.74),0 14px 40px rgba(0,0,0,.35)!important;border:1px solid rgba(160,220,225,.12)}
html[data-theme="dark"] .premium-workspace-hero :is(h2,p,.global-greeting){color:#f1fbf9!important;text-shadow:none}
html[data-theme="dark"] .premium-workspace-hero p{color:#a9c4c5!important}
html[data-theme="dark"] .global-metrics .metric-v6{background:rgba(14,36,46,.82)!important;border:1px solid rgba(160,220,225,.12);backdrop-filter:blur(6px)}
html[data-theme="dark"] .global-metrics .metric-v6 :is(strong,b){color:#f1fbf9!important}
html[data-theme="dark"] .global-metrics .metric-v6 :is(span,small,label,em){color:#9fbbbd!important}
html[data-theme="dark"] .hdr-group{background:rgba(10,28,36,.88);border-color:rgba(160,220,225,.14)}
html[data-theme="dark"] .hdr-group .hdr-save,html[data-theme="dark"] [data-save-workspace]{background:rgba(255,255,255,.07)!important;color:#effaf8!important}
/* Cards */
html[data-theme="dark"] .card{background:var(--dk-card);border:1px solid var(--line);box-shadow:0 10px 30px rgba(0,0,0,.28)}
html[data-theme="dark"] .today-command-v9{background:linear-gradient(180deg,#123340,#0d2630)!important;border:1px solid rgba(47,208,166,.22);box-shadow:0 14px 36px rgba(0,0,0,.35),inset 0 1px 0 rgba(47,208,166,.12)}
html[data-theme="dark"] .today-command-v9 :is(h3,.section-title span,.today-subhead,.today-subhead *){color:#effaf8}
html[data-theme="dark"] .today-subhead{border-color:var(--line)}
html[data-theme="dark"] .today-command-v9 .empty,html[data-theme="dark"] .today-command-v9 .empty *{color:#8fb0b2}
html[data-theme="dark"] .today-daily-quote,html[data-theme="dark"] .today-daily-quote *{color:#b9d6d3!important}
/* Task rows: light text on a calm dark card */
html[data-theme="dark"] .today-task,html[data-theme="dark"] .revision-today-task{background:linear-gradient(105deg,rgba(255,255,255,.055),rgba(255,255,255,.025))!important;border:1px solid rgba(160,220,225,.12)!important;box-shadow:0 4px 14px rgba(0,0,0,.25)}
html[data-theme="dark"] .today-task :is(strong,h4,b,.task-title,a){color:#f1fbf9!important}
html[data-theme="dark"] .today-task :is(span,small,.sub){color:#92b0b3}
html[data-theme="dark"] .today-task .tag,html[data-theme="dark"] .today-task .effort-tag{color:inherit}
html[data-theme="dark"] .today-task .ghost-btn,html[data-theme="dark"] .today-task button:not(.primary-btn):not(.danger-btn){background:rgba(255,255,255,.08);color:#effaf8;border:1px solid rgba(160,220,225,.18)}
html[data-theme="dark"] .today-task .ghost-btn:hover{background:rgba(47,208,166,.16);border-color:rgba(47,208,166,.5)}
html[data-theme="dark"] .today-task [data-action=deleteTodayTask]{background:none;border:0;color:#ff8b8b}
/* Waiting rows, week planner and general text */
html[data-theme="dark"] .wait-row .ghost-btn,html[data-theme="dark"] .wait-actions button{background:rgba(255,255,255,.07);color:#effaf8;border:1px solid rgba(160,220,225,.16)}
html[data-theme="dark"] .wait-actions button:hover{background:rgba(47,208,166,.16);border-color:rgba(47,208,166,.5)}
html[data-theme="dark"] .weekly-priority-compact .planner-grid>*{box-shadow:none}
html[data-theme="dark"] .project-row,html[data-theme="dark"] .project-priority-row{background:rgba(255,255,255,.03);border-color:var(--line)}
html[data-theme="dark"] :is(.project-copy strong,.master-task-name,.task strong){color:#f1fbf9}
html[data-theme="dark"] .tag{background:rgba(255,255,255,.08);color:#d7ebe9}
html[data-theme="dark"] .modal,html[data-theme="dark"] .gate-card{background:linear-gradient(165deg,#132b36,#0d212b);border:1px solid rgba(160,220,225,.12)}
html[data-theme="dark"] .v6-checkin .checkin-row{background:rgba(255,255,255,.04)}
html[data-theme="dark"] .v6-checkin .checkin-actions button{background:rgba(255,255,255,.07);color:#effaf8}
html[data-theme="dark"] .sidebar{background:linear-gradient(180deg,#0a1c24,#08171e)}
/* Projects page and shared controls */
html[data-theme="dark"] .business-panel{background:var(--dk-card)!important;border:1px solid var(--line)}
html[data-theme="dark"] .business-panel .empty,html[data-theme="dark"] .business-panel .empty *{color:#8fb0b2}
html[data-theme="dark"] .project-priority-row{background:linear-gradient(100deg,rgba(255,255,255,.06),rgba(255,255,255,.025))!important;border:1px solid rgba(160,220,225,.12)!important;box-shadow:0 4px 14px rgba(0,0,0,.22)}
html[data-theme="dark"] .project-priority-row :is(strong,h4,h3,b){color:#f1fbf9!important}
html[data-theme="dark"] .project-priority-row :is(span,small,.project-next){color:#92b0b3}
html[data-theme="dark"] .project-priority-row .mini-progress,html[data-theme="dark"] .project-priority-row [class*=progress]{background:rgba(255,255,255,.09)}
html[data-theme="dark"] :is(.lifecycle-filters .ghost-btn,.workspace-search-bar .ghost-btn,.select-toggle,#notifBell,.hdr-icon,.topbar .ghost-btn){background:rgba(255,255,255,.07)!important;color:#e4f3f1!important;border:1px solid rgba(160,220,225,.16)!important}
html[data-theme="dark"] .lifecycle-filters .ghost-btn[aria-pressed=true],html[data-theme="dark"] .lifecycle-filters .ghost-btn.active{background:#12a37f!important;color:#fff!important;border-color:transparent!important}
html[data-theme="dark"] .hdr-icon[data-action=recalculate]{color:var(--dk-accent)!important}
html[data-theme="dark"] .hdr-icon:hover{background:rgba(47,208,166,.16)!important}
/* Project picture tiles: a soft dark tile instead of a white block (uploaded photos stay as they are) */
html[data-theme="dark"] :is(.project-icon,.project-icon-mini,.project-id .symbol,.project-badge,.project-code-tile,.wait-row>:first-child:not(img)){background:linear-gradient(145deg,#1c4452,#15333f)!important;color:#bff3e4!important;border:1px solid rgba(160,220,225,.16)}
html[data-theme="dark"] .today-task [class*=icon]:not(img):not(svg):not(.kk-icon),html[data-theme="dark"] .master-task-card [class*=project-icon]{background:linear-gradient(145deg,#1c4452,#15333f)!important;color:#bff3e4!important}
html[data-theme="dark"] .project-priority-row>:first-child:not(img),html[data-theme="dark"] .project-priority-row .project-id>:first-child:not(img),html[data-theme="dark"] .project-priority-row [class*=emoji]{background:linear-gradient(145deg,#1c4452,#15333f)!important;color:#bff3e4!important;border:1px solid rgba(160,220,225,.16)}
html[data-theme="dark"] .business-panel{background:linear-gradient(180deg,#112a35,#0d212b)!important}
html[data-theme="dark"] .business-panel>:not(.business-panel-head):not(.panel-head){background:transparent!important}
