:root {
    --primary: #e85d04;
    --primary-dark: #dc2f02;
    --secondary: #370617;
    --bg: #fff8f0;
    --surface: #ffffff;
    --text: #1a1a1a;
    --muted: #666;
    --border: #e8ddd4;
    --success: #2d6a4f;
    --error: #9d0208;
    --warning: #e9c46a;
    --radius: 12px;
    --shadow: 0 4px 20px rgba(55, 6, 23, 0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 1.25rem; }

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.site-header {
    background: var(--secondary);
    color: #fff;
    padding: 1rem 0;
    margin-bottom: 2rem;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    color: #fff;
    font-size: 1.25rem;
    font-weight: 700;
    text-decoration: none;
}

.site-header nav a {
    color: #fff;
    margin-left: 1.5rem;
    opacity: 0.9;
}

.site-header nav a:hover { opacity: 1; text-decoration: none; }

.site-footer {
    margin-top: 4rem;
    padding: 2rem 0;
    text-align: center;
    color: var(--muted);
    border-top: 1px solid var(--border);
}

.hero { text-align: center; margin-bottom: 2rem; }
.hero h1 { font-size: 2rem; color: var(--secondary); margin-bottom: 0.5rem; }
.hero p { color: var(--muted); }

.status-card {
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.status-open { background: #d8f3dc; border: 1px solid #95d5b2; }
.status-closed { background: #ffe5e5; border: 1px solid #ffb3b3; }

.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
}

.alert-success { background: #d8f3dc; color: var(--success); }
.alert-error { background: #ffe5e5; color: var(--error); }

.form-section {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
}

.form-section h2 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--secondary);
}

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-grid-2 .full-width { grid-column: 1 / -1; }

.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-weight: 600; margin-bottom: 0.35rem; font-size: 0.9rem; }
.form-group small { font-weight: 400; color: var(--muted); }
.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(232, 93, 4, 0.15);
}

.food-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.food-card {
    cursor: pointer;
    display: block;
}

.food-card input { display: none; }

.food-card-body {
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    transition: all 0.2s;
    height: 100%;
}

.food-card input:checked + .food-card-body {
    border-color: var(--primary);
    background: #fff5eb;
}

.food-card-body h3 { font-size: 1rem; margin-bottom: 0.35rem; }
.food-card-body p { font-size: 0.85rem; color: var(--muted); margin-bottom: 0.5rem; }
.food-card-body .price { font-weight: 700; color: var(--primary); }

.food-unavailable { cursor: not-allowed; opacity: 0.72; }
.food-unavailable .food-card-body { background: #f5f5f5; border-style: dashed; }
.food-unavailable input:checked + .food-card-body { border-color: var(--border); background: #f5f5f5; }

.food-meta { font-size: 0.82rem; color: var(--secondary); margin-bottom: 0.25rem; }
.food-meta-closed { color: var(--error); }

.food-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.food-edit-preview {
    margin-bottom: 0.65rem;
}

.admin-page-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.admin-page-toolbar h1 {
    margin-bottom: 0.35rem;
}

.admin-page-toolbar .page-desc {
    margin-bottom: 0;
}

.admin-toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.filter-active-note {
    color: var(--primary);
}

.customers-table-wrap {
    margin-top: 0.5rem;
}

.customers-sms-hint {
    margin-top: 0.75rem;
}

.admin-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.admin-modal[hidden] {
    display: none !important;
}

.admin-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
}

.admin-modal-panel {
    position: relative;
    width: min(100%, 32rem);
    max-height: calc(100vh - 2rem);
    overflow: auto;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
}

.admin-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
}

.admin-modal-header h2 {
    margin: 0;
    font-size: 1.1rem;
}

.admin-modal-close {
    border: 0;
    background: transparent;
    font-size: 1.5rem;
    line-height: 1;
    color: var(--muted);
    cursor: pointer;
    padding: 0.15rem 0.35rem;
}

.admin-modal-close:hover {
    color: var(--text);
}

.admin-modal-body {
    padding: 1.25rem;
}

.admin-modal-form .form-group {
    margin-bottom: 1rem;
}

.admin-modal-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.admin-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 1.25rem;
    padding-top: 0.25rem;
}

body.admin-modal-open {
    overflow: hidden;
}

@media (max-width: 768px) {
    .admin-modal-form .form-row {
        grid-template-columns: 1fr;
    }

    .admin-toolbar-actions {
        width: 100%;
    }
}

.table-actions {
    white-space: nowrap;
}

.food-items-table td,
.food-items-table th {
    vertical-align: middle;
    padding: 0.75rem 0.85rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
}

.food-items-table th {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--muted);
    background: #fafafa;
}

.food-items-table .col-actions {
    width: 1%;
    white-space: nowrap;
}

.table-sub {
    display: block;
    font-size: 0.82rem;
    color: var(--muted);
    margin-top: 0.15rem;
    max-width: 220px;
}

.table-empty {
    text-align: center;
    color: var(--muted);
    padding: 2rem 1rem !important;
}

.food-table-thumb {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
    display: block;
    border: 1px solid var(--border);
}

.food-table-thumb-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff5eb;
    font-size: 1.25rem;
}

.table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
}

.table-inline-form {
    display: inline;
    margin: 0;
}

.food-admin-list { display: flex; flex-direction: column; gap: 1rem; margin-top: 1.5rem; }
.food-admin-item { margin-bottom: 0; }
.food-admin-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.food-admin-form .preorder-fields { margin: 1rem 0; padding: 1rem; background: #f8f9fa; border-radius: 8px; }

.qty-group { max-width: 120px; }
.total-display { font-size: 1.25rem; margin-top: 0.5rem; }

.payment-options { display: flex; flex-direction: column; gap: 0.75rem; }
.payment-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
}

.payment-option:has(input:checked) {
    border-color: var(--primary);
    background: #fff5eb;
}

.momo-section {
    margin-top: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.momo-section.hidden { display: none; }
.momo-number { font-size: 1.25rem; font-weight: 700; color: var(--secondary); }

.section-hint, .field-hint { font-weight: 400; color: var(--muted); font-size: 0.9rem; }
.field-hint { margin-bottom: 0.75rem; }

.audio-recorder {
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.audio-controls { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 0.75rem; }

.audio-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: var(--error);
}

.recording-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--error);
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}

.record-limit { font-weight: 400; color: var(--muted); font-size: 0.85rem; }

.audio-preview, .audio-recorder audio, .order-panel audio {
    width: 100%;
    margin-top: 0.5rem;
}

.audio-preview {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.audio-preview h3 { font-size: 0.95rem; margin-bottom: 0.5rem; color: var(--secondary); }

.spec-text { white-space: pre-wrap; }

.hidden { display: none !important; }

.btn {
    display: inline-block;
    padding: 0.65rem 1.25rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    text-decoration: none;
    text-align: center;
}

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); text-decoration: none; color: #fff; }
.btn-primary.is-loading,
.btn-primary:disabled {
    cursor: not-allowed;
    opacity: 0.88;
}

#submitOrderBtn.is-loading::before {
    content: '';
    display: inline-block;
    width: 0.95em;
    height: 0.95em;
    margin-right: 0.45em;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: btn-spin 0.7s linear infinite;
    vertical-align: -0.12em;
}

@keyframes btn-spin {
    to { transform: rotate(360deg); }
}

#orderForm.is-submitting {
    pointer-events: none;
}

#orderForm.is-submitting input,
#orderForm.is-submitting textarea,
#orderForm.is-submitting select,
#orderForm.is-submitting button:not(#submitOrderBtn) {
    opacity: 0.72;
}
.btn-secondary { background: #eee; color: var(--text); }
.btn-danger { background: var(--error); color: #fff; }
.btn-lg { padding: 0.85rem 2rem; font-size: 1.1rem; }
.btn-block { width: 100%; }
.btn-sm { padding: 0.35rem 0.75rem; font-size: 0.85rem; }
.btn-link { background: none; border: none; color: var(--primary); cursor: pointer; font-size: inherit; }
.btn-link.danger { color: var(--error); }

.badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-pending { background: #fff3cd; color: #856404; }
.badge-confirmed { background: #cce5ff; color: #004085; }
.badge-preparing { background: #e2d5f1; color: #4a2c6a; }
.badge-ready { background: #d1ecf1; color: #0c5460; }
.badge-delivered { background: #d4edda; color: #155724; }
.badge-cancelled { background: #f8d7da; color: #721c24; }
.badge-delivery { background: #ffe8cc; color: #9a3412; }

.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    cursor: pointer;
}

.filter-bar .checkbox-label {
    margin-left: 0.5rem;
}

.delivery-block {
    margin: 1rem 0;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fffaf5;
}

.delivery-toggle {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.25rem;
}

.delivery-toggle input {
    width: 1.1rem;
    height: 1.1rem;
    flex-shrink: 0;
    accent-color: var(--primary);
    cursor: pointer;
}

.delivery-toggle label {
    font-weight: 600;
    cursor: pointer;
    margin: 0;
}

.delivery-fields {
    margin-top: 0.75rem;
}

.delivery-fee-note {
    margin-bottom: 0.75rem;
}

.schedule-block {
    margin: 1rem 0 0.5rem;
}

.schedule-block h4 {
    margin: 0 0 0.65rem;
    font-size: 1rem;
}

.schedule-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

@media (max-width: 480px) {
    .schedule-row {
        grid-template-columns: 1fr;
    }
}

.delivery-fee-timing {
    margin: 0.75rem 0;
}

.delivery-fee-timing-label {
    font-weight: 600;
    margin: 0 0 0.5rem;
    font-size: 0.95rem;
}

.delivery-fee-chips {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.delivery-fee-chips .pay-chip span {
    font-size: 0.9rem;
}

.delivery-area-combobox {
    margin-bottom: 0.75rem;
}

.delivery-area-combobox.is-open .delivery-area-control {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(114, 9, 18, 0.12);
}

.delivery-area-control {
    display: flex;
    align-items: stretch;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
    overflow: hidden;
}

.delivery-area-search {
    flex: 1;
    border: none;
    padding: 0.75rem 0.85rem;
    font: inherit;
    min-width: 0;
    background: transparent;
}

.delivery-area-search:focus {
    outline: none;
}

.delivery-area-toggle {
    border: none;
    border-left: 1px solid var(--border);
    background: #fffaf5;
    padding: 0 0.85rem;
    font-size: 1.1rem;
    cursor: pointer;
    color: var(--primary);
}

.delivery-area-list {
    list-style: none;
    margin: 0.35rem 0 0;
    padding: 0;
    max-height: min(240px, 40vh);
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow);
}

.delivery-area-list-empty::before {
    content: 'No areas match your search.';
    display: block;
    padding: 0.75rem 0.85rem;
    color: var(--muted);
    font-size: 0.9rem;
}

.delivery-area-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.7rem 0.85rem;
    cursor: pointer;
    border-bottom: 1px solid var(--border);
}

.delivery-area-option:last-child {
    border-bottom: none;
}

.delivery-area-option.hidden {
    display: none;
}

.delivery-area-option[aria-selected="true"],
.delivery-area-option:hover {
    background: #fff5eb;
}

.delivery-area-option-name {
    font-weight: 500;
}

.delivery-area-option-price {
    font-weight: 600;
    color: var(--primary);
    white-space: nowrap;
    font-size: 0.9rem;
}

.delivery-area-option-other .delivery-area-option-name {
    color: var(--muted);
}

.delivery-area-hint {
    margin-top: 0.35rem;
    margin-bottom: 0;
}

.delivery-location-picker {
    border: none;
    margin: 0 0 0.75rem;
    padding: 0;
}

.delivery-location-picker legend {
    font-weight: 600;
    margin-bottom: 0.5rem;
    padding: 0;
}

.delivery-location-option {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem 0.75rem;
    margin-bottom: 0.45rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
    cursor: pointer;
}

.delivery-location-option input {
    flex-shrink: 0;
    accent-color: var(--primary);
}

.delivery-location-name {
    flex: 1;
    font-weight: 500;
}

.delivery-location-price {
    font-weight: 600;
    color: var(--primary);
    white-space: nowrap;
}

.checkout-total-breakdown {
    text-align: right;
    font-size: 0.85rem;
    color: var(--muted);
    margin: -0.35rem 0 0.75rem;
}

.delivery-loc-card {
    margin-bottom: 0.5rem;
}

.delivery-loc-delete {
    margin: 0 0 1rem;
}

.delivery-detail p {
    margin: 0.5rem 0 0;
}

.location-error {
    color: var(--error);
}

.delivery-detail .btn {
    margin-top: 0.5rem;
}

.muted {
    color: var(--muted);
}

.order-detail-card, .card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    margin-top: 1.5rem;
}

.detail-list {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 0.5rem 1rem;
    margin: 1rem 0;
}

.detail-list dt { font-weight: 600; color: var(--muted); }
.detail-list dd { margin: 0; }

.track-section, .pay-section { max-width: 600px; margin: 0 auto; }
.track-form { margin: 1.5rem 0; }

.empty-state { text-align: center; padding: 3rem; color: var(--muted); }

.login-page main { display: flex; justify-content: center; align-items: center; min-height: 60vh; }
.login-card {
    background: var(--surface);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 400px;
}

.login-card h1 { text-align: center; margin-bottom: 1.5rem; }
.login-note { text-align: center; margin-top: 1rem; font-size: 0.9rem; }

/* Admin */
.admin-body { display: flex; min-height: 100vh; }

.admin-mobile-top {
    display: none;
}

.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;
}

.admin-sidebar {
    width: 240px;
    background: var(--secondary);
    color: #fff;
    padding: 1.5rem 0;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
}

.sidebar-brand {
    padding: 0 1.25rem 1.5rem;
    font-weight: 700;
    font-size: 1.1rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.admin-sidebar nav { display: flex; flex-direction: column; padding-top: 1rem; flex: 1; }

.admin-sidebar nav a {
    color: rgba(255,255,255,0.85);
    padding: 0.75rem 1.25rem;
    text-decoration: none;
}

.admin-sidebar nav a:hover, .admin-sidebar nav a.active {
    background: rgba(255,255,255,0.1);
    color: #fff;
    text-decoration: none;
}

.sidebar-user {
    position: absolute;
    bottom: 1rem;
    left: 0;
    width: 240px;
    padding: 0 1.25rem;
    font-size: 0.8rem;
    opacity: 0.7;
}

.admin-content {
    flex: 1;
    padding: 2rem;
    overflow-x: auto;
}

.admin-content h1 { margin-bottom: 1.5rem; color: var(--secondary); }
.admin-content h2 { margin: 1.5rem 0 1rem; font-size: 1.1rem; }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--surface);
    padding: 1.25rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
}

a.stat-card-link {
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

a.stat-card-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
}

.stat-card-highlight {
    border: 1px solid #ffd8a8;
    background: #fff9f2;
}

.stat-value { font-size: 2rem; font-weight: 700; color: var(--primary); }
.stat-label { color: var(--muted); font-size: 0.9rem; }
.stat-sub { font-size: 0.8rem; color: var(--muted); margin-top: 0.25rem; }

.table-wrap { overflow-x: auto; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid var(--border); }
th { background: #fafafa; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--muted); }
tr.selected-row { background: #fff5eb; }
td.empty { text-align: center; color: var(--muted); padding: 2rem; }

.filter-bar, .inline-form {
    display: flex;
    align-items: end;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.orders-filter-bar {
    background: var(--surface);
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 140px;
}

.filter-group label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.filter-group input,
.filter-group select {
    padding: 0.5rem 0.65rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.95rem;
    background: #fff;
}

.filter-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-summary {
    margin: -0.75rem 0 1.25rem;
    color: var(--muted);
    font-size: 0.9rem;
}

.inline-form.card { padding: 1.25rem; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }

.admin-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 1.5rem;
    align-items: start;
}

.order-panel {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    position: sticky;
    top: 1rem;
}

.evidence-preview img {
    max-width: 100%;
    border-radius: 8px;
    border: 1px solid var(--border);
    margin-top: 0.5rem;
}

.action-form, .status-form { margin-top: 1rem; display: flex; flex-direction: column; gap: 0.75rem; }

.page-desc { color: var(--muted); margin-bottom: 1.5rem; }
.hint { font-size: 0.9rem; color: var(--muted); margin-bottom: 1rem; }

.settings-form h2 {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    font-size: 1rem;
}

.settings-form h2:first-of-type { margin-top: 0; padding-top: 0; border-top: none; }

.settings-subhead {
    font-size: 1rem;
    margin: 1.25rem 0 0.75rem;
    color: var(--secondary);
}

.sms-toggle-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.sms-toggle-grid .checkbox-label {
    align-items: flex-start;
}

.settings-form .checkbox-label input[type="checkbox"] {
    width: 1.1rem;
    height: 1.1rem;
    margin-top: 0.15rem;
    flex-shrink: 0;
    accent-color: var(--primary);
    cursor: pointer;
}

.logo-preview {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.logo-preview-img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    border-radius: 10px;
    background: #fff;
    border: 1px solid var(--border);
    padding: 4px;
}

.logo-remove {
    font-size: 0.9rem;
}

.admin-sidebar-backdrop {
    display: none;
}

body.admin-menu-open {
    overflow: hidden;
}

.edit-row {
    display: grid;
    grid-template-columns: 1fr 1.5fr 100px auto auto;
    gap: 0.5rem;
    align-items: center;
    padding: 0.5rem 0;
}

.edit-row input[type="text"], .edit-row input[type="number"] {
    padding: 0.4rem 0.6rem;
    border: 1px solid var(--border);
    border-radius: 6px;
}

@media (max-width: 768px) {
    .form-grid, .form-grid-2, .admin-layout { grid-template-columns: 1fr; }
    .admin-body {
        flex-direction: column;
        min-height: 100vh;
    }

    .admin-mobile-top {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        position: sticky;
        top: 0;
        z-index: 60;
        background: var(--secondary);
        color: #fff;
        padding: 0.75rem 1rem;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
    }

    .admin-mobile-brand {
        display: flex;
        flex-direction: column;
        gap: 0.1rem;
        min-width: 0;
    }

    .admin-mobile-brand strong {
        font-size: 0.98rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .admin-mobile-brand span {
        font-size: 0.75rem;
        opacity: 0.75;
    }

    .admin-menu-toggle {
        width: 42px;
        height: 42px;
        border: none;
        border-radius: 10px;
        background: rgba(255, 255, 255, 0.12);
        cursor: pointer;
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
        z-index: 62;
    }

    .admin-menu-toggle.is-active .admin-menu-icon {
        background: transparent;
    }

    .admin-menu-toggle.is-active .admin-menu-icon::before {
        top: 0;
        transform: rotate(45deg);
    }

    .admin-menu-toggle.is-active .admin-menu-icon::after {
        top: 0;
        transform: rotate(-45deg);
    }

    .admin-menu-icon::before,
    .admin-menu-icon::after {
        transition: transform 0.2s ease, top 0.2s ease;
    }

    .admin-sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        top: 58px;
        background: rgba(26, 26, 26, 0.45);
        z-index: 54;
    }

    .admin-sidebar-backdrop[hidden] {
        display: none;
    }

    .admin-menu-icon,
    .admin-menu-icon::before,
    .admin-menu-icon::after {
        display: block;
        width: 18px;
        height: 2px;
        background: #fff;
        border-radius: 2px;
        position: relative;
    }

    .admin-menu-icon::before,
    .admin-menu-icon::after {
        content: '';
        position: absolute;
        left: 0;
    }

    .admin-menu-icon::before { top: -6px; }
    .admin-menu-icon::after { top: 6px; }

    .admin-sidebar {
        width: 100%;
        min-height: 0;
        padding: 0;
        position: fixed;
        left: 0;
        right: 0;
        top: 58px;
        z-index: 61;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.25s ease;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    }

    .admin-sidebar.is-open {
        max-height: calc(100vh - 58px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .admin-sidebar .sidebar-brand {
        display: none;
    }

    .admin-sidebar nav {
        flex-direction: column;
        padding: 0.5rem;
        gap: 0.25rem;
    }

    .admin-sidebar nav a {
        padding: 0.85rem 1rem;
        border-radius: 10px;
        font-size: 0.95rem;
    }

    .admin-sidebar nav a.active {
        background: var(--primary);
        color: #fff;
    }

    .admin-sidebar .sidebar-user {
        position: static;
        width: auto;
        padding: 0.75rem 1rem 1rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        margin-top: 0.25rem;
    }

    .admin-content {
        padding: 1rem;
        width: 100%;
    }

    .admin-content h1 {
        font-size: 1.35rem;
        margin-bottom: 1rem;
    }

    .page-desc {
        font-size: 0.92rem;
        margin-bottom: 1rem;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }

    .stat-value { font-size: 1.5rem; }

    .card {
        padding: 1rem;
    }

    .orders-filter-bar {
        padding: 0.85rem;
    }

    .filter-group {
        min-width: calc(50% - 0.5rem);
        flex: 1 1 calc(50% - 0.5rem);
    }

    .filter-group:nth-child(1),
    .filter-group:nth-child(2) {
        min-width: 100%;
        flex-basis: 100%;
    }

    .filter-actions {
        width: 100%;
    }

    .filter-actions .btn {
        flex: 1;
        text-align: center;
    }

    .order-panel {
        position: static;
        margin-top: 1rem;
    }

    .food-admin-header {
        flex-direction: column;
        align-items: stretch;
    }

    .food-admin-thumb {
        width: 100%;
        height: 160px;
    }

    .food-admin-title {
        flex-direction: column;
        align-items: flex-start;
    }

    .food-admin-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .food-admin-actions .btn {
        width: 100%;
        text-align: center;
    }

    .food-admin-form .btn-primary,
    .settings-form .btn-primary {
        width: 100%;
    }

    .inline-form {
        flex-direction: column;
        align-items: stretch;
    }

    .inline-form input,
    .inline-form .btn {
        width: 100%;
    }

    .detail-list { grid-template-columns: 1fr; }
    .edit-row { grid-template-columns: 1fr; }

    th, td {
        padding: 0.55rem 0.6rem;
        font-size: 0.82rem;
    }
}

@media (max-width: 420px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .filter-group {
        min-width: 100%;
        flex-basis: 100%;
    }
}

/* Mobile-first order page */
.order-page {
    background: linear-gradient(180deg, #fff5eb 0%, var(--bg) 220px);
}

.order-page .site-footer {
    margin-top: 0;
    padding-bottom: 5rem;
}

.order-main {
    max-width: 480px;
    margin: 0 auto;
    padding: 0 0 6rem;
}

.order-app {
    min-height: 100vh;
}

.order-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.1rem 0.5rem;
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255, 245, 235, 0.92);
    backdrop-filter: blur(8px);
}

.order-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.brand-icon {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--secondary);
    border-radius: 12px;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.brand-logo {
    width: 42px;
    height: 42px;
    object-fit: contain;
    border-radius: 12px;
    background: #fff;
    border: 1px solid var(--border);
    padding: 3px;
    flex-shrink: 0;
}

.order-brand strong {
    display: block;
    color: var(--secondary);
    font-size: 1rem;
    line-height: 1.2;
}

.brand-tagline {
    font-size: 0.78rem;
    color: var(--muted);
}

.track-link {
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.45rem 0.85rem;
    background: #fff;
    border-radius: 999px;
    box-shadow: var(--shadow);
    text-decoration: none;
}

.order-status-pill {
    margin: 0.5rem 1.1rem 1rem;
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.order-status-pill.is-open {
    background: #d8f3dc;
    color: var(--success);
}

.order-status-pill.is-closed {
    background: #ffe5e5;
    color: var(--error);
}

.pill-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

.menu-section {
    padding: 0 1.1rem;
}

.section-head h1 {
    font-size: 1.45rem;
    color: var(--secondary);
    margin-bottom: 0.25rem;
}

.section-head p {
    color: var(--muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.menu-search-wrap {
    margin-bottom: 1rem;
    position: sticky;
    top: 4.25rem;
    z-index: 15;
    padding: 0.35rem 0 0.65rem;
    background: linear-gradient(180deg, var(--bg) 70%, transparent);
}

.menu-search {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.85rem;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 999px;
    box-shadow: 0 2px 10px rgba(55, 6, 23, 0.06);
}

.menu-search:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(232, 93, 4, 0.12);
}

.menu-search-icon {
    font-size: 1rem;
    line-height: 1;
    opacity: 0.55;
    flex-shrink: 0;
}

.menu-search-input {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    font-size: 1rem;
    font-family: inherit;
    color: var(--text);
    padding: 0.15rem 0;
}

.menu-search-input:focus {
    outline: none;
}

.menu-search-input::-webkit-search-cancel-button {
    display: none;
}

.menu-search-clear {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: #f0f0f0;
    color: var(--muted);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

.menu-search-clear:hover {
    background: #e8e8e8;
    color: var(--secondary);
}

.menu-search-status {
    margin: 0.45rem 0 0;
    font-size: 0.82rem;
    color: var(--muted);
    padding-left: 0.35rem;
}

.menu-search-empty {
    text-align: center;
    padding: 2rem 1rem 2.5rem;
    color: var(--muted);
}

.menu-search-empty p {
    margin-bottom: 0.75rem;
}

.menu-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.menu-item {
    background: #fff;
    border-radius: 16px;
    padding: 0;
    box-shadow: 0 2px 12px rgba(55, 6, 23, 0.06);
    border: 1px solid rgba(232, 93, 4, 0.08);
    overflow: hidden;
}

.menu-item-photo {
    width: 100%;
    background: linear-gradient(135deg, #fff5eb, #fde2c8);
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

.menu-item-photo img,
.menu-item-image {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    object-position: center;
}

.menu-item-photo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 160px;
    font-size: 2.5rem;
    color: var(--primary);
    opacity: 0.55;
}

.menu-item-main,
.menu-item-actions {
    padding-left: 1rem;
    padding-right: 1rem;
}

.menu-item-main {
    padding-top: 0.85rem;
}

.menu-item-actions {
    padding-bottom: 1rem;
}

.food-admin-header {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 1rem;
}

.food-admin-thumb {
    width: 72px;
    height: 72px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid var(--border);
}

.food-admin-thumb-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff5eb;
    font-size: 1.75rem;
}

.food-admin-title {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
}

.remove-image-label {
    display: block;
    margin-top: 0.35rem;
    font-weight: 400;
    font-size: 0.85rem;
    color: var(--muted);
}

.menu-item.is-sold-out {
    opacity: 0.65;
}

.menu-item.is-sold-out .menu-item-photo img {
    filter: grayscale(0.6);
    opacity: 0.75;
}

.menu-item-main {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.menu-item-text h3 {
    font-size: 1.05rem;
    color: var(--secondary);
    margin-bottom: 0.2rem;
}

.menu-desc {
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 0.45rem;
    line-height: 1.45;
}

.menu-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.mini-badge {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
}

.mini-badge.preorder { background: #e2d5f1; color: #4a2c6a; }
.mini-badge.cutoff { background: #fff3cd; color: #856404; }
.mini-badge.stock { background: #d8f3dc; color: var(--success); }
.mini-badge.unlimited { background: #e8f4fd; color: #0c5460; }
.mini-badge.sold { background: #f8d7da; color: var(--error); }

.menu-item-price {
    font-weight: 700;
    color: var(--primary);
    white-space: nowrap;
    font-size: 1rem;
}

.menu-item-price .price-was {
    display: block;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--muted);
    text-decoration: line-through;
}

.menu-item-price .price-promo {
    color: var(--primary);
}

.price-was {
    color: var(--muted);
    text-decoration: line-through;
    margin-right: 0.35rem;
}

.price-promo {
    color: var(--primary);
    font-weight: 700;
}

.menu-item-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding-top: 0.65rem;
    border-top: 1px solid var(--border);
}

.qty-stepper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #f8f9fa;
    border-radius: 999px;
    padding: 0.2rem;
}

.qty-btn {
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 50%;
    background: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--secondary);
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.qty-value {
    min-width: 1.5rem;
    text-align: center;
    font-weight: 700;
}

.btn-add {
    flex: 1;
    max-width: 140px;
    padding: 0.6rem 1rem;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 999px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s, background 0.15s;
}

.btn-add.added {
    background: var(--success);
    transform: scale(0.98);
}

.cart-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom));
    background: linear-gradient(transparent, rgba(255,248,240,0.95) 30%);
}

.cart-bar-btn {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 1.1rem;
    background: var(--secondary);
    color: #fff;
    border: none;
    border-radius: 14px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(55, 6, 23, 0.25);
}

.cart-count {
    background: var(--primary);
    min-width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.cart-bar-label { flex: 1; text-align: left; }
.cart-bar-total { font-size: 1.05rem; }

.checkout-sheet {
    position: fixed;
    inset: 0;
    z-index: 100;
}

.checkout-sheet.hidden,
.checkout-sheet[hidden] {
    display: none !important;
}

.menu-item-actions .qty-btn,
.menu-item-actions .btn-add {
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    position: relative;
    z-index: 2;
}

.sheet-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(26, 26, 26, 0.45);
}

.sheet-panel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    max-height: 92vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 20px 20px 0 0;
    padding: 0.5rem 1.1rem calc(1.5rem + env(safe-area-inset-bottom));
    animation: slideUp 0.25s ease;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.sheet-handle {
    width: 40px;
    height: 4px;
    background: #ddd;
    border-radius: 999px;
    margin: 0.35rem auto 0.75rem;
}

.sheet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.sheet-header h2 {
    font-size: 1.2rem;
    color: var(--secondary);
}

.sheet-close {
    width: 36px;
    height: 36px;
    border: none;
    background: #f0f0f0;
    border-radius: 50%;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
}

body.sheet-open { overflow: hidden; }

.cart-lines {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-bottom: 1rem;
}

.cart-line {
    display: grid;
    grid-template-columns: 52px 1fr auto;
    gap: 0.35rem 0.75rem;
    padding: 0.75rem;
    background: #fafafa;
    border-radius: 12px;
    align-items: center;
}

.cart-line-thumb {
    width: 52px;
    height: 52px;
    border-radius: 10px;
    object-fit: cover;
    grid-row: 1 / span 2;
}

.cart-line-thumb-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff5eb;
    font-size: 1.25rem;
}

.cart-line-info {
    grid-column: 2;
}

.cart-line-info strong {
    display: block;
    font-size: 0.95rem;
}

.cart-line-meta {
    display: block;
    font-size: 0.78rem;
    color: var(--muted);
}

.cart-line-actions {
    grid-column: 2;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.cart-line-total {
    grid-column: 3;
    grid-row: 1 / span 2;
    align-self: center;
    font-weight: 700;
    color: var(--primary);
}

.cart-remove {
    border: none;
    background: none;
    color: var(--error);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0 0.25rem;
}

.checkout-section {
    margin-bottom: 1.1rem;
    padding-top: 0.5rem;
}

.checkout-section h3 {
    font-size: 0.95rem;
    color: var(--secondary);
    margin-bottom: 0.65rem;
}

.optional { font-weight: 400; color: var(--muted); font-size: 0.85rem; }

.voice-details summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--secondary);
    padding: 0.5rem 0;
}

.payment-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.pay-chip {
    flex: 1 1 calc(33.333% - 0.5rem);
    min-width: 90px;
    cursor: pointer;
}

.pay-chip input { display: none; }

.pay-chip span {
    display: block;
    text-align: center;
    padding: 0.75rem;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.15s;
}

.pay-chip input:checked + span {
    border-color: var(--primary);
    background: #fff5eb;
    color: var(--primary-dark);
}

.checkout-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    font-size: 1.1rem;
    border-top: 1px solid var(--border);
    margin-bottom: 0.75rem;
}

.checkout-total-row strong {
    color: var(--primary);
    font-size: 1.25rem;
}

.empty-state-card {
    margin: 2rem 1.1rem;
    padding: 2rem 1.5rem;
    text-align: center;
    background: #fff;
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.empty-state-card h2 {
    color: var(--secondary);
    margin-bottom: 0.5rem;
}

.empty-state-card p {
    color: var(--muted);
    margin-bottom: 1rem;
}

.order-items-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.order-items-list li {
    padding: 0.25rem 0;
    font-size: 0.95rem;
}

.order-items-list small {
    color: var(--muted);
}

.track-page .order-topbar strong {
    color: var(--secondary);
}

.contact-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0 1.1rem 0.75rem;
}

.site-footer .contact-bar {
    padding: 0 0 1rem;
    justify-content: center;
}

.contact-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--secondary);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    box-shadow: var(--shadow);
}

.contact-chip:hover {
    text-decoration: none;
    border-color: var(--primary);
    color: var(--primary-dark);
}

.contact-chip-whatsapp {
    background: #e8f8ef;
    border-color: #b7e4c7;
    color: #128c7e;
    padding: 0.45rem 0.55rem;
}

.contact-wa-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

.contact-chip-icon {
    font-size: 0.95rem;
    line-height: 1;
    flex-shrink: 0;
}

.contact-chip-number {
    color: inherit;
    white-space: nowrap;
}

@media (max-width: 520px) {
    .contact-bar {
        flex-wrap: nowrap;
        gap: 0.4rem;
    }

    .contact-chip:not(.contact-chip-whatsapp) {
        flex: 1 1 0;
        min-width: 0;
        justify-content: center;
        padding: 0.42rem 0.5rem;
        font-size: 0.78rem;
    }

    .contact-chip-whatsapp {
        flex: 1 1 0;
        min-width: 0;
        justify-content: center;
        padding: 0.42rem 0.5rem;
        font-size: 0.78rem;
    }

    .contact-chip-number {
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

.track-page .order-detail-card + .order-detail-card {
    margin-top: 1rem;
}

.pwa-install-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 200;
    padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom));
    background: rgba(55, 6, 23, 0.96);
    color: #fff;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.18);
}

.pwa-install-inner {
    max-width: 520px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.pwa-install-text {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.4;
}

.pwa-install-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.pwa-install-banner .btn-secondary {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.35);
}

.order-page .pwa-install-banner {
    bottom: calc(4.5rem + env(safe-area-inset-bottom));
}

@media (min-width: 640px) {
    .pwa-install-inner {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.audit-log-table .audit-col-when {
    white-space: nowrap;
    font-size: 0.88rem;
}

.audit-log-table .audit-action {
    font-weight: 600;
}

.audit-log-table .audit-col-details {
    max-width: 280px;
}

.audit-details {
    display: block;
    font-size: 0.88rem;
    color: var(--muted);
}

.pagination {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1rem 0 2rem;
}

.pagination-info {
    color: var(--muted);
    font-size: 0.9rem;
}

.audit-trail-box {
    margin: 1.25rem 0;
    padding: 1rem;
    background: #fffaf5;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.audit-trail-box h3 {
    margin: 0 0 0.75rem;
    font-size: 1rem;
}

.audit-trail-list {
    list-style: none;
    margin: 0 0 0.75rem;
    padding: 0;
}

.audit-trail-list li {
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--border);
}

.audit-trail-list li:last-child {
    border-bottom: none;
}

.audit-trail-meta,
.audit-trail-summary,
.audit-trail-details {
    display: block;
    font-size: 0.88rem;
    color: var(--muted);
}

.deliver-schedule-detail strong {
    display: block;
    margin-bottom: 0.35rem;
}

.serve-date-list {
    margin: 0.5rem 0 0;
    padding-left: 1.1rem;
    font-size: 0.9rem;
}

.orders-quick-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.orders-quick-filters .btn.is-active {
    border-color: var(--primary);
    background: #fff5eb;
}

.paid-not-delivered-banner {
    margin-bottom: 1rem;
}

.deliver-date-group-row td {
    background: #fff5eb;
    border-top: 2px solid var(--primary);
    padding-top: 0.85rem;
    padding-bottom: 0.35rem;
}

.deliver-on-cell strong {
    display: block;
}

.badge-compact {
    display: inline-block;
    margin-top: 0.25rem;
    font-size: 0.72rem;
}

.customer-order-count {
    display: inline-block;
    min-width: 2rem;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    background: #fff5eb;
    color: var(--primary);
    font-weight: 700;
    text-align: center;
    text-decoration: none;
}

.customer-order-count:hover {
    background: var(--primary);
    color: #fff;
}

.sms-compose-form textarea {
    width: 100%;
    min-height: 6rem;
    font: inherit;
}

.sms-compose-form .checkbox-label {
    display: block;
    margin: 0.75rem 0 0;
}

.promotion-admin-form .promotion-section {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
}

.promotion-admin-form .promotion-section h2 {
    margin: 0 0 0.35rem;
    font-size: 1.05rem;
}

.sidebar-user-role {
    display: block;
    font-size: 0.75rem;
    opacity: 0.75;
    margin-top: 0.15rem;
}

.permission-section {
    margin-top: 1.5rem;
}

.permission-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.permission-group {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.85rem 1rem;
    margin: 0;
}

.permission-group legend {
    font-weight: 600;
    padding: 0 0.35rem;
}

.permission-item {
    display: block;
    margin: 0.45rem 0 0;
    font-size: 0.92rem;
}

.admin-user-form .form-actions {
    margin-top: 1.25rem;
}
