:root {
  color-scheme: dark;
  --background: #04080f;
  --foreground: #e8f4ff;
  --muted: #8fb4d4;
  --primary: #00aaff;
  --border: rgba(0, 170, 255, .2);
}

.auth-message.info {
  border-color: rgba(0, 170, 255, .3);
  background: rgba(0, 100, 180, .12);
  color: #b8eaff;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  display: grid;
  place-items: center;
  overflow-x: hidden;
  padding: 32px 18px;
  background: var(--background);
  color: var(--foreground);
  font-family: Inter, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

.auth-background {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.auth-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 170, 255, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 170, 255, .04) 1px, transparent 1px);
  background-size: 50px 50px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 25%, transparent 100%);
}

.auth-glow {
  position: absolute;
  width: min(60vw, 520px);
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(130px);
  opacity: .28;
}

.auth-glow-one {
  top: -18%;
  left: -12%;
  background: #0066ff;
}

.auth-glow-two {
  right: -14%;
  bottom: -24%;
  background: #00ccff;
}

.auth-shell {
  position: relative;
  z-index: 1;
  width: min(100%, 460px);
}

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 0 auto 28px;
  color: #e8f4ff;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.04em;
  text-decoration: none;
}

.brand-domain {
  color: var(--primary);
  font-size: .75em;
}

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, #00aaff, #0055ff);
  box-shadow: 0 0 22px rgba(0, 170, 255, .5);
}

.brand-mark span {
  width: 16px;
  height: 16px;
  transform: rotate(45deg);
  border: 2px solid #fff;
  border-radius: 4px;
}

.auth-card {
  padding: clamp(26px, 7vw, 42px);
  border: 1px solid var(--border);
  border-radius: 24px;
  background: linear-gradient(160deg, rgba(15, 30, 55, .82), rgba(8, 16, 30, .78));
  box-shadow: 0 24px 80px rgba(0, 60, 130, .2), inset 0 1px rgba(255, 255, 255, .04);
  backdrop-filter: blur(20px);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 18px;
  color: #9fdbff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .16em;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #00ff88;
  box-shadow: 0 0 10px #00ff88;
}

h1 {
  margin: 0 0 9px;
  background: linear-gradient(#fff, #9fcfff);
  background-clip: text;
  color: transparent;
  font-size: clamp(28px, 7vw, 36px);
  font-weight: 800;
  letter-spacing: -.04em;
}

.auth-intro {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.form-fields {
  display: grid;
  gap: 17px;
}

.field label {
  display: block;
  margin-bottom: 8px;
  color: #c8e6ff;
  font-size: 13px;
  font-weight: 600;
}

.field input {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid rgba(0, 170, 255, .22);
  border-radius: 12px;
  outline: none;
  background: rgba(2, 9, 20, .7);
  color: var(--foreground);
  font: inherit;
  font-size: 14px;
  transition: border-color .2s, box-shadow .2s;
}

.field input::placeholder {
  color: #607f9c;
}

.field input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 170, 255, .13);
}

.primary-button {
  width: 100%;
  min-height: 50px;
  margin-top: 6px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 12px;
  background: linear-gradient(110deg, #00aaff, #0066ff);
  box-shadow: 0 8px 26px rgba(0, 110, 255, .28);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  transition: transform .2s, box-shadow .2s;
}

.primary-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 32px rgba(0, 150, 255, .45);
}

.auth-message {
  margin: 0 0 20px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 100, 120, .35);
  border-radius: 12px;
  background: rgba(150, 25, 45, .16);
  color: #ffc0c8;
  font-size: 13px;
  line-height: 1.5;
}

.auth-switch {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
}

.auth-switch a,
.auth-footnote a,
.account-home {
  color: #65caff;
  font-weight: 700;
  text-decoration: none;
}

.auth-switch + .auth-switch {
  margin-top: 12px;
}

.auth-switch a:hover,
.auth-footnote a:hover,
.account-home:hover {
  color: #b8eaff;
  text-decoration: underline;
}

.auth-footnote {
  margin: 20px 0 0;
  color: #607f9c;
  font-size: 12px;
  text-align: center;
}

.account-details {
  margin: 0 0 22px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(0, 170, 255, .05);
}

.account-details strong,
.account-details span {
  display: block;
  overflow-wrap: anywhere;
}

.account-details strong {
  margin-bottom: 6px;
  color: #fff;
  font-size: 16px;
}

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

.account-home {
  display: inline-block;
  margin-top: 18px;
  font-size: 13px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}
