/* ============================================================
   LeadiA — Login v4 — Nova Identidade Visual
   Fundo claro | Roxo #A855F7 | Verde Neon #39FF14
   ============================================================ */

/* FIX 1: @import removido daqui — fonte carregada no HTML */

:root {
  --bg:          #F7FAFC;
  --surface:     #FFFFFF;
  --navy:        #1A202C;
  --violet:      #A855F7;
  --violet-dim:  rgba(168, 85, 247, 0.08);
  --violet-mid:  rgba(168, 85, 247, 0.2);
  --lime:        #39FF14;
  --lime-dim:    rgba(57, 255, 20, 0.1);
  --gradient:    linear-gradient(135deg, #A855F7 0%, #39FF14 100%);
  --text:        #1A202C;
  --text-muted:  #718096;
  --text-light:  #A0AEC0;
  --border:      #EDF2F7;
  --danger:      #E53E3E;
  --success:     #38A169;
  --font-title:  'Montserrat', 'Inter', sans-serif;
  --font-body:   'Inter', sans-serif;
  --ease:        220ms cubic-bezier(0.4, 0, 0.2, 1);
  --radius:      14px;
}

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

html, body { height: 100%; font-family: var(--font-body); overflow: hidden; }

body { display: flex; background: var(--bg); }

/* ════════════════════════════════════════════════════
   PAINEL ESQUERDO — Branding 65%
   ════════════════════════════════════════════════════ */
.panel-brand {
  flex: 1;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
}

/* Fundo texturizado */
.panel-brand::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(168,85,247,0.12) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse 85% 85% at 40% 50%, black 30%, transparent 100%);
}

/* Canvas mesh */
.mesh-canvas {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  opacity: 0.25;
}

/* FIX 2: orbs renomeados para .orb-top e .orb-bottom */
.orb-top {
  position: absolute;
  width: 600px; height: 600px;
  top: -150px; left: -100px;
  background: radial-gradient(circle, rgba(168,85,247,0.12) 0%, rgba(57,255,20,0.05) 50%, transparent 70%);
  border-radius: 50%;
  filter: blur(60px);
  animation: breathe 10s ease-in-out infinite;
  pointer-events: none;
}

.orb-bottom {
  position: absolute;
  width: 400px; height: 400px;
  bottom: -100px; right: 5%;
  background: radial-gradient(circle, rgba(57,255,20,0.08) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(50px);
  animation: breathe 13s ease-in-out infinite reverse;
  pointer-events: none;
  z-index: 1;
}

@keyframes breathe {
  0%, 100% { transform: scale(1) translate(0,0); }
  50%       { transform: scale(1.12) translate(20px, -30px); }
}

/* Conteúdo */
.brand-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 48px 64px;
  justify-content: space-between;
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
}

.brand-top { flex-shrink: 0; }

.brand-logo-img {
  height: 52px;
  width: auto;
  object-fit: contain;
}

/* Hero */
.brand-hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 32px 0;
}

/* FIX 3: .pill-badge sem depender de .pulse-ring */
.pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.8);
  border: 1px solid rgba(57,255,20,0.3);
  color: #2D7A0F;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 6px 14px 6px 10px;
  border-radius: 20px;
  margin-bottom: 26px;
  width: fit-content;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  backdrop-filter: blur(4px);
  box-shadow: 0 2px 12px rgba(57,255,20,0.12);
}

.pulse-core {
  width: 8px; height: 8px;
  background: var(--lime);
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(57,255,20,0.9);
  animation: corePulse 2s ease infinite;
  flex-shrink: 0;
}

@keyframes corePulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%       { transform: scale(0.7); opacity: 0.6; }
}

.brand-hero h1 {
  font-family: var(--font-title);
  font-size: clamp(2rem, 3.2vw, 3rem);
  font-weight: 800;
  color: var(--navy);
  line-height: 1.15;
  margin-bottom: 18px;
  letter-spacing: -0.03em;
}

.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.brand-hero p {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 440px;
}

/* Cards */
.floating-cards {
  display: flex;
  flex-direction: column;
  gap: 11px;
  max-width: 440px;
}

.fcard {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 18px;
  background: rgba(255,255,255,0.7);
  border: 1px solid rgba(168,85,247,0.12);
  border-radius: 12px;
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 12px rgba(26,32,44,0.06);
  transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease);
  animation: cardIn 0.5s ease both;
}

.fcard-1 { animation-delay: 0.1s; }
.fcard-2 { animation-delay: 0.2s; }
.fcard-3 { animation-delay: 0.3s; }

@keyframes cardIn {
  from { opacity: 0; transform: translateX(-16px); }
  to   { opacity: 1; transform: translateX(0); }
}

.fcard:hover {
  transform: translateX(6px);
  border-color: rgba(168,85,247,0.25);
  box-shadow: 0 6px 24px rgba(168,85,247,0.1);
}

.fcard-icon {
  width: 36px; height: 36px;
  background: var(--violet-dim);
  border: 1px solid rgba(168,85,247,0.2);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.fcard-body { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.fcard-title { font-size: 0.86rem; font-weight: 600; color: var(--navy); }
.fcard-sub   { font-size: 0.74rem; color: var(--text-muted); }

.fcard-badge {
  font-family: var(--font-title);
  font-size: 1rem;
  font-weight: 800;
  width: 30px; height: 30px;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
}

.grade-a {
  background: rgba(57,255,20,0.1);
  color: #2D7A0F;
  border: 1px solid rgba(57,255,20,0.3);
}

.fcard-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 26px;
}

.fcard-bars span {
  width: 5px;
  background: linear-gradient(to top, rgba(168,85,247,0.7), rgba(57,255,20,0.5));
  border-radius: 2px;
  min-height: 4px;
}

.brand-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.71rem;
  color: var(--text-light);
}

.brand-footer .dot { opacity: 0.4; }

/* ════════════════════════════════════════════════════
   PAINEL DIREITO — Login 35%
   ════════════════════════════════════════════════════ */
.panel-login {
  width: 35%;
  min-width: 360px;
  max-width: 480px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  box-shadow: -8px 0 48px rgba(26,32,44,0.1);
  position: relative;
}

.login-topbar {
  height: 5px;
  background: var(--gradient);
  flex-shrink: 0;
}

.login-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px 44px;
  overflow-y: auto;
}

.login-logo-wrap { margin-bottom: 32px; }

.login-logo-img { height: 40px; width: auto; object-fit: contain; }

.login-head { margin-bottom: 22px; }

.login-head h2 {
  font-family: var(--font-title);
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 5px;
  letter-spacing: -0.02em;
}

.login-head p { font-size: 0.83rem; color: var(--text-muted); line-height: 1.5; }

.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  margin: 18px 0;
}

/* Alert */
.alert {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 14px;
  border-radius: var(--radius);
  font-size: 0.8rem;
  font-weight: 500;
  margin-bottom: 14px;
  animation: slideDown 0.2s ease;
}

.alert-error   { background: #FFF5F5; border: 1px solid #FEB2B2; color: var(--danger); }
.alert-success { background: #F0FFF4; border: 1px solid #9AE6B4; color: var(--success); }

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Campos */
.field-group { margin-bottom: 16px; }

.field-group label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 7px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.field-group label svg { color: var(--text-muted); }

.field-group input,
.input-pass-wrap input {
  width: 100%;
  padding: 11px 16px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  color: var(--navy);
  font-family: var(--font-body);
  font-size: 0.9rem;
  outline: none;
  transition: border-color var(--ease), box-shadow var(--ease), background var(--ease);
}

.field-group input::placeholder,
.input-pass-wrap input::placeholder { color: var(--text-light); }

.field-group input:focus,
.input-pass-wrap input:focus {
  background: var(--surface);
  border-color: var(--violet);
  box-shadow: 0 0 0 3px rgba(168,85,247,0.12);
}

.field-group input:valid:not(:placeholder-shown),
.input-pass-wrap input:valid:not(:placeholder-shown) {
  border-color: rgba(57,255,20,0.5);
}

.input-pass-wrap { position: relative; }
.input-pass-wrap input { padding-right: 46px; }

.toggle-pass {
  position: absolute;
  right: 12px; top: 50%;
  transform: translateY(-50%);
  background: none; border: none;
  cursor: pointer; color: var(--text-light);
  display: flex; align-items: center;
  padding: 4px; border-radius: 4px;
  transition: color var(--ease);
}

.toggle-pass:hover { color: var(--navy); }

.field-error {
  display: block;
  font-size: 0.72rem;
  color: var(--danger);
  margin-top: 4px;
  min-height: 14px;
  font-weight: 500;
}

/* Linha lembrar + esqueceu */
.form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.check-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.8rem;
  color: var(--text-muted);
  user-select: none;
}

.check-wrap input[type="checkbox"] { display: none; }

.checkmark {
  width: 16px; height: 16px;
  border: 1.5px solid var(--border);
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  background: var(--bg);
  transition: all var(--ease);
}

.check-wrap input:checked ~ .checkmark {
  background: var(--violet);
  border-color: var(--violet);
}

.check-wrap input:checked ~ .checkmark::after {
  content: '';
  width: 4px; height: 7px;
  border: 1.5px solid white;
  border-top: none; border-left: none;
  transform: rotate(45deg) translate(-1px, -1px);
  display: block;
}

.forgot-link {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--violet);
  text-decoration: none;
  transition: opacity var(--ease);
}

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

/* Botão */
.btn-login {
  width: 100%;
  padding: 13px 20px;
  background: var(--gradient);
  border: none;
  border-radius: var(--radius);
  color: var(--navy);
  font-family: var(--font-title);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: opacity var(--ease), transform var(--ease), box-shadow var(--ease);
  letter-spacing: 0.01em;
}

.btn-login:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(168,85,247,0.3);
}

.btn-login:active { transform: translateY(0); opacity: 1; }
.btn-login:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-text { display: flex; align-items: center; gap: 8px; }
.btn-loader { display: flex; align-items: center; gap: 8px; }
.spin { animation: spin360 0.75s linear infinite; }

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

.divider-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.67rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-light);
  margin: 20px 0 14px;
}

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

.security-badges {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.sec-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
}

.login-version {
  display: none;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-7px); }
  40%       { transform: translateX(7px); }
  60%       { transform: translateX(-4px); }
  80%       { transform: translateX(4px); }
}

.shake { animation: shake 0.4s ease; }

/* Soluções Inteligentes badge */
.si-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-top: 32px;
}

.si-divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.si-label {
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-light);
}

.si-logo {
  height: 96px;
  width: auto;
  object-fit: contain;
  opacity: 0.8;
  transition: opacity var(--ease);
}

.si-logo:hover { opacity: 1; }

/* Responsivo */
@media (max-width: 1024px) {
  body { flex-direction: column-reverse; overflow: auto; }
  .panel-login { width: 100%; max-width: 100%; min-width: unset; box-shadow: none; }
  .panel-brand { min-height: 50vh; }
  .brand-inner { padding: 36px 28px; }
}

@media (max-width: 600px) {
  .login-container { padding: 32px 24px; }
  .brand-inner { padding: 28px 20px; }
  .brand-hero h1 { font-size: 1.7rem; }
  .security-badges { flex-wrap: wrap; }
}
