/* ── Page transitions (View Transitions API — graceful no-op on unsupported browsers) ── */
@view-transition {
    navigation: auto;
}

@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

/* Design tokens now live in the global :root (see top of the dashboard theme section
   below) so the whole app shares one source of truth; landing no longer redeclares them. */

body.landing-page .page-wrapper {
    background: var(--paper);
}

body.landing-page main.landing-main {
    padding: 0 0 3rem;
}

body.landing-page h1,
body.landing-page h2,
body.landing-page h3,
body.landing-page h4,
body.landing-page h5,
body.landing-page .brand {
    font-family: "Fraunces", serif;
    font-optical-sizing: auto;
    letter-spacing: -0.01em;
    color: var(--ink);
}

body.landing-page {
    position: relative;
}

body.landing-page::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.05;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.landing-shell {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 1.5rem;
    max-width: 1408px;
    margin: 0 auto;
    padding: 1.25rem 0 3rem;
}

.landing-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0 1.5rem;
    border-bottom: 1px solid var(--line);
}

.landing-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.landing-logo__mark {
    height: 44px;
    width: auto;
}

.landing-nav {
    display: flex;
    gap: 1rem;
}

.landing-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 0.4rem;
    margin: 0 -0.4rem;
    color: var(--brand);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.landing-nav a.is-active,
.landing-nav a:hover,
.landing-nav a:focus-visible {
    color: var(--gold);
    border-bottom-color: var(--gold);
}

.landing-hero {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1.25fr 0.95fr;
    align-items: center;
    padding: 2rem;
    border-radius: 24px;
    background: linear-gradient(135deg, var(--surface), var(--paper));
    border: 1px solid var(--line);
}

.landing-eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.24em;
    font-size: 0.72rem;
    color: var(--gold);
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.landing-eyebrow .greeting-rotator {
    display: inline-block;
    min-width: 5.5em;
    color: var(--brand);
}

.landing-hero h1 {
    font-size: clamp(2.4rem, 4.6vw, 4.2rem);
    margin-bottom: 0.9rem;
    color: var(--ink);
    line-height: 1.02;
    letter-spacing: -0.02em;
}

.landing-description {
    font-size: 1.03rem;
    line-height: 1.75;
    color: var(--secondary);
    max-width: 640px;
}

.landing-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.landing-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.1rem;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.landing-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 22px var(--brand-22);
}

.landing-btn:active {
    transform: translateY(0) scale(0.97);
    box-shadow: none;
}

.landing-btn--primary {
    background: var(--brand);
    color: #fff;
}

.landing-btn--primary:hover {
    background: var(--brand-hover, #513B30);
    color: #fff;
}

.landing-btn--secondary {
    color: var(--brand);
    border: 1px solid var(--brand-22);
    background: var(--paper);
}

.loyalty-ticket {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    padding-top: 1.1rem;
    border-top: 1px dashed var(--line);
}

.loyalty-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 50%;
    border: 1.5px solid var(--line);
    color: var(--secondary);
    font-size: 0.85rem;
    font-weight: 700;
    flex-shrink: 0;
}

.loyalty-dot--free {
    width: auto;
    padding: 0 0.85rem;
    border-radius: 999px;
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.1em;
}

.loyalty-ticket__caption {
    flex-basis: 100%;
    margin: 0.5rem 0 0;
    font-size: 0.85rem;
    color: var(--secondary);
}

.landing-hero__card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 1.45rem;
}

.landing-hero__media {
    margin-top: 1rem;
}

.landing-hero__media-card {
    position: relative;
    min-height: 220px;
    border-radius: 18px;
    background: linear-gradient(135deg, #f7efe5 0%, #e7d4b8 100%);
    border: 1px solid var(--line);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.15), 0 18px 36px rgba(39, 34, 24, 0.14);
}

.landing-hero__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.landing-card__badge {
    display: inline-block;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: rgba(168, 122, 50, 0.12);
    color: var(--gold);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 0.8rem;
}

.landing-hero__card h2 {
    color: var(--ink);
    font-size: 1.4rem;
    margin-bottom: 0.55rem;
}

.landing-hero__card p {
    color: var(--secondary);
    margin-bottom: 0.8rem;
    line-height: 1.7;
}

.landing-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.45rem;
}

.landing-list li {
    color: var(--brand);
    padding-left: 1rem;
    position: relative;
}

.landing-list li::before {
    content: "•";
    color: var(--gold);
    position: absolute;
    left: 0;
}

.landing-section {
    border: 1px solid var(--line);
    border-radius: 24px;
    overflow: hidden;
    background: var(--paper);
}

.landing-band {
    background: var(--brand);
    padding: 1.1rem 1.25rem;
}

.landing-section .landing-band h2 {
    margin: 0;
    color: #fff;
    text-align: center;
    font-size: 1.55rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.landing-menu-group__label {
    margin: 1.1rem 1.1rem 0;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--gold);
}

.landing-menu-list {
    padding: 0.6rem 1.1rem 0.5rem;
    display: grid;
    gap: 0.5rem;
}

.landing-menu-cta {
    padding: 0 1.1rem 1.4rem;
    text-align: center;
}

.landing-row {
    display: flex;
    align-items: flex-end;
    gap: 0.75rem;
    padding: 0.55rem 0.25rem;
    text-decoration: none;
    color: var(--ink);
    border-bottom: 1px dotted var(--brand-32);
    border-radius: 8px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.landing-row:hover {
    background: var(--surface);
    transform: translateX(2px);
}

.landing-row h4 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--ink);
}

.landing-row__leader {
    flex: 1;
    min-width: 24px;
    border-bottom: 1px dotted var(--brand-32);
    margin-bottom: 0.35rem;
}

.landing-row__price {
    margin: 0;
    font: 600 20px/1.2 "Fraunces", serif;
    color: var(--gold);
    letter-spacing: -0.01em;
}

.landing-story {
    position: relative;
    overflow: hidden;
    padding: 2.5rem 1.75rem;
    border-radius: 24px;
    background: var(--brand);
    text-align: center;
}

.landing-story__ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30rem;
    height: 30rem;
    border-radius: 50%;
    border: 22px solid var(--paper);
    opacity: 0.08;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.landing-story__image {
    position: relative;
    display: block;
    width: 160px;
    height: auto;
    margin: 0 auto 1rem;
}

.landing-story .landing-eyebrow {
    position: relative;
    color: var(--muted);
}

.landing-story h2 {
    position: relative;
    max-width: 640px;
    margin: 0 auto 0.6rem;
    font-size: clamp(1.35rem, 2.3vw, 1.8rem);
    color: #fff;
}

.landing-story__intro {
    position: relative;
    max-width: 520px;
    margin: 0 auto 1.5rem;
    color: var(--muted);
    line-height: 1.7;
}

.landing-greetings {
    position: relative;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem;
    padding: 0;
    margin: 0;
}

.landing-greetings li {
    padding: 0.5rem 1.05rem;
    border-radius: 999px;
    background: var(--paper);
    border: 1px solid var(--line);
    color: var(--brand);
    font-weight: 700;
    font-size: 0.92rem;
}

.landing-testimonials {
    display: grid;
    gap: 1rem;
    padding: 1.35rem;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--paper);
}

.landing-testimonials__header h2 {
    margin: 0;
    font-size: clamp(1.35rem, 2.15vw, 1.7rem);
}

.landing-testimonials__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.landing-testimonial {
    padding: 1.1rem 1.15rem;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--surface), var(--paper));
    border: 1px solid var(--line);
}

.landing-testimonial p {
    margin: 0 0 0.65rem;
    color: var(--secondary);
    line-height: 1.7;
}

.landing-testimonial strong {
    color: var(--brand);
}

.landing-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.landing-panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 1.2rem;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.landing-panel:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 28px var(--brand-22);
    border-color: var(--brand-32);
}

.landing-panel h3 {
    color: var(--ink);
    margin-bottom: 0.5rem;
}

.landing-panel p {
    color: var(--secondary);
    margin-bottom: 0;
    line-height: 1.65;
}

.landing-cta {
    display: flex;
    justify-content: space-between;
    gap: 1.25rem;
    align-items: center;
    padding: 1.4rem 1.35rem;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: linear-gradient(135deg, var(--surface), var(--paper));
}

.landing-cta__image {
    flex: 0 0 auto;
    width: 100px;
    height: auto;
    border-radius: 14px;
    box-shadow: 0 10px 24px rgba(39, 34, 24, 0.18), inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.landing-cta__copy {
    max-width: 560px;
}

.landing-cta__copy h2 {
    margin: 0 0 0.35rem;
    font-size: 1.4rem;
}

.landing-cta__copy p {
    color: var(--secondary);
    margin: 0 0 1rem;
}

.landing-cta__address {
    font-size: 0.92rem;
    line-height: 1.6;
}

.landing-cta__address a {
    color: var(--gold);
    font-weight: 600;
}

.landing-cta__copy .landing-btn {
    margin-top: 0.25rem;
}

.landing-cta__details {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    min-width: 360px;
}

.landing-cta__details > div {
    padding: 0.85rem 0.9rem;
    border-radius: 16px;
    background: var(--paper);
    border: 1px solid var(--line);
}

.landing-cta__details span {
    display: block;
    font-size: 0.74rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--secondary);
    margin-bottom: 0.25rem;
}

.landing-cta__details strong {
    font-size: 0.96rem;
    color: var(--brand);
}

.landing-footer {
    padding: 1rem 0 0;
    text-align: center;
    color: var(--secondary);
    border-top: 1px solid var(--line);
}

.landing-footer__staff {
    margin-top: 0.4rem;
    font-size: 0.82rem;
}

.landing-footer__staff a {
    color: var(--muted);
}

.landing-reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.landing-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered entrance for menu rows, feature panels, and testimonials once their
   parent section becomes visible (parent toggling handled by the existing
   IntersectionObserver in landing.html — no JS changes needed). */
.landing-menu-list .landing-row,
.landing-grid .landing-panel,
.landing-testimonials__grid .landing-testimonial {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.landing-reveal.is-visible .landing-menu-list .landing-row,
.landing-reveal.is-visible .landing-grid .landing-panel,
.landing-reveal.is-visible .landing-testimonials__grid .landing-testimonial {
    opacity: 1;
    transform: none;
}

.landing-menu-list .landing-row:nth-child(1) { transition-delay: 0ms; }
.landing-menu-list .landing-row:nth-child(2) { transition-delay: 60ms; }
.landing-menu-list .landing-row:nth-child(3) { transition-delay: 120ms; }
.landing-menu-list .landing-row:nth-child(4) { transition-delay: 180ms; }

.landing-grid .landing-panel:nth-child(1) { transition-delay: 0ms; }
.landing-grid .landing-panel:nth-child(2) { transition-delay: 90ms; }
.landing-grid .landing-panel:nth-child(3) { transition-delay: 180ms; }

.landing-testimonials__grid .landing-testimonial:nth-child(1) { transition-delay: 0ms; }
.landing-testimonials__grid .landing-testimonial:nth-child(2) { transition-delay: 90ms; }

@media (prefers-reduced-motion: reduce) {
    .landing-reveal,
    .landing-menu-list .landing-row,
    .landing-grid .landing-panel,
    .landing-testimonials__grid .landing-testimonial {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

@media (max-width: 900px) {
    .landing-hero {
        grid-template-columns: 1fr;
    }

    .landing-grid {
        grid-template-columns: 1fr;
    }

    .landing-header {
        flex-direction: column;
        gap: 0.8rem;
    }

    .landing-story {
        padding: 1.75rem 1.1rem;
    }

    .landing-story__ring {
        width: 20rem;
        height: 20rem;
    }

    .landing-testimonials__grid {
        grid-template-columns: 1fr;
    }

    .landing-cta {
        flex-direction: column;
        align-items: flex-start;
    }

    .landing-cta__image {
        display: none;
    }

    .landing-cta__details {
        min-width: unset;
        width: 100%;
        grid-template-columns: 1fr;
    }
}

::view-transition-old(root) {
    animation: 180ms ease-in both vt-fade-out;
}
::view-transition-new(root) {
    animation: 220ms ease-out both vt-fade-in;
}

@keyframes vt-fade-out {
    from { opacity: 1; }
    to   { opacity: 0; }
}
@keyframes vt-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

:root {
    /* Ole Coffee brand palette (Branding/03_Brand Guide/) — Chalk Black, Casual Khaki,
       Dull Brown, Calm Beige, Silent Grey. Single source of truth for the whole app;
       body.landing-page reuses these rather than redeclaring them. */
    --paper: #FFFFFF;
    --surface: #F5F1EC;
    --surface-2: #ECE4DB;
    --line: #DCD0C2;
    --ink: #272218;
    --brand: #272218;
    --brand-hover: #3A3226;
    --secondary: #7B5C45;
    --muted: #B7A99C;
    --gold: #7B5C45;
    --gold-deep: #5C4632;
    --brand-22: rgba(39, 34, 24, 0.22);
    --brand-32: rgba(39, 34, 24, 0.32);
    --brand-55: rgba(39, 34, 24, 0.55);
    --brand-72: rgba(39, 34, 24, 0.72);

    /* Semantic status colors — muted, earthy-harmonized rather than raw Bootstrap green/red */
    --success: #5B7A52;
    --success-bg: rgba(91, 122, 82, 0.14);
    --danger: #A8503E;
    --danger-bg: rgba(168, 80, 62, 0.12);

    --white: #ffffff;
    --shadow: rgba(39, 34, 24, 0.12);
}

* {
    box-sizing: border-box;
}

body {
    font-family: "Manrope", sans-serif;
    background: var(--paper);
    color: var(--ink);
    min-height: 100vh;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
.brand {
    font-family: "Fraunces", serif;
    letter-spacing: 0.02em;
}

.bg-shape {
    display: none;
}

.app-nav {
    background: linear-gradient(90deg, #20150f 0%, #2f2016 62%, #49301f 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    position: sticky;
    top: 0;
    z-index: 10;
}

.brand {
    color: var(--ink);
    font-weight: 700;
    font-size: 1.45rem;
}

.nav-subtitle {
    font-size: 0.84rem;
    color: var(--secondary);
}

.nav-pill {
    color: #2a1b12 !important;
    background: linear-gradient(120deg, #f5e4ce, #e8ccaa) !important;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

main {
    position: relative;
}

.metric-card,
.app-card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: 0 10px 24px var(--shadow);
}

.metric-card {
    padding: 1rem 1.2rem;
    animation: rise 0.35s ease-out;
}

.metric-card h2 {
    margin: 0;
    color: var(--ink);
    font-size: 2rem;
    font-variant-numeric: tabular-nums;
}

.metric-card small {
    display: block;
    margin-bottom: 0.35rem;
    text-transform: uppercase;
    font-size: 0.73rem;
    color: var(--secondary);
    letter-spacing: 0.08em;
}

.app-card {
    padding: 1.25rem;
    animation: rise 0.42s ease-out;
}

.app-card h3 {
    color: var(--ink);
    margin-bottom: 0.35rem;
}

.caption {
    color: var(--secondary);
    font-size: 0.9rem;
}

.mini {
    color: var(--secondary);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
}

.form-control,
.form-select,
textarea {
    background-color: var(--paper);
    border-color: var(--line);
    color: var(--ink);
}

.form-control:focus,
.form-select:focus,
textarea:focus {
    background-color: var(--paper);
    color: var(--ink);
    border-color: var(--secondary);
    box-shadow: 0 0 0 0.2rem var(--brand-22);
}

.form-label,
.form-check-label {
    color: var(--ink);
}

/* Tactile press feedback for every button in the app — dashboards use plain
   Bootstrap .btn classes and previously had zero feedback on click/tap. */
.btn {
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn:active {
    transform: scale(0.96);
}

@media (prefers-reduced-motion: reduce) {
    .btn {
        transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    }

    .btn:active {
        transform: none;
    }
}

.btn-brand {
    background: var(--brand);
    color: #fff;
    border: none;
    font-weight: 700;
}

.btn-brand:hover {
    background: var(--brand-hover);
    color: #fff;
}

/* Icon-only action buttons (cancel, edit, delete) — generous click area and a
   soft round hover highlight instead of Bootstrap's tight default padding. */
.icon-btn {
    width: 36px;
    height: 36px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}

.icon-btn:hover {
    background: var(--surface-2);
}

.btn-outline-light {
    border-color: var(--line);
    color: var(--ink);
}

.btn-outline-light:hover {
    background-color: var(--surface);
    color: var(--ink);
}

.status-panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 0.85rem;
}

.status-panel-highlight {
    background: linear-gradient(160deg, var(--surface), var(--paper));
}

.status-phone {
    margin: 0;
    color: var(--ink);
    font-family: "Fraunces", serif;
    font-size: clamp(1.1rem, 2.1vw, 1.45rem);
    letter-spacing: 0.03em;
}

.status-value {
    margin: 0;
    font-family: "Fraunces", serif;
    font-size: clamp(2rem, 5.2vw, 3.2rem);
    font-weight: 700;
    line-height: 1;
    color: var(--brand);
}

.voucher-panel {
    border-color: var(--secondary);
    box-shadow: inset 0 0 0 1px var(--brand-22);
}

.voucher-value {
    color: var(--gold-deep);
}

.voucher-modal-content {
    background: var(--paper);
    border: 1px solid var(--line);
    color: var(--ink);
}

.voucher-pop-count {
    font-family: "Fraunces", serif;
    font-size: clamp(2.6rem, 8vw, 4.25rem);
    color: var(--gold-deep);
    line-height: 1;
}

.voucher-pop-label {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--secondary);
    font-weight: 600;
}

.voucher-popup {
    position: fixed;
    inset: 0;
    z-index: 2200;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: var(--brand-55);
}

.voucher-popup-card {
    width: min(460px, 94vw);
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 20px 36px var(--brand-22);
    color: var(--ink);
    padding: 1rem 1rem 1.15rem;
}

.voucher-popup-x {
    border: 0;
    background: transparent;
    color: var(--secondary);
    font-size: 1.5rem;
    line-height: 1;
    padding: 0;
}

.placeholder-panel {
    border: 1px dashed var(--line);
    border-radius: 12px;
    padding: 0.95rem;
    color: var(--secondary);
    background: var(--surface);
}

.table {
    color: var(--ink);
    font-variant-numeric: tabular-nums;
}

.table tbody tr {
    transition: background 0.15s ease;
}

.table tbody tr:hover {
    background: var(--surface);
}

.table > :not(caption) > * > * {
    background-color: transparent;
    border-bottom-color: var(--line);
}

.table thead th {
    color: var(--secondary);
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.promo-list {
    display: grid;
    gap: 0.85rem;
}

.promo-item {
    border-radius: 12px;
    padding: 0.8rem 0.9rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-left: 3px solid var(--gold);
    transition: transform 0.15s ease, border-color 0.15s ease;
}

.promo-item:hover {
    transform: translateX(2px);
    border-left-color: var(--brand);
}

.promo-item small {
    color: var(--secondary);
}

.queue-action-form {
    flex-wrap: nowrap;
}

body.kiosk-mode {
    min-height: 100dvh;
}

.kiosk-wrap {
    min-height: calc(100dvh - 2rem);
}

.kiosk-card {
    width: min(720px, 96vw);
    padding: 2rem;
    border-radius: 24px;
    background: var(--paper);
    border: 1px solid var(--line);
    box-shadow: 0 22px 44px rgba(39, 34, 24, 0.15);
}

.kiosk-status-card {
    width: min(920px, 97vw);
}

.kiosk-logo {
    display: block;
    height: 36px;
    width: auto;
    margin: 0 auto 1rem;
}

.kiosk-overline {
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 0.78rem;
    color: var(--gold);
}

.kiosk-title {
    font-size: clamp(2rem, 5vw, 3rem);
    color: var(--ink);
    margin-bottom: 0.35rem;
}

.kiosk-help {
    color: var(--secondary);
    font-size: 0.88rem;
}

.kiosk-trigger {
    border: none;
    background: transparent;
    color: rgba(39, 34, 24, 0.22);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.kiosk-unlock-panel {
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
    padding: 0.8rem;
    border-radius: 12px;
    border: 1px dashed var(--line);
    background: var(--surface);
}

.kiosk-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 992px) {
    .metric-card h2 {
        font-size: 1.6rem;
    }

    .brand {
        font-size: 1.2rem;
    }

    .kiosk-card {
        padding: 1.2rem;
        border-radius: 18px;
    }

    .kiosk-grid {
        grid-template-columns: 1fr;
    }

    .app-card {
        padding: 1rem;
    }

    .table thead th {
        font-size: 0.72rem;
    }

    .table td,
    .table th {
        white-space: nowrap;
    }

    .app-nav .container-xxl {
        padding-top: 0.55rem;
        padding-bottom: 0.55rem;
    }
}

@media (max-width: 768px) {
    .caption {
        font-size: 0.84rem;
    }

    .queue-action-form {
        flex-wrap: wrap;
        gap: 0.45rem !important;
    }

    .queue-action-form .form-select {
        max-width: 100% !important;
        width: 100%;
    }

    .queue-action-form .btn {
        width: 100%;
    }

    .status-panel {
        padding: 0.75rem;
    }

    .kiosk-wrap {
        min-height: auto;
    }

    .kiosk-card {
        width: 100%;
        padding: 1rem;
        border-radius: 16px;
    }
}

@media (max-width: 576px) {
    .metric-card {
        padding: 0.85rem 0.95rem;
    }

    .metric-card h2 {
        font-size: 1.35rem;
    }

    .brand {
        font-size: 1.05rem;
    }

    .nav-subtitle {
        font-size: 0.74rem;
    }

    .promo-item {
        padding: 0.7rem;
    }
}

/* ============================================================
   SIDEBAR LAYOUT
   ============================================================ */

.app-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 240px;
    z-index: 200;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--muted) transparent;
    background: var(--paper);
    border-right: 1px solid var(--line);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.28s ease;
}

.sidebar-inner {
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

/* Brand area */
.sidebar-brand {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    padding: 1.25rem 1rem 1.1rem;
    border-bottom: 1px solid var(--line);
    flex-shrink: 0;
}

.sidebar-logo {
    height: 32px;
    width: auto;
    flex-shrink: 0;
    margin-top: 0.05rem;
}

.sidebar-brand-text {
    min-width: 0;
}

.sidebar-shop-name {
    font-family: "Fraunces", serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-tagline {
    font-size: 0.64rem;
    color: var(--secondary);
    line-height: 1.35;
    margin-top: 0.2rem;
}

/* User block */
.sidebar-user {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--line);
    background: var(--surface);
    flex-shrink: 0;
}

.sidebar-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--brand);
    color: #fff;
    font-family: "Fraunces", serif;
    font-size: 0.92rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    text-transform: uppercase;
    border: 1.5px solid var(--line);
}

.sidebar-user-info {
    min-width: 0;
}

.sidebar-user-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-role {
    font-size: 0.67rem;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 0.09em;
    margin-top: 0.1rem;
}

/* Navigation links */
.sidebar-nav {
    flex: 1;
    padding: 0.6rem 0;
    overflow-y: auto;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.6rem 1rem;
    color: var(--secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: background 0.14s ease, color 0.14s ease, border-color 0.14s ease;
}

.sidebar-link i {
    font-size: 1rem;
    width: 18px;
    text-align: center;
    flex-shrink: 0;
    opacity: 0.8;
    transition: opacity 0.14s ease;
}

.sidebar-link:hover {
    background: var(--surface);
    color: var(--ink);
    border-left-color: var(--muted);
}

.sidebar-link:hover i {
    opacity: 1;
}

.sidebar-link.active {
    background: var(--surface-2);
    color: var(--brand);
    border-left-color: var(--brand);
    font-weight: 600;
}

.sidebar-link.active i {
    opacity: 1;
}

.sidebar-badge {
    margin-left: auto;
    background: var(--brand);
    color: #fff;
    font-size: 0.67rem;
    font-weight: 700;
    padding: 0.12rem 0.42rem;
    border-radius: 999px;
    min-width: 20px;
    text-align: center;
}

.sidebar-divider {
    height: 1px;
    background: var(--line);
    margin: 0.4rem 0.8rem;
}

/* Footer / sign-out area */
.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid var(--line);
    flex-shrink: 0;
    margin-top: auto;
}

.sidebar-env-badge {
    display: inline-block;
    padding: 0.22rem 0.55rem;
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--secondary);
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.sidebar-signout {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    width: 100%;
    padding: 0.55rem 0.75rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--secondary);
    font-size: 0.86rem;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    transition: background 0.14s ease, color 0.14s ease;
}

.sidebar-signout:hover {
    background: var(--surface-2);
    color: var(--ink);
}

/* Overlay (mobile) */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 199;
    background: var(--brand-55);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.sidebar-overlay.active {
    display: block;
}

/* Keep Yoco checkout layers above app chrome and overlays. */
:is(
    iframe[src*="yoco" i],
    [id*="yoco" i],
    [class*="yoco" i]
) {
    z-index: 5000 !important;
}

/* Mobile top bar */
.mobile-topbar {
    display: none;
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 0.6rem 1rem;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.sidebar-toggle {
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--ink);
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    cursor: pointer;
    flex-shrink: 0;
    padding: 0;
    transition: background 0.14s ease;
}

.sidebar-toggle:hover {
    background: var(--surface-2);
}

.mobile-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    font-family: "Fraunces", serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--ink);
    flex: 1;
    text-align: center;
}

.mobile-brand__logo {
    height: 20px;
    width: auto;
    flex-shrink: 0;
}

.mobile-cart-btn {
    position: relative;
    color: var(--ink);
    font-size: 1.2rem;
    text-decoration: none;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: color 0.14s ease;
}

.mobile-cart-btn:hover {
    color: var(--brand);
}

.mobile-cart-count {
    position: absolute;
    top: 1px;
    right: 1px;
    background: var(--brand);
    color: #fff;
    font-size: 0.58rem;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 2px;
}

/* Page wrapper */
.page-wrapper {
    min-height: 100vh;
}

.page-wrapper.has-sidebar {
    margin-left: 240px;
}

/* Responsive: collapse sidebar to off-canvas on smaller screens */
@media (max-width: 991.98px) {
    .app-sidebar {
        transform: translateX(-100%);
        width: 280px;
    }

    .app-sidebar.open {
        transform: translateX(0);
        box-shadow: 8px 0 40px rgba(0, 0, 0, 0.6);
    }

    .page-wrapper.has-sidebar {
        margin-left: 0;
    }

    .mobile-topbar {
        display: flex;
    }
}

/* ============================================================
   METRIC CARDS — ICON + ACCENT BAR
   ============================================================ */

.metric-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    border-left: 4px solid var(--line);
}

.metric-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.3rem;
    background: var(--surface-2);
    color: var(--ink);
}

.metric-body {
    flex: 1;
    min-width: 0;
}

.metric-label {
    margin: 0 0 0.2rem;
    text-transform: uppercase;
    font-size: 0.67rem;
    color: var(--secondary);
    letter-spacing: 0.09em;
}

.metric-card--customers { border-left-color: #6E8CA0; }
.metric-card--customers .metric-icon { color: #6E8CA0; background: rgba(110, 140, 160, 0.12); }

.metric-card--coffees { border-left-color: var(--gold); }
.metric-card--coffees .metric-icon { color: var(--gold); background: rgba(123, 92, 69, 0.12); }

.metric-card--redeemed { border-left-color: var(--success); }
.metric-card--redeemed .metric-icon { color: var(--success); background: var(--success-bg); }

.metric-card--vouchers { border-left-color: #C17F42; }
.metric-card--vouchers .metric-icon { color: #C17F42; background: rgba(193, 127, 66, 0.12); }

/* ============================================================
   LIVE QUEUE ROWS
   ============================================================ */

.queue-pulse {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--success);
    flex-shrink: 0;
    animation: pulse-dot 2s ease-in-out infinite;
}

.queue-pulse--gold {
    background: var(--gold);
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.3; transform: scale(0.72); }
}

.queue-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.8rem 1rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    flex-wrap: wrap;
}

.queue-row__avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--brand);
    color: #fff;
    font-family: "Fraunces", serif;
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1.5px solid var(--line);
}

.queue-row__info {
    flex: 1;
    min-width: 90px;
}

.queue-row__name {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--ink);
}

.queue-row__phone {
    font-size: 0.73rem;
    color: var(--secondary);
}

.queue-row__stats {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.28rem;
    flex-shrink: 0;
}

.queue-row__time { flex-shrink: 0; }

.queue-row__actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.queue-drink-select {
    max-width: 130px;
    min-width: 100px;
}

@media (max-width: 768px) {
    .queue-row__actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .queue-drink-select {
        width: 100%;
        max-width: 100%;
    }

    .queue-row__actions .btn {
        flex: 1;
    }
}

/* ============================================================
   LOYALTY BAR + STAT CHIPS (shared: dashboard & kiosk)
   ============================================================ */

.loyalty-bar-track {
    height: 8px;
    border-radius: 999px;
    background: var(--surface-2);
    overflow: hidden;
}

.loyalty-bar-fill {
    height: 100%;
    border-radius: 999px;
    background: var(--brand);
    transition: width 0.55s ease;
}

.stat-chip {
    padding: 0.65rem 0.5rem;
    border-radius: 12px;
    background: var(--surface);
    border: 1px solid var(--line);
    text-align: center;
}

.stat-chip--gold {
    border-color: var(--secondary);
    background: var(--surface-2);
}

.stat-chip__value {
    margin: 0 0 0.18rem;
    font-family: "Fraunces", serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--ink);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.stat-chip--gold .stat-chip__value { color: var(--gold); }

.stat-chip__label {
    margin: 0;
    font-size: 0.64rem;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--secondary);
}

/* Input group phone icon */
.lookup-icon {
    background: var(--surface-2);
    border-color: var(--line);
    color: var(--gold);
}

/* Small avatar variant for lists */
.sidebar-avatar--sm {
    width: 28px;
    height: 28px;
    font-size: 0.7rem;
}

/* ============================================================
   KIOSK STATUS — STATS GRID
   ============================================================ */

.kiosk-stats-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.kiosk-stat-card {
    padding: 1.4rem 1rem;
    border-radius: 18px;
    background: var(--surface);
    border: 1px solid var(--line);
    text-align: center;
}

.kiosk-stat-card--gold {
    border-color: var(--secondary);
    background: rgba(123, 92, 69, 0.08);
}

.kiosk-stat-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.11em;
    color: var(--gold);
    margin: 0 0 0.55rem;
}

.kiosk-stat-value {
    font-family: "Fraunces", serif;
    font-size: clamp(2.4rem, 9vw, 4rem);
    font-weight: 700;
    color: var(--ink);
    margin: 0;
    line-height: 1;
}

/* ============================================================
   CUSTOMER SHOP — PRODUCT CARDS
   ============================================================ */

.product-card {
    padding: 0;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 28px rgba(39, 34, 24, 0.1);
    border-color: var(--secondary);
}

.product-card-header {
    height: 88px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    flex-shrink: 0;
}

.product-icon {
    font-size: 2.2rem;
    opacity: 0.9;
}

.product-card-body {
    padding: 1.1rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-price {
    font-family: "Fraunces", serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gold);
    white-space: nowrap;
}

/* ============================================================
   LOGIN PAGE
   ============================================================ */

.login-card {
    width: min(420px, 100%);
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 22px;
    box-shadow: 0 22px 52px var(--shadow);
    padding: 2rem 1.75rem;
}

.login-logo {
    font-size: 2.8rem;
    line-height: 1;
    margin-bottom: 0.5rem;
}

img.login-logo {
    height: 48px;
    width: auto;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.login-brand {
    font-family: "Fraunces", serif;
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 0.25rem;
    letter-spacing: 0.02em;
}

.login-toggle-btn {
    color: var(--secondary);
    text-decoration: none;
    font-size: 0.84rem;
}

.login-toggle-btn:hover {
    color: var(--gold);
    text-decoration: none;
}

@media (max-width: 576px) {
    .login-card {
        padding: 1.5rem 1.2rem;
        border-radius: 18px;
    }

    .kiosk-stats-row {
        gap: 0.65rem;
    }

    .metric-card {
        gap: 0.65rem;
    }

    .metric-icon {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }
}

/* ── Cart / Checkout ───────────────────────────────────────────────────────── */

.cart-item-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: var(--surface-2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    color: var(--gold);
    flex-shrink: 0;
}

.cart-total {
    font-family: "Fraunces", serif;
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--gold);
}

.fulfilment-option {
    display: block;
    padding: 1rem 1.25rem;
    border-radius: 14px;
    border: 1.5px solid var(--line);
    background: var(--paper);
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.fulfilment-option--active {
    border-color: var(--gold);
    background: var(--surface);
}

.fulfilment-option--disabled {
    opacity: 0.55;
    cursor: not-allowed;
    padding: 1rem 1.25rem;
    border-radius: 14px;
    border: 1.5px solid var(--line);
    background: var(--surface);
}

.fulfilment-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--surface-2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--gold);
    flex-shrink: 0;
}

/* Yoco popup layer fix is handled entirely in JavaScript (customer_cart.html)
   so that inline setProperty('important') beats any cached stylesheet rule.  */
