:root {
    --navy: #0A2E52;
    --navy-dark: #051A30;
    --blue: #185FA5;
    --blue-light: #E6F1FB;
    --ink: #1E2126;
    --ink-soft: #5A6270;
    --border: #DCE2E8;
    --bg: #F5F7FA;
    --white: #FFFFFF;
    --green: #1E7B4D;
    --green-bg: #E4F5EC;
    --red: #B23A2E;
    --red-bg: #FBEAE8;
    --radius: 8px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--ink);
    background: var(--bg);
}

/* ---------- Auth page ---------- */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(160deg, var(--navy) 0%, var(--navy-dark) 100%);
}

.auth-card {
    background: var(--white);
    width: 100%;
    max-width: 360px;
    padding: 2.5rem 2rem;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.25);
}

.auth-card h1 {
    margin: 0 0 0.25rem;
    font-size: 1.4rem;
    color: var(--navy);
}

.auth-subtitle {
    margin: 0 0 1.5rem;
    color: var(--ink-soft);
    font-size: 0.9rem;
}

/* ---------- Forms (shared) ---------- */
form label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin: 1rem 0 0.35rem;
    color: var(--ink);
}
.page label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin: 1rem 0 0.35rem;
    color: var(--ink);
}

form input[type="text"],
form input[type="password"] {
    width: 100%;
    padding: 0.6rem 0.7rem;
    font-size: 0.95rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--white);
}

form input:focus {
    outline: 2px solid var(--blue);
    outline-offset: 1px;
    border-color: var(--blue);
}

.form-error {
    color: var(--red);
    font-size: 0.85rem;
    min-height: 1.1em;
    margin-top: 0.6rem;
}

.form-success {
    color: var(--green);
    font-size: 0.85rem;
    margin-top: 0.6rem;
    overflow-wrap: anywhere;
}

.modal-subtitle {
    margin: 0 0 0.75rem;
    font-size: 0.88rem;
    color: var(--ink-soft);
}

button { font-family: inherit; cursor: pointer; }

.btn-primary {
    background: var(--blue);
    color: var(--white);
    border: none;
    padding: 0.65rem 1.1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
}
.btn-primary:hover { background: var(--navy); }
.btn-primary:disabled { opacity: 0.6; cursor: default; }

.btn-secondary {
    background: var(--white);
    color: var(--ink);
    border: 1px solid var(--border);
    padding: 0.65rem 1.1rem;
    border-radius: 6px;
    font-size: 0.9rem;
}
.btn-secondary:hover { background: var(--bg); }

.btn-link {
    background: none;
    border: none;
    color: var(--blue);
    font-size: 0.85rem;
    padding: 0.2rem 0.4rem;
}
.btn-link:hover { text-decoration: underline; }

.auth-card button[type="submit"] {
    width: 100%;
    margin-top: 1.4rem;
    background: var(--blue);
    color: var(--white);
    border: none;
    padding: 0.7rem;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
}
.auth-card button[type="submit"]:hover { background: var(--navy); }

/* ---------- App shell ---------- */
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--navy);
    color: var(--white);
    padding: 0.85rem 1.5rem;
}
.topbar-brand { font-weight: 700; font-size: 1.05rem; }
.topbar-brand span { font-weight: 400; opacity: 0.75; }
.topbar-nav { display: flex; align-items: center; gap: 1rem; font-size: 0.85rem; }
.topbar-user { opacity: 0.85; }
.topbar .btn-link { color: var(--white); }

.page { max-width: 900px; margin: 2rem auto; padding: 0 1.5rem; }
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}
.page-header h1 { margin: 0; font-size: 1.5rem; }

.toggle-inactive {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: var(--ink-soft);
    margin-bottom: 1rem;
}

/* ---------- Table ---------- */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.data-table th, .data-table td {
    text-align: left;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.92rem;
}
.data-table th {
    background: var(--bg);
    color: var(--ink-soft);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.row-actions { text-align: right; white-space: nowrap; }

.status-pill {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
}
.status-active { background: var(--green-bg); color: var(--green); }
.status-inactive { background: var(--red-bg); color: var(--red); }

.empty-state {
    text-align: center;
    color: var(--ink-soft);
    padding: 2rem;
}

/* ---------- Modal ---------- */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(10, 20, 30, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}
.modal[hidden] {
    display: none;
}
.modal-card {
    background: var(--white);
    width: 100%;
    max-width: 400px;
    padding: 1.75rem;
    border-radius: 10px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}
.modal-card h2 { margin: 0 0 0.5rem; font-size: 1.15rem; }
.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.6rem;
    margin-top: 1.4rem;
}

/* ---------- Vendor mobile-first additions ---------- */
.brand-logo {
    height: 28px;
    width: 28px;
    border-radius: 6px;
    object-fit: cover;
    margin-right: 0.5rem;
    vertical-align: middle;
}

.tenant-picker {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}
.tenant-picker-item { margin: 0; }
.tenant-picker-btn {
    width: 100%;
    text-align: left;
    background: var(--white);
    border: 1px solid var(--border);
    padding: 1rem;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    color: var(--ink);
}
.tenant-picker-btn:hover { border-color: var(--blue); }

.search-input {
    width: 100%;
    padding: 0.7rem 0.9rem;
    font-size: 0.95rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 1rem;
    box-sizing: border-box;
}
.search-input:focus {
    outline: 2px solid var(--blue);
    outline-offset: 1px;
    border-color: var(--blue);
}

.back-link {
    display: inline-block;
    color: var(--blue);
    text-decoration: none;
    font-size: 0.88rem;
    margin-bottom: 0.75rem;
}
.back-link:hover { text-decoration: underline; }

.card-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.list-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: var(--white);
    border-radius: var(--radius);
    padding: 1rem 1.1rem;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    min-height: 44px; /* touch target */
    overflow: hidden;
}
.list-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.list-card-static { cursor: default; }
.card-clickable { cursor: pointer; }
.card-clickable:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.list-card-main { flex: 1; min-width: 0; }
.list-card-title { font-weight: 600; font-size: 0.98rem; }
.list-card-sub { font-size: 0.85rem; color: var(--ink-soft); margin-top: 0.15rem; }
.list-card-meta {
    font-size: 0.85rem;
    color: var(--ink-soft);
    white-space: nowrap;
    font-weight: 600;
}
.points-positive { color: var(--green); }
.points-negative { color: var(--red); }

.customer-header { margin-bottom: 1.2rem; }
.customer-header h1 { margin: 0 0 0.2rem; font-size: 1.4rem; }
.customer-sub { font-size: 0.88rem; color: var(--ink-soft); }

.points-balance {
    background: var(--blue-light);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    margin: 1.2rem 0;
}
.points-balance-number { font-size: 2.4rem; font-weight: 700; color: var(--navy); line-height: 1; }
.points-balance-label { font-size: 0.85rem; color: var(--ink-soft); margin-top: 0.3rem; text-transform: uppercase; letter-spacing: 0.04em; }

.btn-full { width: 100%; padding: 0.85rem; font-size: 1rem; margin-bottom: 1.5rem; }

.section-heading { font-size: 1.05rem; margin: 1.5rem 0 0.8rem; }

/* Larger touch targets on small screens */
@media (max-width: 480px) {
    .page { padding: 0 1rem; margin-top: 1rem; }
    .btn-primary, .btn-secondary, .btn-link { min-height: 40px; }
    .page-header { flex-wrap: wrap; gap: 0.75rem; }
}

.auth-footer {
    text-align: center;
    font-size: 0.85rem;
    color: var(--ink-soft);
    margin-top: 1.2rem;
}
.auth-footer a { color: var(--blue); }

.page-intro {
    color: var(--ink-soft);
    font-size: 0.9rem;
    margin-top: -0.5rem;
    margin-bottom: 1.2rem;
}

.shop-result { align-items: center; }

.no-results {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.2rem;
    margin-top: 1rem;
}
.no-results label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin: 0.9rem 0 0.35rem;
}
.no-results input[type="text"] {
    width: 100%;
    padding: 0.6rem 0.7rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    box-sizing: border-box;
    margin-bottom: 0.9rem;
}

.method-picker {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}
.method-picker[hidden] {
    display: none;
}
.method-option {
    flex: 1;
    min-width: 150px;
    background: var(--white);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 0.9rem;
    text-align: left;
    cursor: pointer;
}
.method-option:hover { border-color: var(--blue); }
.method-option-selected {
    border-color: var(--blue);
    background: var(--blue-light);
}
.method-option-title { font-weight: 600; font-size: 0.95rem; }
.method-option-sub { font-size: 0.8rem; color: var(--ink-soft); margin-top: 0.2rem; }

.list-card-thumb {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
    margin-right: 0.2rem;
}
.list-card-content {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex: 1;
    min-width: 0;
}

/* ==================================================================
   New app shell (Home / Rewards / More) - navy/star aesthetic with a
   fixed bottom nav. Deliberately separate from .topbar/.page above,
   which stay in use on login/signup/find-shop/verify-email.
   ================================================================== */

.app-body {
    padding-bottom: 76px; /* clearance for the fixed bottom nav */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-topbar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    background: var(--navy);
    color: var(--white);
    padding: 0.9rem 1.25rem;
    position: sticky;
    top: 0;
    z-index: 20;
    flex-shrink: 0;
}
.app-topbar-brand { font-weight: 700; font-size: 1.05rem; grid-column: 2; text-align: center; }
.back-link-icon {
    color: var(--white);
    display: flex;
    align-items: center;
    text-decoration: none;
    grid-column: 1;
    justify-self: start;
}
.bell-btn {
    background: none;
    border: none;
    color: var(--white);
    padding: 0.2rem;
    display: flex;
    opacity: 0.9;
    grid-column: 3;
    justify-self: end;
}
.bell-btn:disabled { cursor: default; }
a.bell-btn { position: relative; text-decoration: none; cursor: pointer; }
.bell-badge {
    position: absolute;
    top: -3px;
    right: -5px;
    background: var(--red);
    color: var(--white);
    font-size: 0.62rem;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    line-height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    text-align: center;
    box-sizing: border-box;
}
.bell-badge[hidden],
.bottom-nav-badge[hidden],
.pending-badge[hidden] { display: none; }
.message-preview {
    font-size: 0.85rem;
    color: var(--ink-soft);
    margin-top: 0.15rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.message-source { font-size: 0.78rem; font-weight: 600; color: var(--ink-soft); margin-bottom: 0.1rem; }

.app-page {
    max-width: 480px;
    width: 100%;
    margin: 0 auto;
    padding: 1.25rem 1.1rem 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Buttons that happen to be <button class="list-card"> (e.g. My Shops
   switcher) shouldn't look like browser-default buttons. */
button.list-card {
    font-family: inherit;
    font-size: inherit;
}

/* ---------- Bottom nav ---------- */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    background: var(--white);
    border-top: 1px solid var(--border);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
    z-index: 30;
}
.bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    padding: 0.55rem 0 0.5rem;
    color: var(--ink-soft);
    text-decoration: none;
    font-size: 0.72rem;
    font-weight: 600;
}
.bottom-nav-active { color: var(--navy); }

/* ---------- Empty state (no memberships yet) ---------- */
.empty-hero {
    text-align: center;
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.empty-hero-icon { color: var(--blue); margin-bottom: 1rem; }
.empty-hero h1 { font-size: 1.4rem; margin: 0 0 0.5rem; color: var(--navy); }
.empty-hero p { color: var(--ink-soft); margin: 0 0 1.5rem; }

.btn-large {
    display: inline-block;
    width: 100%;
    padding: 0.9rem;
    font-size: 1rem;
    text-align: center;
    text-decoration: none;
}

/* ---------- Vendor switcher ---------- */
.vendor-switcher {
    width: 100%;
    padding: 0.75rem 0.9rem;
    font-size: 0.98rem;
    font-weight: 600;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--white);
    color: var(--navy);
    margin-bottom: 1.25rem;
}
.vendor-switcher-single {
    padding: 0.75rem 0.9rem;
    font-size: 0.98rem;
    font-weight: 600;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--navy);
    margin-bottom: 1.25rem;
}

/* ---------- Points dashboard (Home) ---------- */
.points-dashboard {
    background: linear-gradient(165deg, var(--navy) 0%, var(--navy-dark) 100%);
    border-radius: 14px;
    padding: 2.25rem 1.5rem 2rem;
    text-align: center;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.points-dashboard-icon { color: #F2C14E; margin-bottom: 0.5rem; }
.points-dashboard-label {
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    color: rgba(255,255,255,0.75);
    font-weight: 700;
}
.points-dashboard-number {
    font-size: 3.4rem;
    font-weight: 800;
    color: var(--white);
    line-height: 1.1;
    margin-top: 0.2rem;
}
.points-dashboard-unit {
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.75);
    font-weight: 700;
    margin-bottom: 1.6rem;
}
.points-dashboard-cta { margin-bottom: 1rem; max-width: 260px; }
.points-dashboard-sub {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.65);
    margin: 0;
    max-width: 260px;
}
.points-dashboard-pending .points-dashboard-icon { color: rgba(255,255,255,0.6); }
.points-dashboard-pending .points-dashboard-sub { margin-top: 0.5rem; color: rgba(255,255,255,0.8); }

.gold-rule {
    display: inline-block;
    width: 22px;
    height: 1px;
    background: rgba(242, 193, 78, 0.6);
    vertical-align: middle;
    margin: 0 0.55rem;
}

/* Icon-flanked button, scoped to the dashboard's Redeem Rewards CTA only -
   other buttons sitewide are untouched. */
.points-dashboard-cta.btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
.btn-icon-right { margin-left: auto; }

@keyframes star-twinkle {
    0%, 100% { opacity: 0.4; transform: scale(0.85); }
    50% { opacity: 0.95; transform: scale(1); }
}
.star-burst g path { transform-origin: center; animation: star-twinkle 2.6s ease-in-out infinite; }
.star-burst g path:nth-child(2) { animation-delay: 0.5s; }
.star-burst g path:nth-child(3) { animation-delay: 1s; }
.star-burst g path:nth-child(4) { animation-delay: 1.5s; }
@media (prefers-reduced-motion: reduce) {
    .star-burst g path { animation: none; }
}

/* ---------- Points banner (Rewards page) ---------- */
.points-banner {
    background: var(--navy);
    color: var(--white);
    border-radius: 12px;
    padding: 1.25rem;
    text-align: center;
    margin-bottom: 1.5rem;
}
.points-banner-label { font-size: 0.72rem; letter-spacing: 0.08em; opacity: 0.8; font-weight: 700; }
.points-banner-number { font-size: 1.7rem; font-weight: 800; margin-top: 0.2rem; color: #F2C14E; }
.points-banner-sub { font-size: 0.8rem; opacity: 0.85; margin-top: 0.3rem; }

/* ---------- Rewards sections ---------- */
.rewards-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 1.5rem 0 0.75rem;
}
.rewards-section-head h2 { font-size: 1.05rem; margin: 0; }
.sort-select {
    font-size: 0.82rem;
    padding: 0.35rem 0.5rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--white);
    color: var(--ink-soft);
}

.rewards-scroll {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding-bottom: 0.3rem;
    margin-bottom: 0.5rem;
}
.rewards-scroll .reward-card { flex: 0 0 150px; }

.rewards-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.9rem;
}

.reward-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.reward-card-img-wrap {
    width: 100%;
    aspect-ratio: 1.2 / 1;
    background: var(--bg);
    cursor: pointer;
}
.reward-card-img-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.reward-card-img-placeholder, .gallery-placeholder { width: 100%; height: 100%; background: var(--blue, #185FA5); display: flex; align-items: center; justify-content: center; color: #F2A33A; }
.gallery-placeholder[hidden] { display: none; }
.gallery-placeholder svg { width: 42%; max-width: 96px; height: auto; }
.reward-card-img-placeholder svg { width: 42%; max-width: 64px; height: auto; }
.reward-card-body { padding: 0.7rem 0.75rem 0.85rem; }
.reward-card-title {
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.25;
    margin-bottom: 0.35rem;
    /* clamp to 2 lines so cards stay a consistent height in the grid */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.reward-card-cost {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--ink-soft);
    letter-spacing: 0.03em;
    margin-bottom: 0.6rem;
}
.reward-card-btn { width: 100%; padding: 0.5rem; font-size: 0.82rem; }

/* ---------- Image gallery modal ---------- */
.gallery-modal-card { max-width: 440px; padding: 1.1rem; position: relative; }
.gallery-close-btn {
    position: absolute;
    top: 0.6rem;
    right: 0.6rem;
    background: rgba(0,0,0,0.55);
    color: var(--white);
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 1.2rem;
    line-height: 1;
    z-index: 2;
}
.gallery-img-wrap {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: var(--bg);
    border-radius: 8px;
    overflow: hidden;
}
.gallery-img-el { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-img-el[hidden] { display: none; }
.gallery-thumbs {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.6rem;
    overflow-x: auto;
}
.gallery-thumb-img {
    width: 52px;
    height: 52px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
    cursor: pointer;
    border: 2px solid transparent;
    opacity: 0.7;
}
.gallery-thumb-active { border-color: var(--blue); opacity: 1; }

/* ---------- More / Account page ---------- */
.more-account-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1rem 1.1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    margin-bottom: 1.5rem;
}
.more-account-name { font-weight: 700; font-size: 1.05rem; }
.more-account-email { font-size: 0.85rem; color: var(--ink-soft); margin-top: 0.15rem; }

.history-undone-tag {
    font-weight: 400;
    font-size: 0.78rem;
    color: var(--ink-soft);
    font-style: italic;
}

@media (max-width: 360px) {
    .rewards-grid { grid-template-columns: 1fr 1fr; gap: 0.6rem; }
}

/* ---------- Featured promotion cards - full width, navy, matches Home ---------- */
.promo-featured-list {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}
.promo-featured-card {
    background: linear-gradient(165deg, var(--navy) 0%, var(--navy-dark) 100%);
    border-radius: 14px;
    padding: 1.25rem;
    cursor: pointer;
}
.promo-featured-img-wrap {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 10px;
    overflow: hidden;
    background: rgba(255,255,255,0.08);
    margin-bottom: 1rem;
}
.promo-featured-img-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.promo-featured-title {
    color: var(--white);
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}
.promo-featured-teaser {
    color: rgba(255,255,255,0.75);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}
.promo-featured-card .btn-primary { width: auto; }

.promo-type-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    margin-bottom: 0.35rem;
}
.promo-type-featured { background: var(--green-bg); color: var(--green); }
.promo-type-deal { background: #FDE9D0; color: #B5590A; }
.promo-type-special { background: #DCEAFB; color: var(--blue); }

/* ---------- Promotion "I'm interested" toggle button ---------- */
.interested-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
}
.interested-btn-active {
    background: #FBEAF0;
    border-color: #D6336C;
    color: #D6336C;
}
.interested-btn-active #interested-icon path { fill: #D6336C; }

/* ---------- Pending/unread alert badges ---------- */
.pending-badge {
    background: var(--red);
    color: var(--white);
    font-size: 0.72rem;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    padding: 0 0.35rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-right: 0.4rem;
}
.bottom-nav-icon-wrap { position: relative; display: inline-flex; }
.bottom-nav-badge {
    position: absolute;
    top: -4px;
    right: -8px;
    background: var(--red);
    color: var(--white);
    font-size: 0.6rem;
    font-weight: 700;
    min-width: 15px;
    height: 15px;
    padding: 0 0.25rem;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* ---------- Unread message indicator ---------- */
.message-unread-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--blue);
    margin-right: 0.4rem;
    vertical-align: middle;
}

#message-detail-link[hidden] { display: none; }

/* Promotion details popup: keep the picture to a sensible height on any screen */
#details-img-wrap { aspect-ratio: 16 / 10; max-height: 36vh; }

/* Header title with the current business and shop underneath */
.app-topbar-stack {
    grid-column: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
    max-width: 62vw;
}
.app-topbar-stack .app-topbar-brand { grid-column: auto; }
.app-topbar-sub {
    font-size: 0.72rem;
    font-weight: 400;
    color: rgba(255,255,255,0.78);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    margin-top: 0.1rem;
}

/* ---------- App rewards (bonus goals) ---------- */
.goal-card .list-card-title { display: flex; justify-content: space-between; gap: 0.5rem; align-items: baseline; }
.goal-points { font-size: 0.8rem; font-weight: 700; color: var(--green); white-space: nowrap; }
.goal-bar { height: 6px; background: var(--bg); border-radius: 3px; overflow: hidden; margin-top: 0.5rem; border: 1px solid var(--border); }
.goal-bar-fill { height: 100%; background: var(--navy); }
.goal-bar-done { background: var(--green); }
.goal-status { font-size: 0.78rem; color: var(--ink-soft); margin-top: 0.25rem; }
.app-toast {
    position: fixed;
    left: 50%;
    bottom: 90px;
    transform: translate(-50%, 20px);
    background: var(--navy);
    color: var(--white);
    padding: 0.7rem 1.1rem;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    max-width: 90vw;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    z-index: 60;
    box-shadow: 0 4px 14px rgba(0,0,0,0.25);
}
.app-toast-show { opacity: 1; transform: translate(-50%, 0); }

/* Find your shop: keep the step title and the line under it from overlapping. */
.find-step-label {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.35;
    margin: 0.5rem 0 0.4rem;
    color: var(--ink);
}
.find-step-intro {
    margin-top: 0;
    margin-bottom: 1rem;
    line-height: 1.45;
}

/* A low-key section: present and reachable, but not shouting for attention. */
.quiet-details {
    margin: 1.5rem 0 0;
    font-size: 0.85rem;
    color: var(--ink-soft);
    text-align: center;
}
.quiet-details > summary {
    display: inline-block;
    cursor: pointer;
    color: var(--ink-soft);
    text-decoration: underline;
}
.quiet-details[open] { text-align: left; }
.quiet-details[open] > summary { display: block; text-align: center; }

/* Manual add-a-shop form on find-shop */
.manual-shop-link-row { margin: 0.8rem 0 0; }
.manual-shop[hidden] { display: none; }
.manual-shop { margin-top: 1.2rem; }
.manual-shop label { display: block; margin: 0.7rem 0 0.25rem; font-weight: 600; }
.manual-shop input[type="text"] { width: 100%; box-sizing: border-box; }
.manual-shop-actions { display: flex; gap: 0.7rem; margin-top: 0.9rem; }

/* Location notice and city or zip fallback on find-shop */
.location-notice[hidden], .location-notice [hidden], .location-area-active[hidden] { display: none; }
.location-notice { border: 1px solid var(--border, #d0d7de); border-radius: 10px; padding: 0.9rem; margin: 0.6rem 0 0.9rem; }
.location-notice-title { margin: 0 0 0.3rem; font-weight: 600; }
.location-notice-text { margin: 0 0 0.6rem; font-size: 0.92rem; }
.location-area-row { display: flex; gap: 0.6rem; margin-top: 0.7rem; }
.location-area-row input { flex: 1; min-width: 0; }
.location-area-active { margin: 0.4rem 0 0.8rem; font-size: 0.92rem; }

/* Delete account page */
.delete-account-card { margin: 0.8rem 0 1rem; }
.delete-account-list { margin: 0.5rem 0 0; padding-left: 1.2rem; font-size: 0.93rem; }
.delete-account-list li { margin-bottom: 0.4rem; }
.delete-account-confirm { display: flex; gap: 0.7rem; align-items: flex-start; font-weight: 400; margin: 0.9rem 0 0; }
.delete-account-confirm input { width: auto; margin-top: 0.25rem; flex: 0 0 auto; }
.delete-account-btn { margin-top: 0.8rem; background: var(--red, #B23A2E); }

.report-link { display: block; margin-top: 1rem; font-size: 0.85rem; color: var(--ink-soft, #666); text-align: center; text-decoration: underline; }

/* ---------- iPhone safe areas (status bar, notch, home indicator) ---------- */
body:not(:has(.topbar, .app-topbar)) { padding-top: env(safe-area-inset-top, 0px); }
.bottom-nav, .vendor-bottom-nav { padding-bottom: env(safe-area-inset-bottom, 0px); }
.app-topbar, .topbar { padding-top: calc(0.9rem + env(safe-area-inset-top, 0px)); }
.app-body { padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
