/* 子账号自助 — 与需求稿风格接近的简洁界面 */

:root {
  --bg: #f5f5f5;
  --card: #ffffff;
  --text: #1a1a1a;
  --muted: #666666;
  --border: #e8e8e8;
  --accent: #111111;
  --link: #1677ff;
  --success: #0d7a3e;
  --danger: #c41e3a;
  --radius: 10px;
  --font: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
}

/* —— 登录页 —— */
.login-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
}

.login-title {
  margin: 0 0 28px;
  font-size: 1.35rem;
  font-weight: 600;
  text-align: center;
  letter-spacing: 0.02em;
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  padding: 32px 28px 28px;
}

.login-card label {
  display: block;
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 6px;
}

.login-card input {
  width: 100%;
  padding: 12px 14px;
  margin-bottom: 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
}

.login-card input:focus {
  outline: none;
  border-color: #999;
}

.login-card button[type="submit"] {
  width: 100%;
  margin-top: 8px;
  padding: 14px;
  border: none;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.login-card button[type="submit"]:hover {
  opacity: 0.92;
}

.login-error {
  min-height: 1.25rem;
  margin: 0 0 10px;
  font-size: 0.85rem;
  color: var(--danger);
}
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
}

/* —— 引导页 —— */
.guide-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 20px 80px;
  background: var(--card);
  min-height: 100vh;
  box-shadow: 0 0 0 1px var(--border);
}

.guide-dealer {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 8px;
}

.guide-email {
  font-size: 1.5rem;
  font-weight: 600;
  word-break: break-all;
  margin: 0 0 28px;
  color: var(--text);
}

.guide-steps {
  margin: 0;
  padding-left: 1.25rem;
}

.guide-steps li {
  margin-bottom: 14px;
}

.guide-steps a {
  color: var(--link);
  word-break: break-all;
}

.code-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin: 24px 0 8px;
}

.code-row input {
  flex: 1;
  min-width: 140px;
  padding: 12px 14px;
  font-size: 1.25rem;
  letter-spacing: 0.15em;
  font-weight: 600;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: ui-monospace, monospace;
}

.code-row button {
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}

.code-row button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.code-meta {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 20px;
}

.activation-panel {
  margin-top: 8px;
  padding: 18px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
}

.activation-heading {
  margin: 0 0 12px;
  font-size: 1rem;
  font-weight: 600;
}

.activation-confirm {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text);
  margin-bottom: 14px;
  cursor: pointer;
}

.activation-confirm input {
  margin-top: 4px;
  flex-shrink: 0;
}

.activation-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

.activation-actions button {
  padding: 11px 16px;
  border: none;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.activation-actions button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.activation-actions button#btn-start-reset {
  background: #1677ff;
}

.activation-meta {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0;
}

.activation-link-preview {
  font-size: 0.75rem;
  color: var(--muted);
  margin: 8px 0 0;
  word-break: break-all;
  font-family: ui-monospace, monospace;
}

.btn-primary-continue {
  width: 100%;
  max-width: 520px;
  padding: 12px 18px;
  border: none;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  line-height: 1.4;
}

.btn-primary-continue:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* 引导页结果弹框 */
.result-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.result-modal[hidden] {
  display: none !important;
}

.result-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.result-modal-dialog {
  position: relative;
  width: 100%;
  max-width: 400px;
  padding: 28px 24px 22px;
  border-radius: 12px;
  background: var(--card);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
  text-align: center;
}

.result-modal.is-success .result-modal-dialog {
  border: 1px solid #b7eb8f;
}

.result-modal.is-error .result-modal-dialog {
  border: 1px solid #ffccc7;
}

.result-modal-title {
  margin: 0 0 12px;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
}

.result-modal.is-success .result-modal-title {
  color: var(--success);
}

.result-modal.is-error .result-modal-title {
  color: var(--danger);
}

.result-modal-body {
  margin: 0 0 22px;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--muted);
}

.result-modal-btn {
  min-width: 140px;
  padding: 11px 24px;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  color: #fff;
  background: var(--accent);
}

.result-modal.is-success .result-modal-btn {
  background: var(--success);
}

.result-modal.is-error .result-modal-btn {
  background: var(--danger);
}

.pipeline-progress {
  margin: 20px 0 0;
}

.pipeline-progress[hidden] {
  display: none !important;
}

.pipeline-progress-card {
  padding: 22px 20px;
  border-radius: var(--radius);
  border: 1px solid #91caff;
  background: linear-gradient(180deg, #e6f4ff 0%, #f8fbff 100%);
  text-align: center;
}

.pipeline-spinner {
  width: 36px;
  height: 36px;
  margin: 0 auto 14px;
  border: 3px solid #91caff;
  border-top-color: #1677ff;
  border-radius: 50%;
  animation: pipeline-spin 0.85s linear infinite;
}

@keyframes pipeline-spin {
  to {
    transform: rotate(360deg);
  }
}

.pipeline-progress-title {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.pipeline-progress-msg {
  margin: 0 0 14px;
  font-size: 0.9rem;
  color: #0958d9;
  min-height: 1.4em;
}

.pipeline-progress-track {
  height: 6px;
  border-radius: 3px;
  background: #d6e4ff;
  overflow: hidden;
  margin-bottom: 16px;
}

.pipeline-progress-fill {
  height: 100%;
  width: 0%;
  background: #1677ff;
  border-radius: 3px;
  transition: width 0.35s ease;
}

.pipeline-progress-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  text-align: left;
  font-size: 0.85rem;
}

.pipeline-progress-steps li {
  position: relative;
  padding: 6px 0 6px 22px;
  color: var(--muted);
}

.pipeline-progress-steps li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 11px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #d9d9d9;
}

.pipeline-progress-steps li.active {
  color: #0958d9;
  font-weight: 600;
}

.pipeline-progress-steps li.active::before {
  background: #1677ff;
  box-shadow: 0 0 0 3px #bae0ff;
}

.pipeline-progress-steps li.done {
  color: var(--success);
}

.pipeline-progress-steps li.done::before {
  background: var(--success);
}

.pipeline-progress-elapsed {
  margin: 12px 0 0;
  font-size: 0.75rem;
  color: var(--muted);
}

.guide-help-bar {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0 12px;
  flex: 1;
  text-align: center;
}

.guide-help-bar a {
  color: var(--link);
  text-decoration: none;
}

.guide-help-bar a:hover {
  text-decoration: underline;
}

.guide-page .top-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.dashboard-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 90%;
  padding: 12px 20px;
  border-radius: 8px;
  background: #1a1a1a;
  color: #fff;
  font-size: 0.9rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  z-index: 900;
}

.dashboard-toast[hidden] {
  display: none !important;
}

button.link-action {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--link);
  cursor: pointer;
  text-decoration: underline;
}

.status-list {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: none;
}

.status-list li {
  padding: 12px 14px;
  margin-bottom: 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fafafa;
  font-size: 0.95rem;
  color: var(--muted);
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.status-list li.active {
  border-color: #1677ff44;
  background: #e6f4ff;
  color: var(--text);
  font-weight: 500;
}

.status-list li.success {
  border-color: #b7eb8f;
  background: #f6ffed;
  color: var(--success);
}

.status-list li.error {
  border-color: #ffccc7;
  background: #fff2f0;
  color: var(--danger);
}

.guide-footer-nav {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 48px;
  color: var(--muted);
  font-size: 1.2rem;
}

.guide-footer-nav button {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  padding: 4px 8px;
}

.guide-footer-nav button:hover {
  color: var(--text);
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.top-bar a {
  font-size: 0.85rem;
  color: var(--link);
  text-decoration: none;
}

.ws-pill {
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f0f0f0;
  color: var(--muted);
}

.ws-pill.ok {
  background: #f6ffed;
  color: var(--success);
}

.ws-pill.err {
  background: #fff2f0;
  color: var(--danger);
}

.top-bar .sep {
  margin: 0 8px;
  color: var(--border);
}

/* —— 经销商看板 —— */
.dashboard-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 20px 48px;
}

.dashboard-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 20px;
}

.dashboard-title {
  margin: 0 0 6px;
  font-size: 1.35rem;
}

.dashboard-sub {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.dashboard-actions .link-btn {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  font-size: 0.9rem;
}

.dashboard-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-end;
  margin-bottom: 16px;
}

.dashboard-toolbar label {
  font-size: 0.85rem;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dashboard-toolbar select {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-family: inherit;
  min-width: 160px;
}

.btn-secondary {
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--card);
  cursor: pointer;
  font-family: inherit;
}

.table-wrap {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.data-table th,
.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.data-table th {
  background: #fafafa;
  font-weight: 600;
}

.cell-muted {
  color: var(--muted);
  text-align: center;
}

.cell-err {
  color: var(--danger);
  font-size: 0.8rem;
  margin-top: 4px;
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
}

.badge-pending {
  background: #f5f5f5;
  color: var(--muted);
}

.badge-progress {
  background: #e6f4ff;
  color: var(--link);
}

.badge-success {
  background: #f6ffed;
  color: var(--success);
}

.badge-failed {
  background: #fff2f0;
  color: var(--danger);
}

.link-action {
  color: var(--link);
  text-decoration: none;
  font-weight: 600;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 16px;
}

.pager button {
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--card);
  cursor: pointer;
  font-family: inherit;
}

.pager button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.dashboard-footnote {
  margin-top: 24px;
  font-size: 0.8rem;
  color: var(--muted);
}

.dashboard-footnote code {
  font-size: 0.78rem;
}
