/* css/admin.css — styles owned by js/views/staff.js and js/views/events.js */

/* ---------- Staff roster ---------- */
.table-scroll{overflow-x:auto}
.staff-table .who small{color:var(--text-muted)}
.staff-table .branches{white-space:normal;max-width:260px}
.staff-table .actions-cell .btn{margin-left:4px}

/* ---------- Account form ---------- */
.acct-form{display:flex;flex-direction:column;gap:var(--gap)}
.checks{border:0;padding:0;margin:0;min-width:0}
.checks legend{font-size:var(--fs-sm);font-weight:500;padding:0;margin-bottom:6px}
.check{display:flex;align-items:center;gap:8px;font-size:var(--fs-sm);min-height:28px;cursor:pointer}
.check input{width:16px;height:16px;margin:0;accent-color:var(--primary)}
.link.sm{font-size:var(--fs-sm);white-space:nowrap}
.input.pw{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;letter-spacing:.08em;font-size:calc(var(--fs) * 1.05)}

/* ---------- One-time hand-off and the identity strip in confirms ---------- */
.handoff-row{display:flex;gap:8px;align-items:center}
.handoff-row .input{flex:1;min-width:0}
.identity{display:inline-flex;width:100%;align-items:center;gap:10px;padding:8px 10px;margin-bottom:10px;border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--muted-2)}
.identity-text{display:inline-flex;flex-direction:column;line-height:1.3;min-width:0}
.identity-text b{font-weight:500}
.identity-text small{color:var(--text-muted)}

/* ---------- Event history ---------- */
.evt-filters{display:grid;grid-template-columns:minmax(200px,2fr) repeat(4,minmax(130px,1fr)) auto;gap:8px 12px;align-items:end}
.evt-filters .field{min-width:0}
.evt-filters .clear:empty{display:none}
@media (max-width:1199px){
  .evt-filters{grid-template-columns:repeat(4,minmax(0,1fr))}
  .evt-filters .q{grid-column:1 / -1}
}
.evt-day{padding:12px var(--pad) 6px;background:var(--muted-2);border-top:1px solid var(--border);border-bottom:1px solid var(--border)}
.evt-day h3{font-size:var(--fs-sm);font-weight:600;color:var(--text-soft)}
.evt-list{padding:0 var(--pad)}
.evt-list .text{min-width:0;overflow-wrap:anywhere}
.evt-list .rowlink{font-weight:500;text-decoration:none}
.evt-list .rowlink:hover{text-decoration:underline}
.pager .btn{width:auto;height:calc(var(--control-h) - 8px)}
.panel-info .lucide{width:1em;height:1em;vertical-align:-.15em;margin-right:4px}

/* ---------- Breakpoints ---------- */
@media (max-width:1199px){
  .staff-table .optional{display:none}
}
@media (max-width:1023px){
  .evt-filters{grid-template-columns:1fr 1fr}
  .evt-filters .q,.evt-filters .clear{grid-column:1 / -1}
}
@media (max-width:767px){
  .evt-list .evt{grid-template-columns:auto 1fr;gap:2px 10px}
  .evt-list .evt .text{grid-column:1 / -1}
  .evt-list .evt .actor{color:var(--text-muted)}
}
@media (max-width:640px){
  /* The roster becomes a card list here, so it must not keep the shared 560px table minimum. */
  .card.tight .staff-table{min-width:0}
  .staff-table,.staff-table tbody{display:block}
  .staff-table thead{display:none}
  .staff-table tr{display:grid;grid-template-columns:1fr auto;align-items:center;gap:8px 12px;padding:12px;border-bottom:1px solid var(--border)}
  .staff-table tr:last-child{border-bottom:0}
  .staff-table td{display:block;height:auto;padding:0;border:0;white-space:normal}
  .staff-table tbody tr:hover td{background:none}
  .staff-table td.role-cell,.staff-table td.status-cell{justify-self:end}
  .staff-table td.branches{display:block;max-width:none;font-size:var(--fs-xs);color:var(--text-muted)}
  .staff-table td.branches::before{content:"Branches: "}
  .staff-table td.actions-cell{grid-column:1 / -1;display:flex;flex-wrap:wrap;gap:6px;text-align:left}
  .staff-table td.actions-cell .btn{margin:0}
  .evt-day{padding:10px 12px 4px}
  .evt-list{padding:0 12px}
}
