:root {
  --primary: #236b4a;
  --primary-hover: #19583c;
  --primary-dark: #15452f;
  --bg: #f5f3ec;
  --panel: #ffffff;
  --surface: #ffffff;
  --text: #18221d;
  --text-primary: #18221d;
  --text-secondary: #666666;
  --muted: #999999;
  --border: #e5e5e5;
  --success: #2e8b57;
  --danger: #b83a32;
  --warning: #c47a18;
  --info: #3b82f6;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  line-height: 1.5;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 14px;
  line-height: 1.5;
  color: #fff;
  background: var(--primary);
  cursor: pointer;
}

button:hover {
  background: var(--primary-hover);
}

.btn,
button.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-primary,
button.btn-primary {
  color: #fff;
  background: var(--primary);
}

.btn-primary:hover,
button.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-secondary,
button.secondary,
button.btn-secondary {
  color: var(--text-primary);
  background: var(--surface);
  border: 1px solid var(--border);
}

.btn-secondary:hover,
button.secondary:hover,
button.btn-secondary:hover {
  background: #f5f5f5;
}

.btn-danger,
button.danger,
button.btn-danger {
  color: #fff;
  background: var(--danger);
  border: 0;
}

.btn-danger:hover,
button.danger:hover,
button.btn-danger:hover {
  background: #dc2626;
}

.btn-ghost,
button.ghost,
button.btn-ghost {
  color: var(--muted);
  background: transparent;
  border: 0;
}

.btn-ghost:hover,
button.ghost:hover,
button.btn-ghost:hover {
  background: #f5f5f5;
  color: var(--text-primary);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.btn-sm,
button.small,
button.btn-sm {
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 13px;
}

.btn-xs,
button.btn-xs {
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
  line-height: 1.2;
  min-width: 22px;
}

.hidden {
  display: none !important;
}

.login-view {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at top left, rgba(46, 139, 87, 0.12), transparent 36%),
    linear-gradient(180deg, #f0f9f4 0%, var(--bg) 48%, #fafafa 100%);
}

.login-card {
  width: min(420px, 100%);
  padding: 40px 36px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.login-brand,
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.login-brand h1,
.brand-text strong {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
}

.login-brand p,
.brand-text span {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.brand-icon {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--primary);
  font-weight: 700;
  font-size: 18px;
  flex-shrink: 0;
}

.sidebar .brand-icon {
  width: 40px;
  height: 40px;
  font-size: 16px;
}

.login-lead {
  margin: 0 0 20px;
  color: var(--text-secondary);
  font-size: 14px;
}

.btn-login {
  width: 100%;
  margin-top: 4px;
}

.btn-login,
button.btn-login {
  color: #fff;
  background: var(--primary);
}

.btn-login:hover,
button.btn-login:hover {
  background: var(--primary-hover);
}

.brand-mark {
  display: none;
}

.login-card h1 {
  margin: 0;
}

.login-form,
.modal-form {
  display: grid;
  gap: 16px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text);
  background: #fff;
  outline: none;
}

textarea {
  min-height: 90px;
  resize: vertical;
}

textarea.json-editor {
  min-height: 420px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 13px;
  line-height: 1.5;
}

textarea.mini-json-editor {
  min-height: 120px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
  line-height: 1.5;
}

.block-editor-list {
  display: grid;
  gap: 16px;
}

.block-editor-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.block-editor-toolbar select {
  width: min(420px, 100%);
}

.block-editor-card {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fbfdfb;
}

.block-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.block-editor-head span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.block-editor-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.block-editor-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.block-editor-grid .full {
  grid-column: 1 / -1;
}

.page-preview {
  display: grid;
  gap: 10px;
}

.page-preview-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
}

.page-preview-block span {
  color: var(--muted);
  font-size: 13px;
}

.page-preview-block.muted {
  opacity: 0.55;
}

.config-help,
.form-help {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 13px;
}

.config-help code,
.form-help code {
  display: inline-block;
  margin: 0 4px 6px 0;
  padding: 3px 7px;
  border-radius: 999px;
  color: var(--primary);
  background: #e8f4ee;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(46, 139, 87, 0.12);
}

.form-error {
  min-height: 20px;
  margin-top: 14px;
  color: var(--danger);
  font-size: 14px;
}

.hint {
  margin-top: 22px !important;
  font-size: 13px;
}

.app-view {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 240px 1fr;
  background: var(--bg);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px 0;
  overflow-y: auto;
  color: var(--text-primary);
  background: var(--surface);
  border-right: 1px solid var(--border);
}

.sidebar-header {
  padding: 0 20px 24px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.sidebar-title {
  display: none;
}

.nav-list {
  display: block;
}

.nav-group {
  margin-bottom: 8px;
}

.nav-group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 8px 20px;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  cursor: pointer;
  text-align: left;
}

.nav-group-title:hover {
  color: var(--text-secondary);
  background: #fafafa;
}

.nav-group-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

/* 财务中心：强调金额、风险和待办的低干扰工作台 */
.finance-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr);
  gap: 28px;
  align-items: end;
  padding: 28px 30px;
  margin-bottom: 18px;
  color: #f7fbf8;
  background: #24312b;
  border-left: 6px solid #2e8b57;
}

.finance-hero h2 { margin: 4px 0 6px; font-size: clamp(24px, 3vw, 38px); }
.finance-hero p { margin: 0; color: #cbd7d0; }
.finance-hero input { color: #24312b; background: #f4f6f2; }
.finance-eyebrow { color: #8dc3a5; font-size: 11px; font-weight: 800; letter-spacing: .18em; }

.finance-metric-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr;
  gap: 14px;
  margin-bottom: 18px;
}

.finance-metric {
  min-height: 132px;
  padding: 22px;
  background: #fff;
  border: 1px solid var(--border-color, #dfe5df);
  border-top: 4px solid #829087;
}

.finance-metric span, .finance-metric small { display: block; color: #68756e; }
.finance-metric strong { display: block; margin: 12px 0 8px; color: #24312b; font-family: "DIN Alternate", "Microsoft YaHei", sans-serif; font-size: clamp(25px, 3vw, 36px); font-variant-numeric: tabular-nums; }
.finance-metric.is-primary { border-top-color: #217a52; }
.finance-metric.is-risk { border-top-color: #b5473c; }
.finance-metric.is-risk strong, .finance-metric.is-error strong { color: #b5473c; }

.finance-reserve {
  margin-bottom: 18px;
  padding: 22px 24px;
  background: #fff;
  border: 1px solid var(--border-color, #dfe5df);
  border-left: 5px solid #217a52;
}

.finance-reserve.is-warning { border-left-color: #a66a16; }
.finance-reserve.is-risk, .finance-reserve.is-error { border-left-color: #b5473c; }
.finance-reserve.is-unconfigured { border-left-color: #829087; }
.finance-reserve-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.finance-reserve-heading h3 { margin: 3px 0 5px; color: #24312b; font-size: 19px; }
.finance-reserve-heading p { margin: 0; color: #68756e; line-height: 1.6; }
.finance-reserve-status { flex: 0 0 auto; padding: 7px 10px; color: #217a52; background: #eaf5ef; border-radius: 6px; font-size: 13px; }
.finance-reserve.is-warning .finance-reserve-status { color: #8b5811; background: #fff3d8; }
.finance-reserve.is-risk .finance-reserve-status, .finance-reserve.is-error .finance-reserve-status { color: #9f392f; background: #fcebea; }
.finance-reserve.is-unconfigured .finance-reserve-status { color: #59675f; background: #eef1ee; }
.finance-reserve-values { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 20px; border-block: 1px solid #e6ebe7; }
.finance-reserve-values > div { padding: 17px 18px 17px 0; }
.finance-reserve-values > div + div { padding-left: 18px; border-left: 1px solid #e6ebe7; }
.finance-reserve-values span, .finance-reserve-values small { display: block; color: #68756e; }
.finance-reserve-values strong { display: block; margin: 8px 0 5px; color: #24312b; font: 800 clamp(22px, 2.6vw, 31px)/1.1 "DIN Alternate", "Microsoft YaHei", sans-serif; font-variant-numeric: tabular-nums; }
.finance-reserve.is-risk .finance-reserve-values > div:last-child strong { color: #b5473c; }
.finance-reserve-editor { display: flex; align-items: end; gap: 10px; padding-top: 16px; }
.finance-reserve-editor label span { display: block; margin-bottom: 6px; color: #59675f; font-size: 12px; font-weight: 700; }
.finance-reserve-editor input { width: 180px; }
.finance-reserve-editor > small { margin-left: auto; color: #7a867f; line-height: 1.5; }

.finance-queue {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--border-color, #dfe5df);
}

.finance-queue-item {
  position: relative;
  padding: 20px;
  text-align: left;
  color: #24312b;
  background: #fff;
  border: 0;
  border-right: 1px solid var(--border-color, #dfe5df);
  cursor: pointer;
}

.finance-queue-item:last-child { border-right: 0; }
.finance-queue-item:hover { background: #f4f6f2; transform: translateY(-1px); }
.finance-queue-item i { position: absolute; right: 18px; top: 18px; color: #829087; font-style: normal; font-size: 18px; }
.finance-queue-item.has-pending { box-shadow: inset 0 3px 0 #a66a16; }
.finance-queue-item.has-pending .finance-queue-label::after { content: "待处理"; margin-left: 8px; padding: 2px 6px; color: #8b5811; background: #fff3d8; border-radius: 999px; font-size: 11px; }
.finance-queue-item span, .finance-queue-item small { display: block; }
.finance-queue-item strong { display: block; margin: 8px 0; color: #a66a16; font-size: 28px; font-variant-numeric: tabular-nums; }
.finance-queue-item.is-error strong { color: #b5473c; font-size: 18px; }
.finance-queue-item small { color: #68756e; }
.finance-shortcuts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.finance-shortcut { display: grid; grid-template-columns: 34px 1fr; gap: 2px 12px; padding: 18px; text-align: left; color: #24312b; background: #fff; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; }
.finance-shortcut:hover { border-color: #2e8b57; background: #f7fbf8; }
.finance-shortcut > span { grid-row: 1 / 3; color: #2e8b57; font: 800 12px/1.4 "DIN Alternate", "Microsoft YaHei", sans-serif; letter-spacing: .08em; }
.finance-shortcut strong { font-size: 15px; }
.finance-shortcut small { color: #68756e; line-height: 1.55; }

.finance-operation-shell { display: grid; gap: 14px; }
.finance-status-tabs { position: sticky; top: 64px; z-index: 8; display: flex; gap: 4px; overflow-x: auto; padding: 7px; background: #fff; border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 5px 18px rgba(36, 49, 43, .05); scrollbar-width: none; }
.finance-status-tabs::-webkit-scrollbar { display: none; }
.finance-status-tab { flex: 0 0 auto; min-height: 36px; padding: 0 14px; color: #59675f; background: transparent; border: 0; border-radius: 7px; font-weight: 700; cursor: pointer; }
.finance-status-tab:hover { color: #236b4a; background: #f4f6f2; }
.finance-status-tab.active { color: #fff; background: #236b4a; }
.finance-operation-shell > .list-toolbar { margin: 0; padding: 12px 14px; background: #fff; border: 1px solid var(--border); border-radius: 10px; }
.finance-search-group { display: flex; gap: 8px; min-width: min(100%, 360px); }
.finance-search-group input { flex: 1; min-width: 170px; }
.finance-summary-line { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px 20px; color: #dce7e0; background: #24312b; border-radius: 9px; }
.finance-summary-line > div { display: flex; align-items: baseline; gap: 9px; }
.finance-summary-line strong { color: #fff; font: 800 30px/1 "DIN Alternate", "Microsoft YaHei", sans-serif; }
.finance-summary-line small, .finance-summary-line p { margin: 0; color: #b9c8bf; }
.finance-id { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #68756e; font-size: 12px; }
.finance-money { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.finance-money--tax { color: #a66a16; }
.finance-row-actions { min-width: 150px; }
.finance-row-actions .btn-primary { box-shadow: 0 3px 8px rgba(35, 107, 74, .16); }

@media (max-width: 900px) {
  .finance-hero { grid-template-columns: 1fr; align-items: start; }
  .finance-metric-grid { grid-template-columns: 1fr; }
  .finance-reserve-values { grid-template-columns: 1fr; }
  .finance-reserve-values > div { padding: 14px 0; }
  .finance-reserve-values > div + div { padding-left: 0; border-left: 0; border-top: 1px solid #e6ebe7; }
  .finance-reserve-editor { align-items: stretch; flex-wrap: wrap; }
  .finance-reserve-editor > small { width: 100%; margin-left: 0; }
  .finance-queue { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .finance-queue-item:nth-child(2) { border-right: 0; }
  .finance-queue-item:nth-child(-n+2) { border-bottom: 1px solid var(--border-color, #dfe5df); }
  .finance-shortcuts { grid-template-columns: 1fr; }
  .finance-summary-line { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 560px) {
  .finance-hero { padding: 22px 18px; }
  .finance-reserve { padding: 19px 17px; }
  .finance-reserve-heading { flex-direction: column; }
  .finance-reserve-editor label, .finance-reserve-editor input, .finance-reserve-editor .btn { width: 100%; }
  .finance-hero .inline-fields { align-items: stretch; }
  .finance-hero .inline-fields input, .finance-hero .inline-fields button { width: 100%; }
  .finance-queue { grid-template-columns: 1fr; }
  .finance-queue-item { border-right: 0; border-bottom: 1px solid var(--border-color, #dfe5df); }
  .finance-status-tabs { top: 55px; margin-inline: -4px; }
  .finance-search-group { width: 100%; min-width: 0; }
  .finance-operation-shell > .list-toolbar > .btn { width: 100%; }
}

.ui-icon {
  display: block;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.nav-group-label .ui-icon {
  width: 15px;
  height: 15px;
  flex-basis: 15px;
}

.nav-group-caret {
  flex-shrink: 0;
  font-size: 11px;
  opacity: 0.75;
}

.nav-group-items {
  display: block;
}

.nav-group.is-collapsed .nav-group-items {
  display: none;
}

.workbench-panel {
  margin-bottom: 20px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(46, 139, 87, 0.06), rgba(255, 255, 255, 0.9) 48%),
    var(--surface);
}

.workbench-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.workbench-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.workbench-sub {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.workbench-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}

.workbench-chip {
  display: grid;
  gap: 4px;
  min-height: 84px;
  padding: 14px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.workbench-chip:hover {
  border-color: var(--primary);
  box-shadow: 0 6px 16px rgba(46, 139, 87, 0.12);
  transform: translateY(-1px);
}

.workbench-chip.is-active {
  border-color: var(--primary, #2e8b57);
  box-shadow: 0 0 0 1px rgba(46, 139, 87, 0.25);
  background: rgba(46, 139, 87, 0.06);
}
.reason-board {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.workbench-chip.is-empty {
  opacity: 0.72;
}

.workbench-chip-count {
  font-size: 28px;
  line-height: 1;
  font-weight: 700;
  color: var(--text-primary);
}

.workbench-chip-label {
  font-size: 13px;
  color: var(--text-secondary);
}

.workbench-chip--warn .workbench-chip-count { color: var(--warning, #d97706); }
.workbench-chip--danger .workbench-chip-count { color: var(--danger, #dc2626); }
.workbench-chip--info .workbench-chip-count { color: #2563eb; }

.workbench-empty {
  grid-column: 1 / -1;
  padding: 18px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.nav-list .nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 20px;
  border: 0;
  border-left: 3px solid transparent;
  border-radius: 0;
  color: var(--text-secondary);
  background: transparent;
  text-align: left;
  font-size: 14px;
  font-weight: 400;
}

.nav-list .nav-item:hover {
  color: var(--text-primary);
  background: #f5f5f5;
}

.nav-list .nav-item.active {
  color: var(--primary);
  background: #f0f9f4;
  border-left-color: var(--primary);
  font-weight: 500;
}

.nav-icon {
  display: grid;
  place-items: center;
  width: 20px;
  flex-shrink: 0;
}

.dashboard-quick-panel {
  margin-bottom: 20px;
}

.section-heading-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.section-heading-row h2 {
  margin: 0;
  font-size: 17px;
}

.section-heading-row p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.dashboard-quick-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.dashboard-quick-action {
  display: grid;
  gap: 5px;
  min-height: 82px;
  padding: 15px 16px;
  border: 1px solid var(--border);
  border-radius: 9px;
  color: var(--text-primary);
  background: var(--surface);
  text-align: left;
}

.dashboard-quick-action:hover {
  border-color: var(--primary);
  color: var(--primary-dark);
  background: #f3f8f5;
}

.dashboard-quick-action span {
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 1100px) {
  .dashboard-quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

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

code,
.mono {
  font-family: "Cascadia Mono", Consolas, monospace;
}

.main {
  min-width: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 32px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 10;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.menu-toggle,
.icon-btn.menu-toggle {
  display: none;
  flex-shrink: 0;
  font-size: 18px;
  line-height: 1;
}

.sidebar-mask {
  display: none;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  font-size: 14px;
}

.breadcrumb-item {
  color: var(--muted);
}

.breadcrumb-sep,
.breadcrumb-current {
  color: var(--text-primary);
}

.breadcrumb-current {
  font-weight: 500;
}

.topbar h2,
.topbar-subtitle {
  margin: 0;
}

.topbar-subtitle {
  color: var(--muted);
  font-size: 14px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  white-space: nowrap;
}

.search-box {
  position: relative;
}

.search-input {
  width: 280px;
  padding: 8px 12px 8px 36px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  background: var(--bg, #fafafa);
}

.search-input:focus {
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(46, 139, 87, 0.12);
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
  font-size: 14px;
}

.icon-btn {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-primary);
  background: var(--surface);
  display: grid;
  place-items: center;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.icon-btn:hover {
  background: #f5f5f5;
}

.global-search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 30;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
  max-height: 320px;
  overflow: auto;
}

.global-search-item {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 12px 14px;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.global-search-item:last-child {
  border-bottom: 0;
}

.global-search-item:hover {
  background: #f5f5f5;
}

.global-search-empty {
  padding: 14px;
  color: var(--muted);
  font-size: 13px;
}

.amount-positive {
  color: var(--success);
  font-weight: 600;
}

.amount-negative {
  color: var(--danger);
  font-weight: 600;
}

.amount-warning {
  color: var(--warning, #d97706);
  font-weight: 600;
}

.stat-trend.warning {
  color: var(--warning, #d97706);
}

.user-menu {
  position: relative;
  flex-shrink: 0;
}

.user-menu-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
  color: inherit;
}

.user-menu-toggle:hover {
  background: #f5f5f5;
}

.user-menu.is-open .user-menu-toggle {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(46, 139, 87, 0.12);
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--primary);
  font-size: 13px;
  font-weight: 600;
}

.user-info {
  display: grid;
  gap: 2px;
  text-align: left;
}

.user-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.user-role {
  font-size: 12px;
  color: var(--muted);
}

.user-menu-caret {
  color: var(--muted);
  font-size: 12px;
}

.user-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 40;
  min-width: 148px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}

.user-menu.is-open .user-dropdown {
  display: grid;
  gap: 2px;
}

.user-dropdown-item {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-primary);
  text-align: left;
  font-size: 14px;
  cursor: pointer;
}

.user-dropdown-item:hover {
  background: #f5f5f5;
}

.user-dropdown-danger {
  color: var(--danger, #dc2626);
}

.content {
  padding: 32px;
  flex: 1;
}

.page-header {
  margin-bottom: 24px;
}

.page-title {
  margin: 0 0 6px;
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
}

.page-subtitle {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

.page-body {
  min-width: 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}

.stats-grid-wide {
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

.stat-card {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
}

.stat-label {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 8px;
}

.stat-value {
  font-size: 28px;
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 8px;
}

.stat-trend {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--muted);
}

.stat-trend.up {
  color: var(--success);
}

.stat-trend.down {
  color: var(--danger);
}

.list-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.list-toolbar,
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.toolbar-spacer {
  flex: 1;
}

.list-toolbar input,
.list-toolbar select {
  width: 180px;
}

.quick-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -6px 0 14px;
}

.filter-chip {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  cursor: pointer;
}

.filter-chip:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.filter-chip.active {
  background: rgba(22, 119, 255, 0.08);
  border-color: var(--primary);
  color: var(--primary);
  font-weight: 600;
}

.product-filter-groups {
  display: grid;
  gap: 10px;
  margin: -2px 0 14px;
}

.product-filter-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
}

.product-filter-label {
  min-width: 36px;
  color: var(--muted, #888);
  font-size: 12px;
  font-weight: 600;
}

.product-filter-group .quick-filters {
  margin: 0;
  flex: 1;
}

.list-summary {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.list-summary strong {
  color: var(--text);
}

.list-summary-hint::before {
  content: ' ? ';
}

.toolbar-note-inline {
  color: var(--muted);
  font-size: 13px;
}

.toolbar-note-block {
  margin: -8px 0 16px;
  color: var(--muted);
  font-size: 13px;
}

.panel-body {
  padding: 16px 18px;
}

.cms-block-list {
  display: grid;
  gap: 8px;
}

.cms-block {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fafafa;
  font-size: 14px;
}

.cms-block strong {
  color: var(--text);
}

.cms-block.muted {
  opacity: 0.55;
}

.cms-preview {
  min-height: 120px;
  padding: 16px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  background: #fafafa;
}

.cms-preview .page-preview {
  gap: 8px;
}

.cms-preview-placeholder {
  display: block;
  color: var(--muted);
  text-align: center;
  padding: 24px 12px;
}

.cms-diff-section {
  margin: 0 0 12px;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fafafa;
}

.cms-diff-section h4 {
  margin: 0 0 8px;
  font-size: 14px;
}

.cms-diff-section ul {
  margin: 0;
  padding-left: 18px;
}

.cms-diff-section li {
  margin: 4px 0;
  font-size: 13px;
  line-height: 1.45;
}

.cms-diff-add { border-color: #86efac; background: #f0fdf4; }
.cms-diff-remove { border-color: #fca5a5; background: #fef2f2; }
.cms-diff-change { border-color: #fcd34d; background: #fffbeb; }
.cms-diff-reorder,
.cms-diff-meta { border-color: #93c5fd; background: #eff6ff; }

.cms-diff-json {
  margin: 12px 0 4px;
}

.cms-diff-json summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 8px;
}

.cms-diff-json-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

tr.row-exception td {
  background: rgba(220, 38, 38, 0.04);
}

@media (max-width: 900px) {
  .cms-diff-json-grid {
    grid-template-columns: 1fr;
  }
}

.cms-layout {
  margin-bottom: 22px;
}

.operations-hero {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(180px, 3fr);
  gap: 28px;
  align-items: end;
  margin-bottom: 14px;
  padding: 26px 28px;
  overflow: hidden;
  border: 1px solid #d7d7cd;
  border-radius: 14px;
  color: #f8f4e9;
  background:
    linear-gradient(112deg, rgba(255, 255, 255, 0.08), transparent 42%),
    #193f2f;
}

.operations-kicker {
  display: inline-block;
  margin-bottom: 8px;
  color: #d7b878;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.operations-hero h2 {
  max-width: 720px;
  margin: 0;
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1.25;
  letter-spacing: -0.03em;
}

.operations-hero p {
  max-width: 760px;
  margin: 12px 0 0;
  color: rgba(248, 244, 233, 0.72);
  font-size: 14px;
}

.operations-status {
  display: grid;
  align-content: center;
  min-height: 108px;
  padding: 18px;
  border-left: 1px solid rgba(255, 255, 255, 0.18);
}

.operations-status strong {
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 42px;
  line-height: 1;
}

.operations-status span {
  margin-top: 8px;
  color: rgba(248, 244, 233, 0.68);
  font-size: 13px;
}

.operations-status.has-pending strong {
  color: #efc16f;
}

.operations-shortcuts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}

.operations-shortcut {
  display: grid;
  gap: 5px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-primary);
  background: var(--surface);
  text-align: left;
}

.operations-shortcut:hover {
  border-color: var(--primary);
  color: var(--primary-dark);
  background: #f3f8f5;
}

.operations-shortcut span {
  color: var(--muted);
  font-size: 12px;
}

.effect-notice {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  margin-bottom: 16px;
  padding: 12px 14px;
  border-left: 3px solid var(--warning);
  background: #fff8e9;
  color: #74511f;
  font-size: 13px;
}

.flag-key {
  margin-top: 5px;
}

.flag-impact {
  margin-top: 6px;
  font-size: 12px;
}

.flag-impact--danger { color: var(--danger); }
.flag-impact--warning { color: #936011; }
.flag-impact--info { color: #27628f; }
.flag-impact--success { color: var(--primary); }
.flag-impact--muted { color: var(--muted); }

.flag-advanced summary {
  cursor: pointer;
  color: var(--text-secondary);
}

.flag-advanced code {
  display: block;
  max-width: 320px;
  margin-top: 6px;
  overflow-wrap: anywhere;
  white-space: normal;
}

.advanced-config {
  padding: 10px 12px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  background: #fbfaf6;
}

.advanced-config summary {
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 13px;
}

.advanced-config[open] summary {
  margin-bottom: 12px;
}

@media (max-width: 900px) {
  .operations-hero {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .operations-status {
    min-height: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    border-left: 0;
  }

  .operations-shortcuts {
    grid-template-columns: 1fr;
  }
}

.product-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.product-cell img,
.product-image-fallback {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  object-fit: cover;
  background: #f5f5f5;
  flex-shrink: 0;
}

.product-image-fallback {
  display: grid;
  place-items: center;
  color: #8a8074;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0;
  background: linear-gradient(145deg, #f3efe8, #e8e2d8);
}

.product-name {
  font-weight: 500;
  margin-bottom: 2px;
}

.product-meta {
  color: var(--muted);
  font-size: 12px;
}

.funnel-panel .panel-body,
.funnel-body {
  padding: 20px;
  font-size: 15px;
  color: var(--text-secondary);
}

.funnel-body strong {
  color: var(--text-primary);
}

.chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}

.cal-legend {
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.cal-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
}

.cal-legend-item.cal-ok { background: rgba(46, 139, 87, 0.12); color: #2e8b57; }
.cal-legend-item.cal-low { background: rgba(196, 92, 38, 0.12); color: #c45c26; }
.cal-legend-item.cal-full { background: rgba(185, 28, 28, 0.12); color: #b91c1c; }

.cal-weekdays,
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.cal-weekdays {
  margin-bottom: 8px;
}

.cal-weekday {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  padding: 4px 0;
}

.cal-cell {
  min-height: 78px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px;
  background: #fff;
}

.cal-cell.cal-empty {
  border: none;
  background: transparent;
}

.cal-cell.cal-ok {
  background: rgba(46, 139, 87, 0.08);
  border-color: rgba(46, 139, 87, 0.25);
}

.cal-cell.cal-low {
  background: rgba(196, 92, 38, 0.1);
  border-color: rgba(196, 92, 38, 0.28);
}

.cal-cell.cal-full {
  background: rgba(185, 28, 28, 0.1);
  border-color: rgba(185, 28, 28, 0.28);
}

.cal-day {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.cal-remain,
.cal-booked {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

.cal-cell.cal-full .cal-remain {
  color: #b91c1c;
  font-weight: 600;
}

.slot-section {
  margin-bottom: 18px;
}

.slot-section-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  margin-bottom: 10px;
  font-size: 13px;
  color: var(--muted);
}

.slot-section-head strong {
  color: var(--text-primary);
  font-size: 14px;
}

.slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 8px;
}

.slot-cell {
  min-height: 72px;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  appearance: none;
}

.slot-cell:not(:disabled):hover {
  border-color: var(--primary);
  transform: translateY(-1px);
}

.slot-cell:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.slot-cell:disabled {
  cursor: default;
  opacity: 0.82;
}

.slot-cell.slot-ok {
  background: rgba(46, 139, 87, 0.08);
  border-color: rgba(46, 139, 87, 0.25);
}

.slot-cell.slot-low {
  background: rgba(196, 92, 38, 0.1);
  border-color: rgba(196, 92, 38, 0.28);
}

.slot-cell.slot-full {
  background: rgba(185, 28, 28, 0.1);
  border-color: rgba(185, 28, 28, 0.28);
}

.slot-time {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.slot-remain,
.slot-booked {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

.slot-cell.slot-full .slot-remain {
  color: #b91c1c;
  font-weight: 600;
}

.slot-cell.slot-overridden {
  box-shadow: inset 3px 0 0 #c45c26;
}

.slot-adjustment {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed rgba(43, 53, 47, 0.16);
  font-size: 11px;
  color: #8a4b24;
}

.cal-legend-item.cal-adjusted {
  color: #8a4b24;
  background: rgba(196, 92, 38, 0.1);
  border-color: rgba(196, 92, 38, 0.3);
}

.dining-month-board {
  display: grid;
  gap: 18px;
}

.dining-calendar {
  overflow-x: auto;
  padding: 2px 2px 8px;
}

.dining-calendar-weekdays,
.dining-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(108px, 1fr));
  gap: 8px;
  min-width: 804px;
}

.dining-calendar-weekdays {
  margin-bottom: 8px;
}

.dining-calendar-weekday {
  padding: 0 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  text-align: center;
}

.dining-calendar-blank {
  min-height: 94px;
  border: 1px dashed rgba(43, 53, 47, 0.1);
  border-radius: 10px;
  background: rgba(246, 244, 238, 0.45);
}

.dining-calendar-date {
  position: relative;
  display: grid;
  min-height: 94px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: var(--text-primary);
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.dining-calendar-date:hover {
  border-color: rgba(24, 92, 74, .5);
  transform: translateY(-1px);
}

.dining-calendar-date.is-ok {
  background: #eaf5ee;
}

.dining-calendar-date.is-low {
  background: #fff3e3;
  border-color: rgba(243, 164, 59, .55);
}

.dining-calendar-date.is-full {
  background: #fcebea;
  border-color: rgba(217, 92, 79, .58);
}

.dining-calendar-date.is-selected {
  border-color: #185c4a;
  box-shadow: 0 0 0 2px rgba(24, 92, 74, .18), inset 4px 0 0 #185c4a;
}

.dining-calendar-date__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.dining-calendar-date__top strong {
  font-size: 20px;
  line-height: 1;
}

.dining-calendar-date__top small,
.dining-calendar-date__numbers {
  color: var(--muted);
  font-size: 10px;
}

.dining-calendar-date__state {
  align-self: end;
  margin-top: 9px;
  font-size: 12px;
  font-weight: 700;
}

.dining-calendar-date.is-low .dining-calendar-date__state {
  color: #9a5b0d;
}

.dining-calendar-date.is-full .dining-calendar-date__state {
  color: #aa3328;
}

.dining-calendar-date__adjusted {
  margin-top: 5px;
  color: #8a4b24;
  font-size: 10px;
  font-weight: 600;
}

.dining-selected-day {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
}

.dining-selected-day__title {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 12px;
}

.dining-selected-day__title strong {
  color: var(--text-primary);
  font-size: 16px;
}

.dining-day-detail[hidden] {
  display: none !important;
}

.hotel-room-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px;
}

.hotel-room-card {
  min-height: 112px;
  width: 100%;
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.hotel-room-card:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(51, 65, 54, 0.12);
}

.hotel-room-card:not(:disabled):focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.hotel-room-card:disabled {
  cursor: not-allowed;
  opacity: 0.72;
}

.hotel-room-card__remaining {
  margin-top: 12px;
  color: var(--text-primary);
  font-size: 13px;
}

.hotel-room-card__remaining strong {
  margin: 0 2px;
  font-size: 22px;
  line-height: 1;
}

.hotel-order-day-sections > section[hidden] {
  display: none !important;
}

.dining-day-detail__head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
}

.dining-day-detail__head > div {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.dining-day-detail__head strong {
  color: var(--text-primary);
  font-size: 16px;
}

.dining-month-sections {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 20px;
}

.dining-month-sections .slot-section {
  margin-bottom: 8px;
}

.dining-capacity-help {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}

.capacity-override-flag {
  color: #8a4b24;
  font-weight: 600;
}

.table-floor-wrap {
  overflow: auto;
  padding: 8px 0 4px;
}

.table-floor {
  position: relative;
  min-width: 860px;
  min-height: 520px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  background:
    linear-gradient(90deg, rgba(0,0,0,0.03) 1px, transparent 1px),
    linear-gradient(rgba(0,0,0,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  background-color: #fafafa;
}

.table-floor-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.table-node {
  position: absolute;
  width: 112px;
  min-height: 72px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 2px solid transparent;
  background: #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
  text-align: left;
  cursor: pointer;
}

.table-node-name {
  display: block;
  font-size: 14px;
  font-weight: 700;
}

.table-node-meta,
.table-node-status {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: var(--muted);
}

.table-node.table-free {
  border-color: #16a34a;
  background: #f0fdf4;
}

.table-node.table-occupied {
  border-color: #dc2626;
  background: #fef2f2;
}

.table-node.table-reserved {
  border-color: #d97706;
  background: #fffbeb;
}

.table-node.table-cleaning {
  border-color: #64748b;
  background: #f8fafc;
}

.order-meta.health-hint {
  color: #b45309;
  margin-top: 4px;
}

.rank-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.panel-subtitle {
  margin: 28px 0 12px;
  font-size: 16px;
  font-weight: 600;
  color: #1f2937;
}

.chart-panel .chart-wrap {
  position: relative;
  height: 280px;
  padding: 12px 16px 18px;
}

.toolbar-note {
  padding: 0 18px 16px;
  color: var(--muted);
  font-size: 13px;
}

.muted {
  color: var(--muted);
  font-size: 12px;
}

.panel {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: none;
  overflow: hidden;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}

.panel-header h3,
.panel-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.toolbar input,
.toolbar select {
  width: 180px;
}

.table-wrap,
.table-container {
  overflow: auto;
}

table,
table.admin-data-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
  font-size: 14px;
}

th,
td,
.admin-data-table th,
.admin-data-table td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}

th,
.admin-data-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  color: var(--text-secondary);
  background: #fafafa;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.admin-data-table tbody tr:hover {
  background: #fbfcfb;
}

.admin-data-table td {
  color: var(--text-primary);
}

.admin-data-table .cell-title {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--text-primary);
}

.admin-data-table .cell-sub,
.admin-data-table .muted,
.admin-data-table .order-meta {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
}

.admin-data-table .cell-sub--warn {
  color: #b45309;
}

.admin-data-table .order-no,
.admin-data-table .user-name,
.admin-data-table .product-name,
.admin-data-table .order-goods-name {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  word-break: break-all;
}

.admin-data-table .amount-cell strong,
.admin-data-table td.col-amount strong {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  white-space: nowrap;
}

.admin-data-table .col-actions,
.admin-data-table td.actions {
  width: 1%;
  white-space: nowrap;
  vertical-align: middle;
}

.admin-data-table .col-amount,
.admin-data-table .col-status,
.admin-data-table .col-ship,
.admin-data-table .col-commission {
  white-space: nowrap;
}

.admin-data-table .col-reason {
  min-width: 140px;
  max-width: 240px;
}

.admin-data-table .badge {
  white-space: nowrap;
}

td img {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  object-fit: cover;
  background: #eef2f0;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.admin-data-table .actions .btn,
.admin-data-table .order-row-actions .btn {
  min-height: 32px;
}

.order-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.order-more {
  position: relative;
}

.order-more-toggle {
  min-width: 36px;
}

.order-more-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 20;
  min-width: 148px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
  display: grid;
  gap: 4px;
}

.order-more-menu.is-fixed {
  /* 由 JS 按视口定位，避免被 .panel / .table-wrap overflow 裁切 */
  position: fixed;
  z-index: 1200;
}

.order-more-menu.hidden {
  display: none;
}

.order-more-menu .btn,
.order-more-menu select {
  width: 100%;
  justify-content: flex-start;
}

/* 订单列表：避免继承全局 button 绿底；订单号/商品分列 */
button.order-cell-btn,
.order-cell-btn {
  display: block;
  width: 100%;
  min-width: 0;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  text-align: left;
  cursor: pointer;
  color: var(--text-primary) !important;
  font: inherit;
}

button.order-cell-btn:hover,
.order-cell-btn:hover {
  background: transparent !important;
  color: var(--text-primary) !important;
}

.order-cell-btn:hover .order-no {
  color: var(--primary);
}

.col-order-no {
  width: 168px;
  max-width: 200px;
  vertical-align: top;
}

.col-order-goods {
  min-width: 220px;
  max-width: 320px;
  vertical-align: top;
}

.col-amount,
.col-status,
.col-commission,
.col-ship {
  white-space: nowrap;
  vertical-align: middle;
}

.col-actions {
  width: 1%;
  white-space: nowrap;
  vertical-align: middle;
}

.order-goods-cell,
.order-goods {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.order-goods-shipping-cell {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.shipping-recipient {
  min-width: 240px;
  padding: 9px 10px;
  border: 1px solid #cfe0d6;
  border-radius: 8px;
  background: #f4f8f5;
  color: var(--text-primary);
  user-select: text;
}

.shipping-recipient-head,
.shipping-recipient-contact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.shipping-recipient-head {
  margin-bottom: 6px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
}

.shipping-copy-btn {
  min-height: 26px !important;
  padding: 3px 8px;
  font-size: 12px;
}

.shipping-recipient-contact {
  justify-content: flex-start;
  font-size: 13px;
  line-height: 1.5;
}

.shipping-recipient-contact strong {
  font-weight: 600;
}

.shipping-recipient-address {
  margin-top: 3px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--text-secondary);
  word-break: break-word;
}

.order-goods-line {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.order-goods-line img,
.order-goods-line .product-image-fallback {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  flex: 0 0 auto;
  background: #eef2f0;
}

.order-goods-info {
  min-width: 0;
}

.order-goods-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-goods-meta,
.order-goods-more,
.order-goods-empty {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}

.nav-badge,
.notify-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--danger, #dc2626);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
}

.nav-item .nav-badge {
  margin-left: 6px;
}

.notify-btn {
  position: relative;
}

.notify-btn .notify-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  pointer-events: none;
}

.alert-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
}

.alert-bar.warning {
  border-color: rgba(217, 119, 6, 0.28);
  background: #fffbf0;
  color: #92400e;
}

.drawer {
  position: fixed;
  inset: 0;
  z-index: 110;
}

.drawer.hidden {
  display: none;
}

.drawer-mask {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
}

.drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  width: min(480px, 100vw);
  height: 100%;
  background: var(--surface);
  border-left: 1px solid var(--border);
  box-shadow: -12px 0 32px rgba(0, 0, 0, 0.14);
  transform: translate3d(0, 0, 0);
}

.drawer-panel--todo {
  width: min(420px, 100vw);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}

.drawer-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.drawer-body {
  flex: 1;
  overflow: auto;
  padding: 16px 18px 24px;
  -webkit-overflow-scrolling: touch;
}

.drawer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.todo-drawer-section {
  margin-bottom: 18px;
}

.todo-drawer-section h4 {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
}

.todo-queue {
  display: grid;
  gap: 8px;
}

.todo-queue-item {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.todo-queue-item:hover {
  border-color: var(--primary);
}

.todo-queue-item strong {
  font-size: 14px;
}

.todo-queue-item span {
  font-size: 12px;
  color: var(--muted);
}

.todo-drawer-empty {
  padding: 16px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

/* Drawer ??????????????????? */
body.drawer-open {
  --drawer-active: 1;
}

.dining-today-shell {
  display: grid;
  gap: 12px;
}

.dining-today-tabs {
  margin-bottom: 2px;
}

.dining-today-tabs .quick-filters {
  margin: 0;
}

.login-outdoor-tip {
  margin-top: 12px;
  line-height: 1.5;
  color: var(--muted);
}

.pwa-install-tip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(46, 139, 87, 0.28);
  border-radius: 12px;
  background: rgba(46, 139, 87, 0.08);
}

.pwa-install-tip[hidden] {
  display: none !important;
}

.pwa-install-text {
  display: grid;
  gap: 2px;
  flex: 1 1 160px;
  min-width: 0;
}

.pwa-install-text strong {
  font-size: 14px;
  color: var(--primary-dark, #1f6b41);
}

.pwa-install-text span {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

.pwa-install-actions {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
}

.pwa-install-actions .btn {
  min-height: 36px;
}

.mobile-quick-nav {
  display: none;
}

.verify-desk-panel {
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: linear-gradient(180deg, #f7faf8 0%, #fff 48%);
}

.verify-desk-title {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 650;
}

.verify-desk-sub {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.verify-desk-form {
  display: flex;
  gap: 10px;
  margin: 14px 0 12px;
  flex-wrap: wrap;
}

.verify-code-input {
  flex: 1 1 280px;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 18px;
  letter-spacing: 0.04em;
}

.verify-lookup-empty {
  padding: 16px;
  border: 1px dashed var(--border);
  border-radius: 10px;
  text-align: center;
}

.verify-result-card {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
}

.verify-result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
}

.verify-result-grid .full {
  grid-column: 1 / -1;
}

.verify-result-grid span {
  display: block;
  margin-bottom: 2px;
  font-size: 12px;
}

.verify-code-text {
  font-size: 20px;
  letter-spacing: 0.08em;
}

.verify-result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

@media (max-width: 720px) {
  .verify-result-grid {
    grid-template-columns: 1fr;
  }
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

.badge-success,
.badge:not([class*="badge-"]) {
  color: var(--success);
  background: #f0f9f4;
}

.badge-warning,
.badge.warning {
  color: var(--warning);
  background: #fffbf0;
}

.badge-danger,
.badge.danger {
  color: var(--danger);
  background: #fef2f2;
}

.badge-muted,
.badge.muted {
  color: var(--text-secondary);
  background: #f5f5f5;
}

.badge-info,
.badge.info {
  color: var(--info);
  background: #eff6ff;
}

.order-cell .order-no,
.user-cell .user-name {
  font-weight: 500;
}

.order-meta,
.amount-saved {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.amount-saved {
  color: var(--success);
}

.amount-cell strong {
  font-weight: 600;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 18px;
}

.empty {
  padding: 50px;
  color: var(--muted);
  text-align: center;
}

.modal,
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
}

.modal-mask {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

.modal-card {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(600px, calc(100vw - 36px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  transform: translate(-50%, -50%);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.modal-card.modal-sm {
  width: min(480px, calc(100vw - 36px));
}

.modal-card.modal-lg {
  width: min(720px, calc(100vw - 36px));
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
}

.modal-header h3 {
  margin: 0;
}

.modal-form,
.form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 20px;
}

.modal-form label.full,
.form-grid .full-width {
  grid-column: 1 / -1;
}

.modal-form label,
.form-label {
  display: grid;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 14px;
}

.modal-form input,
.modal-form select,
.modal-form textarea,
.form-input {
  width: 100%;
}

.modal-form textarea,
.form-textarea {
  min-height: 80px;
}

.modal-form label.full,
.form-grid .full-width {
  grid-column: 1 / -1;
}

.image-field .image-input-row {
  display: grid;
  grid-template-columns: 1fr 120px;
  gap: 10px;
}

.image-upload,
.image-field .product-image-fallback {
  width: 120px;
  height: 120px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: #fafafa;
}

.modal-actions,
.modal-footer {
  display: flex;
  grid-column: 1 / -1;
  justify-content: flex-end;
  gap: 10px;
}

button:disabled,
.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.image-input-row {
  display: grid;
  grid-template-columns: 1fr 210px;
  gap: 10px;
}

.file-input {
  padding: 8px;
}

.upload-tip {
  color: var(--muted);
  font-size: 12px;
}

.image-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.image-thumbs .image-thumb {
  display: block;
  width: 72px;
  height: 72px;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  overflow: hidden;
  background: #fafafa;
}

.image-thumbs .image-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.image-thumb-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 72px;
}

.image-thumb-actions {
  display: flex;
  gap: 2px;
  justify-content: center;
}

.image-thumb-index {
  position: absolute;
  top: 2px;
  left: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 11px;
  line-height: 16px;
  text-align: center;
}

.images-field textarea {
  min-height: 88px;
}

.modal-header .icon-btn {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  font-size: 22px;
}

.modal-header .icon-btn:hover {
  background: #f5f5f5;
  color: var(--text-primary);
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 110;
  max-width: 360px;
  padding: 12px 18px;
  border-radius: 8px;
  color: #fff;
  background: #1a1a1a;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1100px) {
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .chart-grid,
  .rank-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .app-view {
    display: block;
    grid-template-columns: none;
  }

  .menu-toggle,
  .icon-btn.menu-toggle {
    display: grid;
    place-items: center;
    min-width: 44px;
    min-height: 44px;
  }

  .icon-btn,
  .notify-btn {
    min-width: 44px;
    min-height: 44px;
  }

  .mobile-quick-nav {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 35;
    align-items: stretch;
    justify-content: space-around;
    gap: 2px;
    min-height: 56px;
    padding: 6px 8px max(8px, env(safe-area-inset-bottom));
    border-top: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.06);
  }

  .mobile-quick-nav[hidden] {
    display: none !important;
  }

  .mobile-quick-nav-item {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-height: 48px;
    padding: 6px 4px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--muted);
    font: inherit;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-quick-nav-item.is-active {
    color: var(--primary, #1f6b4a);
    background: rgba(31, 107, 74, 0.08);
    font-weight: 600;
  }

  .mobile-quick-nav-icon {
    font-size: 16px;
    line-height: 1;
  }

  .mobile-quick-nav-label {
    font-size: 11px;
    line-height: 1.2;
  }

  .app-view.has-mobile-quick-nav .content {
    padding-bottom: calc(72px + env(safe-area-inset-bottom));
  }

  .app-view.has-mobile-quick-nav .toast {
    bottom: calc(72px + env(safe-area-inset-bottom));
  }

  .topbar {
    min-height: 52px;
  }

  .search-box {
    max-width: 160px;
  }

  .breadcrumb-item,
  .breadcrumb-sep {
    display: none;
  }

  .breadcrumb-current {
    font-size: 15px;
    font-weight: 600;
  }

  .dining-today-tabs {
    position: sticky;
    top: 0;
    z-index: 5;
    margin: 0 -4px 8px;
    padding: 8px 4px;
    background: linear-gradient(180deg, var(--bg, #f4f6f5) 70%, transparent);
  }

  .dining-today-tabs .quick-filters,
  .dining-today-tabs .filter-chips,
  .dining-today-tabs .workbench-chips {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .dining-today-tabs .quick-filters::-webkit-scrollbar,
  .dining-today-tabs .filter-chips::-webkit-scrollbar {
    display: none;
  }

  .dining-today-shell .list-toolbar .btn,
  .dining-today-shell .toolbar .btn,
  .dining-today-shell td.actions .btn,
  .dining-today-shell .order-row-actions .btn {
    min-height: 44px;
  }

  .verify-desk-panel {
    position: sticky;
    top: 0;
    z-index: 6;
    margin: 0 0 14px;
    padding: 14px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.04);
  }

  .verify-desk-form {
    flex-wrap: nowrap;
  }

  .verify-desk-form .btn {
    flex: 0 0 auto;
    min-width: 88px;
    min-height: 48px;
  }

  .verify-code-input {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 48px;
    font-size: 20px;
  }

  .verify-result-actions .btn {
    flex: 1 1 calc(50% - 8px);
    min-height: 48px;
  }

  .drawer-panel,
  .drawer-panel--todo {
    width: 100vw;
    max-width: 100vw;
  }

  .drawer-body .workbench-chip,
  #todoDrawerBody .workbench-chip,
  #todoDrawerBody button {
    min-height: 44px;
  }

  .mobile-card-table td.actions .btn,
  .mobile-card-table .order-row-actions .btn {
    flex: 1 1 calc(50% - 8px);
    min-height: 44px;
  }

  .list-toolbar .btn,
  .toolbar .btn {
    min-height: 44px;
  }

  .sidebar-mask {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 40;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }

  .app-view.sidebar-open .sidebar-mask {
    opacity: 1;
    pointer-events: auto;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 50;
    width: min(280px, 86vw);
    height: 100vh;
    height: 100dvh;
    padding-top: max(16px, env(safe-area-inset-top));
    padding-bottom: env(safe-area-inset-bottom);
    border-right: 1px solid var(--border);
    box-shadow: 8px 0 24px rgba(0, 0, 0, 0.12);
    transform: translate3d(-105%, 0, 0);
    transition: transform 0.22s ease;
    -webkit-overflow-scrolling: touch;
    visibility: hidden;
  }

  .app-view.sidebar-open .sidebar {
    transform: translate3d(0, 0, 0);
    visibility: visible;
  }

  .main {
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
  }

  .nav-list .nav-item {
    min-height: 44px;
    padding: 12px 20px;
  }

  .topbar {
    flex-wrap: nowrap;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    padding-top: max(12px, env(safe-area-inset-top));
  }

  .topbar-left {
    flex: 0 1 auto;
    min-width: 0;
  }

  .breadcrumb {
    margin-bottom: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .topbar-actions {
    flex: 1 1 auto;
    justify-content: flex-end;
    flex-wrap: nowrap;
    white-space: nowrap;
    gap: 8px;
    min-width: 0;
  }

  .search-box {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 160px;
  }

  .search-input {
    width: 100%;
  }

  .user-info,
  .user-role {
    display: none;
  }

  .user-menu-toggle {
    padding: 4px 8px;
  }

  .content {
    padding: 16px;
    padding-bottom: max(16px, env(safe-area-inset-bottom));
  }

  .page-header {
    margin-bottom: 16px;
  }

  .page-title {
    font-size: 20px;
  }

  .list-toolbar,
  .toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .toolbar-spacer {
    display: none;
  }

  .list-toolbar input,
  .list-toolbar select,
  .toolbar input,
  .toolbar select {
    width: 100%;
  }

  .list-summary {
    white-space: normal;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .stats-grid-wide {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stat-card {
    padding: 14px;
  }

  .stat-value {
    font-size: 22px;
  }

  .table-wrap,
  .table-container {
    margin: 0;
    padding: 0;
    -webkit-overflow-scrolling: touch;
  }

  .table-wrap:not(.mobile-card-table) table,
  .table-container:not(.mobile-card-table) table {
    min-width: 640px;
  }

  .mobile-card-table {
    overflow: visible;
  }

  .mobile-card-table table,
  .mobile-card-table thead,
  .mobile-card-table tbody,
  .mobile-card-table tr,
  .mobile-card-table th,
  .mobile-card-table td {
    display: block;
    width: 100%;
  }

  .mobile-card-table table {
    min-width: 0;
    border-collapse: separate;
    border-spacing: 0;
  }

  .mobile-card-table thead {
    display: none;
  }

  .mobile-card-table tbody {
    display: grid;
    gap: 12px;
  }

  .mobile-card-table tr {
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--panel);
  }

  .mobile-card-table td {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px dashed var(--border);
    text-align: right;
  }

  .mobile-card-table td:last-child {
    border-bottom: 0;
    padding-bottom: 0;
  }

  .mobile-card-table td:first-child {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding-top: 0;
    text-align: left;
    border-bottom: 1px solid var(--border);
    padding-bottom: 10px;
    margin-bottom: 2px;
  }

  .mobile-card-table td::before {
    content: attr(data-label);
    flex: 0 0 auto;
    max-width: 42%;
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
    text-align: left;
    line-height: 1.4;
  }

  .mobile-card-table td:first-child::before {
    display: none;
  }

  .mobile-card-table td.actions {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 8px;
    text-align: left;
  }

  .mobile-card-table td.actions::before {
    flex: 1 1 100%;
    max-width: none;
    margin-bottom: 2px;
  }

  .mobile-card-table td.actions select,
  .mobile-card-table td.actions .btn {
    flex: 1 1 calc(50% - 8px);
    min-width: 0;
    min-height: 40px;
  }

  .mobile-card-table .order-cell,
  .mobile-card-table .order-goods-shipping-cell,
  .mobile-card-table .user-cell,
  .mobile-card-table .amount-cell {
    text-align: left;
  }

  .mobile-card-table .order-goods-shipping-cell {
    flex: 1 1 auto;
    min-width: 0;
  }

  .mobile-card-table .shipping-recipient {
    min-width: 0;
  }

  .mobile-card-table .order-no {
    font-weight: 600;
    word-break: break-all;
  }

  .modal-card,
  .modal-card.modal-sm,
  .modal-card.modal-lg {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-height: min(92vh, 100dvh);
    transform: none;
    border-radius: 12px 12px 0 0;
    padding-bottom: env(safe-area-inset-bottom);
  }

  .modal-form,
  .form-grid {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .image-field .image-input-row,
  .image-input-row {
    grid-template-columns: 1fr;
  }

  .modal-actions,
  .modal-footer {
    flex-wrap: wrap;
  }

  .modal-actions .btn,
  .modal-footer .btn {
    flex: 1 1 auto;
    min-height: 44px;
  }

  .staff-permission-grid {
    grid-template-columns: 1fr;
  }

  .toast {
    right: 12px;
    left: 12px;
    bottom: max(12px, env(safe-area-inset-bottom));
    max-width: none;
  }

  .workbench-header {
    flex-direction: column;
    align-items: stretch;
  }

  .workbench-header .btn {
    min-height: 44px;
  }

  .workbench-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .workbench-chip {
    min-height: 96px;
    padding: 16px 12px;
  }

  .workbench-chip-count {
    font-size: 32px;
  }

  .todo-queue {
    display: grid;
    gap: 8px;
  }

  .todo-queue-item {
    display: grid;
    gap: 4px;
    width: 100%;
    min-height: 56px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    text-align: left;
    font: inherit;
    cursor: pointer;
  }

  .todo-queue-item strong {
    font-size: 14px;
  }

  .todo-queue-item span {
    color: var(--muted);
    font-size: 12px;
  }

  .todo-drawer-section .btn {
    width: 100%;
    min-height: 44px;
  }

  .reason-board {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .reason-board .workbench-chip {
    flex: 0 0 108px;
    min-height: 72px;
  }
}

@media (max-width: 480px) {
  .stats-grid,
  .stats-grid-wide {
    grid-template-columns: 1fr;
  }

  .user-info {
    display: none;
  }
}

.staff-permission-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
}

.checkbox-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.checkgroup {
  margin: 0;
  padding: 12px 14px 10px;
  border: 1px solid var(--border, #E5E5E5);
  border-radius: 8px;
  background: #fafafa;
}

.checkgroup legend {
  padding: 0 6px;
  font-size: 13px;
  color: var(--text-secondary, #666);
}

.modal-form .hotel-booking-benefit {
  grid-column: 1 / -1;
  background: var(--surface-soft, #f4f5ee);
}

.hotel-booking-benefit-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 14px 16px;
}

.hotel-benefit-capacity-fields {
  display: grid;
  align-items: start;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 14px 16px;
  max-width: 640px;
}

.hotel-benefit-capacity-notice {
  margin: 0 0 16px;
  color: var(--text-secondary);
}

.hotel-benefit-capacity .btn {
  margin-top: 16px;
}

.checkgroup-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 14px;
}

.checkgroup .field-hint,
.field-hint {
  display: block;
  margin: 6px 0 0;
  font-size: 12px;
  color: #8a8378;
  font-weight: 400;
  line-height: 1.4;
}

/* 优惠券专用表单：分区布局，避免适用场景把发放总量撑高 */
.modal-form.coupon-form {
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: start;
}

.coupon-form-section {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
  align-items: start;
}

.coupon-form-section--scope {
  grid-template-columns: 1fr;
  padding: 14px 16px;
  border: 1px solid var(--border, #e5e5e5);
  border-radius: 12px;
  background: linear-gradient(180deg, #fbfcfa 0%, #f7f8f5 100%);
}

.coupon-scope-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.coupon-scope-title {
  color: var(--text-secondary, #666);
  font-size: 14px;
  font-weight: 600;
}

.coupon-scope-title em {
  color: #c45c26;
  font-style: normal;
}

.coupon-scope-head .field-hint {
  margin: 0;
}

.coupon-scope-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.coupon-scope-chip {
  display: inline-flex !important;
  align-items: center;
  gap: 0;
  margin: 0;
  padding: 0;
  color: inherit;
  cursor: pointer;
  user-select: none;
}

.coupon-scope-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
}

.coupon-scope-chip span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 96px;
  padding: 8px 14px;
  border: 1px solid #d9ddd4;
  border-radius: 999px;
  background: #fff;
  color: #4a5248;
  font-size: 13px;
  line-height: 1.2;
  transition: border-color .15s ease, background .15s ease, color .15s ease, box-shadow .15s ease;
}

.coupon-scope-chip:hover span {
  border-color: #8aaa8f;
}

.coupon-scope-chip input:checked + span {
  border-color: #2e684c;
  background: #eef6f0;
  color: #1f4f38;
  box-shadow: inset 0 0 0 1px rgba(46, 104, 76, .18);
  font-weight: 600;
}

.coupon-scope-chip input:focus-visible + span {
  outline: 2px solid rgba(46, 104, 76, .35);
  outline-offset: 2px;
}

.coupon-form-section--meta label,
.coupon-form-section--basic label {
  align-content: start;
}

.coupon-form-section--meta input,
.coupon-form-section--basic input,
.coupon-form-section--basic select {
  min-height: 40px;
  height: 40px;
  box-sizing: border-box;
}

.coupon-form-spacer {
  visibility: hidden;
  pointer-events: none;
}

.modal-form.coupon-form .modal-actions {
  grid-column: 1 / -1;
  margin-top: 4px;
  padding-top: 4px;
}

@media (max-width: 720px) {
  .coupon-form-section--basic,
  .coupon-form-section--meta {
    grid-template-columns: 1fr;
  }

  .coupon-form-spacer {
    display: none;
  }
}

/* 商品专用表单：分区 + 大图预览，路径编辑收进高级区 */
.modal-card.modal-product {
  width: min(860px, calc(100vw - 36px));
}

.modal-form.product-form {
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: start;
}

.product-form-section {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
  align-items: start;
  padding: 14px 16px;
  border: 1px solid var(--border, #e5e5e5);
  border-radius: 12px;
  background: linear-gradient(180deg, #fbfcfa 0%, #f7f8f5 100%);
}

.product-form-section--media,
.product-form-section--copy {
  grid-template-columns: 1fr;
}

.product-form-section-head {
  grid-column: 1 / -1;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.product-form-section-head strong {
  color: var(--text-primary, #222);
  font-size: 14px;
}

.product-form-section-head .field-hint {
  margin: 0;
}

.product-form-section label {
  align-content: start;
}

.product-form-section input,
.product-form-section select {
  min-height: 40px;
  height: 40px;
  box-sizing: border-box;
}

.product-form-section textarea {
  min-height: 88px;
  box-sizing: border-box;
}

.product-field-title {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
  color: var(--text-secondary, #666);
}

.product-field-title em {
  color: #c45c26;
  font-style: normal;
}

.image-input-row--cover {
  grid-template-columns: 1fr auto 160px;
  align-items: center;
}

.image-input-row--upload-first {
  grid-template-columns: 1fr;
}

.image-input-row--upload-first .file-input {
  max-width: 280px;
}

.images-path-advanced {
  grid-column: 1 / -1;
  margin-top: 4px;
}

.images-path-advanced summary {
  cursor: pointer;
  color: var(--muted, #888);
  font-size: 12px;
  user-select: none;
}

.images-path-advanced summary:hover {
  color: var(--text-secondary, #666);
}

.images-path-advanced textarea {
  margin-top: 8px;
  min-height: 72px;
}

.product-cover-field .image-thumb--cover,
.image-thumb.image-thumb--cover {
  width: 96px;
  height: 96px;
}

.modal-form.product-form .modal-actions {
  grid-column: 1 / -1;
  margin-top: 4px;
  padding-top: 4px;
}

/* 餐饮套餐编辑器：按运营配置顺序展示分组、选择数量与菜品 */
.modal-form.dining-menu-form {
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: start;
}

.dining-form-section {
  display: grid;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--border, #e5e5e5);
  border-radius: 12px;
  background: linear-gradient(180deg, #fbfcfa 0%, #f7f8f5 100%);
}

.dining-form-section[hidden] {
  display: none;
}

.dining-form-section-head,
.dining-package-group-head,
.dining-package-add-row,
.dining-package-dish {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dining-form-section-head p {
  margin: 4px 0 0;
}

.dining-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
}

.dining-form-grid .full {
  grid-column: 1 / -1;
}

.dining-package-groups,
.dining-package-dishes {
  display: grid;
  gap: 10px;
}

.dining-package-group {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border, #e5e5e5);
  border-left: 4px solid var(--primary, #1f6b4f);
  border-radius: 10px;
  background: #fff;
}

.dining-package-group-head {
  align-items: end;
}

.dining-package-summary {
  align-self: center;
  min-width: 58px;
  padding: 7px 9px;
  border-radius: 999px;
  color: #fff;
  background: var(--primary, #1f6b4f);
  font-size: 12px;
  text-align: center;
}

.dining-package-name {
  flex: 1 1 280px;
}

.dining-package-count {
  flex: 0 0 150px;
}

.dining-package-repeat {
  flex: 0 0 168px;
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 0 10px;
  border: 1px solid var(--border, #e5e5e5);
  border-radius: 8px;
  background: var(--panel, #fffef9);
}

.dining-package-repeat input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--primary, #1f6b4f);
}

.dining-package-repeat span {
  display: grid;
  gap: 2px;
}

.dining-package-repeat small {
  color: var(--muted, #888);
  font-size: 11px;
}

.dining-package-choose {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
}

.dining-package-add-row {
  justify-content: flex-start;
}

.dining-package-add-row select {
  flex: 1 1 320px;
}

.dining-package-dish {
  padding: 10px 12px;
  border: 1px solid var(--border, #e5e5e5);
  border-radius: 8px;
  background: var(--panel, #fffef9);
}

.dining-package-dish > div {
  display: grid;
  gap: 3px;
}

.dining-package-dish span {
  color: var(--muted, #888);
  font-size: 12px;
}

.dining-package-empty,
.dining-package-groups-empty,
.dining-package-warning {
  margin: 0;
  padding: 10px 12px;
  border: 1px dashed var(--border, #e5e5e5);
  border-radius: 8px;
  background: #fff;
}

.dining-package-warning {
  border-color: #d9a25d;
  color: #8a4f12;
  background: #fff8ec;
}

.modal-form.dining-menu-form .modal-actions {
  grid-column: 1 / -1;
}

@media (max-width: 720px) {
  .dining-form-grid {
    grid-template-columns: 1fr;
  }

  .dining-form-grid .full {
    grid-column: auto;
  }

  .dining-form-section-head,
  .dining-package-group-head,
  .dining-package-add-row {
    align-items: stretch;
    flex-direction: column;
  }

  .dining-package-group-head label,
  .dining-package-add-row select {
    flex-basis: auto;
    width: 100%;
  }
}

.product-form-section--specs {
  grid-template-columns: 1fr;
}

.product-specs-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.product-specs-list {
  display: grid;
  gap: 10px;
}

.product-specs-empty {
  margin: 0;
  padding: 10px 12px;
  border: 1px dashed var(--border, #e5e5e5);
  border-radius: 8px;
  background: #fff;
}

.product-spec-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.2fr) minmax(0, 0.9fr) minmax(0, 0.7fr) auto;
  gap: 10px;
  align-items: end;
  padding: 10px 12px;
  border: 1px solid var(--border, #e5e5e5);
  border-radius: 10px;
  background: #fff;
}

.product-spec-field {
  display: grid;
  gap: 6px;
  margin: 0;
}

.product-spec-field span {
  color: var(--muted, #888);
  font-size: 12px;
}

.product-spec-field input {
  min-height: 38px;
  height: 38px;
  box-sizing: border-box;
}

@media (max-width: 720px) {
  .product-spec-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .product-form-section--basic {
    grid-template-columns: 1fr;
  }

  .image-input-row--cover {
    grid-template-columns: 1fr;
  }
}

.muted.small {
  font-size: 12px;
  margin-top: 4px;
}

/* P2-3 ??????? */
.audit-detail {
  display: inline-block;
  max-width: 360px;
  white-space: pre-wrap;
  word-break: break-all;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-secondary, #666);
  background: #FAFAFA;
  border: 1px solid var(--border, #E5E5E5);
  border-radius: 4px;
  padding: 4px 6px;
}

/* 2026 operation desk visual refresh */
:root {
  --primary: #1f6b4f;
  --primary-hover: #19583f;
  --primary-dark: #123f2e;
  --bg: #f5f3ec;
  --panel: #fffef9;
  --surface: #fffef9;
  --text: #17201d;
  --text-primary: #17201d;
  --text-secondary: #59635e;
  --muted: #7d867f;
  --border: #dddcd3;
  --success: #267a58;
  --danger: #c94b40;
  --warning: #b77918;
  --info: #3e6f78;
  --shadow: 0 18px 50px rgba(23, 32, 29, 0.08);
  --shadow-soft: 0 8px 24px rgba(23, 32, 29, 0.055);
  --sidebar: #17201d;
  --sidebar-muted: #96a39d;
  --amber: #d99a2b;
}

html {
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  font-family: "Noto Sans SC", "Microsoft YaHei UI", sans-serif;
  background:
    linear-gradient(rgba(31, 107, 79, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 107, 79, 0.025) 1px, transparent 1px),
    var(--bg);
  background-size: 32px 32px;
}

button,
.btn,
input,
select,
textarea {
  transition: border-color .18s ease, background-color .18s ease, color .18s ease,
    box-shadow .18s ease, transform .18s ease;
}

button:focus-visible,
.btn:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid rgba(217, 154, 43, .34);
  outline-offset: 2px;
}

input,
select,
textarea {
  border-color: #d7d7cf;
  border-radius: 6px;
  background: #fffefb;
}

input:hover,
select:hover,
textarea:hover {
  border-color: #aeb7b1;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(31, 107, 79, .1);
}

button,
.btn {
  border-radius: 6px;
  font-weight: 650;
  letter-spacing: .01em;
}

.btn-primary,
button.btn-primary {
  box-shadow: 0 5px 14px rgba(31, 107, 79, .16);
}

.btn-primary:hover,
button.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(31, 107, 79, .22);
}

.app-view {
  grid-template-columns: 256px minmax(0, 1fr);
  background: transparent;
}

.sidebar {
  padding: 0 0 22px;
  color: #eef3f0;
  background:
    linear-gradient(165deg, rgba(217, 154, 43, .07), transparent 34%),
    var(--sidebar);
  border-right: 0;
  box-shadow: 10px 0 35px rgba(23, 32, 29, .1);
  scrollbar-color: #48534e transparent;
}

.sidebar-header {
  min-height: 88px;
  display: flex;
  align-items: center;
  padding: 18px 20px;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, .09);
}

.sidebar .brand {
  margin: 0;
}

.sidebar .brand-icon {
  position: relative;
  width: 42px;
  height: 42px;
  color: #17201d;
  background: var(--amber);
  border-radius: 5px 14px 5px 5px;
  box-shadow: 0 8px 22px rgba(217, 154, 43, .2);
}

.sidebar .brand-text strong {
  color: #fffef9;
  font-size: 16px;
  font-weight: 750;
  letter-spacing: .08em;
}

.sidebar .brand-text span {
  color: var(--sidebar-muted);
  font-size: 11px;
  letter-spacing: .08em;
}

.nav-group {
  margin: 0 10px 7px;
}

.nav-group-title {
  min-height: 38px;
  padding: 8px 11px;
  color: #77857e;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
}

.nav-group-title:hover {
  color: #c7d1cc;
  background: rgba(255, 255, 255, .045);
}

.nav-list .nav-item {
  position: relative;
  min-height: 42px;
  margin: 2px 0;
  padding: 9px 12px 9px 14px;
  color: #b8c3bd;
  border: 0;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
}

.nav-list .nav-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: transparent;
}

.nav-list .nav-item:hover {
  color: #fffef9;
  background: rgba(255, 255, 255, .065);
  transform: translateX(2px);
}

.nav-list .nav-item.active {
  color: #fffef9;
  background: rgba(217, 154, 43, .13);
  border-left: 0;
  font-weight: 700;
}

.nav-list .nav-item.active::before {
  background: var(--amber);
}

.nav-list .nav-item.active .nav-icon {
  color: var(--amber);
}

.nav-badge,
.notify-badge {
  background: var(--amber);
  color: #17201d;
  box-shadow: none;
}

.main {
  background: transparent;
}

.topbar {
  min-height: 72px;
  padding: 12px clamp(20px, 3vw, 42px);
  border-bottom: 1px solid rgba(113, 122, 116, .16);
  background: rgba(245, 243, 236, .9);
  backdrop-filter: blur(18px) saturate(125%);
}

.breadcrumb-item {
  color: var(--muted);
  font-size: 12px;
}

.breadcrumb-sep {
  color: #b7b9b3;
}

.breadcrumb-current {
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 700;
}

.search-box {
  border-radius: 6px;
  background: rgba(255, 254, 249, .72);
}

.icon-btn,
.notify-btn,
.user-menu-toggle {
  border-radius: 6px;
}

.user-avatar {
  color: #fffef9;
  background: var(--primary-dark);
  border: 2px solid rgba(217, 154, 43, .55);
}

.content {
  width: 100%;
  max-width: 1680px;
  padding: 34px clamp(20px, 3vw, 46px) 54px;
}

.page-header {
  position: relative;
  margin: 0 0 26px;
  padding: 4px 0 4px 22px;
}

.page-header::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  background: linear-gradient(180deg, var(--amber) 0 34%, var(--primary) 34% 100%);
}

.page-title {
  margin-bottom: 5px;
  font-size: clamp(23px, 2.4vw, 32px);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -.03em;
}

.page-subtitle {
  color: #707a74;
  font-size: 13px;
}

.stats-grid {
  gap: 12px;
  margin-bottom: 18px;
}

.stat-card {
  position: relative;
  min-height: 132px;
  padding: 20px 20px 18px;
  overflow: hidden;
  border: 1px solid #deddd4;
  border-radius: 4px;
  background: rgba(255, 254, 249, .94);
  box-shadow: var(--shadow-soft);
}

.stat-card::after {
  content: "";
  position: absolute;
  right: -22px;
  bottom: -34px;
  width: 86px;
  height: 86px;
  border: 1px solid rgba(31, 107, 79, .13);
  border-radius: 50%;
}

.stat-card:nth-child(4n + 1) {
  border-top: 3px solid var(--primary);
}

.stat-card:nth-child(4n + 2) {
  border-top: 3px solid #60776d;
}

.stat-card:nth-child(4n + 3) {
  border-top: 3px solid var(--amber);
}

.stat-card:nth-child(4n) {
  border-top: 3px solid #314b42;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(23, 32, 29, .09);
}

.stat-label {
  margin-bottom: 14px;
  color: #707a74;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
}

.stat-value,
.workbench-chip-count,
.finance-metric strong,
.finance-summary-line strong {
  font-family: "IBM Plex Mono", "Cascadia Mono", Consolas, monospace;
  font-variant-numeric: tabular-nums;
}

.stat-value {
  color: #17201d;
  font-size: clamp(26px, 2.4vw, 34px);
  font-weight: 700;
  letter-spacing: -.045em;
}

.dashboard-quick-panel,
.workbench-panel {
  margin-bottom: 18px;
}

.dashboard-quick-grid {
  gap: 0;
  border: 1px solid var(--border);
  background: var(--panel);
}

.dashboard-quick-action {
  position: relative;
  min-height: 94px;
  padding: 17px 18px 16px;
  border: 0;
  border-right: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
}

.dashboard-quick-action:last-child {
  border-right: 0;
}

.dashboard-quick-action::after {
  content: "→";
  position: absolute;
  right: 16px;
  top: 14px;
  color: #9ca49f;
  font-size: 17px;
}

.dashboard-quick-action:hover {
  color: var(--primary-dark);
  border-color: var(--border);
  background: #edf3ef;
  transform: none;
}

.workbench-panel {
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}

.workbench-header {
  margin: 0;
  padding: 17px 19px;
  border-bottom: 1px solid var(--border);
}

.workbench-title {
  font-size: 16px;
  font-weight: 800;
}

.workbench-grid {
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  gap: 0;
  padding: 0;
}

.workbench-chip {
  min-height: 104px;
  padding: 17px 18px;
  border: 0;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  border-radius: 0;
}

.workbench-chip:hover {
  border-color: var(--border);
  background: #f2f6f3;
  box-shadow: inset 0 -3px 0 var(--primary);
  transform: none;
}

.workbench-chip.is-active {
  border-color: var(--border);
  background: #eaf2ed;
  box-shadow: inset 4px 0 0 var(--primary);
}

.panel {
  margin-bottom: 18px;
  border-color: #deddd4;
  border-radius: 4px;
  background: rgba(255, 254, 249, .96);
  box-shadow: var(--shadow-soft);
}

.panel-header {
  min-height: 58px;
  padding: 15px 18px;
  background: rgba(248, 247, 241, .7);
}

.panel-header h3,
.panel-title {
  position: relative;
  padding-left: 12px;
  font-size: 15px;
  font-weight: 800;
}

.panel-header h3::before,
.panel-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: .23em;
  width: 3px;
  height: 1em;
  background: var(--primary);
}

.list-toolbar {
  min-height: 58px;
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-left: 4px solid #6f8178;
  border-radius: 3px;
  background: rgba(255, 254, 249, .9);
  box-shadow: 0 5px 16px rgba(23, 32, 29, .035);
}

.quick-filters {
  margin: -4px 0 14px;
  padding: 8px;
  border-bottom: 1px solid var(--border);
}

.filter-chip {
  border-radius: 4px;
  background: transparent;
  font-weight: 600;
}

.filter-chip.active {
  color: #fffef9;
  border-color: var(--primary);
  background: var(--primary);
}

.toolbar-note-block {
  margin: -5px 0 16px;
  padding-left: 12px;
  border-left: 2px solid rgba(217, 154, 43, .7);
}

.table-wrap,
.table-container {
  scrollbar-color: #aab2ad #efeee8;
}

th,
.admin-data-table th {
  padding-top: 12px;
  padding-bottom: 12px;
  color: #59635e;
  background: #efeee8;
  border-bottom-color: #d4d5cd;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
}

td,
.admin-data-table td {
  border-bottom-color: #e8e6de;
}

.admin-data-table tbody tr:nth-child(even) {
  background: rgba(245, 243, 236, .36);
}

.admin-data-table tbody tr:hover {
  background: #edf3ef;
  box-shadow: inset 3px 0 0 var(--primary);
}

.badge {
  border: 1px solid currentColor;
  border-radius: 3px;
  font-weight: 700;
}

.pagination {
  background: rgba(248, 247, 241, .72);
}

.modal-mask,
.drawer-mask {
  background: rgba(12, 19, 16, .58);
  backdrop-filter: blur(4px);
}

.modal-card,
.drawer-panel {
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 5px;
  box-shadow: 0 28px 80px rgba(12, 19, 16, .26);
}

.modal-header,
.drawer-header {
  border-bottom: 1px solid var(--border);
  background: #efeee8;
}

.toast {
  border-radius: 4px;
  border-left: 5px solid var(--amber);
  background: #17201d;
}

.login-view {
  place-items: stretch;
  grid-template-columns: minmax(280px, .85fr) minmax(420px, 1.15fr);
  padding: 0;
  background:
    linear-gradient(120deg, rgba(217, 154, 43, .08), transparent 42%),
    var(--sidebar);
}

.login-view::before {
  content: "GUOYI  /  OPERATIONS";
  display: flex;
  align-items: flex-end;
  padding: clamp(40px, 7vw, 100px);
  color: rgba(255, 254, 249, .88);
  background:
    linear-gradient(180deg, transparent 46%, rgba(9, 15, 12, .78)),
    repeating-linear-gradient(135deg, rgba(255,255,255,.035) 0 1px, transparent 1px 18px),
    linear-gradient(145deg, #213b31, #17201d 68%);
  font-family: "IBM Plex Mono", Consolas, monospace;
  font-size: clamp(18px, 2vw, 30px);
  font-weight: 700;
  letter-spacing: .2em;
}

.login-card {
  align-self: center;
  justify-self: center;
  width: min(430px, calc(100% - 48px));
  padding: 42px;
  border: 0;
  border-radius: 4px;
  box-shadow: 0 26px 80px rgba(0, 0, 0, .28);
}

.login-card .brand-icon {
  border-radius: 5px 14px 5px 5px;
  background: var(--amber);
  color: #17201d;
}

@media (max-width: 1100px) {
  .app-view { grid-template-columns: 232px minmax(0, 1fr); }
  .dashboard-quick-action:nth-child(2) { border-right: 0; }
  .dashboard-quick-action:nth-child(-n + 2) { border-bottom: 1px solid var(--border); }
}

@media (max-width: 900px) {
  .app-view { display: block; }

  .sidebar {
    box-shadow: 16px 0 40px rgba(12, 19, 16, .28);
  }

  .topbar {
    min-height: 62px;
    padding: 8px 14px;
  }

  .content {
    padding: 24px 16px 96px;
  }

  .page-header {
    margin-bottom: 20px;
  }

  .mobile-quick-nav {
    border-top: 0;
    background: rgba(23, 32, 29, .96);
    box-shadow: 0 -8px 26px rgba(12, 19, 16, .22);
  }

  .mobile-quick-nav-item {
    color: #9eaaa4;
    border-radius: 5px;
  }

  .mobile-quick-nav-item:hover,
  .mobile-quick-nav-item.active {
    color: #fffef9;
    background: rgba(217, 154, 43, .13);
  }

  .login-view {
    display: grid;
    grid-template-columns: 1fr;
    place-items: center;
    padding: 24px;
  }

  .login-view::before {
    display: none;
  }
}

@media (max-width: 640px) {
  .dashboard-quick-grid { grid-template-columns: 1fr; }
  .dashboard-quick-action { border-right: 0; border-bottom: 1px solid var(--border); }
  .dashboard-quick-action:last-child { border-bottom: 0; }
  .workbench-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .panel-header { align-items: flex-start; flex-direction: column; }
  .list-toolbar input,
  .list-toolbar select { width: 100%; }
  .login-card { width: 100%; padding: 30px 24px; }
}

.paid-gift-current {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px;
  background: var(--surface-soft, #f7f3ea);
  border-left: 4px solid #a8833f;
}

.paid-gift-current > div:last-child {
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  gap: 6px;
  color: var(--text-muted, #6c685f);
}

.paid-gift-selection-summary {
  display: flex;
  min-height: 76px;
  padding: 14px 18px;
  align-items: flex-start;
  justify-content: center;
  flex-direction: column;
  color: #f4ead3;
  background: #264d3c;
}

.paid-gift-selection-summary span {
  margin-top: 4px;
  color: rgba(244, 234, 211, .7);
  font-size: 12px;
}

.paid-gift-list-heading {
  display: flex;
  margin-bottom: 10px;
  align-items: center;
  justify-content: space-between;
}

.paid-gift-choice-list {
  display: grid;
  max-height: 520px;
  overflow-y: auto;
  border: 1px solid #ded7c8;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.paid-gift-choice {
  display: grid;
  padding: 14px;
  align-items: center;
  border-right: 1px solid #eee8dc;
  border-bottom: 1px solid #eee8dc;
  cursor: pointer;
  gap: 12px;
  grid-template-columns: 18px minmax(0, 1fr) auto;
}

.paid-gift-choice.is-selected {
  background: #f6f0df;
  box-shadow: inset 4px 0 #a8833f;
}

.paid-gift-choice.is-empty {
  color: #8a8174;
}

.paid-gift-choice__meta {
  display: flex;
  align-items: flex-end;
  flex-direction: column;
}

.paid-gift-choice__meta small { color: #82796b; }

@media (max-width: 900px) {
  .paid-gift-choice-list { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .dining-calendar-weekdays,
  .dining-calendar-grid {
    grid-template-columns: repeat(2, minmax(132px, 1fr));
    min-width: 0;
  }

  .dining-calendar-weekdays,
  .dining-calendar-blank {
    display: none;
  }

  .dining-month-sections {
    grid-template-columns: 1fr;
  }

  .dining-selected-day {
    padding: 12px;
  }

  .dining-day-detail__head {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .dining-day-detail__head > div {
    flex-wrap: wrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}
