/* =============================================================================
   AUTH.CSS — Login & Sign Up Pages
   Shared styles for authentication screens
   ============================================================================= */

/* ── Reset ── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; }

/* ── Page Layout: Split Screen ── */
.auth-page {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}

/* ── Left Side: Form ── */
.auth-form-side {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
}

.auth-form-container {
  width: 100%;
  max-width: 420px;
}

/* ── Logo ── */
.auth-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 40px;
}

.auth-logo span {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--purple);
}

/* ── Header ── */
.auth-header {
  margin-bottom: 32px;
}

.auth-header h1 {
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 8px;
}

.auth-header p {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

/* ── Form ── */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
}

.form-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.form-link {
  font-size: 0.78rem;
  color: var(--purple);
  font-weight: 500;
  transition: color 0.2s;
}

.form-link:hover {
  color: var(--purple-dark);
}

.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="text"] {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border-strong);
  border-radius: 12px;
  font-size: 0.9rem;
  color: var(--text-primary);
  background: var(--bg-primary);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.form-group input:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.form-group input::placeholder {
  color: var(--text-muted);
}

/* ── Password Input ── */
.input-password-wrap {
  position: relative;
}

.input-password-wrap input {
  padding-right: 48px;
}

.toggle-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  color: var(--text-muted);
  padding: 4px;
  display: flex;
  transition: color 0.2s;
}

.toggle-password:hover {
  color: var(--purple);
}

/* ── Password Strength ── */
.password-strength {
  margin-top: 8px;
}

.strength-bar {
  height: 4px;
  border-radius: 4px;
  background: var(--border);
  overflow: hidden;
  margin-bottom: 6px;
}

.strength-fill {
  height: 100%;
  border-radius: 4px;
  background: var(--purple);
  transition: width 0.3s, background 0.3s;
  width: 0%;
}

.strength-text {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* ── Checkbox ── */
.checkbox-group {
  gap: 0;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  cursor: pointer;
  line-height: 1.5;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 1.5px solid var(--border-strong);
  accent-color: var(--purple);
  margin-top: 1px;
  flex-shrink: 0;
  cursor: pointer;
}

.checkbox-label a {
  color: var(--purple);
  font-weight: 500;
}

.checkbox-label a:hover {
  text-decoration: underline;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.25s ease;
  border: none;
  cursor: pointer;
}

.btn-primary {
  background: linear-gradient(135deg, #7C3AED, #A78BFA);
  color: #fff;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #6D28D9, #9061F9);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.3);
}

.btn-full {
  width: 100%;
}

/* ── Divider ── */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 24px 0;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-divider span {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ── Social Buttons ── */
.auth-social {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 12px;
  border: 1.5px solid var(--border-strong);
  background: var(--bg-primary);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  transition: all 0.2s ease;
}

.social-btn:hover {
  border-color: var(--purple);
  background: rgba(124, 58, 237, 0.03);
}

/* ── Footer Text ── */
.auth-footer-text {
  text-align: center;
  margin-top: 24px;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.auth-footer-text a {
  color: var(--purple);
  font-weight: 600;
}

.auth-footer-text a:hover {
  text-decoration: underline;
}

/* ── Right Side: Visual ── */
.auth-visual-side {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  background: linear-gradient(160deg, #7C3AED 0%, #6D28D9 40%, #4C1D95 100%);
  position: relative;
  overflow: hidden;
}

.auth-visual-side::before {
  content: '';
  position: absolute;
  top: -200px;
  right: -200px;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.3) 0%, transparent 70%);
  pointer-events: none;
}

.auth-visual-side::after {
  content: '';
  position: absolute;
  bottom: -150px;
  left: -150px;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(15, 211, 172, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.auth-visual-content {
  position: relative;
  z-index: 1;
  max-width: 440px;
  color: #fff;
}

.auth-visual-content h2 {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 12px;
}

.auth-visual-content p {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.7;
}

.gradient-text {
  background: linear-gradient(135deg, #A78BFA, #0FD3AC);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Login Visual: Balance Card ── */
.auth-visual-card {
  padding: 28px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  margin-bottom: 32px;
}

.auth-visual-stat {
  display: flex;
  flex-direction: column;
  margin-bottom: 16px;
}

.stat-number {
  font-size: 2.2rem;
  font-weight: 800;
}

.stat-label {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.6);
}

.auth-visual-bar {
  height: 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.15);
  margin-bottom: 8px;
}

.bar-fill {
  height: 100%;
  border-radius: 6px;
  background: linear-gradient(90deg, #A78BFA, #0FD3AC);
}

.stat-sub {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.5);
}

/* ── Signup Visual: Feature List ── */
.auth-visual-features {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 32px;
}

.auth-feature {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-feature-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.auth-feature h4 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.auth-feature p {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.6);
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .auth-page {
    grid-template-columns: 1fr;
  }

  .auth-visual-side {
    display: none;
  }

  .auth-form-side {
    padding: 32px 24px;
  }
}

@media (max-width: 480px) {
  .form-row {
    grid-template-columns: 1fr;
  }

  .auth-social {
    grid-template-columns: 1fr;
  }

  .auth-header h1 {
    font-size: 1.5rem;
  }
}
