:root {
  color-scheme: light;
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  color: #172a33;
  background: #f3f7f7;
  font-synthesis: none;
  --text: #172a33;
  --muted: #516870;
  --ink: #07565b;
  --primary: #096b70;
  --line: #dce7e8;
  --white: #fff;
  --radius: 16px;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 280px; font-size: 14px; line-height: 1.55; }
a { color: var(--ink); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #418c91; outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h1, #reset-order-page { font-size: clamp(1.8rem, 4vw, 2.35rem); line-height: 1.25; letter-spacing: -.025em; }
h2 { font-size: 1.13rem; line-height: 1.35; }
h3 { font-size: 1rem; }
.muted, small { color: var(--muted); }
.shell { width: min(1160px, calc(100% - 48px)); margin-inline: auto; }
main.shell { padding-block: 44px 64px; }
main.narrow { width: min(800px, calc(100% - 48px)); }

.site-header { background: #102f36; color: #f4fafa; }
.header-inner { min-height: 66px; display: flex; align-items: center; gap: 36px; }
.brand { color: inherit; display: inline-flex; align-items: center; gap: 10px; font-size: 1.02rem; font-weight: 750; white-space: nowrap; }
.brand-icon, .auth-emblem { display: grid; place-items: center; border-radius: 9px; color: #153e40; background: #a7e1d5; }
.brand-icon { width: 32px; height: 32px; font-size: 22px; }
.navigation { display: flex; align-items: center; gap: 8px; }
.navigation a, .logout { color: #d2e7e8; white-space: nowrap; padding: 7px 12px; border-radius: 7px; }
.navigation a[aria-current], .navigation a:hover, .logout:hover { background: #21474e; color: #fff; text-decoration: none; }
.account { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.account > a { color: #e0eeee; }
.identity { display: grid; line-height: 1.3; overflow-wrap: anywhere; }
.identity small { color: #bed5d8; font-size: .72rem; }
.logout { background: transparent; border: 1px solid #557278; }

.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 23px; }
.page-heading p { margin-top: 7px; }
.order-heading-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.pickup-view-toggle { display: inline-flex; align-items: center; gap: 6px; padding: 0 8px; color: var(--ink); font-weight: 700; cursor: pointer; }
.pickup-view-toggle input { width: 16px; height: 16px; margin: 0; accent-color: var(--ink); cursor: pointer; }
.button { min-height: 42px; display: inline-flex; justify-content: center; align-items: center; gap: 5px; padding: 8px 16px; border: 1px solid transparent; border-radius: 9px; font-weight: 700; white-space: nowrap; }
.button:hover { text-decoration: none; }
.primary { color: #fff; background: var(--primary); }
.primary:hover { background: var(--ink); }
.primary:disabled { color: #516870; background: #e4eded; cursor: default; }
.secondary { color: var(--ink); background: #fff; border-color: #b9ced0; }
.secondary:hover { background: #eaf5f4; }
.panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 2px 7px #12343d08; }
.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 24px; }
.metric { min-width: 0; display: grid; gap: 8px; padding: 16px 20px; border: 1px solid var(--line); background: #fff; border-radius: 13px; color: var(--text); }
a.metric:hover { border-color: #79a5a7; text-decoration: none; }
a.metric:is([data-advance-pane], [data-profit-section])[aria-current="page"] { border-color: var(--accent); }
.metric span { color: var(--muted); font-weight: 650; }
.metric strong { font-size: clamp(1.65rem, 4vw, 2.3rem); line-height: 1; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.metric.pending { background: #fff; border-color: var(--line); }
.metric.picked { background: #fff; border-color: var(--line); }

.listing { min-width: 0; overflow: hidden; }
.section-heading { padding: 18px 21px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 13px; }
.section-heading p { margin-top: 3px; font-size: .82rem; }
.order-list-heading:has(+ .order-list-actions) { padding-bottom: 4px; }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.filters input { width: min(245px, 100%); }
.order-search { max-width: 100%; display: grid; justify-items: end; gap: 8px; }
.order-search-filters { width: fit-content; max-width: 100%; }
.order-keyword-filter { display: flex; align-items: center; gap: inherit; max-width: 100%; }
.order-keyword-filter input[type="search"] { flex: 1 1 245px; }
.order-search-filters > :is(select, button, a) { flex: none; white-space: nowrap; }
.order-list-actions { display: flex; align-items: center; gap: 8px; padding: 0 12px 12px; }
.own-orders-toggle { margin-inline-start: auto; min-height: 42px; flex-shrink: 0; font-size: 1.0625rem; white-space: nowrap; }
.own-orders-toggle input { width: 20px; height: 20px; }
.reset { padding: 0 4px; }
input:not([type="checkbox"]), select, textarea { min-width: 0; min-height: 42px; padding: 8px 11px; border: 1px solid #b9ced0; border-radius: 8px; color: var(--text); background: #fff; }
.form-stack input[readonly], input.profile-readonly[readonly] { background-color: #e5ebed; }
input::placeholder, textarea::placeholder { color: #667b81; }
input[name="verification_code"]::placeholder { font-size: .6875rem; font-weight: 400; }
textarea { resize: vertical; }
.table-wrap { overflow-x: auto; }
.account-layout .table-wrap { overflow-x: visible; }
.account-layout table { width: 100%; table-layout: fixed; }
.account-layout th, .account-layout td { padding: 10px 8px; font-size: .82rem; overflow-wrap: anywhere; word-break: break-word; }
.order-list-table th, .order-list-table td { padding-inline: 9px; }
.order-status-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 7px; }
.pickup-inline-button { font-size: .9em; }
.order-pickup-date { color: var(--muted); font-size: .8em; font-variant-numeric: tabular-nums; }
.order-settlement-code { display: block; color: var(--muted); font-size: .72em; font-variant-numeric: tabular-nums; }
.compact-order-code { display: none; }
.compact-filter-bar { display: none; }
.order-list-table .actions { white-space: normal; }
.order-list-table .actions :is(a, button) { display: inline-block; }
.order-list-table .actions > * + * { margin-inline-start: 6px; }
.settlement-layout { display: grid; gap: 14px; }
.settlement-layout :is(th, td) { padding: 8px 10px; }
.settlement-layout td { vertical-align: top; }
.settlement-layout .settlement-entry { min-width: 10rem; }
.settlement-layout details + details { margin-top: 6px; }
.settlement-layout details summary { color: var(--ink); cursor: pointer; }
.settlement-layout .form-stack { gap: 8px; margin-top: 8px; }
.settlement-layout .form-stack input, .settlement-layout .form-stack select { width: 100%; }
.settlement-layout .section-heading { padding-bottom: 9px; }
.commission-business-heading { padding-inline: clamp(18px, 4vw, 27px); }
.commission-business-heading + [data-commission-results] > .form-panel { padding-top: 10px; }
.commission-pickup-details { border-top: 1px solid var(--line); }
.settlement-layout .filters { align-items: end; }
.settlement-layout .filters label { display: grid; gap: 4px; }
.commission-overview { display: grid; gap: 14px; }
.commission-overview-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 0 clamp(12px, 3vw, 21px) 14px; }
.commission-overview-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.commission-overview-delivery { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.commission-overview-links { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.advance-tools { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); gap: 14px; align-items: start; }
.advance-usage-table { table-layout: fixed; }
.advance-usage-table .advance-usage-date-col { width: 10rem; }
.advance-usage-table .advance-usage-kind-col { width: 8rem; }
.advance-usage-table .advance-usage-change-col { width: 10rem; }
.advance-usage-table .advance-usage-balance-col { width: 8rem; }
.advance-usage-table :is(th, td) { overflow-wrap: anywhere; }
.advance-usage-table time, .advance-usage-amount { font-variant-numeric: tabular-nums; }
.advance-usage-table time span, .advance-usage-amount span { display: block; }
.advance-usage-amount { text-align: right; }
.advance-person-actions { text-align: end; white-space: nowrap; }
.advance-person-actions a + a { margin-inline-start: .6em; }
.advance-negative-balance { color: #a32829; }
.advance-recipient-controls { display: flex; gap: 8px; align-items: flex-end; }
.advance-recipient-controls label { flex: 1; }
.advance-usage-note { white-space: pre-wrap; }
.transfer-purpose-form { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.transfer-purpose-form select { min-height: 32px; padding: 4px 6px; }
.capital-entry-details dl { display: grid; gap: 6px; margin: 8px 0 0; }
.capital-entry-details dl > div { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px; }
.capital-entry-details dt { margin: 0; }
@media (max-width: 720px) {
  .advance-usage-table .advance-usage-date-col { width: 24%; }
  .advance-usage-table .advance-usage-kind-col { width: 15%; }
  .advance-usage-table .advance-usage-change-col { width: 22%; }
  .advance-usage-table .advance-usage-balance-col { width: 18%; }
}
@media (max-width: 560px) {
  .settlement-layout .advance-usage-table :is(th, td) { padding: 6px 4px; font-size: .78rem; }
}
.advance-capital-history { margin-top: 16px; }
.advance-capital-history ul { padding-inline-start: 1.2rem; color: var(--muted); }
.advance-capital-history li + li { margin-top: 8px; }
.advance-capital-note { white-space: pre-wrap; }
.advance-capital-rows { display: grid; gap: 6px; }
.advance-capital-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: center; gap: 6px; }
.advance-capital-row input { min-width: 0; }
.advance-capital-labels { color: var(--muted); font-size: .88rem; }
.advance-capital-row-actions .button { min-height: 34px; padding: 4px 8px; font-size: .88rem; }
.advance-capital-row-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; }
.advance-capital-row-actions output { margin-left: 4px; font-weight: 700; }
.advance-capital-feedback:empty { display: none; }
.advance-capital-editor { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.advance-capital-editor [hidden] { display: none; }
.settlement-layout .form-stack .advance-capital-clear { display: flex; align-items: center; }
.settlement-layout .form-stack .advance-capital-clear[hidden] { display: none; }
.settlement-layout .form-stack .advance-capital-clear input { width: auto; }
.advance-capital-history-rows { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 8px; margin-block: 4px; }
.advance-capital-history-rows dt { overflow-wrap: anywhere; }
.purchase-overview-actions { align-items: center; }
.commission-status-summary { display: grid; gap: 4px; text-align: center; }
.commission-status-summary select.primary { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 700; }
.commission-status-summary select.primary option { background: #fff; color: var(--text); }
.commission-period-control { display: inline-flex; position: relative; }
.commission-period-control .button { border-radius: 9px 0 0 9px; }
.commission-period-control select {
  appearance: none;
  width: 34px;
  padding: 0;
  border-left: 0;
  border-radius: 0 9px 9px 0;
  color: transparent;
  cursor: pointer;
}
.commission-period-control select.primary { color: transparent; border-left: 1px solid #ffffff60; }
.commission-period-control select option { color: var(--text); }
.commission-period-control::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 14px;
  width: 6px;
  height: 6px;
  transform: translateY(-70%) rotate(45deg);
  border: solid currentColor;
  border-width: 0 2px 2px 0;
  pointer-events: none;
}
.commission-period-control:has(select.primary)::after { color: #fff; }
.payout-confirmation summary { color: var(--ink); cursor: pointer; white-space: nowrap; }
.payout-confirmation form { margin-top: 8px; min-width: 10rem; }
.commission-payout-table td[rowspan] { vertical-align: top; }
.commission-payout-table td.payout-recipient { vertical-align: middle; }
.payout-toolbar { align-items: end; }
.payout-toolbar :is(input, select) { width: 100%; }
.payout-recovery-fields { border: 0; margin: 0 21px 12px; padding: 0; min-width: 0; }
.commission-payout-table tbody[hidden], [data-payout-filter-empty][hidden] { display: none; }
.commission-payout-table tbody:has(input[name="payout_group"]:checked) td { background: #eef7f6; }
.commission-overview-metrics .metric { padding: clamp(8px, 2vw, 12px); }
.commission-overview-metrics .metric strong { font-size: clamp(1rem, 3vw, 1.75rem); }
@media (max-width: 640px) { .commission-overview-delivery { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pickup-shipping-panel { margin-bottom: 15px; }
.pickup-shipping-panel .section-heading { padding-bottom: 8px; }
.pickup-shipping-panel .form-panel { padding: 0 clamp(12px, 3vw, 21px) 14px; align-items: end; }
.pickup-shipping-form label { display: grid; gap: 4px; max-width: 100%; }
.pickup-shipping-hint { padding: 0 clamp(12px, 3vw, 21px) 14px; }
.settlement-layout .settlement-line { margin-block: 5px; overflow-wrap: anywhere; }
.settlement-receipt-cell { white-space: nowrap; }
.settlement-receipt-form { margin-top: 6px; }
.settlement-receipt-detail { border-top: 1px solid var(--line); margin-top: 16px; }
.settlement-receipt-photos { margin-top: 12px; grid-template-columns: repeat(auto-fit, minmax(90px, 130px)); }
.settlement-receipt-form input[name="receipt_amount"] { width: 8.5rem; }
.settlement-receipt-form input[type="date"] { width: 9.5rem; }
.settlement-batch-amount { width: 9rem; }
.settlement-price-value { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.settlement-batch-price-form { align-items: end; }
.settlement-selected-actions { display: flex; flex-wrap: wrap; align-items: end; gap: 8px; max-width: 100%; }
.settlement-selected-actions label { display: grid; gap: 4px; width: min(12rem, 48vw); }
.settlement-batch-price-form .settlement-amount-field { width: auto; }
.settlement-amount-field input.settlement-batch-amount, .pickup-shipping-form input[name="shipping_cost"] {
  width: calc(7ch + 20px);
  padding-inline: 8px;
  font-variant-numeric: tabular-nums;
}
.settlement-batch-form input[type="date"] { width: 9.5rem; }
.settlement-selection { width: 1%; text-align: center; }
.settlement-selection :is(input[type="checkbox"], input[type="radio"]) { width: 1rem; height: 1rem; margin: 0; vertical-align: middle; }
.batch-status-form { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-width: 0; }
.batch-status-form button:disabled { opacity: .55; cursor: default; }
.batch-checkbox { width: 1%; text-align: center; }
.batch-checkbox input { width: 16px; height: 16px; margin: 0; vertical-align: middle; accent-color: var(--ink); cursor: pointer; }
table { border-collapse: collapse; width: 100%; text-align: left; }
th, td { border-top: 1px solid var(--line); padding: 13px 17px; vertical-align: middle; }
th { font-size: .81rem; color: #435f66; background: #f3f7f7; white-space: nowrap; }
.status-filter-icon { display: none; width: 13px; height: 13px; background: currentColor; clip-path: polygon(0 5%, 100% 5%, 62% 49%, 62% 93%, 40% 80%, 40% 49%); }
.text-column-filter { display: inline-flex; align-items: center; gap: 2px; min-height: 30px; padding: 0 5px; border: 1px solid var(--line); border-radius: 5px; color: var(--ink); background: #fff; font-weight: inherit; white-space: nowrap; }
.text-column-filter:is(:hover, :focus-visible) { background: #f4fafa; }
.text-column-filter.is-filtered { background: #d9eeee; border-color: var(--accent); }
.text-column-filter .status-filter-icon { display: block; }
.column-filter-dialog { width: min(360px, calc(100% - 32px)); padding: 20px; color: var(--text); }
.column-filter-dialog::backdrop { background: #102f3680; }
.column-filter-dialog .form-stack, .column-filter-dialog .form-actions { margin-top: 0; }
.column-filter-dialog [hidden] { display: none; }
.commission-rule-inline { display: inline-flex; align-items: center; gap: 3px; }
.settlement-layout .form-stack .commission-rule-inline input { width: 5.5rem; min-height: 30px; padding: 4px 6px; }
.commission-rule-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.commission-rule-actions .button { margin-inline-start: auto; min-height: 30px; padding: 4px 9px; font-size: .8rem; }
.pickup-date-filter-fields { display: grid; gap: 4px; }
.pickup-date-filter-heading { display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.pickup-date-filter-label { display: flex; align-items: baseline; gap: 3px; white-space: nowrap; }
.pickup-date-filter-label small { font-size: .69rem; }
.pickup-date-filter-heading .date-heading-shortcuts { margin-inline-start: auto; }
.pickup-date-filter-heading .date-shortcut { padding-inline: 3px; font-size: .69rem; }
.pickup-date-filter-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 5px; }
.pickup-date-filter-row .pickup-date-clear { padding-inline: 8px; font-size: .8rem; }
.pickup-date-filter-input { position: relative; display: grid; }
.pickup-date-filter-input > input { padding-inline-end: 42px; }
.pickup-date-calendar { position: absolute; inset: 1px 1px 1px auto; width: 38px; display: grid; place-items: center; color: var(--ink); border-radius: 7px; }
.pickup-date-calendar:focus-within { outline: 2px solid var(--ink); outline-offset: -2px; }
.pickup-date-calendar input { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; opacity: 0; padding: 0; cursor: pointer; }
.pickup-date-calendar input::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; cursor: pointer; }
.pickup-date-calendar .date-picker-icon { width: 13px; pointer-events: none; }
td { overflow-wrap: anywhere; }
td small { display: block; margin-top: 4px; }
.record-link { color: var(--ink); font-weight: 720; }
.date-cell, .actions { white-space: nowrap; }
.actions a + a { margin-left: 11px; }
.transfer-record-actions form { display: inline; }
.transfer-record-actions a + :is(form, span) { margin-inline-start: 11px; }
.badge { display: inline-flex; align-items: center; border-radius: 50px; padding: 4px 10px; font-size: .76rem; font-weight: 750; white-space: nowrap; }
.badge.pending { background: #ffedd0; color: #745013; }
.badge.picked { background: #dbf1e7; color: #155442; }
.badge.neutral { background: #e8f1f1; color: #284b52; }
.empty { border-top: 1px solid var(--line); padding: 44px 15px 50px; display: grid; justify-items: center; gap: 8px; text-align: center; }
.empty-icon { width: 49px; height: 49px; display: grid; place-items: center; border-radius: 14px; background: #e8f3f2; color: var(--primary); font-size: 27px; }
.pagination { border-top: 1px solid var(--line); padding: 14px 18px; display: flex; justify-content: center; gap: 18px; }
.pagination span { color: var(--muted); }

.auth-shell { max-width: 440px; }
main.auth-shell { padding-top: clamp(34px, 9vh, 90px); }
.auth-panel { padding: clamp(22px, 6vw, 36px); }
.auth-emblem { width: 44px; height: 44px; font-size: 30px; margin-bottom: 15px; }
.auth-panel h1 { font-size: clamp(1.5rem, 6vw, 1.9rem); }
.auth-panel p { margin-top: 8px; }
.auth-panel > .button { margin-top: 19px; }
.form-stack, .form-grid { display: grid; gap: 16px; }
.form-stack { margin-top: 20px; }
.form-stack label, .form-grid label, .form-field, .upload { display: grid; gap: 6px; font-weight: 650; min-width: 0; }
.form-stack [data-account-supervisor][hidden] { display: none; }
.form-field { align-content: start; }
.date-controls { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.date-controls-clearable:has(> .date-clear:not([hidden])) { grid-template-columns: minmax(0, 1fr) auto; }
.date-field-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 6px; min-height: 26px; }
.date-heading-shortcuts { display: inline-flex; gap: 4px; }
.date-heading-shortcuts .date-shortcut { min-height: 26px; padding: 1px 4px; font-size: .75rem; }
.date-field-heading:has(> label[for="arrival-date"]) { flex-wrap: nowrap; white-space: nowrap; }
.date-controls .date-clear { padding-inline: 8px; font-size: .8rem; }
.date-picker-toggle { justify-content: space-between; padding-inline: 8px; min-width: 0; font-size: .87rem; font-variant-numeric: tabular-nums; }
.date-picker-icon { position: relative; flex: 0 0 13px; height: 13px; border: 1.5px solid currentColor; border-radius: 2px; }
.date-picker-icon::before { content: ""; position: absolute; inset: 2px 0 auto; border-top: 1px solid currentColor; }
.date-picker-icon::after { content: ""; position: absolute; top: 5px; left: 2px; width: 1px; height: 1px; background: currentColor; box-shadow: 3px 0, 6px 0, 0 3px, 3px 3px, 6px 3px; }
.date-controls [hidden] { display: none; }
.date-controls input[readonly] { grid-column: 1 / -1; }
.order-calendar { position: absolute; top: calc(100% + 6px); right: 0; z-index: 2; width: min(280px, calc(100vw - 46px)); padding: 9px; border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: 0 8px 22px #20363824; }
.calendar-heading { display: flex; align-items: center; justify-content: space-between; gap: 4px; margin-bottom: 5px; }
.calendar-nav { min-width: 31px; min-height: 32px; padding: 0 6px; }
.calendar-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); text-align: center; }
.calendar-weekday { color: var(--muted); font-size: .8rem; padding-block: 4px; }
.calendar-day { min-height: 33px; padding: 0; border: 0; border-radius: 5px; background: transparent; color: var(--ink); }
.calendar-day:hover { background: #e9f7f2; }
.calendar-day[aria-pressed="true"] { color: #fff; background: var(--ink); }
#reset-order-page[aria-disabled="true"] { opacity: .65; cursor: wait; }
.form-grid { align-items: start; }
.form-panel :is(input, select, textarea)[aria-invalid="true"] { border-color: #b75149; }
:is(.form-field, .form-grid label):has(> .field-error) { position: relative; }
.field-error {
  position: absolute;
  z-index: 2;
  top: calc(100% + 6px);
  inset-inline-start: 0;
  max-width: 100%;
  padding: 7px 11px;
  border-radius: 6px;
  color: #fff;
  background: #c51d25;
  box-shadow: 0 3px 10px #78101740;
  font-size: .875rem;
  font-weight: 700;
}
.field-error::before {
  position: absolute;
  top: -5px;
  inset-inline-start: 13px;
  width: 10px;
  height: 10px;
  background: inherit;
  transform: rotate(45deg);
  content: "";
}
label small { font-weight: 400; }
.form-stack .button { justify-self: start; }
.form-stack .account-pickup-option { display: flex; align-items: center; }
.auth-panel .form-stack .button { justify-self: stretch; margin-top: 3px; }
.form-panel, .detail-panel { padding: clamp(18px, 4vw, 27px); }
.form-grid, .details { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.logistics-code-fields { grid-column: 1 / -1; display: grid; align-items: start; grid-template-columns: minmax(0, 1fr) minmax(204px, 1fr); gap: 16px; }
.logistics-code-fields input { width: 100%; }
.pickup-code-title { white-space: nowrap; }
.full { grid-column: 1 / -1; }
.photo-fields { border-top: 1px solid var(--line); margin-top: 22px; padding-top: 19px; display: grid; gap: 13px; }
.order-photo-fields { display: grid; gap: 13px; }
.order-fields { border-top: 1px solid var(--line); margin-top: 22px; padding-top: 19px; }
.order-photo-fields + .order-fields:has(#owner-username) { margin-top: 10px; padding-top: 10px; }
.order-fields + .photo-fields { margin-top: 10px; padding-top: 10px; gap: 5px; }
.order-fields input[readonly] { background: #edf2f2; color: var(--muted); }
.required-mark { margin-left: .35rem; color: #ff2020; font-size: .86rem; font-weight: 800; }
.upload { padding: 14px; border: 1px dashed #8aafb1; border-radius: 12px; background: #f3f9f8; }
.upload input { width: 100%; }
.photo-upload { display: grid; gap: 8px; }
.photo-upload .button { justify-self: start; }
#recognize-photos { width: 90px; padding-inline: 12px; font-size: 15px; }
.photo-upload .button:disabled { cursor: wait; color: #d90000; }
#recognition-status:empty { display: none; }
#photo-draft-status:empty { display: none; }
input[type="file"]::file-selector-button { border: 1px solid #b9ced0; background: #eaf5f4; color: var(--ink); border-radius: 5px; padding: 3px 8px; margin-right: 8px; font: inherit; cursor: pointer; }
.form-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 9px; margin-top: 20px; }
.back { display: inline-block; margin-bottom: 15px; font-weight: 650; }
.detail-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.detail-top strong { display: block; font-size: clamp(1.25rem, 5vw, 1.7rem); line-height: 1.2; margin-top: 5px; overflow-wrap: anywhere; }
.detail-top > div { min-width: 0; }
.details { display: grid; gap: 15px; margin: 18px 0 0; }
.detail-panel > .details:first-child { margin-top: 0; }
.commission-order-payout { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 14px; }
dt { color: var(--muted); margin-bottom: 3px; }
dd { margin: 0; overflow-wrap: anywhere; }
.multiline { white-space: pre-wrap; }
.announcement-list { display: grid; gap: 10px; }
.announcement-list > :is(.form-panel, .detail-panel) { padding: 12px clamp(12px, 3vw, 18px); }
.announcement-compose { margin-top: 0; }
.announcement-anonymous { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.announcement-anonymous label:has(input:disabled) { color: #68767a; cursor: not-allowed; }
.announcement-anonymous small { display: none; }
.announcement-anonymous:has(input:disabled) small { display: inline; }
.announcement-pin { background: #fff0d4; color: #745013; }
.announcement { overflow-wrap: anywhere; }
.announcement-entry-main { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: start; }
.announcement-entry-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 6px; margin-bottom: 4px; }
.announcement .muted { font-size: .85rem; }
.announcement-entry-content h2 { margin-bottom: 3px; }
.announcement-reply-button { min-height: 32px; padding: 4px 8px; }
.feedback-discussion { border-top: 1px solid var(--line); margin-top: 6px; }
.reply-expander { font-weight: 700; margin-top: 4px; }
.feedback-replies { list-style: none; padding: 0; margin: 0; }
.feedback-replies li { padding-block: 4px; }
.feedback-replies li + li, .feedback-discussion [id$="-more"] { border-top: 1px solid var(--line); }
.reply-dialog { width: min(430px, calc(100% - 28px)); max-height: calc(100% - 28px); padding: 18px; border: 1px solid var(--line); border-radius: 16px; color: var(--text); }
.reply-dialog::backdrop { background: #102f367d; }
.reply-dialog h2 { text-align: center; padding-inline: 30px; }
.reply-dialog-close { position: absolute; inset: 8px 8px auto auto; width: 32px; height: 32px; border: 0; border-radius: 7px; background: transparent; color: var(--ink); font-size: 1.3rem; }
.reply-dialog-close:hover { background: #eaf5f4; }
.reply-dialog .form-stack { margin-top: 12px; gap: 8px; }
.reply-dialog textarea { background: #f3f7f7; }
.reply-dialog .button { justify-self: stretch; }
.reply-error { color: #a32920; }
.reply-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.photo-section { margin-top: 15px; }
.photo-section h2 span { font-size: .8rem; font-weight: 400; }
.photo-section > :last-child { margin-top: 13px; }
.logistics-history-table :is(th, td) { padding: 8px 10px; }
.logistics-history-table td:first-child { font-variant-numeric: tabular-nums; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(125px, 100%), 1fr)); gap: 10px; }
.photo-nine-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 540px; }
.transfer-proof-fields .photo-nine-grid { max-width: 360px; gap: 8px; }
.photo-nine-grid .photo-tile { position: relative; }
.photo-nine-grid .photo-tile img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }
.photo-add-tile {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border-radius: 8px;
  background: #f3f4f4;
  color: #697476;
}
.photo-add-tile:hover, .photo-add-tile:focus-within { background: #e9eeee; }
.photo-add-tile:focus-within { outline: 2px solid var(--ink); outline-offset: 2px; }
.photo-add-tile span {
  width: 31%;
  aspect-ratio: 1;
  background: linear-gradient(currentColor, currentColor) center / 100% 2px no-repeat,
              linear-gradient(currentColor, currentColor) center / 2px 100% no-repeat;
}
.photo-add-tile input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.photo-nine-grid .photo-remove {
  position: absolute;
  inset: 4px 4px auto auto;
  min-height: 24px;
  padding: 2px 6px;
  border-radius: 6px;
  font-size: .72rem;
}
.photo-nine-grid [hidden] { display: none; }
.photo-tile { display: block; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: #f2f7f7; }
.photo-tile img { display: block; width: 100%; height: 150px; object-fit: contain; }
.photo-tile .checkbox { display: flex; gap: 6px; align-items: center; padding: 7px; }
.photo-preview-trigger {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}
.photo-preview-trigger:focus-visible { outline: 2px solid var(--primary); outline-offset: -3px; }
.photo-preview {
  width: min(960px, calc(100% - 24px));
  max-height: calc(100% - 24px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  background: white;
}
.photo-preview[open] { display: flex; flex-direction: column; }
.photo-preview::backdrop { background: #102f36bd; }
.photo-preview-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 8px; }
.photo-preview-content { min-height: 0; overflow: auto; overscroll-behavior: contain; }
.photo-preview-content img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 96px);
  max-height: calc(100dvh - 96px);
  margin: auto;
}
.photo-preview-content.actual-size img { max-width: none; max-height: none; }
.checkbox input { width: 17px; height: 17px; accent-color: var(--primary); }
.account-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.8fr); gap: 16px; align-items: start; }
.account-permission-heading { width: 30%; }
.account-permission-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.account-permission-summary [hidden] { display: none; }
.account-permission-summary .badge { padding: 2px 6px; }
.account-permission-badge { border: 0; cursor: pointer; }
.account-permission-badge:hover { background: #c5e9d7; }
.account-quick-permission-feedback:not(.error) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.account-quick-permission-feedback.error { display: block; }
.account-permission-open { margin-top: 4px; }
.account-permission-dialog { width: min(420px, calc(100% - 24px)); font-size: .95rem; }
.account-permission-list { margin-block: 12px; border-top: 1px solid var(--line); }
.account-permission-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 10px; padding-block: 8px; border-bottom: 1px solid var(--line); }
.account-permission-row .button { min-width: 3.5rem; min-height: 34px; padding: 4px 10px; }
.notice-stack { position: fixed; inset: auto 16px max(16px, env(safe-area-inset-bottom)) auto; z-index: 20; display: grid; gap: 8px; width: max-content; max-width: min(360px, calc(100% - 32px)); pointer-events: none; }
.notice { display: flex; gap: 12px; align-items: center; border: 1px solid #b8d8d2; border-radius: 9px; background: #fff; color: #155442; padding: 9px 12px; box-shadow: 0 4px 16px #102f3626; overflow-wrap: anywhere; pointer-events: auto; }
.notice.error { border-color: #efc2bc; color: #882b27; }
.notice-close { flex: 0 0 24px; width: 24px; height: 24px; margin-inline-start: auto; padding: 0; border: 0; border-radius: 5px; background: transparent; color: inherit; cursor: pointer; }
.notice-close::before { content: "×"; font-size: 1.1rem; }
.notice-close:hover { background: #e8f1f1; }
.form-feedback { margin-block: 6px; color: #155442; }
.form-feedback.error { color: #882b27; }
.upload-confirmation { width: min(360px, calc(100% - 32px)); padding: 24px; color: var(--text); text-align: center; }
.upload-confirmation::backdrop { background: #102f3680; }
.upload-confirmation form { margin-top: 18px; }
.notice a { font-weight: 700; text-decoration: underline; }
.order-metrics { grid-template-columns: repeat(8, minmax(0, 1fr)); }
.order-metrics.pickup-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.metric.refund_requested, .metric.refund_requested_picked { background: #fff1ec; border-color: #f1dcd3; }
.metric.refunded { background: #edf1f4; border-color: #dce4ea; }
.badge.refund_requested, .badge.refund_requested_picked { background: #f9e4dc; color: #813b25; }
.badge.refunded { background: #e5ebf0; color: #364c60; }
.metric.pending_ship { background: #fff; border-color: var(--line); }
.metric.shipped { background: #fff; border-color: var(--line); }
.metric.pending_pickup { background: #fff; border-color: var(--line); }
.badge.pending_ship { background: #eee7fa; color: #593578; }
.badge.shipped { background: #e1effa; color: #245474; }
.badge.pending_pickup { background: #ffedd0; color: #745013; }
.optional { margin-left: .4rem; color: var(--muted); font-size: .8rem; font-weight: 400; }
.guest-order-search { align-items: flex-end; }
.guest-order-search label { display: grid; gap: 6px; font-weight: 650; }
.guest-order-search label input { width: 100%; }
.guest-order-search label:has(#guest-phone-last-four) { width: 140px; }
.table-action { background: none; border: 0; color: var(--ink); padding: 0; }
.table-action:hover { text-decoration: underline; }

@media (max-width: 920px) {
  .order-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .header-inner { flex-wrap: wrap; padding-block: 10px; gap: 9px 14px; }
  .navigation { order: 3; width: 100%; flex-wrap: wrap; }
}

@media (max-width: 720px) {
  .shell, main.narrow { width: calc(100% - 28px); }
  main.shell { padding-block: 26px 45px; }
  .navigation a:first-child { margin-left: 0; }
  .account { gap: 8px; }
  .metric { padding: 11px 9px; }
  .metrics { gap: 7px; }
  .order-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .order-metrics.pickup-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric span { font-size: .78rem; }
  .section-heading { padding: 12px; }
  .account-layout { grid-template-columns: 1fr; }
  main.shell:has(.order-list-table) { width: calc(100% - 16px); }
  .order-list-table { table-layout: fixed; --order-select-width: 0px; }
  .order-list-table:has(.order-col-select) { --order-select-width: 20px; }
  .order-list-table col { width: calc((100% - var(--order-select-width)) * var(--order-col-share)); }
  .order-list-table .order-col-select { width: var(--order-select-width); }
  .order-col-product { --order-col-share: .16; }
  .order-col-amount { --order-col-share: .14; }
  .order-col-recipient { --order-col-share: .11; }
  .order-col-phone { --order-col-share: .16; }
  .order-col-address { --order-col-share: .15; }
  .order-col-status { --order-col-share: .14; }
  .order-col-actions { --order-col-share: .14; }
  .order-list-table :is(th, td) { padding: 6px 3px; font-size: .75rem; line-height: 1.35; overflow-wrap: anywhere; }
  .order-list-table th { white-space: normal; }
  .order-list-table .batch-checkbox { padding-inline: 1px; }
  .order-list-table .batch-checkbox input { width: 14px; height: 14px; }
  .order-list-table .badge { display: inline-block; max-width: 100%; padding: 2px 4px; font-size: .7rem; white-space: normal; }
  .order-list-table .text-column-filter {
    max-width: 100%; padding: 0; min-height: 28px; white-space: normal; text-align: start; line-height: inherit;
  }
  .order-list-table .status-filter-icon { flex: 0 0 8px; width: 8px; height: 8px; }
  .order-list-table .actions :is(a, button) { display: block; max-width: 100%; margin: 0; text-align: start; }
  .order-list-table .actions > * + * { margin-top: 3px; }

  .payout-history-filters { padding: 8px; }
  .payout-history-filters .filters { align-items: end; gap: 6px; }
  .payout-history-filters label:has(input[type="search"]) { flex: 1 1 8rem; min-width: 0; }
  .payout-history-filters input[type="search"] { width: 100%; }
}

@media (max-width: 900px) {
  main.shell:has(.compact-finance-table, .compact-filter-bar) { width: calc(100% - 16px); padding-top: 16px; }
  main:has(.compact-finance-table) .page-heading { gap: 8px; margin-bottom: 12px; }
  .compact-finance-table { width: 100%; min-width: 0; table-layout: fixed; }
  .compact-finance-table :is(.compact-secondary, .compact-wide-label) { display: none; }
  .compact-finance-table .compact-order-code { display: inline; }
  .compact-finance-table small.compact-order-code { display: block; overflow-wrap: anywhere; }
  main .compact-finance-table :is(td, th) {
    padding: 6px 4px;
    font-size: .77rem;
    line-height: 1.35;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .compact-finance-table th:last-child { width: 2.7rem; }
  .compact-finance-table :is(th, td):last-child { text-align: center; }
  .compact-finance-table tbody tr:nth-child(even) { background: #f7fbfb; }
  .compact-finance-table .settlement-selection { width: 1.5rem; }
  .compact-finance-table td:last-child > a {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 32px; padding-inline: 4px; border-radius: 6px; background: #eaf5f4; font-weight: 700;
  }
  .compact-finance-table .text-column-filter {
    max-width: 100%; min-height: 25px; padding: 0; white-space: normal; text-align: start; line-height: inherit;
  }
  .compact-finance-table .status-filter-icon { flex: 0 0 7px; width: 7px; height: 7px; }
  .compact-finance-table .settlement-price-value { gap: 2px; flex-wrap: wrap; }
  .compact-finance-table input.settlement-batch-amount { width: 100%; min-width: 0; padding-inline: 4px; }
  .compact-finance-panel .section-heading, .compact-commission-search { padding: 8px; gap: 6px; }
  .compact-finance-panel .settlement-selected-actions { gap: 6px; }
  .compact-finance-panel .section-heading .button { min-height: 36px; padding: 5px 9px; }
  .compact-commission-search input[type="search"] { width: auto; min-width: 6rem; flex: 1 1 7rem; }
  .compact-finance-table.commission-payout-table th:nth-last-child(2) { width: 4.4rem; }
  .compact-filter-bar {
    display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 8px;
    border-top: 1px solid var(--line);
  }
  .compact-filter-bar .text-column-filter { min-height: 32px; }
  .advance-people-table th:last-child { width: 5rem; }
  .advance-people-table .advance-person-actions a + a { margin-inline-start: 2px; }
  .advance-people-table :is(td, th):nth-child(2),
  .advance-people-table :is(td, th):nth-child(3),
  .commission-amount-table :is(td, th):nth-last-child(2) {
    text-align: right; font-variant-numeric: tabular-nums;
  }
  .amount-list-filter { padding: 8px; gap: 6px; }
  .amount-list-filter input[type="search"] { flex: 1 1 8rem; width: auto; }
  .amount-list-filter .button { min-height: 36px; padding: 5px 9px; }
  .commission-amount-table th:nth-child(2) { width: 25%; }
  .commission-amount-table th:nth-last-child(2) :is(.text-column-filter, span) { text-align: right; }
  .transfer-history-table th:last-child { width: 3.7rem; }
  .transfer-history-table .transfer-purpose-form { flex-direction: column; align-items: start; }
  .transfer-history-table .transfer-purpose-form select { max-width: 100%; font-size: inherit; }
  .transfer-history-table .transfer-record-actions :is(span, form) { display: block; margin: 0; }
  .shipping-expense-table td:nth-last-child(2) .muted { font-size: .7rem; }
  .early-pickup-history th:last-child { width: 24%; }
  .early-pickup-history summary { padding-block: 7px; }
}

@media (max-width: 620px) {
  .form-grid:has(> .form-field > .date-controls > #arrival-date) { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 500px) {
  .logistics-code-fields { grid-template-columns: minmax(0, 1fr) minmax(168px, 1fr); gap: 8px; }
  .logistics-code-fields input { padding-inline: 6px; }
  .logistics-code-fields input[name="verification_code"]::placeholder { font-size: .625rem; }
}

@media (max-width: 340px) {
  .date-field-heading:has(> label[for="arrival-date"]) { gap: 4px; font-size: .8rem; }
  .date-field-heading [data-arrival-required] { margin-inline-start: .2rem; font-size: .75rem; }
}

@media (max-width: 450px) {
  .page-heading { align-items: flex-start; flex-wrap: wrap; }
  .form-grid { grid-template-columns: 1fr; }
  .filters { width: 100%; }
  .filters input { width: 100%; }
  .order-search, .order-search-filters { width: 100%; }
  .order-search-filters { gap: 5px; }
  .order-keyword-filter { flex-basis: 100%; }
  .order-search-filters > :is(select, button) { padding-inline: 6px; }
  .order-search-filters > .reset { padding-inline: 2px; }
  th, td { padding: 10px 12px; }
  .navigation { gap: 4px; }
  .navigation a { padding: 5px 8px; }
  .advance-metrics { padding-inline: 8px; }
  .advance-metrics .metric { align-content: start; padding: 9px 6px; }
  .advance-metrics .metric strong { font-size: clamp(.79rem, 4vw, 1.03rem); line-height: 1.3; }
  .settlement-selected-actions [data-receipt-transfer-picker] { flex: 1 1 8rem; min-width: 0; }
  .settlement-selected-actions [data-receipt-transfer-picker] select { max-width: 100%; }
}

main.shell:has(#reset-order-page) {
  padding-block: 4px 24px;
}

main:has(#reset-order-page) .page-heading { align-items: center; gap: 8px; margin-bottom: 3px; }
#reset-order-page { padding-block: 4px; }
main:has(#reset-order-page) .form-panel { padding: 7px clamp(12px, 3vw, 20px) clamp(12px, 3vw, 20px); }
main:has(#reset-order-page) .form-grid { gap: 10px 14px; }
main:has(#reset-order-page) .form-grid label,
main:has(#reset-order-page) .form-field { gap: 4px; }
main:has(#reset-order-page) .order-photo-fields,
main:has(#reset-order-page) .photo-upload { gap: 6px; }
main:has(#reset-order-page) .photo-nine-grid { max-width: 360px; gap: 8px; }
main:has(#reset-order-page) .order-fields,
main:has(#reset-order-page) .order-fields + .photo-fields { margin-top: 8px; padding-top: 8px; }
main:has(#reset-order-page) .form-actions { margin-top: 10px; }

