/* ==========================================================================
 * CaseOS 认证与开通页共享样式（login.html / register.html）
 * 统一视觉主范式：白底深蓝（#FFFFFF × #0F2D52 × #1A56DB）× 思源黑体 + Inter
 * ========================================================================== */

@font-face {
  font-family: "Inter";
  src: url("assets/fonts/InterVariable.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("assets/fonts/InterVariable-Italic.ttf") format("truetype");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --bg: #FFFFFF;
  --surface: #F4F7FB;
  --surface-2: #EDF3FA;
  --accent-tint: #EEF4FC;

  --navy: #0F2D52;
  --cobalt: #1A56DB;
  --ink: #0B192C;
  --body: #334155;
  --muted: #64748B;

  --rule-soft: #DCE5F0;
  --rule-card: #D0DCEA;
  --border: rgba(15, 45, 82, 0.11);

  --err: #B91C1C;
  --err-soft: #FEF2F2;
  --err-border: #FECACA;

  --sans: "Inter", "Source Han Sans CN", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--sans);
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 20px 20px;
  font-feature-settings: "tnum" 1;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(640px 420px at 84% 10%, rgba(26, 86, 219, 0.065) 0%, transparent 65%),
    radial-gradient(520px 380px at 14% 92%, rgba(15, 45, 82, 0.045) 0%, transparent 65%),
    var(--surface);
}

/* 页顶 2.8px 品牌双段细线 */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2.8px;
  z-index: 10;
  background: linear-gradient(
    90deg,
    var(--navy) 0%,
    var(--navy) 68%,
    var(--cobalt) 68%,
    var(--cobalt) 100%
  );
  pointer-events: none;
}

a {
  color: inherit;
  text-decoration: none;
}

.auth-card {
  width: 100%;
  max-width: 448px;
  background: var(--bg);
  border: 1px solid var(--rule-card);
  border-top: 2.5px solid var(--navy);
  border-radius: 22px;
  padding: 32px 34px 28px;
  box-shadow: 0 20px 56px rgba(15, 45, 82, 0.08), 0 2px 6px rgba(15, 45, 82, 0.04);
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin-bottom: 20px;
}

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: var(--navy);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  box-shadow: 0 4px 12px rgba(15, 45, 82, 0.2);
}

.brand-mark i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #FFFFFF;
  display: block;
}

.brand-cn {
  font-size: 16.5px;
  font-weight: 700;
  color: var(--navy);
}

.brand-sep {
  width: 1px;
  height: 12px;
  background: rgba(15, 45, 82, 0.18);
}

.brand-en {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--cobalt);
  letter-spacing: 0.16em;
}

h1 {
  font-size: 22px;
  font-weight: 700;
  color: var(--navy);
  text-align: center;
  letter-spacing: -0.015em;
}

.sub {
  text-align: center;
  color: var(--muted);
  font-size: 13.8px;
  line-height: 1.62;
  margin: 8px 0 14px;
}

.quota-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--accent-tint);
  border: 1px solid rgba(26, 86, 219, 0.16);
  color: var(--cobalt);
  font-size: 12.6px;
  font-weight: 600;
  margin-bottom: 16px;
}

.quota-pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cobalt);
  flex: none;
}

label.field-label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--navy);
  margin: 13px 0 5px;
}

input[type="text"],
input[type="email"],
input[type="password"] {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--rule-card);
  border-radius: 10px;
  font-size: 14.8px;
  font-family: inherit;
  color: var(--ink);
  background: #FFFFFF;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

input[type="text"]::placeholder,
input[type="email"]::placeholder,
input[type="password"]::placeholder {
  color: #94A3B8;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus {
  border-color: var(--cobalt);
  box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.14);
}

.agree {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  margin-top: 18px;
  font-size: 13px;
  color: var(--body);
  line-height: 1.58;
  cursor: pointer;
}

.agree input {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  flex: none;
  accent-color: var(--navy);
}

button.submit-btn {
  width: 100%;
  margin-top: 20px;
  padding: 12px 18px;
  border: none;
  border-radius: 999px;
  background: var(--navy);
  color: #FFFFFF;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(15, 45, 82, 0.18);
  transition: background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

button.submit-btn:hover {
  background: var(--cobalt);
  box-shadow: 0 10px 24px rgba(26, 86, 219, 0.25);
  transform: translateY(-1px);
}

button.submit-btn:disabled {
  opacity: 0.6;
  cursor: wait;
  transform: none;
}

.msg {
  display: none;
  margin-top: 16px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--err-soft);
  border: 1px solid var(--err-border);
  color: var(--err);
  font-size: 13.5px;
  line-height: 1.55;
}

.auth-links {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--rule-soft);
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: center;
  font-size: 13.5px;
  color: var(--muted);
}

.auth-links a.primary-link {
  color: var(--cobalt);
  font-weight: 600;
}

.auth-links a.primary-link:hover {
  text-decoration: underline;
}

.auth-links a.back-link:hover {
  color: var(--navy);
}

.done {
  display: none;
  text-align: center;
  padding: 8px 0;
}

.done-icon {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--accent-tint);
  border: 1px solid rgba(26, 86, 219, 0.22);
  color: var(--cobalt);
  display: grid;
  place-items: center;
  margin: 4px auto 16px;
}

.done-icon svg {
  width: 26px;
  height: 26px;
}

.done h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 10px;
}

.done p {
  color: var(--body);
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 6px;
}

.done-next {
  margin-top: 22px;
}

.done-next a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--navy);
  color: #FFFFFF;
  border-radius: 999px;
  padding: 12px 26px;
  font-size: 14.5px;
  font-weight: 600;
  transition: background 0.18s ease;
}

.done-next a:hover {
  background: var(--cobalt);
}

.auth-foot {
  margin-top: 18px;
  text-align: center;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.65;
}

.auth-foot a {
  border-bottom: 1px solid var(--rule-card);
  transition: color 0.15s ease, border-color 0.15s ease;
}

.auth-foot a:hover {
  color: var(--navy);
  border-color: var(--navy);
}

@media (max-width: 480px) {
  .auth-card {
    padding: 30px 22px 26px;
  }
}
