/* Order page container */
.order-page-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

@media (max-width: 640px) {
    .order-page-container {
        padding: 0 0.75rem;
    }
}

/* Menu Layout */
.menu-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    align-items: stretch;
    gap: 1rem;
    margin-top: 0.5rem;
}

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

/* Category Tabs */
.category-tabs {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
}

.category-tab {
    flex: 1;
    text-align: center;
    padding: 0.75rem 1rem;
    font-size: 1.1rem;
    font-weight: 700;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    background: transparent;
    color: #888;
}

.category-tab.active {
    color: #B71C1C;
    border-bottom-color: #B71C1C;
}

.category-tab:hover {
    color: #8b1515;
}

/* Menu Items */
.menu-items-container {
    background: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    margin-top: 0.5rem;
    padding: 1rem;
}

.menu-items-list {
    padding: 0.5rem 0;
}

.menu-item-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.menu-item-row:last-child {
    border-bottom: none;
}

.menu-item-card {
    flex: 1;
    color: #333;
}

.menu-item-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.menu-item-name {
    font-weight: 600;
    font-size: 1.05rem;
    color: #222;
}

.menu-item-price {
    font-size: 0.9rem;
    color: #666;
}

.menu-item-description {
    width: 100%;
    color: #666;
    font-size: 0.9rem;
    margin-top: 0.25rem;
    line-height: 1.4;
}

.menu-item-size {
    font-size: 0.85rem;
    color: #888;
    font-style: italic;
}

/* Quantity Stepper */
.quantity-stepper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
}

.stepper-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    border: 1px solid #9ca3af;
    background: #fff;
    color: #374151;
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
}

.stepper-btn:hover {
    background: #fee2e2;
}

.stepper-btn.plus:hover {
    background: #dcfce7;
}

.stepper-count {
    width: 2rem;
    text-align: center;
    font-weight: 700;
    color: #1c1917;
}

.stepper-input {
    width: 3.5rem;
    text-align: center;
    font-weight: 700;
    color: #1c1917;
    border: 1px solid #9ca3af;
    border-radius: 0.375rem;
    padding: 0.75rem 0.25rem;
    font-size: 1.1rem;
    box-sizing: border-box;
}

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

.stepper-input[type=number] {
    -moz-appearance: textfield;
}

.btn-add-item {
    padding: 0.75rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    background: #16a34a;
    color: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-add-item:hover {
    background: #15803d;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
}

/* Cart */
.cart-container {
    background: #fff;
    margin-top: 0.5rem;
    padding: 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    position: sticky;
    top: 1rem;
}

.cart-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #B71C1C;
    text-align: center;
    padding-bottom: 0.5rem;
    margin-bottom: 0.75rem;
    border-bottom: 3px solid #B71C1C;
}

.cart-empty {
    text-align: center;
    padding: 1rem;
    color: #6b7280;
}

.empty-state {
    text-align: center;
    padding: 2rem 1rem;
    color: #6b7280;
    font-size: 1rem;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-name {
    font-weight: 500;
    color: #222;
    font-size: 0.9rem;
}

.cart-item-qty {
    font-size: 0.85rem;
    color: #666;
}

.cart-item-price {
    font-weight: 600;
    color: #222;
    font-size: 0.9rem;
}

.cart-subtotal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    padding: 1rem 0 0.5rem;
    border-top: 2px solid #e5e7eb;
}

.cart-total-label {
    font-size: 1.1rem;
    color: #222;
}

.cart-total-value {
    font-size: 1.1rem;
    color: #B71C1C;
    font-weight: 700;
}

.remove-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #6b7280;
    font-size: 1.2rem;
    padding: 0 0.25rem;
}

.remove-btn:hover {
    color: #dc2626;
}

/* Submit Order Button */
.btn-red {
    width: 100%;
    background: #B71C1C;
    color: #fff;
    font-weight: 700;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    margin-top: 1rem;
    transition: background 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.btn-red:hover {
    background: #8b1515;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

.btn-red:disabled {
    background: #e5e7eb;
    color: #888;
    cursor: not-allowed;
}

/* Order notes textarea */
.cart-notes {
    width: 100%;
    padding: 0.625rem 0.75rem;
    font-size: 0.875rem;
    font-family: inherit;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: #f9fafb;
    outline: none;
    resize: vertical;
    min-height: 60px;
    margin-top: 0.75rem;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.cart-notes:focus {
    border-color: #B71C1C;
    box-shadow: 0 0 0 2px rgba(183, 28, 28, 0.15);
    background: #fff;
}

.cart-notes::placeholder {
    color: #aaa;
}

/* Skeleton loading */
.skeleton-block {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 6px;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-category-tabs {
    display: flex;
    gap: 0;
    margin-top: 0.5rem;
}

.skeleton-tab {
    flex: 1;
    height: 48px;
    border-radius: 0;
}

.skeleton-menu-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.skeleton-menu-item:last-child {
    border-bottom: none;
}

.skeleton-menu-item-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.skeleton-item-name { width: 60%; height: 18px; }
.skeleton-item-price { width: 30%; height: 14px; }
.skeleton-stepper { width: 96px; height: 32px; border-radius: 16px; flex-shrink: 0; }

.skeleton-cart-title {
    width: 50%;
    height: 20px;
    margin: 0 auto 1rem;
}

.skeleton-cart-empty {
    width: 70%;
    height: 14px;
    margin: 1.5rem auto;
}

/* Confirmation */
.confirmation-section {
    padding: 3rem 0;
    text-align: center;
}

.confirmation-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 0.5rem;
}

.confirmation-message {
    color: #666;
    margin: 0 0 1.5rem;
}

.confirmation-order-number {
    font-size: 1.75rem;
    font-weight: 700;
    color: #222;
    margin-bottom: 2rem;
}

.confirmation-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 320px;
    margin: 0 auto;
}

.btn-outline {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 2px solid #B71C1C;
    background: #fff;
    color: #B71C1C;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.btn-outline:hover {
    background: #B71C1C;
    color: #fff;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

/* Order History */
.order-history-page {
    min-height: 100%;
    background: #f7f7f8;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.order-history-header {
    padding: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
}

.order-history-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #222;
    margin: 0;
}

.order-history-list {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.history-card {
    background: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s;
}

.history-card:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.history-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
}

.history-card-left {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.history-order-id {
    font-weight: 700;
    color: #222;
}

.history-date {
    font-size: 0.85rem;
    color: #888;
}

.history-card-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.history-total {
    font-weight: 700;
    color: #222;
}

.history-card-detail {
    border-top: 1px solid #e5e7eb;
    padding: 1rem 1.25rem;
}

.history-items-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.history-item-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.history-item-row:last-child {
    border-bottom: none;
}

.history-item-info {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.history-item-qty {
    font-size: 1rem;
    font-weight: 700;
    color: #B71C1C;
}

.history-item-name {
    color: #111;
    font-weight: 700;
    font-size: 1rem;
}

.history-item-unit-price {
    font-size: 0.85rem;
    color: #888;
}

.history-item-price {
    font-weight: 600;
    color: #222;
}

.history-notes {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: #f9fafb;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #555;
}

.history-rejection {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #991b1b;
}

/* ===================================================================== */
/* Commissary (merged page) — ordering + history, consistent with Expo   */
/* ===================================================================== */
.cm-page {
    --brand: #B71C1C;
    --cm-bg: #f4f5f7; --cm-surface: #fff; --cm-ink: #1f2328; --cm-soft: #5b626b; --cm-faint: #8b929b; --cm-line: #e6e8eb;
    --cm-new: #2563eb; --cm-new-bg: #eff4ff; --cm-prog: #b45309; --cm-prog-bg: #fff7ec;
    --cm-teal: #0f766e; --cm-teal-bg: #e8f6f4; --cm-done: #15803d; --cm-done-bg: #eefaf1;
    --cm-rej: #b91c1c; --cm-rej-bg: #fef1f1;
    --cm-shadow: 0 1px 2px rgba(16,24,40,.06), 0 6px 16px rgba(16,24,40,.06);
    min-height: 100%;
    background: var(--cm-bg);
    color: var(--cm-ink);
    -webkit-font-smoothing: antialiased;
}
.cm-page *, .cm-page *::before, .cm-page *::after { box-sizing: border-box; }

/* Top bar */
.cm-top { position: sticky; top: 0; z-index: 40; background: var(--cm-surface); border-bottom: 1px solid var(--cm-line); }
.cm-top-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; padding: .7rem 1.5rem; }
.cm-brand { display: flex; align-items: center; gap: .85rem; min-width: 0; justify-self: start; }
.cm-brand-dot { width: 34px; height: 34px; border-radius: 9px; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 1rem; flex-shrink: 0; }
.cm-app-title { font-size: 1.1rem; font-weight: 700; letter-spacing: -.01em; line-height: 1.15; }
.cm-app-sub { font-size: .8rem; color: var(--cm-faint); font-weight: 500; }
.cm-search { justify-self: center; width: clamp(200px, 32vw, 380px); padding: .5rem .8rem; font-size: .9rem; border: 1px solid var(--cm-line); border-radius: 10px; background: var(--cm-bg); color: var(--cm-ink); outline: none; transition: border-color .15s, box-shadow .15s, background .15s; }
.cm-search::placeholder { color: var(--cm-faint); }
.cm-search:focus { border-color: var(--brand); background: #fff; box-shadow: 0 0 0 2px rgba(183,28,28,.15); }
.cm-toggle { justify-self: end; display: inline-flex; background: #eef0f3; border-radius: 11px; padding: 4px; }
.cm-toggle button { border: 0; background: transparent; cursor: pointer; padding: .55rem 1.05rem; border-radius: 8px; font-size: .9rem; font-weight: 700; color: var(--cm-soft); display: inline-flex; align-items: center; gap: .45rem; transition: background .2s, color .2s, box-shadow .2s; }
.cm-toggle button.on { background: #fff; color: var(--brand); box-shadow: var(--cm-shadow); }
.cm-tcount { background: #fff; border-radius: 999px; min-width: 1.35rem; height: 1.35rem; padding: 0 .4rem; display: grid; place-items: center; font-size: .75rem; font-weight: 800; color: var(--cm-soft); }
.cm-toggle button.on .cm-tcount { background: #f1f3f5; }
.cm-tcount.brand { background: var(--brand); color: #fff; }

.cm-canvas { padding: 1rem 1.5rem 2.5rem; }
.cm-error { background: var(--cm-rej-bg); border: 1px solid #f3c9c9; color: #8f2020; border-radius: 10px; padding: .7rem .9rem; margin-bottom: 1rem; font-size: .9rem; }
.cm-empty { text-align: center; padding: 2.5rem 1rem; color: var(--cm-faint); }

/* Category tabs */
.cm-cats { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1.1rem; }
.cm-cat { border: 1.5px solid var(--cm-line); background: var(--cm-surface); color: var(--cm-soft); padding: .5rem .95rem; border-radius: 999px; font-size: .85rem; font-weight: 700; cursor: pointer; transition: all .15s; }
.cm-cat:hover { border-color: #cfd4da; }
.cm-cat.on { background: var(--cm-ink); border-color: var(--cm-ink); color: #fff; }

/* Order layout */
.cm-menu-layout { display: grid; grid-template-columns: 1fr 340px; gap: 1.1rem; align-items: start; }
.cm-menu-list { display: flex; flex-direction: column; gap: .6rem; }
.cm-mi { display: flex; align-items: center; gap: 1rem; background: var(--cm-surface); border: 1px solid var(--cm-line); border-radius: 12px; padding: .8rem 1rem; box-shadow: var(--cm-shadow); }
.cm-mi-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .12rem; }
.cm-mi-name { font-weight: 750; font-size: .96rem; }
.cm-mi-price { font-weight: 800; color: var(--brand); font-size: .9rem; }
.cm-mi-meta { color: var(--cm-faint); font-weight: 500; }
.cm-mi-desc { font-size: .8rem; color: var(--cm-faint); }
.cm-stepper { display: flex; align-items: center; gap: .4rem; flex-shrink: 0; }
.cm-qty { width: 58px; padding: .45rem .4rem; text-align: center; border: 1.5px solid var(--cm-line); border-radius: 8px; font-size: .9rem; font-weight: 700; outline: none; }
.cm-qty:focus { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(183,28,28,.12); }
.cm-add { border: 0; background: var(--cm-ink); color: #fff; font-weight: 700; font-size: .84rem; padding: .5rem .8rem; border-radius: 8px; cursor: pointer; transition: filter .15s; }
.cm-add:hover { filter: brightness(1.18); }

/* Cart */
.cm-cart { background: var(--cm-surface); border: 1px solid var(--cm-line); border-radius: 14px; box-shadow: var(--cm-shadow); padding: 1rem 1.1rem; position: sticky; top: 5rem; }
.cm-cart-title { font-weight: 800; font-size: 1rem; margin-bottom: .7rem; }
.cm-cart-empty { color: var(--cm-faint); font-size: .88rem; padding: 1.2rem 0; text-align: center; }
.cm-ci { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .5rem 0; border-bottom: 1px dashed #eef0f2; }
.cm-ci-name { font-weight: 650; font-size: .88rem; }
.cm-ci-qty { font-size: .76rem; color: var(--cm-faint); }
.cm-ci-right { display: flex; align-items: center; gap: .5rem; }
.cm-ci-price { font-weight: 700; font-variant-numeric: tabular-nums; font-size: .88rem; }
.cm-ci-rm { border: 0; background: transparent; color: var(--cm-faint); cursor: pointer; display: grid; place-items: center; padding: .15rem; border-radius: 6px; }
.cm-ci-rm:hover { color: var(--cm-rej); background: var(--cm-rej-bg); }
.cm-cart-total { display: flex; justify-content: space-between; align-items: baseline; padding: .7rem 0 .2rem; margin-top: .3rem; border-top: 1px solid var(--cm-line); }
.cm-cart-total .l { font-weight: 800; }
.cm-cart-total .v { font-weight: 800; font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.cm-notes { width: 100%; margin: .7rem 0; border: 1.5px solid var(--cm-line); border-radius: 10px; padding: .6rem .7rem; font-family: inherit; font-size: .86rem; resize: vertical; min-height: 60px; outline: none; }
.cm-notes:focus { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(183,28,28,.12); }
.cm-submit { width: 100%; border: 0; background: var(--brand); color: #fff; font-weight: 750; font-size: .95rem; padding: .85rem; border-radius: 11px; cursor: pointer; transition: filter .15s; }
.cm-submit:hover:not(:disabled) { filter: brightness(1.05); }
.cm-submit:disabled { background: #e5e7eb; color: #9aa0a6; cursor: not-allowed; }

/* Confirmation */
.cm-confirm { max-width: 460px; margin: 3rem auto; background: var(--cm-surface); border: 1px solid var(--cm-line); border-radius: 16px; box-shadow: var(--cm-shadow); padding: 2rem; text-align: center; }
.cm-confirm-check { width: 54px; height: 54px; border-radius: 50%; background: var(--cm-done-bg); color: var(--cm-done); display: grid; place-items: center; font-size: 1.6rem; font-weight: 800; margin: 0 auto 1rem; }
.cm-confirm h2 { margin: 0 0 .35rem; font-size: 1.25rem; }
.cm-confirm p { color: var(--cm-soft); margin: 0 0 1.4rem; }
.cm-confirm-actions { display: flex; gap: .6rem; justify-content: center; flex-wrap: wrap; }
.cm-btn-outline { border: 1.5px solid var(--cm-line); background: #fff; color: var(--cm-ink); font-weight: 700; padding: .6rem 1rem; border-radius: 10px; cursor: pointer; }
.cm-btn-outline:hover { background: #f6f7f9; }
.cm-btn-red { border: 0; background: var(--brand); color: #fff; font-weight: 700; padding: .6rem 1rem; border-radius: 10px; cursor: pointer; }
.cm-btn-red:hover { filter: brightness(1.05); }

/* History */
.cm-hist-controls { display: flex; align-items: center; gap: .8rem; margin-bottom: 1rem; }
.cm-status-select { appearance: none; -webkit-appearance: none; padding: .5rem 2.1rem .5rem .85rem; font-size: .88rem; font-weight: 700; color: var(--cm-ink); border: 1px solid var(--cm-line); border-radius: 10px; cursor: pointer; outline: none;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%235b626b'%3E%3Cpath d='M4.22 6.22a.75.75 0 0 1 1.06 0L8 8.94l2.72-2.72a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L4.22 7.28a.75.75 0 0 1 0-1.06z'/%3E%3C/svg%3E") no-repeat right .7rem center / 13px; }
.cm-status-select:focus { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(183,28,28,.15); }
.cm-hist-summary { font-size: .85rem; color: var(--cm-soft); font-weight: 600; margin-left: auto; }
.cm-hist-summary b { color: var(--cm-ink); }
.cm-hist-list { display: flex; flex-direction: column; gap: .7rem; }
.cm-ord { background: var(--cm-surface); border: 1px solid var(--cm-line); border-radius: 12px; box-shadow: var(--cm-shadow); overflow: hidden; }
.cm-ord-head { display: flex; align-items: center; gap: .85rem; padding: .85rem 1.05rem; cursor: pointer; transition: background .15s; }
.cm-ord-head:hover { background: #fafbfc; }
.cm-ord-id { font-weight: 800; font-size: .95rem; font-variant-numeric: tabular-nums; }
.cm-ord-date { font-size: .82rem; color: var(--cm-soft); }
.cm-ord-right { margin-left: auto; display: flex; align-items: center; gap: .85rem; }
.cm-ord-total { font-weight: 800; font-variant-numeric: tabular-nums; }
.cm-ord-chev { width: 13px; height: 13px; color: var(--cm-faint); flex-shrink: 0; transition: transform .2s; }
.cm-ord-chev.open { transform: rotate(90deg); }

/* Status badge */
.cm-badge { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; padding: .25rem .6rem; border-radius: 7px; white-space: nowrap; background: #f1f3f5; color: var(--cm-soft); }
.cm-badge.b-pending { background: var(--cm-new-bg); color: var(--cm-new); }
.cm-badge.b-in_progress { background: var(--cm-prog-bg); color: var(--cm-prog); }
.cm-badge.b-approved { background: var(--cm-teal-bg); color: var(--cm-teal); }
.cm-badge.b-fulfilled, .cm-badge.b-completed { background: var(--cm-done-bg); color: var(--cm-done); }
.cm-badge.b-rejected { background: var(--cm-rej-bg); color: var(--cm-rej); }

.cm-ord-detail { padding: .2rem 1.05rem 1rem; border-top: 1px solid var(--cm-line); }
.cm-det-label { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; color: var(--cm-faint); margin: .7rem 0 .15rem; }
.cm-hist-items { list-style: none; margin: .3rem 0 0; padding: 0; }
.cm-hist-items li { display: flex; align-items: baseline; gap: .55rem; padding: .4rem 0; border-bottom: 1px dashed #eef0f2; }
.cm-hist-items li:last-child { border-bottom: 0; }
.cm-hi-qty { font-weight: 800; color: var(--brand); font-size: .82rem; }
.cm-hi-name { font-weight: 650; font-size: .9rem; flex: 1; }
.cm-hi-unit { font-size: .76rem; color: var(--cm-faint); }
.cm-hi-price { font-weight: 650; font-variant-numeric: tabular-nums; }
.cm-note-box { margin-top: .6rem; background: #f8f9fb; border: 1px solid var(--cm-line); border-radius: 9px; padding: .6rem .75rem; font-size: .86rem; color: var(--cm-soft); }
.cm-note-box strong { color: var(--cm-ink); }
.cm-note-box.rej { background: var(--cm-rej-bg); border-color: #f3c9c9; color: #8f2020; }
.cm-note-box.rej strong { color: #7a1c1c; }

@media (max-width: 820px) {
    .cm-menu-layout { grid-template-columns: 1fr; }
    .cm-cart { position: static; }
}
@media (max-width: 680px) {
    .cm-top-row { grid-template-columns: 1fr auto; row-gap: .6rem; padding: .7rem 1rem; }
    .cm-search { grid-column: 1 / -1; order: 3; justify-self: stretch; width: 100%; }
    .cm-canvas { padding: 1rem 1rem 2.5rem; }
}
