/* ── Tokens ─────────────────────────────────────────────────────────────── */
:root {
    --primary:   #1b6ec2;
    --primary-d: #1461ab;
    --success:   #22c55e;
    --warning:   #f59e0b;
    --danger:    #ef4444;
    --bg:        #f8f9fa;
    --card:      #ffffff;
    --border:    #dee2e6;
    --text:      #212529;
    --muted:     #6c757d;
    --radius:    0.5rem;
}

/* ── Global ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body { background: var(--bg); color: var(--text); }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn-primary {
    display: inline-flex; align-items: center; justify-content: center;
    padding: .5rem 1.25rem; border-radius: var(--radius);
    background: var(--primary); color: #fff; border: none;
    font-size: .95rem; font-weight: 500; cursor: pointer;
    transition: background .15s;
}
.btn-primary:hover:not(:disabled) { background: var(--primary-d); }
.btn-primary:disabled { opacity: .6; cursor: not-allowed; }

.btn-secondary {
    display: inline-flex; align-items: center; justify-content: center;
    padding: .5rem 1.25rem; border-radius: var(--radius);
    background: #fff; color: var(--text); border: 1px solid var(--border);
    font-size: .95rem; font-weight: 500; cursor: pointer;
    transition: background .15s;
}
.btn-secondary:hover:not(:disabled) { background: var(--bg); }
.btn-secondary:disabled { opacity: .6; cursor: not-allowed; }

.btn-full  { width: 100%; }
.btn-sm    { padding: .3rem .75rem; font-size: .82rem; }

.btn-logout {
    background: none; border: none; cursor: pointer;
    color: #d7d7d7; font-size: .9rem;
}
.btn-logout:hover { color: #fff; }

.btn-back {
    display: inline-flex; align-items: center; gap: .3rem;
    background: none; border: none; cursor: pointer;
    color: var(--primary); font-size: .9rem; font-weight: 500;
    padding: .25rem 0; margin-bottom: .75rem;
}
.btn-back:hover { color: var(--primary-d); text-decoration: underline; }

/* ── Utility ─────────────────────────────────────────────────────────────── */
.loading        { text-align: center; padding: 2rem; color: var(--muted); font-size: 1rem; }
.loading-inline { text-align: center; padding: .75rem; color: var(--muted); font-size: .85rem; }

.empty-state {
    text-align: center; padding: 3rem 1rem; color: var(--muted);
}
.empty-state button {
    margin-top: 1rem; padding: .5rem 1.5rem;
    background: var(--primary); color: #fff; border: none;
    border-radius: var(--radius); cursor: pointer;
}

.error-banner {
    background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca;
    border-radius: var(--radius); padding: .75rem 1rem; margin-bottom: 1rem;
    font-size: .9rem;
}
.error { color: var(--danger); font-size: .875rem; margin: .5rem 0; }

/* ── Forms ───────────────────────────────────────────────────────────────── */
.form-card {
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1.5rem; max-width: 640px;
}

.form-group { display: flex; flex-direction: column; gap: .35rem; margin-bottom: 1rem; }
.form-group label { font-size: .85rem; font-weight: 600; color: var(--text); }
.form-group input,
.form-group select,
.form-group textarea {
    padding: .5rem .75rem; border: 1px solid var(--border);
    border-radius: var(--radius); font-size: .95rem; width: 100%;
    background: #fff; transition: border-color .15s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none; border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(27,110,194,.15);
}
.form-input {
    width: 100%; padding: .5rem .75rem; border: 1px solid var(--border);
    border-radius: var(--radius); font-size: .95rem; background: #fff;
}
.form-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(27,110,194,.15); }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 480px) { .form-row { grid-template-columns: 1fr; } }

.form-actions { display: flex; gap: .75rem; justify-content: flex-end; margin-top: 1.25rem; }

.checkbox-label { display: flex; align-items: center; gap: .5rem; font-size: .9rem; cursor: pointer; }
.checkbox-label input[type=checkbox] { width: 1rem; height: 1rem; }

/* ── Status chips ────────────────────────────────────────────────────────── */
.status {
    display: inline-block; padding: .2rem .6rem; border-radius: 999px;
    font-size: .75rem; font-weight: 600; text-transform: capitalize;
}
.status.pending        { background: #fef9c3; color: #854d0e; }
.status.confirmed      { background: #dbeafe; color: #1e40af; }
.status.preparing      { background: #ede9fe; color: #5b21b6; }
.status.readyforpickup { background: #d1fae5; color: #065f46; }
.status.pickedup       { background: #cffafe; color: #164e63; }
.status.ontheway       { background: #fed7aa; color: #9a3412; }
.status.delivered      { background: #d1fae5; color: #065f46; }
.status.cancelled      { background: #fee2e2; color: #991b1b; }

/* ── Auth ────────────────────────────────────────────────────────────────── */
.auth-page {
    min-height: 80vh; display: flex; align-items: center;
    justify-content: center; padding: 1rem;
}
.auth-card {
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 2rem; width: 100%; max-width: 400px;
    box-shadow: 0 4px 16px rgba(0,0,0,.08);
}
.auth-card h1 { font-size: 1.5rem; font-weight: 700; margin-bottom: 1.5rem; text-align: center; }
.auth-form { display: flex; flex-direction: column; gap: .25rem; }
.auth-footer { text-align: center; font-size: .85rem; color: var(--muted); margin-top: 1rem; }
.auth-tabs { display: flex; gap: .5rem; margin-bottom: 1.25rem; }
.auth-tab { flex: 1; padding: .5rem; border: 1.5px solid var(--border); border-radius: var(--radius); background: #fff; cursor: pointer; font-size: .9rem; transition: all .15s; }
.auth-tab.active { background: var(--text); color: #fff; border-color: var(--text); }
.auth-hint { font-size: .85rem; color: var(--muted); margin-bottom: 1rem; }
.auth-success { text-align: center; padding: 1.5rem 0; }
.auth-success-icon { font-size: 2.5rem; margin-bottom: .75rem; }
.btn-link { background: none; border: none; color: var(--muted); font-size: .85rem; cursor: pointer; padding: .25rem 0; text-decoration: underline; }
.btn-oauth {
    display: flex; align-items: center; justify-content: center; gap: .6rem;
    width: 100%; padding: .65rem 1rem; border-radius: var(--radius);
    font-size: .9rem; font-weight: 600; cursor: pointer;
    border: 1.5px solid var(--border); transition: opacity .15s; margin-bottom: .5rem;
}
.btn-oauth:hover:not(:disabled) { opacity: .85; }
.btn-oauth:disabled { opacity: .55; cursor: not-allowed; }
.oauth-icon { flex-shrink: 0; }
.btn-google { background: #fff; color: #3c4043; }
.btn-facebook { background: #1877f2; color: #fff; border-color: #1877f2; }
.auth-divider {
    display: flex; align-items: center; gap: .75rem;
    color: var(--muted); font-size: .8rem; margin: .25rem 0 .5rem;
}
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; border-top: 1px solid var(--border); }

/* ── Home ────────────────────────────────────────────────────────────────── */
.home-page { padding: 1rem; }

.search-bar { margin-bottom: 1rem; }
.search-bar input {
    width: 100%; padding: .6rem 1rem; border: 1px solid var(--border);
    border-radius: 999px; font-size: .95rem; background: var(--card);
}
.search-bar input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(27,110,194,.15); }

.categories { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.category-chip {
    padding: .35rem .9rem; border-radius: 999px; border: 1px solid var(--border);
    background: var(--card); font-size: .85rem; cursor: pointer; transition: all .15s;
    white-space: nowrap;
}
.category-chip.active,
.category-chip:hover   { background: var(--primary); color: #fff; border-color: var(--primary); }

.stores-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px,1fr)); gap: 1rem; }

/* ── Store Card ──────────────────────────────────────────────────────────── */
.store-card {
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius); overflow: hidden; cursor: pointer;
    transition: box-shadow .15s, transform .15s;
}
.store-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.1); transform: translateY(-2px); }

.store-card-image {
    position: relative; height: 140px; background: #e9ecef;
    display: flex; align-items: center; justify-content: center;
}
.store-card-image img { width: 100%; height: 100%; object-fit: cover; }
.store-card-placeholder { font-size: 3rem; }

.badge-featured {
    position: absolute; top: .5rem; right: .5rem;
    background: var(--warning); color: #fff;
    font-size: .7rem; font-weight: 700; padding: .2rem .5rem;
    border-radius: 999px; text-transform: uppercase; letter-spacing: .04em;
}

.store-card-body { padding: .75rem 1rem 1rem; }
.store-card-body h3 { font-size: 1rem; font-weight: 700; margin: 0 0 .2rem; }
.store-card-category { font-size: .8rem; color: var(--muted); margin: 0 0 .5rem; }
.store-card-footer { display: flex; justify-content: space-between; align-items: center; font-size: .82rem; }
.rating { color: var(--warning); font-weight: 600; }
.city   { color: var(--muted); }

/* ── Store Detail ────────────────────────────────────────────────────────── */
.store-detail-page { padding: 1rem; }

.store-hero {
    display: flex; align-items: center; gap: 1rem;
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1rem; margin-bottom: 1rem;
}
.store-logo { width: 72px; height: 72px; border-radius: var(--radius); object-fit: cover; border: 1px solid var(--border); }
.store-info h2 { font-size: 1.2rem; font-weight: 700; margin: 0 0 .2rem; }
.store-meta { font-size: .82rem; color: var(--muted); display: flex; gap: .75rem; flex-wrap: wrap; margin-top: .25rem; }

.categories-filter { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.filter-chip {
    padding: .3rem .8rem; border-radius: 999px; border: 1px solid var(--border);
    background: var(--card); font-size: .82rem; cursor: pointer; transition: all .15s;
}
.filter-chip.active,
.filter-chip:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px,1fr)); gap: 1rem; }
.error-state { text-align: center; padding: 2rem; color: var(--danger); }

.cart-bar {
    position: fixed; bottom: 1rem; left: 50%; transform: translateX(-50%);
    background: var(--primary); color: #fff; border-radius: 999px;
    padding: .75rem 2rem; display: flex; align-items: center; gap: 1rem;
    box-shadow: 0 4px 16px rgba(0,0,0,.2); cursor: pointer; z-index: 100;
    white-space: nowrap;
}
.cart-bar button { background: none; border: none; color: #fff; font-size: .95rem; cursor: pointer; font-weight: 600; }

/* ── Product Card ────────────────────────────────────────────────────────── */
.product-card {
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column;
}
.product-card.unavailable { opacity: .55; }

.product-image { width: 100%; height: 120px; object-fit: cover; }
.product-body  { padding: .75rem; flex: 1; display: flex; flex-direction: column; gap: .3rem; }
.product-name  { font-size: .95rem; font-weight: 700; }
.product-desc  { font-size: .8rem; color: var(--muted); flex: 1; }
.product-footer { display: flex; justify-content: space-between; align-items: center; margin-top: .5rem; }
.product-price  { font-weight: 700; color: var(--primary); }
.add-btn {
    background: var(--primary); color: #fff; border: none;
    border-radius: 999px;
    padding: .38rem .9rem;
    font-size: .8rem; font-weight: 600;
    cursor: pointer; white-space: nowrap; flex-shrink: 0;
    transition: background .15s, transform .1s;
}
.add-btn:hover  { background: var(--primary-d); transform: scale(1.03); }
.add-btn:active { transform: scale(.97); }
.add-btn:disabled { background: var(--border); color: var(--muted); cursor: not-allowed; transform: none; }

/* ── Cart ────────────────────────────────────────────────────────────────── */
.cart-page { padding: 1rem; max-width: 640px; }
.cart-page h1 { font-size: 1.4rem; font-weight: 700; margin-bottom: 1rem; }

.cart-items  { display: flex; flex-direction: column; gap: .75rem; margin-bottom: 1.5rem; }
.cart-item   {
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: .75rem 1rem;
    display: flex; align-items: center; gap: .75rem;
}
.item-info    { flex: 1; display: flex; flex-direction: column; }
.item-name    { font-weight: 600; font-size: .9rem; }
.item-price   { font-size: .8rem; color: var(--muted); }
.item-controls { display: flex; align-items: center; gap: .4rem; }
.item-controls button {
    width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--border);
    background: var(--bg); cursor: pointer; font-size: .9rem; display: flex; align-items: center; justify-content: center;
}
.item-controls button.remove { border-color: var(--danger); color: var(--danger); }
.item-controls span { min-width: 1.5rem; text-align: center; font-weight: 600; }
.line-total { font-weight: 700; min-width: 4rem; text-align: right; }

.cart-summary {
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1rem; margin-bottom: 1rem;
}
.summary-row { display: flex; justify-content: space-between; padding: .35rem 0; font-size: .9rem; }
.summary-row.total { border-top: 1px solid var(--border); margin-top: .35rem; padding-top: .75rem; font-weight: 700; font-size: 1rem; }

.checkout-btn {
    width: 100%; padding: .75rem; background: var(--primary); color: #fff;
    border: none; border-radius: var(--radius); font-size: 1rem; font-weight: 600; cursor: pointer;
    transition: background .15s;
}
.checkout-btn:hover:not(:disabled) { background: var(--primary-d); }
.checkout-btn:disabled { opacity: .6; cursor: not-allowed; }

/* ── Orders ──────────────────────────────────────────────────────────────── */
.orders-page { padding: 1rem; }
.orders-page h1 { font-size: 1.4rem; font-weight: 700; margin-bottom: 1rem; }

.orders-list { display: flex; flex-direction: column; gap: .75rem; }

.order-card {
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1rem;
}
.order-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: .5rem; }
.order-id   { font-weight: 700; font-size: .95rem; }
.order-date { font-size: .8rem; color: var(--muted); }
.order-store { font-size: .9rem; color: var(--muted); margin-bottom: .5rem; }

.order-items { display: flex; flex-direction: column; gap: .3rem; margin: .75rem 0; }
.order-item  { display: flex; justify-content: space-between; font-size: .85rem; }

.order-totals {
    border-top: 1px solid var(--border); padding-top: .5rem;
    display: flex; flex-direction: column; gap: .2rem; font-size: .85rem;
}
.order-totals span { display: flex; justify-content: space-between; }

/* ── Dashboard (shared) ──────────────────────────────────────────────────── */
.dashboard-page  { padding: 1rem; }
.dashboard-title { font-size: 1.4rem; font-weight: 700; margin-bottom: 1rem; }

.stats-row { display: flex; gap: .75rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.stat-card {
    flex: 1; min-width: 100px; background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: .75rem 1rem; text-align: center;
}
.stat-card.success { border-color: var(--success); }
.stat-card.warning { border-color: var(--warning); }
.stat-value { font-size: 1.4rem; font-weight: 700; }
.stat-label { font-size: .78rem; color: var(--muted); margin-top: .15rem; }

.tab-bar { display: flex; gap: .25rem; margin-bottom: 1rem; border-bottom: 2px solid var(--border); }
.tab-btn {
    padding: .5rem 1rem; border: none; background: none; cursor: pointer;
    font-size: .9rem; color: var(--muted); border-bottom: 2px solid transparent;
    margin-bottom: -2px; transition: color .15s;
}
.tab-btn.active, .tab-btn:hover { color: var(--primary); border-bottom-color: var(--primary); }

.section-header {
    display: flex; justify-content: space-between; align-items: center; margin-bottom: .75rem;
}
.section-header h3 { font-size: 1rem; font-weight: 700; margin: 0; }

.no-store-banner {
    text-align: center; padding: 2.5rem 1rem;
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
}
.no-store-banner p { margin-bottom: 1rem; color: var(--muted); }

.store-header-card {
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1rem;
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 1rem;
}
.store-header-info h2 { font-size: 1.1rem; font-weight: 700; margin: 0 0 .15rem; }
.store-city { font-size: .82rem; color: var(--muted); }

.badge { display: inline-block; padding: .2rem .6rem; border-radius: 999px; font-size: .78rem; font-weight: 600; }
.badge-active   { background: #d1fae5; color: #065f46; }
.badge-inactive { background: #fee2e2; color: #991b1b; }
.badge-available   { background: #d1fae5; color: #065f46; font-size: .75rem; padding: .15rem .5rem; border-radius: 999px; }
.badge-unavailable { background: #fee2e2; color: #991b1b; font-size: .75rem; padding: .15rem .5rem; border-radius: 999px; }

/* ── Restaurant: product list ────────────────────────────────────────────── */
.product-list { display: flex; flex-direction: column; gap: .5rem; }
.product-row {
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: .75rem 1rem;
    display: flex; align-items: center; gap: .75rem;
}
.product-row-info { flex: 1; }
.product-row-info .product-name { font-size: .9rem; font-weight: 600; }
.product-row-info .product-price { font-size: .85rem; color: var(--primary); font-weight: 600; }
.product-row-actions { display: flex; gap: .4rem; align-items: center; }

/* ── Delivery: order rows ────────────────────────────────────────────────── */
.order-row {
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: .75rem 1rem; cursor: pointer;
    transition: box-shadow .15s;
}
.order-row:hover  { box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.order-row.expanded { border-color: var(--primary); }

.order-row-top {
    display: flex; gap: .6rem; align-items: center; flex-wrap: wrap;
    font-size: .88rem;
}
.order-id    { font-weight: 700; }
.order-store { flex: 1; color: var(--muted); }
.order-amount { font-weight: 700; color: var(--primary); margin-left: auto; }
.order-date  { font-size: .78rem; color: var(--muted); margin-left: auto; }

.order-row-meta  { font-size: .78rem; color: var(--muted); margin-top: .25rem; }
.order-row-actions { margin-top: .5rem; }

.order-detail { margin-top: .75rem; padding-top: .75rem; border-top: 1px solid var(--border); }
.order-item-row {
    display: flex; justify-content: space-between;
    font-size: .85rem; padding: .2rem 0;
}

.status-actions { display: flex; gap: .5rem; margin-top: .75rem; flex-wrap: wrap; }
.btn-status {
    padding: .4rem .9rem; border: none; border-radius: var(--radius);
    font-size: .82rem; font-weight: 600; cursor: pointer; transition: filter .15s;
}
.btn-status:hover { filter: brightness(.9); }
.btn-status.ontheway  { background: #dbeafe; color: #1e40af; }
.btn-status.delivered { background: #d1fae5; color: #065f46; }
.btn-status.cancel    { background: #fee2e2; color: #991b1b; }

/* ── LanguageSwitcher ────────────────────────────────────────────────────── */
.lang-switcher { margin-top: .5rem; }
.lang-switcher select {
    background: rgba(255,255,255,.15); color: #d7d7d7; border: 1px solid rgba(255,255,255,.3);
    border-radius: var(--radius); padding: .3rem .6rem; font-size: .85rem; cursor: pointer;
    width: 100%;
}

/* ── Responsive tweaks ───────────────────────────────────────────────────── */
@media (max-width: 640px) {
    .stores-grid   { grid-template-columns: 1fr; }
    .products-grid { grid-template-columns: 1fr; }
    .stats-row     { flex-direction: row; }
}

/* ── Status page ─────────────────────────────────────────────────────────── */
.status-page { max-width: 680px; margin: 2rem auto; padding: 0 1rem; }
.status-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 1.5rem; }
.status-loading { color: var(--muted); font-style: italic; }
.status-hint { color: var(--muted); font-size: .875rem; }

.status-overall {
    display: flex; align-items: center; gap: .5rem;
    font-size: 1.1rem; font-weight: 600;
    padding: .75rem 1.25rem; border-radius: 8px;
    margin-bottom: 1.5rem;
}
.status-overall .status-dot {
    width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0;
}
.status-overall .status-ts { font-size: .8rem; font-weight: 400; color: inherit; opacity: .7; margin-left: auto; }

.status-healthy  { background: #dcfce7; color: #15803d; }
.status-degraded { background: #fef9c3; color: #854d0e; }
.status-unhealthy{ background: #fee2e2; color: #991b1b; }
.status-healthy  .status-dot  { background: #16a34a; }
.status-degraded .status-dot  { background: #ca8a04; }
.status-unhealthy .status-dot { background: #dc2626; }

.status-table { width: 100%; border-collapse: collapse; margin-bottom: 1.5rem; }
.status-table th { text-align: left; padding: .5rem .75rem; font-size: .8rem; color: var(--muted); border-bottom: 1px solid var(--border); }
.status-table td { padding: .65rem .75rem; border-bottom: 1px solid var(--border); font-size: .9rem; }
.svc-name { font-weight: 600; text-transform: capitalize; }
.svc-desc  { color: var(--muted); font-size: .8rem; }

.svc-badge { padding: .2rem .6rem; border-radius: 12px; font-size: .75rem; font-weight: 600; }
.badge-healthy  { background: #dcfce7; color: #15803d; }
.badge-degraded { background: #fef9c3; color: #854d0e; }
.badge-unhealthy{ background: #fee2e2; color: #991b1b; }

.btn-refresh {
    padding: .5rem 1.25rem; border-radius: 6px;
    background: var(--primary); color: #fff;
    border: none; cursor: pointer; font-size: .9rem;
}
.btn-refresh:hover { background: var(--primary-d); }

/* ── Store Detail (customer view) ────────────────────────────────────────── */
.store-detail { padding: 1rem; }

.store-banner {
    width: 100%; border-radius: var(--radius); overflow: hidden;
    background: #e9ecef; margin-bottom: 1rem; max-height: 200px;
}
.store-banner img { width: 100%; height: 200px; object-fit: cover; display: block; }

.store-header {
    display: flex; align-items: flex-start; gap: 1rem;
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1rem; margin-bottom: 1rem;
}
.store-header .store-logo { width: 72px; height: 72px; border-radius: var(--radius); object-fit: cover; flex-shrink: 0; }
.store-header .store-info { flex: 1; }
.store-header .store-info h1 { font-size: 1.25rem; font-weight: 700; margin: 0 0 .2rem; }
.store-header .store-info .category { font-size: .82rem; color: var(--muted); margin: 0 0 .2rem; }
.store-header .store-info .description { font-size: .85rem; margin: 0 0 .3rem; }

.store-status-banner {
    padding: .65rem 1rem; border-radius: var(--radius);
    font-size: .88rem; font-weight: 600; margin-bottom: 1rem; text-align: center;
}
.store-status-banner.closed { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.store-status-banner.busy   { background: #fef9c3; color: #854d0e; border: 1px solid #fde68a; }

.products-section { margin-top: .25rem; }
.category-section { display: flex; align-items: center; gap: .75rem; margin: 1.25rem 0 .5rem; padding-bottom: .3rem; border-bottom: 2px solid var(--border); }
.category-image { width: 48px; height: 48px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.category-heading { font-size: 1rem; font-weight: 700; margin: 0; }
.products-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .75rem; margin-bottom: .5rem; }

/* ── Restaurant: store images card ───────────────────────────────────────── */
.store-images-card {
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: .75rem 1rem; margin-bottom: 1rem;
}
.store-images-card h4 { font-size: .95rem; font-weight: 700; margin: 0 0 .75rem; }

.store-images-row { display: flex; gap: 1.5rem; flex-wrap: wrap; }

.store-image-slot { display: flex; flex-direction: column; gap: .4rem; }
.image-slot-label { font-size: .8rem; font-weight: 600; color: var(--muted); }

.store-image-preview { object-fit: cover; border-radius: var(--radius); border: 1px solid var(--border); display: block; }
.logo-preview   { width: 72px; height: 72px; }
.banner-preview { width: 240px; height: 80px; }

.store-image-placeholder {
    display: flex; align-items: center; justify-content: center;
    background: var(--bg); border: 1px dashed var(--border);
    border-radius: var(--radius); font-size: .78rem; color: var(--muted);
    width: 72px; height: 72px;
}
.store-image-placeholder.wide { width: 240px; height: 80px; }

/* ── Restaurant: working hours card ─────────────────────────────────────── */
.store-hours-card {
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: .75rem 1rem; margin-bottom: 1rem;
}
.store-hours-card .section-header { margin-bottom: .75rem; }
.store-hours-card .section-header h4 { font-size: .95rem; font-weight: 700; margin: 0; }

.hours-grid { display: flex; flex-direction: column; }

.hours-row {
    display: flex; align-items: center; gap: .75rem;
    padding: .4rem 0; border-bottom: 1px solid var(--border);
}
.hours-row:last-child { border-bottom: none; }

.hours-day { width: 90px; font-size: .88rem; font-weight: 600; flex-shrink: 0; }
.hours-row .checkbox-label { width: 70px; font-size: .82rem; color: var(--muted); flex-shrink: 0; margin: 0; }

.time-input {
    width: 100px; padding: .25rem .4rem;
    border: 1px solid var(--border); border-radius: var(--radius);
    font-size: .85rem; background: var(--bg); color: var(--text);
}
.time-input:focus { outline: none; border-color: var(--primary); }

.hours-sep { color: var(--muted); font-size: .85rem; flex-shrink: 0; }

/* ── Favorites button ─────────────────────────────────────────────────────── */
.btn-favorite {
    background: none; border: none; font-size: 1.3rem; cursor: pointer;
    color: var(--muted); padding: 0; line-height: 1; transition: color .15s, transform .15s;
}
.btn-favorite:hover     { color: var(--danger); transform: scale(1.1); }
.btn-favorite.favorited { color: var(--danger); }

/* ── Product Card enhancements ────────────────────────────────────────────── */
.product-description    { font-size: .82rem; color: var(--muted); flex: 1; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.product-price-wrap     { display: flex; align-items: baseline; gap: .35rem; flex-wrap: wrap; }
.product-price-original { font-size: .78rem; color: var(--muted); text-decoration: line-through; }
.discount-badge {
    font-size: .7rem; font-weight: 700;
    background: #fee2e2; color: #991b1b;
    border-radius: 999px; padding: .1rem .4rem;
}
.unavailable-label { font-size: .78rem; color: var(--muted); font-style: italic; }

/* ── Reviews ─────────────────────────────────────────────────────────────── */
.review-card {
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: .75rem 1rem; margin-bottom: .5rem;
}
.review-rating  { margin-bottom: .2rem; }
.review-comment { font-size: .9rem; margin: .2rem 0; }
.review-date    { font-size: .78rem; color: var(--muted); }

.stars { display: inline-flex; gap: .15rem; }
.star  { font-size: 1.1rem; cursor: pointer; line-height: 1; transition: color .1s; }
.star.filled { color: var(--warning); }
.star.empty  { color: var(--border); }

/* ── Order card top/bottom rows (customer Orders page) ───────────────────── */
.order-top {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: .4rem;
}
.order-bottom {
    display: flex; justify-content: space-between; align-items: center;
    font-size: .82rem; color: var(--muted);
}

/* ── Mobile responsive additions ─────────────────────────────────────────── */
@media (max-width: 480px) {
    .products-list { grid-template-columns: 1fr; }
    .store-header  { flex-direction: column; align-items: center; text-align: center; }
}

/* ── Product row (restaurant manage) ────────────────────────────────────── */
.discount-badge-sm { background: #dc3545; color: #fff; font-size: .65rem; font-weight: 700; padding: .05em .35em; border-radius: .2rem; vertical-align: middle; }
.product-row-original { font-size: .75rem; color: var(--muted); text-decoration: line-through; margin-left: .25rem; }
.product-row-name { font-size: .9rem; font-weight: 600; }
.product-row-desc { font-size: .78rem; color: var(--muted); }
.product-row-price { font-weight: 600; color: var(--primary); }
.product-list-manage { display: flex; flex-direction: column; gap: .4rem; }
.btn-icon { background: none; border: 1px solid var(--border); border-radius: var(--radius); padding: .25rem .5rem; cursor: pointer; font-size: .85rem; }
.btn-icon:hover { background: var(--bg); }
.btn-icon.danger { border-color: var(--danger); color: var(--danger); }
.btn-danger { background: var(--danger); color: #fff; border: none; border-radius: var(--radius); padding: .45rem 1rem; cursor: pointer; font-weight: 600; }
.btn-danger:disabled { opacity: .6; cursor: not-allowed; }
.modal-actions { display: flex; gap: .75rem; justify-content: flex-end; margin-top: 1.25rem; }
.modal-sm { max-width: 360px !important; }
.order-notes { font-size: .85rem; color: var(--muted); margin: .4rem 0; }

/* ── Image upload (shared between product & store) ───────────────────────── */
.image-preview-wrap { display: flex; align-items: center; gap: .75rem; margin-bottom: .5rem; }
.image-preview { width: 80px; height: 80px; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--border); }
.input-file { display: block; margin-bottom: .25rem; }
.upload-hint { font-size: .8rem; color: var(--muted); }
.btn-link-danger { background: none; border: none; padding: 0; color: var(--danger); cursor: pointer; font-size: .8rem; text-decoration: underline; }

/* ── Toast notifications ─────────────────────────────────────────────────── */
.toast-container { position: fixed; bottom: 1.5rem; right: 1.5rem; display: flex; flex-direction: column; gap: .5rem; z-index: 9999; pointer-events: none; }
.toast-msg { display: flex; align-items: center; gap: .75rem; padding: .75rem 1rem; border-radius: .5rem; box-shadow: 0 4px 16px rgba(0,0,0,.15); font-size: .9rem; font-weight: 500; min-width: 220px; max-width: 360px; pointer-events: auto; animation: toast-in .2s ease; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.toast-msg.info    { background: #eff6ff; color: #1e40af; border-left: 4px solid #3b82f6; }
.toast-msg.success { background: #f0fdf4; color: #166534; border-left: 4px solid #22c55e; }
.toast-msg.warning { background: #fffbeb; color: #92400e; border-left: 4px solid #f59e0b; }
.toast-text { flex: 1; }
.toast-dismiss { background: none; border: none; cursor: pointer; font-size: 1.1rem; line-height: 1; opacity: .6; padding: 0; }
.toast-dismiss:hover { opacity: 1; }

/* ── Order tracking ──────────────────────────────────────────────────────── */
.tracking-page { padding: 1rem; display: flex; flex-direction: column; gap: 1.25rem; }
.tracking-header { display: flex; align-items: center; gap: 1rem; }
.tracking-header h2 { margin: 0; font-size: 1.4rem; }

.status-chip { padding: .25rem .75rem; border-radius: 999px; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.status-chip.pending        { background: #f3f4f6; color: #374151; }
.status-chip.confirmed      { background: #dbeafe; color: #1e40af; }
.status-chip.preparing      { background: #fef9c3; color: #854d0e; }
.status-chip.readyforpickup { background: #ede9fe; color: #5b21b6; }
.status-chip.pickedup       { background: #fce7f3; color: #9d174d; }
.status-chip.ontheway       { background: #d1fae5; color: #065f46; }
.status-chip.delivered      { background: #dcfce7; color: #14532d; }
.status-chip.cancelled      { background: #fee2e2; color: #991b1b; }

.status-timeline { display: flex; gap: 0; overflow-x: auto; padding: .5rem 0; }
.timeline-step { display: flex; flex-direction: column; align-items: center; flex: 1; position: relative; }
.timeline-step:not(:last-child)::after { content: ''; position: absolute; top: 10px; left: 50%; width: 100%; height: 2px; background: #e5e7eb; z-index: 0; }
.timeline-step.done::after, .timeline-step.active::after { background: var(--success); }
.timeline-dot { width: 20px; height: 20px; border-radius: 50%; background: #e5e7eb; border: 2px solid #d1d5db; z-index: 1; transition: background .3s; }
.timeline-step.done .timeline-dot   { background: var(--success); border-color: #16a34a; }
.timeline-step.active .timeline-dot { background: var(--primary); border-color: #2563eb; box-shadow: 0 0 0 4px rgba(59,130,246,.2); }
.timeline-label { font-size: .65rem; margin-top: .35rem; color: var(--muted); text-align: center; white-space: nowrap; }
.timeline-step.done .timeline-label   { color: #16a34a; font-weight: 600; }
.timeline-step.active .timeline-label { color: #2563eb; font-weight: 700; }

.eta-banner { background: #eff6ff; border: 1px solid #bfdbfe; border-radius: var(--radius); padding: .75rem 1rem; color: #1e40af; font-size: .95rem; }
.map-section { display: flex; flex-direction: column; gap: .5rem; }
.map-label { font-size: .82rem; color: var(--muted); margin: 0; }
.delivery-map { height: 280px; border-radius: var(--radius); border: 1px solid var(--border); background: #f3f4f6; }
.map-placeholder { text-align: center; padding: 1rem; color: #9ca3af; font-size: .85rem; }

.order-summary-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.25rem; }
.order-summary-card h4 { margin: 0 0 .75rem; font-size: 1rem; }
.summary-total { display: flex; justify-content: space-between; font-weight: 700; border-top: 1px solid var(--border); margin-top: .5rem; padding-top: .5rem; }

/* ── Profile ─────────────────────────────────────────────────────────────── */
.profile-page { padding: 1rem; }
.profile-tabs { display: flex; gap: .5rem; border-bottom: 2px solid var(--border); padding-bottom: 0; margin-bottom: 1rem; }
.profile-tab-btn { background: none; border: none; border-bottom: 3px solid transparent; padding: .5rem 1.25rem; font-size: .95rem; color: var(--muted); cursor: pointer; margin-bottom: -2px; transition: color .15s, border-color .15s; }
.profile-tab-btn:hover { color: var(--primary); }
.profile-tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }

/* ── Loyalty ─────────────────────────────────────────────────────────────── */
.loyalty-card { background: linear-gradient(135deg,#eff6ff 0%,#dbeafe 100%); border: 1px solid #bfdbfe; border-radius: .75rem; padding: 1.5rem 2rem; display: inline-block; min-width: 220px; text-align: center; }
.loyalty-points-big { font-size: 2.5rem; font-weight: 800; color: #1e40af; line-height: 1; }
.loyalty-tx-row { display: flex; align-items: center; gap: 1rem; padding: .5rem 0; border-bottom: 1px solid #f3f4f6; font-size: .88rem; }
.tx-date   { color: var(--muted); min-width: 90px; }
.tx-reason { flex: 1; }
.tx-points { font-weight: 600; }
.tx-points.positive { color: #16a34a; }
.tx-points.negative { color: var(--danger); }

/* ── Schedule section ────────────────────────────────────────────────────── */
.schedule-toggle { padding: .5rem 0; }
.schedule-picker { max-width: 260px; margin-top: .5rem; }

/* ── Cart additions ──────────────────────────────────────────────────────── */
.address-section  { padding: .5rem 0; }
.order-actions    { padding-top: .5rem; }
.review-form      { background: var(--bg); }
.promo-row   { padding: .5rem 0; }
.promo-input { max-width: 180px; }
.promo-badge { display: inline-block; background: #dcfce7; color: #166534; border-radius: 999px; font-size: .8rem; font-weight: 600; padding: .2em .75em; }

/* ── Tip section ─────────────────────────────────────────────────────────── */
.tip-toggle-row    { margin: .5rem 0; }
.tip-section       { margin: .75rem 0; padding: .75rem; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); }
.tip-label-row     { display: flex; align-items: center; justify-content: space-between; margin-bottom: .5rem; }
.tip-label         { font-weight: 600; font-size: .9rem; color: var(--text); }
.tip-buttons       { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: .5rem; }
.tip-btn { padding: .35rem .9rem; border: 1.5px solid var(--border); border-radius: 999px; background: #fff; cursor: pointer; font-size: .85rem; transition: all .15s; }
.tip-btn:hover  { border-color: var(--muted); }
.tip-btn.active { background: var(--text); color: #fff; border-color: var(--text); }
.tip-custom-input { max-width: 140px; font-size: .9rem; }

/* ── Payment section ─────────────────────────────────────────────────────── */
.payment-section   { margin: 1rem 0; }
.section-title     { font-weight: 600; margin-bottom: .75rem; font-size: .95rem; }
.payment-type-selector { display: flex; gap: .75rem; }
.payment-type-option { flex: 1; display: flex; align-items: center; gap: .5rem; padding: .65rem 1rem; border: 1.5px solid var(--border); border-radius: var(--radius); cursor: pointer; transition: border-color .15s; font-size: .9rem; }
.payment-type-option:hover { border-color: var(--muted); }
.payment-type-option.selected { border-color: var(--text); background: var(--bg); font-weight: 600; }
.payment-type-icon { font-size: 1.1rem; }

/* ── IPS Payment page ────────────────────────────────────────────────────── */
.ips-payment-page { max-width: 480px; margin: 2rem auto; padding: 1.5rem; text-align: center; }
.ips-qr-container { margin: 1.5rem auto; display: inline-block; padding: 1rem; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.ips-qr-image { width: 240px; height: 240px; display: block; }
.ips-instruction { font-size: 1rem; color: var(--muted); margin-bottom: .5rem; }
.ips-details { text-align: left; margin: 1.25rem 0; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: .75rem 1rem; }
.ips-detail-row { display: flex; justify-content: space-between; align-items: center; padding: .35rem 0; font-size: .9rem; }
.ips-detail-row + .ips-detail-row { border-top: 1px solid var(--border); }
.ips-waiting-indicator { color: var(--muted); font-size: .9rem; margin-top: 1rem; }
.ips-confirmed, .ips-expired { padding: 2rem 1rem; }
.ips-confirmed-icon, .ips-expired-icon { font-size: 3rem; margin-bottom: 1rem; }

.saved-card        { display: flex; align-items: center; gap: .75rem; padding: .65rem 1rem; border: 1.5px solid var(--border); border-radius: var(--radius); margin-bottom: .5rem; cursor: pointer; transition: border-color .15s; }
.saved-card:hover  { border-color: var(--muted); }
.saved-card.selected { border-color: var(--text); background: var(--bg); }
.card-brand  { font-weight: 600; font-size: .85rem; min-width: 50px; }
.card-number { color: var(--muted); font-size: .9rem; }
.card-expiry { color: var(--muted); font-size: .8rem; margin-left: auto; }
.card-default-badge { font-size: .7rem; background: var(--success); color: #fff; padding: 2px 6px; border-radius: 10px; }
.btn-add-card { padding: 0; font-size: .9rem; color: var(--primary); background: none; border: none; cursor: pointer; }
.stripe-element { padding: .75rem; border: 1.5px solid var(--border); border-radius: var(--radius); background: #fff; min-height: 44px; }
.payment-tab { padding: .5rem 0; }
.saved-card-row { display: flex; align-items: center; justify-content: space-between; padding: .75rem 1rem; border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: .5rem; }
.card-info    { display: flex; align-items: center; gap: .75rem; }
.card-actions { display: flex; gap: .5rem; }
.address-form-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; margin-top: .75rem; }

/* ── Address card (Profile) ──────────────────────────────────────────────── */
.address-card         { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: .75rem 1rem; margin-bottom: .75rem; }
.address-card.default { border-color: var(--success); background: #f0fdf4; }
.address-label        { font-weight: 600; font-size: .95rem; margin-bottom: .2rem; }
.address-detail       { font-size: .85rem; color: var(--muted); }
.address-actions      { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .5rem; }

/* ── Security tab ────────────────────────────────────────────────────────── */
.security-tab        { max-width: 480px; }
.phone-form          { max-width: 360px; }
.phone-verified-row  { display: flex; align-items: center; gap: .25rem; padding: .75rem 1rem; background: #f0fff4; border: 1px solid #b7ebc8; border-radius: var(--radius); }
.phone-verified-badge { color: #28a745; font-weight: 600; font-size: .95rem; }
.otp-input           { letter-spacing: .25em; font-size: 1.1rem; text-align: center; }

/* ── Notification bell ───────────────────────────────────────────────────── */
.notification-bell { position: relative; display: inline-block; }
.btn-bell  { background: none; border: none; font-size: 1.3rem; cursor: pointer; position: relative; padding: .25rem .5rem; line-height: 1; }
.bell-badge { position: absolute; top: -4px; right: -2px; background: var(--danger); color: #fff; font-size: .65rem; font-weight: 700; border-radius: 10px; padding: 1px 5px; min-width: 16px; text-align: center; line-height: 1.4; }
.bell-backdrop { position: fixed; inset: 0; z-index: 999; }
.bell-dropdown { position: absolute; right: 0; top: calc(100% + 8px); width: 320px; background: #fff; border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.12); z-index: 1000; overflow: hidden; }
.bell-header { display: flex; justify-content: space-between; align-items: center; padding: .75rem 1rem; border-bottom: 1px solid var(--border); font-weight: 600; font-size: .95rem; }
.btn-mark-all { font-size: .8rem; background: none; border: none; color: var(--primary); cursor: pointer; }
.bell-list  { max-height: 380px; overflow-y: auto; }
.bell-empty { padding: 1.5rem; text-align: center; color: var(--muted); font-size: .9rem; }
.bell-item  { padding: .75rem 1rem; border-bottom: 1px solid #f0f0f0; cursor: pointer; transition: background .1s; }
.bell-item:hover { background: var(--bg); }
.bell-item.unread { background: #f0f7ff; }
.bell-item.unread:hover { background: #e8f4ff; }
.bell-item-title { font-weight: 600; font-size: .88rem; margin-bottom: 2px; }
.bell-item-body  { font-size: .82rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bell-item-time  { font-size: .75rem; color: #adb5bd; margin-top: 3px; }
.bell-item.success .bell-item-title { color: #166534; }
.bell-item.warning .bell-item-title { color: var(--warning); }
.bell-item.alert   .bell-item-title { color: var(--danger); }

/* ── StoreCard status badges ─────────────────────────────────────────────── */
.store-card-name-row  { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.store-status-badge   { display: inline-block; padding: .15rem .5rem; border-radius: .25rem; font-size: .75rem; font-weight: 700; line-height: 1.4; }
.badge-closed { background: #fee2e2; color: #991b1b; }
.badge-busy   { background: #fef3c7; color: #92400e; }

/* ── Restaurant dashboard additions ─────────────────────────────────────── */
.store-header-actions { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.btn-busy { padding: .45rem 1rem; border: 2px solid var(--success); background: #f0fdf4; color: #166534; border-radius: var(--radius); font-size: .82rem; font-weight: 700; cursor: pointer; transition: all .15s; }
.btn-busy:hover { background: #dcfce7; }
.btn-busy.busy-active { background: #fef3c7; color: #92400e; border-color: var(--warning); }
.btn-busy.busy-active:hover { background: #fde68a; }
.store-settings-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: .75rem 1rem; margin-bottom: 1rem; }
.prep-time-row { display: flex; align-items: center; gap: .5rem; font-size: .85rem; }
.prep-time-row input[type=number] { width: 60px; padding: .25rem .4rem; border: 1px solid var(--border); border-radius: .25rem; font-size: .85rem; }
.category-sort-list { display: flex; flex-direction: column; gap: .35rem; margin-bottom: 1rem; }
.category-sort-row { display: flex; align-items: center; gap: .75rem; padding: .55rem .9rem; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); cursor: grab; user-select: none; transition: box-shadow .1s; }
.category-sort-row:hover { box-shadow: 0 2px 6px rgba(0,0,0,.08); }
.category-sort-row.dragging { opacity: .5; box-shadow: 0 4px 12px rgba(0,0,0,.15); }
.drag-handle { font-size: 1.1rem; color: var(--muted); cursor: grab; }
.cat-name    { font-size: .9rem; font-weight: 600; flex: 1; }
.cat-thumb   { width: 32px; height: 32px; object-fit: cover; border-radius: .25rem; flex-shrink: 0; }
.cat-row-actions { display: flex; gap: .35rem; margin-left: auto; }
.section-header h4 { font-size: 1rem; font-weight: 700; margin: 0; }
.section-header-actions { display: flex; gap: .5rem; align-items: center; }

/* ── Kitchen ticket ──────────────────────────────────────────────────────── */
.print-ticket-wrapper { display: none; }
.kitchen-ticket { font-family: 'Courier New', Courier, monospace; font-size: 14px; width: 300px; padding: 12px; background: #fff; color: #000; }
.ticket-header  { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.ticket-title   { font-size: 16px; font-weight: bold; }
.ticket-order-id { font-size: 20px; font-weight: bold; }
.ticket-time    { font-size: 12px; color: #555; margin-bottom: 6px; }
.ticket-scheduled { font-weight: bold; margin-bottom: 4px; }
.ticket-divider { color: #555; margin: 6px 0; }
.ticket-item    { display: flex; gap: 8px; margin: 2px 0; }
.ticket-qty     { font-weight: bold; min-width: 28px; }
.ticket-item-note { color: #555; font-size: 12px; padding-left: 12px; }
.ticket-notes   { font-style: italic; margin: 4px 0; }
.ticket-store   { margin-top: 8px; font-size: 12px; color: #555; }
.print-actions  { display: flex; align-items: center; gap: 1rem; margin-top: .75rem; flex-wrap: wrap; }
.auto-print-toggle { display: flex; align-items: center; gap: .35rem; font-size: .82rem; cursor: pointer; }
@media print {
    .page, nav, .top-row, .sidebar, header, footer { display: none !important; }
    .print-ticket-wrapper { display: block !important; }
    .kitchen-ticket { width: 100%; }
}

/* ── Delivery driver dashboard ───────────────────────────────────────────── */
.driver-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; }
.driver-header .dashboard-title { margin: 0; }
.btn-availability { padding: .55rem 1.25rem; border: 2px solid; border-radius: 999px; font-size: .88rem; font-weight: 700; cursor: pointer; transition: all .15s; letter-spacing: .02em; }
.btn-availability.online  { background: #dcfce7; color: #166534; border-color: var(--success); }
.btn-availability.online:hover  { background: #bbf7d0; }
.btn-availability.offline { background: #f3f4f6; color: var(--muted); border-color: var(--border); }
.btn-availability.offline:hover { background: #e5e7eb; }

.nav-links { display: flex; flex-direction: column; gap: .5rem; margin-top: .75rem; padding-top: .75rem; border-top: 1px solid var(--border); }
.nav-group { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.nav-label { font-size: .82rem; font-weight: 600; color: var(--text); min-width: 100px; }
.nav-btn { padding: .3rem .75rem; border-radius: var(--radius); font-size: .78rem; font-weight: 600; text-decoration: none; transition: filter .15s; }
.nav-btn:hover { filter: brightness(.92); text-decoration: none; }
.nav-btn.gmaps { background: #4285f4; color: #fff; }
.nav-btn.waze  { background: #33ccff; color: #000; }

.earnings-period   { display: flex; gap: .35rem; }
.earnings-subtitle { font-size: .95rem; font-weight: 700; margin: 1rem 0 .4rem; }
.earnings-day-list, .earnings-trips-list { display: flex; flex-direction: column; gap: .25rem; margin-bottom: 1rem; }
.earnings-day-row  { display: flex; align-items: center; gap: .75rem; padding: .5rem .75rem; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); font-size: .88rem; }
.day-date  { flex: 1; font-weight: 600; }
.day-trips { color: var(--muted); font-size: .82rem; }
.day-total { font-weight: 700; color: #166534; margin-left: auto; }
.earnings-trip-row { display: flex; align-items: center; gap: .6rem; padding: .4rem .75rem; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); font-size: .82rem; flex-wrap: wrap; }
.trip-id    { font-weight: 700; color: var(--muted); }
.trip-store { flex: 1; }
.trip-date  { color: #9ca3af; font-size: .78rem; }
.trip-fee   { color: var(--text); }
.trip-tip   { color: #059669; font-size: .78rem; }
.trip-total { font-weight: 700; color: #166534; margin-left: auto; }

/* ── Admin dashboard ─────────────────────────────────────────────────────── */
.admin-page  { padding: 1rem; }
.admin-title { font-size: 1.6rem; font-weight: 700; margin-bottom: 1rem; }
.admin-tabs  { display: flex; gap: .5rem; flex-wrap: wrap; border-bottom: 2px solid var(--border); padding-bottom: .25rem; margin-bottom: 1rem; }
.admin-tab-btn { background: none; border: none; padding: .45rem .9rem; border-radius: 6px 6px 0 0; font-weight: 500; color: var(--muted); cursor: pointer; transition: background .15s; }
.admin-tab-btn:hover { background: var(--bg); }
.admin-tab-btn.active { background: var(--primary); color: #fff; }
.admin-section  { padding: 1rem 0; }
.admin-loading  { color: var(--muted); padding: 1.5rem 0; }
.admin-toolbar  { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin-bottom: 1rem; }
.admin-search   { max-width: 320px; }
.admin-table    { width: 100%; border-collapse: collapse; font-size: .9rem; }
.admin-table th { font-size: .8rem; text-transform: uppercase; color: var(--muted); border-bottom: 2px solid var(--border); padding: .5rem .75rem; text-align: left; }
.admin-table td { padding: .55rem .75rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.admin-pager    { display: flex; gap: .75rem; align-items: center; margin-top: .75rem; color: var(--muted); font-size: .85rem; }
.role-select    { min-width: 110px; }
.badge.approval-approved { background: #28a745; color: #fff; }
.badge.approval-pending  { background: #fd7e14; color: #fff; }
.badge.approval-rejected { background: var(--danger); color: #fff; }
.badge.status-pending        { background: #6c757d; color: #fff; }
.badge.status-confirmed      { background: #17a2b8; color: #fff; }
.badge.status-preparing      { background: #fd7e14; color: #fff; }
.badge.status-readyforpickup { background: #20c997; color: #fff; }
.badge.status-pickedup       { background: #007bff; color: #fff; }
.badge.status-ontheway       { background: #6610f2; color: #fff; }
.badge.status-delivered      { background: #28a745; color: #fff; }
.badge.status-cancelled      { background: var(--danger); color: #fff; }
.dispute-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; margin-bottom: .75rem; }
.dispute-card.resolved { border-color: var(--success); }
.dispute-card.rejected { border-color: var(--danger); }
.dispute-header  { display: flex; justify-content: space-between; align-items: center; margin-bottom: .5rem; }
.dispute-id      { font-weight: 600; }
.dispute-reason  { color: var(--text); margin-bottom: .25rem; }
.dispute-resolution { color: var(--muted); font-style: italic; font-size: .9rem; margin-bottom: .25rem; }
.dispute-date    { font-size: .78rem; color: var(--muted); }
.resolve-form    { margin-top: .75rem; }
.badge.dispute-badge-open     { background: #fd7e14; color: #fff; }
.badge.dispute-badge-resolved { background: var(--success); color: #fff; }
.badge.dispute-badge-rejected { background: var(--danger); color: #fff; }
.analytics-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.kpi-card  { background: var(--bg); border-radius: 10px; padding: 1rem 1.25rem; text-align: center; border: 1px solid var(--border); }
.kpi-label { font-size: .8rem; text-transform: uppercase; color: var(--muted); margin-bottom: .25rem; }
.kpi-value { font-size: 1.8rem; font-weight: 700; color: var(--primary); }
.analytics-chart-wrap { overflow-x: auto; }
.bar-chart { display: flex; align-items: flex-end; gap: 4px; height: 160px; padding-bottom: 1.5rem; min-width: 500px; }
.bar-col   { display: flex; flex-direction: column; align-items: center; flex: 1; min-width: 20px; height: 100%; justify-content: flex-end; }
.bar-fill  { width: 100%; background: var(--primary); border-radius: 3px 3px 0 0; min-height: 2px; transition: height .3s; }
.bar-label { font-size: .65rem; color: var(--muted); margin-top: 4px; white-space: nowrap; }
.commission-form-card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; }
.fraud-score        { display: inline-block; padding: .2rem .55rem; border-radius: 99px; font-weight: 700; font-size: .85rem; color: #fff; }
.fraud-score-medium { background: #fd7e14; }
.fraud-score-high   { background: var(--danger); }
.fraud-signals-panel { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; }
.fraud-signal-row { display: flex; align-items: center; padding: .4rem 0; border-bottom: 1px solid var(--border); gap: .75rem; }
.fraud-signal-row:last-child { border-bottom: none; }
.fraud-type-badge { display: inline-block; padding: .15rem .5rem; border-radius: 4px; font-size: .75rem; font-weight: 600; text-transform: uppercase; }
.fraud-type-rapid_orders { background: #fff3cd; color: #856404; }
.fraud-type-refund_abuse  { background: #f8d7da; color: #721c24; }
.fraud-type-cancel_abuse  { background: #fde8d8; color: #7c3e09; }

/* ── Modal inner styling ─────────────────────────────────────────────────── */
.modal h3 { font-size: 1.15rem; font-weight: 700; margin: 0 0 1rem; }
.modal label { display: block; font-size: .85rem; font-weight: 600; margin: .75rem 0 .2rem; }
.modal label .label-hint { font-weight: 400; color: var(--text-muted, #888); font-size: .78rem; margin-left: .25rem; }
.modal input, .modal textarea, .modal select { width: 100%; padding: .45rem .75rem; border: 1px solid var(--border); border-radius: var(--radius); font-size: .9rem; background: #fff; }
.modal input:focus, .modal textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(27,110,194,.15); }

/* ── Modal overrides (shared between Web and Mobile) ────────────────────── */
/* Bootstrap sets .modal { display:none } and .modal-backdrop { opacity:1 }  */
/* Blazor conditionally renders these divs, so we override both.             */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1055;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-backdrop > .modal {
    position: relative;
    display: block !important;
    max-width: 520px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.2);
}

/* ── Import wizard ───────────────────────────────────────────────────────── */
.modal-wide { max-width: 720px !important; }
.import-mapping { display: flex; flex-direction: column; gap: .6rem; margin: 1rem 0; }
.mapping-row { display: grid; grid-template-columns: 200px 1fr; align-items: center; gap: .75rem; }
.mapping-field { font-size: .85rem; font-weight: 600; }
.mapping-field .required { color: var(--danger, #d9534f); }
.import-sample { overflow-x: auto; margin-bottom: 1rem; }
.import-sample-table { width: 100%; border-collapse: collapse; font-size: .78rem; }
.import-sample-table th, .import-sample-table td { border: 1px solid var(--border, #ddd); padding: .3rem .5rem; white-space: nowrap; max-width: 160px; overflow: hidden; text-overflow: ellipsis; }
.import-sample-table th { background: var(--surface-alt, #f5f6f8); font-weight: 700; }
.import-errors { margin: .75rem 0; }
.import-errors summary { cursor: pointer; font-weight: 600; color: var(--danger, #d9534f); }
.import-errors ul { margin: .5rem 0 0 1rem; font-size: .85rem; }
.hint { font-size: .85rem; color: var(--text-muted, #888); margin-bottom: .75rem; }

/* ── App Header (hamburger top bar) ─────────────────────────────────────── */
.app-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 56px;
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: 0 1rem;
    background: #1b2a3b;
    color: #fff;
    z-index: 1100;
    box-shadow: 0 1px 4px rgba(0,0,0,.3);
}

.hamburger-btn {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 26px;
    height: 18px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
}
.hb-line {
    display: block;
    width: 100%;
    height: 2px;
    background: #fff;
    border-radius: 2px;
}

.app-header-brand {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    flex: 1;
}
.app-header-brand:hover { color: #e2e8f0; text-decoration: none; }

.app-header-right {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-left: auto;
}
.app-header .btn-bell { color: rgba(255,255,255,.9); }

/* Body offset for fixed header */
.app-body {
    padding-top: 56px;
    min-height: 100vh;
}

/* ── Drawer backdrop ─────────────────────────────────────────────────────── */
.drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 1200;
    backdrop-filter: blur(1px);
}

/* ── Side drawer panel ───────────────────────────────────────────────────── */
.side-drawer {
    position: fixed;
    top: 0; left: 0;
    width: 280px;
    height: 100vh;
    background: #1b2a3b;
    color: #fff;
    z-index: 1300;
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform .28s cubic-bezier(.4,0,.2,1);
    overflow-y: auto;
}
.side-drawer.open {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0,0,0,.35);
}

/* Drawer header row */
.drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,.1);
    flex-shrink: 0;
}
.drawer-brand { font-size: 1.1rem; font-weight: 700; }
.drawer-close-btn {
    background: none;
    border: none;
    color: rgba(255,255,255,.65);
    font-size: 1rem;
    cursor: pointer;
    padding: .3rem .5rem;
    border-radius: .25rem;
    line-height: 1;
    transition: color .15s, background .15s;
}
.drawer-close-btn:hover { color: #fff; background: rgba(255,255,255,.1); }

/* User card */
.drawer-user-card {
    display: flex;
    align-items: center;
    gap: .85rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,.08);
    flex-shrink: 0;
}
.drawer-avatar {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: var(--primary, #1b6ec2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .9rem;
    font-weight: 700;
    flex-shrink: 0;
}
.drawer-user-name { font-size: .9rem; font-weight: 600; color: #f1f5f9; }
.drawer-user-role { font-size: .76rem; color: rgba(255,255,255,.5); }

/* Navigation */
.drawer-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: .4rem 0;
    overflow-y: auto;
}
.drawer-section-label {
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: rgba(255,255,255,.38);
    padding: .85rem 1.25rem .25rem;
}
.drawer-link {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .6rem 1.25rem;
    color: rgba(255,255,255,.75);
    text-decoration: none;
    font-size: .9rem;
    border-left: 3px solid transparent;
    transition: background .15s, color .15s, border-color .15s;
}
.drawer-link:hover    { background: rgba(255,255,255,.08); color: #fff; text-decoration: none; }
.drawer-link.active   { background: rgba(27,110,194,.3); color: #fff; border-left-color: var(--primary, #1b6ec2); font-weight: 600; }
.drawer-icon { font-size: 1rem; flex-shrink: 0; }

/* Footer */
.drawer-footer {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    padding: .75rem .75rem 1rem;
    border-top: 1px solid rgba(255,255,255,.1);
    flex-shrink: 0;
}
.drawer-logout-btn {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .55rem 1.25rem;
    background: none;
    border: none;
    color: rgba(255,255,255,.7);
    font-size: .9rem;
    cursor: pointer;
    border-radius: .375rem;
    transition: background .15s, color .15s;
    width: 100%;
    text-align: left;
}
.drawer-logout-btn:hover { background: rgba(239,68,68,.18); color: #fca5a5; }

/* Print: hide drawer UI */
@media print {
    .app-header, .side-drawer, .drawer-backdrop { display: none !important; }
}
