:root {
  --bg: #fff5f6;
  --surface: #ffffff;
  --surface-soft: #fffafa;
  --text: #1d1d1f;
  --muted: #76676a;
  --line: #efd2d7;
  --primary: #ff3b5f;
  --primary-strong: #e92f52;
  --rind: #2fb36d;
  --rind-strong: #1f8f53;
  --success: #1f8f53;
  --error: #c9163a;
  --warning: #a05a00;
  font-family:
    -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI",
    "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 50% -120px, rgba(255, 59, 95, 0.16), transparent 280px),
    linear-gradient(180deg, #fff8f9 0%, var(--bg) 58%, #fff 100%);
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

.page-shell {
  width: 100%;
  min-height: 100dvh;
  padding: 22px 20px 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.top-bar {
  width: min(760px, 100%);
  height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #424245;
  font-size: 14px;
  font-weight: 600;
}

.brand-mark {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, var(--rind), var(--rind-strong));
  border-radius: 8px;
  font-size: 13px;
  font-weight: 750;
}

.hero {
  width: min(760px, 100%);
  padding: 44px 0 28px;
  text-align: center;
}

.eyebrow {
  margin: 0 0 10px;
  color: #86868b;
  font-size: 13px;
  font-weight: 600;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  max-width: 680px;
  margin: 0 auto;
  font-size: clamp(40px, 7vw, 68px);
  line-height: 1.05;
  font-weight: 700;
}

.subtitle {
  max-width: 520px;
  margin: 18px auto 0;
  color: var(--muted);
  font-size: clamp(17px, 2.6vw, 21px);
  line-height: 1.45;
}

.field span {
  color: #424245;
  font-size: 14px;
  font-weight: 600;
}

.field small {
  color: #86868b;
  font-size: 13px;
  font-weight: 500;
}

input {
  width: 100%;
  min-height: 54px;
  padding: 14px 16px;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
  font-size: 17px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(255, 59, 95, 0.12);
}

.workspace {
  width: min(520px, 100%);
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(239, 210, 215, 0.92);
  border-radius: 8px;
  box-shadow: 0 18px 50px rgba(156, 37, 60, 0.1);
  overflow: hidden;
  backdrop-filter: saturate(180%) blur(20px);
}

.mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin: 18px 18px 0;
  padding: 4px;
  background: #f8e5e9;
  border-radius: 8px;
}

.mode-tab {
  min-height: 40px;
  border: 0;
  border-radius: 6px;
  color: #6f595e;
  background: transparent;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  transition: background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.mode-tab.active {
  color: #1d1d1f;
  background: #fff;
  box-shadow: 0 1px 5px rgba(156, 37, 60, 0.14);
}

.status {
  margin: 18px 24px 0;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.5;
  background: #fff;
}

.status-title {
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
}

.status-line {
  margin-top: 3px;
  color: inherit;
  overflow-wrap: anywhere;
}

.status.success {
  color: var(--success);
  border-color: rgba(31, 143, 83, 0.24);
  background: #f0fff6;
}

.status.error {
  color: var(--error);
  border-color: rgba(201, 22, 58, 0.2);
  background: #fff0f3;
}

.status.warning {
  color: var(--warning);
  border-color: rgba(178, 80, 0, 0.22);
  background: #fff8ec;
}

.operation-panel {
  padding: 30px 24px 26px;
}

.panel-heading {
  display: grid;
  gap: 8px;
  margin-bottom: 24px;
  text-align: center;
}

.panel-heading h2 {
  font-size: 28px;
  line-height: 1.25;
  font-weight: 700;
}

.panel-heading p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.agent-form {
  display: grid;
  gap: 16px;
}

.field {
  display: grid;
  gap: 8px;
}

.primary-action {
  width: 100%;
  min-height: 52px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: var(--primary);
  cursor: pointer;
  font-size: 17px;
  font-weight: 650;
  transition: background 160ms ease, transform 160ms ease;
}

.primary-action:hover {
  background: var(--primary-strong);
}

.primary-action:active {
  transform: translateY(1px);
}

.primary-action:disabled {
  cursor: not-allowed;
  opacity: 0.68;
}

.primary-action.compact,
.secondary-action {
  min-height: 44px;
  font-size: 15px;
}

.secondary-action {
  width: 100%;
  border: 0;
  border-radius: 8px;
  color: var(--primary);
  background: #fff1f4;
  cursor: pointer;
  font-weight: 600;
}

.confirm-dialog {
  width: min(380px, calc(100% - 32px));
  padding: 0;
  border: 0;
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 24px 70px rgba(88, 15, 30, 0.24);
}

.confirm-dialog::backdrop {
  background: rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(10px);
}

.confirm-dialog form {
  padding: 24px;
}

.dialog-kicker {
  margin-bottom: 8px;
  color: #86868b;
  font-size: 13px;
  font-weight: 600;
}

.confirm-dialog h2 {
  font-size: 24px;
}

.dialog-message {
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.55;
}

.dialog-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 22px;
}

@media (max-width: 760px) {
  .page-shell {
    min-height: auto;
    padding: 12px 12px 24px;
    justify-content: flex-start;
  }

  .top-bar {
    width: 100%;
    height: 38px;
    font-size: 13px;
  }

  .brand-mark {
    width: 26px;
    height: 26px;
    border-radius: 7px;
  }

  .hero {
    width: min(420px, 100%);
    padding: 20px 0 16px;
  }

  .eyebrow {
    display: none;
  }

  h1 {
    font-size: clamp(30px, 9vw, 38px);
    line-height: 1.08;
  }

  .subtitle {
    margin-top: 10px;
    font-size: 15px;
    line-height: 1.45;
  }

  .workspace {
    width: min(420px, 100%);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
  }

  .mode-tabs {
    margin: 12px 12px 0;
  }

  .mode-tab {
    min-height: 42px;
  }

  .operation-panel {
    padding: 20px 16px 18px;
  }

  .panel-heading {
    gap: 6px;
    margin-bottom: 18px;
  }

  .panel-heading h2 {
    font-size: 24px;
  }

  .panel-heading p {
    font-size: 14px;
    line-height: 1.45;
  }

  .agent-form {
    gap: 13px;
  }

  .field {
    gap: 6px;
  }

  input {
    min-height: 50px;
    padding: 12px 14px;
    font-size: 16px;
  }

  .primary-action {
    min-height: 50px;
    font-size: 16px;
  }

  .status {
    margin: 12px 16px 0;
    padding: 11px 12px;
    font-size: 13px;
  }

  .confirm-dialog {
    width: calc(100% - 28px);
  }

  .confirm-dialog form {
    padding: 20px;
  }

  .dialog-actions {
    grid-template-columns: 1fr;
  }

  .dialog-actions .secondary-action {
    order: 2;
  }
}
