:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #07100d;
  color: #f4fbf7;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 0%, rgba(47, 255, 163, 0.11), transparent 34%),
    radial-gradient(circle at 90% 100%, rgba(30, 126, 84, 0.13), transparent 32%),
    linear-gradient(145deg, #050a08 0%, #08120f 48%, #050907 100%);
}

button, input { font: inherit; }

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 18px;
}

.auth-card {
  width: min(100%, 460px);
  padding: 34px;
  border: 1px solid rgba(103, 255, 181, 0.16);
  border-radius: 24px;
  background: rgba(10, 20, 16, 0.9);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.46), inset 0 1px 0 rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 15px;
  background: linear-gradient(145deg, #36f5a7, #0f9f65);
  color: #03100a;
  font-weight: 900;
  letter-spacing: 0.02em;
  box-shadow: 0 14px 32px rgba(22, 214, 126, 0.22);
}

.brand-copy {
  color: #cbd8d1;
  font-size: 0.9rem;
  font-weight: 700;
}

.auth-heading { margin: 30px 0 24px; }

.eyebrow {
  display: block;
  margin-bottom: 9px;
  color: #56e6a3;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 8vw, 2.65rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.auth-heading p {
  margin: 10px 0 0;
  color: #8ea39a;
  line-height: 1.55;
}

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

label { display: grid; gap: 8px; }
label span { color: #c7d5ce; font-size: 0.84rem; font-weight: 700; }

input {
  width: 100%;
  min-height: 52px;
  padding: 0 15px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 12px;
  outline: none;
  background: #0c1713;
  color: #f6fff9;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

input:focus {
  border-color: rgba(68, 238, 156, .62);
  box-shadow: 0 0 0 4px rgba(68, 238, 156, .08);
  background: #0e1b16;
}

.password-wrap {
  position: relative;
}

.password-wrap input {
  padding-right: 70px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  min-height: 34px;
  padding: 0 9px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #66e7aa;
  cursor: pointer;
  font-size: .78rem;
  font-weight: 800;
}

.forgot-link {
  justify-self: end;
  margin-top: -5px;
  padding: 3px 0;
  border: 0;
  background: transparent;
  color: #88aa9a;
  cursor: pointer;
  font-size: .8rem;
  font-weight: 700;
}

.forgot-link:hover,
.forgot-link:focus-visible,
.password-toggle:hover,
.password-toggle:focus-visible {
  color: #78f0b7;
}

.primary-btn {
  min-height: 52px;
  margin-top: 2px;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  background: linear-gradient(135deg, #37f2a2, #12b971);
  color: #03110a;
  font-weight: 900;
  box-shadow: 0 12px 28px rgba(19, 197, 116, .20);
}

.primary-btn:disabled { cursor: wait; opacity: .65; }

.auth-message {
  min-height: 22px;
  margin-top: 12px;
  color: #ffb8b8;
  font-size: .86rem;
  line-height: 1.45;
}

.auth-message.success { color: #74efb4; }

.auth-switch {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 12px;
  color: #899d93;
  font-size: .88rem;
}

.auth-switch button {
  padding: 5px 7px;
  border: 1px solid rgba(98, 232, 168, .22);
  border-radius: 9px;
  background: rgba(98, 232, 168, .06);
  color: #62e8a8;
  cursor: pointer;
  font-weight: 900;
}

.back-link {
  display: block;
  margin-top: 24px;
  color: #71867c;
  text-align: center;
  text-decoration: none;
  font-size: .82rem;
}

.is-hidden { display: none !important; }

@media (max-width: 520px) {
  .auth-shell {
    place-items: start center;
    padding: 18px 14px 24px;
  }

  .auth-card {
    padding: 24px 20px;
    border-radius: 20px;
  }

  .brand-copy { display: none; }
  .auth-heading { margin: 26px 0 22px; }
  .back-link { margin-top: 20px; }
}
