/* Auth pages shared styles (login + register) */

.auth-main {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(5rem, 12vh, 8rem) 1.25rem 4rem;
  overflow: hidden;
  position: relative;
}

.auth-wrap {
  position: relative;
  width: 100%;
  max-width: 480px;
}

.auth-glow {
  position: absolute;
  inset: -30%;
  background: radial-gradient(circle at 50% 40%,
    rgba(0, 255, 136, 0.22),
    rgba(0, 255, 136, 0.06) 40%,
    transparent 70%);
  filter: blur(60px);
  z-index: 0;
  pointer-events: none;
  animation: authGlow 10s ease-in-out infinite;
}
@keyframes authGlow {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50%      { opacity: 1;   transform: scale(1.08); }
}

.auth-card {
  position: relative;
  z-index: 1;
  padding: clamp(2rem, 5vw, 3rem);
  background: rgba(10, 10, 10, 0.88);
  border: 1px solid var(--dim, #1F1F1F);
  border-radius: 18px;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.6);
}

.auth-card .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted, #7A7A7A);
  margin-bottom: 1.25rem;
}
.auth-card .eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent, #00FF88);
  box-shadow: 0 0 10px var(--accent, #00FF88);
}

.auth-title {
  font-family: 'Inter', sans-serif;
  font-size: clamp(1.85rem, 5vw, 2.75rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 600;
  color: var(--fg, #F0F0F0);
  margin: 0 0 0.9rem;
}
.auth-title em {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-weight: 400;
  color: var(--accent, #00FF88);
  padding-right: 0.05em;
}

.auth-lead {
  font-size: 1rem;
  color: var(--muted, #9A9A9A);
  line-height: 1.5;
  margin: 0 0 2rem;
}


/* Form */

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

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

/* Two fields side by side (firstname + lastname) */
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.field-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted, #9A9A9A);
}

.field-help {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.7rem;
  color: var(--accent, #00FF88);
  text-decoration: none;
  text-transform: none;
  letter-spacing: 0.05em;
  opacity: 0.8;
  transition: opacity 200ms ease;
}
.field-help:hover { opacity: 1; }

.field-input {
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--dim, #1F1F1F);
  border-radius: 10px;
  transition: border-color 200ms ease, background 200ms ease;
}
.field-input:focus-within {
  border-color: var(--accent, #00FF88);
  background: rgba(0, 255, 136, 0.03);
}

.field-icon {
  position: absolute;
  left: 0.9rem;
  width: 16px;
  height: 16px;
  color: var(--muted, #6B6B6B);
  pointer-events: none;
  transition: color 200ms ease;
}
.field-input:focus-within .field-icon {
  color: var(--accent, #00FF88);
}

.field-input input {
  width: 100%;
  padding: 0.9rem 0.9rem 0.9rem 2.5rem;
  background: transparent;
  border: none;
  outline: none;
  color: var(--fg, #F0F0F0);
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  border-radius: 10px;
}
.field-input input::placeholder {
  color: var(--muted, #4A4A4A);
}

.field-toggle {
  position: absolute;
  right: 0.35rem;
  background: transparent;
  border: none;
  color: var(--muted, #6B6B6B);
  padding: 0.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: color 200ms ease, background 200ms ease;
}
.field-toggle:hover {
  color: var(--fg, #E8E8E8);
  background: rgba(255, 255, 255, 0.04);
}
.field-toggle i { width: 16px; height: 16px; }

.field-input:has(.field-toggle) input {
  padding-right: 2.75rem;
}


/* Password strength meter (matches auth.js: #pwd-strength, #pwd-fill, #pwd-label) */

.pwd-strength {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.6rem;
}
.pwd-bar {
  flex: 1;
  height: 3px;
  background: var(--dim, #1F1F1F);
  border-radius: 2px;
  overflow: hidden;
}
.pwd-fill {
  height: 100%;
  width: 0;
  transition: width 250ms ease, background 250ms ease;
}
.pwd-fill.weak   { width: 33%;  background: #FF6B6B; }
.pwd-fill.medium { width: 66%;  background: #FFBF00; }
.pwd-fill.strong { width: 100%; background: var(--accent, #00FF88); }

.pwd-label {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  min-width: 3.5rem;
  text-align: right;
  color: var(--muted, #7A7A7A);
}
.pwd-label.weak   { color: #FF7070; }
.pwd-label.medium { color: #FFBF00; }
.pwd-label.strong { color: var(--accent, #00FF88); }


/* Terms checkbox */

.field-checkbox {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  align-items: start;
  cursor: pointer;
  padding: 0.25rem 0;
  user-select: none;
}
.field-checkbox input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.checkbox-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border: 1px solid var(--dim, #2A2A2A);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.02);
  transition: border-color 200ms ease, background 200ms ease;
  margin-top: 1px;
  flex-shrink: 0;
}
.checkbox-mark i {
  width: 12px;
  height: 12px;
  color: #000;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 150ms ease, transform 150ms ease;
}
.field-checkbox input:checked ~ .checkbox-mark {
  background: var(--accent, #00FF88);
  border-color: var(--accent, #00FF88);
}
.field-checkbox input:checked ~ .checkbox-mark i {
  opacity: 1;
  transform: scale(1);
}
.field-checkbox input:focus-visible ~ .checkbox-mark {
  border-color: var(--accent, #00FF88);
  box-shadow: 0 0 0 3px rgba(0, 255, 136, 0.2);
}
.checkbox-text {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--muted, #A0A0A0);
}
.checkbox-text a {
  color: var(--fg, #E8E8E8);
  text-decoration: underline;
  text-decoration-color: var(--dim, #3A3A3A);
  text-underline-offset: 3px;
  transition: color 200ms ease, text-decoration-color 200ms ease;
}
.checkbox-text a:hover {
  color: var(--accent, #00FF88);
  text-decoration-color: var(--accent, #00FF88);
}


/* Error */

.auth-error {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 0.8rem 0.95rem;
  background: rgba(255, 90, 90, 0.08);
  border: 1px solid rgba(255, 90, 90, 0.25);
  border-radius: 10px;
  color: #FF8080;
  font-size: 0.9rem;
  line-height: 1.4;
}
.auth-error i {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 2px;
}

.btn-block {
  width: 100%;
  justify-content: center;
  padding-block: 0.95rem;
  font-size: 0.95rem;
  margin-top: 0.35rem;
}

.auth-switch {
  text-align: center;
  margin: 1.75rem 0 0;
  font-size: 0.92rem;
  color: var(--muted, #9A9A9A);
}
.auth-switch a {
  color: var(--accent, #00FF88);
  text-decoration: none;
  font-weight: 500;
  margin-left: 0.3rem;
  transition: opacity 200ms ease;
}
.auth-switch a:hover { opacity: 0.75; }


/* Responsive */

@media (max-width: 540px) {
  .auth-main {
    padding-top: 4.5rem;
    padding-bottom: 3rem;
  }
  .auth-card {
    padding: 1.75rem 1.4rem;
    border-radius: 14px;
  }
  .auth-lead {
    margin-bottom: 1.5rem;
  }
  .field-row {
    grid-template-columns: 1fr;
    gap: 1.15rem;
  }
  .field-input input {
    font-size: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-glow { animation: none; }
}
