/* Readable data views in either theme. Scoped UI styles; no business data changes. */
:root{--muted:#b6b6c0}
.main{font-size:16px;line-height:1.5}
.main small{font-size:13px;line-height:1.5}
.main .project-name{font-size:15px;line-height:1.45}
.main .project-number{font-size:12px}
.main .row-note,.main .caption,.main .context{font-size:13px;line-height:1.5}
.main .button{font-size:14px;min-height:40px}
.main table{font-size:15px;font-variant-numeric:tabular-nums;line-height:1.5}
.main th,.main td{padding:13px 15px}
.main th{font-size:14px;font-weight:600}
.main .table-wrap{max-width:100%;overflow-x:auto}
#daily-history table{min-width:930px;font-size:16px}
#daily-history th{font-size:14px}
#daily-history tbody tr:nth-child(even){background:#ffffff05}
#daily-history tbody tr:hover{background:#ffffff0b}
#daily-history td:first-child,#daily-history th:first-child{white-space:nowrap;position:sticky;left:0;background:var(--surface,#1b1b1e);z-index:1}
#daily-history tbody tr:first-child th{position:sticky;top:0;background:var(--surface,#1b1b1e)}
#daily-history .toolbar{gap:12px;flex-wrap:wrap}
#daily-history label{font-size:14px;display:flex;align-items:center;gap:8px}
.field{font-size:14px;line-height:1.5}
.field input,.field select,.field textarea,.toolbar input,.toolbar select{font-size:16px;min-height:42px}
.theme-toggle{white-space:nowrap;font-size:13px!important;flex-shrink:0}
html[data-theme=light]{--ink:#19212d;--muted:#566170;--green:#675600;--line:#d5dbe3;--bg:#f3f5f8;--mint:#fff9d9;--amber:#806000;--surface:#fff;color-scheme:light}
html[data-theme=light] body,html[data-theme=light] .main{background:var(--bg);color:var(--ink)}
html[data-theme=light] .main>header{background:#fff;border-color:var(--line)}
html[data-theme=light] .breadcrumbs,html[data-theme=light] .breadcrumbs b{color:#344054}
html[data-theme=light] .main .local-status{color:#625500}
html[data-theme=light] .main :is(.panel,.team-card,.stat,.project-card),html[data-theme=light] dialog{background:#fff;color:var(--ink);border-color:var(--line)}
html[data-theme=light] :is(.panel-head,.attention-row,.team-card .metrics,.form-section){border-color:var(--line)}
html[data-theme=light] .main .stat strong{color:var(--ink)}
html[data-theme=light] .main :is(.caption,.context,.row-note,.field,.form-section){color:var(--muted)}
html[data-theme=light] :is(.toolbar input,.toolbar select,.date-input,.field input,.field select,.field textarea,.project-tools select,.analytics-controls select,.analytics-controls input){background:#fff;color:var(--ink);border-color:#aeb7c5;color-scheme:light}
html[data-theme=light] .main .button,html[data-theme=light] dialog .button{background:#fff;border-color:#aeb7c5;color:#263244}
html[data-theme=light] .main .button.primary,html[data-theme=light] dialog .button.primary{background:#ffe500;border-color:#d5bd00;color:#17170e}
html[data-theme=light] .main :is(.text-link,.text-button,.cabinet-link){color:#695600}
html[data-theme=light] .main th{background:#eef1f5;color:#344054;border-color:#d5dbe3}
html[data-theme=light] .main td{border-color:#e2e6ec}
html[data-theme=light] .main tbody tr:hover{background:#f2f5fa}
html[data-theme=light] #daily-history tbody tr:nth-child(even){background:#f7f9fc}
html[data-theme=light] #daily-history tbody tr:hover{background:#edf2f8}
html[data-theme=light] .main .project-register :is(th,td):first-child{background:#fff}
html[data-theme=light] .main .project-name{color:var(--ink)}
html[data-theme=light] :is(.notice,.demo-banner){background:#fff9db;color:#5b4c16;border-color:#ded29a}
html[data-theme=light] :is(.notice,.demo-banner) :is(b,a){color:#51420b}
html[data-theme=light] .main .tag{background:#edf0f5;color:#344054}
html[data-theme=light] .main .tag.green{background:#e0f3e8;color:#185a35}
html[data-theme=light] .main .tag.amber{background:#fff0c2;color:#755300}
html[data-theme=light] .main .tag.red{background:#fde6e4;color:#92342d}
html[data-theme=light] .main .tag.gray{background:#edf0f5;color:#4c5868}
html[data-theme=light] .main .card-summary{background:#f4f6fa}
html[data-theme=light] .main .empty{color:#566170}
html[data-theme=light] .main footer{color:#596575}
@media(max-width:720px){.main table{font-size:15px}.main th,.main td{padding:12px}.main .button{min-height:44px}.theme-toggle{padding:8px!important;font-size:12px!important}.field input,.field select,.field textarea{min-height:44px}}
html[data-theme=light] .daily-costs strong{color:#5e4c00}
html[data-theme=light] .main .brand-hero{color:#fff}
html[data-theme=light] :is(.notices-panel,.notice-item){background:#fff;color:#19212d;border-color:#cbd3de}
html[data-theme=light] .notice-item.critical{background:#fff1ef;border-left-color:#b63535}
html[data-theme=light] .notice-item.important{background:#fff9db;border-left-color:#a18000}
html[data-theme=light] :is(.notice-item small,.notices-panel>small){color:#566170}
html[data-theme=light] .main :is(.channel-tile,.status-chip,.view-switch){background:#fff;color:#344054;border-color:#b9c3cf}
html[data-theme=light] .main :is(.channel-tile.active,.channel-tile.selected,.status-chip.selected,.view-switch .selected){background:#fff7c2;color:#514200;border-color:#b69b00}
html[data-theme=light] .main :is(.project-card-meta,.project-id){color:#566170}
html[data-theme=light] .main .card-open{background:#fff6bf;color:#594800;border-color:#c5ad30}
html[data-theme=light] .main :is(.project-card-bottom,.project-card-foot){border-color:#d5dbe3}
dialog{font-size:16px;line-height:1.5}
@media(max-width:720px){.main>header{height:auto;min-height:58px;flex-wrap:wrap;gap:8px;padding-top:8px;padding-bottom:8px}.main>header .breadcrumbs{min-width:0;flex:1}}
.daily-editor-row>td,.daily-history-row>td{padding:0!important;vertical-align:top}
.daily-inline-editor,.daily-history-row #daily-history{position:sticky;left:0;width:min(900px,calc(100vw - 330px));margin:12px;white-space:normal}
.daily-inline-editor select{max-width:100%;width:100%}
.daily-inline-editor .field.full>.button{margin:0 8px 8px 0}
@media(max-width:720px){.daily-inline-editor,.daily-history-row #daily-history{width:calc(100vw - 64px);margin:8px}.daily-inline-editor .form-grid{grid-template-columns:1fr}.daily-inline-editor .daily-costs{grid-template-columns:1fr}.daily-inline-editor .panel-body{padding:16px}}

/* Daily history: readable values, unchanged calculations. */
#daily-history tbody td {font-size:16px;font-weight:650;font-variant-numeric:tabular-nums;white-space:nowrap;}
#daily-history tbody th {font-size:16px;font-weight:700;font-variant-numeric:tabular-nums;}
.detail-table th,.detail-table td {vertical-align:top;}

/* Payroll dialog: keep dates, descriptions and amounts visible in both themes. */
dialog.payroll-detail-modal{width:min(1200px,calc(100vw - 32px));max-width:calc(100vw - 32px)}
.payroll-detail-modal .detail-table{width:100%;min-width:0;table-layout:fixed}
.payroll-detail-modal .detail-table :is(th,td){white-space:normal;overflow-wrap:anywhere;font-size:15px;padding:12px}
.payroll-detail-modal .detail-table :is(th,td):first-child{width:12%}
.payroll-detail-modal .detail-table :is(th,td):nth-child(2){width:28%}
.payroll-detail-modal .detail-table :is(th,td):last-child{width:16%;text-align:right}
html[data-theme=light] dialog :is(th,td){color:#19212d;border-color:#d5dbe3}
html[data-theme=light] dialog th{background:#eef1f5;color:#344054}
html[data-theme=light] dialog tbody tr:hover,html[data-theme=light] dialog tbody tr:hover td{background:#edf2f8;color:#19212d}
html[data-theme=light] dialog small{color:#566170}
@media(max-width:600px){.payroll-detail-modal .detail-table{min-width:640px}.payroll-detail-modal .table-wrap{overflow-x:auto}.payroll-detail-modal .modal-body{padding:12px}}

/* Project details also appear in a dialog outside .main. */
html[data-theme=light] dialog .card-summary{background:#f4f6fa;color:#19212d;border-color:#d5dbe3}
html[data-theme=light] dialog .card-summary :is(b,strong){color:#19212d}
html[data-theme=light] dialog :is(.card-summary small,.field,.form-section){color:#566170}
html[data-theme=light] dialog .form-section{border-color:#d5dbe3}
html[data-theme=light] dialog :is(input,select,textarea){background:#fff;color:#19212d;border-color:#aeb7c5;color-scheme:light}
html[data-theme=light] dialog :is(input,textarea)::placeholder{color:#657184;opacity:1}
html[data-theme=light] dialog :is(.text-button,.text-link){color:#695600}

.pay-week-grid{width:100%;min-width:1040px;table-layout:fixed;font-size:14px}
.pay-week-grid th:first-child{width:230px}
.pay-week-grid th,.pay-week-grid td{padding:10px;white-space:normal;vertical-align:top;overflow-wrap:anywhere}
.pay-week-grid td:first-child{line-height:1.45}
.pay-week-grid small{display:block;font-size:12px;color:var(--muted)}
.pay-grid-accrual{padding:4px 0 8px;font-variant-numeric:tabular-nums}
.pay-grid-accrual strong{display:block;font-size:15px}
.payroll-raw{margin-top:20px}.payroll-raw summary{cursor:pointer;font-weight:600;padding:12px 0}
html[data-theme=light] dialog .pay-week-grid :is(th,td){color:#19212d}

/* Video deadlines: text labels accompany colour in both themes. */
.mini-reports{flex-wrap:wrap;gap:6px}
.mini-reports .mini-report{width:auto;min-width:86px;height:auto;min-height:66px;padding:7px 9px;line-height:1.35}
.video-state-label,.video-due-date{display:block;font-size:12px;line-height:1.4}
.video-due-date{font-weight:500}
.mini-report.video-state-overdue,.video-report-grid .video-state-overdue{border:2px solid #e87878;background:#401d24;color:#ffe5e5}
.mini-report.video-state-due,.video-report-grid .video-state-due{border:2px solid #d9a840;background:#3b3019;color:#fff0bd}
html[data-theme=light] .mini-report.video-state-overdue,html[data-theme=light] .video-report-grid .video-state-overdue{background:#fff0f0;color:#822222;border-color:#bb4646}
html[data-theme=light] .mini-report.video-state-due,html[data-theme=light] .video-report-grid .video-state-due{background:#fff6d9;color:#694b00;border-color:#a97a18}

/* Quiet report cards unless their deadline requires attention. */
.video-report-grid .notice:is(.video-state-upcoming,.video-state-done,.video-state-paused,.video-state-inactive,.video-state-missing){background:#20232c;color:#edf0f6;border:1px solid #606675}
html[data-theme=light] .video-report-grid .notice:is(.video-state-upcoming,.video-state-done,.video-state-paused,.video-state-inactive,.video-state-missing){background:#ffffff;color:#263244;border-color:#d1d8e2}
.video-report-grid .video-state-done .video-state-label{color:#94dfb6}
html[data-theme=light] .video-report-grid .video-state-done .video-state-label{color:#17633e}
.video-report-grid .notice .text-button,.video-report-grid .notice .text-link{color:inherit;text-decoration:underline;text-underline-offset:3px;min-height:44px}
.video-report-grid .notice .text-button:focus-visible,.video-report-grid .notice .text-link:focus-visible{outline:2px solid currentColor;outline-offset:3px}

/* Keep payroll guidance available without pushing the matrix below mobile view. */
.pay-grid-help{margin:0 0 16px}.pay-grid-help>summary{cursor:pointer;min-height:44px;padding:10px 0;font-weight:600;line-height:1.5}.pay-grid-help>p{line-height:1.6;margin:8px 0 16px}.pay-grid-scroll-hint{font-size:14px;color:var(--muted);line-height:1.5;margin:0 0 12px}.pay-grid-scroll:focus-visible,.pay-grid-help>summary:focus-visible{outline:2px solid var(--ui-accent);outline-offset:2px}
