.waiter-body {
    background:
        radial-gradient(circle at top left, rgba(212, 164, 74, 0.1), transparent 22%),
        radial-gradient(circle at bottom right, rgba(77, 145, 198, 0.12), transparent 24%),
        linear-gradient(180deg, #111a20 0%, #0a1218 100%);
}

.waiter-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
}

.waiter-sidebar {
    padding: 24px 18px;
    border-right: 1px solid rgba(170, 180, 190, 0.12);
    background: linear-gradient(180deg, rgba(12, 24, 31, 0.98), rgba(8, 15, 20, 0.96));
    display: grid;
    align-content: start;
    gap: 24px;
}

.waiter-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.waiter-brand-mark {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(212, 164, 74, 0.92), rgba(164, 120, 45, 0.92));
    color: #0d1419;
    font-weight: 800;
}

.waiter-brand strong {
    display: block;
}

.waiter-brand span:last-child,
.waiter-sidebar-card p {
    color: var(--text-muted);
}

.waiter-nav {
    display: grid;
    gap: 8px;
}

.waiter-nav-item {
    display: flex;
    align-items: center;
    padding: 12px 14px;
    border-radius: 14px;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid transparent;
}

.waiter-nav-item.active,
.waiter-nav-item:hover {
    color: var(--text);
    background: rgba(212, 164, 74, 0.14);
    border-color: rgba(212, 164, 74, 0.2);
}

.waiter-sidebar-card {
    padding: 16px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(20, 37, 49, 0.98), rgba(10, 18, 24, 0.96));
    border: 1px solid rgba(170, 180, 190, 0.12);
}

.waiter-sidebar-card strong {
    display: block;
    margin: 6px 0 10px;
}

.waiter-main {
    padding: 24px;
}

.waiter-topbar {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    margin-bottom: 20px;
}

.waiter-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    min-width: min(540px, 100%);
}

.waiter-summary-card {
    padding: 14px 16px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(20, 37, 49, 0.98), rgba(10, 18, 24, 0.96));
    border: 1px solid rgba(170, 180, 190, 0.12);
}

.waiter-summary-card span {
    display: block;
    color: var(--text-muted);
    font-size: 0.82rem;
}

.waiter-summary-card strong {
    display: block;
    margin-top: 6px;
    font-size: 1.5rem;
}

.waiter-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(420px, 0.95fr);
    gap: 18px;
    align-items: start;
}

.waiter-floor,
.waiter-composer {
    padding: 22px;
}

.waiter-floor {
    width: 100%;
}

.waiter-floor-head {
    display: grid;
    gap: 14px;
}

.space-tabs,
.category-tabs,
.waiter-type-switch {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.space-tabs {
    display: block;
}

.space-tab-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 8px;
}

.space-tab-item {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    min-height: 38px;
    padding: 0 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(170, 180, 190, 0.12);
    color: var(--text-soft);
    box-shadow: none;
    font-size: 0.86rem;
    font-weight: 700;
}

.space-swatch {
    width: 14px;
    height: 14px;
    border-radius: 999px;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.04);
}

.space-tabs .chip-button.active,
.category-tabs .chip-button.active,
.waiter-type-switch .chip-button.active {
    border-color: rgba(212, 164, 74, 0.3);
    background: rgba(212, 164, 74, 0.16);
}

.space-tabs .space-tab-item.active {
    color: #111923;
    background: linear-gradient(180deg, #efc168, #d4a247);
    border-color: rgba(212, 162, 71, 0.6);
}

.space-tabs .space-tab-item.active .space-swatch {
    box-shadow: 0 0 0 3px rgba(17, 25, 35, 0.08);
}

.waiter-floor-canvas {
    min-height: 620px;
    margin-top: 18px;
    width: 100%;
}

.waiter-stage {
    position: relative;
    min-height: 620px;
    border-radius: 26px;
    overflow: hidden;
    border: 1px solid rgba(170, 180, 190, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 18px 38px rgba(2, 8, 12, 0.24);
}

.waiter-stage::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at top right, rgba(200, 155, 78, 0.1), transparent 28%),
        linear-gradient(180deg, rgba(18, 44, 64, 0.95), rgba(9, 18, 26, 0.96));
    pointer-events: none;
}

.waiter-stage-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 48px 48px;
    opacity: 0.5;
}

.waiter-stage-label {
    position: absolute;
    top: 18px;
    left: 18px;
    z-index: 1;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(9, 18, 26, 0.72);
    border: 1px solid rgba(170, 180, 190, 0.14);
    color: var(--text-muted);
    font-size: 0.84rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.waiter-divider {
    position: absolute;
    z-index: 2;
    background: transparent;
    border: none;
    box-shadow: none;
    pointer-events: none;
}

.waiter-divider::before {
    content: "";
    position: absolute;
    inset: 50% 0 auto 0;
    height: 2px;
    transform: translateY(-50%);
    background: rgba(214, 229, 238, 0.88);
}

.waiter-divider-vertical::before {
    inset: 0 auto 0 50%;
    width: 2px;
    height: auto;
    transform: translateX(-50%);
}

.waiter-divider-horizontal::before {
    inset: 50% 0 auto 0;
    width: auto;
    height: 2px;
    transform: translateY(-50%);
}

.waiter-divider .waiter-divider-label {
    z-index: 1;
}

.waiter-divider-label {
    position: absolute;
    top: -22px;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(9, 18, 26, 0.72);
    border: 1px solid rgba(170, 180, 190, 0.12);
    color: var(--text-muted);
    font-size: 0.68rem;
    white-space: nowrap;
}

.waiter-table {
    position: absolute;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.32);
    display: grid;
    align-content: center;
    justify-items: center;
    gap: var(--table-gap, 4px);
    padding: var(--table-pad-y, 8px) var(--table-pad-x, 8px);
    color: var(--text);
    box-shadow: 0 12px 28px rgba(2, 8, 12, 0.24);
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    z-index: 2;
}

.waiter-table:hover,
.waiter-table.active {
    transform: translateY(-2px);
    box-shadow: 0 18px 34px rgba(2, 8, 12, 0.28);
}

.waiter-table-round {
    border-radius: 999px;
}

.waiter-table-square {
    aspect-ratio: 1;
}

.waiter-table-name {
    font-size: var(--table-name-size, 0.92rem);
    line-height: 1.05;
    font-weight: 800;
}

.waiter-table-capacity,
.waiter-table-ordercount {
    font-size: var(--table-meta-size, 0.72rem);
    line-height: 1.05;
    font-weight: 700;
}

.waiter-table-state {
    font-size: var(--table-state-size, 0.68rem);
    line-height: 1.05;
    font-weight: 800;
}

.waiter-status-free {
    background: linear-gradient(180deg, rgba(228, 245, 255, 0.96), rgba(199, 229, 247, 0.92));
    color: #1b3340;
}

.waiter-status-pending {
    background: linear-gradient(180deg, rgba(241, 181, 86, 0.98), rgba(198, 128, 31, 0.92));
    color: #402600;
}

.waiter-status-preparing {
    background: linear-gradient(180deg, rgba(98, 144, 176, 0.98), rgba(63, 105, 134, 0.92));
}

.waiter-status-ready {
    background: linear-gradient(180deg, rgba(122, 191, 161, 0.98), rgba(74, 138, 111, 0.92));
    color: #10261d;
}

.waiter-table-name {
    font-weight: 800;
    font-size: 1rem;
}

.waiter-table-capacity,
.waiter-table-ordercount,
.waiter-table-state {
    font-size: 0.72rem;
    opacity: 0.84;
}

.waiter-order-form,
.waiter-products,
.waiter-current-consumption,
.waiter-draft {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.waiter-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.waiter-section-head strong {
    display: block;
    margin-top: 4px;
    font-size: 1rem;
}

.waiter-draft {
    padding-bottom: 88px;
}

.waiter-products-grid {
    display: grid;
    gap: 12px;
    max-height: 340px;
    overflow: auto;
    padding-right: 2px;
}

.waiter-product-card,
.draft-summary-card,
.draft-row {
    padding: 14px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(20, 37, 49, 0.98), rgba(10, 18, 24, 0.96));
    border: 1px solid rgba(170, 180, 190, 0.12);
}

.waiter-product-card {
    display: grid;
    gap: 14px;
    padding: 16px 16px 14px;
    border-radius: 20px;
    background:
        radial-gradient(circle at top right, rgba(212, 164, 74, 0.08), transparent 30%),
        linear-gradient(180deg, rgba(20, 37, 49, 0.98), rgba(10, 18, 24, 0.96));
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.waiter-product-card:hover {
    transform: translateY(-1px);
    border-color: rgba(212, 164, 74, 0.18);
    box-shadow: 0 16px 30px rgba(2, 8, 12, 0.2);
}

.waiter-product-copy {
    display: grid;
    gap: 4px;
}

.waiter-product-copy strong {
    font-size: 1rem;
    line-height: 1.15;
}

.waiter-product-copy span {
    color: var(--text-muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.waiter-product-foot,
.draft-row header,
.draft-toolbar {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}

.category-tabs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
}

.category-tab {
    min-height: 48px;
    justify-content: center;
    border-radius: 16px;
    border: 1px solid rgba(170, 180, 190, 0.12);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
    color: var(--text-soft);
    box-shadow: none;
    transition: none;
    touch-action: manipulation;
}

.category-tab.active {
    background: linear-gradient(180deg, #efc168, #d4a247);
    border-color: rgba(212, 162, 71, 0.6);
    color: #111923;
    box-shadow: 0 12px 24px rgba(212, 162, 71, 0.18);
}

.category-tab-name {
    font-weight: 800;
    letter-spacing: 0.01em;
}

.waiter-product-meta {
    display: grid;
    gap: 4px;
}

.waiter-product-meta strong {
    font-size: 1.35rem;
    line-height: 1;
}

.waiter-product-time {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 700;
}

.waiter-add-button {
    min-width: 124px;
    padding: 12px 16px;
    border-radius: 14px;
    background: linear-gradient(180deg, #efc168, #d4a247);
    color: #111923;
    border: 1px solid rgba(212, 162, 71, 0.6);
    font-weight: 800;
    box-shadow: 0 6px 14px rgba(212, 162, 71, 0.12);
    transition: none;
    touch-action: manipulation;
}

.draft-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
}

.draft-summary-card strong {
    display: block;
    margin-top: 6px;
    font-size: 1.15rem;
}

.draft-summary-card {
    border-radius: 16px;
}

.draft-list {
    display: grid;
    gap: 12px;
    min-height: 180px;
}

.draft-empty {
    min-height: 132px;
    place-items: center;
    text-align: center;
    color: var(--text-muted);
    background:
        linear-gradient(180deg, rgba(16, 28, 36, 0.98), rgba(9, 17, 22, 0.96));
    border-style: dashed;
}

.draft-row {
    gap: 12px;
}

.current-consumption-row header {
    align-items: flex-start;
}

.draft-row .form-inline {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 10px;
}

.primary-action {
    position: sticky;
    bottom: 16px;
    z-index: 6;
    padding: 16px;
    font-size: 1rem;
    border-radius: 16px;
    background: linear-gradient(180deg, #efc168, #d4a247);
    color: #111923;
    border: 1px solid rgba(212, 162, 71, 0.6);
    box-shadow: 0 8px 18px rgba(212, 162, 71, 0.12);
    transition: none;
    touch-action: manipulation;
}

.waiter-add-button:active,
.primary-action:active,
.category-tab:active,
.draft-row .ghost-button:active,
.draft-toolbar .ghost-button:active {
    transform: scale(0.985);
}

.draft-row .ghost-button,
.draft-toolbar .ghost-button {
    transition: none;
    touch-action: manipulation;
}

@media (max-width: 1240px) {
    .waiter-layout {
        grid-template-columns: 1fr;
    }

    .waiter-summary {
        min-width: 0;
    }
}

@media (max-width: 960px) {
    .waiter-shell {
        grid-template-columns: 1fr;
    }

    .waiter-sidebar {
        border-right: none;
        border-bottom: 1px solid rgba(170, 180, 190, 0.12);
    }

    .waiter-topbar {
        flex-direction: column;
    }

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

@media (max-width: 760px) {
    .waiter-main {
        padding: 16px;
    }

    .waiter-floor,
    .waiter-composer {
        padding: 18px;
    }

    .waiter-summary,
    .draft-summary {
        grid-template-columns: 1fr 1fr;
    }

    .draft-toolbar {
        display: grid;
        grid-template-columns: 1fr;
    }

    .waiter-stage,
    .waiter-floor-canvas {
        min-height: 460px;
    }
}
