* {
    box-sizing: border-box;
}

:root {
    --background: #f7f3ee;
    --surface: #ffffff;
    --surface-soft: #f1e8df;
    --text: #30251f;
    --border: #ded6cf;
    --input-border: #cfc3b9;
    --sidebar: #3d2b22;
    --sidebar-hover: #604538;
    --accent: #795548;
    --accent-hover: #604238;
    --accent-soft: #f3d6a5;
    --shadow: rgb(48 37 31 / 12%);
}

:root[data-palette="terracotta"] {
    --sidebar: #542f29;
    --sidebar-hover: #75443b;
    --accent: #a34f3e;
    --accent-hover: #843e31;
    --accent-soft: #f2c4b8;
}

:root[data-palette="green"] {
    --sidebar: #263f35;
    --sidebar-hover: #3b5c4e;
    --accent: #497a62;
    --accent-hover: #365f4b;
    --accent-soft: #c8dfd1;
}

:root[data-theme="dark"] {
    --background: #181513;
    --surface: #25211e;
    --surface-soft: #302a26;
    --text: #f5eee8;
    --border: #4b423c;
    --input-border: #665950;
    --shadow: rgb(0 0 0 / 35%);
    color-scheme: dark;
}

body {
    margin: 0;
    color: var(--text);
    background: var(--background);
    font-family: Arial, sans-serif;
}

.app-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    min-height: 100vh;
}

.sidebar {
    padding: 24px;
    background: var(--sidebar);
}

.brand img {
    display: block;
    max-width: 150px;
    margin: 0 auto 32px;
}

.sidebar nav {
    display: grid;
    gap: 12px;
}

.sidebar nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    color: white;
    text-decoration: none;
    border-radius: 8px;
}

.sidebar nav a:hover {
    background: var(--sidebar-hover);
}

.sidebar nav a.active {
    color: #30251f;
    background: var(--accent-soft);
    font-weight: 700;
}

.sidebar-action {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px;
    color: white;
    background: transparent;
    text-align: left;
}

.nav-icon,
.button-icon {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
}

.nav-icon,
.icon-button-label .button-icon,
.appearance-toggle .button-icon {
    filter: brightness(0) invert(1);
}

.sidebar nav a.active .nav-icon {
    filter: brightness(0) saturate(100%);
}

.appearance-toggle,
.icon-button-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.sidebar-action:hover {
    background: var(--sidebar-hover);
}

.page {
    min-width: 0;
}

.topbar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 16px;
    min-height: 64px;
    padding: 12px 24px;
    position: relative;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.user-summary {
    display: flex;
    align-items: center;
    gap: 10px;
    color: inherit;
    text-decoration: none;
}

.profile-avatar {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border-radius: 50%;
    object-fit: cover;
}

.profile-avatar-fallback {
    display: grid;
    color: white;
    background: var(--accent);
    font-weight: 700;
    place-items: center;
}

.content {
    padding: 24px;
}

[hidden] {
    display: none !important;
}

.order-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
    gap: 24px;
    align-items: start;
}

.order-builder {
    min-width: 0;
}

.order-heading {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 20px;
    margin-bottom: 22px;
}

.order-heading h1,
.order-heading .eyebrow {
    margin: 0;
}

.eyebrow {
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.order-type-selector {
    display: flex;
    gap: 6px;
    padding: 5px;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: 14px;
}

.order-type-option {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--text);
    background: transparent;
}

.order-type-option:hover {
    color: white;
    background: var(--accent-hover);
}

.order-type-option.is-selected {
    color: white;
    background: var(--accent);
    box-shadow: 0 4px 12px var(--shadow);
}

.order-type-option img {
    width: 19px;
    height: 19px;
}

.order-type-option.is-selected img,
.order-type-option:hover img {
    filter: brightness(0) invert(1);
}

.customer-panel {
    margin-bottom: 28px;
    padding: 26px;
    background: linear-gradient(145deg, var(--surface), var(--surface-soft));
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: 0 14px 38px var(--shadow);
}

.customer-panel-heading {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border);
}

.customer-panel-heading h2,
.customer-panel-heading p {
    margin: 0;
}

.customer-panel-heading h2 {
    font-size: 1.1rem;
}

.customer-panel-heading p {
    margin-top: 3px;
    font-size: 0.84rem;
    opacity: 0.62;
}

.customer-panel-icon {
    display: grid;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    background: var(--accent-soft);
    border-radius: 13px;
    place-items: center;
}

.customer-panel-icon img {
    width: 21px;
    height: 21px;
}

:root[data-theme="dark"] .customer-panel-icon img {
    filter: brightness(0) invert(1);
}

.customer-fields-grid,
.delivery-fields {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 18px;
}

.delivery-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-column: 1 / -1;
}

.field-group {
    display: grid;
    align-content: start;
    gap: 8px;
}

.field-group label {
    color: var(--text);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.015em;
    opacity: 0.78;
}

.field-group input,
.field-group textarea {
    width: 100%;
}

.field-group textarea {
    min-height: 64px;
    resize: vertical;
}

.customer-name-field,
.phone-field,
.table-field {
    grid-column: span 6;
}

.delivery-fields .street-field,
.delivery-fields .exterior-number-field,
.delivery-fields .interior-number-field,
.delivery-fields .neighborhood-field {
    min-width: 0;
    grid-column: span 1;
}

.notes-field {
    grid-column: 1 / -1;
}

.delivery-address-card {
    margin-top: 4px;
    padding: 18px;
    background: rgb(255 255 255 / 24%);
    border: 1px solid var(--border);
    border-radius: 15px;
}

:root[data-theme="dark"] .delivery-address-card {
    background: rgb(255 255 255 / 3%);
}

.delivery-address-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    grid-column: 1 / -1;
    gap: 12px;
    margin-bottom: 2px;
}

.delivery-address-heading span {
    font-size: 0.74rem;
    opacity: 0.58;
}

.delivery-fields label {
    white-space: nowrap;
}

.delivery-fields input {
    min-width: 0;
}

.customer-panel input,
.customer-panel textarea {
    background: var(--surface);
    border-color: transparent;
    box-shadow: inset 0 0 0 1px var(--border);
}

.customer-panel input:focus,
.customer-panel textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-soft);
}

.current-order-panel {
    position: sticky;
    top: 88px;
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 112px);
    max-height: calc(100vh - 112px);
    padding: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 8px 24px var(--shadow);
}

.current-order-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.current-order-heading h2 {
    margin: 0;
}

.current-order-heading > span {
    padding: 6px 9px;
    color: white;
    background: var(--accent);
    border-radius: 999px;
    font-size: 0.82rem;
}

.current-order-items {
    display: grid;
    gap: 10px;
    margin: 18px 0;
    overflow-y: auto;
}

.current-order-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: var(--surface-soft);
    border-radius: 12px;
}

.current-order-item > div:first-child {
    display: grid;
    gap: 4px;
}

.current-order-item span {
    font-size: 0.86rem;
}

.summary-quantity-control,
.quantity-control {
    display: flex;
    align-items: center;
    gap: 6px;
}

.summary-quantity-control button,
.quantity-control button {
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 50%;
}

.summary-quantity-control span {
    min-width: 20px;
    text-align: center;
}

.current-order-totals {
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

.current-order-totals p {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.current-order-totals .final-total {
    align-items: baseline;
    font-size: 1.2rem;
    text-transform: uppercase;
}

.current-order-totals .final-total strong {
    font-size: 1.8rem;
}

.finish-order-button {
    width: 100%;
    padding: 14px;
    font-size: 1.05rem;
    font-weight: 700;
}

.category-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0 26px;
}

.category-card {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 48px;
    padding: 7px 14px 7px 8px;
    color: var(--text);
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 999px;
    font-weight: 700;
}

.category-order-icon {
    display: inline-grid;
    width: 32px;
    height: 32px;
    place-items: center;
    background: var(--accent-soft);
    border-radius: 50%;
}

.category-card:hover,
.category-card.is-selected {
    color: white;
    background: var(--accent);
    border-color: var(--accent);
}

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

.product-card {
    display: grid;
    align-content: start;
    gap: 8px;
    padding: 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 4px 14px var(--shadow);
}

.product-card.has-quantity {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-soft);
}

.product-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-top: auto;
}

.product-card-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 9px;
}

.product-card .quantity-input {
    width: 48px;
    min-height: 38px;
    padding: 6px 4px;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--input-border);
    border-radius: 10px;
    font-weight: 800;
    text-align: center;
    appearance: textfield;
    -moz-appearance: textfield;
}

.product-card .quantity-input::-webkit-inner-spin-button,
.product-card .quantity-input::-webkit-outer-spin-button {
    margin: 0;
    appearance: none;
    -webkit-appearance: none;
}

.product-display-card h3,
.product-display-card p {
    margin: 0;
}

.menu-category {
    margin-bottom: 32px;
}

.category-cover {
    width: min(100%, 440px);
    aspect-ratio: 3 / 2;
    object-fit: cover;
    border-radius: 14px;
    box-shadow: 0 6px 18px var(--shadow);
}

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

.report-cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(150px, 1fr));
    gap: 16px;
    margin: 24px 0;
}

.report-cards article,
.report-grid > section {
    padding: 20px;
    background: var(--surface);
    border-radius: 12px;
    box-shadow: 0 4px 14px var(--shadow);
}

.report-cards span,
.report-cards strong {
    display: block;
}

.report-cards strong {
    margin-top: 8px;
    font-size: 1.6rem;
}

.report-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.sales-bar-track {
    height: 12px;
    overflow: hidden;
    background: var(--surface-soft);
    border-radius: 999px;
}

.sales-bar-track span {
    display: block;
    height: 100%;
    background: var(--accent);
    border-radius: inherit;
}

table {
    width: 100%;
    border-collapse: collapse;
}

.page-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 22px;
}

.page-heading h1,
.page-heading .eyebrow {
    margin: 0;
}

.action-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 9px 14px;
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
}

.action-link-primary {
    color: white;
    background: var(--accent);
}

.action-link-primary:hover {
    background: var(--accent-hover);
}

.action-link-secondary {
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border);
}

.action-link-secondary:hover {
    border-color: var(--accent);
}

.action-link-danger {
    color: #c43d49;
    background: color-mix(in srgb, #d94b57 9%, var(--surface));
    border: 1px solid color-mix(in srgb, #d94b57 24%, var(--border));
}

.action-link-danger:hover {
    color: #ffffff;
    background: #b93a46;
    border-color: #b93a46;
}

.filter-panel {
    margin-bottom: 24px;
    padding: 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 5px 16px var(--shadow);
}

.filter-panel h2 {
    margin-top: 0;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 14px;
}

.filter-field {
    display: grid;
    align-content: start;
    gap: 6px;
}

.filter-field label {
    font-size: 0.84rem;
    font-weight: 700;
}

.filter-field input,
.filter-field select {
    width: 100%;
}

.filter-actions,
.pagination {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-actions {
    margin-top: 16px;
}

.pagination {
    justify-content: center;
    margin-top: 20px;
}

th,
td {
    padding: 10px;
    border-bottom: 1px solid var(--border);
    text-align: left;
}

.status-select {
    color: white;
    border: 0;
    font-weight: 700;
    cursor: pointer;
}

.status-in_progress {
    color: #285e9c;
    background: #e8f0fc;
    border: 1px solid #b9d0ef;
}

.status-completed {
    color: #276c49;
    background: #e4f3ea;
    border: 1px solid #b5ddc5;
}

.status-canceled {
    color: #a33e48;
    background: #f9e8e9;
    border: 1px solid #edbdc1;
}

.status-select.is-saving {
    pointer-events: none;
    cursor: wait;
    opacity: 0.65;
}

.status-label,
.status-current {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 110px;
    padding: 7px 10px;
    border-radius: 999px;
    font-size: 0.86rem;
    font-weight: 700;
}

.status-cycle-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 125px;
    border-radius: 999px;
    font-weight: 700;
}

.status-cycle-button.status-in_progress:hover {
    color: #194d89;
    background: #d8e7fa;
    border-color: #83afe3;
}

.status-cycle-button.status-completed:hover {
    color: #175f3c;
    background: #d2ebdc;
    border-color: #76bd92;
}

.status-cycle-button.status-canceled:hover {
    color: #922f3a;
    background: #f4d6d9;
    border-color: #dc9299;
}

.detail-heading {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
}

.detail-heading h1 {
    margin: 0;
}

.detail-heading a {
    color: var(--text);
    text-decoration: none;
}

.order-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(340px, 0.9fr);
    gap: 22px;
    align-items: start;
    width: min(100%, 1180px);
    margin: 0 auto;
}

.order-detail-information {
    display: grid;
    gap: 22px;
}

.detail-card {
    padding: 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 7px 22px var(--shadow);
}

.detail-card-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 22px;
}

.detail-card-heading h2 {
    margin: 0;
}

.detail-data-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin: 0;
}

.detail-data-grid div {
    display: grid;
    gap: 5px;
}

.detail-data-grid dt {
    font-size: 0.84rem;
    opacity: 0.7;
}

.detail-data-grid dd {
    margin: 0;
    font-weight: 700;
}

.detail-data-wide {
    grid-column: 1 / -1;
}

.order-products-card {
    position: sticky;
    top: 88px;
}

.detail-product-list {
    display: grid;
    gap: 4px;
}

.detail-product-list article {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}

.detail-product-list article > div {
    display: grid;
    gap: 4px;
}

.detail-product-list article span {
    font-size: 0.86rem;
    opacity: 0.74;
}

.detail-quantity {
    padding: 5px 9px;
    background: var(--surface-soft);
    border-radius: 999px;
}

.detail-total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-top: 22px;
    padding-top: 18px;
    font-size: 1.2rem;
    text-transform: uppercase;
}

.detail-total strong {
    font-size: 2rem;
}

/* Final component overrides: contrast and responsive kitchen workflow. */
:root[data-theme="dark"][data-palette="green"] .customization-choice > span {
    color: #f7f5f0;
    background: #29332f;
    border-color: #58746a;
}
:root[data-theme="dark"][data-palette="green"] .customization-choice input:checked + span {
    color: #ffffff;
    background: #245442;
    border-color: #83c9ad;
}
@media (max-width: 900px) {
    .kitchen-destination { grid-template-columns: 1fr; }
    .order-products-card, .order-detail-information { grid-column: 1; grid-row: auto; }
    .cash-quick-buttons { grid-template-columns: repeat(3, 1fr); }
}

.kitchen-destination {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(220px, .65fr);
    gap: 24px;
    padding: 22px 26px;
    color: var(--text);
    background: color-mix(in srgb, var(--accent) 12%, var(--surface));
    border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--border));
    border-radius: 18px;
}
.kitchen-destination > div { display: grid; gap: 4px; }
.kitchen-destination span { font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.kitchen-destination strong { font-size: clamp(1.35rem, 3vw, 2.25rem); line-height: 1.1; }
.kitchen-destination small { font-size: 1rem; opacity: .78; }
.order-products-card { grid-column: 1; grid-row: 2 / span 2; position: static; }
.order-detail-information { grid-column: 2; }
.detail-product-list article > div > strong { font-size: 1.12rem; }
.detail-product-list article { padding: 18px 0; }
.detail-payment { display: grid; gap: 8px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.detail-payment p { display: flex; justify-content: space-between; gap: 16px; margin: 0; }

.payment-panel { padding: 16px; margin-bottom: 18px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface-soft); transition: border-color .2s, box-shadow .2s; }
.payment-panel.has-error { border-color: #e35d68; box-shadow: 0 0 0 4px color-mix(in srgb, #e35d68 20%, transparent); }
.payment-heading, .cash-payment-fields p, .tip-payment-fields p { display: flex; justify-content: space-between; gap: 12px; }
.payment-methods, .cash-quick-buttons { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.cash-quick-buttons { grid-template-columns: repeat(5, 1fr); }
.payment-methods button, .cash-quick-buttons button { min-height: 40px; padding: 8px; border: 1px solid var(--border); border-radius: 11px; color: var(--text); background: var(--surface); }
.payment-methods button.is-selected { color: white; background: var(--accent); border-color: var(--accent); }
.cash-payment-fields, .tip-payment-fields { display: grid; gap: 10px; margin-top: 14px; }
.cash-payment-fields[hidden], .tip-payment-fields[hidden] { display: none; }
.cash-payment-fields label, .tip-payment-fields label { display: grid; gap: 6px; }
.cash-payment-fields input, .tip-payment-fields input { width: 100%; }
.is-insufficient { color: #e35d68; }
.current-order-item.is-editable { cursor: pointer; transition: border-color .18s, transform .18s; }
.current-order-item.is-editable:hover { border-color: var(--accent); transform: translateY(-1px); }
.live-orders-indicator { display: inline-flex; align-items: center; gap: 6px; margin-left: 8px; font: 700 .72rem/1 sans-serif; color: var(--accent); vertical-align: middle; }
.live-orders-indicator i { width: 8px; height: 8px; border-radius: 50%; background: #31b879; box-shadow: 0 0 0 5px color-mix(in srgb, #31b879 18%, transparent); }

:root[data-theme="dark"][data-palette="green"] .customization-choice > span { color: #f6f3ed; background: #28322e; border-color: #557168; }
:root[data-theme="dark"][data-palette="green"] .customization-choice-input:checked + span { color: #fff; background: #245342; border-color: #7bc2a6; }
.appearance-theme-options { grid-template-columns: repeat(2, 52px); }
.appearance-theme-options .appearance-choice-content { display: grid; place-items: center; min-height: 48px; padding: 0; border-radius: 14px; }
.theme-symbol { font-size: 1.45rem; line-height: 1; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.detail-edit-form {
    width: min(100%, 900px);
    margin: 0 auto;
}

.status-dropdown {
    position: relative;
    width: max-content;
}

.status-dropdown summary {
    list-style: none;
    cursor: pointer;
}

.status-dropdown summary::-webkit-details-marker {
    display: none;
}

.status-current::after {
    content: "⌄";
    margin-left: 8px;
}

.status-menu {
    position: absolute;
    z-index: 1200;
    top: calc(100% + 7px);
    right: 0;
    display: grid;
    min-width: 170px;
    padding: 6px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 10px 28px var(--shadow);
}

.status-option {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    color: var(--text);
    background: var(--surface);
    text-align: left;
}

.status-option-in_progress:hover,
.status-option-in_progress:focus-visible {
    color: white;
    background: #2563eb;
}

.status-option-completed:hover,
.status-option-completed:focus-visible {
    color: white;
    background: #16803d;
}

.status-option-canceled:hover,
.status-option-canceled:focus-visible {
    color: white;
    background: #c62828;
}

:root[data-theme="dark"] .status-menu,
:root[data-theme="dark"] .status-option {
    color: #f5eee8;
    background: #11100f;
}

:root[data-theme="dark"] .status-option-in_progress:hover,
:root[data-theme="dark"] .status-option-in_progress:focus-visible {
    background: #2563eb;
}

:root[data-theme="dark"] .status-option-completed:hover,
:root[data-theme="dark"] .status-option-completed:focus-visible {
    background: #16803d;
}

:root[data-theme="dark"] .status-option-canceled:hover,
:root[data-theme="dark"] .status-option-canceled:focus-visible {
    background: #c62828;
}

.calculator {
    position: fixed;
    z-index: 1000;
    right: 24px;
    bottom: 24px;
    width: 320px;
    overflow: hidden;
    background: var(--background);
    border: 1px solid var(--input-border);
    border-radius: 14px;
    box-shadow: 0 16px 40px var(--shadow);
}

.calculator.is-hidden {
    display: none !important;
}

.calculator-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    color: white;
    background: var(--sidebar);
    cursor: move;
    touch-action: none;
}

.calculator-window-actions {
    display: flex;
    gap: 6px;
}

.calculator-window-actions button {
    width: 30px;
    height: 30px;
    padding: 0;
    background: var(--sidebar-hover);
}

.calculator-content {
    padding: 14px;
}

.calculator-display {
    display: block;
    width: 100%;
    min-height: 64px;
    margin-bottom: 12px;
    padding: 12px;
    overflow: hidden;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--input-border);
    border-radius: 8px;
    font-size: 2rem;
    text-align: right;
    text-overflow: ellipsis;
}

.calculator-keypad {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.calculator-keypad button {
    min-height: 48px;
    font-size: 1.1rem;
}

.calculator-zero {
    grid-column: span 2;
}

.calculator.is-expanded {
    top: 80px !important;
    right: 24px !important;
    bottom: 24px !important;
    left: 244px !important;
    width: auto;
}

.calculator.is-expanded .calculator-content {
    width: min(100%, 520px);
    margin: 0 auto;
}

button {
    padding: 10px 14px;
    color: white;
    background: var(--accent);
    border: 0;
    border-radius: 8px;
    cursor: pointer;
}

button:hover {
    background: var(--accent-hover);
}

input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
select,
textarea {
    max-width: 100%;
    min-height: 46px;
    padding: 11px 14px;
    color: var(--text);
    background: var(--surface-soft);
    border: 1px solid var(--input-border);
    border-radius: 12px;
    font: inherit;
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.status-cycle-button.is-saving {
    opacity: 0.58;
    cursor: wait;
}

:root[data-theme="dark"] .status-in_progress {
    color: #a9c8f4;
    background: color-mix(in srgb, #4f7fc4 22%, var(--surface));
    border-color: color-mix(in srgb, #79a5df 45%, var(--border));
}

:root[data-theme="dark"] .status-completed {
    color: #a6d9b8;
    background: color-mix(in srgb, #40865c 23%, var(--surface));
    border-color: color-mix(in srgb, #6eb589 45%, var(--border));
}

:root[data-theme="dark"] .status-canceled {
    color: #efb0b5;
    background: color-mix(in srgb, #a84f58 23%, var(--surface));
    border-color: color-mix(in srgb, #d57d85 45%, var(--border));
}

:root[data-theme="dark"] .status-cycle-button.status-in_progress:hover {
    background: color-mix(in srgb, #5e91d6 32%, var(--surface));
}

:root[data-theme="dark"] .status-cycle-button.status-completed:hover {
    background: color-mix(in srgb, #4e9b6b 32%, var(--surface));
}

:root[data-theme="dark"] .status-cycle-button.status-canceled:hover {
    background: color-mix(in srgb, #bc5b64 32%, var(--surface));
}

.order-detail-trigger {
    display: inline-flex;
    padding: 7px 10px;
    color: var(--accent);
    background: var(--accent-soft);
    border-radius: 10px;
    font-weight: 900;
    text-decoration: none;
}

.order-detail-trigger:hover {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent);
}

.order-row {
    cursor: pointer;
    transition: filter 150ms ease, transform 150ms ease;
}

.order-row:hover {
    filter: brightness(0.97);
}

.order-row:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--accent) 35%, transparent);
    outline-offset: -3px;
}

.order-row-eat_in > td {
    background: color-mix(in srgb, #a78b68 15%, var(--surface));
}

.order-row-delivery > td {
    background: color-mix(in srgb, #e98242 19%, var(--surface));
}

.order-row-pickup > td {
    background: color-mix(in srgb, #bd7b8b 16%, var(--surface));
}

.order-row-eat_in > td:first-child {
    box-shadow: inset 4px 0 #9a7c58;
}

.order-row-delivery > td:first-child {
    box-shadow: inset 4px 0 #e77934;
}

.order-row-pickup > td:first-child {
    box-shadow: inset 4px 0 #b86e80;
}

.order-datetime,
.order-reference {
    display: grid;
    gap: 2px;
    white-space: nowrap;
}

.order-datetime b {
    font-size: 0.78rem;
    opacity: 0.64;
}

.order-reference small {
    color: var(--accent);
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.packaging-charge {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
    padding: 12px;
    background: color-mix(in srgb, var(--accent) 10%, var(--surface-soft));
    border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border));
    border-radius: 14px;
}

.packaging-charge[hidden] {
    display: none;
}

.packaging-charge-icon {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    color: var(--accent);
    background: var(--surface);
    border-radius: 10px;
    font-size: 1.1rem;
}

.packaging-charge > div:nth-child(2) {
    display: grid;
    gap: 2px;
}

.packaging-charge small {
    font-size: 0.68rem;
    line-height: 1.25;
    opacity: 0.65;
}

.packaging-charge button {
    padding: 7px 9px;
    color: #c3313f;
    background: color-mix(in srgb, #d83946 8%, var(--surface));
    border: 1px solid transparent;
    border-radius: 9px;
    font-size: 0.72rem;
    font-weight: 800;
    cursor: pointer;
}

.packaging-charge.is-removed {
    opacity: 0.65;
    border-style: dashed;
}

.packaging-charge.is-removed #packaging-charge-price {
    text-decoration: line-through;
}

.packaging-charge.is-removed button {
    color: white;
    background: var(--accent);
}

.detail-packaging-item {
    background: color-mix(in srgb, var(--accent) 9%, var(--surface-soft));
}

.order-detail-modal {
    width: min(1120px, calc(100vw - 48px));
    max-width: none;
    max-height: calc(100vh - 48px);
    padding: 0;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: 0 28px 90px rgb(0 0 0 / 38%);
}

.order-detail-modal::backdrop {
    background: rgb(10 14 12 / 68%);
    backdrop-filter: blur(7px);
}

.order-detail-modal-shell {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    max-height: calc(100vh - 50px);
}

.order-detail-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}

.order-detail-modal-header h2,
.order-detail-modal-header p {
    margin: 0;
}

.order-detail-modal-close {
    display: grid;
    width: 42px;
    height: 42px;
    padding: 0;
    place-items: center;
    color: var(--text);
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: 13px;
    font-size: 1.45rem;
    cursor: pointer;
}

.order-detail-modal-close:hover {
    color: white;
    background: #d83946;
    border-color: #d83946;
}

.order-detail-modal-body {
    overflow: auto;
    padding: 24px;
}

.order-detail-modal-body .order-detail-layout {
    width: 100%;
    margin: 0;
}

.order-detail-loading,
.order-detail-load-error {
    display: grid;
    min-height: 360px;
    place-content: center;
    text-align: center;
}

.order-detail-loading span {
    width: 36px;
    height: 36px;
    margin: auto;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: detail-loading-spin 700ms linear infinite;
}

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

.order-detail-load-error strong {
    color: #d83946;
}

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

input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"])::placeholder,
textarea::placeholder {
    color: var(--text);
    opacity: 0.48;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):hover,
select:hover,
textarea:hover {
    border-color: var(--accent);
}

input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):focus,
select:focus,
textarea:focus {
    outline: none;
    background: var(--surface);
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-soft);
}

.auth-page {
    display: grid;
    min-height: 100vh;
    padding: 24px;
    place-items: center;
    background:
        radial-gradient(circle at 20% 15%, color-mix(in srgb, var(--accent) 13%, transparent), transparent 34%),
        radial-gradient(circle at 85% 82%, color-mix(in srgb, #d9a66f 13%, transparent), transparent 30%),
        var(--background);
}

.auth-card {
    width: min(100%, 440px);
    padding: 36px;
    background: var(--surface);
    border: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
    border-radius: 26px;
    box-shadow: 0 24px 70px color-mix(in srgb, var(--text) 15%, transparent);
}

.appearance-panel {
    position: absolute;
    z-index: 1100;
    top: calc(100% + 8px);
    right: 150px;
    width: min(320px, calc(100vw - 32px));
    padding: 18px;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 12px 32px var(--shadow);
}

.appearance-panel[hidden] {
    display: none !important;
}

.appearance-panel h2 {
    margin-top: 0;
}

.appearance-panel fieldset {
    display: grid;
    gap: 10px;
    margin: 12px 0;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
}

.palette-option {
    display: flex;
    align-items: center;
    gap: 8px;
}

.appearance-options {
    display: grid;
    gap: 8px;
}

.appearance-theme-options {
    grid-template-columns: repeat(2, 1fr);
}

.appearance-choice {
    position: relative;
    cursor: pointer;
}

.appearance-choice > input,
.palette-option > input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.appearance-choice-content,
.palette-option {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 52px;
    padding: 9px;
    background: var(--surface-soft);
    border: 2px solid transparent;
    border-radius: 10px;
    transition: border-color 150ms ease, transform 150ms ease;
}

.appearance-choice-content:hover,
.palette-option:hover {
    border-color: var(--input-border);
    transform: translateY(-1px);
}

.appearance-choice > input:checked + .appearance-choice-content,
.palette-option:has(input:checked) {
    background: var(--surface);
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-soft);
}

.appearance-choice-content small,
.appearance-choice-content strong {
    display: block;
}

.appearance-choice-content small {
    margin-top: 2px;
    color: var(--text);
    font-size: 0.72rem;
    opacity: 0.7;
}

.theme-preview {
    width: 38px;
    height: 30px;
    flex: 0 0 38px;
    border: 1px solid var(--border);
    border-radius: 7px;
}

.theme-preview-light {
    background: linear-gradient(90deg, #f7f3ee 50%, #ffffff 50%);
}

.theme-preview-dark {
    background: linear-gradient(90deg, #181513 50%, #302a26 50%);
}

.palette-sample {
    width: 22px;
    height: 22px;
    border: 2px solid var(--surface);
    border-radius: 50%;
    box-shadow: 0 0 0 1px var(--border);
}

.palette-coffee {
    background: #795548;
}

.palette-terracotta {
    background: #a34f3e;
}

.palette-green {
    background: #497a62;
}

.auth-logo {
    display: block;
    width: 132px;
    max-width: 100%;
    margin: 0 auto 24px;
}

.login-heading {
    margin-bottom: 26px;
    text-align: center;
}

.login-heading h1,
.login-heading p {
    margin: 0;
}

.login-heading h1 {
    font-size: clamp(1.8rem, 5vw, 2.25rem);
    letter-spacing: -0.035em;
}

.login-heading > p:last-child {
    margin-top: 7px;
    opacity: 0.62;
}

.login-form,
.login-field {
    display: grid;
}

.login-form {
    gap: 19px;
}

.login-field {
    gap: 7px;
}

.login-field > label {
    font-size: 0.82rem;
    font-weight: 800;
}

.login-field > small {
    font-size: 0.7rem;
    opacity: 0.58;
}

.login-control {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: center;
    overflow: hidden;
    min-height: 54px;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: 15px;
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.login-control:has(.app-select) {
    position: relative;
    z-index: 5;
    overflow: visible;
}

.login-control:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 15%, transparent);
    transform: translateY(-1px);
}

.login-control-icon {
    position: relative;
    display: grid;
    width: 32px;
    height: 32px;
    margin-left: 9px;
    place-items: center;
    color: var(--accent);
    background: var(--surface);
    border-radius: 10px;
}

.login-user-icon::before {
    width: 8px;
    height: 8px;
    border: 2px solid currentColor;
    border-radius: 50%;
    content: "";
}

.login-user-icon::after {
    position: absolute;
    bottom: 6px;
    width: 14px;
    height: 7px;
    border: 2px solid currentColor;
    border-bottom: 0;
    border-radius: 10px 10px 0 0;
    content: "";
}

.login-password-icon::before {
    width: 11px;
    height: 9px;
    margin-top: 6px;
    border: 2px solid currentColor;
    border-radius: 3px;
    content: "";
}

.login-password-icon::after {
    position: absolute;
    top: 6px;
    width: 8px;
    height: 9px;
    border: 2px solid currentColor;
    border-bottom: 0;
    border-radius: 8px 8px 0 0;
    content: "";
}

.login-control select,
.login-control input {
    width: 100%;
    min-height: 52px;
    padding: 0 14px;
    color: var(--text);
    background: transparent;
    border: 0 !important;
    border-radius: 0;
    outline: 0;
    box-shadow: none !important;
}

.login-control select {
    appearance: none;
    background-image: none;
    cursor: pointer;
}

.login-submit {
    width: 100%;
    min-height: 52px;
    margin-top: 3px;
    padding: 12px;
    color: white;
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    border: 0;
    border-radius: 15px;
    box-shadow: 0 10px 24px color-mix(in srgb, var(--accent) 28%, transparent);
    font-weight: 800;
    cursor: pointer;
}

.login-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px color-mix(in srgb, var(--accent) 34%, transparent);
}

.user-summary {
    padding: 5px 8px;
    color: var(--text);
    background: var(--surface-soft);
}

.user-summary:hover {
    background: var(--accent-soft);
}

.user-summary-text {
    display: grid;
    text-align: left;
}

.user-summary-text small {
    font-size: 0.72rem;
    opacity: 0.72;
}

.user-menu-panel {
    position: absolute;
    z-index: 1100;
    top: calc(100% + 8px);
    right: 22px;
    width: 210px;
    padding: 7px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 12px 32px var(--shadow);
}

.user-menu-panel a,
.user-menu-panel button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px;
    color: var(--text);
    background: transparent;
    border-radius: 8px;
    text-align: left;
    text-decoration: none;
}

.user-menu-panel a:hover,
.user-menu-panel button:hover {
    background: var(--surface-soft);
}

.user-menu-panel img {
    width: 19px;
    height: 19px;
}

:root[data-theme="dark"] .user-menu-panel img,
:root[data-theme="dark"] .small-action img,
:root[data-theme="dark"] .search-control img {
    filter: brightness(0) invert(1);
}

.menu-heading {
    align-items: end;
}

.configuration-tabs {
    display: flex;
    gap: 5px;
    padding: 5px;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: 13px;
}

.configuration-tabs a {
    padding: 9px 18px;
    color: var(--text);
    border-radius: 9px;
    font-weight: 700;
    text-decoration: none;
}

.configuration-tabs a.is-selected {
    color: white;
    background: var(--accent);
}

.menu-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 20px;
}

.menu-search-form {
    display: grid;
    flex: 1;
    gap: 10px;
}

.menu-filter-fields {
    display: grid;
    grid-template-columns: minmax(260px, 1.4fr) minmax(190px, 1fr) minmax(180px, 0.9fr);
    gap: 10px;
    width: 100%;
}

.menu-filter-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-control {
    position: relative;
    display: flex;
    align-items: center;
}

.search-control img {
    position: absolute;
    z-index: 1;
    left: 11px;
    width: 18px;
    height: 18px;
    opacity: 0.65;
    pointer-events: none;
}

.search-control input {
    width: 100%;
    min-width: 0;
    padding-left: 42px !important;
}

@media (max-width: 1050px) {
    .menu-toolbar {
        flex-wrap: wrap;
    }

    .menu-search-form {
        flex-basis: 100%;
    }
}

@media (max-width: 720px) {
    .menu-filter-fields {
        grid-template-columns: 1fr;
    }
}

.empty-category-message {
    grid-column: 1 / -1;
    margin: 8px 0;
    padding: 20px;
    background: var(--surface-soft);
    border: 1px dashed var(--border);
    border-radius: 12px;
    text-align: center;
    opacity: 0.72;
}

.app-notifications {
    position: fixed;
    z-index: 3000;
    top: 20px;
    right: 20px;
    display: grid;
    gap: 12px;
    width: min(440px, calc(100vw - 40px));
}

.app-notification {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    padding: 16px 18px;
    color: white;
    background: #2563eb;
    border: 1px solid rgb(255 255 255 / 24%);
    border-radius: 14px;
    box-shadow: 0 16px 42px rgb(0 0 0 / 34%);
    animation: notification-enter 180ms ease-out;
}

.app-notification.notification-error {
    background: linear-gradient(135deg, #dc3545, #a91524);
    border-color: rgb(255 255 255 / 20%);
    box-shadow: 0 18px 46px rgb(120 10 25 / 32%), 0 2px 8px rgb(0 0 0 / 16%);
}

.notification-order-created {
    position: relative;
    align-items: center;
    overflow: hidden;
    color: var(--text);
    background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 12%, var(--surface)), var(--surface));
    border-color: color-mix(in srgb, var(--accent) 38%, var(--border));
    box-shadow: 0 20px 50px color-mix(in srgb, var(--accent) 20%, transparent), 0 5px 16px var(--shadow);
    text-decoration: none;
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.notification-order-created:hover,
.notification-order-created:focus-visible {
    border-color: var(--accent);
    box-shadow: 0 24px 58px color-mix(in srgb, var(--accent) 28%, transparent), 0 6px 18px var(--shadow);
    outline: 0;
    transform: translateY(-2px);
}

.order-created-toast-icon {
    display: grid;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    place-items: center;
    color: white;
    background: linear-gradient(145deg, var(--accent), var(--accent-hover));
    border-radius: 13px;
    box-shadow: 0 8px 18px color-mix(in srgb, var(--accent) 28%, transparent);
    font-size: 1.1rem;
    font-weight: 900;
}

.notification-order-created .notification-content {
    flex: 1;
}

.notification-order-created .notification-content strong {
    margin-bottom: 3px;
}

.notification-order-created .notification-content > span {
    font-size: 0.82rem;
    opacity: 0.68;
}

.order-created-toast-arrow {
    color: var(--accent);
    font-size: 1.3rem;
    transition: transform 180ms ease;
}

.notification-order-created:hover .order-created-toast-arrow {
    transform: translateX(4px);
}

.order-created-toast-progress {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 45%, white));
    transform-origin: left;
    animation: order-created-toast-progress 4s linear forwards;
}

.notification-order-created.is-paused .order-created-toast-progress {
    animation-play-state: paused;
}

.notification-order-created.is-leaving {
    pointer-events: none;
    animation: notification-leave 360ms cubic-bezier(.4, 0, 1, 1) forwards;
}

.notification-content {
    min-width: 0;
}

.notification-content > strong {
    display: block;
    margin-bottom: 5px;
    font-size: 1rem;
}

.notification-message {
    max-height: min(45vh, 360px);
    margin: 0;
    overflow: auto;
    color: white;
    line-height: 1.5;
    overflow-wrap: anywhere;
    user-select: text;
}

.notification-message p {
    margin: 3px 0;
}

.notification-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
}

.notification-actions button {
    min-height: 32px;
    padding: 6px 9px;
    color: white;
    background: rgb(255 255 255 / 14%);
    border: 1px solid rgb(255 255 255 / 24%);
    border-radius: 8px;
    font-size: 0.78rem;
}

.notification-actions button:hover {
    background: rgb(255 255 255 / 26%);
}

.notification-actions [data-close-notification] {
    width: 32px;
    padding: 4px;
    font-size: 1.25rem;
}

body.feedback-frame-error::after,
body.feedback-frame-success::after {
    content: "";
    position: fixed;
    z-index: 2990;
    inset: 0;
    border: 3px solid #f04452;
    background: radial-gradient(circle at 100% 0%, rgb(240 68 82 / 12%), transparent 32%);
    box-shadow: inset 0 0 0 1px rgb(255 255 255 / 12%), inset 0 0 48px rgb(240 68 82 / 18%);
    pointer-events: none;
    animation: feedback-frame-in 220ms cubic-bezier(.2, .8, .2, 1);
}

body.feedback-frame-success::after {
    border-color: #24b875;
    background: radial-gradient(circle at 100% 0%, rgb(36 184 117 / 12%), transparent 32%);
    box-shadow: inset 0 0 0 1px rgb(255 255 255 / 12%), inset 0 0 48px rgb(36 184 117 / 18%);
}

@keyframes feedback-frame-in {
    from {
        opacity: 0;
        transform: scale(1.004);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.error-page {
    display: grid;
    min-height: 100vh;
    padding: 24px;
    color: var(--text);
    background: radial-gradient(circle at top, var(--accent-soft), var(--background) 48%);
    place-items: center;
}

.error-card {
    width: min(100%, 560px);
    padding: 42px;
    overflow: hidden;
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: 0 24px 70px var(--shadow);
    text-align: center;
}

.error-logo {
    width: 128px;
    max-width: 45%;
    margin-bottom: 20px;
}

.error-code {
    margin: 0;
    color: var(--accent);
    font-size: clamp(4rem, 15vw, 7rem);
    font-weight: 900;
    letter-spacing: -0.07em;
    line-height: 0.9;
}

.error-card h1 {
    margin: 18px 0 8px;
}

.error-card > p:last-of-type {
    margin: 0 auto;
    max-width: 430px;
    opacity: 0.7;
}

.error-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 28px;
}

@media (max-width: 560px) {
    .error-card {
        padding: 30px 20px;
        border-radius: 18px;
    }

    .error-actions {
        flex-direction: column;
    }

    .error-actions > * {
        width: 100%;
    }

    .customization-dialog-footer,
    .customization-group-card > header {
        align-items: stretch;
        flex-direction: column;
    }

    .order-customization-group {
        grid-template-columns: 1fr;
    }

    .customization-choice,
    .order-customization-group legend,
    .order-customization-group > small {
        grid-column: 1;
    }
}

@keyframes notification-enter {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes notification-leave {
    from { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
    to { opacity: 0; transform: translateY(-10px) scale(0.98); filter: blur(3px); }
}

@keyframes order-created-toast-progress {
    from { transform: scaleX(1); }
    to { transform: scaleX(0); }
}

.menu-product-table {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 6px 18px var(--shadow);
}

.menu-product-table tbody tr:hover {
    background: var(--surface-soft);
}

.product-identity {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 260px;
}

.product-identity img {
    width: 50px;
    height: 50px;
    flex: 0 0 50px;
    object-fit: cover;
    border-radius: 50%;
}

.product-identity span {
    display: grid;
    gap: 4px;
}

.product-identity small {
    opacity: 0.72;
}

.category-inline-icon,
.category-simple-icon {
    display: inline-grid;
    place-items: center;
    background: var(--accent-soft);
    border-radius: 50%;
}

.category-inline-icon {
    width: 26px;
    height: 26px;
    margin-right: 5px;
}

.availability-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    color: var(--text);
    background: transparent;
    font-weight: 700;
}

.availability-toggle:hover {
    background: var(--surface-soft);
}

.availability-toggle.is-available {
    color: #16803d;
}

.availability-toggle.is-unavailable {
    opacity: 0.65;
}

.availability-switch {
    display: flex;
    align-items: center;
    width: 30px;
    height: 17px;
    padding: 2px;
    background: var(--input-border);
    border-radius: 999px;
}

.availability-switch span {
    width: 13px;
    height: 13px;
    background: white;
    border-radius: 50%;
    transition: transform 150ms ease;
}

.is-available .availability-switch {
    background: #16803d;
}

.is-available .availability-switch span {
    transform: translateX(13px);
}

.table-actions,
.category-card-actions,
.form-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.small-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 35px;
    padding: 7px 10px;
    color: var(--text);
    background: var(--surface-soft);
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
}

.small-action img {
    width: 16px;
    height: 16px;
}

.small-action.destructive {
    color: #d32f2f;
    background: rgb(198 40 40 / 12%);
}

.small-action.icon-only {
    width: 35px;
    padding: 7px;
}

.category-management-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 18px;
}

.category-management-card,
.new-category-card {
    min-height: 210px;
    padding: 22px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 15px;
    box-shadow: 0 5px 16px var(--shadow);
}

.category-simple-icon {
    width: 58px;
    height: 58px;
    font-size: 1.65rem;
}

.category-management-card h2 {
    margin-bottom: 4px;
}

.category-card-actions {
    margin-top: 20px;
}

.category-card-actions .small-action:first-child {
    flex: 1;
}

.new-category-card {
    display: grid;
    place-content: center;
    gap: 8px;
    color: var(--text);
    border: 2px dashed var(--input-border);
    text-align: center;
    text-decoration: none;
}

.new-category-card strong {
    font-size: 2rem;
}

.new-category-card:hover {
    border-color: var(--accent);
}

.customize-product-button {
    width: 100%;
    margin-top: 10px;
    padding: 9px 12px;
    color: var(--accent);
    background: var(--accent-soft);
    border: 1px solid transparent;
    border-radius: 10px;
    font-weight: 800;
}

.customize-product-button:hover {
    color: white;
    background: var(--accent);
}

.customization-dialog {
    width: min(680px, calc(100vw - 32px));
    max-height: min(820px, calc(100vh - 32px));
    padding: 0;
    overflow: hidden;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 22px;
    box-shadow: 0 28px 90px rgb(0 0 0 / 42%);
}

.customization-dialog::backdrop {
    background: rgb(12 10 9 / 66%);
    backdrop-filter: blur(5px);
}

.customization-dialog-header,
.customization-dialog-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px;
}

.customization-dialog-header {
    border-bottom: 1px solid var(--border);
}

.customization-dialog-header h2,
.customization-dialog-header p {
    margin: 0;
}

.dialog-close {
    width: 38px;
    height: 38px;
    padding: 0;
    color: var(--text);
    background: var(--surface-soft);
    border-radius: 50%;
    font-size: 1.35rem;
}

.order-customization-groups {
    display: grid;
    gap: 14px;
    max-height: 55vh;
    padding: 20px 24px;
    overflow-y: auto;
}

.order-customization-group {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    margin: 0;
    padding: 15px;
    border: 1px solid var(--border);
    border-radius: 15px;
}

.order-customization-group.has-error {
    border-color: #e23f4c;
    box-shadow: 0 0 0 3px rgb(226 63 76 / 14%);
}

.order-customization-group legend,
.order-customization-group > small {
    grid-column: 1 / -1;
}

.order-customization-group legend {
    padding: 0 5px;
    font-weight: 900;
}

.order-customization-group > small {
    margin-bottom: 4px;
    opacity: 0.6;
}

.customization-choice {
    position: relative;
    cursor: pointer;
}

.customization-choice input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.customization-choice > span {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    min-height: 52px;
    padding: 11px 13px;
    background: var(--surface-soft);
    border: 2px solid transparent;
    border-radius: 12px;
}

.customization-choice input:checked + span {
    background: var(--accent-soft);
    border-color: var(--accent);
}

.customization-choice small {
    opacity: 0.7;
}

.customization-dialog-footer {
    border-top: 1px solid var(--border);
    background: var(--surface-soft);
}

.dialog-quantity,
.dialog-price {
    display: grid;
    gap: 5px;
}

.dialog-quantity > span,
.dialog-price > span {
    font-size: 0.72rem;
    opacity: 0.65;
}

.dialog-price strong {
    font-size: 1.35rem;
}

.customized-warning {
    display: inline-flex;
    margin-left: 5px;
    padding: 3px 7px;
    color: #9b4b00;
    background: #fff0cc;
    border-radius: 999px;
    font-size: 0.66rem;
    font-weight: 900;
    vertical-align: middle;
}

:root[data-theme="dark"] .customized-warning {
    color: #ffd28a;
    background: rgb(217 119 6 / 22%);
}

.customized-order-item {
    border-left: 3px solid transparent;
    padding-left: 10px;
}

.customized-order-item.is-customized {
    border-left-color: #e28a22;
    background: rgb(226 138 34 / 8%);
}

.item-configuration {
    display: block;
    line-height: 1.35;
    opacity: 0.72;
}

.customization-heading > div > p:last-child {
    margin-bottom: 0;
    opacity: 0.68;
}

.customization-heading-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.customization-guide {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 26px;
    padding: 17px 19px;
    background: color-mix(in srgb, var(--accent) 8%, var(--surface));
    border: 1px solid var(--border);
    border-radius: 18px;
}

.customization-guide-icon {
    display: grid;
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    place-items: center;
    color: white;
    background: var(--accent);
    border-radius: 10px;
    font-weight: 900;
}

.customization-guide strong,
.customization-guide p {
    display: block;
    margin: 0;
}

.customization-guide p {
    margin-top: 4px;
    max-width: 900px;
    font-size: 0.84rem;
    line-height: 1.55;
    opacity: 0.72;
}

.customization-groups {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
    gap: 22px;
}

.customization-group-card,
.empty-customization {
    padding: 22px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 22px;
    box-shadow: 0 12px 30px var(--shadow);
}

.customization-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.customization-group-title,
.customization-group-actions,
.customization-option-actions {
    display: flex;
    align-items: center;
    gap: 9px;
}

.customization-group-order {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    color: var(--accent);
    background: var(--accent-soft);
    border-radius: 12px;
    font-size: 0.76rem;
    font-weight: 900;
}

.customization-group-card h2,
.customization-group-card header p {
    margin: 0;
}

.customization-group-card header p {
    margin-top: 4px;
    font-size: 0.8rem;
    opacity: 0.64;
}

.customization-options-list {
    display: grid;
    gap: 9px;
}

.customization-option-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 12px;
    min-height: 66px;
    padding: 12px 14px;
    background: var(--surface-soft);
    border: 1px solid transparent;
    border-radius: 15px;
    transition: transform 160ms ease, border-color 160ms ease;
}

.customization-option-row:hover {
    border-color: var(--border);
    transform: translateY(-1px);
}

.customization-option-row.is-default {
    border-color: var(--accent);
    box-shadow: inset 3px 0 var(--accent);
}

.customization-option-data {
    display: grid;
    gap: 3px;
}

.customization-option-row span {
    font-size: 0.76rem;
    opacity: 0.7;
}

.default-badge {
    padding: 5px 8px;
    color: var(--accent);
    background: var(--accent-soft);
    border-radius: 999px;
    font-weight: 800;
    opacity: 1 !important;
}

.unavailable-badge {
    padding: 5px 8px;
    color: var(--text);
    background: var(--surface);
    border-radius: 999px;
    opacity: 0.58 !important;
}

.icon-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 38px;
    min-height: 38px;
    padding: 8px 11px;
    color: var(--text);
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: 11px;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.icon-action:hover {
    color: var(--accent);
    border-color: var(--accent);
}

.icon-action.destructive {
    color: #d83946;
    background: color-mix(in srgb, #d83946 8%, var(--surface));
    border-color: transparent;
}

.customization-group-actions form,
.customization-option-actions form {
    margin: 0;
}

.add-option-link {
    display: block;
    margin-top: 14px;
    padding: 11px;
    color: var(--accent);
    border: 1px dashed var(--accent);
    border-radius: 13px;
    font-weight: 800;
    text-align: center;
    text-decoration: none;
}

.configuration-warning {
    margin: 0 0 14px;
    padding: 10px 12px;
    color: #9b4b00;
    background: #fff0cc;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 700;
}

.configuration-warning span {
    display: inline-grid;
    width: 20px;
    height: 20px;
    margin-right: 5px;
    place-items: center;
    color: white;
    background: #c36a00;
    border-radius: 50%;
}

.empty-customization {
    min-height: 180px;
    display: grid;
    place-content: center;
    text-align: center;
}

.empty-customization-icon {
    display: grid;
    width: 46px;
    height: 46px;
    margin: 0 auto 12px;
    place-items: center;
    color: var(--accent);
    background: var(--accent-soft);
    border-radius: 14px;
    font-size: 1.5rem;
}

.form-page {
    width: min(100%, 820px);
    margin: 0 auto;
}

.form-card {
    padding: 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 8px 24px var(--shadow);
}

.customization-form-page {
    width: min(100%, 920px);
}

.customization-form-card {
    padding: clamp(24px, 4vw, 38px);
    border-radius: 24px;
    box-shadow: 0 18px 50px var(--shadow);
}

.customization-form-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.customization-form-header h1,
.customization-form-header p {
    margin: 0;
}

.customization-form-header .eyebrow {
    margin-bottom: 5px;
}

.customization-form-header > div > p:last-child {
    margin-top: 7px;
    opacity: 0.62;
}

.customization-form-icon {
    display: grid;
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    place-items: center;
    color: white;
    background: linear-gradient(145deg, var(--accent), #75ad91);
    border-radius: 15px;
    box-shadow: 0 9px 20px color-mix(in srgb, var(--accent) 30%, transparent);
}

.customization-fields-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.customization-fields-grid .form-field-wide,
.customization-fields-grid .switch-field {
    grid-column: 1 / -1;
}

.modern-input-shell {
    overflow: hidden;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: 14px;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.modern-input-shell:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent);
}

.modern-input-shell.has-app-select {
    overflow: visible;
}

.app-select {
    position: relative;
    width: 100%;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 13px;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.app-select:hover {
    border-color: color-mix(in srgb, var(--accent) 65%, var(--border));
}

.app-select:focus-within,
.app-select.is-open {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-soft);
}

.modern-input-shell .app-select {
    background: transparent;
    border: 0;
    border-radius: inherit;
    box-shadow: none;
}

.login-control .app-select {
    background: transparent;
    border: 0;
    border-radius: 0 15px 15px 0;
    box-shadow: none;
}

.login-control .app-select-options {
    top: calc(100% + 9px);
    right: 0;
    left: -42px;
    width: calc(100% + 42px);
    max-height: 250px;
    border-radius: 16px;
    box-shadow: 0 20px 48px rgb(0 0 0 / 28%);
}

.login-control .app-select-option {
    min-height: 46px;
    border-radius: 11px;
}

.native-enhanced-select {
    display: none !important;
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    opacity: 0;
    pointer-events: none;
}

.app-select-trigger {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 52px;
    padding: 0 14px 0 16px;
    color: var(--text);
    background: transparent;
    border: 0;
    border-radius: 14px;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.app-select-marker {
    width: 11px;
    height: 11px;
    margin: -5px 4px 0 0;
    border-right: 2px solid var(--accent);
    border-bottom: 2px solid var(--accent);
    transition: transform 160ms ease;
    transform: rotate(45deg);
}

.app-select.is-open .app-select-marker {
    margin-top: 5px;
    transform: rotate(225deg);
}

.app-select-options {
    position: absolute;
    z-index: 1500;
    top: calc(100% + 8px);
    right: 0;
    left: 0;
    display: grid;
    max-height: 310px;
    overflow-y: auto;
    padding: 7px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 15px;
    box-shadow: 0 18px 45px rgb(0 0 0 / 28%);
}

.app-number-control {
    display: grid;
    grid-template-columns: 42px minmax(52px, 1fr) 42px;
    align-items: stretch;
    overflow: hidden;
    width: 100%;
    min-height: 46px;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 13px;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.app-number-control:hover {
    border-color: color-mix(in srgb, var(--accent) 65%, var(--border));
}

.app-number-control:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-soft);
}

.app-number-control input[type="number"] {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 8px 6px;
    color: var(--text);
    background: transparent;
    border: 0 !important;
    border-radius: 0;
    outline: 0;
    box-shadow: none !important;
    text-align: center;
    appearance: textfield;
    -moz-appearance: textfield;
}

.app-number-control input[type="number"]::-webkit-inner-spin-button,
.app-number-control input[type="number"]::-webkit-outer-spin-button {
    margin: 0;
    appearance: none;
    -webkit-appearance: none;
}

.app-number-step {
    display: grid;
    min-width: 42px;
    min-height: 44px;
    padding: 0;
    place-items: center;
    color: var(--accent);
    background: color-mix(in srgb, var(--accent) 8%, var(--surface));
    border: 0;
    border-radius: 0;
    font-size: 1.3rem;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
}

.app-select-trigger:hover,
.app-select-trigger:focus-visible {
    color: var(--text);
    background: transparent;
    outline: 0;
}

.app-number-step-down {
    border-right: 1px solid var(--border);
}

.app-number-step-up {
    border-left: 1px solid var(--border);
}

.app-number-step:hover {
    color: white;
    background: var(--accent);
}

.modern-input-shell .app-number-control {
    background: transparent;
    border: 0;
    border-radius: inherit;
    box-shadow: none;
}

.app-select-options[hidden] {
    display: none;
}

.app-select-option {
    position: relative;
    width: 100%;
    min-height: 43px;
    padding: 9px 42px 9px 12px;
    color: var(--text);
    background: transparent;
    border: 0;
    border-radius: 10px;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.app-select-option:hover,
.app-select-option:focus-visible {
    color: var(--text);
    background: var(--surface-soft);
    outline: 0;
}

.app-select-option.is-selected {
    color: var(--accent);
    background: var(--accent-soft);
    font-weight: 800;
}

.app-select-option.is-selected::after {
    position: absolute;
    top: 50%;
    right: 14px;
    width: 18px;
    height: 18px;
    color: white;
    background: var(--accent);
    border-radius: 50%;
    font-size: 0.7rem;
    line-height: 18px;
    text-align: center;
    transform: translateY(-50%);
    content: "✓";
}

.modern-input-shell input,
.modern-input-shell select {
    width: 100%;
    min-height: 50px;
    padding: 0 15px;
    color: var(--text);
    background: transparent;
    border: 0;
    border-radius: 0;
    outline: 0;
    box-shadow: none;
}

.customization-form-card select {
    color: #30251f;
    background-color: #ffffff;
    color-scheme: light;
}

.customization-form-card select option {
    color: #30251f;
    background: #ffffff;
}

:root[data-theme="dark"] .customization-form-card select {
    color: #f5eee8;
    background-color: #302a26;
    color-scheme: dark;
}

:root[data-theme="dark"] .customization-form-card select option {
    color: #f5eee8;
    background: #302a26;
}

.switch-field {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 16px 18px;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: 15px;
}

.switch-field small {
    display: block;
    margin-top: 3px;
    opacity: 0.62;
}

.modern-switch {
    position: relative;
    flex: 0 0 48px;
    width: 48px;
    height: 28px;
    cursor: pointer;
}

.modern-switch input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.modern-switch span {
    position: absolute;
    inset: 0;
    background: color-mix(in srgb, var(--text) 18%, var(--surface));
    border-radius: 999px;
    transition: background 160ms ease;
}

.modern-switch span::after {
    position: absolute;
    top: 4px;
    left: 4px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 2px 7px rgb(0 0 0 / 20%);
    transition: transform 160ms ease;
    content: "";
}

.modern-switch input:checked + span {
    background: var(--accent);
}

.modern-switch input:checked + span::after {
    transform: translateX(20px);
}

.modern-switch input:focus-visible + span {
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent);
}

.customization-form-actions {
    justify-content: flex-end;
    margin-top: 10px;
    padding-top: 22px;
    border-top: 1px solid var(--border);
}

.primary-save-button {
    min-height: 46px;
    padding-inline: 22px;
}

.business-settings-layout {
    display: grid;
    grid-template-columns: minmax(260px, 0.8fr) minmax(360px, 1.2fr);
    gap: 26px;
    align-items: start;
    width: min(100%, 1000px);
    margin: 34px auto 0;
}

.business-settings-intro,
.business-settings-card {
    padding: 28px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 22px;
    box-shadow: 0 14px 38px var(--shadow);
}

.business-settings-intro > span {
    display: grid;
    width: 52px;
    height: 52px;
    margin-bottom: 20px;
    place-items: center;
    color: white;
    background: linear-gradient(145deg, var(--accent), #72ae8d);
    border-radius: 16px;
    font-size: 1.5rem;
}

.business-settings-intro h2,
.business-settings-intro p {
    margin-top: 0;
}

.business-settings-intro > p:last-child {
    line-height: 1.6;
    opacity: 0.68;
}

.business-settings-card {
    display: grid;
    gap: 22px;
}

.currency-setting-input {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    overflow: hidden;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: 14px;
}

.currency-setting-input:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 15%, transparent);
}

.currency-setting-input span {
    padding-left: 16px;
    color: var(--accent);
    font-size: 1.2rem;
    font-weight: 900;
}

.currency-setting-input input {
    min-height: 54px;
    color: var(--text);
    background: transparent;
    border: 0;
    outline: 0;
}

.packaging-settings-page {
    display: grid;
    gap: 22px;
}

.packaging-settings-heading,
.packaging-auto-setting {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.packaging-settings-heading h2,
.packaging-settings-heading p {
    margin: 0;
}

.packaging-settings-heading > div > p:last-child {
    margin-top: 6px;
    opacity: 0.65;
}

.packaging-auto-setting {
    padding: 18px 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
}

.packaging-auto-setting > div {
    display: grid;
    flex: 1;
    gap: 3px;
}

.packaging-auto-setting small {
    opacity: 0.62;
}

.packaging-type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
}

.packaging-type-card {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 15px;
    padding: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: 0 10px 28px var(--shadow);
}

.packaging-type-card.is-inactive {
    opacity: 0.62;
}

.packaging-type-icon {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    color: var(--accent);
    background: var(--accent-soft);
    border-radius: 14px;
    font-size: 1.25rem;
}

.packaging-type-data {
    display: grid;
    gap: 5px;
}

.packaging-type-data h3,
.packaging-type-data strong {
    margin: 0;
}

.packaging-type-data strong {
    color: var(--accent);
    font-size: 1.15rem;
}

.packaging-type-data strong small,
.packaging-type-data > span {
    color: var(--text);
    font-size: 0.72rem;
    opacity: 0.62;
}

.packaging-type-actions {
    display: flex;
    grid-column: 1 / -1;
    gap: 8px;
    padding-top: 13px;
    border-top: 1px solid var(--border);
}

.packaging-type-actions form {
    margin: 0;
}

.packaging-editor {
    display: grid;
    gap: 10px;
    margin: 12px 0;
    padding: 14px;
    background: color-mix(in srgb, var(--accent) 8%, var(--surface-soft));
    border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--border));
    border-radius: 16px;
}

.packaging-editor[hidden] {
    display: none;
}

.packaging-editor > header {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.packaging-editor > header div {
    display: grid;
    gap: 3px;
}

.packaging-editor > header small {
    font-size: 0.68rem;
    opacity: 0.62;
}

.packaging-editor-items {
    display: grid;
    gap: 7px;
}

.packaging-editor-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 108px 72px;
    align-items: center;
    gap: 9px;
    padding: 9px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    opacity: 0.62;
}

.packaging-editor-row .summary-quantity-control {
    display: grid;
    grid-template-columns: 38px 20px 38px;
    gap: 6px;
    justify-content: center;
}

.packaging-editor-row .summary-quantity-control button {
    display: grid;
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
    padding: 0;
    place-items: center;
    line-height: 1;
    border-radius: 50%;
}

.packaging-editor-row .summary-quantity-control span {
    display: grid;
    min-width: 20px;
    place-items: center;
    line-height: 1;
}

.packaging-editor-row > strong:last-child {
    min-width: 72px;
    text-align: right;
}

.packaging-editor-row.has-quantity {
    border-color: var(--accent);
    opacity: 1;
}

.packaging-editor-row > div:first-child {
    display: grid;
}

.packaging-editor-row small {
    font-size: 0.66rem;
    opacity: 0.65;
}

.modern-input-shell input,
.modern-input-shell select {
    border: 0 !important;
    box-shadow: none !important;
}

.modern-form,
.form-grid {
    display: grid;
    gap: 16px;
}

.form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-field {
    display: grid;
    gap: 7px;
}

.form-field label {
    font-weight: 700;
}

.customer-lookup-status {
    min-height: 18px;
    font-size: 0.76rem;
    font-weight: 700;
}

.customer-lookup-status.is-found {
    color: #168253;
}

.customer-lookup-status.is-new {
    color: var(--text);
    opacity: 0.58;
}

.customer-lookup-status.is-error {
    color: #d83946;
}

.form-field input:not([type="checkbox"]),
.form-field select,
.form-field textarea {
    width: 100%;
}

.form-field-full {
    grid-column: 1 / -1;
}

.profile-edit-intro {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.profile-edit-intro img {
    width: 92px;
    height: 92px;
    object-fit: cover;
    border-radius: 50%;
}

.profile-edit-intro h2,
.profile-edit-intro p {
    margin: 3px 0;
}

.edit-order-heading {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 20px;
    width: min(100%, 1180px);
    margin: 0 auto 24px;
}

.edit-order-heading h1,
.edit-order-heading p {
    margin-bottom: 0;
}

.back-link {
    display: inline-block;
    margin-bottom: 18px;
    color: var(--text);
    text-decoration: none;
    opacity: 0.72;
}

.back-link:hover {
    color: var(--accent);
    opacity: 1;
}

.edit-section-tabs {
    display: flex;
    gap: 5px;
    padding: 5px;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: 14px;
}

.edit-section-tabs a {
    padding: 10px 18px;
    color: var(--text);
    border-radius: 10px;
    font-weight: 700;
    text-decoration: none;
}

.edit-section-tabs a.is-selected {
    color: white;
    background: var(--accent);
    box-shadow: 0 5px 14px var(--shadow);
}

.information-edit-form {
    width: min(100%, 980px);
    margin: 0 auto;
}

.complete-order-edit-form {
    width: min(100%, 1380px);
    margin: 0 auto;
}

.complete-order-edit-form > .edit-information-card {
    width: min(100%, 1080px);
    margin: 0 auto 28px;
}

.edit-information-card {
    padding: 30px;
}

.section-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 22px;
}

.section-title-row h2,
.section-title-row p {
    margin: 0;
}

.form-hint {
    padding: 7px 11px;
    background: var(--surface-soft);
    border-radius: 999px;
    font-size: 0.78rem;
    opacity: 0.75;
}

.edit-primary-grid {
    padding-bottom: 22px;
    border-bottom: 1px solid var(--border);
}

.order-type-edit-field {
    margin: 24px 0;
}

.order-type-edit-field > label {
    margin-bottom: 7px;
}

.order-type-edit-field .order-type-selector {
    width: fit-content;
}

.edit-customer-grid {
    padding-top: 22px;
    border-top: 1px solid var(--border);
}

.delivery-edit-fields {
    display: grid;
    grid-template-columns: 2fr 0.7fr 0.7fr;
    gap: 16px;
    grid-column: 1 / -1;
}

.delivery-edit-fields .neighborhood-field {
    grid-column: 1 / -1;
}

.edit-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.edit-form-actions button,
.edit-form-actions .secondary-button {
    min-width: 170px;
    padding: 12px 18px;
    text-align: center;
}

.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 16px;
    color: var(--text);
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: 11px;
    font-weight: 700;
    text-decoration: none;
}

.secondary-button:hover {
    border-color: var(--accent);
    background: var(--accent-soft);
}

.edit-products-workspace {
    width: min(100%, 1380px);
    margin: 0 auto;
}

.selected-products-section,
.available-products-section {
    margin-bottom: 28px;
    padding: 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 17px;
    box-shadow: 0 7px 22px var(--shadow);
}

.editable-order-product .product-card-footer {
    gap: 8px;
}

.remove-order-product {
    padding: 8px 10px;
    color: #c62828;
    background: rgb(198 40 40 / 12%);
    border-radius: 9px;
    font-weight: 700;
}

.remove-order-product:hover {
    color: white;
    background: #c62828;
}

.panel-cancel-button {
    width: 100%;
    margin-top: 10px;
}

@media (max-width: 1200px) {
    .order-workspace {
        grid-template-columns: 1fr;
    }

    .current-order-panel {
        position: static;
        min-height: auto;
        max-height: none;
    }

    .current-order-items {
        max-height: 360px;
    }

    .order-detail-layout {
        grid-template-columns: 1fr;
    }

    .order-products-card {
        position: static;
    }

    .delivery-edit-fields {
        grid-template-columns: 1fr 1fr;
    }

    .delivery-edit-fields .street-field,
    .delivery-edit-fields .neighborhood-field {
        grid-column: 1 / -1;
    }
}

@media (max-width: 800px) {
    .business-settings-layout {
        grid-template-columns: 1fr;
    }

    .order-detail-modal {
        width: calc(100vw - 20px);
        max-height: calc(100vh - 20px);
        border-radius: 18px;
    }

    .order-detail-modal-shell {
        max-height: calc(100vh - 22px);
    }

    .order-detail-modal-header,
    .order-detail-modal-body {
        padding: 16px;
    }

    .customization-heading,
    .customization-group-header {
        align-items: stretch;
        flex-direction: column;
    }

    .customization-new-group {
        width: 100%;
        text-align: center;
    }

    .customization-heading-actions {
        width: 100%;
    }

    .customization-heading-actions a {
        flex: 1;
    }

    .customization-group-actions {
        justify-content: flex-end;
    }

    .customization-option-row {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .customization-option-actions {
        grid-column: 1 / -1;
        justify-content: flex-end;
        padding-top: 8px;
        border-top: 1px solid var(--border);
    }

    .customization-fields-grid {
        grid-template-columns: 1fr;
    }

    .customization-fields-grid .form-field-wide,
    .customization-fields-grid .switch-field {
        grid-column: 1;
    }

    .app-layout {
        grid-template-columns: 1fr;
    }

    .customization-dialog-footer,
    .customization-group-card > header {
        align-items: stretch;
        flex-direction: column;
    }

    .order-customization-group {
        grid-template-columns: 1fr;
    }

    .customization-choice,
    .order-customization-group legend,
    .order-customization-group > small {
        grid-column: 1;
    }

    .sidebar {
        padding: 12px;
    }

    .brand img {
        width: 100px;
        margin-bottom: 12px;
    }

    .sidebar nav {
        display: flex;
        overflow-x: auto;
    }

    .sidebar nav a {
        flex: 1;
        min-width: max-content;
        text-align: center;
    }

    .topbar {
        min-height: auto;
        padding: 10px 16px;
    }

    .content {
        padding: 16px;
        overflow-x: auto;
    }

    .report-cards,
    .report-grid {
        grid-template-columns: 1fr;
    }

    .order-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .order-type-selector {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
    }

    .order-type-option {
        justify-content: center;
        padding: 9px 6px;
    }

    .customer-fields-grid,
    .delivery-fields {
        grid-template-columns: 1fr;
    }

    .delivery-fields .street-field,
    .delivery-fields .exterior-number-field,
    .delivery-fields .interior-number-field,
    .delivery-fields .neighborhood-field {
        grid-column: 1;
    }

    .customer-name-field,
    .phone-field,
    .table-field,
    .street-field,
    .exterior-number-field,
    .interior-number-field,
    .neighborhood-field,
    .notes-field,
    .delivery-fields {
        grid-column: 1;
    }

    .current-order-item {
        grid-template-columns: 1fr auto;
    }

    .current-order-item > strong:last-child {
        grid-column: 2;
    }

    .menu-heading,
    .menu-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .configuration-tabs a {
        flex: 1;
        text-align: center;
    }

    .menu-search-form,
    .menu-search-form > * {
        width: 100%;
    }

    .search-control input {
        min-width: 0;
    }

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

    .form-field-full {
        grid-column: 1;
    }

    .detail-card-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .detail-data-grid {
        grid-template-columns: 1fr;
    }

    .detail-data-wide {
        grid-column: 1;
    }

    .edit-order-heading,
    .section-title-row {
        align-items: stretch;
        flex-direction: column;
    }

    .edit-section-tabs a {
        flex: 1;
        text-align: center;
    }

    .delivery-edit-fields {
        grid-template-columns: 1fr;
    }

    .delivery-edit-fields .street-field,
    .delivery-edit-fields .neighborhood-field {
        grid-column: 1;
    }

    .edit-form-actions {
        flex-direction: column-reverse;
    }

    .edit-form-actions > * {
        width: 100%;
    }

    .calculator.is-expanded {
        top: 12px !important;
        right: 12px !important;
        bottom: 12px !important;
        left: 12px !important;
    }
}
