:root {
  color-scheme: light;
  --paper: #f7f7ef;
  --surface: #fffefa;
  --forest: #203e2b;
  --forest-deep: #172e21;
  --ink: #20362a;
  --muted: #5b6d61;
  --line: #e3e7db;
  --sage: #eaf0e2;
  --peach: #f6e3d3;
  --orange: #dc7a47;
  --warn: #8a4931;
  --radius: 20px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei UI", sans-serif;
  background: var(--paper);
  color: var(--ink);
  font-synthesis: none;
  -webkit-text-size-adjust: 100%;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 300px; }
body:has(dialog[open]) { overflow: hidden; }
button, input, select { font: inherit; }
button, input, select { min-height: 42px; }
button { cursor: pointer; }
button, a, summary { touch-action: manipulation; }
button:disabled { cursor: wait; opacity: .58; }
:focus-visible { outline: 3px solid #ad552f; outline-offset: 3px; }
input, select { max-width: 100%; }
fieldset { min-width: 0; min-inline-size: 0; }
a { color: inherit; }
svg { display: inline-block; vertical-align: middle; }
.sprite { width: 0; height: 0; position: absolute; overflow: hidden; }
.icon { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
[hidden] { display: none !important; }
.sr-only { position: absolute; height: 1px; width: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; clip-path: inset(50%); }
.boot { min-height: 65vh; display: grid; place-items: center; font-weight: 700; }
html:lang(zh) .boot > [lang="en-SG"], html:lang(en) .boot > [lang="zh-SG"] { display: none; }

.brand { display: inline-flex; align-items: center; width: fit-content; }
.brand-logo { display: block; width: 148px; height: auto; border-radius: 5px; }
.eyebrow { display: flex; align-items: center; gap: 8px; color: var(--muted); font-weight: 750; font-size: 10px; letter-spacing: .16em; line-height: 1.4; }
.eyebrow::before { content: ""; width: 7px; height: 7px; background: var(--orange); border-radius: 50%; }

.login-wrap { min-height: 100svh; max-width: 1120px; margin: 0 auto; padding: 24px 30px 30px; display: grid; grid-template-rows: auto 1fr auto; }
.login-header, .login-footer { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.staff-header-tools { display: flex; align-items: center; gap: 8px; }
.login-footer { color: var(--muted); font-size: 12px; }
.text-link { display: inline-flex; align-items: center; gap: 7px; color: var(--forest); text-decoration: none; font-size: 13px; font-weight: 750; min-height: 40px; }
.text-link:hover { text-decoration: underline; }
.login-body { display: grid; grid-template-columns: 1.04fr 1fr; max-width: 940px; width: 100%; align-self: center; justify-self: center; border: 1px solid var(--line); border-radius: 28px; overflow: hidden; background: var(--surface); margin: 28px 0; }
.login-art { display: flex; flex-direction: column; min-height: 430px; padding: 38px; justify-content: space-between; background: var(--forest); color: #f9f9ec; position: relative; isolation: isolate; overflow: hidden; }
.login-art::before, .login-art::after { content: ""; border: 1px solid #a8c29e45; border-radius: 45%; width: 280px; height: 360px; position: absolute; right: -76px; top: -103px; transform: rotate(40deg); z-index: -1; }
.login-art::after { width: 270px; height: 340px; right: -120px; top: -67px; }
.login-art h2 { font-size: clamp(28px, 4vw, 46px); line-height: 1.2; margin: 12px 0 16px; letter-spacing: -.04em; }
.login-art p { color: #dce7d2; margin: 0; line-height: 1.75; max-width: 24ch; }
.login-art .eyebrow { color: #dce7d2; }
.login-tile { display: grid; place-items: center; width: 60px; height: 60px; color: #dce9cc; background: #f7f7ef1a; border: 1px solid #e1edd536; border-radius: 17px; }
.login-tile .icon { width: 32px; height: 32px; }
.login-main { display: grid; align-content: center; padding: clamp(25px, 4vw, 50px); }
.login-main h1 { margin: 10px 0 6px; line-height: 1.2; font-size: 29px; }
.login-main p { color: var(--muted); font-size: 14px; margin: 0 0 25px; line-height: 1.55; }
.login-main form { display: grid; gap: 14px; }
.login-main .form-alert { min-height: 0; margin: 0; color: #872f26; }
.login-main .form-alert:empty { display: none; }

.staff-shell { display: grid; grid-template-columns: 222px minmax(0, 1fr); min-height: 100svh; }
.sidebar { background: var(--forest-deep); color: #fbfbec; padding: 27px 18px 18px; display: flex; flex-direction: column; gap: 26px; position: sticky; top: 0; height: 100svh; }
.sidebar { overflow-y: auto; }
.sidebar .brand { margin-left: 8px; }
.side-label { display: block; margin: 8px 10px 8px; font-size: 10px; letter-spacing: .13em; color: #b8c9b3; font-weight: 750; }
.nav-group { display: grid; gap: 5px; }
.mobile-navigation { display: none; }
.nav-link { display: flex; width: 100%; align-items: center; gap: 10px; border: 1px solid transparent; border-radius: 11px; background: transparent; color: #dbe6d7; padding: 8px 11px; font-weight: 650; font-size: 13px; text-decoration: none; min-height: 43px; text-align: left; white-space: nowrap; }
.nav-link:hover { background: #ffffff12; }
.nav-link[aria-current="page"] { border-color: #e1edd52e; background: #e1edd51f; color: #fcf9e9; }
.side-footer { margin-top: auto; display: grid; gap: 4px; }
.side-role { display: flex; gap: 9px; align-items: center; padding: 11px; margin-bottom: 4px; border-radius: 12px; color: #e0ead9; font-weight: 700; font-size: 12px; background: #ffffff0e; }
.side-role .icon { color: #bbd3ac; }
.staff-content { width: min(100%, 1392px); padding: 34px clamp(20px, 3.8vw, 55px) 55px; margin-inline: auto; }
.workspace-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 22px; }
.workspace-header h1 { margin: 8px 0 4px; color: var(--forest); font-size: clamp(29px, 4vw, 43px); line-height: 1.15; letter-spacing: -.05em; }
.workspace-header p { color: var(--muted); margin: 0; line-height: 1.65; font-size: 14px; }
.header-tag { display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto; background: var(--sage); color: var(--forest); border: 1px solid #dbe5d4; padding: 7px 11px; border-radius: 99px; font-weight: 700; font-size: 12px; }
.header-tag .icon { width: 16px; height: 16px; }
.mobile-tools, .mobile-footer { display: none; }

.notice { display: flex; align-items: center; gap: 10px; border-radius: 13px; padding: 11px 13px; margin: 0 0 16px; line-height: 1.5; font-size: 13px; font-weight: 650; }
.notice:empty { display: none; }
.notice.error, .form-alert { background: #fff0eb; color: #872f26; }
.form-alert { padding: 10px; border-radius: 8px; font-size: 13px; line-height: 1.5; }
.notice.success, .form-alert.success { background: var(--sage); color: var(--forest); }
.notice.info { background: #f7ebdc; color: #76482d; }
.notice button { margin-left: auto; }
.notice > button { flex: 0 0 auto; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 18px; }
.stat { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; background: var(--surface); }
.stat-label { font-size: 12px; font-weight: 750; color: var(--muted); }
.stat-value { font-size: 30px; color: var(--forest); font-weight: 780; line-height: 1.05; grid-column: 1; font-variant-numeric: tabular-nums; }
.stat-icon { display: grid; place-items: center; grid-column: 2; grid-row: 1 / span 2; width: 38px; height: 38px; border-radius: 12px; background: var(--sage); color: var(--forest); }
.stat:first-child .stat-icon { background: var(--peach); color: #874928; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(15px, 2.4vw, 25px); min-width: 0; }
.panel-header { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 12px; margin-bottom: 17px; }
.panel-header h2 { margin: 0 0 4px; font-size: 19px; line-height: 1.3; color: var(--forest); }
.panel-header p { color: var(--muted); margin: 0; font-size: 13px; line-height: 1.6; }
.toolbar, .panel-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.toolbar { justify-content: space-between; margin-bottom: 14px; }
.toolbar .count-label { font-size: 12px; color: var(--muted); white-space: nowrap; }

.button { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 13px; background: var(--surface); text-decoration: none; color: var(--forest); font-size: 13px; font-weight: 750; line-height: 1.35; }
.button:hover { background: #f0f3e8; }
.button .icon { width: 17px; height: 17px; }
.button-primary { background: var(--forest); color: #fffef3; border-color: var(--forest); }
.button-primary:hover { background: #31543d; }
.button-quiet { background: transparent; border-color: transparent; }
.language-toggle { min-width: 44px; padding-inline: 9px; border-color: var(--line); white-space: nowrap; }
.sidebar .language-toggle { color: #fbfbec; border-color: #e1edd536; }
.sidebar .language-toggle:hover { background: #ffffff12; }
.side-footer .language-toggle { justify-self: start; margin: 0 0 4px 8px; }
.button-danger { color: #872f26; }
.button-full { width: 100%; }
.button-small { min-height: 35px; padding: 6px 10px; font-size: 12px; }
.button-icon { width: 38px; min-height: 38px; padding: 7px; }
.filters { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.filter { border: 1px solid var(--line); border-radius: 99px; background: transparent; color: var(--muted); font-weight: 750; font-size: 12px; min-height: 36px; padding: 6px 11px; }
.filter:hover { color: var(--forest); background: var(--sage); }
.filter[aria-pressed="true"] { background: var(--sage); color: var(--forest); border-color: #dce6d7; }
.field { display: grid; gap: 7px; color: var(--forest); font-size: 13px; font-weight: 750; }
.field input, .field select, .search input { width: 100%; padding: 8px 11px; border: 1px solid #cdd8c9; border-radius: 10px; background: #fffefa; color: var(--ink); }
.field input, .field select, .field textarea { min-width: 0; max-width: 100%; }
.field small { color: var(--muted); font-weight: 450; font-size: 12px; line-height: 1.5; }
.form-fields { display: grid; gap: 16px; }
.form-fields .panel-actions { margin-top: 5px; }
.setting-grid { display: grid; grid-template-columns: 1.18fr 1fr; gap: 14px; align-items: start; }
.setting-preview { background: var(--sage); border-color: #dfe9dc; }
.setting-preview .setting-icon, .empty-icon { display: grid; place-items: center; background: #dce8d3; color: var(--forest); border-radius: 15px; width: 48px; height: 48px; }
.setting-preview .setting-icon .icon, .empty-icon .icon { width: 25px; height: 25px; }
.setting-preview h3 { margin: 14px 0 7px; }
.setting-preview p { color: var(--muted); font-size: 13px; line-height: 1.65; margin: 8px 0; }
.setting-preview .postal-value { color: var(--forest); font-size: 27px; font-weight: 800; letter-spacing: .09em; }

.status { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 99px; background: #eef0e9; color: #4d6052; font-size: 11px; font-weight: 800; line-height: 1.4; white-space: nowrap; }
.status::before { content: ""; background: currentColor; border-radius: 50%; width: 6px; height: 6px; flex: 0 0 auto; }
.status-new { background: #f9e8d7; color: #844421; }
.status-progress { background: #f4edcf; color: #65531f; }
.status-ready { background: #dfece0; color: #315e42; }
.status-delivering { background: #e2edf1; color: #2e5668; }
.status-success { background: #e5eedb; color: #365831; }
.status-cancelled { background: #f3e8e6; color: #874940; }
.order-grid { display: grid; gap: 10px; }
.order-card { background: #fffefa; border: 1px solid var(--line); border-radius: 13px; min-width: 0; overflow: hidden; }
.order-card-head { padding: 13px; display: grid; gap: 9px; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.3fr) auto; align-items: start; }
.order-id { font-weight: 800; font-size: 14px; color: var(--forest); overflow-wrap: anywhere; }
.order-time, .order-summary, .menu-item-en { color: var(--muted); font-size: 12px; margin-top: 3px; overflow-wrap: anywhere; }
.order-customer { font-size: 13px; font-weight: 750; overflow-wrap: anywhere; }
.order-amount { font-weight: 800; font-size: 14px; margin-top: 4px; text-align: right; font-variant-numeric: tabular-nums; }
.order-card details { border-top: 1px solid var(--line); }
.order-card summary { color: var(--forest); font-weight: 750; font-size: 12px; padding: 11px 13px; cursor: pointer; }
.order-card summary:hover { background: var(--paper); }
.order-expanded { padding: 0 13px 13px; }
.line-items { margin: 0; padding: 0; list-style: none; font-size: 13px; }
.line-items li { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 8px 0; }
.line-items li span { overflow-wrap: anywhere; }
.line-items li > .line-item-total { flex: none; white-space: nowrap; font-variant-numeric: tabular-nums; }
.line-item-description { display: grid; justify-items: start; gap: 5px; min-width: 0; }
.line-item-name { min-width: 0; }
.line-item-preference { display: inline-block; max-width: 100%; padding: 3px 7px; border: 1px solid #debe97; border-radius: 6px; background: #fff1dc; color: #76451d; font-size: 12px; font-weight: 750; line-height: 1.45; white-space: normal; }
.order-note { font-size: 12px; color: var(--muted); background: var(--paper); border-radius: 8px; line-height: 1.6; margin: 9px 0 0; padding: 7px 9px; overflow-wrap: anywhere; }
.customer-order-note { color: var(--forest); border-left: 3px solid var(--orange); white-space: pre-wrap; }
.order-delivery-slot { color: var(--forest); font-weight: 750; }
.order-card > .customer-order-note { margin: 0 13px 12px; }
.courier-card > .customer-order-note { margin: 9px 0 0; }
.order-card .panel-actions { padding: 0 13px 13px; }
.empty { display: grid; place-items: center; text-align: center; padding: 37px 12px; border: 1px dashed #d8e0d2; background: #f8f9f3; border-radius: 13px; }
.empty h3 { color: var(--forest); font-size: 15px; margin: 13px 0 4px; }
.empty p { color: var(--muted); font-size: 13px; margin: 0; }

.courier-shell { display: block; }
.courier-top { background: var(--forest-deep); color: #fffef0; }
.courier-top-inner { display: flex; justify-content: space-between; align-items: center; gap: 12px; max-width: 866px; margin-inline: auto; padding: 15px 20px; }
.courier-top .button { background: #ffffff12; color: #f7faeb; border-color: #ffffff24; }
.courier-top .button:hover { background: #ffffff25; }
.courier-shell .staff-content { max-width: 866px; }
.courier-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.courier-card { padding: 14px; }
.courier-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.courier-address { display: flex; align-items: flex-start; gap: 8px; margin-top: 11px; padding: 12px 10px; background: #eff3e9; border-radius: 11px; }
.courier-address p { color: var(--forest); font-size: 14px; margin: 0; line-height: 1.55; font-weight: 750; overflow-wrap: anywhere; }
.courier-address p span { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; }
.courier-address p .courier-unit { color: var(--forest); font-size: 15px; font-weight: 800; }
.courier-card .panel-actions { padding: 12px 0 0; }
.courier-card .panel-actions > * { flex: 1; }
.courier-card details { margin-top: 12px; }
.courier-card summary { padding: 10px 0 0; }
.courier-card .order-expanded { padding: 6px 0 0; }

.search { display: flex; align-items: center; position: relative; min-width: min(100%, 230px); }
.search .icon { position: absolute; left: 9px; color: var(--muted); }
.search input { padding-left: 34px; min-height: 38px; font-size: 13px; }
.menu-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.menu-table th { color: var(--muted); text-align: left; padding: 8px 7px; font-size: 11px; white-space: nowrap; }
.menu-table td { padding: 10px 7px; border-top: 1px solid var(--line); vertical-align: middle; }
.menu-table .name-cell { width: 42%; overflow-wrap: anywhere; }
.menu-table .price-cell { white-space: nowrap; font-variant-numeric: tabular-nums; }
.promotion-table .promo-price-cell { font-weight: 750; color: var(--forest); }
.menu-item-name { font-weight: 800; color: var(--forest); }
.menu-preference-tag { display: inline-block; max-width: 100%; margin-top: 5px; padding: 2px 6px; border-radius: 5px; background: var(--sage); color: var(--forest); font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; }
.menu-item-category { color: var(--muted); }
.menu-table .menu-actions { width: 1px; text-align: right; }
.menu-stock-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.availability-button { white-space: normal; min-width: 65px; }
.order-scopes { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.order-scopes .button[aria-pressed="true"] { background: var(--forest); border-color: var(--forest); color: var(--surface); }
.order-view-hint { margin: 0 0 14px; color: var(--muted); font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.refund-due-entry { margin-top: 10px; color: #8c3e23; background: #fff1e5; border-color: #e6bda4; white-space: normal; }
.refund-due-note { display: grid; gap: 4px; margin: 10px 0; padding: 10px; border: 1px solid #e6bda4; border-radius: 9px; background: #fff1e5; color: #8c3e23; font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.order-card > .refund-due-note { margin-inline: 13px; }
.alert-primary-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.pagination { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; align-items: center; margin-top: 10px; color: var(--muted); font-size: 12px; }
.pagination > span { min-width: 0; overflow-wrap: anywhere; text-align: center; }
.mobile-price-label, .table-scroll-hint { display: none; }
.disclosure-panel { border-top: 1px solid var(--line); margin-top: 10px; }
.disclosure-panel > summary { cursor: pointer; min-height: 44px; align-content: center; color: var(--forest); font-size: 12px; font-weight: 750; padding-block: 8px; line-height: 1.5; }
.order-filter-panel { margin-bottom: 16px; }
.order-filter-panel > summary .icon { margin-right: 6px; }
.record-filters { display: grid; grid-template-columns: minmax(180px, 1.3fr) repeat(3, minmax(120px, 1fr)) auto; gap: 10px; align-items: end; margin: 16px 0; }
.record-filters .field { min-width: 0; }
.record-filters .field input, .record-filters .field select { min-width: 0; }
.order-date-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.order-date-filters > .field:first-child, .order-date-filters > .order-sort-field { grid-column: 1 / -1; }
.records-list { display: grid; gap: 12px; }
.record-card { border: 1px solid var(--line); border-radius: 13px; padding: 14px; min-width: 0; }
.record-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.record-header h3 { margin: 0; font-size: 15px; overflow-wrap: anywhere; }
.record-meta { margin: 7px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.record-card .panel-actions { margin-top: 12px; }
.data-pairs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; font-size: 13px; }
.data-pairs div { min-width: 0; overflow-wrap: anywhere; }
.data-pairs dt { color: var(--muted); margin-bottom: 3px; font-size: 12px; }
.data-pairs dd { margin: 0; font-weight: 700; }
.field textarea { width: 100%; min-height: 85px; resize: vertical; font: inherit; padding: 10px; border: 1px solid #cdd8c9; border-radius: 10px; background: var(--surface); color: var(--ink); }
.dialog-section { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 16px; }
.dialog-section h3 { font-size: 15px; margin: 0 0 12px; }
.dialog-section .form-fields { gap: 12px; }
.timeline { list-style: none; padding: 0; margin: 0; display: grid; gap: 13px; }
.timeline li { border-left: 2px solid #cddbc5; padding-left: 10px; font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.timeline strong, .timeline time { display: block; }
.timeline time { color: var(--muted); }
.alert-strip { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); padding: 13px; margin-bottom: 18px; }
.alert-strip-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.alert-strip .panel-actions { margin-top: 8px; }
.alert-strip p { font-size: 12px; line-height: 1.55; color: var(--muted); margin: 8px 0 0; }
.alert-strip .alert-error { color: #872f26; }
.report-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.report-stats .stat-value { font-size: 24px; }
.report-stats .stat { min-width: 0; grid-template-columns: minmax(0, 1fr); }
.report-stats .stat-value { min-width: 0; overflow-wrap: anywhere; }
.table-scroll { overflow-x: auto; overscroll-behavior-x: contain; }
.report-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.report-table th, .report-table td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: left; }
.report-table th { color: var(--muted); white-space: nowrap; }
.report-table td { font-variant-numeric: tabular-nums; }
.conflict-message { background: #fff0eb; border-radius: 9px; padding: 10px; color: #872f26; font-size: 12px; line-height: 1.5; margin-bottom: 12px; }
.commerce-card { margin: 0 0 16px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.commerce-card legend, .commerce-day legend { color: var(--forest); font-size: 13px; font-weight: 800; padding-inline: 5px; overflow-wrap: anywhere; }
.commerce-card .panel-actions { margin-top: 12px; }
.commerce-slide-layout { display: grid; grid-template-columns: minmax(0, 180px) minmax(0, 1fr); gap: 16px; align-items: start; margin-bottom: 14px; }
.commerce-image-preview { display: grid; place-items: center; width: 100%; min-width: 0; aspect-ratio: 16 / 10; border: 1px solid var(--line); border-radius: 11px; overflow: hidden; background: var(--sage); color: var(--muted); font-size: 12px; text-align: center; }
.commerce-image-preview img { display: block; width: 100%; height: 100%; object-fit: cover; }
.commerce-two-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.commerce-upload-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: end; padding: 14px; margin-bottom: 22px; background: var(--sage); border-radius: 12px; }
.commerce-upload-form .form-alert { grid-column: 1 / -1; }
.commerce-upload-form input[type="file"] { padding: 8px; font-size: 12px; }
.commerce-schedule-panel { grid-column: 1 / -1; }
.commerce-weekly { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding-top: 8px; }
.commerce-day { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
.commerce-day .check-field { grid-column: 1 / -1; }
.payment-ledger-details:empty { display: none; }

dialog { border: 1px solid var(--line); border-radius: 17px; padding: 19px; width: min(100% - 32px, 432px); max-height: calc(100dvh - 32px); overflow: auto; overscroll-behavior: contain; color: var(--ink); background: var(--surface); box-shadow: 0 18px 55px #11271933; }
dialog::backdrop { background: #0d2719a0; }
dialog .dialog-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 13px; margin-bottom: 17px; }
dialog h2 { font-size: 19px; margin: 0 0 5px; color: var(--forest); }
dialog p { color: var(--muted); font-size: 13px; margin: 0; line-height: 1.6; }
dialog .panel-actions { justify-content: flex-end; }
dialog .promo-hint { margin-top: -12px; font-size: 12px; }
.check-field { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--forest); font-weight: 750; min-height: 34px; }
.check-field input { min-height: auto; width: 17px; height: 17px; accent-color: var(--forest); }

@media (max-width: 900px) {
  .staff-shell { grid-template-columns: 183px minmax(0, 1fr); }
  .sidebar { padding-inline: 13px; }
  .menu-table .category-cell { display: none; }
  .record-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .record-filters > :first-child { grid-column: 1 / -1; }
  .report-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .login-wrap { padding: 15px 15px max(15px, env(safe-area-inset-bottom)); }
  .login-body { grid-template-columns: 1fr; }
  .login-art { min-height: auto; padding: 22px; gap: 16px; }
  .login-art h2 { margin: 8px 0 6px; }
  .login-art p { max-width: none; font-size: 13px; }
  .login-tile { width: 43px; height: 43px; border-radius: 11px; }
  .login-tile .icon { width: 25px; height: 25px; }
  .login-main { padding: 24px 22px; }
  .staff-shell { display: block; }
  .sidebar { display: contents; }
  .staff-brand-row, .staff-navigation { background: var(--forest-deep); }
  .staff-brand-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 14px 0; }
  .staff-brand-row .brand { margin: 0; min-height: 44px; }
  .staff-navigation { position: sticky; top: 0; z-index: 5; padding: 5px 14px; }
  .mobile-tools { display: flex; align-items: center; gap: 3px; }
  .mobile-tools .nav-link { width: auto; font-size: 12px; }
  html:lang(en) .mobile-tools .nav-link .icon { display: none; }
  .brand-logo { width: 112px; }
  .courier-top .brand, .login-header .brand { min-height: 44px; }
  .desktop-navigation { display: none; }
  .mobile-navigation { display: block; color: #fbfbec; }
  .mobile-navigation > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; padding: 7px 11px; border: 1px solid #e1edd536; border-radius: 10px; cursor: pointer; list-style: none; font-size: 14px; font-weight: 750; }
  .mobile-navigation > summary::-webkit-details-marker { display: none; }
  .mobile-navigation-label { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: #dbe6d7; white-space: nowrap; }
  .mobile-navigation-label .icon { width: 16px; height: 16px; transform: rotate(90deg); }
  .mobile-navigation[open] .mobile-navigation-label .icon { transform: rotate(-90deg); }
  .mobile-navigation-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; max-height: min(60svh, 320px); overflow-y: auto; overscroll-behavior-y: contain; padding: 9px 0 3px; }
  .mobile-navigation-grid .nav-link { justify-content: flex-start; white-space: normal; text-align: left; min-width: 0; padding-inline: 11px; min-height: 48px; }
  .mobile-navigation-grid .nav-link:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .nav-link { justify-content: center; padding-inline: 5px; min-height: 44px; gap: 4px; }
  .nav-link .icon { width: 15px; height: 15px; }
  html:lang(en) .nav-group .nav-link { flex-direction: column; justify-content: center; font-size: 12px; height: 44px; padding: 3px; gap: 3px; }
  .sidebar .side-label, .side-footer { display: none; }
  .staff-content { padding: 22px 13px max(28px, env(safe-area-inset-bottom)); }
  .workspace-header { margin-bottom: 15px; }
  .workspace-header h1 { font-size: 30px; }
  .mobile-footer { display: block; margin-top: 14px; }
  .text-link, .button, .filter, .check-field, .order-card summary { min-height: 44px; }
  .filter { min-width: 44px; }
  .button-icon { width: 44px; min-width: 44px; flex: 0 0 auto; }
  .order-card-head { grid-template-columns: minmax(0, 1fr) auto; }
  .order-card-head > :nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
  .order-card-head > :last-child { grid-column: 2; grid-row: 1; }
  .order-card-head .status { max-width: 125px; white-space: normal; text-align: left; }
  .order-id { font-size: 13px; }
  .order-customer, .order-summary { line-height: 1.6; }
  .order-card .panel-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .order-card .panel-actions .button { min-width: 0; padding-inline: 7px; }
  .order-card .panel-actions .button-primary { grid-column: 1 / -1; }
  .courier-card .courier-progress { grid-template-columns: 1fr; }
  .order-card summary { align-content: center; }
  .courier-card summary { padding-top: 0; }
  .field input, .field select, .search input { font-size: 16px; min-height: 44px; }
  .field textarea { font-size: 16px; }
  .record-filters .button { width: 100%; }
  #reports-form > :first-child { grid-column: auto; }
  #members-search-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
  #members-search-form .search { min-width: 0; }
  .pagination { justify-content: space-between; gap: 8px; }
  .pagination > span { flex-basis: 100%; order: -1; }
  .pagination > .button { flex: 1; min-width: 0; }
  .report-stats .stat-value { font-size: 18px; }
  .report-table { min-width: 420px; }
  .table-scroll-hint { display: block; color: var(--muted); font-size: 12px; line-height: 1.5; margin: 6px 0 8px; }
  .record-header { flex-wrap: wrap; gap: 8px; }
  .record-header h3 { flex: 1 1 140px; }
  .record-card .panel-actions .button { width: 100%; }
  .commerce-slide-layout, .commerce-two-columns, .commerce-upload-form, .commerce-weekly { grid-template-columns: minmax(0, 1fr); }
  .commerce-card { padding: 12px; }
  .commerce-image-preview { max-height: 210px; }
  .commerce-upload-form .button { width: 100%; }
  .commerce-upload-form input[type="file"] { font-size: 14px; }
  .commerce-schedule-panel .panel-actions { display: grid; grid-template-columns: minmax(0, 1fr); }
  .commerce-card > .panel-actions .button { width: 100%; }
  .data-pairs { gap: 13px; }
  .check-field input { width: 20px; height: 20px; }
  .form-fields .panel-actions .button { flex: 1; }
  #notice:not(:empty) { position: sticky; top: calc(54px + env(safe-area-inset-top)); z-index: 4; box-shadow: 0 4px 16px #172e211f; }
  .courier-shell #notice:not(:empty) { top: 8px; }
  .notice > .button-icon, .menu-table .menu-actions .button { width: 44px; }
  .setting-grid, .courier-cards { grid-template-columns: 1fr; }
  .menu-table, .menu-table tbody { display: block; }
  .menu-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .menu-table tr { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 14px; margin-bottom: 10px; border: 1px solid var(--line); border-radius: 12px; }
  .menu-table td { display: block; min-width: 0; border: 0; padding: 0; }
  .menu-table .name-cell { width: auto; grid-column: 1 / -1; min-height: 44px; padding-right: 48px; align-content: center; }
  .menu-table .category-cell { display: none; }
  .menu-table .price-cell { white-space: normal; overflow-wrap: anywhere; font-size: 14px; font-weight: 750; }
  .mobile-price-label { display: block; margin-bottom: 3px; color: var(--muted); font-size: 11px; font-weight: 500; }
  .menu-table .stock-cell { grid-column: 1 / -1; }
  .menu-stock-controls { justify-content: space-between; }
  .menu-stock-controls .availability-button { min-height: 44px; }
  .order-scopes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .order-scopes .button { min-width: 0; white-space: normal; padding-inline: 7px; }
  .order-scopes .button:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .alert-primary-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .alert-primary-actions .button { min-width: 0; white-space: normal; padding-inline: 6px; }
  .refund-due-entry { width: 100%; }
  .menu-table .stock-cell .status { font-size: 11px; padding: 4px 8px; white-space: normal; }
  .menu-table .stock-cell .status::before { width: 6px; height: 6px; }
  .menu-table .menu-actions { position: absolute; top: 14px; right: 14px; width: auto; }
  dialog { width: calc(100% - 24px); top: calc(var(--staff-viewport-top, 0px) + max(12px, env(safe-area-inset-top))); bottom: auto; margin-block: 0; max-height: calc(var(--staff-viewport-height, 100dvh) - max(12px, env(safe-area-inset-top)) - max(12px, env(safe-area-inset-bottom))); padding: 16px; scroll-padding-top: 70px; }
  dialog .dialog-header { position: sticky; top: -16px; z-index: 2; background: var(--surface); margin: -16px -16px 16px; padding: 12px 16px; border-bottom: 1px solid var(--line); align-items: center; }
  dialog .dialog-header h2 { min-width: 0; font-size: 18px; line-height: 1.4; overflow-wrap: anywhere; }
  dialog .dialog-header .button-icon { align-self: flex-start; }
  dialog input, dialog select, dialog textarea { scroll-margin-block: 70px 24px; }
  .staff-brand-row, .courier-top-inner { padding-top: max(8px, env(safe-area-inset-top)); }
  .staff-navigation { padding-top: calc(5px + env(safe-area-inset-top)); }
}

@media (max-width: 390px) {
  .nav-group .nav-link { flex-direction: column; justify-content: center; font-size: 12px; height: 44px; padding-block: 3px; gap: 3px; }
  .login-header .text-link .icon { display: none; }
  .staff-header-tools { gap: 5px; }
  .stats-grid { gap: 6px; }
  .stat { padding: 10px 7px; }
  .stat-icon { width: 28px; height: 28px; border-radius: 8px; }
  .stat-icon .icon { width: 15px; height: 15px; }
  .stat-value { font-size: 24px; }
  .header-tag { display: none; }
  .order-card-head { gap: 5px; padding: 11px; }
  .login-footer { flex-wrap: wrap; gap: 8px; }
  .record-filters { grid-template-columns: minmax(0, 1fr); }
  #reports-form > :first-child { grid-column: 1 / -1; }
  .data-pairs { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 359px) {
  .report-stats { grid-template-columns: minmax(0, 1fr); }
  .report-stats .stat-value { font-size: 24px; }
}
