﻿/* ===== AUTH PAGES ===== */
.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(160deg, #f0edf8 0%, #e9e4f7 50%, #ede8fa 100%);
}

.auth-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  position: relative;
}

.auth-container::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(ellipse 60% 50% at 50% 0%, rgba(22,163,74,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 460px;
  position: relative;
  z-index: 1;
}

.auth-logo {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 0.4rem;
}

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

.auth-subtitle {
  text-align: center;
  color: var(--text-sec);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

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

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

/* ===== FORM ===== */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-sec);
}

.form-group input {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  color: var(--text);
  font-size: 0.95rem;
  transition: border-color .2s, background .2s;
  width: 100%;
}

.form-group input:focus {
  border-color: var(--green);
  background: rgba(0,230,118,0.04);
}

.form-group input::placeholder { color: var(--text-sec); }

.form-group input.error { border-color: #f44336; }

.form-error {
  font-size: 0.78rem;
  color: #f44336;
  min-height: 1rem;
}

.input-wrapper {
  position: relative;
}

.input-wrapper input { padding-right: 3rem; }

.toggle-password {
  position: absolute;
  right: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-sec);
  cursor: pointer;
  font-size: 1rem;
  padding: 0.2rem;
  transition: color .2s;
}

.toggle-password:hover { color: var(--green); }

.form-row {
  display: flex;
  gap: 0.8rem;
}

.form-row .form-group { flex: 1; }

.form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.2rem;
  font-size: 0.85rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  color: var(--text-sec);
}

.checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--green);
}

.forgot-link {
  color: var(--green);
  font-size: 0.85rem;
  font-weight: 600;
  transition: opacity .2s;
}

.forgot-link:hover { opacity: 0.8; }

.btn-submit {
  width: 100%;
  background: linear-gradient(135deg, #22c55e, #34d399);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  padding: 0.85rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: background .2s, transform .1s;
  margin-top: 0.5rem;
}

.btn-submit:hover { background: var(--green-dim); }
.btn-submit:active { transform: scale(0.99); }

.btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.auth-switch {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.88rem;
  color: var(--text-sec);
}

.auth-switch a {
  color: var(--green);
  font-weight: 600;
  transition: opacity .2s;
}

.auth-switch a:hover { opacity: 0.8; }

/* ===== ALERT ===== */
.alert {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.88rem;
  margin-bottom: 1rem;
  display: none;
}

.alert.show { display: block; }
.alert.error { background: rgba(244,67,54,0.1); border: 1px solid rgba(244,67,54,0.3); color: #f44336; }
.alert.success { background: var(--green-bg); border: 1px solid rgba(22,163,74,0.3); color: var(--green); }

/* ===== PASSWORD STRENGTH ===== */
.password-strength {
  margin-top: 0.4rem;
  display: none;
}

.password-strength.show { display: block; }

.strength-bar {
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 0.3rem;
}

.strength-fill {
  height: 100%;
  border-radius: 2px;
  transition: width .3s, background .3s;
}

.strength-text { font-size: 0.75rem; color: var(--text-sec); }

/* ===== ACCOUNT TYPE ===== */
.account-type {
  display: flex;
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.type-option {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  cursor: pointer;
  text-align: center;
  transition: border-color .2s, background .2s;
}

.type-option input { display: none; }

.type-option:has(input:checked) {
  border-color: var(--green);
  background: var(--green-bg);
}

.type-option .type-label { font-size: 0.9rem; font-weight: 600; color: var(--text-sec); }
.type-option:has(input:checked) .type-label { color: var(--green); }

@media (max-width: 640px) {
  .auth-container { padding: 1rem; align-items: flex-start; padding-top: 2rem; }

  .auth-card {
    padding: 1.8rem 1.2rem;
    border-radius: 12px;
    max-width: 100%;
  }

  .form-row { flex-direction: column; gap: 0; }

  /* iOS: evita zoom automático ao focar inputs */
  .form-group input { font-size: 16px; }

  .btn-submit { font-size: 1rem; padding: 1rem; }

  .account-type { gap: 0.5rem; }
  .type-option { padding: 0.65rem 0.5rem; }
  .type-option .type-label { font-size: 0.85rem; }
}
