/* spa-shell styles, after Login.dc.html and Ticket Printing.dc.html (v2.2).
   Fonts are external in the design; under the strict CSP the shell uses the
   system font stack. The logo image is the design's, from TicketPro's asset
   host, which the CSP's img-src allows (PRD #38 AC31). */

:root {
  color-scheme: dark;
  --bg: #0d0e10; --header: #111316; --card: #14171a; --panel: #16181b; --field: #0f1113; --elev: #1b1e22;
  --hover: #22262b; --bd2: #23282e; --bd3: #2a2f36; --bd4: #2f353c;
  --t1: #e6e8eb; --t2: #9aa1a9; --t3: #6b7178; --tlabel: #8b9098; --placeholder: #5b616a;
  --accent: #6ba5f7; --blue: #0e4694; --blue-hover: #0b3876; --danger: #d24d44; --ok: #1f9254;
  --shadow: rgba(0, 0, 0, .5); --toast: #1f2937; --toast-ok: #35c46f;
  --bd1: #20242a; --bd5: #3a4048; --group: #0f1113; --cell: #b7bcc2; --grouplabel: #cfd3d8; --arrow-off: #4b5058;
  --row-line: rgba(255, 255, 255, .05); --cal-filter: invert(.7);
  --paper: #ffffff; /* ticket stock in the printing preview — white in both themes (PRD #48 AC20) */
  --accent-c: #1657b0; --accent-soft: rgba(22, 87, 176, .16); --accent-line: rgba(22, 87, 176, .6);
  --pill-ready-bg: rgba(224, 168, 58, .15); --pill-ready-fg: #e6b552; --pill-ready-bd: rgba(224, 168, 58, .35);
  --pill-printed-bg: rgba(53, 196, 111, .15); --pill-printed-fg: #4bd88a; --pill-printed-bd: rgba(53, 196, 111, .35);
  --pill-cancelled-bg: rgba(226, 86, 77, .14); --pill-cancelled-fg: #eb7a72; --pill-cancelled-bd: rgba(226, 86, 77, .34);
  --pill-valid-bg: rgba(53, 196, 111, .15); --pill-valid-fg: #4bd88a; --pill-valid-bd: rgba(53, 196, 111, .35);
  --pill-ticket-printed-bg: rgba(75, 139, 245, .14); --pill-ticket-printed-fg: #7aa8f7; --pill-ticket-printed-bd: rgba(75, 139, 245, .34);
  --op-linked-bg: rgba(53, 196, 111, .15); --op-linked-fg: #4bd88a; --op-linked-bd: rgba(53, 196, 111, .35); --op-linked-dot: #4bd88a;
  --op-invited-bg: rgba(224, 168, 58, .15); --op-invited-fg: #e6b552; --op-invited-bd: rgba(224, 168, 58, .35); --op-invited-dot: #e6b552;
  --op-unlinked-bg: rgba(226, 86, 77, .14); --op-unlinked-fg: #eb7a72; --op-unlinked-bd: rgba(226, 86, 77, .34); --op-unlinked-dot: #eb7a72;
  font-family: Rubik, system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}
/* The light theme (T-04): keyed off data-theme, which the shell sets from the
   operator's remembered choice or, until one is made, from the OS setting. */
:root[data-theme="light"] {
    color-scheme: light;
    --bg: #eceef1; --header: #ffffff; --card: #ffffff; --panel: #f3f5f7; --field: #ffffff; --elev: #ffffff;
    --hover: #e7eaee; --bd2: #e0e4e9; --bd3: #d3d8df; --bd4: #c9cfd7;
    --t1: #14171a; --t2: #59616a; --t3: #7a828b; --tlabel: #6b7178; --placeholder: #9aa1a9;
    --accent: #0e4694; --shadow: rgba(30, 40, 60, .16); --toast: #ffffff;
    --bd1: #e6e9ed; --bd5: #c2c8d0; --group: #f0f2f5; --cell: #363b42; --grouplabel: #262b31; --arrow-off: #aeb4bc;
    --row-line: rgba(0, 0, 0, .06); --cal-filter: none;
    --pill-ready-bg: rgba(176, 120, 10, .14); --pill-ready-fg: #8a5f08; --pill-ready-bd: rgba(176, 120, 10, .32);
    --pill-printed-bg: rgba(31, 140, 74, .12); --pill-printed-fg: #1c7a44; --pill-printed-bd: rgba(31, 140, 74, .32);
    --pill-cancelled-bg: rgba(190, 45, 38, .11); --pill-cancelled-fg: #a82d26; --pill-cancelled-bd: rgba(190, 45, 38, .3);
    --pill-valid-bg: rgba(31, 140, 74, .12); --pill-valid-fg: #1c7a44; --pill-valid-bd: rgba(31, 140, 74, .32);
    --pill-ticket-printed-bg: rgba(43, 111, 219, .11); --pill-ticket-printed-fg: #2158b0; --pill-ticket-printed-bd: rgba(43, 111, 219, .3);
    --op-linked-bg: rgba(31, 140, 74, .12); --op-linked-fg: #1c7a44; --op-linked-bd: rgba(31, 140, 74, .32); --op-linked-dot: #2fa862;
    --op-invited-bg: rgba(176, 120, 10, .13); --op-invited-fg: #8a5f08; --op-invited-bd: rgba(176, 120, 10, .3); --op-invited-dot: #c98a12;
    --op-unlinked-bg: rgba(190, 45, 38, .1); --op-unlinked-fg: #a82d26; --op-unlinked-bd: rgba(190, 45, 38, .28); --op-unlinked-dot: #d24d44;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--t1); }
input::placeholder { color: var(--placeholder); }
button { font-family: inherit; cursor: pointer; }
[hidden] { display: none !important; }
#development-server { padding: 4px 16px; background: #1d4ed8; color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .02em; }

/* ---- sign-in pages (Login.dc.html: always light) ---- */
.auth {
  min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px;
  background: radial-gradient(1100px 620px at 50% -8%, #e6f0ff 0%, #eef1f4 46%, #e7eaee 100%);
  color: #0f172a; color-scheme: light;
}
.auth-brand { display: flex; flex-direction: column; align-items: center; margin-bottom: 22px; }
.auth-brand .logo { height: 48px; width: auto; } /* #301: the header's logo, about the old title's size */
.brand-sub { margin-top: 11px; font-size: 12px; font-weight: 600; color: #64748b; letter-spacing: .14em; text-transform: uppercase; }
.auth-foot { text-align: center; font-size: 11.5px; color: #98a1ad; margin-top: 18px; }
.card {
  width: 420px; max-width: 100%; background: #fff; border: 1px solid #e4e8ee; border-radius: 16px;
  padding: 26px 26px 22px; box-shadow: 0 18px 48px rgba(24, 39, 64, .10);
}
.title { font-size: 19px; font-weight: 700; color: #0f172a; letter-spacing: -.01em; margin: 0; }
.lead { font-size: 13.5px; color: #5b6472; line-height: 1.6; margin: 8px 0 0; }
.lead strong { color: #0f172a; font-weight: 600; }
.form { display: flex; flex-direction: column; }
.field { display: block; margin-top: 16px; }
.field-label { display: block; font-size: 12px; font-weight: 600; color: #475569; margin-bottom: 7px; }
.auth input {
  width: 100%; height: 44px; border-radius: 10px; border: 1px solid #d8dee6; background: #fff; padding: 0 13px;
  font-size: 14px; color: #0f172a; font-family: inherit; outline: none;
}
.auth input:focus { border-color: #9cb6dc; }
.with-reveal { position: relative; display: block; }
.with-reveal input { padding-right: 68px; }
.reveal { position: absolute; right: 12px; top: 0; height: 44px; border: 0; background: none; font-size: 11.5px; font-weight: 600; color: #0e4694; }
.error { font-size: 12px; color: #d24d44; font-weight: 600; margin: 9px 0 0; }
.notice { font-size: 13px; color: #8a5a00; background: #fff6e0; border: 1px solid #f1d9a0; border-radius: 9px; padding: 9px 11px; margin: 0 0 14px; }
.primary {
  margin-top: 18px; height: 46px; width: 100%; border-radius: 10px; background: #0e4694; border: 0; color: #fff; font-size: 14px; font-weight: 700;
}
.primary:hover { background: #0b3876; }
.primary:disabled { background: #a9bcd8; cursor: not-allowed; }
.secondary {
  margin-top: 9px; height: 42px; width: 100%; border-radius: 10px; background: #f3f5f7; border: 1px solid #dde2e8; color: #334155; font-size: 13.5px; font-weight: 600;
}
.text-link { border: 0; background: none; font-size: 12.5px; font-weight: 600; color: #0e4694; padding: 0; }
.center { display: flex; justify-content: center; margin-top: 15px; }
.centered { text-align: center; padding: 6px 2px 4px; }
.small { font-size: 12px; color: #8b93a0; margin-top: 14px; }
.verified { display: flex; gap: 9px; margin: 18px 0 0; padding-top: 16px; border-top: 1px solid #eef1f4; font-size: 11.5px; color: #8b93a0; line-height: 1.5; }
.verified::before { content: '🔒'; font-size: 14px; color: #0e4694; }
.badge { width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; font-size: 24px; }
.badge.mail { background: #e6f0ff; color: #0e4694; }
.badge.warn { background: #fdecea; color: #d24d44; font-weight: 700; }
.paste { margin-top: 18px; padding-top: 14px; border-top: 1px dashed #e4e8ee; }
.signed-in-as { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; color: #1f9254; margin: 0 0 16px; }
.tick { width: 26px; height: 26px; border-radius: 50%; background: #e7f7ee; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.rules { list-style: none; padding: 0; margin: 14px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; }
.rule { font-size: 11.5px; color: #98a1ad; display: flex; align-items: center; gap: 7px; }
.rule::before { content: '·'; width: 14px; height: 14px; border-radius: 50%; background: #f1f3f6; color: #b3bac4; font-size: 9px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.rule.met { color: #3f7a53; }
.rule.met::before { content: '✓'; background: #e7f7ee; color: #1f9254; }

/* ---- signed in (Ticket Printing.dc.html) ---- */
.app-header {
  display: flex; align-items: center; justify-content: space-between; padding: 0 20px; height: 64px;
  background: var(--header); border-bottom: 1px solid var(--bd2); position: sticky; top: 0; z-index: 60;
}
.header-left, .header-right { display: flex; align-items: center; gap: 12px; }
.record-notice { position: absolute; left: 0; right: 0; top: 64px; margin: 0; padding: 6px 20px; background: #b45309; color: #fff; font-size: 12px; font-weight: 600; }
.brand { font-size: 22px; font-weight: 700; color: var(--accent); letter-spacing: -.02em; }
.logo-wrap { display: inline-flex; align-items: center; background: #fff; border-radius: 6px; padding: 2px 5px; box-shadow: 0 1px 2px rgba(0, 0, 0, .35); }
.logo { height: 52px; width: auto; display: block; }
.app-title { font-size: 14px; font-weight: 600; }
.divider { width: 1px; height: 18px; background: var(--bd3); }
.seller-chip { display: flex; align-items: center; gap: 8px; background: var(--panel); border: 1px solid var(--bd3); padding: 4px 10px 4px 9px; border-radius: 20px; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: #35c46f; box-shadow: 0 0 0 3px rgba(53, 196, 111, .15); }
.dot.off { background: var(--t3); box-shadow: none; }
.seller-label { font-size: 11px; color: var(--tlabel); }
.seller-name { font-size: 12px; font-weight: 700; }
.theme-switch { display: flex; background: var(--panel); border: 1px solid var(--bd3); border-radius: 18px; padding: 2px; }
.theme-button { width: 26px; height: 22px; border: 0; border-radius: 15px; background: transparent; color: var(--t3); font-size: 12px; display: flex; align-items: center; justify-content: center; }
.theme-button.on { background: var(--hover); color: var(--t1); }
/* T-06: "vivenu · {Linked / Invited / Unlinked}", on the operator-status tokens. */
.vivenu-pill { display: inline-flex; align-items: center; gap: 7px; padding: 3px 11px 3px 9px; border-radius: 20px; font-size: 11px; font-weight: 700; letter-spacing: .02em; border: 1px solid; }
.pill-dot { width: 7px; height: 7px; border-radius: 50%; }
.op-chip-linked.pill-dot { background: var(--op-linked-dot); }
.op-chip-invited.pill-dot { background: var(--op-invited-dot); }
.op-chip-unlinked.pill-dot { background: var(--op-unlinked-dot); }
.vivenu-pill.op-pill-linked { background: var(--op-linked-bg); color: var(--op-linked-fg); border-color: var(--op-linked-bd); }
.vivenu-pill.op-pill-invited { background: var(--op-invited-bg); color: var(--op-invited-fg); border-color: var(--op-invited-bd); }
.vivenu-pill.op-pill-unlinked { background: var(--op-unlinked-bg); color: var(--op-unlinked-fg); border-color: var(--op-unlinked-bd); }
.operators { height: 32px; padding: 0 12px; border-radius: 7px; background: var(--panel); border: 1px solid var(--bd3); color: var(--t1); font-size: 12px; font-weight: 600; }
.operators::before { content: '👥 '; }
.user { position: relative; }
.user-button { display: flex; align-items: center; gap: 8px; padding: 3px; border-radius: 20px; border: 0; background: none; color: var(--t1); }
.user-button:hover { background: var(--panel); }
.user-text { display: flex; flex-direction: column; text-align: right; line-height: 1.15; }
.user-name { font-size: 12px; font-weight: 600; }
.user-role { font-size: 10px; color: var(--t3); }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--hover); border: 1px solid var(--bd3); display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; color: var(--t2); }
.caret { font-size: 9px; color: var(--t3); margin-right: 2px; }
.menu { position: absolute; z-index: 70; top: calc(100% + 6px); right: 0; min-width: 230px; background: var(--elev); border: 1px solid var(--bd4); border-radius: 10px; box-shadow: 0 14px 34px var(--shadow); padding: 6px; }
.menu-who { padding: 9px 10px 10px; border-bottom: 1px solid var(--bd2); margin-bottom: 5px; }
.menu-name { font-size: 12.5px; font-weight: 700; }
.menu-email { font-size: 11px; color: var(--t3); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-item { display: block; width: 100%; text-align: left; padding: 8px 10px; border-radius: 7px; border: 0; background: none; color: var(--t1); font-size: 12.5px; font-weight: 600; }
.menu-item:hover { background: var(--hover); }
.menu-icon { font-size: 13px; }
.menu-item.danger { color: var(--danger); }
.menu-rule { height: 1px; background: var(--bd2); margin: 5px 0; }

.expiry { display: flex; align-items: center; gap: 14px; padding: 11px 20px; background: rgba(217, 164, 65, .12); border-bottom: 1px solid rgba(217, 164, 65, .4); }
.expiry-mark { width: 22px; height: 22px; border-radius: 50%; background: rgba(217, 164, 65, .22); color: #d9a441; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex: none; }
.expiry-text { flex: 1; min-width: 0; font-size: 12.5px; color: var(--t2); }
.expiry-count { color: var(--t1); }
.expiry-form { display: flex; align-items: center; gap: 8px; flex: none; }
.expiry-form input { width: 170px; background: var(--field); border: 1px solid var(--bd3); border-radius: 7px; height: 32px; padding: 0 11px; color: var(--t1); font-size: 12.5px; font-family: inherit; }
.expiry-form .primary.small-button { margin: 0; width: auto; height: 32px; padding: 0 14px; border-radius: 7px; font-size: 12px; }
.expiry-form .text-link { color: var(--t2); font-size: 11.5px; }
.expiry .error { margin: 4px 0 0; }

.overlay { position: fixed; inset: 0; z-index: 92; background: rgba(4, 6, 10, .55); display: flex; align-items: flex-start; justify-content: center; padding: 52px 16px; overflow: auto; }
.panel { width: 520px; max-width: 100%; background: var(--card); border: 1px solid var(--bd3); border-radius: 14px; box-shadow: 0 24px 60px var(--shadow); color: var(--t1); }
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--bd2); }
.panel-head h2 { font-size: 15px; font-weight: 700; margin: 0; }
.close { border: 0; background: none; color: var(--t3); font-size: 20px; line-height: 1; }
.panel-body { padding: 16px 18px 18px; }
.who-name { font-size: 13px; font-weight: 700; }
.who-email { font-size: 11px; color: var(--t3); }
.section { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--tlabel); margin: 18px 0 0; padding-top: 14px; border-top: 1px solid var(--bd2); }
.panel .field-label { color: var(--t2); }
.panel input { width: 100%; background: var(--field); border: 1px solid var(--bd3); border-radius: 8px; height: 38px; padding: 0 12px; color: var(--t1); font-size: 13px; font-family: inherit; }
.panel .reveal { height: 38px; color: var(--accent); }
.panel .rule::before { background: var(--hover); color: var(--t3); }
.panel .rules .rule.met { color: #4a9d5f; }
.panel .rule.met::before { background: rgba(31, 146, 84, .18); color: #4a9d5f; }
.panel-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 18px; }
.panel-actions .primary, .panel-actions .secondary { width: auto; height: 36px; margin: 0; padding: 0 14px; font-size: 12.5px; border-radius: 8px; }
.panel-actions .secondary { background: var(--panel); border-color: var(--bd3); color: var(--t2); }
.panel-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-top: 1px solid var(--bd2); }
.panel-foot .small { margin: 0; color: var(--t3); }
.danger-outline { height: 31px; padding: 0 12px; border-radius: 7px; background: transparent; border: 1px solid rgba(226, 86, 77, .4); color: var(--danger); font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.done { font-size: 12px; color: var(--ok); font-weight: 600; margin: 9px 0 0; }

/* ---- header additions (PRD #14): seller in view selector, test-mode switch ---- */
.seller-select {
  background: transparent; border: 0; color: var(--t1); font: inherit; font-size: 12px; font-weight: 700; padding: 0 2px; cursor: pointer;
}
.seller-select option { background: var(--elev); color: var(--t1); }

/* ---- the transactions screen (Ticket Printing.dc.html) ---- */
.transactions { padding-bottom: 48px; }
.transactions > .notice { margin: 24px 16px; max-width: 560px; }

.filter-card { margin: 16px 16px 0; background: var(--card); border: 1px solid var(--bd2); border-radius: 12px; }
.filter-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--bd1); }
.filter-heading { display: flex; align-items: center; gap: 6px; }
.filter-fold { display: inline-flex; align-items: center; gap: 10px; border: 0; background: none; padding: 0; color: var(--t1); font: inherit; }
.fold-chevron { font-size: 12px; color: var(--t3); transition: transform .15s; display: inline-block; }
.fold-chevron.open { transform: rotate(90deg); }
.filter-title { font-size: 13px; font-weight: 700; letter-spacing: .01em; }
.filter-active { font-size: 11px; color: var(--t3); }
.filter-warning { font-size: 11px; color: var(--pill-cancelled-fg); }
.filter-warning .text-link { color: var(--accent); font-size: 11px; }
.filter-actions { display: flex; align-items: center; gap: 8px; }
.filter-actions button { height: 32px; padding: 0 14px; border-radius: 7px; font-size: 12px; font-weight: 600; }
.filter-actions .ghost { background: transparent; border: 1px solid var(--bd3); color: var(--t2); }
.filter-actions .elev { display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; background: var(--elev); border: 1px solid var(--bd3); color: var(--t1); cursor: pointer; }
.star { font-size: 11px; color: var(--tlabel); }
/* The one shared toast (PRD #38, T-57): bottom centre, "✓", about 2.5 s. */
.toast { position: fixed; bottom: 70px; left: 50%; transform: translateX(-50%); z-index: 80; display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 9px; background: var(--toast); border: 1px solid var(--toast-ok); color: var(--t1); font-size: 13px; font-weight: 600; box-shadow: 0 12px 30px var(--shadow); animation: tpToast 2.6s ease forwards; }
.toast-tick { color: var(--toast-ok); }
@keyframes tpToast { 0% { opacity: 0; transform: translateX(-50%) translateY(8px); } 12% { opacity: 1; transform: translateX(-50%) translateY(0); } 88% { opacity: 1; transform: translateX(-50%) translateY(0); } 100% { opacity: 0; transform: translateX(-50%) translateY(8px); } }
/* A failed save's message (PRD #18); a successful save is the shared toast (PRD #38). */
.save-notice { position: fixed; bottom: 70px; left: 50%; transform: translateX(-50%); z-index: 80; display: flex; align-items: center; gap: 8px; margin: 0; padding: 10px 16px; border-radius: 9px; background: var(--toast); border: 1px solid var(--danger); color: var(--t1); font-size: 13px; font-weight: 600; box-shadow: 0 12px 30px var(--shadow); }
.save-notice.save-unavailable, .save-notice.save-refused { border-color: var(--danger); }
.filter-actions .primary.small-button { margin: 0; width: auto; height: 32px; background: var(--accent-c); font-weight: 700; }
.filter-quick { display: flex; flex-wrap: wrap; gap: 14px 16px; padding: 14px; }
.filter-quick + .filter-advanced { border-top: 1px solid var(--bd1); padding-top: 16px; }
.filter-quick .filter-field { flex: 1 1 200px; min-width: 180px; max-width: 280px; }
/* T-18/T-19: every pill group keeps one line — sized to its content in either row (PRD #69: the Delivery type pills among the advanced filters); the text and list fields share the rest. */
.filter-field.chips-field { flex: 0 0 auto; min-width: 0; max-width: none; }
/* T-69d (PRD #69): Transaction / Batch ID and Barcode fixed to a vivenu id's 24 and a ticket barcode's 22 monospace characters, plus the control's padding and border; the field shrink-wraps its control. */
.filter-field.chars-field { flex: 0 0 auto; min-width: 0; max-width: none; }
.control.mono.chars-24 { width: calc(24ch + 22px); }
.control.mono.chars-22 { width: calc(22ch + 22px); }
/* #54: one row of six at the print station's width (operator's departure from the design's two rows); a narrower window wraps, never shrinks. */
.filter-advanced { display: flex; flex-wrap: wrap; gap: 14px 16px; padding: 4px 14px 16px; }
.filter-advanced > * { flex: 1 1 0; min-width: 180px; }
/* #142: the Created range is one item of two shares, its From and To kept on one line at the row's gap. */
.filter-advanced > .date-range { flex: 2 1 16px; min-width: 376px; display: flex; gap: 16px; }
.date-range > .filter-field { flex: 1 1 0; min-width: 180px; }
.filter-field { display: block; }
.filter-card .field-label { display: block; font-size: 11px; font-weight: 600; color: var(--t2); margin-bottom: 6px; }
.control {
  width: 100%; height: 36px; background: var(--field); border: 1px solid var(--bd3); border-radius: 8px; padding: 0 10px;
  color: var(--t1); font: inherit; font-size: 12.5px; outline: none;
}
.control:focus { border-color: var(--accent-line); }
.control::-webkit-calendar-picker-indicator { filter: var(--cal-filter); }
.mono { font-family: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace; }
/* The type-to-search list (PRD #38, T-15): a "Search …" box, "×", and the options beneath. */
.search-list { position: relative; }
.search-box { display: flex; align-items: center; gap: 6px; background: var(--field); border: 1px solid var(--bd3); border-radius: 8px; height: 36px; padding: 0 8px 0 11px; }
.search-box:focus-within { border-color: var(--accent-line); }
.search-input { flex: 1; min-width: 0; background: transparent; border: 0; outline: none; color: var(--t1); font: inherit; font-size: 12.5px; }
.search-clear { border: 0; background: none; padding: 2px; color: var(--t3); font-size: 15px; line-height: 1; }
.search-caret { color: var(--t3); font-size: 11px; pointer-events: none; }
/* PRD #63: a list TicketPro does not serve yet ("Categories unavailable") — shown, disabled, on the theme's tokens. */
.search-list-disabled .search-box { opacity: 0.6; cursor: not-allowed; }
.search-list-disabled .search-input { cursor: not-allowed; }
.search-list-disabled .search-input::placeholder { color: var(--t3); }
.search-menu { position: absolute; z-index: 50; top: calc(100% + 4px); left: 0; right: 0; max-height: 250px; overflow: auto; background: var(--elev); border: 1px solid var(--bd4); border-radius: 9px; box-shadow: 0 14px 34px var(--shadow); padding: 5px; }
.search-empty { padding: 10px; font-size: 12px; color: var(--t3); }
.search-option { padding: 7px 9px; border-radius: 6px; cursor: pointer; }
.search-option:hover { background: var(--hover); }
.option-label { font-size: 12.5px; color: var(--t1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.option-sub { font-size: 10.5px; color: var(--t3); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chips { display: flex; flex-wrap: nowrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; white-space: nowrap;
  border: 1px solid var(--bd3); background: var(--panel); color: var(--t2);
}
.chip-dot { width: 7px; height: 7px; border-radius: 50%; opacity: .5; }
.chip.on { border-color: var(--accent-line); background: var(--accent-soft); color: var(--t1); }
.chip.on .chip-dot { opacity: 1; }
.chip-ready_to_print .chip-dot { background: #e6b552; }
.chip-printed .chip-dot { background: #4bd88a; }
.chip-cancelled .chip-dot { background: #eb7a72; }
.chip-hard .chip-dot { background: #7aa8f7; }
.chip-virtual .chip-dot { background: #c79af0; }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin: 16px 16px 8px; }
.toolbar-left { display: flex; align-items: baseline; gap: 10px; }
.toolbar-title { font-size: 14px; font-weight: 700; margin: 0; }
.result-count { font-size: 12px; color: var(--t3); }
.toolbar-left .secondary { align-self: center; width: auto; height: 28px; margin: 0; padding: 0 12px; border-radius: 7px; background: var(--panel); border-color: var(--bd3); color: var(--t1); font-size: 12px; }
.toolbar-left .secondary:disabled { color: var(--t3); cursor: not-allowed; }
.group-by { display: flex; align-items: center; gap: 8px; }
.group-by-label { font-size: 11px; color: var(--tlabel); }
.group-by select { height: 32px; background: var(--panel); border: 1px solid var(--bd3); border-radius: 7px; color: var(--t1); font: inherit; font-size: 12px; padding: 0 8px; }
.truncated { flex-basis: 100%; margin: 0; font-size: 12px; color: var(--pill-ready-fg); background: var(--pill-ready-bg); border: 1px solid var(--pill-ready-bd); border-radius: 8px; padding: 8px 11px; }

.grid-card { margin: 0 16px; background: var(--card); border: 1px solid var(--bd2); border-radius: 12px; overflow-x: auto; min-height: 0; }
/* T-154a (#154, ruled 2026-11-05): on the Transactions and Reprint & Print screens the page never scrolls. The body is
   held to the window (the Development server label, when shown, takes its height first), the screen's main takes what
   the app header leaves, the controls above the grid stay put, and the grid card is the region that scrolls, never
   below about three rows (160 px). The bottom bars stay fixed; the main's bottom padding keeps the last row clear of
   them (T-39–T-41). A state card or an empty Printing Issues card keeps its own height. */
html:has(#app > .transactions) body, html:has(#app > .print-screen) body { height: 100vh; height: 100dvh; display: flex; flex-direction: column; }
html:has(#app > .transactions) body > *, html:has(#app > .print-screen) body > * { flex: none; }
html:has(#app > .transactions) #app, html:has(#app > .print-screen) #app { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
#app > * { flex: none; }
#app > .transactions, #app > .print-screen { flex: 1 1 auto; min-height: 0; }
.transactions, .print-screen { display: flex; flex-direction: column; }
.transactions > *, .print-screen > * { flex: none; }
.transactions > .grid-card, .print-screen > .grid-card { flex: 0 1 auto; }
.transactions > .grid-card:has(> .grid), .print-screen > .grid-card:has(> .grid) { min-height: 160px; }
.grid { width: 100%; min-width: 1040px; border-collapse: collapse; font-size: 12.5px; }
/* T-154a: the column header row stays pinned at the top of the grid region while the rows scroll under it; its bottom
   line is drawn as an inset shadow, since a collapsed table border does not travel with a sticky cell. */
.grid thead th { height: 38px; background: var(--panel); text-align: left; padding: 0 10px; box-shadow: inset 0 -1px 0 var(--bd2); position: sticky; top: 0; z-index: 1; }
.grid .num { text-align: right; }
.sort {
  border: 0; background: none; padding: 0; color: var(--tlabel); font-size: 10px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 4px;
}
.arrow { color: var(--arrow-off); font-size: 10px; }
.arrow.on { color: var(--accent); }
.group-head td { height: 34px; background: var(--group); border-bottom: 1px solid var(--bd2); padding: 0 12px; }
.group-fold { border: 0; background: none; padding: 0; width: 14px; margin-right: 6px; font-size: 10px; color: var(--t3); text-align: left; }
.group-label { font-size: 12px; font-weight: 700; color: var(--grouplabel); margin-right: 10px; }
.group-meta { font-size: 11px; color: var(--t3); }
.txn-row td { height: 38px; padding: 0 10px; border-bottom: 1px solid var(--row-line); color: var(--cell); white-space: nowrap; }
.txn-row:hover td { background: var(--hover); }
/* Selecting transactions (PRD #38, T-32/T-38): a click anywhere on the row; the box is a real checkbox drawn as the design's 16px square with "✓". */
.txn-row { cursor: pointer; }
.txn-row.selected td { background: var(--accent-soft); }
/* T-124a (PRD #131): a Past event transaction is greyed, still selectable; "Past event" beside its start date. */
.txn-row td.start-cell { white-space: nowrap; }
.txn-row.past-event td { color: var(--t3); }
.txn-row.past-event td:not(.check-col) > * { opacity: .75; }
.past-event-tag { margin-left: 6px; padding: 1px 6px; border: 1px solid var(--bd3); border-radius: 999px; font-size: 10px; font-weight: 600; color: var(--t3); }
/* T-124b (PRD #131): the past-events line above the grid, its Hide / Show a text link. */
.past-events-line { margin: 0; padding: 8px 12px; font-size: 12px; color: var(--t3); border-bottom: 1px solid var(--bd2); }
.past-events-line .past-events-toggle { font-size: 12px; color: var(--accent); cursor: pointer; }
/* T-154a: the line stays in view at the top of the grid region, its height fixed so the column header row pins under it. */
.past-events-line { position: sticky; top: 0; left: 0; z-index: 2; height: 33px; line-height: 16px; white-space: nowrap; background: var(--card); }
.past-events-line + .grid thead th { top: 33px; }
.grid .check-col { width: 36px; text-align: center; padding: 0 6px; }
.row-check {
  appearance: none; -webkit-appearance: none; margin: 0; width: 16px; height: 16px; border-radius: 4px; vertical-align: middle;
  border: 1.5px solid var(--bd5); background: transparent; color: #fff; font-size: 11px; font-weight: 800; line-height: 13px; text-align: center; cursor: pointer;
}
.row-check:checked { border-color: var(--accent-c); background: var(--accent-c); }
.row-check:checked::after { content: '✓'; }
.row-check:focus-visible { outline: 2px solid var(--accent-line); outline-offset: 1px; }
/* T-53: a locked box shows ✕ and cannot be ticked. */
.row-check.lock-mark { border-color: var(--bd5); background: transparent; color: var(--t3); font-size: 10px; font-weight: 700; cursor: default; }
.row-check.lock-mark::after { content: '✕'; }
.strong { font-weight: 600; color: var(--t1); }
.muted { color: var(--t2); }
.txn-row td.faint { color: var(--t3); font-size: 11px; }
.pill { display: inline-block; padding: 2px 8px; border-radius: 5px; font-size: 10px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; border: 1px solid; }
.pill-ready { background: var(--pill-ready-bg); color: var(--pill-ready-fg); border-color: var(--pill-ready-bd); }
.pill-printed { background: var(--pill-printed-bg); color: var(--pill-printed-fg); border-color: var(--pill-printed-bd); }
.pill-cancelled { background: var(--pill-cancelled-bg); color: var(--pill-cancelled-fg); border-color: var(--pill-cancelled-bd); }
/* Ticket status pills on the Print / Reprint screen (T-54): Valid green, Printed blue, Cancelled red. */
.pill-valid { background: var(--pill-valid-bg); color: var(--pill-valid-fg); border-color: var(--pill-valid-bd); }
.pill-ticket-printed { background: var(--pill-ticket-printed-bg); color: var(--pill-ticket-printed-fg); border-color: var(--pill-ticket-printed-bd); }
.ticket-row td { padding: 6px 8px; border-top: 1px solid var(--row-line); color: var(--cell); }
.ticket-row.unselectable td { color: var(--t3); opacity: .5; }
/* The Row indicator (PRD #189, T-189a): the one button beside a row's status pill, a filled circle whose glyph says what
   the operator does next, its colour reinforcing the glyph; it opens the Row explanation anchored to it, out of the flow,
   so no row moves. The indicator and its popover stay readable on a faded row. */
.ticket-row td.lock-cell { position: relative; opacity: 1; white-space: nowrap; }
.row-indicator { margin-left: 6px; width: 20px; height: 20px; padding: 0; border-radius: 50%; border: 1px solid var(--bd5); font-size: 12px; font-weight: 800; line-height: 18px; text-align: center; cursor: pointer; vertical-align: middle; }
.row-indicator:focus-visible { outline: 2px solid var(--accent-line); outline-offset: 1px; }
.row-indicator-warn { background: var(--pill-ready-bg); color: var(--pill-ready-fg); border-color: var(--pill-ready-bd); }
.row-indicator-answer { background: var(--pill-ticket-printed-bg); color: var(--pill-ticket-printed-fg); border-color: var(--pill-ticket-printed-bd); }
.row-indicator-wait { background: var(--hover); color: var(--t2); border-color: var(--bd5); }
.row-indicator-admin { background: var(--pill-cancelled-bg); color: var(--pill-cancelled-fg); border-color: var(--pill-cancelled-bd); }
/* PRD #276: the plain row's quiet "look" circle — not filled, the design's tertiary text and a lighter border than wait's. */
.row-indicator-picture { background: transparent; color: var(--t3); border-color: var(--bd4); }
.popover { position: absolute; top: calc(100% - 2px); right: 8px; z-index: 60; width: 300px; max-width: 70vw; padding: 12px 14px; border-radius: 10px; background: var(--card); border: 1px solid var(--bd3); box-shadow: 0 12px 32px var(--shadow); white-space: normal; text-align: left; opacity: 1; max-height: calc(50dvh - 24px); overflow-y: auto; box-sizing: border-box; }
/* #190 (PRD #193): the Row explanation is held to half the window's height, less a margin, and scrolls inside itself
   when taller — so flip-block always finds a side of its row with room, and its picture and its buttons stay reachable
   on a short window; the row never moves. */
/* T-154a: the card is the grid's scroll region, which would crop a popover on its last rows: the popover is lifted out
   of it, fixed and anchored to its cell, opening above the cell where below has no room and hidden while its cell is
   scrolled out of view. Without anchor positioning the card lets the popover out while one is open, as before. */
@supports (anchor-name: --a) {
  .lock-cell:has(> .popover) { anchor-name: --open-lock; }
  .lock-cell > .popover { position: fixed; position-anchor: --open-lock; top: calc(anchor(bottom) - 2px); right: calc(anchor(right) + 8px); position-try-fallbacks: flip-block; position-visibility: anchors-visible; }
}
@supports not (anchor-name: --a) {
  .grid-card:has(.popover) { overflow: visible; }
}
.popover:focus { outline: 2px solid var(--accent-line); outline-offset: 1px; }
.popover-line { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--t2); }
.popover-line:first-of-type { color: var(--t1); font-weight: 600; }
.popover-line + .popover-line { margin-top: 4px; }
.popover-action { margin-top: 10px; }
/* PRD #60 — the Amber marker (its Row indicator the amber "!" above) opens the lines and the preview panel (the ticket
   stock, white in both themes). */
.preview-panel { margin-top: 10px; max-height: 320px; overflow: hidden; border: 1px solid var(--bd3); border-radius: 6px; background: var(--paper); }
.preview-panel > svg { display: block; width: 100%; height: auto; max-height: 320px; }
/* PRD #178 (T-178b) — the Ticket picture after the Row explanation's words (PRD #189): the design on white ticket stock
   in both themes, the frame edge and the two bands the printer cannot print, each faulted element outlined in the design's red. */
.popover.has-figure { width: 440px; }
.ticket-picture-panel { margin: 10px 0 0; background: var(--card); }
.ticket-picture-panel svg.ticket-picture { overflow: visible; }
/* PRD #193: in the Row explanation the picture takes the popover's full width at any height — a portrait ticket is not
   shrunk to 320 px, its Missing-field placeholders stay readable, and the explanation scrolls inside instead. */
.popover .ticket-picture-panel, .popover .ticket-picture-panel > svg { max-height: none; }
/* PRD #274: a kept picture's one small line under it — "As read at HH:MM" and the Read again link. */
.picture-kept { margin: 6px 0 0; font-size: 12px; color: var(--t2); }
.picture-read-again { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; text-decoration: underline; cursor: pointer; }
/* PRD #257: a Template stop's refused Branding images, one row each — the image as it came on white, about four text lines
   tall at its own proportions and never cropped, then its full address (selectable; a link when https) and its count.
   #293: the rows sit above the Ticket picture, each image beside its words, so one to three rows show without scrolling
   at 1440 × 900. */
.refused-images { margin: 10px 0 0; display: flex; flex-direction: column; gap: 8px; }
.refused-image { display: flex; flex-direction: row; align-items: flex-start; gap: 10px; min-width: 0; }
.refused-image-slot { flex: 0 0 auto; max-width: 140px; }
.refused-image-slot:empty { display: none; }
.refused-image-picture { display: block; height: 5em; width: auto; max-width: 100%; object-fit: contain; object-position: left center; background: var(--paper); }
.refused-image-words { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; font-size: 12px; line-height: 1.4; color: var(--t2); }
.refused-image-address { color: var(--t1); overflow-wrap: anywhere; user-select: text; }
a.refused-image-address { color: var(--accent); }
.ticket-picture .picture-stock { fill: var(--paper); stroke: none; }
.ticket-picture .picture-edge { fill: none; stroke: var(--t2); stroke-width: 0.8; vector-effect: non-scaling-stroke; }
.ticket-picture .picture-band { fill: var(--danger); fill-opacity: 0.12; stroke: var(--danger); stroke-opacity: 0.5; stroke-dasharray: 3 2; stroke-width: 1; vector-effect: non-scaling-stroke; }
.ticket-picture .picture-fault { fill: none; stroke: var(--danger); stroke-width: 2; vector-effect: non-scaling-stroke; }
/* The app-wide lock on Print (PRD #51) — the update block, the server unreachable — in the same locked pattern, above the action bar. */
.app-lock { margin: 14px 16px 0; padding: 12px 14px; border-radius: 10px; background: var(--card); border: 1px solid var(--pill-ready-bd); box-shadow: inset 3px 0 0 var(--pill-ready-fg); }
.app-lock[data-lock="server-unreachable"] { border-color: var(--pill-cancelled-bd); box-shadow: inset 3px 0 0 var(--pill-cancelled-fg); }
.app-lock-line { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--t2); }
.app-lock-line:first-child { color: var(--t1); font-weight: 600; }
.app-lock-line + .app-lock-line { margin-top: 4px; }
.app-lock-action { margin-top: 10px; padding: 6px 12px; border-radius: 7px; border: 0; background: var(--blue); color: #fff; font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.app-lock-action:hover { background: var(--blue-hover); }
/* The batch bar (PRD #38, T-39–T-41): fixed to the bottom once a transaction is selected. */
.batch-bar { position: fixed; bottom: 0; left: 0; right: 0; z-index: 55; display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; background: var(--header); border-top: 1px solid var(--bd3); box-shadow: 0 -10px 30px var(--shadow); }
.batch-left { display: flex; align-items: center; gap: 14px; }
.batch-text { font-size: 13px; font-weight: 600; color: var(--t1); }
.batch-bar .primary.batch-print { margin: 0; width: auto; height: 38px; padding: 0 18px; border-radius: 8px; background: var(--accent-c); font-size: 13px; }
.batch-clear { height: 30px; padding: 0 11px; border-radius: 7px; background: transparent; border: 1px solid var(--bd3); color: var(--t2); font-size: 12px; }
.transactions.has-batch-bar { padding-bottom: 96px; }
.state { padding: 48px 16px; text-align: center; font-size: 13px; color: var(--t3); }
.state-unavailable p { margin: 0 0 12px; color: var(--pill-cancelled-fg); font-weight: 600; }
.state-unavailable .secondary { width: auto; height: 32px; margin: 0; padding: 0 16px; background: var(--panel); border-color: var(--bd3); color: var(--t1); font-size: 12px; }
/* The server unreachable (PRD #51): the locked pattern's three lines in place of the grid, then the forward action. */
.state-unreachable p { margin: 0 0 4px; color: var(--t2); }
.state-unreachable p:first-child { color: var(--pill-cancelled-fg); font-weight: 600; }
.state-unreachable .secondary { width: auto; height: 32px; margin: 10px 0 0; padding: 0 16px; background: var(--panel); border-color: var(--bd3); color: var(--t1); font-size: 12px; }

/* ---- the Operators screen (Ticket Printing.dc.html: op-page.png, op-edit.png) ---- */
.operators-page { padding-bottom: 40px; }
.op-head { margin: 16px 16px 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.op-back { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 0; margin-bottom: 8px; font-size: 12px; color: var(--t2); }
.op-back:hover { color: var(--t1); }
.op-title { font-size: 18px; font-weight: 700; letter-spacing: -.01em; margin: 0; }
.op-sub { font-size: 12px; color: var(--t3); margin: 3px 0 0; }
.op-add { height: 36px; padding: 0 16px; border-radius: 8px; border: 0; background: var(--accent-c); color: #fff; font-size: 12.5px; font-weight: 700; }
.op-add:hover { background: var(--blue-hover); }
.op-notice { margin: 12px 16px 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; border-radius: 9px; font-size: 12.5px; font-weight: 600; color: var(--t1); background: var(--op-linked-bg); border: 1px solid var(--op-linked-bd); }

.op-filters { margin: 14px 16px 0; background: var(--card); border: 1px solid var(--bd2); border-radius: 12px; padding: 14px; }
.op-search { display: flex; align-items: center; gap: 8px; background: var(--field); border: 1px solid var(--bd3); border-radius: 9px; height: 40px; padding: 0 12px; margin-bottom: 14px; }
.op-search input { flex: 1; min-width: 0; background: transparent; border: 0; outline: none; color: var(--t1); font: inherit; font-size: 13.5px; }
.op-search-mark { color: var(--t3); font-size: 14px; }
.op-filter-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 14px; }
.op-filter { display: block; flex: 1 1 150px; min-width: 130px; }
.op-filter .field-label { display: block; font-size: 11px; font-weight: 600; color: var(--t2); margin-bottom: 6px; }
.op-filter:last-child { flex: 0 0 auto; }
.op-chip-linked .chip-dot { background: var(--op-linked-dot); }
.op-chip-invited .chip-dot { background: var(--op-invited-dot); }
.op-chip-unlinked .chip-dot { background: var(--op-unlinked-dot); }
.op-chip-revoked .chip-dot { background: var(--t3); }
.op-filter-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.op-filter-toggles { display: flex; align-items: center; gap: 14px; }
.op-toggle, .op-clear { height: 32px; padding: 0 12px; border-radius: 7px; font-size: 12px; font-weight: 600; border: 1px solid var(--bd3); background: transparent; color: var(--t2); }
.op-toggle { background: var(--panel); color: var(--t1); }
.op-toggle.on { border-color: var(--accent-line); background: var(--accent-soft); }
.op-include { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--t2); cursor: pointer; }

.op-table-card { margin: 14px 16px 0; background: var(--card); border: 1px solid var(--bd2); border-radius: 12px; overflow-x: auto; }
.op-grid { width: 100%; min-width: 1080px; border-collapse: collapse; font-size: 12.5px; }
.op-grid thead th { height: 38px; background: var(--panel); text-align: left; padding: 0 8px; border-bottom: 1px solid var(--bd2); }
.op-row td { height: 52px; padding: 0 8px; border-bottom: 1px solid var(--row-line); color: var(--cell); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.op-row:hover td { background: var(--hover); }
.op-row.op-revoked td { color: var(--t3); }
.op-name { display: flex; align-items: center; gap: 10px; }
.op-name .avatar { width: 30px; height: 30px; flex: none; }
.op-cell { color: var(--cell); }
.op-admin { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 5px; font-size: 10px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; background: var(--accent-soft); color: var(--accent); border: 1px solid var(--accent-line); }
.op-pill { display: inline-block; padding: 2px 8px; border-radius: 5px; font-size: 10px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; border: 1px solid var(--bd4); color: var(--t3); }
.op-pill-linked { background: var(--op-linked-bg); color: var(--op-linked-fg); border-color: var(--op-linked-bd); }
.op-pill-invited { background: var(--op-invited-bg); color: var(--op-invited-fg); border-color: var(--op-invited-bd); }
.op-pill-unlinked { background: var(--op-unlinked-bg); color: var(--op-unlinked-fg); border-color: var(--op-unlinked-bd); }
.op-pill-revoked { background: var(--panel); }
.op-date { color: var(--t2); font-size: 11px; }
.op-actions-col { width: 90px; text-align: right; }
.op-row-button { height: 28px; padding: 0 13px; border-radius: 6px; background: var(--panel); border: 1px solid var(--bd3); color: var(--t1); font-size: 11px; font-weight: 600; }
.op-row-button:hover { background: var(--hover); }

.op-form { width: 540px; }
.op-intro { margin: 0 0 16px; padding: 11px 13px; border-radius: 9px; background: var(--panel); border: 1px solid var(--bd2); font-size: 12px; color: var(--t2); line-height: 1.5; }
.op-profile { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; padding: 12px; border-radius: 10px; background: var(--panel); border: 1px solid var(--bd2); }
.op-profile .avatar { width: 40px; height: 40px; font-size: 13px; flex: none; }
.op-profile-text { flex: 1; min-width: 0; }
.op-profile-name { font-size: 14px; font-weight: 700; }
.op-profile-meta { font-size: 11px; color: var(--t3); margin-top: 2px; }
.op-field { display: block; margin-bottom: 14px; }
.op-field .field-label { display: block; font-size: 11px; font-weight: 600; color: var(--t2); margin-bottom: 6px; }
.panel .op-field input.invalid { border-color: var(--danger); }
.op-field-error { display: block; margin-top: 6px; font-size: 12px; font-weight: 600; color: var(--danger); }
.op-form-error { margin: 0 0 14px; padding: 9px 12px; border-radius: 8px; background: rgba(226, 86, 77, .12); border: 1px solid rgba(226, 86, 77, .34); color: var(--danger); font-size: 12px; font-weight: 600; }
.op-unavailable { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 14px; padding: 9px 12px; border-radius: 8px; background: var(--op-invited-bg); border: 1px solid var(--op-invited-bd); color: var(--op-invited-fg); font-size: 12px; font-weight: 600; }
.op-unavailable .text-link { color: var(--accent); font-size: 12px; }
.op-sellers { margin-top: 2px; }
.op-sellers .field-label { display: block; font-size: 11px; font-weight: 600; color: var(--t2); margin-bottom: 7px; }
.op-seller-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.op-seller { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 16px; background: var(--panel); border: 1px solid var(--bd3); font-size: 11.5px; color: var(--t1); }
.op-resend { display: flex; gap: 8px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--bd2); }
.op-warning { margin-top: 16px; padding: 11px 13px; border-radius: 9px; background: var(--op-invited-bg); border: 1px solid var(--op-invited-bd); font-size: 12px; color: var(--t1); line-height: 1.5; }
.op-warning p { margin: 0 0 10px; }
.op-warning-actions { display: flex; justify-content: flex-end; gap: 9px; }
.op-form-foot { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-top: 1px solid var(--bd2); }
.op-form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; }
.op-cancel { height: 36px; padding: 0 14px; border-radius: 8px; background: var(--panel); border: 1px solid var(--bd3); color: var(--t2); font-size: 12.5px; font-weight: 600; }
.op-save { height: 36px; padding: 0 16px; border-radius: 8px; border: 0; background: var(--accent-c); color: #fff; font-size: 12.5px; font-weight: 700; }
.op-save:disabled { opacity: .5; cursor: not-allowed; }
.op-danger { height: 36px; padding: 0 16px; border-radius: 8px; border: 0; background: var(--danger); color: #fff; font-size: 12.5px; font-weight: 700; }

.op-confirm-overlay { z-index: 95; align-items: center; }
.op-confirm { width: 420px; padding: 20px; }
.op-confirm-title { font-size: 15px; font-weight: 700; margin: 0 0 8px; }
.op-confirm-text { font-size: 13px; color: var(--t2); line-height: 1.55; margin: 0 0 18px; }
.op-confirm-text strong { color: var(--t1); font-weight: 600; }

/* ---- Print / Reprint (Ticket Printing.dc.html screen 3; the dialog and panels follow tp-printer's PWA) ---- */
.print-screen { padding-bottom: 96px; }
.print-screen > .notice { margin-bottom: 0; } /* T-154a: flex items' margins do not collapse; the next panel's top margin spaces it */
/* PRD #70 (T-70d): the back button beside the title and summary, its box the head's full height. */
.print-head { margin: 16px 16px 0; display: grid; grid-template-columns: auto 1fr auto; column-gap: 14px; align-items: center; }
/* PRD #71 (T-71a): the printer chip, the printer's one control on the page, at the head's right; red while the printer cannot print. */
.printer-chip { grid-column: 3; grid-row: 1 / span 2; height: 30px; padding: 0 13px; border-radius: 15px; border: 1px solid var(--bd3); background: var(--card); color: var(--t1); font-size: 12px; font-weight: 700; white-space: nowrap; }
.printer-chip:hover { border-color: var(--bd5); }
.printer-chip:focus-visible { outline: 2px solid var(--accent-line); outline-offset: 1px; }
.printer-chip.printer-ready { background: var(--pill-printed-bg); color: var(--pill-printed-fg); border-color: var(--pill-printed-bd); }
.printer-chip.printer-printing, .printer-chip.printer-paused { background: var(--pill-ticket-printed-bg); color: var(--pill-ticket-printed-fg); border-color: var(--pill-ticket-printed-bd); }
.printer-chip.alert, .printer-chip.printer-disconnected, .printer-chip.printer-needs-setup, .printer-chip.printer-unreadable, .printer-chip.printer-unsupported, .printer-chip.printer-offline, .printer-chip.printer-blocked, .printer-chip.printer-stalled { background: var(--pill-cancelled-bg); color: var(--pill-cancelled-fg); border-color: var(--pill-cancelled-bd); }
.printer-chip.printer-connecting { color: var(--t2); }
.print-head .back-button { grid-row: 1 / span 2; align-self: stretch; min-height: 32px; padding: 0 14px; border-radius: 8px; background: transparent; border: 1px solid var(--bd3); color: var(--t2); font-size: 12.5px; font-weight: 600; cursor: pointer; }
.print-head .back-button:hover { color: var(--t1); border-color: var(--bd5); }
.print-head .back-button:focus-visible { outline: 2px solid var(--accent-line); outline-offset: 1px; }
.print-title { font-size: 18px; font-weight: 700; letter-spacing: -.01em; margin: 0; color: var(--t1); }
.print-summary { font-size: 12px; color: var(--t3); margin: 3px 0 0; }
.printer-badge { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 13px; font-size: 12px; font-weight: 700; border: 1px solid var(--bd3); }
.badge-online { background: var(--pill-printed-bg); color: var(--pill-printed-fg); border-color: var(--pill-printed-bd); }
.badge-offline { background: var(--pill-cancelled-bg); color: var(--pill-cancelled-fg); border-color: var(--pill-cancelled-bd); }
.printer-actions { display: inline-flex; gap: 8px; }
.error-banner { flex-basis: 100%; margin: 0; padding: 8px 11px; border-radius: 8px; font-size: 12.5px; font-weight: 600; background: var(--pill-cancelled-bg); color: var(--pill-cancelled-fg); border: 1px solid var(--pill-cancelled-bd); }
.pairing-guidance { font-weight: 400; }
.pairing-steps { margin: 6px 0 6px 18px; padding: 0; }
.pairing-commands { margin: 6px 0; padding: 8px 10px; border-radius: 6px; white-space: pre-wrap; user-select: all; font-family: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11.5px; background: var(--field); color: var(--t1); border: 1px solid var(--bd3); }
.pairing-guide { color: var(--accent); font-weight: 600; }
/* T-230a — the Pairing guide on the dialog host, in the Printer dialog's place: the shell's Markdown
   renderer's elements in the app's theme tokens; the section scrolls inside the frame, code blocks sideways. */
.pairing-guide-page { max-height: calc(100vh - 150px); overflow-y: auto; padding: 14px 0 4px; font-size: 13px; line-height: 1.55; color: var(--t2); }
.pairing-guide-page h1, .pairing-guide-page h2, .pairing-guide-page h3 { margin: 18px 0 8px; line-height: 1.3; color: var(--t1); }
.pairing-guide-page h1 { margin-top: 0; font-size: 18px; }
.pairing-guide-page h2 { font-size: 15px; }
.pairing-guide-page h3 { font-size: 13.5px; }
.pairing-guide-page p, .pairing-guide-page ul, .pairing-guide-page ol { margin: 0 0 10px; }
.pairing-guide-page ul, .pairing-guide-page ol { padding-left: 22px; }
.pairing-guide-page li { margin: 3px 0; }
.pairing-guide-page strong { color: var(--t1); }
.pairing-guide-page code { padding: 1px 5px; border-radius: 4px; border: 1px solid var(--bd3); background: var(--field); color: var(--t1); font-size: 12px; font-family: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace; }
.pairing-guide-page pre { max-width: 100%; margin: 0 0 12px; padding: 10px 12px; overflow-x: auto; white-space: pre; border-radius: 6px; border: 1px solid var(--bd3); background: var(--field); color: var(--t1); font-size: 12px; font-family: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace; }
.pairing-guide-page pre code { padding: 0; border: 0; background: transparent; }
.pairing-guide-page a { color: var(--accent); font-weight: 600; }
.pairing-guide-page table { margin: 0 0 12px; border-collapse: collapse; }
.pairing-guide-page th, .pairing-guide-page td { padding: 5px 12px; border: 1px solid var(--bd3); text-align: left; }
.pairing-guide-page th { background: var(--panel); color: var(--t1); }
.pairing-guide-page blockquote { margin: 0 0 12px; padding: 8px 12px; border-left: 3px solid var(--accent-line); background: var(--accent-soft); color: var(--t1); }
.pairing-guide-page blockquote p { margin: 0; }
.pairing-guide-page .guide-line { margin: 0; }
/* tp-printer's preflight (PRD #48 AC17), the printer dialog's Connection section since PRD #71: the rows, the remediation badges, the calibration notice. */
.preflight-text-lead { margin: 0 0 12px; font-size: 13px; color: var(--t2); }
.preflight-list { margin: 0 0 16px; padding-left: 18px; font-size: 12.5px; color: var(--t1); }
.preflight-row { margin-bottom: 6px; }
.preflight-text { font-family: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.badge-remediation { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 4px; font-size: 10.5px; font-weight: 700; background: var(--pill-ready-bg); color: var(--pill-ready-fg); border: 1px solid var(--pill-ready-bd); }
.badge-remediation.service { background: var(--pill-cancelled-bg); color: var(--pill-cancelled-fg); border-color: var(--pill-cancelled-bd); }
.preflight-note { color: var(--t2); }
.preflight-warning { flex-basis: 100%; margin: 0; padding: 8px 12px; border-radius: 8px; font-size: 12.5px; background: var(--pill-ready-bg); color: var(--pill-ready-fg); border: 1px solid var(--pill-ready-bd); }
.preflight-warning summary { cursor: pointer; font-weight: 700; }
.calibration-steps { margin-top: 8px; font-weight: 400; line-height: 1.45; color: var(--t1); }
.calibration-steps p { margin: 0 0 6px; }
.calibration-steps ol { margin: 6px 0 6px 18px; padding: 0; }
.panel-shift-line, .stream-check-line { flex-basis: 100%; margin: 0; font-size: 12.5px; color: var(--t2); }
/* tp-printer's warning stack (PRD #48 AC14): bottom-right, amber for warn, red for error. */
/* The engine's warnings (PRD #48 AC14) in the printer dialog's Errors section since PRD #71: amber for warn, red for error, each with its ×. */
.warning-entry { display: flex; align-items: flex-start; gap: 8px; }
.error-banner.warning-entry.warn { background: var(--pill-ready-bg); color: var(--pill-ready-fg); border-color: var(--pill-ready-bd); }
.warning-row-msg { flex: 1; }
.warning-dismiss { cursor: pointer; border: 0; background: none; font-size: 16px; line-height: 1; padding: 0; color: inherit; opacity: .6; }
.warning-dismiss:hover { opacity: 1; }
.resume-bar .secondary { width: auto; height: 30px; margin: 0; padding: 0 12px; border-radius: 7px; background: var(--panel); border-color: var(--bd3); color: var(--t1); font-size: 12px; }
.range-card { margin: 14px 16px 0; padding: 14px; display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; background: var(--card); border: 1px solid var(--bd2); border-radius: 12px; }
.range-quick .field-label { color: var(--t2); font-size: 11px; margin-bottom: 6px; }
.range-row, .range-all { display: flex; align-items: center; gap: 8px; }
.range-field { display: flex; align-items: center; gap: 6px; }
.range-label { font-size: 11px; color: var(--t3); }
.range-input { width: 74px; height: 34px; text-align: center; background: var(--field); border: 1px solid var(--bd3); border-radius: 7px; color: var(--t1); }
.range-row .elev { height: 34px; padding: 0 14px; border-radius: 7px; background: var(--elev); border: 1px solid var(--bd5); color: var(--t1); font-size: 12px; font-weight: 700; }
.range-row .range-check { border-color: var(--pill-printed-bd); color: var(--pill-printed-fg); }
.range-all .ghost { height: 32px; padding: 0 12px; border-radius: 7px; background: transparent; border: 1px solid var(--bd3); color: var(--t2); font-size: 12px; font-weight: 600; }
/* PRD #70 — the status pills (T-70a): the row pill's tokens per status; off outlined, on filled, half-filled when some are selected. */
.status-select { height: 32px; padding: 0 12px; border-radius: 7px; background: transparent; border: 1px solid var(--bd3); color: var(--t2); font-size: 12px; font-weight: 600; cursor: pointer; }
.status-select[data-status="VALID"] { --sel-bg: var(--pill-valid-bg); --sel-fg: var(--pill-valid-fg); --sel-bd: var(--pill-valid-bd); }
.status-select[data-status="PRINTED"] { --sel-bg: var(--pill-ticket-printed-bg); --sel-fg: var(--pill-ticket-printed-fg); --sel-bd: var(--pill-ticket-printed-bd); }
.status-select[data-status="CANCELLED"] { --sel-bg: var(--pill-cancelled-bg); --sel-fg: var(--pill-cancelled-fg); --sel-bd: var(--pill-cancelled-bd); }
.status-select[aria-pressed="false"] { color: var(--sel-fg); }
.status-select[aria-pressed="true"] { background: var(--sel-bg); color: var(--sel-fg); border-color: var(--sel-bd); }
.status-select[aria-pressed="mixed"] { background: linear-gradient(90deg, var(--sel-bg) 50%, transparent 50%); color: var(--sel-fg); border-color: var(--sel-bd); }
.status-select:disabled { opacity: .5; cursor: default; }
.status-select:focus-visible { outline: 2px solid var(--accent-line); outline-offset: 1px; }
.print-list { font-size: 12px; }
.print-list .check-col { width: 40px; text-align: center; }
.print-list td.faint { color: var(--tlabel); font-size: 11px; }
.ticket-row { cursor: pointer; }
.ticket-row.unselectable { cursor: default; }
.ticket-row.chosen td { background: var(--accent-soft); }
/* T-50 (PRD #38): tickets grouped by transaction. */
.print-group td { background: var(--group); border-bottom: 1px solid var(--bd2); padding: 0; }
.print-group .group-cell { padding: 0; }
.group-row { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 12px; white-space: nowrap; }
.group-txn { font-size: 12px; font-weight: 600; color: var(--grouplabel); }
.group-customer { font-size: 12px; color: var(--t2); }
.group-sep { width: 4px; height: 4px; border-radius: 50%; background: var(--bd5); }
.group-created { font-size: 11px; color: var(--t3); white-space: nowrap; }
.group-count { font-size: 11px; color: var(--t3); margin-left: auto; }
.group-cancelled { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 5px; font-size: 9.5px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; background: var(--pill-cancelled-bg); color: var(--pill-cancelled-fg); border: 1px solid var(--pill-cancelled-bd); }
.print-group.cancelled .group-txn, .print-group.cancelled .group-customer { opacity: .6; }
.dialog-backdrop { position: fixed; inset: 0; z-index: 95; display: flex; align-items: center; justify-content: center; background: var(--shadow); }
.dialog { width: 460px; max-width: calc(100% - 32px); padding: 20px; background: var(--card); border: 1px solid var(--bd3); border-radius: 12px; box-shadow: 0 18px 48px var(--shadow); }
.dialog-title { font-size: 15px; font-weight: 700; margin: 0 0 10px; color: var(--t1); }
/* PRD #71 (T-71b) — the shell's dialog host: one layer outside the shell root; the header carries the title, the last
   print-log line, Close and × (PRD #82); the body scrolls. The printer dialog fills it with five sections, always in the same order. */
.dialog-layer .dialog-backdrop { z-index: 96; }
.dialog-layer .dialog { width: 920px; max-height: calc(100vh - 48px); display: flex; flex-direction: column; padding: 0; }
.dialog-header { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; align-items: start; padding: 16px 20px 12px; border-bottom: 1px solid var(--bd2); }
.dialog-header .dialog-title { grid-column: 1; margin: 0; }
.dialog-subtitle { grid-column: 1; margin: 4px 0 0; min-height: 16px; font-family: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11.5px; color: var(--t2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dialog-close { grid-column: 2; grid-row: 1 / span 2; width: 30px; height: 30px; padding: 0; border-radius: 7px; border: 1px solid var(--bd3); background: transparent; color: var(--t2); font-size: 18px; line-height: 1; }
.dialog-close:hover { color: var(--t1); border-color: var(--bd5); }
/* PRD #82 — a visible Close left of the ×, in the dialogs' secondary look, at the main action buttons' 36px. */
.dialog-header-actions { grid-column: 2; grid-row: 1 / span 2; display: flex; align-items: center; gap: 8px; }
.dialog-header .dialog-dismiss { width: auto; height: 36px; margin: 0; padding: 0 16px; border-radius: 8px; background: var(--panel); border-color: var(--bd3); color: var(--t1); font-size: 12.5px; }
.dialog-header .dialog-dismiss:hover { border-color: var(--bd5); }
.dialog-layer button:focus-visible, .dialog-layer input:focus-visible { outline: 2px solid var(--accent-line); outline-offset: 1px; }
.dialog-body { overflow-y: auto; padding: 0 20px 18px; }
.dialog-section { display: grid; gap: 10px; padding: 14px 0; border-top: 1px solid var(--bd2); font-size: 12.5px; color: var(--t2); }
.dialog-section:first-child { border-top: 0; }
.dialog-section-title { margin: 0; font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--t3); }
.section-empty { margin: 0; color: var(--t3); font-style: italic; }
.dialog-section .secondary { width: auto; height: 30px; margin: 0; padding: 0 12px; border-radius: 7px; background: var(--panel); border-color: var(--bd3); color: var(--t1); font-size: 12px; }
.connection-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.preflight-result { padding: 12px; border: 1px solid var(--pill-cancelled-bd); border-radius: 10px; background: var(--panel); }
.preflight-title { margin: 0 0 6px; font-size: 13.5px; font-weight: 700; color: var(--pill-cancelled-fg); }
/* PRD #71 (T-71d) — the fine-adjust: the connected model, five number fields, Reset to model defaults. */
.fine-adjust-model { margin: 0; font-size: 13px; font-weight: 700; color: var(--t1); }
.fine-adjust { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px 14px; }
.fine-adjust-field { display: grid; gap: 4px; align-content: end; } /* issue 235: a wrapped label never lowers its input */
.fine-adjust-label { font-size: 11.5px; font-weight: 600; color: var(--tlabel); }
.fine-adjust-input { width: 100%; height: 32px; padding: 0 10px; border-radius: 7px; border: 1px solid var(--bd3); background: var(--field); color: var(--t1); font-size: 12.5px; }
.fine-adjust-note { margin: 0; font-size: 11.5px; color: var(--t3); }
.fine-adjust-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 10px; }
/* T-240a — Paper length, the printer's Media length: read-only, marked "from printer" once read; Calculate beside Reset
   with the reason it is disabled, and what it measured below. */
.fine-adjust-input[readonly] { background: var(--panel); color: var(--t2); }
.fine-adjust-from-printer { margin-left: 6px; font-weight: 600; color: var(--t3); }
.fine-adjust-actions .secondary:disabled, .debug-ruler-row .secondary:disabled { color: var(--t3); cursor: not-allowed; }
.fine-adjust-calculate-why { font-size: 11.5px; color: var(--t3); }
.fine-adjust-calculate-result { margin: 0; font-size: 12.5px; color: var(--t1); }
/* PRD #75 — the debug view, on every server since T-240b, shown after the Debug reveal (PRD #97): the template on the
   ticket stock with the printer layer in red over it (the template's barcode and QR boxes dashed); the gap list; the
   two downloads. */
.debug-body { display: grid; gap: 10px; }
.debug-figure { position: relative; border: 1px solid var(--bd3); border-radius: 6px; background: var(--paper); overflow: hidden; }
.debug-figure .debug-template { display: block; width: 100%; height: auto; opacity: .55; }
.debug-figure .printer-layer { position: absolute; inset: 0; width: 100%; height: 100%; }
.printer-layer .layer-text { fill: var(--danger); }
.printer-layer .layer-barcode, .printer-layer .layer-qr { fill: rgba(210, 77, 68, .22); stroke: var(--danger); stroke-width: 1; }
.printer-layer .template-box { fill: none; stroke: var(--t3); stroke-width: .8; stroke-dasharray: 3 2; }
/* T-128b — the Quiet zone across the printer layer at the trailing end, in the Amber marker's colours. */
.printer-layer .quiet-zone-band { fill: var(--pill-ready-bg); fill-opacity: .75; stroke: var(--pill-ready-bd); stroke-width: .8; }
/* T-164b — the Logo edge along the printer layer (landscape the design's top, portrait its left), the same tokens. */
.printer-layer .logo-edge-band { fill: var(--pill-ready-bg); fill-opacity: .75; stroke: var(--pill-ready-bd); stroke-width: .8; }
.debug-legend { margin: 0; font-size: 11.5px; color: var(--t3); }
.debug-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.debug-table th { padding: 4px 8px; text-align: left; font-size: 11px; font-weight: 700; color: var(--t3); border-bottom: 1px solid var(--bd2); }
.debug-table td { padding: 4px 8px; color: var(--t1); border-bottom: 1px solid var(--bd2); white-space: nowrap; }
.debug-row.flagged td { color: var(--danger); font-weight: 600; }
.debug-downloads { display: flex; gap: 8px; }
.debug-downloads a { display: inline-flex; align-items: center; text-decoration: none; border: 1px solid var(--bd3); }
/* T-174b — the Ruler print above the ticket's picture, its refusal in the error banner's words, and the ruler's
   printer file where a ticket's would show. */
.debug-view { display: grid; gap: 10px; }
.debug-ruler { display: grid; gap: 8px; }
.debug-ruler-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.debug-ruler-note { font-size: 11.5px; color: var(--t3); }
.debug-ruler-refusal { margin: 0; }
.debug-ruler-result { margin: 0; font-size: 12px; color: var(--t1); }
/* T-240b — the paired model and its latest Media length above the Ruler print. */
.debug-printer { margin: 0; font-size: 12px; color: var(--t2); }
.debug-zpl { margin: 0; max-height: 240px; overflow: auto; padding: 8px 10px; font-size: 11px; line-height: 1.45; color: var(--t1); border: 1px solid var(--bd3); border-radius: 6px; white-space: pre; }
.consent-list { margin: 0 0 18px; padding-left: 18px; font-size: 13px; color: var(--t2); line-height: 1.55; }
/* PRD #70 — the reprint count in the headline (T-70c); the per-ticket lines scroll so a long selection never outgrows the screen. */
.dialog-headline { font-size: 14px; font-weight: 700; margin: 0 0 12px; color: var(--t1); line-height: 1.45; }
.consent-list.scrolls { max-height: 40vh; overflow-y: auto; }
/* Issue 299 — the reissue consent dialog is wide enough for a ticket line on one line; .dialog's max-width keeps it inside the window. */
.consent-dialog { width: 620px; }
/* PRD #60 — the Print anyway dialog: the consent dialog's styling, one group per template and fields. */
.field-dialog { width: 560px; max-height: calc(100vh - 48px); overflow-y: auto; }
/* Issue 181 (T-60c) — inside it the reprint list holds about six lines and scrolls on its own, so the preview and the buttons stay in view. */
.field-dialog .consent-list.scrolls { max-height: 124px; }
.field-groups { display: grid; gap: 12px; margin: 0 0 12px; }
.field-group { padding: 12px; border: 1px solid var(--pill-ready-bd); border-radius: 10px; background: var(--panel); }
.field-words { margin: 0; font-size: 13px; font-weight: 600; color: var(--t1); line-height: 1.5; }
.field-count { margin: 4px 0 0; font-size: 12px; color: var(--t2); }
.field-help { margin: 0 0 16px; font-size: 12.5px; color: var(--t2); line-height: 1.5; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; }
.dialog-actions .ghost { height: 36px; padding: 0 14px; border-radius: 8px; background: transparent; border: 1px solid var(--bd3); color: var(--t2); }
.dialog-actions .primary.small-button { margin: 0; width: auto; height: 36px; padding: 0 14px; border-radius: 8px; font-size: 12.5px; background: var(--accent-c); }
.refusals { margin: 14px 16px 0; padding: 12px 14px; background: var(--card); border: 1px solid var(--pill-cancelled-bd); border-radius: 12px; font-size: 12.5px; color: var(--t2); }
.resume-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; background: var(--card); border: 1px solid var(--pill-ready-bd); border-radius: 10px; font-size: 12.5px; color: var(--t2); }
.panel-title { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--tlabel); margin: 0 0 8px; }
/* PRD #70 (T-70e): copied details shown for selection by hand when the clipboard refuses — under its Printing Issues row since T-115a. */
.details-text { flex-basis: 100%; margin: 4px 0 0; padding: 8px 10px; border-radius: 6px; white-space: pre-wrap; user-select: all; font-family: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11.5px; background: var(--field); color: var(--t1); border: 1px solid var(--bd3); }
.action-bar { position: fixed; bottom: 0; left: 0; right: 0; z-index: 55; display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; background: var(--header); border-top: 1px solid var(--bd3); box-shadow: 0 -10px 30px var(--shadow); }
.action-count { font-size: 13px; font-weight: 600; color: var(--t1); }
.action-bar .primary { margin: 0; width: auto; height: 38px; padding: 0 18px; border-radius: 8px; background: var(--accent-c); }
/* T-115a: the two-tab strip below the print head, and the Printing Issues tab — the ticket grid's card and
   cells, the count in the cancelled pill's tokens while any issue is open. Tokens only. */
.print-tabs { margin: 14px 16px 0; display: flex; gap: 4px; border-bottom: 1px solid var(--bd2); }
.print-tab { height: 38px; margin-bottom: -1px; padding: 0 14px; display: inline-flex; align-items: center; gap: 8px; background: transparent; border: 0; border-bottom: 2px solid transparent; color: var(--t2); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.print-tab:hover { color: var(--t1); }
.print-tab[aria-selected="true"] { color: var(--t1); border-bottom-color: var(--accent-c); }
.print-tab:focus-visible { outline: 2px solid var(--accent-line); outline-offset: -2px; }
.tab-count { min-width: 22px; height: 20px; padding: 0 7px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; background: var(--panel); border: 1px solid var(--bd3); color: var(--t2); font-size: 11px; font-weight: 700; }
.tab-count.alert { background: var(--pill-cancelled-bg); border-color: var(--pill-cancelled-bd); color: var(--pill-cancelled-fg); }
.issues-card { margin-top: 14px; }
.issues-list { font-size: 12px; }
.issue-row td { padding: 8px 10px; border-top: 1px solid var(--row-line); color: var(--cell); vertical-align: middle; }
.issue-row td.issue-words { color: var(--pill-cancelled-fg); }
.issue-row .issue-action { color: var(--t2); }
.issue-actions { display: inline-flex; gap: 6px; } /* T-187c: Printed and Did not print side by side */
.popover-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; } /* T-187c: the locked row's two actions */
.popover-actions .popover-action { margin: 0; }
.confirm-text { margin: 0 0 12px; font-size: 13px; color: var(--t1); } /* T-187c: "Ticket {serial} printed?" */
.confirm-actions { justify-content: flex-end; }
.confirm-actions .secondary { width: auto; flex: none; height: 36px; margin: 0; padding: 0 16px; }
.issue-forward, .issue-clear { white-space: nowrap; }
.issue-clear { text-align: right; }
.issue-row .secondary { width: auto; height: 30px; margin: 0; padding: 0 12px; border-radius: 7px; background: var(--panel); border-color: var(--bd3); color: var(--t1); font-size: 12px; }
.issue-details td { padding: 0 10px 10px; }
.issues-empty { margin: 0; padding: 22px 18px; font-size: 13px; color: var(--t2); }
/* tp-printer's print flow surfaces (PRD #48 AC20–AC26), in the printer dialog's Printing section since PRD #71: the
   progress, the shifted preview and its caption, the controls, the stall banner (the amber cadence banner is
   retired), the recovery rows, the void list, the cancel summary, the waiting bar. Tokens only. */
.printing-progress { margin: 0; font-size: 13px; font-weight: 700; color: var(--t1); }
.printing-controls { display: flex; gap: 8px; flex-wrap: wrap; }
/* Issue 238: Waiting for the server — a quiet status line under the progress, never the Stall's red. */
.stream-check p { margin: 4px 0 0; font-weight: 400; }
.printing-waiting, .printing-nothing-left, .printing-nothing-sent { margin: 0; font-size: 12.5px; color: var(--t2); }
.printing-preview { overflow: hidden; border: 1px solid var(--bd3); border-radius: 6px; background: var(--paper); }
.printing-preview svg { display: block; }
/* PRD 140: the frame follows the ticket's orientation, never rotating the design — landscape across the section,
   portrait 306 px tall; the svg's own viewBox gives the other side. */
.printing-preview[data-frame="landscape"] { width: 100%; }
.printing-preview[data-frame="landscape"] svg { width: 100%; height: auto; }
.printing-preview[data-frame="portrait"] { height: 306px; width: fit-content; }
.printing-preview[data-frame="portrait"] svg { height: 100%; width: auto; }
.preview-caption { margin: 0; font-size: 11.5px; color: var(--t3); font-style: italic; }
.stall-banner { padding: 10px 14px; border-radius: 10px; font-size: 12.5px; background: var(--pill-cancelled-bg); color: var(--pill-cancelled-fg); border: 1px solid var(--pill-cancelled-bd); }
.stall-banner strong { display: block; font-size: 13px; }
.recovery-panel { padding: 12px; border: 1px solid var(--bd3); border-radius: 10px; background: var(--panel); }
.recovery-title { margin: 0; font-size: 13px; font-weight: 700; color: var(--t1); }
.recovery-rows { list-style: none; margin: 10px 0; padding: 0; }
.recovery-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 8px; border-top: 1px solid var(--row-line); font-size: 12.5px; color: var(--t1); }
.recovery-row.in-flight { background: var(--pill-ready-bg); color: var(--pill-ready-fg); border-radius: 6px; }
.recovery-row.in-flight strong { margin-right: 6px; }
.recovery-empty { margin: 10px 0; color: var(--t2); font-style: italic; }
.void-list { padding: 12px 14px; background: var(--card); border: 1px solid var(--pill-ready-bd); border-radius: 10px; font-size: 12.5px; color: var(--t1); }
.void-list ul { margin: 6px 0 0; padding-left: 18px; }
/* T-187a: the Recovery row's Printed / Not printed switch — a two-way switch whose label reads its position. Tokens only. */
.recovery-switch { flex: none; min-width: 128px; height: 30px; margin: 0; padding: 0 10px; display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--bd3); border-radius: 15px; background: var(--card); color: var(--t1); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.recovery-switch:focus-visible { outline: 2px solid var(--accent-line); outline-offset: 2px; }
.switch-track { position: relative; width: 30px; height: 16px; flex: none; border-radius: 8px; background: var(--accent-c); }
.switch-knob { position: absolute; top: 2px; left: 16px; width: 12px; height: 12px; border-radius: 50%; background: var(--card); }
.recovery-switch.off { color: var(--pill-cancelled-fg); border-color: var(--pill-cancelled-bd); background: var(--pill-cancelled-bg); }
.recovery-switch.off .switch-track { background: var(--bd3); }
.recovery-switch.off .switch-knob { left: 2px; }
.unfinished-panel { margin: 14px 16px 0; padding: 12px 14px; background: var(--card); border: 1px solid var(--bd2); border-radius: 12px; font-size: 12.5px; color: var(--t1); }
.unfinished-list { list-style: none; margin: 8px 0 0; padding: 0; }
.unfinished-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; border-top: 1px solid var(--row-line); }
.unfinished-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.unfinished-text { color: var(--t1); }
.unfinished-next { color: var(--t2); }
.unfinished-actions { display: flex; gap: 8px; }
.unfinished-actions .primary { margin: 0; width: auto; height: 30px; padding: 0 12px; border-radius: 7px; background: var(--accent-c); font-size: 12px; }
/* A primary action waiting on the app lock or the server (PRD #51) reads as unavailable, whatever its context's colour. */
.action-bar .primary:disabled, .unfinished-actions .primary:disabled, .dialog-actions .primary:disabled { opacity: .45; cursor: not-allowed; }
.unfinished-actions .secondary { width: auto; height: 30px; margin: 0; padding: 0 12px; border-radius: 7px; background: var(--panel); border-color: var(--bd3); color: var(--t1); font-size: 12px; }
.log-scroll { max-height: 240px; overflow: auto; padding: 6px 10px; border: 1px solid var(--bd2); border-radius: 8px; background: var(--field); font-size: 11.5px; }
.log-line { white-space: nowrap; }
.tail-time { color: var(--t3); }
.tail-msg { color: var(--t1); }
.stale-dialog { width: 520px; }
.stale-dialog .dialog-title { color: var(--danger); }
.stale-text { font-size: 13px; color: var(--t1); margin: 8px 0; }
.stale-missing-lead { font-size: 12.5px; font-weight: 700; color: var(--t1); margin: 8px 0 2px; }
.stale-missing { margin: 0 0 12px; padding-left: 18px; font-size: 12.5px; color: var(--danger); }
.stale-foot { font-size: 11.5px; color: var(--t3); margin: 0; }
.stream-error { margin: 14px 16px 0; }
.error-aggregate { margin: 14px 16px 0; display: grid; gap: 4px; }
.agg-count { font-weight: 700; }
.agg-msg { color: var(--t1); }
.agg-samples { font-size: 11.5px; color: var(--t2); }
.error-aggregate .dialog-actions { margin: 6px 0 0; }

/* ---- the Busy indicator (PRD #92): core/spa-shell/busy.js marks the document element and shows the bar ---- */
:root[data-busy], :root[data-busy] * { cursor: progress; }
.busy-bar { position: fixed; top: 0; left: 0; width: 30%; height: 3px; z-index: 97; background: var(--accent-c); pointer-events: none; animation: tpBusy 1.1s ease-in-out infinite alternate; }
header.app-header { anchor-name: --app-header; }
body:has(header.app-header) .busy-bar { top: 64px; top: anchor(--app-header bottom, 64px); }
@keyframes tpBusy { 0% { left: 0; } 100% { left: 70%; } }
@media (prefers-reduced-motion: reduce) { .busy-bar { animation: none; } }
