:root {
  --bg-1: #0b1725;
  --bg-2: #173a57;
  --bg-3: #f1f7fa;
  --card: rgba(248, 252, 255, 0.92);
  --card-border: rgba(15, 37, 56, 0.16);
  --text: #0d2538;
  --muted: #35566f;
  --accent: #007a5a;
  --accent-2: #005f46;
  --danger: #b42318;
  --focus: #0c89ff;
  --shadow: 0 24px 52px rgba(7, 29, 47, 0.26);
}

* {
  box-sizing: border-box;
}

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

body {
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 16% 22%, #2f7fbf 0%, transparent 45%),
    radial-gradient(circle at 84% 18%, #76c3cc 0%, transparent 38%),
    linear-gradient(138deg, var(--bg-1) 0%, var(--bg-2) 45%, var(--bg-3) 100%);
  overflow-x: hidden;
}

.bg-shapes {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.shape {
  position: absolute;
  border-radius: 999px;
  filter: blur(12px);
  opacity: 0.34;
  animation: drift 14s ease-in-out infinite alternate;
}

.shape-a {
  width: 18rem;
  height: 18rem;
  background: #80c2dc;
  top: -3rem;
  left: -2rem;
}

.shape-b {
  width: 15rem;
  height: 15rem;
  background: #59a4a4;
  bottom: 1rem;
  right: 8%;
  animation-delay: 1.5s;
}

.shape-c {
  width: 10rem;
  height: 10rem;
  background: #f4d06f;
  bottom: 16%;
  left: 12%;
  animation-delay: 0.7s;
}

.page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
}

.card {
  width: min(100%, 31rem);
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 1.15rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(7px);
  padding: 1.5rem;
  transform: translateY(10px);
  opacity: 0;
  animation: rise-in 600ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.eyebrow {
  margin: 0;
  font-size: 0.8rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--muted);
}

h1 {
  margin: 0.35rem 0 0;
  font-size: clamp(1.7rem, 4.8vw, 2.2rem);
}

.subtitle {
  margin: 0.55rem 0 1.35rem;
  color: var(--muted);
  line-height: 1.45;
}

.label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 600;
}

.input {
  width: 100%;
  border: 1px solid #8ea4b7;
  border-radius: 0.7rem;
  min-height: 2.85rem;
  padding: 0 0.9rem;
  font: inherit;
  color: var(--text);
  background: #f8fcff;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.input:focus {
  outline: none;
  border-color: var(--focus);
  box-shadow: 0 0 0 4px rgba(12, 137, 255, 0.2);
}

.button {
  margin-top: 1rem;
  width: 100%;
  min-height: 2.95rem;
  border: 0;
  border-radius: 0.76rem;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  color: #f6fffb;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  transition: transform 160ms ease, filter 160ms ease, opacity 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
}

.button:active {
  transform: translateY(0);
}

.button:disabled {
  opacity: 0.72;
  cursor: progress;
}

.status {
  margin: 0.9rem 0 0;
  min-height: 1.2rem;
  font-size: 0.92rem;
  color: var(--muted);
}

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

.status.ok {
  color: #0b7a43;
}

.hint {
  margin-top: 1.15rem;
  padding-top: 0.85rem;
  border-top: 1px dashed rgba(20, 60, 88, 0.24);
  color: #36556d;
  font-size: 0.9rem;
}

.noscript {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.7rem 1rem;
  background: #7a1d1d;
  color: #fff;
  text-align: center;
}

@keyframes rise-in {
  from {
    transform: translateY(20px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes drift {
  from {
    transform: translateY(0) translateX(0) scale(1);
  }

  to {
    transform: translateY(-10px) translateX(8px) scale(1.04);
  }
}

@media (max-width: 560px) {
  .card {
    padding: 1.25rem;
    border-radius: 1rem;
  }

  .page {
    padding: 1rem;
  }
}

/* ── Enrollment panel ──────────────────────────────────────────── */

.divider {
  margin: 1.35rem 0 1.1rem;
  height: 1px;
  background: rgba(20, 60, 88, 0.18);
}

.enroll-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.enroll-label {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.button-secondary {
  background: transparent;
  border: 1.5px solid var(--accent);
  color: var(--accent);
  font-weight: 600;
  padding: 0.45rem 1.1rem;
  min-height: auto;
  width: auto;
  font-size: 0.88rem;
}

.button-secondary:hover {
  background: rgba(0, 122, 90, 0.07);
  filter: none;
}

.enroll-panel {
  margin-top: 1.1rem;
  padding-top: 1rem;
  border-top: 1px dashed rgba(20, 60, 88, 0.22);
  animation: rise-in 300ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.enroll-panel[hidden] {
  display: none;
}

.enroll-heading {
  margin: 0 0 0.25rem;
  font-size: 1.15rem;
}

.forgot-row {
  margin-top: 0.85rem;
  text-align: right;
}

.link-button {
  background: none;
  border: none;
  padding: 0;
  color: var(--accent);
  font-size: 0.88rem;
  font-family: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.link-button:hover {
  color: #005e45;
}

