:root {
    --bg: #fffcf9;
    --bg-alt: #ffffff;
    --bg-panel: rgba(255, 255, 255, 0.82);
    --text: #1c1108;
    --muted: #8a7560;
    --line: rgba(180, 140, 90, 0.22);
    --brand: #f59e0b;
    --brand-strong: #d97706;
    --accent: #fb923c;
    --danger: #dc2626;
    --success: #0f9d6b;
    --shadow: 0 20px 55px rgba(180, 120, 40, 0.10);
    --radius: 22px;
}

html[data-theme="dark"] {
    --bg: #110d08;
    --bg-alt: #1a1310;
    --bg-panel: rgba(26, 19, 16, 0.78);
    --text: #fff5eb;
    --muted: #c4a882;
    --line: rgba(245, 158, 11, 0.12);
    --shadow: 0 24px 65px rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Manrope", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(245, 158, 11, 0.12), transparent 28%),
        radial-gradient(circle at right, rgba(251, 146, 60, 0.10), transparent 22%),
        linear-gradient(180deg, var(--bg) 0%, color-mix(in srgb, var(--bg) 85%, #fff3e0 15%) 100%);
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select {
    font: inherit;
}

.glass {
    background: var(--bg-panel);
    border: 1px solid var(--line);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
}

.btn {
    border: 0;
    border-radius: 16px;
    padding: 0.9rem 1.2rem;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease, background 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--brand), var(--brand-strong));
    color: #fff;
}

.btn-dark {
    background: #111827;
    color: #fff;
}

.btn-soft {
    background: color-mix(in srgb, var(--bg-alt) 86%, transparent);
    color: var(--text);
    border: 1px solid var(--line);
}

.btn-block {
    width: 100%;
}

.eyebrow {
    margin: 0 0 0.45rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.72rem;
    color: var(--muted);
}

h1,
h2,
h3 {
    margin: 0;
    font-family: "Space Grotesk", sans-serif;
}

.app-shell {
    display: grid;
    grid-template-columns: 290px 1fr;
    gap: 1.2rem;
    padding: 1.2rem;
    position: relative;
}

.shell-gradient {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 15% 15%, rgba(255, 255, 255, 0.36), transparent 15%),
        radial-gradient(circle at 85% 10%, rgba(245, 158, 11, 0.12), transparent 18%);
}

.sidebar,
.topbar,
.panel,
.stat-card,
.kanban-card,
.auth-card,
.single-item,
.hero,
.cart-panel {
    border-radius: var(--radius);
}

.sidebar {
    min-height: calc(100vh - 2.4rem);
    padding: 1.3rem;
    position: sticky;
    top: 1.2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin-bottom: 1.5rem;
}

.brand strong {
    display: block;
    font-size: 1rem;
}

.brand span {
    color: var(--muted);
    font-size: 0.8rem;
}

.brand-mark {
    width: 50px;
    height: 50px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--brand), #38bdf8);
    color: #fff;
    font-family: "Space Grotesk", sans-serif;
    font-weight: 700;
}

.brand-logo {
    width: 50px;
    height: 50px;
    border-radius: 16px;
    object-fit: cover;
    flex-shrink: 0;
}

.nav-stack {
    display: grid;
    gap: 0.45rem;
}

.nav-stack a {
    padding: 0.9rem 1rem;
    border-radius: 16px;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.nav-stack a.active,
.nav-stack a:hover {
    background: color-mix(in srgb, var(--brand) 12%, transparent);
    color: var(--text);
}

.sidebar-footer {
    display: grid;
    gap: 1rem;
}

.mini-card,
.user-chip,
.live-order,
.mini-row,
.menu-card,
.chip {
    border: 1px solid var(--line);
    background: color-mix(in srgb, var(--bg-alt) 84%, transparent);
}

.mini-card {
    padding: 1rem;
    border-radius: 18px;
    display: grid;
    gap: 0.35rem;
}

.mini-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--muted);
}

.main-panel {
    padding-bottom: 1rem;
}

.topbar {
    padding: 1.2rem 1.35rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.user-chip {
    padding: 0.55rem 0.8rem;
    border-radius: 18px;
    display: flex;
    gap: 0.7rem;
    align-items: center;
}

.user-chip__avatar {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--accent), #fb7185);
    color: #fff;
    font-weight: 800;
}

.alert {
    margin-bottom: 1rem;
    padding: 1rem 1.1rem;
    border-radius: 16px;
    border: 1px solid transparent;
}

.alert.success {
    background: rgba(15, 157, 107, 0.12);
    border-color: rgba(15, 157, 107, 0.18);
}

.alert.danger {
    background: rgba(220, 38, 38, 0.1);
    border-color: rgba(220, 38, 38, 0.15);
}

.card-grid,
.card-grid--stats,
.panel-grid,
.kanban-grid,
.menu-grid,
.chip-grid {
    display: grid;
    gap: 1rem;
}

.card-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.card-grid--stats {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    margin-bottom: 1rem;
}

.panel-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 1rem;
}

.panel {
    padding: 1.2rem;
}

.panel-head,
.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.stat-card {
    padding: 1.05rem;
    display: grid;
    gap: 0.35rem;
}

.stat-card span,
.metric-inline span,
.checkout-summary span,
.menu-card span,
.mini-row span {
    color: var(--muted);
}

.stat-card strong {
    font-size: 1.4rem;
}

.stat-card__icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, var(--brand), #38bdf8);
}

.chart-canvas {
    width: 100% !important;
    height: 280px !important;
    min-height: 280px;
    max-height: 320px;
}

.chart-wrap {
    position: relative;
    width: 100%;
    height: 300px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    text-align: left;
    padding: 0.9rem 0.7rem;
    border-bottom: 1px solid var(--line);
}

.data-table th {
    color: var(--muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.badge,
.chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0.45rem 0.8rem;
    font-size: 0.82rem;
}

.chip-grid {
    grid-template-columns: repeat(auto-fit, minmax(120px, max-content));
}

.chip-button {
    cursor: pointer;
}

.form-grid {
    display: grid;
    gap: 1rem;
}

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

label {
    display: grid;
    gap: 0.45rem;
}

label span {
    font-size: 0.85rem;
    color: var(--muted);
}

input,
select {
    width: 100%;
    padding: 0.95rem 1rem;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: color-mix(in srgb, var(--bg-alt) 92%, transparent);
    color: var(--text);
}

.toggle-field {
    grid-template-columns: 1fr auto;
    align-items: center;
    border: 1px solid var(--line);
    padding: 0.85rem 1rem;
    border-radius: 18px;
    background: color-mix(in srgb, var(--bg-alt) 88%, transparent);
}

.toggle-field input {
    width: 22px;
    height: 22px;
}

.form-actions {
    display: flex;
    align-items: end;
}

.live-stack,
.list-stack,
.cart-list {
    display: grid;
    gap: 0.8rem;
}

.live-order,
.mini-row {
    border-radius: 18px;
    padding: 0.9rem 1rem;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
}

.align-right {
    text-align: right;
}

.metric-inline {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.8rem;
}

.metric-inline div,
.checkout-summary {
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 0.9rem 1rem;
    background: color-mix(in srgb, var(--bg-alt) 88%, transparent);
}

.menu-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.menu-card {
    text-align: left;
    padding: 1rem;
    border-radius: 20px;
    cursor: pointer;
    display: grid;
    gap: 0.45rem;
    transition: transform 0.18s ease, border-color 0.18s ease;
}

.menu-card:hover {
    transform: translateY(-2px);
    border-color: rgba(245, 158, 11, 0.35);
}

.menu-card__category {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.pos-layout {
    grid-template-columns: 1.35fr 0.95fr;
}

.cart-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    border-radius: 18px;
    padding: 0.85rem 1rem;
    background: color-mix(in srgb, var(--bg-alt) 88%, transparent);
    border: 1px solid var(--line);
}

.cart-row button {
    background: transparent;
    border: 0;
    color: var(--danger);
    cursor: pointer;
}

.pos-qty-controls {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
}

.pos-qty-btn {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: color-mix(in srgb, var(--bg-alt) 90%, transparent);
    color: var(--text);
    cursor: pointer;
    display: grid;
    place-items: center;
    font-size: 0.85rem;
    transition: background 0.15s, border-color 0.15s;
    padding: 0;
}

.pos-qty-btn:hover {
    border-color: var(--brand);
    background: color-mix(in srgb, var(--brand) 10%, transparent);
}

.pos-qty-value {
    min-width: 28px;
    text-align: center;
    font-weight: 800;
    font-size: 1rem;
}

.pos-item-total {
    color: var(--brand);
    white-space: nowrap;
    min-width: 70px;
    text-align: right;
}

.inline-form {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.kanban-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.kanban-card {
    padding: 1.1rem;
    display: grid;
    gap: 0.85rem;
}

.kanban-card__head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.kds-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.kds-actions .inline-form {
    flex: 1;
}

.urgency-urgent {
    outline: 2px solid rgba(220, 38, 38, 0.25);
}

.urgency-high {
    outline: 2px solid rgba(245, 158, 11, 0.28);
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
}

.auth-shell__visual,
.auth-shell__form {
    position: relative;
    padding: 3rem;
    display: grid;
    place-items: center;
}

.auth-shell__visual {
    overflow: hidden;
    background: linear-gradient(150deg, #1a0e04, #78350f);
    color: #fff5eb;
}

.auth-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(15px);
}

.auth-orb--one {
    width: 220px;
    height: 220px;
    background: rgba(245, 158, 11, 0.38);
    top: 10%;
    left: 12%;
}

.auth-orb--two {
    width: 320px;
    height: 320px;
    background: rgba(59, 130, 246, 0.34);
    bottom: 6%;
    right: 12%;
}

.auth-copy {
    position: relative;
    z-index: 1;
    max-width: 520px;
}

.auth-copy h1 {
    font-size: clamp(2.8rem, 4vw, 4.4rem);
    margin-bottom: 1rem;
}

.auth-shell__form {
    background: linear-gradient(180deg, rgba(255,255,255,0.94), rgba(240,246,253,0.94));
}

.auth-card {
    width: min(100%, 480px);
    padding: 2rem;
}

.credential-note,
.field-error {
    color: var(--muted);
    font-size: 0.9rem;
}

.storefront-shell {
    padding: 1.2rem;
}

.storefront-header {
    border-radius: 24px;
    padding: 0.75rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
    border: 1px solid var(--line);
}

.storefront-header .brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text);
    min-width: 0;
    flex: 1 1 auto;
    margin-bottom: 0;
}

.storefront-header .brand strong {
    font-size: 1.1rem;
    letter-spacing: -0.02em;
}

.storefront-header .brand span {
    font-size: 0.72rem;
    color: var(--muted);
    display: block;
}

.storefront-nav {
    display: flex;
    gap: 0.25rem;
    background: color-mix(in srgb, var(--bg-alt) 92%, transparent);
    border-radius: 16px;
    padding: 0.3rem;
    border: 1px solid var(--line);
}

.storefront-nav a {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 1rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--muted);
    text-decoration: none;
    transition: all 0.2s ease;
}

.storefront-nav a:hover {
    color: var(--fg);
    background: var(--bg);
}

.storefront-nav a.active {
    color: var(--accent);
    background: var(--bg);
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.storefront-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.sf-hamburger {
    display: none;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: color-mix(in srgb, var(--bg-alt) 92%, transparent);
    color: var(--text);
    cursor: pointer;
    font-size: 1.35rem;
    place-items: center;
    transition: background 0.15s, border-color 0.15s;
    flex-shrink: 0;
    padding: 0;
}

.sf-hamburger:hover {
    border-color: var(--brand);
    background: color-mix(in srgb, var(--brand) 8%, transparent);
}

.hero,
.single-item {
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.hero {
    display: grid;
    grid-template-columns: 1.3fr 0.7fr;
    gap: 1rem;
}

.hero h1 {
    font-size: clamp(2.2rem, 4vw, 4rem);
    margin-bottom: 1rem;
}

.hero-panel {
    padding: 1.2rem;
    display: grid;
    gap: 0.5rem;
}

.storefront-grid {
    display: grid;
    grid-template-columns: 1.3fr 0.75fr;
    gap: 1rem;
}

.storefront-menu-card b {
    font-size: 1.05rem;
}

.cart-panel {
    padding: 1.2rem;
    align-self: start;
    position: sticky;
    top: 1.2rem;
}

.branch-card {
    min-height: 190px;
}

.hidden {
    display: none !important;
}

.error-shell {
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 1.5rem;
}

.error-card {
    max-width: 520px;
    padding: 2rem;
    text-align: center;
}

@media (max-width: 1080px) {
    .app-shell,
    .auth-shell,
    .hero,
    .storefront-grid,
    .panel-grid,
    .pos-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        min-height: auto;
    }

    .cart-panel {
        position: static;
    }
}

@media (max-width: 780px) {
    .app-shell,
    .storefront-shell {
        padding: 0.75rem;
    }

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

    .storefront-header {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        padding: 0.6rem 1rem;
        gap: 0.65rem;
    }

    .storefront-header .brand strong {
        font-size: 0.95rem;
    }

    .storefront-header .brand span {
        font-size: 0.65rem;
    }

    .storefront-nav,
    .storefront-actions {
        display: none;
        width: 100%;
        order: 10;
    }

    .storefront-nav.sf-menu-open,
    .storefront-actions.sf-menu-open {
        display: flex;
    }

    .storefront-nav.sf-menu-open {
        flex-direction: column;
        gap: 0.25rem;
        padding: 0.5rem;
        margin-top: 0.15rem;
    }

    .storefront-nav.sf-menu-open a {
        width: 100%;
        padding: 0.75rem 1rem;
        border-radius: 14px;
        font-size: 0.92rem;
    }

    .storefront-actions.sf-menu-open {
        display: grid;
        grid-template-columns: 1fr;
        justify-content: stretch;
        gap: 0.5rem;
        padding: 0 0.5rem 0.5rem;
        order: 11;
    }

    .storefront-actions.sf-menu-open .btn,
    .storefront-actions.sf-menu-open .storefront-inline-form,
    .storefront-actions.sf-menu-open .storefront-inline-form .btn {
        width: 100%;
    }

    .storefront-actions.sf-menu-open .btn {
        justify-content: flex-start;
    }

    .sf-hamburger {
        display: grid;
        margin-left: 0;
    }

    .storefront-nav {
        justify-content: center;
    }

    .storefront-actions {
        justify-content: center;
    }

    .form-grid--two {
        grid-template-columns: 1fr;
    }

    .auth-shell__visual,
    .auth-shell__form {
        padding: 1.4rem;
    }
}

/* ────────────────────────────────────────
   STOREFRONT REDESIGN
   ──────────────────────────────────────── */

.btn-lg {
    padding: 1.1rem 1.65rem;
    font-size: 1rem;
    border-radius: 18px;
}

.btn-glass {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #fff;
}

.btn-glass:hover {
    background: rgba(255, 255, 255, 0.22);
}

.sf-pulse {
    font-size: 0.52rem;
    color: #34d399;
    animation: sf-blink 1.5s ease-in-out infinite;
}

@keyframes sf-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* Hero */
.sf-hero {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    padding: 3.5rem 2.5rem;
    margin-bottom: 1.25rem;
    color: #fff;
}

.sf-hero__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.sf-hero__bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sf-hero__bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(20, 14, 8, 0.52) 0%, rgba(20, 14, 8, 0.24) 38%, rgba(20, 14, 8, 0.08) 100%),
        radial-gradient(circle at 18% 75%, rgba(245, 158, 11, 0.14), transparent 45%);
}

.sf-hero__content {
    position: relative;
    z-index: 1;
    max-width: 680px;
    text-shadow: 0 10px 30px rgba(15, 23, 42, 0.3);
}

.sf-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
    padding: 0.55rem 1.1rem;
    border-radius: 999px;
    font-size: 0.82rem;
    margin-bottom: 1.1rem;
}

.sf-hero h1 {
    font-size: clamp(2.2rem, 4vw, 3.6rem);
    line-height: 1.15;
    margin-bottom: 0.75rem;
}

.sf-hero__sub {
    margin: 0 0 1.5rem;
    font-size: 1.1rem;
    opacity: 0.85;
    max-width: 560px;
    line-height: 1.55;
}

.sf-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* Category Tabs */
.sf-cats {
    display: flex;
    gap: 0.55rem;
    padding: 0.35rem;
    overflow-x: auto;
    margin-bottom: 1.25rem;
    -webkit-overflow-scrolling: touch;
}

.sf-cat-tab {
    flex-shrink: 0;
    border: 1px solid var(--line);
    background: color-mix(in srgb, var(--bg-alt) 88%, transparent);
    color: var(--muted);
    padding: 0.7rem 1.3rem;
    border-radius: 999px;
    cursor: pointer;
    font-size: 0.88rem;
    transition: all 0.2s ease;
}

.sf-cat-tab:hover {
    border-color: var(--brand);
    color: var(--text);
}

.sf-cat-tab--active {
    background: linear-gradient(135deg, var(--brand), var(--brand-strong));
    border-color: transparent;
    color: #fff;
}

/* Main Grid */
.sf-main {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 1.25rem;
    align-items: start;
}

.sf-section-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.13em;
    color: var(--muted);
    margin-bottom: 0.75rem;
}

.sf-section-label i {
    color: var(--accent);
}

.sf-item-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

/* Item Card — vertical layout: image on top, name + price below */
.sf-item-card {
    display: flex;
    flex-direction: column;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: color-mix(in srgb, var(--bg-alt) 90%, transparent);
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
    text-align: left;
    color: var(--text);
    font: inherit;
    overflow: hidden;
    position: relative;
}

.sf-item-card:hover {
    transform: translateY(-2px);
    border-color: rgba(245, 158, 11, 0.3);
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.1);
}

.sf-item-card--featured {
    border-color: rgba(245, 158, 11, 0.22);
    background: linear-gradient(135deg, color-mix(in srgb, var(--bg-alt) 92%, transparent), color-mix(in srgb, var(--accent) 6%, transparent));
}

.sf-item-card .food-img--sf {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 0;
    flex-shrink: 0;
}

.sf-item-card__body {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.75rem 1rem 0.5rem;
}

.sf-item-card__body strong {
    font-size: 0.95rem;
    line-height: 1.3;
}

.sf-item-card__body span {
    font-size: 0.78rem;
    color: var(--muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sf-item-card__meta {
    font-size: 0.75rem !important;
    color: var(--brand) !important;
    font-weight: 700;
}

.sf-item-card__cat {
    font-size: 0.68rem !important;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--brand) !important;
}

.sf-item-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1rem 0.85rem;
}

.sf-item-card__price {
    font-weight: 700;
    font-size: 1.05rem;
    white-space: nowrap;
    color: var(--brand);
}

.sf-item-card__add {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--brand), var(--brand-strong));
    color: #fff;
    font-size: 1rem;
    transition: transform 0.15s ease;
    flex-shrink: 0;
}

.sf-item-card:hover .sf-item-card__add {
    transform: scale(1.08);
}

/* Cart Sidebar */
.sf-cart {
    border-radius: var(--radius);
    padding: 1.35rem;
    position: sticky;
    top: 1.2rem;
    display: grid;
    gap: 1rem;
}

.sf-cart__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sf-cart__head h2 {
    font-size: 1.15rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sf-cart__count {
    background: var(--brand);
    color: #fff;
    min-width: 28px;
    height: 28px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    font-size: 0.78rem;
    font-weight: 700;
}

.sf-cart__items {
    display: grid;
    gap: 0.6rem;
    max-height: 260px;
    overflow-y: auto;
}

.sf-cart__form {
    display: grid;
    gap: 0.85rem;
}

.sf-cart__total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.9rem 1rem;
    border-radius: 16px;
    background: color-mix(in srgb, var(--brand) 8%, transparent);
    border: 1px solid color-mix(in srgb, var(--brand) 15%, transparent);
}

.sf-cart__total span {
    color: var(--muted);
    font-size: 0.88rem;
}

.sf-cart__total strong {
    font-size: 1.2rem;
    color: var(--brand);
}

.sf-cart__fields {
    display: grid;
    gap: 0.6rem;
}

.sf-cart__fields input,
.sf-cart__fields select {
    padding: 0.8rem 1rem;
    border-radius: 14px;
}

.sf-cart__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
}

.sf-checkout-section {
    display: grid;
    gap: 0.5rem;
}

.sf-checkout-section__label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.sf-checkout-section__label i {
    font-size: 0.85rem;
    color: var(--brand);
}


/* ────────────────────────────────────────
   POS REDESIGN
   ──────────────────────────────────────── */

.pos-shell {
    display: grid;
    grid-template-columns: 1.4fr 0.6fr;
    gap: 1.2rem;
    min-height: calc(100vh - 160px);
}

.pos-menu {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.pos-menu__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.pos-menu__head h2 {
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    white-space: nowrap;
}

.pos-search-wrap {
    position: relative;
    flex: 1;
    max-width: 320px;
}

.pos-search-wrap i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: 0.9rem;
}

.pos-search {
    padding-left: 2.6rem !important;
    border-radius: 14px;
}

.pos-cats {
    display: flex;
    gap: 0.45rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
    -webkit-overflow-scrolling: touch;
}

.pos-cat {
    flex-shrink: 0;
    border: 1px solid var(--line);
    background: color-mix(in srgb, var(--bg-alt) 88%, transparent);
    color: var(--muted);
    padding: 0.6rem 1.15rem;
    border-radius: 999px;
    cursor: pointer;
    font-size: 0.84rem;
    transition: all 0.15s ease;
}

.pos-cat:hover {
    color: var(--text);
    border-color: var(--brand);
}

.pos-cat--active {
    background: linear-gradient(135deg, var(--brand), var(--brand-strong));
    border-color: transparent;
    color: #fff;
}

.pos-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
    flex: 1;
    overflow-y: auto;
    align-content: start;
}

.pos-item-card {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 0;
    padding: 0;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: color-mix(in srgb, var(--bg-alt) 90%, transparent);
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
    text-align: left;
    color: var(--text);
    font: inherit;
    overflow: hidden;
}

.pos-item-card:hover {
    transform: translateY(-2px);
    border-color: rgba(245, 158, 11, 0.35);
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}

.pos-item-card .food-img--pos {
    width: 100%;
    height: 110px;
    object-fit: cover;
    border-radius: 0;
    flex-shrink: 0;
}

.pos-item-card__info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.6rem 0.85rem 0.35rem;
}

.pos-item-card__info strong {
    font-size: 0.9rem;
    line-height: 1.3;
}

.pos-item-card__cat {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--brand);
}

.pos-item-card__price {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--brand);
    padding: 0.2rem 0.85rem 0.75rem;
}

/* POS Ticket */
.pos-ticket {
    border-radius: var(--radius);
    padding: 0;
    display: flex;
    flex-direction: column;
    height: fit-content;
    position: sticky;
    top: 1.2rem;
    overflow: hidden;
}

.pos-ticket__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, var(--brand), var(--brand-strong));
    color: #fff;
}

.pos-ticket__head-left {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.pos-ticket__head-left > i {
    font-size: 1.5rem;
    opacity: 0.9;
}

.pos-ticket__head h2 {
    font-size: 1.05rem;
    margin: 0;
    color: #fff;
    line-height: 1.2;
}

.pos-ticket__count {
    font-size: 0.72rem;
    opacity: 0.85;
    font-weight: 500;
}

.pos-vip-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    border: 1.5px solid rgba(255,255,255,0.45);
    background: rgba(255,255,255,0.15);
    color: #fff;
    cursor: pointer;
    transition: all 0.15s;
}

.pos-vip-btn:hover {
    background: rgba(255,255,255,0.3);
    border-color: rgba(255,255,255,0.7);
}

.pos-vip-btn--active {
    background: #fff;
    border-color: transparent;
    color: var(--brand);
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

/* Ticket Sections */
.pos-ticket__section {
    padding: 0 1.25rem;
}

.pos-ticket__section-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted);
    font-weight: 600;
    margin-bottom: 0.55rem;
    margin-top: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.pos-ticket__section-label i {
    font-size: 0.8rem;
    color: var(--brand);
}

.pos-ticket__meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem;
}

.pos-ticket__meta select {
    padding: 0.6rem 0.75rem;
    border-radius: 10px;
    font-size: 0.82rem;
    border: 1px solid var(--line);
    background: var(--bg);
    color: var(--text);
}

.pos-ticket__items {
    display: grid;
    gap: 0.45rem;
    min-height: 60px;
    max-height: 280px;
    overflow-y: auto;
    padding: 0.5rem 0;
}

/* Ticket Footer */
.pos-ticket__footer {
    display: flex;
    flex-direction: column;
    gap: 0;
    border-top: 1px solid var(--line);
    margin-top: 0.25rem;
}

.pos-ticket__totals {
    display: grid;
    gap: 0.3rem;
    padding: 0.85rem 1.25rem 0.5rem;
    background: color-mix(in srgb, var(--bg-alt) 60%, transparent);
}

.pos-ticket__total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.88rem;
}

.pos-ticket__total-row span {
    color: var(--muted);
    font-size: 0.84rem;
}

.pos-ticket__total-row strong {
    font-size: 1.1rem;
    color: var(--brand);
}

.pos-grand-row {
    border-top: 1.5px solid var(--line);
    padding-top: 0.45rem;
    margin-top: 0.25rem;
}

.pos-grand-row span {
    font-weight: 700;
    color: var(--text) !important;
    font-size: 0.92rem !important;
}

.pos-grand-row strong {
    font-size: 1.3rem !important;
}

.pos-change {
    font-size: 0.88rem;
    font-weight: 700;
    min-height: 1.2em;
    transition: color 0.2s;
}

.pos-change--ok {
    color: var(--brand);
}

.pos-change--due {
    color: var(--danger, #ef4444);
}

/* Payment section inside footer */
.pos-ticket__footer .pos-ticket__section {
    padding: 0 1.25rem;
}

.pos-ticket__payment {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.4rem;
}

.pos-ticket__payment select,
.pos-ticket__payment input {
    padding: 0.6rem 0.7rem;
    border-radius: 10px;
    font-size: 0.82rem;
    border: 1px solid var(--line);
    background: var(--bg);
    color: var(--text);
}

.pos-ticket__notes-input {
    margin: 0.65rem 1.25rem 0;
    padding: 0.6rem 0.8rem;
    border-radius: 10px;
    font-size: 0.82rem;
    border: 1px solid var(--line);
    background: var(--bg);
    color: var(--text);
    width: calc(100% - 2.5rem);
}

.pos-ticket__notes-input::placeholder {
    color: var(--muted);
}

.pos-ticket__actions {
    display: flex;
    gap: 0.5rem;
    padding: 0.85rem 1.25rem;
}

.pos-ticket__send {
    flex: 1;
    border-radius: 12px !important;
    font-weight: 600;
}

.pos-ticket__print {
    border-radius: 12px !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
    border: 1px solid var(--line) !important;
}


/* ────────────────────────────────────────
   DASHBOARD REDESIGN
   ──────────────────────────────────────── */

/* Dashboard Hero Banner */
.dash-hero {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.5rem 1.75rem;
    border-radius: 20px;
    border: 1px solid var(--line);
    flex-wrap: wrap;
}

.dash-hero__avatar {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--brand), var(--accent));
    color: #fff;
    font-size: 1.5rem;
    font-weight: 900;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    box-shadow: 0 8px 24px rgba(245,158,11,0.3);
}

.dash-hero__text {
    flex: 1;
}

.dash-hero__text h2 {
    font-size: 1.7rem;
    margin: 0.1rem 0 0.3rem;
    line-height: 1.1;
}

.dash-hero__date {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.82rem;
    color: var(--muted);
    margin-top: 0.15rem;
}

.dash-hero__quick {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

/* Legacy greeting kept for fallback */
.dash-greeting {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.35rem;
}

.dash-greeting h2 {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.dash-greeting__sub {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
}

.dash-greeting__date {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--muted);
    font-size: 0.88rem;
    white-space: nowrap;
    padding: 0.6rem 1rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: color-mix(in srgb, var(--bg-alt) 88%, transparent);
}

/* KPI Cards */
.dash-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
    gap: 0.85rem;
    margin-bottom: 1.35rem;
}

.dash-kpi {
    border-radius: 20px;
    padding: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    transition: transform 0.18s ease;
}

.dash-kpi:hover {
    transform: translateY(-2px);
}

.dash-kpi__icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.dash-kpi__data {
    display: grid;
    gap: 0.15rem;
}

.dash-kpi__data span {
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--muted);
}

.dash-kpi__data strong {
    font-size: 1.35rem;
}

/* Dashboard Rows */
.dash-row-2 {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.dash-chart-panel {
    border-radius: var(--radius);
}

.dash-live-panel {
    border-radius: var(--radius);
}

.dash-live-orders {
    display: grid;
    gap: 0.6rem;
    max-height: 340px;
    overflow-y: auto;
}

.dash-order {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: color-mix(in srgb, var(--bg-alt) 88%, transparent);
}

.dash-order__left {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    flex-wrap: wrap;
}

.dash-order__left strong {
    font-size: 0.92rem;
}

.dash-order__left span {
    font-size: 0.82rem;
    color: var(--muted);
}

.dash-order__badge {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    font-weight: 600;
    background: rgba(245, 158, 11, 0.12);
    color: var(--brand);
}

.dash-order__badge--preparing { background: rgba(245, 158, 11, 0.12); color: #d97706; }
.dash-order__badge--ready { background: rgba(15, 157, 107, 0.12); color: var(--success); }
.dash-order__badge--pending { background: rgba(37, 99, 235, 0.12); color: #2563eb; }
.dash-order__badge--cancelled { background: rgba(220, 38, 38, 0.1); color: var(--danger); }
.dash-order__badge--delivered { background: rgba(15, 157, 107, 0.12); color: var(--success); }

.dash-order__total {
    font-size: 0.95rem;
    white-space: nowrap;
    color: var(--brand);
}

.dash-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 2rem;
    color: var(--muted);
    text-align: center;
}

.dash-empty i {
    font-size: 2rem;
    opacity: 0.5;
}

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

.dash-row-3 .panel {
    border-radius: var(--radius);
}

.dash-row-3 .panel-head > div,
.panel-grid .panel-head > div,
.panel .panel-head > div {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.dash-row-3 .panel-head > div > i,
.panel-grid .panel-head > div > i,
.panel .panel-head > div > i {
    font-size: 1.3rem;
}

.dash-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 700;
    margin-right: 0.5rem;
    background: color-mix(in srgb, var(--brand) 10%, transparent);
    color: var(--brand);
}

.dash-stock-list {
    display: grid;
    gap: 0.55rem;
}

.dash-stock-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0.85rem;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: color-mix(in srgb, var(--bg-alt) 88%, transparent);
}

.dash-stock-row strong {
    font-size: 0.9rem;
}

.dash-stock-row span {
    font-size: 0.78rem;
    color: var(--muted);
}

.dash-stock-qty {
    font-weight: 700;
    font-size: 0.88rem;
}

.dash-stock-qty--low {
    color: var(--danger);
}


/* ────────────────────────────
   Responsive: New Components
   ──────────────────────────── */

/* Food Images */
.food-img {
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
}

.food-img--sm {
    width: 56px;
    height: 56px;
    border-radius: 14px;
}

.food-img--sf {
    width: 100%;
    height: 140px;
    border-radius: 0;
}

.food-img--pos {
    width: 100%;
    height: 110px;
    border-radius: 0;
}

.food-img--xs {
    width: 36px;
    height: 36px;
    border-radius: 10px;
}

.food-img--preview {
    width: 80px;
    height: 60px;
    border-radius: 10px;
}

.dash-item-cell {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

@media (max-width: 1080px) {
    .sf-main,
    .pos-shell,
    .dash-row-2 {
        grid-template-columns: 1fr;
    }

    .sf-cart,
    .pos-ticket {
        position: static;
    }

    .dash-row-3 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 780px) {
    .sf-hero {
        padding: 2rem 1.25rem;
    }

    .sf-hero h1 {
        font-size: 1.8rem;
    }

    .sf-item-grid {
        grid-template-columns: 1fr;
    }

    .pos-items {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }

    .pos-ticket__meta {
        grid-template-columns: 1fr;
    }

    .pos-ticket__payment {
        grid-template-columns: 1fr;
    }

    .dash-greeting {
        flex-direction: column;
        gap: 0.75rem;
    }

    .dash-kpis {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ─────────────────────────────────────────────
   STOREFRONT — UTILITY & CART DRAWER
   ───────────────────────────────────────────── */

/* Empty cart placeholder */
.sf-cart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 2rem 1rem;
    color: var(--muted);
    text-align: center;
}
.sf-cart-empty i { font-size: 2rem; opacity: 0.38; }

/* Quantity controls in cart */
.sf-qty-controls {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
}

.sf-qty-btn {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: color-mix(in srgb, var(--bg-alt) 90%, transparent);
    color: var(--text);
    cursor: pointer;
    display: grid;
    place-items: center;
    font-size: 0.85rem;
    transition: background 0.15s ease, border-color 0.15s ease;
    padding: 0;
}

.sf-qty-btn:hover {
    border-color: var(--brand);
    background: color-mix(in srgb, var(--brand) 10%, transparent);
}

.sf-qty-value {
    min-width: 24px;
    text-align: center;
    font-weight: 700;
    font-size: 0.9rem;
}

/* Textarea inside cart */
.sf-cart__textarea {
    padding: 0.8rem 1rem;
    border-radius: 14px;
    resize: vertical;
    font: inherit;
    min-height: 72px;
}

/* Spinner keyframe */
@keyframes sf-spin { to { transform: rotate(360deg); } }
.sf-spin { display: inline-block; animation: sf-spin 0.75s linear infinite; }

/* Desktop defaults: hide mobile-only elements */
.sf-mobile-only  { display: none !important; }
.sf-cart-float   { display: none; }          /* JS controls via inline style; CSS hides by default */
.sf-drawer-overlay { display: none; }

/* ─── Mobile cart: slide-up drawer (< 960 px) ─── */
@media (max-width: 959px) {

    /* Stack the two-column sf-main to single column */
    .sf-main {
        grid-template-columns: 1fr;
    }

    /* Item grid: 2 columns on mobile for more density */
    .sf-item-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .sf-item-card .food-img--sf {
        height: 100px;
    }

    .sf-item-card__body {
        padding: 0.5rem 0.65rem 0.3rem;
    }

    .sf-item-card__body strong {
        font-size: 0.82rem;
    }

    .sf-item-card__body span {
        font-size: 0.7rem;
        -webkit-line-clamp: 1;
    }

    .sf-item-card__footer {
        padding: 0.35rem 0.65rem 0.65rem;
    }

    .sf-item-card__price {
        font-size: 0.88rem;
    }

    .sf-item-card__add {
        width: 32px;
        height: 32px;
        border-radius: 10px;
        font-size: 0.9rem;
    }

    /* Category tabs compact on mobile */
    .sf-cats {
        gap: 0.35rem;
        margin-bottom: 0.75rem;
    }

    .sf-cat-tab {
        padding: 0.55rem 0.9rem;
        font-size: 0.78rem;
    }

    /* Compact hero */
    .sf-hero { padding: 1.5rem 1rem; }
    .sf-hero h1 { font-size: 1.5rem; }
    .sf-hero__sub { font-size: 0.85rem; margin-bottom: 0.75rem; }
    .sf-hero__actions { gap: 0.5rem; }
    .sf-hero__actions .btn-lg { padding: 0.85rem 1.2rem; font-size: 0.88rem; }
    .sf-hero__badge { padding: 0.4rem 0.8rem; font-size: 0.75rem; margin-bottom: 0.75rem; }

    /* Section labels */
    .sf-section-label { font-size: 0.72rem; margin-bottom: 0.5rem; }

    /* Cart wrap becomes a fixed bottom drawer */
    .sf-cart-wrap {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 500;
        max-height: 88vh;
        overflow-y: auto;
        border-radius: 22px 22px 0 0;
        box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.22);
        transform: translateY(100%);
        transition: transform 0.38s cubic-bezier(0.34, 1.4, 0.64, 1);
        /* match glass card background */
        background: var(--bg-alt);
        border: 1px solid var(--line);
        border-bottom: none;
    }

    /* Opened state (JS adds this class) */
    .sf-cart-wrap--open {
        transform: translateY(0);
    }

    /* Remove sticky inside the drawer; the wrapper scrolls */
    .sf-cart {
        position: static !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        border: none !important;
        background: transparent !important;
    }

    /* Drawer backdrop */
    .sf-drawer-overlay {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 499;
        background: rgba(0, 0, 0, 0.52);
        backdrop-filter: blur(3px);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
    }
    .sf-drawer-overlay--visible {
        opacity: 1;
        pointer-events: all;
    }

    /* Show mobile-only controls (drawer handle, close btn) */
    .sf-mobile-only { display: flex !important; }

    /* Drag handle pill at top of drawer */
    .sf-cart-drawer__handle {
        width: 44px;
        height: 4px;
        border-radius: 999px;
        background: var(--line);
        margin: 0.5rem auto -0.25rem;
    }

    /* Floating cart button — small round circle bottom-right */
    .sf-cart-float {
        position: fixed;
        bottom: 5.9rem;
        right: 1rem;
        left: auto;
        z-index: 498;
        width: 56px;
        height: 56px;
        align-items: center;
        justify-content: center;
        gap: 0;
        padding: 0;
        background: linear-gradient(135deg, var(--brand), var(--brand-strong));
        color: #fff;
        border: none;
        border-radius: 999px;
        cursor: pointer;
        font: 700 0.85rem/1 inherit;
        box-shadow: 0 6px 28px rgba(245, 158, 11, 0.38);
        transition: transform 0.18s ease, box-shadow 0.18s ease;
    }
    .sf-cart-float:active {
        transform: scale(0.93);
        box-shadow: 0 3px 14px rgba(245, 158, 11, 0.3);
    }

    .sf-cart-float i {
        font-size: 1.15rem;
    }

    /* Item count badge on the round float button */
    .sf-float-badge {
        position: absolute;
        top: -4px;
        right: -4px;
        min-width: 22px;
        height: 22px;
        background: #fff;
        color: var(--brand-strong);
        border-radius: 999px;
        padding: 0 0.35rem;
        font-size: 0.72rem;
        font-weight: 800;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border: 2px solid var(--brand);
        box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    }

    /* Extra bottom padding so float button / bottom nav doesn't cover last card */
    .storefront-shell { padding-bottom: 8.5rem; }

    /* Fix oversized dropdowns/inputs in mobile cart drawer */
    .sf-cart__row {
        grid-template-columns: 1fr;
    }
    .sf-cart__fields input,
    .sf-cart__fields select,
    .sf-cart__fields textarea,
    .sf-cart__row select,
    .sf-delivery-zone-select {
        width: 100%;
        font-size: 0.88rem;
        padding: 0.65rem 0.85rem;
        box-sizing: border-box;
    }
}

.storefront-actions {
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.storefront-inline-form {
    margin: 0;
    display: inline-flex;
}

.sf-check {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: start;
    gap: 0.65rem;
    font-size: 0.92rem;
    color: var(--muted);
    width: 100%;
}

.sf-check input {
    width: 20px;
    height: 20px;
    margin: 0.1rem 0 0;
    padding: 0;
    flex: 0 0 20px;
}

.sf-check span {
    min-width: 0;
}

.sf-inline-link {
    color: var(--brand);
    font-weight: 700;
    text-decoration: none;
}

/* ────────────────────────────────────────
   ON-SCREEN RECEIPT / ORDER CONFIRMATION
   ──────────────────────────────────────── */
.sf-modal--receipt {
    max-width: 520px;
}

.sf-receipt {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sf-receipt__header {
    background: var(--bg-alt);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
}

.sf-receipt__header h2 {
    font-weight: 900;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin: 0;
}

.sf-receipt__header p {
    color: var(--muted);
    font-size: 0.88rem;
    margin: 0.3rem 0 0;
}

.sf-receipt__service {
    background: var(--bg-alt);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    margin-bottom: 0.3rem;
}

.sf-receipt__service h3 {
    margin: 0 0 0.5rem;
    font-weight: 800;
    text-transform: uppercase;
}

.sf-receipt__service p {
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.8;
    color: var(--muted);
}

.sf-receipt__service strong {
    color: var(--brand);
}

.sf-receipt__section {
    background: var(--bg-alt);
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
}

.sf-receipt__section h4 {
    margin: 0 0 0.6rem;
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.sf-receipt__section p {
    margin: 0.2rem 0;
    font-size: 0.85rem;
    color: var(--muted);
}

.sf-receipt__branch {
    font-weight: 700 !important;
    font-size: 0.95rem !important;
    color: var(--text) !important;
}

.sf-receipt__ref {
    font-size: 0.78rem !important;
}

.sf-receipt__comments {
    font-style: italic;
}

.sf-receipt__order-title {
    color: var(--brand) !important;
}

.sf-receipt__row-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    background: var(--bg-alt);
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
}

.sf-receipt__row-pair h5 {
    margin: 0 0 0.3rem;
    font-size: 0.78rem;
    font-weight: 700;
}

.sf-receipt__row-pair p {
    margin: 0;
    font-size: 0.82rem;
    color: var(--muted);
}

.sf-receipt__items {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.sf-receipt-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--line);
    font-size: 0.88rem;
}

.sf-receipt-item__left {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
}

.sf-receipt-item__copy {
    display: grid;
    gap: 0.2rem;
}

.sf-receipt-item__mods {
    display: grid;
    gap: 0.15rem;
}

.sf-receipt-item__mod {
    font-size: 0.76rem;
    color: var(--muted);
}

.sf-receipt-qty {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 0.1rem 0.45rem;
    font-size: 0.75rem;
    color: var(--muted);
    flex-shrink: 0;
}

.sf-receipt__totals {
    margin-top: 0.8rem;
    padding-top: 0.8rem;
    border-top: 2px solid var(--line);
}

.sf-receipt-row {
    display: flex;
    justify-content: space-between;
    padding: 0.4rem 0;
    font-size: 0.85rem;
    color: var(--muted);
}

.sf-receipt-row--total {
    padding-top: 0.6rem;
    font-size: 1.05rem;
    color: var(--brand);
}

.sf-account-chip,
.sf-service-note,
.sf-service-banner {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.9rem 1rem;
    border-radius: 16px;
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.16);
}

.sf-service-banner {
    margin-top: 1.15rem;
}

.sf-closed-banner {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.9rem 1rem;
    border-radius: 16px;
    background: rgba(239, 68, 68, 0.10);
    border: 1px solid rgba(239, 68, 68, 0.22);
    color: #dc2626;
    margin-top: 1rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.sf-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(2, 6, 23, 0.58);
    backdrop-filter: blur(6px);
}

.sf-modal-overlay[hidden] {
    display: none;
}

.sf-modal {
    width: 100%;
    max-width: 680px;
    max-height: 90vh;
    border-radius: 28px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow: hidden;
    background: color-mix(in srgb, var(--bg-panel) 96%, transparent);
    border: 1px solid var(--line);
}

.sf-modal__head,
.sf-modal__actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.sf-modal__body {
    overflow-y: auto;
}

.sf-summary-card {
    display: grid;
    gap: 1rem;
}

.sf-summary-hero,
.sf-summary-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.75rem;
}

.sf-summary-hero strong,
.sf-summary-meta span {
    padding: 0.9rem 1rem;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.04);
    border: 1px solid rgba(148, 163, 184, 0.14);
}

.sf-summary-list {
    display: grid;
    gap: 0.65rem;
}

.sf-summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.95rem 1rem;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.04);
    border: 1px solid rgba(148, 163, 184, 0.14);
}

.sf-summary-row span {
    display: block;
    color: var(--muted);
    font-size: 0.85rem;
}

.sf-summary-modifier {
    display: block;
    color: var(--muted);
    font-size: 0.78rem;
    margin-top: 0.2rem;
}

.sf-summary-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.1rem;
    border-radius: 18px;
    background: rgba(245, 158, 11, 0.08);
}

.sf-summary-note {
    padding: 1rem;
    border-radius: 18px;
    background: rgba(245, 158, 11, 0.1);
}

.sf-summary-note p {
    margin: 0.45rem 0 0;
}

html[data-theme="light"] .sf-modal {
    background: rgba(255, 255, 255, 0.97);
}

html[data-theme="light"] .sf-receipt__header,
html[data-theme="light"] .sf-receipt__service,
html[data-theme="light"] .sf-receipt__section,
html[data-theme="light"] .sf-receipt__row-pair,
html[data-theme="light"] .sf-summary-total,
html[data-theme="light"] .sf-summary-note,
html[data-theme="light"] .settings-payments {
    border: 1px solid rgba(148, 163, 184, 0.14);
}

.settings-payments {
    display: grid;
    gap: 0.7rem;
    padding: 1rem;
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.04);
}

.settings-payments > span {
    font-weight: 700;
}

.settings-hero-field small {
    color: var(--muted);
    font-size: 0.82rem;
}

.sf-cart__modifier-line {
    display: block;
    color: var(--muted);
    font-size: 0.76rem;
    margin-top: 0.2rem;
}

.sf-modifier-group {
    display: grid;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: color-mix(in srgb, var(--bg-alt) 88%, transparent);
}

.sf-modifier-group + .sf-modifier-group {
    margin-top: 0.85rem;
}

.sf-modifier-group__head strong {
    display: block;
    font-size: 0.96rem;
}

.sf-modifier-group__head span {
    color: var(--muted);
    font-size: 0.8rem;
}

.sf-modifier-options {
    display: grid;
    gap: 0.55rem;
}

.sf-modifier-option {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.75rem;
    padding: 0.8rem 0.9rem;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    cursor: pointer;
}

.sf-modifier-option input {
    width: 18px;
    height: 18px;
    margin: 0;
    padding: 0;
}

.sf-modifier-option span {
    font-size: 0.9rem;
    color: var(--text);
}

.sf-modifier-option strong {
    font-size: 0.8rem;
    color: var(--brand);
}

.menu-side-builder {
    display: grid;
    gap: 1rem;
    padding: 1rem;
    border-radius: 20px;
    border: 1px solid var(--line);
    background: color-mix(in srgb, var(--bg-alt) 84%, transparent);
}

.menu-side-builder__head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.menu-side-builder__head h4 {
    margin: 0.25rem 0 0;
}

.menu-side-builder__head p {
    margin: 0.35rem 0 0;
    color: var(--muted);
    font-size: 0.85rem;
}

.menu-side-groups {
    display: grid;
    gap: 0.9rem;
}

.menu-side-group {
    display: grid;
    gap: 0.8rem;
    padding: 1rem;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: color-mix(in srgb, var(--bg) 86%, transparent);
}

.menu-side-group__head {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(180px, 0.7fr) minmax(160px, 0.5fr) auto;
    gap: 0.75rem;
    align-items: end;
}

.menu-side-group__toggle {
    min-height: 56px;
}

.menu-side-group__remove,
.menu-side-option__remove {
    align-self: end;
}

.menu-side-options {
    display: grid;
    gap: 0.65rem;
}

.menu-side-option {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(150px, 0.45fr) auto;
    gap: 0.75rem;
    align-items: end;
}

.menu-side-group__add-option {
    justify-self: start;
}

@media (max-width: 780px) {
    .menu-side-builder__head,
    .menu-side-group__head,
    .menu-side-option {
        grid-template-columns: 1fr;
    }

    .menu-side-builder__head {
        display: grid;
    }
}

.settings-hero-preview {
    grid-column: 1 / -1;
    display: grid;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: color-mix(in srgb, var(--bg-alt) 88%, transparent);
}

.settings-hero-preview img {
    width: 100%;
    max-height: 260px;
    object-fit: cover;
    border-radius: 18px;
}

.dash-range {
    margin-bottom: 1.25rem;
}

.dash-range__form {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    align-items: end;
    margin-bottom: 1rem;
}

.dash-range__stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.9rem;
}

.store-auth-wrap {
    display: grid;
    place-items: center;
    padding: 1.25rem 0 0;
}

.store-auth-card {
    width: min(100%, 760px);
}

.store-auth-copy {
    margin: 0 0 1rem;
    color: var(--muted);
    max-width: 62ch;
}

.store-auth-switch {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.store-auth-switch__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 1rem;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: color-mix(in srgb, var(--bg-alt) 90%, transparent);
    color: var(--muted);
    font-weight: 700;
}

.store-auth-switch__link--active {
    background: linear-gradient(135deg, var(--brand), var(--brand-strong));
    border-color: transparent;
    color: #fff;
}

.store-auth-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.store-auth-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1rem;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: color-mix(in srgb, var(--bg-alt) 90%, transparent);
    color: var(--text);
    font-weight: 700;
}

.auth-forgot-link {
    display: block;
    text-align: center;
    font-size: 0.875rem;
    color: var(--muted);
    margin-top: -0.25rem;
}

.auth-forgot-link:hover {
    color: var(--brand);
}

.auth-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.875rem;
    color: var(--muted);
    margin-bottom: 1rem;
}

.auth-back-link:hover {
    color: var(--brand);
}

.store-account-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.2rem;
    margin-top: 1.25rem;
}

/* Account Hero Banner */
.account-hero {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    border-radius: var(--radius);
    margin-top: 1rem;
}

.account-hero__avatar {
    width: 56px;
    height: 56px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--brand), var(--brand-strong));
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 1.4rem;
    font-weight: 800;
    flex-shrink: 0;
}

.account-hero__info {
    flex: 1;
}

.account-hero__info h2 {
    font-size: 1.2rem;
    margin: 0 0 0.15rem;
}

.account-hero__info p {
    margin: 0;
    color: var(--muted);
    font-size: 0.88rem;
}

.account-hero__logout {
    margin: 0;
}

/* Account Stats */
.account-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
    margin-top: 1rem;
}

.account-stat {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 1rem 1.15rem;
    border-radius: 18px;
}

.account-stat > i {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: rgba(245, 158, 11, 0.10);
    color: var(--brand);
    font-size: 1.1rem;
    flex-shrink: 0;
}

.account-stat span {
    display: block;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted);
}

.account-stat strong {
    font-size: 1.05rem;
}

.store-account-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.store-account-summary div {
    padding: 1rem;
    border-radius: 18px;
    background: rgba(245, 158, 11, 0.05);
    border: 1px solid rgba(245, 158, 11, 0.12);
}

.store-account-summary span {
    display: block;
    color: var(--muted);
    font-size: 0.84rem;
    margin-bottom: 0.35rem;
}

.store-account-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.35rem;
}

.store-account-card {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
}

.store-account-card div,
.store-order-row {
    padding: 1rem;
    border-radius: 18px;
    background: rgba(245, 158, 11, 0.04);
    border: 1px solid rgba(245, 158, 11, 0.10);
}

.store-account-card span,
.store-order-row span {
    display: block;
    color: var(--muted);
    font-size: 0.84rem;
    margin-bottom: 0.35rem;
}

.store-account-orders {
    display: grid;
    gap: 0.8rem;
}

.store-order-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.store-order-row__right {
    text-align: right;
}

.store-order-row__right a {
    display: inline-block;
    margin-top: 0.35rem;
    color: var(--brand);
    text-decoration: none;
    font-weight: 700;
}

.sf-mobile-nav {
    display: none;
}

@media (max-width: 780px) {
    .storefront-actions,
    .dash-range__form,
    .dash-range__stats,
    .account-stats,
    .store-account-grid,
    .store-account-card,
    .store-account-summary,
    .store-auth-switch {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 960px) {
    .sf-mobile-nav {
        position: fixed;
        left: 0.75rem;
        right: 0.75rem;
        bottom: 0.7rem;
        z-index: 120;
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 0.5rem;
        padding: 0.55rem;
        border-radius: 22px;
        background: rgba(28, 17, 8, 0.88);
        backdrop-filter: blur(8px);
        box-shadow: 0 18px 45px rgba(2, 6, 23, 0.28);
    }

    .sf-mobile-nav--signed-in {
        grid-template-columns: repeat(5, 1fr);
    }

    .sf-mobile-nav a,
    .sf-mobile-nav__btn {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.22rem;
        padding: 0.55rem 0.2rem;
        border-radius: 14px;
        color: #e2e8f0;
        text-decoration: none;
        font-size: 0.73rem;
        background: transparent;
        border: 0;
        cursor: pointer;
        width: 100%;
        font: inherit;
    }

    .sf-mobile-nav__form {
        margin: 0;
    }

    .sf-mobile-nav a i,
    .sf-mobile-nav__btn i {
        font-size: 1rem;
    }
}
