:root {
    --bg: #f4f5f7;
    --surface: #ffffff;
    --ink: #1f2937;
    --muted: #6b7280;
    --brand: #0f766e;
    --brand-soft: #ccfbf1;
    --danger: #b91c1c;
    --radius: 16px;
    --shadow: 0 12px 30px rgba(15, 23, 42, 0.1);
    --font-main: "Segoe UI", "Avenir Next", "Nunito Sans", sans-serif;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: var(--font-main);
    color: var(--ink);
    background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
}

a {
    color: inherit;
    text-decoration: none;
}

.customer-body {
    max-width: 430px;
    min-height: 100vh;
    margin: 0 auto;
    background: radial-gradient(circle at top right, #def7f0 0%, #f8fafc 50%, #f8fafc 100%);
}

.qr-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid #e5e7eb;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.qr-header__name {
    font-weight: 800;
    font-size: 1rem;
}

.qr-header__table {
    font-size: 0.82rem;
    color: var(--muted);
}

.qr-header__cart-link {
    font-size: 0.84rem;
    color: var(--brand);
    font-weight: 700;
}

.qr-banner {
    margin: 12px 14px;
    background: #fff7ed;
    border: 1px solid #fdba74;
    color: #9a3412;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 0.9rem;
}

.qr-main {
    padding: 10px 14px 110px;
}

.qr-main--cart {
    padding-bottom: 28px;
}

.qr-main--center {
    padding-top: 25vh;
    text-align: center;
}

.qr-search-wrap {
    margin-bottom: 10px;
}

.qr-input {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    padding: 11px 12px;
    font-size: 0.95rem;
    background: var(--surface);
}

.qr-input:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.18);
}

.qr-chips {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.qr-chip {
    border: 1px solid #d1d5db;
    background: #fff;
    border-radius: 999px;
    white-space: nowrap;
    padding: 8px 12px;
    font-size: 0.8rem;
}

.qr-chip.is-active {
    border-color: var(--brand);
    background: var(--brand-soft);
    color: #0f766e;
}

.qr-category {
    margin-top: 14px;
}

.qr-category__title {
    margin: 0 0 10px;
    font-size: 1.1rem;
}

.qr-items {
    display: grid;
    gap: 10px;
}

.qr-item-card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.qr-item-card__img {
    width: 100%;
    height: 130px;
    object-fit: cover;
    display: block;
}

.qr-item-card__img--placeholder {
    background: linear-gradient(120deg, #e5e7eb, #f3f4f6);
}

.qr-item-card__body {
    padding: 12px;
}

.qr-item-card__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 800;
}

.qr-item-card__desc {
    margin: 6px 0 10px;
    color: var(--muted);
    font-size: 0.86rem;
}

.qr-item-card__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.qr-item-card__price {
    font-weight: 800;
}

.qr-btn {
    border: none;
    background: var(--brand);
    color: #fff;
    border-radius: 10px;
    padding: 10px 12px;
    font-weight: 700;
    cursor: pointer;
}

.qr-btn--sm {
    padding: 7px 10px;
    font-size: 0.78rem;
}

.qr-btn--wide {
    width: 100%;
    display: inline-block;
    text-align: center;
}

.qr-btn--muted {
    background: #e5e7eb;
    color: #374151;
}

.qr-btn[disabled], .qr-btn--muted[disabled] {
    cursor: not-allowed;
    opacity: 0.8;
}

.qr-cart-bar {
    position: fixed;
    left: 50%;
    transform: translateX(-50%) translateY(140%);
    bottom: 10px;
    width: min(410px, calc(100vw - 20px));
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    background: #0f172a;
    color: #fff;
    border-radius: 14px;
    padding: 12px 14px;
    transition: transform 0.2s ease;
    z-index: 40;
}

.qr-cart-bar.is-visible {
    transform: translateX(-50%) translateY(0);
}

.qr-cart-bar__cta {
    background: #14b8a6;
    padding: 7px 10px;
    border-radius: 8px;
    font-size: 0.82rem;
}

.qr-sheet {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 80;
}

.qr-sheet.is-open {
    display: block;
}

.qr-sheet__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.44);
}

.qr-sheet__panel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    background: #fff;
    border-radius: 20px 20px 0 0;
    padding: 16px 14px 22px;
    max-height: 84vh;
    overflow: auto;
}

.qr-sheet__close {
    position: absolute;
    right: 12px;
    top: 10px;
    border: none;
    background: #f3f4f6;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 20px;
}

.qr-sheet h3 {
    margin: 0;
}

.qr-sheet p {
    color: var(--muted);
    font-size: 0.86rem;
}

.qr-option-group {
    border-top: 1px solid #e5e7eb;
    margin-top: 10px;
    padding-top: 10px;
}

.qr-option {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-top: 6px;
}

.qr-option input {
    margin-right: 6px;
}

.qr-qty {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 12px 0;
}

.qr-step {
    width: 30px;
    height: 30px;
    border: 1px solid #d1d5db;
    background: #fff;
    border-radius: 8px;
}

.qr-toast {
    position: fixed;
    left: 50%;
    bottom: 90px;
    transform: translateX(-50%);
    background: #111827;
    color: #fff;
    padding: 9px 12px;
    border-radius: 999px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 100;
}

.qr-toast.is-visible {
    opacity: 1;
}

.qr-cart-list {
    display: grid;
    gap: 10px;
}

.qr-cart-item {
    background: #fff;
    border-radius: 12px;
    padding: 10px;
    box-shadow: var(--shadow);
}

.qr-cart-item__title {
    font-weight: 700;
}

.qr-cart-item__opts {
    margin: 6px 0;
    color: var(--muted);
    font-size: 0.84rem;
    padding-left: 16px;
}

.qr-cart-item__controls {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.qr-link-btn {
    border: none;
    background: none;
    color: var(--danger);
    font-size: 0.82rem;
    cursor: pointer;
}

.qr-cart-item__price {
    margin-top: 8px;
    font-weight: 700;
}

.qr-cart-summary, .qr-form-card {
    background: #fff;
    border-radius: 14px;
    padding: 12px;
    box-shadow: var(--shadow);
    margin-top: 12px;
}

.qr-totals-line {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
}

.qr-totals-line--grand {
    border-top: 1px solid #e5e7eb;
    padding-top: 10px;
    font-size: 1.02rem;
}

.qr-error {
    margin-top: 10px;
    color: var(--danger);
    font-weight: 600;
}

.qr-checkout-summary {
    margin-top: 0;
}

.qr-checkout-items {
    display: grid;
    gap: 8px;
}

.qr-checkout-item {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    border: 1px solid #d8e0e9;
    border-radius: 8px;
    padding: 8px;
}

.qr-checkout-item__img {
    width: 56px;
    height: 56px;
    border-radius: 6px;
    object-fit: cover;
    display: block;
}

.qr-checkout-item__img--placeholder {
    background: linear-gradient(120deg, #dbe4ed, #edf2f6);
}

.qr-checkout-item__body {
    min-width: 0;
}

.qr-checkout-item__head {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    align-items: start;
    font-size: 0.92rem;
}

.qr-checkout-item__head strong {
    line-height: 1.25;
}

.qr-checkout-item__head span {
    font-weight: 700;
    color: #334155;
    white-space: nowrap;
}

.qr-checkout-item__opts {
    margin: 4px 0 0;
    padding-left: 15px;
    color: #64748b;
    font-size: 0.8rem;
    line-height: 1.25;
}

.qr-empty {
    text-align: center;
    color: var(--muted);
    margin-top: 40px;
}

.admin-body {
    background: #f8fafc;
    min-height: 100vh;
}

.admin-body--login {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px;
}

.admin-login-card {
    width: min(460px, 100%);
    background: #fff;
    border-radius: 14px;
    padding: 18px;
    box-shadow: var(--shadow);
}

.admin-nav {
    position: sticky;
    top: 0;
    z-index: 30;
    background: #0f172a;
    color: #fff;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 12px;
    align-items: center;
}

.admin-nav a {
    font-size: 0.86rem;
    padding: 6px 8px;
    border-radius: 8px;
}

.admin-nav a:hover {
    background: #1e293b;
}

.admin-logout button {
    border: none;
    background: #334155;
    color: #fff;
    padding: 6px 10px;
    border-radius: 8px;
}

.admin-main {
    padding: 14px;
    max-width: 1100px;
    margin: 0 auto;
}

.admin-flash {
    background: #ecfeff;
    border: 1px solid #99f6e4;
    border-radius: 10px;
    padding: 8px 10px;
    margin: 10px 0;
}

.admin-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
}

.admin-kpi {
    background: #fff;
    border-radius: 12px;
    padding: 12px;
    box-shadow: var(--shadow);
}

.admin-kpi span {
    color: var(--muted);
    font-size: 0.82rem;
}

.admin-kpi strong {
    display: block;
    margin-top: 4px;
    font-size: 1.25rem;
}

.admin-card {
    background: #fff;
    border-radius: 12px;
    padding: 12px;
    box-shadow: var(--shadow);
    margin-top: 12px;
}

.admin-actions-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.admin-inline-form {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    align-items: end;
}

.admin-form-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.admin-form-grid label {
    display: grid;
    gap: 5px;
    font-size: 0.9rem;
}

.admin-settings-form {
    display: grid;
    gap: 12px;
}

.admin-settings-head {
    background: #fff;
    border: 1px solid #d8dde5;
    border-radius: 8px;
    padding: 12px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.admin-settings-head h1 {
    margin: 0;
    font-size: 1.85rem;
}

.admin-settings-head p {
    margin: 4px 0 0;
    color: #6b7280;
    font-size: 0.9rem;
}

.admin-settings-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    position: sticky;
    top: 60px;
    z-index: 15;
    background: #eceff2;
    padding: 8px 0;
}

.admin-settings-nav__btn {
    border: 1px solid #c8d0d8;
    background: #fff;
    color: #374151;
    border-radius: 6px;
    padding: 8px 11px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
}

.admin-settings-nav__btn.is-active {
    background: #0f766e;
    border-color: #0f766e;
    color: #fff;
}

.admin-settings-panels {
    display: grid;
    gap: 12px;
}

.admin-settings-section {
    background: #fff;
    border: 1px solid #d8dde5;
    border-radius: 8px;
    padding: 14px;
}

.admin-settings-section__head {
    margin-bottom: 10px;
}

.admin-settings-section__head h2 {
    margin: 0;
    font-size: 1.24rem;
}

.admin-settings-section__head p {
    margin: 4px 0 0;
    color: #6b7280;
    font-size: 0.88rem;
}

.admin-settings-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.admin-settings-field {
    display: grid;
    gap: 6px;
    font-size: 0.9rem;
}

.admin-settings-field span {
    font-weight: 600;
    color: #374151;
}

.admin-settings-field--wide {
    grid-column: 1 / -1;
}

.admin-settings-check {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    border: 1px solid #d6dde7;
    background: #f8fafc;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 0.9rem;
}

.admin-settings-check input {
    width: 16px;
    height: 16px;
    margin: 0;
}

.admin-settings-actions {
    position: sticky;
    bottom: 12px;
    z-index: 12;
    background: #fff;
    border: 1px solid #d8dde5;
    border-radius: 8px;
    padding: 10px 12px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.admin-table-wrap {
    overflow-x: auto;
}

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

.admin-table th,
.admin-table td {
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    padding: 8px;
    font-size: 0.95rem;
    vertical-align: top;
}

.admin-products-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.admin-products-head__actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.admin-products-filter {
    margin-bottom: 10px;
    max-width: 300px;
}

.admin-products-filter label {
    display: grid;
    gap: 4px;
    font-size: 0.86rem;
}

.admin-product-thumb {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    object-fit: cover;
    display: block;
    border: 1px solid #d7dee8;
}

.admin-product-thumb--placeholder {
    background: #f1f5f9;
    color: #64748b;
    font-size: 0.75rem;
    text-align: center;
    line-height: 56px;
}

.admin-subtle {
    margin-top: 2px;
    color: #64748b;
    font-size: 0.86rem;
}

.admin-modal[hidden] {
    display: none;
}

.admin-modal {
    position: fixed;
    inset: 0;
    z-index: 200;
}

.admin-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
}

.admin-modal__panel {
    position: relative;
    width: min(860px, calc(100vw - 26px));
    max-height: calc(100vh - 32px);
    overflow: auto;
    margin: 16px auto;
    background: #fff;
    border-radius: 14px;
    padding: 14px;
    box-shadow: 0 20px 44px rgba(15, 23, 42, 0.28);
}

.admin-modal__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.admin-modal__head h2 {
    margin: 0;
}

.admin-modal__close {
    border: 1px solid #d1d5db;
    background: #fff;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
}

.admin-modal-open {
    overflow: hidden;
}

.admin-inline {
    display: flex;
    gap: 6px;
    margin-bottom: 6px;
    align-items: center;
}

.admin-list {
    margin: 8px 0 0;
    padding-left: 18px;
}

.admin-main--editor {
    max-width: 1320px;
    padding-bottom: 112px;
}

.editor-head {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    margin-top: 8px;
    margin-bottom: 14px;
}

.editor-head h1 {
    margin: 4px 0;
    font-size: 1.55rem;
}

.editor-head__eyebrow {
    margin: 0;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #0f766e;
    font-weight: 800;
}

.editor-head__sub {
    margin: 0;
    color: #64748b;
    font-size: 0.9rem;
}

.editor-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 16px;
}

.editor-stack {
    display: grid;
    gap: 16px;
}

#section-options {
    order: 3;
}

#section-variants {
    order: 4;
}

#section-categories {
    order: 5;
}

#section-locations {
    order: 6;
}

.editor-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 16px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.editor-card--collapse {
    padding: 0;
    overflow: hidden;
}

.editor-card--collapse > :not(summary) {
    padding: 0 16px 16px;
}

.editor-card__summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
}

.editor-card__summary::-webkit-details-marker {
    display: none;
}

.editor-card__chevron {
    width: 10px;
    height: 10px;
    border-right: 2px solid #334155;
    border-bottom: 2px solid #334155;
    transform: rotate(45deg);
    transition: transform 0.2s ease;
    flex: 0 0 auto;
    margin-top: -4px;
}

.editor-card--collapse[open] .editor-card__chevron {
    transform: rotate(225deg);
    margin-top: 2px;
}

.editor-card__head {
    margin-bottom: 8px;
}

.editor-card__head h2,
.editor-card__head h3 {
    margin: 0;
    font-size: 1.08rem;
}

.editor-card__head p {
    margin: 6px 0 0;
    font-size: 0.86rem;
    color: #64748b;
}

.editor-card h3 {
    margin: 0 0 10px;
    font-size: 0.95rem;
}

.editor-grid {
    gap: 12px;
}

.editor-grid__full {
    grid-column: 1 / -1;
}

.editor-check {
    align-self: end;
    display: flex;
    gap: 8px;
    align-items: center;
}

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

.editor-list {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.editor-list__item {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.editor-subline {
    font-size: 0.82rem;
    color: #64748b;
    margin-top: 3px;
}

.editor-empty {
    margin: 0;
    color: #64748b;
    font-size: 0.86rem;
}

.editor-tag {
    display: inline-block;
    padding: 4px 8px;
    background: #e2e8f0;
    border-radius: 999px;
    font-size: 0.76rem;
    color: #334155;
    font-weight: 700;
}

.editor-inline {
    display: flex;
    align-items: center;
    gap: 8px;
}

.editor-inline--wrap {
    flex-wrap: wrap;
}

.editor-divider {
    border-top: 1px solid #e2e8f0;
    margin: 14px 0;
}

.editor-card--sticky {
    position: sticky;
    top: 70px;
}

.preview-card {
    border: 1px solid #dbe2ea;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}

.preview-card__img {
    width: 100%;
    height: 170px;
    object-fit: cover;
    display: block;
}

.preview-card__img--placeholder {
    background: linear-gradient(120deg, #dbeafe, #e2e8f0);
}

.preview-card__body {
    padding: 12px;
}

.preview-card__body h3 {
    margin: 0 0 4px;
    font-size: 1.04rem;
}

.preview-card__body p {
    margin: 0;
    color: #64748b;
    font-size: 0.88rem;
}

.preview-card__body ul {
    margin: 10px 0;
    padding-left: 17px;
    color: #334155;
    font-size: 0.84rem;
}

.preview-card__price {
    font-size: 1.15rem;
    font-weight: 800;
    color: #0f766e;
}

.editor-variant-block {
    margin-top: 14px;
    border: 1px solid #dbe2ea;
    border-radius: 12px;
    padding: 12px;
    background: #f8fafc;
    display: grid;
    gap: 10px;
}

.editor-variant-block__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.editor-variant-block__head h4 {
    margin: 0;
    font-size: 1rem;
}

.editor-group-block {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px;
    background: #fff;
    display: grid;
    gap: 10px;
}

.editor-group-block__head {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 8px;
}

.editor-row-form {
    display: inline-flex;
}

.editor-child-row td {
    background: #f8fafc;
    border-top: 0;
}

.editor-child-list {
    display: grid;
    gap: 8px;
}

.editor-child-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 120px auto;
    gap: 8px;
    align-items: end;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px;
    background: #fff;
}

.editor-save-dock {
    position: fixed;
    left: 210px;
    right: 0;
    bottom: 0;
    z-index: 120;
    background: rgba(236, 239, 242, 0.96);
    border-top: 1px solid #d6dde7;
    backdrop-filter: blur(4px);
}

.editor-save-dock__inner {
    max-width: 1320px;
    margin: 0 auto;
    padding: 10px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.editor-save-dock__meta strong {
    display: block;
    font-size: 0.92rem;
}

.editor-save-dock__meta span {
    color: #64748b;
    font-size: 0.8rem;
}

.editor-save-dock__actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.receipt-builder {
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    min-height: 120px;
    padding: 10px;
}

.receipt-block {
    background: #f8fafc;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    padding: 8px;
    margin-top: 8px;
    cursor: move;
}

.receipt-layout-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 12px;
}

.receipt-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 8px;
    margin-bottom: 8px;
}

.receipt-toolbar label {
    min-width: 180px;
    display: grid;
    gap: 4px;
    font-size: 0.86rem;
}

.receipt-canvas-wrap {
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background:
        linear-gradient(0deg, rgba(148, 163, 184, 0.15) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.15) 1px, transparent 1px),
        #f8fafc;
    background-size: 12px 12px, 12px 12px, auto;
    overflow: auto;
    padding: 14px;
    min-height: 420px;
}

.receipt-canvas {
    position: relative;
    min-height: 900px;
    background: #fff;
    border: 1px solid #d1d5db;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.12);
    margin: 0 auto;
}

.receipt-canvas__guide {
    position: absolute;
    inset: 0;
    pointer-events: none;
    border: 1px dashed rgba(100, 116, 139, 0.35);
}

.receipt-block-node {
    position: absolute;
    border: 1px solid #93c5fd;
    background: rgba(239, 246, 255, 0.78);
    cursor: move;
    user-select: none;
    overflow: hidden;
}

.receipt-block-node.is-selected {
    border-color: #0f766e;
    box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.24);
}

.receipt-block-node__label {
    font-size: 0.74rem;
    color: #334155;
    padding: 2px 4px;
    background: rgba(255, 255, 255, 0.75);
    border-bottom: 1px dashed rgba(148, 163, 184, 0.5);
}

.receipt-block-node__content {
    padding: 4px 6px;
    white-space: pre-wrap;
    color: #0f172a;
}

.receipt-block-node__resize {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 12px;
    height: 12px;
    cursor: se-resize;
    background: linear-gradient(135deg, transparent 0 50%, #0f766e 50% 100%);
}

.receipt-inspector {
    border: 1px solid #dbe2ea;
    border-radius: 10px;
    padding: 10px;
    background: #fff;
    height: fit-content;
}

.receipt-inspector h3 {
    margin: 0;
}

.receipt-inspector__hint {
    margin: 4px 0 10px;
    color: var(--muted);
    font-size: 0.84rem;
}

.receipt-inspector__fields {
    display: grid;
    gap: 8px;
}

.receipt-inspector__fields label {
    display: grid;
    gap: 4px;
    font-size: 0.82rem;
}

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

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

    .editor-card--sticky {
        position: static;
    }

    .editor-head {
        flex-direction: column;
    }

    .editor-save-dock {
        left: 0;
    }

    .editor-save-dock__inner {
        padding: 10px 12px;
        flex-direction: column;
        align-items: stretch;
    }

    .editor-save-dock__actions {
        width: 100%;
    }

    .editor-save-dock__actions .qr-btn {
        flex: 1;
    }

    .editor-child-item {
        grid-template-columns: 1fr;
    }
}

/* Customer menu/cart redesign */
:root {
    --qr-teal: #2ee6d6;
    --qr-deep-blue: #111827;
    --qr-gold: #ffb347;
    --qr-soft-bg: #eceef2;
    --qr-accent-red: #ff4d4d;
}

.customer-body {
    width: 100%;
    max-width: 460px;
    min-height: 100dvh;
    margin: 0 auto;
    background: #f2f3f4;
    overflow-x: hidden;
}

.qr-header--menu {
    background: rgba(11, 13, 16, 0.88);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 10px 12px;
}

.qr-header__meta--menu .qr-header__table {
    color: #f4f1ea;
    font-size: 0.72rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.qr-header--menu .qr-header__cart-link {
    color: #f4f1ea;
    font-size: 0.8rem;
    padding: 6px 10px;
    border: 1px solid rgba(46, 230, 214, 0.45);
    background: rgba(46, 230, 214, 0.12);
    border-radius: 8px;
}

.qr-hero {
    margin: 0;
    height: 132px;
    background: #141a24;
    overflow: hidden;
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.qr-hero--brand {
    background-image: linear-gradient(120deg, rgba(11, 13, 16, 0.86), rgba(11, 13, 16, 0.48)), var(--qr-hero-image);
    background-size: cover;
    background-position: center;
}

.qr-hero__overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at top right, rgba(255, 77, 77, 0.26), transparent 56%),
        radial-gradient(circle at bottom left, rgba(46, 230, 214, 0.24), transparent 52%);
}

.qr-hero__brand {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    height: 100%;
    padding: 14px;
}

.qr-hero__logo {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: rgba(11, 13, 16, 0.6);
    padding: 6px;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.qr-hero__brand-text {
    min-width: 0;
}

.qr-hero__name {
    color: #f4f1ea;
    font-family: "Press Start 2P", "Space Grotesk", sans-serif;
    font-size: 0.74rem;
    line-height: 1.25;
    text-transform: uppercase;
}

.qr-hero__tag {
    margin-top: 6px;
    color: #2ee6d6;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.qr-hero__img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.qr-hero__img--placeholder {
    background: linear-gradient(120deg, #d8dee5, #ecf0f3);
}

.qr-venue {
    background: #fff;
    margin: 0 0 8px;
    border-bottom: 1px solid #d7dde3;
    padding: 12px 14px 10px;
}

.qr-venue__title {
    margin: 0;
    font-size: 1.15rem;
    line-height: 1.1;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #111827;
    font-weight: 800;
}

.qr-venue__meta {
    margin-top: 8px;
    color: #4b5563;
    font-size: 0.83rem;
    display: flex;
    align-items: center;
    gap: 7px;
}

.qr-venue__dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #2ee6d6;
}

.qr-banner--menu {
    margin: 8px 0 0;
}

.qr-main {
    padding: 0 10px 80px;
}

.qr-menu-top {
    position: sticky;
    top: 0;
    z-index: 25;
    background: #eceef2;
    padding-top: 6px;
    padding-bottom: 6px;
}

.qr-search-wrap {
    margin: 0 0 8px;
}

.qr-input {
    border-radius: 8px;
    border-color: #cad4de;
    padding: 10px 11px;
}

.qr-chips {
    gap: 8px;
    padding-bottom: 8px;
    margin-bottom: 0;
}

.qr-menu-sections {
    display: grid;
    gap: 10px;
}

.qr-chip {
    background: #ffffff;
    border: 1px solid #c8d2de;
    color: #1f2937;
    border-radius: 5px;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 0.02em;
    font-size: 0.78rem;
    padding: 10px 12px;
}

.qr-chip.is-active {
    background: #111827;
    border-color: #111827;
    color: #fff;
}

.qr-category {
    margin-top: 10px;
}

.qr-category__title {
    text-transform: uppercase;
    letter-spacing: 0.01em;
    margin: 0 2px 7px;
}

.qr-items {
    gap: 8px;
}

.qr-item-card {
    border: 1px solid #d7dde5;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.16);
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    overflow: hidden;
}

.qr-item-card__img {
    height: 88px;
}

.qr-item-card__body {
    padding: 7px 9px 7px 10px;
    min-width: 0;
}

.qr-item-card__title {
    font-size: 0.97rem;
    color: #354d6a;
    line-height: 1.25;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.qr-item-card__desc {
    margin: 3px 0 6px;
    font-size: 0.8rem;
    line-height: 1.2;
    color: #3f5162;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.qr-item-card__row {
    align-items: center;
}

.qr-item-card__price {
    color: #b45309;
    font-size: 1.02rem;
}

.qr-btn--menu-add {
    background: var(--qr-teal);
    border-radius: 5px;
    min-width: 72px;
    text-transform: uppercase;
    font-weight: 800;
}

.qr-cart-bar {
    bottom: 0;
    width: min(460px, 100vw);
    border-radius: 0;
    background: #111827;
    padding: 9px 12px;
}

.qr-cart-bar__cta {
    background: transparent;
    padding: 0;
    font-size: 1.05rem;
    font-weight: 800;
}

.qr-sheet__panel {
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    border-radius: 0;
    max-height: none;
    padding: 0 0 96px;
}

.qr-sheet__close {
    left: 12px;
    right: auto;
    top: 12px;
    width: 34px;
    height: 34px;
    color: #2f3f4b;
    background: rgba(255, 255, 255, 0.92);
    font-size: 21px;
}

.qr-sheet__hero {
    height: clamp(180px, 34vh, 260px);
    background: #c9d3de;
}

.qr-sheet__hero img,
.qr-sheet__hero div {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.qr-sheet__body {
    margin-top: -16px;
    border-radius: 16px 16px 0 0;
    background: #fff;
    position: relative;
    z-index: 1;
    padding: 14px 0 8px;
}

.qr-sheet__head {
    padding: 0 14px 10px;
}

.qr-sheet__title {
    margin: 0;
    color: #243950;
    font-size: 2.05rem;
}

.qr-sheet__desc {
    margin: 6px 0 0;
    color: #586779;
    font-size: 0.93rem;
    line-height: 1.35;
}

.qr-option-group {
    border-top: 1px solid #d8e2ec;
    margin-top: 10px;
    padding-top: 0;
}

.qr-option-group__head {
    background: #10a8ef;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    font-size: 0.9rem;
    font-weight: 700;
}

.qr-option-group__hint {
    margin: 0;
    color: #d9f2ff;
    font-size: 0.83rem;
    font-weight: 500;
}

.qr-option {
    padding: 13px 14px;
    margin: 0;
    align-items: center;
    border-bottom: 1px solid #edf1f4;
}

.qr-option__left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.qr-option input {
    margin: 0;
    appearance: none;
    width: 24px;
    height: 24px;
    border: 1px solid #ccd8e4;
    border-radius: 6px;
    background: #fff;
}

.qr-option input:checked {
    border-color: #1499db;
    background:
        linear-gradient(45deg, transparent 45%, #1499db 45% 55%, transparent 55%),
        linear-gradient(-45deg, transparent 45%, #1499db 45% 55%, transparent 55%);
}

.qr-option__name {
    color: #324c66;
    font-size: 1.01rem;
    font-weight: 700;
}

.qr-option__price {
    color: #324c66;
    font-size: 1.03rem;
    font-weight: 800;
    margin-left: auto;
}

.qr-sheet__actions {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    width: min(460px, 100vw);
    background: #fff;
    border-top: 4px solid #0aa8e8;
    padding: 11px 12px;
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
}

@media (max-width: 420px) {
    .qr-sheet__hero {
        height: clamp(160px, 30vh, 220px);
    }
}

.qr-qty {
    margin: 0;
    gap: 8px;
    justify-content: center;
}

.qr-step {
    width: 33px;
    height: 33px;
    border-radius: 8px;
    border: 1px solid #d2d9e2;
    color: #9aa6b2;
    font-size: 1rem;
}

.qr-sheet__add {
    border-radius: 8px;
    background: var(--qr-gold);
    color: #fff;
    height: 43px;
    font-size: 1.05rem;
}

.qr-header--cart {
    justify-content: center;
    position: sticky;
    background: #f2f3f4;
    backdrop-filter: none;
    border-bottom: 1px solid #d7dde3;
    min-height: 52px;
}

.qr-header--cart .qr-header__meta {
    text-align: center;
}

.qr-header__name--center {
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-size: 1rem;
}

.qr-header__cart-link--close {
    position: absolute;
    left: 10px;
    top: 9px;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--qr-teal);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 1.4rem;
    line-height: 1;
}

.qr-main--cart {
    padding: 10px 10px 98px;
}

.qr-cart-list {
    gap: 8px;
}

.qr-cart-item {
    box-shadow: none;
    border: 1px solid #d8dde4;
    border-radius: 4px;
    padding: 8px;
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: start;
}

.qr-cart-item__img {
    width: 72px;
    height: 56px;
    border-radius: 3px;
    object-fit: cover;
    display: block;
}

.qr-cart-item__img--placeholder {
    background: linear-gradient(120deg, #dbe3ea, #eff3f6);
}

.qr-cart-item__title {
    font-size: 0.98rem;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    max-width: 100%;
}

.qr-cart-item__unit-price {
    font-size: 0.91rem;
    margin-top: 2px;
}

.qr-cart-item__opts {
    margin: 3px 0 0;
    padding-left: 0;
    list-style: none;
    line-height: 1.2;
}

.qr-cart-item__controls {
    margin-top: 0;
    gap: 5px;
    align-items: center;
}

.qr-cart-item__controls .qr-step {
    width: 24px;
    height: 24px;
    border: 1px solid #4aa99b;
    color: #fff;
    background: #4aa99b;
    border-radius: 2px;
    font-size: 0.85rem;
}

.qr-cart-item__qty {
    min-width: 16px;
    text-align: center;
    font-size: 0.85rem;
}

.qr-link-btn {
    font-size: 0.95rem;
    line-height: 1;
    margin-left: 3px;
}

.qr-cart-summary-spacer {
    height: 4px;
}

.qr-cart-checkout {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    width: min(460px, 100vw);
    background: var(--qr-deep-blue);
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px 10px;
    gap: 10px;
}

.qr-cart-checkout__meta small {
    display: block;
    opacity: 0.85;
    font-size: 0.67rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.qr-cart-checkout__meta strong {
    font-size: 1.56rem;
    line-height: 1.05;
}

.qr-cart-checkout__cta {
    font-size: 1.65rem;
    font-weight: 800;
    white-space: nowrap;
}

.qr-cart-checkout--disabled {
    opacity: 0.55;
    pointer-events: none;
}

/* Admin shell redesign */
.admin-body {
    background: #eceff2;
}

.admin-shell {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 40;
    pointer-events: none;
}

.admin-topbar {
    height: 52px;
    background: #3d3d3f;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    pointer-events: auto;
}

.admin-topbar__brand {
    font-size: 1.65rem;
    font-weight: 300;
    letter-spacing: 0.02em;
}

.admin-topbar__meta {
    font-size: 0.86rem;
    opacity: 0.86;
}

.admin-sidebar {
    width: 210px;
    height: calc(100vh - 52px);
    background: #f0ece1;
    border-right: 1px solid #d6d0c2;
    display: flex;
    flex-direction: column;
    pointer-events: auto;
}

.admin-nav {
    position: static;
    background: transparent;
    color: #2f3338;
    display: block;
    padding: 10px 8px;
}

.admin-nav a {
    display: block;
    border-radius: 0;
    padding: 8px 10px;
    color: #2e3238;
    margin-bottom: 2px;
}

.admin-nav a:hover {
    background: #e0dbcd;
}

.admin-logout {
    margin-top: auto;
    padding: 10px;
}

.admin-logout button {
    width: 100%;
    border-radius: 4px;
    background: #2f3238;
    padding: 8px 10px;
}

.admin-main {
    max-width: none;
    margin-left: 210px;
    padding: 68px 24px 24px;
    font-size: 1.03rem;
}

.admin-order-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.admin-order-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border: 1px solid #cfd5dd;
    background: #fff;
    border-radius: 2px;
    font-size: 0.85rem;
}

.admin-order-tab.is-active {
    border-color: #3f4349;
    background: #3f4349;
    color: #fff;
}

.admin-order-layout {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    border: 1px solid #ccd2da;
    background: #fff;
    min-height: 560px;
}

.admin-order-list {
    background: #d7d9dd;
    border-right: 1px solid #c3c8d0;
    overflow: auto;
}

.admin-order-list__item {
    border-bottom: 1px solid #c4c8cf;
    padding: 10px 12px;
    font-size: 0.88rem;
}

.admin-order-list__item.is-selected {
    background: #4a4b50;
    color: #fff;
}

.admin-order-list__row {
    display: flex;
    justify-content: space-between;
}

.admin-order-list__item small {
    display: block;
    margin-top: 4px;
    opacity: 0.85;
}

.admin-order-panel {
    padding: 14px 18px;
    background: #f6f7f8;
}

.admin-order-panel__top {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 10px;
}

.admin-order-panel__top h2 {
    margin: 0;
}

.admin-order-panel__top p {
    margin: 2px 0 0;
    color: #4b5563;
}

.admin-order-panel__status {
    background: #2f9f3d;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 2px;
    padding: 4px 8px;
    text-transform: uppercase;
}

.admin-order-details {
    margin-top: 14px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
}

.admin-order-details div {
    background: #fff;
    border: 1px solid #d7dce2;
    border-radius: 4px;
    padding: 8px 10px;
}

.admin-order-details span {
    display: block;
    color: #6b7280;
    font-size: 0.78rem;
}

.admin-order-details strong {
    display: block;
    margin-top: 3px;
}

.admin-order-actions {
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

@media (max-width: 1040px) {
    .admin-sidebar {
        width: 100%;
        height: auto;
        position: static;
        border-right: none;
        border-bottom: 1px solid #d6d0c2;
    }

    .admin-shell {
        position: static;
    }

    .admin-main {
        margin-left: 0;
        padding-top: 14px;
    }

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

    .editor-save-dock {
        left: 0;
    }

    .admin-settings-head {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-settings-nav {
        top: 0;
    }

    .admin-settings-actions {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (min-width: 1280px) {
    .admin-main {
        font-size: 1.08rem;
    }

    .admin-card {
        padding: 16px;
    }

    .admin-form-grid {
        gap: 12px;
    }
}
