/* Contractor Caddy v10.0 — presentation themes. Original 'blue' CSS remains intact. */
.appearance-panel{margin:0 0 17px;border:1px solid var(--line);border-radius:17px;background:var(--paper);box-shadow:var(--shadow);padding:17px 18px 18px;max-width:950px}
.appearance-top{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin:0 0 12px}
.appearance-top h2{font-size:15px;font-weight:850;margin:0;letter-spacing:-.25px}
.appearance-top span{color:var(--muted);font-size:11px}
.appearance-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
.appearance-option{border:1.5px solid var(--line);background:transparent;color:var(--ink);border-radius:12px;padding:10px 9px 11px;min-height:106px;display:flex;align-items:flex-start;flex-direction:column;gap:4px;text-align:left;font-family:inherit;cursor:pointer;position:relative;transition:border-color .15s,box-shadow .15s,transform .15s}
.appearance-option:hover{border-color:#6ca9cc;transform:translateY(-1px)}
.appearance-option.selected{border-color:#58b9e6;box-shadow:0 0 0 2px #58b9e633}
.appearance-option.selected::after{content:'✓';position:absolute;top:9px;right:10px;font-size:11px;width:20px;height:20px;border-radius:50%;background:#1888bd;color:#fff;display:grid;place-items:center}
.appearance-option:focus-visible,[data-theme-select]:focus-visible{outline:3px solid #51b6f0;outline-offset:3px}
.appearance-option b{font-size:12px;line-height:1.25}.appearance-option small{color:var(--muted);font-size:10px;line-height:1.3}
.appearance-mini{display:block;height:33px;width:58px;border-radius:6px;position:relative;overflow:hidden;margin:1px 0 7px;border:1px solid #a0b2c244}
.appearance-mini::before{content:'';display:block;width:19px;height:100%;position:absolute;left:0;top:0;background:#112b43}
.appearance-mini i{position:absolute;left:24px;height:3px;border-radius:4px;background:#65bbef;width:27px}
.appearance-mini i:nth-child(1){top:8px;width:24px}.appearance-mini i:nth-child(2){top:15px}.appearance-mini i:nth-child(3){top:22px;width:17px}
.appearance-mini-blue{background:#152840}.appearance-mini-blue::before{background:#08182b}
.appearance-mini-light{background:#f7fafd}.appearance-mini-light::before{background:#203a55}.appearance-mini-light i{background:#93b6d6}
.appearance-mini-dark{background:#212832}.appearance-mini-dark::before{background:#0d131c}.appearance-mini-dark i{background:#6bd0c7}
@media(max-width:420px){.appearance-panel{padding:14px 12px}.appearance-options{gap:6px}.appearance-option{padding:10px 7px;min-height:107px}.appearance-option b{font-size:11px}.appearance-option small{font-size:9px}}

/* STUDIO LIGHT — warm white surfaces, deep ink, crisp cobalt accents. */
html[data-cc-theme="light"]{--ink:#1c3044;--forest:#176c91;--forest2:#2b85a8;--paper:#fff;--cream:#f4f7fb;--line:#d9e4ef;--muted:#64788b;--green-bg:#e4f6ee;--orange:#98651d;--orange-bg:#fff4e1;--red:#ad4141;--red-bg:#fff0ee;--blue:#226a9e;--shadow:0 9px 26px rgba(34,66,96,.07);color-scheme:light}
html[data-cc-theme="light"] body,html[data-cc-theme="light"] .content{background:#f4f7fb;color:var(--ink)}
html[data-cc-theme="light"] .sidebar{background:linear-gradient(168deg,#152c40,#0e2436);border-right:1px solid #243e54;color:#e2eefa}
html[data-cc-theme="light"] .topbar,html[data-cc-theme="light"] .mobile-header,html[data-cc-theme="light"] .mobile-nav{background:#fff;border-color:#dce6ef;color:#1d3449;box-shadow:0 2px 18px #143f6110}
html[data-cc-theme="light"] .mobile-brand-title,html[data-cc-theme="light"] .crumb-title,html[data-cc-theme="light"] .page-title,html[data-cc-theme="light"] .block-title{color:#1b3045}
html[data-cc-theme="light"] .bread,html[data-cc-theme="light"] .footer-note{color:#75899e}
html[data-cc-theme="light"] .select-company{background:#f7fafd;border-color:#d3dfeb;color:#263e55}
html[data-cc-theme="light"] .demo-tag{background:#f0f6fc;border-color:#d2e3f0;color:#4d6d85}
html[data-cc-theme="light"] .eyebrow{color:#326f97}
html[data-cc-theme="light"] .page-description,html[data-cc-theme="light"] .small-muted{color:#64788b}
html[data-cc-theme="light"] .button{background:#ecf3f9;color:#23445e}
html[data-cc-theme="light"] .button.primary{background:#146f9c;color:#fff;box-shadow:0 3px 10px #146f9c25}
html[data-cc-theme="light"] .button.primary:hover{background:#09587f}
html[data-cc-theme="light"] .button.secondary,html[data-cc-theme="light"] .button.plain{background:#fff;color:#27506b;border:1px solid #cbdae7}
html[data-cc-theme="light"] .button.danger{background:#fff0ee;color:#a83c3e}
html[data-cc-theme="light"] .metric-card,html[data-cc-theme="light"] .panel,html[data-cc-theme="light"] .modal,html[data-cc-theme="light"] .quote-document{background:#fff;border-color:#dbe5ef;color:#1d3045}
html[data-cc-theme="light"] .panel-head,html[data-cc-theme="light"] .tabs,html[data-cc-theme="light"] .modal-head{border-color:#e2e9f1}
html[data-cc-theme="light"] .panel-head h2,html[data-cc-theme="light"] .data-table .name,html[data-cc-theme="light"] .mini-kpi .value{color:#1b344a}
html[data-cc-theme="light"] .metric-top,html[data-cc-theme="light"] .metric-helper,html[data-cc-theme="light"] .panel-head p,html[data-cc-theme="light"] .data-table .sub,html[data-cc-theme="light"] .activity-meta,html[data-cc-theme="light"] .mini-kpi .caption{color:#64788b}
html[data-cc-theme="light"] .metric-icon,html[data-cc-theme="light"] .activity-dot,html[data-cc-theme="light"] .empty-icon{background:#e9f2f9;color:#296a91}
html[data-cc-theme="light"] .data-table th{background:#f3f8fc;color:#526f87}
html[data-cc-theme="light"] .data-table td{border-color:#e8edf3}
html[data-cc-theme="light"] .data-table tbody tr:hover{background:#f6faff}
html[data-cc-theme="light"] .empty{color:#6c7f91}
html[data-cc-theme="light"] .notice{background:#edf8f5;border-color:#c8e6db;color:#306a5e}
html[data-cc-theme="light"] .notice.warning,html[data-cc-theme="light"] .workspace-note{background:#fff7e8;border-color:#ead8b6;color:#7b5b26}
html[data-cc-theme="light"] .notice.danger{background:#fff1ef;border-color:#f0d4d2;color:#a13f3d}
html[data-cc-theme="light"] .step,html[data-cc-theme="light"] .mini-kpi{background:#f6f9fc;border-color:#dbe5ef}
html[data-cc-theme="light"] .step-title,html[data-cc-theme="light"] .activity-text{color:#1f3a50}
html[data-cc-theme="light"] .step-sub{color:#668099}
html[data-cc-theme="light"] .activity-item{border-color:#e3eaf1}
html[data-cc-theme="light"] .pill.pending,html[data-cc-theme="light"] .pill.pre{color:#835719;background:#fff1d5}
html[data-cc-theme="light"] .pill.open{color:#206a49;background:#e1f6e9}
html[data-cc-theme="light"] .pill.closed{color:#4e677a;background:#e9f0f5}
html[data-cc-theme="light"] .pill.flag{color:#96383b;background:#ffe6e5}
html[data-cc-theme="light"] .list-link,html[data-cc-theme="light"] .subtle-link{color:#17779f}
html[data-cc-theme="light"] .progress-track{background:#e3ebf3}
html[data-cc-theme="light"] .progress-fill{background:#248fa7}
html[data-cc-theme="light"] .field label{color:#38576e}
html[data-cc-theme="light"] .field input,html[data-cc-theme="light"] .field select,html[data-cc-theme="light"] .field textarea,html[data-cc-theme="light"] .line-item input,html[data-cc-theme="light"] .line-item select{background:#fff;color:#253c52;border-color:#cad9e6}
html[data-cc-theme="light"] .field-help{color:#6c8295}
html[data-cc-theme="light"] .line-item .remove{background:#fff0ef;color:#ad5454}
html[data-cc-theme="light"] .summary-strip{background:#e8f2f9;color:#203e56}
html[data-cc-theme="light"] .close{background:#eaf1f7;color:#214b69}
html[data-cc-theme="light"] .tab{color:#587187}
html[data-cc-theme="light"] .tab.active{color:#176d9a;border-color:#2788b4}
html[data-cc-theme="light"] .receipt-preview{background:#f5f9fc;border-color:#ccdae8}
html[data-cc-theme="light"] .file-tag{background:#e8f2f9;color:#235679}
html[data-cc-theme="light"] .quote-document table th,html[data-cc-theme="light"] .quote-document table td{border-color:#dde6ee}
html[data-cc-theme="light"] .mobile-nav button{color:#536c81}
html[data-cc-theme="light"] .mobile-nav button.active{color:#1577a1}
/* Keep signature semi-circular gauges but make their dashboard appropriate for light mode. */
html[data-cc-theme="light"] .performance-dashboard{background:linear-gradient(145deg,#fff,#f1f7fc);color:#1d354b;border:1px solid #d5e4f0;box-shadow:0 13px 30px #23465e12}
html[data-cc-theme="light"] .performance-head h2,html[data-cc-theme="light"] .performance-head .eyebrow{color:#1c567c}
html[data-cc-theme="light"] .performance-head p:not(.eyebrow),html[data-cc-theme="light"] .performance-hint{color:#58748a}
html[data-cc-theme="light"] .gauge-card{background:#fff;border-color:#d9e5ef;box-shadow:0 4px 13px #254d6c0b}
html[data-cc-theme="light"] .gauge-title,html[data-cc-theme="light"] .gauge-center strong{color:#1d364c}
html[data-cc-theme="light"] .gauge-help{color:#617f96}
html[data-cc-theme="light"] .gauge-arc::after{background:#fff}
html[data-cc-theme="light"] .gauge-arc::before{background:conic-gradient(from 270deg at 50% 100%,var(--gauge-fill-start,#35a998) 0%,var(--gauge-fill-end,#52a7dc) var(--gauge-percent),#dbe6ef var(--gauge-percent),#dbe6ef 50%,transparent 50%)}
html[data-cc-theme="light"] .jobs-tile{background:linear-gradient(148deg,#fff,#f2f8fc);border-color:#ccdeec;color:#1f3c53;box-shadow:0 5px 16px #20415f12}
html[data-cc-theme="light"] .jobs-tile:hover{background:#eaf5fb}
html[data-cc-theme="light"] .jobs-tile>svg,html[data-cc-theme="light"] .tile-count{color:#287da7}
html[data-cc-theme="light"] .jobs-tile small{color:#5b748b}
html[data-cc-theme="light"] .job-row{color:#23415b;border-color:#e0eaf2}
html[data-cc-theme="light"] .job-row:hover{background:#f1f8fd}
html[data-cc-theme="light"] .job-row small{color:#61788d}
html[data-cc-theme="light"] .job-search{background:#fff;color:#213950;border-color:#cadbe8}
html[data-cc-theme="light"] .quote-list-card{background:#fff;border-color:#cfdeec;color:#1c344c;box-shadow:0 7px 20px #213f5e0d}
html[data-cc-theme="light"] .quote-list-card:hover{background:#f3f9fe}
html[data-cc-theme="light"] .quote-card-meta,html[data-cc-theme="light"] .quote-list-header p{color:#617a8f}
html[data-cc-theme="light"] .quote-card-bottom{border-color:#dde7ee}
html[data-cc-theme="light"] .quote-card-bottom small{color:#59758c}
html[data-cc-theme="light"] .quote-card-bottom b{color:#1d354c}
html[data-cc-theme="light"] .quote-card-open{color:#1475a2}
html[data-cc-theme="light"] .quote-list-empty{background:#fff;border-color:#ccdeec;color:#61788b}
html[data-cc-theme="light"] .quote-open-inline{background:#f1f7fb;border-color:#d5e4ee}
html[data-cc-theme="light"] .quote-open-inline .small-muted{color:#607c8e}
html[data-cc-theme="light"] .simple-job-hero{background:linear-gradient(135deg,#f4f9fc,#e9f3fa);border-color:#d0e1ed;color:#1d354a}
html[data-cc-theme="light"] .simple-job-title p,html[data-cc-theme="light"] .simple-job-code,html[data-cc-theme="light"] .simple-job-back{color:#396b8d}
html[data-cc-theme="light"] .simple-job-tabs{background:#fff;border-color:#d0e1ed}
html[data-cc-theme="light"] .simple-job-tab{color:#4c708b}
html[data-cc-theme="light"] .simple-job-tab.active{background:#e8f4fb;color:#115f8b;border-color:#3e9bc9}
html[data-cc-theme="light"] .simple-job-next{background:linear-gradient(135deg,#edf6fc,#f9fcff);border-color:#d5e3ed}
html[data-cc-theme="light"] .simple-job-eyebrow{color:#347b9e}
html[data-cc-theme="light"] .simple-job-kpi{background:#fff;border-color:#d7e5ef}
html[data-cc-theme="light"] .simple-job-kpi>span,html[data-cc-theme="light"] .simple-job-kpi small{color:#667f94}
html[data-cc-theme="light"] .simple-job-kpi strong{color:#203b52}
html[data-cc-theme="light"] .simple-job-note,html[data-cc-theme="light"] .simple-job-outstanding,html[data-cc-theme="light"] .simple-job-docs{background:#f6fafd;border-color:#d4e3ee;color:#34556e}
html[data-cc-theme="light"] .simple-job-outstanding summary,html[data-cc-theme="light"] .simple-job-docs summary{color:#1b729f}
html[data-cc-theme="light"] .simple-job-section-title p{color:#647d92}
html[data-cc-theme="light"] .page-explanation,html[data-cc-theme="light"] .help-drawer{background:#f5faff;border-color:#d8e6f0;color:#395b75}
html[data-cc-theme="light"] .page-explanation-heading,html[data-cc-theme="light"] .page-explanation p,html[data-cc-theme="light"] .help-drawer>summary{color:#326785}
html[data-cc-theme="light"] .help-drawer[open]>summary{border-color:#d3e1eb}
html[data-cc-theme="light"] .page-action-drawer{background:#f2f8fc;border-color:#d1e1ec}
html[data-cc-theme="light"] .page-action-drawer>summary{color:#1a698c}
html[data-cc-theme="light"] .hours-awaiting{background:#e7f2f9;border-color:#d0e4ed;color:#2d5c78}
html[data-cc-theme="light"] .library-mobile-card{background:#fff;border-color:#e0e9f1}
html[data-cc-theme="light"] .library-mobile-main small,html[data-cc-theme="light"] .inline-details{color:#617b90}
html[data-cc-theme="light"] .library-mobile-main strong{color:#1a526c}
html[data-cc-theme="light"] .pilot-footnote{color:#778a9b}
html[data-cc-theme="light"] .pilot-footnote b{color:#765b34}
html[data-cc-theme="light"] .clean-start-guide{background:linear-gradient(135deg,#fff,#e8f3fb);border-color:#d2e3f0;color:#213f54}
html[data-cc-theme="light"] .clean-start-guide p{color:#58758b}
html[data-cc-theme="light"] .quote-optional .field-grid{color:#203c53}

/* GRAPHITE DARK — distinct neutral charcoal palette and cool mint accents. */
html[data-cc-theme="dark"]{--ink:#f0f4f5;--forest:#2a927f;--forest2:#4bafa0;--paper:#1b252c;--cream:#111820;--line:#35434d;--muted:#aebbc4;--green-bg:#193a37;--orange:#dfbd82;--orange-bg:#46382a;--red:#f1a7a3;--red-bg:#452d34;--blue:#8ad7c8;--shadow:0 14px 35px #04080c55;color-scheme:dark}
html[data-cc-theme="dark"] body,html[data-cc-theme="dark"] .content{background:#111820;color:var(--ink)}
html[data-cc-theme="dark"] .sidebar{background:#0c131a;border-color:#34434c}
html[data-cc-theme="dark"] .topbar,html[data-cc-theme="dark"] .mobile-header,html[data-cc-theme="dark"] .mobile-nav{background:#182129;border-color:#364750}
html[data-cc-theme="dark"] .page-title,html[data-cc-theme="dark"] .block-title{color:#f0f5f7}
html[data-cc-theme="dark"] .eyebrow{color:#80d2c2}
html[data-cc-theme="dark"] .button{background:#293941;color:#ecf5f4}
html[data-cc-theme="dark"] .button.primary{background:#2b927f;color:#fff}
html[data-cc-theme="dark"] .button.primary:hover{background:#35a891}
html[data-cc-theme="dark"] .button.secondary,html[data-cc-theme="dark"] .button.plain{background:#243139;border-color:#425560;color:#edf6f4}
html[data-cc-theme="dark"] .metric-card,html[data-cc-theme="dark"] .panel,html[data-cc-theme="dark"] .modal,html[data-cc-theme="dark"] .quote-document{background:#1b252d;border-color:#354550;color:#edf4f6}
html[data-cc-theme="dark"] .panel-head,html[data-cc-theme="dark"] .modal-head,html[data-cc-theme="dark"] .tabs{border-color:#364550}
html[data-cc-theme="dark"] .step,html[data-cc-theme="dark"] .mini-kpi,html[data-cc-theme="dark"] .data-table th{background:#243039;border-color:#354550}
html[data-cc-theme="dark"] .metric-icon,html[data-cc-theme="dark"] .activity-dot{background:#2a4548;color:#9cdbce}
html[data-cc-theme="dark"] .field input,html[data-cc-theme="dark"] .field select,html[data-cc-theme="dark"] .field textarea,html[data-cc-theme="dark"] .line-item input,html[data-cc-theme="dark"] .line-item select{background:#131e25;border-color:#48606b;color:#f3f8fa}
html[data-cc-theme="dark"] .progress-track{background:#35434e}
html[data-cc-theme="dark"] .progress-fill{background:#4bc4ad}
html[data-cc-theme="dark"] .summary-strip{background:#263d40}
html[data-cc-theme="dark"] .performance-dashboard{background:linear-gradient(145deg,#1b252e,#25343b 65%,#19242b);border-color:#40535b}
html[data-cc-theme="dark"] .gauge-card{background:#ffffff09;border-color:#61777c55}
html[data-cc-theme="dark"] .gauge-arc::before{background:conic-gradient(from 270deg at 50% 100%,var(--gauge-fill-start,#53d0b8) 0%,var(--gauge-fill-end,#64aaa3) var(--gauge-percent),#44535c var(--gauge-percent),#44535c 50%,transparent 50%)}
html[data-cc-theme="dark"] .gauge-arc::after{background:#222f37}
html[data-cc-theme="dark"] .jobs-tile{background:linear-gradient(145deg,#25343d,#1b2b33);border-color:#48616b}
html[data-cc-theme="dark"] .jobs-tile>svg,html[data-cc-theme="dark"] .tile-count{color:#82d5c7}
html[data-cc-theme="dark"] .quote-list-card{background:#25323b;border-color:#415560;color:#f2f7f9}
html[data-cc-theme="dark"] .quote-list-card:hover{background:#2d424a}
html[data-cc-theme="dark"] .quote-card-bottom{border-color:#48616b}
html[data-cc-theme="dark"] .quote-card-open{color:#9ae2d7}
html[data-cc-theme="dark"] .simple-job-hero{background:linear-gradient(125deg,#26383e,#1d2d34);border-color:#49646a}
html[data-cc-theme="dark"] .simple-job-tabs{background:#1b2930;border-color:#3f555c}
html[data-cc-theme="dark"] .simple-job-tab.active{background:#294b4c;color:#edfff8;border-color:#6fcfbc}
html[data-cc-theme="dark"] .simple-job-next{background:#24353a;border-color:#455d61}
html[data-cc-theme="dark"] .simple-job-kpi{background:#243239;border-color:#46606a}
html[data-cc-theme="dark"] .simple-job-note,html[data-cc-theme="dark"] .simple-job-outstanding,html[data-cc-theme="dark"] .simple-job-docs{background:#223138;border-color:#47606a}
html[data-cc-theme="dark"] .page-explanation,html[data-cc-theme="dark"] .help-drawer{background:#23313a;border-color:#405762;color:#d1e5e5}
html[data-cc-theme="dark"] .help-drawer>summary,html[data-cc-theme="dark"] .page-explanation-heading{color:#a6e3d7}
html[data-cc-theme="dark"] .page-action-drawer{background:#26363f;border-color:#49616b}
html[data-cc-theme="dark"] .page-action-drawer>summary{color:#b0e5db}
html[data-cc-theme="dark"] .hours-awaiting{background:#233c3d;border-color:#416a65;color:#daf4eb}
html[data-cc-theme="dark"] .library-mobile-card{background:#233039;border-color:#445661}
html[data-cc-theme="dark"] .clean-start-guide{background:#23323a;border-color:#4a626b}
html[data-cc-theme="dark"] .pill.open{background:#194a3f;color:#b8f1da}
html[data-cc-theme="dark"] .mobile-nav button.active{color:#83d8c8}
html[data-cc-theme="dark"] .select-company{background:#26363f;border-color:#506471;color:#f2f8f9}

/* Receipt correction is always paper-clear and printable. Only its surrounding chrome follows the theme. */
html[data-cc-theme="light"] .cc-review-overlay{background:#c9d9e6}
html[data-cc-theme="light"] .cc-review-head{background:#244c6c}
html[data-cc-theme="dark"] .cc-review-overlay{background:#080f14}
html[data-cc-theme="dark"] .cc-review-head{background:#162d35}
html[data-cc-theme="dark"] .cc-review-close{background:#304952;border-color:#779397}
/* Keep the separate receipt record white for readability on screen and print. */
html[data-cc-theme="light"] .sitebar{background:#244862}
html[data-cc-theme="light"] .paper{box-shadow:0 13px 30px #29455c20}
html[data-cc-theme="dark"] .sitebar{background:#14262d}
html[data-cc-theme="dark"] .sitebar .button.print{background:#267c76;border-color:#267c76}
html[data-cc-theme="dark"] .paper{box-shadow:0 13px 30px #0006}

/* Worker + manager portal are independent simple screens using the same saved display preference. */
html[data-cc-theme="light"]:has(.portal-wrap){--bg:#f3f7fb;--panel:#fff;--edge:#d7e4ec;--ink:#213c51;--muted:#61798b;--blue:#286e9d;--green:#137456}
html[data-cc-theme="light"] .portal-wrap .brand b,html[data-cc-theme="light"] .portal-wrap h1,html[data-cc-theme="light"] .portal-wrap h2,html[data-cc-theme="light"] .portal-wrap h3{color:#223e53}
html[data-cc-theme="light"] .portal-wrap .panel{background:#fff;color:#213c51;border-color:#d7e4ec}
html[data-cc-theme="light"] .portal-wrap .button{background:#ecf4f9;color:#1b5577;border-color:#bdd5e5}
html[data-cc-theme="light"] .portal-wrap .button.primary{background:#14749d;color:#fff;border-color:#14749d}
html[data-cc-theme="light"] .portal-wrap input,html[data-cc-theme="light"] .portal-wrap select,html[data-cc-theme="light"] .portal-wrap textarea{background:#fff;color:#203f54;border-color:#bed2e2}
html[data-cc-theme="light"] .portal-wrap .quiet-detail{border-color:#d4e1ea}
html[data-cc-theme="light"] .portal-wrap .quiet-detail summary,html[data-cc-theme="light"] .portal-wrap .plain-back{color:#246b93}
html[data-cc-theme="light"] .portal-wrap .meta,html[data-cc-theme="light"] .portal-wrap .hint{color:#627e90}
html[data-cc-theme="light"] .portal-wrap .entry{border-color:#dbe7ee}
html[data-cc-theme="light"] .portal-wrap .banner{background:#e7f6ef;color:#23674d;border-color:#c4dfd2}
html[data-cc-theme="light"] .portal-wrap .banner.warning{background:#fff5e6;color:#835b19;border-color:#e9dbb9}
html[data-cc-theme="light"] .portal-wrap .banner.error{background:#fff0ef;color:#9f3a38;border-color:#f0cecd}
html[data-cc-theme="light"] .portal-wrap .code{background:#f0f6fa;color:#2d5570}
html[data-cc-theme="light"] .portal-wrap .notice-line,html[data-cc-theme="light"] .portal-wrap .worker-name{color:#25698b}
html[data-cc-theme="dark"]:has(.portal-wrap){--bg:#111820;--panel:#1c272e;--edge:#3e545b;--ink:#edf5f5;--muted:#adbdc6;--blue:#65c1b2;--green:#93d8bd}
html[data-cc-theme="dark"] .portal-wrap .button{background:#2b4148;border-color:#496d70}
html[data-cc-theme="dark"] .portal-wrap .button.primary{background:#2d9686;border-color:#45b5a2}
html[data-cc-theme="dark"] .portal-wrap input,html[data-cc-theme="dark"] .portal-wrap select,html[data-cc-theme="dark"] .portal-wrap textarea{background:#142229;border-color:#506770}
html[data-cc-theme="dark"] .portal-wrap .step-count{background:#24554e;border-color:#57ac9b}
html[data-cc-theme="dark"] .portal-wrap .quiet-detail{border-color:#49616b}
html[data-cc-theme="dark"] .portal-wrap .reminder-banner{background:#1f4944;color:#c4f0e7}
.portal-appearance{max-width:680px;margin:18px auto 8px;padding:11px 13px;border:1px solid var(--edge,#425c71);border-radius:12px;color:var(--muted,#b4cbd7)}
.portal-appearance summary{font-size:12px;cursor:pointer;font-weight:750;min-height:25px;list-style-position:inside;padding:3px}
.portal-appearance-choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;padding-top:11px}
.portal-appearance-choices button{min-width:0;min-height:43px;border-radius:8px;background:var(--panel,#15283e);color:var(--ink,#edf4fb);font-weight:750;font-size:11px;border:1px solid var(--edge,#35516c);padding:8px 5px;cursor:pointer}
.portal-appearance-choices button.selected{outline:2px solid #63bbcb;outline-offset:1px}

@media print{
  html[data-cc-theme] body,html[data-cc-theme] .content{background:#fff!important;color:#111!important}
  .appearance-panel,.portal-appearance{display:none!important}
  html[data-cc-theme] .quote-document,html[data-cc-theme] .paper{background:#fff!important;color:#111!important;border-color:#bbb!important}
}
/* Small-screen legibility refinements: keep touch targets and numerical gauges easy to read. */
html[data-cc-theme="light"] .mobile-brand-title span{color:#31566f}
html[data-cc-theme="light"] .mobile-brand-title strong{color:#127dae}
html[data-cc-theme="light"] .brief-estimate-note{color:#52728a}
html[data-cc-theme="light"] .performance-dashboard .performance-hint{color:#526f86}
html[data-cc-theme="light"] .performance-dashboard .pilot-footnote{color:#58748b}
html[data-cc-theme="dark"] .brief-estimate-note{color:#b4c9d0}
html[data-cc-theme="dark"] .gauge-help{color:#bbced2}
html[data-cc-theme="light"] .gauge-help{color:#567187}
@media(max-width:760px){html[data-cc-theme="light"] .gauge-help,html[data-cc-theme="dark"] .gauge-help{font-size:10px;line-height:1.4}}

/* v10.1 readability audit — explicit contrasting text on both light and dark surfaces. */
.crew-choice{color:#f5faff}
.crew-choice b{color:#fff}
.crew-choice small{color:#bed7e9}
.crew-choice .crew-override{font-weight:750;font-size:12px;letter-spacing:0;background:#fff;color:#1e3d57;border:2px solid #b8d4e8;min-width:92px;flex-basis:92px;min-height:44px;padding:9px 5px}
.crew-choice .crew-override::placeholder{color:#284f68;opacity:1}
@media(max-width:540px){.crew-choice .crew-override{min-width:92px;flex-basis:92px;width:92px!important}}
html[data-cc-theme="light"] .job-activity-summary span{background:#dfebf5;color:#173a55;border:1px solid #bcd3e6;font-weight:650}
html[data-cc-theme="light"] .job-activity-summary b{color:#0e344f}
html[data-cc-theme="light"] .job-activity-row{color:#1c3851;border-color:#d5e1ec}
html[data-cc-theme="light"] .job-activity-row strong,html[data-cc-theme="light"] .job-activity-row>b{color:#162f45}
html[data-cc-theme="light"] .job-activity-row small{color:#526d83}
html[data-cc-theme="light"] .job-activity-row:hover,html[data-cc-theme="light"] .job-activity-row:focus-visible{background:#eaf3f9;outline-color:#428aae}
html[data-cc-theme="light"] .job-activity h3{color:#1e3f58}
html[data-cc-theme="dark"] .job-activity-summary span{background:#344a52;color:#f5fbfd}
html[data-cc-theme="dark"] .job-activity-row small{color:#b5d0d8}
html[data-cc-theme="light"] .crew-choice{background:#1e3d57;border-color:#355e7a}
html[data-cc-theme="light"] .crew-choice b{color:#fff}
html[data-cc-theme="light"] .crew-choice small{color:#c0d9e9}
html[data-cc-theme="light"] .crew-choice .crew-override{background:#fff;color:#203c52;border-color:#8cb6d1}
html[data-cc-theme="dark"] .crew-choice{background:#243b45;border-color:#52707b;color:#f6ffff}
html[data-cc-theme="dark"] .crew-choice b{color:#fff}
html[data-cc-theme="dark"] .crew-choice small{color:#cee2e5}
html[data-cc-theme="dark"] .crew-choice .crew-override{color:#203e51;background:#fff;border-color:#8eb7be}
html[data-cc-theme="light"] .hours-job-rule{color:#2b465c}
.date-friendly{margin-top:-7px}
.date-friendly strong{color:var(--ink);font-size:12px}

/* v10.1 invoice details — composed from explicitly selected customer-priced lines. */
.invoice-itemized[hidden]{display:none!important}
.invoice-quote-choices{display:grid;gap:7px;margin:8px 0}
.invoice-quote-choice{display:flex;align-items:center;gap:9px;padding:10px 12px;background:#eff6fb;color:#193a55;border:1px solid #bed5e8;border-radius:10px;cursor:pointer;max-width:100%}
.invoice-quote-choice input[type=checkbox]{width:20px;min-width:20px;height:20px;accent-color:#167eb2}
.invoice-quote-choice>span{flex:1;min-width:0;overflow-wrap:anywhere}
.invoice-quote-choice b,.invoice-quote-choice small{display:block;font-size:12px}
.invoice-quote-choice small{font-size:11px;color:#54738a;margin-top:4px}
.invoice-quote-choice strong{font-size:12px;white-space:nowrap;color:#11364e}
.invoice-manual-line{background:#f1f6fa;color:#193b53;border:1px solid #cbdae5;border-radius:10px;padding:10px;margin:8px 0}
.invoice-manual-line>input,.invoice-manual-grid>input{width:100%;min-width:0;padding:9px;border-radius:8px;border:1px solid #b4cadb;background:#fff;color:#193b53;font:inherit;font-size:12px}
.invoice-manual-grid{display:grid;grid-template-columns:minmax(60px,.65fr) minmax(65px,1fr) minmax(70px,1fr) auto;gap:6px;margin-top:7px}
.invoice-live-total{display:flex;gap:12px;justify-content:space-between;align-items:center;margin:10px 0 0;padding:10px;border-radius:9px;background:#e9f3fa;color:#234c68;font-size:12px;font-weight:700}
html[data-cc-theme="dark"] .invoice-quote-choice,html[data-cc-theme="dark"] .invoice-manual-line{background:#263e49;color:#eaf7fa;border-color:#50707b}
html[data-cc-theme="dark"] .invoice-quote-choice b,html[data-cc-theme="dark"] .invoice-quote-choice strong{color:#fff}
html[data-cc-theme="dark"] .invoice-quote-choice small{color:#cadfe7}
html[data-cc-theme="dark"] .invoice-live-total{background:#23434c;color:#edfaff}
html[data-cc-theme="light"] .invoice-quote-choice{background:#eff6fb;color:#193a55}
html[data-cc-theme="light"] .invoice-quote-choice strong{color:#193a55}
html[data-cc-theme="dark"] .invoice-manual-line input{background:#fff!important;color:#19364b!important}
.invoice-print-controls{display:flex;gap:13px;align-items:center;flex-wrap:wrap;margin:0 0 18px}
.invoice-print-controls label{display:flex;align-items:center;gap:9px;font-size:12px;font-weight:700}
.invoice-print-controls select{border-radius:8px;padding:9px;background:#fff;color:#244058;border:1px solid #aac3d5;font-size:12px}
.invoice-document{background:#fff;color:#233748;border-radius:9px;padding:24px;font:13px/1.5 Arial,sans-serif;overflow-wrap:anywhere}
.invoice-document-head{display:flex;gap:18px;justify-content:space-between;align-items:flex-start;border-bottom:2px solid #214d68;padding-bottom:15px}
.invoice-document-head small{display:block;letter-spacing:1.3px;color:#526e82;font-weight:700;font-size:10px}
.invoice-document-head h2{font:800 23px/1.1 Arial,sans-serif;margin:7px 0 0;color:#183b52}
.invoice-company-logo{max-width:170px;max-height:74px;object-fit:contain;display:block;margin-bottom:8px}
.invoice-doc-ref{text-align:right;min-width:0;overflow-wrap:anywhere}
.invoice-doc-ref strong{display:block;font-size:18px;color:#1d4059}
.invoice-doc-ref span{display:block;font-size:11px;margin-top:7px;color:#5b7383}
.invoice-doc-details{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:18px 0 23px}
.invoice-doc-details>div{display:flex;flex-direction:column;gap:4px;min-width:0}
.invoice-doc-details small{color:#60798a;font-size:10px}
.invoice-doc-details strong{color:#1b4057;font-size:13px}
.invoice-doc-details span{color:#48677b;font-size:11px}
.invoice-document h3{font-size:14px;margin:0 0 8px;color:#1c4058}
.invoice-doc-table{border-collapse:collapse;width:100%}
.invoice-doc-table th,.invoice-doc-table td{text-align:left;padding:10px 7px;border-bottom:1px solid #d4e0e8;font-size:11px;vertical-align:top;color:#253f51}
.invoice-doc-table th{background:#f0f6fa;color:#3e6177;font-size:10px}
.invoice-doc-table th:not(:first-child),.invoice-doc-table td:not(:first-child){white-space:nowrap}
.invoice-summary-line{background:#f5f9fc;padding:12px;border-radius:8px;color:#3b5769}
.invoice-doc-totals{max-width:400px;margin:18px 0 18px auto}
.invoice-doc-totals>div{display:flex;justify-content:space-between;gap:13px;padding:7px 0;font-size:12px}
.invoice-doc-totals b{font-variant-numeric:tabular-nums}
.invoice-doc-totals .invoice-grand{border-top:2px solid #294f66;margin-top:8px;padding-top:12px;font-size:16px;font-weight:800;color:#143e58}
.invoice-doc-note{border-top:1px solid #d8e2ea;padding-top:12px;font-size:10px;color:#627887;line-height:1.5}
.paystub-company-logo{max-width:170px;max-height:65px;object-fit:contain;display:block;margin:6px 0}
@media(max-width:530px){.invoice-document{padding:12px;font-size:11px}.invoice-document-head h2{font-size:18px}.invoice-doc-ref strong{font-size:14px}.invoice-doc-table th,.invoice-doc-table td{font-size:10px;padding:7px 3px}.invoice-document .invoice-doc-details{gap:10px}.invoice-manual-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.invoice-manual-grid button{grid-column:1/-1}.invoice-table-wrap{overflow-x:auto}}
/* Print only the currently reviewed invoice or pay statement; leave page chrome out. */
@media print{
 html,body{background:#fff!important;overflow:visible!important}
 body *{visibility:hidden!important}
 .invoice-document,.invoice-document *,.paystub-document,.paystub-document *{visibility:visible!important}
 .invoice-document,.paystub-document{display:block!important;position:absolute!important;left:0!important;top:0!important;width:100%!important;max-width:100%!important;height:auto!important;margin:0!important;padding:0!important;border:0!important;box-shadow:none!important;overflow:visible!important;background:#fff!important;color:#142c3c!important}
 .modal-backdrop:has(.invoice-document),.printable-invoice-modal,.printable-invoice-modal .modal-body,.modal-backdrop:has(.paystub-document),.paystub-modal,.paystub-modal .modal-body{position:static!important;max-height:none!important;height:auto!important;inset:auto!important;width:auto!important;overflow:visible!important;display:block!important;background:#fff!important;box-shadow:none!important;border:0!important;padding:0!important;margin:0!important}
 .invoice-document-head,.invoice-doc-details,.invoice-doc-totals,.paystub-heading,.paystub-grid,.paystub-totals{break-inside:avoid}
 .invoice-doc-table tr,.paystub-table tr{break-inside:avoid}
 .invoice-doc-table,.paystub-table{width:100%}
 @page{margin:12mm;size:auto}
}
@media print{
 body:has(.invoice-document) .app-shell,body:has(.paystub-document) .app-shell{display:none!important}
 #app,body{min-height:0!important;height:auto!important;margin:0!important;padding:0!important}
}
.invoice-mobile-cards{display:none}
@media(max-width:650px){
 .invoice-table-scroll{display:none}
 .invoice-mobile-cards{display:grid;gap:9px;padding:14px}
 .invoice-mobile-card{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;gap:5px 10px;width:100%;text-align:left;border:1px solid #c7dae8;border-radius:12px;padding:15px;background:#f6faff;color:#24445d}
 .invoice-mobile-card b,.invoice-mobile-card small{display:block;overflow-wrap:anywhere}
 .invoice-mobile-card b{font-size:14px}.invoice-mobile-card small{margin-top:5px;font-size:11px;color:#526b7e}
 .invoice-mobile-card>strong{font-size:15px;white-space:nowrap}
 .invoice-mobile-link{grid-column:1/-1;font-size:11px;font-weight:700;color:#136995;margin-top:3px}
 html[data-cc-theme="dark"] .invoice-mobile-card{background:#263944;border-color:#53717b;color:#eaf7fa}
 html[data-cc-theme="dark"] .invoice-mobile-card small{color:#bcd4dc}
 html[data-cc-theme="dark"] .invoice-mobile-link{color:#9ee4d8}
}

/* v10.2: Pay-stub actions remain fully visible on narrow phones. */
.paystub-sharing-note{margin:16px 0 0;line-height:1.5}
.paystub-share-buttons{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.paystub-share-buttons .button{min-width:95px;flex:1 1 95px}
@media(max-width:540px){.paystub-share-buttons{width:100%;display:grid;grid-template-columns:1fr 1fr}.paystub-share-buttons .button{width:100%;min-width:0;padding:12px 8px}.paystub-modal .modal-actions{flex-wrap:wrap}.paystub-modal .modal-actions>.button{flex:1 1 100%}}

/* v10.3 worker-first Hours: rows stay collapsed until needed; source entries untouched. */
.hours-type-switch{grid-template-columns:repeat(3,minmax(0,1fr))}
.worker-hours-list{display:grid;gap:10px;padding:14px}
.worker-hours-group{border:1px solid var(--line);background:var(--paper);border-radius:14px;overflow:hidden;color:var(--ink)}
.worker-hours-summary{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px;min-height:76px;cursor:pointer;list-style:none}
.worker-hours-summary::-webkit-details-marker{display:none}
.worker-hours-summary::marker{content:''}
.worker-hours-summary:focus-visible{outline:3px solid #55b5ee;outline-offset:-3px}
.worker-hours-name,.worker-hours-total{display:flex;flex-direction:column;gap:5px;min-width:0}
.worker-hours-name b{font-size:16px;overflow-wrap:anywhere}
.worker-hours-name small,.worker-hours-total small{font-size:11px;color:var(--muted);line-height:1.4}
.worker-hours-total{text-align:right;flex-shrink:0}.worker-hours-total strong{font-size:22px;white-space:nowrap}
.worker-hours-group[open] .worker-hours-summary{border-bottom:1px solid var(--line)}
.worker-hours-entries{display:grid;gap:10px;padding:12px;background:color-mix(in srgb,var(--paper) 92%,var(--ink) 8%)}
.worker-hours-entries .hours-card{margin:0}.worker-hours-entries .hours-card-head b{font-size:14px}
@media(max-width:490px){.hours-type-switch{gap:5px}.hours-type-button{font-size:11px;min-height:49px;padding:9px 4px}.worker-hours-list{padding:10px}.worker-hours-summary{padding:13px 11px}.worker-hours-total strong{font-size:19px}}

/* v10.4: tappable pending-hour inbox and accessible review actions. */
.hours-awaiting{width:100%;min-height:58px;cursor:pointer;justify-content:space-between;text-align:left;font-family:inherit;gap:12px}
.hours-awaiting:focus-visible{outline:3px solid #55b5ee;outline-offset:3px}
.hours-awaiting-arrow{display:inline-flex;align-items:center;gap:3px;margin-left:auto;white-space:nowrap;font-size:12px;font-weight:700}
.hours-awaiting-arrow .icon{width:17px;height:17px}
.hours-approval-modal{width:min(100%,630px);max-height:90dvh;overflow:auto}
.hours-approval-list{display:grid;gap:12px;margin:18px 0}
.hours-approval-item{border:1px solid var(--line);background:var(--paper);border-radius:13px;padding:12px;color:var(--ink)}
.hours-approval-review{display:flex;align-items:center;justify-content:space-between;width:100%;border:0;background:transparent;color:inherit;text-align:left;cursor:pointer;font-family:inherit;min-height:64px;gap:12px;padding:4px}
.hours-approval-review>span{display:flex;flex-direction:column;gap:5px;min-width:0}
.hours-approval-review b{font-size:16px}.hours-approval-review small{color:var(--muted);font-size:12px;line-height:1.45;overflow-wrap:anywhere}
.hours-approval-review>strong{white-space:nowrap;display:flex;align-items:center;gap:3px;font-size:18px}
.hours-approval-review:focus-visible{outline:2px solid #55b5ee;outline-offset:2px;border-radius:6px}
.hours-approval-notes{font-size:12px;color:var(--muted);margin:5px 3px 9px}
.hours-approval-actions{display:flex;justify-content:flex-end;border-top:1px solid var(--line);padding:11px 2px 1px;margin-top:9px}
.hours-approval-actions .button{min-height:46px}
@media(max-width:490px){.hours-awaiting{padding:12px}.hours-awaiting-arrow{font-size:11px}.hours-approval-actions .button{width:100%}}

/* v10.9 accessibility: readable status figures on light dashboard. */
html[data-cc-theme="light"] .gauge-card.gauge-status-danger .gauge-center strong{color:#a72d2c}
html[data-cc-theme="light"] .gauge-card.gauge-status-positive .gauge-center strong{color:#167347}
