:root {
    --ferno: #b82d27;
    --ferno-dark: #a5221d;
    --ink: #202124;
    --muted: #727981;
    --line: #eeeeef;
    --bg: #f5f5f6;
    --soft-red: #fff0f0;
}

* { box-sizing: border-box; }
body.panel-page { margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink); font-family: IRANSans, sans-serif; }
body.panel-page button, body.panel-page input { font: inherit; }
body.panel-page button { cursor: pointer; }
body.panel-page a { color: inherit; text-decoration: none; }
.hidden, [hidden] { display: none !important; }

.panel-shell { display: flex; min-height: 100vh; direction: rtl; }
.sidebar { position: fixed; inset: 0 0 0 auto; z-index: 30; display: flex; width: 286px; flex-direction: column; overflow-y: auto; border-left: 1px solid var(--line); background: #fff; }
.sidebar-brand { display: block; flex: 0 0 auto; color: inherit !important; }
.sidebar-hero { position: relative; display: block; height: 235px; margin-bottom: 32px; overflow: visible; border-radius: 0 0 48% 48% / 0 0 42% 42%; background-color: var(--ferno); background-image: radial-gradient(rgba(255,255,255,.17) 1.2px, transparent 1.3px); background-size: 22px 22px; text-align: center; }
.sidebar-wordmark { width: 166px; height: 74px; margin: 24px auto 0; object-fit: contain; }
.sidebar-mascot { position: absolute; bottom: -35px; left: 50%; width: 102px; max-height: 132px; object-fit: contain; transform: translateX(-50%); }
.sidebar-caption { padding: 4px 22px 12px; color: #92979d; font-size: .76rem; font-weight: 700; }
.side-nav { display: grid; gap: 5px; padding: 0 12px 16px; }
.side-link { display: flex; min-height: 48px; align-items: center; gap: 13px; border: 0; border-radius: 999px; background: transparent; color: var(--ink); padding: 0 18px; text-align: right; font-size: .94rem; font-weight: 600; transition: background .15s ease, color .15s ease; }
.side-link > span { display: grid; width: 22px; place-items: center; color: currentColor; font-size: 1.15rem; }
.side-link:hover { background: var(--soft-red); color: var(--ferno); }
.side-link.active { background: var(--ferno); color: #fff; box-shadow: 0 3px 0 rgba(128, 20, 16, .12); }
.sidebar-bottom { margin-top: auto; border-top: 1px solid var(--line); padding: 14px 16px 18px; }
.sidebar-user { display: flex; align-items: center; gap: 10px; }
.sidebar-user > div { display: grid; gap: 3px; min-width: 0; }
.sidebar-user b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .82rem; }
.sidebar-user small { color: var(--muted); font-size: .72rem; }
.user-avatar { display: grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; border-radius: 50%; background: var(--soft-red); color: var(--ferno); font-weight: 800; }
.logout-button { margin-right: auto; border: 0; background: none; color: var(--muted); font-size: 1.2rem; }
.back-to-site { display: block; margin-top: 13px; color: var(--ferno) !important; font-size: .8rem; font-weight: 700; }

.panel-main { min-width: 0; width: calc(100% - 286px); min-height: 100vh; margin-right: 286px; }
.panel-topbar { display: flex; min-height: 76px; align-items: center; gap: 18px; border-bottom: 1px solid var(--line); background: #fff; padding: 12px 28px; }
.panel-topbar h1 { margin: 4px 0 0; font-size: 1.16rem; font-weight: 800; }
.breadcrumb { color: var(--muted); font-size: .75rem; }
.breadcrumb b { margin: 0 7px; color: #c4c6c8; }
.breadcrumb strong { color: var(--ink); }
.topbar-tools { display: flex; align-items: center; gap: 15px; margin-right: auto; color: var(--muted); font-size: .76rem; }
.today-pill { display: flex; align-items: center; gap: 7px; border-radius: 999px; background: var(--soft-red); color: var(--ferno); padding: 7px 11px; font-weight: 700; }
.today-pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--ferno); }
.panel-content { padding: 22px 26px 38px; }
.notice-bar { display: flex; min-height: 66px; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 22px; border-radius: 17px; background-color: var(--ferno); background-image: radial-gradient(rgba(255,255,255,.16) 1.2px, transparent 1.3px); background-size: 22px 22px; color: #fff; padding: 13px 20px; }
.notice-bar > div { display: grid; gap: 4px; }
.notice-bar strong { font-size: .94rem; }
.notice-bar span { font-size: .75rem; opacity: .88; }
.notice-gift { border: 1px solid rgba(255,255,255,.35); border-radius: 999px; padding: 8px 12px; white-space: nowrap; }

.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat-card { display: flex; min-height: 105px; align-items: center; gap: 13px; border: 1px solid #f2f2f2; border-radius: 21px; background: #fff; padding: 17px; }
.stat-card > div { display: grid; gap: 5px; min-width: 0; }
.stat-card small { color: var(--muted); font-size: .78rem; }
.stat-card strong { font-size: 1.15rem; }
.stat-icon { display: grid; width: 50px; height: 50px; flex: 0 0 auto; place-items: center; border-radius: 17px; background: var(--soft-red); color: var(--ferno); font-size: 1.25rem; }
.stat-detail { color: var(--muted); font-size: .75rem; }
.dashboard-lower, .report-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.report-toolbar { margin-bottom: 8px; }
.report-toolbar > div { display: grid; gap: 4px; }
.report-controls { display: grid; gap: 14px; margin-bottom: 18px; border: 1px solid #f0d8d6; border-radius: 18px; background: #fffafa; padding: 14px 16px; }
.report-presets { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.report-presets > span { margin-left: 4px; color: var(--muted); font-size: .73rem; font-weight: 700; }
.report-preset { border: 1px solid #ead0cf; border-radius: 999px; background: #fff; color: var(--ferno); padding: 7px 11px; font-size: .7rem; font-weight: 700; }
.report-preset:hover { background: var(--soft-red); }
.report-filter-form { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; }
.report-filter-form label { display: grid; min-width: 150px; gap: 6px; color: #3b3d40; font-size: .74rem; font-weight: 700; }
.report-filter-form input, .report-filter-form select { width: 100%; min-height: 40px; border: 1px solid #e3e4e5; border-radius: 10px; outline: 0; background: #fff; padding: 8px 10px; font: inherit; font-size: .78rem; }
.report-filter-form input:focus, .report-filter-form select:focus { border-color: var(--ferno); box-shadow: 0 0 0 3px rgba(184,45,39,.1); }
.report-apply { min-height: 40px; border-radius: 10px; padding: 8px 16px; cursor: pointer; }
.report-timezone { margin: 0; color: var(--muted); font-size: .7rem; }
.report-summary-group { margin-bottom: 18px; }
.report-currency-label { margin-bottom: 8px; color: var(--muted); font-size: .76rem; }
.report-currency-label b { color: var(--ink); }
.report-summary-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 0; }
.report-chart { display: grid; gap: 12px; margin-bottom: 14px; }
.report-bar-row { display: grid; gap: 6px; }
.report-bar-row > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--muted); font-size: .72rem; }
.report-bar-row > div:first-child b { color: var(--ink); font-size: .72rem; }
.report-bar-track { height: 8px; overflow: hidden; border-radius: 99px; background: #f5e6e5; }
.report-bar-track i { display: block; height: 100%; border-radius: inherit; background: var(--ferno); }
.report-operation-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.report-operation-grid .simple-card { min-height: 76px; }
.report-subheading { margin: 14px 0 8px; font-size: .8rem; }
.content-card { min-width: 0; overflow: hidden; border: 1px solid #f0f0f1; border-radius: 21px; background: #fff; }
.card-heading { display: flex; min-height: 62px; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); padding: 14px 18px; }
.card-heading h2, .toolbar h2 { margin: 0; font-size: .95rem; font-weight: 800; }
.card-body { padding: 16px 18px; }
.toolbar { display: flex; min-height: 52px; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: right; font-size: .78rem; white-space: nowrap; }
th { background: #fafafa; color: var(--muted); font-size: .72rem; font-weight: 700; }
th, td { border-bottom: 1px solid var(--line); padding: 12px 10px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fffafa; }
td small { color: var(--muted); }
.badge { display: inline-flex; align-items: center; border-radius: 999px; background: #f1f2f3; color: #62676c; padding: 5px 9px; font-size: .7rem; font-weight: 700; }
.badge.green { background: #e8f6ec; color: #21834b; }
.badge.orange { background: #fff4de; color: #a86d08; }
.badge.red { background: #fde9e9; color: #b72d27; }
.row-actions { display: flex; align-items: center; gap: 8px; }
.mini-button { border: 1px solid #ead0cf; border-radius: 9px; background: #fff; color: var(--ferno); padding: 6px 10px; font-size: .72rem; font-weight: 700; white-space: nowrap; }
.mini-button:hover { background: var(--soft-red); }
.receipt-button { border-color: #c8e5d0; color: #21834b; }
.receipt-button:hover { background: #f1fbf3; }
.mini-button.danger { border-color: #f2d2d2; color: #b72d27; }
.order-confirm-dialog { width: min(440px, calc(100% - 32px)); border: 0; border-radius: 18px; padding: 24px; color: #262626; box-shadow: 0 20px 70px rgba(32, 22, 20, .22); }
.order-confirm-dialog::backdrop { background: rgba(25, 20, 19, .42); }
.order-confirm-dialog h2 { margin: 0 0 8px; font-size: 1.15rem; }
.order-confirm-dialog p { margin: 0 0 18px; color: #717780; font-size: .84rem; line-height: 1.8; }
.order-confirm-dialog label { display: block; margin-bottom: 7px; font-size: .82rem; font-weight: 700; }
.order-confirm-dialog select { width: 100%; border: 1px solid #e3e4e5; border-radius: 10px; background: #fff; padding: 11px 12px; }
.order-confirm-actions { display: flex; justify-content: flex-start; gap: 8px; margin-top: 20px; }
.order-confirm-submit { background: var(--ferno); color: #fff; }
.search-input, .login-form input { width: 100%; border: 1px solid #e3e4e5; border-radius: 11px; outline: 0; background: #fff; padding: 11px 13px; }
.search-input { box-sizing: border-box; max-width: 280px; min-height: 42px; padding: 9px 12px; font-size: .8rem; }
.toolbar > .row-actions { flex: 0 0 auto; }
.toolbar > .row-actions .search-input { width: 280px; height: 42px; flex: 0 1 280px; }
.toolbar > .row-actions [data-action="new-order"] { min-height: 42px; padding-inline: 15px; }
.search-input:focus, .login-form input:focus { border-color: var(--ferno); box-shadow: 0 0 0 3px rgba(184,45,39,.1); }
.empty-state, .loading-card { border: 1px dashed #e4e4e5; border-radius: 15px; color: var(--muted); padding: 24px; text-align: center; font-size: .82rem; }
.counter-order-form { display: grid; gap: 16px; }
.form-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.customer-lookup-fields { align-items: end; }
.customer-lookup-fields .mini-button { min-height: 42px; }
.form-fields label, [data-new-customer-fields] label { display: grid; gap: 7px; color: #3b3d40; font-size: .78rem; font-weight: 700; }
.form-fields input, .form-fields select, .form-fields textarea, [data-new-customer-fields] input { width: 100%; border: 1px solid #e3e4e5; border-radius: 10px; outline: 0; background: #fff; padding: 10px 12px; font: inherit; font-size: .8rem; }
.form-fields input:focus, .form-fields select:focus, .form-fields textarea:focus, [data-new-customer-fields] input:focus { border-color: var(--ferno); box-shadow: 0 0 0 3px rgba(184,45,39,.1); }
.full-field { grid-column: 1 / -1; }
.form-hint { margin: 9px 0 0; color: var(--muted); font-size: .72rem; }
.form-error { min-height: 20px; margin: 0; color: #b72d27; font-size: .78rem; }
.customer-match { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; border: 1px solid #f0d4d2; border-radius: 14px; background: #fffafa; padding: 12px 14px; text-align: right; }
.customer-match > div { display: grid; gap: 4px; }
.customer-match strong { color: var(--ferno); font-size: .75rem; }
.customer-match b { font-size: .86rem; }
.customer-match span { color: var(--muted); font-size: .76rem; }
.customer-match-new { border-color: #eadfbe; background: #fffaf0; }
.customer-match-new strong { color: #a86d08; }
.customer-match-confirmed { border-color: #c8e5d0; background: #f5fcf6; }
.customer-match-confirmed strong { color: #21834b; }
.modifier-option { display: inline-flex !important; grid-template-columns: auto 1fr !important; align-items: center; gap: 6px !important; border-radius: 999px; background: #faf1f0; color: #7b3b38 !important; padding: 6px 9px; font-size: .7rem !important; }
.modifier-option input { width: auto !important; padding: 0 !important; }
.counter-order-submit { justify-self: start; min-width: 160px; cursor: pointer; }
.simple-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.simple-card { display: grid; gap: 8px; min-height: 100px; align-content: center; border: 1px solid var(--line); border-radius: 15px; background: #fff; padding: 16px; }
.simple-card b { font-size: .87rem; }
.simple-card small { color: var(--muted); font-size: .73rem; }
.status-pill { display: inline-flex; width: fit-content; border-radius: 999px; background: #e8f6ec; color: #21834b; padding: 5px 9px; }
.panel-food { display: flex; align-items: center; gap: 9px; }
.panel-food-icon { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 10px; background: var(--soft-red); }
.panel-food small { display: block; color: var(--muted); font-size: .68rem; font-weight: 400; }
.menu-editor-dialog { width: min(900px, calc(100% - 28px)); max-height: calc(100vh - 28px); overflow: auto; border: 0; border-radius: 20px; padding: 0; color: var(--ink); box-shadow: 0 24px 80px rgba(32, 22, 20, .24); }
.menu-editor-dialog::backdrop { background: rgba(25, 20, 19, .46); }
.menu-editor-dialog form { display: grid; gap: 18px; padding: 22px; }
.menu-editor-heading, .menu-editor-section > header, .menu-editor-actions { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.menu-editor-heading { border-bottom: 1px solid var(--line); padding-bottom: 14px; }
.menu-editor-heading small { color: var(--ferno); font-size: .72rem; font-weight: 800; }
.menu-editor-heading h2 { margin: 5px 0 0; font-size: 1.05rem; }
.menu-editor-close { border: 0; background: transparent; color: var(--muted); font-size: 1.55rem; line-height: 1; }
.menu-editor-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.menu-editor-grid label, .menu-editor-row label { display: grid; gap: 7px; color: #3b3d40; font-size: .76rem; font-weight: 700; }
.menu-editor-grid input, .menu-editor-grid select, .menu-editor-grid textarea, .menu-editor-row input { width: 100%; border: 1px solid #e3e4e5; border-radius: 10px; outline: 0; background: #fff; padding: 10px 12px; font: inherit; font-size: .8rem; }
.menu-editor-grid input:focus, .menu-editor-grid select:focus, .menu-editor-grid textarea:focus, .menu-editor-row input:focus { border-color: var(--ferno); box-shadow: 0 0 0 3px rgba(184,45,39,.1); }
.menu-editor-section { display: grid; gap: 13px; border: 1px solid var(--line); border-radius: 15px; padding: 14px; }
.menu-editor-section > header { align-items: flex-start; }
.menu-editor-section h3 { margin: 0 0 4px; font-size: .84rem; }
.menu-editor-section header small { color: var(--muted); font-size: .7rem; }
.menu-editor-row { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(120px, .8fr) auto auto; align-items: end; gap: 9px; border-top: 1px solid var(--line); padding-top: 12px; }
.menu-editor-row + .menu-editor-row { margin-top: 11px; }
.menu-editor-row .menu-check, .menu-editor-options .menu-check { display: flex; align-items: center; gap: 7px; min-height: 40px; white-space: nowrap; }
.menu-editor-row .menu-check input, .menu-editor-options .menu-check input { width: auto; }
.menu-editor-options { display: flex; flex-wrap: wrap; gap: 18px; }
.menu-editor-actions { justify-content: flex-start; border-top: 1px solid var(--line); padding-top: 16px; }
.menu-editor-actions .button-red { min-width: 130px; }
.toast { position: fixed; right: 50%; bottom: 22px; z-index: 60; border-radius: 12px; background: #202124; color: white; padding: 12px 18px; opacity: 0; pointer-events: none; transform: translate(50%, 10px); transition: .2s; }
.toast.show { opacity: 1; transform: translate(50%, 0); }
.toast.error { background: #b72d27; }
.mobile-menu { display: none; border: 0; border-radius: 10px; background: var(--soft-red); color: var(--ferno); padding: 8px 11px; }
.mobile-overlay { display: none; }

.panel-login { display: grid; min-height: 100vh; grid-template-columns: 1fr 1fr; background: #fff; }
.login-decoration { position: relative; display: flex; min-height: 100vh; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; background-color: var(--ferno); background-image: radial-gradient(rgba(255,255,255,.17) 1.2px, transparent 1.3px); background-size: 22px 22px; color: #fff; }
.login-wordmark { width: min(270px, 65%); height: 115px; object-fit: contain; }
.login-mascot { width: 145px; max-height: 190px; object-fit: contain; margin-top: -2px; }
.login-decoration p { margin: 15px 0; font-weight: 700; }
.login-form { display: flex; width: min(420px, calc(100% - 44px)); flex-direction: column; justify-content: center; gap: 17px; margin: auto; padding: 30px 0; }
.login-form h1 { margin: 0; font-size: 1.55rem; }
.login-form > p { margin: -8px 0 4px; color: var(--muted); font-size: .88rem; }
.login-form label { display: grid; gap: 8px; font-size: .82rem; font-weight: 700; }
.eyebrow { color: var(--ferno); font-size: .78rem; font-weight: 800; }
.eyebrow i { display: inline-block; width: 7px; height: 7px; margin-left: 5px; border-radius: 50%; background: var(--ferno); }
.button-red { border: 0; border-radius: 12px; background: var(--ferno); color: #fff; padding: 12px 16px; font-weight: 800; }
.button-red:hover { background: var(--ferno-dark); }
.login-error { color: #b72d27; font-size: .78rem; }
.login-back { color: var(--muted) !important; text-align: center; font-size: .8rem; }

@media (max-width: 1100px) {
    .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .panel-content { padding: 18px; }
}
@media (max-width: 900px) {
    .form-fields { grid-template-columns: 1fr; }
    .customer-lookup-fields { grid-template-columns: minmax(0, 1fr) auto; }
    .menu-editor-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .menu-editor-row .mini-button { justify-self: start; }
}
@media (max-width: 1200px) {
    .table-wrap { overflow: visible; }
    .table-wrap table { display: block; white-space: normal; }
    .table-wrap thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; clip-path: inset(50%); }
    .table-wrap tbody { display: grid; gap: 10px; }
    .table-wrap tbody tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
    .table-wrap tbody td { display: flex; min-width: 0; flex-direction: column; align-items: flex-start; border: 0; padding: 10px; overflow-wrap: anywhere; white-space: normal; }
    .table-wrap tbody td::before { content: attr(data-label); margin-bottom: 4px; color: var(--muted); font-size: .66rem; font-weight: 700; }
    .table-wrap .row-actions { flex-wrap: wrap; }
}
@media (max-width: 760px) {
    body.panel-page input,
    body.panel-page select,
    body.panel-page textarea { font-size: 16px; }
    .sidebar { width: min(286px, 86vw); transform: translateX(105%); transition: transform .2s ease; box-shadow: -12px 0 35px rgba(20,20,20,.12); }
    .sidebar.open { transform: translateX(0); }
    .panel-main { width: 100%; margin-right: 0; }
    .mobile-menu { display: block; }
    .mobile-overlay.show { position: fixed; inset: 0; z-index: 20; display: block; background: rgba(20,20,20,.38); }
    .panel-topbar { min-height: 66px; gap: 11px; padding: 10px 14px; }
    .panel-topbar h1 { font-size: 1rem; }
    .topbar-tools { gap: 8px; font-size: .68rem; }
    .topbar-date { display: none; }
    .today-pill { padding: 6px 8px; }
    .panel-content { padding: 14px 12px 28px; }
    .notice-bar { align-items: flex-start; flex-direction: column; padding: 14px; }
    .notice-gift { display: none; }
    .toolbar { align-items: stretch; flex-direction: column; }
    .toolbar > .row-actions { width: 100%; }
    .toolbar > .row-actions .search-input { width: auto; max-width: none; flex: 1 1 auto; }
    .toolbar > .row-actions [data-action="new-order"] { flex: 0 0 auto; }
    .stats-grid { gap: 9px; }
    .stat-card { min-height: 88px; gap: 9px; padding: 11px; }
    .stat-icon { width: 39px; height: 39px; border-radius: 13px; }
    .stat-card small { font-size: .68rem; }
    .stat-card strong { font-size: .98rem; }
    .dashboard-lower, .report-grid { grid-template-columns: 1fr; }
    .card-body { padding: 12px; }
    .card-heading { min-height: 54px; padding: 12px 14px; }
    .panel-login { grid-template-columns: 1fr; }
    .login-decoration { min-height: 220px; }
    .login-wordmark { width: 160px; height: 68px; }
    .login-mascot { width: 78px; max-height: 95px; }
    .login-decoration p { margin: 4px 0 12px; font-size: .82rem; }
    .mobile-menu { display: grid; width: 44px; height: 44px; min-width: 44px; min-height: 44px; place-items: center; padding: 0; }
}
@media (max-width: 520px) {
    .customer-lookup-fields { grid-template-columns: 1fr; }
    .menu-editor-grid { grid-template-columns: 1fr; }
    .menu-editor-row { grid-template-columns: 1fr; }
    .menu-editor-dialog form { padding: 16px; }
}
.settings-form{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:14px;max-width:760px;margin-top:16px}.settings-form label{display:grid;gap:7px;font-size:.82rem;font-weight:700}.settings-form input,.settings-form select{width:100%;border:1px solid #e3e4e5;border-radius:10px;background:#fff;padding:10px 12px;outline:0}.settings-form input:focus,.settings-form select:focus{border-color:var(--ferno);box-shadow:0 0 0 3px rgba(184,45,39,.1)}.settings-form button,.settings-form p{justify-self:start}.staff-create-card{margin-bottom:16px}.staff-form{max-width:none;margin-top:0}.staff-form .form-error{grid-column:1 / -1}

.panel-content:has(.counter-order-form) > .notice-bar { display: none; }
.counter-toolbar { min-height: 38px; margin-bottom: 12px; }
.counter-order-form { gap: 12px; }
.counter-order-layout { display: grid; grid-template-columns: minmax(250px, 28fr) minmax(0, 72fr); gap: 12px; align-items: start; }
.counter-order-side { display: grid; gap: 12px; min-width: 0; }
.counter-order-form .card-heading { min-height: 52px; }
.counter-order-form .card-body, .counter-menu { padding: 14px 18px; }
.counter-order-form .customer-match { padding: 10px; }
body.panel-page .counter-order-form [data-action="lookup-customer"],
body.panel-page .counter-order-form [data-action="confirm-customer"] { font-size: .75rem; white-space: normal; }
.counter-order-form .customer-lookup-fields { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.counter-order-form .customer-match > div { min-width: 0; overflow-wrap: anywhere; }
.counter-order-form [data-new-customer-fields], .counter-order-form [data-delivery-fields] { margin-top: 12px; }
.counter-search { position: relative; display: block; max-width: 400px; margin-inline-start: auto; }
.counter-search span { position: absolute; inset-inline-end: 12px; top: 50%; transform: translateY(-50%); font-size: 1.25rem; pointer-events: none; }
.counter-search input { width: 100%; min-height: 44px; padding: 8px 12px 8px 36px; border: 1px solid #dedee0; border-radius: 11px; background: #fafafa; }
.counter-categories { display: flex; flex-wrap: wrap; gap: 6px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.counter-categories button { display: grid; place-items: center; gap: 4px; min-width: 78px; min-height: 64px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 13px; background: #faf9f9; color: var(--ink); font-size: .75rem; font-weight: 700; }
.counter-categories button span { font-size: 1.15rem; }
.counter-categories button[aria-pressed="true"] { border-color: var(--ferno); background: var(--ferno); color: #fff; }
.counter-menu h2 { margin: 15px 0 12px; font-size: .95rem; }
.counter-products { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 8px; max-height: 380px; overflow: auto; padding: 1px 1px 4px; }
.counter-products > .empty-state { grid-column: 1 / -1; }
.counter-product { display: grid; grid-template-columns: 62px minmax(0, 1fr) auto; align-items: center; gap: 8px; min-height: 86px; padding: 8px; border: 1px solid var(--line); border-radius: 13px; box-shadow: 0 1px 2px #2021240d; }
.counter-image { display: block; width: 62px; height: 62px; object-fit: contain; border-radius: 8px; }
.counter-product b, .counter-product small, .counter-item-name small { display: block; }
.counter-product b { font-size: .8rem; overflow-wrap: anywhere; }
.counter-product small { margin-top: 4px; font-size: .72rem; color: var(--muted); }
.counter-product-actions { display: grid; gap: 3px; }
.counter-add { width: 34px; height: 34px; padding: 0; font-size: 1.1rem; }
.counter-add:disabled { opacity: .45; cursor: default; }
.counter-fulfillment { margin: 0 0 14px; padding: 0; border: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.counter-fulfillment legend { margin-bottom: 8px; padding: 0; font-size: .78rem; font-weight: 700; }
.counter-fulfillment label { position: relative; cursor: pointer; }
.counter-fulfillment input { position: absolute; opacity: 0; }
.counter-fulfillment span { display: grid; min-height: 40px; place-items: center; border: 1px solid #e3e4e5; border-radius: 10px; font-size: .78rem; }
.counter-fulfillment input:checked + span { color: var(--ferno); border-color: var(--ferno); background: var(--soft-red); font-weight: 700; }
.counter-fulfillment input:focus-visible + span { outline: 2px solid var(--ferno); outline-offset: 2px; }
.counter-item-name { display: flex; align-items: center; gap: 10px; }
.counter-item-name .counter-image { width: 42px; height: 42px; }
.counter-quantity { width: 76px; padding: 5px 8px; border: 1px solid #ddd; border-radius: 8px; }
.counter-order-footer { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; border-top: 1px solid var(--line); padding-top: 14px; margin-top: 10px; }
.counter-order-footer button, .counter-option-actions button { min-height: 42px; }
.counter-total { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-inline-start: auto; padding: 10px 14px; border-radius: 10px; background: var(--soft-red); font-size: .8rem; font-weight: 700; }
.counter-total output { color: var(--ferno); font-size: 1.04rem; }
.counter-order-form .form-error:empty { min-height: 0; }
.counter-options h2 { margin-bottom: 16px; }
.counter-modifiers, .counter-option-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.counter-option-actions { justify-content: end; }

@media (min-width: 761px) {
    .panel-main:has(.counter-order-form) .panel-topbar { display: none; }
}
@media (max-width: 1050px) {
    .counter-order-layout { grid-template-columns: minmax(230px, 1fr) minmax(0, 2fr); }
    .counter-products { grid-template-columns: repeat(auto-fill, minmax(min(100%, 185px), 1fr)); }
}
@media (max-width: 680px) {
    .counter-order-layout { grid-template-columns: minmax(0, 1fr); }
    .counter-menu { grid-row: 1; }
    .counter-toolbar { flex-direction: row; align-items: center; }
    .counter-order-form .card-body, .counter-menu { padding: 12px; }
    .counter-order-footer .counter-total { flex-basis: 100%; justify-content: space-between; margin: 0; order: -1; }
    .counter-products { max-height: 360px; }
}
