:root {
  color-scheme: light;
  --bg: #f6f8fb;
  --bg-soft: #eef4f8;
  --panel: #ffffff;
  --panel-2: #f8fafc;
  --panel-3: #eef5fb;
  --line: rgba(33, 53, 71, 0.11);
  --line-strong: rgba(33, 53, 71, 0.2);
  --text: #122033;
  --muted: #647487;
  --soft: #3f596e;
  --accent: #0877d6;
  --accent-2: #00a878;
  --amber: #b7791f;
  --rose: #d43f5e;
  --violet: #6d63d8;
  --sky: #0b7fdc;
  --ink-shadow: rgba(25, 48, 70, 0.15);
  --shadow: rgba(25, 48, 70, 0.075);
  --radius: 8px;
  font-family: Inter, "Microsoft YaHei", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72) 0%, rgba(247, 251, 255, 0.9) 46%, rgba(239, 245, 249, 0.96) 100%),
    repeating-linear-gradient(90deg, rgba(8, 119, 214, 0.035) 0 1px, transparent 1px 72px);
  color: var(--text);
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
}

button,
select {
  user-select: none;
}

.app-shell {
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  border-right: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 251, 255, 0.94)),
    repeating-linear-gradient(180deg, rgba(8, 119, 214, 0.028) 0 1px, transparent 1px 48px);
  padding: 20px 12px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  box-shadow: 12px 0 36px rgba(38, 64, 89, 0.05);
  scrollbar-width: thin;
  scrollbar-color: rgba(66, 91, 112, 0.22) transparent;
}

.sidebar::-webkit-scrollbar {
  width: 8px;
}

.sidebar::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 8px;
  background: rgba(66, 91, 112, 0.2);
  background-clip: content-box;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 8px 8px 18px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(8, 119, 214, 0.28);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(8, 119, 214, 0.12), rgba(0, 168, 120, 0.08));
  color: var(--accent);
  font-weight: 800;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.brand strong {
  display: block;
  font-size: 15px;
}

.brand span,
.eyebrow,
.metric-label,
.module-kicker {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.nav {
  display: grid;
  gap: 6px;
  padding-top: 8px;
}

.nav button {
  position: relative;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: var(--soft);
  background: rgba(255, 255, 255, 0.56);
  padding: 6px 9px;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  transition: background 140ms ease, color 140ms ease, border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.nav button::before {
  content: "";
  position: absolute;
  inset: 9px auto 9px 0;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  opacity: 0;
  transition: opacity 140ms ease;
}

.nav-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(66, 91, 112, 0.14);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(240, 247, 253, 0.92));
  color: #526b80;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.96), 0 6px 14px rgba(38, 64, 89, 0.055);
  transition: color 140ms ease, border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.nav-icon svg {
  width: 18px;
  height: 18px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 700;
}

.nav button.active,
.nav button:hover {
  color: var(--text);
  background:
    linear-gradient(90deg, rgba(8, 119, 214, 0.11), rgba(0, 168, 120, 0.055)),
    rgba(255, 255, 255, 0.96);
  border-color: rgba(8, 119, 214, 0.18);
}

.nav button.active {
  box-shadow: 0 10px 22px rgba(8, 119, 214, 0.1);
}

.nav button.active::before {
  opacity: 1;
}

.nav button.active .nav-icon,
.nav button:hover .nav-icon {
  color: var(--accent);
  border-color: rgba(8, 119, 214, 0.26);
  background:
    linear-gradient(145deg, rgba(8, 119, 214, 0.13), rgba(0, 168, 120, 0.08)),
    #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95), 0 8px 16px rgba(8, 119, 214, 0.12);
}

.nav button:hover {
  transform: translateX(1px);
}

.main {
  padding: 24px;
  min-width: 0;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  padding: 4px 0 2px;
}

.topbar h1 {
  margin: 4px 0 0;
  font-size: 28px;
  letter-spacing: 0;
}

.eyebrow {
  margin: 0;
  color: var(--accent-2);
  font-weight: 700;
}

.status-cluster {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.status-pill,
.alert-line {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.84);
  color: var(--muted);
  padding: 9px 12px;
  box-shadow: 0 8px 22px rgba(38, 64, 89, 0.055);
}

.shop-select {
  min-height: 40px;
  min-width: 190px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--text);
  padding: 8px 10px;
}

.alert-line {
  margin-bottom: 18px;
  min-height: 40px;
}

.alert-line.success {
  color: var(--accent-2);
  border-color: rgba(0, 168, 120, 0.26);
  background: rgba(0, 168, 120, 0.08);
}

.alert-line.error {
  color: var(--rose);
  border-color: rgba(212, 63, 94, 0.24);
  background: rgba(212, 63, 94, 0.08);
}

.icon-button,
.action-button {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--text);
  cursor: pointer;
  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease;
}

.icon-button:hover,
.action-button:hover {
  background: #eef7ff;
  border-color: rgba(8, 119, 214, 0.36);
  transform: translateY(-1px);
}

.icon-button {
  width: 40px;
  height: 40px;
}

.action-button {
  padding: 9px 12px;
  font-weight: 700;
}

.action-button:disabled {
  cursor: wait;
  opacity: 0.55;
  transform: none;
}

.grid {
  display: grid;
  gap: 16px;
}

.kpi-grid {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.panel {
  position: relative;
  border: 1px solid rgba(40, 58, 76, 0.1);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(249, 252, 255, 0.98));
  box-shadow: 0 18px 40px var(--shadow);
  overflow: hidden;
}

.auth-mode .app-shell {
  grid-template-columns: 1fr;
}

.auth-mode .sidebar,
.auth-mode .status-cluster {
  display: none;
}

.auth-mode .main {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto auto 1fr;
  align-content: start;
  padding: 34px 20px;
}

.auth-mode .topbar,
.auth-mode .alert-line,
.auth-wrap {
  width: min(100%, 520px);
  margin-right: auto;
  margin-left: auto;
}

.auth-mode .topbar {
  margin-bottom: 12px;
}

.auth-wrap {
  display: grid;
  align-items: start;
  padding-top: 14px;
}

.auth-card {
  border-color: rgba(8, 119, 214, 0.18);
  box-shadow: 0 24px 60px rgba(38, 64, 89, 0.14);
}

.auth-card::before,
.account-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.auth-form,
.account-form {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.auth-form label,
.account-form label {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.auth-form input,
.account-form input,
.account-form select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--text);
  outline: none;
  padding: 9px 11px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.auth-form input:focus,
.account-form input:focus,
.account-form select:focus {
  border-color: rgba(8, 119, 214, 0.5);
  box-shadow: 0 0 0 3px rgba(8, 119, 214, 0.12);
}

.account-panel {
  margin-bottom: 16px;
  border-color: rgba(8, 119, 214, 0.12);
}

.account-form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.account-check {
  width: fit-content;
  grid-template-columns: 18px auto;
  align-items: center;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(8, 119, 214, 0.045);
  color: var(--soft);
}

.account-check input {
  min-height: auto;
  box-shadow: none;
}

.account-shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
}

.account-shop-option {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fbff;
  padding: 8px 10px;
  color: var(--soft);
  font-size: 12px;
  font-weight: 700;
}

.account-shop-option input {
  min-height: auto;
  box-shadow: none;
}

.inline-form {
  grid-template-columns: repeat(2, minmax(160px, 1fr)) auto;
  align-items: end;
}

.account-table td:first-child strong,
.account-table td:first-child small {
  display: block;
}

.account-table td:first-child small {
  margin-top: 3px;
  color: var(--muted);
}

.account-table .action-col {
  white-space: normal;
}

.account-table .action-col .action-button {
  margin: 2px;
}

.metric {
  padding: 16px;
  min-height: 106px;
  position: relative;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.metric::after {
  content: "";
  position: absolute;
  inset: auto 16px 14px 16px;
  height: 2px;
  border-radius: 2px;
  background: rgba(8, 119, 214, 0.36);
}

.metric:hover {
  transform: translateY(-2px);
  border-color: rgba(8, 119, 214, 0.22);
  box-shadow: 0 18px 34px rgba(38, 64, 89, 0.12);
}

.kpi-grid .metric:nth-child(2)::after,
.module-summary .metric:nth-child(2)::after {
  background: rgba(183, 121, 31, 0.42);
}

.kpi-grid .metric:nth-child(3)::after,
.module-summary .metric:nth-child(3)::after {
  background: rgba(0, 168, 120, 0.42);
}

.kpi-grid .metric:nth-child(4)::after,
.module-summary .metric:nth-child(4)::after {
  background: rgba(109, 99, 216, 0.38);
}

.kpi-grid .metric:nth-child(5)::after,
.module-summary .metric:nth-child(5)::after {
  background: rgba(212, 63, 94, 0.38);
}

.metric.compact {
  min-height: 96px;
}

.metric-value {
  margin-top: 8px;
  font-size: 28px;
  font-weight: 800;
  line-height: 1.1;
  color: #0f253b;
}

.compact .metric-value {
  font-size: 20px;
}

.dashboard-grid {
  grid-template-columns: minmax(340px, 0.78fr) minmax(0, 1.22fr);
  align-items: start;
}

.dashboard-side {
  align-items: start;
}

.dashboard-insights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.shop-detail-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  padding: 18px;
  border-color: rgba(8, 119, 214, 0.16);
  background:
    linear-gradient(135deg, rgba(8, 119, 214, 0.08), rgba(0, 168, 120, 0.055)),
    #ffffff;
}

.shop-detail-hero h2 {
  margin: 4px 0 6px;
  font-size: 24px;
}

.shop-detail-hero p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.shop-detail-kpis {
  margin-bottom: 16px;
}

.shop-detail-grid {
  grid-template-columns: minmax(340px, 0.82fr) minmax(0, 1.18fr);
  align-items: start;
}

.shop-detail-side {
  align-items: start;
}

.shop-detail-two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.shop-detail-panel {
  min-width: 0;
}

.shop-summary-table table {
  min-width: 1040px;
}

.shop-summary-table td:first-child strong,
.shop-summary-table td:first-child small {
  display: block;
}

.shop-summary-table td:first-child small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.ad-filter-panel {
  margin-bottom: 16px;
  border-color: rgba(8, 119, 214, 0.14);
}

.ad-toolbar input,
.ad-toolbar select {
  min-width: 134px;
}

.advertising-grid {
  grid-template-columns: minmax(340px, 0.76fr) minmax(0, 1.24fr);
  align-items: start;
}

.advertising-side {
  align-items: start;
}

.expense-breakdown {
  display: grid;
  gap: 1px;
  background: rgba(40, 58, 76, 0.06);
}

.expense-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.8fr) minmax(140px, 1.4fr) auto;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  background: rgba(255, 255, 255, 0.78);
}

.expense-row strong,
.expense-row small {
  display: block;
}

.expense-row small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.expense-row b {
  color: #0f253b;
  font-size: 13px;
}

.expense-track {
  height: 10px;
  border-radius: 999px;
  background: rgba(40, 58, 76, 0.08);
  overflow: hidden;
}

.expense-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.campaign-breakdown .campaign-row.orderGrowth .expense-track span {
  background: linear-gradient(90deg, var(--amber), var(--rose));
}

.campaign-breakdown .campaign-row.paidPromotion .expense-track span {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.campaign-row .tag {
  width: fit-content;
}

.insight-panel {
  min-width: 0;
}

.mini-list {
  display: grid;
  gap: 1px;
  background: rgba(40, 58, 76, 0.06);
}

.mini-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.78);
}

.mini-row strong,
.mini-row small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-row strong {
  color: var(--text);
  font-size: 13px;
}

.mini-row small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.mini-row b {
  color: #0f253b;
  font-size: 13px;
}

.inventory-row {
  grid-template-columns: 48px minmax(0, 1fr) minmax(46px, auto);
}

.inventory-row .product-thumb {
  width: 44px;
  height: 44px;
}

.inventory-amount {
  min-width: 46px;
  text-align: right;
  font-size: 15px;
}

.mini-rank {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(8, 119, 214, 0.1);
  color: var(--accent);
  font-weight: 800;
  font-size: 12px;
}

.compact-empty {
  padding: 18px 12px;
}

.trend-stack {
  position: sticky;
  top: 18px;
}

#smart-table .table-wrap {
  max-height: 690px;
  overflow: auto;
}

.module-summary {
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
  margin-bottom: 16px;
}

.module-panel {
  margin-top: 0;
  border-color: rgba(8, 119, 214, 0.12);
}

.module-limited-note {
  margin: 12px 0;
  padding: 10px 12px;
  border: 1px solid rgba(8, 119, 214, 0.14);
  border-radius: var(--radius);
  background: rgba(8, 119, 214, 0.06);
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.module-panel::before,
.chart-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  opacity: 0.82;
  z-index: 2;
}

.product-trend-panel {
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
  padding-top: 2px;
}

.product-trend-panel > .panel-header {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(239, 247, 255, 0.9));
  box-shadow: 0 16px 32px rgba(38, 64, 89, 0.1);
}

.trend-toolbar {
  align-items: center;
}

.trend-summary {
  margin-bottom: 0;
}

.product-trend-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.trend-detail {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.82);
  overflow: hidden;
}

.compact-header {
  padding: 13px 16px;
}

.compact-header h2 {
  font-size: 16px;
}

.compact-table table {
  min-width: 620px;
}

.product-thumb {
  width: 48px;
  height: 48px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid rgba(40, 58, 76, 0.12);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(8, 119, 214, 0.08), rgba(0, 168, 120, 0.06)),
    #ffffff;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  overflow: hidden;
}

.product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.product-thumb.image-error::after {
  content: "无图";
}

.empty-thumb {
  background: #f3f7fb;
}

td .product-thumb {
  vertical-align: middle;
}

.mini-media {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.mini-media .product-thumb {
  width: 44px;
  height: 44px;
}

.shop-avatar {
  position: relative;
  display: inline-grid;
  width: 44px;
  height: 44px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(40, 58, 76, 0.12);
  border-radius: 8px;
  background: linear-gradient(135deg, #eef7ff, #f7fbff);
  color: #1267a8;
  font-size: 13px;
  font-weight: 850;
  line-height: 1;
  flex: 0 0 auto;
}

.shop-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.shop-avatar.empty-avatar::after,
.shop-avatar.image-error::after {
  content: attr(data-initials);
}

.detail-drawer {
  margin-top: 16px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1px;
  background: rgba(40, 58, 76, 0.06);
}

.detail-item {
  min-width: 0;
  padding: 13px 14px;
  background: rgba(255, 255, 255, 0.82);
}

.detail-item span,
.detail-item strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.detail-item strong {
  margin-top: 5px;
  color: var(--text);
  font-size: 14px;
}

.sync-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1px;
  margin-top: 16px;
  overflow: hidden;
}

.sync-chip {
  padding: 13px 14px;
  background: rgba(255, 255, 255, 0.66);
  border-left: 3px solid var(--line);
}

.sync-chip strong,
.sync-chip span {
  display: block;
}

.sync-chip span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.sync-chip.success {
  border-left-color: var(--accent-2);
}

.sync-chip.failed {
  border-left-color: var(--rose);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(244, 248, 252, 0.92));
  flex-wrap: wrap;
}

.panel-header h2 {
  margin: 0;
  font-size: 18px;
}

.toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.toolbar input,
.toolbar select {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--text);
  padding: 8px 10px;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.module-filter-select {
  min-width: 132px;
}

.order-date-filter {
  position: relative;
  min-width: 168px;
}

.order-date-toggle {
  width: 100%;
  justify-content: space-between;
  text-align: left;
}

.order-date-toggle::after {
  content: "";
  width: 7px;
  height: 7px;
  margin-left: 10px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  opacity: 0.72;
}

.order-date-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: 112px minmax(520px, 1fr);
  grid-template-rows: auto auto;
  width: min(740px, calc(100vw - 56px));
  border: 1px solid rgba(33, 53, 71, 0.14);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 24px 48px rgba(25, 48, 70, 0.18);
  overflow: hidden;
  contain: layout paint;
  will-change: transform, opacity;
}

.order-date-popover[hidden] {
  display: none;
}

.order-date-quick {
  display: grid;
  align-content: start;
  gap: 2px;
  padding: 12px 10px;
  border-right: 1px solid rgba(33, 53, 71, 0.14);
  background: #fbfcfd;
}

.order-date-quick button {
  min-height: 30px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  padding: 6px 8px;
  font-weight: 650;
}

.order-date-quick button:hover,
.order-date-quick button:focus-visible {
  background: #eef2f7;
}

.order-date-calendar {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(250px, 1fr));
  gap: 18px;
  padding: 14px 58px 12px;
}

.order-calendar-month {
  min-width: 0;
}

.order-calendar-title {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 18px;
  min-height: 28px;
  color: #1e2c3c;
  font-weight: 700;
}

.order-calendar-title b {
  font-size: 15px;
}

.order-calendar-weekdays,
.order-calendar-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(28px, 1fr));
  gap: 4px;
}

.order-calendar-weekdays {
  margin: 8px 0 6px;
  color: #768599;
  font-size: 12px;
}

.order-calendar-weekdays span {
  text-align: center;
  white-space: nowrap;
}

.order-calendar-day {
  min-width: 0;
  height: 31px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #1d2735;
  cursor: pointer;
  font-weight: 650;
}

.order-calendar-day:hover {
  background: #eef2f7;
}

.order-calendar-day.muted {
  color: #8d98a8;
}

.order-calendar-day.in-range {
  background: #edf0f4;
}

.order-calendar-day.selected {
  background: #20222a;
  color: #ffffff;
}

.order-calendar-nav,
.order-calendar-year-nav {
  position: absolute;
  top: 16px;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #1d2735;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.order-calendar-nav:hover {
  background: #eef2f7;
}

.order-calendar-nav.prev {
  left: 44px;
}

.order-calendar-nav.next {
  right: 44px;
}

.order-calendar-year-nav {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0;
}

.order-calendar-year-nav:hover {
  background: #e6f1ff;
  color: #0877d6;
}

.order-calendar-year-nav.prev {
  left: 12px;
}

.order-calendar-year-nav.next {
  right: 12px;
}

.order-date-actions {
  grid-column: 2;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 44px 14px;
  border-top: 1px solid rgba(33, 53, 71, 0.08);
}

.order-date-actions .action-button {
  min-width: 116px;
}

.toolbar input:focus,
.toolbar select:focus,
.shop-select:focus,
.openapi-field textarea:focus,
.openapi-field input:focus,
.openapi-field select:focus {
  border-color: rgba(8, 119, 214, 0.5);
  box-shadow: 0 0 0 3px rgba(8, 119, 214, 0.12);
}

.openapi-console {
  margin-bottom: 16px;
}

.openapi-console-body {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.openapi-field {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.openapi-field select,
.openapi-field textarea,
.openapi-field input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--text);
  outline: none;
}

.openapi-field select,
.openapi-field input {
  min-height: 40px;
  padding: 8px 10px;
}

.openapi-field textarea {
  min-height: 118px;
  resize: vertical;
  padding: 10px;
  font-family: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  line-height: 1.45;
}

.openapi-operation-field {
  max-width: 920px;
}

.openapi-meta {
  width: fit-content;
  max-width: 100%;
  border: 1px solid rgba(8, 119, 214, 0.16);
  border-radius: 999px;
  background: rgba(8, 119, 214, 0.065);
  color: var(--soft);
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 700;
}

.openapi-form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.openapi-result {
  margin: 0;
  max-height: 340px;
  overflow: auto;
  border: 1px solid rgba(40, 58, 76, 0.1);
  border-radius: var(--radius);
  background: #f7fafc;
  color: #233448;
  padding: 12px;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  line-height: 1.5;
}

.delivery-plan-panel,
.customer-service-panel,
.operation-center-panel {
  margin-top: 16px;
}

.delivery-plan-grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.78fr) minmax(0, 1.22fr);
  gap: 14px;
  padding: 16px;
}

.delivery-card,
.service-card,
.operation-card {
  min-width: 0;
  border: 1px solid rgba(40, 58, 76, 0.09);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
  padding: 14px;
}

.operation-center-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 16px;
}

.operation-card {
  display: grid;
  align-content: start;
  gap: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 251, 255, 0.9));
}

.operation-guard-card {
  grid-column: span 3;
  grid-template-columns: minmax(240px, 0.7fr) minmax(260px, 1fr);
  align-items: end;
}

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

.compact-operation-grid {
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
}

.operation-note {
  border: 1px solid rgba(8, 119, 214, 0.12);
  border-radius: var(--radius);
  background: rgba(8, 119, 214, 0.055);
  color: var(--muted);
  padding: 11px 12px;
  font-size: 12px;
  line-height: 1.55;
}

.operation-result {
  margin: 0 16px 16px;
}

.section-title h3 {
  margin: 4px 0 12px;
  font-size: 16px;
}

.delivery-order-list {
  display: grid;
  gap: 8px;
  max-height: 460px;
  overflow: auto;
}

.delivery-order-row {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(40, 58, 76, 0.08);
  border-radius: var(--radius);
  background: #f8fbfe;
}

.delivery-order-row span,
.service-card span {
  display: block;
  min-width: 0;
}

.delivery-order-row strong {
  color: var(--text);
  font-size: 14px;
}

.delivery-order-row small,
.service-card span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.delivery-form-card {
  display: grid;
  gap: 12px;
}

.delivery-form-grid,
.customer-service-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.delivery-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.primary-action {
  border-color: rgba(8, 119, 214, 0.35);
  background: linear-gradient(180deg, #1689e8, #0877d6);
  color: #ffffff;
}

.delivery-result {
  margin: 0 16px 16px;
}

.service-card strong {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
}

.table-wrap {
  overflow: auto;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.65), rgba(247, 250, 253, 0.65));
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th,
td {
  padding: 11px 14px;
  border-bottom: 1px solid rgba(40, 58, 76, 0.08);
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

td.cell-wide {
  min-width: 260px;
  max-width: 360px;
  white-space: normal;
  line-height: 1.45;
}

td.cell-code {
  font-family: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
}

tbody tr {
  transition: background 120ms ease;
}

tbody tr:nth-child(even) {
  background: rgba(247, 250, 253, 0.72);
}

tbody tr:hover {
  background: rgba(8, 119, 214, 0.07);
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: var(--muted);
  background: #f4f7fb;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  box-shadow: inset 0 -1px 0 rgba(40, 58, 76, 0.08);
}

.action-col {
  position: sticky;
  right: 0;
  z-index: 2;
  min-width: 112px;
  background: #ffffff;
  box-shadow: -10px 0 18px rgba(38, 64, 89, 0.09);
}

th.action-col {
  z-index: 3;
  background: #f1f5f9;
}

tbody tr:nth-child(even) .action-col {
  background: #f7fafd;
}

tbody tr:hover .action-col {
  background: #eef7ff;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.78);
  font-weight: 700;
  font-size: 12px;
}

.tag::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.78;
}

.tag.normal {
  color: var(--accent-2);
  border-color: rgba(0, 168, 120, 0.3);
  background: rgba(0, 168, 120, 0.08);
}

.tag.warning {
  color: var(--amber);
  border-color: rgba(183, 121, 31, 0.3);
  background: rgba(183, 121, 31, 0.08);
}

.tag.critical,
.negative {
  color: var(--rose);
  border-color: rgba(212, 63, 94, 0.3);
}

.tag.critical {
  background: rgba(212, 63, 94, 0.08);
}

.tag.muted {
  color: var(--muted);
  background: rgba(102, 119, 137, 0.08);
}

.positive {
  color: var(--accent-2);
}

.chart {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.chart-panel {
  position: relative;
  border-color: rgba(8, 119, 214, 0.14);
}

.chart-panel.sales::before {
  background: linear-gradient(90deg, var(--accent-2), var(--sky));
}

.chart-header {
  align-items: flex-start;
}

.chart-stat {
  display: grid;
  justify-items: end;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
}

.chart-stat strong {
  color: var(--text);
  font-size: 20px;
  line-height: 1;
}

.chart-stat span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(102, 119, 137, 0.08);
}

.chart-stat span.positive {
  color: var(--accent-2);
  background: rgba(0, 168, 120, 0.09);
}

.chart-stat span.negative {
  color: var(--rose);
  background: rgba(212, 63, 94, 0.09);
  border: 0;
}

.shop-ad-spend-chart .chart-header {
  gap: 16px;
}

.series-toggle-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.series-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid rgba(40, 58, 76, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--text);
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
  user-select: none;
  box-shadow: 0 8px 18px rgba(38, 64, 89, 0.06);
}

.series-toggle input {
  width: 14px;
  height: 14px;
  accent-color: var(--series-color);
  cursor: pointer;
}

.series-swatch {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--series-color);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--series-color) 13%, transparent);
}

.line-chart {
  padding: 16px 18px 18px;
  position: relative;
  background:
    linear-gradient(180deg, rgba(8, 119, 214, 0.035), transparent 46%),
    linear-gradient(90deg, rgba(40, 58, 76, 0.04) 1px, transparent 1px),
    linear-gradient(180deg, rgba(40, 58, 76, 0.04) 1px, transparent 1px);
  background-size: auto, 72px 72px, 72px 72px;
}

.line-chart svg {
  display: block;
  width: 100%;
  min-height: 214px;
  overflow: visible;
}

.chart-grid-row line {
  stroke: rgba(40, 58, 76, 0.075);
  stroke-width: 1;
}

.chart-grid-row text {
  fill: var(--muted);
  font-size: 10px;
  text-anchor: end;
}

.line-point {
  cursor: crosshair;
  outline: none;
}

.point-hit {
  fill: transparent;
  stroke: transparent;
  pointer-events: all;
}

.point-guide {
  stroke: rgba(8, 119, 214, 0.16);
  stroke-dasharray: 4 4;
  stroke-width: 1.4;
  opacity: 0;
  transition: opacity 140ms ease;
}

.point-halo {
  fill: rgba(255, 255, 255, 0.88);
  stroke: rgba(8, 119, 214, 0.16);
  stroke-width: 1;
  opacity: 0;
  transition: opacity 140ms ease, r 140ms ease;
}

.point-core {
  fill: #ffffff;
  stroke: var(--accent-2);
  stroke-width: 2;
  transition: r 140ms ease, stroke-width 140ms ease, fill 140ms ease, filter 140ms ease;
}

.line-chart.orders .point-core {
  stroke: var(--accent);
}

.line-chart.sales .point-core {
  stroke: var(--accent-2);
}

.campaign-chart .campaign-line {
  stroke-width: 4;
}

.campaign-chart .campaign-area {
  opacity: 0.78;
}

.campaign-point .point-guide {
  stroke: color-mix(in srgb, var(--series-color) 36%, transparent);
}

.campaign-point .point-halo {
  stroke: color-mix(in srgb, var(--series-color) 34%, transparent);
}

.campaign-point .point-core {
  stroke: var(--series-color);
}

.line-point:hover .point-guide,
.line-point:focus .point-guide,
.line-point:hover .point-halo,
.line-point:focus .point-halo {
  opacity: 1;
}

.line-point:hover .point-core,
.line-point:focus .point-core {
  fill: var(--accent-2);
  r: 6.6;
  stroke-width: 3;
  filter: drop-shadow(0 4px 9px rgba(0, 168, 120, 0.3));
}

.line-chart.orders .line-point:hover .point-core,
.line-chart.orders .line-point:focus .point-core {
  fill: var(--accent);
  filter: drop-shadow(0 4px 9px rgba(8, 119, 214, 0.28));
}

.campaign-chart .campaign-point:hover .point-core,
.campaign-chart .campaign-point:focus .point-core {
  fill: var(--series-color);
  filter: drop-shadow(0 4px 9px color-mix(in srgb, var(--series-color) 28%, transparent));
}

.line-path {
  fill: none;
  stroke-width: 4.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 5px 10px rgba(8, 119, 214, 0.18));
}

.line-area {
  filter: saturate(1.05);
}

.chart-empty-label {
  fill: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.chart-tooltip {
  position: absolute;
  z-index: 3;
  transform: translate(-50%, -100%);
  min-width: 150px;
  max-width: min(260px, calc(100% - 24px));
  border: 1px solid rgba(8, 119, 214, 0.24);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.98);
  color: var(--text);
  box-shadow: 0 16px 34px rgba(38, 64, 89, 0.18);
  padding: 9px 11px;
  font-size: 12px;
  line-height: 1.45;
  display: none;
  opacity: 1;
  pointer-events: none;
  white-space: normal;
}

.chart-tooltip::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 10px;
  height: 10px;
  border-right: 1px solid rgba(8, 119, 214, 0.24);
  border-bottom: 1px solid rgba(8, 119, 214, 0.24);
  background: rgba(255, 255, 255, 0.98);
  transform: translateX(-50%) rotate(45deg);
}

.chart-tooltip.visible {
  display: block;
  opacity: 1;
}

.chart-axis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(48px, 1fr));
  gap: 8px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}

.chart-axis span,
.chart-axis strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chart-axis span {
  padding: 6px 8px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.62);
  box-shadow: inset 0 0 0 1px rgba(40, 58, 76, 0.055);
}

.chart-axis strong {
  margin-top: 3px;
  color: var(--text);
  font-size: 11px;
  font-weight: 800;
}

.bar-row {
  display: grid;
  grid-template-columns: 82px 1fr 56px;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.bar-track {
  height: 10px;
  background: rgba(40, 58, 76, 0.08);
}

.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.empty {
  padding: 34px 16px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    height: auto;
    padding: 12px;
  }

  .brand {
    padding: 4px 4px 12px;
  }

  .nav {
    grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
    gap: 6px;
    padding-top: 8px;
  }

  .nav button {
    grid-template-columns: 32px minmax(0, 1fr);
    min-height: 42px;
    gap: 8px;
    padding: 5px 8px;
  }

  .nav button::before {
    inset: auto 10px 0 10px;
    width: auto;
    height: 2px;
    border-radius: 2px 2px 0 0;
  }

  .nav button:hover {
    transform: translateY(-1px);
  }

  .nav-icon {
    width: 30px;
    height: 30px;
  }

  .nav-icon svg {
    width: 16px;
    height: 16px;
  }

  .main {
    padding: 16px;
  }

  .topbar {
    align-items: flex-start;
  }

  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .shop-detail-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .shop-detail-grid,
  .shop-detail-two-col {
    grid-template-columns: 1fr;
  }

  .advertising-grid {
    grid-template-columns: 1fr;
  }

  .expense-row {
    grid-template-columns: 1fr;
  }

  .dashboard-insights {
    grid-template-columns: 1fr;
  }

  .product-trend-grid {
    grid-template-columns: 1fr;
  }

  .openapi-form-grid {
    grid-template-columns: 1fr;
  }

  .delivery-plan-grid,
  .delivery-form-grid,
  .customer-service-grid,
  .operation-center-grid,
  .operation-form-grid,
  .compact-operation-grid,
  .operation-guard-card {
    grid-template-columns: 1fr;
  }

  .operation-guard-card {
    grid-column: auto;
  }

  .account-form-grid,
  .inline-form {
    grid-template-columns: 1fr;
  }

  .sync-strip {
    grid-template-columns: repeat(auto-fit, minmax(158px, 1fr));
  }

  .trend-stack {
    position: static;
  }
}

@media (max-width: 560px) {
  .topbar {
    flex-direction: column;
  }

  .status-cluster,
  .shop-select {
    width: 100%;
  }

  .metric-value {
    font-size: 22px;
  }
}

/* Product Design polish pass */
html {
  scrollbar-width: thin;
  scrollbar-color: rgba(68, 88, 106, 0.28) transparent;
}

body {
  background:
    linear-gradient(180deg, #fbfdff 0%, #f7fafc 42%, #eef4f8 100%),
    linear-gradient(90deg, rgba(8, 119, 214, 0.026) 1px, transparent 1px),
    linear-gradient(180deg, rgba(33, 53, 71, 0.024) 1px, transparent 1px);
  background-size: auto, 96px 96px, 96px 96px;
  font-feature-settings: "tnum";
}

body::-webkit-scrollbar,
.table-wrap::-webkit-scrollbar,
.delivery-order-list::-webkit-scrollbar,
#smart-table .table-wrap::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

body::-webkit-scrollbar-thumb,
.table-wrap::-webkit-scrollbar-thumb,
.delivery-order-list::-webkit-scrollbar-thumb,
#smart-table .table-wrap::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: rgba(68, 88, 106, 0.25);
  background-clip: content-box;
}

.main {
  padding: 22px 24px 30px;
}

.sidebar {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(248, 251, 254, 0.98));
  border-right-color: rgba(33, 53, 71, 0.09);
  box-shadow: 14px 0 34px rgba(25, 48, 70, 0.045);
}

.brand {
  margin-bottom: 12px;
  padding: 6px 8px 16px;
}

.brand-mark {
  background:
    linear-gradient(145deg, rgba(8, 119, 214, 0.16), rgba(0, 168, 120, 0.1)),
    #ffffff;
  box-shadow: 0 10px 24px rgba(8, 119, 214, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.96);
}

.brand strong {
  letter-spacing: 0;
}

.nav {
  gap: 7px;
}

.nav button {
  min-height: 44px;
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.nav button.active,
.nav button:hover {
  background: #ffffff;
  border-color: rgba(8, 119, 214, 0.16);
  box-shadow: 0 10px 24px rgba(25, 48, 70, 0.075);
}

.nav button.active .nav-icon,
.nav button:hover .nav-icon {
  background:
    linear-gradient(145deg, rgba(8, 119, 214, 0.16), rgba(0, 168, 120, 0.1)),
    #ffffff;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  margin: -22px -24px 16px;
  padding: 18px 24px 14px;
  border-bottom: 1px solid rgba(33, 53, 71, 0.08);
  background: rgba(250, 253, 255, 0.92);
  backdrop-filter: blur(14px);
}

.topbar h1 {
  font-size: 27px;
  line-height: 1.12;
}

.eyebrow {
  font-size: 11px;
  letter-spacing: 0.02em;
}

.status-cluster {
  gap: 8px;
}

.status-pill,
.alert-line,
.shop-select,
.toolbar input,
.toolbar select,
.openapi-field input,
.openapi-field select,
.openapi-field textarea,
.auth-form input,
.account-form input,
.account-form select {
  border-color: rgba(33, 53, 71, 0.13);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.98);
}

.alert-line {
  border-left: 3px solid rgba(8, 119, 214, 0.34);
}

.icon-button,
.action-button {
  min-height: 38px;
  border-color: rgba(33, 53, 71, 0.16);
  background:
    linear-gradient(180deg, #ffffff, #f7fafc);
  box-shadow: 0 6px 14px rgba(25, 48, 70, 0.055);
}

.icon-button:hover,
.action-button:hover {
  background:
    linear-gradient(180deg, #ffffff, #eef7ff);
  box-shadow: 0 10px 20px rgba(8, 119, 214, 0.1);
}

.primary-action {
  border-color: rgba(8, 119, 214, 0.5);
  background: linear-gradient(180deg, #1890ea, #0877d6);
  box-shadow: 0 12px 24px rgba(8, 119, 214, 0.18);
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.line-point:focus {
  outline: 3px solid rgba(8, 119, 214, 0.18);
  outline-offset: 2px;
}

.panel {
  border-color: rgba(33, 53, 71, 0.095);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(248, 251, 254, 0.985));
  box-shadow: 0 16px 34px rgba(25, 48, 70, 0.07);
}

.panel:hover {
  border-color: rgba(8, 119, 214, 0.14);
}

.panel-header {
  min-height: 66px;
  padding: 15px 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 253, 0.95));
}

.panel-header h2 {
  color: #102238;
  font-size: 17px;
  line-height: 1.25;
}

.compact-header {
  min-height: 56px;
  padding: 13px 15px;
}

.module-kicker,
.metric-label {
  color: #6d7e91;
  letter-spacing: 0;
}

.metric {
  min-height: 104px;
  padding: 15px 16px;
}

.metric::after {
  inset: auto 16px 13px 16px;
  height: 3px;
  opacity: 0.86;
}

.metric-value {
  color: #102238;
  font-size: 27px;
  letter-spacing: 0;
}

.dashboard-grid,
.shop-detail-grid,
.advertising-grid {
  gap: 18px;
}

.dashboard-insights {
  gap: 14px;
}

.insight-panel .panel-header {
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}

.mini-list,
.expense-breakdown {
  background: rgba(33, 53, 71, 0.055);
}

.mini-row,
.expense-row {
  background: rgba(255, 255, 255, 0.9);
}

.mini-row {
  padding: 11px 13px;
  transition: background 140ms ease, transform 140ms ease;
}

.mini-row:hover {
  background: #f6fbff;
  transform: translateX(1px);
}

.inventory-row {
  grid-template-columns: 52px minmax(0, 1fr) minmax(54px, auto);
}

.inventory-row .product-thumb,
.mini-media .product-thumb,
.mini-media .shop-avatar {
  width: 46px;
  height: 46px;
}

.inventory-amount {
  color: #0f253b;
  font-size: 16px;
  font-weight: 850;
}

.product-thumb {
  background:
    linear-gradient(145deg, rgba(8, 119, 214, 0.07), rgba(0, 168, 120, 0.045)),
    #f8fbfe;
  border-color: rgba(33, 53, 71, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.empty-thumb {
  background: #f3f7fb;
  color: #789;
}

.toolbar {
  align-items: center;
  gap: 8px;
}

.toolbar input,
.toolbar select {
  min-height: 40px;
}

.module-filter-select {
  min-width: 146px;
}

.table-wrap {
  background: #ffffff;
}

table {
  border-spacing: 0;
}

th,
td {
  padding: 12px 14px;
}

th {
  background: #f7fafc;
  color: #5d6f83;
  font-size: 11px;
  letter-spacing: 0.01em;
}

tbody tr:nth-child(even) {
  background: #fbfdff;
}

tbody tr:hover {
  background: #f1f8ff;
}

td {
  color: #1c2d40;
}

td.cell-code {
  color: #30465b;
}

.action-col {
  background: rgba(255, 255, 255, 0.96);
  box-shadow: -12px 0 20px rgba(25, 48, 70, 0.075);
}

th.action-col {
  background: #f7fafc;
}

tbody tr:nth-child(even) .action-col {
  background: #fbfdff;
}

.tag {
  min-height: 26px;
  border-color: rgba(33, 53, 71, 0.12);
  background: #ffffff;
}

.tag.normal {
  background: rgba(0, 168, 120, 0.075);
}

.tag.warning {
  background: rgba(183, 121, 31, 0.08);
}

.chart-panel {
  border-color: rgba(8, 119, 214, 0.12);
}

.chart-panel::before,
.module-panel::before {
  height: 2px;
}

.chart-header {
  align-items: center;
}

.chart-stat strong {
  font-size: 21px;
}

.line-chart {
  padding: 16px 18px 16px;
  background:
    radial-gradient(circle at 12% 4%, rgba(8, 119, 214, 0.055), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 251, 254, 0.96));
}

.line-chart svg {
  min-height: 230px;
}

.chart-grid-row line {
  stroke: rgba(33, 53, 71, 0.08);
}

.line-path {
  stroke-width: 4.6;
  filter: drop-shadow(0 8px 14px rgba(8, 119, 214, 0.16));
}

.point-hit {
  r: 20;
}

.point-halo {
  r: 12;
  stroke-width: 1.4;
}

.point-core {
  r: 5.2;
  stroke-width: 2.4;
}

.line-point:hover .point-core,
.line-point:focus .point-core {
  r: 7.2;
}

.chart-tooltip {
  min-width: 168px;
  border-color: rgba(8, 119, 214, 0.22);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 38px rgba(25, 48, 70, 0.18);
  font-weight: 700;
}

.chart-axis {
  margin-top: 12px;
}

.chart-axis span {
  background: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(33, 53, 71, 0.07), 0 5px 12px rgba(25, 48, 70, 0.035);
}

.ad-filter-panel,
.module-panel,
.openapi-console,
.delivery-plan-panel,
.customer-service-panel,
.operation-center-panel,
.account-panel {
  box-shadow: 0 18px 38px rgba(25, 48, 70, 0.075);
}

.delivery-card,
.service-card,
.operation-card,
.trend-detail,
.account-shop-option {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(33, 53, 71, 0.095);
}

.openapi-result,
.delivery-result,
.operation-result {
  background: #f8fafc;
  border-color: rgba(33, 53, 71, 0.1);
}

@media (max-width: 980px) {
  .main {
    padding: 16px;
  }

  .topbar {
    position: static;
    margin: 0 0 16px;
    padding: 0 0 12px;
    background: transparent;
    backdrop-filter: none;
  }

  .dashboard-insights {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .kpi-grid {
    grid-template-columns: 1fr;
  }

  .toolbar,
  .toolbar input,
  .toolbar select,
  .action-button {
    width: 100%;
  }
}

@media (max-width: 760px) {
  .order-date-filter,
  .order-date-toggle {
    width: 100%;
  }

  .order-date-popover {
    left: 0;
    right: auto;
    grid-template-columns: 1fr;
    width: min(100%, calc(100vw - 32px));
  }

  .order-date-quick {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-right: 0;
    border-bottom: 1px solid rgba(33, 53, 71, 0.14);
  }

  .order-date-calendar {
    grid-template-columns: 1fr;
    padding: 14px 58px 12px;
  }

  .order-date-actions {
    grid-column: 1;
    padding: 12px;
  }
}
