@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;700;800;900&display=swap');

/* ===== AUTH / LANDING ===== */
.auth-body { display: flex; min-height: 100vh; background: #06080f; }

.auth-wrapper { display: flex; width: 100%; min-height: 100vh; }

.auth-left {
  flex: 1;
  background: #06080f;
  display: flex; align-items: center; justify-content: center;
  padding: 48px;
  position: relative;
  overflow: hidden;
}

.auth-left::before {
  content: '';
  position: absolute;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(0,100,255,0.08) 0%, transparent 65%);
  top: -150px; left: -100px;
  border-radius: 50%;
}

.auth-brand {
  max-width: 460px;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 36px;
}

/* Logo area — replicates the image layout */
.brand-logo-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
}

.brand-logo-img {
  width: 160px;
  height: 160px;
  filter: drop-shadow(0 0 30px rgba(0,200,150,0.25));
}

.brand-name {
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1;
  font-family: 'Montserrat', sans-serif;
}

/* "Quinova" — dark navy like in the logo image */
.brand-quinova {
  color: #ffffff;
  font-weight: 600;
  font-family: 'Montserrat', sans-serif;
}

/* "Fin" — bold italic, gradient cyan→green */
.brand-fin {
  background: linear-gradient(135deg, #00c8f0, #00e87a);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 800;
  font-family: 'Montserrat', sans-serif;
  font-style: italic;
}

.brand-tagline-sub {
  font-size: 0.7rem;
  letter-spacing: 2.5px;
  font-weight: 500;
  background: linear-gradient(90deg, #2563eb, #00c6ff, #00e57a);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-align: center;
  margin-top: 4px;
}

.auth-tagline {
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -1px;
  margin: 24px 0 16px;
  background: linear-gradient(135deg, #ffffff, #8b8fa8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-desc { color: #8b8fa8; font-size: 1rem; line-height: 1.6; margin-bottom: 32px; }

.auth-features { display: flex; flex-direction: column; gap: 12px; margin-bottom: 32px; }

.auth-feature {
  display: flex; align-items: center; gap: 12px;
  color: #c8cce0; font-size: 0.9rem;
}
.auth-feature svg { width: 18px; height: 18px; color: var(--accent-teal); flex-shrink: 0; }

.auth-plans-preview {
  display: flex; align-items: center; gap: 12px;
  flex-wrap: wrap;
}

.plan-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  color: white;
}

.plan-badge.highlight {
  background: linear-gradient(135deg, rgba(79,142,247,0.2), rgba(20,184,166,0.2));
  border-color: rgba(79,142,247,0.4);
}

.save-tag {
  background: var(--accent-green);
  color: white;
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 10px;
  font-weight: 700;
}

/* ===== AUTH RIGHT ===== */
.auth-right {
  width: 480px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 40px;
  background: var(--bg-secondary);
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow);
}

.auth-tabs {
  display: flex;
  background: var(--bg-input);
  border-radius: var(--radius-sm);
  padding: 4px;
  margin-bottom: 24px;
}

.auth-tab {
  flex: 1;
  padding: 8px;
  background: none;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.auth-tab.active {
  background: var(--bg-card);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-form.hidden { display: none; }

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

.input-icon > svg:first-child {
  position: absolute;
  left: 12px;
  width: 16px; height: 16px;
  color: var(--text-muted);
  pointer-events: none;
}

.input-icon input {
  padding-left: 38px;
  padding-right: 38px;
}

.toggle-pass {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px;
  display: flex;
}
.toggle-pass:hover { color: var(--text-primary); }
.toggle-pass svg { width: 16px; height: 16px; }

.form-row-end { display: flex; justify-content: flex-end; margin-top: -6px; }

.link-sm { font-size: 0.8rem; color: var(--accent-blue); text-decoration: none; }
.link-sm:hover { text-decoration: underline; }

.btn-full { width: 100%; justify-content: center; }

.auth-divider {
  display: flex; align-items: center; gap: 12px;
  color: var(--text-muted); font-size: 0.8rem;
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

.auth-switch { text-align: center; font-size: 0.85rem; color: var(--text-secondary); }
.auth-switch a { color: var(--accent-blue); text-decoration: none; font-weight: 600; }

.auth-error {
  margin-top: 12px;
  padding: 10px 14px;
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.3);
  border-radius: var(--radius-sm);
  color: var(--accent-red);
  font-size: 0.85rem;
}
.auth-error.hidden { display: none; }

.auth-success {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; gap: 12px; padding: 16px 0;
}
.auth-success.hidden { display: none; }
.auth-success svg { width: 48px; height: 48px; color: var(--accent-green); }
.auth-success h3 { font-size: 1.2rem; }
.auth-success p { color: var(--text-secondary); font-size: 0.875rem; line-height: 1.5; }

.auth-footer {
  margin-top: 24px;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
}

.back-btn {
  display: flex; align-items: center; gap: 6px;
  color: var(--text-secondary); font-size: 0.85rem;
  cursor: pointer; margin-bottom: 16px;
}
.back-btn:hover { color: var(--text-primary); }
.back-btn svg { width: 16px; height: 16px; }

/* Password strength */
.password-strength { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.strength-bar {
  flex: 1; height: 4px; background: var(--border); border-radius: 2px; overflow: hidden;
}
.strength-bar div { height: 100%; border-radius: 2px; transition: width 0.3s, background 0.3s; }
.password-strength span { font-size: 0.75rem; font-weight: 600; white-space: nowrap; }

/* Checkbox */
.checkbox-label {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 0.82rem; color: var(--text-secondary); cursor: pointer;
}
.checkbox-label input[type="checkbox"] {
  width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px;
  accent-color: var(--accent-blue);
}

/* ===== PLANOS ===== */
.planos-wrapper {
  max-width: 900px;
  margin: 0 auto;
  padding: 48px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

.planos-header { text-align: center; }
.planos-header h1 { font-size: 2rem; font-weight: 800; margin-bottom: 8px; }
.planos-header p { color: var(--text-secondary); }
.user-greeting { margin-top: 8px; color: var(--accent-blue); font-weight: 600; }

.billing-toggle {
  display: flex; align-items: center; gap: 12px;
  font-size: 0.9rem; font-weight: 600; color: var(--text-secondary);
}
.billing-toggle span.active { color: var(--text-primary); }

.planos-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  width: 100%;
}

.plano-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  position: relative;
  transition: all var(--transition);
}

.plano-card.featured {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 1px var(--accent-blue), var(--shadow);
}

.plano-card.dimmed { opacity: 0.5; }

.plano-badge-top {
  position: absolute;
  top: -12px; left: 50%;
  transform: translateX(-50%);
  background: var(--accent-blue);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 20px;
  white-space: nowrap;
}

.plano-header { margin-bottom: 20px; }
.plano-nome { font-size: 0.85rem; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 1px; }
.plano-preco { display: flex; align-items: baseline; gap: 4px; margin: 8px 0; }
.preco-valor { font-size: 2.2rem; font-weight: 800; }
.preco-periodo { color: var(--text-secondary); font-size: 0.9rem; }
.preco-equivalente { font-size: 0.8rem; color: var(--accent-green); font-weight: 600; margin-bottom: 4px; }
.plano-desc { font-size: 0.85rem; color: var(--text-secondary); }

.plano-features {
  list-style: none;
  display: flex; flex-direction: column; gap: 10px;
  margin-bottom: 24px;
}

.plano-features li {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.875rem;
}

.plano-features svg { width: 16px; height: 16px; color: var(--accent-green); flex-shrink: 0; }

.payment-methods {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.payment-icons {
  display: flex; justify-content: center; gap: 12px;
  margin: 8px 0;
}

.pay-icon {
  padding: 6px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.82rem;
}

.pay-security {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  color: var(--text-muted); font-size: 0.78rem; margin-top: 8px;
}
.pay-security svg { width: 14px; height: 14px; color: var(--accent-green); }

.trial-notice {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 20px;
  background: rgba(79,142,247,0.1);
  border: 1px solid rgba(79,142,247,0.2);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.trial-notice svg { width: 16px; height: 16px; color: var(--accent-blue); flex-shrink: 0; }

.planos-footer {
  display: flex; gap: 12px; align-items: center;
  font-size: 0.82rem; color: var(--text-muted);
}
.planos-footer a { color: var(--text-secondary); text-decoration: none; }
.planos-footer a:hover { color: var(--text-primary); }

/* ===== RESULT PAGES ===== */
.result-wrapper {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; padding: 24px;
}

.result-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  text-align: center;
  max-width: 440px;
  width: 100%;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
}

.result-icon svg { width: 64px; height: 64px; }
.result-card.success .result-icon svg { color: var(--accent-green); }
.result-card.error .result-icon svg { color: var(--accent-red); }
.result-card h1 { font-size: 1.5rem; font-weight: 700; }
.result-card p { color: var(--text-secondary); line-height: 1.5; }

.result-loading {
  display: flex; align-items: center; gap: 10px;
  color: var(--text-secondary); font-size: 0.875rem;
}

/* ===== LOADING ===== */
.loading-overlay {
  position: fixed; inset: 0;
  background: var(--overlay);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 16px; z-index: 9999;
  backdrop-filter: blur(4px);
}
.loading-overlay.hidden { display: none; }
.loading-overlay p { color: white; font-size: 0.9rem; }

.loading-spinner {
  width: 40px; height: 40px;
  border: 3px solid rgba(255,255,255,0.2);
  border-top-color: var(--accent-blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.loading-spinner.small { width: 20px; height: 20px; border-width: 2px; }

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

/* Spinner no botão */
.spinner {
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
}

/* Sidebar user info */
.user-info {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  margin-bottom: 4px;
}
.user-avatar-sm {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 700; color: white; flex-shrink: 0;
}
.user-details { display: flex; flex-direction: column; min-width: 0; }
.user-name { font-size: 0.82rem; font-weight: 600; color: white; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-plan { font-size: 0.72rem; color: var(--accent-teal); font-weight: 500; }

/* Plano atual info */
.plano-atual-info {
  padding: 12px;
  background: var(--bg-input);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  margin-bottom: 12px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .auth-left { display: none; }
  .auth-right { width: 100%; padding: 32px 24px; }
  .planos-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .auth-card { padding: 24px 20px; }
  .planos-wrapper { padding: 24px 16px; }
}
