/* Auth gate — shown by default; hidden by JS after probe confirms valid session */
#auth-gate {
  max-width: 360px;
  margin: 72px auto 0;
  padding: 32px 24px 28px;
  background: #fff;
  border: 1px solid #e0e0e6;
  border-radius: 10px;
}
#auth-gate .ag-logo { display: block; max-height: 40px; width: auto; margin: 0 0 24px; }
#auth-gate .ag-title { font-size: 15px; font-weight: 700; color: #111; margin: 0 0 18px; }
#auth-gate .ag-field { margin-bottom: 12px; }
#auth-gate .ag-field label { display: block; font-size: 12px; font-weight: 600; color: #555; margin-bottom: 4px; letter-spacing: 0.02em; }
#auth-gate .ag-field input { width: 100%; padding: 9px 10px; border: 1px solid #ccc; border-radius: 5px; font-size: 14px; font-family: monospace; }
#auth-gate .ag-field input[type="password"] { letter-spacing: 0.2em; }
#auth-gate .ag-submit { width: 100%; padding: 10px; background: #960000; color: #fff; border: none; border-radius: 5px; font-size: 14px; font-weight: 700; cursor: pointer; margin-top: 6px; }
#auth-gate .ag-submit:disabled { background: #ccc; cursor: default; }
#auth-gate .ag-error { font-size: 12px; color: #b00; margin-top: 10px; min-height: 16px; }
/* Operator workspace — hidden by default; shown by JS after probe confirms valid session */
#op-workspace { display: none; }
/* Top-shell action controls — icon-only, 44×44 touch target */
#top-shell-actions { float: right; margin-top: -48px; margin-bottom: 18px; display: flex; align-items: center; gap: 6px; }
#top-shell-actions button { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 0; font-size: 16px; line-height: 1; color: #888; background: none; border: 1px solid #ddd; border-radius: 4px; cursor: pointer; }
#top-shell-actions button:hover { color: #333; border-color: #bbb; }
/* O2b-a2-s4 — admin drawer (fixed right-side panel) */
#admin-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.22); z-index: 140; opacity: 0; visibility: hidden; transition: opacity 210ms ease, visibility 0s linear 210ms; }
#admin-backdrop.adp-open { opacity: 1; visibility: visible; transition: opacity 210ms ease; }
#admin-panel { position: fixed; top: 0; right: 0; height: 100%; width: min(420px, calc(100vw - 32px)); z-index: 150; background: #fff; border-left: 1px solid #e0e0e6; box-shadow: -4px 0 24px rgba(0,0,0,0.12); display: flex; flex-direction: column; overflow: hidden; opacity: 0; visibility: hidden; transform: translateX(100%); transition: transform 210ms ease, opacity 210ms ease, visibility 0s linear 210ms; }
#admin-panel.adp-open { opacity: 1; visibility: visible; transform: translateX(0); transition: transform 210ms ease, opacity 210ms ease; }
@media (prefers-reduced-motion: reduce) {
  #admin-backdrop, #admin-panel { transition: visibility 0s; }
}
.adp-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 16px 16px; border-bottom: 1px solid #eaeaee; flex-shrink: 0; }
.adp-title { font-size: 15px; font-weight: 700; color: #111; letter-spacing: -0.01em; }
.adp-close { background: none; border: none; font-size: 16px; color: #aaa; cursor: pointer; padding: 4px 8px; border-radius: 4px; line-height: 1; }
.adp-close:hover { color: #333; background: #f0f0f4; }
#admin-panel-body { flex: 1; overflow-y: auto; padding: 16px; }
.adp-section { padding: 14px 0; }
.adp-section + .adp-section { border-top: 1px solid #eaeaee; }
.adp-section-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #bbb; margin-bottom: 10px; }
.adp-placeholder { font-size: 13px; color: #ccc; }
.admin-state-msg { font-size: 13px; color: #888; }
.admin-state-err { color: #b00; }
.ar-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #aaa; margin-bottom: 8px; }
.ar-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ar-table th { text-align: left; font-size: 11px; font-weight: 600; color: #999; padding: 0 8px 6px 0; border-bottom: 1px solid #e0e0e6; }
.ar-table td { padding: 6px 8px 6px 0; border-bottom: 1px solid #f0f0f0; vertical-align: middle; }
.ar-table tbody tr:last-child td { border-bottom: none; }
.ar-id { font-family: monospace; color: #555; }
.ar-active { color: #2a7a2a; font-weight: 600; }
.ar-inactive { color: #999; }
.ar-elevated { font-size: 11px; font-weight: 700; background: #e8e0f8; color: #5a3fa0; border-radius: 3px; padding: 1px 6px; }
.ar-action-btn { font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 3px; cursor: pointer; background: none; border: 1px solid #ddd; color: #777; white-space: nowrap; }
.ar-action-btn:hover { border-color: #bbb; color: #333; }
.ar-action-btn:disabled { opacity: 0.4; cursor: default; }
/* O2b — Add Tech form in Team / Techs drawer section */
.aat-heading { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: #bbb; margin-bottom: 10px; }
.aat-row { margin-bottom: 8px; }
.aat-label { display: block; font-size: 11px; font-weight: 600; color: #888; margin-bottom: 3px; }
.aat-input { width: 100%; padding: 6px 8px; border: 1px solid #ddd; border-radius: 4px; font-size: 13px; box-sizing: border-box; }
.aat-input:focus { outline: none; border-color: #aaa; }
.aat-submit { margin-top: 2px; padding: 5px 14px; font-size: 12px; font-weight: 700; background: #960000; color: #fff; border: none; border-radius: 4px; cursor: pointer; }
.aat-submit:disabled { background: #ccc; cursor: default; }
.aat-feedback { font-size: 12px; min-height: 16px; margin-top: 6px; }
.aat-ok { color: #2a7a2a; }
.aat-err { color: #b00; }
/* O2b — inline PIN reset row */
.ar-pin-reset-btn { font-size: 11px; font-weight: 500; padding: 2px 6px; background: none; border: none; color: #bbb; cursor: pointer; }
.ar-pin-reset-btn:hover { color: #666; }
.ar-pin-reset-row td { background: #f7f7f9; border-bottom: 1px solid #eaeaee; }
.ar-pin-reset-cell { padding: 8px 0 10px; }
.ar-pin-reset-inner { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding-left: 2px; }
.ar-pin-input { padding: 4px 8px; border: 1px solid #ddd; border-radius: 4px; font-size: 13px; font-family: monospace; width: 104px; letter-spacing: 0.12em; }
.ar-pin-input:focus { outline: none; border-color: #aaa; }
.ar-pin-apply-btn { font-size: 11px; font-weight: 700; padding: 4px 10px; background: #960000; color: #fff; border: none; border-radius: 3px; cursor: pointer; }
.ar-pin-apply-btn:disabled { background: #ccc; cursor: default; }
.ar-pin-cancel-btn { font-size: 11px; font-weight: 500; padding: 4px 8px; background: none; border: 1px solid #ddd; border-radius: 3px; color: #888; cursor: pointer; }
.ar-pin-cancel-btn:hover { border-color: #bbb; color: #444; }
.ar-pin-feedback { font-size: 11px; }
.ar-pin-ok { color: #2a7a2a; }
.ar-pin-err { color: #b00; }
/* Delete tech button — shown only for inactive non-elevated non-self techs */
.ar-delete-btn { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 3px; cursor: pointer; background: none; border: 1px solid #e0c0c0; color: #b05050; white-space: nowrap; }
.ar-delete-btn:hover { background: #fff0f0; border-color: #c08080; color: #8b1a1a; }
/* Current-user row identity indicator */
.ar-self td { background: #f4f6fb; }
.ar-you { font-size: 10px; font-weight: 700; color: #6b7db3; background: #e6eaf6; border-radius: 3px; padding: 1px 5px; margin-left: 4px; vertical-align: middle; letter-spacing: 0.02em; }
/* O2c — clickable roster rows */
tr[data-expand-idx] { cursor: pointer; }
tr[data-expand-idx]:hover td { background: #f5f5f8; }
tr[data-expand-idx].ar-self:hover td { background: #eaecf5; }
tr.ar-row-expanded td { background: #eaecf5 !important; }
tr.ar-row-expanded td:first-child { border-left: 2px solid #9fa8d4; padding-left: 6px; }
/* O2c — inline expansion row */
.ar-expansion-row td { background: #f5f5f8; border-bottom: 1px solid #e6e6ec; border-left: 2px solid #9fa8d4; padding: 10px 14px 12px 14px; }
.ar-expansion-cell { /* padding handled by .ar-expansion-row td */ }
.ar-expansion-inner { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
/* Primary actions group (left) */
.ar-exp-primary { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
/* Danger action group (right) */
.ar-exp-danger { flex-shrink: 0; }
/* Separator — available for within-group use if needed */
.ar-exp-sep { display: inline-block; width: 1px; height: 16px; background: #ddd; margin: 0 4px; vertical-align: middle; flex-shrink: 0; }
/* Reset PIN button */
.ar-exp-pin-btn { font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 3px; cursor: pointer; background: none; border: 1px solid #b8b8c4; color: #444; white-space: nowrap; }
.ar-exp-pin-btn:hover { background: #f0f0f6; border-color: #8888a4; color: #222; }
/* Role promote / demote — purple tint; sensitive but not destructive */
.ar-exp-role-btn { font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 3px; cursor: pointer; background: none; border: 1px solid #c4b8d8; color: #5a4080; white-space: nowrap; }
.ar-exp-role-btn:hover { background: #f4f0fa; border-color: #9a80c0; color: #3a2060; }
/* Activate / Deactivate — state-aware tint */
.ar-action-btn.ar-action-activate { border-color: #a4c8a4; color: #2a6a2a; }
.ar-action-btn.ar-action-activate:hover { background: #f0f8f0; border-color: #7aac7a; }
.ar-action-btn.ar-action-deactivate { border-color: #d8c088; color: #6a4e1a; }
.ar-action-btn.ar-action-deactivate:hover { background: #fdf8ee; border-color: #b89860; }
/* Role badge for non-elevated techs */
.ar-role-tech { font-size: 11px; color: #999; }
/* PIN sub-form — inset card */
.ar-pin-form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: #fff; border: 1px solid #e0e0e8; border-radius: 5px; padding: 8px 10px; box-sizing: border-box; width: 100%; }
.ar-pin-label { font-size: 11px; font-weight: 600; color: #666; white-space: nowrap; }
/* O2d — expansion row name display and edit */
.ar-exp-name-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; min-width: 0; flex-wrap: wrap; }
.ar-exp-name-text { font-size: 13px; font-weight: 600; color: #333; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ar-exp-name-edit-btn { font-size: 10px; font-weight: 600; padding: 2px 7px; border-radius: 3px; cursor: pointer; background: none; border: 1px solid #d8d8e0; color: #999; white-space: nowrap; flex-shrink: 0; letter-spacing: 0.03em; }
.ar-exp-name-edit-btn:hover { border-color: #aaa; color: #444; }
.ar-exp-name-input { flex: 1; min-width: 0; padding: 4px 8px; border: 1px solid #bbb; border-radius: 4px; font-size: 13px; font-weight: 600; color: #333; background: #fff; }
.ar-exp-name-input:focus { outline: none; border-color: #8888a4; }
.ar-exp-name-save-btn { font-size: 11px; font-weight: 700; padding: 3px 10px; background: #960000; color: #fff; border: none; border-radius: 3px; cursor: pointer; white-space: nowrap; flex-shrink: 0; }
.ar-exp-name-save-btn:disabled { background: #ccc; cursor: default; }
.ar-exp-name-cancel-btn { font-size: 11px; padding: 3px 8px; background: none; border: 1px solid #ddd; border-radius: 3px; color: #888; cursor: pointer; white-space: nowrap; flex-shrink: 0; }
.ar-exp-name-cancel-btn:hover { border-color: #bbb; color: #444; }
.ar-exp-name-feedback { font-size: 11px; flex-basis: 100%; margin-top: 2px; }
.ar-exp-name-err { color: #b00; }
/* O2c — Add Tech collapsible toggle */
#admin-add-tech-wrap { margin-top: 14px; padding-top: 10px; border-top: 1px solid #eaeaee; }
.aat-toggle { display: flex; justify-content: space-between; align-items: center; width: 100%; background: none; border: none; cursor: pointer; padding: 2px 0 6px; text-align: left; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: #bbb; }
.aat-toggle:hover { color: #888; }
.aat-toggle-icon { font-size: 15px; font-weight: 300; color: #ccc; line-height: 1; transition: transform 0.15s, color 0.1s; }
.aat-toggle[aria-expanded="true"] .aat-toggle-icon { transform: rotate(45deg); color: #999; }
#aat-form-body { padding-top: 8px; }
/* O2c — pending / placeholder sections */
.adp-section--pending .adp-section-title { color: #ccc; }
.adp-section--pending .adp-placeholder { font-size: 12px; color: #ccc; font-style: italic; }
