/* Group Map 0.8.0 (SPEC 9h): the entry side of who owns what: the Positions tab, the order on the task card, the
   decide form, recording a miss. Colours and sizes come from the variables of app.css. */

/* Status chips: decided reads as settled, proposed as waiting on the owner, draft and none as ours, quiet. */
.duties-entry .chip.st-proposed { background: var(--accent-fill); color: var(--accent-ink); border-color: transparent; }
.duties-entry .chip.st-draft { border-style: dashed; }
.duties-entry .chip.st-none { color: var(--muted); border-style: dashed; }

/* The status segment: only one button looks pressed at a time (while deciding, the decided one). */
.duty-seg { flex-wrap: wrap; }
.duty-seg button[aria-pressed="true"] { font-weight: 700; }

/* The decide form: who decided, when, and the source, in a box set apart from the order it decides. */
.duties-entry .decide {
  display: grid; gap: 10px; padding: 12px; margin-top: 8px;
  border: 1px solid var(--line-2); border-radius: var(--radius-s); background: var(--panel-2);
}
.duties-entry .decide .dec-note { color: var(--warn); }
.duties-entry .decided-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); }

/* A change in preparation beside a decided order. */
.duties-entry .revision {
  display: grid; gap: 8px; padding: 10px 12px; border-radius: var(--radius-s);
  border: 1px dashed var(--line-2); background: var(--panel-2);
}

/* The order's fields and its read-only form. */
.order-part .order-grid .mnf-field { align-self: end; }
.order-kv { grid-template-columns: 140px minmax(0, 1fr); }
.duties-entry .mnf { color: var(--danger); font-variant-numeric: tabular-nums; }
.duties-entry .today-count { font-variant-numeric: tabular-nums; }
.duties-entry .card-sec + .card-sec { margin-top: 4px; }

/* History lists: newest first, a dropped change struck through. */
.duties-entry ol.hist { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 13px; color: var(--text-2); }
.duties-entry ol.hist li.dropped { color: var(--muted); }
.duties-entry ol.hist li.dropped > :first-child { text-decoration: line-through; }

/* The misses of a duty. */
.duties-entry .misslist { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; font-size: 13px; }
.duties-entry .misslist li { padding: 6px 10px; border-radius: var(--radius-xs); background: var(--panel-2); border: 1px solid var(--line); }

/* The miss form: the owner at the time is shown, never stored. */
.missform .owner-at { margin: 0; }

/* Positions: the table and the holders in the form. */
.positions-table td { vertical-align: top; }
.positions-table .holder.acting { font-style: italic; }
.duties-entry .vacant { font-style: italic; }
.pos-form .holder-list { display: grid; gap: 6px; }
.pos-form .holder-row {
  display: flex; align-items: center; gap: 10px; padding: 6px 10px;
  border-radius: var(--radius-xs); background: var(--panel-2); border: 1px solid var(--line);
}
.pos-form .holder-row > :first-child { flex: 1; min-width: 0; }

/* The order in the task panel. */
.order-panel .kv { font-size: 12.5px; }

@media (max-width: 640px) {
  .order-kv { grid-template-columns: minmax(0, 1fr); }
}
