/* ============================================================
   Components — buttons, forms, chips, pills, receipt, QR, steps.
   Built only from tokens.css variables, so rebranding stays in one file.
   ============================================================ */

/* --- Alerts --- */
.alert {
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    font-size: 14px;
    line-height: 1.5;
    text-align: left;
}
.alert-error {
    color: #f6465d;
    background: rgba(246, 70, 93, 0.12);
    border: 1px solid rgba(246, 70, 93, 0.35);
}

/* --- Forms --- */
form { text-align: left; margin-top: 14px; }
/* Fintech micro-labels: small, uppercase, tracked — reads as a
   professional checkout instead of a plain web form. Scoped to
   direct form labels so currency tiles keep their own styling. */
form > label, .fieldset legend {
    display: block;
    margin: 14px 0 var(--space-2);
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}
.fieldset { border: 0; margin: 0; padding: 0; }
.fieldset legend { padding: 0; }
.optional { font-weight: 400; color: var(--color-text-faint); }

input[type="number"], input[type="text"], input[type="tel"], select {
    width: 100%;
    padding: 11px 14px;
    font-size: var(--font-size-base);
    font-family: inherit;
    border-radius: var(--radius-md);
    border: 1.5px solid var(--color-border-strong);
    background: var(--color-surface);
    color: var(--color-text);
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
textarea {
    width: 100%;
    padding: 11px 14px;
    font-size: var(--font-size-base);
    font-family: inherit;
    border-radius: var(--radius-md);
    border: 1.5px solid var(--color-border-strong);
    background: var(--color-surface);
    color: var(--color-text);
    outline: none;
    resize: vertical;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input[type="color"] {
    width: 56px;
    height: 42px;
    padding: 3px;
    border-radius: var(--radius-md);
    border: 1.5px solid var(--color-border-strong);
    background: var(--color-surface);
    cursor: pointer;
}
/* Dashboard forms: label + control pairs, optionally two per row. */
.field label {
    display: block;
    margin: 14px 0 var(--space-2);
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.form-grid .field { min-width: 0; }
@media (max-width: 640px) {
    .form-grid { grid-template-columns: 1fr; }
}
input:focus, select:focus, textarea:focus {
    border-color: var(--color-brand);
    box-shadow: 0 0 0 4px var(--color-brand-soft);
}
/* Money fields: tabular figures so amounts line up, and no clunky
   browser spinner arrows on the number field. */
.amount-wrap input { font-variant-numeric: tabular-nums; }
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
/* Honeypot: hidden from humans AND assistive tech, visible to bots. */
.hp { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }

.amount-wrap { position: relative; }
.amount-wrap input { padding-right: 64px; font-size: var(--font-size-xl); font-weight: 700; }
.amount-currency {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-faint);
    font-weight: 700;
}

/* --- Quick amount chips --- */
.chips { display: flex; gap: var(--space-2); margin-top: var(--space-2); flex-wrap: wrap; }
.chip {
    flex: 1;
    padding: 8px 0;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    color: var(--color-text);
    background: var(--color-surface-muted);
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.chip:hover { border-color: var(--color-text); }
.chip.active { background: var(--color-brand); color: var(--color-text-inverse); border-color: var(--color-brand); }

/* --- Currency tiles (a real selector grid, not wrapping pills) --- */
.coin-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--space-2); margin-top: 2px; }
.tile input { position: absolute; opacity: 0; pointer-events: none; }
.tile span {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 2px 10px;
    font-size: 13px;
    font-weight: 700;
    color: var(--color-text);
    background: var(--color-surface-muted);
    border: 1.5px solid var(--color-border);
    border-radius: 16px;
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.tile:hover span { transform: translateY(-2px); border-color: var(--color-brand); }
.tile input:checked + span {
    background: var(--color-brand);
    color: var(--color-text-inverse);
    border-color: var(--color-brand);
    box-shadow: 0 8px 20px rgba(240, 185, 11, 0.30);
}
.tile input:focus-visible + span { box-shadow: 0 0 0 4px var(--color-brand-soft); }
.tile .coin { width: 38px; height: 38px; transition: transform 0.2s ease; }
.tile:hover .coin { transform: scale(1.12) rotate(-6deg); }
@keyframes coinPop {
    0% { transform: scale(0.6) rotate(-14deg); }
    60% { transform: scale(1.25) rotate(6deg); }
    100% { transform: scale(1) rotate(0deg); }
}
.tile input:checked + span .coin { animation: coinPop 0.45s ease; }

/* --- Live order summary --- */
.summary {
    margin: 12px 0 0;
    padding: 10px 13px;
    text-align: center;
    font-weight: 500;
    color: var(--color-text-faint);
    background: var(--color-surface-muted);
    border-radius: var(--radius-md);
}
.summary.ready { color: var(--color-text); }
.summary strong { color: var(--color-success); }

/* --- Primary button --- */
.paybtn {
    display: block;
    width: 100%;
    margin-top: 14px;
    padding: 13px;
    font-size: var(--font-size-base);
    font-weight: 700;
    font-family: inherit;
    text-align: center;
    color: var(--color-text-inverse);
    background: var(--color-brand);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    text-decoration: none;
    letter-spacing: 0.01em;
    box-shadow: 0 10px 24px rgba(240, 185, 11, 0.28);
    transition: filter 0.15s ease, transform 0.05s ease, box-shadow 0.15s ease;
    position: relative;
    overflow: hidden;
}
.paybtn:hover { filter: brightness(1.04); box-shadow: 0 12px 28px rgba(240, 185, 11, 0.35); }
.paybtn:active { transform: scale(0.99); }
.paybtn:disabled { opacity: 0.65; cursor: wait; }

.paybtn .btn-text { position: relative; z-index: 1; }
/* Secondary button (e.g. "I've sent the payment"). */
.paybtn-secondary { background: var(--color-surface-muted); border: 1.5px solid var(--color-border); }
.paybtn-secondary:hover { filter: none; border-color: var(--color-text); }

/* --- Orders admin --- */
.mono { font-family: var(--font-mono); font-size: 13px; }
.totals { display: flex; gap: var(--space-2); margin: 14px 0 4px; flex-wrap: wrap; }
.total-box { flex: 1; min-width: 120px; background: var(--color-surface-muted); border-radius: var(--radius-md); padding: 12px 8px; text-align: center; }
.total-box span { display: block; color: var(--color-text-faint); font-size: var(--font-size-xs); font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; }
.total-box strong { display: block; font-size: 22px; margin-top: 2px; }
.filterbar { display: flex; gap: var(--space-2); flex-wrap: wrap; margin: 14px 0; }
.filterbar a { padding: 8px 14px; border-radius: var(--radius-pill); background: var(--color-surface-muted); color: var(--color-text); text-decoration: none; font-size: 14px; font-weight: 600; }
.filterbar a.active { background: var(--color-brand); color: var(--color-text-inverse); }
.admin-actions form { margin: 0; }
.table-wrap { overflow-x: auto; margin: 0 -4px; }
.orders-table { width: 100%; border-collapse: collapse; font-size: 14px; text-align: left; }
.orders-table th { color: var(--color-text-faint); font-size: var(--font-size-xs); text-transform: uppercase; letter-spacing: 0.08em; padding: 8px 10px; border-bottom: 1.5px solid var(--color-border); white-space: nowrap; }
.orders-table td { padding: 10px; border-bottom: 1px solid var(--color-border); vertical-align: middle; }
.orders-table tbody tr:nth-child(even) { background: var(--color-surface-muted); }
.orders-table td form { margin: 0; }
.admin-actions { display: flex; gap: var(--space-2); justify-content: flex-start; margin: 6px 0 0; }
.admin-search { display: flex; gap: var(--space-2); margin: 14px 0 0; }
.admin-search input[type="search"] { flex: 1; }
.mini-btn-link { text-decoration: none; display: inline-block; }
.mini-btn { padding: 6px 12px; font-size: 13px; font-weight: 600; font-family: inherit; background: var(--color-surface); color: var(--color-text); border: 1.5px solid var(--color-border); border-radius: var(--radius-sm); cursor: pointer; white-space: nowrap; }
.mini-btn:hover { border-color: var(--color-text); }
.status-awaiting { color: var(--color-warning); background: var(--color-warning-bg); border-radius: var(--radius-pill); padding: 3px 10px; font-size: var(--font-size-sm); font-weight: 600; white-space: nowrap; }
.status-claimed { color: var(--color-brand); background: color-mix(in srgb, var(--color-brand) 14%, transparent); border-radius: var(--radius-pill); padding: 3px 10px; font-size: var(--font-size-sm); font-weight: 600; white-space: nowrap; }
.status-paid { color: var(--color-success); background: var(--color-success-bg); border-radius: var(--radius-pill); padding: 3px 10px; font-size: var(--font-size-sm); font-weight: 600; white-space: nowrap; }
.status-expired { color: var(--color-danger); background: color-mix(in srgb, var(--color-danger) 14%, transparent); border-radius: var(--radius-pill); padding: 3px 10px; font-size: var(--font-size-sm); font-weight: 600; white-space: nowrap; }
.pay-deadline { border: 1.5px solid var(--color-warning); background: var(--color-warning-bg); border-radius: var(--radius-md); padding: 12px 14px; margin: 16px 0; }

/* --- Result page --- */
@keyframes popIn {
    from { opacity: 0; transform: scale(0.6); }
    to { opacity: 1; transform: scale(1); }
}
.success-badge {
    width: 50px;
    height: 50px;
    margin: 0 auto 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--color-success-bg);
    color: var(--color-success);
    font-size: 26px;
    font-weight: 800;
    animation: popIn 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.amount {
    font-size: var(--font-size-amount);
    font-weight: 800;
    margin: 12px 0 12px;
    letter-spacing: -0.01em;
    animation: fadeUp 0.4s 0.08s ease both;
}
/* Large coin on the result page: 3D flip-in, then a gentle float. */
.coin-hero { display: flex; justify-content: center; margin: 2px 0 0; animation: floatY 4s ease-in-out 0.9s infinite; }
.coin-large { width: 56px; height: 56px; animation: coinFlipIn 0.7s cubic-bezier(0.34, 1.4, 0.64, 1) both; }
@keyframes coinFlipIn {
    from { opacity: 0; transform: rotateY(90deg) scale(0.7); }
    to { opacity: 1; transform: rotateY(0deg) scale(1); }
}
@keyframes floatY {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}
.receipt {
    margin: 4px 0 12px;
    padding: 12px 16px;
    background: var(--color-surface-muted);
    border-radius: var(--radius-md);
    font-size: 14px;
    text-align: left;
}
.receipt div {
    display: flex;
    justify-content: space-between;
    gap: var(--space-3);
    padding: 5px 0;
}
.receipt div + div { border-top: 1px solid var(--color-border); }
.receipt dt { color: var(--color-text-faint); }
.receipt dd { margin: 0; font-weight: 600; text-align: right; word-break: break-word; }
.status-pending {
    color: var(--color-warning);
    background: var(--color-warning-bg);
    border-radius: var(--radius-pill);
    padding: 3px 10px;
    font-size: var(--font-size-sm);
}
.qr {
    width: 200px;
    height: 200px;
    margin: 4px auto 8px;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 14px;
    padding: 10px;
    box-shadow: var(--shadow-qr);
    animation: fadeUp 0.45s 0.12s ease both;
}
.steps {
    text-align: left;
    margin: 12px auto 6px;
    padding-left: 24px;
    color: var(--color-text-muted);
    line-height: 1.65;
    font-size: var(--font-size-base);
}
.steps strong { color: var(--color-text); }
.linkbox { display: flex; gap: var(--space-2); margin-top: 10px; }
.linkbox input { flex: 1; font-size: var(--font-size-sm); }
.linkbox button {
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    background: var(--color-brand);
    color: var(--color-text-inverse);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    white-space: nowrap;
}
.linkbox button:hover { filter: brightness(1.15); }
.copied { color: var(--color-success); font-weight: 600; }
.trust { color: var(--color-text-muted); font-size: var(--font-size-sm); line-height: 1.5; margin-top: 12px; text-align: center; }

@media (max-width: 420px) {
    .qr { width: 200px; height: 200px; }
    /* Phones: the coin grid MUST stay 5-across — small tiles, never stacked. */
    .coin-grid { grid-template-columns: repeat(5, 1fr); gap: 6px; }
    .coin-grid:not(.coin-grid-two) .tile span { padding: 8px 2px 6px; font-size: 10px; gap: 4px; }
    .coin-grid:not(.coin-grid-two) .tile .coin { width: 26px; height: 26px; }
}

/* Short laptop screens: smaller QR so the result page still fits. */
@media (max-height: 720px) and (min-width: 481px) {
    .qr { width: 160px; height: 160px; }
    .amount { font-size: 30px; margin: 8px 0; }
    .steps { line-height: 1.5; }
}

/* Respect users who prefer no motion: instant state changes only. */
@media (prefers-reduced-motion: reduce) {
    .paybtn, .chip, .tile span, input { transition: none; }
    .paybtn::after { display: none; }
    .success-badge, .qr, .amount { animation: none; }
    .coin, .coin-large, .coin-hero { animation: none; transition: none; }
}

/* ============================================================
   Admin dashboard v2 — KPI cards, sales chart, badges, toasts,
   sticky tabs, mobile card tables. Midnight Bazaar theme kept:
   dark surfaces, gold accents, no inline styles anywhere.
   ============================================================ */

/* --- Toasts: server-rendered flash messages, fixed at the top so
       they read on any tab; admin.js dismisses them. --- */
.toast { position: fixed; top: 64px; left: 50%; transform: translateX(-50%); z-index: 100; width: max-content; max-width: min(92vw, 560px); margin: 0; padding: 12px 16px; border-radius: var(--radius-md); font-size: 14px; font-weight: 600; line-height: 1.45; text-align: left; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5); }
.toast-success { color: var(--color-success); background: #12261f; border: 1px solid rgba(14, 203, 129, 0.45); }
.toast-error { color: #f6465d; background: #2b1414; border: 1px solid rgba(246, 70, 93, 0.45); }
.toast-close { float: right; margin-left: 12px; padding: 0 2px; background: none; border: none; color: inherit; font-size: 18px; line-height: 1; cursor: pointer; }

/* --- KPI cards --- */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 14px 0 4px; }
.kpi-card { background: var(--color-surface-muted); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 14px 16px; }
.kpi-label { display: block; color: var(--color-text-faint); font-size: var(--font-size-xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; }
.kpi-value { display: block; font-size: 26px; font-weight: 800; margin-top: 4px; }
.kpi-sub { display: block; color: var(--color-text-muted); font-size: var(--font-size-sm); margin-top: 2px; }
.kpi-gold .kpi-value { color: var(--color-brand); }
.kpi-warn .kpi-value { color: var(--color-warning); }
@media (max-width: 820px) {
    .kpi-grid { grid-template-columns: repeat(2, 1fr); }
}

/* --- Sales chart (server-rendered SVG, no JS needed) --- */
.chart-wrap { background: var(--color-surface-muted); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 12px; margin: 12px 0; }
.sales-chart { width: 100%; height: auto; display: block; }
.sales-chart rect { fill: var(--color-brand); }
.sales-chart text { fill: var(--color-text-muted); font-size: 10px; font-family: inherit; }
.sales-chart line { stroke: var(--color-border); stroke-width: 1; }

/* --- Top products --- */
.top-list { margin: 12px 0; padding: 0; list-style: none; }
.top-list li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--color-border); }
.top-meta { color: var(--color-text-muted); font-size: var(--font-size-sm); white-space: nowrap; }

/* --- Alerts + empty states --- */
.alert-box { padding: 14px 16px; border-radius: var(--radius-md); margin: 12px 0; }
.alert-box-warning { background: var(--color-warning-bg); border: 1px solid rgba(251, 191, 36, 0.4); }
.lowstock-list { margin: 10px 0 0; padding: 0; list-style: none; }
.lowstock-list li { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 6px 0; }
.lowstock-list li + li { border-top: 1px solid rgba(251, 191, 36, 0.2); }
.empty-state { text-align: center; color: var(--color-text-muted); background: var(--color-surface-muted); border: 1px dashed var(--color-border-strong); border-radius: var(--radius-md); padding: 28px 16px; margin: 16px 0; line-height: 1.6; }

/* --- Stock + tag badges --- */
.stock-badge, .tag-badge { border-radius: var(--radius-pill); padding: 3px 10px; font-size: var(--font-size-sm); font-weight: 600; white-space: nowrap; }
.stock-ok { color: var(--color-success); background: var(--color-success-bg); }
.stock-low { color: var(--color-warning); background: var(--color-warning-bg); }
.stock-out { color: var(--color-danger); background: rgba(246, 70, 93, 0.14); }
.tag-badge { color: var(--color-brand); background: var(--color-brand-soft); }

/* --- Product list: covers, filters, row actions --- */
.admin-filters { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0; align-items: center; }
.admin-filters input[type="search"] { flex: 1 1 200px; }
.admin-filters select { flex: 1 1 150px; }
.cover-thumb svg { width: 72px; height: auto; display: block; border-radius: 8px; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.row-actions form { margin: 0; }
.stock-form { display: flex; gap: 6px; align-items: center; margin-top: 8px; }
.stock-form input[type="number"] { width: 76px; padding: 7px 8px; }

/* --- Product cover editor (Products → Edit) --- */
.cover-editor { margin: 18px 0 6px; }
.cover-editor legend { font-weight: 700; margin-bottom: 10px; }
.cover-editor-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 20px; align-items: start; }
.cover-modes { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.cover-modes label { display: flex; gap: 7px; align-items: center; border: 1.5px solid var(--color-border-strong); border-radius: var(--radius-pill); padding: 8px 14px; font-weight: 600; cursor: pointer; }
.cover-modes label:has(input:checked) { border-color: var(--color-brand); color: var(--color-brand); background: var(--color-brand-soft); }
.svg-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; line-height: 1.5; white-space: pre; }
.cover-preview-wrap { min-width: 0; }
.cover-preview-label { display: block; font-weight: 700; font-size: var(--font-size-sm); margin-bottom: 8px; color: var(--color-text-muted); }
.cover-preview { border: 1px solid var(--color-border); border-radius: 14px; overflow: hidden; background: var(--color-surface); }
.cover-preview svg { width: 100%; height: auto; display: block; }
@media (max-width: 720px) {
    .cover-editor-grid { grid-template-columns: 1fr; }
}

/* --- Status history --- */
.history { list-style: none; margin: 12px 0; padding: 0; }
.history li { display: flex; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--color-border); }
.history time { margin-left: auto; color: var(--color-text-faint); font-size: var(--font-size-sm); white-space: nowrap; }

/* --- Buttons + inputs: clearer, roomier, consistent.
       Search, date, and password inputs were unstyled before. --- */
.mini-btn { padding: 8px 14px; font-size: 14px; }
.mini-btn:disabled { opacity: 0.6; cursor: wait; }
form.is-loading button[type="submit"] { opacity: 0.65; cursor: wait; }
input[type="search"], input[type="date"], input[type="password"] { width: 100%; padding: 11px 14px; font-size: var(--font-size-base); font-family: inherit; border-radius: var(--radius-md); border: 1.5px solid var(--color-border-strong); background: var(--color-surface); color: var(--color-text); outline: none; transition: border-color 0.15s ease, box-shadow 0.15s ease; }
input[type="search"]:focus, input[type="date"]:focus, input[type="password"]:focus { border-color: var(--color-brand); box-shadow: 0 0 0 4px var(--color-brand-soft); }
.admin-search input[type="date"] { flex: 0 1 150px; }
.adminpanel .hint { color: var(--color-text-muted); }

/* --- Mobile: tables become readable cards --- */
@media (max-width: 640px) {
    .table-wrap { overflow-x: visible; margin: 0; }
    .orders-table, .orders-table tbody, .orders-table tr, .orders-table td { display: block; width: 100%; }
    .orders-table thead { display: none; }
    .orders-table tr { border: 1px solid var(--color-border); border-radius: var(--radius-md); margin-bottom: 12px; padding: 6px 12px; background: var(--color-surface); }
    .orders-table tbody tr:nth-child(even) { background: var(--color-surface); }
    .orders-table td { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--color-border); padding: 9px 0; text-align: right; }
    .orders-table td:last-child { border-bottom: none; }
    .orders-table td::before { content: attr(data-label); color: var(--color-text-faint); font-size: var(--font-size-xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; text-align: left; flex-shrink: 0; }
    .orders-table td .row-actions { justify-content: flex-end; }
    .admin-search { flex-wrap: wrap; }
    .admin-search input[type="date"] { flex: 1 1 140px; }
}

/* ============================================================
   Midnight Bazaar 2.0 — components layer (2026-11-01):
   gradient primary buttons with lift, glass inputs with a
   warmer focus glow, gold payment amount, richer QR stage.
   ============================================================ */

/* Primary button: the diagonal melt + a gentle lift on hover.
   The shine sweep (::after) from the base layer still applies. */
.paybtn {
    background: var(--color-brand-grad-135);
    box-shadow: var(--glow-btn);
    transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) ease, filter 0.15s ease;
}
@media (hover: hover) {
    .paybtn:hover { transform: translateY(-1px); box-shadow: var(--glow-btn-hover); filter: none; }
}
.paybtn-secondary {
    background: var(--color-surface-muted);
    border-color: var(--color-border-strong);
    color: var(--color-text);
    box-shadow: none;
}
@media (hover: hover) {
    .paybtn-secondary:hover { transform: none; box-shadow: none; border-color: var(--color-gold-line); }
}

/* Inputs: faint glass tint; focus adds a soft gold halo under
   the existing ring. Applies to the dashboard input set too. */
input[type="number"], input[type="text"], input[type="search"], input[type="date"], input[type="password"], select, textarea {
    background: var(--glass-tint), var(--color-surface);
}
input:focus, select:focus, textarea:focus {
    box-shadow: 0 0 0 4px var(--color-brand-soft), 0 6px 18px rgba(240, 185, 11, 0.10);
}

/* Selected currency tile + active quick chip: gradient, not flat. */
.tile input:checked + span { background: var(--color-brand-grad-135); }
.chip.active { background: var(--color-brand-grad-135); border-color: transparent; }

/* The payment amount is the hero number — gold gradient text. */
.amount {
    background: var(--color-brand-grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* QR stage: gold-tinted frame, deeper shadow. */
.qr { border-color: rgba(240, 185, 11, 0.35); box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(240, 185, 11, 0.10); }

/* Receipt + summary: glass tint and a defined edge. */
.receipt { background: var(--glass-tint), var(--color-surface-muted); border: 1px solid var(--color-border); }
.success-badge { box-shadow: 0 0 0 6px rgba(14, 203, 129, 0.08), 0 8px 20px rgba(0, 0, 0, 0.35); }

/* Admin tables: a whisper of hover feedback on desktop rows. */
@media (hover: hover) {
    .orders-table tbody tr:hover { background: rgba(255, 255, 255, 0.03); }
}

/* Motion off means off — including every 2.0 transition. */
@media (prefers-reduced-motion: reduce) {
    .paybtn { transition: none; }
    .paybtn:hover { transform: none; }
}

/* ============================================================
   IVORY LIGHT — components layer: state colors re-graded for
   light backgrounds, softer shadows, gold-dark text accents.
   ============================================================ */
.alert-error { color: #f6465d; background: rgba(220, 38, 38, 0.07); border-color: rgba(220, 38, 38, 0.30); }
.toast-success { color: #047857; background: #ecfdf5; border-color: rgba(4, 120, 87, 0.35); }
.toast-error { color: #f6465d; background: #fef2f2; border-color: rgba(220, 38, 38, 0.35); }
.status-claimed { color: #f0b90b; background: rgba(240, 185, 11, 0.13); }
.status-expired { background: rgba(220, 38, 38, 0.09); }
.stock-out { background: rgba(220, 38, 38, 0.09); }
.tag-badge { color: var(--color-brand-text); }
.kpi-gold .kpi-value { color: var(--color-brand-text); }

.qr { box-shadow: 0 14px 30px rgba(0, 0, 0, 0.16), 0 0 0 1px rgba(240, 185, 11, 0.12); }
.success-badge { box-shadow: 0 0 0 6px rgba(4, 120, 87, 0.08), 0 8px 20px rgba(0, 0, 0, 0.15); }

@media (hover: hover) {
    .orders-table tbody tr:hover { background: rgba(28, 25, 23, 0.035); }
}

.toast { box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22); }


/* ============================================================
   ADMIN BULK EDIT (appended layer)
   Selection bar above the products table + row checkboxes.
   Delete/import keep the admin's warm light surfaces.
   ============================================================ */
.bulk-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 0 0 14px;
    padding: 10px 12px;
    background: var(--color-surface-muted);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
}
.bulk-bar.has-selection { border-color: var(--color-gold-line); background: var(--color-brand-soft); }
.bulk-count { font-weight: 700; font-size: 0.88rem; color: var(--color-text); white-space: nowrap; }
.bulk-bar select,
.bulk-bar input[type="text"],
.bulk-bar input[type="number"] {
    min-height: 38px;
    padding: 7px 10px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-text);
    font: inherit;
    font-size: 0.9rem;
}
.bulk-bar input[type="text"], .bulk-bar input[type="number"] { width: 190px; max-width: 60vw; }
.bulk-bar .mini-btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.orders-table input.row-check,
.orders-table #selectAll,
#selectAll { width: 19px; height: 19px; accent-color: var(--color-brand); cursor: pointer; }

/* Phase 2 order statuses (appended): delivered reads as a calm
   success-blue, cancelled as a quiet muted red-grey. */
.status-delivered { color: #f0b90b; background: rgba(240, 185, 11, 0.12); border-radius: var(--radius-pill); padding: 3px 10px; font-size: var(--font-size-sm); font-weight: 600; white-space: nowrap; }
.status-cancelled { color: #707a8a; background: rgba(120, 113, 108, 0.14); border-radius: var(--radius-pill); padding: 3px 10px; font-size: var(--font-size-sm); font-weight: 600; white-space: nowrap; }

/* ============================================================
   LEDGER BAZAAR — components layer (2026-11-06): buttons lose
   the gold glow (print-flat), and the big payment amount is
   ledger ink with tabular figures, not gradient text.
   ============================================================ */
.paybtn { box-shadow: var(--glow-btn); }
.paybtn:hover { box-shadow: var(--glow-btn-hover); }
.amount {
    background: none;
    -webkit-background-clip: initial;
    background-clip: initial;
    -webkit-text-fill-color: currentColor;
    color: var(--color-text);
    font-variant-numeric: tabular-nums;
}

/* ============================================================
   ONE BUTTON SYSTEM (2026-11-07): every button in the store
   now shares the same hand — 650 weight, a breath of tracking,
   the same 12px radius on full-size actions and 8px on small
   controls, the same press (1px settle on :active), the same
   disabled fade, and smooth 150ms state changes. Primary is
   the merchant gold (deepening on hover), secondary is a
   clean white with an ink border, small controls wear the
   Polaris secondary treatment, and the WhatsApp action gets
   its proper green.
   ============================================================ */
.paybtn, .add-btn, .btn-ghost, .mini-btn, .paybtn-secondary, .paybtn-whatsapp {
    font-weight: 650;
    letter-spacing: 0.01em;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.08s ease;
}
.paybtn { border-radius: var(--radius-md); }
.paybtn:hover { background: #d19407; filter: none; }
.paybtn:active, .add-btn:active, .btn-ghost:active, .mini-btn:active, .paybtn-secondary:active { transform: translateY(1px); }
.paybtn:disabled, .add-btn:disabled, .paybtn-secondary:disabled { opacity: 0.45; box-shadow: none; }
.add-btn { border-radius: var(--radius-md); padding: 11px; }
.paybtn-secondary {
    background: #ffffff;
    border: 1.5px solid var(--color-border-strong);
    color: var(--color-text);
    border-radius: var(--radius-md);
    box-shadow: none;
}
.paybtn-secondary:hover { border-color: var(--color-text); background: #ffffff; filter: none; }
.paybtn-whatsapp { background: #0f7a44; color: #ffffff; border-radius: var(--radius-md); }
.paybtn-whatsapp:hover { background: #0b6336; filter: none; }
.mini-btn {
    background: #ffffff;
    border: 1px solid #2b3139;
    border-radius: 8px;
    color: var(--color-text);
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
    padding: 7px 13px;
    font-size: 13.5px;
}
.mini-btn:hover { background: var(--color-brand-grad); border-color: transparent; filter: brightness(1.07); }
/* The label inside a primary button must wear the button's own ink
   (--color-text-inverse, dark slate on the amber gradient). It used
   to take --color-brand-text (light amber #f0b90b) — gold text on a
   gold button, invisible. .btn-text only exists inside .paybtn. */
.paybtn .btn-text { color: inherit; font-weight: 600; }
.tile { transition: border-color 0.15s ease, box-shadow 0.15s ease; }
.tile:hover { border-color: var(--color-border-strong); }

/* ============================================================
   QUALITY PASS (2026-11-08) — the shine sweep is retired for
   good: it survived every theme since Midnight Bazaar on the
   primary buttons (and, through them, on the admin's black
   Polaris buttons). The selected currency tile at checkout
   also gives up the last gold glow in the store.
   ============================================================ */
.paybtn::after { display: none; }
.tile input:checked + span { box-shadow: none; }

/* ============================================================
   MIDNIGHT FINTECH — controls: amber-gradient primaries,
   dark glass panels and inputs, mono numbers, tinted states.
   ============================================================ */
.mono { font-family: "JetBrains Mono", ui-monospace, monospace; }
.paybtn {
    background: var(--color-brand-grad);
    color: var(--color-text-inverse);
    border: 1px solid rgba(251, 191, 36, 0.45);
    box-shadow: var(--glow-btn);
    font-weight: 700;
}
.paybtn:hover { filter: brightness(1.07); transform: translateY(-1px); box-shadow: var(--glow-btn-hover); }
.paybtn:active { transform: translateY(0); }
.paybtn-whatsapp {
    background: linear-gradient(135deg, #0ecb81, #0ecb81 60%, #0ecb81);
    color: #03130b;
    border-color: rgba(14, 203, 129, 0.45);
    box-shadow: 0 10px 26px -10px rgba(14, 203, 129, 0.55);
}
input, select, textarea {
    background: #0b0e11;
    border-color: rgba(255, 255, 255, 0.13);
    color: var(--color-text);
    color-scheme: dark;
}
input::placeholder, textarea::placeholder { color: #707a8a; }
input:focus, select:focus, textarea:focus {
    border-color: rgba(240, 185, 11, 0.65);
    box-shadow: 0 0 0 3px rgba(240, 185, 11, 0.18);
    outline: none;
}
.card, .panel, .total-box, .empty-state {
    background: linear-gradient(145deg, rgba(17, 24, 39, 0.85), rgba(13, 19, 34, 0.72));
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--color-text);
}
.alert-error { background: rgba(246, 70, 93, 0.10); border-color: rgba(246, 70, 93, 0.32); color: #f6465d; }
.alert-success { background: rgba(14, 203, 129, 0.10); border-color: rgba(14, 203, 129, 0.32); color: #0ecb81; }
.tile span { background: rgba(255, 255, 255, 0.04); border-color: rgba(255, 255, 255, 0.12); color: var(--color-text); }
.tile input:checked + span {
    background: rgba(240, 185, 11, 0.14);
    border-color: var(--color-gold-line);
    color: #f0b90b;
    box-shadow: 0 0 0 1px var(--color-gold-line), 0 10px 22px -12px rgba(240, 185, 11, 0.55);
}
.orders-table th { color: var(--color-text-faint); }
.orders-table td { border-color: rgba(255, 255, 255, 0.07); }
.receipt dt { color: var(--color-text-faint); }
.receipt dd { color: var(--color-text); }
.filterbar a { background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.09); color: var(--color-text-muted); }
.filterbar a.active { background: var(--color-brand-grad); color: var(--color-text-inverse); border-color: transparent; }
.mini-btn { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.13); color: var(--color-text); }
.mini-btn:hover { border-color: var(--color-gold-line); color: #ffffff; }
.mini-btn-link { color: var(--color-brand-text); }
.toast {
    background: rgba(13, 19, 34, 0.94);
    border: 1px solid var(--color-gold-line);
    color: var(--color-text);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.success-badge {
    background: linear-gradient(135deg, #0ecb81, #0ecb81);
    color: #03130b;
    box-shadow: 0 10px 26px -8px rgba(14, 203, 129, 0.55);
}
.status-pending { color: #f0b90b; background: rgba(240, 185, 11, 0.12); }
.status-paid, .status-delivered { color: #0ecb81; background: rgba(14, 203, 129, 0.12); }
.status-expired, .status-cancelled { color: #f6465d; background: rgba(246, 70, 93, 0.10); }
.steps { color: var(--color-text-muted); }
.steps strong { color: var(--color-text); }
.linkbox { background: rgba(255, 255, 255, 0.04); border-color: rgba(255, 255, 255, 0.12); }
.pay-deadline [data-countdown] { font-family: "JetBrains Mono", monospace; color: #f0b90b; }
.bulk-bar { background: rgba(255, 255, 255, 0.04); }

/* ============================================================
   CONTRAST PASS (2026-11-09): two hover states and two order
   statuses kept light-theme paint. The WhatsApp button's old
   hover painted deep green behind its near-black label
   (invisible); the primary's old hover dropped the gradient
   for a flat gold. Awaiting/Claimed pills kept amber-700
   text on a dark tint (3.4:1) — now the same readable amber
   as Pending.
   ============================================================ */
.paybtn:hover { background: var(--color-brand-grad); }
.paybtn-whatsapp:hover {
    background: linear-gradient(135deg, #0ecb81, #0ecb81 60%, #0ecb81);
    filter: brightness(1.07);
}
.status-claimed, .status-awaiting { color: #f0b90b; background: rgba(240, 185, 11, 0.14); }

/* ============================================================
   SWISS SLATE — components (2026-11-10 theme rebuild): flat
   slate surfaces with visible #2b3139 borders, amber primary,
   sharp shadows, 220ms hovers. Status pills, alerts, inputs,
   tables and tiles all re-declared from the new tokens; the
   contrast-pass pins are restated here so nothing regresses.
   ============================================================ */
.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-card-soft);
}
.paybtn {
    background: var(--color-brand-grad);
    color: var(--color-text-inverse);
    box-shadow: var(--glow-btn);
    transition: filter var(--dur) ease, box-shadow var(--dur) ease, transform var(--dur) ease, background var(--dur) ease;
}
.paybtn:hover { background: var(--color-brand-grad); filter: brightness(1.07); box-shadow: var(--glow-btn-hover); }
.paybtn-whatsapp {
    background: linear-gradient(135deg, #0ecb81, #0ecb81 60%, #0ecb81);
    color: #04150c;
    box-shadow: 0 8px 20px -8px rgba(14, 203, 129, 0.5);
}
.paybtn-whatsapp:hover {
    background: linear-gradient(135deg, #0ecb81, #0ecb81 60%, #0ecb81);
    filter: brightness(1.07);
}
.btn-ghost {
    background: rgba(148, 163, 184, 0.06);
    border: 1px solid var(--color-border-strong);
    color: var(--color-text);
}
.btn-ghost:hover { border-color: var(--color-brand); color: var(--color-brand-text); background: rgba(240, 185, 11, 0.07); }
.alert { border: 1px solid var(--color-border); background: var(--color-surface); color: var(--color-text); }
.alert-success { background: var(--color-success-bg); border-color: rgba(14, 203, 129, 0.4); color: #0ecb81; }
.alert-error { background: rgba(239, 68, 68, 0.12); border-color: rgba(246, 70, 93, 0.4); color: #fecaca; }
.alert-info { background: rgba(112, 122, 138, 0.10); border-color: rgba(112, 122, 138, 0.35); color: var(--color-text); }
label { color: var(--color-text); }
.optional, .hint { color: var(--color-text-muted); }
input[type="text"], input[type="email"], input[type="password"], input[type="number"],
input[type="search"], input[type="url"], input[type="tel"], select, textarea {
    background: #0b0e11;
    border: 1px solid var(--color-border);
    color: var(--color-text);
}
input::placeholder, textarea::placeholder { color: #707a8a; }
input:focus, select:focus, textarea:focus {
    border-color: var(--color-brand);
    box-shadow: 0 0 0 3px rgba(240, 185, 11, 0.18);
    outline: none;
}
.form-error { color: #f6465d; }
.tile span {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    color: var(--color-text-muted);
}
.tile input:checked + span {
    background: var(--color-brand-grad);
    border-color: transparent;
    color: var(--color-text-inverse);
    box-shadow: var(--glow-btn);
}
.chip { background: var(--color-surface); border: 1px solid var(--color-border); color: var(--color-text-muted); }
.chip.active { background: var(--color-brand-grad); color: var(--color-text-inverse); border-color: transparent; }
.orders-table { background: var(--color-surface); border: 1px solid var(--color-border); }
.orders-table th {
    background: var(--color-surface-muted);
    color: var(--color-text-muted);
    border-bottom: 1px solid var(--color-border);
}
.orders-table td { border-bottom: 1px solid var(--color-border); color: var(--color-text); }
.orders-table tbody tr:hover { background: rgba(148, 163, 184, 0.05); }
.status-pending, .status-claimed, .status-awaiting { color: #f0b90b; background: rgba(240, 185, 11, 0.14); }
.status-paid { color: #0ecb81; background: rgba(14, 203, 129, 0.14); }
.status-delivered { color: #0ecb81; background: rgba(14, 203, 129, 0.14); }
.status-expired { color: #848e9c; background: rgba(148, 163, 184, 0.12); }
.status-cancelled { color: #f6465d; background: rgba(239, 68, 68, 0.12); }
.linkbox { background: #0b0e11; border: 1px solid var(--color-border); color: var(--color-text); }
.linkbox a { color: var(--color-brand-text); }
.mini-btn { background: var(--color-brand-grad); color: var(--color-text-inverse); }
.mini-btn-link { color: var(--color-brand-text); }
.toast { background: var(--color-surface-muted); border: 1px solid var(--color-border-strong); color: var(--color-text); box-shadow: var(--shadow-card); }
.badge { background: var(--color-surface-muted); color: var(--color-text-muted); border: 1px solid var(--color-border); }

/* ============================================================
   UI/UX REVIEW FIXES (owner's order, 2026-11-12): payment
   method tiles carry a short bold label plus one quiet line
   now ("Binance Pay" / "Pay inside your Binance app — free,
   instant"), instead of one long sentence wrapping to three
   cramped lines on a phone.
   ============================================================ */
.tile span { text-align: center; }
.tile span strong { font-size: 14px; }
.tile span small { font-size: 13px; font-weight: 500; line-height: 1.35; opacity: 0.85; }

/* --- Payment-received popup (pay pages only; the markup
   is emitted by footer.php when the pay view model is in
   scope, and result.js opens it the moment its poller
   verifies the payment — the BEpusdt-style success moment
   the owner asked for, 2026-11-12). The check ring and
   tick draw themselves with stroke animations; no
   particles, per the owner's standing design rule. --- */
.pay-pop {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(2, 6, 17, 0.66);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    transition: opacity 0.2s ease;
}
.pay-pop[hidden] { display: none; }
.pay-pop.pay-pop-open { opacity: 1; }
.pay-pop-card {
    position: relative;
    width: 100%;
    max-width: 400px;
    background: var(--color-surface);
    border: 1px solid var(--color-border-strong);
    border-radius: 20px;
    padding: 32px 26px 26px;
    text-align: center;
    box-shadow: 0 24px 60px -18px rgba(0, 0, 0, 0.7);
    transform: scale(0.94) translateY(8px);
    transition: transform 0.22s ease;
}
.pay-pop.pay-pop-open .pay-pop-card { transform: none; }
.pay-pop-close {
    position: absolute;
    top: 8px;
    right: 10px;
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 8px;
    background: none;
    color: var(--color-text-muted);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}
.pay-pop-close:hover { background: var(--color-surface-muted); color: var(--color-text); }
.pay-pop-check { display: block; width: 78px; height: 78px; margin: 0 auto 14px; }
.pay-pop-check circle {
    fill: var(--color-success-bg);
    stroke: var(--color-success);
    stroke-width: 2.5;
    stroke-dasharray: 151;
    stroke-dashoffset: 151;
    animation: payPopRing 0.6s ease forwards;
}
.pay-pop-check path {
    fill: none;
    stroke: var(--color-success);
    stroke-width: 3.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 40;
    stroke-dashoffset: 40;
    animation: payPopTick 0.35s 0.5s ease forwards;
}
@keyframes payPopRing { to { stroke-dashoffset: 0; } }
@keyframes payPopTick { to { stroke-dashoffset: 0; } }
.pay-pop-card h2 { font-size: 22px; margin: 0 0 4px; }
.pay-pop-amount {
    font-family: "JetBrains Mono", monospace;
    font-size: 26px;
    font-weight: 700;
    color: var(--color-success);
    margin: 2px 0 8px;
}
.pay-pop-sub { color: var(--color-text-muted); font-size: 14.5px; line-height: 1.55; margin: 0 0 20px; }
.pay-pop-sub[hidden] { display: none; }
.pay-pop-actions { display: flex; flex-direction: column; gap: 10px; }
.pay-pop-actions .paybtn, .pay-pop-actions .mini-btn { display: block; width: 100%; text-align: center; }
@media (prefers-reduced-motion: reduce) {
    .pay-pop, .pay-pop-card { transition: none; }
    .pay-pop-check circle, .pay-pop-check path { animation: none; stroke-dashoffset: 0; }
}

/* ============================================================
   FINTECH CLEAN DARK — unified pay card (2026-11-12): all
   three payment rails share one focused card; the QR sits
   in a white frame so any wallet app can scan it reliably.
   ============================================================ */
.pay-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 22px 20px;
    box-shadow: var(--shadow-card-soft);
}
/* Payment-method switcher (2026-11-13): two tabs at the top
   of the pay card — same order, same amount, either rail.
   The active tab takes the primary-button pairing (brand
   background, inverse text) so its state reads at a glance. */
.pay-switch {
    display: flex;
    gap: 4px;
    padding: 4px;
    margin-bottom: 10px;
    background: var(--color-surface-muted);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
}
.pay-switch-tab {
    flex: 1;
    padding: 10px 8px;
    text-align: center;
    font-weight: 600;
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    text-decoration: none;
    border-radius: var(--radius-sm);
}
.pay-switch-tab:hover { color: var(--color-text); }
.pay-switch-tab.is-active {
    background: var(--color-brand);
    color: var(--color-text-inverse);
}
.pay-switch-note {
    text-align: center;
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
    margin: 0 0 14px;
}
.qr-frame {
    display: inline-block;
    background: #ffffff;
    border-radius: var(--radius-md);
    padding: 10px;
    box-shadow: var(--shadow-qr);
    line-height: 0;
}
.qr-frame .qr { display: block; }

/* Status pills + toasts — SINGLE definition (2026-11-24,
   Batch 2 of the admin audit). These statuses were defined
   five times across this file with conflicting values, so
   cascade order decided whether "delivered" was gold or
   emerald and "expired" red or grey; the accent themes could
   also recolour them through --color-brand. This block is
   the only definition: fixed semantic tokens the accents
   never touch. Meaning: paid/delivered = success, awaiting/
   claimed/pending = in-flight gold, expired = muted (dead,
   no action), cancelled = danger. Toasts get the same
   treatment — the blanket .toast rule above flattened
   success and error into one neutral box. */
.status-awaiting, .status-claimed, .status-pending { color: var(--color-warning); background: var(--color-warning-bg); border-radius: var(--radius-pill); padding: 3px 10px; font-size: var(--font-size-sm); font-weight: 600; white-space: nowrap; }
.status-paid, .status-delivered { color: var(--color-success); background: var(--color-success-bg); border-radius: var(--radius-pill); padding: 3px 10px; font-size: var(--font-size-sm); font-weight: 600; white-space: nowrap; }
.status-expired { color: var(--color-text-muted); background: rgba(148, 163, 184, 0.12); border-radius: var(--radius-pill); padding: 3px 10px; font-size: var(--font-size-sm); font-weight: 600; white-space: nowrap; }
.status-cancelled { color: var(--color-danger); background: rgba(246, 70, 93, 0.12); border-radius: var(--radius-pill); padding: 3px 10px; font-size: var(--font-size-sm); font-weight: 600; white-space: nowrap; }
.toast-success { color: var(--color-success); background: #12261f; border: 1px solid rgba(14, 203, 129, 0.45); }
.toast-error { color: var(--color-danger); background: #2b1414; border: 1px solid rgba(246, 70, 93, 0.45); }

/* Interface-quality pass (jakubkrehel/skills, 2026-11-26). */
input, select, textarea { border-color: var(--color-control-border); }
input:hover, select:hover, textarea:hover { border-color: var(--color-control-border-hover); }
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--color-danger); }
.field-error { margin: 6px 0 0; color: var(--color-danger); font-size: 14px; line-height: 1.45; }
.paybtn:not(:disabled):active, .add-btn:not(:disabled):active, .btn-ghost:not(:disabled):active, .mini-btn:not(:disabled):active, .paybtn-secondary:not(:disabled):active { transform: scale(0.96); transition: transform 150ms ease-out; }
.pay-deadline [data-countdown], .product-price, .order-total, .cart-count, .shop-count { font-variant-numeric: tabular-nums; }
.pay-pop, .pay-pop-card { overscroll-behavior: contain; }
@media (max-width: 760px) {
    input, select, textarea { font-size: 16px; }
}

/* Main-website mistake fixes 1-36 (2026-11-26). */
input:focus, select:focus, textarea:focus, .shop-search input[type="search"]:focus { border-color: var(--color-brand); box-shadow: 0 0 0 4px var(--color-brand-soft); outline: none; }
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--color-danger) !important; box-shadow: 0 0 0 3px rgba(246, 70, 93, 0.18); }

/* ============================================================
   Premium Fintech Polish (2026-11-26): unified 44px controls,
   high-contrast focus rings, tactile button micro-interactions,
   elevated payment card, and mobile-safe receipt/linkbox layout.
   ============================================================ */

/* Unified form controls */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="search"],
input[type="number"],
input[type="url"],
input[type="password"],
input[type="date"],
select,
textarea {
    background-color: var(--color-bg);
    color: var(--color-text);
    border: 1px solid var(--color-control-border);
    border-radius: var(--radius-sm);
    transition: border-color var(--dur) var(--ease-out),
                box-shadow var(--dur) var(--ease-out),
                background-color var(--dur) var(--ease-out);
}
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="search"],
input[type="number"],
input[type="url"],
input[type="password"],
input[type="date"],
select {
    min-height: var(--control-h);
}
input:hover:not(:disabled),
select:hover:not(:disabled),
textarea:hover:not(:disabled) {
    border-color: var(--color-control-border-hover);
}
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--color-brand);
    box-shadow: var(--focus-ring);
}
input[aria-invalid="true"]:focus,
select[aria-invalid="true"]:focus,
textarea[aria-invalid="true"]:focus {
    border-color: var(--color-danger) !important;
    box-shadow: 0 0 0 3px rgba(246, 70, 93, 0.32) !important;
}

/* Primary & secondary buttons: aligned height, smooth hover & focus */
.paybtn,
.mini-btn,
.copy-chip,
.linkbox button {
    transition: background-color var(--dur) var(--ease-out),
                border-color var(--dur) var(--ease-out),
                color var(--dur) var(--ease-out),
                box-shadow var(--dur) var(--ease-out),
                transform var(--dur) var(--ease-out);
}
.paybtn {
    min-height: 46px;
    border-radius: var(--radius-md);
    font-weight: 700;
    letter-spacing: -0.005em;
}
.paybtn:not(.paybtn-secondary):not(.paybtn-whatsapp):hover:not(:disabled) {
    background: var(--color-brand-hover);
    box-shadow: var(--glow-btn-hover);
}
.paybtn-secondary {
    background: var(--color-surface-muted);
    color: var(--color-text);
    border: 1px solid var(--color-control-border);
    box-shadow: none;
}
.paybtn-secondary:hover:not(:disabled) {
    background: var(--color-surface-elevated);
    border-color: var(--color-brand);
    color: #ffffff;
}
.paybtn:focus-visible,
.mini-btn:focus-visible,
.copy-chip:focus-visible,
.linkbox button:focus-visible,
.pay-switch-tab:focus-visible,
.pay-pop-close:focus-visible {
    outline: 2px solid var(--color-brand);
    outline-offset: 2px;
    box-shadow: var(--focus-ring);
}
@media (hover: hover) {
    .paybtn:hover:not(:disabled),
    .mini-btn:hover:not(:disabled),
    .linkbox button:hover:not(:disabled) {
        transform: translateY(-1px);
    }
}
.paybtn:active:not(:disabled),
.mini-btn:active:not(:disabled),
.copy-chip:active:not(:disabled),
.linkbox button:active:not(:disabled) {
    transform: scale(0.985);
}

/* Elevated fintech payment card */
.pay-card {
    background: linear-gradient(180deg, #1b1e26 0%, #15181f 100%);
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-lg);
    padding: 28px 26px;
    box-shadow: var(--shadow-card), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.pay-card h1 {
    font-size: 24px;
    letter-spacing: -0.02em;
}
.pay-card .amount {
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}

/* Segmented payment rail switcher */
.pay-switch {
    background: var(--color-bg);
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-md);
    padding: 4px;
    gap: 6px;
}
.pay-switch-tab {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 8px;
    transition: background-color var(--dur) var(--ease-out),
                color var(--dur) var(--ease-out),
                box-shadow var(--dur) var(--ease-out);
}
.pay-switch-tab:not(.is-active):hover {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
}
.pay-switch-tab.is-active {
    background: var(--color-brand);
    color: var(--color-text-inverse);
    font-weight: 700;
    box-shadow: 0 2px 10px -2px rgba(240, 185, 11, 0.45);
}

/* Receipt table: crisp separation and monospace alignment */
.receipt {
    background: rgba(11, 14, 17, 0.65);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 4px 16px;
}
.receipt div {
    padding: 11px 0;
    gap: 14px;
    align-items: baseline;
}
.receipt dt {
    color: var(--color-text-muted);
    font-size: 13.5px;
    flex-shrink: 0;
}
.receipt dd {
    color: var(--color-text);
    font-size: 14px;
    font-variant-numeric: tabular-nums;
}
.receipt dd.mono {
    font-family: var(--font-mono);
    font-size: 13px;
    word-break: break-all;
}

/* Linkbox: perfectly aligned input + copy button */
.linkbox {
    display: flex;
    align-items: stretch;
    gap: 8px;
    padding: 6px;
    background: var(--color-bg);
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-md);
}
.linkbox input {
    flex: 1 1 auto;
    min-width: 0;
    height: 40px;
    min-height: 40px;
    padding: 0 12px;
    border: 1px solid transparent;
    background: transparent;
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--color-text);
}
.linkbox input:focus {
    background: var(--color-surface);
    border-color: var(--color-brand);
}
.linkbox button {
    flex: 0 0 auto;
    height: 40px;
    min-height: 40px;
    padding: 0 16px;
    border-radius: 8px;
    background: var(--color-brand);
    color: var(--color-text-inverse);
    border: 1px solid var(--color-brand);
    font-weight: 700;
    font-size: 13.5px;
    white-space: nowrap;
    cursor: pointer;
}
.linkbox button:hover {
    background: var(--color-brand-hover);
    filter: none;
}

/* Copy chip inline button */
.copy-chip {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 2px 10px;
    margin-left: 4px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--color-gold-line);
    background: var(--color-brand-soft);
    color: var(--color-brand);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    vertical-align: middle;
}
.copy-chip:hover {
    background: rgba(240, 185, 11, 0.22);
    border-color: var(--color-brand);
}

/* Claim reference field spacing */
.claim-ref {
    text-align: left;
    margin: 18px 0 12px;
}
.claim-ref label {
    display: block;
    margin-bottom: 6px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--color-text);
}
.claim-ref input {
    width: 100%;
    height: var(--control-h);
    padding: 0 14px;
}

@media (max-width: 540px) {
    .pay-card {
        padding: 20px 16px;
    }
    .pay-switch {
        flex-direction: column;
    }
    .linkbox {
        flex-direction: column;
        padding: 8px;
    }
    .linkbox button {
        width: 100%;
    }
    .receipt div {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    .receipt dd {
        text-align: left;
    }
}

/* ============================================================
   Full Transformation Layer (2026-11-26): copy confirmation
   states, fintech 404 error card, and receipt print polish.
   ============================================================ */
.linkbox button.is-copied,
.copy-chip.is-copied {
    background: var(--color-success) !important;
    border-color: var(--color-success) !important;
    color: #0b0e11 !important;
}

.error-card {
    max-width: 520px;
    margin: 24px auto 12px;
    padding: 36px 28px;
    background: linear-gradient(180deg, #1b1e26 0%, #15181f 100%);
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card), inset 0 1px 0 rgba(255, 255, 255, 0.04);
    text-align: center;
}
.error-code-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 68px;
    height: 34px;
    padding: 0 14px;
    margin-bottom: 14px;
    border-radius: var(--radius-pill);
    background: var(--color-brand-soft);
    border: 1px solid var(--color-gold-line);
    color: var(--color-brand);
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.08em;
}
.error-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 22px 0 16px;
}
.error-actions .paybtn {
    flex: 1 1 0;
    margin: 0;
}
.error-links {
    margin: 0;
    font-size: 13.5px;
    color: var(--color-text-muted);
}
.error-links a {
    color: var(--color-text-muted);
    text-decoration: none;
    transition: color var(--dur) var(--ease-out);
}
.error-links a:hover {
    color: var(--color-brand);
}
@media (max-width: 480px) {
    .error-card { padding: 26px 18px; }
    .error-actions { flex-direction: column; }
}
