/* =========================================================
   KopiBean APP — fresh stylesheet (mobile-first, Inter only)
   ========================================================= */

/* ---------- design tokens ---------- */
:root {
    --bg: #F5EFE5;
    --surface: #FFFFFF;
    --surface-2: #FAF6EE;
    --ink: #1F1B17;
    --ink-2: #3A332B;
    --muted: #8C8478;
    --muted-2: #B5AEA4;
    --border: #EDE3D2;
    --border-2: #E2D6C0;
    --primary: #3F6B4A;
    --primary-2: #5C8A5F;
    --primary-soft: #E2ECDD;
    --accent: #C66E2D;
    --accent-soft: #F6E5D2;
    --danger: #C24A4A;
    --danger-soft: #F6DEDB;

    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    --shadow-sm: 0 2px 6px rgba(31, 27, 23, 0.04);
    --shadow-md: 0 6px 18px rgba(31, 27, 23, 0.08);
    --shadow-lg: 0 12px 32px rgba(31, 27, 23, 0.12);

    --footer-h: 78px;
    --container: 480px;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    font-size: 15px;
    line-height: 1.45;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    min-height: 100vh;
}
img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }
h1, h2, h3, h4, p { margin: 0; }
svg { display: block; }

/* ---------- typography helpers ---------- */
.h1        { font-size: 28px; font-weight: 700; letter-spacing: -0.01em; color: var(--ink); }
.h1-bold   { font-size: 28px; font-weight: 800; letter-spacing: -0.01em; color: var(--ink); }
.h2-bold   { font-size: 22px; font-weight: 700; letter-spacing: -0.01em; color: var(--ink); }
.h3        { font-size: 18px; font-weight: 700; color: var(--ink); }
.h3-bold   { font-size: 18px; font-weight: 700; color: var(--ink); }
.bold      { font-weight: 700; }
.desc      { color: var(--muted); font-size: 13px; }
.text      { color: var(--ink-2); font-size: 14px; }
.text-center { text-align: center; }

.eyebrow {
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--muted);
}

/* ---------- page shell ---------- */
#page-content {
    max-width: var(--container);
    margin: 0 auto;
    padding: 16px 18px 100px;
}
body.desktop-view #page-content {
    padding-bottom: 100px;
}

.section { margin: 18px 0; }

/* =========================================================
   Top page header (greeting / title) — provided by pages
   ========================================================= */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 0 8px;
}
.page-header__greeting {
    font-size: 13px;
    color: var(--muted);
    font-weight: 500;
}
.page-header__name {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--ink);
}
.page-header__title {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--ink);
}
.page-header__avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--surface);
    border: 1px solid var(--border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--ink);
    overflow: hidden;
    cursor: pointer;
    flex: 0 0 44px;
}
.page-header__avatar img {
    width: 100%; height: 100%; object-fit: cover;
}

/* =========================================================
   Hamburger (legacy `.navbar`) — kept invisible, JS still uses it
   ========================================================= */
.navbar { position: fixed; inset: auto auto auto 0; z-index: 55; }
.navbar > .navbar-icon { display: none; }

/* =========================================================
   Side menu (slide-in drawer)
   ========================================================= */
#menu-main-overlay {
    position: fixed; inset: 0;
    background: rgba(31, 27, 23, 0.45);
    display: none; opacity: 0;
    transition: opacity .25s ease;
    z-index: 90;
}
#menu-main {
    position: fixed; top: 0; right: 0;
    width: 85%; max-width: 360px; height: 100vh;
    background: #FAF4F0;
    transform: translateX(120%);
    transition: transform .3s ease;
    z-index: 95;
    padding: 22px 20px 30px;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}
.navbar-content-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 20px;
}
.logo-container {
    display: flex; align-items: center; gap: 10px;
    font-weight: 700; color: var(--ink);
}
.icon-button {
    width: 40px; height: 40px;
    border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--surface-2);
    cursor: pointer;
}
.user-image {
    width: 64px; height: 64px;
    border-radius: 50%;
    background: var(--primary-soft);
    object-fit: cover;
    margin: 8px 0 16px;
}
.navbar-register {
    background: var(--surface-2);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 20px;
}
.navbar-register .h2-bold { font-size: 18px; margin-bottom: 6px; }
.socials-wrapper {
    display: flex; gap: 10px; margin-top: 14px;
}
.button-social {
    flex: 1;
    height: 44px;
    border-radius: var(--radius-md);
    background: var(--surface);
    border: 1px solid var(--border);
    display: inline-flex; align-items: center; justify-content: center;
}
.button-social:hover { background: var(--surface-2); }

.menu { margin-bottom: 18px; }
.menu-label {
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.12em;
    color: var(--muted);
    margin: 8px 0 6px;
    font-weight: 600;
}
.menu-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 8px;
    border-radius: var(--radius-sm);
    color: var(--ink);
    cursor: pointer;
}
.menu-item:hover { background: var(--surface-2); }
.menu-item.selected { color: var(--primary); background: var(--primary-soft); }
.menu-item.selected .menu-item-title-text { font-weight: 700; }
.menu-item-title { display: flex; align-items: center; gap: 12px; }
.menu-item-title-text { font-size: 15px; }
.menu-item .dot { display: none; }
.menu-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 4px 14px;
}
.menu-items { display: flex; flex-direction: column; gap: 2px; }

/* =========================================================
   Buttons
   ========================================================= */
.button-default,
.button-primary {
    display: inline-flex; align-items: center; justify-content: center;
    width: 100%;
    background: var(--ink);
    color: #fff;
    border: 0;
    border-radius: var(--radius-md);
    padding: 16px 20px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.01em;
    cursor: pointer;
    transition: background .15s ease, transform .05s ease;
}
.button-default:hover,
.button-primary:hover { background: #2d2823; }
.button-default:active,
.button-primary:active { transform: translateY(1px); }
.button-default-medium { padding: 14px 18px; }

.button-outline {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    width: 100%;
    background: var(--surface);
    color: var(--ink);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    font-size: 15px;
    font-weight: 600;
}
.button-outline:hover { background: var(--surface-2); }

.button-text {
    display: inline-block;
    background: none; border: 0; padding: 6px 2px;
    color: var(--primary); font-weight: 600; font-size: 14px;
}

.link-bold { color: var(--ink); font-weight: 700; text-decoration: underline; }

/* =========================================================
   Bottom navigation (5 tabs + center QR FAB)
   ========================================================= */
.footer {
    position: fixed; left: 0; right: 0; bottom: 0;
    background: var(--surface);
    border-top: 1px solid var(--border);
    z-index: 50;
    padding: 6px 4px calc(env(safe-area-inset-bottom, 0px) + 6px);
}
.footer-content {
    max-width: var(--container);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    align-items: end;
    gap: 4px;
    position: relative;
}
.footer-content-item {
    display: flex; flex-direction: column; align-items: center;
    padding: 8px 2px 4px;
}
.tab {
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 500;
    padding: 4px 0;
    width: 100%;
}
.tab .tab-icon { color: inherit; }
.tab.selected,
.tab.selected .tab-icon,
.tab.selected .tab-label { color: var(--primary); }
.tab.selected .tab-label { font-weight: 600; }
.tab-label { font-size: 11px; line-height: 1; color: inherit; }

.footer-content-item--fab {
    position: relative;
    padding-top: 0;
}
.tab-fab {
    width: 56px; height: 56px;
    border-radius: 50%;
    background: var(--ink);
    display: inline-flex; align-items: center; justify-content: center;
    color: #fff;
    box-shadow: 0 8px 22px rgba(31, 27, 23, 0.28);
    margin-top: -22px;
    transition: transform .15s ease;
}
.tab-fab:hover { transform: translateY(-2px); }
.tab-label--fab { color: #000; margin-top: 6px; }

body.desktop-view .footer { position: absolute; }

/* =========================================================
   Popups & modals (language picker, generic popup, my-QR, modal)
   ========================================================= */
.language-overlay,
.popup-overlay,
.pointsPopup-overlay,
.modal-overlay,
.myqr-overlay {
    position: fixed; inset: 0;
    background: rgba(31, 27, 23, 0.45);
    opacity: 0;
    transition: opacity .25s ease;
    z-index: 200;
}
.language-content {
    position: fixed; left: 0; right: 0; bottom: 0;
    background: var(--surface);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    padding: 20px 18px 24px;
    transform: translateY(100%);
    transition: transform .3s ease;
    z-index: 210;
    box-shadow: var(--shadow-lg);
}
.language-content .menu-items { gap: 4px; }
.language-content .menu-item img[alt="home"] {
    width: 24px; height: 18px; border-radius: 3px; object-fit: cover;
}

.popup { position: fixed; inset: 0; z-index: 210; display: none; flex-direction: column; }
.popup-content {
    margin-top: auto;
    background: var(--surface);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    padding: 18px 20px 28px;
    transform: translateY(100%);
    transition: transform .3s ease;
    box-shadow: var(--shadow-lg);
}
.popup .gap { flex: 1; }
.popup .chevron { margin: 4px auto 8px; }
.popup-desc .h1-bold { margin-bottom: 6px; }
.popup-desc p { color: var(--muted); font-size: 14px; }
.popup-bottom { margin-top: 14px; }
.popup-square {
    margin-top: 14px;
    background: var(--surface-2);
    border-radius: var(--radius-lg);
    padding: 16px;
    text-align: center;
}
.popup-square img { margin: 0 auto; max-width: 220px; }

/* My loyalty QR popup */
.myqr-popup {
    position: fixed; inset: 0;
    display: none; align-items: center; justify-content: center;
    padding: 0 24px;
    z-index: 220;
}
.myqr-popup.is-open .myqr-card { transform: scale(1); opacity: 1; }
.myqr-card {
    position: relative;
    width: 100%; max-width: 340px;
    background: var(--surface);
    border-radius: var(--radius-xl);
    padding: 26px 22px 24px;
    text-align: center;
    transform: scale(0.92);
    opacity: 0;
    transition: transform .25s ease, opacity .25s ease;
    box-shadow: var(--shadow-lg);
}
.myqr-close {
    position: absolute; top: 12px; right: 12px;
    width: 34px; height: 34px;
    border-radius: 50%;
    background: var(--surface-2);
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--ink);
    cursor: pointer;
}
.myqr-title { font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.myqr-sub { font-size: 14px; color: var(--muted); margin-bottom: 18px; }
.myqr-image {
    background: var(--surface-2);
    border-radius: var(--radius-lg);
    padding: 14px;
    display: inline-block;
}
.myqr-image img { width: 220px; height: 220px; }
.myqr-cta { margin-top: 6px; }

/* Modal */
.modal { position: fixed; inset: 0; z-index: 230; display: none; flex-direction: column; padding: 20px; }
.modal-content {
    background: var(--surface);
    border-radius: var(--radius-xl);
    padding: 24px 20px;
    margin: auto;
    width: 100%; max-width: 360px;
    text-align: center;
    transform: scale(.25);
    opacity: 0;
    transition: transform .2s ease, opacity .2s ease;
    box-shadow: var(--shadow-lg);
}
.modal-block { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.modal-header { display: flex; flex-direction: column; gap: 4px; }
.modal-header-desc { color: var(--muted); font-size: 14px; }
.modal-hr { width: 100%; height: 1px; background: var(--border); }
.modal-desc { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.modal-desc-items { display: flex; flex-direction: column; gap: 6px; }
.modal-desc-items-item {
    display: flex; justify-content: space-between;
    padding: 8px 12px;
    background: var(--surface-2);
    border-radius: var(--radius-sm);
    font-size: 14px;
}
.modal-desc-items-item-label { color: var(--muted); }

/* =========================================================
   Alerts
   ========================================================= */
.alert {
    border-radius: var(--radius-md);
    padding: 12px 14px;
    font-size: 14px;
    margin-bottom: 16px;
}
.alert-warning { background: var(--accent-soft); color: var(--accent); }
.alert-success { background: var(--primary-soft); color: var(--primary); }
.alert a { color: inherit; text-decoration: underline; font-weight: 600; }

/* =========================================================
   HOME PAGE
   ========================================================= */
.home-page .page-header { padding-top: 8px; }

/* Featured / hero card (e.g. "Dominica Barahona AA") */
.hero-card {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 16 / 11;
    background: #2b211a center/cover no-repeat;
    color: #fff;
    box-shadow: var(--shadow-sm);
}
.hero-card__overlay {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0) 30%, rgba(0,0,0,0.65) 100%);
}
.hero-card__badge {
    position: absolute; top: 14px; left: 14px;
    background: rgba(31, 27, 23, 0.85);
    color: #fff;
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 6px 10px;
    border-radius: 999px;
    font-weight: 600;
}
.hero-card__body {
    position: absolute; left: 18px; right: 18px; bottom: 16px;
    z-index: 2;
}
.hero-card__title { font-size: 22px; font-weight: 700; line-height: 1.1; letter-spacing: -0.01em; }
.hero-card__desc { font-size: 13px; opacity: 0.9; margin-top: 6px; }
.hero-card__link {
    display: inline-block;
    margin-top: 10px;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
}
.hero-card__dots {
    position: absolute; right: 16px; bottom: 16px;
    display: flex; gap: 4px; z-index: 2;
}
.hero-card__dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,0.5); }
.hero-card__dot.is-active { background: #fff; width: 14px; border-radius: 999px; }

/* Slick news slider on home */
.news-slider { position: relative; }
.news-slider.slick-initialized .slick-slide { height: auto; }
.news-slider .hero-card--slide { display: block; text-decoration: none; color: #fff; }
.news-slider:not(.slick-initialized) .hero-card--slide ~ .hero-card--slide { display: none; }
.news-slider .slick-dots {
    position: absolute; right: 16px; bottom: 16px; left: auto;
    display: flex !important; gap: 4px; z-index: 3;
    list-style: none; padding: 0; margin: 0;
    width: auto;
}
.news-slider .slick-dots li { width: auto; height: auto; margin: 0; }
.news-slider .slick-dots li button {
    width: 6px; height: 6px; padding: 0;
    border: 0; border-radius: 50%;
    background: rgba(255,255,255,0.5);
    font-size: 0; line-height: 0;
    text-indent: -9999px;
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}
.news-slider .slick-dots li button:before { display: none; }
.news-slider .slick-dots li.slick-active button {
    background: #fff;
    width: 14px;
    border-radius: 999px;
}

/* Green loyalty-QR card */
.loyalty-qr-card {
    margin-top: 14px;
    background: var(--primary);
    color: #fff;
    border-radius: var(--radius-lg);
    padding: 16px;
    display: flex; align-items: center; gap: 14px;
    box-shadow: var(--shadow-sm);
}
.loyalty-qr-card__thumb {
    width: 70px; height: 70px;
    flex: 0 0 70px;
    background: #fff;
    border-radius: var(--radius-md);
    display: inline-flex; align-items: center; justify-content: center;
    padding: 8px;
    cursor: pointer;
}
.loyalty-qr-card__thumb img { width: 100%; height: 100%; object-fit: contain; }
.loyalty-qr-card__body { flex: 1; min-width: 0; }
.loyalty-qr-card__eyebrow {
    font-size: 10px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    opacity: 0.78;
    font-weight: 600;
}
.loyalty-qr-card__title { font-size: 20px; font-weight: 700; line-height: 1.1; margin-top: 4px; }
.loyalty-qr-card__sub { font-size: 13px; opacity: 0.85; margin-top: 4px; }

/* Section heading row */
.section-heading {
    display: flex; align-items: center; justify-content: space-between;
    padding: 22px 0 12px;
}
.section-heading__title { font-size: 18px; font-weight: 700; color: var(--ink); }
.section-heading__action { font-size: 13px; color: var(--muted); font-weight: 500; }

/* Subscriptions grid */
.sub-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.sub-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 16px;
    box-shadow: var(--shadow-sm);
    display: flex; flex-direction: column; gap: 10px;
    min-height: 170px;
}
.sub-card__name { font-weight: 700; font-size: 16px; }
.sub-card__desc { font-size: 12px; color: var(--muted); }
.sub-card__dots {
    display: flex; flex-wrap: wrap; gap: 6px;
    margin-top: 2px;
}
.sub-card__dot {
    width: 16px; height: 16px;
    border-radius: 50%;
    background: var(--surface-2);
}
.sub-card__dot.is-on { background: var(--primary); }
.sub-card__footer {
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid var(--border);
    font-size: 12px;
    color: var(--muted);
}
.sub-card--add {
    align-items: center;
    justify-content: center;
    text-align: center;
    border: 1.5px dashed var(--border-2);
    background: transparent;
    box-shadow: none;
}
.sub-card--add__icon {
    width: 36px; height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border-2);
    display: inline-flex; align-items: center; justify-content: center;
    margin-bottom: 8px;
    color: var(--ink);
}
.sub-card--add__label { font-size: 13px; color: var(--ink); font-weight: 500; }

/* Loyalty program card (Bronz / progress) */
.loyalty-program {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 16px 16px 18px;
    box-shadow: var(--shadow-sm);
}
.loyalty-program__eyebrow {
    font-size: 10px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
    font-weight: 700;
}
.loyalty-program__tier {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.01em;
    margin-top: 4px;
}
.loyalty-program__bar {
    margin-top: 14px;
    height: 8px;
    background: var(--accent-soft);
    border-radius: 999px;
    overflow: hidden;
}
.loyalty-program__bar > span {
    display: block; height: 100%;
    background: var(--accent);
    border-radius: 999px;
}
.loyalty-program__meta {
    display: flex; justify-content: space-between; align-items: center;
    margin-top: 10px;
    font-size: 13px;
    color: var(--accent);
    font-weight: 600;
}
.loyalty-program__meta-right { color: var(--muted); font-weight: 500; display: flex; align-items: center; gap: 8px; }
.loyalty-program__chip {
    background: var(--accent-soft);
    color: var(--accent);
    border-radius: 999px;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 700;
}

/* App-download block */
#download_app {
    margin-top: 22px;
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 16px;
    box-shadow: var(--shadow-sm);
    text-align: center;
}
#download_app p { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
#download_app a { display: inline-block; width: 48%; }

.show-businesses { margin-top: 18px; }

/* =========================================================
   SEARCH (Naše podniky)
   ========================================================= */
.businesses .page-header { padding-top: 8px; }

.search-wrapper {
    position: relative;
    margin-top: 6px;
    margin-bottom: 18px;
}
.search-wrapper input.search {
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 13px 14px 13px 42px;
    font-size: 14px;
    color: var(--ink);
    outline: none;
    box-shadow: var(--shadow-sm);
}
.search-wrapper input.search::placeholder { color: var(--muted-2); }
.search-wrapper input.search:focus { border-color: var(--primary); }
.search-wrapper > img,
.search-wrapper > svg {
    position: absolute; left: 14px; top: 50%;
    transform: translateY(-50%);
    width: 18px; height: 18px;
    color: var(--muted);
}

/* QR scanner block (kept but minimal & hidden by default) */
.section.scanner {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 16px;
    box-shadow: var(--shadow-sm);
    display: flex; align-items: center; gap: 12px;
    margin: 14px 0;
}
.scanner-content {
    display: flex; align-items: center; gap: 12px;
    flex: 1;
}
.scnanner-logo,
.scanner-logo {
    width: 48px; height: 48px;
    background: var(--primary-soft);
    border-radius: var(--radius-md);
    display: inline-flex; align-items: center; justify-content: center;
}
.scanner-content .h2-bold { font-size: 14px; }
.scanner-button {
    background: var(--ink);
    color: #fff; border: 0;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 13px;
}

/* Last-visited heading */
.section.last-visited { padding: 8px 0 0; }
.section.last-visited .h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--ink);
}

#loader { margin: 16px 0; }

/* Business cards (spots) */
.section.all-businesses {
    display: flex; flex-direction: column;
    gap: 14px;
}
.spot {
    display: block;
    background: var(--surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    color: inherit;
}
.spot:hover { box-shadow: var(--shadow-md); }
.spot .inner {
    position: relative;
    height: 180px;
    background: var(--surface-2) center/cover no-repeat;
}
.spot .inner::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0) 50%, rgba(0,0,0,0.18) 100%);
}
.spot .badge {
    position: absolute; top: 12px; left: 12px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(6px);
    color: var(--ink);
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    z-index: 1;
    display: inline-flex; align-items: center; gap: 6px;
}
.spot .badge .text { color: inherit; }
.spot .status-pill {
    position: absolute; top: 12px; right: 12px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 600;
    display: inline-flex; align-items: center; gap: 6px;
    color: var(--ink);
    z-index: 1;
}
.spot .status-pill::before {
    content: ""; width: 7px; height: 7px; border-radius: 50%;
    background: var(--primary);
}
.spot .status-pill.is-closed::before { background: var(--danger); }
.spot .outer {
    padding: 14px 16px 16px;
    display: flex; flex-direction: column; gap: 4px;
}
.spot .outer h2 {
    font-size: 17px; font-weight: 700; color: var(--ink); letter-spacing: -0.01em;
}
.spot .outer p {
    font-size: 13px; color: var(--muted);
}
.spot .outer .meta {
    margin-top: 8px;
    display: flex; gap: 10px; align-items: center;
    font-size: 13px;
    color: var(--muted);
}
.spot .pill {
    background: var(--primary-soft);
    color: var(--primary);
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
}
.spot .pill.is-closed { background: var(--danger-soft); color: var(--danger); }
.spot .meta b { color: var(--ink); font-weight: 700; }

.highlight {
    background: var(--accent-soft);
    color: var(--accent);
    border-radius: 4px;
    padding: 0 3px;
}

#preview {
    width: 100%;
    min-height: 337px;
    margin: 14px 0 18px;
    background: #000;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

/* =========================================================
   AUTH PAGES (login / register / passwords)
   ========================================================= */
body.is-auth { background: var(--ink); }

.auth-shell {
    min-height: 100vh;
    display: flex; flex-direction: column;
    background: var(--ink);
}
.auth-hero {
    flex: 0 0 auto;
    color: #fff;
    text-align: center;
    padding: 56px 24px 36px;
}
.auth-hero__logo {
    margin: 0 auto;
    width: 64px; height: 64px;
    filter: invert(1);
}
.auth-hero__wordmark {
    margin-top: 12px;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: 0.18em;
    line-height: 1;
    color: white;
}
.auth-hero__tagline {
    margin-top: 10px;
    font-size: 11px;
    letter-spacing: 0.32em;
    color: rgba(255,255,255,0.7);
}

.auth-sheet {
    flex: 1 1 auto;
    background: var(--bg);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    margin-top: -16px;
    padding: 28px 22px 32px;
    display: flex; flex-direction: column;
    gap: 18px;
}
.auth-sheet .login-header { margin-bottom: 6px; }
.auth-sheet .login-header .h2-bold { font-size: 26px; }
.auth-sheet .login-header-description {
    color: var(--muted);
    font-size: 14px;
    margin-top: 6px;
}

form.login {
    display: flex; flex-direction: column;
    gap: 14px;
}
.login-form { display: flex; flex-direction: column; gap: 14px; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
}

.input-prefix-icon-wrapper {
    position: relative;
}
.input-prefix-icon-wrapper > svg {
    position: absolute; left: 14px; top: 50%;
    transform: translateY(-50%);
    width: 20px; height: 20px;
    color: var(--muted);
    pointer-events: none;
}
.input-prefix-icon-wrapper .input-eye {
    position: absolute; right: 14px; top: 50%;
    transform: translateY(-50%);
    width: 22px; height: 22px;
    color: var(--muted);
    background: none; border: 0; padding: 0;
    cursor: pointer;
}
.input-prefix-icon {
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px 16px 14px 44px;
    font-size: 15px;
    color: var(--ink);
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.input-prefix-icon::placeholder { color: var(--muted-2); }
.input-prefix-icon:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(63,107,74,0.12);
}
.input-prefix-icon.error {
    border-color: var(--danger);
    background: var(--danger-soft);
}
.input-prefix-icon.has-eye { padding-right: 44px; }

span.error {
    display: block;
    font-size: 12px;
    color: var(--danger);
    margin-top: 4px;
}

.forgot-row {
    display: flex; justify-content: flex-end;
    margin-top: -4px;
}
.forgot-row .button-text { color: var(--primary); font-weight: 700; }

.login-footer {
    display: flex; flex-direction: column; align-items: center;
    gap: 14px;
    margin-top: 8px;
}
.login-button { width: 100%; }
.login-footer-no-account {
    font-size: 14px; color: var(--muted);
}
.login-footer-no-account a { color: var(--ink); font-weight: 700; text-decoration: underline; }

/* "or" divider with side lines */
.divider {
    display: flex; align-items: center; gap: 12px;
    width: 100%;
    color: var(--muted);
    font-size: 12px;
}
.divider::before,
.divider::after {
    content: ""; flex: 1; height: 1px;
    background: var(--border);
}

/* Outline social buttons used on auth pages */
.auth-sheet .socials-wrapper {
    flex-direction: column;
    gap: 10px;
    margin-top: 0;
}
.auth-sheet .button-social {
    width: 100%;
    flex: none;
    height: 50px;
    gap: 10px;
    font-weight: 600;
    color: var(--ink);
    padding: 0 14px;
}
.auth-sheet .button-social img { width: 20px; height: 20px; }
.auth-sheet .button-social span { font-size: 14px; }

/* Terms checkbox (register) */
.checkbox-wrapper { font-size: 13px; color: var(--muted-2); }
.checkbox-container {
    display: flex; align-items: flex-start; gap: 10px;
    cursor: pointer;
}
.checkbox-container input[type="checkbox"] {
    appearance: none; -webkit-appearance: none;
    width: 20px; height: 20px;
    border-radius: 6px;
    border: 1.5px solid var(--border-2);
    background: var(--surface);
    margin: 0;
    position: relative;
    flex: 0 0 20px;
    cursor: pointer;
}
.checkbox-container input[type="checkbox"]:checked {
    background: var(--primary);
    border-color: var(--primary);
}
.checkbox-container input[type="checkbox"]:checked::after {
    content: "";
    position: absolute; left: 5px; top: 1px;
    width: 6px; height: 11px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.checkbox-container .checkmark { display: none; }
.checkbox-label {
    font-size: 13px;
    color: var(--ink-2);
    line-height: 1.45;
}
.checkbox-label a { color: var(--ink); text-decoration: underline; font-weight: 600; }

/* =========================================================
   Misc — hide leftover assets we don't render
   ========================================================= */
#navbar-hamburger { display: none; }

@media (min-width: 600px) {
    .auth-sheet { max-width: 480px; margin: -16px auto 0; width: 100%; }
    .auth-hero { padding-top: 80px; }
}



/* =========================================================
   STAGE 2 — Business detail, Subscriptions, News, Profile drawer
   ========================================================= */

/* full-bleed page (hero touches the screen edges) */
#page-content.no-pad { padding: 0 0 calc(var(--footer-h) + 32px); }

/* ---------- Business detail ---------- */
.bd-hero {
    position: relative;
    min-height: 320px;
    background-color: #2a2a2a;
    background-size: cover;
    background-position: center;
}
.bd-hero__overlay {
    position: absolute; left: 0; right: 0; bottom: 0;
    padding: 18px 18px 22px;
    background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,.78) 75%);
    color: #fff;
}
.bd-hero__title {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.15;
    color: #fff;
    margin: 0;
}
.bd-hero__address {
    margin-top: 6px;
    color: rgba(255,255,255,.82);
    font-size: 14px;
    line-height: 1.4;
}
.bd-back {
    position: absolute;
    top: 16px; left: 16px;
    width: 38px; height: 38px;
    border-radius: 50%;
    background: rgba(0,0,0,.35);
    backdrop-filter: blur(6px);
    display: inline-flex; align-items: center; justify-content: center;
    color: #fff;
}
.bd-body {
    background: var(--bg);
    border-radius: 0;
    margin-top: 0;
    padding: 20px 18px 24px;
    position: relative;
}
.bd-header { margin-bottom: 14px; }
.bd-title {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.15;
    color: var(--ink);
}
.bd-address {
    margin-top: 6px;
    color: var(--muted);
    font-size: 14px;
}

/* pills (status / accent) */
.bd-pills { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.pill {
    display: inline-flex; align-items: center; gap: 6px;
    height: 30px; padding: 0 12px;
    border-radius: 999px;
    background: var(--surface);
    color: var(--ink-2);
    font-size: 13px; font-weight: 500;
    border: 1px solid var(--border);
}
.pill__dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--primary);
}
.pill--ok { color: var(--primary); }
.pill--warn { color: var(--danger); }
.pill--warn .pill__dot { background: var(--danger); }
.pill--accent { color: var(--accent); }
.pill--accent svg { color: var(--accent); }

/* open-now status pill (open / closing soon / closed) */
.status-pill {
    display: inline-flex; align-items: center; gap: 8px;
    height: 30px; padding: 0 12px 0 10px;
    border-radius: 999px;
    font-size: 13px; font-weight: 600;
    letter-spacing: 0.01em;
    border: 1px solid transparent;
    line-height: 1;
}
.status-pill__dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 0 4px rgba(0,0,0,0.04);
    flex: 0 0 8px;
}
.status-pill__hint { opacity: .85; font-weight: 500; }

.status-pill--open {
    color: #1f7a3a;
    background: #e7f6ec;
    border-color: #cdebd6;
}
.status-pill--open .status-pill__dot {
    background: #29a25a;
    box-shadow: 0 0 0 4px rgba(41,162,90,0.18);
    animation: status-pulse 1.8s ease-out infinite;
}

.status-pill--soon {
    color: #8a5a00;
    background: #fff4dc;
    border-color: #ffe2a3;
}
.status-pill--soon .status-pill__dot {
    background: #f0a500;
    box-shadow: 0 0 0 4px rgba(240,165,0,0.18);
    animation: status-pulse 1.4s ease-out infinite;
}

.status-pill--closed {
    color: #a02525;
    background: #fdecec;
    border-color: #f6c8c8;
}
.status-pill--closed .status-pill__dot {
    background: #c0392b;
    box-shadow: 0 0 0 4px rgba(192,57,43,0.15);
}

@keyframes status-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(41,162,90,0.45); }
    70%  { box-shadow: 0 0 0 8px rgba(41,162,90,0); }
    100% { box-shadow: 0 0 0 0 rgba(41,162,90,0); }
}

/* generic detail card */
.bd-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 18px 18px;
    margin-bottom: 14px;
    box-shadow: var(--shadow-sm);
}
.bd-card__title {
    font-size: 17px; font-weight: 700;
    margin-bottom: 12px;
    color: var(--ink);
}

/* opening hours */
.bd-hours__list {
    list-style: none; margin: 0; padding: 0;
    display: flex; flex-direction: column; gap: 8px;
    color: var(--ink-2);
    font-size: 14px;
}
.bd-hours__list li {
    display: flex; align-items: baseline; justify-content: space-between;
}
.bd-hours__day { color: var(--ink-2); }
.bd-hours__time { font-weight: 600; color: var(--ink); }

/* green cashback card */
.bd-cashback {
    position: relative;
    background: linear-gradient(135deg, #345A3F 0%, #4A7A55 100%);
    color: #fff;
    border-radius: var(--radius-lg);
    padding: 18px 18px;
    margin: 4px 0 18px;
    display: flex; align-items: center; gap: 14px;
    box-shadow: 0 10px 24px rgba(63, 107, 74, 0.25);
    cursor: pointer;
    transition: transform .15s ease;
}
.bd-cashback:active { transform: scale(.99); }
.bd-cashback__main { flex: 1; }
.bd-cashback__value {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.1;
    display: inline;
}
.bd-cashback__label {
    display: inline;
    margin-left: 8px;
    font-size: 16px;
    font-weight: 600;
    opacity: .9;
}
.bd-cashback__sub {
    margin-top: 4px;
    font-size: 13px;
    color: rgba(255,255,255,.78);
}
.bd-cashback__qr {
    width: 44px; height: 44px;
    border-radius: 10px;
    background: rgba(255,255,255,.18);
    display: inline-flex; align-items: center; justify-content: center;
    flex: 0 0 44px;
}

/* section title */
.bd-section-title {
    font-size: 18px;
    font-weight: 700;
    margin: 10px 0 10px;
    color: var(--ink);
}

/* active bonuses list */
.bd-bonuses { display: flex; flex-direction: column; gap: 10px; }
.bd-bonus {
    display: flex; align-items: center; gap: 12px;
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 14px 16px;
    color: var(--ink);
    box-shadow: var(--shadow-sm);
}
.bd-bonus__icon {
    width: 40px; height: 40px;
    border-radius: 12px;
    background: var(--primary-soft);
    display: inline-flex; align-items: center; justify-content: center;
    flex: 0 0 40px;
}
.bd-bonus__body { flex: 1; min-width: 0; }
.bd-bonus__title { font-weight: 700; font-size: 15px; color: var(--ink); }
.bd-bonus__sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.bd-bonus__chip {
    color: var(--muted);
    font-size: 13px;
    white-space: nowrap;
}

/* ---------- Subscriptions ---------- */
.subscriptions-page .page-header__title { font-size: 30px; }

.sub-active { display: flex; flex-direction: column; gap: 10px; margin-bottom: 8px; }
.sub-active__row {
    display: flex; align-items: center; gap: 12px;
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 14px 16px;
    color: var(--ink);
    box-shadow: var(--shadow-sm);
}
.sub-active__icon {
    width: 40px; height: 40px; border-radius: 12px;
    background: var(--primary-soft);
    display: inline-flex; align-items: center; justify-content: center;
    flex: 0 0 40px;
}
.sub-active__body { flex: 1; min-width: 0; }
.sub-active__title { font-weight: 700; font-size: 15px; color: var(--ink); }
.sub-active__sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.sub-active__chip {
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 12px; font-weight: 700;
    border-radius: 999px;
    padding: 5px 12px;
    white-space: nowrap;
}

.sub-list { display: flex; flex-direction: column; gap: 12px; }
.sub-item {
    display: flex; gap: 14px;
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 16px;
    box-shadow: var(--shadow-sm);
    align-items: flex-start;
}
.sub-item__body { flex: 1; min-width: 0; }
.sub-item__title { font-size: 16px; font-weight: 700; color: var(--ink); line-height: 1.25; }
.sub-item__desc { color: var(--muted); font-size: 13px; margin-top: 4px; }
.sub-item__cta {
    display: inline-block;
    margin-top: 12px;
    background: var(--primary);
    color: #fff;
    font-weight: 600;
    font-size: 13px;
    padding: 8px 14px;
    border-radius: 999px;
}
.sub-item__cta:hover { background: var(--primary-2); color: #fff; }
.sub-item__thumb {
    width: 86px; height: 86px;
    border-radius: 16px;
    background: var(--border);
    overflow: hidden;
    flex: 0 0 86px;
    display: flex; align-items: center; justify-content: center;
}
.sub-item__thumb img { width: 100%; height: 100%; object-fit: cover; }
.sub-item__thumb-empty {
    width: 60%; height: 60%;
    border-radius: 12px;
    background: var(--border-2);
}

/* ---------- News list ---------- */
.news-page .page-header__title { font-size: 30px; }
.news-list { display: flex; flex-direction: column; gap: 14px; }
.news-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    color: var(--ink);
    display: block;
}
.news-card__media {
    position: relative;
    height: 170px;
    background-color: #2a2a2a;
    background-size: cover;
    background-position: center;
}
.news-card__badge {
    position: absolute; top: 14px; left: 14px;
    background: rgba(0,0,0,.55);
    backdrop-filter: blur(4px);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 6px 10px;
    border-radius: 999px;
}
.news-card__body { padding: 14px 16px 18px; }
.news-card__title { font-size: 18px; font-weight: 700; color: var(--ink); }
.news-card__desc {
    color: var(--muted);
    font-size: 14px;
    margin: 6px 0 10px;
    line-height: 1.45;
}
.news-card__link {
    font-size: 14px; font-weight: 700;
    color: var(--ink);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ---------- News detail ---------- */
.nd-hero {
    position: relative;
    min-height: 360px;
    background-color: #2a2a2a;
    background-size: cover;
    background-position: center;
    padding: 0;
}
.nd-hero__overlay {
    position: absolute; left: 0; right: 0; bottom: 0;
    padding: 18px 18px 22px;
    background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,.78) 70%);
    color: #fff;
}
.nd-hero__row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.nd-hero__badge {
    background: rgba(255,255,255,.15);
    backdrop-filter: blur(4px);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 6px 10px;
    border-radius: 999px;
}
.nd-hero__date {
    color: rgba(255,255,255,.78);
    font-size: 13px;
}
.nd-hero__title {
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.1;
    color: #fff;
}
.nd-hero__lead {
    margin-top: 8px;
    color: rgba(255,255,255,.82);
    font-size: 14px;
    line-height: 1.5;
}
.nd-hero__more {
    display: inline-block;
    margin-top: 12px;
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.nd-body {
    background: var(--bg);
    padding: 22px 18px 30px;
    color: var(--ink-2);
    font-size: 15px;
    line-height: 1.6;
}
.nd-body h2, .nd-body h3 {
    color: var(--ink);
    font-weight: 700;
    margin: 18px 0 8px;
}
.nd-body h2 { font-size: 19px; }
.nd-body h3 { font-size: 17px; }
.nd-body p { margin: 0 0 12px; }

.empty-state {
    color: var(--muted);
    text-align: center;
    padding: 30px 12px;
    font-size: 14px;
}

/* ---------- Profile drawer (replaces old #menu-main contents) ---------- */
.profile-drawer { padding: 22px 18px 30px; }
.profile-drawer .navbar-content-header { margin-bottom: 14px; }
.drawer-title {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--ink);
    margin: 0;
}

.pd-user-card {
    display: flex; align-items: center; gap: 12px;
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 14px 14px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 18px;
}
.pd-user-card__avatar {
    width: 50px; height: 50px;
    border-radius: 50%;
    background: var(--ink);
    color: #fff;
    font-weight: 700;
    font-size: 18px;
    overflow: hidden;
    flex: 0 0 50px;
    display: inline-flex; align-items: center; justify-content: center;
}
.pd-user-card__avatar img { width: 100%; height: 100%; object-fit: cover; }
.pd-user-card__body { flex: 1; min-width: 0; }
.pd-user-card__name { font-weight: 700; color: var(--ink); }
.pd-user-card__email { font-size: 13px; color: var(--muted); margin-top: 2px; word-break: break-all; }
.pd-user-card__edit {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent);
    display: inline-flex; align-items: center; justify-content: center;
    flex: 0 0 36px;
}

.pd-eyebrow {
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--muted);
    margin: 18px 4px 8px;
}

.pd-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.pd-list { padding: 4px 0; }
.pd-row {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 14px;
    color: var(--ink);
    text-decoration: none;
    border-bottom: 1px solid var(--border);
}
.pd-row:last-child { border-bottom: 0; }
.pd-row__ic {
    width: 36px; height: 36px;
    border-radius: 10px;
    background: var(--surface-2);
    color: var(--ink-2);
    display: inline-flex; align-items: center; justify-content: center;
    flex: 0 0 36px;
}
.pd-row__main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.pd-row__title { font-weight: 700; font-size: 14px; color: var(--ink); }
.pd-row__sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.pd-row__chev { color: var(--muted-2); font-size: 18px; line-height: 1; }
.pd-row__chev--ext { font-size: 12px; font-weight: 600; color: var(--muted); }

/* loyalty card (drawer + reuse for home) */
.pd-loyalty { padding: 16px 18px; }
.pd-loyalty__eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 4px;
}
.pd-loyalty__tier {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--ink);
    margin-bottom: 10px;
}
.pd-loyalty__bar {
    height: 6px;
    border-radius: 999px;
    background: var(--accent-soft);
    overflow: hidden;
    margin-bottom: 10px;
}
.pd-loyalty__bar span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--accent) 0%, #E08B4A 100%);
    border-radius: 999px;
}
.pd-loyalty__meta {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 13px;
}
.pd-loyalty__meta-left { color: var(--accent); font-weight: 700; }
.pd-loyalty__meta-right { color: var(--muted); }
.pd-loyalty__chip {
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 700;
    border-radius: 999px;
    padding: 3px 8px;
    margin-left: 6px;
    font-size: 12px;
}

.pd-logout {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    margin-top: 22px;
    background: var(--surface);
    color: var(--danger);
    border-radius: var(--radius-lg);
    padding: 16px;
    font-weight: 700;
    box-shadow: var(--shadow-sm);
}
.pd-version {
    margin-top: 12px;
    text-align: center;
    color: var(--muted-2);
    font-size: 12px;
}
.pd-delete { text-align: center; margin-top: 8px; }
.pd-delete a {
    color: var(--danger);
    font-size: 11px;
}

/* ---------- My loyalty QR popup (FAB) — sheet on top of dimmed background ---------- */
.myqr-overlay {
    position: fixed; inset: 0;
    background: rgba(15, 13, 11, 0.55);
    backdrop-filter: blur(2px);
    z-index: 110;
    transition: opacity .25s ease;
}
.myqr-popup {
    position: fixed; inset: 0;
    z-index: 120;
    display: flex; flex-direction: column;
    justify-content: flex-end;
    pointer-events: none;
}
.myqr-popup .myqr-sheet {
    pointer-events: auto;
    margin: 0 auto;
    width: 100%;
    max-width: var(--container);
    background: var(--surface);
    border-radius: 26px 26px 0 0;
    padding: 14px 22px calc(var(--footer-h) + 22px);
    transform: translateY(100%);
    transition: transform .32s cubic-bezier(.2,.7,.2,1);
    box-shadow: 0 -8px 30px rgba(0,0,0,.18);
    text-align: center;
}
.myqr-popup.is-open .myqr-sheet { transform: translateY(0); }
.myqr-grip {
    width: 44px; height: 5px; border-radius: 999px;
    background: var(--muted-2);
    opacity: .55;
    margin: 0 auto 14px;
}
.myqr-eyebrow {
    font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
    font-weight: 700; color: var(--muted);
    margin-bottom: 14px;
}
.myqr-image {
    margin: 0 auto 16px;
    width: 220px; height: 220px;
    display: flex; align-items: center; justify-content: center;
}
.myqr-image img { width: 100%; height: 100%; object-fit: contain; }
.myqr-image--placeholder { opacity: .55; }
.myqr-divider {
    height: 1px; background: var(--border);
    margin: 4px -22px 14px;
}
.myqr-name {
    font-weight: 700; font-size: 17px; color: var(--ink);
}
.myqr-code { color: var(--muted); font-size: 13px; margin-top: 2px; }
.myqr-chips {
    display: flex; gap: 10px; justify-content: center; flex-wrap: wrap;
    margin: 14px 0 8px;
}
.myqr-chip {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 700; font-size: 12px;
    border-radius: 999px;
    padding: 6px 12px;
}
.myqr-chip__dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--accent);
}
.myqr-chip--muted {
    background: var(--surface-2);
    color: var(--muted);
}
.myqr-foot { margin-top: 6px; color: var(--muted); font-size: 13px; }
.myqr-cta {
    display: inline-block;
    margin-top: 18px;
    padding: 12px 22px;
    background: var(--primary);
    color: #fff;
    border-radius: 999px;
    font-weight: 700;
}


/* =========================================================
   Loyalty tier card — Bronz / Silver / Gold / Platinum
   ========================================================= */
.tier-card {
    display: block;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px 18px 16px;
    box-shadow: var(--shadow-sm);
    margin: 8px 16px 14px;
    position: relative;
    overflow: hidden;
    color: var(--ink);
}
.tier-card__eyebrow {
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 8px;
    opacity: 0.85;
}
.tier-card__tier {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.01em;
    line-height: 1.1;
    margin-bottom: 14px;
}
.tier-card__bar {
    height: 6px;
    border-radius: 999px;
    background: rgba(31,27,23,0.08);
    overflow: hidden;
    margin-bottom: 12px;
}
.tier-card__bar > span {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: currentColor;
    opacity: 0.9;
    transition: width 0.4s ease;
}
.tier-card__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 13px;
    font-weight: 600;
}
.tier-card__meta-left { color: currentColor; text-wrap-mode: nowrap;}
.tier-card__meta-right {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-weight: 500;
}
.tier-card__chip {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(31,27,23,0.06);
    color: var(--ink);
    font-weight: 700;
    font-size: 12px;
    text-wrap-mode: nowrap;
}

/* — Bronz (cream with accent orange) */
.tier-card--bronz { color: var(--accent); }
.tier-card--bronz .tier-card__tier { color: var(--ink); }
.tier-card--bronz .tier-card__eyebrow { color: var(--accent); }
.tier-card--bronz .tier-card__bar { background: rgba(198,110,45,0.15); }
.tier-card--bronz .tier-card__bar > span { background: var(--accent); }
.tier-card--bronz .tier-card__meta-left { color: var(--accent); }

/* — Silver (cool blue-gray) */
.tier-card--silver { color: #5C7B8C; }
.tier-card--silver .tier-card__tier { color: var(--ink); }
.tier-card--silver .tier-card__eyebrow { color: #5C7B8C; }
.tier-card--silver .tier-card__bar { background: rgba(92,123,140,0.15); }
.tier-card--silver .tier-card__bar > span { background: linear-gradient(90deg, #8FA9B5, #5C7B8C); }
.tier-card--silver .tier-card__meta-left { color: #5C7B8C; }

/* — Gold (warm gold gradient) */
.tier-card--gold {
    background: linear-gradient(135deg, #F0D58A 0%, #E5BE60 100%);
    border-color: #D9AC42;
    color: #6B4F12;
}
.tier-card--gold .tier-card__eyebrow { color: #8A6516; }
.tier-card--gold .tier-card__tier { color: #1F1B17; }
.tier-card--gold .tier-card__bar { background: rgba(107,79,18,0.18); }
.tier-card--gold .tier-card__bar > span { background: #8A6516; }
.tier-card--gold .tier-card__meta-left { color: #6B4F12; }
.tier-card--gold .tier-card__meta-right { color: rgba(31,27,23,0.65); }
.tier-card--gold .tier-card__chip { background: rgba(31,27,23,0.12); color: #1F1B17; }

/* — Platinum (dark ink) */
.tier-card--platinum {
    background: linear-gradient(135deg, #2E2A26 0%, #1F1B17 100%);
    border-color: #2E2A26;
    color: #C9D8E3;
}
.tier-card--platinum .tier-card__eyebrow { color: #C9D8E3; }
.tier-card--platinum .tier-card__tier { color: #FFFFFF; }
.tier-card--platinum .tier-card__bar { background: rgba(255,255,255,0.12); }
.tier-card--platinum .tier-card__bar > span { background: linear-gradient(90deg, #6FB2C9, #B7E0EC); }
.tier-card--platinum .tier-card__meta-left { color: #B7E0EC; }
.tier-card--platinum .tier-card__meta-right { color: rgba(255,255,255,0.6); }
.tier-card--platinum .tier-card__chip { background: rgba(255,255,255,0.10); color: #FFFFFF; }

/* drawer / home: tighter side margins (already inside .pd-card or section) */
.pd-loyalty-link,
.loyalty-program-link,
.bd-loyalty-link {
    display: block;
    text-decoration: none;
    color: inherit;
}
.pd-loyalty-link .tier-card,
.loyalty-program-link .tier-card,
.bd-loyalty-link .tier-card { margin-left: 0; margin-right: 0; }

/* — Tier chip (used in #myQrPopup) */
.tier-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    background: var(--accent-soft);
    color: var(--accent);
}
.tier-chip__dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: currentColor;
}
.tier-chip--bronz    { background: var(--accent-soft); color: var(--accent); }
.tier-chip--silver   { background: #E2EBF1; color: #5C7B8C; }
.tier-chip--gold     { background: #FBEFCA; color: #8A6516; }
.tier-chip--platinum { background: #1F1B17; color: #C9D8E3; }


/* =========================================================
   /editProfile page
   ========================================================= */
.profile-edit { padding: 0 16px 24px; }
.pe-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0 8px;
}
.pe-topbar__title {
    font-size: 17px;
    font-weight: 700;
    color: var(--ink);
}
.pe-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px; height: 36px;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--ink);
}
.pe-userhead {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 8px 0 20px;
}
.pe-userhead__avatar {
    width: 80px; height: 80px;
    border-radius: 50%;
    background: var(--primary-soft);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    font-weight: 800;
    overflow: hidden;
    border: 2px solid var(--surface);
    box-shadow: var(--shadow-sm);
}
.pe-userhead__avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.pe-userhead__name { font-size: 18px; font-weight: 800; color: var(--ink); }
.pe-userhead__email { font-size: 13px; color: var(--muted); }

.pe-form { display: flex; flex-direction: column; gap: 18px; }
.pe-section { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 14px; box-shadow: var(--shadow-sm); }
.pe-section__title {
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--muted);
    margin-bottom: 12px;
}
.pe-field { display: block; margin-bottom: 12px; }
.pe-field:last-child { margin-bottom: 0; }
.pe-field__label {
    display: block;
    font-size: 12px;
    color: var(--muted);
    font-weight: 600;
    margin-bottom: 6px;
    padding-left: 4px;
}
.pe-field__control {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0 12px;
    transition: border-color 0.15s ease, background 0.15s ease;
}
.pe-field__control:focus-within {
    border-color: var(--primary);
    background: var(--surface);
}
.pe-field__icon {
    color: var(--muted);
    margin-right: 10px;
    flex-shrink: 0;
}
.pe-field__control input,
.pe-field__control select {
    flex: 1;
    width: 100%;
    border: 0;
    background: transparent;
    padding: 12px 0;
    font-size: 15px;
    color: var(--ink);
    outline: none;
}
.pe-field__control select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none'><path d='M6 9l6 6 6-6' stroke='%238C8478' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>"); background-repeat: no-repeat; background-position: right 0 center; padding-right: 18px; }

.pe-switch {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}
.pe-switch__body { flex: 1; }
.pe-switch__title { display: block; font-weight: 600; color: var(--ink); }
.pe-switch__sub { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.pe-switch input { display: none; }
.pe-switch__track {
    position: relative;
    width: 44px; height: 26px;
    background: #CAC7C4;
    border-radius: 999px;
    transition: background 0.2s ease;
    flex-shrink: 0;
}
.pe-switch__thumb {
    position: absolute;
    top: 3px; left: 3px;
    width: 20px; height: 20px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 2px rgba(0,0,0,0.15);
    transition: transform 0.2s ease;
}
.pe-switch input:checked + .pe-switch__track { background: var(--primary); }
.pe-switch input:checked + .pe-switch__track .pe-switch__thumb { transform: translateX(18px); }

.pe-submit {
    width: 100%;
    margin-top: 8px;
}


/* =========================================================
   /purchaseHistory page
   ========================================================= */
.purchase-history { padding: 0 16px 24px; }

.ph-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin: 4px 0 12px;
}
.ph-stat {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 10px 12px;
    text-align: center;
}
.ph-stat__label {
    font-size: 11px;
    color: var(--muted);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 4px;
}
.ph-stat__value { font-size: 16px; font-weight: 800; color: var(--ink); }
.ph-stat__value--ok { color: var(--primary); }
.ph-stat__value--neg { color: var(--danger); }

.ph-group { margin-bottom: 14px; }
.ph-group__title {
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--muted);
    margin: 16px 4px 8px;
}
.ph-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 8px;
    text-decoration: none;
    color: inherit;
}
.ph-row__avatar {
    width: 44px; height: 44px;
    border-radius: 12px;
    background: var(--surface-2);
    display: flex; align-items: center; justify-content: center;
    color: var(--muted);
    flex-shrink: 0;
    overflow: hidden;
}
.ph-row__body { flex: 1; min-width: 0; }
.ph-row__title {
    font-weight: 700;
    color: var(--ink);
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ph-row__client { color: var(--muted); font-weight: 500; }
.ph-row__date { font-size: 12px; color: var(--muted); margin-top: 2px; }
.ph-row__hint { font-size: 12px; color: var(--primary); margin-top: 2px; }
.ph-row__amount {
    font-weight: 800;
    font-size: 15px;
    color: var(--ink);
    text-align: right;
    flex-shrink: 0;
    white-space: nowrap;
}
.ph-row__amount--ok { color: var(--primary); }
.ph-row__amount--neg { color: var(--danger); }
.ph-row__unit { display: block; font-size: 10px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 2px; }

.section-heading--mt { margin-top: 28px; }

.ph-variant { margin-bottom: 16px; }
.ph-variant__eyebrow {
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--muted);
    margin: 4px 4px 2px;
}
.ph-variant__range {
    font-size: 12px;
    color: var(--muted);
    margin: 0 4px 8px;
}
.ph-variant .tier-card {
    margin-left: 0;
    margin-right: 0;
    margin-bottom: 0;
}

.empty-state {
    background: var(--surface);
    border: 1px dashed var(--border);
    border-radius: var(--radius-md);
    padding: 22px 16px;
    text-align: center;
    color: var(--muted);
    font-size: 14px;
}
