:root {
  --green: #27e094;
  --green-dark: #22c480;
  --green-dim: rgba(0, 229, 176, 0.08);
  --bg: #0A0F0D;
  --bg-card: #111813;
  --border: rgba(255, 255, 255, 0.07);
  --border-green: rgba(0, 229, 176, 0.14);
  --text-0: #FFFFFF;
  --text-1: #E2EDE9;
  --text-2: #9DB3AC;
  --text-3: #5A7068;
  --error: #FF4D6D;
  --font: 'Sora', sans-serif;
  --mono: 'JetBrains Mono', monospace;
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-xl: 22px;
  --r-full: 9999px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-1);
  -webkit-font-smoothing: antialiased;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: radial-gradient(circle, rgba(0, 229, 176, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

.auth-wrap {
  width: 100%;
  max-width: 440px;
  position: relative;
  z-index: 1;
}

.auth-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 2.5rem;
}

.auth-logo img {
  height: 32px;
  width: auto;
}

.auth-logo-text {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-0);
  letter-spacing: -0.04em;
  text-decoration: none;
}

.auth-logo-text span {
  color: var(--green);
}

.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 2.5rem;
}

.auth-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-0);
  letter-spacing: -0.03em;
  margin-bottom: 0.375rem;
}

.auth-sub {
  font-size: 0.9375rem;
  color: var(--text-2);
  line-height: 1.6;
  margin-bottom: 2rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.field label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-1);
}

.field input {
  font-family: var(--font);
  font-size: 0.9375rem;
  color: var(--text-0);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 0 1rem;
  height: 48px;
  outline: none;
  width: 100%;
  transition: border-color 0.18s, box-shadow 0.18s;
}

.field input::placeholder {
  color: var(--text-3);
}

.field input:focus {
  border-color: rgba(0, 229, 176, 0.4);
  box-shadow: 0 0 0 3px rgba(0, 229, 176, 0.07);
}

.field input.error {
  border-color: var(--error);
}

.field-hint {
  font-size: 0.8rem;
  color: var(--text-3);
  margin-top: 0.25rem;
}

.field-error {
  font-size: 0.8rem;
  color: var(--error);
  margin-top: 0.25rem;
  display: none;
}

.field-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.link {
  font-size: 0.8125rem;
  color: var(--green);
  text-decoration: none;
  transition: opacity 0.18s;
}

.link:hover {
  opacity: 0.75;
}

.btn-auth {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  height: 50px;
  border: none;
  border-radius: var(--r-md);
  background: linear-gradient(90deg, var(--green), var(--green-dark));
  color: #071210;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.22s var(--ease);
  margin-top: 0.75rem;
}

.btn-auth:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 229, 176, 0.2);
}

.auth-footer {
  text-align: center;
  margin-top: 1.75rem;
  font-size: 0.875rem;
  color: var(--text-3);
}

.auth-footer a {
  color: var(--text-1);
  text-decoration: none;
  font-weight: 600;
}

.auth-footer a:hover {
  color: var(--green);
}

.divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0;
  color: var(--text-3);
  font-size: 0.8125rem;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.back-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  margin-top: 1.5rem;
  font-size: 0.8125rem;
  color: var(--text-3);
  text-decoration: none;
  transition: color 0.18s;
}

.back-link:hover {
  color: var(--text-1);
}

.back-link svg {
  flex-shrink: 0;
}

.password-wrap {
  position: relative;
}

.password-wrap input {
  padding-right: 3rem;
}

.pw-toggle {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-3);
  padding: 0;
  display: flex;
  transition: color 0.18s;
}

.pw-toggle:hover {
  color: var(--text-1);
}

.strength-bar {
  display: flex;
  gap: 4px;
  margin-top: 0.5rem;
}

.strength-seg {
  flex: 1;
  height: 3px;
  border-radius: 99px;
  background: var(--border);
  transition: background 0.3s;
}

.strength-label {
  font-size: 0.75rem;
  color: var(--text-3);
  margin-top: 0.375rem;
}

.alert {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-radius: var(--r-md);
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  line-height: 1.5;
}

.alert-success {
  background: rgba(0, 229, 176, 0.06);
  border: 1px solid rgba(0, 229, 176, 0.18);
  color: var(--green);
}

.alert-info {
  background: rgba(88, 166, 255, 0.06);
  border: 1px solid rgba(88, 166, 255, 0.18);
  color: #58A6FF;
}

@media (max-width: 480px) {
  .auth-card {
    padding: 1.75rem 1.25rem;
  }
}