:root {
    color-scheme: light;
    --ink: #252621;
    --muted: #77786f;
    --paper: #f8f7f2;
    --surface: #fffefa;
    --line: #e7e4da;
    --red: #c7352d;
    --red-dark: #a9231e;
    --green: #687c55;
    --shadow: 0 10px 26px rgba(42, 39, 29, .06);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font: 15px/1.5 "Segoe UI", sans-serif;
}

button,
input,
select {
    font: inherit;
}

.container {
    width: min(1320px, 100%);
    margin: 0 auto;
    padding: 0 30px 42px;
}

.topbar {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 1px solid var(--line);
}

.topbar > div:first-child {
    min-width: 0;
}

.topbar h1,
.topbar h2 {
    margin: 0;
    font: 400 23px/1.2 Georgia, serif;
}

.brand-mark {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--red);
    color: #fff;
    font: 700 17px Georgia, serif;
}

.nav-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 7px 11px;
    border: 1px solid transparent;
    border-radius: 3px;
    color: #63645c;
    text-decoration: none;
    font-size: 12px;
    white-space: nowrap;
}

.nav-link:hover {
    border-color: var(--line);
    background: var(--surface);
    color: var(--red-dark);
}

.pill {
    padding: 5px 9px;
    border: 1px solid #d6dfca;
    border-radius: 20px;
    background: #f1f6eb;
    color: #536447;
    font-size: 11px;
    white-space: nowrap;
}

.hero-banner {
    margin: 25px 0 22px;
    padding: 20px 22px;
    border: 1px solid var(--line);
    border-left: 3px solid var(--red);
    background: var(--surface);
}

.hero-banner h2 {
    margin: 0 0 5px;
    font: 400 24px/1.25 Georgia, serif;
}

.hero-banner p {
    max-width: 720px;
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.cards-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 22px;
}

.stat-card {
    min-height: 78px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 12px 16px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface);
}

.stat-card strong {
    font: 400 23px/1.1 Georgia, serif;
}

.stat-card span {
    margin-top: 5px;
    color: var(--muted);
    font-size: 11px;
}

.demo-layout {
    display: grid;
    grid-template-columns: minmax(250px, .72fr) minmax(0, 1.65fr);
    align-items: start;
    gap: 18px;
}

.demo-card,
.card {
    min-width: 0;
    padding: 19px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.demo-card > h2,
.card > h2 {
    margin: 0 0 15px;
    font: 400 21px/1.25 Georgia, serif;
}

.waiter-layout {
    width: min(1200px, 100%);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
    align-items: start;
    gap: 16px;
}

.waiter-layout .field {
    margin-bottom: 13px;
}

.waiter-menu-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 12px;
    margin: 17px 0 12px;
}

.waiter-menu-heading h2 {
    margin: 0;
    font: 400 23px Georgia, serif;
}

.waiter-menu-heading span {
    color: var(--muted);
    font-size: 11px;
}

.waiter-category-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 14px;
}

.waiter-category-button {
    padding: 7px 13px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: transparent;
    color: #66675f;
    font-size: 12px;
    cursor: pointer;
}

.waiter-category-button.active {
    border-color: var(--ink);
    background: var(--ink);
    color: #fff;
}

.waiter-menu-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.waiter-menu-card {
    min-width: 0;
    min-height: 166px;
    display: flex;
    flex-direction: column;
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: #fffefa;
}

.waiter-menu-card[hidden] {
    display: none;
}

.waiter-food-mark {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    margin-bottom: 12px;
    border-radius: 4px;
    background: #f4e7d4;
    color: #987444;
    font: 700 12px Georgia, serif;
}

.waiter-menu-card:nth-child(3n + 2) .waiter-food-mark {
    background: #e6eddd;
    color: #61734d;
}

.waiter-menu-card:nth-child(3n) .waiter-food-mark {
    background: #f4e1dc;
    color: #aa4e41;
}

.waiter-menu-card h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 650;
    overflow-wrap: anywhere;
}

.waiter-menu-category {
    color: var(--muted);
    font-size: 11px;
}

.waiter-menu-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: auto;
    padding-top: 13px;
}

.waiter-menu-bottom strong {
    font-size: 13px;
}

.waiter-menu-add {
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 3px;
    background: var(--red);
    color: #fff;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.waiter-menu-add:hover {
    background: var(--red-dark);
}

.waiter-add-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 76px;
    align-items: end;
    gap: 10px;
}

.waiter-add-button {
    width: 100%;
    min-height: 40px;
    margin-bottom: 13px;
    border: 1px solid var(--line);
    border-radius: 3px;
    background: #f4f1e8;
    color: var(--ink);
    font-size: 12px;
    font-weight: 650;
    cursor: pointer;
}

.waiter-add-button:hover {
    border-color: #d5b8a2;
    background: #f8e9e2;
}

.waiter-cart-heading,
.waiter-item-heading,
.waiter-cart-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.waiter-cart-heading {
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.waiter-cart-heading h2 {
    margin: 0;
    font: 400 21px/1.25 Georgia, serif;
}

.waiter-cart-heading .cart-count {
    min-width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #f6e5e1;
    color: var(--red);
    font-size: 11px;
    font-weight: 700;
}

.waiter-cart-items {
    max-height: 460px;
    overflow: auto;
}

.waiter-cart-row {
    padding: 13px 0;
    border-bottom: 1px solid #efede6;
}

.waiter-item-heading strong {
    display: block;
    font-size: 13px;
}

.waiter-item-price {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 11px;
}

.waiter-remove {
    padding: 4px 0;
    border: 0;
    background: transparent;
    color: var(--muted);
    text-decoration: underline;
    font-size: 10px;
    cursor: pointer;
}

.waiter-item-note {
    display: block;
    margin-top: 9px;
    color: var(--muted);
    font-size: 10px;
}

.waiter-item-note textarea {
    display: block;
    width: 100%;
    min-height: 52px;
    margin-top: 4px;
    padding: 7px 8px;
    resize: vertical;
    border: 1px solid var(--line);
    border-radius: 3px;
    color: var(--ink);
    font: inherit;
    font-size: 11px;
}

.waiter-item-quantity {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.waiter-item-quantity button {
    width: 25px;
    height: 25px;
    border: 1px solid var(--line);
    border-radius: 3px;
    background: #fff;
    cursor: pointer;
}

.waiter-item-quantity span {
    min-width: 16px;
    text-align: center;
    font-size: 12px;
}

.waiter-cart-total {
    padding: 14px 0;
    font-size: 13px;
}

.waiter-submit-button {
    width: 100%;
}

.waiter-submit-button:disabled {
    background: #c9c7bf;
    cursor: not-allowed;
}

.waiter-hint {
    margin: 9px 0 0;
    color: var(--muted);
    text-align: center;
    font-size: 10px;
}

.demo-card form .field {
    margin-bottom: 13px;
}

.field label {
    display: block;
    margin-bottom: 5px;
    color: #62635b;
    font-size: 11px;
    font-weight: 650;
}

.field input,
.field select {
    width: 100%;
    min-height: 40px;
    padding: 8px 10px;
    border: 1px solid #dedbd1;
    border-radius: 3px;
    background: #fff;
    color: var(--ink);
}

.field input:focus,
.field select:focus {
    border-color: var(--red);
    outline: 2px solid rgba(199, 53, 45, .12);
}

button[type="submit"] {
    min-height: 39px;
    padding: 8px 13px;
    border: 0;
    border-radius: 3px;
    background: var(--red);
    color: #fff;
    font-size: 12px;
    font-weight: 650;
    cursor: pointer;
}

button[type="submit"]:hover {
    background: var(--red-dark);
}

.demo-card > form > button[type="submit"] {
    width: 100%;
    margin-top: 2px;
}

.demo-add-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 62px;
    gap: 8px;
}

.demo-add-row .field {
    min-width: 0;
}

.demo-waiter-cart {
    margin-top: 7px;
    padding-top: 11px;
    border-top: 1px solid var(--line);
}

.waiter-cart-heading h3 {
    margin: 0;
    font: 400 17px/1.25 Georgia, serif;
}

.demo-waiter-cart .waiter-cart-items {
    max-height: 320px;
}

.demo-submit {
    width: 100%;
}

.demo-submit:disabled {
    background: #c9c7bf;
    cursor: not-allowed;
}

.kitchen-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 13px;
}

.kitchen-grid > div {
    min-width: 0;
}

.kitchen-grid > div > h3 {
    margin: 0 0 10px;
    color: #5f6058;
    font-size: 12px;
    font-weight: 700;
}

.batch-card {
    min-width: 0;
    margin-bottom: 10px;
    padding: 13px;
    border: 1px solid var(--line);
    border-left: 3px solid #d29146;
    border-radius: 3px;
    background: #fff;
}

.batch-card.preparing {
    border-left-color: var(--green);
}

.batch-card h3 {
    margin: 0 0 6px;
    font-size: 13px;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.batch-card p {
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 11px;
    overflow-wrap: anywhere;
}

.batch-card form {
    margin: 0;
}

.batch-card button[type="submit"] {
    min-height: 34px;
    padding: 6px 10px;
    font-size: 11px;
}

.empty-state {
    margin: 0;
    padding: 14px 10px;
    border: 1px dashed var(--line);
    color: var(--muted);
    text-align: center;
    font-size: 12px;
}

.message-box {
    margin: 0 0 14px;
    padding: 10px 12px;
    border: 1px solid #c9d7bc;
    border-radius: 3px;
    background: #f1f6eb;
    color: #42563a;
    font-size: 12px;
}

.kitchen-grid > .card {
    box-shadow: none;
}

@media (max-width: 950px) {
    .container {
        padding-right: 20px;
        padding-left: 20px;
    }

    .demo-layout {
        grid-template-columns: minmax(220px, .65fr) minmax(0, 1.35fr);
        gap: 12px;
    }

    .waiter-menu-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .demo-card,
    .card {
        padding: 15px;
    }

    .kitchen-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .container {
        padding: 0 15px 28px;
    }

    .topbar {
        align-items: flex-start;
        flex-direction: column;
        justify-content: center;
        gap: 11px;
        padding: 15px 0;
    }

    .topbar .nav-row {
        justify-content: flex-start;
        width: 100%;
    }

    .demo-layout,
    .waiter-layout,
    .kitchen-grid {
        grid-template-columns: 1fr;
    }

    .demo-card > h2,
    .card > h2 {
        margin-bottom: 12px;
    }

    .hero-banner {
        margin-top: 18px;
        padding: 16px;
    }

    .hero-banner h2 {
        font-size: 21px;
    }
}

@media (max-width: 420px) {
    .cards-row {
        gap: 7px;
    }

    .stat-card {
        min-height: 70px;
        padding: 9px;
    }

    .stat-card strong {
        font-size: 20px;
    }

    .stat-card span {
        font-size: 10px;
    }

    .nav-link {
        padding-right: 8px;
        padding-left: 8px;
        font-size: 11px;
    }
}
