/* Sales: lay-by accounts (T account, deposit form), order tickets and the point of sale.
   Owned by public/js/sales.js and loaded after /styles.css. Class names here belong to this module;
   a look shared by several modules goes in /styles.css (npm run check-styles enforces this). */

/* ---------- lay-by ---------- */
.badge.lb-active { background: #dfe9ff; color: #24408f; }
.badge.lb-completed { background: #d8f3e4; color: #17633e; }
.badge.lb-defaulted { background: #fde2df; color: #9b2218; }
.badge.lb-cancelled { background: var(--surface-2); color: var(--muted); text-decoration: line-through; }
@media (prefers-color-scheme: dark) {
  .badge.lb-active { background: #1c2b52; color: #9db6ff; }
  .badge.lb-completed { background: #143d29; color: #7fe0ae; }
  .badge.lb-defaulted { background: #4a1a15; color: #ff9d92; }
}
.meter-wrap.big .meter { height: 12px; }
.stat.hero .meter { background: rgb(255 255 255 / .25); }
.stat.hero .meter i { background: #fff; }
.stat.hero .meter-wrap span { color: #fff; }
.pre { white-space: pre-line; margin: 0; }
.icon-btn.tiny { font-size: 1rem; padding: 0 .3rem; margin-left: .2rem; color: var(--muted); }

.deposit-form h3 { font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; color: #1b2a5e; margin: 0 0 .5rem; padding-bottom: .3rem; border-bottom: 1px solid var(--rule); }
.df-section { margin-bottom: 1.1rem; }
.df-section p { margin: .2rem 0; }
.df-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .45rem 1.5rem; }
.df-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 600px) { .df-grid, .df-grid.three { grid-template-columns: 1fr; } }
.df-line { display: flex; gap: .4rem; align-items: baseline; }
.df-value { flex: 1; border-bottom: 1px dotted var(--rule); min-height: 1.3em; font-weight: 600; }
.df-table td, .df-table th { border: 1px solid var(--rule); }

.t-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: .5rem; margin-bottom: .6rem; }
.t-grid { display: grid; grid-template-columns: 1fr 1fr; border-top: 2px solid var(--text); }
.t-side { min-width: 0; overflow-x: auto; }
.t-side + .t-side { border-left: 2px solid var(--text); }
.t-title { text-align: center; font-weight: 800; padding: .35rem; letter-spacing: .05em; color: var(--accent); }
.t-side table { width: 100%; font-size: .86rem; }
.t-side td, .t-side th { padding: .35rem .45rem; white-space: normal; }
.t-side tfoot td { border-top: 2px solid var(--text); border-bottom: 3px double var(--text); }
.t-cd td { font-style: italic; color: var(--muted); }
.void-row td { text-decoration: line-through; color: var(--muted); }
.t-bd { margin: .8rem 0 0; padding: .5rem .8rem; border-radius: 8px; background: #d8f3e4; color: #17633e; }
.t-bd.owing { background: var(--second-soft); color: var(--second); }
@media (max-width: 700px) {
  .t-grid { grid-template-columns: 1fr; }
  .t-side + .t-side { border-left: 0; border-top: 2px solid var(--text); }
}

/* ---------- order tickets ---------- */
.ticket-list { display: grid; gap: .8rem; }
.ticket { display: grid; gap: .6rem; border-left-width: 4px; }
.ticket.late { border-left-color: var(--danger); }
.ticket .task-top { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.ticket-no { font-weight: 800; font-variant-numeric: tabular-nums; }
.ticket-cust { margin-right: auto; }
.ticket-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; counter-reset: s; }
.ticket-steps li { position: relative; padding-top: 10px; font-size: .74rem; color: var(--muted); text-align: center; }
.ticket-steps li::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 6px; border-radius: 999px; background: var(--surface-2); }
.ticket-steps li.done::before { background: var(--ok); }
.ticket-steps li.now::before { background: var(--copper); }
.ticket-steps li.now { color: var(--text); font-weight: 700; }
@media (max-width: 600px) { .ticket-steps li span { display: none; } .ticket-steps li.now span { display: inline; position: absolute; left: 0; white-space: nowrap; } .ticket-steps { padding-bottom: 1rem; } }
.ticket-grid { display: grid; gap: .6rem 1.2rem; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }

/* ---------- lay-by account: tabs and the sales person on the T account ---------- */
.page.narrow > .no-print > .tabs { margin-top: 1rem; }
.t-owner { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: .6rem 1.1rem;
  padding: .75rem .9rem; margin: .4rem 0 1rem; border-radius: 10px; background: var(--accent-soft); border-left: 4px solid var(--copper); }
.t-owner .avatar { width: 2.6rem; height: 2.6rem; font-size: 1rem; }
.t-owner-main { display: grid; gap: .1rem; min-width: 0; }
.t-owner-main strong { font-size: 1.1rem; }
.t-owner-facts { display: flex; gap: 1.4rem; flex-wrap: wrap; }
.t-owner-facts > div { display: grid; gap: .1rem; }
@media (max-width: 700px) { .t-owner { grid-template-columns: auto minmax(0, 1fr); } .t-owner-facts, .t-owner > .btn { grid-column: 1 / -1; } }
@media print { .t-owner { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }

/* Lay-by account: wide enough for the four figures in one row and a T account whose dates stay on one line */
.page.narrow.layby-page { max-width: 1040px; }
.layby-page .stats { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 900px) { .layby-page .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } .layby-page .stat.hero { grid-column: 1 / -1; } }
@media (max-width: 520px) { .layby-page .stats { grid-template-columns: 1fr 1fr; } .layby-page .stat:last-child { grid-column: 1 / -1; } }
.t-side td.nowrap, .t-side td.num, .t-side th { white-space: nowrap; }
.t-side th { vertical-align: bottom; }
/* On a phone the T account must fit without scrolling sideways: smaller type, tighter cells, headings may wrap */
@media (max-width: 520px) {
  .t-side table { font-size: .78rem; }
  .t-side td, .t-side th { padding: .3rem .25rem; }
  .t-side th { white-space: normal; }
}

/* ---------- point of sale ---------- */
.pos-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 1rem; align-items: start; }
.pos-layout input[type=search] { width: 100%; margin-bottom: .6rem; }
.pos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .5rem; }
.pos-item { display: flex; flex-direction: column; align-items: flex-start; gap: .15rem; padding: .6rem .7rem; text-align: left; border: 1px solid var(--border);
  border-radius: 10px; background: var(--surface); color: var(--text); cursor: pointer; font: inherit; min-height: 92px; }
.pos-item:hover { border-color: var(--accent); }
.pos-item.out { opacity: .5; cursor: not-allowed; }
.pos-item .pthumb { margin-bottom: .2rem; }
.pos-basket { position: sticky; top: .5rem; display: grid; gap: .5rem; }
.pos-basket h2 { margin: 0; }
.pos-basket input, .pos-basket select { width: 100%; }
.pos-lines td { padding: .3rem .35rem; }
.qty-input { width: 4.8rem; text-align: right; }
.pos-sum { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.pos-sum input { max-width: 9rem; }
.pos-sum.big { font-size: 1.25rem; font-weight: 700; border-top: 2px solid var(--border); padding-top: .4rem; }
.pos-total { display: flex; justify-content: space-between; align-items: baseline; font-size: 1.4rem; }
@media (max-width: 860px) { .pos-layout { grid-template-columns: 1fr; } .pos-basket { position: static; } }

/* ---------- lay-by collection ---------- */
.badge.lb-collected { background: #e7f6ee; color: #17633e; }
@media (prefers-color-scheme: dark) { .badge.lb-collected { background: #143d29; color: #7fe0ae; } }
/* A lay-by moved to a paid goods account: closed here */
.badge.lb-moved { background: #e8eefc; color: #2a4a9b; }
@media (prefers-color-scheme: dark) { .badge.lb-moved { background: #1d2a4d; color: #a9c1ff; } }
.collection-card { border-left-width: 4px; }
.collection-card h2 { margin: 0; }
.collection-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .7rem 1.2rem; margin-top: .7rem; }
.collection-grid > div { display: grid; gap: .1rem; }

/* Lay-by: money paid over the balance, waiting for the CEO */
.credit-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1rem; padding: .75rem 1rem; margin-bottom: .8rem;
  border-radius: 12px; border: 1px solid var(--copper); background: color-mix(in srgb, var(--copper) 12%, var(--surface)); }

/* Performance: the target bar keeps its size, and a sales person's own days read as a short list */
.perf-table .meter-wrap { width: 11rem; }
.perf-own { max-width: 28rem; }

/* Lay-by check: one card per kind of problem, coloured by how serious it is */
.lb-check { border-left: 4px solid var(--border); }
.lb-check.lb-check-bad { border-left-color: var(--danger); }
.lb-check.lb-check-warn { border-left-color: var(--copper); }
.lb-check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.lb-check-list li { display: flex; gap: .75rem; justify-content: space-between; align-items: flex-start; padding-bottom: .55rem; border-bottom: 1px solid var(--border); }
.lb-check-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.lb-check-links { display: flex; flex-wrap: wrap; gap: .3rem; justify-content: flex-end; flex-shrink: 0; max-width: 45%; }
.stat.lb-check-bad strong { color: var(--danger); }
@media (max-width: 600px) { .lb-check-list li { flex-direction: column; } .lb-check-links { max-width: none; justify-content: flex-start; } }

/* Lay-by release file (GAKA 1.58.0): Sent → Verified by the accountant → Approved by the CEO → Logistics collect */
.release-card { border-left: 4px solid var(--copper); }
.release-card h2 { margin: 0; }
.release-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .5rem 1rem; margin-top: .6rem; }
.release-step { color: var(--muted); }
.release-step.done { color: var(--text); font-weight: 600; }
/* More trucks on one collection: one box per truck */
/* The truck boxes and their button take the form's whole width */

/* What needs attention on the tickets (GAKA 1.70.0, redesigned 1.70.2): a card like the tickets below, tabs with counts,
   and one row per ticket with small coloured tags instead of emoji */
.ticket-alerts { margin: .2rem 0 1.1rem; padding: 1rem 1.1rem .9rem; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-xs); }
.ticket-alerts[hidden] { display: none; }
.tk-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .8rem; }
.tk-head h2 { margin: 0; font-size: 1.1rem; }
.tk-head p { margin: .15rem 0 0; }
.tk-tabs { display: flex; flex-wrap: wrap; gap: .35rem; margin: .75rem 0 .5rem; }
.tk-list { list-style: none; margin: 0; padding: 0; display: grid; }
.tk-row + .tk-row { border-top: 1px solid var(--border); }
.tk-open { width: 100%; display: grid; grid-template-columns: 7.5rem minmax(0, 1fr) minmax(0, 22rem) auto; align-items: center; gap: .9rem; padding: .65rem .4rem;
  border: 0; border-radius: 10px; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.tk-open:hover, .tk-open:focus-visible { background: var(--surface-2); outline: none; }
.tk-tags { display: flex; flex-wrap: wrap; gap: .25rem; }
.tk-tag { display: inline-block; padding: .12rem .5rem; border-radius: 6px; font-size: .68rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.tk-tag-late { background: color-mix(in srgb, var(--danger, #e5484d) 16%, transparent); color: var(--danger, #e5484d); }
.tk-tag-new { background: var(--accent-soft); color: var(--accent); }
.tk-tag-claude { background: color-mix(in srgb, #8b5cf6 16%, transparent); color: #8b5cf6; }
.tk-tag-update { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.tk-main { display: grid; min-width: 0; }
.tk-main strong, .tk-main .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-side { display: grid; justify-items: end; text-align: right; min-width: 0; }
.tk-due { font-weight: 700; font-size: .88rem; }
.tk-due.late { color: var(--danger, #e5484d); }
.tk-go { color: var(--link, var(--accent)); font-weight: 700; font-size: .88rem; white-space: nowrap; }
.tk-more { margin-top: .5rem; }
@media (max-width: 699px) {
  .tk-open { grid-template-columns: minmax(0, 1fr) auto; }
  .tk-tags { grid-column: 1 / -1; }
  .tk-side { justify-items: start; text-align: left; }
  .tk-go { grid-row: 2; grid-column: 2; }
}
/* A ticket that needs attention: a coloured edge and its tags with what happened */
.ticket-flag { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; margin-bottom: .45rem; }
.ticket.ticket-flag-late { box-shadow: inset 4px 0 0 var(--danger, #e5484d); }
.ticket.ticket-flag-new { box-shadow: inset 4px 0 0 var(--accent); }
.ticket.ticket-flag-claude { box-shadow: inset 4px 0 0 #8b5cf6; }
.ticket.ticket-flag-update { box-shadow: inset 4px 0 0 var(--ok); }
.ticket.ticket-focus { outline: 3px solid var(--accent); outline-offset: 2px; transition: outline .3s; }

/* New order on a lay-by account (GAKA 1.73.0): the live total in the form */
.order-total { margin: .25rem 0 0; font-size: 1.05rem; }

/* Sales performance as cards (GAKA 1.80.7), like the stock balances: one card per sales person */
.perf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; margin: 1rem 0; }
.perf-card { display: grid; gap: .7rem; border-top: 3px solid var(--border); }
.perf-card.perf-top { border-top-color: var(--warn, #d97706); }
.perf-card.perf-me { box-shadow: 0 0 0 2px var(--accent-soft); }
.perf-card.perf-loss { border-top-color: var(--danger, #e5484d); }
.perf-head { display: flex; align-items: center; gap: .7rem; }
.perf-name { flex: 1; min-width: 0; }
.perf-name h2 { margin: 0; font-size: 1.1rem; }
.perf-stars { color: var(--warn, #d97706); letter-spacing: 1px; font-size: .9rem; }
.perf-rank { font-weight: 700; font-size: .9rem; padding: .2rem .6rem; border-radius: 999px; background: var(--surface-2); white-space: nowrap; }
.perf-top .perf-rank { background: color-mix(in srgb, var(--warn, #d97706) 22%, transparent); }
.perf-figs { display: flex; justify-content: space-between; align-items: end; gap: .8rem; }
.perf-big { font-size: 1.7rem; line-height: 1.1; }
.perf-target { text-align: right; }
.perf-share { height: 4px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.perf-share span { display: block; height: 100%; background: var(--accent); opacity: .55; }
.perf-flow { display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem; padding: .6rem; border-radius: 10px; background: var(--surface-2); text-align: center; }
.perf-flow > div { display: grid; gap: .1rem; }

/* My order tickets (GAKA 1.82.3): waiting for a truck and truck assigned under their own headings; who posted the job */
.ticket-section { display: grid; gap: .6rem; margin-bottom: 1.4rem; }
.ticket-section > h2 { margin: .4rem 0 0; }
.ticket-section > p { margin: 0; }
.ticket-poster.waiting { border-left: 3px solid var(--warn, #d97706); padding-left: .6rem; }
.ticket-poster.waiting strong { font-size: 1.05rem; }

/* Recent updates under Needs attention, folded (GAKA 1.82.4) */
.tk-updates { border-top: 1px solid var(--border); margin-top: .6rem; padding-top: .6rem; display: grid; gap: .4rem; }
.tk-updates-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; flex-wrap: wrap; }

/* One row per order (GAKA 1.87.2): a split order's progress, its loads underneath; "Due soon" in amber */
.tk-tag-soon { background: color-mix(in srgb, var(--warn, #d97706) 18%, transparent); color: var(--warn, #d97706); }
.tk-due.soon { color: var(--warn, #d97706); }
.tk-progress { display: flex; align-items: center; gap: .5rem; margin-top: .25rem; }
.tk-progress .meter { width: 7rem; flex: none; }
.tk-loads { list-style: none; margin: .2rem 0 .4rem 1.2rem; padding: 0; display: grid; gap: .15rem; }
.tk-load { width: 100%; display: grid; grid-template-columns: 5rem 1fr auto; gap: .6rem; align-items: center; text-align: left; border: 0; background: none;
  color: inherit; font: inherit; padding: .35rem .5rem; border-radius: 8px; cursor: pointer; }
.tk-load:hover { background: var(--surface-2); }
.ticket-job-loads { display: grid; gap: .6rem; margin-top: .6rem; padding-left: .8rem; border-left: 3px solid var(--border); }

/* Commission on a lay-by account (GAKA 1.95.0): the total and who earns it, each collection, and the load that delivered it */
.lb-commission { display: grid; gap: .7rem; border-left: 4px solid #1f8a57; }
.lb-com-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.lb-com-head h2 { margin: 0; }
.lb-com-head p { margin: .2rem 0 0; }
.lb-com-total { display: grid; justify-items: end; font-size: 1.5rem; font-weight: 750; font-variant-numeric: tabular-nums; line-height: 1.1; }
.lb-com-total small { font-size: .78rem; font-weight: 500; color: var(--muted); }
.lb-com-total.pos { color: #17633e; }
.lb-com-list { list-style: none; margin: 0; padding: 0; display: grid; }
.lb-com-list li { display: grid; grid-template-columns: 7rem minmax(0, 1fr) auto; align-items: baseline; gap: .2rem 1rem; padding: .5rem 0; border-top: 1px solid var(--border); }
.lb-com-list strong { font-variant-numeric: tabular-nums; text-align: right; }
.lb-com-why { grid-column: 1 / -1; color: var(--muted); }
.lb-com-why.none { color: #9a6b00; font-weight: 600; }
.lb-com-load { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .8rem; padding: .6rem .8rem; border-radius: 10px; background: var(--surface-2); }
.lb-com-load.off { border: 1px solid rgba(201, 145, 0, .4); background: #fff6d6; color: #5c4200; }
.lb-com-off { font-weight: 650; }
.lb-com-warn { margin: 0; padding: .55rem .8rem; border-radius: 10px; background: #fff6d6; color: #5c4200; font-weight: 600; }
@media (prefers-color-scheme: dark) {
  .lb-commission { border-left-color: #3fbf7f; }
  .lb-com-total.pos { color: #7fe0ae; }
  .lb-com-why.none { color: #ffd866; }
  .lb-com-load.off, .lb-com-warn { border-color: rgba(255, 216, 102, .25); background: rgba(255, 216, 102, .1); color: #ffe9a3; }
}
@media (max-width: 560px) { .lb-com-list li { grid-template-columns: 1fr auto; } .lb-com-list li > :nth-child(2) { grid-column: 1; } }

/* ---------- My order tickets: the board at the top (GAKA 1.113.0). Landscape cards, as wide as the lists below (1.124.2, the
   CEO): the label across the top, the number on the left, its facts beside it; two by two on smaller screens ---------- */
.tk-board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; margin: .25rem 0 1rem; }
.tk-tile { display: flex; flex-direction: column; align-items: stretch; gap: .4rem; min-width: 0; text-align: left; padding: .65rem .75rem; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--border); border-top: 4px solid var(--border); color: inherit; font: inherit; cursor: pointer; }
.tk-tile:hover { box-shadow: 0 0 0 1px var(--link); }
.tk-tile.active { box-shadow: 0 0 0 2px var(--link); }
.tk-tile.tk-danger { border-top-color: var(--danger); }
.tk-tile.tk-warn { border-top-color: var(--copper); }
.tk-tile.tk-good { border-top-color: var(--ok); }
.tk-tile-label { font-size: .67rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0; color: var(--muted); }
.tk-tile-num { font-size: 1.65rem; line-height: 1.1; }
.tk-tile-body { display: flex; align-items: center; gap: .6rem; flex: 1; min-width: 0; }
.tk-tile-facts { display: grid; gap: .1rem; min-width: 0; padding-left: .6rem; border-left: 1px solid var(--border); }
.tk-tile-num small { display: block; margin-top: .15rem; letter-spacing: 0; font-size: .74rem; font-weight: 500; color: var(--muted); }
.tk-tile-line { font-size: .77rem; line-height: 1.35; color: var(--muted); }
.tk-tile-line.warn { color: var(--danger); font-weight: 600; }
.tk-board-links { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: .5rem; }
@media (max-width: 1150px) { .tk-board { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .tk-tile { padding: .7rem .75rem; } .tk-tile-num { font-size: 1.5rem; } .tk-tile-label { font-size: .68rem; } .tk-tile-line { font-size: .78rem; }
  .tk-tile-body { flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: .3rem; } .tk-tile-num small { display: inline; } .tk-tile-facts { padding-left: 0; border-left: 0; } }

/* Performance: where a card's commission comes from (GAKA 1.113.1) */
.perf-losses { display: block; width: 100%; margin-top: .6rem; padding: .5rem .6rem; text-align: left; font: inherit; font-size: .82rem; color: var(--muted);
  background: transparent; border: 1px dashed var(--border); border-radius: 10px; cursor: pointer; }
.perf-losses strong { color: var(--danger); }
.perf-losses:hover { border-color: var(--danger); }

/* Needs attention: what was worked on and what was not (GAKA 1.113.3) */
.tk-sum { display: flex; flex-wrap: wrap; gap: .35rem; justify-content: flex-end; }
.tk-st { font-size: .82rem; font-weight: 600; padding: .15rem .5rem; border-radius: 8px; background: var(--surface-2); color: var(--muted); }
.tk-st-todo { background: color-mix(in srgb, var(--danger) 16%, transparent); color: var(--danger); }
.tk-st-doing { background: color-mix(in srgb, var(--copper) 18%, transparent); color: var(--copper); }
.tk-st-done { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.tk-load { display: grid; grid-template-columns: 1.4rem 5rem 7rem 1fr auto; align-items: center; gap: .6rem; }
.tk-load .tk-st { justify-self: start; }
.tk-mark { display: inline-grid; place-items: center; width: 1.3rem; height: 1.3rem; border-radius: 50%; font-size: .8rem; font-weight: 700; }
.tk-load-todo .tk-mark { background: var(--danger); color: #fff; }
.tk-load-doing .tk-mark { background: var(--copper); color: #fff; }
.tk-load-done .tk-mark { background: var(--ok); color: #fff; }
.tk-load-todo { border-left: 3px solid var(--danger); }
@media (max-width: 700px) { .tk-load { grid-template-columns: 1.4rem auto 1fr; } .tk-load .tk-st { grid-column: 2 / -1; } .tk-load .tk-go { display: none; } }

/* Ticket cards: the state and who must act on one line, the rest folded (GAKA 1.115.0) */
.tc-now { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .7rem; }
.tc-act { font-size: .9rem; }
.tc-more > summary { cursor: pointer; font-size: .85rem; color: var(--link); padding: .15rem 0; }
.tc-more[open] > summary { margin-bottom: .5rem; }
.tc-more > * + * { margin-top: .6rem; }
.ticket-list > .ticket { margin-bottom: 0; }

/* A lay-by collection's date needed, with management's Change date (GAKA 1.153.0) */
.release-needed { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .6rem; margin: .35rem 0 .2rem; }
.release-needed .btn { margin-left: auto; }
