:root {
    --cf-espresso: #0a0a0a;
    --cf-roast: #0a0a0a;
    --cf-caramel: #db9a52;
    --cf-cream: #ebebeb;
    --cf-foam: #f2f2f2;
    --cf-line: #dcdcdc;
    --cf-ink: #141414;
    --cf-muted: #6b6b6b;
}

html, body { font-family: Lato, system-ui, sans-serif; background: var(--cf-cream); color: var(--cf-ink); }

.text-none { text-transform: none !important; }

/* App shell */
.cf-appbar { border-bottom: 1px solid rgba(255,255,255,.06); }
.cf-brand { display: flex; align-items: baseline; gap: .5rem; margin-left: .5rem; }
.cf-brand-mark { font-size: 1.1rem; }
.cf-brand-name { font-family: "Bebas Neue", sans-serif; font-size: 1.9rem; letter-spacing: .08em; line-height: 1; }
.cf-paw { width: 16px; height: 16px; align-self: flex-start; margin-top: 2px; }
.cf-brand-sub { font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; opacity: .6; }
.cf-drawer { border-right: 1px solid var(--cf-line) !important; }
.cf-nav-group { color: var(--cf-muted); letter-spacing: .12em; }
.cf-main { min-height: 100vh; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.page-head h1 { font-family: "Bebas Neue", sans-serif; font-weight: 400; font-size: 2.8rem; line-height: 1; margin: 0; letter-spacing: .01em; text-transform: uppercase; }
.page-head p { margin: .25rem 0 0; color: var(--cf-muted); }

.cf-card { border: 1px solid var(--cf-line); border-radius: 6px !important; box-shadow: none !important; }
.cf-stat { padding: 1.1rem 1.25rem; }
.cf-stat .label { color: var(--cf-muted); font-size: .8rem; font-weight: 600; letter-spacing: .02em; }
.cf-stat .value { font-family: "Bebas Neue", sans-serif; font-size: 2.6rem; font-weight: 400; line-height: 1; margin-top: .2rem; font-variant-numeric: tabular-nums; }
.cf-stat .hint { color: var(--cf-muted); font-size: .78rem; margin-top: .15rem; }

.thumb { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; background: var(--cf-foam); display: inline-flex; align-items: center; justify-content: center; color: var(--cf-muted); }

/* Till */
.till-grid { display: grid; grid-template-columns: minmax(320px, 400px) 1fr; gap: 1.25rem; align-items: start; }
@media (max-width: 1100px) { .till-grid { grid-template-columns: 1fr; } }

.member-card { --tier: #db9a52; background: #0a0a0a; color: #f2f2f2; border-radius: 10px; padding: 1.25rem; position: relative; overflow: hidden; }
.member-card::after { content: ""; position: absolute; right: -40px; bottom: -40px; width: 160px; height: 160px; border-radius: 50%; border: 28px solid rgba(255,255,255,.04); }
.member-card.tier-Silver { --tier: #c3cad2; }
.member-card.tier-Gold { --tier: #e8be62; }
.member-card .name { font-family: "Bebas Neue", sans-serif; font-size: 2.2rem; line-height: 1; letter-spacing: .02em; text-transform: uppercase; }
.member-card .meta { opacity: .8; font-size: .85rem; }
.member-card .tier { display: inline-block; padding: .2rem .6rem; border-radius: 3px; border: 1px solid var(--tier); color: var(--tier); font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.member-card .stars { font-family: "Bebas Neue", sans-serif; font-size: 2.6rem; line-height: 1; font-variant-numeric: tabular-nums; }

.stamp-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: .5rem; margin-top: 1rem; }
.stamp { aspect-ratio: 1; border-radius: 50%; border: 1.5px solid #4a4a4a; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; }
.stamp.on { background: var(--tier); border-color: var(--tier); color: #0a0a0a; }

.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem; }
.product-btn { all: unset; cursor: pointer; border: 1px solid var(--cf-line); background: #fff; border-radius: 6px; padding: .75rem .8rem; display: flex; flex-direction: column; gap: .2rem; min-height: 64px; transition: border-color .15s, transform .1s, box-shadow .15s; }
.product-btn:hover { border-color: var(--cf-caramel); box-shadow: 0 2px 10px rgba(74,44,29,.08); }
.product-btn:active { transform: scale(.98); }
.product-btn:focus-visible { outline: 2px solid var(--cf-caramel); outline-offset: 2px; }
.product-btn .p-name { font-weight: 900; font-size: .92rem; line-height: 1.2; }
.product-btn .p-price { color: var(--cf-muted); font-size: .82rem; font-variant-numeric: tabular-nums; }
.product-btn .p-stamp { font-size: .62rem; color: #b97b37; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }

.cart-line { display: flex; align-items: center; gap: .5rem; padding: .4rem 0; border-bottom: 1px dashed var(--cf-line); }
.cart-line:last-child { border-bottom: 0; }
.cart-total { font-family: "Bebas Neue", sans-serif; font-size: 2.6rem; line-height: 1; font-variant-numeric: tabular-nums; }

.qr-reader { width: 100%; min-height: 280px; border-radius: 12px; overflow: hidden; background: #111; }

/* Login (static page, no MudBlazor) */
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem; background: linear-gradient(rgba(0,0,0,.6), rgba(0,0,0,.75)), #1a120c url("login-bg.jpg") center/cover; }
.login-card { width: 100%; max-width: 380px; background: #fff; border: 0; border-radius: 6px; padding: 2rem 1.75rem; box-shadow: 0 20px 50px rgba(43,25,16,.08); }
.login-brand { text-align: center; margin-bottom: 1.5rem; }
.login-brand h1 { font-family: "Bebas Neue", sans-serif; font-weight: 400; font-size: 3.2rem; letter-spacing: .08em; margin: 0; color: #0a0a0a; line-height: 1; }
.login-brand h1 svg { width: 22px; height: 22px; vertical-align: top; margin-top: 4px; }
.login-brand p { margin: .25rem 0 0; color: var(--cf-muted); }
.login-card label { display: block; font-weight: 900; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; margin: 1rem 0 .35rem; }
.login-card input { width: 100%; box-sizing: border-box; padding: .8rem .9rem; border: 1px solid var(--cf-line); border-radius: 4px; font: inherit; background: #fafafa; }
.login-card input:focus { outline: 2px solid var(--cf-caramel); outline-offset: 1px; border-color: transparent; }
.login-card button { width: 100%; margin-top: 1.5rem; padding: .95rem; border: 0; border-radius: 4px; background: #0a0a0a; color: #fff; font: inherit; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; cursor: pointer; }
.login-card button:hover { background: #2a2a2a; }
.login-error { background: #fdecea; color: #8c1d18; border-radius: 10px; padding: .7rem .9rem; font-size: .9rem; }

#blazor-error-ui { background: #fff4e5; bottom: 0; box-shadow: 0 -1px 2px rgba(0,0,0,.2); display: none; left: 0; padding: .6rem 1.25rem; position: fixed; width: 100%; z-index: 2000; }
#blazor-error-ui .reload { margin-left: .75rem; font-weight: 700; }
.cf-muted { color: var(--mud-palette-text-secondary) !important; }
h1:focus { outline: none; }
