/* ============================================================
   Portal do Contador — Tela de Autenticação JaguarInfo (Moderna)
   Layout 2 Colunas (Hero Informativo + Card Flutuante + WhatsApp)
   ============================================================ */

:root {
  --bg-deep: #060911;
  --card-bg: rgba(11, 18, 32, 0.78);
  --card-border: rgba(56, 189, 248, 0.28);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --accent-cyan: #00d2ff;
  --accent-blue: #0072ff;
  --whatsapp-green: #25D366;
  --input-bg: rgba(15, 23, 42, 0.75);
  --input-border: rgba(255, 255, 255, 0.12);
  --danger: #f87171;
  --success: #34d399;
  --warning: #fbbf24;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  min-height: 100vh;
  width: 100%;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-deep);
  color: var(--text-main);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ===================== FUNDO INTERATIVO ===================== */
#auth-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  pointer-events: none;
  display: block;
}

.auth-cursor-glow {
  position: fixed;
  width: 650px;
  height: 650px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 150, 255, 0.14) 0%, rgba(0, 80, 220, 0.04) 50%, transparent 70%);
  pointer-events: none;
  z-index: 2;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s ease;
}

.auth-cyber-grid {
  position: fixed;
  inset: 0;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 42px 42px;
  z-index: 2;
  pointer-events: none;
}

/* ===================== ESTRUTURA PRINCIPAL ===================== */
.auth-shell {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 50px;
  gap: 40px;
}

/* ===================== COLUNA ESQUERDA (HERO) ===================== */
.auth-hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-right: 20px;
}

.brand-logo-card {
  display: inline-block;
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  margin-bottom: 28px;
  max-width: fit-content;
}

.brand-logo-card:hover {
  transform: none;
  box-shadow: none;
}

.brand-logo {
  max-width: 290px;
  height: auto;
  display: block;
  filter: drop-shadow(0 6px 20px rgba(0, 163, 255, 0.45));
  transition: transform 0.3s ease, filter 0.3s ease;
}

.brand-logo:hover {
  transform: scale(1.02);
  filter: drop-shadow(0 8px 28px rgba(0, 210, 255, 0.65));
}

.hero-line {
  width: 50px;
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-blue));
  box-shadow: 0 0 16px var(--accent-cyan);
  margin-bottom: 22px;
}

.hero-title {
  font-size: clamp(32px, 3.6vw, 48px);
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -0.5px;
  color: #ffffff;
  margin-bottom: 18px;
}

.hero-title .highlight {
  background: linear-gradient(135deg, #ffffff 30%, var(--accent-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-title .soft {
  color: var(--text-muted);
  font-weight: 700;
}

.hero-lede {
  font-size: 16.5px;
  color: #94a3b8;
  max-width: 520px;
  line-height: 1.6;
  margin-bottom: 32px;
}

.chips-title {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #64748b;
  font-weight: 700;
  margin-bottom: 12px;
}

.chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 38px;
}

.doc-chip {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
  font-weight: 600;
  color: #e2e8f0;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(56, 189, 248, 0.22);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.25s ease;
}

.doc-chip:hover {
  border-color: var(--accent-cyan);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0, 210, 255, 0.25);
  background: rgba(0, 210, 255, 0.1);
}

.doc-chip::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 6px var(--accent-cyan);
}

.hero-status {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13.5px;
  color: #94a3b8;
}

.pulse-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6);
  animation: pulseWave 2.2s infinite ease-out;
}

@keyframes pulseWave {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6); }
  70% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* ===================== COLUNA DIREITA (CARD FLUTUANTE) ===================== */
.auth-pane {
  display: flex;
  justify-content: flex-end;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--card-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--card-border);
  border-radius: 26px;
  padding: 38px 34px 30px;
  box-shadow: 
    0 30px 60px -15px rgba(0, 0, 0, 0.75),
    0 0 40px rgba(0, 163, 255, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  position: relative;
  overflow: hidden;
  animation: cardFloatIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.auth-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 15%;
  right: 15%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
  box-shadow: 0 0 12px var(--accent-cyan);
}

@keyframes cardFloatIn {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.card-header {
  margin-bottom: 24px;
}

.card-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(0, 210, 255, 0.08);
  border: 1px solid rgba(0, 210, 255, 0.25);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--accent-cyan);
  margin-bottom: 12px;
}

.card-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 6px var(--accent-cyan);
}

.card-title {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.4px;
  color: #ffffff;
  margin-bottom: 6px;
}

.card-subtitle {
  font-size: 14px;
  color: var(--text-muted);
}

/* ===================== FORMULÁRIO ===================== */
.auth-form {
  margin-top: 22px;
}

.input-group {
  margin-bottom: 18px;
}

.input-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  font-weight: 600;
  color: #cbd5e1;
  margin-bottom: 7px;
  letter-spacing: 0.2px;
}

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

.input-icon {
  position: absolute;
  left: 14px;
  color: #64748b;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition: color 0.2s;
}

.auth-input {
  width: 100%;
  padding: 12px 14px 12px 42px;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 12px;
  font-family: inherit;
  font-size: 14px;
  color: #ffffff;
  outline: none;
  transition: all 0.25s;
}

.auth-input::placeholder {
  color: #475569;
}

.auth-input:hover {
  border-color: rgba(255, 255, 255, 0.22);
}

.auth-input:focus {
  border-color: var(--accent-cyan);
  background: rgba(15, 23, 42, 0.95);
  box-shadow: 0 0 0 3px rgba(0, 210, 255, 0.2), 0 0 20px rgba(0, 210, 255, 0.15);
}

.auth-input:focus + .input-icon,
.input-wrapper:focus-within .input-icon {
  color: var(--accent-cyan);
}

.auth-input.has-error {
  border-color: var(--danger) !important;
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.2) !important;
}

.auth-error {
  display: block;
  margin-top: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--danger);
}

.toggle-password {
  position: absolute;
  right: 12px;
  background: transparent;
  border: none;
  color: #64748b;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

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

.options-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 6px 0 22px;
  font-size: 13px;
  gap: 12px;
}

.remember-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
}

.custom-checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 17px;
  height: 17px;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: var(--input-bg);
  cursor: pointer;
  display: grid;
  place-content: center;
  transition: all 0.2s;
}

.custom-checkbox:hover {
  border-color: var(--accent-cyan);
}

.custom-checkbox:checked {
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
  border-color: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(0, 210, 255, 0.4);
}

.custom-checkbox:checked::after {
  content: '';
  width: 4px;
  height: 8px;
  border: solid #060911;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) translateY(-1px);
}

.forgot-link {
  color: var(--accent-cyan);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s;
}

.forgot-link:hover {
  color: #7dd3fc;
  text-shadow: 0 0 10px rgba(0, 210, 255, 0.5);
}

.submit-btn {
  width: 100%;
  padding: 13.5px 20px;
  background: linear-gradient(135deg, #0072ff 0%, #00d2ff 100%);
  border: none;
  border-radius: 12px;
  color: #ffffff;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: 0.8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 8px 24px -4px rgba(0, 114, 255, 0.45);
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -4px rgba(0, 210, 255, 0.6);
  filter: brightness(1.08);
}

.submit-btn:active {
  transform: translateY(0);
}

.submit-btn[disabled] {
  opacity: 0.85;
  cursor: progress;
  filter: none;
}

[x-cloak] { display: none !important; }

.auth-spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  animation: authSpin 0.6s linear infinite;
}

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

.card-footer {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12px;
  color: var(--text-dim);
  text-align: center;
}

.card-footer strong {
  color: #cbd5e1;
  font-weight: 600;
}

/* ===================== ALERTAS ===================== */
.auth-alert {
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13.5px;
  line-height: 1.45;
  margin-bottom: 18px;
  border: 1px solid transparent;
}

.auth-alert--green {
  color: #a7f3d0;
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.35);
}

.auth-alert--yellow {
  color: #fef08a;
  background: rgba(234, 179, 8, 0.12);
  border-color: rgba(234, 179, 8, 0.35);
}

.auth-alert--red {
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.35);
}

/* ===================== BOTÃO FLUTUANTE WHATSAPP ===================== */
.whatsapp-float {
  position: fixed;
  bottom: 26px;
  right: 28px;
  z-index: 99;
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  color: #ffffff;
  text-decoration: none;
  padding: 12px 18px 12px 14px;
  border-radius: 999px;
  box-shadow: 0 10px 25px rgba(37, 211, 102, 0.35);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.2px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.whatsapp-float:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 14px 32px rgba(37, 211, 102, 0.5);
  filter: brightness(1.06);
}

.whatsapp-icon-wrap {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
}

.whatsapp-float svg {
  width: 20px;
  height: 20px;
  fill: #ffffff;
}

.whatsapp-pulse {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  border: 2px solid #25D366;
  animation: waPulse 2s infinite ease-out;
  pointer-events: none;
}

@keyframes waPulse {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(1.15, 1.35); opacity: 0; }
}

/* ===================== RESPONSIVIDADE ===================== */
@media (max-width: 960px) {
  .auth-shell {
    grid-template-columns: 1fr;
    padding: 30px 20px;
    gap: 36px;
  }
  .auth-hero {
    padding-right: 0;
    text-align: center;
    align-items: center;
  }
  .brand-logo-card {
    margin: 0 auto 24px;
  }
  .hero-line {
    margin: 0 auto 18px;
  }
  .hero-title {
    font-size: 32px;
  }
  .hero-lede {
    margin: 0 auto 24px;
  }
  .chips-container {
    justify-content: center;
    margin-bottom: 24px;
  }
  .hero-status {
    justify-content: center;
  }
  .auth-pane {
    justify-content: center;
  }
  .whatsapp-float {
    bottom: 16px;
    right: 16px;
    padding: 10px 14px;
    font-size: 12px;
  }
}
