/* BeastMode workspace. Shared product tokens and component layout.
   Stageshow craft: hierarchy, aligned reading edges, restrained surfaces.
   Functional controls and record content remain part of the application. */
:root {
  --ink: #222724;
  --muted: #666d68;
  --border: #e0e4e0;
  --accent: #26735b;
  --accent-dark: #1e5c49;
  --accent-soft: #edf5f0;
  --cream: #edf5f0;
  --surface: #fff;
  --danger: #a53632;
  --radius: 9px;
  --canvas: #fafbf9;
  --well: #f5f6f3;
  --field-border: #cbd2cc;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--canvas);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}
a, .linkbutton { color: var(--accent-dark); }
a:hover, .linkbutton:hover { color: #154433; }
h1 { font-size: 1.75rem; line-height: 1.25; letter-spacing: -.035em; font-weight: 650; }
h2 { font-size: 1rem; letter-spacing: -.015em; }
h3 { font-size: .9375rem; }
h4 { margin: 0; font-size: 1rem; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Workspace shell */
.shell { grid-template-columns: 224px minmax(0, 1fr); }
.shell > aside { padding: 26px 16px 18px; background: #f2f4f0; color: var(--ink); border-right: 1px solid var(--border); }
.brand { gap: 10px; padding: 0 8px; font-size: 1.125rem; color: var(--ink); letter-spacing: -.035em; }
.brand:hover { color: var(--ink); }
.brand-name { font-size: 1.125rem; }
.brand small, .brand-subtitle { font-size: .75rem; font-weight: 500; letter-spacing: .01em; color: var(--muted); }
.brandmark { width: 32px; height: 34px; flex-basis: 32px; color: var(--accent-dark); background: transparent; border: 0; border-radius: 0; }
.brandmark svg { width: 30px; height: 30px; }
.shell > aside nav { margin-top: 36px; gap: 0; }
.nav-group { gap: 3px; }
.nav-group + .nav-group { margin-top: 26px; padding-top: 0; border: 0; }
.nav-heading { font-size: .6875rem; font-weight: 600; color: #777e77; letter-spacing: .05em; padding: 0 12px 8px; }
.shell > aside nav a { min-height: 40px; padding: 9px 12px; gap: 11px; color: #626963; font-size: .875rem; font-weight: 500; border: 1px solid transparent; border-radius: 6px; }
.shell > aside nav a:hover { background: #e8ece6; color: var(--ink); }
.shell > aside nav a.active, .shell > aside nav a[aria-current="page"] { color: var(--ink); background: #fff; border-color: #dce1d9; box-shadow: 0 1px 2px #20282005; font-weight: 600; }
.nav-icon, .nav-icon svg, svg.nav-icon { width: 18px; height: 18px; flex-basis: 18px; stroke-width: 1.7; }
.account { border-color: var(--border); padding-top: 16px; gap: 9px; font-size: .8125rem; }
.account #who { max-width: 110px; overflow-wrap: anywhere; }
.avatar { background: #e1e8dd; color: #40553f; width: 30px; height: 30px; flex-basis: 30px; }
.signout { color: var(--muted); }
.signout:hover { background: #e3e8df; }
#nav-toggle { display: none; }
.topbar { min-height: 56px; padding: 0 36px; background: var(--canvas); border-color: var(--border); }
.breadcrumb, .breadcrumb a { color: var(--muted); font-size: .8125rem; }
#processor-status { font-size: .75rem; gap: 7px; }
#processor-status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #8a9189; }
#processor-status.online::before { background: var(--accent); }
.work { max-width: 1370px; padding: 32px 36px 64px; }
.pagehead { align-items: center; margin-bottom: 28px; gap: 20px; }
.pagehead .page-kicker { display: none; }
.pagehead p { font-size: .875rem; margin-top: 6px; max-width: 66ch; line-height: 1.5; }
.page-actions { gap: 8px; }

/* Actions and fields */
.primary, .secondary, .smallbtn { font-size: .8125rem; font-weight: 600; min-height: 40px; border-radius: 6px; padding: 9px 14px; }
.primary { background: var(--accent); border-color: var(--accent); box-shadow: 0 1px 2px #1b413111; }
.primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.secondary, .smallbtn { border-color: var(--field-border); color: #3d4740; background: #fff; }
.secondary:hover, .smallbtn:hover { background: var(--well); border-color: #a9b4aa; }
.smallbtn { min-height: 34px; padding: 6px 11px; }
.linkbutton { font-size: .8125rem; padding: 6px 0; min-height: 34px; }
.icon { color: var(--muted); background: var(--well); border-radius: 6px; }
.icon:hover { background: #e9ece6; }
label { color: #3f4942; font-size: .8125rem; font-weight: 550; margin-bottom: 18px; }
input, select, textarea, .ui-select-trigger, input.ui-typed-input { min-height: 44px; border-color: var(--field-border); border-radius: 6px; font-size: .875rem; padding: 10px 12px; color: var(--ink); }
input::placeholder, textarea::placeholder, .ui-placeholder .ui-select-value { color: #7b837c; }
input:read-only { color: #687169; background: var(--well); }
.ui-select-trigger { gap: 10px; }
.ui-select-value { white-space: normal; overflow: visible; text-overflow: clip; }
.ui-time-column h4, .ui-weekdays span, .ui-calendar-range, .ui-picker-hint { color: var(--muted); }
.ui-time-list, .ui-picker-footer { border-color: var(--border); }
.ui-time-choice[aria-selected="true"], .ui-option[aria-selected="true"].ui-active-option { background: #e9eee6; color: var(--ink); }
.ui-time-choice:hover, .ui-active-option, .ui-icon-button:hover, .ui-heading-button:hover,
.ui-panel-button:hover, .ui-calendar-choice:hover, .ui-day:hover { background: #f0f4ed; }
.ui-day[aria-selected="true"]:hover { background: var(--accent-dark); }
.ui-popover button:focus-visible, .ui-popover input:focus-visible { outline-color: var(--accent); }
.ui-panel-button { color: var(--accent-dark); }
.ui-select-trigger:hover, input.ui-typed-input:hover { border-color: #a5b4a8; }
input.ui-typed-input { padding-right: 42px; }
.ui-picker-toggle { color: #6f7b72; width: 36px; height: 36px; top: 4px; right: 4px; }
.ui-picker-toggle:hover { background: var(--well); }
.ui-popover { border-color: #d6ded5; border-radius: 8px; box-shadow: 0 10px 30px #1828201c, 0 2px 6px #1828200d; color: var(--ink); }
.ui-option, .ui-calendar-day, .ui-time-option { font-size: .875rem; border-radius: 4px; }
.ui-option[aria-selected="true"] { background: #eef2eb; color: var(--ink); border-left: 0; box-shadow: none; }
.ui-option:hover { background: #f4f6f1; }
.ui-option-group { color: var(--muted); font-size: .6875rem; letter-spacing: .03em; }
.ui-popover input[type="search"] { background: #fff; }
.ui-time-option[aria-selected="true"], .ui-calendar-day[aria-selected="true"] { background: var(--accent); color: #fff; }
.field-hint, .hint { font-size: .75rem; line-height: 1.6; color: var(--muted); }
.callout, .workerstatus { background: #f2f5ef; color: #52604e; border-color: #dfe6d9; font-size: .8125rem; padding: 12px 14px; border-radius: 6px; }
.callout strong { color: #40503e; }
.callout.warning { background: #fff7e8; color: #775724; }
#notice, #formerror, .section-error { font-size: .8125rem; border-radius: 6px; }
.status { padding: 3px 7px; gap: 6px; font-size: .75rem; font-weight: 500; border-radius: 4px; color: #616b65; background: #eff1ee; }
.ready { color: #2f6950; background: #edf5ef; }
.attention { color: #875f21; background: #fbf2df; }
.busy { color: #456a83; background: #edf3f8; }
.ready:before, .attention:before, .busy:before { width: 5px; height: 5px; }

/* Collections share one reading edge. */
.panel, .settings-card { border-color: var(--border); box-shadow: 0 1px 2px #20282003; }
.panelhead, .section-head { padding: 18px 22px; gap: 16px; border-color: var(--border); }
.panelhead a { font-size: .8125rem; text-decoration: none; }
.panelhead a:hover { text-decoration: underline; }
.panelbody, .section-body { padding: 22px; }
.settings-card .section-head { background: #fff; }
.panelhead p, .section-head p { font-size: .8125rem; line-height: 1.55; }
table { font-size: .8125rem; }
th, td { padding: 15px 22px; border-color: #edf0eb; }
th { color: #70796f; font-size: .75rem; font-weight: 500; letter-spacing: 0; background: #f8f9f6; white-space: nowrap; }
td { line-height: 1.5; }
td small { font-size: .75rem; margin-top: 4px; color: var(--muted); }
tbody tr:hover { background: #fbfcfa; }
td .more { gap: 8px 14px; }
td .more > a { font-size: .8125rem; white-space: nowrap; }
.client-name { font-size: .875rem; font-weight: 600; }
.table-footer, .history-options { padding: 14px 22px; border-top: 1px solid var(--border); color: var(--muted); background: #fff; font-size: .75rem; border-radius: 0 0 9px 9px; }
.history-options label { font-size: .75rem; }
.client-toolbar, .filters { padding: 18px 22px; gap: 14px; background: #fff; }
.client-toolbar > label:first-child, .filters > .search-field { flex: 1 1 300px; max-width: 400px; min-width: 0; }
.client-toolbar > label:not(:first-child), .filters > label:not(.search-field) { flex: 0 1 210px; min-width: 0; }
.client-toolbar input[type="search"] { max-width: none; }
.client-toolbar select, .filters select { width: 100%; min-width: 0; }
.client-toolbar label, .filters label { font-size: .75rem; }
.filter-fields { display: flex; gap: 14px; flex: 1 1 380px; min-width: 0; }
.filter-fields > label { flex: 1 1 190px; max-width: 220px; min-width: 0; }
#report-filters-toggle { display: none; }
.processing-note { color: var(--muted); font-size: .75rem; margin: -8px 0 18px; }
.connection-state { color: var(--muted); }
.blank, .empty-state { padding: 28px 22px; font-size: .8125rem; color: var(--muted); }

/* Overview: report first, operational work beside it, quiet totals. */
.stats { gap: 0; padding: 0 0 24px; margin-bottom: 28px; border-bottom: 1px solid var(--border); }
.stat, a.stat { padding: 0 28px; border: 0; border-right: 1px solid var(--border); border-radius: 0; background: transparent; }
.stat:first-child { padding-left: 0; }
.stat:last-child { border-right: 0; }
a.stat:hover { border-color: var(--border); background: transparent; }
a.stat:hover > span { color: var(--accent-dark); text-decoration: underline; text-underline-offset: 3px; }
.stat strong { font-size: 1.75rem; margin: 5px 0 4px; letter-spacing: -.03em; }
.stat > span, .stat small { font-size: .75rem; }
.overview-primary { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(0,1fr); align-items: start; gap: 22px; margin-bottom: 24px; }
.overview-primary .panel { margin: 0; }
.latest-report { padding: 26px 24px; background: #fff; border-color: var(--border); align-items: flex-start; display: block; }
.latest-report-main h3 { font-size: 1.5rem; font-weight: 600; letter-spacing: -.03em; }
.latest-report-main p { font-size: .8125rem; color: var(--muted); margin-top: 8px; }
.latest-report-meta { margin-top: 16px; gap: 8px 16px; font-size: .8125rem; align-items: center; color: var(--muted); }
.latest-report-actions { margin-top: 24px; flex-direction: row; justify-content: flex-start; }
.action-item { padding: 18px 22px; align-items: baseline; gap: 16px; }
.action-item strong { font-size: .875rem; font-weight: 550; }
.action-item p, .action-item small { font-size: .75rem; color: var(--muted); line-height: 1.55; margin-top: 5px; }
.action-item a { font-size: .75rem; flex-shrink: 0; text-decoration: none; }
.action-item a:hover { text-decoration: underline; }
.overview-attention .action-item { flex-direction: column; gap: 9px; }

/* Client settings use an aligned description and form column. */
.client-summary { padding: 0 0 18px; margin: -6px 0 10px; border: 0; border-radius: 0; background: transparent; }
.client-summary dl { gap: 14px 30px; }
.client-summary dl > div { min-width: 0; display: flex; align-items: center; gap: 9px; }
.client-summary dt { margin: 0; font-size: .75rem; }
.client-summary dd { font-size: .75rem; font-weight: 500; }
.workspace-tabs, .section-tabs { border-color: var(--border); margin-bottom: 26px; gap: 24px; }
.workspace-tabs a, .section-tabs a { min-height: 44px; padding: 10px 0; border-bottom-width: 2px; font-size: .8125rem; }
.workspace-tabs a, .section-tabs a { color: var(--muted); }
.workspace-tabs a:hover, .section-tabs a:hover { background: transparent; color: var(--ink); }
.workspace-tabs .active, .section-tabs .active, .workspace-tabs [aria-current="page"], .section-tabs [aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }
.client-section-switcher { display: none; }
.client-settings { background: #fff; border: 1px solid var(--border); border-radius: 9px; gap: 0; }
.client-settings > .settings-card { display: grid; grid-template-columns: minmax(180px, .8fr) minmax(0, 2fr); border: 0; border-radius: 0; box-shadow: none; margin: 0; background: transparent; }
.client-settings > .settings-card + .settings-card { border-top: 1px solid var(--border); }
.client-settings .section-head { border: 0; background: transparent; padding: 26px 24px; }
.client-settings .section-body { padding: 26px 24px 24px 12px; }
.client-settings .section-head p { max-width: 26ch; color: var(--muted); }
.settings-stack { gap: 22px; }
.settings-stack.client-settings { gap: 0; }
.settings-stack > .settings-card > .section-head { padding-bottom: 16px; }
.connection-summary { margin-bottom: 18px; gap: 14px; }
.connection-summary .muted { font-size: .75rem; }
.connection-summary p { font-size: .875rem; }
.connection-tools { margin-bottom: 0; padding-bottom: 0; border: 0; }
.credential-editor { margin-top: 22px; }
.credential-editor > form { margin-top: 18px; }
.connection-options { padding-top: 18px !important; }
.settings-card details summary { color: #4b584e; font-size: .8125rem; }
.form-footer { padding: 16px 22px; margin: 24px -22px -22px; background: #fcfdfb; }
.client-settings .form-footer { margin: 24px 0 0; padding: 16px 0 0; background: transparent; border-radius: 0; }
.save-state { color: #747c74; font-size: .75rem; }
.save-state:empty { display: none; }
.form-grid, .pair { gap: 18px; }
.form-section h3, fieldset.form-section legend { font-size: .875rem; }
.coverage-grid { margin-top: 18px; }
.coverage-grid .coverage-hours { border-color: var(--border); }
.shift-row, .coverage-grid .shift-row { padding: 14px; gap: 12px; border-color: var(--border); background: #f7f9f5; border-radius: 7px; }
/* Keep labels and inputs aligned even when only one field has an error. */
.shift-row, .coverage-grid .shift-row { align-items: start; }
.shift-row > label { display: grid; grid-template-rows: 24px auto; font-size: .75rem; }
.shift-row > label > .ui-control { margin-top: 0; }
.shift-row > button { margin-top: 24px; }
.shift-row button { min-height: 40px; }
.weekday-options label { background: #fff; border-color: var(--border); font-size: .8125rem; padding: 8px 10px; }
.weekday-options label:has(input:checked) { background: #f0f6ee; color: #37553c; border-color: #b8ccb4; }
.coverage-grid .weekday-options label { font-size: .8125rem; }
.check-field { font-size: .8125rem; }
.management-summary strong { font-size: .9375rem; }
.management-summary p { font-size: .75rem; }
.management-card > .section-body { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 18px; }
.management-card .management-editor { margin: 0; border: 0; padding: 0; }
.management-card .management-editor[open] { grid-column: 1 / -1; border-top: 1px solid var(--border); padding-top: 18px; }
.management-card .management-editor > summary { white-space: nowrap; }
.history-details > summary { color: #526252; font-size: .8125rem; padding: 17px 22px; }
.guidance-layout { max-width: 960px; }
.guidance-topics { margin-top: 20px; color: var(--muted); font-size: .8125rem; }
.guidance-topics summary { cursor: pointer; }
.guidance-topics li { margin: 7px 0; }
.team-intro, #content > .team-intro { font-size: .8125rem; margin-bottom: 20px; }

/* New client: two clear steps, no competing summary pane. */
.client-onboarding { max-width: 900px; }
.back-link { font-size: .8125rem; color: var(--muted); margin-bottom: 20px; }
.setup-steps { border: 0; background: transparent; border-radius: 0; gap: 20px; overflow: visible; margin-bottom: 24px; }
.setup-steps li { padding: 0 0 14px; border: 0; border-bottom: 2px solid var(--border); font-size: .8125rem; color: var(--muted); }
.setup-steps li > span:first-child { width: 23px; height: 23px; flex-basis: 23px; color: var(--muted); border-color: var(--field-border); font-size: .6875rem; }
.setup-steps li[aria-current="step"] { color: var(--ink); background: transparent; border-bottom-color: var(--ink); }
.setup-steps li[aria-current="step"] > span:first-child { background: var(--ink); border-color: var(--ink); }
.setup-steps li.complete { color: var(--accent-dark); }
.client-onboarding .section-body { padding: 26px; }
.client-onboarding .form-footer { margin: 24px -26px -26px; padding: 18px 26px; }
#cw-new-coverage { border-top: 1px solid var(--border); padding-top: 22px; }
#cw-new-coverage > fieldset { margin-top: 24px; }

/* Dialogs and evidence */
dialog { border-radius: 10px; box-shadow: 0 24px 80px #1d2b2440; }
dialog::backdrop { background: #1b271e65; backdrop-filter: blur(3px); }
.dialoghead { padding: 19px 24px; }
.dialoghead h2 { font-size: 1.0625rem; }
#fields { padding: 24px 24px 2px; }
.dialogfoot { padding: 16px 24px; background: #fcfdfb; }
.seg { background: #f1f3ee; border-color: var(--border); padding: 3px; }
.seg button { font-size: .8125rem; color: var(--muted); padding: 9px 12px; }
.seg button.sel { color: var(--ink); }
#preview:not(:empty) { background: #f0f6ee; border-color: #d5e4d0; color: #4a6548; font-size: .8125rem; }
#preview .audit-preview { display: grid; gap: 12px; margin: 0; }
.audit-preview > div { display: grid; grid-template-columns: 100px minmax(0,1fr); gap: 16px; align-items: baseline; }
.audit-preview dt { font-weight: 600; }
.audit-preview dd { margin: 0; line-height: 1.5; }
#preview.preview-error { color: var(--danger); background: #fff5f3; border-color: #e6b6b0; }
.report-detail-meta { background: #f7f9f5; padding: 18px; }
.report-detail-meta dt { font-size: .75rem; }
.report-detail-meta dd { font-size: .8125rem; }
#report-modal .report-detail-actions { align-items: center; gap: 10px; margin: 16px 0 24px; }
#report-modal .report-detail-actions .danger-button { margin-left: auto; }
#report-modal .report-availability { margin: 0; font-size: .75rem; color: var(--muted); }
#report-modal .report-disclosure { margin: 0; padding: 0; border-top: 1px solid var(--border); }
#report-modal .report-disclosure > summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 0; list-style: none; cursor: pointer; font-size: .875rem; font-weight: 600; line-height: 1.5; }
#report-modal .report-disclosure > summary::-webkit-details-marker { display: none; }
#report-modal .report-disclosure > summary::after { content: ''; flex: 0 0 7px; width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); margin: -4px 3px 0 0; }
#report-modal .report-disclosure[open] > summary::after { transform: rotate(225deg); margin-top: 4px; }
#report-modal .report-disclosure > summary:hover { color: var(--accent-dark); }
#report-modal .report-disclosure-body { display: grid; gap: 16px; padding: 0 0 24px; }
.report-coverage-card { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.report-coverage-card > header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 18px; background: #f7f9f5; border-bottom: 1px solid var(--border); }
.report-coverage-card h4 { margin: 0; font-size: .8125rem; font-weight: 600; }
.report-coverage-card > header span { font-size: .75rem; color: var(--muted); }
.report-coverage-card dl { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px 24px; margin: 0; padding: 18px; }
.report-coverage-card dl > div { min-width: 0; }
.report-coverage-card .report-coverage-wide { grid-column: 1 / -1; }
.report-coverage-card dt { margin-bottom: 5px; color: var(--muted); font-size: .75rem; }
.report-coverage-card dd { margin: 0; font-size: .8125rem; line-height: 1.6; overflow-wrap: anywhere; }
.report-coverage-card dd strong { font-weight: 550; }
.report-coverage-card dd small { display: block; margin-top: 3px; font-size: .75rem; color: var(--muted); line-height: 1.5; }
#report-modal .report-email-empty, #report-modal .report-coverage-legacy { margin: 0; font-size: .8125rem; line-height: 1.6; color: var(--muted); }
#report-modal .report-email-history .scroll { margin-top: 0; }
#report-modal .report-disclosure + .report-detail-section { margin: 0; padding: 20px 0 24px; border-top: 1px solid var(--border); }
@media (max-width: 600px) {
 .report-coverage-card dl { grid-template-columns: 1fr; }
 #report-modal .report-detail-actions .danger-button { margin-left: 0; }
}
.report-details .shiftcase { background: #f8faf6; border-color: #e0e7db; color: var(--ink); }
.report-details .shiftcase strong { color: var(--ink); }
.report-details .shiftcase > small { color: var(--muted); }
.evidence-quote { border: 1px solid var(--border); border-radius: 6px; color: #39453b; }
.evidence-quote footer { color: var(--muted); font-size: .75rem; }
.learning { padding: 22px; }
.learning h3 { font-size: 1.0625rem; }
.learningtext { font-size: .875rem; }
.learning summary { color: var(--accent-dark); }
.learning blockquote { color: #445146; border-color: #c2d1bf; }
.auth { background: var(--canvas); }
.authbox { box-shadow: 0 5px 30px #24312108; border-radius: 10px; }
.authbox h1 { font-size: 1.5rem; }
.wordmark { font-size: .8125rem; }

@media (max-width: 1180px) {
 .shell { grid-template-columns: 200px minmax(0,1fr); }
 .shell > aside { padding-left: 12px; padding-right: 12px; }
 .work, .topbar { padding-left: 28px; padding-right: 28px; }
 .overview-primary { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
 .client-settings > .settings-card { grid-template-columns: 180px minmax(0,1fr); }
 .client-settings .section-head { padding-left: 20px; padding-right: 18px; }
 .client-settings .section-body { padding-right: 20px; }
 .client-settings .form-grid { grid-template-columns: 1fr; gap: 0; }
}
@media (max-width: 900px) {
 .shell { grid-template-columns: 184px minmax(0,1fr); }
 .brand { padding: 0 4px; gap: 7px; }
 .brand-name { font-size: 1rem; }
 .brandmark { flex-basis: 28px; width: 28px; }
 .overview-primary { grid-template-columns: 1fr; }
 .client-settings > .settings-card { grid-template-columns: 1fr; }
 .client-settings .section-head { padding: 22px 22px 0; }
 .client-settings .section-head p { max-width: none; }
 .client-settings .section-body { padding: 22px; }
 .stat, a.stat { padding: 0 18px; }
 .stat:first-child { padding-left: 0; }
 .client-summary dl { gap: 10px 20px; }
 .pagehead .page-actions { max-width: none; }
 .workspace-tabs, .section-tabs { gap: 18px; }
}
@media (max-width: 700px) {
 .shell { display: block; }
 .shell > aside { display: grid; grid-template-columns: 1fr auto; align-items: center; position: static; height: auto; padding: 16px 20px; border-right: 0; border-bottom: 1px solid var(--border); }
 .brand { padding: 0; gap: 9px; }
 .brand-name { font-size: 1.0625rem; }
 .brandmark { display: grid; width: 30px; height: 32px; flex-basis: 30px; }
 #nav-toggle { display: inline-flex; min-height: 40px; background: transparent; }
 .shell > aside nav, .shell > aside .account { display: none; grid-column: 1 / -1; }
 .shell > aside.is-open nav { display: grid; margin-top: 20px; }
 .shell > aside.is-open .account { display: flex; margin-top: 16px; }
 .nav-group { display: flex; flex-wrap: wrap; gap: 5px; }
 .nav-group + .nav-group { margin-top: 8px; }
 .nav-heading { display: none; }
 .shell > aside nav a { min-height: 44px; font-size: .8125rem; padding: 10px 12px; }
 .account #who { max-width: none; }
 .topbar { display: flex; min-height: 42px; padding: 8px 20px; background: var(--canvas); }
 .topbar .breadcrumb { font-size: .75rem; }
 #processor-status { font-size: .6875rem; }
 .work { padding: 24px 20px 40px; }
 .pagehead { flex-wrap: wrap; gap: 16px; margin-bottom: 24px; }
 h1 { font-size: 1.5rem; }
 .pagehead p { font-size: .8125rem; }
 .page-actions { width: auto; }
 .page-actions .primary { min-height: 44px; }
 .primary, .secondary { min-height: 44px; }
 .stats { grid-template-columns: repeat(3,minmax(0,1fr)); padding-bottom: 20px; gap: 0; margin-bottom: 22px; }
 .stat, a.stat { display: block; padding: 0 12px; }
 .stat:first-child { padding-left: 0; }
 .stat:last-child { padding-right: 0; }
 .stat > span, .stat small { font-size: .6875rem; line-height: 1.4; }
 .stat strong { margin: 7px 0 0; font-size: 1.4rem; }
 .stat small { display: none; }
 .overview-primary { gap: 20px; margin-bottom: 20px; }
 .panelhead, .section-head { padding: 16px 18px; align-items: center; flex-wrap: nowrap; }
 .panelhead h2 { font-size: .9375rem; }
 .panelhead a { font-size: .75rem; white-space: nowrap; }
 .panelbody, .section-body, .client-settings .section-body { padding: 20px 18px; }
 .latest-report { padding: 22px 18px; }
 .latest-report-main h3 { font-size: 1.375rem; }
 .latest-report-actions { flex-direction: row; margin-top: 20px; }
 .latest-report-actions .primary { flex: 0 1 auto; }
 .action-item { padding: 17px 18px; flex-wrap: wrap; }
 .action-item a { min-height: 30px; display: inline-flex; align-items: center; }
 .client-toolbar, .filters { padding: 16px 18px; gap: 14px; }
 .client-toolbar > label:first-child, .client-toolbar > label:not(:first-child), .filters > label:not(.search-field), .filters > .search-field { flex: 1 1 100%; max-width: none; min-width: 0; }
 .report-filters > .search-field { flex: 1 1 150px; }
 #report-filters-toggle { display: inline-flex; flex: 0 0 auto; }
 .filter-fields { display: none; flex: 1 1 100%; }
 .filter-fields[data-expanded="true"] { display: flex; gap: 12px; }
 .filter-fields > label { flex: 1 1 0; min-width: 0; max-width: none; }
 .client-summary { margin-top: -4px; padding-bottom: 8px; }
 .client-summary dl { display: flex; gap: 10px 16px; }
 .client-summary dl > div { display: flex; align-items: center; gap: 6px; }
 .client-summary dt { font-size: .6875rem; flex: 0 1 auto; }
 .client-summary dd { font-size: .75rem; text-align: left; max-width: none; }
 .client-summary .status { font-size: .6875rem; }
 .workspace-tabs, .section-tabs { gap: 0 20px; margin-bottom: 20px; }
 .workspace-tabs { display: none; }
 .client-section-switcher { display: block; margin: 8px 0 22px; }
 .client-section-switcher label { margin-bottom: 0; }
 .workspace-tabs a, .section-tabs a { padding: 10px 0; font-size: .75rem; }
 .client-settings .section-head { padding: 20px 18px 0; }
 .client-settings .form-footer { padding-top: 16px; }
 .form-footer { margin: 22px -18px -20px; padding: 16px 18px; }
 .form-footer .primary { flex: 0 1 auto; }
 .save-state { flex-basis: 100%; }
 .form-grid, .pair { grid-template-columns: 1fr; gap: 0; }
 .shift-row { padding: 12px; gap: 10px; }
 .coverage-grid .shift-row { padding: 12px; }
 .shift-row button { min-height: 38px; }
 .field-with-action { gap: 8px; }
 .field-with-action > button { min-height: 44px; }
 .field-hint { font-size: .75rem; }
 input, textarea, input.ui-typed-input, .ui-option-search { font-size: 1rem; }
 .setup-steps { gap: 16px; margin-bottom: 20px; }
 .setup-steps li { font-size: .75rem; padding: 0 0 12px; gap: 8px; }
 .client-onboarding .section-body { padding: 20px 18px; }
 .client-onboarding .form-footer { margin: 24px -18px -20px; padding: 16px 18px; }
 .client-onboarding .form-footer .primary { flex: 0 1 auto; }
 .history-options, .table-footer { padding: 14px 18px; }
 .blank, .empty-state { padding: 24px 18px; }
 /* Key record lists become labeled records; no sideways page scrolling. */
 .scroll { overflow: visible; }
 .scroll table, .scroll tbody, .scroll tr { display: block; width: 100%; }
 .scroll thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
 .scroll tbody tr { padding: 16px 18px; border-bottom: 1px solid var(--border); }
 .scroll tbody tr:last-child { border-bottom: 0; }
 .scroll td { display: grid; grid-template-columns: 104px minmax(0,1fr); gap: 6px 12px; border: 0; padding: 6px 0; min-width: 0; overflow-wrap: anywhere; align-items: baseline; }
 .scroll td::before { content: attr(data-label); color: var(--muted); font-size: .75rem; font-weight: 400; grid-column: 1; overflow-wrap: normal; }
 .scroll td > * { min-width: 0; grid-column: 2; justify-self: start; }
 .scroll td small { margin-top: 4px; }
 .scroll td .more { gap: 6px 12px; }
 .scroll td .status { align-self: start; }
 .scroll td .linkbutton, .scroll td .smallbtn { min-height: 36px; }
 .client-list table td:first-child { min-width: 0; }
 .report-detail-meta { grid-template-columns: 1fr; }
 #report-modal .report-details { padding: 20px 18px; }
 .dialoghead, .dialogfoot { padding: 16px 18px; }
 #fields { padding: 22px 18px 2px; }
 .learning { padding: 20px 18px; }
}
@media (max-width: 390px) {
 .work { padding-left: 16px; padding-right: 16px; }
 .topbar, .shell > aside { padding-left: 16px; padding-right: 16px; }
 .shift-row, .coverage-grid .shift-row { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
 .shift-row > button { grid-column: 1 / -1; justify-self: start; margin-top: 0; }
 .excluded-row { grid-template-columns: minmax(0,1fr) auto; }
 .excluded-row button { grid-column: auto; }
 .scroll td { grid-template-columns: 98px minmax(0,1fr); gap: 6px 10px; }
}
@media (max-width: 360px) {
 .shift-row, .coverage-grid .shift-row { grid-template-columns: minmax(0,1fr); }
 .shift-row button { grid-column: 1; }
 .management-card > .section-body { grid-template-columns: 1fr; gap: 12px; }
}
@media (prefers-reduced-motion: reduce) {
 *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

/* Shared workspace email settings. */
.notification-layout { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(0,1fr); gap: 24px; align-items: start; margin-bottom: 24px; }
.notification-layout > .panel { margin: 0; }
.notification-form-body, .notification-empty { padding: 24px; }
.notification-group { border: 0; margin: 0 0 24px; padding: 0; min-width: 0; }
.notification-group:last-of-type { margin-bottom: 0; }
.notification-group legend { padding: 0; margin-bottom: 12px; font-size: .8125rem; font-weight: 650; }
.notification-choice { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 14px; cursor: pointer; font-weight: 400; }
.notification-choice > input { margin: 3px 0 0; flex: 0 0 18px; width: 18px; height: 18px; }
.notification-choice > span { min-width: 0; }
.notification-choice strong { display: block; font-size: .8125rem; font-weight: 550; }
.notification-choice small { display: block; font-size: .75rem; color: var(--muted); margin-top: 4px; font-weight: 400; overflow-wrap: anywhere; }
.notification-recipients { display: grid; grid-template-columns: 1fr; max-height: 290px; overflow: auto; padding: 2px; }
.notification-footer { display: flex; justify-content: space-between; align-items: center; gap: 16px; border-top: 1px solid var(--border); padding: 18px 24px; }
.notification-footer > span { font-size: .75rem; }
.notification-sender { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 0 0 20px; }
.notification-sender > div { min-width: 0; }
.notification-sender dt { font-size: .75rem; color: var(--muted); margin-bottom: 6px; }
.notification-sender dd { font-size: .8125rem; margin: 0; overflow-wrap: anywhere; }
.notification-preview-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 22px 0; }
#notification-test { border-top: 1px solid var(--border); padding-top: 20px; margin-top: 20px; }
#notification-test .field-hint { margin-top: 10px; }
#notification-test-result { font-size: .8125rem; margin-top: 12px; }
.notification-history-hint { font-size: .75rem; color: var(--muted); padding: 16px 24px 0; }
.report-email-history { margin-top: 26px; border-top: 1px solid var(--border); padding-top: 18px; }
.report-email-history summary, .email-plaintext summary { font-size: .8125rem; cursor: pointer; font-weight: 550; }
.report-email-history .scroll { margin-top: 12px; }
.report-email-history table td { font-size: .75rem; padding: 14px 8px; }
.email-preview-subject { margin-bottom: 18px; font-size: .8125rem; }
.email-preview-subject p { margin-top: 6px; }
.email-preview { width: 100%; min-height: 420px; border: 1px solid var(--border); border-radius: 6px; background: white; }
.email-plaintext { margin-top: 16px; }
.email-plaintext pre { white-space: pre-wrap; overflow-wrap: anywhere; font: .8125rem/1.6 inherit; margin: 14px 0; }
@media (max-width: 1100px) { .notification-layout { grid-template-columns: 1fr; } }
@media (max-width: 700px) {
 .notification-form-body, .notification-empty { padding: 20px 18px; }
 .notification-footer { padding: 16px 18px; flex-wrap: wrap; }
 .notification-sender { grid-template-columns: 1fr; gap: 16px; }
 .notification-history-hint { padding-left: 18px; padding-right: 18px; }
 .report-email-history .scroll td { padding: 6px 0; }
 .notification-choice { min-height: 40px; }
}

.notification-history-pages { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 24px; border-top: 1px solid var(--border); }
.notification-history-pages > span { color: var(--muted); font-size: .75rem; }
@media (max-width:700px) { .notification-history-pages { padding: 16px 18px; flex-wrap: wrap; } }

/* Account profile and Mailgun connection settings. */
.profile-section { border: 0; padding: 0; margin: 0 0 22px; min-width: 0; }
.profile-section legend { padding: 0; margin-bottom: 16px; font-size: .875rem; font-weight: 650; }
.profile-login { margin-bottom: 24px; }
.profile-password { margin-bottom: 22px; border-top: 1px solid var(--border); padding-top: 18px; }
.profile-password summary, #mailgun-edit summary, .mailgun-reply summary { cursor: pointer; font-size: .8125rem; font-weight: 550; }
.profile-password[open] summary, #mailgun-edit[open] > summary, .mailgun-reply[open] > summary { margin-bottom: 18px; }
.profile-password-toggle { margin-top: 8px; }
.profile-password-toggle input { width: 18px; height: 18px; }
.notification-column { min-width: 0; display: grid; gap: 24px; }
.notification-column > .panel { margin: 0; }
#mailgun-settings .form-grid { gap: 0 18px; }
#mailgun-settings label { margin-bottom: 18px; }
#mailgun-key-help { margin-top: -8px; margin-bottom: 22px; }
.mailgun-reply { margin: 2px 0 24px; }
.mailgun-reply label { margin-top: 16px; }
.mailgun-save { display: flex; gap: 16px; align-items: center; justify-content: space-between; padding-top: 20px; border-top: 1px solid var(--border); }
.mailgun-save .muted { font-size: .75rem; }
#mailgun-edit { border-top: 1px solid var(--border); padding-top: 18px; }
.sender-summary-wide { grid-column: 1 / -1; }
.notification-column .notification-preview-actions { margin-top: 0; }
.processor-details { position: relative; }
.processor-details > summary { cursor: pointer; list-style: none; display: inline-flex; align-items: center; min-height: 40px; font-size: .75rem; color: var(--muted); white-space: nowrap; }
.processor-details > summary::-webkit-details-marker { display: none; }
.processor-details > summary::after { content: '⌄'; margin-left: 7px; font-size: 1em; }
.processor-popover { position: absolute; right: 0; top: calc(100% + 4px); z-index: 30; width: min(310px,calc(100vw - 32px)); padding: 18px; border: 1px solid var(--border); border-radius: 8px; background: white; box-shadow: 0 8px 24px #15251c12; }
.processor-popover strong { font-size: .8125rem; }
.processor-popover p { margin: 8px 0 0; font-size: .8125rem; line-height: 1.6; color: var(--muted); }
@media (max-width:700px) {
 .mailgun-save { flex-wrap: wrap; }
 .mailgun-save .muted { flex-basis: 100%; }
 .processor-details > summary { font-size: .6875rem; min-height: 32px; }
}

/* Mailgun setup starts with discovery, with sender details shown afterward. */
#mailgun-discover label { margin-bottom: 18px; }
#mailgun-discovery-error { margin-bottom: 12px; }
.mailgun-discovery-actions, .mailgun-discovery-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.mailgun-discovery-heading { justify-content: space-between; margin-bottom: 24px; }
.mailgun-discovery-heading > strong { font-size: .875rem; }
.mailgun-found-domain { padding: 16px; margin-bottom: 24px; border: 1px solid var(--border); border-radius: 6px; }
.mailgun-found-domain span, .mailgun-found-domain small { display: block; color: var(--muted); font-size: .75rem; }
.mailgun-found-domain strong { display: block; font-size: .875rem; margin: 6px 0; overflow-wrap: anywhere; }
.mailgun-connection-actions { margin-top: 20px; }
#mailgun-discover[aria-busy=true] { cursor: wait; }
.notification-layout { grid-template-areas: "connection preferences" "testing preferences"; }
.notification-connection { grid-area: connection; min-width: 0; }
.notification-preferences { grid-area: preferences; min-width: 0; }
.notification-testing { grid-area: testing; min-width: 0; }
.notification-layout > div > .panel { margin: 0; }
.notification-testing .notification-preview-actions { margin-top: 0; }
@media (max-width:1100px) {
 .notification-layout { grid-template-areas: "connection" "preferences" "testing"; }
}
@media (max-width:700px) {
 .mailgun-discovery-heading { align-items: flex-start; }
 .mailgun-discovery-actions { gap: 10px; }
}

/* Compact desktop collections and operational settings. */
:root { --canvas:#f8f9fa; --border:#e5e7e9; --muted:#70757b; --well:#f6f7f8; }
.shell > aside { background:#fff; }
.shell > aside nav a.active, .shell > aside nav a[aria-current="page"] { background:#f1f4f2; border-color:transparent; box-shadow:none; }
.panel, .settings-card { box-shadow:none; }
.panel { border-radius:12px; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.collection-panel { overflow:visible; padding-top:4px; }
.collection-heading { padding:20px 22px 0; display:flex; align-items:center; justify-content:space-between; gap:18px; }
.collection-heading h2 { font-size:.9375rem; font-weight:600; }
.collection-heading p { font-size:.75rem; color:var(--muted); margin:5px 0 0; }
.collection-toolbar { display:flex; align-items:center; flex-wrap:wrap; gap:12px; padding:20px 22px; }
.collection-toolbar label { margin:0; min-width:0; }
.collection-toolbar input, .collection-toolbar select, .collection-toolbar .ui-select-trigger { min-height:38px; padding:8px 11px; font-size:.8125rem; }
.collection-search { flex:1 1 180px; max-width:270px; margin-left:auto !important; }
.collection-client { width:150px; flex:0 1 150px; }
.collection-client .ui-select-value { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.collection-segments { display:flex; flex:none; align-items:center; background:#f4f5f6; padding:3px; border-radius:9px; gap:3px; }
.collection-segments button { display:flex; gap:7px; align-items:center; min-height:32px; border:1px solid transparent; border-radius:7px; padding:5px 10px; font-size:.8125rem; color:var(--muted); background:transparent; font-weight:500; white-space:nowrap; }
.collection-segments button.selected { background:#fff; border-color:#e4e6e7; box-shadow:0 1px 3px #00000008; color:var(--ink); }
.collection-segments button span { color:#8c9295; font-weight:400; }
.collection-filters { position:relative; flex:0 0 auto; }
.collection-filters > summary { list-style:none; border:1px solid var(--border); border-radius:6px; padding:8px 11px; min-height:38px; font-size:.8125rem; color:#51595d; cursor:pointer; }
.collection-filters > summary::-webkit-details-marker { display:none; }
.collection-filter-panel { position:absolute; z-index:10; width:240px; right:0; top:calc(100% + 7px); padding:16px; border:1px solid var(--border); border-radius:8px; background:#fff; box-shadow:0 8px 24px #17282118; }
.collection-filter-panel label { margin-bottom:14px; }
.collection-filter-panel label:last-child { margin-bottom:0; }
.collection-applied { padding:0 22px; }
.collection-applied:has([hidden]) { display:none; }
.collection-applied .linkbutton { padding:0 0 12px; min-height:0; }
.collection-panel > #report-rows, .collection-panel > #schedule-rows { padding:0 20px; }
.collection-panel .scroll { border:0; }
.collection-panel table { min-width:740px; font-size:.8125rem; }
.collection-panel th { background:#f8f9fa; border:0; padding:12px 12px; color:#7b8188; }
.collection-panel th:first-child { border-radius:7px 0 0 7px; }
.collection-panel th:last-child { border-radius:0 7px 7px 0; }
.collection-panel td { padding:17px 12px; vertical-align:middle; }
.collection-panel tbody tr:last-child td { border-bottom:0; }
.collection-panel .report-table th:first-child { width:34%; }
.collection-panel .report-table th:nth-child(2) { width:18%; }
.collection-panel .report-table th:nth-child(3) { width:12%; }
.collection-panel .report-table th:nth-child(4) { width:17%; }
.collection-panel .report-table th:last-child { width:19%; }
.report-name { display:flex; gap:12px; align-items:center; min-width:180px; }
.report-file-icon { width:32px; height:36px; flex:0 0 32px; display:grid; place-items:center; background:#f0f5f2; border-radius:7px; color:#52806b; }
.report-file-icon svg { width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.5; }
.report-title-link { padding:0; border:0; background:transparent; color:var(--ink); font-size:.875rem; font-weight:550; text-align:left; line-height:1.45; }
.report-title-link:hover { text-decoration:underline; text-underline-offset:3px; }
.report-name small { font-size:.75rem; line-height:1.4; }
.report-table td .more { gap:7px 12px; flex-wrap:wrap; }
.report-table .pdf-action { font-size:.75rem; border:1px solid var(--border); padding:4px 8px; border-radius:5px; text-decoration:none; color:#58675f; background:#fff; }
.report-table .pdf-action:hover { border-color:#b3c1b8; background:#f6f8f6; }
.expired-file, .report-availability { font-size:.75rem; color:var(--muted); }
.report-availability { margin:14px 0; }
.collection-pagination { padding:16px 22px; border-top:1px solid #f0f1f2; display:flex; align-items:center; justify-content:space-between; gap:16px; font-size:.75rem; color:var(--muted); }
.pagination-actions { display:flex; align-items:center; gap:12px; }
.pagination-actions .smallbtn { min-height:30px; font-size:.75rem; padding:4px 9px; border-color:var(--border); }
.collection-footer { border-top:1px solid var(--border); padding:18px 22px; display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:12px; font-size:.75rem; color:var(--muted); }
.collection-footer a { color:#5c6760; text-decoration:none; }
.collection-footer a:hover { text-decoration:underline; }
.footer-divider { margin:0 5px; color:#b1b6b9; }
.delivery-warning { color:#9b6a18; }
.collection-empty { padding:28px 22px; }
.collection-empty p { margin-bottom:14px; }
.collection-panel .blank { min-height:130px; display:grid; place-items:center; }
.collection-panel .smallbtn { font-size:.75rem; }
.operations-storage { display:grid; grid-template-columns:minmax(260px,.8fr) minmax(0,1.3fr); gap:22px; align-items:start; }
.storage-total { display:flex; align-items:baseline; gap:10px; flex-wrap:wrap; margin-bottom:18px; }
.storage-total strong { font-size:1.7rem; letter-spacing:-.035em; font-weight:600; }
.storage-total span { font-size:.8125rem; color:var(--muted); }
.storage-meter { display:block; width:100%; height:8px; appearance:none; border:0; border-radius:5px; overflow:hidden; background:#edf0ed; }
.storage-meter::-webkit-progress-bar { background:#edf0ed; border-radius:5px; }
.storage-meter::-webkit-progress-value { background:#578670; border-radius:5px; }
.storage-meter::-moz-progress-bar { background:#578670; border-radius:5px; }
.storage-breakdown { display:grid; gap:12px; padding-top:22px; margin:0; }
.storage-breakdown > div, .retention-summary > div { display:flex; justify-content:space-between; align-items:baseline; gap:18px; font-size:.8125rem; }
.storage-breakdown dt, .retention-summary dt { color:var(--muted); }
.storage-breakdown dd, .retention-summary dd { margin:0; font-variant-numeric:tabular-nums; }
.retention-toggle { margin:2px 0 24px; }
.retention-summary { display:grid; gap:13px; border-top:1px solid var(--border); padding-top:20px; margin:0; }
.retention-confirm { margin:0; display:grid; gap:16px; }
.retention-confirm > div { display:flex; justify-content:space-between; gap:24px; }
.retention-confirm dt { color:var(--muted); font-size:.8125rem; }
.retention-confirm dd { margin:0; font-size:.8125rem; font-weight:550; text-align:right; }
.retention-confirm-note { padding:18px 0 22px; margin:20px 0 0; border-top:1px solid var(--border); color:#7b561f; font-size:.8125rem; }
.system-grid { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.1fr); gap:22px; align-items:start; }
.service-row { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:13px 0; border-bottom:1px solid #f0f1f0; font-size:.8125rem; }
.service-row:first-child { padding-top:0; }
.service-row:last-child { border-bottom:0; padding-bottom:0; }
.service-state { display:inline-flex; align-items:center; gap:7px; color:var(--muted); font-size:.75rem; }
.service-state::before { content:''; width:6px; height:6px; border-radius:50%; background:#a7adb0; }
.service-state.online { color:#3d775d; }
.service-state.online::before { background:#44926b; }
.queue-metrics { display:grid; grid-template-columns:1fr 1fr; gap:22px; margin:0; }
.queue-metrics dt { color:var(--muted); font-size:.75rem; }
.queue-metrics dd { font-size:1.2rem; font-weight:550; margin:6px 0 0; }
.system-warning { border:1px solid #e9ddbf; background:#fffbf2; border-radius:7px; padding:13px 16px; margin-bottom:16px; color:#85631c; font-size:.8125rem; }
.system-warning.critical { border-color:#e5c7c4; background:#fff7f6; color:#a4443b; }
.system-warning strong { font-weight:500; }
@media (max-width:1200px) {
 .collection-toolbar { gap:10px; }
 .collection-segments { margin-right:auto; }
 .collection-search { max-width:220px; }
 .operations-storage { grid-template-columns:minmax(220px,.8fr) minmax(0,1.2fr); }
 .operations-storage .pair { grid-template-columns:1fr; gap:0; }
 .collection-footer { align-items:flex-start; flex-direction:column; }
}
@media (max-width:900px) {
 .operations-storage, .system-grid { grid-template-columns:1fr; }
 .collection-toolbar .collection-search { margin-left:0 !important; max-width:none; }
 .collection-pagination { flex-wrap:wrap; }
}

.system-indicator { display:inline-flex; align-items:center; gap:7px; color:var(--muted); font-size:.75rem; text-decoration:none; white-space:nowrap; }
.system-indicator::before { content:''; width:6px; height:6px; border-radius:50%; background:#a3aaa6; }
.system-indicator.healthy::before { background:#3e9167; }
.system-indicator.has-issues::before { background:#b78328; }
.system-indicator:hover { color:var(--ink); text-decoration:underline; text-underline-offset:3px; }

.audit-coverage-date { padding: 18px; margin: 16px 0; border: 1px solid var(--border); border-radius: 8px; }
[data-coverage-editor] > .check-field { margin-top: 18px; }

/* Audit coverage keeps the saved baseline separate from report-only edits. */
.audit-saved-coverage { margin: 20px 0 26px; padding: 18px; border: 1px solid var(--border); border-radius: 8px; background: #f8f9f7; }
.audit-coverage-section h4 { margin: 0 0 14px; font-size: .875rem; line-height: 1.5; }
.audit-saved-coverage dl { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px 22px; margin: 0; }
.audit-saved-coverage dl > div { min-width: 0; }
.audit-saved-coverage .coverage-summary-wide { grid-column: 1 / -1; }
.audit-saved-coverage dt { color: var(--muted); font-size: .75rem; margin-bottom: 5px; }
.audit-saved-coverage dd { margin: 0; font-size: .8125rem; line-height: 1.6; overflow-wrap: anywhere; }
.coverage-summary-hours { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.audit-saved-coverage .coverage-effective { margin: 16px 0 0; padding-top: 12px; border-top: 1px solid var(--border); font-size: .75rem; }
.audit-period-adjustment { margin: 24px 0 0; }
.audit-working-days { min-width: 0; border: 0; padding: 0; margin: 26px 0 22px; }
.audit-working-days legend { padding: 0; margin-bottom: 12px; font-size: .8125rem; font-weight: 600; }
.audit-day-options { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 8px; }
.audit-day-options label { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; padding: 10px 5px; margin: 0; border: 1px solid var(--border); border-radius: 6px; font-size: .8125rem; font-weight: 500; cursor: pointer; background: #fff; }
.audit-day-options input[type="checkbox"] { width: 17px; height: 17px; padding: 0; margin: 0; min-height: 0; }
.audit-day-options label:has(input:checked) { background: #edf5f0; border-color: #85ab98; }
.audit-day-options label:hover { border-color: #7b9385; }
.audit-day-options label:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.audit-coverage-confirm { display: flex; align-items: flex-start; gap: 10px; padding: 14px; margin: 22px 0 0; border: 1px solid var(--border); border-radius: 6px; line-height: 1.5; font-size: .8125rem; font-weight: 500; cursor: pointer; }
.audit-coverage-confirm input[type="checkbox"] { flex: 0 0 18px; width: 18px; height: 18px; padding: 0; margin: 1px 0 0; }
.audit-date-adjustments { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--border); }
.audit-date-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; }
.audit-date-heading h4 { margin: 0; }
.audit-date-heading button { font-size: .8125rem; }
.audit-coverage-date > [data-coverage-remove-date] { margin-top: 18px; }

/* Client assignment relationships and account forms. */
.inbox-manager { display: grid; gap: 5px; line-height: 1.5; }
.inbox-manager strong { font-weight: 600; }
.inbox-manager span, .assignment-count { font-size: .75rem; color: var(--muted); }
.assigned-clients { display: grid; gap: 9px; max-width: 420px; }
.client-link-list { display: flex; flex-wrap: wrap; gap: 8px; }
.client-link-list a { display: inline-flex; align-items: center; padding: 5px 10px; border: 1px solid var(--border); border-radius: 6px; background: #fafbf9; font-size: .8125rem; text-decoration: none; line-height: 1.5; overflow-wrap: anywhere; }
.client-link-list a:hover { background: #edf3ee; text-decoration: underline; }
.more-assignments summary { font-size: .75rem; cursor: pointer; color: var(--accent); margin-bottom: 8px; }
.auth-check { display: flex; align-items: center; gap: 10px; font-size: .8125rem; margin: 16px 0; }
.auth-check input[type=checkbox] { width: 17px; height: 17px; margin: 0; padding: 0; }
.auth-links { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 24px; font-size: .8125rem; }
.authbox form > button { margin-top: 16px; }

/* Real stage progress, without an estimated overall percentage. */
.audit-progress { display: grid; gap: 8px; margin-top: 8px; max-width: 260px; min-width: 180px; font-size: .75rem; line-height: 1.5; color: var(--muted); }
.audit-progress progress { display: block; width: 100%; height: 5px; border: 0; border-radius: 4px; overflow: hidden; appearance: none; background: #e7ece8; color: #26745e; }
.audit-progress progress::-webkit-progress-bar { background: #e7ece8; border-radius: 4px; }
.audit-progress progress::-webkit-progress-value { background: #26745e; border-radius: 4px; }
.audit-progress progress::-moz-progress-bar { background: #26745e; border-radius: 4px; }
.report-summary-status .audit-progress { margin: 0; flex: 1; max-width: 320px; }
.report-live-meta { display: flex; flex-wrap: wrap; gap: 12px 32px; margin: -8px 0 20px; font-size: .75rem; }
.report-live-meta:empty { display: none; }
.report-live-meta dt { color: var(--muted); margin-bottom: 4px; }
.report-live-meta dd { margin: 0; }

.learning-tabs button { border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent; padding: 14px 18px; color: var(--muted); }
.learning-tabs button.active { border-bottom-color: var(--ink); color: var(--ink); font-weight: 600; }
.learning-filters { display: grid; grid-template-columns: 240px 220px minmax(200px,1fr) auto; gap: 16px; align-items: end; margin: 24px 0; }
.learning-filters label { display: grid; gap: 8px; }
.learning-list-footer,.learning-job { display: flex; align-items: center; gap: 16px; padding: 16px 24px; }
.learning-list-footer span { margin-right: auto; color: var(--muted); }
#learning-modal { width: min(1180px,94vw); max-width: 1180px; }
#learning-body { padding: 24px; }
.learning-context { color: var(--muted); margin: 0 0 24px; }
.learning-detail-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 32px; }
.learning-detail-grid > section { min-width: 0; }
.learning-detail-grid h3 { margin: 0 0 12px; }
.learning-detail-grid p { overflow-wrap: anywhere; white-space: pre-wrap; margin: 0 0 20px; }
.learning-detail-grid details { margin-top: 24px; }
.learning-draft,.learning-related { border: 1px solid var(--border); border-radius: 8px; padding: 18px; margin: 20px 0; background: #f8faf7; }
.learning-related header,.learning-evidence header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; font-size: .75rem; }
.learning-facts { display: grid; gap: 16px; grid-template-columns: repeat(2,minmax(0,1fr)); margin: 24px 0; font-size: .8125rem; }
.learning-facts dt { color: var(--muted); }.learning-facts dd { margin: 4px 0 0; }
.learning-evidence { border: 1px solid var(--border); padding: 16px; border-radius: 8px; margin-bottom: 16px; }
.learning-evidence blockquote { margin: 0; padding: 12px 0; border: 0; background: none; }
.learning-evidence blockquote+blockquote { border-top: 1px solid var(--border); }
.learning-evidence blockquote p { margin: 0 0 8px; }
.learning-evidence footer { color: var(--muted); font-size: .75rem; }
.learning-cleanup-row { padding: 20px 0; border-bottom: 1px solid var(--border); }
.learning-cleanup-row small { display: block; margin-bottom: 12px; }
@media(max-width:800px){.learning-filters,.learning-detail-grid{grid-template-columns:1fr}.learning-facts{grid-template-columns:1fr}}
