:root {
  color-scheme: light;
  --bg: #f5f7fa;
  --surface: #ffffff;
  --surface-soft: #fafafa;
  --surface-strong: #f5f5f5;
  --ink: #1f1f1f;
  --ink-soft: #595959;
  --muted: #8c8c8c;
  --muted-2: #bfbfbf;
  --line: #f0f0f0;
  --line-strong: #d9d9d9;
  --brand: #1677ff;
  --brand-dark: #0958d9;
  --brand-soft: #e6f4ff;
  --accent: #fa8c16;
  --accent-soft: #fff7e6;
  --blue: #1677ff;
  --blue-soft: #e6f4ff;
  --red: #ff4d4f;
  --red-soft: #fff2f0;
  --amber: #d48806;
  --amber-soft: #fffbe6;
  --green: #389e0d;
  --green-soft: #f6ffed;
  --purple: #722ed1;
  --purple-soft: #f9f0ff;
  --sidebar: 248px;
  --sidebar-collapsed: 84px;
  --topbar: 72px;
  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 6px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 9px 28px rgba(0, 0, 0, 0.12);
  --font:
    Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--font);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

svg {
  display: block;
  width: 100%;
  height: 100%;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app-frame {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  display: flex;
  width: var(--sidebar);
  flex-direction: column;
  overflow: hidden;
  color: var(--ink-soft);
  background: #ffffff;
  transition: width 180ms ease, transform 220ms ease;
}

.brand {
  display: flex;
  min-height: var(--topbar);
  align-items: center;
  gap: 11px;
  padding: 0 21px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  color: #fff;
  background: var(--brand);
  border-radius: 12px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}

.brand-mark .brand-letter {
  display: block;
  font-size: 23px;
  font-weight: 850;
  letter-spacing: -0.08em;
  line-height: 1;
}

.brand-copy {
  display: grid;
  min-width: 0;
  line-height: 1.1;
}

.brand-copy strong {
  color: var(--ink);
  font-size: 17px;
  letter-spacing: -0.02em;
}

.brand-copy small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 750;
  letter-spacing: 0.14em;
}

.nav-groups {
  flex: 1;
  padding: 24px 12px;
}

.nav-group + .nav-group {
  margin-top: 28px;
}

.nav-label {
  margin: 0 0 8px;
  padding: 0 12px;
  color: #7f9b8f;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.08em;
}

.nav-item {
  position: relative;
  display: grid;
  width: 100%;
  min-height: 44px;
  grid-template-columns: 21px 1fr auto;
  align-items: center;
  gap: 11px;
  padding: 0 12px;
  color: var(--ink-soft);
  background: transparent;
  border: 0;
  border-radius: 11px;
  cursor: pointer;
  text-align: left;
  transition: color 150ms ease, background 150ms ease, transform 150ms ease;
}

.nav-item:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
}

.nav-item.active {
  color: var(--brand);
  background: var(--brand-soft);
  box-shadow: inset 3px 0 0 var(--brand);
}

.nav-item.active::after {
  display: none;
}

.nav-item [data-icon] {
  width: 19px;
  height: 19px;
}

.nav-count {
  min-width: 38px;
  padding: 3px 7px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.07);
  border-radius: 999px;
  font-size: 10px;
  text-align: center;
}

.sidebar-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 12px 18px;
}

.demo-card {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  gap: 9px;
  padding: 11px;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
}

.demo-card div {
  min-width: 0;
}

.demo-card strong {
  color: var(--ink);
  font-size: 11px;
}

.demo-card p {
  max-width: 120px;
  margin: 3px 0 0;
  color: #7f9b8f;
  font-size: 9px;
  line-height: 1.45;
}

.demo-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  margin-top: 3px;
  background: var(--brand);
  border-radius: 50%;
  box-shadow: none;
}

.sidebar-toggle {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  color: #8fa99c;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 9px;
  cursor: pointer;
}

.sidebar-toggle [data-icon] {
  width: 17px;
  height: 17px;
}

.workspace {
  min-height: 100vh;
  margin-left: var(--sidebar);
  transition: margin-left 180ms ease;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  height: var(--topbar);
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 28px;
  background: rgba(255, 254, 250, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.topbar-left,
.topbar-actions,
.breadcrumb,
.search-trigger,
.top-link,
.account-button {
  display: flex;
  align-items: center;
}

.topbar-left {
  min-width: 0;
  gap: 12px;
}

.breadcrumb {
  gap: 8px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
}

.breadcrumb [data-icon] {
  width: 13px;
  height: 13px;
}

.breadcrumb strong {
  overflow: hidden;
  color: var(--ink-soft);
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-actions {
  gap: 8px;
}

.search-trigger {
  height: 38px;
  gap: 8px;
  padding: 0 9px 0 12px;
  color: var(--muted);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 11px;
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease;
}

.search-trigger:hover {
  color: var(--ink-soft);
  background: #fff;
  border-color: var(--line-strong);
}

.search-trigger [data-icon] {
  width: 16px;
  height: 16px;
}

.search-trigger kbd {
  padding: 3px 6px;
  color: var(--muted-2);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
  font: 10px var(--font);
}

.top-link {
  height: 38px;
  gap: 5px;
  padding: 0 10px;
  color: var(--brand);
  border-radius: 10px;
  font-size: 12px;
  font-weight: 650;
}

.top-link:hover {
  background: var(--brand-soft);
}

.top-link [data-icon] {
  width: 15px;
  height: 15px;
}

.icon-button {
  position: relative;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: var(--ink-soft);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
}

.icon-button:hover {
  background: var(--surface-strong);
}

.icon-button [data-icon] {
  width: 18px;
  height: 18px;
}

.notification-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border: 1.5px solid #fff;
  border-radius: 50%;
}

.account-wrap {
  position: relative;
}

.account-button {
  height: 42px;
  gap: 8px;
  padding: 3px 8px 3px 4px;
  background: transparent;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
}

.account-button:hover,
.account-button[aria-expanded="true"] {
  background: var(--surface-strong);
}

.account-button > [data-icon] {
  width: 14px;
  height: 14px;
  color: var(--muted);
}

.avatar {
  display: grid;
  width: 33px;
  height: 33px;
  place-items: center;
  color: #fff;
  background: var(--brand);
  border-radius: 10px;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.04em;
}

.avatar.large {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  font-size: 11px;
}

.account-name {
  font-size: 12px;
  font-weight: 600;
}

.account-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 236px;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-md);
}

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

.account-summary div {
  display: grid;
  gap: 3px;
}

.account-summary small {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.4;
}

.account-summary strong {
  font-size: 12px;
}

.account-menu button {
  display: flex;
  width: 100%;
  height: 38px;
  align-items: center;
  gap: 9px;
  padding: 0 10px;
  background: transparent;
  border: 0;
  border-radius: 9px;
  cursor: pointer;
  text-align: left;
}

.account-menu button:hover {
  background: var(--surface-strong);
}

.account-menu button [data-icon] {
  width: 16px;
  height: 16px;
  color: var(--muted);
}

.main-content {
  width: 100%;
  max-width: 1520px;
  margin: 0 auto;
  padding: 28px;
  outline: none;
}

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 7px;
  color: var(--brand);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 18px;
  height: 2px;
  content: "";
  background: currentColor;
  border-radius: 999px;
}

.page-head h1 {
  margin: 0;
  font-size: clamp(25px, 2.2vw, 34px);
  font-weight: 720;
  letter-spacing: -0.045em;
}

.page-head p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.page-actions,
.toolbar-actions,
.inline-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.button {
  display: inline-flex;
  min-height: 39px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 13px;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  font-size: 12px;
  font-weight: 620;
  white-space: nowrap;
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease;
}

.button:hover {
  background: var(--surface-soft);
  border-color: var(--line-strong);
}

.button:active {
  transform: translateY(1px);
}

.button [data-icon] {
  width: 15px;
  height: 15px;
}

.button.primary {
  color: #fff;
  background: var(--brand);
  border-color: var(--brand);
  box-shadow: 0 2px 0 rgba(5, 145, 255, 0.1);
}

.button.primary:hover {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
}

.button.ghost {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.button.ghost:hover {
  background: var(--surface-strong);
}

.button.danger {
  color: var(--red);
}

.select-wrap {
  position: relative;
}

.select-wrap select {
  height: 39px;
  padding: 0 34px 0 12px;
  color: var(--ink-soft);
  appearance: none;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  cursor: pointer;
  font-size: 12px;
}

.select-wrap::after {
  position: absolute;
  top: 50%;
  right: 12px;
  width: 7px;
  height: 7px;
  content: "";
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  pointer-events: none;
  transform: translateY(-70%) rotate(45deg);
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.metric-card {
  position: relative;
  min-height: 137px;
  overflow: hidden;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.metric-card::after {
  display: none;
}

.metric-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
  font-weight: 620;
}

.metric-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  color: var(--metric-color, var(--brand));
  background: var(--metric-bg, var(--brand-soft));
  border-radius: 9px;
}

.metric-icon [data-icon] {
  width: 16px;
  height: 16px;
}

.metric-value {
  display: block;
  margin-top: 15px;
  font-size: clamp(23px, 2.3vw, 31px);
  font-weight: 720;
  letter-spacing: -0.045em;
}

.metric-foot {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 9px;
  color: var(--muted);
  font-size: 10px;
}

.delta {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--green);
  font-weight: 700;
}

.delta.down {
  color: var(--red);
}

.delta [data-icon] {
  width: 12px;
  height: 12px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.85fr) minmax(280px, 0.75fr);
  gap: 16px;
  margin-bottom: 16px;
}

.panel {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 19px 20px 15px;
}

.panel-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.panel-subtitle {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.panel-body {
  padding: 0 20px 20px;
}

.segmented {
  display: inline-flex;
  padding: 3px;
  background: var(--surface-strong);
  border-radius: 9px;
}

.segmented button {
  min-height: 30px;
  padding: 0 10px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 7px;
  cursor: pointer;
  font-size: 10px;
  font-weight: 650;
}

.segmented button.active {
  color: var(--ink);
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.chart-summary {
  margin: 5px 0 0;
}

.chart-summary small {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 10px;
}

.chart-summary strong {
  font-size: 27px;
  font-weight: 720;
  letter-spacing: -0.045em;
}

.trend-chart {
  position: relative;
  min-height: 300px;
  margin-top: 12px;
}

.trend-chart svg {
  width: 100%;
  height: 300px;
  overflow: visible;
}

.chart-grid-line {
  stroke: var(--line);
  stroke-width: 1;
}

.chart-axis-text {
  fill: #8a9994;
  font: 9px var(--font);
}

.chart-line {
  fill: none;
  stroke: var(--brand);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.chart-line-secondary {
  fill: none;
  stroke: var(--accent);
  stroke-dasharray: 6 5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.3;
}

.chart-area {
  fill: url(#chartArea);
}

.chart-point {
  fill: #fff;
  stroke: var(--brand);
  stroke-width: 2;
}

.chart-tooltip {
  opacity: 0;
  pointer-events: none;
  transition: opacity 100ms ease;
}

.chart-point-group:hover .chart-tooltip,
.chart-point-group:focus .chart-tooltip {
  opacity: 1;
}

.chart-tooltip rect {
  fill: rgba(0, 0, 0, 0.85);
}

.chart-tooltip text {
  fill: #fff;
  font: 9px var(--font);
}

.chart-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 14px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 10px;
}

.chart-legend {
  display: flex;
  align-items: center;
  gap: 13px;
}

.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.legend-dot {
  width: 7px;
  height: 7px;
  background: var(--brand);
  border-radius: 50%;
}

.legend-dot.orange {
  background: var(--accent);
}

.share-panel {
  display: flex;
  flex-direction: column;
}

.share-panel .panel-body {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.donut-wrap {
  position: relative;
  display: grid;
  width: 168px;
  height: 168px;
  margin: 7px auto 20px;
  place-items: center;
}

.donut-wrap svg {
  transform: rotate(-90deg);
}

.donut-track,
.donut-segment {
  fill: none;
  stroke-width: 17;
}

.donut-track {
  stroke: var(--surface-strong);
}

.donut-segment {
  stroke-linecap: round;
}

.donut-center {
  position: absolute;
  display: grid;
  text-align: center;
}

.donut-center strong {
  font-size: 20px;
  letter-spacing: -0.04em;
}

.donut-center small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.share-list {
  display: grid;
  gap: 11px;
}

.share-item {
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
}

.share-color {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.share-name {
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.share-value {
  color: var(--muted);
  font-size: 10px;
}

.table-panel {
  overflow: hidden;
}

.table-panel .panel-head {
  align-items: center;
  padding-bottom: 13px;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(240px, 1.5fr) repeat(3, minmax(140px, 0.7fr));
  gap: 12px;
  padding: 16px 20px;
  background: var(--surface-soft);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.filter-field {
  display: grid;
  gap: 7px;
}

.filter-field label {
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 650;
}

.input-shell {
  position: relative;
  width: 100%;
}

.input-shell > [data-icon] {
  position: absolute;
  top: 50%;
  left: 11px;
  width: 15px;
  height: 15px;
  color: var(--muted);
  pointer-events: none;
  transform: translateY(-50%);
}

.text-input {
  width: 100%;
  height: 39px;
  padding: 0 12px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.input-shell .text-input {
  padding-left: 34px;
}

.text-input::placeholder {
  color: var(--muted-2);
}

.text-input:focus,
.select-wrap select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(5, 145, 255, 0.1);
}

.filter-field .select-wrap,
.filter-field select {
  width: 100%;
}

.table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
}

.data-table th {
  padding: 11px 18px;
  color: var(--muted);
  background: var(--surface-soft);
  border-bottom: 1px solid var(--line);
  font-size: 10px;
  font-weight: 650;
  text-align: left;
}

.data-table th.sortable {
  cursor: pointer;
}

.sort-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.sort-label [data-icon] {
  width: 12px;
  height: 12px;
  color: var(--muted-2);
}

.data-table td {
  height: 62px;
  padding: 10px 18px;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}

.data-table tbody tr {
  transition: background 120ms ease;
}

.data-table tbody tr:hover {
  background: var(--surface-soft);
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.data-table .id-cell {
  color: var(--ink);
  font-weight: 700;
}

.order-id-cell {
  display: flex;
  align-items: center;
  gap: 7px;
}

.test-data-tag {
  padding: 3px 6px;
  color: var(--amber);
  background: var(--amber-soft);
  border-radius: 999px;
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.merchant-cell {
  display: grid;
  gap: 3px;
}

.merchant-cell strong {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 650;
}

.merchant-cell small {
  color: var(--muted);
  font-size: 9px;
  font-family: "SFMono-Regular", Consolas, monospace;
}

.amount-cell {
  color: var(--ink) !important;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 650;
}

.status-pill::before {
  width: 6px;
  height: 6px;
  content: "";
  background: currentColor;
  border-radius: 50%;
}

.status-paid,
.status-open {
  color: var(--green);
  background: var(--green-soft);
}

.status-review {
  color: var(--amber);
  background: var(--amber-soft);
}

.status-failed,
.status-disabled {
  color: var(--red);
  background: var(--red-soft);
}

.status-pending,
.status-closed {
  color: var(--blue);
  background: var(--blue-soft);
}

.platform-metrics {
  margin-bottom: 18px;
}

.platform-filter-bar {
  grid-template-columns: minmax(260px, 1.4fr) minmax(180px, 0.6fr);
}

.platform-table {
  min-width: 960px;
}

.platform-merchant-total {
  color: var(--muted);
  font-size: 10px;
}

.platform-account-cell {
  display: flex;
  align-items: center;
  gap: 11px;
}

.platform-account-cell > div {
  display: grid;
  gap: 3px;
}

.platform-account-cell strong {
  color: var(--ink);
  font-size: 12px;
}

.platform-account-cell small {
  color: var(--muted);
  font: 9px "SFMono-Regular", Consolas, monospace;
}

.platform-account-mark {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  color: var(--brand-dark);
  background: var(--brand-soft);
  border: 1px solid #bae0ff;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 760;
}

.platform-notes {
  display: block;
  max-width: 220px;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
}

.platform-counts {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.platform-counts strong {
  color: var(--ink-soft);
  font-size: 12px;
}

.platform-loading {
  display: flex;
  min-height: 180px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: var(--muted);
}

.table-action {
  padding: 5px 0;
  color: var(--brand);
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 11px;
  font-weight: 650;
}

.table-action:hover {
  color: var(--brand-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.table-actions {
  display: flex;
  align-items: center;
  gap: 13px;
}

.table-actions button.danger {
  color: var(--red);
}

.panel-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.group-link {
  padding: 0;
  color: var(--blue);
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
}

.soft-tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  color: var(--ink-soft);
  background: var(--surface-strong);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 650;
}

.credential-state {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--green);
  font-size: 10px;
  font-weight: 650;
}

.credential-state [data-icon] {
  width: 14px;
  height: 14px;
}

.amount-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.amount-tags span {
  padding: 4px 7px;
  color: var(--ink-soft);
  background: var(--surface-strong);
  border-radius: 6px;
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}

.secondary-text {
  color: var(--muted);
}

.switch {
  position: relative;
  display: inline-flex;
  width: 36px;
  height: 21px;
  background: rgba(0, 0, 0, 0.25);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: background 150ms ease;
}

.switch::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 15px;
  height: 15px;
  content: "";
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: transform 150ms ease;
}

.switch.on {
  background: var(--brand);
}

.switch.on::after {
  transform: translateX(15px);
}

.checkbox {
  width: 16px;
  height: 16px;
  accent-color: var(--brand);
}

.table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  background: #fff;
  border-top: 1px solid var(--line);
}

.table-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

.pagination {
  display: flex;
  align-items: center;
  gap: 5px;
}

.page-button {
  display: grid;
  min-width: 30px;
  height: 30px;
  place-items: center;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  font-size: 10px;
}

.page-button:hover:not(:disabled),
.page-button.active {
  color: var(--brand);
  border-color: var(--brand);
}

.page-button.active {
  background: var(--brand-soft);
  font-weight: 700;
}

.page-button:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}

.page-button [data-icon] {
  width: 13px;
  height: 13px;
}

.empty-state {
  display: grid;
  min-height: 250px;
  place-items: center;
  padding: 30px;
  text-align: center;
}

.empty-state div {
  max-width: 320px;
}

.empty-icon {
  display: grid;
  width: 54px;
  height: 54px;
  margin: 0 auto 13px;
  place-items: center;
  color: var(--muted);
  background: var(--surface-strong);
  border-radius: 16px;
}

.empty-icon [data-icon] {
  width: 24px;
  height: 24px;
}

.empty-state strong {
  display: block;
  font-size: 14px;
}

.empty-state p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(2px);
}

.detail-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 61;
  width: min(610px, 94vw);
  overflow-y: auto;
  background: #fff;
  box-shadow: var(--shadow-lg);
  transform: translateX(102%);
  transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.detail-drawer.open {
  transform: translateX(0);
}

.drawer-inner {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}

.drawer-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 700;
}

.drawer-title [data-icon] {
  width: 19px;
  height: 19px;
  color: var(--brand);
}

.drawer-close {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 9px;
  cursor: pointer;
}

.drawer-close [data-icon] {
  width: 16px;
  height: 16px;
}

.drawer-body {
  flex: 1;
  padding: 24px 22px;
}

.drawer-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.drawer-hero h2 {
  margin: 0;
  font-size: 31px;
  letter-spacing: -0.05em;
}

.drawer-hero p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.detail-grid {
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 13px;
}

.detail-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  min-height: 45px;
  border-bottom: 1px solid var(--line);
}

.detail-row:last-child {
  border-bottom: 0;
}

.detail-row dt,
.detail-row dd {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 10px 13px;
  font-size: 11px;
}

.detail-row dt {
  color: var(--muted);
  background: var(--surface-soft);
  border-right: 1px solid var(--line);
}

.detail-row dd {
  overflow-wrap: anywhere;
  color: var(--ink-soft);
  background: #fff;
}

.detail-block {
  margin-top: 20px;
}

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

.detail-block-head h3 {
  margin: 0;
  color: var(--ink-soft);
  font-size: 11px;
}

.copy-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  color: var(--brand);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 7px;
  cursor: pointer;
  font-size: 9px;
}

.copy-button [data-icon] {
  width: 12px;
  height: 12px;
}

.reference-value {
  margin: 0;
  padding: 10px 12px;
  overflow-wrap: anywhere;
  color: var(--ink-soft);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 9px;
  font: 10px/1.55 "SFMono-Regular", Consolas, monospace;
}

.drawer-foot {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  padding: 16px 22px;
  background: #fff;
  border-top: 1px solid var(--line);
}

.command-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: start center;
  padding: min(16vh, 130px) 18px 30px;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(3px);
}

.command-palette {
  width: min(620px, 100%);
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 17px;
  box-shadow: var(--shadow-lg);
}

.command-search {
  display: grid;
  grid-template-columns: 21px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.command-search > [data-icon] {
  width: 19px;
  height: 19px;
  color: var(--muted);
}

.command-search input {
  height: 30px;
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 14px;
}

.command-search kbd {
  padding: 4px 7px;
  color: var(--muted);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  font: 9px var(--font);
}

.command-results {
  max-height: 390px;
  overflow-y: auto;
  padding: 8px;
}

.command-group-label {
  padding: 8px 10px 6px;
  color: var(--muted-2);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.command-item {
  display: grid;
  width: 100%;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 9px 10px;
  background: transparent;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
}

.command-item:hover,
.command-item.selected {
  background: var(--surface-strong);
}

.command-item-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: var(--brand);
  background: var(--brand-soft);
  border-radius: 9px;
}

.command-item-icon [data-icon] {
  width: 17px;
  height: 17px;
}

.command-item-copy {
  display: grid;
  gap: 3px;
}

.command-item-copy strong {
  font-size: 11px;
}

.command-item-copy small {
  color: var(--muted);
  font-size: 9px;
}

.command-item > small {
  color: var(--muted);
  font-size: 9px;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 100;
  max-width: min(360px, calc(100vw - 44px));
  padding: 11px 14px;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 11px;
  box-shadow: var(--shadow-md);
  font-size: 11px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.button-spinner {
  width: 13px;
  height: 13px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 650ms linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.filter-bar-three {
  grid-template-columns: minmax(260px, 1.4fr) repeat(2, minmax(160px, 0.7fr));
}

.advanced-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 12px;
  padding: 14px 20px 16px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.advanced-filters[hidden] {
  display: none;
}

.advanced-filters .text-input {
  height: 39px;
}

.public-link-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 16px;
  padding: 19px 21px;
  background: var(--surface);
}

.public-link-card > div:first-child {
  min-width: 0;
}

.public-link-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.public-link-title strong {
  font-size: 13px;
}

.public-link-card p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.inline-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  overflow-y: auto;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
}

.modal-card {
  width: min(700px, 100%);
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
}

.modal-card-small {
  width: min(500px, 100%);
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 21px 22px 18px;
  border-bottom: 1px solid var(--line);
}

.modal-head h2 {
  margin: 4px 0 0;
  font-size: 21px;
  letter-spacing: -0.035em;
}

.modal-kicker {
  color: var(--brand);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.modal-body {
  padding: 22px;
}

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

.form-grid.compact {
  gap: 0 10px;
}

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

.form-field-wide {
  grid-column: 1 / -1;
}

.form-field small {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.form-field .select-wrap,
.form-field select {
  width: 100%;
}

.modal-hint {
  margin-top: 2px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.credential-modal {
  width: min(620px, 100%);
}

.credential-notice {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 11px 12px;
  color: var(--brand-dark);
  background: var(--brand-soft);
  border: 1px solid #bae0ff;
  border-radius: 10px;
  font-size: 10px;
  line-height: 1.6;
}

.credential-notice [data-icon] {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  margin-top: 1px;
}

.credential-list {
  display: grid;
  gap: 9px;
  margin-top: 14px;
}

.credential-row {
  display: flex;
  min-height: 62px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 12px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 11px;
}

.credential-row > div {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.credential-row small {
  color: var(--muted);
  font-size: 9px;
}

.credential-row code {
  overflow-wrap: anywhere;
  color: var(--ink);
  font: 12px/1.45 "SFMono-Regular", Consolas, monospace;
}

.sync-modal {
  width: min(760px, 100%);
}

.sync-intro {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.sync-permission-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 5px 0 16px;
  padding: 11px 12px;
  color: var(--brand-dark);
  background: var(--brand-soft);
  border: 1px solid #bae0ff;
  border-radius: 10px;
}

.sync-permission-note > [data-icon] {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin-top: 1px;
}

.sync-permission-note p {
  margin: 0;
  font-size: 10px;
  line-height: 1.6;
}

.sync-result {
  overflow: hidden;
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 13px;
}

.sync-result.success {
  border-color: #bce4d7;
}

.sync-result.warning {
  border-color: #ead7a9;
}

.sync-result.error {
  border-color: #efc8c8;
}

.sync-result-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 15px;
  background: var(--surface-soft);
  border-bottom: 1px solid var(--line);
}

.sync-result.success .sync-result-head {
  color: var(--green);
  background: var(--green-soft);
}

.sync-result.warning .sync-result-head {
  color: #76530e;
  background: #fff9eb;
}

.sync-result.error .sync-result-head {
  color: #9d3030;
  background: #fff4f4;
}

.sync-result-head > [data-icon] {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
}

.sync-result-head strong {
  font-size: 12px;
}

.sync-result-head p {
  margin: 4px 0 0;
  font-size: 10px;
  line-height: 1.55;
}

.sync-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}

.sync-metrics > div {
  padding: 13px 14px;
  border-right: 1px solid var(--line);
}

.sync-metrics > div:last-child {
  border-right: 0;
}

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

.sync-metrics strong {
  color: var(--ink);
  font-size: 19px;
}

.sync-metrics span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.sync-merchant-list {
  padding: 4px 14px;
}

.sync-merchant-row {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}

.sync-merchant-row:last-of-type {
  border-bottom: 0;
}

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

.sync-merchant-row strong {
  font-size: 11px;
}

.sync-merchant-row small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.sync-state {
  max-width: 62%;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
  text-align: right;
}

.sync-state.error {
  color: var(--red);
  font-weight: 650;
}

.sync-merchant-error {
  margin: -3px 0 10px;
  color: var(--red);
  font-size: 9px;
  line-height: 1.55;
}

.sync-merchant-note {
  margin: -3px 0 10px;
  color: var(--amber);
  font-size: 9px;
  line-height: 1.55;
}

.sync-warnings {
  padding: 10px 14px 12px;
  color: #76530e;
  background: #fff9eb;
  border-top: 1px solid #ead7a9;
}

.sync-warnings p {
  margin: 0 0 5px;
  font-size: 9px;
  line-height: 1.55;
}

.sync-warnings p:last-child {
  margin-bottom: 0;
}

.group-add-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
  margin-bottom: 18px;
}

.group-add-form .form-field {
  margin-bottom: 0;
}

.group-manage-list {
  display: grid;
  gap: 9px;
}

.group-manage-row {
  display: grid;
  min-height: 52px;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 11px;
}

.group-manage-row input {
  height: 34px;
}

.group-manage-row input:disabled {
  color: var(--muted);
  background: var(--surface-strong);
}

.group-reserved {
  grid-column: 2 / -1;
  padding: 5px 8px;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 9px;
  font-weight: 650;
}

.login-page,
.public-pay-page {
  min-height: 100vh;
  background: var(--bg);
}

.login-header,
.pay-header {
  display: flex;
  min-height: 70px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 clamp(20px, 5vw, 68px);
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
}

.login-brand,
.pay-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 750;
  letter-spacing: -0.025em;
}

.login-brand .brand-mark,
.pay-brand .brand-mark {
  width: 34px;
  height: 34px;
  flex-basis: 34px;
  color: #fff;
  background: var(--brand);
  border-radius: 10px;
}

.login-brand .brand-mark .brand-letter,
.pay-brand .brand-mark .brand-letter {
  font-size: 20px;
}

.back-link {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.back-link:hover {
  color: var(--brand);
}

.login-layout {
  display: grid;
  min-height: calc(100vh - 70px);
  grid-template-columns: minmax(0, 1.05fr) minmax(390px, 0.7fr);
}

.login-layout-single {
  grid-template-columns: 1fr;
}

.login-story {
  position: relative;
  display: flex;
  overflow: hidden;
  align-items: center;
  padding: clamp(38px, 8vw, 110px);
  color: #ffffff;
  background: #001529;
}

.login-story::before,
.login-story::after {
  position: absolute;
  content: "";
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
}

.login-story::before {
  right: -160px;
  bottom: -210px;
  width: 540px;
  height: 540px;
}

.login-story::after {
  right: -42px;
  bottom: -88px;
  width: 300px;
  height: 300px;
}

.story-content {
  position: relative;
  z-index: 1;
  max-width: 560px;
}

.story-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  color: #91caff;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.story-kicker::before {
  width: 22px;
  height: 1px;
  content: "";
  background: currentColor;
}

.story-content h1 {
  max-width: 540px;
  margin: 0;
  font-size: clamp(36px, 5vw, 67px);
  font-weight: 680;
  letter-spacing: -0.065em;
  line-height: 1.05;
}

.story-content > p {
  max-width: 470px;
  margin: 24px 0 0;
  color: #d6e4ff;
  font-size: 14px;
  line-height: 1.75;
}

.story-stats {
  display: flex;
  gap: 38px;
  margin-top: 42px;
}

.story-stat {
  display: grid;
  gap: 5px;
}

.story-stat strong {
  color: #ffffff;
  font-size: 21px;
  letter-spacing: -0.03em;
}

.story-stat span {
  color: #91caff;
  font-size: 9px;
}

.login-form-side {
  display: grid;
  place-items: center;
  padding: 32px;
}

.login-card {
  width: min(380px, 100%);
}

.login-card h2 {
  margin: 0;
  font-size: 30px;
  letter-spacing: -0.045em;
}

.login-card > p {
  margin: 9px 0 28px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.login-step > p {
  margin: 9px 0 24px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.login-user-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: -8px 0 18px;
  padding: 9px 10px;
  color: var(--ink-soft);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 11px;
  font-weight: 650;
}

.form-field {
  display: grid;
  gap: 7px;
  margin-bottom: 16px;
}

.form-field label {
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 650;
}

.form-field input {
  width: 100%;
  height: 45px;
  padding: 0 13px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  outline: 0;
}

.form-field input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(5, 145, 255, 0.1);
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 45px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  transform: translateY(-50%);
}

.password-toggle [data-icon] {
  width: 16px;
  height: 16px;
}

.login-submit {
  width: 100%;
  min-height: 46px;
  margin-top: 5px;
}

.login-hint {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 17px;
  padding: 10px 11px;
  color: var(--muted);
  background: var(--brand-soft);
  border-radius: 9px;
  font-size: 9px;
  line-height: 1.55;
}

.login-hint [data-icon] {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  margin-top: 1px;
  color: var(--brand);
}

.code-input {
  height: 56px !important;
  text-align: center;
  font-size: 22px !important;
  font-weight: 700;
  letter-spacing: 0.35em;
}

.login-step[hidden] {
  display: none;
}

.login-back {
  margin-top: 18px;
  padding: 0;
  color: var(--brand);
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 10px;
  font-weight: 650;
}

.pay-main {
  display: grid;
  min-height: calc(100vh - 70px);
  place-items: start center;
  padding: clamp(42px, 8vw, 100px) 18px;
}

.pay-card {
  width: min(560px, 100%);
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow-md);
}

.pay-card-head {
  padding: 30px 32px 24px;
  border-bottom: 1px solid var(--line);
}

.pay-card-head small {
  color: var(--muted);
  font-size: 10px;
}

.pay-card-head h1 {
  margin: 8px 0 0;
  font-size: 28px;
  letter-spacing: -0.04em;
}

.pay-card-head p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.pay-card-body {
  padding: 28px 32px 32px;
}

.pay-amount-box {
  padding: 19px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 13px;
}

.pay-amount-box label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 10px;
}

.pay-amount-input {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 34px;
  font-weight: 720;
  letter-spacing: -0.05em;
}

.pay-amount-input span {
  color: var(--muted);
  font-size: 16px;
  font-weight: 600;
}

.pay-amount-input input {
  min-width: 0;
  flex: 1;
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: 0;
  font: inherit;
  letter-spacing: inherit;
}

.preset-amounts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.preset-amounts button {
  padding: 7px 10px;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  font-size: 10px;
}

.preset-amounts button:hover {
  color: var(--brand);
  border-color: var(--brand);
}

.pay-method {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 18px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.pay-method div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.method-icon {
  display: grid;
  width: 35px;
  height: 35px;
  place-items: center;
  color: var(--brand);
  background: var(--brand-soft);
  border-radius: 9px;
}

.method-icon [data-icon] {
  width: 17px;
  height: 17px;
}

.pay-method strong {
  display: block;
  font-size: 11px;
}

.pay-method small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.method-choice-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 15px;
}

.method-choice {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--ink-soft);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 650;
}

.method-choice [data-icon] {
  width: 17px;
  height: 17px;
}

.method-choice:hover,
.method-choice.active {
  color: var(--brand);
  background: var(--brand-soft);
  border-color: var(--brand);
}

.provider-demo-card {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 15px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.provider-mark {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  place-items: center;
  color: #fff;
  background: var(--brand);
  border-radius: 11px;
  font-size: 17px;
  font-weight: 800;
}

.provider-demo-card strong {
  display: block;
  font-size: 11px;
}

.provider-demo-card p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.mock-card-form {
  padding: 16px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 13px;
}

.mock-card-form .form-field:last-child {
  margin-bottom: 0;
}

.demo-form-banner {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 14px;
  padding: 8px 9px;
  color: var(--brand-dark);
  background: var(--brand-soft);
  border-radius: 8px;
  font-size: 9px;
  font-weight: 600;
}

.demo-form-banner [data-icon] {
  width: 14px;
  height: 14px;
}

.inline-link {
  padding: 0;
  color: var(--brand);
  background: transparent;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 650;
}

.closed-link-note {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 14px;
  color: var(--amber);
  background: var(--amber-soft);
  border-radius: 11px;
  font-size: 10px;
}

.closed-link-note [data-icon] {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
}

.receipt-card {
  padding: 42px 36px 34px;
  text-align: center;
}

.receipt-card h1 {
  margin: 17px 0 0;
  font-size: 27px;
  letter-spacing: -0.04em;
}

.receipt-card > p {
  max-width: 390px;
  margin: 9px auto 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.65;
}

.receipt-mark {
  display: grid;
  width: 56px;
  height: 56px;
  margin: 0 auto;
  place-items: center;
  border-radius: 50%;
}

.receipt-success {
  color: var(--green);
  background: var(--green-soft);
}

.receipt-processing {
  color: var(--brand);
  background: var(--brand-soft);
}

.receipt-danger {
  color: var(--red);
  background: var(--red-soft);
}

.receipt-neutral {
  color: var(--ink-soft);
  background: var(--surface-strong);
}

.receipt-mark [data-icon] {
  width: 26px;
  height: 26px;
}

.receipt-status-copy {
  max-width: 420px;
  margin: 10px auto 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.7;
}

.receipt-facts {
  overflow: hidden;
  margin: 27px 0 0;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.receipt-facts div {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  min-height: 43px;
  border-bottom: 1px solid var(--line);
}

.receipt-facts div:last-child {
  border-bottom: 0;
}

.receipt-facts dt,
.receipt-facts dd {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 9px 12px;
  font-size: 13px;
}

.receipt-facts dt {
  color: var(--muted);
  background: var(--surface-soft);
}

.receipt-facts dd {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--ink-soft);
  font-weight: 650;
}

.receipt-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 9px;
  margin-top: 20px;
}

.receipt-actions .button {
  width: 100%;
  min-height: 44px;
  margin: 0;
}

.payment-loading-card {
  display: grid;
  min-height: 280px;
  place-items: center;
  align-content: center;
  gap: 12px;
  padding: 44px;
  text-align: center;
}

.payment-loading-card .button-spinner {
  width: 26px;
  height: 26px;
  color: var(--brand);
  border-width: 3px;
}

.payment-loading-card h1 {
  margin: 5px 0 0;
  font-size: 23px;
}

.payment-loading-card p {
  max-width: 360px;
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}

.pay-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin: 18px 0 0;
}

.pay-summary div {
  display: grid;
  gap: 4px;
}

.pay-summary dt {
  color: var(--muted);
  font-size: 9px;
}

.pay-summary dd {
  margin: 0;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 650;
}

.pay-total {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  margin: 23px 0 0;
  font-size: 24px;
  letter-spacing: -0.035em;
}

.pay-total .inline-link {
  font-size: 10px;
  letter-spacing: 0;
}

.paypal-card-fields {
  display: grid;
  gap: 13px;
}

.paypal-card-fields h3 {
  margin: 0 0 2px;
  font-size: 15px;
}

.paypal-card-field {
  display: grid;
  min-width: 0;
  gap: 7px;
}

.paypal-card-field label {
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 650;
}

.paypal-card-field > div:last-child {
  display: flex;
  height: 52px;
  min-height: 52px;
  max-height: 52px;
  align-items: stretch;
  box-sizing: border-box;
  overflow: hidden;
  background: transparent;
  border: 0;
}

.paypal-card-field > div:last-child > div[id^="zoid-paypal-card-"] {
  width: 100%;
  height: 52px !important;
  min-height: 52px !important;
  max-height: 52px !important;
  overflow: hidden;
}

.paypal-card-field > div:last-child iframe {
  display: block;
  width: 100% !important;
  height: 52px !important;
  min-height: 52px !important;
  max-height: 52px !important;
  border: 0;
}

.card-field-placeholder {
  display: flex;
  width: 100%;
  align-items: center;
  padding: 0 14px;
  color: var(--muted-2);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  font-size: 14px;
}

.paypal-card-field > div:last-child:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(5, 145, 255, 0.1);
}

.paypal-card-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 11px;
}

.card-fields-message {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
  text-align: center;
}

.card-fields-message.error {
  padding: 9px 10px;
  color: var(--red);
  background: var(--red-soft);
  border-radius: 8px;
}

.demo-pill.api-live {
  color: var(--brand-dark);
  background: var(--brand-soft);
}

.demo-pill {
  padding: 6px 9px;
  color: var(--brand-dark);
  background: var(--brand-soft);
  border-radius: 999px;
  font-size: 9px;
  font-weight: 650;
}

.radio-dot {
  width: 17px;
  height: 17px;
  border: 5px solid var(--brand);
  border-radius: 50%;
}

.pay-card .button.primary {
  width: 100%;
  min-height: 46px;
  margin-top: 20px;
}

.pay-note {
  margin: 13px 0 0;
  color: var(--muted);
  font-size: 9px;
  text-align: center;
}

.mobile-menu {
  display: none;
}

.mobile-backdrop {
  position: fixed;
  inset: 0;
  z-index: 25;
  background: rgba(0, 0, 0, 0.45);
}

.sidebar-collapsed .sidebar {
  width: var(--sidebar-collapsed);
}

.sidebar-collapsed .workspace {
  margin-left: var(--sidebar-collapsed);
}

.sidebar-collapsed .brand {
  padding-inline: 23px;
}

.sidebar-collapsed .brand-copy,
.sidebar-collapsed .nav-label,
.sidebar-collapsed .nav-item > span:not([data-icon]),
.sidebar-collapsed .demo-card div,
.sidebar-collapsed .sidebar-toggle {
  display: none;
}

.sidebar-collapsed .nav-item {
  grid-template-columns: 1fr;
  justify-items: center;
  padding: 0;
}

.sidebar-collapsed .nav-item [data-icon] {
  width: 20px;
  height: 20px;
}

.sidebar-collapsed .sidebar-foot {
  justify-content: center;
}

.sidebar-collapsed .demo-card {
  width: 42px;
  height: 42px;
  justify-content: center;
  padding: 0;
}

.sidebar-collapsed .demo-dot {
  margin-top: 0;
}

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

  .dashboard-grid {
    grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.75fr);
  }

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

  .filter-bar.filter-bar-three {
    grid-template-columns: minmax(240px, 1.4fr) repeat(2, minmax(140px, 0.7fr));
  }

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

@media (max-width: 960px) {
  .sidebar {
    width: min(280px, 82vw);
    transform: translateX(-102%);
    box-shadow: var(--shadow-lg);
  }

  .workspace,
  .sidebar-collapsed .workspace {
    margin-left: 0;
  }

  .sidebar.mobile-open {
    transform: translateX(0);
  }

  .mobile-menu {
    display: grid;
  }

  .sidebar-collapsed .sidebar {
    width: min(280px, 82vw);
  }

  .sidebar-collapsed .brand-copy,
  .sidebar-collapsed .nav-label,
  .sidebar-collapsed .nav-item > span:not([data-icon]),
  .sidebar-collapsed .demo-card div,
  .sidebar-collapsed .sidebar-toggle {
    display: initial;
  }

  .sidebar-collapsed .nav-item {
    grid-template-columns: 21px 1fr auto;
    justify-items: initial;
    padding: 0 12px;
  }

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

  .share-panel .panel-body {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    align-items: center;
    gap: 20px;
  }

  .donut-wrap {
    margin: 0 auto;
  }

  .login-layout {
    grid-template-columns: 1fr;
  }

  .login-story {
    display: none;
  }

  .login-form-side {
    min-height: calc(100vh - 70px);
  }
}

@media (max-width: 720px) {
  :root {
    --topbar: 62px;
  }

  .topbar {
    padding: 0 15px;
  }

  .breadcrumb > span:first-child,
  .search-trigger span:not([data-icon]),
  .search-trigger kbd,
  .top-link span:not([data-icon]),
  .account-name,
  .account-button > [data-icon] {
    display: none;
  }

  .search-trigger {
    width: 38px;
    padding: 0;
    justify-content: center;
  }

  .top-link {
    width: 38px;
    padding: 0;
    justify-content: center;
  }

  .main-content {
    padding: 20px 15px 28px;
  }

  .page-head {
    align-items: flex-end;
  }

  .page-head p {
    display: none;
  }

  .page-actions .select-wrap {
    display: none;
  }

  .metrics-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .metric-card {
    min-height: 124px;
    padding: 15px;
  }

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

  .dashboard-grid {
    gap: 12px;
  }

  .panel-head {
    padding-inline: 15px;
  }

  .panel-body {
    padding-inline: 15px;
  }

  .trend-chart,
  .trend-chart svg {
    min-height: 240px;
    height: 240px;
  }

  .share-panel .panel-body {
    display: block;
  }

  .donut-wrap {
    margin-bottom: 20px;
  }

  .filter-bar {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 14px 15px;
  }

  .advanced-filters {
    grid-template-columns: 1fr;
    padding: 14px 15px;
  }

  .public-link-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .inline-actions {
    width: 100%;
  }

  .inline-actions .button {
    flex: 1;
  }

  .modal-backdrop {
    padding: 12px;
  }

  .modal-card {
    max-height: calc(100vh - 24px);
    overflow-y: auto;
  }

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

  .form-field-wide {
    grid-column: auto;
  }

  .table-panel .panel-head {
    align-items: flex-start;
  }

  .panel-head-actions {
    align-items: flex-end;
    flex-direction: column;
  }

  .toolbar-actions .button span:not([data-icon]) {
    display: none;
  }

  .toolbar-actions .button {
    width: 39px;
    padding: 0;
  }

  .data-table {
    min-width: 780px;
  }

  .table-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .detail-row {
    grid-template-columns: 118px minmax(0, 1fr);
  }

  .login-header,
  .pay-header {
    padding-inline: 18px;
  }

  .login-form-side {
    padding: 24px 20px;
  }

  .pay-card-head,
  .pay-card-body {
    padding-inline: 22px;
  }

  .receipt-card {
    padding-inline: 22px;
  }

  .paypal-card-field-grid {
    grid-template-columns: 1fr;
  }
}

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

  .metric-card {
    min-height: 112px;
  }

  .metric-value {
    margin-top: 11px;
  }

  .page-head h1 {
    font-size: 24px;
  }

  .eyebrow {
    margin-bottom: 4px;
  }

  .share-stats,
  .story-stats {
    gap: 20px;
  }

  .pagination .page-button:nth-of-type(4),
  .pagination .page-button:nth-of-type(5) {
    display: none;
  }

  .receipt-actions,
  .method-choice-row {
    grid-template-columns: 1fr;
  }

  .receipt-facts div {
    grid-template-columns: 100px minmax(0, 1fr);
  }

  .demo-pill {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .group-add-form,
  .group-manage-row {
    grid-template-columns: 1fr;
  }

  .group-reserved {
    grid-column: auto;
    justify-self: start;
  }
}

/* Reference-aligned operations shell */
.workspace-tabs {
  position: sticky;
  top: var(--topbar);
  z-index: 19;
  display: flex;
  min-height: 49px;
  align-items: stretch;
  gap: 2px;
  overflow-x: auto;
  padding: 7px 28px 0;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.workspace-tab {
  display: inline-flex;
  min-width: max-content;
  align-items: center;
  gap: 7px;
  padding: 0 13px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 9px 9px 0 0;
  cursor: pointer;
  font-size: 11px;
  font-weight: 620;
}

.workspace-tab [data-icon] {
  width: 15px;
  height: 15px;
}

.workspace-tab:hover {
  color: var(--ink-soft);
  background: var(--surface-soft);
}

.workspace-tab.active {
  color: var(--brand-dark);
  background: var(--brand-soft);
  box-shadow: inset 0 -2px 0 var(--brand);
}

.sidebar-foot {
  justify-content: flex-end;
}

.main-content {
  padding-top: 24px;
}

.page-head {
  align-items: center;
  margin-bottom: 18px;
}

.page-head h1 {
  font-size: clamp(24px, 2vw, 30px);
}

.metric-card {
  min-height: 112px;
}

.metric-value {
  margin-top: 13px;
}

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

.share-panel .panel-head {
  align-items: center;
}

.share-title-row {
  display: flex;
  align-items: center;
  gap: 22px;
}

.share-title-row > span {
  color: var(--muted);
  font-size: 10px;
}

.share-search {
  position: relative;
  width: min(280px, 42vw);
}

.share-search [data-icon] {
  position: absolute;
  top: 50%;
  left: 11px;
  width: 15px;
  height: 15px;
  color: var(--muted);
  transform: translateY(-50%);
}

.share-search input {
  width: 100%;
  height: 36px;
  padding: 0 12px 0 34px;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  outline: none;
}

.share-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  align-items: start;
  gap: 24px;
}

.share-layout .donut-wrap {
  margin-top: 28px;
}

.share-table {
  min-width: 0;
}

.share-table-head,
.share-item {
  display: grid;
  grid-template-columns: 9px minmax(160px, 1fr) 110px 72px;
  align-items: center;
  gap: 10px;
}

.share-table-head {
  min-height: 38px;
  padding: 0 8px;
  color: var(--muted);
  background: var(--surface-soft);
  border-radius: 8px;
  font-size: 10px;
}

.share-table-head span:first-child {
  grid-column: 1 / 3;
}

.share-table-head span:not(:first-child) {
  text-align: right;
}

.share-item {
  min-height: 39px;
  padding: 0 8px;
  border-bottom: 1px solid var(--line);
}

.share-item .share-value {
  text-align: right;
}

.share-empty {
  padding: 28px;
  color: var(--muted);
  text-align: center;
  font-size: 10px;
}

.overview-account-filters {
  margin-bottom: 0;
}

.advanced-filters {
  grid-template-columns: repeat(5, minmax(130px, 1fr));
}

.table-footer-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

.page-size-select,
.page-jump input {
  height: 31px;
  color: var(--ink-soft);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 10px;
}

.page-size-select {
  padding: 0 24px 0 9px;
}

.page-jump {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 10px;
}

.page-jump input {
  width: 48px;
  padding: 0 5px;
  text-align: center;
}

.language-button {
  padding: 6px 8px;
  color: var(--brand);
  background: transparent;
  border: 0;
  cursor: default;
  font-size: 11px;
  font-weight: 650;
}

.public-pay-page .pay-header {
  background: var(--surface-soft);
}

.public-pay-page .pay-brand .brand-mark {
  color: #fff;
  background: var(--brand);
}

.pay-card:not(.receipt-card):not(.payment-loading-card) {
  display: grid;
  width: min(880px, 100%);
  grid-template-columns: minmax(260px, 0.82fr) minmax(420px, 1.28fr);
  border-radius: 12px;
}

.pay-card:not(.receipt-card):not(.payment-loading-card) .pay-card-head {
  min-height: 360px;
  padding: 42px 40px;
  background: var(--surface-soft);
  border-right: 1px solid var(--line);
  border-bottom: 0;
}

.pay-card:not(.receipt-card):not(.payment-loading-card) .pay-card-head h1 {
  margin-top: 15px;
  color: var(--ink);
  font-size: 34px;
}

.pay-card:not(.receipt-card):not(.payment-loading-card) .pay-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 58px;
}

.pay-card:not(.receipt-card):not(.payment-loading-card) .pay-summary div {
  padding-top: 9px;
  border-top: 1px solid var(--line);
}

.pay-card:not(.receipt-card):not(.payment-loading-card) .pay-card-body {
  min-height: 360px;
  padding: 42px 40px;
}

.payment-details-title {
  margin: 0 0 22px;
  color: var(--ink);
  font-size: 22px;
  letter-spacing: -0.035em;
}

.preset-amounts-stack {
  display: grid;
  grid-template-columns: 1fr;
  margin: 0 0 18px;
}

.preset-amounts-stack button {
  min-height: 45px;
  color: #fff;
  background: var(--brand);
  border-color: var(--brand);
  border-radius: 5px;
  font-size: 12px;
}

.preset-amounts-stack button:not(.active) {
  color: var(--brand);
  background: #fff;
}

.preset-amounts-stack button.active,
.preset-amounts-stack button:hover {
  color: #fff;
  background: var(--brand);
  border-color: var(--brand);
}

.pay-amount-box {
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.pay-amount-box label {
  color: var(--ink);
  font-weight: 650;
}

.pay-amount-input {
  padding-bottom: 8px;
  color: #66706a;
  border-bottom: 1px solid #8f978f;
}

.pay-amount-input span {
  margin-left: auto;
  color: var(--ink);
}

.pay-card .button.primary {
  background: var(--brand);
  border-color: var(--brand);
  border-radius: 999px;
}

@media (max-width: 900px) {
  .workspace-tabs {
    padding-inline: 16px;
  }

  .share-layout {
    grid-template-columns: 1fr;
  }

  .advanced-filters {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
  }

  .pay-card:not(.receipt-card):not(.payment-loading-card) {
    grid-template-columns: 1fr;
  }

  .pay-card:not(.receipt-card):not(.payment-loading-card) .pay-card-head {
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .pay-card:not(.receipt-card):not(.payment-loading-card) .pay-summary {
    margin-top: 26px;
  }

  .pay-card:not(.receipt-card):not(.payment-loading-card) .pay-card-body {
    min-height: 0;
  }
}

@media (max-width: 640px) {
  .table-footer,
  .table-footer-tools {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .sync-metrics > div:nth-child(2) {
    border-right: 0;
  }

  .sync-metrics > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .sync-merchant-row {
    align-items: flex-start;
    flex-direction: column;
    padding: 10px 0;
  }

  .sync-state {
    max-width: none;
    text-align: left;
  }

  .advanced-filters {
    grid-template-columns: 1fr;
  }

  .share-table-head,
  .share-item {
    grid-template-columns: 9px minmax(110px, 1fr) 82px 56px;
  }

  .pay-card:not(.receipt-card):not(.payment-loading-card) .pay-card-head,
  .pay-card:not(.receipt-card):not(.payment-loading-card) .pay-card-body {
    padding: 28px 22px;
  }
}

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

/* Ant Design inspired visual system */
html,
body {
  background: var(--bg);
}

body {
  color: var(--ink);
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

.sidebar {
  color: var(--ink-soft);
  background: #fff;
  border-right: 1px solid var(--line);
}

.brand {
  border-bottom-color: var(--line);
}

.brand-mark {
  color: #fff;
  background: var(--brand);
  border-radius: 8px;
  box-shadow: 0 2px 0 rgba(5, 145, 255, 0.1);
}

.brand-copy strong {
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
}

.brand-copy small {
  color: var(--muted);
}

.nav-groups {
  padding: 18px 10px;
}

.nav-group + .nav-group {
  margin-top: 22px;
}

.nav-label {
  margin-bottom: 7px;
  padding-inline: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
}

.nav-item {
  min-height: 40px;
  gap: 10px;
  padding-inline: 12px;
  color: var(--ink-soft);
  border-radius: 6px;
  font-size: 14px;
}

.nav-item:hover {
  color: var(--ink);
  background: var(--surface-strong);
}

.nav-item.active {
  color: var(--brand);
  background: var(--brand-soft);
  box-shadow: none;
}

.nav-count {
  color: var(--muted);
  background: var(--surface-strong);
}

.demo-card {
  color: var(--ink-soft);
  background: var(--surface-soft);
  border-color: var(--line);
  border-radius: 8px;
}

.demo-card strong {
  color: var(--ink);
}

.demo-card p {
  color: var(--muted);
}

.demo-dot {
  background: var(--green);
  box-shadow: none;
}

.sidebar-toggle {
  color: var(--muted);
  background: #fff;
  border-color: var(--line-strong);
  border-radius: 6px;
}

.sidebar-toggle:hover {
  color: var(--brand);
  border-color: var(--brand);
}

.topbar {
  background: rgba(255, 255, 255, 0.96);
  border-bottom-color: var(--line);
}

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

.breadcrumb strong {
  color: var(--ink);
  font-weight: 500;
}

.search-trigger {
  color: var(--muted);
  background: var(--surface-strong);
  border-color: transparent;
  border-radius: 6px;
}

.search-trigger:hover {
  color: var(--brand);
  background: var(--brand-soft);
  border-color: transparent;
}

.search-trigger kbd {
  color: var(--muted);
  background: #fff;
  border-color: var(--line-strong);
  border-radius: 4px;
  box-shadow: none;
}

.top-link {
  color: var(--brand);
  border-radius: 6px;
}

.top-link:hover {
  background: var(--brand-soft);
}

.icon-button,
.account-button {
  border-radius: 6px;
}

.icon-button:hover,
.account-button:hover,
.account-button[aria-expanded="true"] {
  background: var(--surface-strong);
}

.notification-dot {
  background: var(--red);
}

.avatar {
  background: var(--brand);
  border-radius: 6px;
  font-weight: 600;
}

.avatar.large {
  border-radius: 8px;
}

.account-menu {
  border-radius: 8px;
  box-shadow: var(--shadow-md);
}

.account-menu button {
  border-radius: 4px;
  font-size: 13px;
}

.workspace-tabs {
  min-height: 46px;
  padding-top: 0;
  background: #fff;
}

.workspace-tab {
  min-height: 45px;
  padding-inline: 16px;
  border-radius: 0;
  font-size: 13px;
  font-weight: 400;
}

.workspace-tab:hover {
  color: var(--brand);
  background: transparent;
}

.workspace-tab.active {
  color: var(--brand);
  background: transparent;
  box-shadow: inset 0 -2px 0 var(--brand);
}

.main-content {
  padding-top: 24px;
}

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

.eyebrow {
  margin-bottom: 6px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.eyebrow::before {
  display: none;
}

.page-head h1 {
  color: var(--ink);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0;
}

.page-head p {
  color: var(--muted);
  font-size: 13px;
}

.button {
  min-height: 36px;
  padding-inline: 15px;
  color: var(--ink-soft);
  background: #fff;
  border-color: var(--line-strong);
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
  font-size: 14px;
  font-weight: 400;
  transition:
    color 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.button:hover {
  color: var(--brand);
  background: #fff;
  border-color: var(--brand);
}

.button:active {
  transform: none;
}

.button.primary {
  color: #fff;
  background: var(--brand);
  border-color: var(--brand);
  box-shadow: 0 2px 0 rgba(5, 145, 255, 0.1);
}

.button.primary:hover {
  color: #fff;
  background: #4096ff;
  border-color: #4096ff;
}

.button.ghost {
  color: var(--ink-soft);
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.button.ghost:hover {
  color: var(--brand);
  background: var(--surface-strong);
}

.button.danger,
.table-actions button.danger {
  color: var(--red);
}

.button:disabled {
  color: rgba(0, 0, 0, 0.25);
  background: rgba(0, 0, 0, 0.04);
  border-color: var(--line-strong);
  box-shadow: none;
  cursor: not-allowed;
}

.select-wrap select,
.text-input,
.form-field input,
.share-search input,
.page-size-select,
.page-jump input {
  height: 38px;
  color: var(--ink);
  background: #fff;
  border-color: var(--line-strong);
  border-radius: 6px;
  font-size: 14px;
}

.text-input:focus,
.select-wrap select:focus,
.form-field input:focus,
.share-search input:focus,
.page-size-select:focus,
.page-jump input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(5, 145, 255, 0.1);
  outline: 0;
}

.text-input::placeholder,
.form-field input::placeholder,
.share-search input::placeholder {
  color: var(--muted-2);
}

.metrics-grid {
  gap: 16px;
}

.metric-card,
.panel {
  background: var(--surface);
  border-color: var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}

.metric-card {
  min-height: 116px;
  padding: 20px;
}

.metric-top {
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
}

.metric-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.metric-value {
  margin-top: 13px;
  color: var(--ink);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: 0;
}

.metric-foot {
  color: var(--muted);
  font-size: 12px;
}

.panel-head {
  padding: 20px;
}

.panel-title {
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0;
}

.panel-subtitle {
  color: var(--muted);
  font-size: 12px;
}

.segmented {
  padding: 2px;
  background: var(--surface-strong);
  border-radius: 6px;
}

.segmented button {
  min-height: 28px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 400;
}

.segmented button.active {
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.chart-summary small,
.chart-foot {
  color: var(--muted);
  font-size: 12px;
}

.chart-summary strong {
  font-weight: 600;
  letter-spacing: 0;
}

.chart-grid-line {
  stroke: var(--line);
}

.chart-axis-text {
  fill: var(--muted);
  font-size: 10px;
}

.chart-line {
  stroke: var(--brand);
  stroke-width: 2.5;
}

.chart-line-secondary {
  stroke: var(--accent);
}

.chart-point {
  stroke: var(--brand);
}

.chart-tooltip rect {
  fill: rgba(0, 0, 0, 0.85);
}

.legend-dot {
  background: var(--brand);
}

.legend-dot.orange {
  background: var(--accent);
}

.donut-track {
  stroke: var(--surface-strong);
}

.filter-bar {
  padding: 16px 20px;
  background: #fff;
  border-top-color: var(--line);
  border-bottom-color: var(--line);
}

.filter-field {
  gap: 6px;
}

.filter-field label {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 400;
}

.data-table th {
  height: 46px;
  padding: 10px 16px;
  color: var(--ink-soft);
  background: var(--surface-soft);
  border-bottom-color: var(--line);
  font-size: 12px;
  font-weight: 600;
}

.data-table td {
  height: 58px;
  padding: 12px 16px;
  color: var(--ink-soft);
  border-bottom-color: var(--line);
  font-size: 13px;
}

.data-table tbody tr:hover {
  background: var(--surface-soft);
}

.data-table .id-cell {
  color: var(--ink);
  font-weight: 500;
}

.merchant-cell strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
}

.merchant-cell small {
  color: var(--muted);
  font-size: 11px;
}

.amount-cell {
  font-weight: 500;
}

.status-pill,
.test-data-tag,
.soft-tag,
.demo-pill {
  border-radius: 4px;
  font-weight: 500;
}

.status-pill {
  padding: 2px 8px;
  font-size: 12px;
}

.status-pill::before {
  display: none;
}

.status-paid,
.status-open {
  color: var(--green);
  background: var(--green-soft);
}

.status-review {
  color: var(--amber);
  background: var(--amber-soft);
}

.status-failed,
.status-disabled {
  color: var(--red);
  background: var(--red-soft);
}

.status-pending,
.status-closed {
  color: var(--blue);
  background: var(--blue-soft);
}

.platform-account-mark,
.command-item-icon,
.method-icon {
  color: var(--brand);
  background: var(--brand-soft);
  border-color: #bae0ff;
  border-radius: 8px;
}

.table-action,
.group-link,
.copy-button,
.inline-link,
.language-button {
  color: var(--brand);
  font-weight: 400;
}

.table-action:hover,
.group-link:hover,
.copy-button:hover,
.inline-link:hover {
  color: #4096ff;
}

.copy-button {
  border-color: var(--line-strong);
  border-radius: 4px;
}

.switch {
  background: rgba(0, 0, 0, 0.25);
}

.switch.on {
  background: var(--brand);
}

.checkbox {
  accent-color: var(--brand);
}

.page-button {
  border-color: var(--line-strong);
  border-radius: 6px;
  font-size: 12px;
}

.page-button:hover:not(:disabled),
.page-button.active {
  color: var(--brand);
  border-color: var(--brand);
}

.page-button.active {
  background: var(--brand-soft);
  font-weight: 500;
}

.table-footer {
  border-top-color: var(--line);
}

.table-footer p,
.page-jump,
.page-size-select {
  font-size: 12px;
}

.drawer-backdrop,
.modal-backdrop,
.command-backdrop,
.mobile-backdrop {
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: none;
}

.detail-drawer {
  box-shadow: -6px 0 16px rgba(0, 0, 0, 0.08);
}

.drawer-head,
.modal-head {
  padding: 16px 24px;
  border-bottom-color: var(--line);
}

.drawer-title,
.modal-head h2 {
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0;
}

.drawer-close {
  border-color: var(--line-strong);
  border-radius: 4px;
}

.drawer-close:hover {
  color: var(--brand);
  border-color: var(--brand);
}

.drawer-body,
.modal-body {
  padding: 24px;
}

.drawer-hero h2 {
  font-weight: 600;
  letter-spacing: 0;
}

.detail-grid,
.receipt-facts,
.sync-result {
  border-color: var(--line);
  border-radius: 8px;
}

.detail-row dt,
.receipt-facts dt {
  background: var(--surface-soft);
}

.reference-value {
  border-radius: 6px;
  font-size: 12px;
}

.command-palette {
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
}

.command-item {
  border-radius: 6px;
}

.command-item:hover,
.command-item.selected {
  background: var(--surface-strong);
}

.toast {
  color: var(--ink);
  background: #fff;
  border-color: var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  font-size: 13px;
}

.modal-card {
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
}

.modal-kicker {
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

.credential-notice,
.sync-permission-note,
.login-hint,
.demo-form-banner {
  color: var(--brand-dark);
  background: var(--brand-soft);
  border-color: #bae0ff;
  border-radius: 6px;
}

.credential-row,
.group-manage-row {
  background: var(--surface-soft);
  border-color: var(--line);
  border-radius: 6px;
}

.sync-result.success {
  border-color: #b7eb8f;
}

.sync-result.success .sync-result-head {
  color: var(--green);
  background: var(--green-soft);
}

.sync-result.warning {
  border-color: #ffe58f;
}

.sync-result.warning .sync-result-head,
.sync-warnings {
  color: var(--amber);
  background: var(--amber-soft);
  border-color: #ffe58f;
}

.sync-result.error {
  border-color: #ffccc7;
}

.sync-result.error .sync-result-head {
  color: var(--red);
  background: var(--red-soft);
}

.login-page,
.public-pay-page {
  background: var(--bg);
}

.login-header,
.pay-header {
  min-height: 64px;
  background: #fff;
  border-bottom-color: var(--line);
}

.login-brand,
.pay-brand {
  color: var(--ink);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0;
}

.login-brand .brand-mark,
.pay-brand .brand-mark,
.public-pay-page .pay-brand .brand-mark {
  background: var(--brand);
  border-radius: 8px;
}

.login-layout {
  min-height: calc(100vh - 64px);
}

.login-form-side {
  padding: 32px 20px;
}

.login-card {
  width: min(400px, 100%);
  padding: 32px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-md);
}

.login-card h2 {
  color: var(--ink);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0;
}

.login-card > p,
.login-step > p {
  color: var(--muted);
  font-size: 14px;
}

.login-user-chip {
  background: var(--surface-soft);
  border-color: var(--line);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 400;
}

.form-field {
  gap: 7px;
}

.form-field label {
  color: var(--ink);
  font-size: 14px;
  font-weight: 400;
}

.form-field input {
  height: 40px;
}

.password-toggle {
  border-radius: 4px;
}

.login-submit {
  min-height: 40px;
}

.login-back {
  color: var(--brand);
  font-size: 13px;
  font-weight: 400;
}

.pay-main {
  min-height: calc(100vh - 64px);
  padding: clamp(36px, 7vw, 84px) 20px;
}

.pay-card {
  border-color: var(--line);
  border-radius: 12px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.08);
}

.pay-card:not(.receipt-card):not(.payment-loading-card) {
  width: min(920px, 100%);
}

.pay-card:not(.receipt-card):not(.payment-loading-card) .pay-card-head {
  padding: 42px;
  background: #f5f9ff;
  border-right-color: var(--line);
}

.pay-card:not(.receipt-card):not(.payment-loading-card) .pay-card-head h1 {
  margin-top: 14px;
  color: var(--ink);
  font-size: 34px;
  font-weight: 700;
  letter-spacing: 0;
}

.pay-card-head small,
.pay-summary dt {
  color: var(--muted);
  font-size: 12px;
}

.pay-card:not(.receipt-card):not(.payment-loading-card) .pay-summary {
  margin-top: 58px;
}

.pay-card:not(.receipt-card):not(.payment-loading-card) .pay-summary div {
  padding-top: 10px;
  border-top-color: var(--line-strong);
}

.pay-summary dd {
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}

.pay-card:not(.receipt-card):not(.payment-loading-card) .pay-card-body {
  padding: 42px;
}

.payment-details-title {
  margin-bottom: 22px;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0;
}

.preset-amounts-stack {
  gap: 10px;
}

.preset-amounts-stack button {
  min-height: 42px;
  color: var(--brand);
  background: #fff;
  border-color: #91caff;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
}

.preset-amounts-stack button:not(.active):hover {
  color: #4096ff;
  background: #fff;
  border-color: #4096ff;
}

.preset-amounts-stack button.active,
.preset-amounts-stack button.active:hover {
  color: #fff;
  background: var(--brand);
  border-color: var(--brand);
}

.pay-amount-box label {
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
}

.pay-amount-input {
  color: var(--ink);
  border-bottom-color: var(--line-strong);
}

.pay-amount-input:focus-within {
  border-bottom-color: var(--brand);
  box-shadow: 0 1px 0 var(--brand);
}

.pay-amount-input input {
  font-size: 34px;
  font-weight: 600;
  letter-spacing: 0;
}

.pay-card .button.primary {
  min-height: 42px;
  margin-top: 20px;
  border-radius: 6px;
  font-size: 14px;
}

.method-choice {
  border-color: var(--line-strong);
  border-radius: 6px;
  font-weight: 400;
}

.method-choice:hover,
.method-choice.active {
  color: var(--brand);
  background: var(--brand-soft);
  border-color: var(--brand);
}

.provider-mark {
  background: var(--brand);
  border-radius: 8px;
}

.mock-card-form,
.provider-demo-card {
  background: var(--surface-soft);
  border-color: var(--line);
  border-radius: 8px;
}

.paypal-card-fields h3 {
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
}

.paypal-card-fields {
  gap: 18px;
}

.paypal-card-field {
  gap: 9px;
}

.paypal-card-field label {
  color: var(--ink);
  font-size: 13px;
  font-weight: 400;
  line-height: 20px;
}

.paypal-card-field > div:last-child {
  border-radius: 6px;
}

.card-field-placeholder {
  border-color: var(--line-strong);
  border-radius: 6px;
}

.paypal-card-field > div:last-child:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(5, 145, 255, 0.1);
}

.pay-summary dd {
  white-space: nowrap;
}

.radio-dot {
  border-color: var(--brand);
}

.receipt-success {
  color: var(--green);
  background: var(--green-soft);
  box-shadow: none;
}

.closed-link-note {
  color: var(--amber);
  background: var(--amber-soft);
  border-radius: 6px;
}

@media (max-width: 960px) {
  .sidebar {
    box-shadow: 6px 0 16px rgba(0, 0, 0, 0.08);
  }

  .workspace-tabs {
    padding-inline: 12px;
  }
}

@media (max-width: 720px) {
  .main-content {
    padding: 18px 14px 26px;
  }

  .metrics-grid {
    gap: 12px;
  }

  .metric-card {
    min-height: 108px;
    padding: 16px;
  }

  .filter-bar,
  .advanced-filters {
    padding: 14px;
  }

  .login-card {
    padding: 24px;
  }

  .pay-main {
    padding: 24px 14px;
  }

  .pay-card:not(.receipt-card):not(.payment-loading-card) .pay-card-head,
  .pay-card:not(.receipt-card):not(.payment-loading-card) .pay-card-body {
    padding: 28px 22px;
  }
}

@media (max-width: 480px) {
  .metric-card {
    min-height: 102px;
  }

  .page-head h1 {
    font-size: 22px;
  }

  .login-card {
    padding: 22px 18px;
  }
}

.panel-head-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.merchant-import-modal {
  width: min(920px, 100%);
}

.merchant-import-intro {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 17px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.merchant-import-intro h3 {
  margin: 0 0 5px;
  color: var(--ink);
  font-size: 15px;
}

.merchant-import-intro p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.merchant-import-icon {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--brand);
  background: var(--brand-soft);
  border-radius: 7px;
}

.merchant-import-icon [data-icon] {
  width: 19px;
  height: 19px;
}

.merchant-import-upload {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 150px;
  margin-top: 16px;
  padding: 24px;
  background:
    repeating-linear-gradient(
      -45deg,
      transparent,
      transparent 8px,
      rgba(22, 119, 255, 0.025) 8px,
      rgba(22, 119, 255, 0.025) 16px
    ),
    #fff;
  border: 1px dashed #91caff;
  border-radius: 8px;
}

.merchant-import-help {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 15px;
  color: var(--muted);
  font-size: 12px;
}

.merchant-import-help strong {
  color: var(--ink);
}

.merchant-import-help code {
  padding: 4px 7px;
  color: var(--brand-dark);
  background: var(--brand-soft);
  border-radius: 4px;
  font: 11px "SFMono-Regular", Consolas, monospace;
}

.merchant-import-help span {
  flex-basis: 100%;
  line-height: 1.6;
}

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

.merchant-import-summary > div {
  display: grid;
  gap: 6px;
  padding: 13px 14px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 7px;
}

.merchant-import-summary small {
  color: var(--muted);
  font-size: 11px;
}

.merchant-import-summary strong {
  color: var(--ink);
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}

.merchant-import-summary.compact {
  margin-top: 14px;
}

.merchant-import-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 2px 9px;
  margin-top: 14px;
  padding: 12px 13px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
  cursor: pointer;
}

.merchant-import-option input {
  grid-row: 1 / 3;
}

.merchant-import-option span {
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
}

.merchant-import-option small {
  color: var(--muted);
  font-size: 11px;
}

.merchant-import-preview {
  max-height: 330px;
  margin-top: 14px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.merchant-import-preview .data-table {
  min-width: 700px;
}

.merchant-import-preview .data-table th {
  position: sticky;
  top: 0;
  z-index: 1;
}

.merchant-import-preview .data-table td {
  height: 54px;
}

.merchant-import-message {
  max-width: 310px;
  overflow: hidden;
  color: var(--muted) !important;
  text-overflow: ellipsis;
  white-space: normal;
}

.merchant-import-progress-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.merchant-import-progress-head strong {
  color: var(--ink);
  font-size: 15px;
}

.merchant-import-progress-head > strong {
  color: var(--brand);
  font-size: 22px;
  font-variant-numeric: tabular-nums;
}

.merchant-import-progress-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.merchant-import-progress {
  height: 8px;
  margin-top: 13px;
  overflow: hidden;
  background: var(--surface-strong);
  border-radius: 99px;
}

.merchant-import-progress span {
  display: block;
  height: 100%;
  background: var(--brand);
  border-radius: inherit;
  transition: width 180ms ease;
}

.merchant-import-alert {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 14px;
  padding: 11px 12px;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.6;
}

.merchant-import-alert.error {
  color: var(--red);
  background: var(--red-soft);
  border: 1px solid #ffccc7;
}

.merchant-import-alert.warning {
  color: #874d00;
  background: #fffbe6;
  border: 1px solid #ffe58f;
}

.merchant-import-alert.neutral {
  color: var(--ink-soft);
  background: #f5f7fa;
  border: 1px solid var(--line);
}

.merchant-import-alert [data-icon] {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  margin-top: 1px;
}

.merchant-export-options {
  display: grid;
  gap: 9px;
}

.merchant-export-options label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px 13px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
  cursor: pointer;
}

.merchant-export-options label:has(input:checked) {
  background: var(--brand-soft);
  border-color: #91caff;
}

.merchant-export-options span {
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
}

.merchant-export-options small {
  color: var(--muted);
  font-size: 11px;
}

@media (max-width: 720px) {
  .panel-head-actions {
    max-width: 58%;
    gap: 6px;
  }

  .panel-head-actions .button {
    min-height: 35px;
    padding: 0 10px;
    font-size: 11px;
  }

  .merchant-import-summary {
    grid-template-columns: 1fr 1fr;
  }

  .merchant-import-upload {
    align-items: stretch;
    flex-direction: column;
    min-height: 125px;
  }

  .merchant-import-help {
    align-items: flex-start;
  }
}
