:root {
  color-scheme: light;
  --bg: #f8f8f9;
  --surface: #ffffff;
  --surface-soft: #fafafa;
  --surface-muted: #f6f7f9;
  --line: #eceef2;
  --line-soft: #f2f3f5;
  --text: #20242c;
  --muted: #858b99;
  --accent: #fe2c55;
  --accent-strong: #e91f4c;
  --danger: #d92d45;
  --warn: #a15c00;
  --shadow: 0 18px 44px rgba(32, 36, 44, 0.045);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-size: 14px;
  letter-spacing: 0;
}

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

input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--accent);
}

button {
  min-height: 36px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  padding: 0 12px;
  cursor: pointer;
  transition:
    background 0.16s ease,
    border-color 0.16s ease,
    color 0.16s ease,
    box-shadow 0.16s ease;
}

button:hover {
  border-color: rgba(254, 44, 85, 0.26);
  color: var(--accent);
}

button.primary {
  background: linear-gradient(90deg, #ff8cb0, var(--accent));
  border-color: transparent;
  color: white;
  box-shadow: 0 10px 22px rgba(254, 44, 85, 0.16);
}

button.primary:hover {
  background: linear-gradient(90deg, #ff759f, var(--accent-strong));
  color: white;
}

button.danger {
  color: white;
  background: var(--danger);
  border-color: var(--danger);
  width: 100%;
}

input,
select,
textarea {
  width: 100%;
  min-height: 36px;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 7px 9px;
  color: var(--text);
  background: var(--surface-muted);
  outline: 2px solid transparent;
  transition:
    background 0.16s ease,
    outline-color 0.16s ease;
}

input:focus,
select:focus,
textarea:focus {
  background: #fff;
  outline-color: rgba(254, 44, 85, 0.22);
}

textarea {
  resize: vertical;
  line-height: 1.6;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
}

.field-label {
  margin-bottom: 6px;
  color: var(--muted);
}

pre {
  overflow: auto;
  min-height: 44px;
  max-height: 220px;
  margin: 0;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: var(--surface-soft);
  color: #3f4654;
  white-space: pre-wrap;
}

.status-card {
  min-height: 44px;
  padding: 12px 14px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--muted);
  line-height: 1.6;
}

.advanced-auth {
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 12px 14px;
  background: #fff;
}

.advanced-auth summary {
  cursor: pointer;
  color: var(--muted);
}

.advanced-auth[open] {
  display: grid;
  gap: 12px;
}

.app-shell {
  display: block;
  min-height: 100vh;
}

.brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  min-height: 42px;
  color: inherit;
  text-decoration: none;
}

.brand strong {
  color: #191d25;
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
}

.brand span {
  display: inline-grid;
  place-items: center;
  width: 17px;
  height: 17px;
  margin-left: 2px;
  border-radius: 4px;
  background: linear-gradient(135deg, #ff315f, #ff8a2d);
  color: #fff;
  font-size: 14px;
}

.side-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.side-nav button {
  position: relative;
  flex: 0 0 auto;
  min-height: 58px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #4e5360;
  font-weight: 600;
  white-space: nowrap;
}

.side-nav button:hover,
.side-nav button.active {
  background: transparent;
  color: var(--accent);
}

.side-nav button.active::after {
  content: "";
  position: absolute;
  right: 12px;
  bottom: 0;
  left: 12px;
  height: 3px;
  border-radius: 999px 999px 0 0;
  background: var(--accent);
}

.content-shell {
  min-width: 0;
  background: var(--bg);
}

.page-hidden {
  display: none !important;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 0 clamp(18px, 3vw, 42px);
  background: #fff;
  border-bottom: 1px solid rgba(236, 238, 242, 0.86);
  box-shadow: none;
}

.doujia-header {
  width: 100%;
}

.doujia-main-nav {
  flex: 1 1 auto;
  justify-content: center;
}

.topbar h1,
.topbar p,
h2 {
  margin: 0;
}

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

.doujia-actions {
  flex: 0 0 auto;
  justify-content: flex-end;
}

.doujia-actions button {
  min-height: 34px;
  border-color: #edf0f5;
  background: #fff;
  box-shadow: 0 6px 18px rgba(39, 45, 68, 0.04);
}

.doujia-actions button.primary {
  background: linear-gradient(90deg, #ff8cb0, var(--accent));
  border-color: transparent;
  color: white;
  box-shadow: 0 10px 22px rgba(254, 44, 85, 0.16);
}

.doujia-actions button.primary:hover {
  background: linear-gradient(90deg, #ff759f, var(--accent-strong));
  color: white;
}

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

.doujia-page-status {
  display: grid;
  gap: 6px;
  width: min(100%, 1240px);
  margin: 0 auto;
  padding: 26px 24px 0;
}

body[data-page="overview"] .doujia-page-status {
  display: none;
}

.doujia-page-status h1,
.doujia-page-status p {
  margin: 0;
}

.doujia-page-status h1 {
  color: #20242c;
  font-size: 26px;
  line-height: 1.22;
}

.doujia-page-status p {
  color: var(--muted);
}

main {
  display: grid;
  gap: 28px;
  width: min(100%, 1240px);
  margin: 0 auto;
  padding: 26px 24px 54px;
}

main [data-page="overview"] {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
}

.overview-hero-row {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(300px, 1fr) minmax(320px, 1fr);
  gap: 28px;
}

.overview-profile-card,
.overview-wallet-card,
.overview-campaign-card {
  display: grid;
  min-width: 0;
  min-height: 146px;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.overview-profile-card {
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 22px 24px;
}

.overview-avatar {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  overflow: hidden;
  border-radius: 50%;
  background: linear-gradient(135deg, #c40020, #ff4d68);
  color: #fff;
  font-weight: 800;
}

.overview-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.overview-profile-main {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.overview-profile-main > strong {
  font-size: 20px;
  line-height: 1.2;
}

.overview-profile-main > span,
.overview-profile-stats small,
.overview-wallet-head span,
.overview-wallet-grid small,
.overview-campaign-card small {
  color: #8a909d;
}

.overview-account-switcher {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.overview-account-switcher span {
  color: #8a909d;
  font-size: 13px;
  font-weight: 600;
}

.overview-account-switcher select {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  border: 1px solid #edf0f5;
  border-radius: 8px;
  padding: 0 34px 0 12px;
  background: #fafbfc;
  color: #20242c;
  font-size: 14px;
  font-weight: 700;
  outline: 2px solid transparent;
}

.overview-account-switcher select:focus {
  border-color: rgba(254, 44, 85, 0.34);
  background: #fff;
  outline-color: rgba(254, 44, 85, 0.12);
}

.overview-profile-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

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

.overview-profile-stats div,
.overview-wallet-grid div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.overview-profile-stats b,
.overview-wallet-grid b {
  color: #20242c;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.overview-wallet-card {
  gap: 20px;
  padding: 22px 24px;
}

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

.overview-wallet-head > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.overview-wallet-head strong {
  font-size: 20px;
}

.overview-recharge-link {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  border-radius: 7px;
  padding: 0 12px;
  background: #fff2f5;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.overview-recharge-link:hover,
.overview-recharge-link:focus-visible {
  background: var(--accent);
  color: #fff;
  outline: 0;
}

.overview-wallet-balance {
  min-width: 0;
}

.overview-wallet-balance small {
  color: #8a909d;
}

.overview-wallet-balance b {
  color: var(--accent);
}

.overview-campaign-card {
  align-content: center;
  gap: 8px;
  padding: 22px 28px;
  overflow: hidden;
  background:
    radial-gradient(circle at 74% 18%, rgba(255, 255, 255, 0.78) 0 7%, transparent 18%),
    linear-gradient(135deg, #ff4f72 0%, #ff7957 54%, #ffb6c8 100%);
  color: #fff;
}

.overview-campaign-card span {
  color: rgba(255, 255, 255, 0.86);
}

.overview-campaign-card strong {
  font-size: 24px;
  line-height: 1.2;
}

.overview-campaign-card small {
  color: rgba(255, 255, 255, 0.78);
}

.overview-data-card {
  display: grid;
  gap: 20px;
  padding: 30px;
  border: 1px solid rgba(236, 238, 242, 0.9);
  border-radius: 8px;
  box-shadow: var(--shadow);
  background: #fff;
}

.overview-data-card .section-title h2 {
  font-size: 20px;
}

.overview-period-controls {
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: flex-end;
  flex-wrap: wrap;
  min-width: 0;
}

.overview-period-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--surface-soft);
}

.overview-period-switch button {
  min-height: 28px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #6d7482;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 700;
}

.overview-period-switch button:hover,
.overview-period-switch button.active {
  background: #fff;
  color: var(--accent);
  box-shadow: 0 5px 14px rgba(32, 36, 44, 0.05);
}

.overview-period-fields {
  display: flex;
  align-items: center;
  gap: 8px;
}

.overview-period-fields input {
  min-height: 36px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 0 10px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
}

.band,
.panel {
  background: var(--surface);
  border: 1px solid rgba(236, 238, 242, 0.9);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.band {
  padding: 26px 30px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 0;
  background: transparent;
}

.overview-metrics {
  align-items: stretch;
}

.metrics div {
  min-width: 0;
  padding: 16px 18px;
  border-radius: 8px;
  background: #f7f8fa;
}

.metrics span {
  display: block;
  color: #737987;
  margin-bottom: 8px;
}

.metrics strong {
  display: block;
  font-size: 24px;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.overview-data-card .metrics div:first-child {
  outline: 1px solid rgba(224, 51, 72, 0.24);
  background: #fff6f7;
}

.overview-data-card .metrics div:first-child strong {
  color: #db2f45;
}

.metric-card {
  display: grid;
  align-content: center;
  gap: 8px;
  min-width: 0;
  min-height: 86px;
  padding: 16px 18px;
  border: 1px solid #f0f1f4;
  border-radius: 8px;
  background: #fafbfc;
  color: var(--text);
  text-align: left;
  box-shadow: none;
  outline: 0;
}

.metric-card:hover {
  border-color: rgba(254, 44, 85, 0.24);
  background: #fff;
  color: var(--text);
  box-shadow: 0 10px 22px rgba(33, 38, 54, 0.05);
}

.metric-card.active {
  border-color: rgba(254, 44, 85, 0.34);
  background: #fff7f9;
  box-shadow: inset 0 0 0 1px rgba(254, 44, 85, 0.06);
}

.metric-card:focus-visible {
  border-color: rgba(254, 44, 85, 0.34);
  box-shadow:
    0 0 0 3px rgba(254, 44, 85, 0.12),
    inset 0 0 0 1px rgba(254, 44, 85, 0.06);
}

.metric-card span {
  color: #737987;
}

.metric-card strong {
  display: block;
  color: #1f2633;
  font-size: 24px;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.metric-card.active strong {
  color: var(--accent);
}

.overview-trend-chart {
  min-height: 318px;
  padding: 16px 16px 10px;
  border: 1px solid #f0f1f4;
  border-radius: 8px;
  background: #fff;
}

.overview-chart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #232936;
}

.overview-chart-head span {
  color: var(--muted);
  font-size: 13px;
}

.overview-trend-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  color: #6d7482;
  font-size: 12px;
}

.overview-trend-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.overview-trend-legend i {
  display: inline-block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: var(--series-color, #f01848);
}

.overview-trend-legend b {
  color: #232936;
  font-weight: 700;
}

.overview-trend-chart svg {
  display: block;
  width: 100%;
  min-height: 280px;
}

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

.overview-trend-line {
  fill: none;
  stroke: var(--series-color, #f01848);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.2;
}

.overview-trend-dots circle {
  fill: #fff;
  stroke: var(--series-color, #f01848);
  stroke-width: 1.7;
}

.overview-trend-values {
  fill: var(--series-color, #f01848);
  font-size: 11px;
  font-weight: 700;
  paint-order: stroke;
  stroke: #fff;
  stroke-linejoin: round;
  stroke-width: 4px;
}

.overview-trend-labels,
.overview-trend-axis {
  fill: #8a909d;
  font-size: 11px;
}

.overview-trend-labels tspan:first-child {
  fill: #6f7786;
  font-weight: 700;
}

.overview-trend-empty {
  display: grid;
  min-height: 250px;
  place-items: center;
  color: var(--muted);
  text-align: center;
}

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

.grid > .wide {
  grid-column: 1 / -1;
}

.panel {
  display: grid;
  gap: 16px;
  padding: 24px 26px;
}

.panel-title,
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

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

.panel-title h2,
.section-title h2 {
  font-size: 18px;
  line-height: 1.25;
}

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

.section-title.compact {
  gap: 8px;
  padding: 0;
}

.section-title.compact h3 {
  margin: 0;
  font-size: 15px;
  line-height: 1.3;
}

.section-title.compact span {
  color: var(--muted);
  font-size: 13px;
}

.section-heading {
  display: grid;
  gap: 4px;
}

.section-note {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.two,
.three {
  display: grid;
  gap: 10px;
}

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

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

.filters {
  display: flex;
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
  padding: 16px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--surface-soft);
}

.filters label {
  min-width: 130px;
}

.race-page {
  display: grid;
  gap: 18px;
  border: 0;
  background: #fff;
}

.race-page .section-title {
  align-items: start;
}

.race-page .filters {
  gap: 10px;
  padding: 14px;
  border: 0;
  background: #f7f8fa;
}

.race-page .filters label {
  min-width: 122px;
  color: #747b89;
}

.race-page .filters input,
.race-page .filters select {
  border-color: transparent;
  background: #fff;
}

.race-page .filters button {
  min-width: 58px;
  border-color: transparent;
  background: #fff;
  color: var(--accent);
  font-weight: 700;
}

.race-page .filters button:hover {
  border-color: rgba(254, 44, 85, 0.22);
  background: #fff6f8;
}

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

.check input {
  width: 16px;
  min-height: 16px;
}

.badge {
  border: 1px solid rgba(254, 44, 85, 0.14);
  background: #fff6f8;
  color: var(--accent);
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
}

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

.shop-view-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fff;
}

.shop-view-toolbar > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.shop-view-toolbar strong,
.shop-view-toolbar span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.shop-view-toolbar span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.shop-view-toolbar select {
  min-width: 180px;
  min-height: 40px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 0 12px;
  font: inherit;
  font-weight: 800;
}

.account-overview-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  min-width: 0;
  margin-top: 14px;
}

.account-period-fields {
  display: flex;
  align-items: center;
  gap: 8px;
}

.account-period-fields input {
  min-height: 36px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 0 10px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
}

.account-pick-list {
  display: grid;
  gap: 8px;
  max-height: 320px;
  overflow: auto;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--surface-soft);
}

.account-pick {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: white;
  color: var(--text);
}

.account-pick input {
  width: 16px;
  min-height: 16px;
  margin-top: 2px;
}

.account-pick span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.account-pick strong,
.account-pick small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.account-pick small {
  color: var(--muted);
}

.shop-category-list {
  display: grid;
  gap: 10px;
}

.managed-account-list {
  display: grid;
  gap: 10px;
}

.managed-account-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) minmax(220px, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fff;
}

.managed-account-info,
.managed-account-meta {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.managed-account-info strong,
.managed-account-info span,
.managed-account-meta span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.managed-account-info span,
.managed-account-meta span {
  color: var(--muted);
  font-size: 12px;
}

.managed-account-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.managed-account-actions button {
  white-space: nowrap;
}

.account-alert-list {
  display: grid;
  gap: 10px;
}

.account-alert-row {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fff;
}

.account-alert-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.account-alert-head > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.account-alert-head strong,
.account-alert-head small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.account-alert-head small {
  color: var(--muted);
}

.account-alert-controls {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) 150px auto auto;
  gap: 10px;
  align-items: end;
}

.shop-order-alert-controls {
  grid-template-columns: minmax(300px, 1fr) auto auto auto;
}

.account-alert-toggle {
  align-self: center;
  white-space: nowrap;
}

.account-alert-actions {
  display: flex;
  gap: 8px;
}

.account-alert-actions button {
  white-space: nowrap;
}

.account-alert-error {
  color: var(--danger);
}

.shop-merge-panel {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fff;
}

.shop-merge-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  gap: 10px;
  align-items: end;
}

.shop-merge-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.shop-merge-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.shop-merge-option {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fff;
}

.shop-merge-option input {
  width: 16px;
  min-height: 16px;
  margin-top: 2px;
}

.shop-merge-option span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.shop-merge-option strong,
.shop-merge-option small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.shop-merge-option small {
  color: var(--muted);
}

.shop-category-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(180px, 0.8fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fff;
}

.shop-category-row > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.shop-category-row strong,
.shop-category-row span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.shop-category-row span {
  color: var(--muted);
  font-size: 12px;
}

.shop-category-row input {
  min-width: 0;
}

.endpoint-monitor-list {
  display: grid;
  gap: 12px;
}

.endpoint-monitor-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fff;
}

.endpoint-monitor-card.good {
  border-color: rgba(21, 128, 61, 0.22);
}

.endpoint-monitor-card.bad {
  border-color: rgba(220, 38, 38, 0.24);
  background: #fff8f8;
}

.endpoint-monitor-card.watch {
  border-color: rgba(245, 158, 11, 0.24);
}

.endpoint-monitor-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.endpoint-monitor-head > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.endpoint-monitor-head strong,
.endpoint-monitor-head span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.endpoint-monitor-head span,
.endpoint-monitor-card small {
  color: var(--muted);
}

.endpoint-monitor-head b {
  flex: 0 0 auto;
  color: var(--accent);
}

.endpoint-monitor-card.good .endpoint-monitor-head b {
  color: #15803d;
}

.endpoint-monitor-card.bad .endpoint-monitor-head b {
  color: #dc2626;
}

.endpoint-monitor-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.endpoint-monitor-meta div {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fff;
}

.endpoint-monitor-meta span {
  color: var(--muted);
  font-size: 12px;
}

.endpoint-monitor-meta strong {
  overflow-wrap: anywhere;
}

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

.endpoint-monitor-history {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.endpoint-monitor-history span {
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.endpoint-monitor-history span.good {
  color: #15803d;
}

.endpoint-monitor-history span.bad,
.danger-text {
  color: #dc2626;
}

.share-link-box {
  display: grid;
  gap: 6px;
}

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

.copy-line input {
  min-width: 0;
}

.account-card {
  display: grid;
  gap: 12px;
  width: 100%;
  min-height: 122px;
  padding: 18px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fff;
  text-align: left;
  color: var(--text);
  box-shadow: none;
}

.account-card:hover,
.account-card.active {
  border-color: rgba(254, 44, 85, 0.34);
  background: #fffafb;
  color: var(--text);
}

.shop-summary-card {
  border-color: rgba(254, 44, 85, 0.34);
  background: linear-gradient(180deg, #fff7f9 0%, #fff 72%);
}

.account-card strong {
  display: block;
  font-size: 16px;
  overflow-wrap: anywhere;
}

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

.account-card .meta span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.account-card .meta b {
  display: block;
  font-size: 18px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.account-card small {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.insight-grid,
.detail-lead {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.insight-card {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 16px 18px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--surface-soft);
}

.insight-card.strong {
  border-color: rgba(254, 44, 85, 0.2);
  background: #fff6f8;
}

.insight-card.strong strong {
  color: var(--accent);
}

.insight-card span,
.insight-card small {
  color: var(--muted);
}

.insight-card strong {
  min-width: 0;
  font-size: 20px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.home-story,
#overviewStory {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  margin-top: 18px;
}

.overview-ranking-card {
  padding-top: 28px;
}

.home-ranking-shell {
  display: grid;
  gap: 16px;
}

.ranking-filter-line {
  display: flex;
  align-items: center;
  gap: 24px;
  min-width: 0;
  min-height: 42px;
  padding: 0 6px 12px;
  border-bottom: 1px solid #f0f1f4;
  color: #8c929f;
  overflow-x: auto;
}

.ranking-filter-line span {
  flex: 0 0 auto;
}

.ranking-filter-line button {
  flex: 0 0 auto;
  min-height: 30px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #4f5663;
  padding: 0;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.ranking-filter-line button:hover,
.ranking-filter-line button.active {
  color: var(--accent);
}

.ranking-filter-line button.active {
  font-weight: 800;
}

.ranking-filter-line button:focus-visible {
  outline: 2px solid rgba(254, 44, 85, 0.22);
  outline-offset: 4px;
}

.home-rank-list {
  display: grid;
  gap: 0;
}

.decision-board {
  display: grid;
  gap: 12px;
}

.home-diagnosis-panel {
  display: grid;
  gap: 14px;
  padding-top: 18px;
  border-top: 1px solid #f0f1f4;
}

.home-diagnosis-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-width: 0;
  padding: 16px 18px;
  border-radius: 8px;
  background: #fafbfc;
}

.home-diagnosis-head div:first-child {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.home-diagnosis-head span,
.home-diagnosis-head small {
  color: var(--muted);
}

.home-diagnosis-head strong {
  font-size: 22px;
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.decision-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 16px;
  align-items: center;
  min-width: 0;
  padding: 18px;
  border: 1px solid rgba(254, 44, 85, 0.18);
  border-radius: 8px;
  background: #fff6f8;
}

.decision-hero.watch {
  border-color: #ead79c;
  background: #fffaf0;
}

.decision-hero.bad {
  border-color: #efc6c2;
  background: #fff6f5;
}

.decision-hero span,
.decision-hero small,
.decision-hero p {
  color: var(--muted);
}

.decision-hero strong {
  display: block;
  margin-top: 6px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.decision-hero p {
  grid-column: 1 / -1;
  margin: 0;
  line-height: 1.5;
}

.decision-badge {
  justify-self: end;
  border-radius: 999px;
  padding: 8px 12px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
}

.decision-hero.watch .decision-badge {
  background: var(--warn);
}

.decision-hero.bad .decision-badge {
  background: var(--danger);
}

.decision-badge.watch {
  background: var(--warn);
}

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

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

.decision-card,
.decision-strip div {
  display: grid;
  gap: 6px;
  min-width: 0;
  min-height: 86px;
  padding: 14px 16px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fff;
  text-align: left;
}

button.decision-card {
  cursor: pointer;
}

.decision-card.good,
.account-head span.good {
  border-color: var(--line-soft);
  background: #fff;
  color: var(--accent);
}

.decision-card.watch,
.account-head span.watch {
  border-color: var(--line-soft);
  background: #fff;
  color: var(--warn);
}

.decision-card.bad,
.account-head span.bad {
  border-color: #f2d6d4;
  background: #fff;
  color: var(--danger);
}

.decision-card span,
.decision-card small,
.decision-strip span,
.decision-strip small {
  color: var(--muted);
}

.decision-card strong,
.decision-strip strong {
  min-width: 0;
  font-size: 20px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.home-leaderboard {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 18px 0 0;
  border-top: 1px solid #eff1f5;
  border-right: 0;
  border-bottom: 0;
  border-left: 0;
  border-radius: 8px;
  background: transparent;
}

.home-leaderboard h3 {
  margin: 0;
  font-size: 20px;
}

.home-order-row {
  display: grid;
  grid-template-columns: 40px 78px minmax(0, 1.45fr) 130px minmax(180px, 0.65fr);
  gap: 16px;
  align-items: center;
  width: 100%;
  min-height: 108px;
  padding: 18px 6px;
  border: 0;
  border-bottom: 1px solid #eff1f5;
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
}

.home-order-row b {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #eef2f7;
  color: #8a909d;
  font-size: 13px;
}

.home-order-row:nth-of-type(1) b,
.home-order-row:nth-of-type(2) b,
.home-order-row:nth-of-type(3) b {
  background: linear-gradient(135deg, #ff496a, #ff8a4d);
  color: #fff;
}

.home-order-thumb {
  position: relative;
  display: block;
  width: 72px;
  height: 72px;
  overflow: hidden;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 73, 106, 0.18), rgba(255, 138, 77, 0.18)),
    #f3f5f9;
}

.home-order-thumb::after {
  content: "";
  position: absolute;
  inset: 20px 18px;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
  background: rgba(255, 255, 255, 0.9);
}

.home-order-thumb img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-order-thumb:not(.empty)::after {
  display: none;
}

.home-order-row strong,
.home-order-row small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.home-order-row strong {
  color: #20242c;
}

.home-order-row small {
  color: var(--muted);
}

.home-order-row div span {
  display: block;
  min-width: 0;
  margin-top: 5px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-order-row em {
  color: var(--accent);
  font-style: normal;
  font-size: 22px;
  font-weight: 800;
  text-align: right;
}

.account-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.account-head span {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 700;
}

.shop-summary-card .account-head span {
  border-color: rgba(254, 44, 85, 0.2);
  background: #fff;
  color: var(--accent);
}

.race-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 0;
}

.race-card {
  display: grid;
  gap: 6px;
  min-width: 0;
  min-height: 96px;
  padding: 16px 18px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--surface-soft);
}

.race-card span,
.race-card small {
  color: #767d8b;
}

.race-card strong {
  font-size: 24px;
  line-height: 1.1;
}

#raceInsight {
  margin-top: 0;
}

#raceInsight .insight-card {
  min-height: 88px;
  border: 1px solid var(--line-soft);
  background: var(--surface-soft);
}

#raceInsight .insight-card.strong {
  border: 1px solid rgba(254, 44, 85, 0.18);
  background: #fff6f8;
}

#raceInsight .insight-card.strong strong {
  color: var(--accent);
}

.race-board {
  display: grid;
  gap: 8px;
  margin-top: 0;
}

.race-board.empty {
  min-height: 68px;
  padding: 18px;
  border-top: 1px solid #eff1f5;
  color: var(--muted);
}

.race-row {
  display: grid;
  grid-template-columns: 34px 64px minmax(220px, 1.6fr) minmax(150px, 0.9fr) 90px minmax(220px, 1fr);
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 86px;
  padding: 14px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--surface);
  text-align: left;
}

.race-row:hover {
  border-color: rgba(254, 44, 85, 0.22);
  background: #fffafb;
}

.race-row b {
  color: var(--accent);
  font-size: 18px;
}

.race-cover {
  position: relative;
  display: block;
  width: 64px;
  height: 64px;
  overflow: hidden;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 73, 106, 0.18), rgba(255, 138, 77, 0.18)),
    #f3f5f9;
}

.race-cover::after {
  content: "";
  position: absolute;
  inset: 22px 19px;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
  background: rgba(255, 255, 255, 0.9);
}

.race-cover img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.race-cover:not(.empty)::after {
  display: none;
}

.race-row div,
.race-row strong,
.race-row span {
  min-width: 0;
}

.race-row span,
.race-row small {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.race-row em {
  font-style: normal;
  font-size: 20px;
  font-weight: 700;
  text-align: right;
}

.table-wrap {
  overflow: hidden;
  margin-top: 16px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fff;
}

.compact-table {
  overflow: auto;
}

.compact-table table {
  table-layout: auto;
}

.compact-table th:nth-child(1),
.compact-table td:nth-child(1) {
  width: 22%;
}

.compact-table th:nth-child(2),
.compact-table td:nth-child(2) {
  width: 14%;
}

.compact-table th:nth-child(3),
.compact-table td:nth-child(3) {
  width: auto;
}

.compact-table th:nth-child(4),
.compact-table td:nth-child(4) {
  width: 72px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 0;
  table-layout: fixed;
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  background: var(--surface-soft);
  font-weight: 600;
}

td {
  overflow-wrap: anywhere;
}

tr.is-expanded > td {
  background: #fffafb;
  border-bottom-color: transparent;
}

.order-detail-row {
  padding: 0 18px 18px;
}

.order-detail-row > td {
  width: auto;
  padding: 0;
  background: #fffafb;
  border-bottom: 1px solid var(--line-soft);
}

.inline-detail {
  display: grid;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fff;
}

.inline-detail .section-title {
  margin-bottom: 0;
}

.inline-detail .section-title h3 {
  margin: 0;
  font-size: 16px;
}

.order-detail-drawer[hidden] {
  display: none;
}

.order-detail-drawer {
  position: fixed;
  inset: 0;
  z-index: 80;
}

.order-drawer-scrim {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(32, 36, 44, 0.18);
}

.order-drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  width: min(620px, calc(100vw - 32px));
  height: 100%;
  background: #fff;
  box-shadow: -18px 0 42px rgba(20, 24, 32, 0.16);
}

.order-drawer-body {
  width: 100%;
  min-width: 0;
  overflow: auto;
  padding: 22px;
}

.order-drawer-loading {
  display: grid;
  min-height: 220px;
  place-items: center;
  color: var(--muted);
}

.order-drawer-detail {
  min-height: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
}

.order-drawer-detail .detail-lead,
.order-drawer-detail .detail-summary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.order-drawer-detail .detail-grid,
.order-drawer-detail .work-card {
  grid-template-columns: 1fr;
}

.order-drawer-detail .work-metrics {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.order-drawer-detail .chart {
  min-height: 220px;
}

.order-drawer-detail .chart svg {
  height: 210px;
}

.orders-page {
  display: grid;
  gap: 18px;
  padding: 26px 30px;
  border: 0;
  background: #fff;
  box-shadow: var(--shadow);
}

.orders-page > .section-title {
  align-items: start;
  padding: 0;
}

.orders-page .filters {
  gap: 10px;
  padding: 14px;
  border: 0;
  background: #f7f8fa;
}

.orders-page .filters label {
  min-width: 126px;
  color: #747b89;
}

.orders-page .filters input,
.orders-page .filters select {
  border-color: transparent;
  background: #fff;
}

.orders-page .filters button {
  min-width: 58px;
  border-color: transparent;
  background: #fff;
  color: #5d6471;
  font-weight: 700;
}

.orders-page .filters button:first-of-type {
  color: var(--accent);
}

.orders-page .filters button:hover {
  border-color: rgba(254, 44, 85, 0.22);
  background: #fff6f8;
  color: var(--accent);
}

.orders-insight {
  margin-top: 0;
}

.orders-insight .insight-card {
  min-height: 88px;
  border: 1px solid var(--line-soft);
  background: var(--surface-soft);
}

.orders-insight .insight-card.strong {
  border: 1px solid rgba(254, 44, 85, 0.18);
  background: #fff6f8;
}

.orders-insight .insight-card.strong strong {
  color: var(--accent);
}

.orders-list-shell {
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
}

.orders-list-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line-soft);
  color: #5f6572;
  font-weight: 700;
}

.orders-sort-button {
  min-height: 32px;
  border-color: #edf0f5;
  background: #f7f8fb;
  color: #6e7482;
  cursor: default;
}

.orders-list {
  display: grid;
}

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

.order-list-item {
  display: grid;
  gap: 0;
  border-bottom: 1px solid var(--line-soft);
  background: #fff;
}

.order-list-item:last-child {
  border-bottom: 0;
}

.order-list-item:hover {
  background: #fffafb;
}

.order-list-item.is-selected {
  background: #fffafb;
}

.order-list-grid {
  display: grid;
  grid-template-columns:
    minmax(214px, 1.75fr) minmax(0, 0.72fr) minmax(112px, 0.92fr)
    minmax(280px, 1.7fr) minmax(0, 0.48fr) minmax(0, 0.54fr)
    minmax(0, 0.54fr) minmax(88px, 0.75fr) 64px;
  gap: 8px;
  align-items: center;
  min-width: 0;
  padding: 16px;
}

.order-main-cell {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-width: 0;
}

.order-cover {
  position: relative;
  display: block;
  width: 76px;
  height: 76px;
  overflow: hidden;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(254, 44, 85, 0.12), rgba(255, 138, 45, 0.12)),
    #f3f5f9;
}

.order-cover::after {
  content: "";
  position: absolute;
  inset: 28px 25px;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
  background: rgba(255, 255, 255, 0.9);
}

.order-cover img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.order-cover:not(.empty)::after {
  display: none;
}

.order-title-block,
.order-status-cell,
.order-spend-cell,
.order-stat-cell,
.order-renew-cell {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.order-conversion-cell {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
}

.order-renew-button {
  width: 100%;
  min-height: 0;
  padding: 6px;
  border-color: transparent;
  background: transparent;
  text-align: left;
}

.order-renew-button:hover,
.order-renew-button:focus-visible {
  border-color: rgba(254, 44, 85, 0.2);
  background: #fff3f6;
}

.order-renew-button:hover strong,
.order-renew-button:focus-visible strong {
  color: var(--accent);
}

.order-title-block strong {
  display: -webkit-box;
  overflow: hidden;
  color: #20242c;
  font-size: 15px;
  line-height: 1.38;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.order-title-block span,
.order-title-block small,
.order-status-cell small,
.order-renew-cell small,
.order-spend-cell span,
.order-stat-cell span,
.order-renew-cell span {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-spend-cell strong,
.order-stat-cell strong,
.order-renew-cell strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #20242c;
  font-size: 15px;
  line-height: 1.2;
}

.order-stat-cell strong {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px;
  font-size: 18px;
}

.order-stat-cell .order-stat-unit {
  color: #20242c;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
}

.order-spend-bar {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: #eef0f5;
}

.order-spend-bar i {
  display: block;
  min-width: 3px;
  max-width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff8cb0, var(--accent));
}

.order-action-cell {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.order-action-cell > button {
  width: 100%;
  padding-inline: 6px;
}

.order-action-cell .link-button {
  border-color: transparent;
  background: #fff0f4;
  color: var(--accent);
  font-weight: 700;
}

.order-action-cell .link-button:hover {
  background: var(--accent);
  color: #fff;
}

.order-terminate-button {
  min-height: 34px;
  border-color: #ffd7df;
  background: #fff;
  color: #e1264d;
  font-weight: 800;
}

.order-terminate-button:hover {
  border-color: #e1264d;
  background: #fff0f4;
}

.detail-title-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.loading-detail {
  color: var(--muted);
}

.work-cell {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.work-cell strong {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-height: 1.35;
}

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

.work-breakdown {
  display: grid;
  gap: 12px;
}

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

.work-list {
  display: grid;
  gap: 10px;
}

.work-card {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) minmax(360px, 0.9fr);
  gap: 12px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fff;
}

.work-rank {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #fff0f4;
  color: var(--accent);
  font-weight: 700;
}

.work-main {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.work-main strong,
.work-main span,
.work-main small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.work-main span,
.work-main small {
  color: var(--muted);
}

.work-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.work-metrics div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: white;
}

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

.work-metrics strong {
  min-width: 0;
  font-size: 16px;
  overflow-wrap: anywhere;
}

.share-bars {
  display: grid;
  gap: 5px;
  max-width: 460px;
}

.share-bars div {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 48px;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}

.share-bars b {
  display: block;
  min-width: 2px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
}

.share-bars em {
  font-style: normal;
  text-align: right;
}

.stack-cell {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.stack-cell span {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 5px;
  align-items: baseline;
}

.stack-cell b {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.stack-cell em {
  min-width: 0;
  font-style: normal;
  overflow-wrap: anywhere;
}

th:nth-child(1),
td:nth-child(1) {
  width: 9%;
}

th:nth-child(2),
td:nth-child(2) {
  width: 6%;
}

th:nth-child(3),
td:nth-child(3) {
  width: 20%;
}

th:nth-child(4),
td:nth-child(4) {
  width: 15%;
}

th:nth-child(5),
td:nth-child(5) {
  width: 14%;
}

th:nth-child(6),
td:nth-child(6) {
  width: 10%;
}

th:nth-child(7),
td:nth-child(7) {
  width: 11%;
}

th:nth-child(8),
td:nth-child(8) {
  width: 5%;
}

th:nth-child(9),
td:nth-child(9) {
  width: 5%;
}

th:nth-child(10),
td:nth-child(10) {
  width: 5%;
}

.metric-main,
.period-label {
  display: block;
}

.time-cell {
  min-width: 112px;
}

.period-label {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.3;
}

.list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.list-item {
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 14px 16px;
  background: #fff;
}

.list-item:hover {
  border-color: rgba(254, 44, 85, 0.18);
  background: #fffafb;
}

.empty {
  color: var(--muted);
}

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

.detail-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--line-soft);
}

.detail-summary div {
  min-width: 0;
  padding: 12px;
  background: #fff;
}

.detail-summary span {
  display: block;
  color: var(--muted);
  margin-bottom: 6px;
}

.detail-summary strong {
  display: block;
  font-size: 20px;
  overflow-wrap: anywhere;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
  gap: 16px;
  align-items: start;
}

.chart-stack {
  display: grid;
  gap: 16px;
}

.detail h3 {
  margin: 0 0 10px;
  font-size: 15px;
}

.chart {
  display: grid;
  gap: 12px;
  min-height: 260px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.chart svg {
  display: block;
  width: 100%;
  height: 236px;
}

.chart-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.chart-summary div {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--surface);
}

.chart-summary span,
.chart-summary small {
  display: block;
  color: var(--muted);
}

.chart-summary strong {
  display: block;
  margin: 4px 0;
  font-size: 24px;
  line-height: 1.15;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  color: var(--muted);
  font-size: 12px;
}

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

.chart-legend i,
.chart-legend b {
  display: inline-block;
  width: 18px;
  height: 4px;
  border-radius: 999px;
  background: var(--accent);
}

.chart-legend b {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: #f5c4cf;
}

.daily-chart-svg .point-label {
  fill: var(--text);
  font-size: 12px;
  font-weight: 700;
}

.chart-note {
  color: var(--muted);
  font-size: 12px;
}

.hourly-detail-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-top: 4px;
}

.hourly-detail-title strong {
  color: var(--text);
  font-size: 15px;
}

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

.daily-breakdown {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--line-soft);
}

.daily-breakdown-row {
  display: grid;
  grid-template-columns: 1.1fr repeat(3, minmax(0, 1fr));
  gap: 8px;
  align-items: center;
  min-width: 0;
  padding: 9px 10px;
  background: var(--surface);
}

.daily-breakdown-row.header {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  background: var(--surface-soft);
}

.daily-breakdown-row.best {
  background: #fff6f8;
}

.daily-breakdown-row span,
.daily-breakdown-row strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.daily-breakdown-row strong {
  font-size: 13px;
}

.hourly-breakdown {
  max-height: 430px;
  overflow: auto;
}

.hourly-breakdown-row {
  grid-template-columns: 1.45fr repeat(7, minmax(86px, 1fr));
  min-width: 980px;
}

.rule-box {
  display: grid;
  gap: 12px;
}

.link-button {
  min-height: 30px;
  padding: 0 10px;
}

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

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 2px 8px;
  background: var(--surface-muted);
  color: var(--muted);
  white-space: nowrap;
}

.pill.good {
  background: #fff0f4;
  color: var(--accent);
}

.pill.warn {
  background: #fff8db;
  color: var(--warn);
}

.login-page {
  min-height: 100vh;
  overflow-x: hidden;
  background: #f5f6fa;
  color: #20242c;
}

.login-page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 84% 8%, rgba(255, 226, 128, 0.42), transparent 28%),
    radial-gradient(circle at 68% 24%, rgba(242, 84, 255, 0.18), transparent 26%),
    linear-gradient(90deg, #f2f3f7 0%, #f8f9fc 58%, #ffffff 100%);
}

.auto-reply-page {
  display: grid;
  gap: 18px;
  border: 0;
  background: #fff;
}

.auto-reply-page > .section-title {
  align-items: start;
}

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

.auto-reply-status-grid .insight-card {
  min-height: 96px;
  border: 1px solid var(--line-soft);
  background: #fafbfc;
}

.auto-reply-status-grid .insight-card.strong {
  border-color: rgba(254, 44, 85, 0.18);
  background: #fff6f8;
}

.auto-reply-status-grid .insight-card.strong strong {
  color: var(--accent);
}

.auto-reply-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 16px;
  align-items: start;
}

.auto-reply-plugin-card {
  align-content: start;
}

.auto-reply-code-box {
  display: grid;
  gap: 8px;
  min-height: 96px;
  padding: 18px;
  border: 1px dashed rgba(254, 44, 85, 0.28);
  border-radius: 8px;
  background: #fff7f9;
}

.auto-reply-code-box strong {
  color: var(--accent);
  font-size: 30px;
  letter-spacing: 0;
}

.auto-reply-code-box span {
  color: #78808f;
}

.auto-reply-account-list,
.auto-reply-rule-list,
.auto-reply-upload-list,
.auto-reply-log-list {
  display: grid;
  gap: 10px;
}

.auto-reply-account-list.empty,
.auto-reply-rule-list.empty,
.auto-reply-upload-list.empty,
.auto-reply-log-list.empty {
  min-height: 72px;
  place-items: center;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fafbfc;
  color: var(--muted);
  text-align: center;
}

.auto-reply-account-item {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fff;
}

.auto-reply-avatar {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  overflow: hidden;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff7f9f, #ff405f);
  color: #fff;
  font-weight: 900;
}

.auto-reply-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.auto-reply-account-main,
.auto-reply-rule-item,
.auto-reply-log-item {
  min-width: 0;
}

.auto-reply-account-main {
  display: grid;
  gap: 4px;
}

.auto-reply-account-main strong,
.auto-reply-rule-item strong,
.auto-reply-log-item strong {
  color: var(--text);
  overflow-wrap: anywhere;
}

.auto-reply-account-main span,
.auto-reply-account-main small,
.auto-reply-rule-item span,
.auto-reply-rule-item small,
.auto-reply-upload-main span,
.auto-reply-upload-main small,
.auto-reply-log-item span {
  color: var(--muted);
  line-height: 1.5;
}

.auto-reply-account-actions {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.auto-reply-account-actions .badge.good {
  border-color: rgba(18, 183, 106, 0.18);
  background: #f2fbf6;
  color: #15945b;
}

.auto-reply-rule-form {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fafbfc;
}

.form-hint {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.auto-reply-rule-builder {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fff;
}

.auto-reply-step-list {
  display: grid;
  gap: 10px;
}

.auto-reply-step-item {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #eef0f4;
  border-radius: 8px;
  background: #fcfcfd;
}

.auto-reply-step-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.auto-reply-step-chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: #fff1f5;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
}

.auto-reply-step-controls,
.auto-reply-step-actions,
.auto-reply-rule-actions {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.auto-reply-step-controls button,
.auto-reply-step-actions button,
.auto-reply-rule-actions button {
  min-height: 32px;
  padding: 0 12px;
  border-color: #eef0f4;
  background: #fff;
  color: #596172;
  font-size: 13px;
}

.auto-reply-step-actions button {
  color: var(--accent);
  font-weight: 800;
}

.auto-reply-step-controls button:hover,
.auto-reply-step-actions button:hover,
.auto-reply-rule-actions button:hover {
  border-color: rgba(254, 44, 85, 0.22);
  background: #fff6f8;
}

.auto-reply-step-controls button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.auto-reply-image-step {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(160px, 0.72fr);
  gap: 10px;
}

.auto-reply-rule-actions {
  justify-content: flex-end;
}

.auto-reply-rule-actions .danger {
  color: #d83d5d;
}

.auto-reply-upload-item {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fff;
}

.auto-reply-upload-preview {
  display: grid;
  place-items: center;
  width: 72px;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid #eef0f4;
  border-radius: 8px;
  background: #fafbfc;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.auto-reply-upload-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.auto-reply-upload-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.auto-reply-upload-main strong {
  color: var(--text);
  overflow-wrap: anywhere;
}

.auto-reply-upload-actions {
  display: grid;
  justify-items: end;
}

.auto-reply-upload-actions button {
  min-width: 64px;
}

.auto-reply-rule-item,
.auto-reply-log-item {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fff;
}

.login-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(400px, 580px);
  gap: 54px;
  align-items: center;
  width: min(100%, 1360px);
  min-height: calc(100vh - 58px);
  margin: 0 auto;
  padding: 34px clamp(28px, 5%, 72px) 48px;
}

.login-hero {
  position: relative;
  display: grid;
  align-content: start;
  min-height: 620px;
}

.login-brand {
  position: relative;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  width: max-content;
  color: inherit;
  text-decoration: none;
}

.login-brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
}

.login-brand-mark span {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin-left: 1px;
  border-radius: 5px;
  background: linear-gradient(135deg, #ff315f, #ff8a2d);
  color: #fff;
  font-size: 15px;
}

.login-copy {
  position: relative;
  z-index: 3;
  margin-top: 86px;
}

.login-copy h1 {
  max-width: 620px;
  margin: 0;
  color: #20242c;
  font-size: 56px;
  font-weight: 900;
  line-height: 1.08;
}

.login-copy p {
  margin: 18px 0 0;
  color: #6d7280;
  font-size: 28px;
  font-weight: 500;
  line-height: 1.35;
}

.login-feature-list {
  display: flex;
  gap: 54px;
  margin-top: 42px;
  color: #777d8c;
}

.login-feature-list span {
  display: grid;
  justify-items: center;
  gap: 12px;
  min-width: 78px;
  font-size: 16px;
  white-space: nowrap;
}

.login-feature-icon {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  box-shadow: 0 12px 26px rgba(79, 88, 122, 0.14);
}

.login-feature-icon.video {
  background: linear-gradient(135deg, #7c5cff, #a986ff);
}

.login-feature-icon.live {
  background: linear-gradient(135deg, #ff7847, #ffad64);
}

.login-feature-icon::before {
  content: "";
  width: 0;
  height: 0;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 10px solid rgba(255, 255, 255, 0.92);
  transform: translateX(1px);
}

.login-feature-icon.live::before {
  width: 14px;
  height: 10px;
  border: 0;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.92);
  transform: none;
}

.login-feature-icon.live::after {
  content: "";
  position: absolute;
  right: 7px;
  width: 6px;
  height: 8px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.9);
}

.login-hero-art {
  position: absolute;
  right: -240px;
  bottom: 8px;
  z-index: 1;
  width: 730px;
  height: 420px;
  pointer-events: none;
}

.login-stream {
  position: absolute;
  right: 0;
  bottom: 82px;
  width: 665px;
  height: 188px;
  border-radius: 48% 10% 55% 18% / 70% 35% 72% 34%;
  background:
    radial-gradient(circle at 68% 24%, rgba(255, 255, 255, 0.72) 0 4px, transparent 5px),
    linear-gradient(11deg, #ffe05b 5%, #ff944d 31%, #ff334f 50%, #8b3cff 72%, #6b35ff 92%);
  box-shadow:
    0 42px 76px rgba(255, 128, 58, 0.28),
    inset 0 8px 18px rgba(255, 255, 255, 0.3);
  transform: rotate(-22deg);
}

.login-stream::before {
  content: "";
  position: absolute;
  inset: 16px 24px 42px 86px;
  border-radius: inherit;
  background: linear-gradient(12deg, rgba(255, 214, 62, 0.92), rgba(255, 57, 71, 0.76), rgba(121, 54, 245, 0.65));
}

.login-stream::after {
  content: "";
  position: absolute;
  right: -64px;
  bottom: -188px;
  width: 500px;
  height: 325px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 24%, #fff5bf, #ffe368 46%, rgba(255, 224, 91, 0) 70%);
  transform: rotate(22deg);
}

.stream-heart,
.stream-like,
.stream-star {
  position: absolute;
  z-index: 2;
  display: block;
  transform: rotate(22deg);
}

.stream-heart {
  top: 28px;
  left: 320px;
  width: 42px;
  height: 42px;
  border-radius: 50% 50% 44% 44%;
  background: linear-gradient(135deg, #ff5478, #ff244f);
  box-shadow: 0 12px 22px rgba(220, 37, 73, 0.28);
}

.stream-heart::before,
.stream-heart::after {
  content: "";
  position: absolute;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: inherit;
}

.stream-heart::before {
  left: -8px;
  top: 2px;
}

.stream-heart::after {
  right: -8px;
  top: 2px;
}

.stream-like {
  left: 428px;
  top: 88px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 14px 26px rgba(78, 42, 98, 0.18);
}

.stream-like::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 12px;
  width: 15px;
  height: 24px;
  border-radius: 8px 8px 5px 5px;
  background: #ff3357;
  transform: rotate(-12deg);
}

.stream-like::after {
  content: "";
  position: absolute;
  left: 12px;
  top: 22px;
  width: 22px;
  height: 16px;
  border-radius: 4px;
  background: #ff3357;
}

.stream-star {
  left: 250px;
  top: 118px;
  width: 38px;
  height: 38px;
  background: #ffd43d;
  clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 56%, 79% 91%, 50% 70%, 20% 91%, 31% 56%, 2% 35%, 38% 35%);
  filter: drop-shadow(0 12px 16px rgba(171, 108, 21, 0.26));
}

.login-device {
  position: absolute;
  left: 74px;
  bottom: 4px;
  z-index: 2;
  display: grid;
  place-items: center;
  gap: 12px;
  width: 116px;
  height: 178px;
  border: 8px solid #fff;
  border-radius: 24px;
  background: linear-gradient(180deg, #ffffff, #fff8f3);
  box-shadow: 0 24px 58px rgba(87, 76, 116, 0.22);
  transform: rotate(-8deg);
}

.login-device i {
  display: block;
  width: 48px;
  height: 48px;
  border: 7px solid #ff4770;
  border-left-color: #ffcf55;
  border-radius: 50%;
}

.login-device strong {
  display: inline-grid;
  place-items: center;
  min-width: 64px;
  min-height: 28px;
  border-radius: 6px;
  background: #fe2c55;
  color: #fff;
  font-size: 16px;
  line-height: 1;
}

.login-card {
  display: grid;
  gap: 16px;
}

.login-panel {
  position: relative;
  z-index: 2;
  width: min(100%, 590px);
  min-height: 500px;
  padding: 48px 60px 34px;
  border: 0;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 28px 90px rgba(94, 99, 122, 0.16);
  backdrop-filter: blur(18px);
}

.login-tabs {
  display: flex;
  justify-content: center;
  gap: 54px;
  margin-bottom: 10px;
  color: #b7bbc6;
  font-size: 17px;
  font-weight: 700;
}

.login-tabs span {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  white-space: nowrap;
}

.login-tabs span.active {
  color: #252a33;
}

.login-tabs span.active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -7px;
  width: 24px;
  height: 3px;
  border-radius: 999px;
  background: #fe2c55;
  transform: translateX(-50%);
}

.login-panel-title {
  display: grid;
  gap: 7px;
  margin: 12px 0 8px;
  text-align: center;
}

.login-card h2,
.login-card p {
  margin: 0;
}

.login-card h2 {
  color: #252a33;
  font-size: 24px;
  line-height: 1.25;
}

.login-card p,
.login-field span {
  color: var(--muted);
}

.login-field {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 600;
}

.login-field input {
  min-height: 54px;
  border: 0;
  border-radius: 10px;
  padding: 0 16px;
  background: #f3f4f7;
  color: #252a33;
  font-size: 15px;
  outline: 2px solid transparent;
  transition:
    background 0.18s ease,
    outline-color 0.18s ease;
}

.login-field input:focus {
  background: #fff;
  outline-color: rgba(254, 44, 85, 0.28);
}

.login-panel button.primary {
  min-height: 56px;
  margin-top: 8px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(90deg, #ff8cb0, #fe2c55);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  box-shadow: 0 14px 28px rgba(254, 44, 85, 0.22);
}

.login-panel button.primary:hover {
  background: linear-gradient(90deg, #ff759f, #e91f4c);
}

.login-panel button.primary:disabled {
  cursor: wait;
  opacity: 0.72;
}

.login-agreement {
  text-align: center;
  font-size: 12px;
}

.login-card .login-message {
  min-height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #858b99;
  text-align: center;
}

.login-footer {
  position: relative;
  z-index: 1;
  padding: 0 24px 24px;
  color: #a5aab5;
  font-size: 12px;
  text-align: center;
}

@media (max-width: 1100px) {
  .order-list-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .order-main-cell {
    grid-column: 1 / -1;
  }

  .order-spend-cell {
    grid-column: span 2;
  }

  .order-conversion-cell {
    grid-column: span 2;
  }

  .order-renew-cell {
    grid-column: span 2;
  }
}

@media (max-width: 900px) {
  .app-shell {
    display: block;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
    min-height: 0;
    padding: 12px 14px;
  }

  .doujia-brand {
    align-self: flex-start;
  }

  .side-nav {
    overflow-x: auto;
    gap: 2px;
    width: 100%;
    padding-bottom: 2px;
  }

  .side-nav button {
    min-height: 40px;
    padding: 0 12px;
  }

  .actions {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100%;
  }

  .actions button {
    min-height: 40px;
    padding: 0 8px;
  }

  .doujia-page-status {
    padding: 20px 14px 8px;
  }

  .doujia-page-status h1 {
    font-size: 21px;
  }

  .metrics,
  .grid,
  .account-grid,
  .insight-grid,
  .decision-grid,
  .decision-strip,
  .detail-lead,
  .work-summary,
  .work-card,
  .race-summary,
  .detail-grid,
  .auto-reply-status-grid,
  .auto-reply-layout {
    grid-template-columns: 1fr;
  }

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

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

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

  .overview-data-card {
    padding: 20px;
  }

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

  .overview-period-switch {
    width: 100%;
  }

  .overview-period-switch button {
    flex: 1 1 0;
  }

  .overview-period-fields,
  .overview-period-fields input {
    width: 100%;
  }

  .shop-view-toolbar,
  .shop-view-toolbar select,
  .account-overview-toolbar,
  .account-period-fields,
  .account-period-fields input {
    width: 100%;
  }

  .shop-view-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .account-period-switch {
    width: 100%;
  }

  .account-period-switch button {
    flex: 1 1 0;
    min-width: 0;
    padding-inline: 3px;
    font-size: 12px;
    white-space: nowrap;
  }

  main {
    padding: 12px;
  }

  .login-shell {
    grid-template-columns: 1fr;
    gap: 20px;
    min-height: auto;
    padding: 26px 22px 34px;
  }

  .login-hero {
    min-height: 470px;
  }

  .login-copy {
    margin-top: 58px;
  }

  .login-copy h1 {
    max-width: 480px;
    font-size: 42px;
  }

  .login-copy p {
    font-size: 22px;
  }

  .login-hero-art {
    right: -160px;
    bottom: 0;
    width: 640px;
    height: 330px;
    transform: scale(0.86);
    transform-origin: right bottom;
  }

  .login-panel {
    justify-self: center;
    min-height: 0;
  }
}

@media (max-width: 720px) {
  body {
    font-size: 14px;
  }

  main {
    gap: 12px;
    padding: 10px;
  }

  .order-drawer-panel {
    width: 100%;
  }

  .order-drawer-body {
    padding: 16px;
  }

  .order-drawer-detail .detail-lead,
  .order-drawer-detail .detail-summary,
  .order-drawer-detail .work-metrics {
    grid-template-columns: 1fr;
  }

  .band,
  .panel {
    border-radius: 8px;
    padding: 12px;
  }

  .metrics {
    padding: 0;
  }

  .metrics div {
    padding: 12px;
  }

  .metrics strong {
    font-size: 20px;
  }

  .panel-title,
  .section-title {
    align-items: stretch;
    flex-direction: column;
  }

  .panel-actions,
  .auto-reply-step-actions,
  .auto-reply-rule-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .panel-title button,
  .filters button {
    min-height: 42px;
  }

  .auto-reply-account-item {
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: start;
  }

  .auto-reply-upload-item {
    grid-template-columns: 56px minmax(0, 1fr);
    align-items: start;
  }

  .auto-reply-upload-preview {
    width: 56px;
  }

  .auto-reply-upload-actions {
    grid-column: 1 / -1;
    justify-items: stretch;
  }

  .auto-reply-avatar {
    width: 44px;
    height: 44px;
  }

  .auto-reply-account-actions {
    grid-column: 1 / -1;
    grid-template-columns: 1fr;
    justify-items: stretch;
  }

  .auto-reply-step-head,
  .auto-reply-step-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .auto-reply-image-step {
    grid-template-columns: 1fr;
  }

  .login-page {
    overflow-y: auto;
  }

  .login-page::before {
    background:
      radial-gradient(circle at 82% 9%, rgba(255, 226, 128, 0.34), transparent 28%),
      linear-gradient(180deg, #f3f4f8 0%, #ffffff 100%);
  }

  .login-shell {
    gap: 18px;
    padding: 20px 14px 26px;
  }

  .login-hero {
    min-height: auto;
    padding: 0 4px;
  }

  .login-brand-mark {
    font-size: 24px;
  }

  .login-copy {
    margin-top: 34px;
  }

  .login-copy h1 {
    font-size: 31px;
    line-height: 1.14;
  }

  .login-copy p {
    margin-top: 10px;
    font-size: 17px;
  }

  .login-feature-list {
    gap: 28px;
    margin-top: 24px;
  }

  .login-feature-list span {
    gap: 8px;
    min-width: 64px;
    font-size: 13px;
  }

  .login-feature-icon {
    width: 30px;
    height: 30px;
  }

  .login-hero-art {
    position: relative;
    right: auto;
    bottom: auto;
    width: 100%;
    height: 190px;
    margin-top: 16px;
    overflow: hidden;
    transform: none;
  }

  .login-stream {
    right: -210px;
    bottom: 54px;
    width: 520px;
    height: 122px;
  }

  .login-device {
    left: 28px;
    bottom: 2px;
    width: 86px;
    height: 132px;
    border-width: 6px;
    border-radius: 19px;
  }

  .login-device i {
    width: 36px;
    height: 36px;
    border-width: 6px;
  }

  .login-device strong {
    min-width: 52px;
    min-height: 23px;
    font-size: 13px;
  }

  .stream-heart {
    left: 234px;
    top: 19px;
    width: 31px;
    height: 31px;
  }

  .stream-heart::before,
  .stream-heart::after {
    width: 19px;
    height: 19px;
  }

  .stream-like {
    left: 330px;
    top: 56px;
    width: 36px;
    height: 36px;
  }

  .stream-star {
    left: 190px;
    top: 75px;
    width: 28px;
    height: 28px;
  }

  .login-panel {
    width: 100%;
    padding: 28px 22px 22px;
    border-radius: 20px;
  }

  .login-tabs {
    gap: 28px;
    margin-bottom: 6px;
    font-size: 16px;
  }

  .login-card h2 {
    font-size: 21px;
  }

  .login-field input,
  .login-panel button.primary {
    min-height: 50px;
  }

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

  .shop-merge-form,
  .shop-merge-options,
  .shop-category-row,
  .managed-account-row,
  .account-alert-controls,
  .endpoint-monitor-meta {
    grid-template-columns: 1fr;
  }

  .account-alert-head {
    align-items: flex-start;
  }

  .account-alert-actions button {
    flex: 1;
  }

  .managed-account-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .endpoint-monitor-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .filters label {
    min-width: 0;
  }

  .orders-page {
    gap: 12px;
  }

  .orders-list-toolbar {
    align-items: flex-start;
    flex-direction: column;
    min-height: 0;
    padding: 14px;
  }

  .orders-sort-button {
    width: 100%;
  }

  .order-list-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 14px;
  }

  .order-main-cell,
  .order-spend-cell,
  .order-conversion-cell,
  .order-renew-cell {
    grid-column: auto;
  }

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

  .order-main-cell {
    grid-template-columns: 64px minmax(0, 1fr);
    align-items: start;
  }

  .order-cover {
    width: 64px;
    height: 64px;
  }

  .order-cover::after {
    inset: 24px 21px;
  }

  .order-title-block span,
  .order-title-block small,
  .order-status-cell small,
  .order-renew-cell small,
  .order-spend-cell span,
  .order-stat-cell span,
  .order-renew-cell span {
    white-space: normal;
  }

  .order-action-cell {
    justify-content: stretch;
  }

  .order-action-cell .link-button,
  .order-action-cell .order-terminate-button {
    width: 100%;
  }

  .order-detail-row {
    padding: 0 12px 12px;
  }

  .account-card {
    min-height: 0;
  }

  .race-row {
    grid-template-columns: 32px 52px minmax(0, 1fr);
    align-items: start;
  }

  .race-cover {
    width: 52px;
    height: 52px;
  }

  .race-cover::after {
    inset: 18px 16px;
  }

  .decision-hero {
    grid-template-columns: 1fr;
  }

  .decision-badge {
    justify-self: start;
  }

  .home-order-row {
    grid-template-columns: 26px 58px minmax(0, 1fr);
    align-items: start;
  }

  .home-order-row em,
  .home-order-row small {
    grid-column: 3;
    text-align: left;
  }

  .home-order-thumb {
    width: 52px;
    height: 52px;
  }

  .race-row em {
    text-align: left;
  }

  .race-row small,
  .race-row em {
    grid-column: 3;
  }

  .table-wrap {
    overflow: visible;
    border: 0;
    border-radius: 0;
  }

  table,
  tbody,
  tr,
  td {
    display: block;
    width: 100%;
  }

  table {
    min-width: 0;
  }

  th,
  td {
    width: 100% !important;
  }

  thead {
    display: none;
  }

  tbody {
    display: grid;
    gap: 10px;
  }

  tr {
    display: grid;
    gap: 6px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
  }

  td {
    display: grid;
    grid-template-columns: 98px minmax(0, 1fr);
    gap: 8px;
    padding: 3px 0;
    border-bottom: 0;
  }

  td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 13px;
  }

  td[data-label="内容"] {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  td[data-label="内容"]::before {
    font-weight: 600;
  }

  td[data-label="操作"] {
    grid-template-columns: 1fr;
    padding-top: 8px;
  }

  td[data-label="操作"]::before {
    display: none;
  }

  .table-wrap .order-detail-row {
    padding: 0;
  }

  .table-wrap .order-detail-row td {
    display: block;
    grid-template-columns: 1fr;
    padding: 0;
  }

  .table-wrap .order-detail-row td::before {
    display: none;
  }

  .link-button {
    min-height: 40px;
    width: 100%;
  }

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

  .detail-summary strong {
    font-size: 18px;
  }

  .chart {
    min-height: 220px;
    padding: 8px;
  }

  .chart svg {
    height: 210px;
  }

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

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

  .daily-breakdown-row {
    grid-template-columns: 1fr 0.9fr 0.9fr 0.9fr;
    gap: 6px;
    padding: 8px;
    font-size: 12px;
  }

  .hourly-detail-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .hourly-breakdown-row {
    grid-template-columns: 1.45fr repeat(7, minmax(82px, 1fr));
    min-width: 920px;
  }

  .daily-breakdown-row strong {
    font-size: 12px;
  }

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

@media (max-width: 360px) {
  .account-period-switch {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .account-period-switch button {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .actions,
  .filters,
  .two,
  .three,
  .insight-grid,
  .detail-lead,
  .detail-summary {
    grid-template-columns: 1fr;
  }

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

  .overview-profile-card,
  .overview-wallet-card {
    padding: 18px;
  }

  .overview-profile-stats,
  .overview-wallet-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .overview-campaign-card strong {
    font-size: 20px;
  }

  .work-metrics {
    grid-template-columns: 1fr;
  }

  .login-shell {
    padding-inline: 12px;
  }

  .login-copy h1 {
    font-size: 28px;
  }

  .login-copy p {
    font-size: 15px;
  }

  .login-feature-list {
    gap: 18px;
  }

  .login-panel {
    padding: 24px 16px 18px;
  }

  .login-tabs {
    gap: 18px;
  }
}
