:root[data-theme="light"]{
  --bg:#F5F7F6;
  --bg-deep:#E9EEEB;
  --surface:#FFFFFF;
  --surface-2:#F7F9F8;
  --surface-3:#EEF3F0;
  --line:#D5DDD8;
  --line-soft:#E2E8E4;
  --text:#111714;
  --muted:#657069;
  --muted-2:#7D8881;
  --success:#078A50;
  --danger:#D64056;
  --warning:#A86D08;
  --ui-bg:#F5F7F6;
  --ui-surface:#FFFFFF;
  --ui-surface-raised:#F2F6F3;
  --ui-border:#D6DED9;
  --ui-border-strong:#C5D0C9;
  --ui-text:#111714;
  --ui-muted:#69746D;
  --shadow:0 18px 48px rgba(28,45,35,.10);
}

.qpf-theme-toggle{
  width:36px;height:36px;min-width:36px;display:grid;place-items:center;padding:0;
  border:1px solid var(--line);border-radius:12px;background:var(--surface);
  color:var(--text);font-size:17px;line-height:1;cursor:pointer;
  box-shadow:0 6px 16px rgba(0,0,0,.08);-webkit-tap-highlight-color:transparent
}
.qpf-theme-toggle:active{transform:scale(.96)}
.brand-row .qpf-theme-toggle{margin-left:auto;margin-right:10px}
.brand-row .admin+.qpf-theme-toggle{margin-left:10px}

:root[data-theme="light"] html,
:root[data-theme="light"] body,
:root[data-theme="light"] #app,
:root[data-theme="light"] .shell{background:var(--bg);color:var(--text)}
:root[data-theme="light"] .top,
:root[data-theme="light"] .employee-toolbar,
:root[data-theme="light"] .task-detail-top,
:root[data-theme="light"] .schedule-detail-top{background:rgba(255,255,255,.94);border-color:var(--line-soft)}
:root[data-theme="light"] .brand{filter:none}
:root[data-theme="light"] .admin,
:root[data-theme="light"] .period,
:root[data-theme="light"] .eyebrow,
:root[data-theme="light"] .section-title{color:#66736B}
:root[data-theme="light"] .hero-value,
:root[data-theme="light"] .page-title{color:#101612}

:root[data-theme="light"] :is(
  .birthday-card,.pnl,.transaction-overview,.bank-transaction,.bank-detail-card,.feed,.event,.person,.operation,.report,
  .task-card,.task-detail-section,.portal-departments>div,.schedule-card,.schedule-detail-section,.schedule-round-card,
  .schedule-document-card,.leader-next-event-card,.employee-data,.employee-report,.event-row-action-option,.task-menu-option,
  .sheet,.ui-sheet,.schedule-scoreboard-card
){
  background:#FFFFFF!important;border-color:#D9E1DC!important;color:#111714!important;
  box-shadow:0 10px 28px rgba(33,54,41,.07)
}
:root[data-theme="light"] :is(.home-unit-tabs,.home-tabs,.transaction-filter-tabs,.ledger-tabs,.task-tabs,.units,.employee-contour-tabs){
  background:#EEF3F0!important;border-color:#D7DFDA!important
}
:root[data-theme="light"] :is(.home-unit-tabs button.active,.home-tabs button.active,.transaction-filter-tabs button.active,.ledger-tabs button.active,.task-tabs button.active,.unit-btn.active,.subtab.active){
  background:#FFFFFF!important;color:#111714!important;box-shadow:inset 0 0 0 1px #C9D4CD!important
}
:root[data-theme="light"] :is(input,select,textarea,.money-input input,.task-priority-control select,.task-checklist-add input,.task-comment-form textarea){
  background:#FFFFFF!important;color:#111714!important;border-color:#CDD7D1!important
}
:root[data-theme="light"] :is(input,textarea)::placeholder{color:#919B95}
:root[data-theme="light"] :is(.ui-button,.ui-icon-button){color:var(--ui-text)}
:root[data-theme="light"] .ui-button--primary{color:#FFFFFF}
:root[data-theme="light"] .bottom{background:rgba(255,255,255,.97)!important;border-color:#D9E1DC!important}
:root[data-theme="light"] .nav{color:#69756E!important}
:root[data-theme="light"] .nav.active{color:#111714!important}
:root[data-theme="light"] .birthday-date,
:root[data-theme="light"] .leader-next-event-date,
:root[data-theme="light"] .schedule-date,
:root[data-theme="light"] .schedule-round-number{background:#EDF6F1!important;border-color:rgba(0,138,76,.28)!important}
:root[data-theme="light"] :is(.birthday-person,.transaction-overview-metric,.event-grid,.task-card-meta,.task-assignee,.ledger-row,.ledger-detail-line,.schedule-round-milestone){
  border-color:#E0E6E2!important
}
:root[data-theme="light"] .schedule-round-milestone{background:#F5F8F6!important}
:root[data-theme="light"] :is(.bank-transaction-main b,.bank-transaction strong,.feed-main b,.event-title,.person-name,.task-card h3,.portal-profile-head h2,.employee-name,.schedule-card h3,.schedule-detail-hero h1,.schedule-round-main>h3,.bank-detail-row b,.bank-detail-row a,.ledger-detail-line b,.ledger-detail-line a){
  color:#111714!important
}
:root[data-theme="light"] :is(.bank-transaction-main small,.feed-main span,.event-meta,.person-meta,.task-description,.portal-profile-head p,.employee-subline,.schedule-card p,.schedule-round-notes,.bank-detail-title){
  color:#69756E!important
}
:root[data-theme="light"] .employee-page{background:var(--bg)!important;color:var(--text)}
:root[data-theme="light"] .employee-avatar,
:root[data-theme="light"] .portal-avatar{background:#EDF2EF!important;border-color:#D3DDD6!important;color:#111714!important}
:root[data-theme="light"] .birthday-greeting-card{background:linear-gradient(180deg,#FFFDF8,#FFF9EC)!important;color:#15130E!important;border-color:#E7D19E!important}
:root[data-theme="light"] .birthday-greeting-card p{color:#514A3D!important}
:root[data-theme="light"] .birthday-celebration{background:radial-gradient(circle at 50% 25%,rgba(0,138,76,.12),rgba(245,247,246,.96) 58%,#F5F7F6 100%)}
:root[data-theme="light"] .birthday-celebration-card{background:#FFFFFF!important;color:#111714!important;border-color:#D9E1DC!important}
:root[data-theme="light"] .birthday-celebration-card p{color:#59655E!important}
:root[data-theme="light"] .gate{background:var(--bg)!important;color:var(--text)!important}
:root[data-theme="light"] .toast{background:#172019!important;color:#FFFFFF!important}
:root[data-theme="light"] .boot{background:var(--bg)!important}
:root[data-theme="light"] .boot-line{background:#DDE5E0!important}
:root[data-theme="light"] .boot-line i{background:#008A4C!important}

@media(prefers-reduced-motion:reduce){.qpf-theme-toggle{transition:none}}


/* Light theme audit: every nested panel/sheet should stop inheriting dark hard-coded surfaces. */
:root[data-theme="light"] :is(.sheet,.sheet-head,.form-actions){
  background:#FFFFFF!important;
  border-color:#D9E1DC!important;
  color:#111714!important
}
:root[data-theme="light"] .sheet-title{color:#111714!important}
:root[data-theme="light"] .sheet-close{
  background:#F3F6F4!important;
  border-color:#CFD8D2!important;
  color:#37423B!important
}
:root[data-theme="light"] :is(
  .schedule-editor-block,.schedule-scoreboard-handoff,.schedule-role-option,.schedule-detail-access-toggle,
  .schedule-document-empty,.schedule-detail-meta span,.schedule-access span,.schedule-detail-access-state,
  .schedule-round-notes,.schedule-stage-notes,.employee-contour-membership,.birthday-greeting-editor-note,
  .task-assignee,.task-checklist-item,.task-comment,.portal-info-row,.transaction-overview-metric,
  .schedule-round-deadline-note,.schedule-production-deadline,.schedule-production-default-access,
  .schedule-production-restricted,.schedule-production-access-summary,.schedule-production-viewers-empty
){
  background:#F5F8F6!important;
  border-color:#D8E0DB!important;
  color:#27312B!important
}
:root[data-theme="light"] :is(
  .schedule-editor-kicker,.field label,.schedule-scoreboard-handoff>small,.schedule-role-option small,
  .schedule-detail-access-toggle small,.schedule-round-milestone span,.schedule-round-notes,.schedule-stage-notes,
  .schedule-field-hint,.schedule-production-deadline>p,.schedule-round-deadline-note b,
  .schedule-production-restricted p,.schedule-production-viewers-empty
){
  color:#6C7870!important
}
:root[data-theme="light"] :is(.quick,.search,.employee-directory-controls select,.schedule-filters,.employee-status-tabs){
  background:#FFFFFF!important;
  border-color:#D5DED8!important;
  color:#111714!important
}
:root[data-theme="light"] .quick em{color:#6B776F!important}
:root[data-theme="light"] .schedule-filters button{color:#758078!important}
:root[data-theme="light"] .schedule-filters button.active,
:root[data-theme="light"] .employee-status-tabs button.active{
  background:#EEF3F0!important;
  color:#111714!important;
  box-shadow:inset 0 0 0 1px #CBD6CF!important
}
:root[data-theme="light"] :is(
  .schedule-status,.schedule-variant,.schedule-doc-dot,.schedule-overdue-badge,
  .ledger-contour-badge,.task-status,.task-priority,.employee-archive-badge
){
  box-shadow:none!important
}
:root[data-theme="light"] .schedule-round-milestone.is-overdue{
  background:#FFF5F6!important;
  border-color:#EFC8CE!important
}
:root[data-theme="light"] .schedule-scoreboard-card.is-overdue{
  background:#FFF7F8!important;
  border-color:#EFC8CE!important
}
.qpf-theme-setting{
  width:100%;display:flex;align-items:center;justify-content:space-between;gap:14px;
  margin:0 0 14px;padding:15px 16px;border:1px solid var(--line);
  border-radius:18px;background:var(--surface);color:var(--text);text-align:left;cursor:pointer;
  box-shadow:0 10px 26px rgba(0,0,0,.12)
}
.qpf-theme-setting-copy{display:grid;gap:5px;min-width:0}
.qpf-theme-setting-copy b{font-size:13px;line-height:1.2}
.qpf-theme-setting-copy small{color:var(--muted);font-size:9px;line-height:1.4}
.qpf-theme-setting-value{display:flex;align-items:center;gap:8px;flex:none;color:var(--muted)}
.qpf-theme-setting-value strong{font-size:10px;color:var(--text);white-space:nowrap}
.qpf-theme-setting-icon{
  width:34px;height:34px;display:grid;place-items:center;border-radius:11px;
  border:1px solid var(--line);background:var(--surface-2);font-size:17px;flex:none
}
.qpf-theme-setting-chevron{font-size:19px;line-height:1;color:var(--muted)}
:root[data-theme="light"] .qpf-theme-setting{
  background:#FFFFFF!important;border-color:#D5DED8!important;color:#111714!important;
  box-shadow:0 10px 28px rgba(33,54,41,.07)!important
}
:root[data-theme="light"] .qpf-theme-setting-icon{
  background:#F1F5F2!important;border-color:#D2DBD5!important
}

:root[data-theme="light"] .schedule-round-deadline-note span,
:root[data-theme="light"] .schedule-production-deadline-value{color:#111714!important}
:root[data-theme="light"] .schedule-production-deadline.is-overdue{
  background:#FFF7F8!important;border-color:#EFC8CE!important
}
:root[data-theme="light"] .schedule-detail-meta span.overdue{
  background:#FFF5F6!important;border-color:#EFC8CE!important;color:#C83D52!important
}


:root[data-theme="light"] .schedule-production-default-access b,
:root[data-theme="light"] .schedule-production-access-summary b{color:#087D49!important}
:root[data-theme="light"] .schedule-production-default-access span,
:root[data-theme="light"] .schedule-production-access-summary span{color:#314239!important}
:root[data-theme="light"] .schedule-production-default-access span:before{
  background:#E4F4EB!important;color:#087D49!important
}


/* Light theme premium shell + schedule filter audit */
:root[data-theme="light"] .period{
  background:#FFFFFF!important;border-color:#D9E1DC!important;color:#69756E!important
}
:root[data-theme="light"] .bottom{
  background:linear-gradient(180deg,rgba(255,255,255,.985),rgba(247,250,248,.985))!important;
  border-color:#D5DED8!important;
  box-shadow:0 16px 40px rgba(34,55,42,.14),inset 0 1px 0 rgba(255,255,255,.9)!important
}
:root[data-theme="light"] .nav.active{
  color:#111714!important;
  background:linear-gradient(180deg,#F3F7F4,#EDF3EF)!important;
  box-shadow:inset 0 0 0 1px #D4DED7!important
}
:root[data-theme="light"] .bottom .nav.active .nav-icon{
  color:#078A50!important;background:#E7F5ED!important;border-color:#CFE9DB!important;
  box-shadow:inset 0 0 0 1px #CCE5D7,0 4px 10px rgba(33,71,48,.06)!important
}
:root[data-theme="light"] .more-section-head b{color:#59665E}
:root[data-theme="light"] .more-section-head span{color:#8A958E}
:root[data-theme="light"] .more-list,
:root[data-theme="light"] .more-quick,
:root[data-theme="light"] .more-note{
  background:#FFFFFF!important;border-color:#D9E1DC!important;color:#111714!important;
  box-shadow:0 10px 28px rgba(33,54,41,.07)!important
}
:root[data-theme="light"] .more-link{border-color:#E4E9E6!important;color:#111714!important}
:root[data-theme="light"] .more-link:active{background:#F3F6F4!important}
:root[data-theme="light"] .more-link-icon,
:root[data-theme="light"] .more-note-icon{
  background:#F1F5F2!important;border-color:#D5DED8!important;color:#536159!important
}
:root[data-theme="light"] .more-link-copy small,
:root[data-theme="light"] .more-quick>span,
:root[data-theme="light"] .more-quick>small,
:root[data-theme="light"] .more-note p{color:#6B776F!important}
:root[data-theme="light"] .more-link-chevron{color:#9AA49E!important}
:root[data-theme="light"] .schedule-month-filter{
  background:#FFFFFF!important;border-color:#D5DED8!important
}
:root[data-theme="light"] .schedule-month-filter label{color:#6C7870!important}
:root[data-theme="light"] .schedule-month-filter select{
  background-color:#F7F9F8!important;border-color:#CFD9D2!important;color:#111714!important
}
:root[data-theme="light"] .schedule-month-summary{
  background:linear-gradient(180deg,#EEF8F2,#F5FAF7)!important;border-color:#CDE7D8!important
}
:root[data-theme="light"] .schedule-month-summary b{color:#18201B!important}
:root[data-theme="light"] .schedule-month-summary small{color:#6B776F!important}
:root[data-theme="light"] .schedule-month-summary span{color:#087346!important}
:root[data-theme="light"] .schedule-month-summary strong{color:#075F3B!important}
:root[data-theme="light"] .schedule-filters button em{
  background:#F3F6F4!important;border-color:#D9E1DC!important;color:#758078!important
}
:root[data-theme="light"] .schedule-filters button.active em{
  background:#E7F5ED!important;border-color:#C9E7D6!important;color:#087346!important
}
:root[data-theme="light"] .schedule-empty{
  background:#FAFBFA!important;border-color:#D7E0DA!important;color:#6B776F!important
}


/* Light finance back control */
:root[data-theme="light"] .shell-back{
  color:#087346!important;
  border-color:#C9E5D5!important;
  background:linear-gradient(180deg,#F4FBF7,#EAF6EF)!important;
  box-shadow:inset 0 1px 0 #FFFFFF,0 7px 18px rgba(32,83,54,.08)!important
}


/* Full light theme audit — premium neutral surfaces and readable hierarchy. */
:root[data-theme="light"]{
  --light-canvas:#F4F7F5;
  --light-surface:#FFFFFF;
  --light-surface-soft:#F7F9F8;
  --light-surface-muted:#EEF3F0;
  --light-line:#D8E0DB;
  --light-line-strong:#C8D2CC;
  --light-text:#111714;
  --light-muted:#657169;
  --light-muted-2:#7B8780;
  --light-accent:#078A50;
}

/* Global canvas and typography */
:root[data-theme="light"] :is(body,#app,.shell,.employee-page,.task-detail-shell){
  background:var(--light-canvas)!important;color:var(--light-text)!important
}
:root[data-theme="light"] :is(
  .employee-name,.employee-role,.employee-data-row b,.employee-data-row a,
  .employee-report-title,.employee-balance-total b,
  .portal-profile-head h2,.portal-info-row b,.portal-departments b,
  .task-card h3,.task-assignee-main b,.task-action-context b,
  .task-detail-hero h1,.task-detail-facts b,.task-detail-section-head h2,.task-detail-assignee-main b,
  .task-check-item span,.task-comment-head b,.task-history-row b,
  .event-page-title,.event-row-action-context b,.event-row-action-option span,
  .schedule-card h3,.schedule-detail-hero h1,.schedule-round-main>h3,
  .more-link-copy b,.more-quick>b,.availability-overview-item b
){color:var(--light-text)!important}

:root[data-theme="light"] :is(
  .employee-toolbar-title,.employee-subline,.employee-data-row span,.employee-contour-membership small,
  .employee-report-period b,.employee-balance-total small,
  .portal-profile-head p,.portal-info-row span,.portal-departments span,.portal-photo-action,
  .task-department,.task-card-meta,.task-description,.task-assignee-main span,.task-action-context span,
  .task-menu-option small,.task-detail-hero>p,.task-detail-facts small,.task-detail-section-head small,
  .task-detail-assignee-main span,.task-comment-head span,.task-comment p,.task-history-row span,
  .event-row-action-context span,.event-row-action-option small,.event-title-edit,
  .schedule-card p,.schedule-round-notes,.availability-hero p,.availability-help span
){color:var(--light-muted)!important}

/* Canonical icon buttons: back/close/more/month navigation must never stay dark */
:root[data-theme="light"] :is(
  .ui-icon-button,.ui-back-button,.ui-close-button,.ui-overflow-button,
  .shell-back,.employee-back,.employee-month-button,.month-nav-button,.availability-month-button,
  .task-detail-back,.schedule-detail-back
){
  background:linear-gradient(180deg,#FFFFFF,#F5F8F6)!important;
  border-color:var(--light-line-strong)!important;
  color:#344139!important;
  box-shadow:0 6px 16px rgba(35,55,43,.07),inset 0 1px 0 #FFFFFF!important
}
:root[data-theme="light"] :is(
  .ui-icon-button,.ui-back-button,.ui-close-button,.ui-overflow-button,
  .shell-back,.employee-back,.employee-month-button,.month-nav-button,.availability-month-button,
  .task-detail-back,.schedule-detail-back
):active{
  background:#EDF2EF!important;border-color:#C2CDC6!important;color:#162019!important;
  box-shadow:inset 0 1px 3px rgba(35,55,43,.09)!important
}
:root[data-theme="light"] .employee-toolbar .employee-back{
  background:linear-gradient(180deg,#FFFFFF,#F5F8F6)!important;
  border-color:var(--light-line-strong)!important;color:#344139!important
}

/* Primary / secondary actions */
:root[data-theme="light"] .ui-button--primary,
:root[data-theme="light"] .fab{
  color:#FFFFFF!important
}
:root[data-theme="light"] :is(
  .ui-button--secondary,.sheet-action,.employee-toolbar-action,.task-assignee-actions button,
  .task-detail-assignee-actions .ui-button,.portal-photo-action,.bank-detail-edit
){
  background:linear-gradient(180deg,#FFFFFF,#F5F8F6)!important;
  border-color:var(--light-line-strong)!important;
  color:#26322B!important;
  box-shadow:inset 0 1px 0 #FFFFFF!important
}
:root[data-theme="light"] .employee-action--accrual{
  background:linear-gradient(180deg,#F5F8FF,#EEF3FC)!important;
  border-color:#CFD9EC!important;color:#24466E!important
}
:root[data-theme="light"] .employee-action--payment{
  background:linear-gradient(180deg,#F2FAF6,#EAF6EF)!important;
  border-color:#C8E1D3!important;color:#0A7044!important
}

/* Main cards and nested surfaces */
:root[data-theme="light"] :is(
  .employee-hero,.employee-data,.employee-report,
  .portal-profile,.portal-team-member,.portal-finance,.portal-team,
  .portal-departments>div,.portal-team-card,.leader-next-event-card,
  .task-card,.task-detail-hero,.task-detail-section,.task-comment,.task-check-item,
  .event-row-action-option,.duty-options,
  .schedule-card,.schedule-detail-section,.schedule-round-card,.schedule-document-card,
  .availability-hero,.availability-calendar-panel,.availability-overview-item,.availability-help,
  .more-list,.more-quick,.more-note,.qpf-theme-setting
){
  background:var(--light-surface)!important;
  border-color:var(--light-line)!important;
  color:var(--light-text)!important;
  box-shadow:0 9px 26px rgba(35,55,43,.06)!important
}
:root[data-theme="light"] :is(
  .portal-info,.employee-data,.employee-admin-actions,.employee-balance-total,
  .task-card-meta,.task-assignee,.task-detail-facts,.task-detail-assignee,.task-action-context,
  .availability-editor-team
){
  border-color:#E1E7E3!important
}

/* Employee profile */
:root[data-theme="light"] .employee-toolbar{
  background:rgba(244,247,245,.96)!important;border-color:#E0E6E2!important
}
:root[data-theme="light"] .employee-avatar,
:root[data-theme="light"] .portal-avatar,
:root[data-theme="light"] .task-detail-avatar{
  background:#EEF3F0!important;border-color:#D4DDD7!important;color:#27332C!important
}
:root[data-theme="light"] .employee-data-row{border-color:#E2E7E4!important}
:root[data-theme="light"] .employee-contour-membership{
  background:#F7F9F8!important;border-color:#DCE3DE!important
}
:root[data-theme="light"] .employee-contour-membership.primary{
  background:#EEF8F2!important;border-color:#BFDCCB!important
}
:root[data-theme="light"] .employee-contour-membership.primary small{color:#087346!important}
:root[data-theme="light"] .employee-report-period .employee-month-button{
  background:#FFFFFF!important;border-color:var(--light-line-strong)!important;color:#354139!important
}
:root[data-theme="light"] .employee-contour-tabs{
  background:var(--light-surface-muted)!important;border-color:#D5DED8!important
}
:root[data-theme="light"] .employee-contour-tabs button{color:#6A766E!important}
:root[data-theme="light"] .employee-contour-tabs button.active{
  background:#FFFFFF!important;color:#111714!important;box-shadow:inset 0 0 0 1px #C9D4CD!important
}

/* Employee portal Team / Graph */
:root[data-theme="light"] .portal-info{border-color:#DEE5E0!important}
:root[data-theme="light"] .portal-info-row{border-color:#E3E8E5!important}
:root[data-theme="light"] :is(.portal-team-department-tabs,.portal-team-workspace-tabs){
  background:var(--light-surface-muted)!important;border-color:#D5DED8!important
}
:root[data-theme="light"] :is(.portal-team-department-tabs button,.portal-team-department-title){
  background:transparent!important;border-color:transparent!important;color:#69756E!important
}
:root[data-theme="light"] .portal-team-department-tabs button.active{
  background:#FFFFFF!important;border-color:#C9D4CD!important;color:#111714!important
}
:root[data-theme="light"] .portal-team-workspace-tabs button{color:#69756E!important}
:root[data-theme="light"] .portal-team-workspace-tabs button.active{
  background:#FFFFFF!important;color:#111714!important;
  box-shadow:inset 0 0 0 1px #C9D4CD!important
}

/* Tasks */
:root[data-theme="light"] .task-tabs{
  background:var(--light-surface-muted)!important;border-color:#D5DED8!important
}
:root[data-theme="light"] .task-tabs button{color:#6B776F!important}
:root[data-theme="light"] .task-tabs button.active{
  background:#FFFFFF!important;color:#111714!important;
  box-shadow:inset 0 0 0 1px #C9D4CD!important
}
:root[data-theme="light"] .task-status{
  background:#F7F9F8!important;border-color:#D7DFDA!important;color:#4F5C54!important
}
:root[data-theme="light"] .task-assignee-actions button{
  background:#F7F9F8!important;border-color:#D6DED9!important;color:#344139!important
}
:root[data-theme="light"] .task-action-context{border-color:#E1E7E3!important}
:root[data-theme="light"] .task-menu-option:active{background:#F1F5F2!important}
:root[data-theme="light"] .task-detail-section{background:#FFFFFF!important}
:root[data-theme="light"] .task-check-progress{background:#E2E8E4!important}
:root[data-theme="light"] .task-check-item{background:#F7F9F8!important;border-color:#DCE3DE!important}
:root[data-theme="light"] .task-check-item.done span{color:#87928B!important}
:root[data-theme="light"] .task-comment{
  background:#F7F9F8!important;border-color:#DCE3DE!important
}
:root[data-theme="light"] .task-comment p{color:#4F5C54!important}
:root[data-theme="light"] .task-history-row>i{
  background:#9DA9A1!important;box-shadow:0 0 0 4px #FFFFFF!important
}

/* Event detail and fixed action dock */
:root[data-theme="light"] .event-bottom-actions{
  background:rgba(255,255,255,.98)!important;
  border-color:#DCE3DE!important;
  box-shadow:0 -14px 34px rgba(35,55,43,.09)!important
}
:root[data-theme="light"] .event-row-action-option{background:#FFFFFF!important}
:root[data-theme="light"] .event-row-action-option:active{background:#F2F5F3!important}
:root[data-theme="light"] .event-expense-action{
  background:#FFF5F6!important;border-color:#E9C5CB!important;color:#B7354B!important
}
:root[data-theme="light"] .duty-options{
  background:#F7F9F8!important;border-color:#D8E0DB!important
}

/* Sheets / forms */
:root[data-theme="light"] :is(.sheet,.ui-sheet){
  background:#FFFFFF!important;border-color:#D7DFDA!important;
  box-shadow:0 -24px 60px rgba(35,55,43,.16)!important
}
:root[data-theme="light"] .sheet-head{
  background:rgba(255,255,255,.98)!important;border-color:#E0E6E2!important
}
:root[data-theme="light"] .form-actions{
  background:linear-gradient(180deg,rgba(255,255,255,.90),#FFFFFF 32%)!important;
  border-color:#E0E6E2!important
}
:root[data-theme="light"] :is(input,select,textarea,.field input,.field select,.field textarea){
  background:#FFFFFF!important;color:#111714!important;border-color:#CDD7D1!important
}
:root[data-theme="light"] :is(input,select,textarea,.field input,.field select,.field textarea):focus{
  border-color:#8FBFA6!important;
  box-shadow:0 0 0 3px rgba(7,138,80,.08)!important
}
:root[data-theme="light"] .money-currency{
  background:#EEF3F0!important;border-color:#D2DCD5!important;color:#1C2821!important
}

/* Schedule */
:root[data-theme="light"] :is(.schedule-filters,.schedule-month-filter){
  background:var(--light-surface-muted)!important;border-color:#D5DED8!important
}
:root[data-theme="light"] .schedule-filters button{color:#6A766E!important}
:root[data-theme="light"] .schedule-filters button.active{
  background:#FFFFFF!important;color:#111714!important;
  box-shadow:inset 0 0 0 1px #C9D4CD!important
}
:root[data-theme="light"] .schedule-month-filter select{
  background-color:#FFFFFF!important;border-color:#CDD7D1!important;color:#111714!important
}

/* Availability calendar */
:root[data-theme="light"] .availability-mode{
  background:#F1F5F2!important;border-color:#D5DED8!important;color:#607067!important
}
:root[data-theme="light"] .availability-departments{
  background:var(--light-surface-muted)!important;border-color:#D5DED8!important
}
:root[data-theme="light"] .availability-departments button{
  background:transparent!important;color:#69756E!important
}
:root[data-theme="light"] .availability-departments button.active{
  background:#FFFFFF!important;color:#111714!important;box-shadow:inset 0 0 0 1px #C9D4CD!important
}
:root[data-theme="light"] .availability-department-title{
  background:#F7F9F8!important;border-color:#D5DED8!important;color:#56635B!important
}
:root[data-theme="light"] .availability-day{
  background:#FFFFFF!important;border-color:#DCE3DE!important;color:#172019!important;
  box-shadow:inset 0 1px 0 #FFFFFF!important
}
:root[data-theme="light"] .availability-day.is-weekend:not(.availability-day--empty){background:#F7F9F8!important}
:root[data-theme="light"] .availability-day.has-data{border-color:#CDD7D1!important}
:root[data-theme="light"] .availability-day.is-today{
  border-color:#72B493!important;box-shadow:inset 0 0 0 1px rgba(7,138,80,.08)!important
}
:root[data-theme="light"] .availability-day.is-today .availability-day-number{color:#087346!important}
:root[data-theme="light"] .availability-day-own{color:#69756E!important}
:root[data-theme="light"] .availability-overview-item span{color:#6B776F!important}

/* More */
:root[data-theme="light"] .more-list{overflow:hidden}
:root[data-theme="light"] .more-link{
  background:#FFFFFF!important;border-color:#E3E8E5!important;color:#111714!important
}
:root[data-theme="light"] .more-link:active{background:#F2F5F3!important}
:root[data-theme="light"] .more-link-icon,
:root[data-theme="light"] .more-note-icon{
  background:#F1F5F2!important;border-color:#D5DED8!important;color:#4D5A52!important
}

/* Bottom navigation: one active surface, no nested dark/green capsule */
:root[data-theme="light"] .bottom{
  background:linear-gradient(180deg,rgba(255,255,255,.99),rgba(248,250,249,.99))!important;
  border-color:#D5DDD8!important
}
:root[data-theme="light"] .nav{color:#69756E!important}
:root[data-theme="light"] .nav.active{
  background:#EEF3F0!important;color:#111714!important;
  box-shadow:inset 0 0 0 1px #D1DBD5!important
}
:root[data-theme="light"] .bottom .nav.active .nav-icon{
  color:#078A50!important;background:transparent!important;border-color:transparent!important;box-shadow:none!important
}
:root[data-theme="light"] .bottom .nav:not(.active) .nav-icon{color:#7A8680!important}


/* Light theme residual dark-surface cleanup */
/* Initials and utility tiles should read as light-theme elements, not dark-theme leftovers. */
:root[data-theme="light"] :is(
  .avatar,.feed-icon,.bank-transaction-icon,.event-operation-icon,.report-num,
  .transaction-overview-count,.schedule-document-icon,.schedule-stage-index,.schedule-round-number,
  .task-person-dot,.task-detail-avatar
){
  background:#EEF3F0!important;
  border-color:#D2DCD5!important;
  color:#344139!important;
  box-shadow:none!important
}
:root[data-theme="light"] .avatar img{background:#EEF3F0!important}
:root[data-theme="light"] .feed-side{color:#8A958E!important}

/* Schedule state pills: preserve meaning without black capsules. */
:root[data-theme="light"] .schedule-status{
  background:#F1F4F2!important;
  border-color:#D5DED8!important;
  color:#5E6A63!important
}
:root[data-theme="light"] .schedule-status--in_progress{
  background:#F1F6FD!important;border-color:#C8D9F1!important;color:#356AA8!important
}
:root[data-theme="light"] .schedule-status--completed{
  background:#EEF8F2!important;border-color:#C6E2D2!important;color:#087346!important
}
:root[data-theme="light"] .schedule-status--past{
  background:#F1F4F2!important;border-color:#D5DED8!important;color:#657169!important
}
:root[data-theme="light"] .schedule-status--cancelled{
  background:#F3F4F3!important;border-color:#DADFDB!important;color:#7B8580!important
}
:root[data-theme="light"] .schedule-doc-dot{
  background:#FFF9EC!important;border-color:#E8D8A9!important;color:#9A741E!important
}
:root[data-theme="light"] .schedule-variant,
:root[data-theme="light"] .schedule-detail-variant{
  background:#F0F8F4!important;border-color:#C2E0CF!important;color:#087346!important
}
:root[data-theme="light"] .schedule-access span,
:root[data-theme="light"] .schedule-detail-meta span,
:root[data-theme="light"] .schedule-detail-access-state{
  background:#F5F8F6!important;border-color:#D8E0DB!important;color:#526058!important
}
:root[data-theme="light"] .schedule-detail-meta span.overdue{
  background:#FFF4F6!important;border-color:#EBC4CB!important;color:#B7354B!important
}
:root[data-theme="light"] .schedule-detail-meta span.partial-overdue{
  background:#FFF8EC!important;border-color:#E8D2A7!important;color:#9B6819!important
}
:root[data-theme="light"] .schedule-detail-meta span.on-time{
  background:#EEF8F2!important;border-color:#C6E2D2!important;color:#087346!important
}

/* Deadline state blocks and badges. */
:root[data-theme="light"] .schedule-production-deadline{
  background:#FFFFFF!important;border-color:#D9E1DC!important
}
:root[data-theme="light"] .schedule-production-deadline.is-on-time{
  background:#F2FAF6!important;border-color:#C6E2D2!important
}
:root[data-theme="light"] .schedule-production-deadline.is-overdue{
  background:#FFF5F6!important;border-color:#EBC4CB!important
}
:root[data-theme="light"] .schedule-production-deadline.is-partial-overdue{
  background:#FFF9EF!important;border-color:#E8D2A7!important
}
:root[data-theme="light"] .schedule-overdue-badge{
  background:#FFF0F2!important;border-color:#E8BEC6!important;color:#B7354B!important
}
:root[data-theme="light"] .schedule-partial-overdue-badge{
  background:#FFF6E8!important;border-color:#E5C990!important;color:#956313!important
}
:root[data-theme="light"] .schedule-on-time-badge{
  background:#EAF7F0!important;border-color:#BFDCCB!important;color:#087346!important
}
:root[data-theme="light"] .schedule-no-deadline-badge{
  background:#F1F4F2!important;border-color:#D5DED8!important;color:#657169!important
}

/* Home/dashboard and transaction utility chrome. */
:root[data-theme="light"] :is(.month-nav-button,.month-strip-button){
  background:linear-gradient(180deg,#FFFFFF,#F5F8F6)!important;
  border-color:#C9D4CD!important;color:#344139!important;box-shadow:none!important
}
:root[data-theme="light"] :is(.feed,.transaction-overview,.bank-transaction,.operation,.report){
  background:#FFFFFF!important;border-color:#D9E1DC!important;color:#111714!important
}
:root[data-theme="light"] .event-type{
  background:#F1F5F2!important;border-color:#D5DED8!important;color:#657169!important
}

/* Sheets and nested production rows must not fall back to dark hard-coded surfaces. */
:root[data-theme="light"] :is(
  .schedule-editor-block,.schedule-round-deadline-note,.schedule-round-milestone,
  .schedule-round-notes,.schedule-stage-card,.schedule-stage-notes,.schedule-scoreboard-handoff,
  .schedule-production-default-access,.schedule-production-access-summary,.schedule-document-empty
){
  background:#F7F9F8!important;border-color:#D9E1DC!important;color:#27312B!important
}
:root[data-theme="light"] .schedule-round-milestone.is-on-time{
  background:#EEF8F2!important;border-color:#C6E2D2!important
}
:root[data-theme="light"] .schedule-round-milestone.is-overdue{
  background:#FFF5F6!important;border-color:#EBC4CB!important
}
:root[data-theme="light"] .schedule-round-milestone b{color:#26322B!important}
:root[data-theme="light"] .schedule-round-milestone b.empty{color:#8A958E!important}

:root[data-theme="light"] .leader-next-event-card.has-partial-overdue{
  border-color:#E3C98F!important;
  box-shadow:inset 3px 0 0 #D3A64E,0 9px 26px rgba(35,55,43,.06)!important
}
:root[data-theme="light"] .leader-next-event-meta .partial-overdue,
:root[data-theme="light"] .leader-next-event-meta .leader-next-event-deadline.partial-overdue{
  color:#956313!important
}


/* Light theme: event hero + task overview + round partial overdue */
/* Event detail hero was still using the dark-theme gradient. */
:root[data-theme="light"] .schedule-detail-hero{
  background:linear-gradient(180deg,#FFFFFF,#FAFCFB)!important;
  border-color:#D7E0DA!important;
  color:#111714!important;
  box-shadow:0 12px 30px rgba(35,55,43,.07)!important
}
:root[data-theme="light"] .schedule-detail-hero h1{color:#111714!important}
:root[data-theme="light"] .schedule-edit-event{color:#68756D!important}
:root[data-theme="light"] .schedule-detail-hero>p{color:#637068!important}
:root[data-theme="light"] .schedule-detail-meta span{
  background:#F5F8F6!important;border-color:#D7E0DA!important;color:#536058!important
}

/* Task counters and task utility surfaces must stay light in light mode. */
:root[data-theme="light"] .task-overview button{
  background:linear-gradient(180deg,#FFFFFF,#F7FAF8)!important;
  border-color:#D5DED8!important;
  color:#657169!important;
  box-shadow:0 7px 18px rgba(35,55,43,.05)!important
}
:root[data-theme="light"] .task-overview button.active{
  background:#EEF8F2!important;
  border-color:#BFDCCB!important;
  color:#0A7044!important;
  box-shadow:inset 0 0 0 1px rgba(0,138,76,.05)!important
}
:root[data-theme="light"] .task-overview button.has-alert{
  background:#FFF6F7!important;border-color:#EBC7CD!important
}
:root[data-theme="light"] .task-overview b{color:#111714!important}
:root[data-theme="light"] .task-overview button.has-alert b{color:#B7354B!important}
:root[data-theme="light"] :is(.task-person-dot,.task-person-more,.task-assignee-picker,.task-assignee-option){
  background:#F4F7F5!important;border-color:#D8E0DB!important;color:#344139!important
}
:root[data-theme="light"] .task-action-context b{color:#111714!important}
:root[data-theme="light"] .task-menu-option{
  background:#FFFFFF!important;border-color:#D7DFDA!important;color:#111714!important
}
:root[data-theme="light"] .task-menu-option--danger{
  background:#FFF5F6!important;border-color:#E9C5CB!important;color:#B7354B!important
}

/* Per-round partial overdue stays readable in light mode. */
:root[data-theme="light"] .schedule-round-card.has-partial-overdue{
  border-color:#E3C98F!important;
  box-shadow:inset 3px 0 0 #D3A64E,0 9px 26px rgba(35,55,43,.06)!important
}
:root[data-theme="light"] .schedule-round-milestone.is-partial-overdue,
:root[data-theme="light"] .schedule-round-partial-details,
:root[data-theme="light"] .schedule-partial-overdue-toggle,
:root[data-theme="light"] .schedule-partial-overdue-editor{
  background:#FFF9EF!important;border-color:#E8D2A7!important;color:#5E4925!important
}
:root[data-theme="light"] .schedule-round-partial-details small,
:root[data-theme="light"] .schedule-partial-overdue-toggle small,
:root[data-theme="light"] .schedule-partial-overdue-editor>small{color:#8A6A35!important}
:root[data-theme="light"] .schedule-round-partial-details b,
:root[data-theme="light"] .schedule-partial-overdue-toggle b{color:#765019!important}
:root[data-theme="light"] .schedule-round-partial-details p{color:#5F5139!important}
:root[data-theme="light"] .schedule-partial-overdue-editor textarea{
  background:#FFFFFF!important;border-color:#DFC58E!important;color:#111714!important
}


/* Light theme: event style and quiz team */
:root[data-theme="light"] .schedule-style-editor,
:root[data-theme="light"] .schedule-presentation-toggle,
:root[data-theme="light"] .schedule-style-facts>div,
:root[data-theme="light"] .schedule-event-team-department,
:root[data-theme="light"] .schedule-event-team-member{
  background:#FFFFFF!important;
  border-color:#D8E0DB!important;
  color:#111714!important
}
:root[data-theme="light"] .schedule-presentation-toggle{
  box-shadow:inset 0 1px 0 #FFFFFF!important
}
:root[data-theme="light"] .schedule-presentation-toggle small,
:root[data-theme="light"] .schedule-event-team-help,
:root[data-theme="light"] .schedule-event-team-head small,
:root[data-theme="light"] .schedule-style-facts span{
  color:#6B776F!important
}
:root[data-theme="light"] .schedule-style-facts b{color:#111714!important}
:root[data-theme="light"] .schedule-style-facts b.is-yes{color:#087346!important}
:root[data-theme="light"] .schedule-style-facts b.is-no{color:#77837C!important}
:root[data-theme="light"] .schedule-event-team-avatar,
:root[data-theme="light"] .schedule-event-team-state{
  background:#F1F5F2!important;border-color:#D5DED8!important;color:#344139!important
}
:root[data-theme="light"] .schedule-event-team-member.is-confirmed{
  background:#F4FAF6!important;border-color:#CDE5D6!important
}
:root[data-theme="light"] .schedule-event-team-member.is-question{
  background:#FFF9EF!important;border-color:#E8D2A7!important
}
:root[data-theme="light"] .schedule-event-team-counts .confirmed{
  color:#087346!important;border-color:#BFDCCB!important;background:#EEF8F2!important
}
:root[data-theme="light"] .schedule-event-team-counts .question{
  color:#956313!important;border-color:#E2C98F!important;background:#FFF7E8!important
}
:root[data-theme="light"] .schedule-event-team-member.is-confirmed .schedule-event-team-main small,
:root[data-theme="light"] .schedule-event-team-member.is-confirmed .schedule-event-team-state{color:#087346!important}
:root[data-theme="light"] .schedule-event-team-member.is-question .schedule-event-team-main small,
:root[data-theme="light"] .schedule-event-team-member.is-question .schedule-event-team-state{color:#956313!important}
:root[data-theme="light"] .schedule-event-team-empty{
  background:#F7F9F8!important;border-color:#D8E0DB!important;color:#6B776F!important
}


/* Light schedule deadline card outlines */
:root[data-theme="light"] .schedule-card.has-on-time,
:root[data-theme="light"] .leader-next-event-card.has-on-time{
  border-color:#8BC9A7!important;
  box-shadow:inset 3px 0 0 #2EAD73,0 9px 26px rgba(35,55,43,.06)!important
}
:root[data-theme="light"] .schedule-card.has-partial-overdue,
:root[data-theme="light"] .leader-next-event-card.has-partial-overdue{
  border-color:#E0BD73!important;
  box-shadow:inset 3px 0 0 #D3A64E,0 9px 26px rgba(35,55,43,.06)!important
}
:root[data-theme="light"] .schedule-card.has-overdue,
:root[data-theme="light"] .leader-next-event-card.has-overdue{
  border-color:#E497A3!important;
  box-shadow:inset 3px 0 0 #D75E70,0 9px 26px rgba(35,55,43,.06)!important
}


/* Light finance reports and ticket income */
:root[data-theme="light"] .income-ticket-fields{
  background:#F1FAF5!important;border-color:#B9DDC9!important;color:#111714!important
}
:root[data-theme="light"] .income-ticket-head b{color:#163B29!important}
:root[data-theme="light"] .income-ticket-head span,
:root[data-theme="light"] .income-ticket-formula{color:#337B58!important}
:root[data-theme="light"] .income-ticket-formula{background:#E8F5ED!important}
:root[data-theme="light"] .finance-report-export-card{
  background:linear-gradient(180deg,#F1FAF5,#FFFFFF)!important;
  border-color:#B9DDC9!important;color:#111714!important;
  box-shadow:0 10px 28px rgba(33,54,41,.07)!important
}
:root[data-theme="light"] .finance-report-export-head b{color:#111714!important}
:root[data-theme="light"] .finance-report-export-head p,
:root[data-theme="light"] .finance-report-export-note{color:#66736B!important}
:root[data-theme="light"] .finance-report-export-head em{
  background:#E8F5ED!important;border-color:#B9DDC9!important;color:#26704D!important
}


/* Event expense icon clipping + photographer icon */
:root[data-theme="light"] .event-operation-icon{
  background:transparent!important;
  border-color:transparent!important;
  border-radius:13px!important;
  overflow:hidden!important;
  box-shadow:none!important
}
:root[data-theme="light"] .event-operation-icon .bank-transaction-icon{
  border-radius:13px!important;
  overflow:hidden!important
}
:root[data-theme="light"] .bank-transaction-icon[data-transaction-icon="camera"]{
  color:#2B6F9E!important;
  background:linear-gradient(145deg,#EDF7FD,#F2F0FB)!important;
  border-color:#C8DBEA!important;
  box-shadow:inset 0 1px 0 #FFFFFF!important
}
