/* Ye Star Chinese Buffet - the staff page (/staff): staff accounts, time clock and reports.
   Built on site.css's colors, type and buttons; loaded only by staff.html. */

/* Names this sheet shares with the other buffet sites' copies, mapped to site.css's tokens */
:root {
  --accent: var(--red); --accent-ink: var(--accent-text); --ok: var(--open); --radius-sm: 8px; --font-display: var(--display);
  --accent-soft: color-mix(in srgb, var(--red) 9%, var(--surface)); --line-strong: color-mix(in srgb, var(--muted) 55%, var(--line));
}

[hidden] { display: none !important; }

.staff-page .page-head { padding: clamp(2rem, 5vw, 3.5rem) 0 clamp(1rem, 2vw, 1.5rem); }
.staff-page .section--tight { padding-block: clamp(1.5rem, 4vw, 3rem) clamp(3rem, 7vw, 5rem); }
.btn--plain { background: transparent; color: var(--ink); padding-inline: 0.9rem; }
.btn--plain:hover { background: var(--tint); }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }

.muted { color: var(--muted); }
.small { font-size: 0.9rem; }
.mt-1 { margin-top: 0.5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; }
.divider { height: 1px; background: var(--line); }
.notice { padding: 0.9rem 1.1rem; border-radius: var(--radius-sm); background: var(--accent-soft); color: var(--ink); }
.notice a, .staff-page p a { color: var(--accent-ink); text-underline-offset: 3px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
@media (max-width: 760px) { .grid-2 { grid-template-columns: 1fr; } }

/* Forms */
.field { display: flex; flex-direction: column; gap: 0.35rem; }
.field label { font-weight: 600; font-size: 0.95rem; }
.field .hint { font-size: 0.85rem; color: var(--muted); }
.staff-page input[type="text"], .staff-page input[type="email"], .staff-page input[type="tel"], .staff-page input[type="number"],
.staff-page input[type="password"], .staff-page input[type="date"], .staff-page select {
  width: 100%; min-height: 46px; padding: 0.6rem 0.85rem; border-radius: var(--radius-sm);
  border: 1.5px solid var(--line-strong); background: var(--surface); color: var(--ink); font: inherit; font-size: 1rem;
}
.staff-page input::placeholder { color: var(--muted); opacity: 1; }
.staff-page input:focus, .staff-page select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.form-grid .span-2 { grid-column: span 2; }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } .form-grid .span-2 { grid-column: span 1; } }
.form-msg { margin-top: 0.75rem; font-weight: 600; min-height: 1.4em; }
.form-msg[data-state="error"] { color: var(--accent-ink); }
.form-msg[data-state="success"] { color: var(--ok); }

/* Panels and tables */
.staff-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.25rem, 3vw, 2rem); margin-top: 1.25rem; }
.staff-panel h2, .team-bar h2 { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: 1.75rem; line-height: 1; letter-spacing: 0.01em; }
.staff-panel h3 { font-size: 1.05rem; }
.staff-panel table { width: 100%; border-collapse: collapse; margin-top: 0.75rem; font-size: 0.95rem; }
.staff-panel th, .staff-panel td { text-align: left; padding: 0.55rem 0.5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.staff-panel th { font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.staff-panel td.num, .staff-panel th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.staff-panel tr.total td { font-weight: 700; border-bottom-color: var(--line-strong); }
.staff-panel tr.detail td:first-child { padding-left: 1.5rem; color: var(--muted); }
.staff-panel td.neg { color: var(--accent-ink); }
.pill { display: inline-block; padding: 0.1rem 0.65rem; border-radius: 999px; font-size: 0.8rem; font-weight: 700; background: var(--tint); }
.pill.ok { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.pill.warn { background: var(--accent-soft); color: var(--accent-ink); }
.team-note { margin-top: 0.5rem; color: var(--muted); font-size: 0.88rem; }

/* Signed in */
.team-narrow { max-width: 520px; }
.team-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.75rem 1.25rem; }
.team-bar h2 { font-size: clamp(2rem, 4vw, 2.75rem); }
.team-tabs { display: flex; flex-wrap: wrap; gap: 0.35rem; border-bottom: 1px solid var(--line); }
.team-tab { appearance: none; background: none; border: 0; border-bottom: 3px solid transparent; padding: 0.65rem 0.9rem; margin-bottom: -1px; font: inherit; font-weight: 650; color: var(--muted); cursor: pointer; }
.team-tab:hover { color: var(--ink); }
.team-tab[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.team-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.6rem 1rem; }
.team-controls { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.staff-page .team-controls select, .staff-page .team-controls input { width: auto; min-height: 42px; padding: 0.35rem 0.75rem; }
.team-stats { display: flex; flex-wrap: wrap; gap: 1.25rem 2.5rem; margin: 1.5rem 0 0; padding: 0; list-style: none; }
.team-stats li strong { display: block; font-family: var(--font-display); font-size: 2.4rem; font-weight: 800; line-height: 1; }
.team-stats li span { display: block; margin-top: 0.35rem; color: var(--muted); font-size: 0.92rem; }
.team-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.75rem; margin-top: 1.1rem; }
.team-tile { background: var(--tint); border-radius: var(--radius-sm); padding: 0.9rem 1rem; }
.team-tile strong { display: block; font-family: var(--font-display); font-size: clamp(1.8rem, 3vw, 2.4rem); font-weight: 800; line-height: 1; }
.team-tile span { display: block; margin-top: 0.3rem; color: var(--muted); font-size: 0.9rem; }
.team-tile.is-good strong { color: var(--ok); }
.team-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1.75rem; }
.team-cards h3 { margin-top: 1.5rem; }
.team-forms { align-items: start; }
@media (max-width: 900px) { .team-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .team-cards { grid-template-columns: 1fr; } }
