:root {
  color-scheme: dark;
  --bg: #090c10;
  --panel: #11161c;
  --panel2: #151b22;
  --line: #262d36;
  --text: #f3f5f7;
  --muted: #91a0b3;
  --accent: #dfe7f1;
  --good: #72d8ac;
  --bad: #ff8b96;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "Segoe UI", "Microsoft YaHei", sans-serif;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }

.auth-gate {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 18% 14%, rgba(148,163,184,.08), transparent 32%),
    radial-gradient(circle at 82% 86%, rgba(71,85,105,.06), transparent 28%),
    var(--bg);
}
.auth-card {
  width: min(480px, 100%);
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(160deg, #12171e, #0f1318);
  padding: 28px;
  box-shadow: 0 28px 90px rgba(0,0,0,.45);
}
.mini-brand, .brand { display: inline-flex; align-items: center; gap: 10px; }
.mini-brand { margin-bottom: 30px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: #f7f7f8; display: inline-block; }
.eyebrow { color: #91a0b3; font-size: 11px; letter-spacing: .16em; font-weight: 700; }
.auth-view h1 { margin: 7px 0 8px; font-size: 30px; }
.copy { color: var(--muted); line-height: 1.7; margin: 0 0 20px; font-size: 13px; }
label { display: block; margin-top: 15px; }
label span { display: block; color: var(--muted); font-size: 12px; margin-bottom: 7px; }
input {
  width: 100%;
  border: 1px solid #2c3540;
  border-radius: 11px;
  background: #0b0f14;
  color: var(--text);
  padding: 11px 12px;
  outline: none;
}
input:focus { border-color: #607086; box-shadow: 0 0 0 3px rgba(148,163,184,.08); }
.note, .success, .error {
  margin-top: 16px;
  padding: 11px 12px;
  border-radius: 11px;
  font-size: 12px;
  line-height: 1.6;
}
.note { border: 1px solid #344152; background: #101720; color: #b8c4d2; }
.success { border: 1px solid #27513f; background: #10251d; color: var(--good); }
.error { border: 1px solid #592c34; background: #281419; color: #ffabb3; }
.primary, .secondary, .logout {
  width: 100%;
  margin-top: 18px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 10px 13px;
}
.primary { background: #eef2f6; color: #11161c; font-weight: 700; }
.secondary { margin-top: 9px; background: #151b22; color: var(--text); border-color: var(--line); }
.primary:hover { background: white; }
.secondary:hover { border-color: #495463; }

.shell { min-height: 100vh; }
.nav {
  margin: 0 14px;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 24px 24px;
  padding: 0 22px;
  background: #0d1116;
}
.nav nav { display: flex; align-items: center; gap: 7px; }
.nav nav a, .logout {
  width: auto;
  margin: 0;
  padding: 9px 15px;
  border-radius: 11px;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
}
.nav nav a.active { color: var(--text); background: #171d25; }
.logout { border-color: var(--line); }
main { padding: 0 14px 30px; }
.hero {
  max-width: 1380px;
  margin: 0 auto;
  padding: 54px 26px 32px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
}
.hero h1 { margin: 5px 0 7px; font-size: clamp(34px, 4vw, 58px); letter-spacing: -.04em; }
.lead { color: var(--muted); font-size: 16px; margin: 0; line-height: 1.7; }
.user-badge { color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 7px 11px; font-size: 12px; white-space: nowrap; }
.section { max-width: 1380px; margin: 0 auto; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.card {
  min-height: 270px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(155deg, #151a21, #10151a);
  padding: 27px 25px 23px;
  display: flex;
  flex-direction: column;
  transition: transform .15s ease, border-color .15s ease;
}
.card:hover { transform: translateY(-2px); border-color: #3a4552; }
.card-top { display: flex; justify-content: space-between; align-items: center; }
.icon {
  width: 48px; height: 48px; display: grid; place-items: center;
  border: 1px solid #a8b2be; border-radius: 15px; font-size: 20px; font-weight: 700;
}
.status { border: 1px solid var(--line); border-radius: 999px; color: var(--muted); padding: 5px 9px; font-size: 11px; }
.card h3 { margin: 44px 0 11px; font-size: 25px; letter-spacing: -.03em; }
.card p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.7; }
.arrow { margin-top: auto; padding-top: 28px; color: #c7d3e2; font-size: 13px; }
.notice {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #0e1318;
  padding: 18px 20px;
}
.notice strong { display: block; margin-bottom: 5px; }
.notice p { color: var(--muted); margin: 0; line-height: 1.65; font-size: 13px; }
.account-security { margin-top: 28px; padding: 24px 20px; border-top: 1px solid var(--line); scroll-margin-top: 24px; }
.account-security h2 { margin: 0 0 10px; font-size: 22px; }
.account-security p { color: #b4c0cf; font-size: 14px; line-height: 1.7; max-width: 72ch; }
.account-security summary { cursor: pointer; padding: 12px 0; font-size: 15px; width: fit-content; }
.account-security form { max-width: 540px; }
.security-confirm { display: flex; gap: 12px; align-items: flex-start; }
.security-confirm input { width: 18px; height: 18px; margin: 2px 0 0; flex: 0 0 18px; accent-color: var(--good); }
.security-confirm span { font-size: 13px; line-height: 1.65; color: #b4c0cf; }
.account-security .primary, .account-security .secondary { width: auto; min-height: 44px; }
.account-security button:disabled { cursor: wait; opacity: .55; }
.account-security :focus-visible { outline: 2px solid #dfe7f1; outline-offset: 4px; }
.account-security ::selection { background: #dfe7f1; color: #11161c; }
footer {
  max-width: 1380px; margin: 0 auto; padding: 24px 26px 35px;
  display: flex; justify-content: space-between; color: var(--muted); font-size: 12px;
}

@media (max-width: 920px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .nav { align-items: flex-start; padding: 14px 16px; }
  .nav nav { flex-wrap: wrap; justify-content: flex-end; }
  .hero { padding: 38px 10px 25px; align-items: flex-start; flex-direction: column; }
  .grid { grid-template-columns: 1fr; }
  .card { min-height: 240px; }
  footer { padding-left: 10px; padding-right: 10px; }
}
