:root {
  --ink: #101214;
  --muted: #64707b;
  --line: rgba(16, 18, 20, 0.12);
  --paper: #fbfcf9;
  --mint: #baf4d4;
  --green: #0f8f67;
  --teal: #156f85;
  --coral: #ff775f;
  --amber: #f5bc3b;
  --shadow: 0 24px 80px rgba(16, 18, 20, 0.14);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 15%, rgba(186, 244, 212, 0.52), transparent 26rem),
    radial-gradient(circle at 90% 8%, rgba(255, 119, 95, 0.18), transparent 24rem),
    linear-gradient(180deg, #f7fbf5 0%, #ffffff 48%, #eef8f5 100%);
  font-family: "Emmanuel Sans", "Segoe UI", Arial, sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.42;
  background-image:
    linear-gradient(rgba(16, 18, 20, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 18, 20, 0.05) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, black, transparent 78%);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.auth-shell {
  width: min(1120px, calc(100% - 32px));
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 430px);
  gap: 34px;
  align-items: center;
  margin: 0 auto;
  padding: 38px 0;
}

.auth-panel,
.card {
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.auth-panel {
  position: relative;
  min-height: 610px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 34px;
  color: #fff;
  background:
    linear-gradient(145deg, rgba(16, 18, 20, 0.96), rgba(21, 111, 133, 0.92)),
    var(--ink);
}

.auth-panel::after {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  right: -130px;
  bottom: -160px;
  border: 1px dashed rgba(255, 255, 255, 0.32);
  border-radius: 50%;
  animation: spin 20s linear infinite;
}

.brand-link {
  position: relative;
  z-index: 1;
  width: fit-content;
  display: inline-flex;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
}

.brand-link img {
  width: 148px;
  display: block;
}

.auth-copy {
  position: relative;
  z-index: 1;
  max-width: 620px;
}

.eyebrow {
  width: fit-content;
  margin: 0 0 18px;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--mint);
  background: rgba(255, 255, 255, 0.1);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  font-size: clamp(3.2rem, 7vw, 6.8rem);
  line-height: 0.9;
  letter-spacing: 0;
}

.auth-copy p {
  max-width: 540px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 1.13rem;
  line-height: 1.6;
}

.auth-highlights {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.auth-highlights span {
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.92rem;
}

.card-stack {
  min-width: 0;
}

.card {
  padding: 30px;
  animation: fade 320ms ease both;
}

.card-heading {
  margin-bottom: 24px;
}

h2 {
  margin-bottom: 8px;
  font-size: 2rem;
  letter-spacing: 0;
}

.card-heading p,
.switch,
small {
  color: var(--muted);
}

form {
  display: grid;
  gap: 15px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.86);
  outline: 0;
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

input:focus {
  border-color: rgba(15, 143, 103, 0.52);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(186, 244, 212, 0.42);
}

.password-box {
  position: relative;
}

.password-box input {
  padding-right: 74px;
}

.toggle-password {
  position: absolute;
  top: 50%;
  right: 8px;
  min-width: 56px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  color: var(--ink);
  background: var(--mint);
  font-size: 0.78rem;
  font-weight: 800;
  transform: translateY(-50%);
}

.remember {
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}

.remember input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--green);
}

.submit-button {
  min-height: 50px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: var(--ink);
  font-weight: 800;
  box-shadow: 0 16px 34px rgba(16, 18, 20, 0.18);
  transition: transform 180ms ease, background 180ms ease;
}

.submit-button:hover {
  background: var(--green);
  transform: translateY(-2px);
}

.switch {
  margin: 20px 0 0;
  text-align: center;
}

.switch button {
  border: 0;
  color: var(--green);
  background: transparent;
  font-weight: 900;
}

.hidden {
  display: none;
}

.strength-track {
  width: 100%;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(16, 18, 20, 0.08);
}

#strengthBar {
  height: 100%;
  width: 0;
  border-radius: inherit;
  transition: width 180ms ease, background 180ms ease;
}

.message {
  display: none;
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid rgba(196, 54, 46, 0.18);
  border-radius: var(--radius);
  color: #8e251f;
  background: rgba(196, 54, 46, 0.08);
  text-align: center;
}

.message.success {
  border-color: rgba(15, 143, 103, 0.2);
  color: var(--green);
  background: rgba(186, 244, 212, 0.28);
}

@keyframes fade {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spin {
  to {
    rotate: 360deg;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

@media (max-width: 860px) {
  .auth-shell {
    grid-template-columns: 1fr;
    padding: 18px 0;
  }

  .auth-panel {
    min-height: 430px;
  }
}

@media (max-width: 520px) {
  .auth-shell {
    width: calc(100% - 20px);
  }

  .auth-panel,
  .card {
    padding: 22px;
  }

  h1 {
    font-size: clamp(2.8rem, 15vw, 4.2rem);
  }

  h2 {
    font-size: 1.65rem;
  }
}
