:root {
  --bg: #0a0f1d;
  --bg-2: #0e1528;
  --surface: rgba(18, 26, 46, 0.72);
  --border: rgba(150, 175, 230, 0.14);
  --border-strong: rgba(150, 175, 230, 0.28);
  --text: #e7ecf6;
  --muted: #95a2bb;
  --faint: #6b7892;
  --accent: #82aaff;
  --accent-2: #9cc8ff;
  --accent-deep: #5a7fe0;
  --amber: #f1c58e;
  --mint: #7fe0c4;
  --radius: 18px;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: radial-gradient(1200px 800px at 15% -10%, #16224a 0%, transparent 60%),
              radial-gradient(900px 700px at 110% 110%, #10294a 0%, transparent 55%),
              linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
.aurora { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
.aurora span {
  position: absolute; border-radius: 50%; filter: blur(70px); opacity: .35;
  animation: drift 22s ease-in-out infinite alternate;
}
.aurora span:nth-child(1) { width: 420px; height: 420px; left: -80px; top: 10%; background: #2c4fa8; }
.aurora span:nth-child(2) { width: 360px; height: 360px; right: -60px; top: 45%; background: #1f6f8f; animation-delay: -7s; opacity: .25; }
.aurora span:nth-child(3) { width: 300px; height: 300px; left: 35%; bottom: -120px; background: #3b3f9e; animation-delay: -13s; opacity: .22; }
@keyframes drift { from { transform: translate3d(0,0,0) scale(1); } to { transform: translate3d(40px,-30px,0) scale(1.08); } }
@media (prefers-reduced-motion: reduce) { .aurora span { animation: none; } }

.wrap {
  position: relative; min-height: 100%;
  display: grid; place-items: center;
  padding: max(24px, env(safe-area-inset-top)) 18px max(24px, env(safe-area-inset-bottom));
}
.card {
  width: 100%; max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 34px 30px 24px;
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .65), inset 0 1px 0 rgba(255, 255, 255, .04);
  animation: rise .5s cubic-bezier(.2, .8, .2, 1) both;
}
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.brand { display: flex; align-items: center; gap: 14px; margin-bottom: 26px; }
.mark { border-radius: 13px; box-shadow: 0 8px 24px -8px rgba(90, 127, 224, .6); }
h1 { margin: 0; font-size: 22px; font-weight: 650; letter-spacing: -.01em; }
.tag { margin: 3px 0 0; color: var(--muted); font-size: 13.5px; }

.notice {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 11px 13px; margin: -6px 0 18px;
  border-radius: 12px; font-size: 13.5px; line-height: 1.45;
  border: 1px solid;
  animation: rise .35s ease both;
}
.notice-dot { flex: none; width: 7px; height: 7px; border-radius: 50%; margin-top: 6px; }
.notice-error { color: #f6dcb8; background: rgba(241, 197, 142, .08); border-color: rgba(241, 197, 142, .26); }
.notice-error .notice-dot { background: var(--amber); box-shadow: 0 0 0 4px rgba(241, 197, 142, .14); }
.notice-info { color: #d4e3ff; background: rgba(130, 170, 255, .08); border-color: rgba(130, 170, 255, .24); }
.notice-info .notice-dot { background: var(--accent); box-shadow: 0 0 0 4px rgba(130, 170, 255, .14); }

.form { display: grid; gap: 16px; }
.field { display: grid; gap: 7px; }
.label { font-size: 12.5px; font-weight: 550; color: var(--muted); letter-spacing: .02em; }
input[type="text"], input[type="password"] {
  width: 100%; height: 46px; padding: 0 14px;
  font: inherit; font-size: 15px; color: var(--text);
  background: rgba(8, 13, 26, .6);
  border: 1px solid var(--border); border-radius: 12px;
  outline: none; transition: border-color .15s, box-shadow .15s, background .15s;
}
input[type="text"]:hover, input[type="password"]:hover { border-color: var(--border-strong); }
input[type="text"]:focus, input[type="password"]:focus {
  border-color: rgba(130, 170, 255, .7);
  box-shadow: 0 0 0 4px rgba(130, 170, 255, .14);
  background: rgba(8, 13, 26, .8);
}
.pw { position: relative; display: block; }
.pw input { padding-right: 46px; }
.reveal {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; border: 0; border-radius: 9px;
  display: grid; place-items: center; cursor: pointer;
  background: transparent; color: var(--faint); transition: color .15s, background .15s;
}
.reveal:hover, .reveal[aria-pressed="true"] { color: var(--accent-2); background: rgba(130, 170, 255, .08); }

.remember { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--muted); cursor: pointer; user-select: none; }
.remember input { position: absolute; opacity: 0; pointer-events: none; }
.remember .box {
  width: 18px; height: 18px; border-radius: 6px; flex: none;
  border: 1px solid var(--border-strong); background: rgba(8, 13, 26, .6);
  display: grid; place-items: center; transition: background .15s, border-color .15s;
}
.remember input:checked + .box { background: var(--accent-deep); border-color: var(--accent); }
.remember input:checked + .box::after {
  content: ""; width: 9px; height: 5px; margin-top: -2px;
  border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg);
}
.remember input:focus-visible + .box { box-shadow: 0 0 0 4px rgba(130, 170, 255, .2); }

.submit {
  position: relative; height: 48px; margin-top: 6px;
  border: 0; border-radius: 12px; cursor: pointer;
  font: inherit; font-size: 15px; font-weight: 600; color: #0b1222;
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  box-shadow: 0 10px 28px -12px rgba(130, 170, 255, .8), inset 0 1px 0 rgba(255, 255, 255, .35);
  transition: transform .12s, filter .15s, box-shadow .15s;
}
.submit:hover { filter: brightness(1.05); box-shadow: 0 14px 32px -12px rgba(130, 170, 255, .9), inset 0 1px 0 rgba(255,255,255,.35); }
.submit:active { transform: translateY(1px); }
.submit:focus-visible { outline: none; box-shadow: 0 0 0 4px rgba(130, 170, 255, .3); }
.spinner {
  position: absolute; right: 16px; top: 50%; width: 16px; height: 16px; margin-top: -8px;
  border: 2px solid rgba(11, 18, 34, .25); border-top-color: #0b1222; border-radius: 50%;
  opacity: 0; animation: spin .8s linear infinite;
}
.submit.busy { pointer-events: none; filter: saturate(.8); }
.submit.busy .spinner { opacity: 1; }
@keyframes spin { to { transform: rotate(360deg); } }

.foot {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  margin: 22px 0 0; font-size: 12px; color: var(--faint);
}
@media (max-width: 420px) {
  .card { padding: 28px 20px 20px; border-radius: 20px; }
  h1 { font-size: 20px; }
}
