:root {
  --bg: #f6f3ee;
  --bg-strong: #ece5da;
  --surface: rgba(255, 255, 255, 0.82);
  --surface-strong: #fffdf8;
  --text: #18222d;
  --muted: #5f6d79;
  --line: rgba(24, 34, 45, 0.12);
  --brand: #0c7a6b;
  --brand-deep: #0b5c50;
  --accent: #dc7b2a;
  --accent-soft: rgba(220, 123, 42, 0.15);
  --ok: #1d8e5f;
  --ok-soft: rgba(29, 142, 95, 0.14);
  --warn: #bd6b1c;
  --warn-soft: rgba(189, 107, 28, 0.14);
  --shadow: 0 24px 60px rgba(24, 34, 45, 0.09);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 16px;
  --font: "IBM Plex Sans", "Noto Sans SC", "Microsoft YaHei UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(12, 122, 107, 0.16), transparent 28%),
    radial-gradient(circle at top right, rgba(220, 123, 42, 0.18), transparent 24%),
    linear-gradient(180deg, #faf7f0 0%, var(--bg) 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(12, 122, 107, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(12, 122, 107, 0.04) 1px, transparent 1px);
  background-size: 44px 44px;
  pointer-events: none;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.75), transparent);
}

.page-shell {
  width: min(1200px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 24px 0 48px;
}

.topbar,
.hero,
.customer-card,
.auth-panel,
.team-form {
  animation: rise 0.5s ease both;
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.brand-mark {
  padding: 10px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.brand-text {
  font-size: 1.05rem;
  font-weight: 700;
}

.identity-chip {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 18px;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.identity-label,
.muted,
.section-tip,
.fact-box span,
.hero-stat span {
  color: var(--muted);
}

.identity-meta {
  font-size: 0.92rem;
  color: var(--brand-deep);
}

.content {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.hero,
.auth-layout {
  display: grid;
  gap: 24px;
}

.hero {
  grid-template-columns: 1.35fr 0.85fr;
  padding: 34px;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(255, 247, 239, 0.95));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--brand);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin: 0;
}

.hero h1,
.panel-head h1 {
  font-size: clamp(2.1rem, 3vw, 3.3rem);
  line-height: 1.05;
}

.hero-text,
.customer-notes,
.side-note p {
  margin-top: 16px;
  color: var(--muted);
  line-height: 1.7;
}

.hero-panel {
  display: grid;
  gap: 14px;
}

.hero-stat,
.fact-box,
.customer-card,
.status-banner,
.api-result,
.side-note {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.hero-stat {
  padding: 18px;
  background: rgba(255, 255, 255, 0.74);
}

.hero-stat strong,
.fact-box strong {
  display: block;
  margin-top: 10px;
  font-size: 1.12rem;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
}

.section-head h2,
.panel-head h2 {
  margin-top: 6px;
  font-size: 1.8rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.customer-card,
.auth-panel {
  padding: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.customer-card-top,
.panel-head,
.action-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

.customer-card h3 {
  margin-top: 18px;
  font-size: 1.45rem;
}

.customer-endpoint {
  margin-top: 10px;
  font-weight: 700;
}

.primary-link,
.primary-button,
.ghost-link {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 46px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.primary-link,
.primary-button {
  padding: 0 20px;
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  color: #fff;
  border: 0;
  box-shadow: 0 14px 28px rgba(12, 122, 107, 0.22);
  cursor: pointer;
}

.primary-link {
  margin-top: 22px;
}

.team-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.field-label {
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--muted);
}

.team-form-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
}

.text-input {
  min-height: 50px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--text);
  font: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.text-area {
  min-height: 120px;
  padding: 14px 18px;
  resize: vertical;
}

.inline-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
}

.text-input:focus {
  outline: 0;
  border-color: rgba(12, 122, 107, 0.45);
  box-shadow:
    0 0 0 4px rgba(12, 122, 107, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.primary-button:hover,
.primary-link:hover,
.ghost-link:hover {
  transform: translateY(-1px);
}

.ghost-link {
  padding: 0 18px;
  color: var(--text);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.65);
}

.auth-layout {
  grid-template-columns: 1.2fr 0.8fr;
}

.ops-layout {
  align-items: start;
}

.auth-panel {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

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

.fact-box {
  padding: 18px;
  background: var(--surface-strong);
}

.status-banner {
  padding: 18px 20px;
  line-height: 1.65;
}

.status-ok {
  background: var(--ok-soft);
  border-color: rgba(29, 142, 95, 0.22);
}

.status-waiting {
  background: var(--warn-soft);
  border-color: rgba(189, 107, 28, 0.22);
}

.status-error {
  background: rgba(184, 53, 53, 0.12);
  border-color: rgba(184, 53, 53, 0.24);
}

.steps {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.8;
}

.tag,
.side-note-label {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.92rem;
  font-weight: 700;
}

.side-note {
  padding: 18px;
  background: rgba(255, 250, 242, 0.92);
}

.api-result {
  padding: 16px;
  background: rgba(11, 92, 80, 0.07);
  white-space: pre-wrap;
  word-break: break-word;
  font-family: "IBM Plex Mono", "Consolas", monospace;
  font-size: 0.92rem;
}

.ghost-button {
  min-height: 46px;
  border: 1px solid var(--line);
  cursor: pointer;
}

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

.ops-card {
  width: 100%;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.76);
  text-align: left;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.ops-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.ops-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.ops-card-meta {
  color: var(--muted);
  line-height: 1.6;
}

.test-banner {
  padding: 16px 18px;
  border: 1px solid rgba(189, 107, 28, 0.28);
  border-radius: var(--radius-lg);
  background: rgba(189, 107, 28, 0.12);
  color: #71410e;
  box-shadow: var(--shadow);
}

.primary-button[disabled] {
  opacity: 0.6;
  cursor: wait;
  transform: none;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 920px) {
  .topbar,
  .section-head,
  .customer-card-top,
  .panel-head,
  .action-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero,
  .auth-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100vw - 20px, 1200px);
    padding-top: 18px;
  }

  .hero,
  .customer-card,
  .auth-panel {
    padding: 20px;
  }

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

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

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

  .hero h1,
  .panel-head h1 {
    font-size: 1.85rem;
  }
}
