/* SLT identity and the yellow / blue dashboard palette. */
:root {
  --text-scale: 1; --app-font: Segoe UI,system-ui,sans-serif;
  color-scheme: light;
  --bg: #f1ece3; --surface: #fff; --surface-soft: #f6f5f2;
  --ink: #26333e; --muted: #66747e; --line: #dedfdc;
  --primary: #21648b; --gold: #f0d565; --nav: #21648b; --blue: #21648b;
  --sidebar: #fbfaf6; --sidebar-text: #465660; --sidebar-hover: #eeede5;
  --accent-wash: #e7f1f7; --yellow-wash: #fff7da;
  --chart-yellow: #edcf58; --chart-blue: #79b7db; --chart-blue-deep: #26668c; --chart-pale: #bfdded;
  --good-bg: #e9f4ec; --good-ink: #246744; --bad-bg: #fcecec; --bad-ink: #a33c3c;
  --shadow: 0 2px 8px #26333e06;
}

body { font-family: var(--app-font); font-size: calc(13px * var(--text-scale)); }
input,select,textarea,button { font-family: var(--app-font); }
.appearance-toggle { background: var(--surface-soft); color: var(--ink); border: 1px solid var(--line); padding: 7px 10px; min-height: 36px; }
.appearance-preview { margin-top: 28px; padding: 24px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-soft); }
.appearance-preview .actions { justify-content: flex-start; flex-wrap: wrap; }
.worker-photo-section { display: flex; align-items: center; gap: 24px; margin-bottom: 28px; }
.worker-photo-preview { width: 112px; height: 112px; flex: none; border-radius: 12px; background: var(--surface-soft); border: 1px solid var(--line); display: grid; place-items: center; color: var(--muted); overflow: hidden; }
.worker-photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.worker-file-list { display: flex; gap: 12px; flex-wrap: wrap; margin: 16px 0; overflow-wrap: anywhere; }
.worker-file-list a { color: var(--primary); }
:root:not([data-text-size=standard]) :is(table,input,select,textarea,nav button,.sunlight-score-title,.sunlight-score small,.sunlight-score-detail,.reference-description,label,.subtle) { font-size: calc(13px * var(--text-scale)); }
:root:not([data-text-size=standard]) .sunlight-module-heading h2 { font-size: calc(14px * var(--text-scale)); }
@media(max-width:480px) { .worker-photo-section { align-items: flex-start; gap: 14px; } .worker-photo-preview { width: 80px; height: 80px; } .worker-photo-section>div:last-child { min-width: 0; } .worker-photo-section input { max-width: 100%; } }
:root[data-theme=dark] {
  color-scheme: dark;
  --bg: #292929; --surface: #363636; --surface-soft: #414141;
  --ink: #f2f2f2; --muted: #bcbcbc; --line: #525252;
  --primary: #d0d0d0; --nav: #d0d0d0; --blue: #d0d0d0; --gold: #c5c5c5; --navy: #343434;
  --sidebar: #625e45; --sidebar-text: #f3f0e5; --sidebar-hover: #726d51;
  --accent-wash: #484848; --yellow-wash: #444444;
  --chart-yellow: #dedede; --chart-blue: #adadad; --chart-blue-deep: #808080; --chart-pale: #606060;
  --good-bg: #203a2e; --good-ink: #9cdbb4; --bad-bg: #472b30; --bad-ink: #ffb6bb;
  --shadow: 0 2px 8px #0002;
  --summary-even: #4b4b4b; --summary-icon: #565656;
}
:root[data-theme=black] {
  color-scheme: dark;
  --bg: #0d0d0d; --surface: #181818; --surface-soft: #242424;
  --ink: #f5f5f5; --muted: #b5b5b5; --line: #393939;
  --primary: #efefef; --nav: #efefef; --blue: #efefef; --gold: #dfdfdf; --navy: #181818;
  --accent-wash: #303030; --yellow-wash: #303030;
  --chart-yellow: #f2f2f2; --chart-blue: #bdbdbd; --chart-blue-deep: #8a8a8a; --chart-pale: #585858;
  --good-bg: #1b3024; --good-ink: #a9dfb8; --bad-bg: #382024; --bad-ink: #ffc1c7;
  --shadow: 0 2px 8px #0004; --summary-even: #2e2e2e; --summary-icon: #3b3b3b;
}
:root[data-theme=white] {
  --bg: #fff; --surface: #fff; --surface-soft: #f3f3f3;
  --ink: #171717; --muted: #666; --line: #dedede;
  --primary: #202020; --nav: #202020; --blue: #202020; --gold: #dedede;
  --accent-wash: #ededed; --yellow-wash: #f1f1f1;
  --chart-yellow: #ececec; --chart-blue: #c7c7c7; --chart-blue-deep: #505050; --chart-pale: #e3e3e3;
  --shadow: 0 1px 5px #0000000a;
}
:root[data-theme=blue] {
  --bg: #e6eef6; --surface: #fcfdff; --surface-soft: #dbe7f2;
  --ink: #23394b; --muted: #526b81; --line: #c4d5e4;
  --primary: #326e9e; --nav: #326e9e; --blue: #326e9e; --gold: #b8d4ed;
  --accent-wash: #d5e7f6; --yellow-wash: #e5edf6;
  --chart-yellow: #bfdcf1; --chart-blue: #74a6ce; --chart-blue-deep: #326e9e; --chart-pale: #d2e6f4;
}
:root[data-theme=green] {
  --bg: #e5eee5; --surface: #fcfdf9; --surface-soft: #dce8d9;
  --ink: #293f30; --muted: #5c735f; --line: #c6d7c3;
  --primary: #446a4c; --nav: #446a4c; --blue: #446a4c; --gold: #c5d7ae;
  --accent-wash: #d8e8d1; --yellow-wash: #e9efdd;
  --chart-yellow: #c3d9ae; --chart-blue: #86b29b; --chart-blue-deep: #446a4c; --chart-pale: #dbe9cb;
}
body { background: var(--bg); color: var(--ink); }
aside { --sidebar: #164b68; --sidebar-text: #eff8ff; --sidebar-hover: #225f81; --sidebar-active: #2b7faa; --sidebar-active-text: #fff; --sidebar-accent: #88d5ff; --muted: #c5ddec; --line: #2c6b8d; background: var(--sidebar); color: var(--sidebar-text); border-color: var(--line); }
aside .brand { background: var(--sidebar); color: var(--sidebar-text); border-color: var(--line); height: 100px; padding: 16px 20px; gap: 12px; font-size: 15px; }
aside .brand small { display: block; color: var(--muted); font-size: 10px; letter-spacing: 1.6px; margin-top: 7px; }
.slt-logo { display: block; width: 64px; height: 64px; object-fit: contain; flex: none; mix-blend-mode: multiply; }
aside .slt-logo { filter: invert(1); mix-blend-mode: screen; }
:is([data-theme=dark],[data-theme=black]) .slt-logo { filter: invert(1); mix-blend-mode: screen; }
:is([data-theme=dark],[data-theme=blue],[data-theme=green],[data-theme=black],[data-theme=white]) aside .slt-logo { filter: invert(1); mix-blend-mode: screen; }
.reference-nav-label { color: var(--muted); }
#nav .reference-nav-section button { color: var(--sidebar-text); }
#nav .reference-nav-section button:hover { color: var(--sidebar-text); background: var(--sidebar-hover); }
#nav .reference-nav-section button.active, #nav .reference-nav-section button.active:hover { background: var(--sidebar-active); color: var(--sidebar-active-text); box-shadow: inset 3px 0 var(--sidebar-accent); }
.reference-nav-footer { border-color: var(--line); }
.reference-topbar { background: var(--surface); border-color: var(--line); }
.reference-search { background: var(--surface-soft); color: var(--muted); }
.reference-search input { color: var(--ink); }
.reference-topbar-actions { gap: 14px; }
.reference-avatar { background: var(--accent-wash); color: var(--primary); }
.reference-icon-button { color: var(--muted); }
.reference-quick { background: var(--primary); color: var(--surface); }
.theme-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 7px 10px; min-height: 34px; background: var(--surface-soft); color: var(--ink); border: 1px solid var(--line); font-size: 11px; white-space: nowrap; }
.theme-toggle svg { width: 16px; height: 16px; flex: none; }
.theme-toggle:focus-visible,button:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.theme-picker { display: block; position: relative; margin: 0; flex: none; }
.theme-picker::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--primary); position: absolute; top: 50%; left: 11px; transform: translateY(-50%); pointer-events: none; }
.theme-picker select { width: 144px; min-height: 36px; padding: 7px 22px 7px 27px; font-size: 11px; background: var(--surface-soft); color: var(--ink); border-color: var(--line); }
.login>.theme-picker { margin: 0 0 10px auto; width: max-content; }
.login { position: relative; background: var(--surface); color: var(--ink); border-color: var(--line); box-shadow: var(--shadow); }
.login .brand { align-items: center; color: var(--ink); gap: 16px; margin-top: 12px; }
.login .brand small { color: var(--muted); }
.login .slt-logo { width: 84px; height: 84px; }
.login>.theme-toggle { margin: 0 0 10px auto; display: flex; width: max-content; }
.panel,.metric,.reference-metric,.reference-table,.reference-report-card,dialog,.card,.item-row { background: var(--surface); color: var(--ink); border-color: var(--line); box-shadow: var(--shadow); }
input,select,textarea,button.secondary,.secondary { background: var(--surface); color: var(--ink); border-color: var(--line); }
input::placeholder,textarea::placeholder { color: var(--muted); opacity: 1; }
input:focus,select:focus,textarea:focus { outline-color: var(--chart-blue); border-color: var(--primary); }
input[readonly],input:disabled,select:disabled { background: var(--surface-soft); }
input[type=checkbox],input[type=radio] { accent-color: var(--primary); }
label, .detail-meta dd { color: var(--ink); }
.muted,.subtle,.help,.detail-meta dt,.table-note,.pager,.metric label,.metric small { color: var(--muted); }
.gold,.primary,.success,button.primary { background: var(--gold); color: #27323a; border-color: var(--gold); }
.gold:hover,.primary:hover,.success:hover { background: var(--gold); border-color: var(--gold); filter: brightness(.96); }
button.link,.link,.back,.order-number { color: var(--primary); }
.reference-tabs button.active { color: var(--primary); border-color: var(--primary); }
.reference-report-side button { color: var(--muted); }
.reference-report-side button.active { background: var(--accent-wash); color: var(--primary); }
.reference-report-card button { color: var(--ink); }
.reference-report-card .favorite { color: var(--primary); }
.reference-advanced button { background: var(--surface); color: var(--ink); border-color: var(--line); }
thead th, th { background: var(--surface-soft); color: var(--muted); border-color: var(--line); }
tbody td,th,td,.reference-transaction { border-color: var(--line); }
tbody tr:hover { background: var(--surface-soft); }
.reference-quantity,.notice,.badge.approved,.badge.posted,.badge.paid,.badge.present,.badge.active { background: var(--good-bg); color: var(--good-ink); }
.reference-quantity.negative,.notice.error,.badge.rejected,.badge.cancelled,.badge.absent { background: var(--bad-bg); color: var(--bad-ink); }
.badge { background: var(--surface-soft); color: var(--muted); }
.badge.draft,.badge.pending,.badge.urgent,.badge.qc { background: var(--yellow-wash); color: var(--ink); }
.help,.summary-strip,.notification-text { background: var(--surface-soft); }
.reference-test { background: var(--yellow-wash); color: var(--ink); border-color: var(--gold); }
.reference-metric-icon,.reference-metric:nth-child(2) .reference-metric-icon,.reference-metric:nth-child(3) .reference-metric-icon,.reference-metric:nth-child(4) .reference-metric-icon { background: var(--accent-wash); color: var(--primary); }
.stage-card { background: var(--surface); color: var(--ink); border-color: var(--line); }
.stage-card.active { border-color: var(--gold); }
/* The saved customer form has its own scoped styles. */
.customer-reference .card,.customer-reference .card-body,.customer-reference .address-box,.customer-reference .upload { background: var(--surface); color: var(--ink); border-color: var(--line); }
.customer-reference .card-head,.customer-reference .tabs,.customer-reference .idbox,.customer-reference .info { background: var(--surface-soft); color: var(--ink); border-color: var(--line); }
.customer-reference input,.customer-reference select,.customer-reference textarea,.customer-reference label,.customer-reference .radio label { color: var(--ink); background: var(--surface); border-color: var(--line); }
.customer-reference .tab-btn { background: var(--surface); color: var(--muted); }
.customer-reference .tab-btn.active { background: var(--accent-wash); color: var(--primary); border-color: var(--primary); }
.customer-reference .small,.customer-reference .upload-list { color: var(--muted); }
.customer-reference .primary { background: var(--gold); color: #27323a; border-color: var(--gold); }
.customer-reference .link-btn { color: var(--primary); }
.customer-reference .tag { background: var(--accent-wash); color: var(--ink); }
.customer-actions { background: var(--surface); color: var(--ink); border-color: var(--line); }
.sunlight-intro { margin: -8px 0 24px; font-size: 13px; }
.sunlight-summary { gap: 14px; margin-bottom: 18px; }
.sunlight-summary .reference-metric { border-radius: 4px; box-shadow: none; min-height: 88px; border: 0; background: var(--chart-yellow); color: #27323a; }
.sunlight-summary .reference-metric:nth-child(even) { background: var(--chart-blue); }
.sunlight-summary .reference-metric small { color: #27323a; font-weight: 600; }
.sunlight-summary .reference-metric-icon { background: #ffffff3d; color: #27323a; }
.sunlight-summary .reference-metric strong { font-weight: 700; }
:is([data-theme=dark],[data-theme=black]) .sunlight-summary .reference-metric { background: var(--surface-soft); color: var(--ink); }
:is([data-theme=dark],[data-theme=black]) .sunlight-summary .reference-metric:nth-child(even) { background: var(--summary-even,var(--surface-soft)); }
:is([data-theme=dark],[data-theme=black]) .sunlight-summary .reference-metric small { color: var(--ink); }
:is([data-theme=dark],[data-theme=black]) .sunlight-summary .reference-metric .reference-metric-icon { background: var(--summary-icon); color: #dedede; }
[data-theme=white] .sunlight-summary .reference-metric,[data-theme=white] .sunlight-summary .reference-metric small { color: #202020; }
.sunlight-chart-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)) 1.16fr; gap: 14px; margin-bottom: 18px; }
.sunlight-chart { margin: 0; padding: 22px 18px 16px; border-radius: 4px; border: 0; }
.sunlight-chart h2 { text-align: center; font-size: 13px; font-weight: 650; margin: 0 0 16px; }
.sunlight-ring { max-width: 160px; margin: 0 auto 12px; }
.sunlight-ring svg { display: block; width: 100%; }
.sunlight-ring-total { fill: var(--ink); font-size: 20px; font-weight: 600; }
.sunlight-ring-label { fill: var(--muted); font-size: 9px; }
.sunlight-legend { padding: 0; margin: 0; list-style: none; display: grid; gap: 9px; font-size: 11px; }
.sunlight-legend li { display: flex; align-items: center; gap: 7px; }
.sunlight-legend strong { margin-left: auto; font-size: 11px; font-weight: 600; }
.sunlight-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.sunlight-caption { color: var(--muted); font-size: 10px; line-height: 1.6; margin: 15px 0 0; }
.sunlight-category-chart .sunlight-caption { margin: -8px 0 22px; text-align: center; }
.sunlight-category { margin: 0 0 21px; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 7px; align-items: center; font-size: 11px; }
.sunlight-category>span { overflow-wrap: anywhere; }
.sunlight-category strong { font-size: 10px; font-weight: 500; }
.sunlight-bar { grid-column: 1/-1; grid-row: 2; background: var(--surface-soft); height: 13px; }
.sunlight-bar i { height: 100%; display: block; background: var(--chart-blue-deep); }
.sunlight-bottom-grid { display: grid; grid-template-columns: 1.7fr 1fr; gap: 14px; }
.sunlight-bottom-grid .panel { border: 0; border-radius: 4px; padding: 22px; }
.sunlight-line { display: block; width: 100%; }
.sunlight-gridline { stroke: var(--line); stroke-width: .7; }
.sunlight-axis { fill: var(--muted); font-size: 10px; }
.sunlight-chart-empty { min-height: 160px; display: grid; place-items: center; text-align: center; color: var(--muted); line-height: 1.8; font-size: 12px; padding: 20px 10px; }
.sunlight-transactions .reference-transaction { padding: 12px 0; }
.sunlight-transactions .reference-transaction:last-child { border: 0; }
@media(max-width:1200px) { .sunlight-chart-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media(max-width:760px) { aside .brand { height: 82px; padding: 10px 16px; } .slt-logo { width: 54px; height: 54px; } .reference-topbar { gap: 8px; } .reference-topbar-actions { gap: 8px; } .reference-search { flex: 1; width: auto; min-width: 0; padding: 8px 10px; } .reference-search input { min-width: 0; width: 100%; } .theme-toggle span { display: none; } .theme-toggle { padding: 7px; } .theme-picker select { width: 128px; padding-left: 22px; font-size: 10px; } .theme-picker::before { left: 9px; width: 6px; height: 6px; } .sunlight-bottom-grid { grid-template-columns: 1fr; } .sunlight-chart-grid { gap: 12px; } .sunlight-chart { padding: 18px 12px 14px; } }
@media(max-width:480px) { .sunlight-summary { gap: 12px; } .sunlight-summary .reference-metric { padding: 14px 10px; gap: 8px; } .sunlight-summary .reference-metric strong { font-size: 16px; } .sunlight-summary .reference-metric-icon { width: 28px; height: 28px; } .sunlight-summary .reference-metric-icon svg { width: 16px; } .sunlight-chart h2 { font-size: 12px; } .sunlight-legend { font-size: 10px; } .sunlight-legend strong { font-size: 10px; } .sunlight-bottom-grid .panel { padding: 18px 12px; } }
/* Keep saved permission summaries and Access actions readable in the existing table. */
.workforce-permission-table table { min-width: 880px; }
.workforce-permission-table .actions button,
.workforce-permission-table strong { white-space: nowrap; }
@media print {
  :root[data-theme] { color-scheme: light; --bg: #fff; --surface: #fff; --surface-soft: #f5f5f5; --ink: #172a40; --muted: #526473; --line: #dce4ed; --primary: #21648b; --accent-wash: #e7f1f7; --good-bg: #e9f4ec; --good-ink: #246744; }
  body { background: #fff; color: #172a40; } .theme-toggle,.theme-picker { display: none!important; } [data-theme=dark] .slt-logo { filter: none; mix-blend-mode: multiply; } .panel { box-shadow: none; }
}

/* Customer type controls the amount of detail requested, without clearing saved values. */
.customer-reference [hidden] { display: none!important; }
.customer-primary .card-head { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.customer-primary .card-head .small { font-weight: 400; }
.customer-reference .customer-primary-fields { display: grid; gap: 18px; max-width: 900px; }
.customer-field { display: grid; grid-template-columns: 170px minmax(0,1fr); gap: 24px; align-items: center; }
.customer-reference .customer-field>label,.customer-field-label { font-size: 13px; font-weight: 500; margin: 0; color: var(--ink); }
.customer-contact-fields { display: grid; grid-template-columns: 110px 1fr 1fr; gap: 10px; min-width: 0; }
.customer-phone-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; min-width: 0; }
.customer-field input,.customer-field select { margin: 0; min-width: 0; }
.customer-more { margin: 0 0 20px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.customer-more>summary { padding: 16px 20px; cursor: pointer; color: var(--primary); font-weight: 600; }
.customer-more>summary .small { margin-left: 16px; font-weight: 400; }
.customer-more[open]>summary { border-bottom: 1px solid var(--line); }
.customer-more>.card { margin: 0; border: 0; border-radius: 0 0 10px 10px; }
.customer-reference .customer-detail-fields { grid-template-columns: repeat(2,minmax(0,1fr)); }
.customer-detail-fields .small { margin: 8px 0 0; }
.customer-reference .upload input { width: 100%; }
.customer-actions { justify-content: flex-start; }
.customer-actions #customerSave { order: -1; min-width: 96px; }
.customer-actions .action-spacer { display: none; }
@media(max-width:760px) { .customer-field { grid-template-columns: 1fr; gap: 8px; } .customer-contact-fields { grid-template-columns: 1fr 1fr; } .customer-contact-fields select { grid-column: 1/-1; } .customer-more>summary .small { display: block; margin: 6px 0 0; } }
@media(max-width:620px) { .customer-reference .customer-detail-fields { grid-template-columns: 1fr; } .customer-phone-fields { grid-template-columns: 1fr; } .customer-reference .address-box .grid { grid-template-columns: 1fr!important; } }

.reference-quick-select { display: flex; align-items: center; gap: 8px; }
.reference-quick-select select { flex: 1; min-width: 0; margin: 0; }
.reference-quick-plus { height: 40px; width: 40px; padding: 0; flex: none; font-size: 23px; background: var(--accent-wash); color: var(--primary); border: 1px solid var(--line); border-radius: 6px; }
.reference-quick-name { margin-top: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-soft); }
.reference-quick-name .actions { margin: 10px 0 0; justify-content: flex-start; }
.reference-quick-name [role=alert] { color: var(--bad-ink); margin: 8px 0 0; }
.reference-quick-status:empty { display: none; }

.customer-reference[data-customer-type=Individual] .customer-phone-fields { grid-template-columns: 1fr; }

/* Linked dashboard scores share the current theme and keep keyboard navigation native. */
.sunlight-dashboard-intro { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 20px; }
.sunlight-dashboard-intro .sunlight-intro { margin: 0; }
.sunlight-dashboard-intro>.subtle { white-space: nowrap; }
.sunlight-highlight-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(150px,1fr)); gap: 14px; margin: 0 0 26px; }
.sunlight-module-groups { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 22px; margin: 0 0 28px; align-items: start; }
.sunlight-module-group { min-width: 0; }
.sunlight-module-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 12px; }
.sunlight-module-heading h2 { margin: 0; font-size: 14px; font-weight: 650; color: var(--ink); }
.sunlight-module-heading>span { font-size: 10px; color: var(--muted); white-space: nowrap; }
.sunlight-module-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.sunlight-score { position: relative; display: flex; align-items: flex-start; gap: 10px; min-width: 0; width: 100%; text-align: left; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 17px 14px; cursor: pointer; transition: border-color .15s,box-shadow .15s; }
.sunlight-score:hover { border-color: var(--primary); box-shadow: 0 3px 12px #00000012; }
.sunlight-score:focus-visible,.sunlight-chart-link:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.sunlight-score-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 7px; background: var(--accent-wash); color: var(--primary); flex: none; }
.sunlight-score-icon svg { width: 18px; height: 18px; }
.sunlight-score-content { display: grid; gap: 7px; min-width: 0; }
.sunlight-score-title { font-size: 11px; font-weight: 600; line-height: 1.45; padding-right: 10px; }
.sunlight-score strong { font-size: 24px; font-weight: 700; line-height: 1.15; overflow-wrap: anywhere; }
.sunlight-score small,.sunlight-score-detail { font-size: 10px; color: var(--muted); line-height: 1.45; font-weight: 400; }
.sunlight-score-detail { opacity: .85; }
.sunlight-score-arrow { position: absolute; top: 14px; right: 12px; color: var(--muted); font-size: 14px; }
.sunlight-highlight { background: var(--chart-yellow); border-color: transparent; color: #27323a; min-height: 100px; }
.sunlight-highlight:nth-child(even) { background: var(--chart-blue); }
.sunlight-highlight .sunlight-score-icon { background: #ffffff40; color: #27323a; }
.sunlight-highlight .sunlight-score-arrow { color: #27323a; }
.sunlight-highlight strong { font-size: 19px; }
:is([data-theme=dark],[data-theme=black],[data-theme=white]) .sunlight-highlight { background: var(--surface-soft); color: var(--ink); }
:is([data-theme=dark],[data-theme=black],[data-theme=white]) .sunlight-highlight:nth-child(even) { background: var(--summary-even,var(--surface-soft)); }
:is([data-theme=dark],[data-theme=black],[data-theme=white]) .sunlight-highlight .sunlight-score-icon { background: var(--summary-icon,var(--accent-wash)); color: var(--ink); }
:is([data-theme=dark],[data-theme=black],[data-theme=white]) .sunlight-highlight .sunlight-score-arrow { color: var(--muted); }
.sunlight-chart-link { display: inline-flex; align-items: center; gap: 7px; border: 0; padding: 0; color: inherit; background: transparent; font: inherit; text-align: inherit; cursor: pointer; }
.sunlight-chart-link>span { font-size: 12px; color: var(--muted); }
.sunlight-chart-link:hover { color: var(--primary); }
.sunlight-dashboard .sunlight-chart-grid:has(>.sunlight-chart:only-child) { grid-template-columns: 1fr; }
.sunlight-dashboard .sunlight-bottom-grid:has(>.panel:only-child) { grid-template-columns: 1fr; }
@media(max-width:1100px) { .sunlight-highlight-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } .sunlight-module-groups { grid-template-columns: 1fr; } .sunlight-module-grid { grid-template-columns: repeat(3,minmax(0,1fr)); } }
@media(max-width:760px) { .sunlight-dashboard-intro { display: block; } .sunlight-dashboard-intro>.subtle { display: block; margin-top: 8px; } .sunlight-module-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media(max-width:480px) { .sunlight-score { padding: 15px 11px; gap: 8px; } .sunlight-score-icon { width: 26px; height: 26px; } .sunlight-score-icon svg { width: 15px; height: 15px; } .sunlight-score strong { font-size: 21px; } .sunlight-highlight strong { font-size: 16px; } .sunlight-score-title { font-size: 10px; } }
@media(max-width:360px) { .sunlight-module-grid,.sunlight-highlight-grid { grid-template-columns: 1fr; } }
@media print { .sunlight-score { break-inside: avoid; box-shadow: none; } .sunlight-score-arrow { display: none; } }

/* Sunlight's ivory, walnut and antique-gold identity, within the existing ERP. */
:root {
  --display-font: Georgia,"Times New Roman",serif;
  --hero-bg: var(--surface-soft); --hero-ink: var(--ink); --hero-accent: var(--primary);
}
:root[data-theme=heritage] {
  color-scheme: light;
  --bg: #f4efe4; --surface: #fffdf8; --surface-soft: #eee8dd;
  --ink: #221d18; --muted: #71685e; --line: #ddd4c6;
  --primary: #805a28; --nav: #805a28; --blue: #805a28; --gold: #c9a15f; --navy: #221d18;
  --accent-wash: #f1e6d2; --yellow-wash: #f8edd7;
  --chart-yellow: #c9a15f; --chart-blue: #83907b; --chart-blue-deep: #6c4c35; --chart-pale: #dac7a6;
  --good-bg: #e7eee2; --good-ink: #3f5a38; --bad-bg: #f5e7e1; --bad-ink: #923c32;
  --shadow: 0 3px 18px #3c2d1605;
  --hero-bg: #221d18; --hero-ink: #f4efe4; --hero-accent: #dfbb81;
}
:root[data-theme=heritage] aside {
  --sidebar: #221d18; --sidebar-text: #f4efe4; --sidebar-hover: #352c23;
  --sidebar-active: #c9a15f; --sidebar-active-text: #221d18; --sidebar-accent: #e7d1ab;
  --muted: #bfb09c; --line: #43382d;
}
body { font-size: calc(14px * var(--text-scale)); -webkit-font-smoothing: antialiased; }
html { background: var(--bg); }
.layout { grid-template-columns: 250px minmax(0,1fr); }
aside { width: 250px; scrollbar-width: thin; scrollbar-color: var(--sidebar-hover) var(--sidebar); }
aside .brand { height: 114px; padding: 22px 19px; font-family: var(--display-font); font-size: 20px; font-weight: 400; }
aside .brand small { font-family: var(--app-font); font-size: 9px; letter-spacing: 2px; }
aside .slt-logo { width: 58px; height: 58px; }
.reference-nav-section { padding: 15px 13px 0; }
.reference-nav-label { font-size: 9px; letter-spacing: 1.7px; font-weight: 500; padding: 8px 11px; }
#nav .reference-nav-section button { padding: 11px 12px; min-height: 43px; border-radius: 5px; font-size: calc(12px * var(--text-scale)); gap: 11px; }
#nav .reference-nav-section button.active { font-weight: 650; }
#nav .reference-nav-section button svg { width: 17px; height: 17px; stroke-width: 1.5; }
.reference-nav-footer { padding-bottom: 20px; }
.layout>main { padding: 0 30px 40px; }
.layout>main:not(:has(.reference-topbar)) { padding-top: 28px; }
.reference-topbar { height: 74px; margin: 0 -30px 27px; padding: 15px 30px; background: var(--surface); gap: 12px; }
.reference-search { background: var(--surface-soft); border: 1px solid var(--line); border-radius: 6px; width: min(450px,50%); padding: 9px 14px; }
.reference-search input { min-height: 24px; font-size: 12px; background: transparent; }
.reference-topbar-actions { gap: 12px; }
.reference-quick { height: 38px; width: 38px; border-radius: 5px; }
:root[data-theme=heritage] .reference-quick { background: var(--gold); color: var(--ink); }
.reference-avatar { height: 36px; width: 36px; font-family: var(--display-font); font-size: 18px; border: 1px solid var(--line); }
.theme-picker select { border-radius: 5px; min-height: 38px; }
main>header { margin-bottom: 26px; align-items: center; }
main>header .eyebrow { display: block; font-size: 9px; letter-spacing: 1.8px; font-weight: 500; margin-bottom: 6px; color: var(--muted); }
main>header h1 { font-family: var(--display-font); font-size: clamp(27px,2.4vw,36px); letter-spacing: -.8px; font-weight: 400; line-height: 1.2; }
main>header .subtle { font-size: 11px; margin-top: 7px; }
.header-actions #refresh { min-height: 36px; }
.panel,.reference-table,.reference-report-card,.card,.metric,.reference-metric { border-radius: 8px; }
.panel { padding: 24px; }
.panel h2,.sunlight-module-heading h2 { font-family: var(--display-font); font-size: 22px; font-weight: 400; letter-spacing: -.4px; }
.sunlight-module-heading { margin-bottom: 14px; }
.sunlight-module-heading>span { text-transform: uppercase; letter-spacing: 1px; font-size: 9px; }
input,select,textarea { min-height: 42px; border-radius: 5px; }
input:focus,select:focus,textarea:focus { outline: 2px solid var(--accent-wash); border-color: var(--primary); outline-offset: 1px; }
button:focus-visible,a:focus-visible,select:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
button.secondary { border-radius: 5px; }
:root[data-theme=heritage] :is(.gold,.primary,.success,button.primary) { color: #221d18; }
.reference-tabs { border-color: var(--line); }
th { font-size: 10px; text-transform: uppercase; letter-spacing: .8px; font-weight: 600; padding-top: 14px; padding-bottom: 14px; }
td { padding-top: 15px; padding-bottom: 15px; }
.badge { border-radius: 4px; font-size: 10px; letter-spacing: .3px; padding: 5px 8px; }
dialog { border: 1px solid var(--line); border-radius: 9px; padding: 28px; background: var(--surface); color: var(--ink); }
dialog::backdrop { background: #221d189e; }
dialog h2 { font-family: var(--display-font); font-size: 27px; font-weight: 400; }
.customer-reference .card-head { background: var(--surface-soft); }
.customer-reference .card-head h2 { font-family: var(--display-font); font-weight: 400; font-size: 23px; }
.customer-reference .primary { color: var(--ink); }
.sunlight-dashboard-intro { margin: 26px 0 18px; }
.sunlight-dashboard-intro .sunlight-intro { font-size: 12px; }
.sunlight-highlight-grid { gap: 16px; margin-bottom: 32px; }
.sunlight-score { padding: 20px 17px; border-radius: 7px; box-shadow: var(--shadow); min-height: 112px; gap: 12px; transition: border-color .15s,transform .15s; }
.sunlight-score:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.sunlight-score-icon { width: 34px; height: 34px; border-radius: 6px; }
.sunlight-score-title { font-size: 11px; font-weight: 500; }
.sunlight-score strong { font-family: var(--display-font); font-weight: 400; font-size: 29px; letter-spacing: -.5px; }
.sunlight-score small { font-size: 10px; }
.sunlight-highlight strong { font-size: 24px; }
:root[data-theme=heritage] .sunlight-highlight { background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-top: 3px solid var(--gold); }
:root[data-theme=heritage] .sunlight-highlight:nth-child(even) { background: var(--surface); border-top-color: var(--chart-blue); }
:root[data-theme=heritage] .sunlight-highlight .sunlight-score-icon { background: var(--accent-wash); color: var(--primary); }
:root[data-theme=heritage] .sunlight-highlight .sunlight-score-arrow { color: var(--muted); }
.sunlight-module-groups { gap: 28px; margin-bottom: 32px; }
.sunlight-module-grid { gap: 13px; }
.sunlight-chart,.sunlight-bottom-grid .panel { border: 1px solid var(--line); border-radius: 8px; }
.sunlight-chart h2 { font-family: var(--display-font); font-size: 18px; font-weight: 400; }
.sunlight-bottom-grid .panel-head h2 { font-size: 21px; }
.sunlight-heritage-hero { position: relative; isolation: isolate; overflow: hidden; display: grid; grid-template-columns: 1fr 250px; gap: 30px; padding: 33px 38px; min-height: 274px; border-radius: 8px; background: var(--hero-bg); color: var(--hero-ink); }
.sunlight-heritage-hero::before { content: ''; position: absolute; inset: 0; z-index: -1; opacity: .12; pointer-events: none; background: repeating-linear-gradient(100deg,transparent 0,transparent 48px,var(--hero-accent) 49px,transparent 50px),repeating-linear-gradient(10deg,transparent 0,transparent 68px,var(--hero-accent) 69px,transparent 70px); mask-image: linear-gradient(to right,transparent,#000); }
.sunlight-heritage-eyebrow { font-family: ui-monospace,SFMono-Regular,Consolas,monospace; letter-spacing: 2.1px; font-size: 9px; font-weight: 400; margin: 0 0 17px; color: var(--hero-accent); }
.sunlight-heritage-copy h2 { font-family: var(--display-font); font-size: clamp(34px,3.6vw,49px); font-weight: 400; letter-spacing: -1.3px; line-height: 1.08; margin: 0 0 14px; }
.sunlight-heritage-copy h2 em { color: var(--hero-accent); font-weight: 400; }
.sunlight-heritage-description { font-size: 12px; margin: 0; line-height: 1.6; opacity: .8; }
.sunlight-heritage-actions { display: flex; gap: 11px; flex-wrap: wrap; margin-top: 22px; }
.sunlight-heritage-actions button { min-height: 39px; padding: 10px 16px; font-size: 10px; letter-spacing: .9px; text-transform: uppercase; border-radius: 4px; font-weight: 600; }
.sunlight-heritage-actions button span { margin-left: 14px; }
.sunlight-heritage-primary { background: var(--hero-accent); color: var(--hero-bg); border: 1px solid var(--hero-accent); }
.sunlight-heritage-secondary { background: transparent; color: var(--hero-ink); border: 1px solid color-mix(in srgb,var(--hero-ink) 35%,transparent); }
.sunlight-heritage-detail { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding-left: 26px; border-left: 1px solid color-mix(in srgb,var(--hero-accent) 25%,transparent); }
.sunlight-heritage-seal { display: grid; place-items: center; height: 72px; width: 72px; border: 1px solid var(--hero-accent); border-radius: 50%; font-family: var(--display-font); font-size: 23px; letter-spacing: 3px; margin-bottom: 16px; color: var(--hero-accent); }
.sunlight-heritage-detail .sunlight-heritage-eyebrow { margin-bottom: 10px; font-size: 8px; letter-spacing: 1.7px; }
.sunlight-heritage-detail strong { font-family: var(--display-font); font-size: 22px; font-weight: 400; }
.sunlight-heritage-detail>span:not(.sunlight-heritage-seal) { font-size: 11px; margin-top: 7px; opacity: .8; overflow-wrap: anywhere; }
.sunlight-heritage-detail small { font-size: 8px; letter-spacing: 1.7px; margin-top: 20px; color: var(--hero-accent); }
.login { max-width: 490px; margin: 7vh auto; padding: 30px 36px 36px; border-radius: 8px; border-top: 3px solid var(--gold); box-shadow: 0 18px 65px #221d1810; }
.login h1 { font-family: var(--display-font); font-weight: 400; font-size: 37px; line-height: 1.17; letter-spacing: -1px; margin-top: 24px; }
.login .brand { font-family: var(--display-font); font-size: 20px; font-weight: 400; }
.login .brand small { font-family: var(--app-font); font-size: 9px; letter-spacing: 1.5px; }
.login .muted { font-size: 13px; }
.login button.gold { min-height: 44px; letter-spacing: 1px; text-transform: uppercase; font-size: 11px; }
.login #employeeGoogle h3 { font-family: var(--display-font); font-weight: 400; font-size: 19px; }
.sunlight-nav-toggle,.sunlight-nav-close,.sunlight-nav-shade { display: none; }
@media(max-width:1100px) {
  .layout>main { padding-left: 24px; padding-right: 24px; }
  .reference-topbar { padding-left: 24px; padding-right: 24px; margin-left: -24px; margin-right: -24px; }
  .reference-search { width: 40%; }
  .sunlight-heritage-hero { padding: 29px; grid-template-columns: 1fr 180px; gap: 22px; }
  .sunlight-heritage-detail { padding-left: 20px; }
}
@media(max-width:760px) {
  .layout { display: block; }
  aside { position: fixed; top: 0; bottom: 0; left: 0; width: 270px; max-height: none; height: 100dvh; z-index: 61; transform: translateX(-100%); visibility: hidden; transition: transform .2s,visibility .2s; padding: 0; }
  aside .brand { height: 108px; padding: 22px 15px; font-size: 20px; }
  #nav { display: block; overflow: visible; padding: 0; }
  .reference-nav-section { min-width: 0; padding: 15px 13px 0; }
  .reference-nav-footer { margin-top: 17px; padding-bottom: 24px; }
  .sunlight-nav-open { overflow: hidden; }
  .sunlight-nav-open #erpSidebar { transform: translateX(0); visibility: visible; }
  .sunlight-nav-shade { position: fixed; inset: 0; z-index: 60; width: 100%; height: 100dvh; background: #221d188f; border: 0; border-radius: 0; padding: 0; }
  .sunlight-nav-open .sunlight-nav-shade { display: block; }
  .sunlight-nav-toggle { display: grid; place-items: center; flex: none; width: 38px; height: 38px; padding: 8px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 5px; }
  .sunlight-nav-toggle svg { width: 20px; height: 20px; }
  .sunlight-nav-close { display: block; position: absolute; right: 10px; top: 7px; width: 28px; min-height: 28px; height: 28px; padding: 0; background: transparent; color: var(--sidebar-text); font-size: 24px; }
  .layout>main { padding: 0 18px 30px; }
  .reference-topbar { height: auto; min-height: 68px; padding: 12px 18px; margin: 0 -18px 24px; gap: 9px; }
  .reference-search { flex: 1; min-width: 0; width: auto; padding: 8px 10px; }
  .reference-search input { width: 100%; min-width: 0; }
  .reference-topbar-actions { gap: 8px; }
  .reference-topbar .theme-picker { display: none; }
  .reference-avatar { height: 33px; width: 33px; }
  main>header h1 { font-size: 29px; }
  .sunlight-heritage-hero { padding: 28px; grid-template-columns: 1fr 150px; gap: 20px; min-height: 250px; }
  .sunlight-heritage-copy h2 { font-size: 38px; }
  .sunlight-heritage-detail { padding-left: 16px; }
  .sunlight-heritage-detail strong { font-size: 19px; }
  .sunlight-heritage-eyebrow { font-size: 8px; letter-spacing: 1.6px; }
  .sunlight-module-groups { gap: 25px; }
  .sunlight-module-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .sunlight-score { min-height: 111px; padding: 17px 13px; gap: 9px; }
  .panel { padding: 20px; }
}
@media(max-width:480px) {
  .reference-topbar-actions .reference-icon-button { display: none; }
  .reference-topbar-actions { gap: 7px; }
  .reference-search { padding: 8px; }
  .reference-search input { font-size: 11px; }
  .reference-search svg { display: none; }
  .appearance-toggle { padding: 6px 8px; }
  .sunlight-heritage-hero { display: block; padding: 27px 24px; }
  .sunlight-heritage-copy h2 { font-size: 38px; }
  .sunlight-heritage-detail { display: none; }
  .sunlight-heritage-description { font-size: 11px; }
  .sunlight-heritage-actions { margin-top: 20px; }
  .sunlight-heritage-actions button { padding: 9px 13px; }
  .sunlight-highlight-grid { gap: 12px; }
  .sunlight-score-icon { width: 27px; height: 27px; }
  .sunlight-score strong { font-size: 25px; }
  .sunlight-highlight strong { font-size: 21px; }
  .sunlight-score-title { font-size: 10px; }
  .sunlight-module-heading h2 { font-size: 21px; }
  .sunlight-dashboard-intro>.subtle { display: none; }
  .login { margin: 24px 15px; padding: 24px; }
  .login h1 { font-size: 33px; }
  .login .brand { font-size: 18px; gap: 12px; }
  .login .slt-logo { width: 72px; height: 72px; }
  dialog { padding: 22px; }
}
@media(prefers-reduced-motion:reduce) {
  aside,.sunlight-score { transition: none; }
  .sunlight-score:hover { transform: none; }
}
@media print {
  .sunlight-heritage-hero,.sunlight-nav-toggle,.sunlight-nav-close,.sunlight-nav-shade { display: none!important; }
  .layout>main { padding: 0; }
  :root[data-theme=heritage] { --ink: #221d18; --primary: #805a28; --gold: #c9a15f; }
}

/* Company identity is supplied by the shared company profile. */
:root { background: var(--bg); }
.theme-picker select { width: 172px; }
aside .brand { height: auto; min-height: 118px; align-items: center; }
aside .brand>div { min-width: 0; white-space: normal; }
aside .brand [data-company-name] { display: block; font-family: var(--app-font); font-size: 13px; font-weight: 600; line-height: 1.45; letter-spacing: .8px; }
aside .brand small { font-size: 8px; line-height: 1.5; letter-spacing: .7px; }
.login .brand [data-company-name] { display: block; font-size: 20px; line-height: 1.25; }
.login-access-label { color: var(--primary); font-size: 11px; letter-spacing: 1px; text-transform: uppercase; margin: -7px 0 20px; }
.company-footer { margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; line-height: 1.5; }
.company-report-head { display: none; }
.receipt-head h1 { font-size: 23px; line-height: 1.2; }
.receipt-head p { font-size: 11px; overflow-wrap: anywhere; }
.document-heading { font-size: 18px; letter-spacing: 1px; margin: 24px 0; }
.sunlight-highlight { display: grid; grid-template-columns: 32px minmax(0,1fr); align-content: start; }
.sunlight-highlight .sunlight-score-content { display: contents; }
.sunlight-highlight .sunlight-score-title { align-self: center; }
.sunlight-highlight strong,.sunlight-highlight small,.sunlight-highlight .sunlight-score-detail { grid-column: 1 / -1; }
.sunlight-highlight .sunlight-score-arrow { position: absolute; right: 12px; top: 14px; }
@media(max-width:480px) { .login .brand [data-company-name] { font-size: 16px; } }
@media print {
  .company-report-head.company-report-visible { display: block; border-bottom: 1px solid #bbb; padding-bottom: 15px; margin-bottom: 20px; }
  .company-report-head h1 { font-size: 22px; margin: 0 0 8px; }
  .company-report-head h2 { font-size: 18px; margin: 16px 0 0; }
  .company-report-head p { font-size: 10px; margin: 4px 0; }
  .company-footer { color: #555; font-size: 9px; }
  .receipt-head h1 { color: #111; }
}
