/*
 * SIXTY SIP Webapp — accepted three-page visual contract (2026-09-28)
 * Scope is intentionally limited to overview, settings-rewards and
 * warehouse-online-orders. No selector in this file may style another route.
 */

body:is([data-route="overview"], [data-route="settings-rewards"], [data-route="warehouse-online-orders"]) {
  --bg-app: #faf7f2;
  --bg-sidebar: #ffffff;
  --bg-surface: #ffffff;
  --bg-elevated: #ffffff;
  --bg-elevated-2: #f6f3f1;
  --border: #e7e1dd;
  --border-strong: #d4ccc8;
  --text: #181415;
  --text-muted: #70696c;
  --text-faint: #6b6367;
  --accent: #e11b22;
  --accent-strong: #c70d1c;
  --accent-soft: #fff0f1;
  --primary: #e11b22;
  --primary-hover: #c70d1c;
  --primary-pressed: #961018;
  --primary-link: #c70d1c;
  --primary-soft: #fff0f1;
  --primary-border: #e11b22;
  --focus-ring: rgba(225, 27, 34, 0.24);
  --safe: #117048;
  --safe-soft: #eaf6f0;
  --warning: #865200;
  --warning-soft: #fff6df;
  --danger: #b80f1a;
  --danger-soft: #fff0f1;
  --shadow-card: 0 10px 34px rgba(39, 21, 22, 0.055);
  --shadow-modal: 0 28px 90px rgba(34, 18, 19, 0.2);
  --sidebar-width: 228px;
  background: var(--bg-app);
  color: var(--text);
  font-family: "Sixty Thai", "Noto Sans Thai", system-ui, sans-serif;
}

:root[data-theme="dark"] body:is([data-route="overview"], [data-route="settings-rewards"], [data-route="warehouse-online-orders"]) {
  --bg-app: #121012;
  --bg-sidebar: #1c1613;
  --bg-surface: #1b1518;
  --bg-elevated: #211b1e;
  --bg-elevated-2: #292326;
  --border: #413a3c;
  --border-strong: #5a5053;
  --text: #faf8f8;
  --text-muted: #c2b8bb;
  --text-faint: #9d9296;
  --accent: #ef3740;
  --accent-strong: #ff6970;
  --accent-soft: rgba(239, 55, 64, 0.14);
  --primary: #e11b22;
  --primary-hover: #ef3740;
  --safe: #6ee7a9;
  --safe-soft: rgba(34, 197, 94, 0.17);
  --warning: #f6c96b;
  --warning-soft: rgba(245, 158, 11, 0.17);
  --danger: #ff8a92;
  --danger-soft: rgba(239, 68, 68, 0.17);
  --ss-red: #ff6970;
  --ss-red-soft: rgba(239, 55, 64, 0.14);
  --ss-ink: #faf8f8;
  --ss-muted: #c2b8bb;
  --ss-line: #413a3c;
  --ss-warm: #211b1e;
  --ss-soft: #292326;
  --ss-safe: #6ee7a9;
  --ss-safe-soft: rgba(34, 197, 94, 0.17);
  --ss-warning: #f6c96b;
  --ss-warning-soft: rgba(245, 158, 11, 0.17);
}

/* Shared shell: same brand rhythm as the accepted Buyer app, translated for desktop. */
body:is([data-route="overview"], [data-route="settings-rewards"], [data-route="warehouse-online-orders"]) .app-shell {
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
}

body:is([data-route="overview"], [data-route="settings-rewards"], [data-route="warehouse-online-orders"]) .sidebar {
  padding: 0 12px 14px;
  border-right: 1px solid var(--border);
  background: var(--bg-sidebar);
  box-shadow: none;
}

body:is([data-route="overview"], [data-route="settings-rewards"], [data-route="warehouse-online-orders"]) .sidebar .brand {
  min-height: 82px;
  margin: 0 -12px 14px;
  padding: 16px 20px;
  gap: 12px;
  border-bottom: 1px solid var(--border);
}

body:is([data-route="overview"], [data-route="settings-rewards"], [data-route="warehouse-online-orders"]) .brand-mark {
  width: 52px;
  height: 42px;
  flex: 0 0 52px;
  border-radius: 0;
  background: transparent;
}

body:is([data-route="overview"], [data-route="settings-rewards"], [data-route="warehouse-online-orders"]) .brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: brightness(0) saturate(100%) invert(17%) sepia(99%) saturate(5797%) hue-rotate(350deg) brightness(91%) contrast(105%);
}

body:is([data-route="overview"], [data-route="settings-rewards"], [data-route="warehouse-online-orders"]) .brand strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: 0.055em;
  white-space: normal;
}

body:is([data-route="overview"], [data-route="settings-rewards"], [data-route="warehouse-online-orders"]) .sidebar .nav {
  gap: 4px;
  padding: 0;
}

body:is([data-route="overview"], [data-route="settings-rewards"], [data-route="warehouse-online-orders"]) :is(.nav-section-toggle, .nav-section.current .nav-section-toggle) {
  min-height: 42px;
  padding: 8px 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 750;
}

body:is([data-route="overview"], [data-route="settings-rewards"], [data-route="warehouse-online-orders"]) .nav-item {
  min-height: 43px;
  padding: 9px 11px;
  border-radius: 10px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 550;
  line-height: 1.45;
}

body:is([data-route="overview"], [data-route="settings-rewards"], [data-route="warehouse-online-orders"]) .nav-item.active {
  background: var(--accent-soft);
  color: var(--accent-strong);
  box-shadow: inset 3px 0 0 var(--accent);
  font-weight: 750;
}

body:is([data-route="overview"], [data-route="settings-rewards"], [data-route="warehouse-online-orders"]) .topbar {
  min-height: 66px;
  padding: 10px 26px;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg-surface) 95%, transparent);
  box-shadow: none;
  backdrop-filter: blur(12px);
}

body:is([data-route="overview"], [data-route="settings-rewards"], [data-route="warehouse-online-orders"]) .topbar-title h1 {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 650;
}

body:is([data-route="overview"], [data-route="settings-rewards"], [data-route="warehouse-online-orders"]) .topbar .search {
  width: clamp(190px, 20vw, 285px);
  min-width: 190px;
  height: 38px;
  border-radius: 10px;
  background: var(--bg-app);
}

body:is([data-route="overview"], [data-route="settings-rewards"], [data-route="warehouse-online-orders"]) .avatar-button {
  width: 38px;
  height: 38px;
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

body:is([data-route="overview"], [data-route="settings-rewards"], [data-route="warehouse-online-orders"]) .content {
  min-width: 0;
  padding: 32px clamp(24px, 3vw, 44px) 64px;
  background: var(--bg-app);
}

body:is([data-route="overview"], [data-route="settings-rewards"], [data-route="warehouse-online-orders"]) .ss-selected-page {
  width: min(100%, 1440px);
  margin: 0 auto;
}

body:is([data-route="overview"], [data-route="settings-rewards"], [data-route="warehouse-online-orders"]) .ss-selected-page > * + * {
  margin-top: 22px;
}

body:is([data-route="overview"], [data-route="settings-rewards"], [data-route="warehouse-online-orders"]) .ss-selected-page .unified-page-head {
  margin: 0 0 28px;
}

body:is([data-route="overview"], [data-route="settings-rewards"], [data-route="warehouse-online-orders"]) .ss-selected-page :is(.page-breadcrumb, .ops-heading-icon) {
  display: none;
}

body:is([data-route="overview"], [data-route="settings-rewards"], [data-route="warehouse-online-orders"]) .ss-selected-page .unified-page-head h2 {
  display: block;
  color: var(--text);
  font-size: clamp(31px, 2.5vw, 38px);
  font-weight: 850;
  line-height: 1.32;
  letter-spacing: -0.03em;
}

body:is([data-route="overview"], [data-route="settings-rewards"], [data-route="warehouse-online-orders"]) .ss-selected-page .unified-page-head h2::after {
  width: 60px;
  height: 5px;
  margin-top: 9px;
  border-radius: 99px;
  background: var(--accent);
}

body:is([data-route="overview"], [data-route="settings-rewards"], [data-route="warehouse-online-orders"]) .ss-selected-page .unified-page-head p {
  margin-top: 11px;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.6;
}

body:is([data-route="overview"], [data-route="settings-rewards"], [data-route="warehouse-online-orders"]) .primary-button {
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 11px;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 7px 18px rgba(225, 27, 34, 0.15);
}

body:is([data-route="overview"], [data-route="settings-rewards"], [data-route="warehouse-online-orders"]) .primary-button:hover {
  background: var(--accent-strong);
  filter: none;
}

/* Overview */
body[data-route="overview"] .ss-overview-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

body[data-route="overview"] .ss-overview-kpis article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 6px 16px;
  min-height: 132px;
  padding: 23px 25px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--bg-surface);
  box-shadow: var(--shadow-card);
}

body[data-route="overview"] .ss-overview-kpis article::before {
  content: "";
  grid-column: 1 / -1;
  width: 34px;
  height: 3px;
  border-radius: 99px;
  background: var(--border-strong);
}

body[data-route="overview"] .ss-overview-kpis article.is-critical::before {
  background: var(--accent);
}

body[data-route="overview"] .ss-overview-kpis span {
  color: var(--text);
  font-size: 15px;
  font-weight: 750;
}

body[data-route="overview"] .ss-overview-kpis strong {
  color: var(--text);
  font-size: clamp(32px, 3vw, 42px);
  font-weight: 850;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

body[data-route="overview"] .ss-overview-kpis small {
  grid-column: 1 / -1;
  color: var(--text-muted);
  font-size: 13px;
}

body[data-route="overview"] .ss-overview-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(300px, 0.72fr);
  gap: 18px;
  align-items: start;
}

body[data-route="overview"] .ss-overview-panel {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--bg-surface);
  box-shadow: var(--shadow-card);
}

body[data-route="overview"] .ss-overview-panel > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 24px;
  border-bottom: 1px solid var(--border);
}

body[data-route="overview"] .ss-overview-panel > header h3 {
  color: var(--text);
  font-size: 21px;
  font-weight: 800;
  line-height: 1.4;
}

body[data-route="overview"] .ss-overview-panel > header p {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 13px;
}

body[data-route="overview"] .ss-overview-panel > header > span {
  flex: 0 0 auto;
  padding: 6px 11px;
  border-radius: 99px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 750;
}

body[data-route="overview"] .ss-work-row {
  position: relative;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) 64px minmax(112px, auto);
  gap: 14px;
  align-items: center;
  min-height: 106px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  color: inherit;
  text-decoration: none;
  transition: background 0.15s ease;
}

body[data-route="overview"] .ss-work-row:last-child {
  border-bottom: 0;
}

body[data-route="overview"] .ss-work-row:hover {
  background: color-mix(in srgb, var(--accent-soft) 48%, var(--bg-surface));
}

body[data-route="overview"] .ss-work-row::before {
  content: "";
  position: absolute;
  left: 0;
  top: 22px;
  bottom: 22px;
  width: 3px;
  border-radius: 0 99px 99px 0;
  background: var(--border-strong);
}

body[data-route="overview"] .ss-work-row.tone-danger::before { background: var(--danger); }
body[data-route="overview"] .ss-work-row.tone-warning::before { background: var(--warning); }
body[data-route="overview"] .ss-work-row.tone-safe::before { background: var(--safe); }

body[data-route="overview"] .ss-work-row > i {
  color: var(--accent);
  font-size: 22px;
}

body[data-route="overview"] .ss-work-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

body[data-route="overview"] .ss-work-copy small {
  color: var(--accent-strong);
  font-size: 11px;
  font-weight: 750;
}

body[data-route="overview"] .ss-work-copy strong {
  color: var(--text);
  font-size: 16px;
  font-weight: 800;
}

body[data-route="overview"] .ss-work-copy > span {
  overflow-wrap: anywhere;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
}

body[data-route="overview"] .ss-work-count {
  display: grid;
  justify-items: end;
  color: var(--text);
}

body[data-route="overview"] .ss-work-count strong {
  font-size: 25px;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

body[data-route="overview"] .ss-work-count small {
  color: var(--text-muted);
  font-size: 11px;
}

body[data-route="overview"] .ss-work-action {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 750;
  white-space: nowrap;
}

body[data-route="overview"] .ss-department-list {
  padding: 4px 20px;
}

body[data-route="overview"] .ss-department-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 78px;
  border-bottom: 1px solid var(--border);
}

body[data-route="overview"] .ss-department-row:last-child { border-bottom: 0; }
body[data-route="overview"] .ss-department-row > i { color: var(--text-muted); font-size: 20px; }
body[data-route="overview"] .ss-department-row.tone-danger > i { color: var(--danger); }
body[data-route="overview"] .ss-department-row.tone-warning > i { color: var(--warning); }
body[data-route="overview"] .ss-department-row.tone-safe > i { color: var(--safe); }
body[data-route="overview"] .ss-department-row > span { display: grid; gap: 2px; }
body[data-route="overview"] .ss-department-row > span strong { color: var(--text); font-size: 14px; }
body[data-route="overview"] .ss-department-row > span small { color: var(--text-muted); font-size: 12px; }
body[data-route="overview"] .ss-department-row > b { display: grid; justify-items: end; color: var(--text); font-size: 17px; font-variant-numeric: tabular-nums; }
body[data-route="overview"] .ss-department-row > b small { color: var(--text-muted); font-size: 10px; font-weight: 550; }

body[data-route="overview"] .ss-department-note {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 18px;
  gap: 10px;
  align-items: center;
  margin: 8px 16px 16px;
  padding: 13px;
  border-radius: 12px;
  background: var(--warning-soft);
  color: var(--warning);
}

body[data-route="overview"] .ss-department-note > span { display: grid; }
body[data-route="overview"] .ss-department-note strong { font-size: 12px; }
body[data-route="overview"] .ss-department-note small { color: var(--text-muted); font-size: 11px; }

/* Rewards and promotion listing */
body[data-route="settings-rewards"] .campaign-tabs {
  gap: 0;
  margin: 0 0 20px;
  border-bottom: 1px solid var(--border);
  background: transparent;
}

body[data-route="settings-rewards"] .campaign-tabs button {
  min-height: 51px;
  padding: 11px 27px;
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 700;
}

body[data-route="settings-rewards"] .campaign-tabs button.is-active {
  border-bottom-color: var(--accent);
  background: transparent;
  color: var(--accent-strong);
  box-shadow: none;
}

body[data-route="settings-rewards"] .campaign-panel {
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--bg-surface);
  box-shadow: var(--shadow-card);
}

body[data-route="settings-rewards"] .campaign-panel-head {
  align-items: center;
  margin: 0;
  padding: 22px 25px;
  border-bottom: 1px solid var(--border);
}

body[data-route="settings-rewards"] .campaign-panel-head h2 {
  color: var(--text);
  font-size: 22px;
  font-weight: 800;
  line-height: 1.4;
}

body[data-route="settings-rewards"] .campaign-panel-head p {
  max-width: 78ch;
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.55;
}

body[data-route="settings-rewards"] .campaign-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
}

body[data-route="settings-rewards"] #app .campaign-table thead th {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated-2);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 750;
  text-align: left;
}

body[data-route="settings-rewards"] #app .campaign-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

body[data-route="settings-rewards"] .campaign-table tbody tr:last-child td { border-bottom: 0; }
body[data-route="settings-rewards"] .campaign-table tbody tr:hover { background: color-mix(in srgb, var(--accent-soft) 28%, var(--bg-surface)); }

body[data-route="settings-rewards"] .campaign-table-art {
  width: 184px;
  height: 102px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--bg-elevated-2);
}

body[data-route="settings-rewards"] #app .campaign-table-art img {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: contain;
}

body[data-route="settings-rewards"] .campaign-title-cell strong {
  margin-bottom: 3px;
  color: var(--text);
  font-size: 15px;
  font-weight: 800;
}

body[data-route="settings-rewards"] .campaign-title-cell span,
body[data-route="settings-rewards"] .campaign-time-cell span {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
}

body[data-route="settings-rewards"] .campaign-status {
  gap: 7px;
  padding: 7px 11px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 700;
}

body[data-route="settings-rewards"] .campaign-status.done { background: var(--safe-soft); color: var(--safe); }
body[data-route="settings-rewards"] .campaign-status.pending { background: var(--warning-soft); color: var(--warning); }
body[data-route="settings-rewards"] .campaign-edit-button {
  min-height: 40px;
  border-color: var(--border-strong);
  border-radius: 10px;
  color: var(--text);
}
body[data-route="settings-rewards"] .campaign-edit-button i { color: var(--accent); }

body[data-route="settings-rewards"] .campaign-info-note {
  margin-top: 20px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: color-mix(in srgb, var(--accent-soft) 38%, var(--bg-surface));
  color: var(--text-muted);
  font-size: 13px;
}

body[data-route="settings-rewards"] .campaign-info-note :is(i, strong) { color: var(--accent-strong); }

/* Campaign modals follow the accepted centered, sectioned editor. */
body[data-route="settings-rewards"] :is(#banner-modal, #reward-modal) {
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(27, 17, 18, 0.5);
  backdrop-filter: blur(5px);
}

body[data-route="settings-rewards"] :is(#banner-modal, #reward-modal) .campaign-editor {
  width: min(1060px, 100%);
  max-height: calc(100dvh - 48px);
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--bg-surface);
  box-shadow: var(--shadow-modal);
}

body[data-route="settings-rewards"] .campaign-editor .modal-head {
  padding: 22px 26px;
  border-bottom: 1px solid var(--border);
}

body[data-route="settings-rewards"] .campaign-editor .modal-head h3 {
  color: var(--text);
  font-size: 25px;
  font-weight: 800;
}

body[data-route="settings-rewards"] .campaign-edit-layout {
  grid-template-columns: minmax(300px, 0.82fr) minmax(0, 1.38fr);
}

body[data-route="settings-rewards"] .campaign-media-column {
  padding: 24px;
  border-right: 1px solid var(--border);
  background: var(--bg-app);
}

body[data-route="settings-rewards"] .campaign-fields-column { padding: 24px 26px; }
body[data-route="settings-rewards"] .campaign-column-heading strong { color: var(--text); font-size: 16px; }
body[data-route="settings-rewards"] .campaign-column-heading small { color: var(--text-muted); font-size: 12px; line-height: 1.5; }

body[data-route="settings-rewards"] .campaign-editor :is(input, select, textarea):not([type="checkbox"]):not([type="file"]) {
  min-height: 44px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--bg-surface);
  color: var(--text);
  font-size: 14px;
}

body[data-route="settings-rewards"] .campaign-editor .modal-footer {
  gap: 10px;
  padding: 15px 26px;
  border-top: 1px solid var(--border);
  background: var(--bg-surface);
}

/* Online orders */
body[data-route="warehouse-online-orders"] .ss-order-workspace {
  display: grid;
  gap: 16px;
}

body[data-route="warehouse-online-orders"] .online-order-status-tabs {
  display: flex;
  gap: 0;
  overflow-x: auto;
  padding: 0 20px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--bg-surface);
  box-shadow: var(--shadow-card);
}

body[data-route="warehouse-online-orders"] .online-order-status-tabs button {
  min-height: 54px;
  padding: 12px 18px;
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

body[data-route="warehouse-online-orders"] .online-order-status-tabs button.active {
  border-bottom-color: var(--accent);
  background: transparent;
  color: var(--accent-strong);
  box-shadow: none;
}

body[data-route="warehouse-online-orders"] .online-order-status-tabs b {
  display: inline-grid;
  min-width: 24px;
  height: 24px;
  margin-left: 5px;
  place-items: center;
  border-radius: 99px;
  background: var(--bg-elevated-2);
  color: inherit;
  font-size: 11px;
}

body[data-route="warehouse-online-orders"] .online-order-status-tabs button.active b { background: var(--accent-soft); }

body[data-route="warehouse-online-orders"] .online-orders-filter-panel {
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--bg-surface);
  box-shadow: var(--shadow-card);
}

body[data-route="warehouse-online-orders"] .online-orders-filter-fields {
  grid-template-columns: minmax(280px, 1fr) minmax(170px, 210px) minmax(170px, 210px);
  gap: 14px;
}

body[data-route="warehouse-online-orders"] .online-orders-filter-fields label {
  display: grid;
  gap: 7px;
}

body[data-route="warehouse-online-orders"] .online-orders-filter-fields label > span:first-child {
  color: var(--text);
  font-size: 12px;
  font-weight: 750;
}

body[data-route="warehouse-online-orders"] .online-orders-filter-fields input {
  min-height: 44px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--bg-surface);
  color: var(--text);
  font-size: 13px;
}

body[data-route="warehouse-online-orders"] .ss-order-search-control {
  position: relative;
  display: block;
}

body[data-route="warehouse-online-orders"] .ss-order-search-control > i {
  position: absolute;
  left: 13px;
  top: 50%;
  z-index: 1;
  transform: translateY(-50%);
  color: var(--text-faint);
  font-size: 18px;
}

body[data-route="warehouse-online-orders"] .ss-order-search-control input { padding-left: 40px; }

body[data-route="warehouse-online-orders"] .ss-order-table-panel {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--bg-surface);
  box-shadow: var(--shadow-card);
}

body[data-route="warehouse-online-orders"] .ss-order-table-panel > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

body[data-route="warehouse-online-orders"] .ss-order-table-panel > header h3 {
  color: var(--text);
  font-size: 21px;
  font-weight: 800;
}

body[data-route="warehouse-online-orders"] .ss-order-table-panel > header p {
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 13px;
}

body[data-route="warehouse-online-orders"] .ss-order-table-panel > header > span {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
}

body[data-route="warehouse-online-orders"] .ss-order-table-scroll {
  width: 100%;
  overflow-x: auto;
}

body[data-route="warehouse-online-orders"] #app .ss-order-table-scroll.table-visual-identity {
  border: 0;
  border-radius: 0;
  background: transparent;
}

body[data-route="warehouse-online-orders"] #app .ss-order-table-scroll.table-visual-identity thead th {
  border-bottom-color: var(--border);
  background: var(--bg-elevated-2);
  color: var(--text-muted);
}

body[data-route="warehouse-online-orders"] .ss-order-table-panel table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  text-align: left;
}

body[data-route="warehouse-online-orders"] .ss-order-table-panel th {
  padding: 14px 17px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated-2);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 750;
}

body[data-route="warehouse-online-orders"] .ss-order-table-panel td {
  padding: 13px 17px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-size: 14px;
  vertical-align: middle;
}

body[data-route="warehouse-online-orders"] .ss-order-table-panel tbody tr:last-child td { border-bottom: 0; }
body[data-route="warehouse-online-orders"] .ss-order-table-panel tbody tr:not(.ss-order-empty-row):hover { background: color-mix(in srgb, var(--accent-soft) 28%, var(--bg-surface)); }

body[data-route="warehouse-online-orders"] .ss-order-identity {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 280px;
}

body[data-route="warehouse-online-orders"] .ss-order-identity > span:last-child {
  display: grid;
  gap: 4px;
  min-width: 0;
}

body[data-route="warehouse-online-orders"] .ss-order-identity strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

body[data-route="warehouse-online-orders"] .ss-order-identity small {
  max-width: 320px;
  overflow: hidden;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-route="warehouse-online-orders"] .ss-order-thumb {
  display: grid;
  width: 62px;
  height: 62px;
  flex: 0 0 62px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-app);
}

body[data-route="warehouse-online-orders"] .ss-order-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

body[data-route="warehouse-online-orders"] .ss-order-customer { font-size: 14px; font-weight: 700; }
body[data-route="warehouse-online-orders"] .ss-order-warehouse { color: var(--text-muted); font-weight: 650; }

body[data-route="warehouse-online-orders"] .ss-order-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  border-radius: 99px;
  background: var(--bg-elevated-2);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

body[data-route="warehouse-online-orders"] .ss-order-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

body[data-route="warehouse-online-orders"] .ss-order-status.tone-safe { background: var(--safe-soft); color: var(--safe); }
body[data-route="warehouse-online-orders"] .ss-order-status:is(.tone-pending, .tone-preparing, .tone-delivery) { background: var(--warning-soft); color: var(--warning); }
body[data-route="warehouse-online-orders"] .ss-order-status.tone-danger { background: var(--danger-soft); color: var(--danger); }

body[data-route="warehouse-online-orders"] .ss-order-amount {
  text-align: right;
  color: var(--text);
  font-size: 15px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

body[data-route="warehouse-online-orders"] .ss-order-detail-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--bg-surface);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

body[data-route="warehouse-online-orders"] .ss-order-detail-button:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
}

body[data-route="warehouse-online-orders"] .ss-order-empty-row div {
  display: grid;
  justify-items: center;
  gap: 5px;
  padding: 52px 18px;
  color: var(--text-muted);
}

body[data-route="warehouse-online-orders"] .ss-order-empty-row i { color: var(--accent); font-size: 32px; }
body[data-route="warehouse-online-orders"] .ss-order-empty-row strong { color: var(--text); font-size: 17px; }

body[data-route="warehouse-online-orders"] .online-orders-empty-filter {
  margin: 0;
  padding: 30px 18px;
  border: 1px dashed var(--border-strong);
  border-radius: 16px;
  background: var(--bg-surface);
}

body[data-route="warehouse-online-orders"] .online-order-detail-modal-card .modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

body[data-route="warehouse-online-orders"] .modal-backdrop {
  align-items: center;
  justify-content: center;
  padding: 24px;
}

body[data-route="warehouse-online-orders"] :is(.online-order-detail-modal-card, .online-order-cancel-modal-card) {
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 48px);
  overflow: hidden;
}

body[data-route="warehouse-online-orders"] :is(.online-order-detail-modal-card, .online-order-cancel-modal-card) .seller-account-form-content {
  min-height: 0;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

body[data-route="warehouse-online-orders"] .online-order-detail-actions {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  gap: 8px;
}

@media (max-width: 1180px) {
  body:is([data-route="overview"], [data-route="settings-rewards"], [data-route="warehouse-online-orders"]) .app-shell {
    grid-template-columns: 1fr;
  }

  body:is([data-route="overview"], [data-route="settings-rewards"], [data-route="warehouse-online-orders"]) .content {
    padding: 26px 22px 52px;
  }

  body[data-route="overview"] .ss-overview-layout {
    grid-template-columns: 1fr;
  }

  body[data-route="overview"] .ss-department-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 22px;
  }
}

@media (max-width: 760px) {
  body:is([data-route="overview"], [data-route="settings-rewards"], [data-route="warehouse-online-orders"]) .content {
    padding: 22px 15px 44px;
  }

  body:is([data-route="overview"], [data-route="settings-rewards"], [data-route="warehouse-online-orders"]) .ss-selected-page .unified-page-head h2 {
    font-size: 29px;
  }

  body[data-route="overview"] .ss-overview-kpis {
    grid-template-columns: 1fr;
  }

  body[data-route="overview"] .ss-overview-kpis article {
    min-height: 108px;
  }

  body[data-route="overview"] .ss-work-row {
    grid-template-columns: 24px minmax(0, 1fr) auto;
    gap: 11px;
    padding: 16px;
  }

  body[data-route="overview"] .ss-work-count { grid-column: 3; grid-row: 1; }
  body[data-route="overview"] .ss-work-action { grid-column: 2 / -1; justify-content: flex-start; }
  body[data-route="overview"] .ss-department-list { grid-template-columns: 1fr; }

  body[data-route="settings-rewards"] .campaign-tabs button { padding: 10px 16px; }
  body[data-route="settings-rewards"] .campaign-panel-head { align-items: flex-start; flex-direction: column; }
  body[data-route="settings-rewards"] :is(#banner-modal, #reward-modal) { padding: 8px; }
  body[data-route="settings-rewards"] :is(#banner-modal, #reward-modal) .campaign-editor {
    max-height: calc(100dvh - 16px);
    border-radius: 16px;
  }
  body[data-route="settings-rewards"] .campaign-edit-layout { grid-template-columns: 1fr; }
  body[data-route="settings-rewards"] .campaign-media-column {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  body[data-route="warehouse-online-orders"] .online-order-status-tabs { padding: 0 8px; }
  body[data-route="warehouse-online-orders"] .online-orders-filter-fields { grid-template-columns: 1fr; }
  body[data-route="warehouse-online-orders"] .ss-order-table-panel > header { align-items: flex-start; flex-direction: column; }
  body[data-route="warehouse-online-orders"] .modal-backdrop { align-items: flex-end; padding: 8px; }
  body[data-route="warehouse-online-orders"] :is(.online-order-detail-modal-card, .online-order-cancel-modal-card) {
    width: 100%;
    max-height: calc(100dvh - 16px);
    margin: 0;
  }
  body[data-route="warehouse-online-orders"] .online-order-detail-modal-card .modal-footer { align-items: stretch; flex-direction: column; }
  body[data-route="warehouse-online-orders"] .online-order-detail-actions { display: grid; grid-template-columns: 1fr; }
}
