/* =============================================================================
   BRIVOX — Auth Pages CSS (login, forgot-password, register)
   Herda os design tokens do style.css da landing page.
   Inclua SEMPRE após style.css:
     <link rel="stylesheet" href="{{ asset('lp/css/style.css') }}">
     <link rel="stylesheet" href="{{ asset('lp/css/auth.css') }}">
   ============================================================================= */

/* ─── RESET complementar ──────────────────────────────────────────────────── */
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html  { font-size: 16px; height: 100%; }
body  {
  font-family: var(--font-main);
  background: var(--blue-deep);
  color: var(--white);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ─── Canvas neural de fundo ─────────────────────────────────────────────── */
#loginCanvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.35;
}

/* ─── TOPBAR ─────────────────────────────────────────────────────────────── */
.auth-topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  height: 68px;
  background: rgba(5,13,26,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--blue-border);
}

.auth-topbar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.auth-topbar-logo img {
  height: 34px;
  max-width: 160px;
  object-fit: contain;
}
.auth-topbar-logo-text {
  font-family: var(--font-title);
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  background: linear-gradient(135deg, var(--white) 30%, var(--cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.auth-topbar-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
  animation: pulse-dot 2.4s infinite;
  flex-shrink: 0;
}
@keyframes pulse-dot {
  0%,100% { box-shadow: 0 0 6px var(--cyan); }
  50%      { box-shadow: 0 0 18px var(--cyan), 0 0 32px rgba(0,212,255,0.4); }
}

.auth-topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ── Herda btn-nav-outline e btn-nav-primary do style.css da landing ── */
/* Classe extra para uso no topbar das auth pages */
.auth-topbar-link {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--white-60);
  transition: color 0.2s;
  text-decoration: none;
}
.auth-topbar-link:hover { color: var(--white); }

/* ─── LAYOUT PRINCIPAL ───────────────────────────────────────────────────── */
.auth-wrapper {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 100vh;
  padding-top: 68px;
}

/* ─── PAINEL ESQUERDO (info/marketing) ───────────────────────────────────── */
.auth-left {
  flex: 0 0 52%;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 80px 72px 80px 64px;
  overflow: hidden;
}
.auth-left::before {
  content: '';
  position: absolute;
  top: -20%; left: -10%;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(13,110,253,0.12) 0%, transparent 70%);
  pointer-events: none;
}
.auth-left::after {
  content: '';
  position: absolute;
  bottom: -15%; right: 5%;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(123,47,255,0.10) 0%, transparent 70%);
  pointer-events: none;
}

/* Badge animado */
.auth-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 24px;
}
.auth-badge::before {
  content: '';
  width: 20px; height: 2px;
  background: var(--cyan);
  border-radius: 2px;
}
.badge-pulse {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
  animation: pulse-dot 2s infinite;
}

/* Headline */
.auth-headline {
  font-family: var(--font-title);
  font-size: clamp(1.9rem, 3.2vw, 2.8rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 20px;
  color: var(--white);
}

/* Subheadline */
.auth-subheadline {
  font-size: 1rem;
  color: var(--white-60);
  line-height: 1.7;
  max-width: 440px;
  margin-bottom: 48px;
}

/* Feature cards — idênticos à landing */
.auth-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 52px;
  max-width: 480px;
}
.auth-feat-card {
  background: rgba(13,30,53,0.60);
  border: 1px solid var(--blue-border);
  border-radius: var(--radius-md);
  padding: 18px 14px;
  transition: var(--transition);
  backdrop-filter: blur(8px);
}
.auth-feat-card:hover {
  border-color: rgba(0,212,255,0.35);
  background: rgba(13,30,53,0.85);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}
.auth-feat-icon {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  font-size: 0.9rem;
}
.auth-feat-icon.cyan   { background: rgba(0,212,255,0.12); color: var(--cyan); }
.auth-feat-icon.blue   { background: rgba(13,110,253,0.14); color: var(--blue-bright); }
.auth-feat-icon.purple { background: rgba(123,47,255,0.14); color: #a78bfa; }
.auth-feat-card h4 {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 4px;
  line-height: 1.3;
}
.auth-feat-card p {
  font-size: 0.7rem;
  color: var(--white-40);
  line-height: 1.5;
}

/* Stats */
.auth-stats {
  display: flex;
  align-items: center;
  gap: 32px;
}
.auth-stat-item { display: flex; flex-direction: column; }
.auth-stat-number {
  font-family: var(--font-title);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--white);
  line-height: 1;
}
.auth-stat-plus { font-size: 1.1rem; color: var(--cyan); font-weight: 700; }
.auth-stat-label {
  font-size: 0.68rem;
  color: var(--white-40);
  font-weight: 500;
  margin-top: 3px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.auth-stat-divider { width: 1px; height: 36px; background: var(--blue-border); }

/* ─── PAINEL DIREITO (formulário) ───────────────────────────────────────── */
.auth-right {
  flex: 0 0 48%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 56px;
  position: relative;
}
.auth-right::before {
  content: '';
  position: absolute;
  top: 10%; left: 0; bottom: 10%;
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--blue-border), transparent);
}
.auth-form-wrap {
  width: 100%;
  max-width: 440px;
}

/* ─── CARD ──────────────────────────────────────────────────────────────── */
.auth-card {
  background: rgba(255,255,255,0.97);
  border-radius: var(--radius-lg);
  padding: 44px 40px 36px;
  box-shadow:
    0 2px 0 1px rgba(255,255,255,0.04),
    0 24px 80px rgba(0,0,0,0.50),
    0 4px 24px rgba(0,212,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  position: relative;
  overflow: hidden;
}
/* Faixa gradiente topo do card — herda brand-primary do tenant */
.auth-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand-primary, var(--blue-bright)), var(--brand-secondary, var(--purple)), var(--cyan));
}

/* Ícone / logo no card */
.auth-card-icon {
  width: 72px; height: 72px;
  border-radius: 18px;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
  box-shadow: 0 8px 28px rgba(0,174,238,0.30);
}
.auth-card-icon img {
  width: 100%; height: 100%;
  object-fit: contain;
  display: block;
}

/* Títulos do card */
.auth-card-title {
  font-family: var(--font-title);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--light-text);
  text-align: center;
  margin-bottom: 6px;
  line-height: 1.2;
}
.auth-card-subtitle {
  font-size: 0.85rem;
  color: var(--light-text-muted);
  text-align: center;
  margin-bottom: 28px;
  line-height: 1.5;
}

/* Tenant badge white-label */
.auth-tenant-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--brand-primary, var(--blue-bright));
  background: color-mix(in srgb, var(--brand-primary, var(--blue-bright)) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--brand-primary, var(--blue-bright)) 25%, transparent);
  border-radius: 20px;
  padding: 4px 10px;
  margin: 0 auto 16px;
  width: fit-content;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.auth-tenant-badge i { font-size: 0.65rem; }

/* ─── ALERTAS ────────────────────────────────────────────────────────────── */
.auth-alert {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.83rem;
  margin-bottom: 20px;
  line-height: 1.5;
}
.auth-alert i { flex-shrink: 0; margin-top: 1px; }
.auth-alert-danger  { background:#fef2f2; border:1px solid #fecaca; color:#dc2626; }
.auth-alert-success { background:#f0fdf4; border:1px solid #bbf7d0; color:#16a34a; }
.auth-alert-info    { background:#eff6ff; border:1px solid #bfdbfe; color:#2563eb; }

/* ─── CAMPOS DE FORMULÁRIO ──────────────────────────────────────────────── */
.auth-field { margin-bottom: 18px; }
.auth-field-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--light-text-mid);
  margin-bottom: 6px;
}
.auth-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.auth-input-wrap > i.input-ico {
  position: absolute;
  left: 13px;
  font-size: 0.85rem;
  color: #94a3b8;
  pointer-events: none;
  transition: color 0.25s;
  z-index: 1;
}
.auth-input-wrap:focus-within > i.input-ico {
  color: var(--brand-primary, var(--blue-bright));
}
.auth-input {
  width: 100%;
  background: #f7f9fe;
  border: 1.5px solid #dce3f0;
  border-radius: var(--radius-sm);
  padding: 12px 42px;
  font-size: 0.9rem;
  color: var(--light-text);
  font-family: var(--font-main);
  outline: none;
  transition: var(--transition);
  height: 48px;
}
.auth-input::placeholder { color: #a0aec0; }
.auth-input:hover  { border-color: #b0bcda; background: #f0f4fd; }
.auth-input:focus  {
  border-color: var(--brand-primary, var(--blue-bright));
  background: #ffffff;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-primary, var(--blue-bright)) 12%, transparent);
}
.auth-input.is-invalid {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239,68,68,0.09);
}

/* Toggle senha */
.auth-toggle-pw {
  position: absolute;
  right: 13px;
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px;
  font-size: 0.85rem;
  line-height: 1;
  transition: color 0.2s;
  z-index: 1;
}
.auth-toggle-pw:hover { color: var(--brand-primary, var(--blue-bright)); }

/* ─── EXTRAS (lembrar-me + esqueci) ─────────────────────────────────────── */
.auth-extras {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 4px 0 26px;
}
.auth-remember {
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
}
.auth-remember input[type="checkbox"] { display: none; }
.auth-checkbox {
  width: 16px; height: 16px;
  border: 2px solid #c8d4e8;
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: var(--transition);
  background: #f7f9fe;
}
.auth-checkbox i { font-size: 0.52rem; color: #fff; opacity: 0; transition: opacity 0.15s; }
.auth-remember input:checked + .auth-checkbox {
  background: var(--brand-primary, var(--blue-bright));
  border-color: var(--brand-primary, var(--blue-bright));
}
.auth-remember input:checked + .auth-checkbox i { opacity: 1; }
.auth-remember-label {
  font-size: 0.78rem;
  color: var(--light-text-muted);
  font-weight: 500;
  user-select: none;
}
.auth-forgot-link {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--brand-primary, var(--blue-bright));
  text-decoration: none;
  transition: color 0.2s;
}
.auth-forgot-link:hover {
  color: var(--brand-secondary, var(--purple));
  text-decoration: underline;
}

/* ─── BOTÕES — idênticos aos da landing page ─────────────────────────────── */

/* Botão primário (entrar / enviar) — herda .btn-primary-hero */
/*
 * auth-btn-primary — botão primário das páginas de auth.
 *
 * MODO BRIVOX (domínio principal, sem tenant):
 *   --brand-primary   = var(--cyan)        → fundo azul-ciano
 *   --brand-secondary = var(--blue-bright) → gradiente idêntico ao btn-primary-hero
 *   --btn-text-color  = var(--blue-deep)   → texto escuro (igual btn-primary-hero)
 *
 * MODO WHITE-LABEL (tenant com branding próprio):
 *   --brand-primary / --brand-secondary = cores do tenant
 *   --btn-text-color = var(--white)       → texto claro sobre fundo escuro do tenant
 */
.auth-btn-primary {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  /* Gradiente idêntico ao btn-primary-hero da landing */
  background: linear-gradient(135deg, var(--brand-primary, var(--cyan)) 0%, var(--brand-secondary, var(--blue-bright)) 100%);
  color: var(--btn-text-color, var(--blue-deep));
  font-weight: 700;
  font-size: 0.95rem;
  font-family: var(--font-main);
  padding: 14px 28px;
  height: 50px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 30px rgba(0, 212, 255, 0.35);
  position: relative;
  overflow: hidden;
  letter-spacing: 0.03em;
  text-decoration: none;
}
/* Efeito shimmer — idêntico ao btn-primary-hero */
.auth-btn-primary::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}
.auth-btn-primary:hover::before { left: 100%; }
.auth-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 40px rgba(0, 212, 255, 0.5);
  color: var(--btn-text-color, var(--blue-deep));
}
.auth-btn-primary:active { transform: scale(0.98); }
.auth-btn-primary:disabled { opacity: 0.65; cursor: not-allowed; transform: none; }
.auth-btn-primary i { transition: transform 0.3s; }
.auth-btn-primary:hover i { transform: translateX(4px); }

/* Botão outline (criar conta / voltar) — herda .btn-secondary-hero */
.auth-btn-outline {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: transparent;
  color: var(--brand-primary, var(--blue-bright));
  font-weight: 700;
  font-size: 0.88rem;
  font-family: var(--font-main);
  padding: 12px 20px;
  height: 46px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--brand-primary, var(--blue-bright));
  text-decoration: none;
  transition: var(--transition);
  letter-spacing: 0.02em;
  cursor: pointer;
}
.auth-btn-outline:hover {
  background: color-mix(in srgb, var(--brand-primary, var(--blue-bright)) 8%, transparent);
  border-color: var(--brand-secondary, var(--purple));
  color: var(--brand-secondary, var(--purple));
  transform: translateY(-1px);
}

/* Botão ghost link */
.auth-btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--brand-primary, var(--blue-bright));
  text-decoration: none;
  transition: var(--transition);
  padding: 4px 0;
}
.auth-btn-ghost:hover {
  color: var(--brand-secondary, var(--purple));
  gap: 10px;
}

/* ─── DIVISOR ────────────────────────────────────────────────────────────── */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0;
}
.auth-divider span { font-size: 0.75rem; color: #c8d4e8; white-space: nowrap; font-weight: 500; }
.auth-divider::before,.auth-divider::after { content: ''; flex: 1; height: 1px; background: #e2e8f0; }

/* ─── RODAPÉ DO CARD ─────────────────────────────────────────────────────── */
.auth-card-footer {
  text-align: center;
  margin-top: 22px;
  font-size: 0.7rem;
  color: #94a3b8;
  line-height: 1.6;
}
.auth-card-footer a {
  color: var(--brand-primary, var(--blue-bright));
  font-weight: 600;
  text-decoration: none;
}
.auth-card-footer a:hover { text-decoration: underline; }

/* ─── POWERED BY (white-label) ───────────────────────────────────────────── */
.auth-powered-by {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-top: 18px;
  font-size: 0.68rem;
  color: rgba(255,255,255,0.25);
  letter-spacing: 0.04em;
}
.auth-powered-by img { height: 14px; opacity: 0.30; filter: brightness(10); }
.auth-powered-name {
  font-weight: 600;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.35);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ─── ANIMAÇÕES DE ENTRADA ───────────────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
.anim-1 { animation: fadeInUp 0.55s ease both; }
.anim-2 { animation: fadeInUp 0.55s 0.10s ease both; }
.anim-3 { animation: fadeInUp 0.55s 0.20s ease both; }
.anim-4 { animation: fadeInUp 0.55s 0.30s ease both; }
.anim-5 { animation: fadeInUp 0.55s 0.05s ease both; }

/* ─── RESPONSIVO ─────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .auth-left  { padding: 60px 48px; }
  .auth-right { padding: 60px 40px; }
}
@media (max-width: 860px) {
  .auth-wrapper { flex-direction: column; }
  .auth-left  { flex: none; padding: 52px 32px 44px; min-height: auto; }
  .auth-left::before,.auth-left::after { display: none; }
  .auth-right { flex: none; padding: 44px 24px 56px; }
  .auth-right::before { display: none; }
  .auth-features { grid-template-columns: repeat(3, 1fr); max-width: 100%; }
  .auth-stats { gap: 24px; }
}
@media (max-width: 600px) {
  .auth-topbar  { padding: 0 20px; }
  .auth-topbar-link { display: none; }
  .auth-left    { padding: 40px 20px 36px; }
  .auth-headline { font-size: 1.7rem; }
  .auth-subheadline { font-size: 0.88rem; margin-bottom: 32px; }
  .auth-features { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .auth-feat-card { padding: 14px 10px; }
  .auth-feat-card h4 { font-size: 0.72rem; }
  .auth-feat-card p  { display: none; }
  .auth-stats   { gap: 18px; }
  .auth-stat-number { font-size: 1.3rem; }
  .auth-right   { padding: 36px 16px 48px; }
  .auth-card    { padding: 32px 24px 28px; }
  .auth-card-title { font-size: 1.25rem; }
  .auth-input   { font-size: 16px; }
  .auth-btn-primary { font-size: 0.92rem; }
}
@media (max-width: 380px) {
  .auth-left  { padding: 32px 16px 28px; }
  .auth-right { padding: 28px 12px 40px; }
  .auth-card  { padding: 28px 18px 24px; border-radius: 16px; }
  .auth-features { gap: 8px; }
}
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .auth-right { padding-bottom: calc(48px + env(safe-area-inset-bottom)); }
}

/* ─── Toggle pw btn (alias para reset-password) ────────────────────────── */
.toggle-pw-btn {
  position: absolute;
  right: 13px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px;
  font-size: 0.85rem;
  line-height: 1;
  transition: color 0.2s;
  z-index: 1;
}
