/* ==========================================================================
   Weatherby Rewards v2 — Brand Stylesheet

   Aesthetic direction (inspired by weatherby.com's consumer pages):
     • Warm cream backgrounds, never stark white
     • Charcoal-black ink, not pure #000
     • Oswald Condensed for display & UI labels
     • Hind for body copy
     • Gold eyebrow labels above headings (UPPERCASE, tracked)
     • Muted warm-gold primary button (not saturated yellow)
     • Subtle card borders + soft shadows
     • Airy spacing, no visual noise
     • Light theme throughout (this is consumer-facing B2B)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@300;400;500;600;700&family=Hind:wght@300;400;500;600;700&display=swap');

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
    /* Brand palette — calibrated to weatherby.com */
    --brand-ink:         #1a1a1a;     /* near-black headings */
    --brand-gold:        #c19838;     /* accent, buttons, eyebrows */
    --brand-gold-hover:  #a67f25;
    --brand-gold-soft:   #e6d9b8;     /* muted highlight / tag bg */

    /* Surfaces */
    --bg-page:           #f5f2ec;     /* warm cream, app background */
    --bg-surface:        #ffffff;     /* cards, forms */
    --bg-subtle:         #faf8f4;     /* alt rows, subtle separators */

    /* Borders */
    --line:              #e3ddd0;     /* warm border */
    --line-strong:       #c9c0ac;

    /* Text */
    --text:              #2a2a2a;
    --text-muted:        #6b6456;     /* warm gray — not cold slate */
    --text-inverse:      #ffffff;

    /* Status colors — muted enough to feel refined, not alarming */
    --status-pending:    #b8860b;
    --status-pending-bg: #fbf3d8;
    --status-success:    #4a7c43;
    --status-success-bg: #e1ecd9;
    --status-danger:     #a03232;
    --status-danger-bg:  #f5dcdc;
    --status-info:       #31618c;
    --status-info-bg:    #dce8f2;

    /* Type */
    --font-display:      'Oswald', 'Arial Narrow', sans-serif;
    --font-body:         'Hind', 'Helvetica Neue', -apple-system, sans-serif;

    /* Measurements */
    --radius-sm:         4px;
    --radius:            6px;
    --radius-lg:         10px;
    --pill:              999px;

    --shadow-xs:         0 1px 2px rgba(40, 30, 10, 0.04);
    --shadow-sm:         0 1px 3px rgba(40, 30, 10, 0.06), 0 1px 2px rgba(40, 30, 10, 0.03);
    --shadow-md:         0 4px 14px rgba(40, 30, 10, 0.08);
    --shadow-lg:         0 10px 30px rgba(40, 30, 10, 0.10);
}

/* --------------------------------------------------------------------------
   2. Base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--bg-page);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.6;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--brand-ink);
    text-decoration: none;
    transition: color 120ms ease;
}
a:hover { color: var(--brand-gold); }

/* --------------------------------------------------------------------------
   3. Typography
   -------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    color: var(--brand-ink);
    font-weight: 600;
    letter-spacing: 0.005em;
    margin: 0 0 0.5em;
    line-height: 1.15;
}
h1 { font-size: 2.25rem; font-weight: 700; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.2rem; }

/* Gold eyebrow label — the signature weatherby.com "section tag" above a heading */
.eyebrow {
    display: block;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--brand-gold);
    margin-bottom: 0.6rem;
}

.subtitle {
    color: var(--text-muted);
    font-size: 1rem;
    margin: -0.25em 0 1.5em;
}

p { margin: 0 0 1em; }
.text-muted  { color: var(--text-muted); }
.text-center { text-align: center; }

hr {
    border: 0;
    border-top: 1px solid var(--line);
    margin: 2rem 0;
}

/* --------------------------------------------------------------------------
   4. Layout containers
   -------------------------------------------------------------------------- */
.container         { max-width: 1240px; margin: 0 auto; padding: 2.5rem 1.5rem; }
.container-narrow  { max-width: 560px;  margin: 0 auto; padding: 2rem 1.25rem; }
.container-medium  { max-width: 820px;  margin: 0 auto; padding: 2.5rem 1.5rem; }

/* --------------------------------------------------------------------------
   5. Site header (public layout) — simple centered logo
   -------------------------------------------------------------------------- */
.site-header {
    text-align: center;
    padding: 2rem 0 1.5rem;
}
.site-logo {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    color: var(--brand-ink);
}
.site-logo:hover { color: var(--brand-ink); }
.site-logo img { max-height: 64px; width: auto; }
.site-title {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   6. Main nav (dealer + admin layouts)
   -------------------------------------------------------------------------- */
.main-nav {
    background: var(--bg-surface);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-xs);
}
.nav-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.85rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 2rem;
}
.nav-logo img {
    height: 40px;
    width: auto;
    display: block;
}
.nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 0.125rem;
    flex: 1;
}
.nav-links a {
    display: inline-block;
    padding: 0.5rem 0.85rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text);
    transition: background 120ms ease, color 120ms ease;
}
.nav-links a:hover { background: var(--bg-subtle); color: var(--brand-gold); }
.nav-links a.active { color: var(--brand-gold); }
.nav-logout { margin: 0; }
.btn-link {
    background: transparent;
    border: 0;
    font-family: var(--font-display);
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.5rem 0.75rem;
}
.btn-link:hover { color: var(--status-danger); }

/* --------------------------------------------------------------------------
   7. Footer
   -------------------------------------------------------------------------- */
.site-footer {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    padding: 3rem 1rem 2rem;
}

/* --------------------------------------------------------------------------
   8. Auth cards (login, register, forgot, reset)
   -------------------------------------------------------------------------- */
.auth-card {
    background: var(--bg-surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    box-shadow: var(--shadow-sm);
}
.auth-card-wide { max-width: 780px; margin-left: auto; margin-right: auto; }
.auth-card h1 {
    text-align: center;
    font-size: 2rem;
    letter-spacing: 0.005em;
}
.auth-card > .subtitle {
    text-align: center;
    max-width: 40ch;
    margin-left: auto;
    margin-right: auto;
}
.auth-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: 1.75rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--line);
    font-size: 0.92rem;
}

/* --------------------------------------------------------------------------
   9. Forms
   -------------------------------------------------------------------------- */
.form-stack { display: flex; flex-direction: column; gap: 1.1rem; }

.form-stack label {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.form-stack label > span {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    color: var(--text);
}

.form-stack input[type="text"],
.form-stack input[type="email"],
.form-stack input[type="password"],
.form-stack input[type="tel"],
.form-stack input[type="url"],
.form-stack input[type="date"],
.form-stack input[type="number"],
.form-stack input[type="search"],
.form-stack select,
.form-stack textarea {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: var(--bg-surface);
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text);
    transition: border-color 120ms ease, box-shadow 120ms ease;
}
.form-stack input:focus,
.form-stack select:focus,
.form-stack textarea:focus {
    outline: none;
    border-color: var(--brand-gold);
    box-shadow: 0 0 0 3px rgba(193, 152, 56, 0.18);
}
.form-stack input[type="file"] {
    padding: 0.4rem;
    background: var(--bg-subtle);
}

.form-row   { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.form-row-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.1rem; }
.form-full  { grid-column: 1 / -1; }

.form-section-heading {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--line);
    text-align: center;
    font-size: 1.25rem;
    letter-spacing: 0.04em;
}

.form-actions {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 2rem;
}

/* Inline per-field error messages (small text under an invalid input) */
.field-error {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.8rem;
    color: var(--status-danger);
    line-height: 1.4;
}
.form-stack label.has-error input,
.form-stack label.has-error select,
.form-stack label.has-error textarea {
    border-color: var(--status-danger);
}
.form-stack label.has-error input:focus,
.form-stack label.has-error select:focus,
.form-stack label.has-error textarea:focus {
    box-shadow: 0 0 0 3px rgba(160, 50, 50, 0.15);
}

/* --------------------------------------------------------------------------
   10. Buttons
   -------------------------------------------------------------------------- */
.btn {
    display: inline-block;
    padding: 0.65rem 1.4rem;
    border-radius: var(--pill);
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 0.9rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    border: 1px solid transparent;
    text-decoration: none !important;
    transition: background 150ms ease, color 150ms ease, border-color 150ms ease, transform 80ms ease;
    line-height: 1.2;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
    background: var(--brand-gold);
    color: var(--brand-ink);
    border-color: var(--brand-gold);
}
.btn-primary:hover {
    background: var(--brand-gold-hover);
    border-color: var(--brand-gold-hover);
    color: var(--brand-ink);
}

.btn-secondary {
    background: transparent;
    color: var(--brand-ink);
    border-color: var(--brand-ink);
}
.btn-secondary:hover {
    background: var(--brand-ink);
    color: var(--text-inverse);
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border-color: var(--line-strong);
}
.btn-ghost:hover {
    background: var(--bg-subtle);
    color: var(--text);
    border-color: var(--line-strong);
}

.btn-danger {
    background: var(--status-danger);
    color: var(--text-inverse);
    border-color: var(--status-danger);
}
.btn-danger:hover {
    background: #871f1f;
    border-color: #871f1f;
    color: var(--text-inverse);
}

.btn-sm { padding: 0.4rem 0.95rem; font-size: 0.78rem; }

/* --------------------------------------------------------------------------
   11. Flash messages
   -------------------------------------------------------------------------- */
.flash {
    padding: 0.85rem 1.1rem;
    border-radius: var(--radius);
    margin-bottom: 1.25rem;
    font-size: 0.95rem;
    border: 1px solid transparent;
}
.flash-error   { background: var(--status-danger-bg);  color: var(--status-danger);  border-color: var(--status-danger); }
.flash-info    { background: var(--status-info-bg);    color: var(--status-info);    border-color: var(--status-info); }
.flash-success { background: var(--status-success-bg); color: var(--status-success); border-color: var(--status-success); }
.flash-warning { background: var(--status-pending-bg); color: var(--status-pending); border-color: var(--status-pending); }

/* --------------------------------------------------------------------------
   12. Dashboard stats
   -------------------------------------------------------------------------- */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}
.stat {
    background: var(--bg-surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 1.5rem 1.75rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
}
.stat-label {
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--brand-gold);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    margin-bottom: 0.5rem;
}
.stat-value {
    font-family: var(--font-display);
    font-size: 2.75rem;
    font-weight: 700;
    line-height: 1;
    color: var(--brand-ink);
}
.stat-positive .stat-value { color: var(--status-success); }
.stat-negative .stat-value { color: var(--status-danger); }
.stat-neutral  .stat-value { color: var(--brand-ink); }

/* --------------------------------------------------------------------------
   13. Cards & menu-list
   -------------------------------------------------------------------------- */
.card-grid { display: grid; gap: 1.5rem; }
.card-grid-2 { grid-template-columns: repeat(2, 1fr); }
.card-grid-3 { grid-template-columns: repeat(3, 1fr); }
.card-grid-2-1 { grid-template-columns: 2fr 1fr; }

.card {
    background: var(--bg-surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    box-shadow: var(--shadow-sm);
}
.card h2 {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--brand-gold);
    margin-bottom: 1.25rem;
}

.welcome-card {
    background: var(--bg-surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    max-width: 620px;
    margin: 0 auto;
    box-shadow: var(--shadow-sm);
}
.welcome-card h2 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    letter-spacing: 0.01em;
    color: var(--brand-ink);
    text-transform: none;
    margin-bottom: 1.25rem;
}

.menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.menu-list li + li { border-top: 1px solid var(--line); }
.menu-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 0.25rem;
    color: var(--brand-ink);
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.95rem;
    text-decoration: none;
    transition: color 120ms ease, padding-left 150ms ease;
}
.menu-list a:hover {
    color: var(--brand-gold);
    padding-left: 0.6rem;
}

/* --------------------------------------------------------------------------
   14. Badges
   -------------------------------------------------------------------------- */
.badge {
    display: inline-flex;
    align-items: center;
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.15rem 0.6rem;
    border-radius: var(--pill);
    letter-spacing: 0.04em;
    line-height: 1.5;
    margin-left: 0.4rem;
}
.badge-warning { background: var(--status-pending-bg); color: var(--status-pending); }
.badge-success { background: var(--status-success-bg); color: var(--status-success); }
.badge-danger  { background: var(--status-danger-bg);  color: var(--status-danger); }
.badge-info    { background: var(--status-info-bg);    color: var(--status-info); }
.badge-gold    { background: var(--brand-gold-soft);   color: var(--brand-ink); }

/* --------------------------------------------------------------------------
   15. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
    .card-grid-3,
    .card-grid-2,
    .card-grid-2-1    { grid-template-columns: 1fr; }
    .dashboard-stats { grid-template-columns: 1fr; }
    .form-row,
    .form-row-4      { grid-template-columns: 1fr; }
    .nav-inner       { flex-wrap: wrap; gap: 0.75rem; }
    .nav-links       { order: 3; width: 100%; overflow-x: auto; flex-wrap: nowrap; }
    h1               { font-size: 1.75rem; }
    .stat-value      { font-size: 2.2rem; }
    .container       { padding: 1.5rem 1rem; }
}

/* --------------------------------------------------------------------------
   16. Utilities
   -------------------------------------------------------------------------- */
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 2rem; }


/* --------------------------------------------------------------------------
   17. Data tables — used for admin list pages (pending dealers, etc.)
   -------------------------------------------------------------------------- */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}
.data-table thead th {
    text-align: left;
    padding: 0.85rem 1rem;
    background: var(--bg-subtle);
    border-bottom: 1px solid var(--line);
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--brand-gold);
}
.data-table tbody td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: var(--bg-subtle); }
.data-table small { color: var(--text-muted); }


/* --------------------------------------------------------------------------
   18. Definition list — used for dealer detail + similar readout pages

   Layout strategy: we use CSS subgrid-style row independence so each
   (dt, dd) pair baseline-aligns individually. Previous attempt used
   align-items: baseline on the parent grid, but that only baselines
   against the row's largest item and drifted when dd was multi-line.
   Switching to `display: contents` rows via an explicit row wrapper
   would be ideal, but it's simpler to use a grid-auto-rows approach
   with `align-items: baseline` AND give dt/dd matching vertical
   padding so their content boxes are the same height.
   -------------------------------------------------------------------------- */
.detail-list {
    display: grid;
    grid-template-columns: max-content 1fr;
    column-gap: 1.25rem;
    row-gap: 0;
    margin: 0;
    align-items: baseline;
}
.detail-list dt,
.detail-list dd {
    /* Identical vertical padding on both halves of each row ensures
       their content-boxes are the same height, which lets `baseline`
       alignment do its job cleanly regardless of dd content length. */
    padding: 0.85rem 0;
    margin: 0;
    line-height: 1.5;
}
.detail-list dt {
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    /* The small-caps label looks optically lower than sentence-case text
       at the same baseline. Nudge up a touch. This is font-specific; Hind
       at 0.72rem bold ends up needing about 1px of upward nudge. */
    transform: translateY(-1px);
}
.detail-list dd {
    color: var(--text);
}

/* First row: no top padding (no awkward gap at top of card) */
.detail-list > dt:first-child,
.detail-list > dt:first-child + dd {
    padding-top: 0;
}
/* Last row: no bottom padding */
.detail-list > *:nth-last-child(-n+2) {
    padding-bottom: 0;
}
/* Dashed separator above every row after the first. Applied to BOTH
   dt and dd of each row so the line spans the full card width. */
.detail-list dd + dt,
.detail-list dd + dt + dd {
    border-top: 1px dashed var(--line);
}


/* --------------------------------------------------------------------------
   19. Filter bar — used above data tables
   -------------------------------------------------------------------------- */
.filter-bar {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    flex-wrap: wrap;
    background: var(--bg-surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-xs);
}
.filter-label {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    flex: 1 1 180px;
    min-width: 160px;
}
.filter-label > span {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.filter-label input,
.filter-label select {
    padding: 0.55rem 0.75rem;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: var(--bg-surface);
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text);
}
.filter-label input:focus,
.filter-label select:focus {
    outline: none;
    border-color: var(--brand-gold);
    box-shadow: 0 0 0 3px rgba(193, 152, 56, 0.18);
}
.filter-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* Sort links in table headers */
.data-table thead th a.sort-link {
    color: var(--brand-gold);
    text-decoration: none;
}
.data-table thead th a.sort-link:hover {
    color: var(--brand-gold-hover);
    text-decoration: underline;
}


/* --------------------------------------------------------------------------
   20. Pagination
   -------------------------------------------------------------------------- */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
}
.pagination-info {
    font-family: var(--font-body);
    font-size: 0.88rem;
    color: var(--text-muted);
}
.detail-list dt + dd:has(+ dt) { padding-bottom: 0.25rem; }


/* --------------------------------------------------------------------------
   21. Claim flow — dealer catalog browser, cart, serial inputs
   -------------------------------------------------------------------------- */

/* Top-level two-column layout for the browse page: catalog left, cart right */
.claim-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 1.75rem;
    align-items: start;
}
@media (max-width: 900px) {
    .claim-layout { grid-template-columns: 1fr; }
}

/* Catalog grid of items */
.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}
.catalog-item {
    background: var(--bg-surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 1.1rem 1.15rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    box-shadow: var(--shadow-xs);
    transition: border-color 0.15s, box-shadow 0.15s;
}
.catalog-item:hover {
    border-color: var(--brand-gold);
    box-shadow: var(--shadow-sm);
}

/* Product image at the top of each catalog card. Aspect-locked for visual
   consistency, with a clean text-initials placeholder when we don't have
   an image yet. The image extends edge-to-edge of the card. */
.catalog-item-image {
    margin: -1.1rem -1.15rem 0.25rem -1.15rem;
    aspect-ratio: 16 / 10;
    background: var(--bg-subtle);
    border-bottom: 1px solid var(--line);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.catalog-item-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.catalog-item-image-placeholder {
    background: linear-gradient(135deg, var(--bg-subtle) 0%, #ebe6dc 100%);
}
.catalog-item-image-placeholder span {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.75rem;
    letter-spacing: 0.08em;
    color: var(--brand-gold);
    opacity: 0.7;
}

/* Admin catalog table — small thumbnail cell next to each row */
.catalog-thumb {
    width: 56px;
    height: 56px;
    background: var(--bg-subtle);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.catalog-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.catalog-thumb-placeholder {
    background: linear-gradient(135deg, var(--bg-subtle) 0%, #ebe6dc 100%);
}
.catalog-thumb-placeholder span {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.06em;
    color: var(--brand-gold);
    opacity: 0.7;
}

/* Admin catalog table = data-table with tighter padding for the small thumbs */
.catalog-table tbody td {
    vertical-align: middle;
}

/* Larger image preview on the per-item / per-model edit pages */
.catalog-edit-image {
    aspect-ratio: 16 / 10;
    background: var(--bg-subtle);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.catalog-edit-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.catalog-edit-image-placeholder {
    background: linear-gradient(135deg, var(--bg-subtle) 0%, #ebe6dc 100%);
}
.catalog-edit-image-placeholder span {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 2.5rem;
    letter-spacing: 0.08em;
    color: var(--brand-gold);
    opacity: 0.7;
}
.catalog-item-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
}
.catalog-item-model {
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--brand-gold);
    margin-bottom: 0.2rem;
}
.catalog-item-name {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.2;
    color: var(--brand-ink);
}
.catalog-item-price {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1rem;
    color: var(--brand-ink);
    white-space: nowrap;
}
.catalog-item-meta {
    display: flex;
    gap: 0.4rem;
    align-items: center;
    flex-wrap: wrap;
}

/* Add-row at the bottom of each catalog card. Layout strategy:
   - Caliber/config dropdown (when present) gets its OWN row, full width.
   - Qty + Add button share the next row.
   This avoids cramped horizontal space when caliber labels are long. */
.catalog-item-add {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.5rem 0.6rem;
    border-top: 1px solid var(--line);
    padding-top: 0.75rem;
    margin-top: auto;
}
.catalog-item-add > .catalog-variant {
    flex: 1 1 100%;
    min-width: 0;            /* allow shrinking inside flex */
    margin-bottom: 0.25rem;
}

.catalog-qty {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    max-width: 72px;
    flex-shrink: 0;
}
.catalog-qty > span {
    font-family: var(--font-body);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.catalog-qty input {
    width: 100%;
    padding: 0.45rem 0.55rem;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: var(--bg-surface);
    font-family: var(--font-body);
    font-size: 0.95rem;
}

/* Caliber/configuration dropdown on catalog cards */
.catalog-variant {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    width: 100%;
}
.catalog-variant > span {
    font-family: var(--font-body);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.catalog-variant select {
    width: 100%;
    box-sizing: border-box;
    padding: 0.5rem 0.7rem;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: var(--bg-surface);
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text);
    /* Truncate over-long option text inside the closed select */
    text-overflow: ellipsis;
}
.catalog-variant select:focus {
    outline: none;
    border-color: var(--brand-gold);
    box-shadow: 0 0 0 3px rgba(193, 152, 56, 0.18);
}

.catalog-item-add button {
    flex: 1;
}

/* Cart (right sidebar on claim browse page) */
.claim-cart {
    position: sticky;
    top: 1rem;
}
.claim-cart-lines {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-top: 0.5rem;
}
.claim-cart-line {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 0.6rem;
    align-items: center;
    padding: 0.6rem 0;
    border-bottom: 1px dashed var(--line);
}
.claim-cart-line:last-child { border-bottom: 0; }
.claim-cart-line-info { min-width: 0; }
.claim-cart-line-total {
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--brand-gold);
    white-space: nowrap;
}
.claim-cart-remove {
    background: transparent;
    border: 0;
    color: var(--text-muted);
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
}
.claim-cart-remove:hover {
    color: var(--status-danger);
    background: var(--bg-subtle);
}
.claim-cart-total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px solid var(--line);
    font-family: var(--font-display);
}
.claim-cart-total strong {
    font-size: 1.35rem;
    color: var(--brand-ink);
}

/* Serial number entry groups (step 2) */
.serial-group {
    padding: 1rem 0;
    border-bottom: 1px dashed var(--line);
}
.serial-group:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}
.serial-group-head {
    margin-bottom: 0.75rem;
}
.serial-group-inputs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.75rem;
}

/* Success page stats row */
.claim-success-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    max-width: 480px;
    margin: 0 auto;
}
@media (max-width: 600px) {
    .claim-success-stats { grid-template-columns: 1fr; }
}

/* ===== Cart line: qty stepper + controls wrapper ============================
   Sits inside .claim-cart-line-info on both the browse sidebar (.claim-cart)
   and the dedicated cart review page (cart.php). Replaces the static
   "2 × 79 pts" subtitle with an editable stepper. The × kill button on the
   right end of the .claim-cart-line keeps its existing role (kill the whole
   line, with confirm). Decrementing the stepper to 0 auto-removes the line
   without a confirm — see DealerClaimController::adjustQty().
*/
.claim-cart-line-controls {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 0.35rem;
    flex-wrap: wrap;
}

.qty-stepper {
    display: inline-flex;
    align-items: stretch;
    margin: 0;
    background: var(--bg-subtle);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    overflow: hidden;
    line-height: 1;
}

.qty-stepper-btn {
    background: transparent;
    border: 0;
    width: 32px;
    height: 32px;
    font-size: 1.05rem;
    line-height: 1;
    color: var(--brand-ink);
    cursor: pointer;
    padding: 0;
    font-family: inherit;
    font-variant-numeric: tabular-nums;
    transition: background-color 0.1s ease;
}

.qty-stepper-btn:hover {
    background: var(--bg-surface);
}

.qty-stepper-btn:active,
.qty-stepper-btn:focus-visible {
    background: var(--line-soft);
    outline: none;
}

.qty-stepper-value {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.75rem;
    padding: 0 0.4rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    user-select: none;
    border-left: 1px solid var(--line);
    border-right: 1px solid var(--line);
    background: transparent;
}

/* Mobile / small viewports — bigger tap targets (44px hits Apple's
   minimum target guideline). Applies anywhere the stepper is shown
   on narrow viewports, including the cart review page where this is
   the primary edit affordance. */
@media (max-width: 600px) {
    .qty-stepper-btn {
        width: 44px;
        height: 44px;
        font-size: 1.2rem;
    }

    .qty-stepper-value {
        min-width: 2.25rem;
        font-size: 1.05rem;
        padding: 0 0.5rem;
    }
}

/* --------------------------------------------------------------------------
   22. Bulk-assign sales reps page
   -------------------------------------------------------------------------- */

/* State group header inside each card */
.bulk-state-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--line);
    background: var(--bg-subtle);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.bulk-state-quick {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}
.bulk-state-quick select {
    padding: 0.4rem 0.65rem;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: var(--bg-surface);
    font-family: var(--font-body);
    font-size: 0.9rem;
    min-width: 200px;
}

/* The dealer rows table inside each state group has slightly tighter
   padding than the standard data-table because rows are dense and we
   want the page to scan quickly. */
.bulk-state-table tbody td {
    padding: 0.7rem 1rem;
    vertical-align: middle;
}

/* Sticky footer toolbar — appears above the page when at least 1 row is checked */
.bulk-footer {
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    margin-top: 1.5rem;
    transform: translateY(120%);
    transition: transform 0.2s ease;
    pointer-events: none;
    z-index: 50;
}
.bulk-footer.is-active {
    transform: translateY(0);
    pointer-events: auto;
}
.bulk-footer-inner {
    background: var(--brand-ink);
    color: #fff;
    padding: 0.85rem 1.25rem;
    border-radius: var(--radius-lg);
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex-wrap: wrap;
}
.bulk-footer-inner select {
    padding: 0.5rem 0.75rem;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.05);
    color: #fff;
    font-family: var(--font-body);
    font-size: 0.92rem;
    min-width: 220px;
}
.bulk-footer-inner select option {
    color: var(--brand-ink);   /* readable when dropdown opens against light OS theme */
}


/* --------------------------------------------------------------------------
   23. Dealer dashboard "complete your account" prompt banner
   -------------------------------------------------------------------------- */
.account-prompt-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.25rem;
    padding: 1rem 1.25rem;
    margin: 0 0 1.5rem;
    background: linear-gradient(135deg, #fbf6e9 0%, #f5ecd1 100%);
    border: 1px solid var(--brand-gold);
    border-left-width: 4px;
    border-radius: var(--radius-md);
    color: var(--brand-ink);
    text-decoration: none;
    transition: box-shadow 0.15s, transform 0.05s;
}
.account-prompt-banner:hover {
    box-shadow: 0 4px 14px rgba(193, 152, 56, 0.25);
    text-decoration: none;
}
.account-prompt-banner:active {
    transform: translateY(1px);
}
.account-prompt-banner > div {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}
.account-prompt-banner strong {
    font-family: var(--font-display);
    font-size: 1.05rem;
}
.account-prompt-banner span {
    font-size: 0.92rem;
    color: var(--text);
    opacity: 0.85;
}
.account-prompt-banner .account-prompt-cta {
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--brand-gold);
    white-space: nowrap;
    flex-shrink: 0;
}
@media (max-width: 600px) {
    .account-prompt-banner {
        flex-direction: column;
        align-items: flex-start;
    }
}


/* --------------------------------------------------------------------------
   24. Reports — headline tiles, link cards, timeline chart
   -------------------------------------------------------------------------- */

.reports-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.reports-tile {
    display: block;
    text-decoration: none;
    background: var(--bg-surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 1rem 1.15rem;
    box-shadow: var(--shadow-xs);
    color: inherit;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.05s;
}
a.reports-tile:hover {
    border-color: var(--brand-gold);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
}
a.reports-tile:active { transform: translateY(1px); }
.reports-tile-eyebrow {
    font-family: var(--font-body);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--brand-gold);
    margin-bottom: 0.5rem;
}
.reports-tile-value {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.85rem;
    line-height: 1;
    color: var(--brand-ink);
    margin-bottom: 0.4rem;
}
.reports-tile-title {
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text);
}
.reports-tile-subtitle {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

.reports-link-card {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.05s;
}
.reports-link-card:hover {
    border-color: var(--brand-gold);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
}
.reports-link-card:active { transform: translateY(1px); }

/* Activity timeline chart — div-based bars, responsive */
.timeline-chart {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 220px;
    margin-top: 1rem;
    padding: 0 0.5rem;
    background: var(--bg-subtle);
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    overflow-x: auto;
}
.timeline-day {
    flex: 1 0 4px;
    height: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    cursor: default;
}
.timeline-bars {
    display: flex;
    align-items: flex-end;
    gap: 1px;
    height: 100%;
    width: 100%;
}
.timeline-bar {
    flex: 1;
    min-height: 1px;
    border-radius: 1px 1px 0 0;
    transition: opacity 0.15s;
}
.timeline-bar-claims      { background: var(--brand-gold); }
.timeline-bar-redemptions { background: var(--brand-ink); }
.timeline-day:hover .timeline-bar { opacity: 0.75; }

.timeline-axis {
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    padding: 0 0.5rem;
}


/* --------------------------------------------------------------------------
   25. Promotions admin — math-type radio cards, target multi-selects
   -------------------------------------------------------------------------- */
.promo-math-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
}
.promo-math-option {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.85rem 1rem;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: var(--bg-surface);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}
.promo-math-option:hover {
    border-color: var(--brand-gold);
}
.promo-math-option:has(input:checked) {
    border-color: var(--brand-gold);
    background: linear-gradient(135deg, #fbf6e9 0%, #f8f1de 100%);
}
.promo-math-option > div {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}
.promo-math-option strong {
    font-family: var(--font-display);
    font-size: 0.95rem;
}
.promo-math-option small {
    font-size: 0.82rem;
}
.promo-target-select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: var(--bg-surface);
    font-family: var(--font-body);
    font-size: 0.92rem;
}
@media (max-width: 600px) {
    .promo-math-options { grid-template-columns: 1fr; }
}


/* --------------------------------------------------------------------------
   26. Active promotions — banner strip + per-card badge
   -------------------------------------------------------------------------- */

/* Banner strip used on dealer dashboard + claim browse */
.promo-banner {
    background: linear-gradient(135deg, #fbf6e9 0%, #f5ecd1 100%);
    border: 1px solid var(--brand-gold);
    border-left-width: 4px;
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    margin: 0 0 1.5rem;
}
.promo-banner-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.5rem;
}
.promo-banner-cta {
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--brand-gold);
}
.promo-banner-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.promo-banner-list li {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.6rem;
    padding: 0.4rem 0;
    border-top: 1px dashed rgba(193, 152, 56, 0.35);
}
.promo-banner-list li:first-child {
    border-top: 0;
    padding-top: 0;
}
.promo-banner-effect {
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--brand-gold);
    flex-shrink: 0;
    min-width: 7em;
}
.promo-banner-name {
    flex: 1;
    color: var(--brand-ink);
    font-weight: 500;
}
.promo-banner-meta {
    font-size: 0.82rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

/* Per-card promo badge — pill in the top-right of the card image */
.catalog-item-image {
    position: relative;
}
.catalog-item-promo-badge {
    position: absolute;
    top: 0.6rem;
    right: 0.6rem;
    background: var(--brand-gold);
    color: #fff;
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.3rem 0.6rem;
    border-radius: 999px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
    z-index: 1;
    white-space: nowrap;
}


/* --------------------------------------------------------------------------
   27. Admin-curated site banners (promotion_banners)
   -------------------------------------------------------------------------- */

/* Dealer-side banner — 4 style variants */
.site-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1.15rem;
    margin: 0 0 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--line);
    border-left-width: 4px;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.15s, transform 0.05s;
}
a.site-banner:hover {
    text-decoration: none;
    box-shadow: var(--shadow-sm);
}
a.site-banner:active { transform: translateY(1px); }
.site-banner-body {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}
.site-banner-body strong {
    font-family: var(--font-display);
    font-size: 1rem;
    color: var(--brand-ink);
}
.site-banner-body span {
    font-size: 0.9rem;
    color: var(--text);
    opacity: 0.85;
}
.site-banner-cta {
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    white-space: nowrap;
    flex-shrink: 0;
}

/* 4 visual styles */
.site-banner-gold {
    background: linear-gradient(135deg, #fbf6e9 0%, #f5ecd1 100%);
    border-color: var(--brand-gold);
}
.site-banner-gold .site-banner-cta { color: var(--brand-gold); }

.site-banner-navy {
    background: var(--brand-ink);
    border-color: var(--brand-ink);
    color: #fff;
}
.site-banner-navy .site-banner-body strong { color: #fff; }
.site-banner-navy .site-banner-body span   { color: rgba(255,255,255,0.8); }
.site-banner-navy .site-banner-cta         { color: var(--brand-gold); }

.site-banner-cream {
    background: var(--bg-subtle);
    border-color: var(--line-strong);
}
.site-banner-cream .site-banner-cta { color: var(--text-muted); }

.site-banner-warning {
    background: #fff5e6;
    border-color: #d68910;
}
.site-banner-warning .site-banner-cta { color: #b8650a; }

@media (max-width: 600px) {
    .site-banner {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Admin banner-list pills (the small "Gold/Navy/Cream/Warning" indicator) */
.banner-style-pill {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border: 1px solid transparent;
}
.banner-style-pill.banner-style-gold    { background: #fbf6e9; color: #8a6c1f; border-color: var(--brand-gold); }
.banner-style-pill.banner-style-navy    { background: var(--brand-ink); color: #fff; }
.banner-style-pill.banner-style-cream   { background: var(--bg-subtle); color: var(--text-muted); border-color: var(--line-strong); }
.banner-style-pill.banner-style-warning { background: #fff5e6; color: #b8650a; border-color: #d68910; }

/* Admin form: location checkboxes */
.banner-locations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.5rem;
}
.banner-location-option {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.7rem 0.85rem;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: var(--bg-surface);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}
.banner-location-option:hover { border-color: var(--brand-gold); }
.banner-location-option:has(input:checked) {
    border-color: var(--brand-gold);
    background: linear-gradient(135deg, #fbf6e9 0%, #f8f1de 100%);
}
.banner-location-option > div {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}
.banner-location-option strong {
    font-family: var(--font-display);
    font-size: 0.92rem;
}
.banner-location-option small {
    font-size: 0.78rem;
}

/* Admin form: style picker (radio cards with color preview) */
.banner-style-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.5rem;
}
.banner-style-option {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.7rem 0.85rem;
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: border-color 0.15s;
}
.banner-style-option:has(input:checked) {
    border-color: var(--brand-ink);
}
.banner-style-option input { margin: 0; }
.banner-style-option-gold    { background: linear-gradient(135deg, #fbf6e9 0%, #f5ecd1 100%); }
.banner-style-option-navy    { background: var(--brand-ink); color: #fff; }
.banner-style-option-cream   { background: var(--bg-subtle); }
.banner-style-option-warning { background: #fff5e6; }
/* --------------------------------------------------------------------------
   28. Dealer merge UI
   -------------------------------------------------------------------------- */

/* Side-by-side preview cards — visual differentiation between keep vs discard */
.merge-keep {
    border-left: 4px solid var(--brand-gold);
}

.merge-discard {
    border-left: 4px solid var(--status-danger);
    background: linear-gradient(135deg, var(--bg-surface) 0%, #fbeeee 100%);
}

/* What-will-happen checklist */
.merge-checklist {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.merge-checklist li {
    padding: 0.7rem 0.85rem;
    background: var(--bg-subtle);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--brand-gold);
}

.merge-checklist li small {
    display: block;
    margin-top: 0.2rem;
}

/* Inline reverse form */
.merge-reverse-form summary {
    cursor: pointer;
    list-style: none;
}

.merge-reverse-form summary::-webkit-details-marker {
    display: none;
}

.merge-reverse-form[open] summary {
    margin-bottom: 0;
}

/* =============================================================================
 * MOBILE PHASE 2 ADDITIONS — paste this entire block at the END of app.css
 * =============================================================================
 *
 * What's in here:
 *   - Header rework: REWARDS wordmark, action area (cart icon + logout),
 *     hamburger button visible <900px
 *   - Slide-in drawer from the right (replaces the old horizontal-scroll nav)
 *   - Cart icon button + badge + label
 *   - Mobile-friendly form/cart/checkout chrome:
 *       * Sticky-bottom action bar (.form-actions-sticky-mobile)
 *       * Sticky cart pill on browse pages (.cart-pill)
 *       * Mobile data-table fix (collapses to stacked rows)
 *   - Pagination
 *   - Bigger touch targets on .btn / .btn-sm at <900px
 *   - Container/card spacing tightening on small screens
 * ========================================================================== */

/* --- Header chrome ------------------------------------------------------- */

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
    color: var(--brand-ink);
}
.nav-brand:hover { color: var(--brand-ink); }
.nav-logo-img {
    height: 40px;
    width: auto;
    display: block;
}
.nav-logo-fallback {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--brand-ink);
}
.nav-wordmark {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--brand-gold);
    padding-left: 0.65rem;
    border-left: 1px solid var(--line-strong);
    line-height: 1;
}

/* Group cart + logout to the right side of the desktop nav */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* --- Cart icon button (in header) --------------------------------------- */

.nav-cart-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.8rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--bg-surface);
    color: var(--brand-ink);
    font-family: var(--font-display);
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    transition: border-color 120ms ease, background 120ms ease, color 120ms ease;
}
.nav-cart-btn:hover {
    border-color: var(--brand-gold);
    color: var(--brand-gold);
    background: var(--bg-subtle);
}
.nav-cart-icon { flex-shrink: 0; }
.nav-cart-label { display: inline; }
.nav-cart-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 10px;
    background: var(--brand-gold);
    color: var(--brand-ink);
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
}

/* --- Hamburger button --------------------------------------------------- */

.nav-hamburger {
    display: none;        /* hidden on desktop, shown <900px below */
    background: transparent;
    border: 0;
    cursor: pointer;
    padding: 0.5rem;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    margin-left: auto;
}
.nav-hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--brand-ink);
    border-radius: 1px;
    transition: transform 200ms ease, opacity 150ms ease;
}

/* --- Slide-in drawer from right ----------------------------------------- */

.nav-drawer {
    position: fixed;
    inset: 0;
    z-index: 1000;
    pointer-events: none;
    visibility: hidden;
}
.nav-drawer.is-open {
    pointer-events: auto;
    visibility: visible;
}
.nav-drawer-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(20, 20, 22, 0);
    transition: background 220ms ease;
}
.nav-drawer.is-open .nav-drawer-backdrop {
    background: rgba(20, 20, 22, 0.55);
}
.nav-drawer-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(85vw, 340px);
    background: var(--bg-surface);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.18);
    transform: translateX(100%);
    transition: transform 280ms cubic-bezier(0.32, 0.72, 0, 1);
    display: flex;
    flex-direction: column;
}
.nav-drawer.is-open .nav-drawer-panel {
    transform: translateX(0);
}
.nav-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--line);
}
.nav-drawer-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--brand-gold);
}
.nav-drawer-close {
    background: transparent;
    border: 0;
    font-size: 1.8rem;
    line-height: 1;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem 0.5rem;
}
.nav-drawer-close:hover { color: var(--brand-ink); }
.nav-drawer-links {
    list-style: none;
    margin: 0;
    padding: 0.5rem 0;
    flex: 1;
    overflow-y: auto;
}
.nav-drawer-links li { margin: 0; }
.nav-drawer-links a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.95rem 1.5rem;
    font-family: var(--font-display);
    font-size: 0.95rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--brand-ink);
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: background 120ms ease, color 120ms ease;
}
.nav-drawer-links a:hover {
    background: var(--bg-subtle);
    color: var(--brand-gold);
}
.nav-drawer-links a.active {
    background: var(--bg-subtle);
    color: var(--brand-gold);
    border-left-color: var(--brand-gold);
}
.nav-drawer-cart {
    /* same as default link */
}
.nav-drawer-logout {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--line);
}

/* --- Mobile breakpoint: <900px ------------------------------------------ */

@media (max-width: 900px) {
    /* Hide desktop nav links + actions, show hamburger */
    .nav-links,
    .nav-actions { display: none; }
    .nav-hamburger { display: flex; }

    /* Wordmark stays but tightens on small screens */
    .nav-wordmark {
        font-size: 0.82rem;
        padding-left: 0.5rem;
    }
    .nav-logo-img { height: 32px; }

    /* Tighten container */
    .container { padding: 1.25rem 1rem; }

    /* The original 900px block in the existing CSS already handles:
         .card-grid-3, .card-grid-2, .dashboard-stats, .form-row,
         .form-row-4, h1 sizing, .stat-value, .nav-inner wrap.
       Nothing to override here. */
}

/* --- Mobile breakpoint: <600px (phones) --------------------------------- */

@media (max-width: 600px) {
    /* Bigger primary touch targets — Apple HIG / Material baseline is 44px */
    .btn {
        padding: 0.85rem 1.15rem;
        font-size: 0.82rem;
        min-height: 44px;
    }
    .btn-sm {
        padding: 0.6rem 1rem;
        font-size: 0.78rem;
        min-height: 40px;
    }

    /* Tighten card padding on phones */
    .card { padding: 1rem 1.1rem; }

    /* Form actions: stack vertically with primary first, full-width */
    .form-actions {
        flex-direction: column-reverse;  /* primary action always on top */
        align-items: stretch !important;
        gap: 0.6rem;
    }
    .form-actions .btn { width: 100%; }
}

/* --- Sticky bottom action bar (used on long forms like checkout) ------- */
/*
 * Apply by adding `form-actions-sticky-mobile` to a `.form-actions` div.
 * On mobile the button row pins to the bottom of the viewport so the
 * primary action never disappears below a long form.
 */
@media (max-width: 900px) {
    .form-actions-sticky-mobile {
        position: sticky;
        bottom: 0;
        margin-left: -1rem;
        margin-right: -1rem;
        margin-bottom: -1.25rem;
        padding: 0.85rem 1rem calc(0.85rem + env(safe-area-inset-bottom));
        background: var(--bg-page);
        border-top: 1px solid var(--line);
        box-shadow: 0 -8px 16px rgba(0, 0, 0, 0.06);
        z-index: 50;
    }
}

/* --- Sticky cart pill (browse pages, mobile only) ----------------------- */
/*
 * Floats above the catalog so the dealer can jump to checkout from
 * anywhere in a long catalog. Hidden on desktop (where the sidebar
 * cart is always visible).
 */
.cart-pill {
    display: none;
}
@media (max-width: 900px) {
    .cart-pill {
        display: flex;
        position: fixed;
        bottom: calc(1rem + env(safe-area-inset-bottom));
        left: 1rem;
        right: 1rem;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
        padding: 0.85rem 1.1rem;
        background: var(--brand-ink);
        color: var(--text-inverse);
        border-radius: 999px;
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
        text-decoration: none;
        font-family: var(--font-display);
        letter-spacing: 0.06em;
        z-index: 60;
        text-transform: uppercase;
        font-size: 0.82rem;
        min-height: 50px;
    }
    .cart-pill:hover { color: var(--text-inverse); background: var(--brand-gold); }
    .cart-pill-count {
        background: var(--brand-gold);
        color: var(--brand-ink);
        font-family: var(--font-body);
        font-size: 0.78rem;
        font-weight: 700;
        padding: 0.18rem 0.6rem;
        border-radius: 999px;
        letter-spacing: 0;
    }
    .cart-pill-arrow { font-size: 1.1rem; line-height: 1; }
    /* Add bottom padding to the body so the pill doesn't cover the
       last bit of the catalog when scrolled to the end */
    body.has-cart-pill { padding-bottom: 5.5rem; }
}

/* --- Hide the desktop sidebar cart on mobile (replaced by pill) -------- */
@media (max-width: 900px) {
    .claim-layout > aside.claim-cart {
        display: none;
    }
}

/* --- Mobile data-table — stack rows as cards ---------------------------- */
/*
 * The redeem checkout's order-summary table has 4 columns that simply
 * don't fit on a 375px screen. At <600px we hide the <thead> and turn
 * each <tr> into a stacked card with the column header labels coming
 * from data-label attributes on each <td>.
 *
 * Usage in markup:
 *   <table class="data-table data-table-mobile-stack"> ...
 *     <td data-label="Item">...</td>
 *     <td data-label="Qty">...</td>
 *
 * For tables that should keep horizontal layout but just need overflow
 * scroll, wrap them in `.table-scroll` instead.
 */
.table-scroll {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 600px) {
    .data-table-mobile-stack thead {
        display: none;
    }
    .data-table-mobile-stack,
    .data-table-mobile-stack tbody,
    .data-table-mobile-stack tr,
    .data-table-mobile-stack td,
    .data-table-mobile-stack tfoot tr,
    .data-table-mobile-stack tfoot td {
        display: block;
        width: 100%;
    }
    .data-table-mobile-stack tr {
        background: var(--bg-surface);
        border: 1px solid var(--line);
        border-radius: var(--radius-sm);
        margin-bottom: 0.6rem;
        padding: 0.4rem 0.85rem;
    }
    .data-table-mobile-stack td {
        display: flex !important;
        justify-content: space-between;
        align-items: baseline;
        padding: 0.45rem 0 !important;
        border-bottom: 1px dashed var(--line);
        text-align: left !important;
    }
    .data-table-mobile-stack td:last-child {
        border-bottom: 0;
    }
    .data-table-mobile-stack td::before {
        content: attr(data-label);
        font-family: var(--font-body);
        font-size: 0.7rem;
        font-weight: 600;
        letter-spacing: 0.12em;
        text-transform: uppercase;
        color: var(--text-muted);
        padding-right: 1rem;
        flex-shrink: 0;
    }
    .data-table-mobile-stack tfoot tr {
        background: var(--bg-subtle);
        border-color: var(--brand-gold);
    }
}

/* --- Pagination --------------------------------------------------------- */

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin: 1.5rem 0 0;
    flex-wrap: wrap;
}
.pagination-info {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin: 0 0.65rem;
}
.pagination a,
.pagination span.page-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    min-height: 40px;
    padding: 0.4rem 0.65rem;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: var(--bg-surface);
    color: var(--brand-ink);
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: border-color 120ms ease, background 120ms ease;
}
.pagination a:hover {
    border-color: var(--brand-gold);
    color: var(--brand-gold);
    background: var(--bg-subtle);
}
.pagination .page-num.is-current {
    background: var(--brand-ink);
    color: var(--text-inverse);
    border-color: var(--brand-ink);
    font-weight: 600;
}
.pagination .page-num.is-disabled {
    color: var(--text-muted);
    background: var(--bg-subtle);
    cursor: default;
    opacity: 0.55;
}
.pagination .page-ellipsis {
    color: var(--text-muted);
    padding: 0 0.25rem;
    font-size: 1rem;
}

@media (max-width: 600px) {
    /* Allow the pagination row to scroll horizontally on tiny screens
       when there are many pages instead of wrapping into 2-3 rows. */
    .pagination {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        justify-content: flex-start;
        padding-bottom: 0.5rem;
    }
    .pagination-info {
        font-size: 0.78rem;
    }
}

/* --- Catalog item add form: better stack on mobile --------------------- */

@media (max-width: 600px) {
    .catalog-item-add {
        flex-wrap: wrap;
        gap: 0.6rem;
    }
    .catalog-item-add > .catalog-variant {
        flex: 1 1 100%;
    }
    .catalog-item-add > .catalog-qty {
        flex: 0 0 auto;
    }
    .catalog-item-add > button {
        flex: 1 1 auto;
    }
}

/* === END MOBILE PHASE 2 ADDITIONS ====================================== */

/* =============================================================================
 * PROMO CARD HIGHLIGHT — append to END of app.css
 * =============================================================================
 *
 * Visually distinguishes catalog cards whose currently-selected variant is on
 * promo. Used on /dealer/claim and /dealer/redeem catalog pages. Class is set
 * server-side based on the default variant's promo state, then toggled client-
 * side by the variant <select> change handlers in claim-browse.php and
 * redeem-browse.php so the highlight follows the dealer's caliber selection.
 *
 * Visual treatment:
 *   - Gold left border (matches the FFL address callout, drawer active state,
 *     help-step cards — same "this is highlighted" vocabulary across the site)
 *   - Subtle warm-tinted background so the card body itself feels touched
 *   - Slightly elevated shadow so it pops a touch above neutral cards
 *   - The existing corner badge stays as-is
 *
 * Subtle on purpose — three promo'd cards in a row should still feel like a
 * catalog, not a carnival.
 * ========================================================================== */

.catalog-item.has-promo {
    border-left: 3px solid var(--brand-gold);
    background: linear-gradient(
        to right,
        rgba(193, 152, 56, 0.06) 0%,        /* var(--brand-gold) at 6% opacity */
        rgba(193, 152, 56, 0.015) 40%,      /*  thinning out as you cross the card */
        var(--bg-surface) 100%
    );
    box-shadow: 0 2px 6px rgba(193, 152, 56, 0.10),
                0 1px 2px rgba(0, 0, 0, 0.04);
    transition:
        border-color 180ms ease,
        background   180ms ease,
        box-shadow   180ms ease;
}

/* Reset transitions on neutral cards too so the toggle is symmetrical
   (no jank when going from promo → non-promo). */
.catalog-item {
    transition:
        border-color 180ms ease,
        background   180ms ease,
        box-shadow   180ms ease;
}

/* === END PROMO CARD HIGHLIGHT ============================================ */

/* ============================================================
 * data-table-bleed — extends table edges past card padding on
 * desktop, then resets cleanly on mobile so it stacks inside
 * the card instead of fighting the mobile-stack layout.
 * ============================================================ */
.data-table-bleed {
    margin: 0 -1.75rem;
    width: calc(100% + 3.5rem);
}

@media (max-width: 600px) {
    .data-table-bleed {
        margin: 0;
        width: 100%;
    }
}

/* ============================================================
 * Mobile-stack action cells (empty data-label)
 * For tds that hold a button/link rather than labeled data —
 * hide the empty pseudo-label and right-align the action.
 * ============================================================ */
@media (max-width: 600px) {
    .data-table-mobile-stack td[data-label=""]::before {
        display: none;
    }

    .data-table-mobile-stack td[data-label=""] {
        justify-content: flex-end;
    }
}

/* ===================================================================
   Balance cap status indicator
   -------------------------------------------------------------------
   Used by app/Views/dealer/_partials/cap_status.php — appears on
   dashboard, account/edit sidebar, claim browse sidebar, claim cart,
   claim serials, and admin claim-create form. State-keyed visuals:
       .cap-status-ok       — neutral / green meter
       .cap-status-near     — gold/amber (>= 80% of cap)
       .cap-status-at_cap   — gold, thicker border, meter at 100%
       .cap-status-over_cap — red error (hard-block state)
   =================================================================== */

.cap-status {
    padding: 0.85rem 1rem;
    margin: 0.75rem 0;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: var(--bg-subtle);
    font-size: 0.92rem;
    line-height: 1.45;
}

.cap-status-compact {
    padding: 0.55rem 0.7rem;
    font-size: 0.85rem;
    margin: 0.5rem 0 0;
}

.cap-status-meter {
    height: 4px;
    background: var(--line);
    border-radius: 2px;
    overflow: hidden;
    margin: -0.4rem -0.5rem 0.6rem;
    position: relative;
}

.cap-status-compact .cap-status-meter {
    margin: -0.25rem -0.35rem 0.45rem;
    height: 3px;
}

.cap-status-meter-fill {
    height: 100%;
    background: var(--text-muted);
    transition: width 0.2s ease, background-color 0.2s ease;
}

/* --- OK state (under 80% of cap) --- */
.cap-status-ok .cap-status-meter-fill {
    background: var(--status-success, #4a7c2e);
}

/* --- Near cap (>= 80%, < 100%) --- */
.cap-status-near {
    background: #fdf8ec;
    border-color: var(--brand-gold);
}

.cap-status-near .cap-status-meter-fill {
    background: var(--brand-gold);
}

/* --- At the exact cap (= 100%) --- */
.cap-status-at_cap {
    background: #fdf8ec;
    border-color: var(--brand-gold);
    border-width: 2px;
}

.cap-status-at_cap .cap-status-meter-fill {
    background: var(--brand-gold);
    width: 100% !important;
}

/* --- Over cap (> 100%) — the blocking state --- */
.cap-status-over_cap {
    background: #fff5f5;
    border: 1px solid var(--status-danger, #c62828);
    border-left-width: 4px;
    color: #4a1212;
}

.cap-status-over_cap .cap-status-meter-fill {
    background: var(--status-danger, #c62828);
}

.cap-status-over_cap strong {
    color: var(--status-danger, #c62828);
}

.cap-status-message strong {
    font-weight: 600;
}

.cap-status-message small {
    font-size: 0.82rem;
}

.cap-status-message small.text-muted {
    color: var(--text-muted);
}

.site-footer {
    margin-top: 3rem;
    padding: 1.25rem 1rem;
    border-top: 1px solid var(--line);
    background: var(--bg-subtle);
    font-size: 0.82rem;
    color: var(--text-muted);
}

.site-footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.site-footer a {
    color: var(--text-muted);
    text-decoration: underline;
}

.site-footer a:hover {
    color: var(--brand-gold);
}