/* Qianli warm workspace: cream light, charcoal focal summaries and solid data.
   Visual inspiration: Nixtio HR dashboard. Legacy asset name kept for compatibility.
   Controls use pills, content uses 22px corners, tables retain complete data. */
:root {
  color-scheme: light;
  --ink: #292927;
  --muted: #686861;
  --green: #33332f;
  --light: #f1edcf;
  --paper: #efeee7;
  --panel: #fff;
  --line: #e4e3da;
  --red: #a43530;
  --warn: #86561a;
  --surface-raised: #fff;
  --material: #f7f6ee;
  --material-border: rgb(255 255 255 / .9);
  --shadow-panel: 0 4px 18px rgb(89 82 40 / .025);
  --shadow-material: 0 6px 20px rgb(89 82 40 / .04);
  --radius-control: 24px;
  --radius-panel: 20px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}
body {
  background:
    radial-gradient(ellipse at 4% 12%, #e4e3df 0, #e5e4df47 32%, transparent 52%),
    radial-gradient(ellipse at 98% 0%, #fff0a8 0, #fff0a866 36%, transparent 60%),
    radial-gradient(ellipse at 70% 100%, #f4e6a5 0, transparent 57%),
    linear-gradient(125deg, #e9e9e5, #f4f3e9 55%, #f4ebc0);
  background-attachment: fixed;
}
button, input, select, textarea { font-variant-numeric: tabular-nums; }
button, a, summary { -webkit-tap-highlight-color: rgb(23 100 79 / .12); }
button, .btn, summary, input, select, textarea {
  transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}
button:disabled { cursor: not-allowed; opacity: .54; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid #8b7420;
  outline-offset: 3px;
}
input::placeholder, textarea::placeholder { color: #686861; opacity: 1; }
h1 { font-size: 29px; letter-spacing: -.8px; font-weight: 450; line-height: 1.4; }
h2, h3 { letter-spacing: -.2px; }
.eyebrow { font-size: 10px; letter-spacing: 1.8px; color: var(--muted); margin-bottom: 10px; }
.brand { gap: 11px; }
.brand-mark { width: 40px; height: 40px; border-radius: 13px; background: linear-gradient(145deg, #383834, #242422); box-shadow: inset 0 1px 1px #ffffff65, 0 4px 10px #174c3c12; }
.brand strong { font-size: 19px; letter-spacing: 3px; }
.brand small { font-size: 8px; letter-spacing: 1px; white-space: nowrap; color: var(--muted); }

/* The navigation is a floating horizontal control plane. Content uses the
   full workspace width; the mobile version moves the same authorized links
   to a bottom dock, rather than duplicating permissions or routes. */
.app { display: block; padding: 18px 28px 0; min-height: 100dvh; }
.sidebar.workspace-chrome {
  display: grid; grid-template-columns: 126px minmax(0, 1fr) 118px; gap: 18px;
  position: sticky; top: 18px; height: auto; min-height: 76px; max-width: 1800px;
  margin: 0 auto; padding: 10px 22px; border: 1px solid #ffffffd9; border-radius: 44px;
  background: var(--material); box-shadow: var(--shadow-material); overflow: visible; z-index: 20;
  align-items: center;
}
.workspace-chrome::before, .nav-dock::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: linear-gradient(125deg, #ffffff8c, transparent 25%, #ffffff10 60%, #ffffff60); box-shadow: inset 0 1px 0 #fff, inset 0 -1px 0 #ffffff7a; }
.workspace-chrome>* { position: relative; }
.sidebar .brand { padding: 0; gap: 9px; }
.sidebar .brand-mark { width: 35px; height: 35px; border-radius: 12px; font-size: 23px; }
.sidebar .brand strong { font-size: 18px; letter-spacing: 2px; }
.sidebar .brand small { font-size: 6px; letter-spacing: .4px; }
.nav-dock { min-width: 0; border-radius: 32px; }
.nav-dock::before { display: none; }
.nav { display: flex; gap: 3px; overflow-x: auto; white-space: nowrap; padding: 3px; scrollbar-width: none; scroll-padding: 6px; overscroll-behavior-x: contain; }
.nav::-webkit-scrollbar { display: none; }
.nav button { flex: 1 0 auto; display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 46px; border: 1px solid transparent; border-radius: 26px; padding: 10px 11px; font-size: 13px; font-weight: 600; color: #53534e; }
.nav button.active, .nav-more.active, .nav-more-grid button.active { color: #fff; background: linear-gradient(145deg, #353532, #292927); border-color: #ffffff5c; box-shadow: inset 0 1px 1px #ffffff80, 0 3px 8px #1859463b; }
.nav-icon { display: grid; place-items: center; width: 19px; height: 21px; color: inherit; border-radius: 0; }
.nav-icon svg { width: 19px; height: 19px; display: block; }
.active .nav-icon { color: white; background: transparent; }
.nav-more { display: none; }
.sidebar-bottom { border: 0; padding: 0; margin: 0; }
.user-box { padding: 0 4px; justify-content: end; }
.user-box>div { display: flex; gap: 7px; align-items: baseline; }
.user-box strong { font-size: 12px; color: #44443e; }
.user-box small { font-size: 10px; color: #73736a; }
.session-actions { justify-content: end; gap: 2px; padding: 2px 0 0; }
.session-actions button { font-size: 10px; min-height: 26px; padding: 3px 4px; color: #64645b; border-radius: 13px; }
.main { margin: 0 auto; padding: 18px 10px 28px; width: 100%; max-width: 1800px; }
.topbar { margin-bottom: 19px; min-height: 72px; align-items: center; }
.topbar h1 { margin-bottom: 4px; font-size: 33px; letter-spacing: -1px; }
.topbar .eyebrow { color: #626258; font-size: 10px; letter-spacing: 2px; margin-bottom: 7px; }
.topbar p { font-size: 12px; line-height: 1.8; color: #73736a; }
.top-actions { gap: 9px; }
.live { font-size: 11px; color: #626258; }
.live:before { background: #3a856b; box-shadow: 0 0 0 3px #e4eee8; margin-right: 9px; }
.footer { color: #626258; font-size: 10px; margin-top: 26px; padding: 0 4px; }

/* Controls use the same shape and rhythm in filters, dialogs and editors. */
.btn { min-height: 40px; padding: 9px 15px; border-radius: var(--radius-control); border-color: #e2e2d8; background: #fff; box-shadow: 0 1px 2px #273b4806; font-weight: 600; font-size: 12px; }
.btn.primary { background: linear-gradient(180deg, #363631, #292927); border-color: #292927; box-shadow: inset 0 1px 0 #ffffff30, 0 3px 8px #29292718; color: #fff; }
.btn.ghost { background: #ffffff80; }
.btn.danger { background: #fff7f6; border-color: #eaccc9; color: #a43530; }
.btn.small { min-height: 36px; border-radius: 22px; }
.btn.full { min-height: 48px; }
.topbar .refresh { border-radius: 50%; width: 40px; height: 40px; min-width: 40px; padding: 0; }
.field { gap: 8px; }
.field>span { color: #54544e; font-size: 12px; }
.field small, .small-note { font-size: 12px; line-height: 1.7; }
.field input, .field select, .field textarea, .filter input, .filter select,
.value-filters input, .value-filters select, .value-project-editor input, .value-project-editor select,
.allocate-row select, .allocate-row input {
  min-height: 42px; border: 1px solid #ddded5; border-radius: 14px; background: #fafaf5; padding: 10px 12px; color: var(--ink);
  box-shadow: inset 0 1px 2px #1a324004;
}
.field input:focus, .field select:focus, .filter input:focus, .filter select:focus { background: #fff; border-color: #998632; }
input[readonly], input:disabled, select:disabled { background: #eeeee8; color: #686861; }
input[type=checkbox], input[type=radio] { accent-color: var(--green); }
.filter>span { font-size: 11px; color: #63635d; }
.filters { gap: 14px; margin-bottom: 20px; }
.overview-filters { padding: 14px 20px 0; margin-bottom: 14px; border-radius: 25px; background: var(--material); border: 1px solid #ffffffc9; box-shadow: var(--shadow-material); display: flow-root; }
.overview-filters .filters { gap: 12px; }
.overview-advanced>summary { border-radius: 11px; min-height: 42px; border-color: #ddded5; padding: 10px 14px; }
.overview-advanced-fields { border-radius: 17px; box-shadow: var(--shadow-material); padding: 18px; }
.tabs { gap: 5px; padding: 9px 16px; align-items: center; background: #f7f7ef; }
.tabs button { padding: 9px 15px; border: 1px solid transparent; border-radius: 10px; min-height: 38px; color: #66665d; }
.tabs button.active { background: #fff; border-color: #e5e5dc; color: var(--green); box-shadow: 0 2px 5px #1a344309; }
.overview-segment { border-radius: 25px; background: #e8e6d8; border: 1px solid #ffffffc9; padding: 4px; box-shadow: inset 0 1px 4px #32515d12, 0 1px 0 #fff; }
.overview-segment .btn { border-radius: 22px; min-height: 32px; }
.overview-segment .btn.selected { background: #fff; color: #353530; box-shadow: 0 2px 5px #24324115; }

/* Opaque content surfaces preserve contrast and sticky-table compositing. */
.panel, .kpi, .value-metrics>.value-metric, .project-card { border-radius: var(--radius-panel); border: 1px solid #e9e8de; box-shadow: var(--shadow-panel); background: #fff; }
.panel-head { padding: 21px 22px 17px; }
.panel-head h2 { font-size: 16px; }
.panel-head p { font-size: 12px; }
.kpi { padding: 22px 24px; }
.kpi.featured { color: var(--ink); background: #fff1aa; border-color: #e9e1b2; }
.featured .kpi-label, .featured small { color: #747057; }
.kpi.featured .kpi-number { color: var(--green); }
.kpi-label { font-size: 12px; }
.kpi-number { font-size: 34px; font-weight: 500; letter-spacing: -1px; }
.kpi small { font-size: 11px; }
.gap-kpi { background: #fff8f2; border-color: #ecd9ca; }
.overview-summary { padding: 16px 22px; border-radius: 18px; border-color: #e4e0c8; background: #fffdf3; box-shadow: var(--shadow-panel); gap: 22px; }
.overview-summary strong { font-size: 34px; letter-spacing: -1px; }
.overview-summary span, .overview-summary small, .overview-summary p { font-size: 12px; }
.overview-summary p { margin-left: auto; }
table { font-size: 13px; font-variant-numeric: tabular-nums; }
th { background: #f3f3ec; color: #686860; font-size: 12px; font-weight: 550; }
th, td { border-bottom-color: #eeeee5; padding: 15px 18px; }
tbody tr:hover { background: #faf9ed; }
.tag { border-radius: 6px; padding: 3px 8px; font-size: 11px; font-weight: 500; }
.tag.off { color: #6d6d65; background: #eeeee8; }
.tag.warn, .notice { background: #fff4c4; color: #81571f; border-color: #e9d89a; }
.notice, .error-banner { border-radius: 12px; font-size: 12px; padding: 13px 16px; }
.notice.neutral { background: #f3f1e4; border-color: #e5e2ce; color: #66634e; }
.empty { padding: 58px 24px; line-height: 1.8; }
.empty strong { font-size: 16px; margin-bottom: 9px; }
.empty p { font-size: 13px; }
.table-total { background: #f6f3df; }
.audit-detail { font-size: 12px; line-height: 1.7; }
.project-card { padding: 22px; }
.project-card h3 { font-size: 17px; }
.project-card .project-info { font-size: 12px; line-height: 1.7; }
.shift-list { gap: 7px; margin: 17px 0 22px; }

.overview-panel .panel-head { padding: 17px 22px 10px; }
.overview-legend { font-size: 11px; padding: 0 22px 12px; }
.overview-table th, .overview-table td { border-bottom-color: #e6ebee; border-right-color: #eeeee5; }
.overview-table thead th { background: #f3f3eb; height: 60px; }
.overview-table .overview-project-col { padding: 14px 18px; }
.overview-table .overview-period-total { background: #f7f6eb; }
.overview-table thead .overview-project-col, .overview-table thead .overview-period-total { background: #efefe6; }
.overview-table .weekend-heading { background: #f7f5f0; }
.overview-table .weekend-cell { background: #fffdfa; }
.overview-table .today-heading { background: #fff0ad; }
.overview-day { min-height: 78px; padding: 10px; gap: 6px; }
.overview-day>strong { font-size: 20px; font-weight: 620; }
.overview-day.missing>strong { color: #87939a; }
.overview-day.is-today { background: #fff9df; }
.overview-day:hover, .overview-day:focus-visible { background: #fff0ad !important; }
.overview-breakdown>span { color: #717168; font-size: 11px; }
.overview-breakdown b { color: #68685e; }
.overview-table tfoot th, .overview-table tfoot td { background: #f6f2d9; }
.overview-table tfoot .overview-project-col, .overview-table tfoot .overview-period-total { background: #efe9c7; }
.overview-footnote { font-size: 11px; padding: 13px 22px; }
.overview-tooltip { border-radius: 18px; border-color: #d9e1e4; padding: 20px; box-shadow: 0 12px 40px #213b4929; }
.overview-tip-shift, .overview-tip-heading>span, .overview-tip-heading>small { font-size: 12px; }

/* Keep all employee chips and their fixed color variables unchanged. */
.schedule-legend { gap: 9px; margin-bottom: 20px; }
.schedule-filter-toggle { display: none; }
.schedule-filter-meta { display: flex; justify-content: space-between; gap: 15px; align-items: start; }
.schedule-filter-meta>label { font-size: 12px; color: var(--muted); display: flex; gap: 6px; align-items: center; min-height: 32px; }
.schedule-filter-meta .schedule-legend { margin-bottom: 16px; }
.schedule-quick [aria-pressed=true] { border-color: #c3ad55; background: #f9edb3; color: #52491f; }
.person-chip { border-radius: 8px; padding: 5px 10px; }
.schedule-table th, .schedule-table td { padding: 10px 8px; border-right-color: #eeeee5; }
.schedule-table th:first-child { background: #f3f3eb; }
.schedule-table .morning-row td:first-child { background: #f8faf3; }
.schedule-table .evening-row td:first-child { background: #f3f6fa; }
.schedule-table .schedule-cell { min-height: 72px; }
.schedule-cell { border-radius: 11px; padding: 10px 7px; }
.schedule-cell.closed { background: #efefe9; color: #67727a; }
.schedule-cell.unassigned { background: #fff7f0; border-color: #deb89c; color: #9b4c24; }
.schedule-cell .person-chip { font-size: 12px; }
.schedule-quick .btn.active { background: #fff; border-color: #bbae74; color: var(--green); box-shadow: 0 2px 7px #253c3010; }
.template-day { padding: 15px; border: 1px solid #e5e5dc; border-radius: 14px; background: #f8f8f1; margin-bottom: 13px; gap: 10px; }
.schedule-members-picker { border-radius: 11px; border-color: #e2e2d6; }
.schedule-members-picker summary { min-height: 44px; padding: 12px; }
.schedule-member-choice { min-height: 42px; border-radius: 8px; }
.schedule-member-count { font-size: 12px; }
.project-shift-choice, .permission-choice, .value-link-options label { border-radius: 12px; padding: 15px; background: #f8f8f1; border-color: #e2e2d6; }
.permission-choice small { font-size: 12px; color: #68685e; }
.permission-settings { border-radius: 16px; }

/* Financial hierarchy: summary strip, quiet tools, readable full-length rows. */
.value-metrics { gap: 14px; }
.value-metrics>.value-metric { padding: 16px 20px; }
.value-metric>strong { line-height: 1.2; font-size: clamp(23px, 2.15vw, 31px); font-weight: 500; letter-spacing: -.8px; }
.value-metric>span { color: var(--muted); font-size: 12px; margin-bottom: 7px; }
.value-metrics>.value-metric:first-child { background: #2b2b28; border-color: #e9e1b2; }
.value-metrics>.value-metric:first-child>strong { color: #fff7c8; }
.value-page>.notice { padding: 10px 16px; margin-bottom: 12px; }
.value-context { gap: 6px 22px; line-height: 1.7; margin: 8px 2px 12px; }
.value-panel-toolbar { padding: 8px 15px; background: var(--material); gap: 14px; border: 1px solid #ffffffc9; border-radius: 30px; box-shadow: var(--shadow-material); margin: 8px 0 12px; }
.value-panel-toolbar .tabs { border-radius: 25px; padding: 3px; gap: 3px; background: #e6e5da; box-shadow: inset 0 1px 4px #264a5812; }
.value-panel-toolbar .tabs .btn { border: 1px solid transparent; min-height: 40px; border-radius: 23px; padding: 8px 19px; }
.value-panel-toolbar .tabs .btn.active { background: #fff; border-color: #fff; box-shadow: 0 2px 5px #24324115; color: var(--green); }
.value-report-actions [data-action=value-export-pdf] { background: #fff; color: #4b4324; border-color: #e2d7a4; }
.value-filters { padding: 11px 20px 7px; gap: 10px; }
.value-filters .field>span { font-size: 12px; }
.value-scope { padding: 9px 20px 13px; gap: 8px 20px; background: #fff; }
.value-scope small { font-size: 11px; }
.value-table th { font-size: 12px; }
.value-table td { padding: 18px 16px; }
.value-table td small { font-size: 12px; }
.value-output strong { font-size: 21px; font-weight: 500; }
.value-data-bar { height: 6px; background: #e9efec; border-radius: 4px; margin: 11px 0 8px; }
.value-data-bar>span { background: #42876a; }
.value-rank { border-radius: 6px; background: #f0f3f5; font-size: 11px; color: #626e78; }
.value-rank.top { background: #eaf3ee; color: #31634d; }
.value-project-tag { padding: 8px 10px; gap: 4px; border-radius: 10px; background: #f4f8f5; border-color: #e0e9e3; }
.value-table td .value-project-tag>small, .value-project-tag>small { font-size: 11px; }
.value-projects, .value-cards { gap: 18px; padding: 22px; }
.value-person { border: 1px solid #e4e4d9; border-radius: 17px; padding: 22px; background: #fff; box-shadow: 0 2px 5px #21313b03; }
.value-person h3 { font-size: 17px; }
.value-person p { font-size: 12px; }
.value-project-editor { padding: 24px; }
.value-project-overview { gap: 22px; margin-top: 18px; padding-bottom: 22px; }
.value-project-revenue>strong { font-size: 30px; font-weight: 500; letter-spacing: -.8px; }
.value-project-revenue>span, .value-project-revenue>small, .value-inline-heading .field>span { font-size: 12px; }
.value-project-editor .value-inline-note { font-size: 12px; line-height: 1.8; }
.value-share-name { border-radius: 10px; min-height: 40px; }
.value-share-name small { opacity: 1; }
.value-share-tooltip { border-radius: 12px; background: #32322d; }
.value-draft { border-radius: 18px; background: var(--material); border-color: #cfc69e; padding: 18px 22px; box-shadow: var(--shadow-material); }
.value-preview-summary { background: #f3f1e4; border-radius: 14px; }
.value-preview-person { border-radius: 12px; border-color: #e4e4d9; }
.value-pdf-groups { gap: 14px; }
.value-pdf-groups fieldset { padding: 14px 16px; border-radius: 14px; border-color: #dce4e7; background: #fff; }
.value-pdf-groups legend { color: #62582a; font-size: 13px; }
.value-pdf-groups label { color: var(--ink); min-height: 40px; }
.value-pdf-groups input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--green); }
.value-pdf-groups label:has(input:disabled) { opacity: .6; }
.value-pdf-dialog .dialog-foot { background: #faf9ee; bottom: -26px; padding-bottom: 18px; }

/* Native top-layer dialogs keep independent scrolling; no hit-test overlays. */
dialog, .value-dialog { border: 1px solid #ffffffd9; border-radius: 24px; color: var(--ink); background: var(--material); box-shadow: inset 0 1px 1px #fff, 0 24px 80px #1c303c33, 0 0 0 1px #273b4712; max-height: calc(100dvh - 48px); overscroll-behavior: contain; }
dialog::backdrop, .value-dialog::backdrop { background: rgb(34 61 80 / .2); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); }
.dialog-head { padding: 22px 24px; background: var(--material); border-color: #e4e3d6; }
.dialog-head h2, .value-dialog-head h2 { font-size: 21px; font-weight: 500; }
.dialog-close, .value-dialog-head>button { width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center; border-radius: 50%; background: #eae9dd; font-size: 22px; color: #69695e; }
.dialog-body { padding: 24px; }
.dialog-foot, .value-dialog .dialog-foot { border-top: 1px solid #e4e4d9; padding-top: 18px; margin-top: 24px; gap: 10px; }
.value-dialog { padding: 26px; }
.value-dialog-head { margin-bottom: 24px; }
#toast { border-radius: 14px; background: #33332c; box-shadow: 0 8px 24px #1d342c25; }

/* Login is a focused, light workspace entrance, without a fabricated chart. */
.login { grid-template-columns: minmax(0, 1fr) minmax(360px, 440px); gap: 70px; max-width: 1136px; min-height: 100dvh; margin: auto; padding: 70px 40px; align-items: center; }
.login-story { background: none; color: var(--ink); padding: 0; min-height: 550px; overflow: visible; }
.login-story .brand-mark { background: linear-gradient(145deg, #383834, #242422); color: white; }
.login-story .brand small { color: var(--muted); }
.login-story h1 { font-size: clamp(34px, 3.4vw, 48px); font-weight: 500; line-height: 1.5; letter-spacing: -1.5px; margin-bottom: 20px; }
.login-story p { color: var(--muted); font-size: 15px; line-height: 1.95; }
.login-story footer { color: var(--muted); font-size: 11px; letter-spacing: 1px; }
.login-form-wrap { padding: 0; }
.login-form { max-width: 440px; border: 1px solid #ffffffed; border-radius: 28px; background: var(--material); box-shadow: var(--shadow-material); padding: 36px; }
.login-form h2 { font-size: 25px; letter-spacing: -.5px; }
.login-form>p { font-size: 13px; }
.login-form .eyebrow { font-size: 9px; }
.login-form input { min-height: 48px; background: #ffffffc9; }
.login-form .inline-error:empty { min-height: 0; margin: 4px 0 22px; }
.loading-screen { font-size: 14px; color: #5d5d51; }


@media (hover: hover) and (pointer: fine) {
  .btn:not(:disabled):hover { border-color: #cbc7aa; background: #f8f5e3; box-shadow: 0 3px 9px #273b480b; }
  .btn.primary:not(:disabled):hover { color: white; background: #45443a; border-color: #45443a; }
  .btn.danger:not(:disabled):hover { color: #922e29; background: #feefec; border-color: #deb3ad; }
  .nav button:not(.active):hover, .session-actions button:hover { background: #ffffffa6; color: #474337; }
  .schedule-cell[data-action]:hover { box-shadow: 0 2px 8px #273b4810; }
}
.btn:not(:disabled):active, .nav button:active { transform: scale(.98); }

@media (min-width: 1280px) {
  .value-filters { grid-template-columns: minmax(145px, 1.25fr) repeat(4, minmax(120px, 1fr)) auto; }
  .value-filters .btn { padding-inline: 12px; }
}

.nav-more-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.nav-more-grid button { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 15px; border: 1px solid #d9e5e8; border-radius: 18px; background: #ffffffa6; color: #595646; font-size: 14px; }
.nav-more-grid button.active { color: white; }
.nav-more-grid .nav-icon { flex: none; }
@media (max-width: 1000px) and (min-width: 761px) {
  .nav { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 4px; overflow: visible; }
  .nav button { min-height: 38px; }
}
@media (max-width: 1250px) and (min-width: 761px) {
  .app { padding: 14px 18px 0; }
  .sidebar.workspace-chrome { grid-template-columns: 108px minmax(0,1fr) 96px; gap: 10px; padding: 10px 16px; }
  .sidebar .brand small { display: none; }
  .nav button { min-width: 0; padding: 10px 6px; gap: 5px; font-size: 12px; }
  .nav-icon, .nav-icon svg { width: 17px; height: 19px; }
  .main { padding: 25px 4px; }
}
@media (max-width: 760px) {
  body { background: radial-gradient(ellipse at 0 0, #edede7 0, transparent 65%), radial-gradient(ellipse at 100% 0%, #fff0a8, transparent 65%), #efeee7; background-attachment: fixed; }
  .app { display: block; padding: 0 16px; }
  .sidebar.workspace-chrome { display: flex; flex-direction: row; position: static; justify-content: space-between; min-height: 64px; height: auto; padding: 16px 0 5px; margin: 0; background: transparent; border: 0; border-radius: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .workspace-chrome::before { display: none; }
  .sidebar .brand { padding: 0; gap: 8px; }
  .sidebar .brand-mark { width: 32px; height: 32px; font-size: 21px; border-radius: 11px; }
  .brand strong { font-size: 17px; }
  .brand small { font-size: 7px; letter-spacing: .6px; }
  .workspace-account { margin-left: auto; }
  .sidebar-bottom { display: none; }
  .sidebar .mobile-account { position: static; display: flex; gap: 8px; align-items: center; max-width: 170px; color: #626052; }
  .mobile-account button { min-height: 44px; padding: 8px 4px; font-size: 12px; max-width: 120px; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; }
  .nav-dock { position: fixed; z-index: 30; left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); height: 79px; border: 1px solid #ffffffd9; border-radius: 32px; display: flex; align-items: center; padding: 5px 5px 5px 7px; background: #f8f6e8; box-shadow: 0 2px 4px #1f46502b, 0 10px 32px #234a5d29, inset 0 1px 1px #fff, inset 0 -1px 1px #ffffff80; }
  .nav-dock::before { display: block; }
  .nav { flex: 1; min-width: 0; gap: 1px; padding: 3px 0; overflow: visible; }
  .nav .nav-secondary { display: none; }
  .nav:empty { display: none; }
  .nav-dock:not(:has(button)) { display: none; }
  .nav button { flex: 1; min-width: 0; min-height: 60px; flex-direction: column; gap: 5px; padding: 6px 4px; border-radius: 25px; font-size: 11px; }
  .nav-icon { width: 23px; height: 23px; }
  .nav-icon svg { width: 22px; height: 22px; }
  .nav-more { display: flex; position: relative; flex: 0 0 68px; min-width: 0; height: 60px; flex-direction: column; gap: 5px; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: 25px; margin-left: 1px; padding: 6px 3px; font: inherit; font-size: 11px; font-weight: 600; color: #5a5748; background: transparent; }
  .nav-more.active { color: #fff; background: linear-gradient(145deg, #353532, #292927); border-color: #ffffff5c; }
  .nav-more.active .nav-icon { color: #fff; }
  .nav-dock:has(.nav:empty) .nav-more { flex: 1; }
  .nav-menu { width: calc(100% - 24px); margin: auto auto calc(18px + env(safe-area-inset-bottom, 0px)); }
  .nav-more-grid { gap: 10px; }
  .main { padding: 18px 0 calc(118px + env(safe-area-inset-bottom, 0px)); }
  body:has(dialog[open]) .nav-dock, body:has(input:focus, textarea:focus, select:focus) .nav-dock { visibility: hidden; pointer-events: none; }
  .topbar { display: flex; flex-wrap: wrap; gap: 12px; min-height: 0; margin-bottom: 20px; }
  .topbar>div:first-child { min-width: 0; }
  .topbar h1 { font-size: 28px; line-height: 1.4; }
  .topbar p { font-size: 12px; max-width: 330px; }
  .eyebrow { font-size: 9px; margin-bottom: 7px; }
  .top-actions { margin-left: auto; flex-wrap: wrap; }
  .top-actions .btn { min-height: 40px; font-size: 12px; padding: 9px 12px; }
  .top-actions .refresh { padding: 0; }
  .main:has(.overview-panel) .topbar { margin-bottom: 20px; }
  .main:has(.overview-panel) .top-actions { margin-top: 14px; }
  .btn, .btn.small, .filters .btn { min-height: 42px; }
  .field input, .field select, .field textarea, .filter input, .filter select,
  .value-filters input, .value-filters select, .value-project-editor input, .value-project-editor select,
  .entry-row .field input, .entry-row .field select, .allocate-row select, .allocate-row input {
    font-size: 16px; min-height: 46px; padding: 10px 11px;
  }
  .filter>span, .field>span, .template-day .field>span { font-size: 12px; }
  .overview-filters { margin-bottom: 14px; padding: 14px 12px 0; border-radius: 22px; }
  .overview-filters .filter:nth-child(3) { min-width: calc(50% - 9px); }
  .overview-advanced { margin-left: 0; }
  .overview-advanced>summary { min-height: 44px; font-size: 12px; }
  .overview-summary { padding: 17px 18px; gap: 10px; }
  .overview-summary strong { font-size: 31px; }
  .overview-summary>p { margin-left: 0; width: 100%; }
  .overview-summary p>span { display: inline; }
  .overview-summary span, .overview-summary small, .overview-summary p { font-size: 12px; }
  .overview-panel .panel-head { padding: 18px 16px 13px; }
  .overview-panel .panel-head h2 { font-size: 16px; }
  .overview-panel .panel-head p { font-size: 11px; line-height: 1.8; }
  .overview-view-controls { max-width: 143px; }
  .overview-segment .btn { min-height: 38px; padding: 6px 10px; font-size: 12px; }
  .overview-legend { padding: 0 16px 13px; font-size: 11px; gap: 8px 13px; }
  .overview-mobile { padding: 0 16px 8px; }
  .overview-mobile-project { padding: 18px 0; gap: 16px; }
  .overview-mobile-project h3 { font-size: 14px; line-height: 1.6; }
  .overview-mobile-project>div>small { font-size: 11px; }
  .overview-mobile-project .overview-day { min-height: 88px; border-radius: 12px; background: #f8f5e3; border-color: #e4dfc5; padding: 12px; }
  .overview-footnote { padding: 13px 16px; font-size: 11px; }
  .kpis { gap: 10px; }
  .kpi { padding: 18px 16px; border-radius: 17px; }
  .kpi-number { font-size: 29px; }
  .kpi small { font-size: 11px; }
  .panel { border-radius: 18px; }
  .panel-head { padding: 18px 16px 14px; }
  .panel-body { padding: 14px 16px 18px; }
  .project-grid { grid-template-columns: 1fr; gap: 14px; }
  .project-card { padding: 21px; }
  .schedule-mobile .panel-head { padding-bottom: 16px; }
  .mobile-shift { padding: 14px 0; gap: 14px; }
  .mobile-shift>div:first-child>strong { font-size: 14px; }
  .mobile-shift>div:first-child>small { font-size: 12px; }
  .mobile-shift>div:first-child>button { min-height: 40px; font-size: 12px; }
  .schedule-mobile .schedule-cell { min-height: 64px; }
  .person-chip { font-size: 12px; }
  .schedule-quick { gap: 8px; }
  .main:has(.schedule-filter-panel) .topbar { position: relative; display: block; padding-right: 100px; margin-bottom: 14px; }
  .main:has(.schedule-filter-panel) .topbar p { max-width: 220px; }
  .main:has(.schedule-filter-panel) .top-actions { position: absolute; top: 0; right: 0; margin: 0; }
  .main:has(.schedule-filter-panel) .top-actions .btn.primary { font-size: 0; width: 44px; padding: 0; }
  .main:has(.schedule-filter-panel) .top-actions .btn.primary::before { content: "+"; font-size: 24px; }
  .schedule-filter-panel { border: 1px solid #e6e3d1; border-radius: 14px; background: #faf9ed; margin-bottom: 12px; }
  .schedule-filter-toggle { display: flex; width: 100%; min-height: 54px; align-items: center; justify-content: space-between; gap: 14px; padding: 11px 14px; text-align: left; }
  .schedule-filter-toggle>span:first-child { min-width: 0; display: flex; align-items: baseline; gap: 12px; }
  .schedule-filter-toggle strong { font-size: 13px; flex: none; }
  .schedule-filter-toggle small { display: block; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .filter-disclosure { color: var(--green); font-size: 12px; flex: none; }
  .schedule-filter-panel:not(.is-open) .schedule-filter-fields { display: none; }
  .schedule-filter-fields { padding: 3px 13px 13px; }
  .schedule-filter-fields .filters { margin-bottom: 12px; }
  .schedule-filter-meta { display: block; }
  .schedule-filter-meta>label { min-height: 44px; }
  .schedule-filter-meta .schedule-legend { margin-bottom: 2px; }
  .schedule-quick { margin: 0 0 14px; }
  .schedule-quick .btn { min-height: 44px; }
  .schedule-kpis .kpi { padding: 14px 10px; }
  .schedule-kpis .kpi-number { margin: 5px 0 0; font-size: 26px; }
  .schedule-kpis .kpi-label { font-size: 11px; }
  .schedule-kpis+.notice { font-size: 11px; padding: 12px 14px; margin-bottom: 14px; }
  .schedule-member-choice { min-height: 44px; }
  .schedule-member-choice input[type=checkbox] { width: 19px; height: 19px; }
  .template-day { padding: 13px; }
  .value-metrics { gap: 10px; }
  .value-metrics>.value-metric { padding: 19px 14px; border-radius: 17px; }
  .value-metric>strong { font-size: 22px; letter-spacing: -.7px; }
  .value-metric>span { font-size: 12px; margin-bottom: 9px; }
  .value-context { display: flex; flex-wrap: wrap; gap: 6px 15px; font-size: 12px; margin: 16px 2px 20px; }
  .value-panel-toolbar { padding: 10px; border-radius: 25px; }
  .value-panel-toolbar .tabs { width: 100%; }
  .value-panel-toolbar .tabs .btn { flex: 1; min-height: 42px; }
  .value-report-actions { gap: 8px; }
  .value-report-actions .btn { padding: 10px 9px; font-size: 12px; }
  .value-filters { padding: 16px 12px; gap: 12px 10px; }
  .value-filters .field>span { font-size: 12px; }
  .value-scope { padding: 10px 14px 16px; font-size: 12px; }
  .value-person { padding: 18px; border-radius: 15px; }
  .value-cards, .value-projects { padding: 12px; gap: 14px; }
  .value-person p { margin-bottom: 15px; }
  .value-card-top { gap: 8px; }
  .value-output strong { font-size: 23px; }
  .value-output>small, .value-staff-finance, .value-person h4 { font-size: 12px; }
  .value-project-revenue>strong { font-size: 29px; }
  .value-project-overview { margin: 16px 0; gap: 20px; }
  .value-share-chart { flex-wrap: wrap; gap: 18px; }
  .value-share-names { gap: 8px; flex: 1 1 110px; }
  .value-share-name { min-height: 42px; padding: 9px; }
  .value-inline-heading { align-items: end; gap: 9px; }
  .value-inline-heading>.field { max-width: 170px; }
  .value-project-editor .value-assignment-heading .btn { min-height: 42px; font-size: 12px; }
  .value-draft { bottom: calc(104px + env(safe-area-inset-bottom, 0px)); border-radius: 16px; padding: 15px; max-height: 42dvh; }
  .value-draft-top .btn { min-height: 42px; font-size: 12px; }
  .value-draft-summary, .value-draft-people { font-size: 12px; }
  dialog, .value-dialog { border-radius: 22px; width: calc(100% - 20px); max-height: calc(100dvh - 24px); }
  .dialog-head { padding: 18px; }
  .dialog-head h2, .value-dialog-head h2 { font-size: 19px; }
  .dialog-close, .value-dialog-head>button { width: 40px; height: 40px; flex-basis: 40px; }
  .dialog-body { padding: 18px; }
  .dialog-foot, .value-dialog .dialog-foot { position: sticky; bottom: -18px; background: #faf9ee; margin-bottom: -18px; padding: 14px 0 18px; z-index: 2; }
  .dialog-foot>.btn { min-height: 44px; }
  .value-dialog { padding: 20px 18px; }
  .value-dialog .dialog-foot { bottom: -20px; }
  .value-pdf-groups label { min-height: 44px; }
  .value-pdf-groups input[type=checkbox] { width: 20px; height: 20px; }
  .value-pdf-dialog .dialog-foot { flex-wrap: wrap; }
  .value-pdf-dialog .dialog-foot .btn { flex: 1 1 auto; }
  .value-dialog .form-grid, .form-grid { grid-template-columns: minmax(0, 1fr); }
  .value-allocation-row { gap: 10px; }
  .value-link-options label { min-height: 48px; }
  .permission-settings { padding: 12px; }
  .permission-choice { padding: 14px; }
  .member-permission-tags .tag { font-size: 11px; }
  .footer { font-size: 10px; line-height: 1.8; gap: 10px; }
  .login { display: flex; flex-direction: column; gap: 28px; min-height: 100dvh; padding: 30px 20px; align-items: stretch; }
  .login-story { min-height: 0; padding: 0 8px; gap: 30px; }
  .login-story h1 { font-size: 28px; line-height: 1.45; letter-spacing: -.8px; margin: 0 0 12px; }
  .login-story p { font-size: 13px; line-height: 1.8; }
  .login-form { padding: 25px 23px; border-radius: 24px; }
  .login-form h2 { font-size: 23px; }
  .login-form>p { margin-bottom: 24px; }
  .login-form-wrap:has(#first-password) { padding: 20px; }
}



/* Transparency preference support is uneven, so the default fallback above
   is already opaque. This media rule also removes decorative backdrop tint. */
@media (prefers-reduced-transparency: reduce) {
  :root { --material: #f7f6ee; }
  body { background: var(--paper); }
  .workspace-chrome, .nav-dock, .login-form, .value-draft, .overview-filters, .value-panel-toolbar, dialog, .value-dialog { background: #f8f7ee; -webkit-backdrop-filter: none; backdrop-filter: none; }
  dialog::backdrop, .value-dialog::backdrop { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgb(32 46 55 / .4); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .btn:not(:disabled):active, .nav button:active { transform: none; }
}
@media (forced-colors: active) {
  .panel, .sidebar, .btn, dialog, .value-person { border: 1px solid CanvasText; box-shadow: none; }
  .nav button.active, .tabs button.active { outline: 2px solid Highlight; }
}

/* Warm workspace composition: thin navigation, asymmetric summaries. */
:root { --radius-panel: 22px; --radius-control: 22px; }
body { background: radial-gradient(ellipse at 92% 12%, #fff0ac 0, #fff0ac70 17%, transparent 46%), radial-gradient(ellipse at 30% 90%, #f6efc2, transparent 58%), #eaeae5; }
.app { padding: 16px 28px 0; }
.sidebar.workspace-chrome { min-height: 54px; top: 10px; padding: 6px 10px; border: 0; border-radius: 16px; background: #f1f1e9; box-shadow: none; gap: 20px; }
.workspace-chrome::before, .nav-dock::before { display: none; }
.nav { padding: 3px; background: #fafaf3; border-radius: 25px; }
.nav button { min-height: 36px; padding: 7px 9px; font-size: 12px; font-weight: 500; gap: 6px; }
.nav button.active, .nav-more.active, .nav-more-grid button.active { background: #2d2d29; border-color: transparent; box-shadow: none; color: #fffdf0; }
.nav .nav-icon, .nav .nav-icon svg { width: 16px; height: 16px; }
.brand-mark, .login-story .brand-mark { background: #30302c; box-shadow: none; }
.main { padding: 24px 10px 30px; }
.topbar { min-height: 65px; margin-bottom: 22px; }
.topbar h1 { font-size: 32px; font-weight: 450; letter-spacing: -1.1px; }
.topbar p { color: #626258; }
.btn { box-shadow: none; font-weight: 500; }
.btn.primary { background: #34342f; border-color: #34342f; box-shadow: none; color: #fffdf1; }
.panel, .project-card { border: 1px solid #f9f9f0; box-shadow: none; background: #fffef7; }
th { background: #f2f2e9; }
.overview-dashboard { display: grid; grid-template-columns: 1fr 1.18fr 1.1fr; gap: 14px; margin-bottom: 20px; align-items: stretch; }
.overview-dashboard>* { min-width: 0; margin: 0; border: 0; border-radius: 22px; }
.overview-summary { display: flex; flex-direction: column; align-items: stretch; justify-content: space-between; gap: 16px; padding: 24px 26px; background: #2c2d29; color: #fff9d7; box-shadow: none; }
.overview-summary>div { display: flex; flex-wrap: wrap; gap: 0 8px; align-items: baseline; }
.overview-summary>div>span { width: 100%; font-size: 13px; color: #e4e2d2; margin-bottom: 14px; }
.overview-summary strong { font-size: 52px; font-weight: 350; line-height: 1.05; letter-spacing: -2px; color: #fff6c4; }
.overview-summary small { color: #d2d0bd; }
.overview-summary p { margin: 0; color: #c1c1b4; line-height: 1.9; font-size: 11px; }
.overview-summary p>span { display: block; color: #c1c1b4; }
.overview-trend { background: #fffbe9; padding: 21px 23px; display: flex; flex-direction: column; justify-content: space-between; }
.overview-trend-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.overview-trend-head h2 { font-size: 14px; font-weight: 500; margin: 0; }
.overview-trend-head>span { font-size: 11px; color: #6c6b5e; }
.overview-trend-bars { display: flex; height: 80px; gap: 4px; margin: 17px 0 9px; align-items: end; }
.overview-trend-day { flex: 1; min-width: 0; height: 100%; display: flex; align-items: end; }
.overview-trend-day>span { width: 100%; background: #41413a; border-radius: 4px; min-height: 2px; }
.overview-trend-day.is-today>span { background: #d1a525; }
.overview-trend-day.is-missing>span { background: #cfccba; }
.overview-trend-axis { display: flex; justify-content: space-between; align-items: center; font-size: 11px; color: #777463; }
.overview-trend-axis small { font-size: 10px; }
.overview-dashboard .overview-filters { padding: 18px; background: #f7f7ee; box-shadow: none; }
.overview-dashboard .filters { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 10px; margin: 0; }
.overview-dashboard .filter { min-width: 0; width: auto; }
.overview-dashboard .filter input, .overview-dashboard .filter select { width: 100%; min-width: 0; min-height: 38px; padding: 8px 9px; font-size: 12px; }
.overview-dashboard .overview-filter-actions { display: flex; gap: 5px; min-width: 0; align-items: end; }
.overview-dashboard .overview-advanced { min-width: 0; }
.overview-dashboard .overview-advanced>summary { padding: 9px; min-height: 38px; font-size: 11px; white-space: nowrap; }
.overview-dashboard .overview-filter-actions>.btn { padding: 8px; min-height: 38px; font-size: 11px; }
.overview-dashboard .overview-advanced-fields { z-index: 25; }
.overview-panel .panel-head { padding-top: 20px; }
.value-metrics { grid-template-columns: 1.65fr 1fr 1fr .8fr; gap: 14px; }
.value-metrics>.value-metric { min-height: 110px; padding: 20px 24px; display: flex; flex-direction: column; justify-content: space-between; background: #fafaf1; border: 0; }
.value-metrics>.value-metric:first-child { background: #2c2d29; }
.value-metrics>.value-metric:first-child>span { color: #e0dfcd; }
.value-metrics>.value-metric:first-child>strong { color: #fff3b4; font-size: 42px; font-weight: 350; }
.value-metrics>.value-metric:nth-child(3) { background: #fff2b7; }
.value-metrics>.value-metric>strong { font-size: 30px; font-weight: 400; }
.value-metrics .metric-decimal { font-size: .65em; font-weight: 400; letter-spacing: -.4px; }
.value-context { margin: 10px 3px 14px; color: #626258; }
.value-panel-toolbar { background: transparent; border: 0; border-radius: 0; padding: 4px 0; margin: 12px 0; box-shadow: none; }
.value-panel-toolbar .tabs { background: #deded1; box-shadow: none; padding: 3px; }
.value-panel-toolbar .tabs .btn.active { background: #35352f; color: #fffcea; border-color: #35352f; box-shadow: none; }
.value-report-actions [data-action=value-export-pdf] { background: #fff4bb; border-color: #e6da9f; color: #514920; }
.value-own-metrics { grid-template-columns: 1.5fr 1fr; }
.value-scope { background: #fffef7; }
.value-filters { padding-top: 10px; }
.value-table td { padding-top: 20px; padding-bottom: 20px; }
.schedule-kpis { display: grid; grid-template-columns: 1.8fr 1fr 1fr; gap: 0; background: #2d2e29; border-radius: 22px; margin-bottom: 18px; padding: 20px 24px; }
.schedule-kpis .kpi { border: 0; background: none; box-shadow: none; border-radius: 0; padding: 0 22px; }
.schedule-kpis .kpi:first-child { padding-left: 0; }
.schedule-kpis .kpi+.kpi { border-left: 1px solid #56564c; }
.schedule-kpis .kpi-label { color: #d9d8c6; font-size: 12px; }
.schedule-kpis .kpi-number { color: #fff4b6; font-size: 38px; font-weight: 350; margin: 8px 0 0; }
.schedule-kpis .kpi-number span { color: #c0c0b1; font-size: 11px; }
.schedule-filter-panel { padding: 16px 18px 0; background: #f9f9ef; border-radius: 20px; margin-bottom: 12px; }
.schedule-filter-panel .filters { margin-bottom: 14px; }
.schedule-quick { margin-bottom: 16px; }
.schedule-quick [aria-pressed=true] { background: #ffeaa2; border-color: #d8c56e; }
.nav-more-grid button { background: #fffcef; border-color: #e6e2ca; }
dialog, .value-dialog { background: #fbfaef; box-shadow: 0 24px 80px #47432930; border-color: #fdfbed; }
dialog::backdrop, .value-dialog::backdrop { background: #33332955; backdrop-filter: none; -webkit-backdrop-filter: none; }
.dialog-head { background: #f3f2e5; }
@media (max-width: 1250px) and (min-width: 761px) {
 .app { padding: 14px 16px 0; }
 .sidebar.workspace-chrome { padding: 6px 8px; gap: 8px; }
 .nav button { font-size: 11px; padding: 8px 6px; gap: 4px; }
 .main { padding: 23px 4px; }
 .overview-dashboard { grid-template-columns: .9fr 1fr 1.2fr; gap: 10px; }
 .overview-summary { padding: 21px; }
 .overview-summary strong { font-size: 44px; }
 .overview-trend { padding: 20px 16px; }
 .overview-dashboard .overview-filters { padding: 16px 12px; }
 .value-metrics { grid-template-columns: 1.6fr 1fr 1fr .7fr; gap: 10px; }
 .value-metrics>.value-metric { padding: 22px 18px; }
 .value-metrics>.value-metric:first-child>strong { font-size: 35px; }
 .value-metrics>.value-metric>strong { font-size: 25px; }
}
@media (max-width: 760px) {
 body { background: radial-gradient(ellipse at 100% 0, #fff0b2 0, transparent 65%), #edede5; }
 .app { padding: 0 16px; }
 .sidebar.workspace-chrome { background: none; padding: 13px 0 3px; }
 .main { padding: 16px 0 calc(116px + env(safe-area-inset-bottom, 0px)); }
 .topbar h1 { font-size: 28px; font-weight: 450; }
 .nav-dock { height: 75px; padding: 5px 6px; border-radius: 26px; background: #f9f7e9; border: 1px solid #fffef5; box-shadow: 0 8px 30px #625b3833; }
 .nav { background: none; padding: 0; }
 .nav button, .nav-more { min-height: 59px; height: 59px; border-radius: 21px; font-size: 11px; padding: 6px 3px; gap: 5px; }
 .nav .nav-icon, .nav .nav-icon svg { width: 21px; height: 21px; }
 .nav-more.active { background: #2d2e29; border-color: transparent; }
 .overview-dashboard { grid-template-columns: 1fr 1fr; gap: 10px; }
 .overview-summary { padding: 18px; gap: 14px; }
 .overview-summary>div>span { font-size: 12px; margin-bottom: 10px; }
 .overview-summary strong { font-size: 36px; letter-spacing: -1px; }
 .overview-summary>p { font-size: 10px; }
 .overview-trend { padding: 17px 13px; }
 .overview-trend-head { gap: 5px; }
 .overview-trend-head h2 { font-size: 12px; }
 .overview-trend-bars { height: 55px; gap: 2px; }
 .overview-trend-axis small { display: none; }
 .overview-dashboard .overview-filters { grid-column: 1/-1; padding: 14px; }
 .overview-dashboard .filters { gap: 12px; }
 .overview-dashboard .filter:nth-child(3) { min-width: 0; }
 .overview-dashboard .filter input, .overview-dashboard .filter select { min-height: 44px; font-size: 16px; }
 .overview-dashboard .overview-filter-actions { align-items: end; }
 .overview-dashboard .overview-advanced>summary, .overview-dashboard .overview-filter-actions>.btn { min-height: 44px; }
 .value-metrics { grid-template-columns: 1fr 1fr; gap: 10px; }
 .value-metrics>.value-metric { min-height: 104px; padding: 19px 16px; }
 .value-metrics>.value-metric:first-child { grid-column: 1/-1; min-height: 118px; }
 .value-metrics>.value-metric:first-child>strong { font-size: 38px; }
 .value-metrics>.value-metric>strong { font-size: 25px; }
 .value-metrics>.value-metric:last-child:nth-child(4) { grid-column: 1/-1; min-height: 0; flex-direction: row; align-items: center; padding: 13px 18px; }
 .value-metrics>.value-metric:last-child:nth-child(4)>span { margin: 0; }
 .value-context { margin: 12px 2px 16px; }
 .value-panel-toolbar { gap: 12px; }
 .schedule-kpis { padding: 17px 16px; grid-template-columns: 1.25fr 1fr 1fr; margin-bottom: 14px; }
 .schedule-kpis .kpi { padding: 0 11px; }
 .schedule-kpis .kpi-label { font-size: 10px; white-space: nowrap; }
 .schedule-kpis .kpi-number { font-size: 30px; margin-top: 8px; }
 .schedule-kpis .kpi-number span { display: block; font-size: 10px; margin-top: 3px; }
 .schedule-filter-panel { padding: 0; background: #fbfaef; border-color: #e5e3d4; }
 .schedule-quick { gap: 7px; margin-bottom: 12px; }
 .schedule-quick .btn { background: #faf9ee; }
 .schedule-quick+.notice { font-size: 11px; padding: 11px 13px; margin-bottom: 14px; }
 .schedule-mobile .panel { background: #fffef6; }
 .schedule-mobile .panel-head { padding: 16px 18px 9px; }
 .schedule-mobile .panel-head h2 { font-size: 18px; font-weight: 500; }
 .mobile-shift { padding: 15px 0; }
}
/* Exact values remain accessible when the chart is sparse or the sum is large. */
.overview-trend { position: relative; }
.overview-trend-day { border-radius: 3px; }
.overview-trend-day.is-missing>span { height: 0 !important; min-height: 0; background: none; border-top: 1px dashed #9d9983; border-radius: 0; }
.overview-trend-day.is-zero>span { height: 7px !important; width: 7px; min-height: 7px; margin: 0 auto; border: 2px solid #595744; border-radius: 50%; background: transparent; }
.overview-trend-day:hover::after, .overview-trend-day:focus::after { content: attr(aria-label); position: absolute; top: 48px; left: 15px; right: 15px; background: #2d2d29; color: #fffcea; border-radius: 7px; padding: 7px 10px; text-align: center; font-size: 12px; z-index: 2; pointer-events: none; }
.overview-trend-day:focus-visible { outline: 2px solid #8b7420; outline-offset: 3px; }
.value-metrics>.value-metric.negative { background: #fbeee1; }
.value-metrics>.value-metric.negative>strong { color: #a43530; }
.value-metrics>.value-metric>strong { overflow-wrap: anywhere; }
.value-metrics>.value-metric.metric-long>strong { font-size: 22px; letter-spacing: -.6px; }
.value-metrics>.value-metric.metric-long:first-child>strong { font-size: 32px; }
@media (max-width: 1250px) { .value-metrics>.value-metric.metric-long:first-child>strong { font-size: 27px; } }
@media (max-width: 760px) {
 .value-metrics>.value-metric.metric-long>strong { font-size: 20px; }
 .value-metrics>.value-metric.metric-long:first-child>strong { font-size: 31px; }
}
@media (max-width: 760px) {
 .template-day { grid-template-columns: minmax(0,1fr); }
 .template-day>.field, .template-day>.field select { width: 100%; min-width: 0; }
}

.value-metrics .metric-integer, .value-metrics .metric-decimal { display: inline-block; white-space: nowrap; }
@media (max-width: 1250px) and (min-width: 761px) { .session-actions button { white-space: nowrap; font-size: 9px; padding-inline: 2px; } }
@media (max-width: 760px) { .value-metrics>.value-metric.metric-long { grid-column: 1/-1; } }
@media (prefers-reduced-transparency: reduce) { body { background: #efeee7; } }

/* Desktop navigation stays on the left; the compact phone dock is unchanged. */
@media (min-width: 761px) {
 .app { display: grid; grid-template-columns: 192px minmax(0,1fr); gap: 24px; padding: 16px 24px 0 16px; align-items: start; }
 .sidebar.workspace-chrome { display: flex; flex-direction: column; align-items: stretch; position: sticky; top: 16px; width: 100%; height: calc(100dvh - 32px); min-height: 0; padding: 22px 14px 14px; margin: 0; gap: 26px; border-radius: 24px; background: #f5f4e9; overflow-y: auto; }
 .sidebar .brand { padding: 0 7px; flex: none; }
 .sidebar .brand small { display: block; }
 .nav-dock { flex: 1 0 auto; border-radius: 0; }
 .nav { display: flex; flex-direction: column; overflow: visible; gap: 7px; padding: 0; border-radius: 0; background: none; }
 .nav button { flex: none; justify-content: start; width: 100%; min-height: 46px; padding: 12px 15px; gap: 12px; font-size: 13px; border-radius: 15px; }
 .nav .nav-icon, .nav .nav-icon svg { width: 18px; height: 18px; }
 .workspace-account { margin: auto 0 0; padding: 16px 4px 0; border-top: 1px solid #e4e1d0; }
 .user-box { justify-content: start; padding: 0 4px; }
 .user-box>div { flex-wrap: wrap; gap: 6px; }
 .user-box strong { font-size: 13px; }
 .session-actions { justify-content: space-between; padding-top: 8px; gap: 2px; }
 .session-actions button { font-size: 11px; padding: 7px 4px; min-height: 34px; white-space: nowrap; }
 .main { min-width: 0; width: 100%; padding: 6px 0 30px; margin: 0; }
}
@media (min-width: 761px) and (max-width: 1250px) {
 .app { grid-template-columns: 174px minmax(0,1fr); gap: 18px; padding-right: 18px; }
 .sidebar.workspace-chrome { padding-inline: 11px; }
 .nav button { padding-inline: 12px; }
 .overview-dashboard { grid-template-columns: 1fr 1.15fr; }
 .overview-dashboard .overview-filters { grid-column: 1/-1; }
 .overview-dashboard .filters { grid-template-columns: repeat(4,minmax(0,1fr)); }
 .overview-dashboard .overview-filter-actions { justify-content: end; }
 .value-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
/* User-selected QL artwork; keep image geometry intact at each brand size. */
.brand .brand-mark { flex: none; background: none; box-shadow: none; border-radius: 0; }
.brand-mark img { display: block; width: 100%; height: 100%; object-fit: contain; }
.sidebar .brand-mark { width: 40px; height: 40px; }
@media (max-width: 760px) { .sidebar .brand-mark { width: 36px; height: 36px; } }
