/* Throughly dashboard — minimal stylesheet, no framework. */

/* ── Tab navigation (admin dashboard) ────────────────────────────────── */
/* Pill-style tabs across the top of <main>. The active button gets an
   accent-coloured underline + accent text; switching shows/hides the
   corresponding .tab-panel by toggling the .active class. Hidden
   panels stay in the DOM so loaders + WebSocket handlers don't need
   to know which tab is active — they always have something to write
   into. */
.tab-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border);
    /* Subtle padding so the bottom border sits flush with .tab-nav button's
       negative margin trick below. */
    padding: 0;
}

.tab-nav button {
    background: transparent;
    border: none;
    padding: 10px 16px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    /* Overlap the nav's bottom border so the active tab's underline
       merges seamlessly with the divider line. */
    margin-bottom: -1px;
    transition: color 80ms ease, border-color 80ms ease;
}

.tab-nav button:hover { color: var(--fg); }

.tab-nav button.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

/* Panels: hidden by default, visible only with .active. The .hidden
   attribute / class on inner sections (e.g. team-card) still wins
   because it sets display:none directly on that element. */
.tab-panel { display: none; }
.tab-panel.active { display: block; }


:root {
    color-scheme: light dark;

    /* Light theme. */
    --bg:           #f8fafc;
    --surface:      #ffffff;
    --surface-alt:  #f1f5f9;
    --border:       #e2e8f0;
    --fg:           #0f172a;
    --muted:        #64748b;
    --accent:       #2563eb;
    --accent-hover: #1d4ed8;
    --accent-soft:  #dbeafe;
    --success:      #16a34a;
    --warning:      #d97706;
    --danger:       #dc2626;
    --shadow-sm:    0 1px 2px rgba(15, 23, 42, 0.06);
    --shadow-md:    0 4px 12px rgba(15, 23, 42, 0.08);
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg:           #0b1220;
        --surface:      #111827;
        --surface-alt:  #1f2937;
        --border:       #1f2937;
        --fg:           #f1f5f9;
        --muted:        #94a3b8;
        --accent:       #3b82f6;
        --accent-hover: #60a5fa;
        --accent-soft:  rgba(59, 130, 246, 0.18);
        --shadow-sm:    0 1px 2px rgba(0, 0, 0, 0.3);
        --shadow-md:    0 4px 12px rgba(0, 0, 0, 0.4);
    }
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--fg);
    background: var(--bg);
    line-height: 1.5;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.hidden { display: none !important; }

/* ── Auth (login / callback) ─────────────────────────────────────────────── */

.auth-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: var(--bg);
}

.auth-card {
    background: var(--surface);
    padding: 40px 36px;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    width: min(360px, 90vw);
    text-align: center;
}

.auth-card h1 {
    margin: 0 0 8px;
    font-size: 26px;
    font-weight: 700;
}

.tagline { color: var(--muted); margin: 0 0 24px; font-size: 14px; }

/* Three-step instruction list on the tasker stub page. Left-aligned
   inside the otherwise-centered auth-card so the steps read like
   instructions rather than marketing copy. */
.ext-steps {
    text-align: left;
    color: var(--fg);
    font-size: 13px;
    line-height: 1.5;
    padding-left: 20px;
    margin: 0 0 24px;
}
.ext-steps li { margin-bottom: 6px; }

/* Signup form on /signup.html. Stacked fields with a primary button
   underneath. Reuses the .field class from the in-app forms; this
   block just gives the auth-card layout some breathing room. */
.signup-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    text-align: left;
    margin-bottom: 16px;
}

.signup-form .field { gap: 4px; }
.signup-form .field span { font-size: 13px; color: var(--muted); }

.signup-form input[type="email"],
.signup-form input[type="text"] {
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    background: var(--surface);
    color: var(--fg);
}

.signup-form button { margin-top: 4px; }

.error-msg {
    color: var(--danger);
    font-size: 13px;
    margin: 16px 0 0;
}

/* ── Buttons ────────────────────────────────────────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 16px;
    border-radius: 6px;
    border: 1px solid var(--accent);
    background: var(--accent);
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: background 80ms ease, border-color 80ms ease;
}
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); text-decoration: none; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* Loading state for buttons mid-async (login click, form submit). Blocks
   further clicks via pointer-events instead of `disabled` so an anchor
   tag like .btn-google still completes its native navigation. */
.btn-loading {
    pointer-events: none;
    opacity: 0.7;
    cursor: progress;
}

.btn-secondary {
    background: transparent;
    color: var(--accent);
}
.btn-secondary:hover { background: var(--accent-soft); }

.btn-danger {
    background: var(--danger);
    border-color: var(--danger);
}
.btn-danger:hover { background: #b91c1c; border-color: #b91c1c; }

.btn-google {
    display: block;
    width: 100%;
    padding: 11px 16px;
    margin-top: 12px;
}

.btn-sm { padding: 5px 10px; font-size: 12px; }

/* Inline text button styled as a link — used for low-emphasis actions inside
   body copy (e.g. "resend the magic link"). Looks like an <a> but is a real
   <button> so it carries no href and is keyboard/disabled-friendly. */
.link-btn {
    appearance: none;
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    color: var(--accent);
    cursor: pointer;
    text-decoration: underline;
}
.link-btn:hover { color: var(--accent-hover); }
.link-btn:disabled { color: var(--muted); cursor: not-allowed; text-decoration: none; }

/* ── Dashboard layout ───────────────────────────────────────────────────── */

.app-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.app-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.app-header h1 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--fg);
}

.app-header h1 .tenant {
    font-weight: 400;
    color: var(--muted);
    margin-left: 8px;
}

.app-header .spacer { flex: 1; }

.user-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--surface-alt);
    font-size: 13px;
}

.role-badge {
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: 0.05em;
    padding: 2px 6px;
    border-radius: 4px;
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 600;
}

main.app-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

section.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
    padding: 20px 24px;
}

section.card > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

section.card h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

section.card .section-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Filter row on the Tasks card: a few inputs + a "Last 30 days" button.
   Stack each field tight, with the label sitting above its control. */
section.card .task-filters { flex-wrap: wrap; }
section.card .task-filters .field { flex: 0 0 auto; gap: 2px; }
section.card .task-filters .field-label {
    font-size: 11px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
section.card .task-filters input[type="date"] {
    padding: 5px 8px;
    font-size: 13px;
}

/* ── Tables ─────────────────────────────────────────────────────────────── */

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.data-table th, .data-table td {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
}

.data-table th {
    font-weight: 600;
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.data-table tbody tr:hover { background: var(--surface-alt); }

.data-table .actions { text-align: right; white-space: nowrap; }

.empty-row td {
    text-align: center;
    color: var(--muted);
    font-style: italic;
    padding: 20px;
}

/* ── Forms ──────────────────────────────────────────────────────────────── */

.form-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
    flex-wrap: wrap;
}

.form-row > * { min-width: 0; }

input, select {
    font: inherit;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--surface);
    color: var(--fg);
    flex: 1;
}

input:focus, select:focus {
    outline: 2px solid var(--accent);
    outline-offset: -1px;
}

label.field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
    color: var(--muted);
}

label.field input, label.field select { font-size: 14px; color: var(--fg); }

/* ── Metric cards ───────────────────────────────────────────────────────── */

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.metric {
    padding: 16px;
    background: var(--surface-alt);
    border-radius: 8px;
}

.metric .label {
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.metric .value {
    font-size: 28px;
    font-weight: 700;
    margin-top: 4px;
}

.metric .sub {
    color: var(--muted);
    font-size: 12px;
    margin-top: 2px;
}

/* ── Anomalies ──────────────────────────────────────────────────────────── */

.anomalies { display: flex; flex-direction: column; gap: 8px; }

.anomaly {
    display: flex;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 6px;
    background: var(--surface-alt);
    border-left: 3px solid var(--warning);
}

.anomaly-low    { border-left-color: var(--muted); }
.anomaly-medium { border-left-color: var(--warning); }
.anomaly-high   { border-left-color: var(--danger); }

.anomaly .rule {
    font-weight: 600;
    font-size: 13px;
}

.anomaly .msg {
    font-size: 13px;
    color: var(--muted);
}

/* ── Modal ──────────────────────────────────────────────────────────────── */

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    display: grid;
    place-items: center;
    z-index: 100;
}

.modal {
    background: var(--surface);
    border-radius: 10px;
    box-shadow: var(--shadow-md);
    padding: 24px;
    width: min(480px, 90vw);
}

.modal h3 { margin: 0 0 12px; font-size: 18px; }

.modal .secret-block {
    margin: 12px 0;
    padding: 10px;
    background: var(--surface-alt);
    border-radius: 6px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 12px;
    word-break: break-all;
    user-select: all;
}

.modal .actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 16px;
}

/* ── Flash / status messages ────────────────────────────────────────────── */

.flash {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 12px 16px;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    font-size: 13px;
    z-index: 200;
}
.flash-error   { background: #fee2e2; color: #991b1b; }
.flash-success { background: #dcfce7; color: #15803d; }
.flash-info    { background: var(--accent-soft); color: var(--accent); }

@media (prefers-color-scheme: dark) {
    .flash-error   { background: #4c1d1d; color: #fecaca; }
    .flash-success { background: #14532d; color: #bbf7d0; }
}

/* ── Range selector ─────────────────────────────────────────────────────── */

.range-tabs {
    display: inline-flex;
    background: var(--surface-alt);
    border-radius: 6px;
    padding: 2px;
}

.range-tabs button {
    border: none;
    background: transparent;
    color: var(--muted);
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
}

.range-tabs button.active {
    background: var(--surface);
    color: var(--fg);
    box-shadow: var(--shadow-sm);
}

/* ── Loading ────────────────────────────────────────────────────────────── */

.loading {
    color: var(--muted);
    font-style: italic;
    padding: 20px;
    text-align: center;
}

/* Reusable rotating-ring spinner. Inherits its colour from the parent's
   text colour via `currentColor`, so it works inside buttons, table cells,
   and on the auth card without per-context variants. */
.spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-rotate 0.7s linear infinite;
    vertical-align: -3px;
    opacity: 0.85;
}

.spinner-lg {
    width: 22px;
    height: 22px;
    border-width: 2.5px;
    vertical-align: -5px;
}

@keyframes spinner-rotate {
    to { transform: rotate(360deg); }
}

/* Centered block used on auth/landing pages while the page waits on a
   network call (OAuth callback, signup activation). The spinner sits
   above a short status line. */
.loading-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 24px 0 8px;
    color: var(--muted);
}

.loading-block .spinner-lg { opacity: 1; color: var(--accent); }

/* ── Layout helpers (pulled out of inline style attributes for CSP) ─────── */

/* Small-caps subheading inside a card section. */
.section-subhead {
    font-size: 13px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 24px;
}

.section-subhead:first-of-type { margin-top: 0; }

/* Report metadata line just below the range tabs. */
.report-meta { margin-bottom: 16px; }

/* Top of an invites table that follows a form. */
.invites-table { margin-top: 16px; }

/* Wider field in a form-row (e.g. email column should grow more than role). */
.field-wide { flex: 2; }

/* Submit button that lives at the end of a form-row, vertically aligned with inputs. */
.form-row-end { align-self: end; }

/* Leaderboard cells. */
.leaderboard-rank {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--muted);
}
.leaderboard-score {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}
.leaderboard-row-self {
    background: var(--accent-soft);
}
.leaderboard-row-self:hover {
    background: var(--accent-soft);
}

/* Team-board signals. The top row reuses leaderboard-row-self styling
   with a green tint via this class; underperformers get a subtle
   warning band so the manager can spot quality dips at a glance. */
.team-row-top {
    background: rgba(22, 163, 74, 0.10);
}
.team-row-underperformer {
    background: rgba(217, 119, 6, 0.10);
}
@media (prefers-color-scheme: dark) {
    .team-row-top { background: rgba(74, 222, 128, 0.12); }
    .team-row-underperformer { background: rgba(251, 191, 36, 0.12); }
}

/* Header chips: one badge per role, wraps if the user has many. */
.header-role-chips {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px;
}

/* Inline "value + Copy" row for read-only fields like the ingest URL. */
.copy-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 4px 0 16px;
}
.copy-row-value {
    flex: 1;
    padding: 8px 10px;
    background: var(--surface-alt);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 13px;
    overflow-x: auto;
    white-space: nowrap;
    user-select: all;
}

/* External ID cell: value + Edit button on one line. */
.external-id-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}
.external-id-value {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 13px;
}

/* Task + leave status colour-coding — reuses the role-badge shape.
   The leave workflow adds approved + cancelled to the task lexicon;
   they share rejected/pending styling because that's what they look
   like in practice (cancelled is "withdrawn", approved is "good
   to go" like validated). */
.status-validated,
.status-approved  { background: #dcfce7; color: #15803d; }
.status-rejected  { background: #fee2e2; color: #991b1b; }
.status-pending   { background: var(--surface-alt); color: var(--muted); }
.status-cancelled { background: var(--surface-alt); color: var(--muted); font-style: italic; }

@media (prefers-color-scheme: dark) {
    .status-validated,
    .status-approved  { background: #14532d; color: #bbf7d0; }
    .status-rejected  { background: #4c1d1d; color: #fecaca; }
}

/* ── Leave chips (on-leave-today row) ──────────────────────────────────── */
/* Small chip per person on approved leave today. Same visual language
   as role/manager chips but tinted amber to communicate "out of
   office" at a glance. */
.leave-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 4px 0 16px;
}

.leave-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(217, 119, 6, 0.10);
    color: #b45309;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 500;
}
.leave-chip .leave-chip-type {
    background: #fff;
    color: #92400e;
    border-radius: 4px;
    padding: 1px 6px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
@media (prefers-color-scheme: dark) {
    .leave-chip {
        background: rgba(251, 191, 36, 0.18);
        color: #fbbf24;
    }
    .leave-chip .leave-chip-type {
        background: #1f2937;
        color: #fbbf24;
    }
}

/* ── Shift modal pieces ─────────────────────────────────────────────────── */

/* Start/End times side-by-side instead of stacked. Each cell still uses
   the standard .field block; this wrapper just lays them out. */
.shift-times {
    display: flex;
    gap: 12px;
}
.shift-times .field { flex: 1; }

/* Day-of-week checkbox grid. 7 small labels in one row; wraps on
   narrow widths. Each label is a clickable target wrapping the
   checkbox + day name. */
.day-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.day-pick {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 13px;
    cursor: pointer;
    user-select: none;
}
.day-pick:hover { border-color: var(--accent); }
.day-pick input { margin: 0; }

/* Overtime tasker checklist — a scrollable column of checkboxes so a manager
   with a big team can pick a subset for one OT window. */
.tasker-checklist {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: 220px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 6px 8px;
}
.tasker-pick {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 2px;
    font-size: 13px;
    cursor: pointer;
    user-select: none;
}
.tasker-pick input { margin: 0; }
.tasker-checklist-actions { margin-top: 6px; }

/* Overtime "OT window" group header row above its per-tasker rows in the
   approvals table — tinted so the grouping reads at a glance. */
.ot-group-row td {
    background: var(--surface-alt);
    font-size: 13px;
    color: var(--muted);
}
.ot-group-row strong { color: var(--fg); }

/* ── Roles + assignment chips ───────────────────────────────────────────── */

/* Wider modal variant for role-editing form. */
.modal-wide { width: min(640px, 92vw); }

/* Stacked chip group inside a table cell — wraps gracefully on narrow screens. */
.chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}

.chip-empty {
    color: var(--muted);
    font-style: italic;
    font-size: 12px;
}

/* A removable chip used for assigned roles / managers in tasker rows. */
.chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--accent-soft);
    color: var(--accent);
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: 500;
}

.chip-remove {
    border: none;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    padding: 0 2px;
    border-radius: 999px;
    opacity: 0.7;
}
.chip-remove:hover { opacity: 1; }
.chip-remove:disabled { opacity: 0.4; cursor: not-allowed; }

/* System role chip (e.g. "Admin", "Tasker") — distinct shade so users
   know it can't be edited. */
.chip-system {
    background: var(--surface-alt);
    color: var(--muted);
}

/* Inline assigner: "+" button next to the chip group that pops a small
   menu for picking a role / manager to add. */
.chip-add {
    border: 1px dashed var(--border);
    background: transparent;
    color: var(--muted);
    border-radius: 999px;
    width: 22px;
    height: 22px;
    line-height: 1;
    cursor: pointer;
    font-size: 14px;
    padding: 0;
}
.chip-add:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* Permission picker (modal body). */
.permissions-picker {
    max-height: 50vh;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 12px;
}

.permission-group + .permission-group {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

.permission-group h4 {
    margin: 0 0 8px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
}

.permission-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 0;
    font-size: 13px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    cursor: pointer;
}

.permission-group label:hover { color: var(--accent); }

/* Form fields used inside the role-edit modal. */
.modal .field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 12px;
    font-size: 13px;
    color: var(--muted);
}

.modal .field input[type="text"],
.modal .field textarea {
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--fg);
    font-size: 14px;
}

.modal .field textarea {
    min-height: 60px;
    font-family: inherit;
    resize: vertical;
}

/* Tiny popover menu used by the "+" assigner. Positioned by the JS that
   creates it; we only style appearance here. */
.assigner-menu {
    position: absolute;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    box-shadow: var(--shadow-md);
    padding: 4px;
    z-index: 50;
    max-height: 240px;
    overflow-y: auto;
    min-width: 180px;
}

.assigner-menu button {
    display: block;
    width: 100%;
    text-align: left;
    border: none;
    background: transparent;
    color: var(--fg);
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
}

.assigner-menu button:hover { background: var(--accent-soft); color: var(--accent); }

.assigner-menu .empty {
    padding: 8px 10px;
    color: var(--muted);
    font-size: 12px;
    font-style: italic;
}

/* ── Performance scorecard + per-tasker bars (Phase E) ───────────────────── */
.gate { font-variant-numeric: tabular-nums; white-space: nowrap; }
.gate-pass .gate-value { color: var(--success); font-weight: 600; }
.gate-fail .gate-value { color: var(--danger);  font-weight: 600; }
.gate-fail { background: color-mix(in srgb, var(--danger) 8%, transparent); }
.gate-bar  { color: var(--muted); }
.gate-gap  { color: var(--muted); font-size: 12px; }
.gate-na   { color: var(--muted); }

.perf-bars-cell { white-space: nowrap; }
.perf-bar-line { display: flex; align-items: center; gap: 4px; font-size: 12px; line-height: 1.6; }
.perf-bar-value { color: var(--muted); }

.field-inline { flex-direction: row; align-items: center; gap: 6px; }

/* Performance policy card: separate the two independent save-forms (pay period
   vs team bars) so it's clear they save separately. */
#perf-policy-card #pay-period-form { margin-bottom: 20px; }
#perf-policy-card #team-bars-form {
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

/* Inline hint under a form field (e.g. anchor "not used for monthly"). */
.field-hint { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
/* display:block above overrides the `hidden` attribute's UA display:none —
   restore it so [hidden] actually hides the hint. */
.field-hint[hidden] { display: none; }

/* Break board card header: title left, Refresh button right. */
.break-board-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
