/* ==========================================================
   Shipping, bank-transfer payment, receipts, roles & permissions
   (uses the existing brand tokens from style.css)
   ========================================================== */

/* ---------- Generic ---------- */
.server-missing { background: #fff3cd; color: #6b4e00; padding: 14px 20px; text-align: center; font-size: 14px; border-bottom: 1px solid #f0d58a; }
.server-missing code { background: #fff; padding: 1px 6px; border-radius: 4px; }
.btn--danger { background: #b4102c; color: #fff; }
.btn--danger:hover { background: #8e0c22; }
.full-span { grid-column: 1 / -1; }
.field-error { color: #b4102c; font-size: 13px; margin-top: 8px; display: flex; gap: 6px; align-items: center; }
.field-error::before { content: "\F33A"; font-family: "bootstrap-icons"; }
.req-tag { display: inline-block; margin-left: 6px; font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; background: #fde4e7; color: #b4102c; padding: 2px 8px; border-radius: 999px; vertical-align: middle; }
.notice--amber { background: #fff6e0; }
.notice--amber h4 { color: #8a5a00; }
.em-alert { background: #b4102c !important; color: #fff !important; }
[aria-busy="true"] { position: relative; }
.checkout__summary[aria-busy="true"]::after { content: ""; position: absolute; top: 18px; right: 18px; width: 18px; height: 18px; border: 2px solid var(--line); border-top-color: var(--maroon); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Status pills (payment & order) */
.pill--pending-verification, .pill--awaiting-payment-verification, .pill--pending { background: #fff1d6; color: #8a5a00; }
.pill--receipt-rejected, .pill--rejected { background: #fde4e7; color: #b4102c; }
.pill--awaiting-replacement-receipt { background: #ffe6f0; color: #a3124f; }
.pill--refund-due { background: #ede7ff; color: #5a3fb8; }
.pill--approved, .pill--published { background: #e3f4e6; color: #1b7a33; }
.pill--replaced, .pill--superseded, .pill--draft, .pill--disabled { background: #eee; color: #555; }

/* ---------- Checkout: delivery options ---------- */
.ship-msg { display: flex; gap: 10px; align-items: flex-start; background: var(--cream); border: 1px dashed #e0d4cc; border-radius: 10px; padding: 14px 16px; font-size: 14px; color: #4a4044; margin: 0; }
.ship-msg i { color: var(--maroon); margin-top: 2px; }
.ship-msg--error { background: #fff5f6; border-color: #f2b8c3; color: #8e0c22; }
.ship-msg--error i { color: #b4102c; }

/* ---------- Checkout: bank transfer ---------- */
.bank-card { border: 2px solid var(--maroon); border-radius: 14px; overflow: hidden; background: #fff; }
.bank-card__row { display: grid; grid-template-columns: 140px 1fr auto; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid #f1e8e2; font-size: 14px; }
.bank-card__row:first-child { border-top: 0; }
.bank-card__row span { color: var(--muted); font-size: 13px; }
.bank-card__row strong { font-weight: 600; word-break: break-word; }
.bank-card__row--big { background: var(--pink-soft); }
.bank-card__row--big .acct { font-size: 24px; letter-spacing: .08em; color: var(--maroon); font-variant-numeric: tabular-nums; }
.bank-card__row--amount { background: #f4faf5; }
.bank-card__row--amount strong { font-size: 18px; color: var(--green); }
.copy-btn { display: inline-flex; align-items: center; gap: 6px; border: 0; background: var(--maroon); color: #fff; font-weight: 600; font-size: 13px; padding: 9px 14px; border-radius: 8px; white-space: nowrap; min-height: 40px; }
.copy-btn:hover { background: var(--pink); }
.bank-card__row--amount .copy-btn { background: var(--green-btn, #0f4a26); }
.bank-instr { font-size: 13.5px; color: #4a4044; margin: 12px 0 0; display: flex; gap: 8px; }
.bank-instr i { color: var(--maroon); }
.pay-steps { margin: 12px 0 0; padding-left: 20px; font-size: 13.5px; color: #3d3437; display: grid; gap: 4px; }

/* ---------- Receipt upload ---------- */
.receipt-field { margin-top: 20px; }
.receipt-field__label { display: block; font-weight: 600; font-size: 15px; margin-bottom: 4px; }
.dropzone { position: relative; display: block; margin-top: 10px; border: 2px dashed #d9c3cb; border-radius: 14px; background: #fffafb; padding: 22px; text-align: center; cursor: pointer; transition: border-color .2s, background .2s; }
.dropzone:hover, .dropzone.drag, .dropzone:focus-within { border-color: var(--maroon); background: var(--pink-soft); }
.dropzone.invalid { border-color: #b4102c; background: #fff5f6; }
.dropzone.has-file { border-style: solid; border-color: var(--green-mid); background: #f6fbf7; text-align: left; }
.dropzone input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.dropzone__empty { display: flex; flex-direction: column; align-items: center; gap: 4px; pointer-events: none; }
.dropzone__empty i { font-size: 34px; color: var(--maroon); }
.dropzone__empty small { color: var(--muted); }
.dropzone__file { display: flex; align-items: center; gap: 14px; pointer-events: none; }
.dropzone__thumb { width: 64px; height: 64px; border-radius: 10px; overflow: hidden; background: #fff; display: grid; place-items: center; font-size: 30px; color: #b4102c; border: 1px solid var(--line); flex-shrink: 0; }
.dropzone__thumb img { width: 100%; height: 100%; object-fit: cover; }
.dropzone__meta { flex: 1; min-width: 0; }
.dropzone__meta strong { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dropzone__meta small { color: var(--muted); }

.confirm__icon--pending { background: #e0a800; box-shadow: 0 0 0 10px #fff3cd; }
.receipt-list { display: grid; gap: 8px; font-size: 13.5px; }
.receipt-list .pill { margin-left: 4px; }

@media (max-width: 600px) {
  .bank-card__row { grid-template-columns: 1fr auto; }
  .bank-card__row span { grid-column: 1 / -1; }
  .bank-card__row--big .acct { font-size: 21px; }
}

/* ==========================================================
   Admin additions
   ========================================================== */
.tabs-bar { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs-bar button { border: 0; background: none; padding: 11px 18px; font-weight: 500; font-size: 14px; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; color: #4a4044; }
.tabs-bar button.active { color: var(--maroon); border-bottom-color: var(--maroon); }
.split { display: grid; grid-template-columns: 300px 1fr; gap: 18px; align-items: start; }
.state-list { max-height: 640px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.state-list button { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 10px; border: 0; border-top: 1px solid var(--line); background: #fff; padding: 11px 14px; font-size: 14px; text-align: left; }
.state-list button:first-child { border-top: 0; }
.state-list button:hover { background: var(--cream); }
.state-list button.active { background: var(--pink-soft); color: var(--maroon); font-weight: 600; }
.state-list .dot { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.dot--ok { background: #e3f4e6; color: #1b7a33; }
.dot--none { background: #fde4e7; color: #b4102c; }
.dot--off { background: #fff1d6; color: #8a5a00; }
.legend-inline { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12.5px; color: var(--muted); margin: 8px 0 12px; }
.method-row { display: grid; grid-template-columns: 1fr auto auto auto; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.method-row:first-child { border-top: 0; }
.method-row strong { display: block; }
.method-row small { color: var(--muted); }
.method-row .fee { font-weight: 700; color: var(--green); white-space: nowrap; }
.method-row.inactive { opacity: .6; }
.switch { position: relative; display: inline-block; width: 42px; height: 24px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: #cfc6c9; border-radius: 999px; transition: .2s; cursor: pointer; }
.switch span::before { content: ""; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--green-mid); }
.switch input:checked + span::before { transform: translateX(18px); }
.switch input:disabled + span { opacity: .5; cursor: not-allowed; }
.switch input:focus-visible + span { outline: 2px solid var(--maroon); outline-offset: 2px; }

.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.perm-group { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: #fff; }
.perm-group__head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.perm-group__head strong { font-size: 14px; }
.perm-group label { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; padding: 5px 0; cursor: pointer; }
.perm-group input { width: 17px; height: 17px; margin-top: 2px; accent-color: var(--maroon); flex-shrink: 0; }
.perm-group label.is-default::after { content: "default"; font-size: 10px; color: var(--muted); margin-left: auto; border: 1px solid var(--line); border-radius: 999px; padding: 0 6px; height: 18px; line-height: 16px; }
.perm-group label.is-override { color: var(--maroon); font-weight: 500; }
.perm-group label.is-locked { opacity: .55; cursor: not-allowed; }
.role-badge { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 3px 10px; border-radius: 999px; }
.role-badge--super_admin { background: #0f3d22; color: #fff; }
.role-badge--admin { background: #fde4e7; color: var(--maroon); }
.role-badge--editor { background: #e1edff; color: #1f57c3; }
.sticky-save { position: sticky; bottom: 0; background: #fff; border-top: 1px solid var(--line); padding: 14px 0 0; margin-top: 16px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; z-index: 2; }

.receipt-viewer { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #f6f2ef; min-height: 220px; display: grid; place-items: center; }
.receipt-viewer img { max-width: 100%; max-height: 520px; display: block; }
.receipt-viewer iframe { width: 100%; height: 520px; border: 0; background: #fff; }
.verify-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 13.5px; }
.kv span { color: var(--muted); }
.audit-details { font-size: 12px; color: var(--muted); max-width: 380px; word-break: break-word; }
.must-change { background: #fff3cd; border-bottom: 1px solid #f0d58a; padding: 10px 28px; font-size: 13.5px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; }
  .state-list { max-height: 260px; }
  .method-row { grid-template-columns: 1fr auto; }
}

/* Storefront: login + reset */
.auth__forgot { text-align: right; margin-top: -6px; }
.auth__title { font-family: var(--serif); font-weight: normal; font-size: 26px; color: var(--green); margin-bottom: 12px; }

/* Homepage: products by category (set in Admin → Categories) */
.cat-showcase { padding: 0 0 34px; }
.cat-showcase__box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.cat-showcase__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.cat-showcase__title { font-family: var(--sans); font-size: 18px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--green); line-height: 1.3; }
.cat-showcase__sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.cat-showcase__all { flex-shrink: 0; display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; font-size: 13px; font-weight: 500; color: var(--maroon); transition: background .2s, color .2s, border-color .2s; }
.cat-showcase__all:hover { background: var(--maroon); border-color: var(--maroon); color: #fff; }
@media (max-width: 600px) {
  .cat-showcase { padding-bottom: 22px; }
  .cat-showcase__box { padding: 16px 12px; }
  .cat-showcase__title { font-size: 15px; }
  .cat-showcase__all span { display: none; }
  .cat-showcase__all { width: 38px; height: 38px; padding: 0; justify-content: center; }
}
