/* ═══════════════════════════════════════════════
   POS Terminal — Modern Tablet-First Design
   CSS Custom Properties + Container Queries + Modern Effects
   ═══════════════════════════════════════════════ */

:root {
    /* Brand */
    --brand: #f2a51a;
    --brand-dark: #c7790c;
    --brand-light: #fff0c9;
    --brand-glow: rgba(242, 165, 26, 0.24);

    /* Surface */
    --surface-0: #0b0d10;
    --surface-1: #14181d;
    --surface-2: #252b32;
    --surface-3: #3a424c;
    --surface-card: rgba(20, 24, 29, 0.9);

    /* Text */
    --text-primary: #f7f3ea;
    --text-secondary: #b5afa3;
    --text-muted: #817c73;
    --text-dark: #15120e;

    /* Accents */
    --success: #22b573;
    --danger: #ef5b4f;
    --info: #3d8bfd;
    --purple: #9b6bff;

    /* Spacing */
    --gap: 10px;
    --radius: 8px;
    --radius-lg: 8px;
    --radius-full: 999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.22);
    --shadow-md: 0 8px 18px rgba(0,0,0,0.22);
    --shadow-lg: 0 18px 48px rgba(0,0,0,0.38);
    --shadow-glow: 0 0 20px var(--brand-glow);
}

/* Light theme */
[data-theme="light"] {
    --surface-0: #f6f3ee;
    --surface-1: #fffdf8;
    --surface-2: #e9e1d4;
    --surface-3: #d0c5b6;
    --surface-card: rgba(255, 253, 248, 0.92);
    --text-primary: #16120d;
    --text-secondary: #5c5449;
    --text-muted: #8e8578;
    --text-dark: #16120d;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.06);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.1);
    --brand-glow: rgba(245, 158, 11, 0.15);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
    background: var(--surface-0);
    color: var(--text-primary);
    touch-action: manipulation;
    min-height: 100dvh;
    overflow: hidden;
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-font-smoothing: antialiased;
}

button,
input,
textarea,
select {
    font: inherit;
}

button {
    min-height: 44px;
}

*:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

/* ═══ Layout ═══ */
.pos-layout {
    display: grid;
    grid-template-columns: minmax(560px, 1fr) clamp(360px, 32vw, 430px);
    height: 100dvh;
    overflow: hidden;
    background: var(--surface-0);
}

/* ═══ LEFT PANEL — Menu ═══ */
.menu-panel {
    display: flex;
    flex-direction: column;
    background: var(--surface-0);
    overflow: hidden;
}

.menu-command {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    padding: 14px 16px 12px;
    background: var(--surface-1);
    border-bottom: 1px solid color-mix(in srgb, var(--surface-2) 72%, transparent);
    flex-shrink: 0;
}

.menu-command__brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.menu-command__mark {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
    color: #17100a;
    box-shadow: 0 10px 24px rgba(242, 165, 26, 0.22);
}

.menu-command__mark svg {
    width: 25px;
    height: 25px;
}

.menu-command__copy {
    min-width: 0;
}

.menu-command__title {
    font-size: 18px;
    font-weight: 850;
    color: var(--text-primary);
    line-height: 1.1;
}

.menu-command__meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 650;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.menu-command__meta span + span::before {
    content: "";
    display: inline-block;
    width: 5px;
    height: 5px;
    margin-right: 8px;
    border-radius: 50%;
    background: var(--success);
    vertical-align: middle;
}

.menu-command__stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(82px, 1fr));
    gap: 8px;
    width: min(360px, 38%);
    flex-shrink: 0;
}

.menu-command__stat {
    min-height: 48px;
    padding: 8px 10px;
    border: 1px solid color-mix(in srgb, var(--surface-2) 72%, transparent);
    border-radius: 8px;
    background: var(--surface-0);
}

.menu-command__stat span {
    display: block;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 750;
    text-transform: uppercase;
}

.menu-command__stat strong {
    display: block;
    margin-top: 3px;
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 850;
}

.menu-command__stat--accent {
    background: linear-gradient(135deg, rgba(242, 165, 26, 0.16), rgba(34, 181, 115, 0.08));
    border-color: rgba(242, 165, 26, 0.26);
}

.menu-command__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-shrink: 0;
}

.offline-sync-indicator {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 12px;
    border: 1px solid rgba(242, 165, 26, 0.45);
    border-radius: 8px;
    background: rgba(242, 165, 26, 0.14);
    color: #f8bd56;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.offline-sync-indicator--review {
    border-color: rgba(239, 91, 79, 0.58);
    background: rgba(239, 91, 79, 0.14);
    color: #ff8d84;
}

.offline-sync-indicator:disabled {
    cursor: wait;
    opacity: 0.72;
}

/* Search */
.search-bar {
    padding: 12px 16px;
    background: var(--surface-1);
    border-bottom: 1px solid color-mix(in srgb, var(--surface-2) 72%, transparent);
    flex-shrink: 0;
}

.search-bar input {
    width: 100%;
    padding: 13px 44px 13px 42px;
    border: 1.5px solid var(--surface-2);
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 650;
    background: var(--surface-0);
    color: var(--text-primary);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-bar input::placeholder { color: var(--text-muted); }

.search-bar input:focus {
    outline: none;
    border-color: var(--brand);
    background: var(--surface-1);
    box-shadow: 0 0 0 3px var(--brand-glow), var(--shadow-sm);
}

/* Breadcrumbs */
.breadcrumb-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--surface-1);
    border-bottom: 1px solid color-mix(in srgb, var(--surface-2) 72%, transparent);
    min-height: 44px;
    flex-shrink: 0;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.15s ease;
    border: none;
}

.back-btn:active { opacity: 0.8; transform: scale(0.97); }

.breadcrumb-btn {
    display: flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    border: none;
    background: none;
    transition: all 0.15s;
}

.breadcrumb-btn:hover { background: var(--surface-2); color: var(--text-secondary); }
.breadcrumb-btn.active { color: var(--text-primary); font-weight: 600; }
.breadcrumb-sep { color: var(--surface-3); font-size: 12px; }

/* Content scroll */
.menu-scroll {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* ═══ Category Grid ═══ */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
    gap: var(--gap);
    padding: 14px 16px;
}

.category-tile {
    aspect-ratio: 1.18;
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    padding: 16px 12px;
    border: none;
    isolation: isolate;
    transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.2s ease;
    box-shadow: var(--shadow-sm);
    outline: 1px solid rgba(255,255,255,0.08);
}

.category-tile::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.35) 100%);
    z-index: 0;
    pointer-events: none;
}

.category-tile:active {
    transform: scale(0.94);
    box-shadow: var(--shadow-sm);
}

.category-tile .tile-icon {
    font-size: 86px;
    line-height: 1;
    filter: grayscale(1) brightness(10) drop-shadow(0 4px 8px rgba(0,0,0,0.15));
    opacity: 0.22;
    z-index: 0;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -55%);
    pointer-events: none;
}

.category-tile .tile-name {
    font-size: 15px;
    font-weight: 700;
    text-align: center;
    color: white;
    line-height: 1.2;
    text-shadow: 0 1px 4px rgba(0,0,0,0.3);
    max-width: 100%;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    z-index: 1;
    letter-spacing: 0;
}

.category-tile .tile-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: var(--radius-full);
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 700;
    color: white;
    z-index: 1;
}

/* ═══ Product Grid ═══ */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(142px, 1fr));
    gap: 10px;
    padding: 10px 16px 18px;
}

.product-tile {
    background: var(--surface-1);
    border-radius: var(--radius);
    border: 1.5px solid color-mix(in srgb, var(--surface-2) 72%, transparent);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 14px 12px;
    min-height: 104px;
    cursor: pointer;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    position: relative;
}

.product-tile--has-img {
    padding-top: 8px;
    justify-content: flex-end;
}

.product-tile-img {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    object-fit: cover;
    margin-bottom: 6px;
    flex-shrink: 0;
}

.product-tile:active {
    transform: scale(0.95);
    background: var(--surface-2);
}

.product-tile:hover {
    border-color: color-mix(in srgb, var(--brand) 46%, var(--surface-2));
    box-shadow: var(--shadow-sm);
}

.product-tile .product-name {
    font-size: 14px;
    font-weight: 700;
    text-align: left;
    color: var(--text-primary);
    line-height: 1.3;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    letter-spacing: 0;
}

.product-tile .product-price {
    margin-top: auto;
    font-size: 16px;
    font-weight: 850;
    color: var(--brand);
    letter-spacing: 0;
}

.modifier-modal-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 12px;
}

.modal-ttk-btn {
    min-width: 54px;
    height: 34px;
    padding: 0 12px;
    border: 1.5px solid rgba(242, 165, 26, 0.38);
    border-radius: 10px;
    background: rgba(242, 165, 26, 0.16);
    color: var(--brand);
    box-shadow: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 900;
    transition: transform 0.12s ease, background 0.12s ease;
}
.modal-ttk-btn:hover {
    transform: translateY(-1px);
    background: rgba(242, 165, 26, 0.24);
}
.modal-ttk-btn:active { transform: scale(0.95); }

.info-section { margin-bottom: 18px; }
.info-section:last-child { margin-bottom: 0; }
.info-section__label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 6px;
}
.info-section__body {
    font-size: 14px;
    line-height: 1.5;
    color: var(--text);
}

/* ═══ RIGHT PANEL — Cart ═══ */
.cart-panel {
    display: flex;
    flex-direction: column;
    height: 100dvh;
    background: var(--surface-1);
    border-left: 1px solid color-mix(in srgb, var(--surface-2) 72%, transparent);
    box-shadow: -18px 0 48px rgba(0,0,0,0.18);
}

/* Shift bar */
.shift-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 56px;
    padding: 10px 16px;
    background: var(--surface-0);
    border-bottom: 1px solid color-mix(in srgb, var(--surface-2) 72%, transparent);
    flex-shrink: 0;
}

.shift-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.shift-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.shift-dot--open {
    background: var(--success);
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.5);
    animation: pulse-green 2s ease-in-out infinite;
}

.shift-dot--closed { background: var(--danger); }

@keyframes pulse-green {
    0%, 100% { box-shadow: 0 0 4px rgba(34,197,94,0.3); }
    50% { box-shadow: 0 0 12px rgba(34,197,94,0.6); }
}

/* Tabs */
.tab-bar {
    display: flex;
    gap: 6px;
    padding: 8px;
    border-bottom: 1px solid color-mix(in srgb, var(--surface-2) 72%, transparent);
    flex-shrink: 0;
    background: var(--surface-1);
}

.tab-btn {
    flex: 1;
    min-height: 44px;
    padding: 10px 8px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 800;
    text-align: center;
    color: var(--text-muted);
    cursor: pointer;
    position: relative;
    transition: color 0.2s, background 0.2s;
    border: none;
    background: var(--surface-0);
    letter-spacing: 0;
    text-transform: uppercase;
}

.tab-btn--active {
    color: #17100a;
    background: var(--brand);
}

.tab-btn__indicator {
    position: absolute;
    bottom: 5px;
    left: 10px;
    right: 10px;
    height: 2px;
    background: rgba(23,16,10,0.28);
    border-radius: 2px;
}

.tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: var(--radius-full);
    font-size: 10px;
    font-weight: 700;
    margin-left: 4px;
}

.tab-badge--cart { background: var(--brand); color: var(--surface-0); }
.tab-badge--orders { background: var(--surface-2); color: var(--text-secondary); }

.online-orders-entry {
    min-height: 54px;
    margin: 0;
    padding: 0 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: none;
    border-bottom: 1px solid color-mix(in srgb, var(--surface-2) 72%, transparent);
    background: linear-gradient(135deg, rgba(61, 139, 253, 0.14), rgba(242, 165, 26, 0.08)), var(--surface-1);
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 900;
    cursor: pointer;
    letter-spacing: 0;
    flex-shrink: 0;
}

.online-orders-entry--header {
    min-height: 48px;
    padding: 0 16px;
    border: 1px solid color-mix(in srgb, var(--surface-2) 74%, transparent);
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(61, 139, 253, 0.16), rgba(242, 165, 26, 0.12)), var(--surface-0);
    box-shadow: var(--shadow-sm);
}

.online-orders-entry--active {
    background: linear-gradient(135deg, rgba(242, 165, 26, 0.24), rgba(34, 181, 115, 0.14)), var(--surface-1);
    color: var(--brand);
}

.online-orders-entry--pulse {
    animation: online-orders-alert .42s ease-in-out infinite;
}

@keyframes online-orders-alert {
    0%, 100% {
        background: linear-gradient(135deg, #f2a51a, #ef5b4f);
        color: #17100a;
        box-shadow: inset 0 0 0 1px rgba(255,255,255,.18), 0 0 18px rgba(239,91,79,.42);
    }
    50% {
        background: linear-gradient(135deg, #ffcf66, #22b573);
        color: #17100a;
        box-shadow: inset 0 0 0 1px rgba(255,255,255,.28), 0 0 28px rgba(242,165,26,.58);
    }
}

.online-orders-entry__icon {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.online-orders-entry__icon svg {
    width: 24px;
    height: 24px;
}

.online-orders-entry__label {
    min-width: 0;
    white-space: nowrap;
}

.online-orders-entry__badge {
    min-width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
    border-radius: var(--radius-full);
    background: var(--danger);
    color: #fff;
    font-size: 13px;
    font-weight: 900;
}

.yandex-eats-entry {
    background: linear-gradient(135deg, rgba(255,69,58,.16), rgba(255,255,255,.03)), var(--surface-0);
    border-color: color-mix(in srgb, #ff453a 35%, var(--surface-2));
}

.yandex-eats-entry--active {
    background: linear-gradient(135deg, rgba(255,69,58,.26), rgba(255,255,255,.04)), var(--surface-1);
    color: #ff6259;
}

.yandex-eats-entry--pulse {
    animation: yandex-eats-alert .8s ease-in-out infinite;
}

@keyframes yandex-eats-alert {
    0%, 100% { box-shadow: 0 0 0 1px rgba(255,69,58,.22), 0 0 12px rgba(255,69,58,.18); }
    50% { box-shadow: 0 0 0 2px rgba(255,69,58,.5), 0 0 24px rgba(255,69,58,.36); }
}

.yandex-eats-entry__mark,
.yandex-eats-title > span {
    width: 28px;
    height: 28px;
    display: inline-grid;
    place-items: center;
    flex-shrink: 0;
    border-radius: 8px;
    background: #ff453a;
    color: #fff;
    font-size: 17px;
    font-weight: 1000;
}

.yandex-eats-title {
    display: flex;
    align-items: center;
    gap: 9px;
}

.yandex-eats-modes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    margin-bottom: 12px;
    padding: 4px;
    border-radius: 9px;
    background: var(--surface-1);
    border: 1px solid color-mix(in srgb, var(--surface-2) 72%, transparent);
}

.yandex-eats-modes__button--active,
.yandex-eats-modes button {
    min-height: 38px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 850;
}

.yandex-eats-modes button.yandex-eats-modes__button--active {
    background: var(--surface-2);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

.yandex-eats-connection {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-bottom: 12px;
    padding: 11px 12px;
    border: 1px solid color-mix(in srgb, #ff453a 32%, var(--surface-2));
    border-radius: 8px;
    background: rgba(255,69,58,.08);
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.35;
}

.yandex-eats-connection strong { color: #ff6259; }

.yandex-eats-card--new {
    border-color: rgba(255,69,58,.62);
    box-shadow: 0 0 0 1px rgba(255,69,58,.14), 0 14px 34px rgba(255,69,58,.12);
}

.yandex-eats-payment {
    padding: 3px 7px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 800;
    white-space: nowrap;
}

.yandex-eats-payment--paid { background: rgba(34,181,115,.12); color: var(--success); }
.yandex-eats-payment--cash { background: rgba(242,165,26,.12); color: var(--brand); }

.yandex-status--new { background: rgba(255,69,58,.16); color: #ff6259; }
.yandex-status--accepted_by_restaurant { background: rgba(61,139,253,.16); color: var(--info); }
.yandex-status--cooking { background: rgba(155,107,255,.16); color: var(--purple); }
.yandex-status--ready { background: rgba(34,181,115,.16); color: var(--success); }
.yandex-status--taken_by_courier,
.yandex-status--delivered { background: color-mix(in srgb, var(--surface-2) 70%, transparent); color: var(--text-secondary); }
.yandex-status--cancelled { background: rgba(239,91,79,.14); color: var(--danger); }

.yandex-eats-item + .yandex-eats-item { margin-top: 7px; }

.yandex-eats-item__modifier {
    margin: 3px 0 0 26px;
    color: var(--text-muted);
    font-size: 11px;
    line-height: 1.3;
}

.yandex-eats-courier {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding: 9px 10px;
    border-radius: 8px;
    background: var(--surface-0);
    color: var(--text-secondary);
    font-size: 12px;
}

.yandex-eats-courier span,
.yandex-eats-courier small { color: var(--text-muted); }

.yandex-eats-card__actions { grid-template-columns: 1fr auto; }

.yandex-eats-action--primary {
    background: #ff453a;
    color: #fff;
}

.yandex-eats-waiting {
    min-height: 46px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    border-radius: 8px;
    background: rgba(34,181,115,.11);
    color: var(--success);
    font-size: 13px;
    font-weight: 850;
}

.online-orders-panel {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 12px;
    background: var(--surface-0);
}

.online-orders-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.online-orders-header__title {
    font-size: 20px;
    font-weight: 900;
    color: var(--text-primary);
}

.online-orders-header__sub {
    margin-top: 3px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
}

.online-orders-refresh {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: 1px solid var(--surface-2);
    border-radius: 8px;
    color: var(--text-secondary);
    background: var(--surface-1);
}

.online-orders-refresh svg {
    width: 19px;
    height: 19px;
}

.online-orders-empty {
    min-height: 240px;
    justify-content: center;
}

.online-order-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.online-order-card {
    padding: 14px;
    border-radius: 8px;
    background: var(--surface-1);
    border: 1px solid color-mix(in srgb, var(--surface-2) 70%, transparent);
    box-shadow: var(--shadow-sm);
}

.online-order-card--new {
    border-color: rgba(242,165,26,.54);
    box-shadow: 0 0 0 1px rgba(242,165,26,.12), 0 14px 34px rgba(242,165,26,.12);
}

.online-order-card__top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.online-order-card__number {
    font-size: 19px;
    font-weight: 950;
    color: var(--text-primary);
}

.online-order-card__number strong {
    font-size: 30px;
    font-weight: 1000;
    letter-spacing: .02em;
}

.online-order-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
}

.online-order-card__pickup {
    margin-top: 6px;
    color: var(--success);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.online-order-card__total {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    flex-shrink: 0;
}

.online-order-card__total b {
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 950;
}

.online-status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 25px;
    padding: 5px 9px;
    border-radius: var(--radius-full);
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    white-space: nowrap;
}

.online-status--pending_confirmation { background: rgba(242,165,26,.18); color: var(--brand); }
.online-status--accepted { background: rgba(61,139,253,.18); color: #8bbcff; }
.online-status--preparing { background: rgba(155,107,255,.18); color: #c7b2ff; }
.online-status--ready { background: rgba(34,181,115,.18); color: #68e2aa; }

.online-order-card__items {
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding: 10px 0;
    border-top: 1px solid color-mix(in srgb, var(--surface-2) 70%, transparent);
    border-bottom: 1px solid color-mix(in srgb, var(--surface-2) 70%, transparent);
}

.online-order-card__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 14px;
    color: var(--text-secondary);
}

.online-order-card__item span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.online-order-card__item b {
    display: inline-block;
    margin-right: 7px;
    color: var(--brand);
}

.online-order-card__item small {
    flex-shrink: 0;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 800;
}

.online-order-card__note {
    margin-top: 10px;
    padding: 9px 10px;
    border-radius: 8px;
    background: var(--surface-0);
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.35;
}

.online-order-chat-entry {
    width: 100%;
    min-height: 56px;
    margin-top: 10px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border: 1px solid color-mix(in srgb, var(--surface-2) 76%, transparent);
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(61,139,253,.12), rgba(34,181,115,.07)), var(--surface-0);
    color: var(--text-primary);
    text-align: left;
    cursor: pointer;
}

.online-order-chat-entry span {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.online-order-chat-entry b {
    font-size: 13px;
    font-weight: 900;
}

.online-order-chat-entry small {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
}

.online-order-chat-entry em {
    min-width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    padding: 0 8px;
    border-radius: var(--radius-full);
    background: var(--brand);
    color: #17100a;
    font-size: 12px;
    font-style: normal;
    font-weight: 950;
    flex-shrink: 0;
}

.online-chat-panel {
    margin-top: 12px;
    border: 1px solid color-mix(in srgb, var(--surface-2) 76%, transparent);
    border-radius: 8px;
    background: var(--surface-1);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.online-chat-panel__head {
    min-height: 58px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-bottom: 1px solid color-mix(in srgb, var(--surface-2) 70%, transparent);
    background: linear-gradient(135deg, rgba(242,165,26,.12), rgba(61,139,253,.08)), var(--surface-0);
}

.online-chat-panel__title {
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 950;
}

.online-chat-panel__sub {
    margin-top: 2px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 800;
}

.online-chat-panel__close {
    width: 40px;
    height: 40px;
    min-height: 40px;
    border: 1px solid var(--surface-2);
    border-radius: 8px;
    background: var(--surface-1);
    color: var(--text-secondary);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.online-chat-panel__body {
    max-height: 310px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background:
        linear-gradient(color-mix(in srgb, var(--surface-0) 92%, transparent), color-mix(in srgb, var(--surface-0) 92%, transparent)),
        var(--surface-0);
}

.online-chat-empty {
    padding: 16px 10px;
    color: var(--text-muted);
    text-align: center;
    font-size: 13px;
    font-weight: 700;
}

.online-chat-message {
    max-width: 88%;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.online-chat-message--mine {
    align-self: flex-end;
    align-items: flex-end;
}

.online-chat-message--guest {
    align-self: flex-start;
}

.online-chat-message__bubble {
    padding: 9px 11px;
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 750;
    line-height: 1.35;
    white-space: pre-wrap;
}

.online-chat-message--mine .online-chat-message__bubble {
    background: var(--brand);
    color: #17100a;
}

.online-chat-message--guest .online-chat-message__bubble {
    background: var(--surface-2);
    color: var(--text-primary);
}

.online-chat-message__meta {
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 800;
}

.online-chat-quick {
    padding: 10px 12px 0;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.online-chat-quick button {
    min-height: 36px;
    padding: 0 11px;
    flex: 0 0 auto;
    border: 1px solid color-mix(in srgb, var(--surface-2) 76%, transparent);
    border-radius: var(--radius-full);
    background: var(--surface-0);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 850;
    cursor: pointer;
}

.online-chat-closed {
    margin: 10px 12px 0;
    padding: 9px 10px;
    border-radius: 8px;
    background: rgba(34,181,115,.12);
    color: #68e2aa;
    font-size: 12px;
    font-weight: 850;
}

.online-chat-composer {
    padding: 10px 12px 12px;
    display: flex;
    gap: 8px;
}

.online-chat-composer input {
    min-width: 0;
    flex: 1;
    height: 44px;
    border: 1px solid color-mix(in srgb, var(--surface-2) 80%, transparent);
    border-radius: 8px;
    background: var(--surface-0);
    color: var(--text-primary);
    padding: 0 12px;
    font-size: 14px;
    font-weight: 700;
}

.online-chat-composer button {
    min-width: 96px;
    min-height: 44px;
    border: none;
    border-radius: 8px;
    background: var(--brand);
    color: #17100a;
    font-size: 13px;
    font-weight: 950;
    cursor: pointer;
}

.online-chat-composer button:disabled,
.online-chat-quick button:disabled {
    opacity: .55;
    cursor: default;
}

.online-order-card__actions {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    margin-top: 12px;
}

.online-order-action {
    min-height: 46px;
    border-radius: 8px;
    border: none;
    padding: 0 13px;
    font-size: 14px;
    font-weight: 900;
}

.online-order-action--primary {
    background: var(--brand);
    color: #17100a;
}

.online-order-action--ghost {
    border: 1px solid color-mix(in srgb, var(--danger) 36%, var(--surface-2));
    background: rgba(239,91,79,.08);
    color: #ff9d96;
}

.online-order-action:disabled {
    opacity: .58;
}

/* Cart items */
.cart-items {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 10px;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: var(--surface-0);
    border-radius: var(--radius);
    margin-bottom: 6px;
    border: 1px solid color-mix(in srgb, var(--surface-2) 62%, transparent);
    transition: all 0.15s;
}

.cart-item:active { background: var(--surface-2); }

.cart-item__info {
    flex: 1;
    min-width: 0;
}

.cart-item__name {
    font-size: 14px;
    font-weight: 750;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-item__mods {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 1px;
}

.cart-item__price {
    font-size: 13px;
    font-weight: 800;
    color: var(--brand);
    margin-top: 2px;
}

/* Qty control */
.qty-control {
    display: flex;
    align-items: center;
    gap: 2px;
    background: var(--surface-2);
    border-radius: var(--radius);
    padding: 2px;
}

.qty-btn {
    width: 34px;
    height: 34px;
    min-height: 34px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    cursor: pointer;
    border: none;
    background: none;
    transition: background 0.1s;
}

.qty-btn:active { background: var(--surface-3); }

.qty-value {
    width: 28px;
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

.cart-item__delete {
    color: var(--text-muted);
    cursor: pointer;
    border: none;
    background: none;
    padding: 4px;
    transition: color 0.15s;
}

.cart-item__delete:active { color: var(--danger); }

/* Customer bar */
.customer-bar {
    padding: 10px 12px;
    border-top: 1px solid rgba(255,255,255,0.06);
    background: var(--surface-0);
    flex-shrink: 0;
}

.customer-bar input {
    width: 100%;
    padding: 8px 12px;
    border: 1.5px solid var(--surface-2);
    border-radius: var(--radius);
    font-size: 14px;
    font-family: 'SF Mono', 'JetBrains Mono', monospace;
    background: var(--surface-1);
    color: var(--text-primary);
    letter-spacing: 0.5px;
    transition: all 0.15s;
}

.customer-bar input:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-glow);
}

.customer-bar input::placeholder { color: var(--text-muted); }

/* Totals */
.totals-bar {
    padding: 12px 16px;
    border-top: 1px solid color-mix(in srgb, var(--surface-2) 72%, transparent);
    background: linear-gradient(180deg, var(--surface-1), var(--surface-0));
    flex-shrink: 0;
}

.totals-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.totals-row--subtotal {
    font-size: 13px;
    color: var(--text-secondary);
}

.totals-row--bonus {
    font-size: 13px;
    color: var(--brand);
}

.totals-row--total {
    padding-top: 8px;
    font-size: 28px;
    font-weight: 900;
    color: var(--text-primary);
    margin-top: 4px;
    letter-spacing: 0;
}

/* Payment buttons */
.payment-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 12px;
    flex-shrink: 0;
}

.payment-btn {
    min-height: 64px;
    height: 64px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 850;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
    letter-spacing: 0;
    transition: all 0.12s cubic-bezier(0.4, 0, 0.2, 1);
}

.payment-btn:active { transform: scale(0.96); }
.payment-btn:disabled { opacity: 0.25; cursor: not-allowed; }

.payment-btn--cash { background: linear-gradient(135deg, #22c55e, #16a34a); }
.payment-btn--card { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.payment-btn--sbp { background: linear-gradient(135deg, #0ea5e9, #2563eb); }
.payment-btn--split { background: linear-gradient(135deg, #22b573, #3d8bfd) !important; }

.payment-btn__icon {
    display: grid;
    place-items: center;
    min-width: 28px;
    height: 24px;
    padding: 0 6px;
    border-radius: 7px;
    background: rgba(255,255,255,0.18);
    color: #fff;
    font-size: 12px;
    font-weight: 900;
}

.payment-btn--cash:active:not(:disabled) { box-shadow: 0 0 16px rgba(34,197,94,0.4); }
.payment-btn--card:active:not(:disabled) { box-shadow: 0 0 16px rgba(59,130,246,0.4); }
.payment-btn--sbp:active:not(:disabled) { box-shadow: 0 0 16px rgba(139,92,246,0.4); }

/* ═══ Shift Slider ═══ */
.shift-slider {
    width: 100%;
    max-width: 320px;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
}

.shift-slider__track {
    position: relative;
    height: 56px;
    border-radius: 28px;
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.15), var(--shadow-glow);
}

.shift-slider__track--close {
    height: 44px;
    border-radius: 22px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.15), 0 0 20px rgba(239,68,68,0.2);
}

.shift-slider__progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: rgba(255,255,255,0.12);
    border-radius: inherit;
    transition: width 0.05s ease-out;
}

.shift-slider__progress--close {
    background: rgba(0,0,0,0.12);
}

.shift-slider__thumb {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: white;
    box-shadow: 0 2px 12px rgba(0,0,0,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-dark);
    cursor: grab;
    transition: left 0.15s ease-out, transform 0.15s;
    z-index: 2;
}

.shift-slider__thumb:active {
    cursor: grabbing;
    transform: translate(-50%, -50%) scale(1.08);
    transition: left 0s, transform 0.1s;
}

.shift-slider__thumb--close {
    width: 38px;
    height: 38px;
    color: #dc2626;
}

.shift-slider__thumb--done {
    background: var(--success);
    color: white !important;
    transform: translate(-50%, -50%) scale(1.1);
}

.shift-slider__label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
    pointer-events: none;
    text-shadow: 0 1px 3px rgba(0,0,0,0.2);
    letter-spacing: 0.5px;
    z-index: 1;
}

.shift-slider__label--close {
    font-size: 12px;
    letter-spacing: 0.3px;
}

.shift-slider--open .shift-slider__thumb:not(:active):not(.shift-slider__thumb--done) {
    animation: slider-pulse 2s ease-in-out infinite;
}

@keyframes slider-pulse {
    0%, 100% { box-shadow: 0 2px 8px rgba(0,0,0,0.2); }
    50% { box-shadow: 0 2px 16px var(--brand-glow), 0 0 0 6px rgba(245,158,11,0.12); }
}

/* ═══ Bottom bar ═══ */
.bottom-bar {
    padding: 8px 12px;
    border-top: 1px solid rgba(255,255,255,0.06);
    background: var(--surface-0);
    flex-shrink: 0;
}

/* ═══ Stats tab (Касса) ═══ */
.stats-card {
    background: var(--surface-0);
    border-radius: var(--radius);
    padding: 14px;
    border: 1px solid rgba(255,255,255,0.04);
}

.stats-revenue-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.stats-revenue-card {
    border-radius: var(--radius);
    padding: 12px;
    text-align: center;
}

.stats-revenue-card--cash { background: rgba(34,197,94,0.1); }
.stats-revenue-card--card { background: rgba(59,130,246,0.1); }
.stats-revenue-card--sbp { background: rgba(139,92,246,0.1); }
.stats-revenue-card--yandex { background: rgba(255,69,58,0.1); }

/* ═══ Orders tab ═══ */
.order-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    cursor: pointer;
    transition: background 0.1s;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    color: var(--text-primary);
}

.order-row:active { background: var(--surface-2); }

.order-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.order-dot--open { background: var(--brand); animation: pulse-amber 2s infinite; }
.order-dot--closed { background: var(--success); }
.order-dot--refunded { background: var(--danger); }

@keyframes pulse-amber {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* ═══ Modals — Glass effect ═══ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
}

.modal-card {
    background: var(--surface-1);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    max-height: 85vh;
    overflow: hidden;
    color: var(--text-primary);
}

.modal-card input,
.modal-card textarea {
    background: var(--surface-0);
    border: 1.5px solid var(--surface-2);
    border-radius: var(--radius);
    color: var(--text-primary);
    transition: all 0.15s;
}

.modal-card input:focus,
.modal-card textarea:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-glow);
}

.modal-card input::placeholder,
.modal-card textarea::placeholder { color: var(--text-muted); }

/* ═══ Success overlay ═══ */
.success-overlay {
    position: absolute;
    inset: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.success-card {
    background: var(--surface-1);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius-lg);
    padding: 32px;
    text-align: center;
    max-width: 340px;
    box-shadow: var(--shadow-lg);
}

.hardware-payment-card {
    width: min(420px, calc(100% - 32px));
    background: var(--surface-1);
    border: 1px solid var(--surface-2);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    padding: 28px;
    color: var(--text-primary);
    text-align: center;
}

.hardware-payment-card__status {
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.hardware-payment-spinner {
    width: 46px;
    height: 46px;
    border: 4px solid var(--surface-2);
    border-top-color: var(--brand);
    border-radius: 50%;
    animation: hardware-payment-spin 0.8s linear infinite;
}

@keyframes hardware-payment-spin {
    to { transform: rotate(360deg); }
}

.hardware-payment-icon {
    width: 48px;
    height: 48px;
}

.hardware-payment-icon--error { color: var(--danger); }
.hardware-payment-icon--warning { color: var(--brand); }

.hardware-payment-card__title {
    margin: 0;
    font-size: 20px;
    line-height: 1.3;
    font-weight: 800;
}

.hardware-payment-card__amount {
    margin-top: 12px;
    font-size: 36px;
    line-height: 1;
    font-weight: 800;
    color: var(--brand);
    font-variant-numeric: tabular-nums;
}

.hardware-payment-card__message {
    margin: 16px auto 0;
    max-width: 340px;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
}

.hardware-payment-card__error {
    margin: 10px 0 0;
    color: var(--danger);
    font-size: 13px;
    line-height: 1.4;
}

.hardware-payment-card__hint {
    margin-top: 16px;
    padding: 10px 12px;
    background: var(--surface-0);
    border: 1px solid var(--surface-2);
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 12px;
}

.hardware-payment-card__actions {
    margin-top: 22px;
}

.hardware-payment-card__button-stack {
    display: grid;
    gap: 9px;
}

.hardware-payment-action {
    width: 100%;
    min-height: 46px;
    border: 0;
    border-radius: 8px;
    padding: 11px 16px;
    font-size: 14px;
    line-height: 1.3;
    font-weight: 700;
    cursor: pointer;
}

.hardware-payment-action:disabled {
    opacity: 0.45;
    cursor: wait;
}

.hardware-payment-action--primary {
    background: var(--brand);
    color: var(--surface-0);
}

.hardware-payment-action--secondary {
    background: var(--surface-2);
    color: var(--text-primary);
}

.hardware-payment-action--quiet {
    background: transparent;
    color: var(--text-muted);
}

.success-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(34,197,94,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 32px;
}

/* ═══ Scrollbars ═══ */
.cart-items::-webkit-scrollbar,
.menu-scroll::-webkit-scrollbar {
    width: 3px;
}

.cart-items::-webkit-scrollbar-track,
.menu-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.cart-items::-webkit-scrollbar-thumb,
.menu-scroll::-webkit-scrollbar-thumb {
    background: var(--surface-3);
    border-radius: 2px;
}

/* ═══ Utility ═══ */
.glass {
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.08);
}

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-1 { flex: 1; min-width: 0; min-height: 0; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.shrink-0 { flex-shrink: 0; }
.min-w-0 { min-width: 0; }
.w-full { width: 100%; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hidden { display: none; }
.relative { position: relative; }
.absolute { position: absolute; }
.sticky { position: sticky; }
.overflow-y-auto { overflow-y: auto; }
.overflow-hidden { overflow: hidden; }
.space-y-1 > * + * { margin-top: 4px; }
.space-y-2 > * + * { margin-top: 8px; }
.space-y-3 > * + * { margin-top: 12px; }
.divide-y > * + * { border-top: 1px solid rgba(255,255,255,0.04); }
.border-t { border-top: 1px solid rgba(255,255,255,0.06); }
.border-b { border-bottom: 1px solid rgba(255,255,255,0.06); }
.animate-spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.animate-pulse { animation: pulse-fade 2s ease-in-out infinite; }
@keyframes pulse-fade { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }
.line-through { text-decoration: line-through; }
.font-mono { font-family: 'SF Mono', 'JetBrains Mono', monospace; }
.rounded-full { border-radius: 9999px; }
.transition { transition: all 0.15s ease; }

/* Search results bar */
.search-results-bar {
    padding: 8px 12px;
    background: rgba(245,158,11,0.08);
    border-bottom: 1px solid rgba(245,158,11,0.12);
    font-size: 13px;
    color: var(--brand);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.search-results-bar button {
    font-size: 12px;
    color: var(--brand-dark);
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 600;
}

/* Empty state */
.empty-state {
    text-align: center;
    color: var(--text-muted);
    padding: 48px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.empty-state svg { color: var(--surface-3); }
.empty-state p { font-size: 14px; }

.connection-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 38px;
}

.connection-action {
    min-width: 142px;
    min-height: 38px;
    padding: 8px 14px;
    border: 1px solid var(--surface-3);
    border-radius: 6px;
    background: var(--surface-1);
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.connection-action--primary {
    border-color: var(--brand);
    background: var(--brand);
    color: #111827;
}

.connection-action:disabled {
    cursor: wait;
    opacity: 0.65;
}

/* Section divider label */
.section-label {
    padding: 8px 12px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Order groups */
.order-group-header {
    padding: 8px 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: sticky;
    top: 0;
    z-index: 10;
}

.order-group-header--open {
    background: rgba(245,158,11,0.08);
    color: var(--brand);
    border-bottom: 1px solid rgba(245,158,11,0.12);
}

.order-group-header--closed {
    background: var(--surface-0);
    color: var(--text-muted);
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

/* Revenue summary in orders */
.shift-revenue-bar {
    padding: 12px;
    background: var(--surface-0);
    border-top: 1px solid rgba(255,255,255,0.06);
    text-align: center;
}

/* Customer chip */
.customer-chip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 0;
}

.customer-chip__name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.customer-chip__bonus {
    font-size: 12px;
    font-weight: 600;
    color: var(--brand);
    margin-left: 6px;
}

.customer-chip__remove {
    font-size: 12px;
    color: var(--danger);
    background: none;
    border: none;
    cursor: pointer;
}

/* Bonus bar */
.bonus-apply-btn {
    width: 100%;
    padding: 8px;
    border-radius: var(--radius);
    background: rgba(245,158,11,0.1);
    color: var(--brand);
    font-size: 13px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background 0.15s;
}

.bonus-apply-btn:active { background: rgba(245,158,11,0.2); }

.bonus-active-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-radius: var(--radius);
    background: rgba(245,158,11,0.08);
}

.bonus-active-bar span {
    font-size: 13px;
    font-weight: 600;
    color: var(--brand);
}

.bonus-active-bar button {
    font-size: 12px;
    color: var(--danger);
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 500;
}

/* Customer autocomplete dropdown */
.autocomplete-dropdown {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 100%;
    margin-bottom: 4px;
    background: var(--surface-1);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    z-index: 30;
    max-height: 200px;
    overflow-y: auto;
}

.autocomplete-dropdown button {
    width: 100%;
    text-align: left;
    padding: 10px 12px;
    border: none;
    background: none;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background 0.1s;
}

.autocomplete-dropdown button + button { border-top: 1px solid rgba(255,255,255,0.04); }
.autocomplete-dropdown button:active { background: var(--surface-2); }

/* Status badge */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 10px;
    font-weight: 700;
}

.badge--success { background: rgba(34,197,94,0.15); color: var(--success); }
.badge--warning { background: rgba(245,158,11,0.15); color: var(--brand); }
.badge--danger { background: rgba(239,68,68,0.15); color: var(--danger); }
.badge--muted { background: var(--surface-2); color: var(--text-secondary); }
.badge--cash { background: rgba(34,197,94,0.1); color: var(--success); }
.badge--card { background: rgba(59,130,246,0.1); color: var(--info); }
.badge--sbp { background: rgba(139,92,246,0.1); color: var(--purple); }

/* Receipt status */
.receipt-status {
    padding: 6px 12px;
    font-size: 12px;
    flex-shrink: 0;
}

/* Cash ops */
.cash-op-btn {
    padding: 12px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.15s;
}

.cash-op-btn--deposit { background: rgba(34,197,94,0.1); color: var(--success); }
.cash-op-btn--deposit:active { background: rgba(34,197,94,0.2); }
.cash-op-btn--withdraw { background: rgba(239,68,68,0.1); color: var(--danger); }
.cash-op-btn--withdraw:active { background: rgba(239,68,68,0.2); }

/* Modal buttons */
.modal-btn {
    padding: 12px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.12s;
}

.modal-btn:active { transform: scale(0.97); }

.modal-btn--cancel { background: var(--surface-2); color: var(--text-primary); }
.modal-btn--confirm { background: var(--brand); color: var(--surface-0); }
.modal-btn--danger { background: var(--danger); color: white; }
.modal-btn--success { background: var(--success); color: white; }
.modal-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ═══ Customer Panel (Numpad) — fullscreen ═══ */
.customer-panel {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: var(--surface-1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.customer-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--surface-0);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    flex-shrink: 0;
}

.customer-panel__header h3 {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
}

.customer-panel__close {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--surface-2);
    border: none;
    color: var(--text-primary);
    font-size: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.12s;
}

.customer-panel__close:active { background: var(--surface-3); transform: scale(0.92); }

/* Numpad phone display */
.numpad-display {
    padding: 24px 20px;
    text-align: center;
    flex-shrink: 0;
    background: var(--surface-0);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.numpad-display__number {
    font-family: 'SF Mono', 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 36px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 2px;
    min-height: 44px;
    line-height: 44px;
}

.numpad-display__number--empty {
    color: var(--surface-3);
}

.numpad-display__hint {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 6px;
}

/* Numpad mode toggle */
.numpad-mode-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    padding: 8px 20px;
    border-radius: 20px;
    border: 1.5px solid var(--surface-3);
    background: var(--surface-0);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.numpad-mode-toggle:active { transform: scale(0.95); }

.numpad-mode-toggle--active {
    border-color: var(--brand);
    background: rgba(245, 158, 11, 0.1);
    color: var(--brand);
}

/* Customer results in panel */
.customer-panel__results {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    min-height: 0;
}

.customer-panel__section-title {
    padding: 8px 16px;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: var(--surface-0);
    border-bottom: 1px solid rgba(255,255,255,0.04);
    position: sticky;
    top: 0;
    z-index: 1;
}

.customer-result-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    color: var(--text-primary);
    cursor: pointer;
    transition: background 0.1s;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}

.customer-result-row:active { background: var(--surface-2); }

.customer-result-row__name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.customer-result-row__phone {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 1px;
    font-family: 'SF Mono', 'JetBrains Mono', monospace;
}

.customer-result-row__bonus {
    text-align: right;
    flex-shrink: 0;
    margin-left: 12px;
}

.customer-result-row__bonus-value {
    font-size: 20px;
    font-weight: 800;
    color: var(--brand);
}

.customer-result-row__bonus-label {
    font-size: 10px;
    color: var(--text-muted);
}

/* Not found state */
.customer-not-found {
    padding: 16px;
    text-align: center;
}

.customer-not-found__text {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

/* Quick register form */
.quick-register {
    padding: 12px 16px;
    background: var(--surface-0);
    border-top: 1px solid rgba(255,255,255,0.06);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.quick-register__row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.quick-register__input {
    flex: 1;
    padding: 10px 14px;
    background: var(--surface-1);
    border: 1.5px solid var(--surface-2);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.15s;
}

.quick-register__input:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-glow);
}

.quick-register__input::placeholder { color: var(--text-muted); }

.quick-register__submit {
    padding: 10px 16px;
    border-radius: var(--radius);
    border: none;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.12s;
}

.quick-register__submit--save {
    background: var(--success);
    color: white;
}

.quick-register__submit--save:active { transform: scale(0.96); box-shadow: 0 0 12px rgba(34,197,94,0.3); }

.quick-register__submit--skip {
    background: var(--surface-2);
    color: var(--text-secondary);
    padding: 10px 12px;
}

.quick-register__submit--skip:active { background: var(--surface-3); }

/* Numpad grid */
.numpad-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 8px 12px 12px;
    flex-shrink: 0;
    background: var(--surface-0);
    border-top: 1px solid rgba(255,255,255,0.06);
}

.numpad-btn {
    height: 64px;
    border: none;
    border-radius: var(--radius);
    background: var(--surface-1);
    color: var(--text-primary);
    font-size: 22px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.08s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    -webkit-tap-highlight-color: transparent;
}

.numpad-btn:active {
    background: var(--surface-2);
    transform: scale(0.95);
}

.numpad-btn sub {
    position: absolute;
    bottom: 6px;
    font-size: 8px;
    color: var(--text-muted);
    letter-spacing: 1px;
    font-weight: 500;
}

.numpad-btn--action {
    background: var(--surface-2);
    color: var(--text-secondary);
    font-size: 18px;
}

.numpad-btn--action:active { background: var(--surface-3); }

.numpad-btn--register {
    background: linear-gradient(135deg, var(--success), #16a34a);
    color: white;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.numpad-btn--register:active { box-shadow: 0 0 16px rgba(34,197,94,0.4); }
.numpad-btn--register:disabled { opacity: 0.3; cursor: not-allowed; }

/* ═══ Customer card inline (in cart) ═══ */
.customer-inline {
    padding: 10px 12px;
    border-top: 1px solid rgba(255,255,255,0.06);
    background: var(--surface-0);
    flex-shrink: 0;
}

.customer-inline__card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: linear-gradient(135deg, rgba(245,158,11,0.08), rgba(245,158,11,0.03));
    border: 1px solid rgba(245,158,11,0.15);
    border-radius: var(--radius);
}

.customer-inline__info { flex: 1; min-width: 0; }

.customer-inline__name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.customer-inline__meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 2px;
}

.customer-inline__bonus-balance {
    font-size: 13px;
    font-weight: 700;
    color: var(--brand);
}

.customer-inline__bonus-earn {
    font-size: 11px;
    color: var(--success);
    font-weight: 500;
}

.customer-inline__remove {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(239,68,68,0.1);
    border: none;
    color: var(--danger);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-left: 10px;
    transition: all 0.12s;
}

.customer-inline__remove:active { background: rgba(239,68,68,0.25); transform: scale(0.9); }

/* Add customer button */
.add-customer-btn {
    width: 100%;
    padding: 10px;
    border: 1.5px dashed var(--surface-3);
    border-radius: var(--radius);
    background: none;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.15s;
}

.add-customer-btn:active { border-color: var(--brand); color: var(--brand); background: rgba(245,158,11,0.05); }

/* Bonus controls in cart */
.bonus-inline {
    margin-top: 8px;
}

.bonus-inline__apply {
    width: 100%;
    padding: 8px 12px;
    border-radius: var(--radius);
    background: rgba(245,158,11,0.08);
    border: 1px solid rgba(245,158,11,0.15);
    color: var(--brand);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.12s;
}

.bonus-inline__apply:active { background: rgba(245,158,11,0.15); }

.bonus-inline__applied {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-radius: var(--radius);
    background: rgba(245,158,11,0.1);
    border: 1px solid rgba(245,158,11,0.2);
}

.bonus-inline__applied-amount {
    font-size: 14px;
    font-weight: 700;
    color: var(--brand);
}

.bonus-inline__applied-cancel {
    font-size: 12px;
    font-weight: 600;
    color: var(--danger);
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px 6px;
}

.bonus-inline__applied-cancel:active { opacity: 0.7; }

/* Open shift screen */
.open-shift-screen {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    position: relative;
    background: var(--surface-0);
}

.open-shift-logout {
    position: absolute;
    top: 12px;
    right: 12px;
    color: var(--text-muted);
    background: var(--surface-1);
    border: 1px solid var(--surface-2);
    border-radius: 10px;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.open-shift-logout:hover {
    color: #ef4444;
    background: rgba(239,68,68,0.08);
    border-color: rgba(239,68,68,0.2);
}

.open-shift-card {
    width: 100%;
    max-width: 340px;
    background: var(--surface-1);
    border: 1px solid var(--surface-2);
    border-radius: 8px;
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.open-shift-greeting {
    display: flex;
    align-items: center;
    gap: 14px;
}

.open-shift-avatar {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
    color: white;
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(245,158,11,0.25);
}

.open-shift-hello {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
}

.open-shift-location {
    font-size: 12px;
    color: var(--brand);
    font-weight: 500;
    margin-top: 2px;
    opacity: 0.85;
}

.open-shift-divider {
    height: 1px;
    background: var(--surface-2);
}

.open-shift-cash {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.open-shift-cash-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.open-shift-cash-field {
    position: relative;
}

.open-shift-cash-field input {
    width: 100%;
    background: var(--surface-0);
    border: 1.5px solid var(--surface-2);
    border-radius: 12px;
    color: var(--text-primary);
    padding: 12px 40px 12px 16px;
    font-size: 18px;
    font-weight: 600;
    transition: all 0.2s;
}

.open-shift-cash-field input:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-glow);
}

.open-shift-cash-field input::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

.open-shift-cash-currency {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 16px;
    font-weight: 500;
    pointer-events: none;
}

/* ═══ Cash Payment Modal ═══ */
.cash-modal {
    background: var(--surface-1);
    border: 1px solid var(--surface-2);
    border-radius: 8px;
    padding: 24px;
    width: 340px;
    max-width: 95vw;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.cash-modal__header {
    text-align: center;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--surface-2);
}

.cash-modal__quick {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.cash-quick-btn {
    padding: 10px 16px;
    border-radius: 12px;
    background: var(--surface-0);
    border: 1.5px solid var(--surface-2);
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
    min-width: 80px;
    text-align: center;
}

.cash-quick-btn:hover {
    border-color: var(--brand);
    background: rgba(245,158,11,0.06);
}

.cash-quick-btn--active {
    border-color: var(--brand);
    background: rgba(245,158,11,0.12);
    color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-glow);
}

.cash-modal__input {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cash-input-wrap {
    position: relative;
}

.cash-input-wrap input {
    width: 100%;
    background: var(--surface-0);
    border: 1.5px solid var(--surface-2);
    border-radius: 12px;
    color: var(--text-primary);
    padding: 14px 40px 14px 16px;
    font-size: 22px;
    font-weight: 700;
    text-align: center;
    transition: all 0.2s;
}

.cash-input-wrap input:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-glow);
}

.cash-input-wrap input::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

.cash-input-currency {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 18px;
    font-weight: 600;
    pointer-events: none;
}

.cash-modal__change {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-radius: 12px;
    background: var(--surface-0);
    border: 1.5px solid var(--surface-2);
    color: var(--text-muted);
    transition: all 0.2s;
}

.cash-modal__change--active {
    background: rgba(22,163,74,0.08);
    border-color: rgba(22,163,74,0.25);
    color: #16a34a;
}

.cash-modal__actions {
    display: flex;
    gap: 10px;
}

.cash-modal-btn {
    flex: 1;
    padding: 14px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
    border: none;
}

.cash-modal-btn--cancel {
    background: var(--surface-2);
    color: var(--text-secondary);
}

.cash-modal-btn--cancel:hover {
    background: var(--surface-0);
}

.cash-modal-btn--confirm {
    background: linear-gradient(135deg, #16a34a, #15803d);
    color: white;
    box-shadow: 0 4px 12px rgba(22,163,74,0.3);
}

.cash-modal-btn--confirm:hover:not(:disabled) {
    box-shadow: 0 6px 20px rgba(22,163,74,0.4);
    transform: translateY(-1px);
}

.cash-modal-btn--confirm:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ═══ Fiscal Panel ═══ */
.fiscal-panel {
    position: absolute;
    inset: 0;
    z-index: 40;
    background: var(--surface-1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.fiscal-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--surface-0);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    flex-shrink: 0;
}

.fiscal-panel__header h3 {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-primary);
}

.fiscal-panel__body {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 12px;
}

.fiscal-status-card {
    background: var(--surface-0);
    border-radius: var(--radius);
    padding: 14px;
    border: 1px solid rgba(255,255,255,0.04);
    margin-bottom: 10px;
}

.fiscal-status-card__title {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.fiscal-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    font-size: 13px;
}

.fiscal-info-row__label { color: var(--text-muted); }
.fiscal-info-row__value { color: var(--text-primary); font-weight: 600; }

.fiscal-shift-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 700;
}

.fiscal-shift-badge--open {
    background: rgba(34,197,94,0.12);
    color: var(--success);
}

.fiscal-shift-badge--closed {
    background: rgba(239,68,68,0.12);
    color: var(--danger);
}

.fiscal-shift-badge__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.fiscal-shift-badge--open .fiscal-shift-badge__dot {
    background: var(--success);
    box-shadow: 0 0 6px rgba(34,197,94,0.4);
}

.fiscal-shift-badge--closed .fiscal-shift-badge__dot {
    background: var(--danger);
}

.fiscal-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.fiscal-action-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--surface-0);
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.12s;
    width: 100%;
    text-align: left;
}

.fiscal-action-btn:active { background: var(--surface-2); transform: scale(0.98); }
.fiscal-action-btn:disabled { opacity: 0.3; cursor: not-allowed; }

.fiscal-action-btn__icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.fiscal-action-btn__icon--blue { background: rgba(59,130,246,0.12); }
.fiscal-action-btn__icon--green { background: rgba(34,197,94,0.12); }
.fiscal-action-btn__icon--red { background: rgba(239,68,68,0.12); }
.fiscal-action-btn__icon--purple { background: rgba(139,92,246,0.12); }
.fiscal-action-btn__icon--amber { background: rgba(245,158,11,0.12); }

.fiscal-action-btn__text {
    flex: 1;
}

.fiscal-action-btn__desc {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 400;
    margin-top: 2px;
}

.fiscal-error {
    padding: 10px 14px;
    border-radius: var(--radius);
    background: rgba(239,68,68,0.1);
    border: 1px solid rgba(239,68,68,0.15);
    color: var(--danger);
    font-size: 12px;
    margin-bottom: 10px;
}

/* ═══ Print ═══ */
@media print {
    body {
        width: 80mm;
        margin: 0;
        padding: 2mm;
        font-size: 12px;
        font-family: monospace;
        overflow: visible;
        background: white;
        color: black;
    }
    body * { visibility: hidden; }
    .receipt, .receipt * { visibility: visible; }
    .receipt {
        position: absolute;
        left: 0;
        top: 0;
        width: 76mm;
    }
    .receipt table { width: 100%; border-collapse: collapse; }
    .receipt td { padding: 1mm 0; }
    .receipt .receipt-divider { border-top: 1px dashed #000; margin: 2mm 0; }
    .receipt .receipt-total { font-size: 16px; font-weight: bold; }
}

/* ═══ Receipt Cards (Orders tab) ═══ */
.receipt-card {
    background: var(--surface-0);
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.06);
    overflow: hidden;
    transition: border-color 0.15s;
}
.receipt-card:hover { border-color: rgba(255,255,255,0.12); }
.receipt-card--refunded { opacity: 0.6; }

.receipt-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.receipt-card__header:active { background: var(--surface-1); }

.receipt-card__number { font-size: 14px; font-weight: 800; color: var(--text-primary); }

.receipt-card__badge {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 6px;
    background: rgba(255,255,255,0.08);
    color: var(--text-muted);
}

.receipt-card__total { font-size: 14px; font-weight: 800; color: var(--text-primary); }
.receipt-card__total--refunded { text-decoration: line-through; color: var(--danger); }

.receipt-card__body {
    border-top: 1px solid rgba(255,255,255,0.06);
    padding: 10px 12px;
}

.receipt-card__customer {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 600;
}

.receipt-card__items {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 10px;
}

.receipt-card__item {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 13px;
}

.receipt-card__item-name { color: var(--text-primary); flex: 1; }
.receipt-card__item-price { color: var(--text-muted); font-weight: 600; flex-shrink: 0; margin-left: 8px; }

.receipt-card__comment {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
}

.receipt-card__comment-input {
    flex: 1;
    padding: 8px 10px;
    background: var(--surface-1);
    border: 1.5px solid var(--surface-2);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 12px;
    resize: none;
    line-height: 1.4;
    transition: border-color 0.15s;
}
.receipt-card__comment-input:focus {
    outline: none;
    border-color: var(--brand);
}
.receipt-card__comment-input::placeholder { color: var(--text-muted); }

.receipt-card__comment-save {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--surface-2);
    border: none;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.12s;
    align-self: flex-end;
}
.receipt-card__comment-save:hover { background: var(--brand); }

.receipt-card__actions {
    display: flex;
    gap: 6px;
}

.receipt-card__action-btn {
    flex: 1;
    padding: 8px;
    border-radius: 8px;
    background: var(--surface-2);
    border: none;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.12s;
}
.receipt-card__action-btn:hover { background: var(--surface-3); color: var(--text-primary); }
.receipt-card__action-btn--danger { color: var(--danger); }
.receipt-card__action-btn--danger:hover { background: rgba(239,68,68,0.15); }

/* ═══ Toast Notifications ═══ */
.toast-container {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    pointer-events: auto;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    animation: toastIn 0.3s ease-out;
    transition: opacity 0.3s, transform 0.3s;
    min-width: 200px;
    max-width: 420px;
}

.toast--hide {
    opacity: 0;
    transform: translateY(-12px);
}

.toast__icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
    flex-shrink: 0;
}

.toast__text {
    flex: 1;
}

.toast--success {
    background: #065f46;
    color: #d1fae5;
    border: 1px solid rgba(52,211,153,0.3);
}
.toast--success .toast__icon {
    background: rgba(52,211,153,0.25);
    color: #34d399;
}

.toast--error {
    background: #7f1d1d;
    color: #fecaca;
    border: 1px solid rgba(248,113,113,0.3);
}
.toast--error .toast__icon {
    background: rgba(248,113,113,0.25);
    color: #f87171;
}

.toast--info {
    background: #1e3a5f;
    color: #bfdbfe;
    border: 1px solid rgba(96,165,250,0.3);
}
.toast--info .toast__icon {
    background: rgba(96,165,250,0.25);
    color: #60a5fa;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ═══ Incoming Goods Panel ═══ */

.incoming-panel {
    position: fixed;
    inset: 0;
    z-index: 60;
    background: var(--surface-0);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.incoming-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--surface-2);
    flex-shrink: 0;
}

.incoming-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    -webkit-overflow-scrolling: touch;
}

.incoming-draft-card {
    display: flex;
    align-items: center;
    padding: 12px;
    background: var(--surface-1);
    border-radius: 12px;
    margin-bottom: 8px;
    border: 1px solid var(--surface-2);
}

.incoming-doc-list {
    display: grid;
    gap: 10px;
}

.incoming-doc-card {
    background: var(--surface-1);
    border: 1px solid var(--surface-2);
    border-radius: 8px;
    overflow: hidden;
}

.incoming-doc-card__button {
    width: 100%;
    min-height: 76px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto 24px;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: transparent;
    border: none;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.incoming-doc-card__button:active {
    background: var(--surface-2);
}

.incoming-doc-card__main,
.incoming-doc-card__summary {
    min-width: 0;
}

.incoming-doc-card__supplier {
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 800;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.incoming-doc-card__meta,
.incoming-doc-card__date {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.incoming-doc-card__meta span + span::before {
    content: "";
    display: inline-block;
    width: 4px;
    height: 4px;
    margin-right: 8px;
    border-radius: 50%;
    background: var(--surface-3);
    vertical-align: middle;
}

.incoming-doc-card__summary {
    text-align: right;
}

.incoming-doc-card__total {
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 900;
    line-height: 1.1;
    white-space: nowrap;
}

.incoming-doc-card__date {
    justify-content: flex-end;
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.incoming-doc-card__chevron {
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    transition: transform .15s;
    justify-self: end;
}

.incoming-doc-card__chevron--open {
    transform: rotate(180deg);
}

.incoming-doc-card__items {
    border-top: 1px solid var(--surface-2);
    padding: 8px 16px 12px;
}

.incoming-doc-card__item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    padding: 7px 0;
    color: var(--text-secondary);
    font-size: 12px;
}

.incoming-doc-card__item + .incoming-doc-card__item {
    border-top: 1px solid color-mix(in srgb, var(--surface-2) 70%, transparent);
}

.incoming-doc-card__item-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-primary);
}

.incoming-doc-card__item-qty {
    color: var(--text-muted);
    white-space: nowrap;
}

.incoming-item-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid var(--surface-2);
}

.incoming-ingredient-list {
    max-height: 220px;
    overflow-y: auto;
    border-radius: 10px;
    border: 1px solid var(--surface-2);
    background: var(--surface-1);
}

.incoming-ingredient-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 12px;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 13px;
    cursor: pointer;
    text-align: left;
    border-bottom: 1px solid var(--surface-2);
    transition: background 0.1s;
}

.incoming-ingredient-item:last-child {
    border-bottom: none;
}

.incoming-ingredient-item:hover {
    background: var(--surface-2);
}

.incoming-ingredient-item:disabled {
    opacity: 0.5;
    cursor: default;
}

.incoming-ingredient-item:disabled:hover {
    background: transparent;
}

/* ═══ 2026 polish layer: denser, calmer, easier to operate under rush ═══ */
* {
    letter-spacing: 0 !important;
}

.modal-card,
.success-card,
.stats-card,
.receipt-card,
.fiscal-status-card,
.incoming-draft-card,
.customer-inline__card {
    border-radius: 8px;
}

.section-label,
.order-group-header,
.fiscal-status-card__title,
.customer-panel__section-title,
.open-shift-cash-label {
    letter-spacing: 0 !important;
}

.search-results-bar,
.receipt-status,
.bottom-bar {
    border-color: color-mix(in srgb, var(--surface-2) 72%, transparent);
}

@media (min-width: 1280px) {
    .category-grid {
        grid-template-columns: repeat(auto-fill, minmax(184px, 1fr));
    }

    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(156px, 1fr));
    }
}

@media (max-width: 720px) {
    .pos-layout {
        grid-template-columns: 1fr;
        grid-template-rows: minmax(260px, 42vh) minmax(0, 1fr);
    }

    .cart-panel {
        height: auto;
        min-height: 0;
        border-left: 0;
        border-top: 1px solid color-mix(in srgb, var(--surface-2) 72%, transparent);
        box-shadow: 0 -18px 48px rgba(0,0,0,0.18);
    }

    .open-shift-screen {
        min-height: 0;
        justify-content: flex-start;
        overflow-y: auto;
        padding: 14px 16px 18px;
    }

    .open-shift-logout {
        top: 10px;
        right: 10px;
    }

    .open-shift-card {
        max-width: 100%;
        padding: 18px 16px;
        gap: 14px;
        margin-top: 34px;
    }

    .open-shift-greeting {
        padding-right: 44px;
    }

    .menu-command {
        padding: 10px 12px;
    }

    .menu-command__stats {
        width: auto;
        grid-template-columns: repeat(3, 74px);
    }

    .menu-command__actions {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .online-orders-entry--header {
        width: auto;
        min-width: 0;
        padding: 0 10px;
        font-size: 13px;
    }

    .menu-command__stat {
        min-height: 42px;
        padding: 7px 8px;
    }

    .menu-command__stat span {
        font-size: 9px;
    }

    .menu-command__stat strong {
        font-size: 14px;
    }

    .category-grid {
        grid-template-columns: repeat(auto-fill, minmax(138px, 1fr));
        padding: 10px 12px;
    }

    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(126px, 1fr));
        padding: 8px 12px 14px;
    }
}

@media (max-width: 640px) {
    .menu-command {
        align-items: stretch;
        flex-direction: column;
        gap: 10px;
    }

    .menu-command__stats {
        width: 100%;
        grid-template-columns: repeat(3, 1fr);
    }

    .search-bar {
        padding: 10px 12px;
    }

    .payment-grid--checkout {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .payment-btn {
        min-height: 58px;
        height: 58px;
    }

    .incoming-doc-card__button {
        grid-template-columns: minmax(0, 1fr) 20px;
        gap: 10px;
        padding: 12px;
    }

    .incoming-doc-card__summary {
        grid-column: 1 / -1;
        grid-row: 2;
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        gap: 12px;
        text-align: left;
    }

    .incoming-doc-card__chevron {
        grid-column: 2;
        grid-row: 1;
    }

    .incoming-doc-card__date {
        justify-content: flex-start;
        max-width: none;
    }
}
