:root {
  color-scheme: light;
  --bg: #f5f8f7;
  --panel: rgba(255, 255, 255, 0.92);
  --panel-solid: #ffffff;
  --line: #dfe9e7;
  --soft-line: #edf3f2;
  --text: #182422;
  --muted: #6d7977;
  --label: #53615f;
  --primary: #159285;
  --primary-strong: #0a7068;
  --active: #e8f6f3;
  --danger: #a45a58;
  --danger-bg: #fff7f5;
  --danger-line: #eed9d4;
  --field: #fbfdfd;
  --field-line: #dce8e5;
  --warning: #7a520f;
  --warning-bg: #fff8ea;
  --warning-line: #ead39f;
  --shadow: 0 24px 70px rgba(22, 45, 42, 0.08);
  --button-shadow: 0 14px 24px rgba(18, 160, 147, 0.22);
}

* { box-sizing: border-box; }

html { background: var(--bg); }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 96% -8%, rgba(82, 218, 195, 0.20), transparent 34%),
    linear-gradient(180deg, #f8fbfa 0%, var(--bg) 38%, #f2f7f6 100%);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

button, input, select { font: inherit; }

button {
  min-height: 40px;
  padding: 0 15px;
  border: 1px solid var(--field-line);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  font-size: 14px;
  font-weight: 750;
  white-space: nowrap;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

button:hover:not(:disabled) {
  border-color: #c8dcda;
  box-shadow: 0 10px 22px rgba(22, 45, 42, 0.07);
  transform: translateY(-1px);
}

button:disabled { cursor: not-allowed; opacity: 0.5; }

button.primary {
  border-color: transparent;
  background: linear-gradient(135deg, #0b8f83, #12b9a7);
  color: #fff;
  box-shadow: var(--button-shadow);
}

input, select {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--field-line);
  border-radius: 13px;
  background: var(--field);
  color: var(--text);
  font-size: 14px;
  outline: none;
}

input:focus, select:focus {
  border-color: rgba(21, 146, 133, 0.55);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(21, 146, 133, 0.11);
}

label {
  display: grid;
  gap: 8px;
  color: var(--label);
  font-size: 13px;
  font-weight: 700;
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px 18px;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 30px;
}

.brand-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  object-fit: cover;
  box-shadow: 0 16px 32px rgba(28, 24, 46, 0.18);
}

.brand strong {
  display: block;
  color: #142321;
  font-size: 21px;
  line-height: 1.2;
  font-weight: 850;
}

.brand span, .page-head p, .security-note { color: var(--muted); }
.brand span { font-size: 12px; }

.nav {
  width: 100%;
  height: 42px;
  margin-bottom: 8px;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
  text-align: left;
  box-shadow: none;
}

.nav.active {
  border-color: rgba(16, 115, 107, 0.08);
  background: var(--active);
  color: var(--primary-strong);
  font-weight: 850;
}

.security-note {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 24px;
  margin: 0;
  padding: 13px 14px;
  border-radius: 14px;
  background: #edf6f3;
  font-size: 12px;
  line-height: 1.6;
}

.content {
  min-width: 0;
  padding: 32px 36px;
}

.view { display: none; }
.view.active { display: block; }

.page-head {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 22px;
}

.page-head h1 {
  margin: 0 0 8px;
  font-size: 30px;
  line-height: 1.22;
  font-weight: 850;
}

.page-head p {
  margin: 0;
  max-width: 820px;
  font-size: 15px;
  line-height: 1.75;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(150px, 210px) minmax(210px, 1fr) minmax(240px, 1.15fr) auto auto auto;
  gap: 14px;
  align-items: end;
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.toolbar.single {
  grid-template-columns: minmax(260px, 1fr) auto;
}

.toolbar.payment-toolbar {
  grid-template-columns: minmax(160px, 220px) 170px 170px minmax(220px, 1fr) auto;
}

.toolbar.dashboard-toolbar {
  grid-template-columns: 190px 190px auto auto;
  max-width: 780px;
}

.toolbar.source-toolbar {
  grid-template-columns: minmax(200px, 1.2fr) 170px 170px 170px auto auto;
}

.toolbar.refund-toolbar {
  grid-template-columns: minmax(150px, 210px) 150px 150px minmax(170px, 1fr) minmax(145px, 0.7fr) 150px auto auto;
}

.panel, .empty-panel {
  margin-bottom: 18px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.empty-panel {
  display: grid;
  gap: 8px;
  color: var(--muted);
  line-height: 1.7;
}

.empty-panel strong {
  color: var(--text);
  font-size: 16px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.panel-head h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
}

.tabs, .filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tab, .chip {
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
  box-shadow: none;
}

.tab.active, .chip.active {
  border-color: rgba(21, 146, 133, 0.22);
  background: var(--active);
  color: var(--primary-strong);
}

.filter-row {
  margin-bottom: 14px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.kpi-card {
  min-height: 102px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.kpi-card span {
  display: block;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 720;
}

.kpi-card strong {
  display: block;
  color: var(--text);
  font-size: 23px;
  line-height: 1.2;
  font-weight: 880;
}

.kpi-card small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.negative strong { color: #a45a58; }
.positive strong { color: #0a7068; }

.trend-section {
  margin-bottom: 18px;
}

.trend-panel {
  padding: 18px;
}

.trend-panel-head {
  margin-bottom: 14px;
}

.trend-note {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

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

.trend-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--soft-line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.76);
}

.trend-card.wide {
  grid-column: 1 / -1;
}

.trend-card-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.trend-card-head strong {
  display: block;
  color: var(--text);
  font-size: 13px;
  font-weight: 850;
}

.trend-card-head span {
  display: block;
  margin-top: 5px;
  color: var(--text);
  font-size: 21px;
  line-height: 1.1;
  font-weight: 880;
}

.trend-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: 6px 10px;
  max-width: 56%;
}

.trend-legend em {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 720;
  white-space: nowrap;
}

.trend-legend i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.trend-svg {
  display: block;
  width: 100%;
  height: 180px;
}

.trend-grid-line {
  stroke: #e8efee;
  stroke-width: 1;
}

.trend-axis-label {
  fill: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.trend-line {
  fill: none;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.trend-area {
  opacity: 0.12;
}

.trend-hit-rect {
  fill: transparent;
  pointer-events: all;
  cursor: crosshair;
}

.chart-tooltip {
  position: fixed;
  z-index: 1200;
  min-width: 190px;
  max-width: 280px;
  padding: 10px 11px;
  border: 1px solid rgba(214, 221, 232, 0.92);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 48px rgba(36, 42, 56, 0.16);
  color: var(--text);
  font-size: 12px;
  pointer-events: none;
}

.chart-tooltip-title {
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.chart-tooltip-row {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 24px;
}

.chart-tooltip-row i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.chart-tooltip-row em {
  overflow: hidden;
  color: var(--label);
  font-style: normal;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chart-tooltip-row strong {
  font-size: 12px;
  font-weight: 860;
  white-space: nowrap;
}

.refund-chart-panel {
  padding: 18px;
}

.refund-chart-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 15px;
}

.refund-chart-head h2 {
  margin: 0 0 5px;
  font-size: 17px;
  font-weight: 850;
}

.refund-chart-head p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.refund-chart-head > span {
  padding: 7px 10px;
  border: 1px solid rgba(21, 146, 133, 0.15);
  border-radius: 999px;
  background: var(--active);
  color: var(--primary-strong);
  font-size: 12px;
  font-weight: 820;
  white-space: nowrap;
}

.refund-chart-grid {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
}

.refund-pie-wrap {
  display: grid;
  place-items: center;
  min-height: 220px;
}

.refund-pie {
  position: relative;
  width: 206px;
  height: 206px;
  border-radius: 50%;
  background: conic-gradient(var(--pie));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.65), 0 22px 46px rgba(31, 45, 71, 0.11);
}

.refund-pie::after {
  content: "";
  position: absolute;
  inset: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: inset 0 0 0 1px rgba(223, 233, 231, 0.9);
}

.refund-pie-center {
  position: absolute;
  inset: 56px;
  z-index: 1;
  display: grid;
  place-content: center;
  text-align: center;
}

.refund-pie-center strong {
  color: var(--text);
  font-size: 28px;
  line-height: 1;
  font-weight: 900;
}

.refund-pie-center span {
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
}

.refund-reason-rank {
  display: grid;
  gap: 8px;
}

.refund-reason-row {
  display: grid;
  grid-template-columns: 12px minmax(150px, 1.2fr) minmax(130px, 1fr) 74px 56px;
  gap: 10px;
  align-items: center;
  min-height: 34px;
  padding: 7px 9px;
  border: 1px solid var(--soft-line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
}

.legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.refund-reason-row strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reason-bar {
  height: 7px;
  border-radius: 999px;
  background: #edf3f2;
  overflow: hidden;
}

.reason-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.refund-reason-row span,
.refund-reason-row em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 760;
  text-align: right;
  white-space: nowrap;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--soft-line);
  border-radius: 15px;
  background: #fff;
}

table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  font-size: 13px;
  table-layout: fixed;
}

th, td {
  padding: 12px 13px;
  border-bottom: 1px solid var(--soft-line);
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fbfa;
  color: var(--label);
  font-weight: 800;
  user-select: none;
}

td { color: #263331; }
tr:hover td { background: #fbfdfd; }
tr.selected-row td { background: #eef9f6; }
tr.source-store-row { cursor: pointer; }

.th-label {
  display: inline-block;
  padding-right: 12px;
}

.col-resizer {
  position: absolute;
  top: 0;
  right: 0;
  width: 8px;
  height: 100%;
  cursor: col-resize;
  touch-action: none;
}

.col-resizer::after {
  content: "";
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 3px;
  width: 1px;
  background: transparent;
}

.col-resizer:hover::after,
.resizing-column .col-resizer::after {
  background: rgba(21, 146, 133, 0.45);
}

.resizing-column {
  cursor: col-resize;
  user-select: none;
}

.refund-product-image,
.refund-product-placeholder {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  border: 1px solid var(--soft-line);
  background: #f8fbfa;
}

.refund-product-image {
  display: block;
  object-fit: cover;
}

.refund-product-placeholder {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
}

.pagination span {
  margin-right: 4px;
  font-weight: 720;
}

.pagination button {
  min-height: 32px;
  padding: 0 11px;
  border-radius: 10px;
  font-size: 12px;
}

.store-select-checkbox {
  width: 15px;
  height: 15px;
  padding: 0;
  margin: 0;
  accent-color: var(--primary);
  vertical-align: middle;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.table-actions button {
  min-height: 30px;
  padding: 0 10px;
  border-radius: 9px;
  font-size: 12px;
}

.warning-list {
  display: grid;
  gap: 8px;
}

.warning-item {
  padding: 12px 13px;
  border: 1px solid var(--warning-line);
  border-radius: 12px;
  background: var(--warning-bg);
  color: var(--warning);
  font-size: 13px;
  line-height: 1.5;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(12, 24, 22, 0.28);
}

.modal-card {
  width: min(560px, 100%);
  display: grid;
  gap: 14px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(22, 45, 42, 0.24);
}

.source-diagnostics-modal {
  width: min(1120px, 100%);
  max-height: min(780px, calc(100vh - 48px));
  overflow: auto;
}

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

.source-dialog-tabs {
  margin-top: 4px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}

.modal-message {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.field-block {
  display: grid;
  gap: 8px;
  color: var(--label);
  font-size: 13px;
  font-weight: 700;
}

.choice-list {
  display: grid;
  gap: 8px;
  max-height: 220px;
  overflow: auto;
  padding: 10px;
  border: 1px solid var(--field-line);
  border-radius: 13px;
  background: var(--field);
}

.choice-row {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 8px 10px;
  align-items: center;
  padding: 8px;
  border-radius: 10px;
  background: #fff;
}

.choice-row.disabled {
  color: #a3a7b7;
  background: #f4f5f8;
  cursor: not-allowed;
}

.choice-row.disabled small {
  color: #a3a7b7;
}

.choice-row input {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: var(--primary);
}

.choice-row small {
  grid-column: 2;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.empty-state {
  padding: 28px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: #edf0f2;
  color: #4b535a;
  font-size: 12px;
  font-weight: 750;
}

.badge.good { background: #e7f5ec; color: #24663d; }
.badge.warn { background: #fff4dd; color: #7a520f; }
.badge.bad { background: #fdecec; color: #9b2f2f; }
.badge.info { background: #e8f6f3; color: var(--primary-strong); }

.alert {
  margin-bottom: 18px;
  padding: 13px 15px;
  border: 1px solid var(--warning-line);
  border-radius: 15px;
  background: var(--warning-bg);
  color: var(--warning);
  font-size: 13px;
  line-height: 1.6;
}

.alert.hidden, .hidden { display: none; }

.toast {
  position: fixed;
  right: 28px;
  bottom: 28px;
  max-width: 420px;
  padding: 14px 16px;
  border: 1px solid rgba(21, 146, 133, 0.22);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 45px rgba(22, 45, 42, 0.15);
  color: var(--text);
  font-size: 13px;
  line-height: 1.55;
}

.exception-list, .settings-grid {
  display: grid;
  gap: 12px;
}

.source-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(280px, 0.72fr);
  gap: 18px;
}

.source-side-panel {
  align-self: start;
}

.source-actions {
  margin-top: 0;
}

.source-detail-grid {
  display: grid;
  gap: 10px;
}

.source-metric {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--soft-line);
}

.source-metric span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 720;
}

.source-metric strong {
  min-width: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 850;
  text-align: right;
}

.source-mini-log {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.source-mini-log strong {
  font-size: 14px;
}

.settings-section {
  display: grid;
  gap: 12px;
}

.settings-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.settings-section-head h2 {
  margin: 0;
  font-size: 17px;
}

.settings-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.exception-card, .settings-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.exception-card strong, .settings-card strong {
  display: block;
  margin-bottom: 7px;
  font-size: 15px;
}

.exception-card p, .settings-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.inline-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  gap: 10px;
  align-items: end;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
}

.loading {
  position: relative;
  pointer-events: none;
  opacity: 0.72;
}

.loading::after {
  content: "处理中...";
  position: absolute;
  right: 18px;
  top: 18px;
  color: var(--primary-strong);
  font-size: 13px;
  font-weight: 800;
}

@media (max-width: 1100px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .security-note { position: static; margin-top: 18px; }
  .toolbar { grid-template-columns: 1fr 1fr; }
  .toolbar.payment-toolbar, .toolbar.source-toolbar, .toolbar.refund-toolbar, .inline-form, .source-layout { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Compact premium workspace refresh */
:root {
  --bg: #f4f3fb;
  --panel: rgba(255, 255, 255, 0.86);
  --panel-solid: #ffffff;
  --line: #e8e6f1;
  --soft-line: #f0eef7;
  --text: #171821;
  --muted: #777584;
  --label: #5b596a;
  --primary: #4f46e5;
  --primary-strong: #312e81;
  --active: #efedff;
  --danger: #b45355;
  --danger-bg: #fff6f5;
  --danger-line: #f0d9d8;
  --field: #fbfbff;
  --field-line: #deddeb;
  --warning: #8a5c14;
  --warning-bg: #fff8e8;
  --warning-line: #eddcb2;
  --shadow: 0 16px 46px rgba(28, 25, 84, 0.07);
  --button-shadow: 0 12px 22px rgba(79, 70, 229, 0.18);
}

body {
  background:
    radial-gradient(circle at 4% -12%, rgba(133, 117, 255, 0.18), transparent 32%),
    radial-gradient(circle at 96% 0%, rgba(45, 212, 191, 0.12), transparent 28%),
    linear-gradient(180deg, #fbfbff 0%, #f5f4fb 44%, #f1f2f8 100%);
  font-size: 12px;
}

button {
  min-height: 32px;
  padding: 0 12px;
  border-radius: 11px;
  font-size: 12px;
  font-weight: 760;
}

button:hover:not(:disabled) {
  box-shadow: 0 8px 18px rgba(28, 25, 84, 0.08);
}

button.primary {
  background: linear-gradient(135deg, #3f3a9f, #5b55ee);
}

input, select {
  height: 34px;
  padding: 0 10px;
  border-radius: 11px;
  font-size: 12px;
}

label {
  gap: 5px;
  font-size: 11px;
  font-weight: 760;
}

.app {
  display: block;
  min-height: 100vh;
  padding: 14px 18px 18px;
}

.sidebar {
  position: sticky;
  top: 10px;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  height: auto;
  min-height: 74px;
  padding: 12px 16px;
  border: 1px solid rgba(232, 230, 241, 0.84);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 18px 60px rgba(28, 25, 84, 0.08);
  backdrop-filter: blur(22px);
}

.brand {
  margin: 0;
  padding-right: 8px;
  border-right: 1px solid var(--soft-line);
}

.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  box-shadow: 0 12px 24px rgba(20, 18, 28, 0.18);
}

.brand strong {
  font-size: 17px;
  line-height: 1.1;
}

.brand span {
  font-size: 10px;
}

.sidebar .nav {
  width: auto;
  height: 34px;
  margin: 0 4px 0 0;
  padding: 0 11px;
  border-radius: 11px;
  text-align: center;
  font-size: 12px;
}

.nav.active {
  border-color: rgba(79, 70, 229, 0.12);
  background: var(--active);
  color: var(--primary-strong);
}

.security-note {
  position: static;
  flex: 1 1 220px;
  margin: 0;
  padding: 8px 10px;
  border-radius: 12px;
  background: #f5f4ff;
  color: #6b6880;
  font-size: 10px;
  line-height: 1.35;
}

.content {
  max-width: 1720px;
  margin: 0 auto;
  padding: 18px 4px 0;
}

.page-head {
  align-items: end;
  gap: 18px;
  margin-bottom: 12px;
}

.page-head h1 {
  margin-bottom: 5px;
  font-size: 25px;
  line-height: 1.15;
  letter-spacing: 0;
}

.page-head p {
  max-width: 920px;
  font-size: 12px;
  line-height: 1.5;
}

.toolbar {
  gap: 10px;
  margin-bottom: 12px;
  padding: 12px;
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.toolbar.dashboard-toolbar {
  grid-template-columns: 168px 168px auto auto;
  max-width: 620px;
}

.toolbar.payment-toolbar {
  grid-template-columns: minmax(150px, 190px) 150px 150px minmax(200px, 1fr) auto;
}

.toolbar.source-toolbar {
  grid-template-columns: minmax(180px, 1.2fr) 145px 145px 145px auto auto;
}

.toolbar.refund-toolbar {
  grid-template-columns: minmax(150px, 190px) 145px 145px minmax(160px, 1fr) minmax(136px, 0.7fr) 140px auto auto;
}

.panel, .empty-panel, .kpi-card, .settings-card, .exception-card {
  border-color: rgba(232, 230, 241, 0.94);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
}

.panel, .empty-panel {
  margin-bottom: 12px;
  padding: 14px;
  border-radius: 18px;
}

.panel-head {
  gap: 10px;
  margin-bottom: 10px;
}

.panel-head h2 {
  font-size: 14px;
  font-weight: 850;
}

.tabs, .filter-row {
  gap: 6px;
}

.tab, .chip {
  min-height: 28px;
  padding: 0 10px;
  font-size: 11px;
}

.filter-row {
  margin-bottom: 10px;
}

.kpi-grid {
  grid-template-columns: repeat(8, minmax(120px, 1fr));
  gap: 0;
  margin-bottom: 12px;
  border: 1px solid rgba(232, 230, 241, 0.94);
  border-radius: 18px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
}

.kpi-card {
  min-height: 82px;
  padding: 13px 14px;
  border: 0;
  border-right: 1px solid var(--soft-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.kpi-card:last-child {
  border-right: 0;
}

.kpi-card span {
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 780;
}

.kpi-card strong {
  font-size: 19px;
  line-height: 1.15;
  font-weight: 880;
}

.kpi-card small {
  margin-top: 6px;
  font-size: 10px;
  line-height: 1.3;
}

.dashboard-main-grid {
  display: block;
}

.dashboard-ranking-panel,
.dashboard-warnings-panel {
  min-height: 100%;
}

.dashboard-warnings-panel .warning-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  max-height: 340px;
  overflow: auto;
}

.table-wrap {
  border-radius: 13px;
}

table {
  font-size: 11px;
}

th, td {
  padding: 8px 10px;
}

th {
  background: #faf9ff;
  font-size: 10px;
  letter-spacing: 0;
}

.table-actions {
  gap: 5px;
}

.table-actions button {
  min-height: 26px;
  padding: 0 8px;
  border-radius: 8px;
  font-size: 10px;
}

.table-note {
  margin: 8px 2px 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.badge {
  min-height: 20px;
  padding: 0 7px;
  font-size: 10px;
}

.warning-list {
  gap: 7px;
}

.warning-item {
  padding: 9px 10px;
  border-radius: 11px;
  font-size: 11px;
  line-height: 1.45;
}

.alert {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 13px;
  font-size: 11px;
}

.toast {
  right: 22px;
  bottom: 22px;
  padding: 11px 13px;
  border-radius: 13px;
  font-size: 11px;
}

.source-layout {
  display: block;
  gap: 12px;
}

.source-side-panel {
  display: none;
}

.source-diagnostics-modal {
  width: min(1040px, calc(100vw - 42px));
}

.source-detail-grid,
.source-dialog-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px 16px;
}

.source-mini-log {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--soft-line);
}

.source-mini-log strong {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
}

.source-metric {
  padding: 8px 0;
}

.source-metric span {
  font-size: 11px;
}

.source-metric strong {
  font-size: 12px;
}

.hover-popover {
  position: relative;
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  outline: none;
}

.popover-card {
  position: absolute;
  z-index: 30;
  left: 0;
  bottom: calc(100% + 8px);
  display: none;
  min-width: 220px;
  max-width: 320px;
  padding: 10px 11px;
  border: 1px solid rgba(116, 104, 164, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 42px rgba(27, 20, 48, 0.14);
  color: #312f3b;
  font-size: 11px;
  line-height: 1.45;
  white-space: normal;
}

.hover-popover:hover .popover-card,
.hover-popover:focus-within .popover-card,
.hover-popover:focus .popover-card {
  display: grid;
  gap: 6px;
}

.popover-card strong:first-child {
  margin-bottom: 2px;
  font-size: 12px;
}

.popover-card span {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  border-top: 1px solid rgba(116, 104, 164, 0.08);
  padding-top: 5px;
}

.popover-card em {
  color: #716d80;
  font-style: normal;
  white-space: nowrap;
}

.popover-card span strong {
  text-align: right;
  font-size: 11px;
  font-weight: 720;
}

.settings-grid, .exception-list {
  gap: 10px;
}

.settings-card, .exception-card {
  padding: 12px;
  border-radius: 15px;
}

.settings-card strong, .exception-card strong {
  margin-bottom: 5px;
  font-size: 13px;
}

.settings-card p, .exception-card p {
  font-size: 11px;
  line-height: 1.45;
}

.settings-section {
  gap: 10px;
}

.settings-section-head h2 {
  font-size: 14px;
}

.settings-actions {
  gap: 6px;
  margin-top: 8px;
}

.modal-card {
  gap: 11px;
  padding: 17px;
  border-radius: 18px;
}

.source-diagnostics-modal {
  width: min(1180px, 100%);
}

.source-dialog-summary {
  gap: 8px;
}

.choice-list {
  gap: 6px;
  padding: 8px;
  border-radius: 12px;
}

.choice-row {
  gap: 6px 8px;
  padding: 7px;
  border-radius: 9px;
}

.refund-product-image,
.refund-product-placeholder {
  width: 38px;
  height: 38px;
  border-radius: 9px;
}

.pagination {
  gap: 6px;
  margin-top: 9px;
  font-size: 11px;
}

.pagination button {
  min-height: 28px;
  padding: 0 9px;
  font-size: 10px;
}

@media (max-width: 1280px) {
  .sidebar {
    align-items: start;
    overflow-x: auto;
  }

  .brand {
    border-right: 0;
  }

  .security-note {
    display: none;
  }

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

  .dashboard-main-grid,
  .source-layout {
    grid-template-columns: 1fr;
  }

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

  .refund-chart-grid {
    grid-template-columns: 1fr;
  }

  .refund-pie-wrap {
    min-height: 190px;
  }

  .refund-reason-row {
    grid-template-columns: 12px minmax(120px, 1fr) minmax(100px, 0.8fr) 66px 50px;
  }
}

/* SaaS operations redesign */
:root {
  --bg: #f5f7fb;
  --panel: #ffffff;
  --panel-solid: #ffffff;
  --line: #e6eaf2;
  --soft-line: #eef2f7;
  --text: #172033;
  --muted: #758197;
  --label: #536078;
  --primary: #2f6bff;
  --primary-strong: #1746b8;
  --active: #edf4ff;
  --danger: #c2414b;
  --danger-bg: #fff1f2;
  --danger-line: #ffd7dc;
  --field: #ffffff;
  --field-line: #dce3ee;
  --warning: #9a6200;
  --warning-bg: #fff7e6;
  --warning-line: #f4d28c;
  --success: #17845f;
  --success-bg: #eaf8f1;
  --shadow: 0 1px 2px rgba(20, 28, 45, 0.04), 0 10px 28px rgba(20, 28, 45, 0.05);
  --button-shadow: none;
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 12px;
}

html,
body {
  background: var(--bg);
}

body {
  min-width: 1180px;
  background:
    linear-gradient(180deg, rgba(237, 244, 255, 0.72) 0, rgba(245, 247, 251, 0) 220px),
    var(--bg);
  color: var(--text);
  font-size: 12px;
}

button {
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid #d8e0ec;
  border-radius: var(--radius-sm);
  background: #fff;
  color: #26324a;
  font-size: 12px;
  font-weight: 700;
  box-shadow: none;
  transform: none;
}

button:hover:not(:disabled) {
  border-color: #b8c6dc;
  background: #f8fbff;
  box-shadow: none;
  transform: none;
}

button.primary {
  border-color: #265be8;
  background: #2f6bff;
  color: #fff;
  box-shadow: none;
}

button.primary:hover:not(:disabled) {
  border-color: #1f50d6;
  background: #255deb;
}

input,
select {
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--field-line);
  border-radius: var(--radius-sm);
  background: var(--field);
  color: var(--text);
  font-size: 12px;
}

input:focus,
select:focus {
  border-color: rgba(47, 107, 255, 0.58);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(47, 107, 255, 0.11);
}

label {
  gap: 5px;
  color: var(--label);
  font-size: 11px;
  font-weight: 720;
}

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

.sidebar {
  position: sticky;
  top: 0;
  z-index: 12;
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0;
  width: 238px;
  height: 100vh;
  min-height: 0;
  padding: 16px 12px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: none;
  backdrop-filter: blur(16px);
}

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

.brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  box-shadow: 0 8px 18px rgba(20, 28, 45, 0.13);
}

.brand strong {
  color: #111827;
  font-size: 17px;
  line-height: 1.1;
  font-weight: 860;
}

.brand span {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.02em;
}

.nav-groups {
  display: grid;
  gap: 14px;
  min-height: 0;
  overflow: auto;
  padding-right: 2px;
}

.nav-group {
  display: grid;
  gap: 4px;
}

.nav-group-title {
  padding: 0 10px 4px;
  color: #9aa4b6;
  font-size: 10px;
  font-weight: 820;
  letter-spacing: 0.08em;
}

.sidebar .nav {
  position: relative;
  width: 100%;
  height: 32px;
  margin: 0;
  padding: 0 10px 0 30px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: #5d687d;
  text-align: left;
  font-size: 12px;
  font-weight: 720;
}

.sidebar .nav::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: #c6cfdd;
  transform: translateY(-50%);
}

.sidebar .nav:hover:not(:disabled) {
  border-color: #e2e8f3;
  background: #f7faff;
}

.sidebar .nav.active {
  border-color: #d8e6ff;
  background: var(--active);
  color: var(--primary-strong);
  font-weight: 820;
}

.sidebar .nav.active::before {
  background: var(--primary);
}

.security-note {
  position: static;
  margin: auto 0 0;
  padding: 10px;
  border: 1px solid #e6ecf5;
  border-radius: var(--radius-md);
  background: #f8fafc;
  color: #7a8497;
  font-size: 10px;
  line-height: 1.45;
}

.content {
  min-width: 0;
  max-width: none;
  margin: 0;
  padding: 0 24px 24px;
}

.workspace-topbar {
  position: sticky;
  top: 0;
  z-index: 11;
  display: grid;
  grid-template-columns: minmax(300px, 1fr) auto auto auto;
  gap: 12px;
  align-items: center;
  min-height: 58px;
  margin: 0 -24px 18px;
  padding: 10px 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px);
}

.workspace-search {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  max-width: 520px;
  height: 34px;
  border: 1px solid var(--field-line);
  border-radius: var(--radius-md);
  background: #fff;
}

.workspace-search span {
  color: #9aa4b6;
  font-size: 11px;
  font-weight: 850;
  text-align: center;
}

.workspace-search input {
  height: 30px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.workspace-meta {
  display: grid;
  gap: 2px;
  padding: 0 12px;
  border-left: 1px solid var(--soft-line);
}

.workspace-meta span,
.workspace-user strong {
  color: var(--muted);
  font-size: 10px;
  font-weight: 720;
}

.workspace-meta strong {
  color: #26324a;
  font-size: 12px;
  font-weight: 800;
}

.workspace-user {
  display: grid;
  grid-template-columns: 28px auto;
  gap: 8px;
  align-items: center;
  padding: 3px 9px 3px 3px;
  border: 1px solid #e2e8f3;
  border-radius: 999px;
  background: #fff;
}

.workspace-user span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #1f2937;
  color: #fff;
  font-size: 11px;
  font-weight: 850;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.page-head {
  align-items: end;
  gap: 16px;
  margin-bottom: 12px;
}

.page-head h1 {
  margin: 0 0 4px;
  color: #111827;
  font-size: 23px;
  line-height: 1.16;
  font-weight: 860;
}

.page-head p {
  max-width: 980px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.toolbar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  align-items: end;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.toolbar.single {
  grid-template-columns: minmax(280px, 520px) auto;
  justify-content: start;
}

.toolbar.dashboard-toolbar,
.toolbar.payment-toolbar,
.toolbar.source-toolbar,
.toolbar.refund-toolbar {
  max-width: none;
  grid-template-columns: repeat(auto-fit, minmax(145px, max-content));
}

.toolbar label {
  min-width: 145px;
}

.toolbar #global-search,
.toolbar #payment-order-filter,
.toolbar #source-store-search,
.toolbar #refund-order-filter {
  min-width: 220px;
}

.panel,
.empty-panel,
.settings-card,
.exception-card {
  margin-bottom: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.panel-head {
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.panel-head h2,
.settings-section-head h2 {
  color: #172033;
  font-size: 14px;
  font-weight: 830;
}

.tabs,
.filter-row {
  gap: 6px;
}

.tab,
.chip {
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  color: #69758a;
  font-size: 11px;
  font-weight: 760;
}

.tab.active,
.chip.active {
  border-color: #cfe0ff;
  background: var(--active);
  color: var(--primary-strong);
}

.filter-row {
  margin-bottom: 10px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.kpi-card {
  min-height: 76px;
  padding: 12px 13px;
  border: 0;
  border-right: 1px solid var(--soft-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.kpi-card:last-child {
  border-right: 0;
}

.kpi-card span {
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 780;
}

.kpi-card strong {
  color: #111827;
  font-size: 18px;
  line-height: 1.1;
  font-weight: 880;
}

.kpi-card small {
  margin-top: 6px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.3;
}

.positive strong {
  color: var(--success);
}

.negative strong {
  color: var(--danger);
}

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

.trend-card {
  padding: 12px;
  border-color: var(--soft-line);
  border-radius: var(--radius-md);
  background: #fff;
}

.trend-card-head strong {
  font-size: 12px;
}

.trend-card-head span {
  font-size: 17px;
}

.trend-svg {
  height: 156px;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
}

table {
  width: 100%;
  min-width: 1040px;
  border-collapse: separate;
  border-spacing: 0;
  color: #253044;
  font-size: 11px;
  table-layout: fixed;
}

th,
td {
  height: 36px;
  padding: 7px 10px;
  border-bottom: 1px solid var(--soft-line);
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f8fafc;
  color: #667085;
  font-size: 10px;
  font-weight: 820;
  user-select: none;
}

td {
  color: #293548;
  background: #fff;
}

tbody tr:hover td {
  background: #f7fbff;
}

tr.selected-row td {
  background: #eef5ff;
}

.table-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 5px;
}

.table-actions button {
  min-height: 24px;
  padding: 0 7px;
  border-radius: 7px;
  font-size: 10px;
}

.badge {
  min-height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  background: #eef2f7;
  color: #556174;
  font-size: 10px;
  font-weight: 760;
}

.badge.good {
  background: var(--success-bg);
  color: #147350;
}

.badge.warn {
  background: var(--warning-bg);
  color: var(--warning);
}

.badge.bad {
  background: var(--danger-bg);
  color: var(--danger);
}

.badge.info {
  background: var(--active);
  color: var(--primary-strong);
}

.alert {
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid var(--warning-line);
  border-radius: var(--radius-md);
  background: var(--warning-bg);
  color: var(--warning);
  font-size: 11px;
  line-height: 1.5;
}

.warning-item {
  padding: 9px 10px;
  border-radius: var(--radius-md);
  font-size: 11px;
}

.settings-grid,
.exception-list {
  gap: 10px;
}

.settings-section {
  gap: 10px;
}

.settings-section-head {
  padding: 12px 14px 0;
}

.settings-section > .alert,
.settings-section > .table-wrap,
.settings-section > .settings-card {
  margin-left: 0;
  margin-right: 0;
}

.settings-card,
.exception-card {
  padding: 13px;
}

.settings-card strong,
.exception-card strong {
  margin-bottom: 5px;
  font-size: 13px;
}

.settings-card p,
.exception-card p {
  font-size: 11px;
  line-height: 1.45;
}

.settings-actions {
  gap: 6px;
  margin-top: 0;
}

.modal-backdrop {
  z-index: 30;
  background: rgba(15, 23, 42, 0.34);
}

.modal-card {
  gap: 11px;
  padding: 16px;
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.2);
}

.source-diagnostics-modal {
  width: min(1180px, calc(100vw - 42px));
}

.source-dialog-summary,
.source-detail-grid {
  grid-template-columns: repeat(auto-fit, minmax(156px, 1fr));
  gap: 8px 14px;
}

.source-metric {
  padding: 8px 0;
}

.source-metric span {
  font-size: 11px;
}

.source-metric strong {
  font-size: 12px;
}

.refund-product-image,
.refund-product-placeholder {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
}

.refund-chart-grid {
  grid-template-columns: 230px minmax(0, 1fr);
}

.refund-pie {
  width: 184px;
  height: 184px;
}

.refund-pie::after {
  inset: 38px;
}

.refund-pie-center {
  inset: 50px;
}

.refund-reason-row {
  min-height: 30px;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
}

.pagination {
  gap: 6px;
  margin-top: 9px;
  font-size: 11px;
}

.toast {
  right: 22px;
  bottom: 22px;
  border-radius: var(--radius-md);
  font-size: 11px;
}

.empty-state {
  padding: 24px;
  font-size: 12px;
}

.store-select-checkbox {
  width: 14px;
  height: 14px;
}

@media (max-width: 1280px) {
  body {
    min-width: 0;
  }

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

  .sidebar {
    position: static;
    width: auto;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .nav-groups {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .security-note {
    display: none;
  }

  .workspace-topbar {
    grid-template-columns: 1fr;
  }

  .workspace-meta,
  .workspace-user {
    display: none;
  }

  .content {
    padding: 0 14px 18px;
  }

  .workspace-topbar {
    margin: 0 -14px 14px;
    padding: 10px 14px;
  }

  .trend-grid,
  .refund-chart-grid {
    grid-template-columns: 1fr;
  }
}
