* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  background: #030308;
  color: #c8dce8;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  position: relative;
  overflow-x: hidden;
}

/* Ambient background — soft glow + faint grid */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at 50% 42%,
              rgba(65, 105, 225, 0.10) 0%,
              rgba(65, 105, 225, 0.02) 40%,
              transparent 70%);
  pointer-events: none;
  z-index: 0;
}
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(26, 42, 68, 0.55) 1px, transparent 1px),
    linear-gradient(90deg, rgba(26, 42, 68, 0.55) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.28;
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 72%);
          mask-image: radial-gradient(ellipse at center, black 30%, transparent 72%);
  pointer-events: none;
  z-index: 0;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ============================================================
   Card
   ============================================================ */
.auth-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: rgba(10, 10, 20, 0.72);
  border: 1px solid rgba(26, 42, 68, 0.85);
  border-radius: 16px;
  padding: 2.5rem 2rem 1.75rem;
  text-align: center;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  position: relative;
  overflow: hidden;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.55),
    0 0 60px rgba(65, 105, 225, 0.06);
}

/* Top hairline accent */
.auth-card::before {
  content: '';
  position: absolute;
  top: 0; left: 12%; right: 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent, #00d4ff, transparent);
  opacity: 0.55;
}

/* ============================================================
   Brand block (logo + wordmark + tagline)
   ============================================================ */
.auth-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.auth-logo {
  width: 140px;
  max-width: 45vw;
  display: block;
  margin: 0 auto 1.5rem;
  filter: drop-shadow(0 0 26px rgba(65, 105, 225, 0.55));
  animation: logoPulse 4s ease-in-out infinite;
  will-change: filter, transform;
}

@keyframes logoPulse {
  0%, 100% {
    filter: drop-shadow(0 0 20px rgba(65, 105, 225, 0.4));
    transform: scale(1);
  }
  50% {
    filter: drop-shadow(0 0 36px rgba(65, 105, 225, 0.9));
    transform: scale(1.02);
  }
}

.auth-wordmark {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: #e8f4ff;
  margin-bottom: 0.5rem;
  padding-left: 0.32em;
  text-shadow: 0 0 22px rgba(0, 212, 255, 0.12);
}

.auth-tagline {
  font-size: 0.65rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #5a7a94;
  padding-left: 0.28em;
}

/* ============================================================
   Divider
   ============================================================ */
.auth-divider {
  height: 1px;
  margin: 2rem 0 1.75rem;
  background: linear-gradient(90deg, transparent, rgba(26, 42, 68, 0.9), transparent);
}

/* ============================================================
   Form
   ============================================================ */
.auth-body { text-align: center; }

.auth-heading {
  font-size: 1.05rem;
  font-weight: 600;
  color: #e8f4ff;
  letter-spacing: 0.02em;
  margin-bottom: 0.35rem;
}

.auth-sub {
  font-size: 0.8rem;
  color: #5a7a94;
  margin-bottom: 1.75rem;
  line-height: 1.55;
}

.auth-form { margin-bottom: 1.75rem; }

.login-error {
  background: rgba(255, 68, 102, 0.08);
  border: 1px solid rgba(255, 68, 102, 0.35);
  color: #ff6b8a;
  padding: 0.7rem 1rem;
  border-radius: 8px;
  font-size: 0.8rem;
  margin-bottom: 1rem;
  text-align: center;
}

.field {
  display: flex;
  align-items: center;
  background: #030308;
  border: 1px solid #1a2a44;
  border-radius: 10px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  padding: 5px;
}

.field:focus-within {
  border-color: #00d4ff;
  box-shadow:
    0 0 0 4px rgba(0, 212, 255, 0.14),
    0 0 22px rgba(0, 212, 255, 0.10);
}

.field-input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  padding: 0.8rem 0.9rem;
  color: #e8f4ff;
  font-size: 16px;
  font-family: 'SFMono-Regular', Menlo, Consolas, monospace;
  letter-spacing: 0.03em;
}

.field-input::placeholder {
  color: #5a7a94;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 0.88rem;
  letter-spacing: 0.02em;
}

.field-btn {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  background: #00d4ff;
  color: #030308;
  border: none;
  border-radius: 7px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: box-shadow 0.2s ease, transform 0.15s ease;
  box-shadow: 0 0 16px rgba(0, 212, 255, 0.35);
}

.field-btn:hover {
  box-shadow:
    0 0 26px rgba(0, 212, 255, 0.65),
    0 0 4px rgba(0, 212, 255, 0.9);
}

.field-btn:active { transform: scale(0.95); }

.field-btn:focus-visible {
  outline: 2px solid #e8f4ff;
  outline-offset: 3px;
}

/* ============================================================
   Feature bullets — centered row
   ============================================================ */
.auth-features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem 1rem;
  font-size: 0.7rem;
  color: #5a7a94;
  letter-spacing: 0.04em;
}

.auth-features li {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
}

.feat-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #00d4ff;
  box-shadow: 0 0 8px rgba(0, 212, 255, 0.75);
  flex-shrink: 0;
}

/* ============================================================
   Footer
   ============================================================ */
.auth-footer {
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(26, 42, 68, 0.7);
}

.auth-footer a {
  font-size: 0.75rem;
  color: #5a7a94;
  text-decoration: none;
  letter-spacing: 0.06em;
  transition: color 0.2s;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
}

.auth-footer a:hover {
  color: #00d4ff;
  border-bottom-color: #00d4ff;
}

/* ============================================================
   Small screens
   ============================================================ */
@media (max-width: 480px) {
  body { padding: 1rem; }
  .auth-card {
    padding: 2rem 1.5rem 1.5rem;
    border-radius: 14px;
  }
  .auth-logo {
    width: 110px;
    margin-bottom: 1.15rem;
  }
  .auth-wordmark {
    font-size: 1.3rem;
    letter-spacing: 0.26em;
    padding-left: 0.26em;
  }
  .auth-tagline { font-size: 0.6rem; letter-spacing: 0.24em; }
  .auth-divider { margin: 1.65rem 0 1.4rem; }
  .auth-heading { font-size: 1rem; }
  .auth-sub { margin-bottom: 1.4rem; font-size: 0.78rem; }
}

/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .auth-logo { animation: none; }
  .field-btn:hover { transform: none; }
}

/* ===== Watermark under the footer link ===== */
.auth-watermark {
  margin-top: 1rem;
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #3f5566;
  opacity: 0.75;
}

/* ===== Footer separator between links ===== */
.auth-footer-sep {
  display: inline-block;
  margin: 0 0.7rem;
  color: #3f5566;
  font-size: 0.85rem;
}

/* ============================================================
   Login footer nav — public page links
   ============================================================ */
.auth-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}
.auth-nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid rgba(26, 42, 68, 0.85);
  border-radius: 7px;
  background: rgba(10, 10, 20, 0.4);
  color: #7a9ab8;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-decoration: none;
  transition: all 0.18s ease;
  min-height: 32px;
}
.auth-nav a svg {
  flex-shrink: 0;
  opacity: 0.75;
  transition: opacity 0.18s ease;
}
.auth-nav a:hover {
  border-color: #00d4ff;
  color: #00d4ff;
  background: rgba(0, 212, 255, 0.06);
  transform: translateY(-1px);
  box-shadow: 0 0 16px rgba(0, 212, 255, 0.18);
}
.auth-nav a:hover svg { opacity: 1; }
.auth-nav a:active { transform: translateY(0); }
.auth-nav a:focus-visible {
  outline: 2px solid #00d4ff;
  outline-offset: 2px;
}

@media (max-width: 440px) {
  .auth-nav { gap: 0.4rem; }
  .auth-nav a {
    padding: 0.5rem 0.65rem;
    font-size: 0.68rem;
  }
  .auth-nav a svg { width: 12px; height: 12px; }
}

/* ===== More breathing room between login nav buttons ===== */
.auth-nav {
  gap: 2rem !important;
}
.auth-nav a {
  padding: 0.6rem 1.1rem !important;
  font-size: 0.75rem !important;
}
@media (max-width: 440px) {
  .auth-nav { gap: 1.4rem !important; }
  .auth-nav a {
    padding: 0.55rem 0.9rem !important;
    font-size: 0.7rem !important;
  }
}

/* ===== Watermark positioning fix ===== */
.auth-watermark {
  margin-top: 1.75rem !important;
  padding-top: 1.25rem !important;
  border-top: 1px solid rgba(26, 42, 68, 0.5) !important;
  display: block !important;
  width: 100% !important;
  text-align: center !important;
}
