:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--brand-heading);
  background: var(--brand-bg);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 12% 18%, rgba(36, 134, 133, 0.16), transparent 27rem),
    radial-gradient(circle at 88% 84%, rgba(221, 151, 50, 0.15), transparent 24rem),
    linear-gradient(145deg, var(--brand-bg-warm) 0%, #e8f1f0 100%);
}

body::before,
body::after {
  position: fixed;
  z-index: -1;
  width: 18rem;
  height: 18rem;
  border: 1px solid rgba(29, 111, 113, 0.12);
  border-radius: 50%;
  content: "";
}

body::before {
  top: -9rem;
  right: 18%;
}

body::after {
  bottom: -11rem;
  left: 12%;
}

.login-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(20rem, 0.72fr);
  align-items: center;
  gap: clamp(3rem, 8vw, 8rem);
  width: min(68rem, calc(100% - 3rem));
  min-height: calc(100vh - 4rem);
  margin: 0 auto;
  padding: 3rem 0;
}

.intro {
  max-width: 38rem;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 4.5rem;
  height: 4.5rem;
  margin-bottom: 1.75rem;
  border-radius: 1.35rem;
  background: linear-gradient(145deg, var(--brand-accent), var(--brand-accent-dark));
  box-shadow: 0 1rem 2.5rem rgba(20, 102, 104, 0.24);
  transform: rotate(-7deg);
}

.brand-mark span {
  width: 1.75rem;
  height: 1.75rem;
  border: 0.38rem solid #fff;
  border-top-color: #f5b04c;
  border-radius: 50%;
}

.eyebrow,
.card-label {
  margin: 0 0 0.7rem;
  color: var(--brand-accent);
  font-size: 0.76rem;
  font-weight: 750;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  color: var(--brand-heading);
  font-size: clamp(3.2rem, 8vw, 6.5rem);
  line-height: 0.93;
  letter-spacing: -0.065em;
}

.lead {
  max-width: 34rem;
  margin: 1.8rem 0 2rem;
  color: #48666a;
  font-size: clamp(1.05rem, 2.2vw, 1.35rem);
  line-height: 1.55;
}

.modality-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.modality-list span {
  padding: 0.55rem 0.85rem;
  border: 1px solid rgba(25, 116, 119, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  color: #255c60;
  font-size: 0.82rem;
  font-weight: 700;
}

.login-card {
  padding: clamp(1.6rem, 4vw, 2.45rem);
  border: 1px solid rgba(26, 91, 94, 0.13);
  border-radius: 1.65rem;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 1.5rem 4.5rem rgba(23, 69, 72, 0.14);
  backdrop-filter: blur(16px);
}

.lock-mark {
  display: grid;
  place-items: center;
  width: 2.55rem;
  height: 2.55rem;
  margin-bottom: 1.2rem;
  border-radius: 0.85rem;
  background: var(--brand-accent-soft);
  color: var(--brand-accent);
  font-weight: 900;
}

h2 {
  margin: 0;
  color: var(--brand-heading);
  font-size: 1.65rem;
  letter-spacing: -0.025em;
}

.card-copy {
  margin: 0.75rem 0 1.65rem;
  color: #60777a;
  font-size: 0.94rem;
  line-height: 1.5;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  color: #294f53;
  font-size: 0.82rem;
  font-weight: 750;
}

.code-control {
  position: relative;
}

input {
  width: 100%;
  min-height: 3.25rem;
  padding: 0.75rem 6rem 0.75rem 0.95rem;
  border: 1px solid #bfd1d0;
  border-radius: 0.8rem;
  outline: none;
  background: #fbfdfd;
  color: #173f43;
  font: inherit;
  letter-spacing: 0.04em;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

input:focus {
  border-color: var(--brand-accent);
  box-shadow: 0 0 0 0.22rem rgba(25, 116, 119, 0.13);
}

button {
  border: 0;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}

.show-code {
  position: absolute;
  top: 50%;
  right: 0.55rem;
  padding: 0.5rem 0.55rem;
  border-radius: 0.5rem;
  background: transparent;
  color: #277176;
  font-size: 0.76rem;
  transform: translateY(-50%);
}

.submit {
  width: 100%;
  min-height: 3.2rem;
  margin-top: 0.9rem;
  border-radius: 0.8rem;
  background: linear-gradient(135deg, var(--brand-accent), var(--brand-accent-dark));
  color: #fff;
  box-shadow: 0 0.8rem 1.7rem rgba(20, 102, 104, 0.2);
}

.submit:hover {
  filter: brightness(1.04);
}

.submit:disabled {
  cursor: wait;
  opacity: 0.66;
}

.status {
  min-height: 1.3rem;
  margin: 0.7rem 0 0;
  color: #b13e3e;
  font-size: 0.82rem;
}

.privacy-note {
  margin: 1.1rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid #e4eceb;
  color: #7a8c8e;
  font-size: 0.76rem;
  line-height: 1.45;
}

footer {
  width: min(68rem, calc(100% - 3rem));
  margin: -2.8rem auto 0;
  color: #819294;
  font-size: 0.72rem;
}

@media (max-width: 760px) {
  .login-shell {
    grid-template-columns: 1fr;
    gap: 2.2rem;
    width: min(31rem, calc(100% - 2rem));
    padding: 2rem 0 4rem;
  }

  .intro {
    padding: 0 0.4rem;
  }

  .brand-mark {
    width: 3.6rem;
    height: 3.6rem;
    margin-bottom: 1.25rem;
  }

  h1 {
    font-size: clamp(3.5rem, 18vw, 5rem);
  }

  .lead {
    margin: 1.15rem 0 1.35rem;
  }

  footer {
    width: calc(100% - 2rem);
    margin-top: -3rem;
    padding-bottom: 1.2rem;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
