/* public/css/auth.css — Verscal Build Auth Pages */
/* Apple-like, Mobile-first, PWA-ready */

/* =============================================
   AUTH LAYOUT
   ============================================= */
.auth-page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg-secondary);
  position: relative;
  overflow-x: hidden;
}

/* Background decorativo */
.auth-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.auth-bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
}

.auth-bg-orb--1 {
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(0, 102, 204, 0.25) 0%, transparent 70%);
  top: -120px;
  right: -80px;
  animation: orb-float 12s ease-in-out infinite;
}

.auth-bg-orb--2 {
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(0, 68, 170, 0.18) 0%, transparent 70%);
  bottom: 60px;
  left: -60px;
  animation: orb-float 16s ease-in-out infinite reverse;
}

@keyframes orb-float {
  0%, 100% { transform: translateY(0px) scale(1); }
  50% { transform: translateY(-30px) scale(1.05); }
}

/* =============================================
   AUTH HEADER (Logo mínimo)
   ============================================= */
.auth-header {
  position: relative;
  z-index: 10;
  padding: 20px 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.auth-header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  transition: opacity 0.2s;
}

.auth-header-logo:hover {
  opacity: 0.75;
  text-decoration: none;
}

@media (min-width: 768px) {
  .auth-header {
    padding: 28px 40px 0;
  }
}

/* =============================================
   AUTH MAIN — Centralizado
   ============================================= */
.auth-main {
  position: relative;
  z-index: 10;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px 40px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-primary);
  border-radius: 20px;
  border: 1px solid var(--border-color);
  box-shadow:
    0 2px 8px rgba(0,0,0,0.04),
    0 8px 32px rgba(0,0,0,0.06),
    0 24px 64px rgba(0,0,0,0.04);
  padding: 36px 28px 32px;
  animation: card-appear 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes card-appear {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (min-width: 480px) {
  .auth-card {
    padding: 44px 40px 40px;
  }
}

/* =============================================
   AUTH CARD HEADER
   ============================================= */
.auth-card-icon {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, var(--color-primary) 0%, #0044aa 100%);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  margin-bottom: 22px;
  box-shadow: 0 4px 16px rgba(0, 102, 204, 0.28);
}

.auth-card-title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 6px;
  line-height: 1.2;
}

.auth-card-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 28px;
}

/* =============================================
   AUTH FORM
   ============================================= */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.auth-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-input-icon {
  position: absolute;
  left: 13px;
  color: var(--text-secondary);
  pointer-events: none;
  transition: color 0.2s;
  flex-shrink: 0;
}

.auth-input {
  width: 100%;
  padding: 13px 14px 13px 40px;
  font-size: 15px;
  font-family: inherit;
  color: var(--text-primary);
  background: var(--bg-secondary);
  border: 1.5px solid var(--border-color);
  border-radius: 11px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
}

.auth-input::placeholder {
  color: #b0b0b8;
  font-weight: 400;
}

.auth-input:focus {
  border-color: var(--color-primary);
  background: var(--bg-primary);
  box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.12);
}

.auth-input:focus + .auth-input-icon,
.auth-input-wrap:focus-within .auth-input-icon {
  color: var(--color-primary);
}

/* Campo sem ícone */
.auth-input--no-icon {
  padding-left: 14px;
}

/* Toggle senha */
.auth-toggle-pass {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, background 0.2s;
}
.auth-toggle-pass:hover { color: var(--text-primary); background: var(--bg-secondary); }

/* Linha forget password */
.auth-field-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: -4px;
}

.auth-link-small {
  font-size: 13px;
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.2s;
}
.auth-link-small:hover { opacity: 0.75; text-decoration: none; }

/* =============================================
   AUTH SUBMIT BUTTON
   ============================================= */
.auth-submit {
  width: 100%;
  padding: 15px;
  margin-top: 6px;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  letter-spacing: -0.01em;
  transition: background 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
}

.auth-submit:hover {
  background: var(--color-primary-hover);
  box-shadow: 0 4px 16px rgba(0, 102, 204, 0.35);
}

.auth-submit:active { transform: scale(0.97); }

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

/* Spinner loading */
.auth-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: auth-spin 0.7s linear infinite;
  display: none;
}

.auth-submit.loading .auth-spinner { display: block; }
.auth-submit.loading .auth-btn-text { opacity: 0.7; }

@keyframes auth-spin {
  to { transform: rotate(360deg); }
}

/* =============================================
   AUTH DIVIDER
   ============================================= */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 6px 0;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

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

/* =============================================
   SOCIAL BUTTON (Google)
   ============================================= */
.auth-social-btn {
  width: 100%;
  padding: 13px;
  background: var(--bg-primary);
  border: 1.5px solid var(--border-color);
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.1s;
  text-decoration: none;
  min-height: 48px;
}

.auth-social-btn:hover {
  background: var(--bg-secondary);
  border-color: #c5c5ca;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  text-decoration: none;
  color: var(--text-primary);
}

.auth-social-btn:active { transform: scale(0.97); }

/* =============================================
   AUTH FOOTER LINK (Redirecionar)
   ============================================= */
.auth-card-footer {
  text-align: center;
  margin-top: 22px;
  font-size: 14px;
  color: var(--text-secondary);
}

.auth-card-footer a {
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.2s;
}

.auth-card-footer a:hover {
  opacity: 0.75;
  text-decoration: none;
}

/* =============================================
   ALERT / FEEDBACK MESSAGES
   ============================================= */
.auth-alert {
  display: none;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
  align-items: flex-start;
  gap: 10px;
}

.auth-alert.show { display: flex; }

.auth-alert--error {
  background: #fff2f2;
  border: 1px solid rgba(220, 53, 69, 0.2);
  color: #c0392b;
}

.auth-alert--success {
  background: #eef8f1;
  border: 1px solid rgba(28, 138, 64, 0.2);
  color: #166534;
}

.auth-alert--info {
  background: rgba(0,102,204,0.06);
  border: 1px solid rgba(0,102,204,0.15);
  color: var(--color-primary);
}

.auth-alert svg {
  flex-shrink: 0;
  margin-top: 1px;
}

/* =============================================
   TERMS TEXT
   ============================================= */
.auth-terms {
  font-size: 11px;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.6;
  margin-top: 14px;
}

.auth-terms a {
  color: var(--color-primary);
  text-decoration: none;
}
.auth-terms a:hover { text-decoration: underline; }

/* =============================================
   SUCCESS STATE (para recover/reset)
   ============================================= */
.auth-success-state {
  text-align: center;
  padding: 12px 0;
}

.auth-success-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #1c8a40, #27ae60);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  margin: 0 auto 20px;
  box-shadow: 0 4px 20px rgba(28, 138, 64, 0.3);
  animation: success-pop 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes success-pop {
  from { transform: scale(0.5); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.auth-success-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.auth-success-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* =============================================
   PASSWORD STRENGTH METER
   ============================================= */
.auth-strength-wrap {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.auth-strength-bar {
  height: 4px;
  border-radius: 100px;
  background: var(--border-color);
  overflow: hidden;
}

.auth-strength-fill {
  height: 100%;
  border-radius: 100px;
  transition: width 0.4s ease, background 0.4s ease;
  width: 0%;
}

.auth-strength-fill[data-strength="1"] { width: 25%; background: #e53e3e; }
.auth-strength-fill[data-strength="2"] { width: 50%; background: #ed8936; }
.auth-strength-fill[data-strength="3"] { width: 75%; background: #ecc94b; }
.auth-strength-fill[data-strength="4"] { width: 100%; background: #38a169; }

.auth-strength-label {
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* =============================================
   AUTH FOOTER (bottom of page)
   ============================================= */
.auth-page-footer {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 16px 20px 24px;
  font-size: 12px;
  color: var(--text-secondary);
}

.auth-page-footer a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

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

/* =============================================
   SUPPORT BADGE (inline contact)
   ============================================= */
.auth-support {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 10px;
}

.auth-support a {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.2s;
}

.auth-support a:hover { opacity: 0.75; text-decoration: none; }

/* =============================================
   SUPPORT PILL (floating button no canto)
   Used in landing pages and calculators
   ============================================= */
.support-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 100px;
  padding: 8px 16px 8px 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: background 0.2s, box-shadow 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
  cursor: pointer;
  white-space: nowrap;
}

.support-pill:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border-color: #c5c5ca;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  text-decoration: none;
  transform: translateY(-1px);
}

.support-pill svg {
  color: var(--color-primary);
  flex-shrink: 0;
}

/* Suporte embutido no footer */
.footer-support-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 14px;
  text-decoration: none;
  transition: color 0.2s;
}
.footer-support-link:hover { color: var(--color-primary); text-decoration: none; }
.footer-support-link svg { flex-shrink: 0; }

/* =============================================
   SUPORTE BANNER — Discreto no header de calculadora
   ============================================= */
.calc-support-bar {
  background: rgba(0,102,204,0.05);
  border-bottom: 1px solid rgba(0,102,204,0.1);
  padding: 7px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
}

.calc-support-bar a {
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.2s;
}

.calc-support-bar a:hover { opacity: 0.75; }

@media (min-width: 768px) {
  .calc-support-bar {
    font-size: 13px;
    padding: 8px 20px;
  }
}
