/* ToolsMCP Member Console
   Public-facing surface: shares the site's dark + amber palette but keeps its
   own layout rules so the admin console CSS stays untouched. */

.member-body {
  /* Content shell width used by the topbar, tab bar and main content so all
     three share one vertical axis. 1152 = 1200 outer - 2*24 padding. */
  --shell-w: 1152px;
  --m-panel: #11131a;
  --m-panel-2: #161922;
  --m-line: rgba(243, 240, 232, 0.11);
  --m-line-strong: rgba(243, 240, 232, 0.2);
  --m-ok: #6dcc8a;
  /* WCAG AAA: #f07178 was only 6.13:1 on the lightest panel (#161922).
     Raised to #f78f95, which clears 7:1 on every surface in this console. */
  --m-err: #f78f95;
  --m-info: #7eb6ff;
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
}

[hidden] {
  display: none !important;
}

/* ---------- 键盘可达性 ---------- */
:where(a, button, [role="button"], input, select, textarea, [role="tab"]):focus-visible {
  outline: 2px solid var(--m-accent, var(--accent));
  outline-offset: 2px;
  border-radius: 4px;
}

/* The console hides panels rather than removing them, so tabbing must skip
   the inactive ones — otherwise keyboard users land on invisible controls. */
[role="tabpanel"][hidden] {
  display: none !important;
}

/* ---------- 登录 ---------- */

.auth-screen {
  position: relative;
  min-height: 100vh;
  display: grid;
  /* place-items:center on the single child keeps the card centred vertically
     while .auth-layout owns the horizontal split. */
  place-items: center;
  padding: 44px 20px;
  background:
    radial-gradient(ellipse 60% 46% at 18% 6%, rgba(232, 155, 60, 0.13), transparent 68%),
    radial-gradient(ellipse 52% 42% at 88% 92%, rgba(126, 182, 255, 0.07), transparent 70%),
    var(--bg);
}

/* Escape hatch back to the public site — the login card alone gave no way out. */
.auth-back {
  position: absolute;
  left: max(20px, calc((100% - 1200px) / 2));
  top: 26px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.16s ease;
  z-index: 2;
}

.auth-back:hover {
  color: var(--ink);
}

.auth-layout {
  width: min(1040px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 430px);
  align-items: center;
  gap: 56px;
}

/* ---- 左侧：产品价值 ---- */

.auth-intro {
  min-width: 0;
}

.auth-intro .auth-brand {
  margin-bottom: 26px;
}

.auth-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  padding: 5px 12px;
  border: 1px solid rgba(232, 155, 60, 0.3);
  border-radius: 999px;
  background: rgba(232, 155, 60, 0.08);
  color: var(--accent);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.auth-headline {
  margin: 0 0 16px;
  font-family: var(--display);
  font-size: clamp(28px, 3.1vw, 38px);
  font-weight: 700;
  line-height: 1.24;
  letter-spacing: -0.02em;
}

.auth-lede {
  margin: 0 0 28px;
  max-width: 44ch;
  font-size: 14px;
  line-height: 1.72;
  color: var(--muted);
}

.auth-points {
  margin: 0 0 26px;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.auth-points li {
  display: flex;
  align-items: flex-start;
  gap: 13px;
}

.auth-point-icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  border: 1px solid rgba(232, 155, 60, 0.28);
  background: rgba(232, 155, 60, 0.09);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
}

.auth-points b {
  display: block;
  margin-bottom: 2px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
}

.auth-points em {
  display: block;
  font-style: normal;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--muted);
}

.auth-stat {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding-top: 20px;
  border-top: 1px solid var(--m-line);
  font-size: 12.5px;
  color: var(--muted);
}

.auth-stat b {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 14px;
}

.auth-stat-sep {
  opacity: 0.45;
}

/* ---- 右侧：登录卡 ---- */

.auth-panel {
  width: 100%;
  padding: 32px 30px 26px;
  border: 1px solid var(--m-line);
  border-radius: 20px;
  background: linear-gradient(180deg, var(--m-panel-2), var(--m-panel));
  box-shadow: 0 32px 70px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(243, 240, 232, 0.05);
}

/* Trust line: answers "why should I hand over my email?" before the ask. */
.auth-trust {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 18px 0 0;
  padding: 12px 14px;
  border: 1px solid var(--m-line);
  border-radius: 10px;
  background: rgba(8, 9, 12, 0.45);
  font-size: 12px;
  line-height: 1.62;
  color: var(--muted);
}

.auth-trust-icon {
  flex-shrink: 0;
  display: inline-flex;
  margin-top: 1px;
  color: var(--m-ok);
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 22px;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.01em;
}

.auth-brand img {
  display: block;
}

.auth-title {
  margin: 0 0 6px;
  font-family: var(--display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.auth-sub {
  margin: 0 0 22px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.62;
}

.auth-alert {
  margin-bottom: 18px;
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.55;
  border: 1px solid;
}

.auth-alert.is-error {
  color: #ffc9cc;
  border-color: rgba(240, 113, 120, 0.42);
  background: rgba(240, 113, 120, 0.12);
}

.auth-alert.is-info {
  color: #cfe1ff;
  border-color: rgba(126, 182, 255, 0.4);
  background: rgba(126, 182, 255, 0.12);
}

.auth-form {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-foot {
  margin: 22px 0 0;
  font-size: 12.5px;
  color: var(--muted);
  text-align: center;
}

.auth-foot a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.16s ease, border-color 0.16s ease;
}

.auth-foot a:hover {
  color: var(--ink);
  border-bottom-color: var(--m-line-strong);
}

.auth-foot .dot {
  margin: 0 8px;
  opacity: 0.5;
}

/* ---------- 表单 ---------- */

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.field-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.field input,
.inline-form input,
.toolbar-field input,
.toolbar-field select {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--m-line);
  border-radius: 10px;
  background: rgba(8, 9, 12, 0.6);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.field input:focus,
.inline-form input:focus,
.toolbar-field input:focus,
.toolbar-field select:focus {
  outline: none;
  border-color: rgba(232, 155, 60, 0.6);
  box-shadow: 0 0 0 3px rgba(232, 155, 60, 0.14);
}

.field input::placeholder,
.inline-form input::placeholder,
.toolbar-field input::placeholder {
  color: rgba(147, 153, 166, 0.65);
}

#code {
  font-family: var(--mono);
  font-size: 19px;
  letter-spacing: 0.34em;
  text-align: center;
  font-weight: 600;
}

.code-row {
  display: flex;
  gap: 9px;
}

.code-row #code {
  flex: 1;
  min-width: 0;
}

.btn-resend {
  flex-shrink: 0;
  white-space: nowrap;
}

.field-hint {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted, #8b909a);
}

/* Off-screen honeypot — never display to real users. */
.hp-field {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.turnstile-wrap {
  margin: 4px 0 12px;
  min-height: 0;
}

/* ---------- 按钮 ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.16s ease, border-color 0.16s ease,
    color 0.16s ease, opacity 0.16s ease, transform 0.1s ease;
}

.btn:active:not(:disabled) {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-primary {
  color: var(--accent-ink);
  background: var(--accent);
  border-color: var(--accent);
}

.btn-primary:hover:not(:disabled) {
  background: #f2a848;
  border-color: #f2a848;
}

.btn-ghost {
  color: var(--ink);
  background: rgba(243, 240, 232, 0.04);
  border-color: var(--m-line-strong);
}

.btn-ghost:hover:not(:disabled) {
  background: rgba(243, 240, 232, 0.1);
}

.btn-danger {
  color: var(--m-err);
  background: rgba(240, 113, 120, 0.1);
  border-color: rgba(240, 113, 120, 0.36);
}

.btn-danger:hover:not(:disabled) {
  background: rgba(240, 113, 120, 0.18);
}

.btn-block {
  width: 100%;
  padding: 12px 16px;
  font-size: 14.5px;
}

.btn-sm {
  padding: 6px 11px;
  font-size: 12.5px;
  border-radius: 8px;
}

/* ---------- 控制台框架 ---------- */

.console {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  /* Same amber atmosphere as the auth screen — without it the console reads
     as a flat black void below the content fold. */
  background:
    radial-gradient(ellipse 62% 40% at 50% -6%, rgba(232, 155, 60, 0.07), transparent 72%);
}

.console-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  /* Full-bleed bar, aligned content: the background and border span the whole
     viewport, but brand / email / logout sit on the same vertical axis as the
     content below (gutter + the same 24px inset .console-main uses). */
  padding: 14px max(24px, calc((100% - var(--shell-w)) / 2));
  border-bottom: 1px solid var(--m-line);
  background: rgba(8, 9, 12, 0.85);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 40;
}

.console-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--display);
  font-weight: 700;
  font-size: 15px;
}

.console-user {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.console-email {
  font-size: 13px;
  color: var(--muted);
  font-family: var(--mono);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 40vw;
}

.console-tabs {
  display: flex;
  gap: 4px;
  /* Same axis as .console-top and .console-main — tab labels align with the
     page title and cards below. */
  padding: 0 max(24px, calc((100% - var(--shell-w)) / 2));
  border-bottom: 1px solid var(--m-line);
  overflow-x: auto;
  scrollbar-width: none;
  background: var(--bg);
}

.console-tabs::-webkit-scrollbar {
  display: none;
}

.tab {
  position: relative;
  padding: 13px 14px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.16s ease;
}

.tab:hover {
  color: var(--ink);
}

.tab.is-active {
  color: var(--ink);
}

.tab.is-active::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: -1px;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}

.console-main {
  flex: 1;
  /* 1200 outer: four stat cards get ~279px each (vs ~250px at the old 1120),
     and the 6-column call table gains a little breathing room. Paragraph
     readability is still capped separately by .view-desc { max-width: 62ch }. */
  width: min(1200px, 100%);
  margin: 0 auto;
  padding: 30px 24px 72px;
}

.view {
  display: none;
}

.view.is-active {
  display: block;
  animation: view-in 0.26s ease;
}

@keyframes view-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.view-title {
  margin: 0 0 6px;
  font-family: var(--display);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.view-desc {
  margin: 0 0 22px;
  font-size: 13.5px;
  color: var(--muted);
  max-width: 62ch;
  line-height: 1.65;
}

/* ---------- 统计卡 ---------- */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}

.stat-card {
  padding: 17px 18px 15px;
  border: 1px solid var(--m-line);
  border-radius: 14px;
  /* Two-step gradient lifts the card off the page background; the inset
     highlight fakes a top edge catching light. */
  background: linear-gradient(180deg, var(--m-panel-2), var(--m-panel));
  box-shadow: inset 0 1px 0 rgba(243, 240, 232, 0.045);
  display: flex;
  flex-direction: column;
  gap: 9px;
  transition: border-color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.stat-card:hover {
  border-color: var(--m-line-strong);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(243, 240, 232, 0.045);
}

.stat-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.02em;
}

/* Semantic color dot per card, so the four stats scan as different signals
   instead of four identical grey boxes. */
.stat-label::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--m-line-strong);
  flex-shrink: 0;
}

.stat-card-calls .stat-label::before {
  background: var(--accent);
  box-shadow: 0 0 8px rgba(232, 155, 60, 0.5);
}

.stat-card-errors .stat-label::before {
  background: var(--m-err);
}

.stat-card-tokens .stat-label::before {
  background: var(--m-info);
}

.stat-value {
  font-family: var(--mono);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.stat-value-sm {
  font-size: 14px;
  font-weight: 600;
  padding-top: 6px;
}

/* Failure count turns red only when there is something to worry about. */
.stat-value-alert {
  color: var(--m-err);
}

/* ---------- 面板 ---------- */

.panel {
  margin-bottom: 18px;
  border: 1px solid var(--m-line);
  border-radius: 14px;
  background: var(--m-panel);
  overflow: hidden;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--m-line);
}

.panel-head h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.panel-hint {
  font-size: 12px;
  color: var(--muted);
  font-family: var(--mono);
}

.panel-note {
  margin: 0;
  padding: 12px 18px 16px;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.6;
}

.panel-note code {
  font-family: var(--mono);
  font-size: 12px;
  padding: 1px 5px;
  border-radius: 5px;
  background: rgba(243, 240, 232, 0.07);
}

.panel-reveal {
  border-color: rgba(232, 155, 60, 0.45);
  box-shadow: 0 0 0 3px rgba(232, 155, 60, 0.09);
}

.inline-form {
  display: flex;
  gap: 10px;
  padding: 16px 18px;
}

.inline-form input {
  flex: 1;
  min-width: 0;
}

/* ---------- 快速上手步骤 ---------- */

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 16px 18px 18px;
}

.step-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 15px 16px 16px;
  border: 1px solid var(--m-line);
  border-radius: 12px;
  background: rgba(8, 9, 12, 0.45);
  transition: border-color 0.16s ease;
}

.step-card:hover {
  border-color: var(--m-line-strong);
}

.step-head {
  display: flex;
  align-items: center;
  gap: 9px;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid rgba(232, 155, 60, 0.5);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 700;
  flex-shrink: 0;
}

.step-title {
  font-size: 13.5px;
  font-weight: 700;
}

.step-desc {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--muted);
  flex: 1;
}

.step-action {
  margin-top: 4px;
  align-self: flex-start;
}

/* ---------- 复制 ---------- */

.copy-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 18px 4px;
}

.copy-value {
  flex: 1;
  min-width: 0;
  padding: 11px 13px;
  border: 1px dashed var(--m-line-strong);
  border-radius: 10px;
  background: rgba(8, 9, 12, 0.7);
  font-family: var(--mono);
  font-size: 13.5px;
  overflow-x: auto;
  white-space: nowrap;
  user-select: all;
}

.config-block {
  margin: 0;
  padding: 16px 18px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.75;
  color: #d7dbe4;
  background: rgba(8, 9, 12, 0.55);
  white-space: pre;
}

/* ---------- 键值表 ---------- */

.kv-list {
  padding: 6px 18px 14px;
}

.kv {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 9px 0;
  border-bottom: 1px solid var(--m-line);
  font-size: 13px;
}

.kv:last-child {
  border-bottom: 0;
}

.kv-key {
  flex-shrink: 0;
  width: 108px;
  color: var(--muted);
  font-size: 12.5px;
}

.kv-val {
  font-family: var(--mono);
  font-size: 12.5px;
  word-break: break-all;
  color: #d7dbe4;
}

/* ---------- 工具栏 ---------- */

.toolbar {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.toolbar-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 170px;
}

.toolbar-field span {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.toolbar-field select {
  cursor: pointer;
}

/* ---------- 表格 ---------- */

.table-wrap {
  overflow-x: auto;
}

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

.data-table th {
  padding: 11px 18px;
  text-align: left;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--m-line);
  white-space: nowrap;
}

.data-table td {
  padding: 12px 18px;
  border-bottom: 1px solid var(--m-line);
  vertical-align: middle;
}

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

.data-table tbody tr:hover {
  background: rgba(243, 240, 232, 0.022);
}

.data-table .num {
  text-align: right;
  font-family: var(--mono);
  font-size: 12.5px;
}

.data-table .mono {
  font-family: var(--mono);
  font-size: 12.5px;
  color: #d7dbe4;
}

.data-table .empty {
  padding: 34px 18px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

/* Structured empty state: a title, one line of "why is this empty", and the
   actions that fill it. Beats a lone sentence for new members. */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 0;
}

.empty-title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}

.empty-desc {
  margin: 0 0 10px;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.6;
}

.empty-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ---------- 徽章 ---------- */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid;
  white-space: nowrap;
}

.badge-ok {
  color: var(--m-ok);
  border-color: rgba(109, 204, 138, 0.36);
  background: rgba(109, 204, 138, 0.12);
}

.badge-err {
  color: var(--m-err);
  border-color: rgba(240, 113, 120, 0.36);
  background: rgba(240, 113, 120, 0.12);
}

.badge-muted {
  color: var(--muted);
  border-color: var(--m-line-strong);
  background: rgba(243, 240, 232, 0.05);
}

.badge-warn {
  color: var(--accent);
  border-color: rgba(232, 155, 60, 0.42);
  background: rgba(232, 155, 60, 0.13);
}

/* ---------- 提示条 ---------- */

.notice {
  margin-bottom: 18px;
  padding: 12px 15px;
  border: 1px solid rgba(126, 182, 255, 0.32);
  border-left-width: 3px;
  border-radius: 10px;
  background: rgba(126, 182, 255, 0.09);
  font-size: 13px;
  line-height: 1.6;
  color: #d3e2ff;
}

.notice strong {
  color: #fff;
  font-weight: 700;
}

/* ---------- 分页 ---------- */

.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 14px 18px;
  border-top: 1px solid var(--m-line);
}

.pager-info {
  font-size: 12.5px;
  color: var(--muted);
  font-family: var(--mono);
  min-width: 92px;
  text-align: center;
}

/* ---------- Toast ---------- */

.toast-root {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  width: min(360px, calc(100vw - 32px));
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--m-line);
  background: rgba(16, 19, 26, 0.97);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(10px);
  font-size: 13px;
  line-height: 1.55;
  opacity: 0;
  transform: translateY(-8px) translateX(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  cursor: pointer;
}

.toast.is-in {
  opacity: 1;
  transform: none;
}

.toast.is-out {
  opacity: 0;
  transform: translateY(-6px);
}

.toast-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 6px;
  flex-shrink: 0;
  background: var(--m-info);
}

.toast-success .toast-dot {
  background: var(--m-ok);
  box-shadow: 0 0 10px rgba(109, 204, 138, 0.55);
}

.toast-error .toast-dot {
  background: var(--m-err);
  box-shadow: 0 0 10px rgba(240, 113, 120, 0.45);
}

/* ---------- 响应式 ---------- */

/* Two-column login collapses below the point where the intro copy would be
   squeezed. The card keeps full width and the value props move above it. */
@media (max-width: 920px) {
  .auth-screen {
    place-items: start center;
    padding: 58px 20px 40px;
  }

  .auth-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
    max-width: 460px;
  }

  .auth-headline {
    font-size: 26px;
  }

  .auth-headline br {
    display: none;
  }

  /* On a phone the three value props would push the form off-screen; keep the
     headline and the trust line, drop the list. */
  .auth-points,
  .auth-stat {
    display: none;
  }

  .auth-lede {
    margin-bottom: 0;
    font-size: 13.5px;
  }

  .auth-intro .auth-brand {
    margin-bottom: 18px;
  }
}

@media (max-width: 900px) {
  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .console-main {
    padding: 24px 18px 64px;
  }

  .console-top,
  .console-tabs {
    padding-left: 18px;
    padding-right: 18px;
  }

  .kv {
    flex-direction: column;
    gap: 4px;
  }

  .kv-key {
    width: auto;
  }
}

@media (max-width: 560px) {
  .auth-panel {
    padding: 26px 20px 22px;
  }

  .auth-back {
    left: 20px;
    top: 20px;
    font-size: 12.5px;
  }

  .inline-form,
  .code-row {
    flex-direction: column;
  }

  .copy-row {
    flex-direction: column;
    align-items: stretch;
  }

  .stat-value {
    font-size: 20px;
  }

  .panel-head {
    flex-wrap: wrap;
  }

  .data-table th,
  .data-table td {
    padding: 10px 12px;
  }
}

/* ---------- 动效偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
