/* Uses the existing WashHelm portal variables. The same page serves phone and desktop. */
.staff-app {
  --staff-bg: var(--bg, #faf8f5);
  --staff-surface: var(--surface, #fff);
  --staff-ink: var(--ink, #16150f);
  --staff-muted: var(--ink-3, #6f6d62);
  --staff-line: var(--line, #e7e3d9);
  --staff-accent: var(--accent, #287b54);
  --staff-accent-soft: var(--accent-soft, #dff3e9);
  --staff-warn: var(--warn-ink, #805019);
  --staff-warn-soft: var(--warn-soft, #f9eed8);
  color: var(--staff-ink);
  background: var(--staff-bg);
  min-height: 100vh;
  font-family: var(--font-sans, "IBM Plex Sans", system-ui, sans-serif);
  line-height: 1.45;
}
.staff-app *, .staff-app *::before, .staff-app *::after { box-sizing: border-box; }
.staff-app button, .staff-app input, .staff-app select { font: inherit; }
.staff-app button { cursor: pointer; }
.staff-app button:focus-visible, .staff-app input:focus-visible, .staff-app select:focus-visible,
.staff-app a:focus-visible { outline: 3px solid var(--staff-accent); outline-offset: 3px; }
.staff-frame { width: min(1100px, 100%); margin: 0 auto; padding: 24px clamp(16px, 3vw, 32px) 32px; }
.staff-header { display: flex; justify-content: space-between; align-items: end; gap: 24px; }
.staff-eyebrow { color: var(--staff-accent); text-transform: uppercase; letter-spacing: .12em; font-size: 12px; font-weight: 700; }
.staff-header h1 { font-family: var(--font-serif, Georgia, serif); font-size: clamp(26px, 3vw, 36px); margin: 4px 0 0; }
.staff-header-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.staff-header-actions select { max-width: 230px; background: var(--staff-surface); color: var(--staff-ink); border: 1px solid var(--staff-line); border-radius: 8px; padding: 9px 12px; }
.staff-site-label { font-size: 12px; font-weight: 700; color: var(--staff-muted); }
.staff-site-single { border: 1px solid var(--staff-line); background: var(--staff-surface); padding: 9px 12px; border-radius: 8px; font-weight: 700; }
.staff-tabs { display: flex; gap: 8px; margin: 26px 0 20px; border-bottom: 1px solid var(--staff-line); }
.staff-tabs button { border: 0; border-bottom: 3px solid transparent; background: transparent; color: var(--staff-muted); font-weight: 700; padding: 10px 15px 12px; }
.staff-tabs button[aria-current="page"] { border-bottom-color: var(--staff-accent); color: var(--staff-ink); }
.staff-section-head { display: flex; justify-content: space-between; align-items: start; gap: 14px; margin-bottom: 16px; }
.staff-section-head h2 { font-size: 22px; margin: 0 0 4px; }
.staff-section-head p, .staff-muted { color: var(--staff-muted); font-size: 13px; margin: 0; }
.staff-asof, .staff-revision { color: var(--staff-muted); font-family: var(--font-mono, ui-monospace, monospace); font-size: 12px; }
.staff-revision { margin-bottom: 12px; }
.staff-week-tabs { display: inline-flex; border: 1px solid var(--staff-line); border-radius: 9px; overflow: hidden; background: var(--staff-surface); }
.staff-week-tabs button { border: 0; background: transparent; padding: 9px 12px; min-height: 42px; }
.staff-week-tabs button[aria-pressed="true"] { background: var(--staff-accent-soft); color: var(--staff-ink); font-weight: 700; }
.staff-empty { border: 1px dashed var(--staff-line); background: var(--staff-surface); color: var(--staff-muted); border-radius: 12px; padding: 28px; }
.staff-note { border-radius: 9px; padding: 12px 14px; margin: 10px 0 16px; font-size: 13px; }
.staff-note-good { background: var(--staff-accent-soft); }
.staff-note-warn { background: var(--staff-warn-soft); color: var(--staff-warn); }
.staff-link { color: var(--staff-accent); background: transparent; border: 0; text-decoration: underline; padding: 8px; font-weight: 700; }
.staff-primary { color: #fff; background: var(--staff-accent); border: 1px solid var(--staff-accent); border-radius: 8px; min-height: 44px; padding: 10px 15px; font-weight: 700; }
.staff-primary:hover { filter: brightness(.95); }
.staff-shifts { display: grid; gap: 10px; }
.staff-shift, .staff-request, .staff-option { display: flex; justify-content: space-between; align-items: center; gap: 16px; border: 1px solid var(--staff-line); border-radius: 12px; background: var(--staff-surface); padding: 16px; }
.staff-shift-time { font-size: 17px; font-weight: 700; }
.staff-shift-meta { color: var(--staff-muted); font-size: 13px; margin-top: 4px; }
.staff-shift-actions, .staff-request-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.staff-shift-actions button, .staff-request-actions button:not(.staff-primary), .staff-option button { border: 1px solid var(--staff-line); border-radius: 8px; background: var(--staff-surface); min-height: 42px; padding: 8px 12px; font-weight: 700; }
.staff-proposal, .staff-requests { margin-top: 26px; }
.staff-proposal { background: var(--staff-surface); border: 1px solid var(--staff-line); border-radius: 14px; padding: 20px; }
.staff-proposal-head { display: flex; justify-content: space-between; align-items: center; }
.staff-proposal h3, .staff-confirm h4 { margin: 0 0 10px; }
.staff-proposal p { margin: 8px 0; }
.staff-options { display: grid; gap: 8px; margin-top: 16px; }
.staff-option { border-radius: 9px; }
.staff-option-shifts { display: grid; gap: 6px; justify-items: stretch; min-width: min(400px, 100%); }
.staff-option-shifts button { text-align: left; }
.staff-exception { display: inline-block; border-radius: 6px; background: var(--staff-warn-soft); color: var(--staff-warn); font-weight: 700; font-size: 12px; padding: 5px 8px; margin-top: 6px; }
.staff-confirm { margin-top: 18px; border-top: 1px solid var(--staff-line); padding-top: 18px; }
.staff-confirm .staff-primary { margin-top: 10px; }
.staff-request { display: block; margin-bottom: 10px; }
.staff-request-top { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.staff-status { display: inline-block; border-radius: 999px; background: var(--staff-accent-soft); font-size: 12px; font-weight: 700; padding: 5px 10px; }
.staff-request ul { padding-left: 20px; color: var(--staff-muted); margin: 10px 0; }
.staff-request-actions { margin-top: 14px; }
.staff-score-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.staff-score-tile { min-width: 0; border: 1px solid var(--staff-line); border-radius: 12px; background: var(--staff-surface); padding: 18px; }
.staff-score-label { color: var(--staff-muted); font-size: 13px; font-weight: 700; }
.staff-score-value { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; font-size: clamp(24px, 3vw, 34px); font-weight: 700; margin: 12px 0 3px; font-variant-numeric: tabular-nums; }
.staff-score-value small { color: var(--staff-muted); font-size: 14px; }
.staff-score-target { color: var(--staff-muted); font-size: 12px; }
.staff-score-bar { position: relative; height: 8px; border-radius: 999px; background: var(--staff-line); margin-top: 14px; }
.staff-score-fill { display: block; height: 100%; border-radius: inherit; background: var(--staff-accent); }
.staff-score-fill.staff-tone-warn { background: var(--warn, #b98732); }
.staff-score-bar i { position: absolute; top: -4px; height: 16px; width: 2px; background: var(--staff-ink); }
.staff-score-foot { display: grid; gap: 4px; margin-top: 10px; font-size: 12px; }
.staff-score-foot strong.staff-tone-pos { color: var(--staff-accent); }
.staff-score-foot strong.staff-tone-warn { color: var(--staff-warn); }
.staff-score-foot span { color: var(--staff-muted); }
.staff-working { position: fixed; bottom: 16px; right: 16px; color: var(--staff-ink); background: var(--staff-surface); border: 1px solid var(--staff-line); border-radius: 8px; padding: 10px 14px; box-shadow: 0 4px 20px #0002; }
.staff-footer { color: var(--staff-muted); font-size: 12px; border-top: 1px solid var(--staff-line); margin-top: 32px; padding-top: 16px; }
.staff-auth { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.staff-auth-card { background: var(--staff-surface); border: 1px solid var(--staff-line); border-radius: 16px; padding: clamp(22px, 5vw, 40px); width: min(460px, 100%); box-shadow: 0 6px 30px #0000000d; }
.staff-auth-card h1 { font-family: var(--font-serif, Georgia, serif); margin: 7px 0 10px; }
.staff-auth-card p { color: var(--staff-muted); }
.staff-auth-card label { display: block; font-weight: 700; margin: 18px 0 7px; }
.staff-auth-card input { width: 100%; min-height: 46px; background: var(--staff-surface); color: var(--staff-ink); border: 1px solid var(--staff-line); border-radius: 8px; padding: 10px 12px; }
.staff-auth-card .staff-primary { width: 100%; margin-top: 14px; }
.staff-auth-card .staff-support { border-top: 1px solid var(--staff-line); margin-top: 20px; padding-top: 17px; font-size: 12px; }
.staff-auth-card a { color: var(--staff-accent); }
.staff-manager { min-height: 0; background: transparent; }
.staff-manager-panel { margin: 20px 0; }
.staff-manager-list { display: grid; gap: 10px; }
.staff-manager-list .staff-request { margin: 0; }
.staff-manager-list .staff-primary { margin-top: 12px; }
.staff-manager-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.staff-manager-facts > div { background: var(--staff-bg); border: 1px solid var(--staff-line); border-radius: 9px; padding: 12px; }
.staff-manager-facts h4 { margin: 0 0 6px; }
.staff-manager-facts ul { padding-left: 18px; margin: 0; }
.staff-manager-check { display: flex; align-items: start; gap: 8px; margin: 12px 0; font-weight: 700; }
.staff-manager-panel textarea { display: block; width: 100%; margin: 6px 0 14px; background: var(--staff-surface); color: var(--staff-ink); border: 1px solid var(--staff-line); border-radius: 8px; font: inherit; padding: 8px; }
@media (max-width: 760px) {
  .staff-frame { padding-top: max(16px, env(safe-area-inset-top)); }
  .staff-header { align-items: start; flex-direction: column; gap: 10px; }
  .staff-header-actions { width: 100%; }
  .staff-header-actions select { flex: 1; }
  .staff-score-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .staff-section-head { flex-direction: column; }
  .staff-manager-facts { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 540px) {
  .staff-score-grid { grid-template-columns: minmax(0, 1fr); }
  .staff-shift, .staff-option { align-items: stretch; flex-direction: column; }
  .staff-shift-actions button { flex: 1; }
  .staff-tabs button { flex: 1; }
  .staff-week-tabs { width: 100%; }
  .staff-week-tabs button { flex: 1; }
  .staff-request-top { align-items: start; flex-direction: column; }
}
