/* event-delivery.css - fetch-1563: the Event delivery area as the printed sheet (direction A of the 10-14 review).
 * Full note: docs/m3-comment-archive/event-delivery-css.json #dfa2aefe92a876f7
 */
.evt-section-body > .card.evd { padding: 0; }
.evd-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); min-height: var(--control-height-icon); margin-bottom: var(--s-2); }
.evd-count { font-size: var(--t-sub); font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.evd-tools { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); margin-left: auto; }
.evd-toggle { margin-left: auto; }
.evd-msg { display: block; margin-top: var(--s-1); font-size: var(--t-sub); color: var(--ok-fg); }
.evd-msg--err { color: var(--bad-fg); }
.evd .muted { color: var(--muted); }

/* ---- changes: one line per row, the state as a word, Got it as words, the rest behind the row's menu ---- */
.evd-chg { display: flex; align-items: flex-start; gap: var(--s-3); padding: var(--s-2) 0; border-top: 1px solid var(--hair); }
.evd-chg:first-of-type { border-top: 0; }
.evd-chg-main { flex: 1 1 auto; min-width: 0; }
.evd-chg-line { font-size: var(--t-body); line-height: 1.45; overflow-wrap: anywhere; }
.evd-field { color: var(--text-heading, var(--navy-dark)); }
.evd-old { color: var(--muted); }
.evd-new { color: var(--navy); font-weight: 700; }
.evd-arrow { color: var(--muted); }
.evd-state { display: inline-block; margin-left: var(--s-1); padding: 0 var(--s-2); border-radius: 20px; font-size: var(--t-label); font-weight: 600; line-height: 1.6; vertical-align: 1px; background: var(--hair); color: var(--muted); }
.evd-state--open { background: var(--warn-bg); color: var(--warn-fg); }
.evd-state--seen { background: var(--info-bg); color: var(--info-fg); }
.evd-state--handled { background: var(--ok-bg); color: var(--ok-fg); }
.evd-chg-meta { margin-top: 2px; font-size: var(--t-sub); color: var(--muted); line-height: 1.45; }
.evd-chg-acts { display: flex; flex: 0 0 auto; align-items: center; gap: var(--s-2); }
.evd-chg-acts .btn { min-height: var(--control-height-icon); white-space: nowrap; }
.evd-chg--handled .evd-chg-line { color: var(--muted); }
.evd-chg--handled .evd-new { color: var(--muted); font-weight: 600; }
.evd-handled[hidden] { display: none; }
.evd-sheet { margin: 0 0 var(--s-2) calc(var(--s-3) + var(--s-1)); padding: var(--s-3); border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: var(--r-m); background: var(--wash); }
.evd-sheet label { display: block; margin-bottom: var(--s-1); font-size: var(--t-sub); font-weight: 600; color: var(--text-heading, var(--navy-dark)); }
.evd-sheet textarea { display: block; width: 100%; box-sizing: border-box; min-height: var(--control-height-touch); padding: var(--s-2) var(--s-3); border: 1px solid var(--line); border-radius: var(--r-s); font: inherit; font-size: var(--t-body); background: var(--paper); resize: vertical; }
.evd-sheet-acts { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); margin-top: var(--s-2); }

/* ---- the equipment pull: the printed sheet on screen - grouped by category, tick | item | From | qty | note | menu ---- */
.evd-search-wrap { position: relative; display: flex; align-items: center; min-width: 14rem; }
.evd-search-wrap > .ci { position: absolute; left: var(--s-3); color: var(--muted); pointer-events: none; }
.evd-search { width: 100%; box-sizing: border-box; min-height: var(--control-height-icon); padding: var(--s-1) var(--s-3) var(--s-1) calc(var(--s-3) + 16px + var(--s-2)); border: 1px solid var(--line); border-radius: var(--r-s); font: inherit; font-size: var(--t-body); background: var(--paper); }
.evd-results { margin: 0 0 var(--s-3); border: 1px solid var(--line); border-radius: var(--r-m); overflow: hidden; background: var(--paper); }
.evd-result { display: flex; align-items: center; gap: var(--s-3); min-height: var(--control-height-touch); padding: var(--s-1) var(--s-3); border-top: 1px solid var(--hair); }
.evd-result:first-child { border-top: 0; }
.evd-result-main { flex: 1 1 auto; min-width: 0; }
.evd-result--none { color: var(--muted); font-size: var(--t-sub); }
.evd-pick { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); margin: 0 0 var(--s-2); padding: var(--s-2) var(--s-3); border: 1px dashed var(--gold); border-radius: var(--r-m); font-size: var(--t-sub); color: var(--muted); }
.evd-pick strong { color: var(--text-heading, var(--navy-dark)); }
.evd-split { display: inline-flex; align-items: stretch; }
.evd-split > .btn:first-child { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.evd-split > .cmenu > .btn.icon-btn { height: auto; min-height: var(--control-height-icon); border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: -1px; }
.evd-split > .btn.btn-primary + .cmenu > .btn.icon-btn { background: var(--navy); color: var(--paper); border-color: var(--navy); }
.evd-table { width: 100%; border-collapse: collapse; font-size: var(--t-body); font-variant-numeric: tabular-nums; }
.evd-table thead th { padding: 0 var(--s-2) var(--s-1); font-size: var(--t-label); font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); text-align: left; border-bottom: 1px solid var(--line); }
.evd-table thead th.evd-td-qty { text-align: right; }
.evd-cat th { padding: var(--s-3) var(--s-2) var(--s-1); font-size: var(--t-label); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); text-align: left; border-bottom: 1px solid var(--line); }
.evd-table tbody tr:first-child.evd-cat th { padding-top: var(--s-1); }
.evd-row td { padding: var(--s-1) var(--s-2); border-bottom: 1px solid var(--hair); vertical-align: middle; }
.evd-td-tick { width: var(--control-height-touch); padding-left: 0 !important; }
.evd-td-item { min-width: 0; }
.evd-item-name { display: block; font-weight: 600; color: var(--text-heading, var(--navy-dark)); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.evd-item-sub { display: block; font-size: var(--t-sub); color: var(--muted); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.evd-td-from { white-space: nowrap; }
.evd-from { font-size: var(--t-sub); color: var(--muted); }
.evd-from .vchip { font-size: var(--t-sub); vertical-align: -1px; }
.evd-from--away { color: var(--warn-fg); font-weight: 600; }
.evd-from--none { color: var(--muted); font-style: italic; }
.evd-td-qty { width: 4.5rem; text-align: right; }
.evd-qty { width: 4rem; box-sizing: border-box; min-height: var(--control-height-icon); padding: var(--s-1) var(--s-2); border: 1px solid var(--line); border-radius: var(--r-s); font: inherit; font-size: var(--t-body); text-align: right; font-variant-numeric: tabular-nums; background: var(--paper); }
.evd-qty-text { font-weight: 600; }
.evd-note { width: 100%; box-sizing: border-box; min-width: 8rem; min-height: var(--control-height-icon); padding: var(--s-1) var(--s-2); border: 1px solid transparent; border-radius: var(--r-s); font: inherit; font-size: var(--t-sub); background: transparent; }
.evd-note:hover, .evd-note:focus { border-color: var(--line); background: var(--paper); }
.evd-note::placeholder { color: var(--muted); font-style: italic; }
.evd-note-text { font-size: var(--t-sub); color: var(--muted); }
.evd-td-menu { width: var(--control-height-icon); text-align: right; white-space: nowrap; }
.evd-td-act { width: auto; }
.evd-tick { display: inline-flex; align-items: center; justify-content: center; width: var(--control-height-touch); height: var(--control-height-touch); padding: 0; border: 0; background: transparent; color: var(--paper); cursor: pointer; border-radius: var(--r-s); }
.evd-tick::before { content: ""; position: absolute; width: 22px; height: 22px; border: 2px solid var(--navy); border-radius: var(--r-s); background: var(--paper); }
.evd-tick { position: relative; }
.evd-tick .ci { position: relative; opacity: 0; }
.evd-tick[aria-checked="true"]::before, .evd-tick--static::before { background: var(--navy); }
.evd-tick[aria-checked="true"] .ci, .evd-tick--static .ci { opacity: 1; }
.evd-tick--static { cursor: default; }
.evd-tick--static:not(:has(.ci))::before { background: var(--paper); }
.evd-tick:focus-visible { outline: 2px solid var(--gold-dark); outline-offset: 2px; }
.evd-tick--sug::before { border-style: dashed; border-color: var(--gold); background: transparent; }
.evd-row--staged .evd-item-name { text-decoration: line-through; font-weight: 500; color: var(--muted); }
.evd-row--sug td { background: var(--wash); }
.evd-row--sug .evd-item-name { font-weight: 500; color: var(--muted); }
.evd-empty { margin-bottom: var(--s-2); }

/* ---- recaps: the state per department, one primary, the links as an icon ---- */
.evd-rhead { align-items: center; }
.evd-rchips { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-2); }
.evd-rchip { display: inline-flex; align-items: center; gap: var(--s-1); padding: 2px var(--s-2); border-radius: 20px; font-size: var(--t-sub); font-weight: 600; background: var(--hair); color: var(--muted); }
.evd-rchip--filed { background: var(--ok-bg); color: var(--ok-fg); }
.evd-rchip--filed .ci { color: var(--ok-fg); }
.evd-rchip--owed { background: var(--warn-bg); color: var(--warn-fg); }
.evd-links-fallback { display: flex; flex-direction: column; gap: var(--s-1); flex: 1 1 100%; font-size: var(--t-sub); color: var(--muted); }
.evd-links-fallback textarea { width: 100%; box-sizing: border-box; font: inherit; font-size: var(--t-sub); padding: var(--s-2); border: 1px solid var(--line); border-radius: var(--r-s); }
.evd-recaps { margin-top: var(--s-2); }
.evd-recaps > .card { margin: 0 0 var(--s-2); padding: var(--s-3); border: 1px solid var(--hair); border-radius: var(--r-m); box-shadow: none; }

/* ---- the guided recap in a dialog (a signed-in manager); the link path stays for texted links ---- */
dialog.evd-dialog { width: min(40rem, 100vw); max-width: 100vw; max-height: 100dvh; margin: auto; padding: 0; border: 0; border-radius: var(--r-l); background: var(--bg, var(--wash)); color: var(--ink); box-shadow: 0 24px 60px rgba(20, 33, 61, .3); }
dialog.evd-dialog:not([open]) { display: none; }
dialog.evd-dialog::backdrop { background: color-mix(in srgb, var(--ink) 32%, transparent); }
.evd-dialog-in { display: flex; flex-direction: column; max-height: 100dvh; }
.evd-dialog-head { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) var(--s-3) 0 var(--s-5); }
.evd-dialog-title { flex: 1 1 auto; min-width: 0; margin: 0; font-size: var(--t-section); font-weight: 700; line-height: 1.3; color: var(--text-heading, var(--navy-dark)); overflow-wrap: anywhere; }
.evd-dialog-title small { display: block; font-size: var(--t-sub); font-weight: 500; color: var(--muted); }
.evd-dialog-head .btn.icon-btn { width: var(--control-height-touch); min-width: var(--control-height-touch); height: var(--control-height-touch); min-height: var(--control-height-touch); }
.evd-dialog-body { min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 0 var(--s-3) var(--s-3); }
.evd-dialog-body .rc-flow { margin: 0 auto; min-height: 0; }

/* ---- a phone: field mode (design rule 16) ---- */
@media (max-width: 640px) {
  .evd-head { align-items: flex-start; }
  .evd-tools { margin-left: 0; width: 100%; }
  .evd-search-wrap { flex: 1 1 100%; min-width: 0; }
  .evd-search, .evd-qty, .evd-note, .evd-sheet textarea { min-height: var(--control-height-touch); font-size: 1rem; }
  .evd-chg { flex-wrap: wrap; }
  .evd-chg-main { flex-basis: 100%; }
  .evd-chg-acts { width: 100%; justify-content: flex-end; }
  .evd-chg-acts .btn, .evd-toggle, .evd-result .btn, .evd-td-act .btn, .evd-pick .btn, .evd-sheet-acts .btn, .evd-rhead .btn, .evd-split > .btn { min-height: var(--control-height-touch); }
  .evd-sheet { margin-left: 0; }
  .evd-table, .evd-table tbody { display: block; width: 100%; }
  .evd-table thead { display: none; }
  .evd-cat, .evd-cat th { display: block; }
  .evd-row { display: grid; grid-template-columns: var(--control-height-touch) minmax(0, 1fr) auto; grid-template-areas: "tick item act" "tick from act" "tick note act"; align-items: center; column-gap: var(--s-2); padding: var(--s-1) 0; border-bottom: 1px solid var(--hair); }
  .evd-row td { display: block; padding: 0; border: 0; min-width: 0; }
  .evd-td-tick { grid-area: tick; width: auto; }
  .evd-td-item { grid-area: item; }
  .evd-td-from { grid-area: from; white-space: normal; }
  .evd-td-from:empty, .evd-td-note:empty { display: none; }
  .evd-td-qty { grid-area: act; width: auto; justify-self: end; }
  .evd-td-note { grid-area: note; }
  .evd-note { min-width: 0; padding-left: 0; }
  .evd-td-menu { grid-area: act; width: auto; justify-self: end; display: flex; align-items: center; gap: var(--s-1); }
  .evd-row:not(.evd-row--sug) .evd-td-qty { grid-area: act; }
  .evd-row:not(.evd-row--sug) { grid-template-columns: var(--control-height-touch) minmax(0, 1fr) auto auto; grid-template-areas: "tick item qty menu" "tick from from from" "tick note note note"; }
  .evd-row:not(.evd-row--sug) .evd-td-qty { grid-area: qty; }
  .evd-td-menu .btn.icon-btn { width: var(--control-height-touch); min-width: var(--control-height-touch); height: var(--control-height-touch); min-height: var(--control-height-touch); }
  .evd-item-name, .evd-item-sub { white-space: normal; overflow-wrap: anywhere; }
  .evd-rchips { flex-basis: 100%; }
  dialog.evd-dialog { width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; }
}

/* ---- fetch-1573: the shelf beside the sheet - the inventory browser in the sheet's empty width, the borrow strip at its end ---- */
.evd-sheetcol { min-width: 0; }
.evd-shelf { min-width: 0; margin-bottom: var(--s-3); padding: var(--s-3); border: 1px solid var(--line); border-radius: var(--r-m); background: var(--wash); }
.evd-shelf-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); }
.evd-shelf-head .evd-search-wrap { flex: 1 1 12rem; min-width: 0; }
.evd-group > .btn { min-height: var(--control-height-icon); white-space: nowrap; }
.evd-group .cmenu-list { min-width: 16rem; max-height: min(70vh, 34rem); overflow-y: auto; } /* thirty-odd groups: the list scrolls inside a window-sized box (the pdx-cols shape) */
.evd-group .cmenu-i[aria-current="true"] { font-weight: 700; }
.evd-group .cmenu-i[aria-current="true"]::after { content: "\2713"; margin-left: auto; color: var(--gold-dark); }
.evd-shelf-title { display: flex; align-items: center; gap: var(--s-2); margin: var(--s-3) 0 var(--s-1); font-size: var(--t-sub); font-weight: 600; color: var(--muted); }
.evd-shelf-title .btn.icon-btn { margin-left: auto; }
.evd-shelf .evd-results { margin: 0; }
.evd-shelf-head + .evd-results { margin-top: var(--s-3); }
.evd-groups { display: none; gap: 2px; margin-top: var(--s-3); }
.evd-group-row { display: flex; align-items: center; gap: var(--s-2); min-height: var(--control-height-md); padding: 0 var(--s-2); border: 0; border-radius: var(--r-s); background: none; font: inherit; font-size: var(--t-body); font-weight: 600; text-align: left; cursor: pointer; color: var(--text-heading, var(--navy-dark)); }
.evd-group-row .ci { flex: 0 0 auto; color: var(--muted); }
.evd-group-row:hover, .evd-group-row:focus-visible { background: var(--paper); }
.evd-group-row:focus-visible { outline: 2px solid var(--gold-dark); outline-offset: 1px; }
.evd-group-row small { margin-left: auto; font-size: var(--t-sub); font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.evd-have { color: var(--muted); font-weight: 500; white-space: nowrap; }
.evd-td-from .evd-have { display: block; } /* in the sheet the count sits under the venue, never clipped against the qty field */
.evd-borrow { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-4); margin-top: var(--s-3); padding-top: var(--s-3); border-top: 1px solid var(--line); }
.evd-borrow-lede { flex: 1 1 100%; font-size: var(--t-label); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.evd-borrow-v { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); }
.evd-borrow-v .vchip { font-size: var(--t-sub); }
.evd-borrow-n { font-size: var(--t-sub); color: var(--muted); font-variant-numeric: tabular-nums; }
.evd-dialog--group .evd-dialog-body { padding: var(--s-3); }
@media (min-width: 1100px) {
  .evd-pull--shelf { display: grid; grid-template-columns: minmax(0, 1fr) minmax(19rem, 24rem); column-gap: var(--s-4); align-items: start; }
  .evd-pull--shelf > .evd-head { grid-column: 1; grid-row: 1; }
  .evd-pull--shelf > .evd-shelf { grid-column: 2; grid-row: 1 / span 3; margin-bottom: 0; position: sticky; top: calc(var(--app-sticky-top, 0px) + var(--s-3)); } /* pins under the fixed bar (fetch-1283's measured height), never top: 0 */
  .evd-pull--shelf > .evd-sheetcol { grid-column: 1; grid-row: 2; }
  .evd-pull--shelf > .evd-borrow { grid-column: 1; grid-row: 3; }
  .evd-groups { display: grid; } /* the idle shelf lists the groups themselves; narrower screens reach them through the menu */
  .evd-pull--shelf .evd-td-item { width: 34%; } /* the sheet beside the shelf: the note keeps a readable width (names are short); a table rule only - a phone row is a grid */
}
@media (max-width: 640px) {
  .evd-pull .evd-tools { margin-left: auto; width: auto; } /* the head holds only Print now: the count and Print share a line when they fit */
  .evd-shelf { padding: 0; border: 0; background: none; } /* no box on a phone: the search and the group button are the head's second line, as the search was */
  .evd-shelf-head { flex-wrap: nowrap; }
  .evd-shelf-head .evd-search-wrap { flex: 1 1 auto; }
  .evd-group > .btn { max-width: 9.5rem; overflow: hidden; text-overflow: ellipsis; }
  .evd-group > .btn, .evd-group-row, .evd-borrow-v .btn, .evd-shelf-title .btn.icon-btn { min-height: var(--control-height-touch); }
  .evd-shelf-title .btn.icon-btn { width: var(--control-height-touch); min-width: var(--control-height-touch); height: var(--control-height-touch); }
  .evd-shelf-body--group { display: none; } /* a phone opens the chosen group in the dialog (evdSyncGroupDialog) */
  .evd-borrow-v { width: 100%; }
  .evd-borrow-v .btn { margin-left: auto; }
}

/* Retained equipment choice; comparison stacks on phones. */
.evd-pull-recovery { display: block; overflow-wrap: anywhere; }
.evd-pull-comparison { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: var(--s-3); }
.evd-pull-comparison section { min-width: 0; }
.evd-pull-comparison dt { color: var(--muted); font-size: var(--t-sub); }
.evd-pull-comparison dd { margin: 0 0 var(--s-2); white-space: pre-wrap; }
.evd-pull-recovery .actions { flex-wrap: wrap; }
.evd-pull-recovery .btn { min-height: var(--control-height-touch); white-space: normal; }
@media(max-width:600px) { .evd-pull-comparison { grid-template-columns: minmax(0,1fr); } .evd-pull-recovery .btn { width: 100%; } }
