@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@500;600;700;800&display=swap");

:root {
    color-scheme: light;
    --ink: #10241f;
    --ink-soft: #29433b;
    --muted: #687b75;
    --cream: #f7f5ee;
    --paper: #fffdf8;
    --surface: #ffffff;
    --surface-muted: #f0f3ed;
    --green: #0d765d;
    --green-dark: #064c3d;
    --green-soft: #e7f2ec;
    --lime: #b9da78;
    --line: #dfe6df;
    --danger: #b84646;
    --danger-soft: #fff0ee;
    --warning: #9b7016;
    --warning-soft: #fff8df;
    --shadow: 0 22px 60px rgba(10, 55, 45, 0.10);
    --shadow-small: 0 10px 28px rgba(10, 55, 45, 0.08);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background:
        radial-gradient(circle at 90% 4%, rgba(185, 218, 120, 0.24), transparent 25rem),
        var(--cream);
    color: var(--ink);
    font-family: "DM Sans", sans-serif;
    line-height: 1.6;
    margin: 0;
    min-height: 100vh;
}

a {
    color: var(--green);
    font-weight: 700;
    text-decoration: none;
}

a:hover {
    color: var(--green-dark);
}

.site-header {
    backdrop-filter: blur(16px);
    background: rgba(255, 253, 248, 0.92);
    border-bottom: 1px solid rgba(16, 36, 31, 0.08);
    position: sticky;
    top: 0;
    z-index: 20;
}

.header-inner,
.footer-inner {
    margin: 0 auto;
    max-width: 1180px;
    padding-left: 24px;
    padding-right: 24px;
}

.header-inner {
    align-items: center;
    display: flex;
    gap: 24px;
    justify-content: space-between;
    min-height: 76px;
}

.brand {
    align-items: center;
    color: var(--ink);
    display: inline-flex;
    gap: 10px;
}

.brand:hover {
    color: var(--ink);
}

.brand-mark {
    align-items: center;
    background: var(--green);
    border-radius: 10px 2px 10px 2px;
    color: #fff;
    display: inline-flex;
    font-family: "Manrope", sans-serif;
    font-weight: 800;
    height: 34px;
    justify-content: center;
    transform: rotate(-5deg);
    width: 34px;
}

.brand-copy,
.brand-copy strong,
.brand-copy small {
    display: block;
}

.brand-copy strong {
    font-family: "Manrope", sans-serif;
    font-size: 1.15rem;
    letter-spacing: -0.05em;
    line-height: 1;
}

.brand-copy small {
    color: var(--muted);
    font-size: 0.63rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    margin-top: 3px;
}

.brand-copy small span {
    color: var(--green);
}

.nav {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.nav form {
    display: block;
}

.nav a,
.nav button,
.button,
button {
    align-items: center;
    background: transparent;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--ink);
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-size: 0.87rem;
    font-weight: 700;
    justify-content: center;
    min-height: 42px;
    padding: 9px 17px;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav a {
    border-color: transparent;
}

.nav a:hover,
.nav button:hover,
.button:hover,
button:hover {
    background: var(--green-soft);
    border-color: #c8dcd1;
    color: var(--green-dark);
    text-decoration: none;
    transform: translateY(-1px);
}

.button-primary,
button[type="submit"] {
    background: var(--green);
    border-color: var(--green);
    color: #fff;
}

.button-primary:hover,
button[type="submit"]:hover {
    background: var(--green-dark);
    border-color: var(--green-dark);
    color: #fff;
}

.button-danger {
    background: transparent !important;
    border-color: #edcaca !important;
    color: var(--danger) !important;
}

.button-danger:hover {
    background: var(--danger-soft) !important;
    border-color: #dfaaaa !important;
}

.page {
    margin: 0 auto;
    max-width: 1180px;
    min-height: calc(100vh - 160px);
    padding: 54px 24px 80px;
}

.site-footer {
    background: var(--ink);
    color: #9fb2ab;
    font-size: 0.75rem;
    padding: 25px 0;
}

.footer-inner {
    align-items: center;
    display: flex;
    gap: 24px;
    justify-content: space-between;
}

.site-footer strong {
    color: #fff;
}

.panel {
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(16, 36, 31, 0.09);
    border-radius: 22px;
    box-shadow: var(--shadow);
    padding: clamp(22px, 4vw, 38px);
}

.page-title {
    align-items: flex-end;
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    justify-content: space-between;
    margin-bottom: 28px;
}

.page-title .actions {
    margin: 0;
}

h1,
h2,
h3 {
    font-family: "Manrope", sans-serif;
    letter-spacing: -0.055em;
    line-height: 1.08;
    margin: 0 0 14px;
}

h2 {
    font-size: clamp(2rem, 4vw, 3.25rem);
}

h3 {
    font-size: 1.25rem;
    margin-top: 30px;
}

p {
    margin: 0 0 15px;
}

.muted {
    color: var(--muted);
}

.eyebrow {
    align-items: center;
    color: var(--green);
    display: flex;
    font-size: 0.7rem;
    font-weight: 800;
    gap: 9px;
    letter-spacing: 0.15em;
    margin: 0 0 15px;
    text-transform: uppercase;
}

.eyebrow span {
    background: var(--lime);
    border-radius: 50%;
    height: 7px;
    width: 7px;
}

.messages {
    display: grid;
    gap: 10px;
    margin-bottom: 22px;
}

.message {
    background: var(--green-soft);
    border: 1px solid #c7dfd2;
    border-radius: 13px;
    color: var(--green-dark);
    font-weight: 600;
    margin: 0;
    padding: 13px 16px;
}

form {
    display: grid;
    gap: 18px;
}

form p {
    margin: 0;
}

label {
    color: var(--ink-soft);
    display: inline-block;
    font-size: 0.86rem;
    font-weight: 700;
    margin-bottom: 7px;
}

input,
select,
textarea {
    background: #fff;
    border: 1px solid #cedbd4;
    border-radius: 12px;
    color: var(--ink);
    font: inherit;
    min-height: 48px;
    outline: none;
    padding: 11px 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    width: 100%;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 4px rgba(13, 118, 93, 0.11);
}

textarea {
    min-height: 130px;
    resize: vertical;
}

input[type="checkbox"],
input[type="radio"] {
    accent-color: var(--green);
    min-height: auto;
    width: auto;
}

.helptext {
    color: var(--muted);
    display: block;
    font-size: 0.75rem;
    margin-top: 5px;
}

.errorlist {
    color: var(--danger);
    font-size: 0.8rem;
    font-weight: 700;
    list-style: none;
    margin: 0 0 7px;
    padding: 0;
}

.errorlist + input,
.errorlist + select,
.errorlist + textarea {
    border-color: #dfaaaa;
}

.form-shell,
.order-shell,
.status-shell {
    margin: 0 auto;
}

.form-shell {
    max-width: 720px;
}

.order-shell {
    max-width: 680px;
}

.status-shell {
    max-width: 620px;
}

.customer-field {
    background: var(--cream);
    border-radius: 15px;
    padding: 16px;
}

.table-scroll {
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow-small);
    overflow-x: auto;
}

table {
    background: var(--surface);
    border-collapse: collapse;
    min-width: 720px;
    width: 100%;
}

th,
td {
    border-bottom: 1px solid var(--line);
    padding: 15px 17px;
    text-align: left;
    vertical-align: middle;
}

th {
    background: var(--surface-muted);
    color: var(--ink-soft);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

td {
    color: var(--ink-soft);
    font-size: 0.9rem;
}

tbody tr {
    transition: background 0.2s ease;
}

tbody tr:hover {
    background: #fbfcf8;
}

tr:last-child td {
    border-bottom: 0;
}

.actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin: 18px 0;
}

.actions form {
    display: block;
}

.section-heading {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin: 38px 0 14px;
}

.section-heading h3 {
    margin: 0;
}

.section-heading span {
    background: var(--green-soft);
    border-radius: 999px;
    color: var(--green);
    font-size: 0.75rem;
    font-weight: 800;
    padding: 5px 10px;
}

.empty-state {
    background: rgba(255, 255, 255, 0.66);
    border: 1px dashed #c8d7cf;
    border-radius: 18px;
    color: var(--muted);
    padding: 30px;
    text-align: center;
}

.empty-state strong {
    color: var(--ink);
    display: block;
    font-family: "Manrope", sans-serif;
    margin-bottom: 5px;
}

.empty-state p {
    margin: 0;
}

.empty-state.compact {
    padding: 16px;
}

.meta-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, 1fr);
    margin-bottom: 24px;
}

.meta-item {
    background: var(--cream);
    border: 1px solid #e5e5dc;
    border-radius: 15px;
    padding: 15px;
}

.meta-item span {
    font-size: 0.75rem;
}

.meta-item strong {
    display: block;
    font-family: "Manrope", sans-serif;
    font-size: 1.35rem;
    letter-spacing: -0.04em;
}

.qr-thumb {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 8px;
}

.qr-print-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.qr-card {
    align-items: center;
    background: #fff;
    border: 2px solid var(--green-dark);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    min-height: 330px;
    padding: 22px;
    position: relative;
    text-align: center;
}

.qr-card::before {
    background: var(--lime);
    border-radius: 999px;
    content: "";
    height: 6px;
    left: 25%;
    position: absolute;
    right: 25%;
    top: -4px;
}

.qr-card img {
    height: 180px;
    margin: 15px 0;
    width: 180px;
}

.qr-card-title {
    color: var(--green-dark);
    font-family: "Manrope", sans-serif;
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.qr-card-url {
    color: var(--muted);
    font-size: 0.7rem;
    overflow-wrap: anywhere;
}

.menu-list {
    display: grid;
    gap: 12px;
}

.menu-product {
    align-items: center;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 17px;
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 17px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.menu-product:hover {
    border-color: #c4d8cd;
    box-shadow: var(--shadow-small);
    transform: translateY(-1px);
}

.menu-product h3 {
    font-size: 1.08rem;
    letter-spacing: -0.035em;
    margin: 0 0 6px;
}

.menu-product p {
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.product-category {
    background: var(--green-soft);
    border-radius: 999px;
    color: var(--green-dark);
    display: inline-flex;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 4px 9px;
}

.product-order {
    align-items: flex-end;
    display: grid;
    gap: 10px;
    justify-items: end;
}

.product-order > strong {
    color: var(--green-dark);
    font-family: "Manrope", sans-serif;
}

.quantity-control {
    align-items: center;
    background: var(--cream);
    border: 1px solid var(--line);
    border-radius: 999px;
    display: inline-grid;
    grid-template-columns: 40px 44px 40px;
    overflow: hidden;
}

.quantity-control button {
    background: transparent;
    border: 0;
    border-radius: 0;
    color: var(--green-dark);
    font-size: 1.15rem;
    justify-content: center;
    min-height: 40px;
    padding: 0;
}

.quantity-control input {
    background: transparent;
    border: 0;
    border-left: 1px solid var(--line);
    border-radius: 0;
    border-right: 1px solid var(--line);
    min-height: 40px;
    padding: 0;
    text-align: center;
}

.checkout-bar {
    align-items: center;
    background: var(--green-dark);
    border-radius: 18px;
    box-shadow: 0 18px 36px rgba(6, 76, 61, 0.18);
    color: #fff;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin-top: 4px;
    padding: 17px 19px;
}

.checkout-bar .muted {
    color: #adc8be;
    display: block;
    font-size: 0.72rem;
}

.checkout-bar strong {
    font-family: "Manrope", sans-serif;
    font-size: 1.45rem;
}

.checkout-bar button {
    background: var(--lime);
    border-color: var(--lime);
    color: var(--ink);
}

.checkout-bar button:hover {
    background: #fff;
    border-color: #fff;
    color: var(--ink);
}

.payment-methods {
    border: 1px solid var(--line);
    border-radius: 17px;
    margin: 4px 0 0;
    padding: 16px;
}

.payment-methods legend {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 800;
    padding: 0 7px;
}

.payment-method-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
}

.payment-method {
    align-items: center;
    background: var(--surface-muted);
    border: 1px solid var(--line);
    border-radius: 13px;
    cursor: pointer;
    display: flex;
    gap: 10px;
    margin: 0;
    min-height: 50px;
    padding: 10px 12px;
}

.payment-method:has(input:checked) {
    background: var(--green-soft);
    border-color: var(--green);
    color: var(--green-dark);
}

.status-card {
    overflow: hidden;
    position: relative;
    text-align: center;
}

.status-card::before {
    background: var(--green);
    content: "";
    height: 6px;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
}

.status-symbol {
    align-items: center;
    background: var(--green-soft);
    border-radius: 50%;
    color: var(--green);
    display: inline-flex;
    font-family: "Manrope", sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    height: 56px;
    justify-content: center;
    margin-bottom: 18px;
    width: 56px;
}

.status-card > p {
    color: var(--muted);
}

.status-details {
    border-top: 1px solid var(--line);
    display: grid;
    gap: 10px;
    margin-top: 25px;
    padding-top: 20px;
    text-align: left;
}

.status-details p {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin: 0;
}

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

.status-pending::before,
.status-warning::before {
    background: var(--warning);
}

.status-pending .status-symbol,
.status-warning .status-symbol {
    background: var(--warning-soft);
    color: var(--warning);
}

.status-error::before {
    background: var(--danger);
}

.status-error .status-symbol {
    background: var(--danger-soft);
    color: var(--danger);
}

.loading-symbol {
    border: 4px solid #eadfae;
    border-top-color: var(--warning);
    animation: spin 0.9s linear infinite;
}

.status-card form {
    justify-items: center;
}

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

@media (max-width: 720px) {
    .header-inner {
        min-height: 66px;
        padding-left: 18px;
        padding-right: 18px;
    }

    .nav {
        gap: 2px;
    }

    .nav a,
    .nav button {
        font-size: 0.76rem;
        min-height: 36px;
        padding: 7px 10px;
    }

    .nav form {
        margin: 0;
    }

    .page {
        padding: 34px 18px 60px;
    }

    .footer-inner {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
        padding-left: 18px;
        padding-right: 18px;
    }

    .panel {
        border-radius: 18px;
        padding: 22px 18px;
    }

    .page-title {
        align-items: flex-start;
        margin-bottom: 22px;
    }

    .page-title .actions,
    .page-title .button {
        width: 100%;
    }

    .meta-grid {
        grid-template-columns: 1fr 1fr;
    }

    .menu-product {
        grid-template-columns: 1fr;
    }

    .product-order {
        align-items: center;
        grid-template-columns: 1fr auto;
        justify-items: stretch;
    }

    .checkout-bar {
        align-items: stretch;
        flex-direction: column;
    }

    .checkout-bar button {
        width: 100%;
    }
}

@media (max-width: 460px) {
    .brand-copy small {
        display: none;
    }

    .nav a {
        display: none;
    }

    .nav a:last-of-type {
        display: inline-flex;
    }

    .meta-grid {
        grid-template-columns: 1fr;
    }

    .actions .button,
    .actions button,
    .actions form {
        width: 100%;
    }

    .actions form button {
        width: 100%;
    }
}

@media print {
    body {
        background: #fff;
    }

    .site-header,
    .site-footer,
    .no-print {
        display: none !important;
    }

    .page {
        max-width: none;
        padding: 0;
    }

    .panel {
        border: 0;
        box-shadow: none;
        padding: 0;
    }

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

    .qr-card {
        break-inside: avoid;
        box-shadow: none;
        min-height: 330px;
        page-break-inside: avoid;
    }
}
