/* People, time, Me and settings (features-admin.js). Loads after app.css. */

/* switch: the off-state outline reaches 3:1 against the sheet and the page */
.switch i { box-shadow: inset 0 0 0 1.5px #8c8c8c; }
.switch input:checked + i { box-shadow: none; }
:root[data-theme="light"] .switch i { box-shadow: inset 0 0 0 1.5px #6b6a66; }
:root[data-theme="light"] .switch input:checked + i { box-shadow: none; }
.switch input:focus-visible + i { outline: 2px solid var(--fg); outline-offset: 2px; }

/* section heads with a trailing count or action */
.adm-sec { align-items: center; }
.adm-sec .sec-h .tnum { margin-left: 6px; font-weight: 400; }
.adm-sec > .muted { font-size: 13px; margin-top: 12px; }
.adm-sec .link-btn { min-height: 44px; margin-top: 12px; }

/* invites and deactivated people read as quieter rows */
.adm-pending .av { background: transparent; box-shadow: inset 0 0 0 1px var(--line-2); color: var(--muted); }
.adm-gone .av { opacity: .55; }
.adm-gone b { color: var(--fg-2); }

/* sheet layout helpers */
.adm-contact { padding-top: 4px; padding-bottom: 8px; }
.adm-contact .btn { min-height: 48px; }
.adm-gap { margin-top: 18px; }
.adm-wide { margin: 16px var(--gutter) 0; width: calc(100% - 2 * var(--gutter)); }
.adm-tight { margin-top: 0; padding-top: 0; }
.adm-lbl { margin: 4px var(--gutter) 2px; font-size: 12px; color: var(--muted); }
.adm-wrap { font-weight: 400; line-height: 1.4; }
.adm-pad { margin: 0 var(--gutter); }
.adm-banner { align-items: center; }
.adm-banner .chip { flex: none; }

/* time sheet: Break and Switch site lead; Finish day is a quiet text button */
.adm-quiet-wrap { display: flex; justify-content: center; padding: 0 var(--gutter) 4px; }
.adm-quiet { min-height: 48px; padding: 0 16px; font-size: 15px; color: var(--fg-2); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--line-2); }
.adm-quiet:active { color: var(--fg); }

/* break chips sit on one row */
.adm-brk { flex-wrap: nowrap; }
.adm-brk .chip { flex: 1 1 0; min-width: 0; padding: 0 4px; justify-content: center; white-space: nowrap; }
.adm-sec .sec-h { margin-top: 18px; }

/* profile: Edit in the nav is a text button; the role line reads as fixed */
.prof-edit { font-size: 16px; font-weight: 500; color: var(--fg); padding: 0 var(--gutter) 0 12px; }

/* team timesheet grid (O18) */
.tt-grid { width: calc(100% - 2 * var(--gutter)); margin: 4px var(--gutter) 6px; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.tt-grid th, .tt-grid td { padding: 0 4px; text-align: right; border-bottom: 1px solid var(--line); height: 52px; }
.tt-grid thead th { height: 32px; font-size: 12px; font-weight: 400; color: var(--muted); }
.tt-grid th:first-child { text-align: left; padding-left: 0; }
.tt-grid tbody th { font-weight: 400; font-size: 14px; color: var(--fg); }
.tt-who { display: flex; align-items: center; gap: 8px; }
.tt-grid tbody th .av { width: 28px; height: 28px; font-size: 11px; }
.tt-grid tbody tr { cursor: pointer; }
.tt-grid tbody tr:active { background: var(--surface); }
.tt-grid td b { font-weight: 600; }
.tt-grid .tt-edited { text-decoration: underline dotted; text-underline-offset: 3px; }
.tt-grid .pulse { display: inline-block; width: 6px; height: 6px; margin-right: 4px; vertical-align: middle; }

/* time edit: the reason sits first, as chips (F9) */
.te-reason { padding-bottom: 6px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.te-reason .adm-lbl b { font-weight: 500; color: var(--fg-2); }
.sheet-timeEdit .sh-foot .btn.primary:disabled { opacity: 1; background: var(--surface); color: var(--fg-2); box-shadow: inset 0 0 0 1px var(--line-2); }

/* person card: sites as Off / Crew / Lead in one sheet with one Save (O17) */
.adm-site { gap: 10px; }
.adm-site .grow { min-width: 0; }
.adm-seg { flex: none; box-shadow: inset 0 0 0 1px var(--line-2); }
.adm-seg button { min-width: 48px; min-height: 44px; padding: 0 8px; font-size: 13px; }
.adm-pend { margin-top: 10px; }
.adm-pend .sh-foot.inline { padding: 10px 0 0; }

/* My work: the whole to-do row toggles, 64px tall (F12) */
.row.mw-todo { min-height: 64px; }
.row.mw-todo .checkbox { width: 28px; height: 28px; }

/* demoting a lead: a new lead for each site they lead, picked in the same sheet (O2-10) */
.adm-repl { padding-bottom: 4px; }
.adm-repl-chips { padding: 0 var(--gutter) 10px; }

/* ---------- round 8 (Bundle D) ---------- */
/* J20: each day cell is its own 52pt target that opens the day; the underline says it can be changed */
.tt-grid td.tt-cell { cursor: pointer; text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 4px; }
.tt-grid td.tt-cell:active { background: var(--surface); }
.tt-grid td.tt-cell:focus-visible { outline: 1.5px solid var(--fg); outline-offset: -3px; }

/* ---------- round 10 (Bundle D) ---------- */
/* D4-12: the meter chips' sublabels read at AA in Daylight: 12px on the chip's secondary token, no fade */
.chip.sc-meter.sc-meter small { font-size: 12px; color: var(--fg-2); opacity: 1; }
