/* Budget and employee pages reuse the panel's surfaces, forms and type scale. */
.team-budget-page,.employee-profile-page { display:grid; gap:var(--surface-gap); min-width:0; }
html[data-theme] body.panel-typography #app .workspace :is(.team-budget-page,.employee-profile-page,.page-section-group)>.pay-surface { display:grid; gap:var(--surface-gap); min-width:0; padding:var(--surface-inset); margin:0; background:var(--surface); border:0; box-shadow:none; }
html[data-theme] body.panel-typography #app .workspace .team-budget-page > .pay-surface:has([data-pay-manager-edit-rates]) {
 --card-outline-experiment-color:var(--control-border);
 --outer-surface-border-color:var(--control-border);
 --outer-surface-border-width:1px;
 background:var(--list-row-fill);
}
.pay-loading-state { display:flex; align-items:center; justify-content:center; gap:var(--compact-gap); min-height:calc(var(--control-height) * 3); color:var(--muted); font-size:var(--panel-body-size); }
.pay-loading-state>.icon { width:20px; height:20px; flex:0 0 20px; color:var(--action); animation:employee-replacement-search 1.2s linear infinite; }
@media(prefers-reduced-motion:reduce) { .pay-loading-state>.icon { animation:none; } }
.pay-toolbar { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:var(--surface-gap); min-width:0; }
.pay-filters { display:flex; gap:var(--compact-gap); flex-wrap:wrap; min-width:0; }
.pay-filters>label { flex:1; min-width:0; margin:0; }
.team-budget-page>.team-view-toolbar { display:grid; grid-template-columns:minmax(0,1fr) minmax(360px,440px); align-items:end; gap:var(--surface-gap); }
.pay-header-filters { margin-left:auto; width:100%; max-width:100%; }
/* The shared input fill is important; these two controls sit outside a surface. */
@media(min-width:651px) {
 html[data-theme] body.panel-typography #app .pay-header-filters :is(.custom-select-trigger,select) { background-color:var(--surface)!important; }
}
.pay-toolbar .period { margin:0; }
.pay-toolbar>.period-presets { max-width:100%; overflow-x:auto; }
.pay-toolbar .period-presets>button { flex-shrink:0; white-space:nowrap; }
html[data-theme] body.panel-typography #app .team-budget-metrics { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,180px),1fr)); gap:var(--compact-gap); margin:0; padding:0; }
html[data-theme] body.panel-typography #app .team-budget-metrics>article { display:grid; align-content:start; gap:var(--compact-gap); min-width:0; padding:var(--surface-gap); background:var(--surface-subtle); border:0; border-radius:var(--inset-corner); corner-shape:var(--surface-curve); }
.team-budget-metrics>article>:is(span,small) { color:var(--muted); font-size:var(--panel-caption-size); line-height:1.5; }
html[data-theme] body.panel-typography #app .team-budget-metrics>article>strong { font-size:var(--panel-section-title-size); font-weight:550; line-height:1.4; overflow-wrap:anywhere; }
.pay-position-list,.pay-history { display:grid; min-width:0; }
.pay-position-list { gap:var(--compact-gap); }
.pay-position-row { display:grid; grid-template-columns:minmax(0,1fr) minmax(230px,.42fr) 20px; align-items:center; gap:var(--surface-gap); width:100%; min-width:0; box-sizing:border-box; padding:var(--surface-gap); background:var(--interactive-row-fill,var(--surface)); border:1px solid var(--interactive-row-border,var(--line)); border-radius:var(--inset-corner); color:var(--ink); text-align:left; font:inherit; cursor:pointer; transition:background-color 120ms ease,border-color 120ms ease; }
.pay-history-row+.pay-history-row { border-top:1px solid var(--line); }
.pay-position-row>span,.pay-history-row>div { display:grid; gap:calc(var(--compact-gap) / 2); min-width:0; }
.pay-position-row strong,.pay-history-row strong { font-size:var(--panel-body-size); font-weight:550; line-height:1.4; overflow-wrap:anywhere; }
.pay-position-row small,.pay-history-row span { color:var(--muted); font-size:var(--panel-caption-size); line-height:1.5; }
.pay-position-row>.icon { width:20px; height:20px; color:var(--muted); }
.pay-position-rate-line { display:flex; align-items:baseline; flex-wrap:wrap; gap:var(--compact-gap) var(--surface-gap); min-width:0; }
.pay-position-with-action .pay-position-name { padding:0; min-height:0; color:var(--ink); font:inherit; text-align:left; justify-content:flex-start; }
.pay-position-with-action .pay-calculation-action { flex:none; font-size:var(--panel-caption-size); }


.pay-position-row:focus-visible { outline:2px solid var(--action); outline-offset:2px; }
.pay-form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:var(--form-gap); min-width:0; }
.pay-supplements { display:grid; gap:var(--form-gap); min-width:0; margin:0; padding:0; border:0; }
.pay-supplements>legend { padding:0 0 var(--form-label-gap); font-size:var(--panel-subsection-title-size); font-weight:550; }
.pay-supplements>.form-note { margin:0; }
.pay-form-actions { display:flex; justify-content:flex-end; gap:var(--compact-gap); }
.pay-history-row { display:flex; align-items:center; justify-content:space-between; gap:var(--surface-gap); min-width:0; padding-block:var(--surface-gap); }
.pay-history-row:first-child { padding-top:0; }
.pay-history-row:last-child { padding-bottom:0; }
.pay-history-row>.text-button { flex-shrink:0; }
.mobile-screen-header { min-width:0; }
.mobile-screen-title { display:none; }
.pay-back { display:inline-flex; align-items:center; gap:var(--compact-gap); justify-self:start; }
@media(max-width:1000px) {
 .team-budget-page>.team-view-toolbar { grid-template-columns:minmax(0,1fr); }
 .pay-header-filters { width:440px; margin-left:0; }
}
@media(max-width:650px) {
 .pay-toolbar,.pay-filters { display:grid; grid-template-columns:minmax(0,1fr); width:100%; }
 .pay-header-filters { flex-basis:100%; margin-left:0; }
 .pay-filters { grid-template-columns:repeat(2,minmax(0,1fr)); gap:var(--compact-gap); }
 .pay-form-grid { grid-template-columns:minmax(0,1fr); }
 html[data-theme] body.panel-typography #app .team-budget-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .pay-position-row { grid-template-columns:minmax(0,1fr) 20px; gap:var(--compact-gap); }
 .pay-position-row>.pay-position-copy { grid-column:1; }
 .pay-position-row>.pay-position-cost { grid-column:1; border:0; padding-left:0; }
 .pay-position-row>.icon { grid-column:2; grid-row:1 / span 2; }
 .pay-history-row { align-items:flex-start; flex-wrap:wrap; gap:var(--compact-gap); }
 .pay-form-actions>.button { width:100%; }
}
.pay-access-option { display:flex; align-items:flex-start; gap:var(--compact-gap); margin:0; }
.pay-access-option>input { flex-shrink:0; }

.pay-rate-current { display:grid; gap:var(--surface-gap); min-width:0; }
.pay-rate-value { color:var(--ink); font-size:var(--panel-page-title-size); font-weight:550; line-height:1.3; overflow-wrap:anywhere; }
.pay-rate-value>small { font-size:var(--panel-body-size); font-weight:400; color:var(--muted); }
.pay-disclosure { min-width:0; }
.pay-disclosure>summary { display:flex; align-items:center; justify-content:space-between; gap:var(--compact-gap); list-style:none; color:var(--ink); font-size:var(--panel-body-size); font-weight:550; line-height:1.5; cursor:pointer; }
.pay-disclosure>summary::-webkit-details-marker { display:none; }
.pay-disclosure>summary>.icon { width:20px; height:20px; flex:0 0 20px; color:var(--muted); transition:transform 160ms; }
.pay-disclosure[open]>summary>.icon { transform:rotate(90deg); }
.pay-disclosure>summary:focus-visible { outline:2px solid var(--action); outline-offset:4px; }
.pay-disclosure-body { display:grid; gap:var(--form-gap); min-width:0; padding-top:var(--surface-gap); }
.pay-disclosure-body>.form-note { margin:0; }
.pay-rate-preview { display:grid; gap:var(--compact-gap); padding:var(--surface-gap); border-radius:var(--compact-corner); corner-shape:var(--surface-curve); background:var(--surface-subtle); }
.pay-rate-preview>strong { font-size:var(--panel-body-size); font-weight:550; line-height:1.5; overflow-wrap:anywhere; }
.pay-rate-preview>span { font-size:var(--panel-caption-size); color:var(--muted); line-height:1.5; }
#pay-rate-form [hidden] { display:none!important; }
.pay-role-results { display:grid; gap:var(--surface-gap); min-width:0; }
.pay-role-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:var(--surface-gap); }
.pay-role-card { display:flex; flex-direction:column; gap:var(--surface-gap); min-width:0; padding:var(--surface-gap); background:var(--surface-subtle); border-radius:var(--inset-corner); corner-shape:var(--surface-curve); }
.pay-role-card-heading { display:flex; align-items:baseline; justify-content:space-between; gap:var(--compact-gap); min-width:0; }
.pay-role-card-heading>h3 { margin:0; min-width:0; overflow-wrap:anywhere; }
.pay-role-card-heading>.muted { font-size:var(--panel-caption-size); flex-shrink:0; }
.pay-role-card-rate { display:grid; gap:calc(var(--compact-gap) / 2); min-width:0; }
.pay-role-card-rate>strong { font-size:var(--panel-section-title-size); font-weight:550; line-height:1.4; overflow-wrap:anywhere; }
.pay-role-card-rate>span { font-size:var(--panel-caption-size); color:var(--muted); line-height:1.5; }
.pay-role-card>.form-note { margin:0; }
.pay-role-card-actions { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:var(--compact-gap); margin-top:auto; }
.pay-role-card-actions>.text-button { display:inline-flex; align-items:center; gap:var(--compact-gap); }
.pay-role-card-actions>.text-button>.icon { width:16px; height:16px; }
@media(max-width:650px) {
 .pay-role-grid { grid-template-columns:minmax(0,1fr); }
}

/* Match the existing shift form width and employee search/filter controls. */
.pay-role-tools .directory-filters { width:100%; }
/* Standalone budget cards use the same spacing and surfaces as the overview. */
.budget-cost-overview { display:grid; gap:var(--surface-gap); min-width:0; }
html[data-theme] body.panel-typography #app .budget-cost-overview .budget-overview-metrics { grid-template-columns:repeat(3,minmax(0,1fr)); gap:calc(var(--surface-gap) - var(--compact-gap) / 2); }
html[data-theme] body.panel-typography #app .budget-cost-overview .budget-overview-metrics>article { display:grid; grid-template-rows:auto 1fr auto; gap:var(--surface-gap); padding:calc(var(--surface-inset) + var(--compact-gap)); background:var(--surface); border:0; --glass-outline:0px; box-shadow:none; }
html[data-theme] body.panel-typography #app .budget-cost-overview .budget-overview-metrics>.budget-metric-total { background:var(--surface); color:var(--ink); }
html[data-theme] body.panel-typography #app .budget-cost-overview .budget-metric-total small { color:var(--muted); }
.budget-metric-value { display:grid; grid-template-columns:minmax(0,1fr) minmax(72px,32%); gap:var(--compact-gap); align-items:center; min-width:0; }
html[data-theme] body.panel-typography #app .budget-cost-overview .budget-metric-value>strong { font-family:Onest,Inter,sans-serif; font-size:clamp(24px,2.6vw,40px); font-weight:450; line-height:1.15; letter-spacing:-.04em; white-space:nowrap; }
.budget-metric-value>.metric-sparkline { display:block; width:100%; height:64px; color:var(--control-accent); overflow:visible; }
.budget-metric-total .budget-metric-value>.metric-sparkline { color:var(--control-accent); }
.budget-metric-value .sparkline-guide,.budget-metric-value .sparkline-glow,.budget-metric-value .sparkline-endpoint { display:none; }
@media(min-width:651px) and (max-width:1100px) {
 .budget-metric-value { grid-template-columns:minmax(0,1fr); }
 .budget-metric-value>.metric-sparkline { height:48px; }
}
@media(max-width:650px) {
 html[data-theme] body.panel-typography #app .budget-cost-overview .budget-overview-metrics { grid-template-columns:minmax(0,1fr); }
 html[data-theme] body.panel-typography #app .budget-cost-overview .budget-metric-value>strong { font-size:var(--budget-amount-mobile-size); }
 html[data-theme] body.panel-typography #app .team-budget-page .budget-cost-overview .budget-overview-metrics>article {
  grid-template: "label chart" auto "amount chart" auto "caption caption" auto / minmax(0,1fr) 24%;
  align-items:center;
  padding:var(--surface-gap);
  gap:var(--compact-gap);
 }
 .team-budget-page .budget-cost-overview .budget-metric-heading { grid-area:label; }
 .team-budget-page .budget-cost-overview .budget-metric-value { display:contents; }
 .team-budget-page .budget-cost-overview .budget-metric-value>strong { grid-area:amount; }
 .team-budget-page .budget-cost-overview .budget-metric-value>.metric-sparkline { grid-area:chart; height:var(--control-height); }
 .team-budget-page .budget-cost-overview .budget-overview-metrics>article>small { grid-area:caption; }
}
.budget-metric-heading { display:flex; align-items:center; gap:var(--compact-gap); font-size:var(--panel-body-size); font-weight:550; line-height:1.4; min-width:0; }
.budget-cost-note { display:flex; align-items:flex-start; gap:var(--compact-gap); min-width:0; margin:0; padding:0; border-radius:0; background:transparent; }
.budget-cost-note>.icon { width:20px; height:20px; flex:0 0 20px; color:var(--action); }
@media(max-width:1100px) { html[data-theme] body.panel-typography #app .budget-overview-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); } }

.budget-metric-heading>.icon { width:20px; height:20px; flex:0 0 20px; color:var(--action); }
.budget-metric-accrued .budget-metric-heading>.icon { color:var(--status-positive); }
/* Full-width editor with separate editable and live-result columns. */
.pay-rate-editor { display:grid; gap:var(--surface-gap); width:100%; min-width:0; }
.pay-editor-form { min-width:0; }
.accent-overview { position:relative; isolation:isolate; overflow:hidden; color:var(--action-ink); background:linear-gradient(120deg,var(--action) 8%,color-mix(in srgb,var(--action) 58%,var(--action-ink)) 100%); border-radius:var(--inset-corner); corner-shape:var(--surface-curve); }
.accent-overview-waves { position:absolute; inset:0; width:100%; height:100%; z-index:0; pointer-events:none; }
.accent-overview-heading { position:relative; z-index:1; display:flex; align-items:center; gap:var(--compact-gap); min-width:0; }
.accent-overview-heading>div { display:grid; gap:calc(var(--compact-gap) / 2); min-width:0; }
.accent-overview-heading h2 { margin:0; font-size:var(--panel-section-title-size); font-weight:600; line-height:1.4; color:inherit; }
.accent-overview-heading p { margin:0; color:inherit; opacity:.85; font-size:var(--panel-body-size); line-height:1.5; }
.accent-overview-symbol { display:flex; align-items:center; justify-content:center; width:40px; height:40px; flex:0 0 40px; border-radius:var(--small-control-corner); background:color-mix(in srgb,var(--action-ink) 15%,transparent); }
.accent-overview-symbol>.icon { width:24px; height:24px; }
.pay-rate-hero { background:var(--surface); color:var(--ink); display:flex; flex-direction:column; justify-content:space-between; gap:var(--surface-gap); min-width:0; min-height:180px; padding:var(--surface-inset); box-sizing:border-box; }
.pay-rate-hero .accent-overview-symbol { background:var(--surface-subtle); color:var(--muted); }
.pay-rate-hero-amount { display:flex; flex-wrap:wrap; align-items:baseline; gap:var(--compact-gap); position:relative; z-index:1; min-width:0; }
.pay-rate-hero-amount>strong { font-size:calc(var(--panel-page-title-size) + var(--compact-gap)); font-weight:600; line-height:1.3; overflow-wrap:anywhere; }
.pay-rate-hero-amount>span { font-size:var(--panel-section-title-size); line-height:1.4; }
.pay-editor-meta { display:grid; gap:var(--surface-gap); min-width:0; }
.pay-editor-extras-summary { display:flex; align-items:center; gap:var(--surface-gap); min-width:0; margin:0; padding:var(--surface-gap); background:color-mix(in srgb,var(--action) 6%,var(--surface)); border-radius:var(--compact-corner); }
.pay-editor-recipient { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:var(--form-gap); }
html[data-theme] body.panel-typography #app .budget-overview-metrics>.accent-overview { background:linear-gradient(120deg,var(--action) 8%,color-mix(in srgb,var(--action) 58%,var(--action-ink)) 100%); color:var(--action-ink); }
.budget-overview-metrics>.accent-overview>:is(.budget-metric-heading,strong,small) { position:relative; z-index:1; color:inherit; }
.budget-metric-total.accent-overview .budget-metric-heading>.icon { color:inherit; }

.pay-editor-extras-summary>.icon { width:24px; height:24px; flex:0 0 24px; color:var(--action); }
.pay-editor-extras-summary>div { display:grid; gap:calc(var(--compact-gap) / 2); min-width:0; }
.pay-editor-extras-summary strong { font-size:var(--panel-body-size); font-weight:550; line-height:1.5; }
.pay-editor-extras-summary span { font-size:var(--panel-caption-size); color:var(--muted); line-height:1.5; }
/* Form values are separate radio choices; tabs remain entity navigation. */
.pay-mode-choices { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:var(--compact-gap); min-width:0; }
html[data-theme] body .button.pay-mode-choice { display:flex; align-items:center; justify-content:center; gap:var(--compact-gap); min-width:0; box-sizing:border-box; height:var(--control-height); min-height:var(--control-height); padding:0 var(--compact-gap); border:1px solid var(--control-border); border-radius:var(--small-control-corner); corner-shape:var(--surface-curve); background:var(--surface); color:var(--muted); font-size:var(--segment-font-size); font-weight:var(--segment-font-weight); line-height:1.4; }
html[data-theme] #pay-rate-form .pay-mode-choice[aria-checked='false']:hover:where(:not(html[data-hover-disabled] *)):not(:disabled) {
 background-color:var(--surface);
 border-color:var(--control-border);
 color:var(--ink);
}
html[data-theme] #pay-rate-form .pay-mode-choice[aria-checked='true'],
html[data-theme] body .button.pay-mode-choice[aria-checked='true'],
html[data-theme] body .button.pay-mode-choice:has(>input:checked),
html[data-theme] #account-form .account-avatar-option[aria-checked='true'] { border-color:var(--control-accent); background:color-mix(in srgb,var(--control-accent) 8%,var(--surface)); color:var(--ink); }
.pay-mode-check { display:flex; align-items:center; justify-content:center; width:16px; height:16px; flex:0 0 16px; border-radius:50%; background:var(--control-accent); color:var(--control-accent-ink); visibility:hidden; }
.pay-mode-check>.icon { width:12px; height:12px; stroke-width:2; }
.pay-mode-choice[aria-checked='true']>.pay-mode-check,
.pay-mode-choice:has(>input:checked)>.pay-mode-check { visibility:visible; }
.pay-mode-choice:focus-visible { outline:2px solid var(--control-accent); outline-offset:2px; }
/* Editable values stay left; the right column is a live preview only. */
.pay-editor-layout { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:var(--surface-inset); align-items:start; min-width:0; }
html[data-theme] body.panel-typography #app .pay-editor-column { display:grid; align-content:start; gap:var(--form-gap); min-width:0; margin:0; padding:var(--page-surface-inset); background:var(--surface); border:0; box-shadow:none; backdrop-filter:none!important; -webkit-backdrop-filter:none!important; }
html[data-theme] body.panel-typography #app .pay-editor-fields { border:0; display:grid; gap:var(--form-gap); min-width:0; margin:0; padding:0; }
html[data-theme] body.panel-typography #app .pay-editor-fields>.pay-editor-panel { display:grid; align-content:start; gap:var(--form-gap); min-width:0; margin:0; padding:0; background:transparent; border:0; box-shadow:none; }
html[data-theme] body.panel-typography #app .pay-editor-fields>.pay-editor-panel+.pay-editor-panel { border-top:1px solid var(--line); padding-top:var(--form-section-gap); }
.pay-editor-recipient { display:grid; gap:var(--form-gap); min-width:0; }
.pay-editor-fields .pay-mode-choices { width:100%; }
.pay-live-preview { display:grid; align-content:start; gap:var(--surface-gap); min-width:0; padding:0; background:transparent; position:sticky; top:var(--surface-gap); max-height:calc(100dvh - 2 * var(--surface-gap)); overflow-y:auto; overscroll-behavior:contain; scrollbar-width:thin; }
.pay-live-preview .pay-editor-meta { padding:var(--surface-gap); background:var(--surface); border-radius:var(--inset-corner); }
.pay-preview-note { display:flex; align-items:flex-start; gap:var(--compact-gap); min-width:0; padding:var(--surface-gap); background:color-mix(in srgb,var(--action) 4%,var(--surface)); border-radius:var(--inset-corner); }
.pay-preview-note>.icon { flex:0 0 20px; width:20px; height:20px; color:var(--action); }
.pay-preview-note>div { display:grid; gap:var(--compact-gap); min-width:0; }
.pay-preview-note strong { font-size:var(--panel-body-size); font-weight:550; line-height:1.5; }
.pay-preview-note .form-note { margin:0; }
.pay-editor-column>.pay-form-actions { padding-top:0; }
@media(max-width:1000px) {
 .pay-editor-layout { grid-template-columns:minmax(0,1fr); }
 .pay-live-preview { position:static; max-height:none; overflow:visible; }
}
@media(max-width:650px) {
 /* The page keeps the shared outer gutter; each surface owns its inner spacing. */
 html[data-theme] body.panel-typography #app .workspace>.team-budget-page { width:100%; max-width:100%; margin:0; box-sizing:border-box; }
 html[data-theme] body.panel-typography #app .team-budget-page>.team-view-toolbar,
 html[data-theme] body.panel-typography #app .team-budget-page>.pay-toolbar { width:100%; margin:0; padding-inline:0; box-sizing:border-box; }
 html[data-theme] body.panel-typography #app .team-budget-page>.pay-surface { width:100%; box-sizing:border-box; }
 .team-budget-page .pay-role-tools { margin:0; }
 .pay-editor-column>.pay-form-actions { flex-wrap:wrap; }
 .pay-live-preview { padding:0 var(--surface-inset); }
}

.pay-editor-basics { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:var(--compact-gap); min-width:0; }
.pay-editor-basics>label { min-width:0; }
html[data-theme] body.panel-typography #app .pay-form-label { font-family:inherit; font-size:var(--panel-body-size); font-weight:550; line-height:1.4; }
.pay-supplement-fields { display:grid; gap:var(--form-gap); min-width:0; }

@media(max-width:650px) {
 /* Dedicated editor screen: safe-area space belongs to its own navigation. */
 body:has(:is(.pay-rate-editor,.employee-profile-page)) { overflow-x:hidden; }
 body:has(:is(.pay-rate-editor,.employee-profile-page)) :is(.topbar,.mobile-navigation-dock) { display:none; }
 html[data-theme] body.panel-typography #app .workspace:has(:is(.pay-rate-editor,.employee-profile-page)) { width:100%; max-width:none; margin:0; padding:0; overflow:visible; }
 html[data-theme] body.panel-typography #app .team-budget-page:has(.pay-rate-editor) { width:100%; max-width:100%; margin:0; gap:0; }
 html[data-theme] body.panel-typography #app .pay-rate-editor {
  --mobile-screen-safe-top:env(safe-area-inset-top,0px);
  position:relative; z-index:1; width:100%; min-height:calc(100svh - var(--preview-safe-top,0px) - var(--preview-safe-bottom,0px)); height:auto; margin:0; box-sizing:border-box;
  display:block; overflow:visible;
  padding-top:calc(var(--mobile-screen-safe-top) + var(--surface-gap));
  padding-bottom:calc(var(--surface-gap) + env(safe-area-inset-bottom,0px));
  background:var(--surface);
 }
 .pay-rate-editor>.mobile-screen-header { margin-bottom:var(--surface-gap); }
 .pay-rate-editor .pay-editor-form { margin:0; }
 .team-budget-page:has(.pay-rate-editor)>:is(.team-view-toolbar,.pay-toolbar) { display:none; }
 body:has(.pay-rate-editor) .mobile-navigation-dock { display:none; }
}

.pay-extras-heading { position:relative; }
.pay-extras-heading>h3 { display:flex; align-items:center; gap:var(--compact-gap); }
html[data-theme] body.panel-typography #app .pay-help-button { display:inline-flex; align-items:center; justify-content:center; flex:0 0 20px; width:20px; min-height:20px; height:20px; padding:0; color:var(--muted); }
.pay-help-button>.icon { width:16px; height:16px; }
html[data-theme] body.panel-typography #app .pay-extras-heading>.pay-help-tip { display:block; position:absolute; z-index:10; top:100%; left:0; width:max-content; max-width:min(100%,320px); box-sizing:border-box; margin:var(--compact-gap) 0 0; padding:var(--compact-gap) var(--surface-gap); background:var(--ink); color:var(--surface); border:0; border-radius:var(--small-control-corner); box-shadow:0 4px 16px rgb(0 0 0 / .12); line-height:1.5; opacity:0; visibility:hidden; transform:translateY(-4px); pointer-events:none; transition:opacity 120ms ease,transform 120ms ease,visibility 120ms; }
html[data-theme] body.panel-typography #app .pay-extras-heading:has(.pay-help-button:is([aria-expanded='true'],:focus-visible,:hover:where(:not(html[data-hover-disabled] *))))>.pay-help-tip { opacity:1; visibility:visible; transform:translateY(0); }
@media(prefers-reduced-motion:reduce) { html[data-theme] body.panel-typography #app .pay-extras-heading>.pay-help-tip { transition:none; transform:none; } }

@media(min-width:651px) { .pay-rate-editor>.mobile-screen-header { margin-bottom:var(--compact-gap); } }

.pay-supplements[hidden] { display:none; }


@media(max-width:650px) {
 /* Keep the shared settings-card surface; display:contents removes its paint. */
 .pay-rate-editor .pay-editor-layout { gap:var(--surface-gap); }
 .pay-editor-column>.pay-form-actions { flex-direction:column-reverse; }
}


.pay-supplement-toggle:has(input:disabled) { opacity:.55; cursor:not-allowed; }

@media(max-width:650px) {
 .pay-editor-basics { grid-template-columns:minmax(0,1fr); gap:var(--form-gap); }
 html[data-theme] body.panel-typography #app .pay-editor-basics :is(.custom-select-trigger,.date-trigger) { justify-content:space-between; text-align:left; }
 .pay-editor-basics :is(.custom-select-trigger,.date-trigger)>span:first-child { flex:1 1 auto; text-align:left; }
}

.pay-position-row[hidden], [data-pay-role-empty][hidden] { display:none!important; }



.pay-preview-effective { display:grid; grid-template-columns:20px minmax(0,1fr) auto; align-items:center; gap:var(--compact-gap); padding-bottom:var(--surface-gap); border-bottom:1px solid var(--line); font-size:var(--panel-body-size); }
.pay-preview-effective>.icon { width:20px; height:20px; color:var(--action); }
.pay-preview-effective>span { color:var(--muted); }
.pay-preview-effective>strong,.pay-preview-base>strong { font-size:var(--panel-body-size); font-weight:550; }
.pay-preview-base { display:grid; gap:var(--form-label-gap); min-width:0; }
.pay-preview-base>.form-note,.pay-preview-no-extras { margin:0; }
.pay-preview-supplements { display:grid; gap:var(--compact-gap); padding-top:var(--surface-gap); border-top:1px solid var(--line); }
.pay-preview-supplements>h4 { margin:0; font-size:var(--panel-body-size); font-weight:550; line-height:1.4; }
.pay-preview-rule { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:var(--compact-gap); padding:var(--compact-gap) 0; }
.pay-preview-rule+.pay-preview-rule { border-top:1px solid var(--line); }
.pay-preview-rule>div { display:grid; gap:var(--form-label-gap); min-width:0; }
.pay-preview-rule strong { font-size:var(--panel-body-size); font-weight:550; }
.pay-preview-rule span { font-size:var(--panel-caption-size); color:var(--muted); }
.pay-preview-rule>b { font-size:var(--panel-body-size); font-weight:550; color:var(--action); white-space:nowrap; }
.pay-preview-supplements[hidden],.pay-preview-no-extras[hidden] { display:none; }

.pay-supplement-rule { display:grid; gap:0; min-width:0; background:var(--surface-subtle); border-radius:var(--inset-corner); }
.pay-supplement-rule>.trainee-toggle { margin:0; background:transparent; }
.pay-supplement-rule .pay-supplements { padding:0 var(--surface-gap) var(--surface-gap); --surface-subtle:var(--personal-board); --field-surface:var(--personal-board); }
.pay-rule-summary { margin:0; }
.pay-supplement-weekdays { display:grid; gap:var(--form-label-gap); min-width:0; padding:0; margin:0; border:0; }
.pay-supplement-weekdays>legend { padding:0 0 var(--form-label-gap); font-size:var(--panel-body-size); }
.pay-supplement-weekdays>div { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:var(--compact-gap); }
html[data-theme] body.panel-typography #app .pay-weekday-choice { position:relative; display:flex; align-items:center; justify-content:center; height:var(--control-height); min-width:0; margin:0; border:1px solid var(--control-border); border-radius:var(--field-corner); background:var(--surface); color:var(--muted); cursor:pointer; }
.pay-weekday-choice>input { position:absolute; width:1px; height:1px; min-height:0; opacity:0; }
html[data-theme] body.panel-typography #app .pay-weekday-choice:has(input:checked) { border-color:var(--action); background:color-mix(in srgb,var(--action) 8%,var(--surface)); color:var(--action); }
.pay-weekday-choice:has(input:focus-visible) { outline:2px solid var(--action); outline-offset:2px; }

/* Employee profile: quiet hero, a real next shift, and period totals. */
html[data-theme] body.panel-typography #app .budget-overview-metrics>article>strong { font-size:var(--panel-page-title-size); }
.pay-supplement-reveal { min-height:0; }




/* One employee surface: identity, navigation and content share a reading grid. */
html[data-theme] body.panel-typography #app .employee-profile-shell { display:grid; gap:var(--surface-gap); min-width:0; margin:0; padding:var(--surface-inset); background:var(--surface); border:0; box-shadow:none; overflow:hidden; }
.employee-profile-hero { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:var(--surface-gap); position:relative; isolation:isolate; min-width:0; }
.employee-profile-identity { display:flex; align-items:flex-start; gap:var(--surface-gap); min-width:0; padding:var(--compact-gap); }
.employee-profile-identity>.avatar { width:calc(var(--control-height) * 1.5); height:calc(var(--control-height) * 1.5); flex:0 0 calc(var(--control-height) * 1.5); box-shadow:0 0 0 var(--compact-gap) var(--surface); }
.employee-profile-identity .team-heading-copy { min-width:0; }
.employee-profile-identity h2 { margin:0; font-size:var(--panel-section-title-size); font-weight:650; line-height:1.25; overflow-wrap:anywhere; }
.employee-profile-status { display:inline-flex; align-items:center; gap:var(--compact-gap); margin:var(--compact-gap) 0 0; width:fit-content; }
.employee-profile-status::before { content:''; width:var(--compact-gap); height:var(--compact-gap); border-radius:50%; background:currentColor; }
.employee-profile-status.is-active { color:var(--status-positive); background:color-mix(in srgb,var(--status-positive) 8%,var(--surface)); }
.employee-profile-toolbar { min-width:0; padding-block:var(--surface-gap); border-bottom:1px solid var(--line); }
.employee-profile-toolbar .period-presets>button>.icon { width:18px; height:18px; flex-shrink:0; }
.employee-profile-toolbar>.period { margin-left:auto; }
.employee-profile-section { display:grid; align-content:start; gap:var(--surface-gap); min-width:0; margin:0; padding:0; }
.employee-profile-overview { display:grid; grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr); align-items:stretch; gap:var(--surface-gap); min-width:0; }
.employee-profile-summary { padding:var(--surface-inset); border:0; gap:var(--surface-inset); }
.employee-profile-shift.accent-overview { --ink:var(--action-ink); --muted:var(--action-ink); align-content:start; padding:var(--surface-inset); gap:var(--surface-inset); }
.employee-profile-shift>.workday-waves { position:absolute; inset:0; z-index:0; overflow:hidden; pointer-events:none; }
.employee-profile-shift>:not(.workday-waves) { position:relative; z-index:1; }
.employee-profile-shift .settings-section-heading>p { opacity:.85; }

@media(max-width:1000px) {
 .employee-profile-overview { grid-template-columns:minmax(0,1fr); }
 .employee-profile-summary { padding:var(--surface-inset) 0 0; border-top:1px solid var(--line); }
}

@media(max-width:650px) {
 html[data-theme] body.panel-typography #app .employee-profile-page {
  --mobile-screen-safe-top:env(safe-area-inset-top,0px);
  position:relative; z-index:1; width:100%; min-height:calc(100svh - var(--preview-safe-top,0px) - var(--preview-safe-bottom,0px)); height:auto; margin:0; box-sizing:border-box;
  display:grid; align-content:start; gap:var(--surface-gap); overflow:visible;
  padding-top:calc(var(--mobile-screen-safe-top) + var(--surface-gap));
  padding-bottom:calc(var(--surface-gap) + env(safe-area-inset-bottom,0px)); background:var(--surface);
 }
 html[data-theme] body.panel-typography #app .mobile-screen-back {
  display:inline-flex; align-items:center; justify-content:center; justify-self:start;
  width:var(--control-height); height:var(--control-height); min-height:var(--control-height); min-width:var(--control-height);
  padding:0; margin:0; border:0; border-radius:50%!important; corner-shape:round!important; background:var(--surface-subtle); color:var(--ink);
 }
 .mobile-screen-back>span { display:none; }
 .mobile-screen-back>.icon { width:24px; height:24px; }
 html[data-theme] body.panel-typography #app .mobile-screen-header { display:grid; grid-template-columns:var(--control-height) minmax(0,1fr) var(--control-height); align-items:center; gap:var(--compact-gap); padding-inline:var(--surface-inset); min-height:var(--control-height); }
 .mobile-screen-header::after { content:''; }
 .mobile-screen-title { display:block; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; text-align:center; color:var(--muted); font-size:var(--panel-segment-size); font-weight:500; line-height:1.4; }

 html[data-theme] body.panel-typography #app .employee-profile-shell { padding:var(--surface-inset); border-radius:0; clip-path:none; overflow:visible; }
 html[data-theme] body.panel-typography #app .employee-profile-toolbar>.period-presets {
  display:flex; flex-flow:row nowrap; flex-shrink:0;
  overflow-x:auto; scrollbar-width:none; -ms-overflow-style:none; overscroll-behavior-x:contain;
 }
 .employee-profile-toolbar>.period-presets::-webkit-scrollbar { display:none; }
 .employee-profile-toolbar>.period-presets>button { flex-shrink:0; white-space:nowrap; }
 .employee-profile-identity { padding:0; }
 html[data-theme] body.panel-typography #app .employee-profile-identity h2 { font-size:var(--panel-section-title-size); line-height:1.3; }
 .employee-profile-identity>.avatar { width:calc(var(--control-height) * 1.5); height:calc(var(--control-height) * 1.5); flex-basis:calc(var(--control-height) * 1.5); box-shadow:0 0 0 calc(var(--compact-gap) / 2) var(--surface); }
 .employee-profile-hero>.button { width:100%; }
 .employee-profile-toolbar>.period { margin-left:0; width:100%; }
}

.employee-profile-link:focus-visible { outline:2px solid var(--action); outline-offset:2px; }
.employee-stat-action { display:inline-flex; align-items:center; justify-content:center; margin-left:var(--compact-gap); padding:0; vertical-align:middle; color:var(--muted); }
.employee-stat-action>.icon { width:20px; height:20px; }

/* Employee names keep their text geometry; only hover changes their color. */
html[data-theme] body.panel-typography :is(#app,#modal) .employee-profile-link { display:inline; appearance:none; -webkit-appearance:none; min-height:0; min-width:0; width:auto; max-width:100%; margin:0; padding:0; border:0; border-radius:0; background:transparent; box-shadow:none; color:inherit; font:inherit; letter-spacing:inherit; line-height:inherit; text-align:inherit; text-decoration:none; vertical-align:baseline; white-space:inherit; overflow-wrap:normal; word-break:normal; cursor:pointer; }
html[data-theme] body.panel-typography :is(#app,#modal) .employee-profile-link:is(:hover:where(:not(html[data-hover-disabled] *)),:active,:focus-visible) { color:inherit; text-decoration:underline; text-decoration-thickness:1px; text-underline-offset:.18em; background:transparent; }
.planner-person-info>strong>.employee-profile-link { display:block!important; width:100%!important; }


/* Employee shifts: day cards on larger screens, compact date/time rows on phones. */
.employee-profile-shift-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(min(100%,180px),1fr)); gap:var(--surface-gap); min-width:0; }
html[data-theme] body.panel-typography #app .employee-profile-shift-card { position:relative; isolation:isolate; overflow:hidden; display:grid; grid-template-columns:minmax(0,1fr); align-content:start; gap:var(--surface-gap); min-width:0; min-height:0; padding:var(--form-gap); background:var(--surface); border:1px solid var(--line); border-radius:var(--inset-corner); }
html[data-theme] body.panel-typography #app .employee-profile-shift-card.is-highlighted { background:var(--list-row-fill); border-color:var(--line); }
.employee-profile-shift-card>:not(.accent-overview-waves) { position:relative; z-index:1; }
.employee-profile-shift-date { display:flex; align-items:center; justify-content:space-between; gap:var(--compact-gap); min-width:0; }
.employee-profile-shift-date>time { --shift-date-fill:var(--surface-subtle); display:flex; align-items:center; gap:var(--compact-gap); min-width:0; padding:0; background:transparent; font-size:var(--panel-caption-size); font-weight:500; line-height:1.4; color:var(--muted); }
.employee-profile-shift-date>time>.employee-profile-shift-day { display:grid; place-items:center; flex:0 0 40px; width:40px; height:40px; border-radius:50%; corner-shape:round; background:var(--shift-date-fill); color:inherit; font-size:var(--panel-section-title-size); font-weight:550; }
.employee-profile-shift-date-copy { display:grid; gap:0; min-width:0; }
.employee-profile-shift-month,.employee-profile-shift-weekday { display:block; }
.employee-profile-shift-month-short { display:none; }
.employee-profile-shift-weekday { text-transform:capitalize; font-weight:400; }
.employee-profile-shift-card.is-highlighted .employee-profile-shift-date>time { --shift-date-fill:var(--surface-subtle); color:var(--muted); }
.employee-shift-tile-symbol { display:grid; place-items:center; width:24px; height:24px; flex:0 0 24px; border-radius:var(--small-control-corner); background:var(--surface-subtle); color:var(--muted); }
.employee-shift-tile-symbol>.icon { width:18px; height:18px; }
html[data-theme] body.panel-typography #app .employee-shift-tile-symbol.is-completed { background:transparent; color:var(--status-positive); }
.employee-shift-tile-symbol.is-ongoing { background:transparent; color:var(--status-active-ink); }
.employee-profile-shift-body { display:grid; align-content:start; gap:var(--compact-gap); min-width:0; }
.employee-profile-slot-weekday { display:none; }
.employee-profile-shift-body>.shift-state-chip { justify-self:start; padding:0; background:transparent; }
.employee-profile-shift-body>.shift-state-chip .icon { flex:none; width:16px; height:16px; color:currentColor; }

.employee-profile-slot-time,.employee-profile-slot-duration { display:flex; align-items:center; gap:var(--compact-gap); min-width:0; line-height:1.4; }
.employee-profile-slot-time { font-size:calc(var(--panel-body-size) + 2px); font-weight:550; font-variant-numeric:tabular-nums; }
.employee-profile-slot-time>span { white-space:nowrap; }
.employee-profile-slot-duration { font-size:var(--panel-body-size); color:var(--muted); }
.employee-profile-shift-body>.employee-profile-slot-note { margin:0; overflow-wrap:anywhere; }
.employee-profile-shift-body .icon { width:20px; height:20px; flex:0 0 20px; color:var(--muted); }
.employee-shift-tile-actions { display:grid; min-width:0; padding-top:var(--compact-gap); border-top:1px solid var(--line); }
html[data-theme] body.panel-typography #app .employee-page .employee-week-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(min(100%,180px),1fr)); gap:var(--surface-gap); }
/* Use available content width: seven columns must fit inside the panel. */
.employee-profile-section:has(>.employee-profile-shift-grid),.employee-page .employee-week { container-type:inline-size; }
@container(min-width:1100px) {
 .employee-profile-shift-grid,html[data-theme] body.panel-typography #app .employee-page .employee-week-grid { grid-template-columns:repeat(7,minmax(0,1fr)); gap:var(--compact-gap); }
 html[data-theme] body.panel-typography #app .employee-profile-shift-card { padding:var(--form-gap); }
}
html[data-theme] body.panel-typography #app .employee-shift-tile-symbol { background:transparent; }
html[data-theme] body.panel-typography #app .employee-profile-shift-card.is-completed:not(.is-today) { border-color:var(--line); }
html[data-theme] body.panel-typography #app .employee-profile-shift-card.is-completed:not(.is-today) .employee-profile-shift-date>time { --shift-date-fill:var(--surface-subtle); color:var(--muted); }

@media(min-width:651px) {
 html[data-theme] body.panel-typography #app .employee-shift-tile-actions>:is(.is-searching,[data-replacement-create]) { min-height:var(--control-height); align-items:center; }
}
.employee-shift-tile-actions>.button { width:100%; min-width:0; padding-inline:var(--compact-gap); font-size:var(--panel-caption-size); }
html[data-theme] body.panel-typography #app .employee-shift-tile-actions>.is-searching { color:var(--control-accent); background:transparent; border:0; box-shadow:none; padding:0; justify-self:center; justify-content:center; }
html[data-theme] body.panel-typography #app .employee-shift-tile-actions>.is-searching:is(:hover:where(:not(html[data-hover-disabled] *)),:active) { color:var(--control-accent); background:transparent; border-color:transparent; box-shadow:none; text-decoration:underline; text-underline-offset:.18em; }
.employee-shift-tile-actions>.is-searching>.icon { animation:employee-replacement-search 2s linear infinite; flex:0 0 18px; width:18px; height:18px; }
@media(prefers-reduced-motion:reduce) { .employee-shift-tile-actions>.is-searching>.icon { animation:none; } }
@media(max-width:650px) {
 .employee-profile-shift-grid { grid-template-columns:minmax(0,1fr); gap:var(--compact-gap); }
 html[data-theme] body.panel-typography #app .employee-page .employee-week-grid { grid-template-columns:minmax(0,1fr); gap:var(--compact-gap); }
 html[data-theme] body.panel-typography #app .employee-profile-shift-card { --shift-date-size:42px; background:var(--list-row-fill); grid-template-columns:var(--shift-date-size) minmax(0,1fr); padding:var(--surface-gap); gap:var(--compact-gap) var(--surface-gap); align-items:center; }
 .employee-profile-shift-card>.accent-overview-waves { display:none; }
 .employee-profile-shift-date { grid-column:1; grid-row:1; }
 .employee-profile-shift-date>time { display:flex; flex-direction:column; justify-content:center; gap:calc(var(--compact-gap) / 2); width:var(--shift-date-size); min-height:calc(var(--control-height) + var(--surface-gap)); padding:var(--compact-gap) 0; box-sizing:border-box; background:var(--shift-date-fill); border-radius:var(--small-control-corner); }
 .employee-profile-shift-date>time>.employee-profile-shift-day { display:block; flex:none; width:auto; height:auto; border-radius:0; background:transparent; font-family:var(--panel-heading-font); font-size:var(--panel-section-title-size); line-height:1; text-align:center; }
 .employee-profile-shift-date-copy { text-align:center; }
 .employee-profile-shift-weekday { display:none; }
 .employee-profile-shift-card .employee-shift-tile-symbol { position:absolute; right:0; top:0; }
 .employee-profile-shift-date { position:static!important; }
 .employee-profile-shift-card .employee-shift-tile-symbol { right:var(--surface-gap); top:var(--surface-gap); }
 .employee-profile-shift-body { grid-column:2; grid-row:1; gap:calc(var(--compact-gap) / 2); }
 .employee-profile-slot-weekday { display:block; padding-right:var(--control-height); text-transform:capitalize; color:var(--muted); font-size:var(--panel-caption-size); line-height:1.5; }
 .employee-profile-slot-time { font-family:var(--panel-heading-font); font-size:var(--panel-section-title-size); font-weight:500; }
 .employee-profile-slot-duration { display:flex; position:absolute!important; justify-content:center; width:40px; right:var(--surface-gap); top:calc(var(--surface-gap) + 24px); bottom:auto; font-size:var(--panel-body-size); }
 .employee-profile-slot-duration>.icon { display:none; }
 .employee-profile-shift-body { position:static!important; padding-right:var(--control-height); }
 .employee-profile-shift-card .employee-shift-tile-symbol { width:40px; }
 .employee-profile-shift-date>time { min-height:0; }
 .employee-profile-shift-month { display:none; }
 .employee-profile-shift-month-short { display:block; font-size:12px; line-height:1.3; }
 .employee-profile-shift-date>time { padding:9px 4px; gap:3px; background:var(--surface); color:var(--ink); }
 .employee-profile-shift-date>time>.employee-profile-shift-day { font-size:21px; font-weight:550; }
 .employee-shift-tile-actions { grid-column:2; padding-top:0; border:0; margin:0; }
 .employee-profile-shift-card:has(>.employee-shift-tile-actions) { row-gap:var(--compact-gap); }
}

.pay-position-row>.pay-position-cost { border-left:1px solid var(--line); padding-left:var(--surface-gap); }
.pay-position-row:is(:hover:where(:not(html[data-hover-disabled] *)),:focus-visible,:focus-within) { --interactive-row-action:var(--list-row-action,var(--action)); --interactive-row-fill:var(--list-row-hover-fill); --interactive-row-border:var(--list-row-hover-border); background:var(--interactive-row-fill); border-color:var(--interactive-row-border); }
.pay-position-row:is(:hover:where(:not(html[data-hover-disabled] *)),:focus-visible)>.icon { color:var(--action); }
.pay-position-row:is(:hover:where(:not(html[data-hover-disabled] *)),:focus-within)>.workload-stat-open { color:var(--action); }
@media(min-width:651px) and (max-width:850px) { .pay-position-row { grid-template-columns:minmax(0,1fr) minmax(190px,.55fr) 20px; gap:var(--compact-gap); } }
@media(max-width:650px) { .pay-position-row>.pay-position-cost { border:0; padding-left:0; } }
[data-budget-position]>.pay-position-cost { grid-template-columns:repeat(2,minmax(0,1fr)); gap:var(--compact-gap); }
[data-budget-position]>.pay-position-cost>span { display:grid; align-content:start; gap:calc(var(--compact-gap) / 2); }
@media(max-width:650px) {
 .pay-position-row[data-budget-position]>.pay-position-cost { grid-column:1 / -1; border-top:1px solid var(--line); padding-top:var(--compact-gap); }
 .pay-position-row[data-budget-position]>.icon { grid-row:1; }
}
@media(prefers-reduced-motion:reduce) { .pay-position-row { transition:none; } }

/* Employee pay reuses the team-cost metrics and the profile's shift-row rhythm. */
html[data-theme] body.panel-typography #app .employee-pay-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }
html[data-theme] body.panel-typography #app .employee-pay-metrics>article { position:relative; isolation:isolate; overflow:hidden; padding:var(--surface-inset); gap:var(--surface-gap); }
html[data-theme] body.panel-typography #app .employee-pay-metrics>.budget-metric-accrued { background:linear-gradient(120deg,color-mix(in srgb,var(--action) 5%,var(--surface)),color-mix(in srgb,var(--action) 10%,var(--surface))); }
.employee-pay-metrics .budget-metric-heading>.icon { width:24px; height:24px; flex:0 0 24px; color:var(--action); }
.employee-pay-metrics>article>:not(.employee-pay-art) { position:relative; z-index:1; }
.employee-pay-art { position:absolute; right:var(--surface-inset); top:50%; transform:translateY(-50%); z-index:0; opacity:.07; pointer-events:none; color:var(--action); }
.employee-pay-art>.icon { width:calc(var(--control-height) * 2); height:calc(var(--control-height) * 2); stroke-width:1; }
.employee-pay-list { display:grid; gap:var(--compact-gap); min-width:0; }
.employee-pay-row { display:grid; grid-template-columns:minmax(120px,160px) minmax(0,1fr) auto; align-items:center; gap:var(--surface-gap); padding:var(--surface-gap); min-width:0; border:1px solid var(--line); border-radius:var(--inset-corner); background:var(--surface); }
.employee-pay-date { display:flex; align-items:center; gap:var(--compact-gap); min-width:0; }
.employee-pay-date>.icon { width:24px; height:24px; flex:0 0 24px; color:var(--muted); }
.employee-pay-date>div,.employee-pay-detail { display:grid; gap:var(--form-label-gap); min-width:0; }
.employee-pay-date time,.employee-pay-detail>strong { font-size:var(--panel-body-size); font-weight:550; line-height:1.4; }
.employee-pay-date span,.employee-pay-detail>span { font-size:var(--panel-caption-size); color:var(--muted); line-height:1.5; }
.employee-pay-detail { padding-left:var(--surface-gap); border-left:1px solid var(--line); }
.employee-pay-amount { padding:var(--compact-gap) var(--surface-gap); border-radius:var(--small-control-corner); background:color-mix(in srgb,var(--action) 8%,var(--surface)); color:var(--action); font-size:var(--panel-body-size); font-weight:550; line-height:1.4; white-space:nowrap; }
.employee-pay-amount.is-missing { background:var(--surface-subtle); color:var(--muted); }
@media(max-width:650px) {
 html[data-theme] body.panel-typography #app .employee-pay-metrics>article { padding:var(--surface-gap); gap:var(--compact-gap); }
 .employee-pay-art { display:none; }
 .employee-pay-row { grid-template-columns:76px minmax(0,1fr); gap:var(--compact-gap); padding:var(--form-gap); }
 .employee-pay-date { grid-column:1; grid-row:1 / span 2; }
 .employee-pay-date>.icon { display:none; }
 .employee-pay-detail { grid-column:2; padding-left:var(--compact-gap); }
 .employee-pay-amount { grid-column:2; justify-self:start; margin-left:var(--compact-gap); padding:calc(var(--compact-gap) / 2) var(--compact-gap); font-size:var(--panel-caption-size); }
}

/* Personal accruals reuse budget figures and the shared registry rows. */
.personal-pay-statistics { display:grid; min-width:0; gap:var(--surface-gap); }
html[data-theme] body.panel-typography #app .statistics-modern .personal-pay-statistics { padding:calc(var(--surface-inset) + var(--compact-gap)); margin:0; background:var(--surface); box-shadow:none; }
.personal-pay-statistics[hidden] { display:none!important; }
.personal-pay-statistics .settings-section-heading { margin:0; }
html[data-theme] body.panel-typography #app .personal-pay-statistics .employee-pay-metrics>article { display:grid; grid-template-columns:minmax(0,1fr); gap:var(--surface-gap); padding:var(--surface-gap); background:var(--surface-subtle); border:0; box-shadow:none; }
html[data-theme] body.panel-typography #app .personal-pay-statistics .employee-pay-metrics>article>strong { font-family:var(--panel-heading-font); font-size:var(--panel-page-title-size); font-weight:450; line-height:1.2; letter-spacing:-.035em; }
@media(min-width:651px) {
 html[data-theme] body.panel-typography #app :is(.personal-pay-statistics,.employee-profile-page) .employee-pay-metrics>article>strong { font-size:var(--statistics-number-size); }
}
.personal-pay-statistics .employee-pay-art { display:none; }
.personal-pay-statistics>.form-note { margin:0; }
.personal-pay-entries { display:grid; gap:var(--list-row-gap); min-width:0; }
.personal-pay-calculation { grid-column:1 / -1; min-width:0; margin:0; }
.personal-pay-calculation dl { display:grid; gap:var(--compact-gap); width:100%; margin:0; }
.personal-pay-calculation dl>div:last-child { padding-top:var(--compact-gap); border-top:1px solid var(--line); }
.personal-pay-calculation dl>div:last-child dd { font-weight:550; }
.personal-pay-calculation dl>div { display:flex; align-items:baseline; justify-content:space-between; flex-wrap:wrap; gap:var(--compact-gap); }
.personal-pay-calculation dt { color:var(--muted); font-size:var(--panel-caption-size); }
.personal-pay-calculation dd { margin:0; font-size:var(--panel-body-size); font-variant-numeric:tabular-nums; }
@media(max-width:650px) { html[data-theme] body.panel-typography #app .statistics-modern .personal-pay-statistics { padding:var(--surface-gap); } }

.personal-pay-details { min-width:0; }
.personal-pay-details>summary { -webkit-tap-highlight-color:transparent; display:flex; align-items:center; justify-content:space-between; gap:var(--compact-gap); min-height:var(--control-height); color:var(--ink); cursor:pointer; list-style:none; font-size:var(--panel-body-size); }
.personal-pay-details>summary::-webkit-details-marker { display:none; }
.personal-pay-details>summary>span { display:inline-flex; align-items:center; gap:var(--compact-gap); }
.personal-pay-details>summary>.icon { width:20px; height:20px; color:var(--muted); }
.personal-pay-details[open]>summary>.icon { transform:rotate(90deg); }
.personal-pay-detail-content { display:grid; gap:var(--surface-gap); padding-top:var(--surface-gap); }

#modal .pay-position-row { grid-template-columns:minmax(0,1fr) 20px; gap:var(--compact-gap); }
#modal .pay-position-row>.pay-position-copy,#modal .pay-position-row>.pay-position-cost { grid-column:1; }
#modal .pay-position-row>.pay-position-cost { border:0; padding-left:0; }
#modal .pay-position-row>.icon { grid-column:2; grid-row:1 / span 2; }

.legal-review-page { max-width:760px; margin:0 auto; padding:var(--surface-inset); padding-top:calc(var(--surface-inset) + env(safe-area-inset-top,0px)); }
html[data-theme] body.panel-typography #app .legal-review-page>.settings-card {
 --surface-corner:var(--card-outer-corner);
 --inset-corner:var(--card-inner-corner);
 --list-row-fill:var(--list-row-surface);
 --list-row-hover-fill:color-mix(in srgb,var(--personal-paper) 85%,var(--personal-board));
 background:var(--personal-board);
 display:grid; gap:var(--surface-gap); padding:var(--surface-inset); }
html[data-theme] body.panel-typography #app .legal-review-page .legal-review-choice { display:grid; grid-template-columns:20px minmax(0,1fr); align-items:start; gap:var(--compact-gap); margin:0; color:var(--ink); font-size:var(--panel-body-size); line-height:1.6; }
html[data-theme] body.panel-typography #app .legal-review-page .legal-review-choice>input { width:20px; height:20px; margin:3px 0 0; accent-color:var(--action); }

html[data-theme] body.panel-typography #app .legal-review-page .legal-review-choice { display:grid; font-weight:400; align-items:start; }
.legal-review-page .legal-review-row .text-button { justify-content:flex-start; text-align:left; justify-self:start; width:auto; min-height:0; padding:0; white-space:normal; }
.legal-review-page .legal-review-row .text-button>.icon { flex:none; }

.legal-review-page .pay-history { gap:var(--list-row-gap); }

/* Personal accrual ledger: compact rows, full calculation in the standard dialog. */
.personal-pay-entries { display:grid; gap:var(--list-row-gap); }
html[data-theme] body.panel-typography #app .personal-pay-ledger-row { display:grid; grid-template-columns:52px minmax(0,1fr) auto; align-items:center; gap:var(--surface-gap); padding:var(--surface-gap); border:0; border-radius:var(--list-row-corner); background:var(--interactive-row-fill,var(--list-row-fill)); }
.employee-history-row .employee-history-date { background:var(--surface); }
.personal-pay-ledger-row .employee-history-main h3 { margin:calc(var(--compact-gap) / 2) 0 0; }
.personal-pay-ledger-row .employee-pay-amount { display:inline-flex; align-items:center; justify-content:flex-end; align-self:center; gap:var(--compact-gap); border:0; background:transparent; padding:var(--compact-gap) 0 var(--compact-gap) var(--compact-gap); font-family:inherit; white-space:nowrap; cursor:pointer; }
.personal-pay-ledger-row .employee-pay-amount>.icon { width:16px; height:16px; flex:none; }
.personal-pay-ledger-row button.employee-pay-amount:hover:where(:not(html[data-hover-disabled] *)) { color:var(--ink); text-decoration:underline; text-underline-offset:.18em; }
.personal-pay-calculation-dialog .settings-section-heading>h3 { margin:0; font-size:var(--panel-body-size); font-weight:550; }
.personal-pay-calculation-dialog .personal-pay-calculation dl { gap:var(--surface-gap); }
@media(max-width:650px) {
 html[data-theme] body.panel-typography #app .personal-pay-ledger-row { grid-template-columns:42px minmax(0,1fr) auto; gap:var(--compact-gap); }
 .personal-pay-ledger-row .employee-history-date { grid-column:1; grid-row:1 / span 2; }
 .personal-pay-ledger-row .employee-history-main { grid-column:2; }
 .personal-pay-ledger-row .employee-pay-amount { grid-column:3; margin:0; font-size:var(--panel-body-size); }
 .personal-pay-ledger-row .employee-history-main h3 { font-size:var(--panel-body-size); }
}

/* Personal mobile shifts use the history row silhouette, including empty days. */
@media(max-width:650px) {
 html[data-theme] body.panel-typography #app :is(.employee-profile-shift-card,.employee-week-day.is-free) { border-radius:var(--list-row-corner); background:var(--interactive-row-fill,var(--list-row-fill)); }
 html[data-theme] body.panel-typography #app .employee-profile-shift-card.is-highlighted { background:var(--list-row-fill); }
 html[data-theme] body.panel-typography #app .employee-profile-shift-date>time { border-radius:14px; color:var(--ink); }
 html[data-theme] body.panel-typography #app .employee-profile-shift-card.is-today .employee-profile-shift-date>time>.employee-profile-shift-day { display:block; width:auto; min-width:0; height:auto; flex:none; border-radius:0; background:transparent; color:var(--ink); }
 html[data-theme] body.panel-typography #app .employee-shift-tile-symbol.is-ongoing { color:var(--status-active-ink); }
 html[data-theme] body.panel-typography #app .employee-page .employee-week-day.is-free { grid-template-columns:42px minmax(0,1fr); gap:var(--surface-gap); padding:var(--surface-gap); }
 html[data-theme] body.panel-typography #app .employee-week-day.is-free .employee-week-date { display:grid; gap:3px; padding:9px 4px; border-radius:14px; background:var(--surface); }
 .employee-week-day.is-free .employee-week-date::after { display:none; }
 html[data-theme] body.panel-typography #app .employee-week-day.is-free .employee-week-date>time { width:auto; height:auto; min-width:0; flex:none; border-radius:0; background:transparent; font-size:21px; line-height:1; }
 .employee-week-day.is-free .employee-week-date>div { display:none; }
 .employee-week-free-month { font-size:12px; line-height:1.3; color:var(--muted); }
 html[data-theme] body.panel-typography #app .employee-week-day.is-free .employee-week-slots { display:grid; justify-content:start; align-content:center; gap:calc(var(--compact-gap) / 2); }
 html[data-theme] body.panel-typography #app .employee-week-day.is-free .employee-week-free { justify-content:flex-start; font-size:var(--panel-body-size); }
 .employee-week-day.is-free .employee-week-free>.icon { display:none; }
 html[data-theme] body.panel-typography #app .employee-shift-tile-actions>.employee-replacement-text { justify-self:start; justify-content:flex-start; width:auto; min-width:0; height:auto; min-height:0; padding:0; border:0; border-radius:0; background:transparent; box-shadow:none; color:var(--control-accent); }
 html[data-theme] body.panel-typography #app .employee-shift-tile-actions>.employee-replacement-text:not(.is-approved):hover:where(:not(html[data-hover-disabled] *)) { background:transparent; color:var(--control-accent-hover); text-decoration:underline; text-underline-offset:3px; }
 .employee-week-free-weekday { display:block; margin-bottom:calc(var(--compact-gap) / 2); font-size:var(--panel-caption-size); color:var(--muted); text-transform:capitalize; }
}
@media(min-width:651px) { .employee-week-free-month,.employee-week-free-weekday { display:none; } }

/* Profile overview and the Shifts tab share the same compact history rows. */
.employee-profile-shift-row { align-items:center; }
html[data-theme] body.panel-typography #app .employee-profile-shift-row .employee-history-main h3 { font-size:var(--panel-section-title-size); }
.employee-profile-shift-row .employee-history-result { align-content:center; }
.employee-profile-shift-row .employee-history-result .shift-state-chip { padding:0; background:transparent; }
@media(max-width:650px) {
 .employee-profile-shift-row { grid-template-columns:42px minmax(0,1fr); gap:var(--compact-gap) var(--surface-gap); }
 .employee-profile-shift-row .employee-history-date { grid-row:1 / span 2; align-self:start; }
 .employee-profile-shift-row .employee-history-main { grid-column:2; }
 .employee-profile-shift-row .employee-history-result { grid-column:2; display:flex; align-items:center; justify-content:space-between; gap:var(--compact-gap); flex-wrap:wrap; }
}

.employee-profile-shift-list { display:grid; gap:var(--list-row-gap); min-width:0; }
.employee-profile-empty-shift { display:grid; grid-template-columns:48px minmax(0,1fr); align-items:center; gap:var(--surface-gap); }
.employee-profile-empty-shift>div { display:grid; gap:var(--compact-gap); min-width:0; }
.employee-profile-empty-shift .form-note { margin:0; }
