/* Clozit admin — payments, promo codes, price tags (#514 slices 5–6). Tokens from admin.css. */

.mono { font-family: var(--mono); }
.strong { font-weight: 700; }
.select-sm, .input-sm { height: 40px; border-radius: 10px; font-size: 13px; }
.select-sm { min-width: 0; padding: 0 10px; }

/* ---------- pool: the Approve / Release slots ---------- */
.action-approve { border: none; background: var(--green); color: #FFFFFF; font-weight: 700; }
.action-release { border-color: var(--warn); color: #7A5600; font-weight: 700; }
.action-btn:disabled { opacity: 0.6; }

/* ---------- payments ---------- */
.pay-list { display: flex; flex-direction: column; gap: 12px; }
.pay-card { background: var(--card); border-radius: 18px; padding: 18px 20px; display: flex; flex-wrap: wrap; gap: 18px; align-items: center; }
.pay-thumb { width: 56px; height: 68px; border-radius: 10px; background: var(--page); flex-shrink: 0; object-fit: cover; display: block; }
.pay-main { flex: 1 1 260px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pay-type { display: flex; margin-bottom: 2px; }
/* Two lines at most: a long item name ends in an ellipsis rather than pushing the card taller. */
.pay-title {
  font-weight: 700; font-size: 16px; line-height: 1.3; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
}
.pay-detail { font-size: 13px; font-weight: 500; color: var(--ink-2); overflow-wrap: anywhere; }
.pay-sub { font-size: 13px; color: var(--ink-2); line-height: 1.4; }
.pay-expiry { font-size: 13px; font-weight: 600; color: var(--ink-2); margin-top: 2px; }
.pay-expiry.exp-soon { color: var(--warn); }
.pay-expiry.exp-urgent { color: var(--danger); }
.type-pill { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 0.8px; padding: 3px 8px; border-radius: 999px; }
.type-popup { background: #F6DED6; color: #7A2E17; }
.type-platform_fee { background: #DCE8F2; color: #1F4E73; }
.status-chip { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 999px; background: #ECEAE6; color: #6B6663; white-space: nowrap; }
.hist-confirmed { background: #D8F3DC; color: #2D6A4F; }
.hist-refunded { background: #D4E6EB; color: #2F5F7A; }
.hist-not_received, .hist-rejected { background: #FFF3CD; color: #7A5600; }
.look-for { flex: 0 1 220px; background: var(--page); border-radius: 12px; padding: 10px 14px; }
.look-label { font-size: 11px; font-weight: 700; letter-spacing: 1px; color: var(--ink-2); }
.look-value { font-size: 18px; font-weight: 700; }
.pay-actions { display: flex; gap: 8px; margin-left: auto; }
.btn-approve { background: var(--green); color: #FFFFFF; }
.btn-approve:disabled { opacity: 0.6; }
.pay-empty { background: var(--card); border-radius: 18px; padding: 22px 20px; color: var(--ink-2); }
.conf-section { display: flex; flex-direction: column; gap: 10px; }
.conf-head { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: flex-end; }
.conf-filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.custom-range { display: flex; gap: 6px; align-items: center; }
.conf-table { min-width: 860px; }
.conf-grid { display: grid; grid-template-columns: 1.1fr 0.9fr 0.8fr 1.5fr 0.9fr 0.7fr 0.9fr 1.2fr; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--hairline); font-size: 14px; align-items: center; }

/* ---------- promo codes ---------- */
.promo-form { background: var(--card); border-radius: 16px; padding: 18px 20px; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; align-items: end; }
.promo-form .select { width: 100%; min-width: 0; }
.promo-form .input { width: 100%; }
.input-code { text-transform: uppercase; }
.promo-table { min-width: 820px; }
.promo-grid { display: grid; grid-template-columns: 1.2fr 1fr 2fr 0.6fr 1fr 1.3fr; gap: 12px; padding: 14px 20px; align-items: center; border-bottom: 1px solid var(--hairline); font-size: 14px; }
.promo-grid.table-head { padding: 12px 20px; }
.event-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 2fr) auto auto; gap: 12px; padding: 14px 20px; align-items: center; border-bottom: 1px solid var(--hairline); font-size: 14px; }
.event-grid.table-head { padding: 12px 20px; }
.event-grid.is-deleted .evc-name, .event-grid.is-deleted .evc-dates { color: var(--ink-2); }
.event-grid.is-deleted .evc-name { text-decoration: line-through; }
.status-pill { display: inline-block; white-space: nowrap; font-size: 11px; font-weight: 700; padding: 4px 9px; border-radius: 999px; }
.status-live { background: #D8F3DC; color: #1E4D38; }
.status-scheduled { background: #D4E6EB; color: #25475C; }
.status-expired, .status-disabled, .status-deleted { background: #EFEEEA; color: var(--ink-2); }
.status-deleted { text-decoration: line-through; }
/* A deleted code stays listed (with its use count) but reads as history. */
.promo-grid.is-deleted .prc-code, .promo-grid.is-deleted .prc-off, .promo-grid.is-deleted .prc-valid { color: var(--ink-2); }
.promo-grid.is-deleted .prc-code { text-decoration: line-through; }
.prc-act { display: flex; gap: 8px; justify-content: flex-end; }
/* 082: "Once per person" sits under the reward, quieter than it. */
.prc-usage { display: block; font-size: 12px; font-weight: 500; color: var(--ink-2); }
.btn-danger-text { color: var(--danger); }

/* ---------- price tags ---------- */
.tag-buttons { display: flex; gap: 10px; }
.tag-board { background: var(--card); border-radius: 16px; padding: 28px; }
.tag-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.tag-grid .empty { grid-column: 1 / -1; }
.tag { position: relative; border: 1px dashed #B5A49F; border-radius: 12px; padding: 16px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; background: #FFFFFF; }
label.tag { cursor: pointer; }
.tag.is-off { opacity: 0.4; }
.tag-check { position: absolute; top: 10px; left: 10px; width: 18px; height: 18px; accent-color: var(--ink); margin: 0; }
.tag-brand { font-family: var(--serif); font-size: 15px; font-weight: 600; letter-spacing: 0.5px; }
.tag-qr { width: 120px; height: 120px; display: block; }
.tag-name { font-size: 14px; font-weight: 700; }
.tag-detail { font-size: 12px; color: var(--ink-2); }
.tag-price { font-family: var(--serif); font-size: 26px; font-weight: 600; }
.tag-line { font-size: 11px; line-height: 1.4; color: var(--ink); }
.print-sheets { display: none; }

@media (max-width: 1100px) { .tag-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  /* One column: a datetime-local input's intrinsic width overflows a half-width phone column. */
  .promo-form { grid-template-columns: minmax(0, 1fr); }
  .promo-form > * { min-width: 0; }
  .promo-form .btn { grid-column: 1 / -1; }
  .tag-board { padding: 16px; }
  .tag-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .tag-qr { width: 104px; height: 104px; }
  .pay-main { flex: 1 1 0; min-width: 0; }
  .pay-card { align-items: flex-start; }
  .pay-actions { width: 100%; }
  .pay-actions .btn { flex: 1 1 0; }
  .look-for { flex: 1 1 100%; }
  .conf-head { align-items: flex-start; }
}

/* ---------- print: the selected tags, eight to an A4 sheet, nothing else ---------- */
@page { size: A4; margin: 8mm; }
@media print {
  body { background: #FFFFFF; }
  .sidebar, .topbar, .drawer-scrim, .toast, #dialog-root, .no-print { display: none !important; }
  .shell { display: block; min-height: 0; }
  .main { padding: 0; display: block; }
  .print-sheets { display: block; }
  .sheet { display: grid; grid-template-columns: repeat(2, 96mm); grid-auto-rows: 69mm; gap: 1.5mm; break-after: page; }
  .sheet:last-child { break-after: auto; }
  .sheet .tag { border-radius: 0; padding: 3mm; gap: 1.2mm; justify-content: center; break-inside: avoid; }
  .sheet .tag-qr { width: 28mm; height: 28mm; }
  .sheet .tag-price { font-size: 20pt; }
  .tag-line, .tag-detail { color: #000000; }
}

/* Refunds (088): the History row's Refund button opens this panel. */
.conf-grid { grid-template-columns: 1.1fr 0.9fr 0.8fr 1.5fr 0.9fr 0.7fr 0.9fr 1.2fr 0.8fr; }
.cc-act { display: flex; justify-content: flex-end; }
.btn-quiet { color: var(--ink-2); }
.hist-cancelled, .hist-expired { background: #ECEAE6; color: #6B6663; }
.rf-dialog { max-width: 560px; max-height: calc(100vh - 32px); padding: 0; gap: 0; overflow: hidden; }
.rf-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 22px 24px 14px; border-bottom: 1px solid var(--hairline); }
.rf-sub { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); margin-top: 6px; }
.rf-x { border: 0; background: transparent; font-size: 26px; line-height: 1; cursor: pointer; color: var(--ink-2); padding: 0 4px; border-radius: 8px; }
.rf-x:hover { background: #F5F3EF; }
.rf-body { overflow-y: auto; padding: 16px 24px; display: flex; flex-direction: column; gap: 14px; }
.rf-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 24px; border-top: 1px solid var(--hairline); background: #FFFFFF; }
.rf-foot .btn { height: 42px; padding: 0 18px; }
.rf-card { border: 1px solid var(--hairline); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.rf-kv { display: flex; justify-content: space-between; gap: 16px; font-size: 14px; align-items: center; }
.rf-k { color: var(--ink-2); }
.rf-v { text-align: right; font-variant-numeric: tabular-nums; }
.rf-kv.plus .rf-v { color: #2D6A4F; font-weight: 700; }
.rf-kv.muted .rf-v { color: var(--ink-2); }
.rf-callout { background: #FFF3CD; color: #7A5600; border-radius: 10px; padding: 9px 12px; font-size: 13px; line-height: 1.4; }
.rf-callout-info { background: #EEF4F7; color: #2F5F7A; }
.refund-blocker { color: #7A5600; background: #FFF3CD; padding: 10px 12px; border-radius: 10px; font-size: 14px; }
.rf-amount { font-family: var(--serif); font-size: 34px; font-weight: 600; }
.rf-amount-lead { padding: 2px 0; }
.rf-amount-cap { font-family: inherit; font-size: 14px; font-weight: 400; color: var(--ink-2); }
.rf-receipt { background: #F2F8F3; border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.rf-receipt-line { font-size: 14px; }
.rf-minus { color: #9C2F2F; font-weight: 600; }
.rf-card .dialog-field { margin: 8px 0 2px; }
.rf-card .input, .rf-card .select { width: 100%; }
.rf-card textarea.input { height: auto; padding: 8px 12px; font-family: inherit; }
.rf-claw { margin-top: 10px; border: 1px solid var(--hairline); border-radius: 12px; padding: 10px 12px; }
.rf-check { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.rf-claw-input { margin-top: 8px; display: none; flex-direction: column; gap: 4px; }
.rf-claw.on .rf-claw-input { display: flex; }
.rf-timeline { list-style: none; margin: 4px 0 0; padding: 0; position: relative; }
.rf-step { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; gap: 10px; position: relative; padding-bottom: 12px; }
.rf-step:not(:last-child)::before { content: ''; position: absolute; left: 7px; top: 14px; bottom: -2px; width: 2px; background: var(--hairline); }
.rf-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--outline); margin: 4px 0 0 3px; z-index: 1; }
.rf-step.done .rf-dot { background: #2D6A4F; }
.rf-step-label { font-size: 14px; font-weight: 600; }
.rf-step-ref { font-weight: 400; color: var(--ink-2); font-size: 12.5px; }
.rf-step-sub { font-size: 12.5px; color: var(--ink-2); margin-top: 1px; }
.rf-step-time { font-size: 12.5px; color: var(--ink-2); white-space: nowrap; }

/* 090: the pool's TAG cell is a button while the piece can be re-priced. */
.tag-edit { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 4px 8px; margin: -4px -8px;
  border: 1px solid transparent; border-radius: 8px; background: none; font: inherit; font-weight: 700; color: var(--ink); cursor: pointer; text-align: left; }
.tag-edit:hover, .tag-edit:focus-visible { border-color: var(--outline); background: #FFFFFF; }
.tag-edit-price { text-decoration: underline dotted; text-underline-offset: 3px; }
.tag-edit-hint { font-size: 12px; font-weight: 500; color: var(--ink-2); white-space: nowrap; }
@media (max-width: 1023px) { .tag-edit { align-items: flex-end; text-align: right; } }
/* A cart checkout's piece count, beside the type pill (083). */
.pay-type { display: flex; gap: 6px; flex-wrap: wrap; }
.items-pill { background: #ECEAE6; color: #48312A; }
.pay-more { font-weight: 500; color: var(--ink-2); }

/* ---------- pool: sort + the read-only item page (2026-11-28) ---------- */
.sort { display: flex; align-items: center; gap: 8px; }
.sort-label { font-size: 12px; font-weight: 700; letter-spacing: 1px; color: var(--ink-2); text-transform: uppercase; }
.sort-select { min-width: 0; height: 42px; }
/* The ITEM cell is a button now (it opens the item page): reset it to look like the cell it was. */
.item-open { border: 0; background: transparent; padding: 0; margin: 0; text-align: left; font: inherit; color: inherit; cursor: pointer; width: 100%; border-radius: 10px; }
.item-open:hover .item-name { text-decoration: underline; }
.pi-dialog { max-width: 520px; }
.pi-head-text { min-width: 0; }
.pi-head-text .dialog-title { overflow-wrap: anywhere; }
.pi-gallery { position: relative; }
.pi-stage { aspect-ratio: 3 / 4; max-height: 52vh; margin: 0 auto; border-radius: 14px; background: #F5F3EF; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.pi-photo { width: 100%; height: 100%; object-fit: contain; display: block; }
.pi-nophoto { display: flex; align-items: center; justify-content: center; color: var(--ink-2); font-size: 13px; }
.pi-nav { position: absolute; top: calc(50% - 32px); width: 40px; height: 40px; border-radius: 999px; border: 1px solid var(--outline); background: #FFFFFF; color: var(--ink); font-size: 24px; line-height: 1; cursor: pointer; box-shadow: 0 2px 8px rgba(26, 21, 16, 0.12); }
.pi-prev { left: 8px; }
.pi-next { right: 8px; }
.pi-foot { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 10px; }
.pi-dots { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.pi-dot { width: 8px; height: 8px; padding: 0; border-radius: 999px; border: 0; background: var(--outline); cursor: pointer; }
.pi-dot[aria-selected="true"] { background: var(--ink); }
.pi-caption { font-size: 12px; color: var(--ink-2); min-height: 16px; }
.pi-loading { display: flex; flex-direction: column; gap: 8px; }
.pi-info { display: flex; flex-direction: column; gap: 14px; }
.pi-price { display: flex; flex-direction: column; gap: 2px; }
.pi-price-tag { font-family: var(--serif); font-size: 28px; font-weight: 600; }
.pi-price-note { font-size: 13px; color: var(--ink-2); }
.pi-text { margin: 0; font-size: 14px; line-height: 1.5; white-space: pre-line; }
.pi-dialog .pill { width: auto; padding: 5px 12px; }
