:root {
  color-scheme: light;
  --bg: #f2f4f7;
  --panel: #ffffff;
  --text: #172033;
  --muted: #667085;
  --line: #dfe4eb;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --teal: #0f766e;
  --amber: #b45309;
  --red: #b42318;
  --shadow: 0 14px 36px rgba(16, 24, 40, 0.1);
  font-family: "Microsoft YaHei UI", "PingFang SC", "Noto Sans CJK SC", "Source Han Sans SC", "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

a {
  color: var(--primary);
  text-decoration: none;
}

input,
select,
textarea,
button {
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  background: #fff;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(36, 99, 235, 0.12);
}

label {
  display: grid;
  gap: 6px;
  color: #344054;
  font-size: 13px;
  font-weight: 600;
}

.label-text {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.help-tip {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  border: 1px solid #b8c1cc;
  border-radius: 50%;
  background: #f8fafc;
  color: #475467;
  font: 800 12px/18px Arial, "Segoe UI", sans-serif;
  text-align: center;
  cursor: help;
  vertical-align: middle;
}

.field-tag {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  border-radius: 999px;
  padding: 1px 7px;
  font-size: 11px;
  line-height: 1;
  font-style: normal;
  font-weight: 800;
}

.field-tag.required {
  background: #fee4e2;
  color: var(--red);
}

.field-tag.optional {
  background: #eef2f6;
  color: #667085;
}

.help-tip::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 9px);
  z-index: 30;
  width: max-content;
  max-width: min(320px, calc(100vw - 36px));
  transform: translateX(-50%) translateY(4px);
  border: 1px solid #1f2937;
  border-radius: 6px;
  padding: 9px 10px;
  background: #111827;
  color: #fff;
  box-shadow: 0 12px 24px rgba(16, 24, 40, 0.18);
  font-size: 12px;
  line-height: 1.55;
  font-weight: 500;
  white-space: normal;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.12s ease, transform 0.12s ease, visibility 0.12s ease;
}

.help-tip::before {
  content: "?";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateY(-0.5px);
  color: currentColor;
  font: inherit;
  pointer-events: none;
}

.help-tip:hover,
.help-tip:focus {
  border-color: var(--primary);
  color: var(--primary);
}

.help-tip:hover::after,
.help-tip:focus::after {
  opacity: 1;
  visibility: visible;
}

.help-tip:hover::after,
.help-tip:focus::after {
  transform: translateX(-50%) translateY(0);
}

code,
.mono {
  font-family: "Cascadia Mono", Consolas, "SFMono-Regular", monospace;
}

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

.app-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 252px 1fr;
  overflow-x: hidden;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: #141b2a;
  color: #e5e7eb;
  padding: 18px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 8px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.brand-mark,
.mark {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: #3b82f6;
  color: #fff;
  font-weight: 800;
}

.brand-mark img,
.mark img {
  display: block;
  width: 100%;
  height: 100%;
}

.brand-mark svg,
.mark svg {
  width: 23px;
  height: 23px;
}

.brand-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.brand-copy strong {
  color: #fff;
  font-size: 15px;
}

.brand-copy small {
  color: #8fa0b8;
  font-size: 11px;
}

.mobile-nav-toggle {
  display: none;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 7px;
  background: #202b3d;
  color: #fff;
  cursor: pointer;
}

.mobile-nav-toggle svg {
  width: 19px;
  height: 19px;
}

.mark {
  overflow: hidden;
  width: 52px;
  height: 52px;
  margin-bottom: 14px;
}

.mark.danger {
  background: #fee2e2;
  color: var(--red);
}

.sidebar nav {
  display: grid;
  gap: 15px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #344054 transparent;
}

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

.nav-group-label {
  padding: 0 11px 4px;
  color: #718198;
  font-size: 11px;
  font-weight: 800;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 0;
  border-radius: 6px;
  padding: 9px 11px;
  background: transparent;
  color: #cbd5e1;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.nav-link:hover {
  background: #202b3d;
  color: #fff;
}

.nav-link.active {
  background: #263a5c;
  color: #fff;
  box-shadow: inset 3px 0 0 #60a5fa;
}

.nav-icon {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
}

.logout-form {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.logout {
  color: #fca5a5;
}

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

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

.page-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.page-title-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
  color: var(--primary);
}

.page-title-icon svg {
  width: 21px;
  height: 21px;
}

.service-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  border: 1px solid #abefc6;
  border-radius: 999px;
  padding: 4px 10px;
  background: #ecfdf3;
  color: #067647;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.service-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #12b76a;
}

.page-head h1 {
  margin: 0;
  font-size: 26px;
  line-height: 1.25;
}

.page-head p,
.muted,
.fine {
  color: var(--muted);
}

.page-head p {
  margin: 6px 0 0;
}

.login-page {
  min-height: 100vh;
  background: #eef2f7;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
}

.login-panel {
  width: min(100%, 430px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 20px 50px rgba(16, 24, 40, 0.12);
  padding: 32px;
}

.login-panel.narrow {
  width: min(100%, 520px);
}

.login-panel h1 {
  margin: 0 0 8px;
  font-size: 25px;
}

.login-panel p {
  line-height: 1.7;
}

.stack {
  display: grid;
  gap: 14px;
}

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

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

.compact-config-panel {
  padding: 14px 16px;
  margin-bottom: 12px;
}

.compact-config-panel > .panel-head {
  margin-bottom: 10px;
}

.compact-config-form {
  column-gap: 12px;
  row-gap: 9px;
}

.compact-config-form label,
.compact-config-form .form-field {
  gap: 4px;
  font-size: 12px;
}

.compact-config-form input,
.compact-config-form select {
  min-height: 34px;
  padding: 7px 10px;
}

.compact-config-form textarea {
  min-height: 74px;
  padding: 8px 10px;
  line-height: 1.4;
}

.compact-config-form .field-hint {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
}

.compact-account-field {
  display: grid;
  grid-template-columns: auto minmax(320px, 520px) minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.compact-account-field > span {
  white-space: nowrap;
}

.compact-account-field .multi-select {
  width: 100%;
}

.compact-target-hint {
  margin-top: -4px !important;
}

.compact-form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.compact-form-actions .button {
  min-height: 34px;
  padding: 6px 16px;
}

.compact-config-form .callout {
  padding: 8px 10px;
  font-size: 13px;
  line-height: 1.45;
}

.compact-config-form .pdd-authority-box {
  grid-template-columns: 100px minmax(180px, 1fr) auto;
  align-items: center;
  gap: 6px 8px;
  padding: 7px 9px;
}

.compact-config-form .pdd-authority-box > span {
  white-space: nowrap;
}

.compact-config-form .pdd-authority-actions {
  flex-wrap: nowrap;
}

.compact-config-form .pdd-authority-message {
  grid-column: 2 / -1;
}

.grid-form[data-order-api-provider="official"] [data-api-field="dingdanxia"],
.grid-form[data-order-api-provider="dingdanxia"] [data-api-field="official"] {
  display: none !important;
}

.span-all {
  grid-column: 1 / -1;
}

.form-field {
  display: grid;
  gap: 8px;
  color: #344054;
  font-size: 13px;
  font-weight: 600;
}

.field-hint {
  margin: 0;
  color: var(--muted);
  font-weight: 500;
}

.advanced-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #f8fafc;
}

.advanced-box summary {
  cursor: pointer;
  color: #344054;
  font-size: 13px;
  font-weight: 800;
}

.advanced-box .stack {
  margin-top: 12px;
}

.multi-checks {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.multi-select {
  position: relative;
  width: min(100%, 520px);
}

.multi-select-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 13px;
  background: #fff;
  color: #667085;
  cursor: pointer;
  text-align: left;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  transition: border-color 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.multi-select.has-value .multi-select-toggle {
  color: var(--text);
}

.multi-select.open .multi-select-toggle,
.multi-select-toggle:hover {
  border-color: #b8c1cc;
  background: #f8fafc;
}

.multi-select.open .multi-select-toggle {
  box-shadow: 0 0 0 3px rgba(36, 99, 235, 0.12);
}

.multi-select-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
}

.multi-select-arrow {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-right: 2px solid #667085;
  border-bottom: 2px solid #667085;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.12s ease;
}

.multi-select.open .multi-select-arrow {
  transform: rotate(225deg) translate(-2px, -2px);
}

.multi-select-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  z-index: 40;
  display: none;
  max-height: 260px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(16, 24, 40, 0.12);
  padding: 6px;
}

.multi-select.open .multi-select-menu {
  display: grid;
  gap: 4px;
}

label.multi-select-option {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 9px;
  border-radius: 6px;
  padding: 10px;
  color: #344054;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

label.multi-select-option:hover {
  background: #f8fafc;
}

.multi-select-option input {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin: 0;
}

.multi-select-option span {
  min-width: 0;
}

.multi-select-option-text {
  flex: 1 1 auto;
}

.multi-select-option small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-weight: 500;
}

.multi-select-status {
  flex: 0 0 auto;
  margin-left: auto;
  border-radius: 999px;
  padding: 3px 8px;
  background: #fff7ed;
  color: #b45309;
  font-size: 12px;
  font-weight: 800;
}

.check-card {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
  cursor: pointer;
}

.check-card:hover {
  border-color: #b8c1cc;
  background: #f8fafc;
}

.check-card input {
  width: auto;
}

.check-card small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-weight: 500;
}

.checkline {
  display: flex;
  align-items: center;
  gap: 8px;
  align-self: end;
  justify-self: start;
  width: max-content;
  max-width: 100%;
  min-height: 42px;
}

.checkline input {
  width: auto;
  cursor: pointer;
}

.checkline label,
.checkline span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.checkline label {
  width: auto;
  color: #344054;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 14px;
  background: #fff;
  color: #1f2937;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.button:hover {
  border-color: #b8c1cc;
  background: #f8fafc;
  box-shadow: 0 3px 8px rgba(16, 24, 40, 0.08);
}

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

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

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

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

.button.subtle {
  min-height: 34px;
  padding: 7px 10px;
}

.button.tiny {
  min-height: 26px;
  padding: 3px 8px;
  font-size: 12px;
}

.button.danger {
  border-color: #fecdca;
  background: #fff;
  color: var(--red);
}

.button.danger:hover {
  border-color: #fda29b;
  background: #fef3f2;
}

.button.danger.danger-solid {
  border-color: var(--red);
  background: var(--red);
  color: #fff;
}

.button.danger.danger-solid:hover {
  border-color: #b42318;
  background: #b42318;
}

.pdd-authority-box {
  display: grid;
  gap: 5px;
  align-content: start;
  border: 1px solid #b2ddff;
  border-radius: 6px;
  padding: 7px 9px;
  background: #f5fbff;
}

.pdd-authority-box > span {
  line-height: 1.2;
}

.pdd-authority-box select {
  min-height: 32px;
  padding-top: 5px;
  padding-bottom: 5px;
}

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

.pdd-authority-message {
  min-height: 15px;
  margin: 0;
  line-height: 1.25;
  font-size: 12px;
}

.pdd-authority-dialog[hidden] {
  display: none;
}

.pdd-authority-dialog {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 20px;
}

.pdd-authority-dialog-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 24, 40, 0.48);
}

a.pdd-authority-dialog-backdrop {
  display: block;
}

.site-report-export-dialog {
  z-index: 1100;
}

.site-report-export-panel {
  width: min(460px, 100%);
}

.ad-effect-export-dialog {
  z-index: 1100;
}

.metrics.ad-effect-metrics {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 10px;
}

.ad-effect-metrics .metric {
  min-height: 68px;
  gap: 7px;
  padding: 8px;
}

.ad-effect-metrics .metric-icon {
  width: 32px;
  height: 32px;
}

.ad-effect-metrics .metric-icon svg {
  width: 17px;
  height: 17px;
}

.ad-effect-metrics .metric-copy > span {
  font-size: 13px;
}

.ad-effect-ratio-card .metric-copy strong,
.ad-effect-amount-card .metric-copy strong,
.ad-effect-deal-card .metric-copy strong,
.ad-effect-two-line-card .metric-copy strong {
  font-size: 14px;
  line-height: 1.45;
}

.ad-effect-ratio-card .metric-copy strong span,
.ad-effect-amount-card .metric-copy strong span,
.ad-effect-deal-card .metric-copy strong span,
.ad-effect-two-line-card .metric-copy strong span {
  display: block;
  white-space: nowrap;
}

.ad-effect-toolbar {
  padding: 12px 14px;
  margin-bottom: 10px;
}

.ad-effect-toolbar .panel-head {
  margin-bottom: 8px;
}

.ad-effect-summary {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.ad-effect-summary strong {
  color: var(--text);
}

.ad-effect-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
}

.ad-effect-controls > div {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}

.ad-effect-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 8px;
  margin-bottom: 10px;
}

.ad-effect-rank-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  margin: 0;
  padding: 9px 10px;
  min-width: 0;
}

.ad-effect-combined-ranks {
  display: grid;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 8px;
  height: 100%;
  min-width: 0;
}

.ad-effect-rank-panel-half {
  min-height: 0;
  padding-top: 7px;
  padding-bottom: 7px;
}

.ad-effect-rank-panel-half .ad-effect-rank-head {
  margin-bottom: 4px;
}

.ad-effect-rank-panel-half th,
.ad-effect-rank-panel-half td {
  padding-top: 3px;
  padding-bottom: 3px;
}

.ad-effect-rank-head {
  flex-direction: column;
  align-items: stretch;
  gap: 5px;
  margin-bottom: 6px;
  padding: 0 68px;
}

.ad-effect-rank-panel > .site-stats-more {
  position: absolute;
  top: 8px;
  right: 10px;
  margin: 0;
  padding-top: 0;
}

.ad-effect-rank-head h2 {
  align-self: center;
  width: max-content;
  max-width: 100%;
  border-radius: 999px;
  padding: 4px 10px;
  background: #ecfdf5;
  color: #065f46;
  font-size: 15px;
  line-height: 1.25;
}

.ad-effect-rank-panel .ad-effect-controls {
  display: none;
}

.ad-effect-rank-panel .ad-effect-controls > div {
  gap: 3px;
}

.ad-effect-rank-panel .button.tiny {
  min-height: 23px;
  padding: 2px 6px;
  font-size: 11px;
}

.ad-effect-rank-panel table {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  table-layout: fixed;
}

.ad-effect-rank-panel .table-wrap {
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: hidden;
}

.ad-effect-rank-panel th,
.ad-effect-rank-panel td {
  padding: 5px 8px;
  font-size: 13px;
  line-height: 1.25;
}

.ad-effect-rank-panel th:first-child,
.ad-effect-rank-panel td:first-child {
  width: auto;
}

.ad-effect-rank-panel th:not(:first-child),
.ad-effect-rank-panel td:not(:first-child) {
  white-space: nowrap;
  text-align: center;
}

.ad-effect-rank-panel th:nth-child(2),
.ad-effect-rank-panel td:nth-child(2) {
  width: 68px;
}

.ad-effect-rank-panel th:nth-child(3),
.ad-effect-rank-panel td:nth-child(3),
.ad-effect-rank-panel th:nth-child(4),
.ad-effect-rank-panel td:nth-child(4) {
  width: 56px;
}

.ad-effect-rank-panel th:nth-child(5),
.ad-effect-rank-panel td:nth-child(5) {
  width: 76px;
}

.ad-effect-rank-panel th:nth-child(6),
.ad-effect-rank-panel td:nth-child(6) {
  width: 66px;
}

.ad-effect-sort {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  cursor: pointer;
}

.ad-effect-sort span {
  color: #98a2b3;
  font-size: 12px;
}

.ad-effect-sort[data-direction="asc"] span,
.ad-effect-sort[data-direction="desc"] span {
  color: #2563eb;
}

.ad-effect-detail-dialog .site-stats-detail-panel {
  width: min(1080px, 100%);
}

.ad-effect-detail-dialog .ad-effect-controls {
  margin-bottom: 10px;
}

.pdd-authority-dialog-panel {
  position: relative;
  width: min(680px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(16, 24, 40, 0.2);
}

.pdd-authority-dialog-url {
  display: block;
  max-height: 180px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
  background: #f8fafc;
  overflow-wrap: anywhere;
  white-space: normal;
}

.pdd-authority-dialog-panel .actions {
  justify-content: center;
  margin-top: 12px;
}

.site-stats-more {
  display: flex;
  justify-content: center;
  padding-top: 10px;
}

.site-trend-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.75fr) minmax(260px, 0.75fr);
  gap: 10px;
  align-items: stretch;
}

.site-trend-layout .click-trend-panel,
.site-trend-layout .site-trend-side {
  margin: 0;
  min-width: 0;
}

.site-trend-side {
  display: contents;
  min-width: 0;
}

.site-trend-side .panel {
  margin: 0;
  min-width: 0;
}

.site-trend-layout .site-trend-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  box-sizing: border-box;
}

.site-trend-panel .click-trend-chart,
.site-trend-panel .click-trend-chart svg {
  width: 100%;
  max-width: 100%;
}

.site-trend-panel .click-trend-chart {
  flex: 1 1 auto;
  min-height: 105px;
}

.site-trend-area {
  fill: rgba(59, 130, 246, 0.18);
  pointer-events: none;
}

.site-trend-panel .click-trend-line.today {
  stroke: #3b82f6;
  stroke-width: 2.5;
}

.site-trend-panel .click-trend-line.yesterday {
  stroke: #93c5fd;
  stroke-width: 2;
}

.site-trend-panel .click-trend-legend i.yesterday,
.site-trend-panel .click-trend-tooltip .yesterday::before {
  background: #93c5fd;
}

.site-keyword-panel table {
  table-layout: fixed;
}

.site-anomaly-panel table {
  table-layout: fixed;
}

.site-anomaly-panel th,
.site-anomaly-panel td {
  padding-top: 6px;
  padding-bottom: 6px;
  font-size: 12px;
}

.site-anomaly-panel th:first-child,
.site-anomaly-panel td:first-child {
  width: auto;
}

.site-anomaly-panel th:nth-child(2),
.site-anomaly-panel td:nth-child(2),
.site-anomaly-panel th:nth-child(3),
.site-anomaly-panel td:nth-child(3),
.site-anomaly-panel th:nth-child(5),
.site-anomaly-panel td:nth-child(5) {
  width: 76px;
  white-space: nowrap;
}

.site-anomaly-panel th:nth-child(4),
.site-anomaly-panel td:nth-child(4) {
  width: 126px;
  white-space: nowrap;
}

.site-anomaly-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px 12px;
  margin: 0 0 7px;
  padding: 6px 8px;
  border-radius: 6px;
  background: #f8fafc;
  color: #475467;
  font-size: 12px;
  line-height: 1.35;
}

.site-anomaly-summary span {
  min-width: 0;
  white-space: nowrap;
}

.site-anomaly-summary strong {
  color: #101828;
}

.site-anomaly-summary b {
  color: #2563eb;
}

.site-keyword-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.site-rank-head {
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}

.site-rank-head h2 {
  white-space: nowrap;
}

.site-rank-head .site-keyword-actions {
  width: 100%;
  flex-wrap: nowrap;
}

/* Keep the operations dashboard dense without changing other admin pages. */
.metrics.site-stats-metrics {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.site-stats-metrics .metric {
  min-height: 66px;
  padding: 8px 10px;
  gap: 7px;
}

.site-stats-metrics .metric-icon {
  width: 30px;
  height: 30px;
}

.site-stats-metrics .metric-icon svg {
  width: 16px;
  height: 16px;
}

.site-stats-metrics .metric-copy {
  gap: 1px;
}

.site-stats-metrics .metric-copy strong {
  font-size: 25px;
  line-height: 1;
}

.site-stats-metrics .metric-quality {
  min-width: 0;
}

.site-stats-metrics .metric-quality .metric-copy strong {
  font-size: 13px;
  line-height: 1.5;
  white-space: nowrap;
}

.site-trend-panel {
  padding: 10px 14px 6px;
}

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

.site-trend-panel h2,
.site-keyword-panel h2,
.site-stats-filter h2 {
  font-size: 16px;
}

.site-trend-panel .click-trend-head small {
  font-size: 11px;
}

.site-trend-panel .click-trend-chart,
.site-trend-panel .click-trend-chart svg {
  height: 100%;
  min-height: 105px;
}

.site-trend-tabs {
  margin-bottom: 2px;
}

.site-trend-tabs .button {
  min-height: 28px;
  padding: 3px 8px;
}

.site-keyword-panel {
  padding: 10px 14px;
}

.site-keyword-panel .panel-head {
  margin-bottom: 6px;
}

.site-keyword-panel th,
.site-keyword-panel td {
  padding-top: 6px;
  padding-bottom: 6px;
  font-size: 12px;
}

.site-stats-filter {
  padding: 10px 14px;
}

.site-stats-filter .panel-head {
  margin-bottom: 6px;
}

.site-stats-filter .search-bar {
  margin-bottom: 0;
  gap: 6px;
}

.site-stats-filter .search-bar input,
.site-stats-filter .search-bar select,
.site-stats-filter .search-bar .date-field input,
.site-stats-filter .button {
  min-height: 34px;
  padding-top: 5px;
  padding-bottom: 5px;
}

.site-keyword-panel th:first-child,
.site-keyword-panel td:first-child {
  width: auto;
}

.site-keyword-panel th:nth-child(2),
.site-keyword-panel td:nth-child(2),
.site-keyword-panel th:nth-child(3),
.site-keyword-panel td:nth-child(3) {
  width: 64px;
  white-space: nowrap;
}

.site-stats-detail-panel {
  width: min(980px, 100%);
  max-height: min(780px, calc(100vh - 40px));
  overflow: auto;
}

.site-stats-detail-panel .pager {
  margin-bottom: 0;
}

.button.state-on {
  border-color: #86efac;
  background: #dcfce7;
  color: #166534;
}

.button.state-on:hover {
  border-color: #22c55e;
  background: #bbf7d0;
}

.button.state-off {
  border-color: #d0d5dd;
  background: #f2f4f7;
  color: #667085;
}

.button.state-off:hover {
  border-color: #98a2b3;
  background: #eaecf0;
}

.notice {
  border-radius: 6px;
  padding: 11px 13px;
  margin-bottom: 16px;
  font-weight: 700;
}

.notice.success {
  background: #ecfdf3;
  color: #027a48;
  border: 1px solid #abefc6;
}

.notice.error {
  background: #fef3f2;
  color: var(--red);
  border: 1px solid #fecdca;
}

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

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

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

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

.click-overview-metrics .metric {
  min-height: 88px;
}

.click-overview-metrics .metric-copy strong {
  font-variant-numeric: tabular-nums;
}

.record-overview-metrics .metric {
  min-height: 76px;
  padding: 12px 14px;
}

.record-overview-metrics .metric-copy strong {
  font-variant-numeric: tabular-nums;
}

.record-overview-metrics .metric-detail {
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
  white-space: nowrap;
}

.click-trend-panel {
  padding: 12px 18px 8px;
}

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

.click-trend-head > div:first-child {
  display: grid;
  gap: 4px;
}

.click-trend-head small {
  color: var(--muted);
  font-size: 12px;
}

.click-trend-legend {
  display: flex;
  align-items: center;
  gap: 18px;
  color: #475467;
  font-size: 13px;
  font-weight: 700;
}

.click-trend-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.click-trend-legend i {
  width: 22px;
  height: 3px;
  border-radius: 2px;
  background: #2563eb;
}

.click-trend-legend i.yesterday {
  background: #f59e0b;
}

.click-trend-chart {
  position: relative;
  width: 100%;
  height: 170px;
  min-height: 170px;
}

.click-trend-chart svg {
  display: block;
  width: 100%;
  height: 170px;
  max-height: none;
  overflow: hidden;
}

.click-chart-grid line {
  stroke: #e4e7ec;
  stroke-width: 1;
}

.click-chart-grid text,
.click-chart-x-labels text {
  fill: #667085;
  font-size: 12px;
  letter-spacing: 0;
}

.click-trend-line {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
}

.click-trend-line.today {
  stroke: #2563eb;
}

.click-trend-line.yesterday {
  stroke: #f59e0b;
}

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

.click-trend-hover-line {
  stroke: #98a2b3;
  stroke-width: 1;
  stroke-dasharray: 4 4;
  pointer-events: none;
}

.click-trend-hover-dot {
  stroke: #fff;
  stroke-width: 2;
  pointer-events: none;
}

.click-trend-hover-dot.today {
  fill: #2563eb;
}

.click-trend-hover-dot.yesterday {
  fill: #f59e0b;
}

.click-trend-tooltip {
  position: absolute;
  z-index: 4;
  display: grid;
  gap: 3px;
  min-width: 190px;
  border: 1px solid #d0d5dd;
  border-radius: 6px;
  padding: 8px 10px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(16, 24, 40, 0.14);
  color: #344054;
  font-size: 12px;
  line-height: 1.45;
  pointer-events: none;
}

.click-trend-tooltip[hidden] {
  display: none;
}

.click-trend-tooltip strong {
  font-size: 13px;
  color: #101828;
}

.click-trend-tooltip span {
  display: block;
  white-space: nowrap;
}

.click-trend-tooltip .today::before,
.click-trend-tooltip .yesterday::before {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 6px;
  border-radius: 50%;
  background: #2563eb;
  content: "";
}

.click-trend-tooltip .yesterday::before {
  background: #f59e0b;
}

.metric,
.panel,
.flow-strip {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(16, 24, 40, 0.045);
}

.metric {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
  padding: 16px;
}

.metric-icon {
  display: inline-grid !important;
  place-items: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: #eff6ff;
  color: #2563eb !important;
}

.metric-icon svg {
  width: 21px;
  height: 21px;
}

.metric-copy {
  display: grid !important;
  gap: 3px;
  min-width: 0;
}

.metric-copy > span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.metric-copy strong {
  display: block;
  font-size: 27px;
  line-height: 1.15;
}

.metric-orange .metric-icon {
  background: #fff4e5;
  color: #b54708 !important;
}

.metric-green .metric-icon {
  background: #ecfdf3;
  color: #067647 !important;
}

.metric-red .metric-icon {
  background: #fef3f2;
  color: #b42318 !important;
}

.metric-purple .metric-icon {
  background: #f4f0ff;
  color: #6941c6 !important;
}

.metric-teal .metric-icon {
  background: #ecfdf8;
  color: #0f766e !important;
}

.panel {
  min-width: 0;
  padding: 18px;
  margin-bottom: 16px;
}

.panel:hover {
  border-color: #d4dae3;
}

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

.panel-head h2 {
  margin: 0;
  font-size: 17px;
  color: #263244;
}

.panel-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
}

.panel-link svg {
  width: 15px;
  height: 15px;
}

.record-count {
  display: inline-block;
  margin-left: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  vertical-align: middle;
}

.search-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}

.search-bar input {
  width: min(100%, 360px);
}

.search-bar .search-keyword {
  flex: 1 1 300px;
}

.site-stats-filter .search-bar select[name="plan"] {
  width: 270px;
  flex: 0 0 270px;
}

.site-stats-filter .search-bar .search-keyword {
  flex: 0 1 350px;
  width: 350px;
}

@media (min-width: 641px) {
  .site-stats-filter .search-bar {
    flex-wrap: nowrap;
  }

  .site-stats-filter .search-bar .time-filter {
    flex: 0 0 auto;
    flex-wrap: nowrap;
  }

  .site-stats-filter .search-bar .date-field input {
    width: 165px;
  }

  .site-stats-filter .search-bar .time-quick {
    flex-wrap: nowrap;
  }
}

.search-bar .time-filter {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.search-bar.accent > button {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

.search-bar.accent > a.button {
  background: #dc2626;
  border-color: #dc2626;
  color: #fff;
}

.search-bar .search-back {
  background: #eef4ff;
  border-color: #93b4f7;
  color: #1d4ed8;
}

.search-bar .search-back:hover {
  background: #dbe8ff;
  border-color: #2563eb;
  color: #1e40af;
}

.search-bar .date-field {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: #475467;
  font-size: 13px;
  font-weight: 600;
}

.search-bar .date-field input {
  width: 190px;
  min-height: 38px;
}

.time-quick {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.time-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid #d0d5dd;
  border-radius: 7px;
  background: #fff;
  color: #344054;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.time-chip:hover {
  border-color: #2f63e7;
  color: #1d4ed8;
  background: #eff4ff;
}

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

.flow-strip {
  display: grid;
  grid-template-columns: 1fr 36px 1fr 36px 1fr 36px 1fr 36px 1fr;
  align-items: center;
  padding: 16px;
  margin-bottom: 16px;
}

.flow-strip div {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.flow-strip b {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: #dbeafe;
  color: var(--primary);
}

.flow-strip b svg {
  width: 17px;
  height: 17px;
}

.flow-strip span {
  font-weight: 700;
}

.flow-strip i {
  display: block;
  height: 2px;
  background: #cbd5e1;
}

.flow-strip i::after {
  content: "";
  display: block;
  width: 7px;
  height: 7px;
  margin-left: auto;
  margin-top: -3px;
  border-top: 2px solid #cbd5e1;
  border-right: 2px solid #cbd5e1;
  transform: rotate(45deg);
}

.kv {
  display: grid;
  gap: 10px;
  margin: 0;
}

.kv div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #eef2f6;
  padding-bottom: 9px;
}

.kv dt {
  color: var(--muted);
}

.kv dd {
  margin: 0;
  font-weight: 800;
}

.copyable {
  display: block;
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  background: #f8fafc;
}

.copy-list {
  display: grid;
  gap: 5px;
  min-width: 360px;
}

.copy-line {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.copy-line code {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 4px 7px;
  background: #f8fafc;
  color: #344054;
  white-space: nowrap;
}

.copy-account {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.copy-btn.copied {
  border-color: #12b76a;
  background: #ecfdf3;
  color: #027a48;
}

.copy-all-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

.link-groups {
  display: grid;
  gap: 14px;
}

.link-group-card {
  border: 1px solid #c9d7ec;
  border-left: 6px solid #155eef;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(16, 24, 40, 0.06);
}

.link-group-card:nth-child(2n) {
  border-left-color: #0086c9;
}

.link-group-card:nth-child(3n) {
  border-left-color: #12b76a;
}

.link-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  background: linear-gradient(180deg, #eef5ff 0%, #f8fbff 100%);
  border-bottom: 1px solid #cfe0f7;
}

.link-group-head strong {
  display: block;
  font-size: 17px;
  line-height: 1.15;
  color: #101828;
}

.link-group-head small {
  display: inline-flex;
  width: fit-content;
  margin-top: 0;
  border: 1px solid #b8cff5;
  border-radius: 999px;
  padding: 2px 8px;
  color: #175cd3;
  background: #fff;
  font-size: 12px;
  font-weight: 800;
}

.account-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: max-content;
}

.account-kicker {
  color: #155eef;
  font-size: 12px;
  font-weight: 900;
}

.link-group-head > .badge {
  border: 1px solid #c7d7fe;
  background: #eaf1ff;
  color: #175cd3;
  font-weight: 900;
}

.link-group-table {
  display: grid;
}

.link-name-groups {
  display: grid;
}

.link-name-group {
  border-bottom: 1px solid var(--line);
}

.link-name-group:last-child {
  border-bottom: 0;
}

.link-param-head {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1;
  min-width: 0;
  padding: 0;
  background: transparent;
  border-bottom: 0;
  color: #475467;
  font-size: 12px;
  font-weight: 700;
}

.link-param-head span {
  border: 1px solid #dbe3ec;
  border-radius: 6px;
  padding: 2px 7px;
  background: #fff;
  max-width: 100%;
  overflow-wrap: anywhere;
  line-height: 1.35;
}

.link-name-actions {
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 6px 12px;
  background: #fff;
  border-top: 1px solid #edf1f5;
}

.link-created-at {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border: 1px solid #dbe3ec;
  border-radius: 6px;
  padding: 3px 8px;
  background: #f8fafc;
  color: #475467;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.account-copy-bar {
  display: flex;
  justify-content: center;
  padding: 8px 12px 10px;
  background: #f8fafc;
  border-top: 1px solid var(--line);
}

.account-copy-btn {
  min-width: 220px;
  min-height: 36px;
  border-color: #155eef;
  background: linear-gradient(180deg, #2f6fed 0%, #155eef 100%);
  box-shadow: 0 8px 18px rgba(21, 94, 239, 0.2);
  font-size: 13px;
}

.account-copy-btn:hover {
  border-color: #004eeb;
  background: linear-gradient(180deg, #155eef 0%, #004eeb 100%);
}

.link-group-header,
.link-group-row {
  display: grid;
  grid-template-columns: minmax(170px, 0.72fr) minmax(82px, 0.24fr) minmax(320px, 1.28fr) minmax(260px, 0.72fr);
  gap: 8px;
  align-items: center;
  padding: 4px 10px;
  border-bottom: 1px solid #edf1f5;
}

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

.link-group-header {
  color: #475467;
  background: #fff;
  font-size: 12px;
  font-weight: 800;
}

.link-target {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link-name-cell {
  display: inline-flex;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 1px solid #dbe3ec;
  border-radius: 6px;
  padding: 2px 7px;
  color: #344054;
  background: #f8fafc;
  font-weight: 700;
}

.link-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}

.link-status small {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  margin-top: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link-status .badge {
  flex: 0 0 auto;
}

.split-link-list {
  display: grid;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.split-link-head,
.split-link-row {
  display: grid;
  grid-template-columns: minmax(190px, 0.6fr) minmax(280px, 1fr) 92px;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border-bottom: 1px solid #edf1f5;
}

.split-link-head {
  color: #475467;
  background: #f8fafc;
  font-size: 12px;
  font-weight: 800;
}

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

.split-link-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.split-link-check span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.split-link-check small {
  color: var(--muted);
  font-size: 12px;
}

.split-link-row code {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 5px 7px;
  background: #f8fafc;
  color: #344054;
}

.split-weight {
  min-height: 32px;
}

.split-groups {
  gap: 12px;
}

.split-search-panel {
  padding: 12px 14px;
}

.split-search-bar {
  margin: 0;
  flex-wrap: nowrap;
}

.split-search-bar .search-keyword {
  max-width: 520px;
}

.split-batch-panel {
  overflow: visible;
  padding: 12px 14px 14px;
}

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

.split-batch-form {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(210px, 0.72fr) minmax(380px, 1.45fr) auto;
  align-items: end;
  gap: 10px;
}

.split-batch-field {
  display: grid;
  gap: 6px;
  min-width: 0;
  margin: 0;
}

.split-batch-field > .label-text {
  min-height: 20px;
  white-space: nowrap;
}

.split-batch-multiselect {
  width: 100%;
}

.split-batch-multiselect .multi-select-toggle,
.split-batch-url input,
.split-batch-form > .button {
  min-height: 38px;
}

.split-batch-form > .button {
  white-space: nowrap;
}

.split-batch-multiselect .multi-select-menu {
  max-height: 320px;
}

.split-batch-dialog-panel {
  width: min(760px, 100%);
}

.split-batch-result-table {
  max-height: 360px;
  overflow: auto;
}

.split-batch-result-table td:nth-child(2) {
  max-width: 390px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.split-batch-result-url {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.split-batch-result-url > span {
  color: #344054;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.split-batch-result-url code {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  background: #f8fafc;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.split-search-empty {
  margin: 0;
  border: 1px dashed #cbd5e1;
  border-radius: 6px;
  background: #fff;
}

[hidden] {
  display: none !important;
}

.split-account-card {
  border-left-width: 5px;
  overflow: visible;
}

.split-account-head {
  gap: 10px;
  border-bottom: 1px solid #edf1f5;
}

.split-card-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  min-width: 0;
}

.split-card-controls .checkline {
  align-self: flex-end;
  min-height: 36px;
}

.split-mode-control {
  display: grid;
  grid-template-columns: auto minmax(160px, 220px);
  align-items: center;
  gap: 10px;
  width: min(360px, 100%);
}

.split-mode-control select {
  min-height: 36px;
  padding: 7px 10px;
}

.split-entry-bar {
  display: grid;
  grid-template-columns: auto minmax(260px, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.split-entry-bar > span {
  color: #344054;
  font-size: 13px;
  font-weight: 800;
}

.split-entry-copy {
  min-width: 128px;
}

.split-bottom-bar {
  display: grid;
  gap: 8px;
  padding: 8px 10px 10px;
  background: #f8fafc;
  border-top: 1px solid #edf1f5;
}

.split-group-bottom {
  grid-template-columns: auto minmax(200px, 0.55fr) auto minmax(150px, 180px) auto auto auto auto minmax(300px, 1fr);
  align-items: center;
  gap: 10px;
}

.split-group-bottom > .split-entry-bar,
.split-group-bottom > .split-settings-row,
.split-group-bottom .split-fallback-control,
.split-group-bottom .split-card-controls,
.split-group-bottom .split-mode-control {
  display: contents;
}

.split-group-bottom .copy-line,
.split-group-bottom input,
.split-group-bottom select {
  min-width: 0;
}

.split-group-bottom .label-text,
.split-group-bottom .checkline,
.split-group-bottom .button,
.split-group-bottom > .badge {
  white-space: nowrap;
}

.split-group-bottom .button {
  min-height: 32px;
  padding: 5px 10px;
  font-size: 13px;
}

.split-settings-row {
  display: grid;
  grid-template-columns: minmax(420px, 620px) minmax(0, 1fr);
  gap: 18px;
  align-items: end;
}

.split-fallback-control {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.split-mode-control > .label-text,
.split-fallback-control > .label-text {
  flex-wrap: nowrap;
  white-space: nowrap;
}

.split-fallback-control input {
  min-height: 36px;
  padding: 7px 10px;
}

.split-bottom-bar .split-card-controls {
  align-items: flex-end;
  justify-content: flex-start;
  padding-left: 0;
}

.split-card-controls > .badge {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  white-space: nowrap;
}

.split-param-groups {
  display: grid;
  gap: 10px;
  padding: 10px;
  background: #f8fafc;
}

.split-param-group {
  position: relative;
  overflow: visible;
  border: 1px solid #c9d7ec;
  border-left: 5px solid #155eef;
  border-radius: 8px;
  background: #fff;
}

.split-param-group:hover,
.split-param-group:focus-within {
  z-index: 5;
}

.split-param-group:nth-child(2n) {
  border-left-color: #0086c9;
}

.split-param-group:nth-child(3n) {
  border-left-color: #12b76a;
}

.split-param-title {
  display: grid;
  grid-template-columns: 70px minmax(210px, 330px) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 7px 10px;
  border-bottom: 1px solid #edf1f5;
  background: #fff;
}

.split-param-title-spacer {
  display: block;
}

.split-param-title-main {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  white-space: nowrap;
}

.split-param-title-main strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #101828;
  font-size: 14px;
  line-height: 1.2;
}

.split-param-title-main > .badge {
  flex: 0 0 auto;
  min-height: 22px;
}

.split-param-badges {
  justify-content: flex-start;
  flex-wrap: nowrap;
  overflow: hidden;
  white-space: nowrap;
}

.split-param-badges > span {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.split-param-badges > .split-param-chip {
  flex: 0 1 var(--split-chip-width, 130px);
  width: var(--split-chip-width, 130px);
  min-width: 64px;
  max-width: var(--split-chip-max, var(--split-chip-width, 130px));
  cursor: help;
}

.split-param-platform {
  --split-chip-width: 110px;
}

.split-param-provider {
  --split-chip-width: 150px;
}

.split-param-client-id {
  --split-chip-width: 138px;
}

.split-param-secret {
  --split-chip-width: 158px;
}

.split-param-pid {
  --split-chip-width: 122px;
}

.split-param-pid-wide {
  --split-chip-width: 185px;
}

.split-param-apikey {
  --split-chip-width: 190px;
}

.split-param-appkey {
  --split-chip-width: 118px;
}

.split-param-session {
  --split-chip-width: 165px;
}

.split-param-numeric-id {
  --split-chip-width: 118px;
}

.split-param-parsed {
  --split-chip-width: 150px;
}

.split-param-badges > .split-param-url {
  --split-chip-width: 300px;
  --split-chip-max: 480px;
  flex: 1 1 260px;
  min-width: 200px;
}

.link-param-head .split-platform-param.taobao {
  border-color: #fed7aa;
  background: #fff4e5;
  color: #b54708;
}

.link-param-head .split-platform-param.pdd {
  border-color: #fecdca;
  background: #fff1f0;
  color: #b42318;
}

.link-param-head .split-platform-param.jd {
  border-color: #abefc6;
  background: #ecfdf3;
  color: #067647;
}

.split-sync-list {
  display: grid;
  background: #fff;
}

.split-sync-head,
.split-sync-row {
  display: grid;
  grid-template-columns: 70px minmax(300px, 1fr) 82px;
  gap: 10px;
  align-items: center;
  padding: 6px 10px;
  border-bottom: 1px solid #edf1f5;
}

.split-sync-head {
  color: #475467;
  background: #fff;
  font-size: 12px;
  font-weight: 800;
}

.split-combined-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 40px;
}

.split-combined-main {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  flex: 1 1 auto;
}

.split-combined-main .split-param-title-main {
  flex: 0 1 auto;
  max-width: 240px;
}

.split-link-column-label {
  flex: 0 0 auto;
  color: #475467;
}

.split-combined-main .split-param-badges {
  flex: 1 1 auto;
  min-width: 0;
}

.split-layout-note {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
  color: #475467;
  white-space: nowrap;
}

.split-link-pair-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 6px 10px;
  border-bottom: 1px solid #edf1f5;
  background: #fff;
}

.split-link-item {
  display: grid;
  grid-template-columns: 58px minmax(180px, 1fr) 92px;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.split-link-item:first-child {
  padding-right: 10px;
  border-right: 1px solid #edf1f5;
}

.split-link-item-placeholder {
  min-height: 32px;
}

.split-weight-control {
  display: grid;
  grid-template-columns: auto 54px;
  align-items: center;
  gap: 5px;
  min-width: 0;
  color: #475467;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.split-link-item .split-weight {
  width: 54px;
  min-height: 30px;
  padding: 5px 6px;
}

.split-sync-head > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.split-sync-head > span:last-child {
  justify-content: flex-end;
}

.split-sync-head > span:last-child .help-tip::after {
  left: auto;
  right: 0;
  max-width: min(280px, calc(100vw - 40px));
  transform: translateX(0) translateY(4px);
}

.split-sync-head > span:last-child .help-tip:hover::after,
.split-sync-head > span:last-child .help-tip:focus::after {
  transform: translateX(0) translateY(0);
}

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

.split-sync-list:not(.is-expanded) .split-sync-extra {
  display: none;
}

.split-collapse-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 36px;
  border: 0;
  border-bottom: 1px solid #edf1f5;
  padding: 7px 12px;
  background: #f8fafc;
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.split-collapse-toggle:hover {
  background: #eff6ff;
}

.split-collapse-toggle span {
  align-items: center;
  gap: 5px;
}

.split-collapse-toggle svg {
  width: 15px;
  height: 15px;
}

.split-collapse-closed {
  display: inline-flex;
}

.split-collapse-open {
  display: none;
}

.split-sync-list.is-expanded .split-collapse-closed {
  display: none;
}

.split-sync-list.is-expanded .split-collapse-open {
  display: inline-flex;
}

.split-sync-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #344054;
  font-size: 13px;
  font-weight: 800;
}

.split-sync-check input {
  width: auto;
}

.split-sync-check label {
  display: inline-flex;
  width: auto;
  cursor: pointer;
}

.split-sync-link {
  min-width: 0;
}

.split-sync-link code {
  display: block;
  width: min(100%, 900px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 4px 7px;
  background: #f8fafc;
  color: #344054;
}

.split-sync-name {
  display: grid;
  gap: 2px;
  width: min(100%, 260px);
  min-width: 0;
}

.split-sync-name strong,
.split-sync-name small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.split-sync-name strong {
  color: #344054;
  font-size: 13px;
}

.split-sync-name small {
  color: var(--muted);
  font-size: 12px;
}

.split-sync-row .split-weight {
  min-height: 30px;
  padding: 5px 7px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  background: #fff;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.resizable-data-table {
  table-layout: fixed;
}

.resizable-data-table th {
  position: relative;
  padding-right: 12px;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
  user-select: none;
}

.resizable-data-table[data-column-reorder] th {
  cursor: grab;
}

.resizable-data-table[data-column-reorder] th:active,
.resizable-data-table.is-column-reordering th {
  cursor: grabbing;
}

.resizable-data-table[data-column-reorder] .column-resize-handle {
  cursor: col-resize;
}

.resizable-data-table td {
  max-width: 0;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}

.site-visits-table td {
  display: table-cell;
}

.resizable-data-table td > strong,
.resizable-data-table td > span:not(.platform-badge):not(.badge),
.resizable-data-table td small {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}

.resizable-data-table .platform-badge {
  max-width: 100%;
  height: auto;
  min-height: 24px;
  overflow-wrap: anywhere;
  text-align: center;
  white-space: normal;
}

.resizable-data-table .truncate,
.resizable-data-table .bdvid-cell,
.resizable-data-table .click-cell-ellipsis,
.resizable-data-table .account-cell,
.resizable-data-table .account-cell strong,
.resizable-data-table .account-cell small {
  max-width: 100%;
  overflow-wrap: anywhere;
  text-overflow: clip;
  word-break: break-word;
  white-space: normal;
}

.column-resize-handle {
  position: absolute;
  z-index: 2;
  top: 0;
  right: -8px;
  width: 16px;
  height: 100%;
  cursor: col-resize;
  touch-action: none;
}

.column-resize-handle::after {
  position: absolute;
  top: 20%;
  right: 7px;
  width: 1px;
  height: 60%;
  background: #cbd5e1;
  content: "";
}

.column-resize-handle:hover::after,
.column-resize-handle.active::after {
  width: 2px;
  background: var(--primary);
}

.resizable-data-table.is-column-resizing,
.resizable-data-table.is-column-resizing * {
  cursor: col-resize !important;
  user-select: none !important;
}

th,
td {
  padding: 11px 10px;
  border-bottom: 1px solid #edf1f5;
  text-align: left;
  vertical-align: top;
}

th {
  color: #344054;
  background: #f5f7fa;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

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

tbody tr:hover {
  background: #f3f7ff;
}

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

td small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.35;
}

.platform-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.platform-badge.taobao {
  color: #b54708;
  background: #fff4e5;
  border-color: #fed7aa;
}

.platform-badge.pdd {
  color: #b42318;
  background: #fff1f0;
  border-color: #fecdca;
}

.platform-badge.jd {
  color: #067647;
  background: #ecfdf3;
  border-color: #abefc6;
}

.jd-group-card {
  border-left-color: #079455;
}

.bdvid-cell {
  display: block;
  min-width: 150px;
  max-width: 280px;
  overflow-wrap: anywhere;
  word-break: break-all;
  color: #344054;
}

.token-cell {
  display: block;
  max-width: 420px;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-all;
  color: #344054;
}

.truncate {
  max-width: 380px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.click-record-table {
  min-width: 0;
}

.click-record-table.compact {
  min-width: 1080px;
}

.click-record-table td {
  overflow: hidden;
  padding-top: 8px;
  padding-bottom: 8px;
}

.click-record-table td small,
.click-cell-ellipsis {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.click-record-table .bdvid-cell {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  word-break: normal;
}

.click-record-table .truncate {
  max-width: none;
}

.account-cell,
.account-cell strong,
.account-cell small {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.resizable-data-table.click-record-table td small,
.resizable-data-table.click-record-table .click-cell-ellipsis,
.resizable-data-table.click-record-table .account-cell,
.resizable-data-table.click-record-table .account-cell strong,
.resizable-data-table.click-record-table .account-cell small {
  overflow-wrap: normal;
  text-overflow: ellipsis;
  word-break: normal;
  white-space: nowrap;
}

.resizable-data-table td {
  overflow-wrap: normal;
  text-overflow: ellipsis;
  word-break: normal;
  white-space: nowrap;
}

.resizable-data-table td > strong,
.resizable-data-table td > span,
.resizable-data-table td small,
.resizable-data-table .truncate,
.resizable-data-table .bdvid-cell,
.resizable-data-table .click-cell-ellipsis,
.resizable-data-table .account-cell,
.resizable-data-table .account-cell strong,
.resizable-data-table .account-cell small {
  display: block;
  max-width: 100%;
  overflow: hidden;
  overflow-wrap: normal;
  text-overflow: ellipsis;
  word-break: normal;
  white-space: nowrap;
}

.resizable-data-table td > .platform-badge,
.resizable-data-table td > .badge,
.resizable-data-table td small > .badge {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Website visits must remain one compact row after columns are resized. */
.resizable-data-table.site-visits-table td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  word-break: normal;
  overflow-wrap: normal;
}

.resizable-data-table.site-visits-table td > .truncate {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  word-break: normal;
  overflow-wrap: normal;
}

.site-visits-table td[data-column-key="plan"],
.site-visits-table td[data-column-key="page"],
.site-visits-table td[data-column-key="bd_vid"],
.site-visits-table td[data-column-key="keyword"],
.site-visits-table td[data-column-key="ip"] {
  cursor: pointer;
}

.mobile-clicks-table td[data-column-key="account"],
.mobile-clicks-table td[data-column-key="keyword"],
.mobile-clicks-table td[data-column-key="bd_vid"],
.mobile-clicks-table td[data-column-key="logid_url"],
.mobile-clicks-table td[data-column-key="platform"],
.mobile-clicks-table td[data-column-key="link_name"],
.mobile-clicks-table td[data-column-key="ip_ua"],
.mobile-clicks-table td[data-column-key="target"],
.conversion-orders-table td[data-column-key="order_no"],
.conversion-orders-table td[data-column-key="platform"],
.conversion-orders-table td[data-column-key="account"],
.conversion-orders-table td[data-column-key="bd_vid"],
.conversion-orders-table td[data-column-key="ip"],
.conversion-orders-table td[data-column-key="link_name"],
.conversion-orders-table td[data-column-key="keyword"],
.conversion-orders-table td[data-column-key="product"],
.conversion-orders-table td[data-column-key="order_status"],
.conversion-orders-table td[data-column-key="attribution_status"],
.conversion-orders-table td[data-column-key="attribution_rule"],
.conversion-orders-table td[data-column-key="callback_status"],
.conversion-orders-table td[data-column-key="callback_message"] {
  cursor: pointer;
}

.log-table {
  table-layout: fixed;
  min-width: 760px;
}

.log-col-time {
  width: 150px;
}

.log-col-level {
  width: 72px;
}

.log-col-category {
  width: 100px;
}

.log-time,
.log-level,
.log-category {
  white-space: nowrap;
}

.log-content {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.log-content > strong {
  display: block;
  color: #344054;
  line-height: 1.4;
}

.log-detail {
  margin-top: 5px;
  color: var(--muted);
}

.log-detail summary {
  width: max-content;
  cursor: pointer;
  color: #175cd3;
  font-size: 12px;
  font-weight: 700;
}

.log-detail pre {
  max-height: 220px;
  margin: 7px 0 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px;
  background: #f8fafc;
  color: #475467;
  font: 12px/1.45 "Cascadia Mono", Consolas, monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

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

.actions form {
  margin: 0;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
}

.pager-links,
.pager-size {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pager a,
.pager span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 5px 9px;
  background: #fff;
  color: #344054;
  font-weight: 700;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.pager > span,
.pager-size span {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
}

.pager a:hover,
.pager a.active {
  border-color: var(--primary);
  background: #eff6ff;
  color: var(--primary);
}

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

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  border-radius: 999px;
  padding: 2px 7px;
  font-size: 12px;
  font-weight: 800;
  background: #eef2f6;
  color: #475467;
}

.badge.ok {
  background: #dcfae6;
  color: var(--teal);
}

.badge.warn {
  background: #fef0c7;
  color: var(--amber);
}

.badge.danger {
  background: #fee4e2;
  color: var(--red);
}

.badge.muted {
  background: #eef2f6;
  color: #667085;
}

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

.money {
  font-weight: 800;
  color: #14532d;
}

.task-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.task-row form {
  display: flex;
  gap: 8px;
  align-items: center;
}

.task-row input {
  width: 92px;
}

.inline-field {
  display: flex;
  align-items: center;
  gap: 8px;
}

.inline-field input {
  width: 92px;
}

.retry-settings-form {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 10px;
}

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

.retry-settings-grid .panel {
  margin: 0;
}

@media (max-width: 1100px) {
  .metrics.ad-effect-metrics {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .ad-effect-metrics .ad-effect-amount-card {
    grid-column: auto;
  }

  .ad-effect-metrics .metric {
    padding: 7px 6px;
  }

  .ad-effect-metrics .metric-icon {
    display: none !important;
  }

  .ad-effect-metrics .metric-copy > span {
    font-size: 12px;
  }

  .ad-effect-ratio-card .metric-copy strong,
  .ad-effect-amount-card .metric-copy strong,
  .ad-effect-deal-card .metric-copy strong,
  .ad-effect-two-line-card .metric-copy strong {
    font-size: 13px;
  }

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

  .metrics.site-stats-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .retry-settings-grid {
    grid-template-columns: 1fr;
  }
}

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

  .ad-effect-metrics .ad-effect-amount-card {
    grid-column: 1 / -1;
  }
}

.retry-settings-form .inline-field {
  min-width: 260px;
}

.retry-settings-form input {
  width: 120px;
}

.manual-tasks-panel,
.compact-retry-panel,
.cleanup-settings-panel {
  padding: 12px 16px;
}

.manual-tasks-panel .panel-head,
.compact-retry-panel .panel-head,
.cleanup-settings-panel .panel-head {
  margin-bottom: 8px;
}

.manual-tasks-panel .task-row {
  gap: 8px;
}

.manual-tasks-panel .button,
.compact-retry-panel .button,
.cleanup-settings-panel .button {
  min-height: 34px;
  padding-top: 6px;
  padding-bottom: 6px;
}

.manual-tasks-panel input,
.compact-retry-panel input,
.cleanup-settings-panel input[type="number"] {
  min-height: 34px;
  padding-top: 6px;
  padding-bottom: 6px;
}

.manual-tasks-panel > .muted,
.compact-retry-panel > .muted {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.45;
}

.compact-retry-grid {
  width: 100%;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.compact-retry-panel {
  width: 100%;
}

.compact-retry-panel .retry-settings-form {
  flex-wrap: nowrap;
  gap: 8px;
}

.compact-retry-panel .retry-settings-form .inline-field {
  min-width: 0;
}

.compact-retry-panel .retry-settings-form input {
  width: 72px;
}

.cleanup-settings-form {
  gap: 8px;
}

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

.cleanup-settings-form .multi-checks {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.cleanup-settings-panel {
  width: 100%;
}

.cleanup-settings-form .grid-form.wide input {
  width: 112px;
}

.cleanup-settings-form .check-card {
  min-height: 48px;
  padding: 7px 10px;
}

.cleanup-settings-form .form-field,
.cleanup-settings-form .actions {
  margin: 0;
}

@media (max-width: 1200px) {
  .compact-retry-grid {
    grid-template-columns: 1fr;
  }

  .cleanup-settings-form .grid-form.wide,
  .cleanup-settings-form .multi-checks {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cleanup-settings-form .grid-form.wide input {
    width: 112px;
  }
}

.inline-retry {
  margin: 0;
}

.site-plan-panel {
  margin-top: 16px;
}

.site-plan-create-form {
  display: grid;
  grid-template-columns: minmax(360px, 620px) auto;
  align-items: end;
  gap: 10px;
  margin-bottom: 10px;
}

.site-plan-create-form label {
  display: grid;
  gap: 6px;
  color: #344054;
  font-size: 13px;
  font-weight: 700;
}

.site-plan-create-form input {
  min-width: 0;
}

.site-plan-panel .field-hint {
  margin: 0 0 10px;
}

.site-plan-table {
  table-layout: fixed;
}

.site-plan-table th:nth-child(1) {
  width: 22%;
}

.site-plan-table th:nth-child(2) {
  width: 18%;
}

.site-plan-table th:nth-child(3) {
  width: 42%;
}

.site-plan-table th:nth-child(4) {
  width: 18%;
}

.site-plan-name {
  font-weight: 800;
}

.site-plan-code-list {
  display: grid;
  gap: 5px;
}

.site-plan-code-list > div {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 6px;
}

.site-plan-code-list span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.site-plan-code-list code {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-plan-code-list .button {
  display: inline-grid;
  place-items: center;
  min-width: 30px;
  min-height: 30px;
  padding: 0;
}

.site-plan-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.site-plan-actions .button {
  min-height: 30px;
}

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

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

  .site-plan-create-form .button {
    width: 100%;
  }

  .site-plan-table th:nth-child(2),
  .site-plan-table td:nth-child(2),
  .site-plan-table th:nth-child(3),
  .site-plan-table td:nth-child(3) {
    display: none;
  }

  .site-plan-table th:nth-child(1) {
    width: 58%;
  }

  .site-plan-table th:nth-child(4) {
    width: 42%;
  }
}

.guide-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.guide-index {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.guide-index a {
  border-radius: 6px;
  padding: 8px 10px;
  color: #344054;
  font-size: 13px;
  font-weight: 700;
}

.guide-index a:hover {
  background: #f1f5f9;
  color: var(--primary);
}

.guide-content {
  min-width: 0;
}

.guide-section {
  scroll-margin-top: 18px;
}

.guide-section h3 {
  margin: 18px 0 8px;
  font-size: 15px;
}

.guide-section p {
  line-height: 1.75;
}

.guide-steps {
  margin: 0;
  padding-left: 22px;
}

.guide-steps li {
  margin: 9px 0;
  line-height: 1.75;
}

pre {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0f172a;
  color: #e2e8f0;
  padding: 14px;
  line-height: 1.55;
}

pre code {
  color: inherit;
}

.callout {
  border: 1px solid #b2ddff;
  border-radius: 8px;
  background: #eff8ff;
  color: #1849a9;
  padding: 12px 14px;
  line-height: 1.7;
}

.callout.warning {
  border-color: #fedf89;
  background: #fffaeb;
  color: #93370d;
}

.callout.danger {
  border-color: #fecdca;
  background: #fef3f2;
  color: var(--red);
}

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

  .sidebar {
    position: static;
    height: auto;
  }

  .mobile-nav-toggle {
    display: inline-grid;
    margin-left: auto;
  }

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

  .sidebar.nav-open nav {
    display: grid;
  }

  .sidebar .logout-form {
    display: none;
  }

  .sidebar.nav-open .logout-form {
    display: block;
    margin-top: 12px;
  }

  .metrics,
  .split,
  .grid-form,
  .grid-form.wide,
  .multi-checks {
    grid-template-columns: 1fr;
  }

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

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

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

  .click-overview-metrics .metric:last-child {
    grid-column: 1 / -1;
  }

  .record-overview-metrics .metric:last-child {
    grid-column: 1 / -1;
  }

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

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

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

  .guide-index {
    position: static;
  }

  .flow-strip i {
    display: none;
  }
}

@media (max-width: 640px) {
  .content,
  .login-shell {
    padding: 16px;
  }

  .sidebar nav {
    grid-template-columns: 1fr;
  }

  .panel-head,
  .page-head {
    align-items: flex-start;
    flex-direction: column;
  }

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

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

  .page-title-icon {
    width: 38px;
    height: 38px;
  }

  .panel {
    padding: 14px;
  }

  .panel-head > .button,
  .panel-head > .muted,
  .panel-head > .panel-link {
    max-width: 100%;
  }

  .search-bar,
  .search-bar .time-filter,
  .search-bar .date-field {
    align-items: stretch;
    width: 100%;
  }

  .search-bar .search-keyword,
  .search-bar input,
  .search-bar .date-field input {
    width: 100%;
    flex: 1 1 100%;
  }

  .site-stats-filter .search-bar select[name="plan"] {
    width: 100%;
    flex: 1 1 100%;
  }

  .search-bar .date-field {
    flex-wrap: wrap;
  }

  .time-quick {
    width: 100%;
  }

  .compact-account-field,
  .compact-config-form .pdd-authority-box,
  .split-batch-form,
  .split-group-bottom,
  .split-link-pair-row,
  .split-link-item {
    grid-template-columns: 1fr;
  }

  .compact-account-field > span,
  .compact-config-form .pdd-authority-box > span {
    white-space: normal;
  }

  .compact-config-form .pdd-authority-message {
    grid-column: auto;
  }

  .compact-config-form .pdd-authority-actions,
  .compact-form-actions {
    flex-wrap: wrap;
  }

  .split-param-badges {
    flex-wrap: wrap;
    overflow: visible;
    white-space: normal;
  }

  .split-param-badges > .split-param-chip,
  .split-param-badges > .split-param-url {
    flex: 1 1 100%;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .split-entry-copy,
  .split-group-bottom .button,
  .compact-form-actions .button {
    width: 100%;
  }

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

  .click-overview-metrics .metric {
    align-items: center;
    min-height: 76px;
    padding: 14px;
  }

  .click-overview-metrics .metric-icon {
    display: grid !important;
    place-items: center;
    width: 40px;
    height: 40px;
    line-height: 0;
    overflow: hidden;
  }

  .click-overview-metrics .metric-icon svg {
    display: block;
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
  }

  .click-overview-metrics .metric:last-child {
    grid-column: auto;
  }

  .click-overview-metrics .metric:has([data-click-metric="history"]) {
    display: none;
  }

  .record-overview-metrics .metric:last-child {
    grid-column: 1 / -1;
  }

  /* Mobile record tables retain only the fields needed for quick scanning. */
  .mobile-clicks-table,
  .mobile-orders-table,
  .mobile-attributions-table,
  .mobile-callbacks-table {
    width: 100% !important;
    min-width: 0 !important;
    table-layout: fixed;
    font-size: 12px;
  }

  .mobile-clicks-table th,
  .mobile-clicks-table td,
  .mobile-orders-table th,
  .mobile-orders-table td,
  .mobile-attributions-table th,
  .mobile-attributions-table td,
  .mobile-callbacks-table th,
  .mobile-callbacks-table td {
    padding: 8px 6px;
  }

  .mobile-clicks-table col:nth-child(4),
  .mobile-clicks-table col:nth-child(5),
  .mobile-clicks-table col:nth-child(8),
  .mobile-clicks-table col:nth-child(9),
  .mobile-clicks-table col:nth-child(10),
  .mobile-clicks-table th:nth-child(4),
  .mobile-clicks-table th:nth-child(5),
  .mobile-clicks-table th:nth-child(8),
  .mobile-clicks-table th:nth-child(9),
  .mobile-clicks-table th:nth-child(10),
  .mobile-clicks-table td:nth-child(4),
  .mobile-clicks-table td:nth-child(5),
  .mobile-clicks-table td:nth-child(8),
  .mobile-clicks-table td:nth-child(9),
  .mobile-clicks-table td:nth-child(10),
  .mobile-orders-table col:nth-child(1),
  .mobile-orders-table col:nth-child(3),
  .mobile-orders-table col:nth-child(4),
  .mobile-orders-table col:nth-child(6),
  .mobile-orders-table col:nth-child(7),
  .mobile-orders-table col:nth-child(9),
  .mobile-orders-table col:nth-child(11),
  .mobile-orders-table th:nth-child(1),
  .mobile-orders-table th:nth-child(3),
  .mobile-orders-table th:nth-child(4),
  .mobile-orders-table th:nth-child(6),
  .mobile-orders-table th:nth-child(7),
  .mobile-orders-table th:nth-child(9),
  .mobile-orders-table th:nth-child(11),
  .mobile-orders-table td:nth-child(1),
  .mobile-orders-table td:nth-child(3),
  .mobile-orders-table td:nth-child(4),
  .mobile-orders-table td:nth-child(6),
  .mobile-orders-table td:nth-child(7),
  .mobile-orders-table td:nth-child(9),
  .mobile-orders-table td:nth-child(11),
  .mobile-attributions-table col:nth-child(1),
  .mobile-attributions-table col:nth-child(2),
  .mobile-attributions-table col:nth-child(4),
  .mobile-attributions-table col:nth-child(6),
  .mobile-attributions-table col:nth-child(7),
  .mobile-attributions-table col:nth-child(8),
  .mobile-attributions-table th:nth-child(1),
  .mobile-attributions-table th:nth-child(2),
  .mobile-attributions-table th:nth-child(4),
  .mobile-attributions-table th:nth-child(6),
  .mobile-attributions-table th:nth-child(7),
  .mobile-attributions-table th:nth-child(8),
  .mobile-attributions-table td:nth-child(1),
  .mobile-attributions-table td:nth-child(2),
  .mobile-attributions-table td:nth-child(4),
  .mobile-attributions-table td:nth-child(6),
  .mobile-attributions-table td:nth-child(7),
  .mobile-attributions-table td:nth-child(8),
  .mobile-callbacks-table col:nth-child(1),
  .mobile-callbacks-table col:nth-child(2),
  .mobile-callbacks-table col:nth-child(4),
  .mobile-callbacks-table col:nth-child(6),
  .mobile-callbacks-table col:nth-child(9),
  .mobile-callbacks-table col:nth-child(10),
  .mobile-callbacks-table col:nth-child(11),
  .mobile-callbacks-table col:nth-child(12),
  .mobile-callbacks-table th:nth-child(1),
  .mobile-callbacks-table th:nth-child(2),
  .mobile-callbacks-table th:nth-child(4),
  .mobile-callbacks-table th:nth-child(6),
  .mobile-callbacks-table th:nth-child(9),
  .mobile-callbacks-table th:nth-child(10),
  .mobile-callbacks-table th:nth-child(11),
  .mobile-callbacks-table th:nth-child(12),
  .mobile-callbacks-table td:nth-child(1),
  .mobile-callbacks-table td:nth-child(2),
  .mobile-callbacks-table td:nth-child(4),
  .mobile-callbacks-table td:nth-child(6),
  .mobile-callbacks-table td:nth-child(9),
  .mobile-callbacks-table td:nth-child(10),
  .mobile-callbacks-table td:nth-child(11),
  .mobile-callbacks-table td:nth-child(12) {
    display: none;
  }

  .click-trend-legend {
    flex-wrap: wrap;
  }

  .click-trend-chart {
    height: 150px;
    min-height: 150px;
  }

  .click-trend-chart svg {
    height: 150px;
  }

  .task-row,
  .task-row form {
    width: 100%;
  }

  .task-row input,
  .task-row button {
    flex: 1;
  }

  .compact-retry-panel .retry-settings-form {
    flex-wrap: wrap;
  }

  .compact-retry-panel .retry-settings-form .inline-field {
    width: 100%;
  }

  .compact-retry-panel .retry-settings-form input {
    flex: 1;
  }

  .compact-retry-panel .retry-settings-form .button {
    width: 100%;
  }

  .cleanup-settings-form .grid-form.wide,
  .cleanup-settings-form .multi-checks {
    grid-template-columns: 1fr;
  }

  .cleanup-settings-form .grid-form.wide input {
    width: 100%;
  }

  .copy-line {
    grid-template-columns: 1fr;
  }

  .copy-list {
    min-width: 100%;
  }

  .link-group-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .account-title {
    flex-wrap: wrap;
  }

  .link-param-head {
    width: 100%;
  }

  .link-group-header {
    display: none;
  }

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

  .split-link-head {
    display: none;
  }

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

  .split-card-controls {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }

  .split-mode-control {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .split-bottom-bar {
    grid-template-columns: 1fr;
  }

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

  .split-bottom-bar .split-card-controls {
    padding-left: 0;
  }

  .split-entry-bar,
  .split-sync-row {
    grid-template-columns: 1fr;
  }

  .split-param-title {
    grid-template-columns: 1fr;
  }

  .split-param-title-spacer {
    display: none;
  }

  .split-sync-head {
    display: none;
  }

  .account-copy-btn {
    width: 100%;
  }

  .link-target {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .multi-select {
    width: 100%;
  }

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

  .pager-links,
  .pager-size {
    flex-wrap: wrap;
  }
}

.conversion-orders-table {
  min-width: 1990px;
}

.conversion-orders-table td:nth-child(12),
.conversion-orders-table td:nth-child(16) {
  white-space: nowrap;
}

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

  .ad-effect-controls {
    align-items: stretch;
  }

  .ad-effect-controls > div {
    width: 100%;
  }

  .ad-effect-grid {
    grid-template-columns: 1fr;
  }

  .ad-effect-rank-panel th:not(:first-child),
  .ad-effect-rank-panel td:not(:first-child) {
    width: 50px;
  }

  .conversion-orders-table {
    width: 100% !important;
    min-width: 0;
    table-layout: fixed;
    font-size: 12px;
  }

  .conversion-orders-table th:nth-child(1),
  .conversion-orders-table td:nth-child(1),
  .conversion-orders-table th:nth-child(3),
  .conversion-orders-table td:nth-child(3),
  .conversion-orders-table th:nth-child(4),
  .conversion-orders-table td:nth-child(4),
  .conversion-orders-table th:nth-child(6),
  .conversion-orders-table td:nth-child(6),
  .conversion-orders-table th:nth-child(7),
  .conversion-orders-table td:nth-child(7),
  .conversion-orders-table th:nth-child(8),
  .conversion-orders-table td:nth-child(8),
  .conversion-orders-table th:nth-child(10),
  .conversion-orders-table td:nth-child(10),
  .conversion-orders-table th:nth-child(13),
  .conversion-orders-table td:nth-child(13),
  .conversion-orders-table th:nth-child(14),
  .conversion-orders-table td:nth-child(14),
  .conversion-orders-table th:nth-child(15),
  .conversion-orders-table td:nth-child(15),
  .conversion-orders-table th:nth-child(17),
  .conversion-orders-table td:nth-child(17),
  .conversion-orders-table th:nth-child(18),
  .conversion-orders-table td:nth-child(18),
  .conversion-orders-table th:nth-child(19),
  .conversion-orders-table td:nth-child(19),
  .conversion-orders-table th:nth-child(20),
  .conversion-orders-table td:nth-child(20) {
    display: none;
  }

  .conversion-orders-table th,
  .conversion-orders-table td {
    padding: 8px 6px;
  }
}
