/* 控制页样式 —— token 来自 /admin/theme.css（global.css 同源抽取），本文件只写布局。 */

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
}

body {
  min-height: 100vh;
  color: var(--fg);
  font:
    15px/1.7 ui-sans-serif,
    system-ui,
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif;
  /* 海边身份：站点场景兜底渐变（五主题各自有对应色板） */
  background: var(--scene-fallback) fixed;
}

/* 可读性 veil */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: var(--mist);
  pointer-events: none;
}

body > * {
  position: relative;
}

.wrap {
  max-width: 620px;
  margin: 0 auto;
  padding: clamp(28px, 8vh, 80px) 20px 48px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 6px;
}

.brand .wordmark {
  font-family: var(--font-accent);
  font-style: italic;
  font-size: 2rem;
  color: var(--accent);
}

.brand h1 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 620;
  margin: 0;
}

.card {
  border-radius: 20px;
  padding: 22px 24px;
}

.card h2 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 620;
  margin: 0 0 8px;
}

.card p {
  margin: 0 0 14px;
}

.muted {
  color: var(--muted);
  font-size: 0.88rem;
}

.muted code,
.foot code {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.82em;
  background: color-mix(in srgb, var(--bg-2) 62%, transparent);
  border: 1px solid var(--hairline);
  border-radius: 6px;
  padding: 1px 6px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 22px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 24%, transparent);
  color: var(--fg);
  font: inherit;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  text-decoration: none;
  transition:
    transform 160ms var(--ease-out),
    background-color 200ms var(--ease-out),
    opacity 200ms var(--ease-out);
}

@media (hover: hover) {
  .btn:hover {
    background: color-mix(in srgb, var(--accent) 36%, transparent);
  }
}

.btn:active {
  transform: scale(var(--press-scale));
}

.btn:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
}

@media (hover: hover) {
  .btn-ghost:hover {
    background: color-mix(in srgb, var(--fg) 8%, transparent);
    color: var(--fg);
  }
}

.btn[disabled] {
  opacity: 0.55;
  cursor: default;
}

.spin {
  animation: adm-spin 1.1s linear infinite;
  transform-origin: 50% 50%;
}

@keyframes adm-spin {
  to {
    transform: rotate(360deg);
  }
}

.statusline {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 12px 0 0;
}

.statusline b {
  color: var(--fg);
  font-weight: 600;
}

.logbox {
  margin-top: 12px;
  max-height: 200px;
  overflow: auto;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.76rem;
  line-height: 1.6;
  color: var(--muted);
  background: color-mix(in srgb, var(--bg-2) 62%, transparent);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 10px 12px;
  white-space: pre-wrap;
}

.foot {
  text-align: center;
  font-size: 0.78rem;
  margin-top: 8px;
}

#toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 60;
  max-width: min(420px, calc(100vw - 36px));
  border-radius: 16px;
  padding: 12px 18px;
  color: var(--fg);
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 260ms var(--ease-out),
    transform 260ms var(--ease-out);
  pointer-events: none;
}

#toast.show {
  opacity: 1;
  transform: none;
}

/* ---------- Sveltia 壳页（/sveltia）加载卡 ---------- */

.sv-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
}

.sv-card {
  max-width: 560px;
  border-radius: 20px;
  padding: 26px 30px;
}

.sv-card .wordmark {
  font-family: var(--font-accent);
  font-style: italic;
  color: var(--accent);
  font-size: 1.6rem;
}

.sv-card h1 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 620;
  margin: 6px 0 12px;
}

.hidden {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .spin {
    animation: none;
  }
  .btn,
  #toast {
    transition: none;
  }
}
