:root {
  color-scheme: dark;
  --bg-top: #091226;
  --bg-bottom: #050a16;
  --card: rgba(12, 20, 42, 0.92);
  --card-border: rgba(133, 168, 255, 0.14);
  --text: #eef3ff;
  --muted: #9eabc9;
  --accent: #5ea8ff;
  --accent-soft: rgba(94, 168, 255, 0.16);
  --danger: #ff6d8a;
  --success: #53d48a;
  --input: rgba(255, 255, 255, 0.045);
  --input-border: rgba(255, 255, 255, 0.09);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top, rgba(35, 93, 182, 0.28), transparent 38%),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
}

.shell {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: clamp(16px, 3vw, 28px);
}

.auth-card {
  width: min(100%, 420px);
  border-radius: 24px;
  border: 1px solid var(--card-border);
  background: var(--card);
  box-shadow: var(--shadow);
  padding: clamp(22px, 4vw, 30px);
  backdrop-filter: blur(16px);
}

.auth-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 28px;
  font-weight: 800;
  color: #081323;
  background: linear-gradient(180deg, #7fc0ff 0%, #4f9eff 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45);
}

.auth-head h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 42px);
  line-height: 1;
}

.auth-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.status {
  min-height: 22px;
  margin-bottom: 14px;
  font-size: 14px;
  line-height: 1.4;
  color: var(--muted);
}

.status.is-success {
  color: var(--success);
}

.status.is-error {
  color: var(--danger);
}

.status.is-loading {
  color: #8dc0ff;
}

.auth-form {
  display: grid;
  gap: 12px;
}

.field {
  display: grid;
  gap: 7px;
}

.field span {
  font-size: 13px;
  color: var(--muted);
}

input {
  width: 100%;
  height: 52px;
  border-radius: 14px;
  border: 1px solid var(--input-border);
  background: var(--input);
  color: var(--text);
  font-size: 15px;
  outline: none;
  padding: 0 16px;
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}

input::placeholder {
  color: rgba(238, 243, 255, 0.42);
}

input:focus {
  border-color: rgba(94, 168, 255, 0.55);
  background: rgba(255, 255, 255, 0.07);
}

button,
.btn {
  width: 100%;
  min-height: 52px;
  border: 0;
  border-radius: 14px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  transition: transform .16s ease, filter .16s ease, opacity .16s ease;
}

button:disabled,
input:disabled {
  cursor: not-allowed;
  opacity: 0.75;
}

.btn-primary {
  color: #081323;
  background: linear-gradient(180deg, #7fc0ff 0%, #4f9eff 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 10px 24px rgba(67, 139, 243, 0.22);
}

.btn-primary:hover {
  filter: brightness(1.03);
}

.btn-primary:active {
  transform: translateY(1px);
}

.auth-links {
  margin-top: 14px;
}

.auth-links-stack {
  display: grid;
  gap: 10px;
  justify-items: center;
}

.text-link {
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
}

.text-link:hover {
  text-decoration: underline;
}

.muted-link {
  color: var(--muted);
}

.muted-link strong {
  color: var(--text);
  font-weight: 700;
}

@media (max-width: 540px) {
  .auth-card {
    width: min(100%, 100%);
    border-radius: 20px;
    padding: 20px;
  }

  .brand-mark {
    width: 48px;
    height: 48px;
    font-size: 25px;
  }

  .auth-head h1 {
    font-size: 32px;
  }
}

@media (max-height: 720px) {
  body {
    overflow: auto;
  }

  .shell {
    align-items: start;
    padding-top: 20px;
    padding-bottom: 20px;
  }
}
