/* staff/duties.css - the Duties section (staff/duties.js). Uses the staff.css tokens only, so both themes follow */

.duty-seg {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--panel-elevated);
  margin-bottom: 0.6rem;
}
.duty-seg button {
  background: transparent;
  border: 0;
  color: var(--text-dim);
  font-size: 0.82rem;
  padding: 4px 10px;
}
.duty-seg button.active {
  background: var(--gold);
  color: var(--ground);
  font-weight: 600;
}
.duty-count {
  display: inline-block;
  min-width: 1.4em;
  margin-left: 0.35em;
  font-variant-numeric: tabular-nums;
  opacity: 0.85;
}

.duty-tag.ok { color: var(--ok); border-color: var(--ok); }
.duty-tag.warn { color: var(--warn); border-color: var(--warn); }
.duty-tag.bad { color: var(--bad); border-color: var(--bad); }
.duty-late { color: var(--bad); font-weight: 600; }
.duty-cmd { font-size: 0.78rem; white-space: nowrap; color: var(--text-dim); }
.duty-acts { display: inline-flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; }
.duty-acts a { font-size: 0.82rem; }
.duty-cell { display: inline-flex; flex-wrap: wrap; gap: 0.2rem; align-items: baseline; }
.duty-cell a, .duty-cell strong { white-space: nowrap; }

.duty-note { margin: 0.5rem 0 0; font-size: 0.85rem; }
.duty-note.ok { color: var(--ok); }
.duty-note.warn { color: var(--warn); }
.duty-note.bad { color: var(--bad); }
.duty-small { font-size: 0.82rem; margin: 0.5rem 0 0; }
.duty-sub {
  margin: 0.8rem 0 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.duty-sub:first-child { margin-top: 0; }

.duty-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; }
.duty-checks li {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.6rem;
  align-items: baseline;
  padding: 0.4rem 0.55rem;
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--panel-soft);
  font-size: 0.88rem;
}
.duty-checks li.ok { border-left-color: var(--ok); }
.duty-checks li.bad { border-left-color: var(--bad); }
.duty-checks.reminders li { border-left-color: var(--gold-border); }
.duty-mark { font-weight: 600; min-width: 4.5rem; }
.duty-checks li.ok .duty-mark { color: var(--ok); }
.duty-checks li.bad .duty-mark { color: var(--bad); }
.duty-refs { font-size: 0.8rem; }
.duty-sec { margin-left: auto; font-size: 0.75rem; white-space: nowrap; }

.duty-bars {
  display: grid;
  grid-template-columns: repeat(14, minmax(0, 1fr));
  gap: 3px;
  align-items: end;
  height: 92px;
}
.duty-bar {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: stretch;
}
.duty-fill {
  display: block;
  min-height: 2px;
  background: var(--gold);
  border-radius: 2px 2px 0 0;
  margin-bottom: 16px;
}
.duty-day {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 0.68rem;
  color: var(--text-faint);
}

.duty-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0.5rem; align-items: end; margin-top: 0.4rem; }
.duty-form label { display: grid; gap: 0.2rem; font-size: 0.8rem; color: var(--text-dim); }
.duty-form input { width: 100%; box-sizing: border-box; }
.duty-form .duty-wide { grid-column: 1 / -1; }

.duty-remind {
  margin: 0.5rem 0;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-sm);
  background: var(--gold-fill);
  font-size: 0.82rem;
  color: var(--text);
}
dialog.duty-dlg { width: min(560px, calc(100vw - 32px)); }
.duty-check { display: flex !important; gap: 0.5rem; align-items: center; color: var(--text) !important; }
.duty-check input { width: auto !important; }

@media (max-width: 640px) {
  .duty-sec { margin-left: 0; }
  .duty-bars { height: 72px; }
}
