/* Ticket expiry tracker (/tools/ticket-expiry-tracker): only what tools.css / tool-page.css don't already style */
.tool .btn { padding: 12px 18px; min-height: 46px; font-size: .92rem; }
.tool .btn-line { border-color: var(--asphalt); color: var(--asphalt); background: var(--white); }
.tool .btn-line:hover { background: var(--asphalt); color: var(--yellow); }

.tx-modes { margin: 0 0 16px; }
.tx-modes button { min-height: 44px; padding: 8px 14px; border: 1.5px solid var(--concrete-2); border-radius: 10px; background: var(--white); font: inherit; font-weight: 700; font-size: .9rem; color: var(--ink); cursor: pointer; }
.tx-modes button[aria-selected="true"] { background: var(--asphalt); border-color: var(--asphalt); color: var(--yellow); }
.tool-in .tool-in { display: grid; gap: 14px; }
.tool-in input:disabled { opacity: .5; }

.tx-suggest { display: grid; gap: 6px; padding: 10px 12px; border-radius: 10px; background: #fffbea; border: 1px solid #f5e3a3; font-size: .86rem; }
.tx-suggest:empty, .tx-suggest[hidden] { display: none; }
.tx-suggest p { margin: 0; }
.tx-suggest .tw-link { font-size: .86rem; }
.tx-src { font-size: .76rem; color: var(--steel); }
.tx-src a { color: inherit; }

.tx-photo { display: grid; gap: 6px; }
.tx-photo-l { font-weight: 700; font-size: .88rem; }
.tx-photo-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.tx-photo-row img { width: 88px; height: 56px; object-fit: cover; border-radius: 8px; border: 1px solid var(--concrete-2); }
.tx-file { position: relative; display: inline-flex !important; align-items: center; justify-content: center; min-height: 44px; padding: 8px 14px; border: 1.5px dashed var(--steel); border-radius: 10px; font-weight: 700 !important; font-size: .88rem; cursor: pointer; background: var(--concrete); }
.tx-file.btn { border-style: solid; }
.tx-file input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.tx-file:focus-within { outline: 3px solid rgba(255,106,0,.35); }
.tx-btns { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

.tx-wallet h3 { margin: 4px 0 8px; font-size: 1.05rem; }
.tx-cards, .tx-people { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.tx-card { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px; border: 1.5px solid var(--concrete-2); border-radius: 14px; background: var(--white); }
.tx-thumb { width: 64px; height: 44px; border-radius: 8px; overflow: hidden; border: 0; padding: 0; background: var(--concrete); cursor: pointer; }
.tx-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tx-nophoto { display: grid; place-items: center; font-weight: 800; font-size: .72rem; color: var(--steel); cursor: default; text-align: center; line-height: 1.1; padding: 2px; }
.tx-card-b { display: grid; gap: 2px; min-width: 0; }
.tx-card-b b { font-size: .95rem; line-height: 1.25; }
.tx-card-b span { font-size: .8rem; color: var(--steel); overflow-wrap: anywhere; }
.tx-card-b .tx-note { font-style: italic; }
.tx-card-a { display: grid; gap: 6px; }
.tx-card-a button, .tx-people li li button { min-height: 36px; padding: 4px 12px; border: 1.5px solid var(--concrete-2); background: var(--white); border-radius: 8px; font: inherit; font-weight: 700; font-size: .8rem; cursor: pointer; color: var(--ink); }
.tx-card-a button:hover { border-color: var(--asphalt); }
.tx-empty { padding: 14px; border: 1.5px dashed var(--concrete-2); border-radius: 12px; color: var(--steel); font-size: .9rem; }
.tx-device { margin-top: 10px !important; }
@media (max-width: 420px) { .tx-card { grid-template-columns: 52px minmax(0, 1fr); } .tx-thumb { width: 52px; } .tx-card-a { grid-column: 1 / -1; grid-auto-flow: column; justify-content: end; } }

/* dashboard items (dark result panel) */
.tx-item { display: grid; gap: 8px; padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); border-left: 5px solid #6b7280; }
.tx-item.tone-good { border-left-color: var(--green); } .tx-item.tone-warn { border-left-color: var(--orange); } .tx-item.tone-alert { border-left-color: var(--red); }
.tx-item-h { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.tx-item-h b { font-size: 1rem; line-height: 1.3; }
.tx-item-d { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.tx-item-d strong { font-family: var(--display); font-size: 1.6rem; color: var(--yellow); line-height: 1; }
.tx-item.tone-alert .tx-item-d strong { color: #ff8f84; } .tx-item.tone-good .tx-item-d strong { color: #86efac; }
.tx-item-d span { color: #aab0ba; font-size: .84rem; }
.tx-item .out-h { margin: 2px 0 -2px; font-size: .86rem; }
.tx-links { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0; font-size: .84rem; }
.tool-out .tw-pill.good { background: rgba(34,197,94,.2); color: #bbf7d0; } .tool-out .tw-pill.alert { background: rgba(229,50,45,.3); color: #ffd0c8; } .tool-out .tw-pill.warn { background: rgba(255,106,0,.25); color: #fed7aa; }
.tool-out .big.good b { color: #86efac; } .tool-out .big.alert b { color: #ff8f84; } .tool-out .big.warn b { color: #fdba74; }
.tool-out .tw-actions button { min-height: 42px; }

/* team */
.tx-req { display: grid; gap: 8px; }
.tx-people > li { padding: 10px 12px; border: 1.5px solid var(--concrete-2); border-radius: 12px; background: var(--white); }
.tx-pp-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tx-people ul { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 4px; }
.tx-people li li { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: .82rem; color: var(--steel); }
.tx-people li li button { min-width: 36px; font-size: 1rem; line-height: 1; }

.tx-mx { border-collapse: separate; border-spacing: 3px; font-size: .78rem; min-width: 100%; }
.tx-mx th { text-align: left; font-weight: 700; color: #cfd3da; padding: 4px 6px; vertical-align: bottom; }
.tx-mx thead th { font-size: .72rem; max-width: 110px; }
.tx-mx tbody th { white-space: nowrap; color: #fff; }
.tx-mx td { padding: 6px; border-radius: 6px; text-align: center; white-space: nowrap; background: rgba(255,255,255,.06); }
.tx-mx td b { display: block; font-size: .85rem; }
.tx-mx td small { display: block; font-size: .68rem; opacity: .85; }
.tx-c-expired { background: #b91c1c !important; color: #fff; } .tx-c-d7 { background: #ef4444 !important; color: #fff; }
.tx-c-d14 { background: #f97316 !important; color: #fff; } .tx-c-d30 { background: #facc15 !important; color: #1f2937; }
.tx-c-ok { background: #15803d !important; color: #fff; } .tx-c-none { background: #475569 !important; color: #fff; }
.tx-c-miss { background: rgba(255,255,255,.04) !important; color: #aab0ba; border: 1px dashed rgba(255,255,255,.25); }
.tx-legend { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; font-size: .72rem; }
.tx-legend span { padding: 3px 8px; border-radius: 6px; font-weight: 700; }

/* print (kit.js printReport wipes colours; keep the status colours on the paper) */
@media print {
  body.tw-printing #tw-print .tx-mx td, body.tw-printing #tw-print .tx-legend span, body.tw-printing #tw-print .tx-p td { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body.tw-printing #tw-print .tx-c-expired, body.tw-printing #tw-print .tx-c-d7 { background: #fca5a5 !important; }
  body.tw-printing #tw-print .tx-c-d14 { background: #fdba74 !important; } body.tw-printing #tw-print .tx-c-d30 { background: #fde68a !important; }
  body.tw-printing #tw-print .tx-c-ok { background: #bbf7d0 !important; } body.tw-printing #tw-print .tx-c-none { background: #e2e8f0 !important; }
  body.tw-printing #tw-print .tx-p-alert td { background: #fee2e2 !important; } body.tw-printing #tw-print .tx-p-warn td { background: #ffedd5 !important; }
  body.tw-printing #tw-print .tx-mx { border-collapse: collapse; } body.tw-printing #tw-print .tx-mx td small { display: block; }
  body.tw-printing #tw-print .tx-p-img { width: 70mm; max-height: 45mm; object-fit: contain; }
  body.tw-printing #tw-print h2 { font-size: 13pt; margin: 14px 0 6px; } body.tw-printing #tw-print h3 { font-size: 11pt; margin: 10px 0 4px; }
}
.tx-mx tbody th { position: sticky; left: 0; z-index: 1; background: var(--asphalt); }
