:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #0b1020;
  color: #edf2ff;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 16%, rgba(67, 97, 238, 0.22), transparent 35%),
    radial-gradient(circle at 82% 82%, rgba(38, 192, 139, 0.12), transparent 32%),
    #0b1020;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-content: center;
  gap: 18px;
  padding: 28px 18px;
}

.login-card {
  width: min(430px, calc(100vw - 36px));
  padding: 34px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  background: rgba(16, 23, 43, 0.94);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(16px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: linear-gradient(145deg, #6d7cff, #4154dc);
  box-shadow: 0 8px 24px rgba(65, 84, 220, 0.35);
  font-size: 20px;
  font-weight: 800;
}

.brand strong,
.brand small { display: block; }
.brand strong { font-size: 16px; letter-spacing: 0.01em; }
.brand small { margin-top: 2px; color: #93a0bd; font-size: 12px; }

.heading { margin-bottom: 24px; }
h1 { margin: 0; font-size: 25px; letter-spacing: -0.02em; }
.heading p,
.notice p { margin: 8px 0 0; color: #a9b3ca; line-height: 1.55; font-size: 14px; }

form { display: grid; }
label { margin: 16px 0 7px; color: #cbd3e7; font-size: 13px; font-weight: 650; }
input {
  width: 100%;
  border: 1px solid #303a57;
  border-radius: 11px;
  background: #0d1428;
  color: #f4f7ff;
  padding: 12px 13px;
  outline: none;
  font: inherit;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
input:focus {
  border-color: #7282ff;
  box-shadow: 0 0 0 3px rgba(114, 130, 255, 0.16);
}

button {
  margin-top: 24px;
  border: 0;
  border-radius: 11px;
  padding: 12px 16px;
  background: linear-gradient(135deg, #6f80ff, #5062e6);
  color: white;
  cursor: pointer;
  font: inherit;
  font-weight: 750;
  box-shadow: 0 10px 24px rgba(80, 98, 230, 0.25);
}
button:hover { filter: brightness(1.06); }
button:disabled { cursor: wait; opacity: 0.65; }

.hint { margin: 7px 0 -5px; color: #8996b3; font-size: 12px; line-height: 1.45; }
.error {
  margin: 18px 0 0;
  border: 1px solid rgba(255, 102, 122, 0.3);
  border-radius: 10px;
  background: rgba(156, 32, 52, 0.16);
  color: #ffb4c0;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.45;
}

.checking {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #a9b3ca;
  font-size: 14px;
}
.spinner {
  width: 17px;
  height: 17px;
  border: 2px solid #39435e;
  border-top-color: #8290ff;
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.notice { padding: 3px 0 5px; }
.privacy-note { margin: 0; text-align: center; color: #687591; font-size: 12px; }

@media (max-width: 520px) {
  .login-card { padding: 26px 22px; border-radius: 18px; }
  .brand { margin-bottom: 27px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .spinner { animation-duration: 1.5s; }
}
