/* ============================================================
   LOGIN PREMIUM – PARTÍCULAS, GLASSMORPHISM E ANIMAÇÕES
   ============================================================ */

:root {
  --primary: #7c3aed;
  --primary-2: #6d28d9;
  --navy: #0a0e1a;
  --navy-2: #111827;
  --bg: #05070e;
  --surface: #0f1729;
  --text: #f1f5f9;
  --muted: #94a3b8;
  --border: rgba(124,58,237,0.5);
  --danger: #f87171;
  --shadow: 0 30px 90px rgba(0,0,0,0.7);
}

* {
  box-sizing: border-box;
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

html, body {
  min-height: 100%;
  margin: 0;
}

body {
  padding: clamp(14px, 3vw, 34px);
  display: grid;
  place-items: center;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, sans-serif;
  position: relative;
  overflow: hidden;
  min-height: 100vh;
}

/* ===== SCROLLBAR PERSONALIZADA ===== */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 10px;
}

/* ===== PARTÍCULAS FLUTUANTES + MOUSE ===== */
body::before {
  content: '' !important;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  z-index: 0 !important;
  pointer-events: none !important;
  background-image:
    /* ROXAS */
    radial-gradient(5px 5px at 5% 10%, rgba(124,58,237,1), transparent),
    radial-gradient(7px 7px at 12% 25%, rgba(124,58,237,0.9), transparent),
    radial-gradient(4px 4px at 20% 40%, rgba(124,58,237,0.8), transparent),
    radial-gradient(8px 8px at 28% 55%, rgba(124,58,237,0.7), transparent),
    radial-gradient(5px 5px at 36% 70%, rgba(124,58,237,0.9), transparent),
    radial-gradient(6px 6px at 44% 85%, rgba(124,58,237,0.8), transparent),
    radial-gradient(4px 4px at 52% 10%, rgba(124,58,237,0.7), transparent),
    radial-gradient(9px 9px at 60% 30%, rgba(124,58,237,0.6), transparent),
    radial-gradient(5px 5px at 68% 50%, rgba(124,58,237,0.9), transparent),
    radial-gradient(7px 7px at 76% 65%, rgba(124,58,237,0.8), transparent),
    radial-gradient(4px 4px at 84% 80%, rgba(124,58,237,0.7), transparent),
    radial-gradient(8px 8px at 92% 95%, rgba(124,58,237,0.6), transparent),
    radial-gradient(6px 6px at 15% 15%, rgba(124,58,237,0.9), transparent),
    radial-gradient(5px 5px at 35% 45%, rgba(124,58,237,0.8), transparent),
    radial-gradient(7px 7px at 55% 75%, rgba(124,58,237,0.7), transparent),
    radial-gradient(4px 4px at 75% 20%, rgba(124,58,237,0.9), transparent),
    radial-gradient(9px 9px at 90% 55%, rgba(124,58,237,0.6), transparent),
    radial-gradient(5px 5px at 45% 5%, rgba(124,58,237,0.8), transparent),
    radial-gradient(6px 6px at 65% 85%, rgba(124,58,237,0.7), transparent),
    radial-gradient(8px 8px at 85% 45%, rgba(124,58,237,0.6), transparent),
    /* AZUIS */
    radial-gradient(5px 5px at 8% 18%, rgba(59,130,246,0.9), transparent),
    radial-gradient(7px 7px at 18% 35%, rgba(59,130,246,0.8), transparent),
    radial-gradient(4px 4px at 28% 52%, rgba(59,130,246,0.7), transparent),
    radial-gradient(8px 8px at 38% 68%, rgba(59,130,246,0.6), transparent),
    radial-gradient(5px 5px at 48% 82%, rgba(59,130,246,0.9), transparent),
    radial-gradient(6px 6px at 58% 12%, rgba(59,130,246,0.8), transparent),
    radial-gradient(4px 4px at 68% 32%, rgba(59,130,246,0.7), transparent),
    radial-gradient(9px 9px at 78% 52%, rgba(59,130,246,0.6), transparent),
    radial-gradient(5px 5px at 88% 72%, rgba(59,130,246,0.9), transparent),
    radial-gradient(7px 7px at 95% 88%, rgba(59,130,246,0.8), transparent),
    radial-gradient(6px 6px at 22% 22%, rgba(59,130,246,0.9), transparent),
    radial-gradient(5px 5px at 42% 42%, rgba(59,130,246,0.8), transparent),
    radial-gradient(7px 7px at 62% 62%, rgba(59,130,246,0.7), transparent),
    radial-gradient(4px 4px at 82% 28%, rgba(59,130,246,0.9), transparent),
    radial-gradient(8px 8px at 92% 65%, rgba(59,130,246,0.6), transparent),
    radial-gradient(5px 5px at 32% 8%, rgba(59,130,246,0.8), transparent),
    radial-gradient(6px 6px at 72% 78%, rgba(59,130,246,0.7), transparent),
    radial-gradient(4px 4px at 10% 48%, rgba(59,130,246,0.9), transparent),
    radial-gradient(7px 7px at 50% 30%, rgba(59,130,246,0.8), transparent),
    radial-gradient(8px 8px at 70% 40%, rgba(59,130,246,0.6), transparent),
    /* BRANCAS */
    radial-gradient(6px 6px at 3% 30%, rgba(255,255,255,0.9), transparent),
    radial-gradient(5px 5px at 13% 50%, rgba(255,255,255,0.8), transparent),
    radial-gradient(7px 7px at 23% 70%, rgba(255,255,255,0.7), transparent),
    radial-gradient(6px 6px at 33% 90%, rgba(255,255,255,0.6), transparent),
    radial-gradient(5px 5px at 43% 15%, rgba(255,255,255,0.9), transparent),
    radial-gradient(7px 7px at 53% 35%, rgba(255,255,255,0.8), transparent),
    radial-gradient(6px 6px at 63% 55%, rgba(255,255,255,0.7), transparent),
    radial-gradient(5px 5px at 73% 75%, rgba(255,255,255,0.6), transparent),
    radial-gradient(7px 7px at 83% 95%, rgba(255,255,255,0.9), transparent),
    radial-gradient(6px 6px at 93% 20%, rgba(255,255,255,0.8), transparent),
    radial-gradient(5px 5px at 17% 12%, rgba(255,255,255,0.7), transparent),
    radial-gradient(7px 7px at 37% 32%, rgba(255,255,255,0.6), transparent),
    radial-gradient(6px 6px at 57% 52%, rgba(255,255,255,0.9), transparent),
    radial-gradient(5px 5px at 77% 72%, rgba(255,255,255,0.8), transparent),
    radial-gradient(7px 7px at 97% 85%, rgba(255,255,255,0.7), transparent),
    radial-gradient(6px 6px at 27% 48%, rgba(255,255,255,0.9), transparent),
    radial-gradient(5px 5px at 47% 68%, rgba(255,255,255,0.8), transparent),
    radial-gradient(7px 7px at 67% 18%, rgba(255,255,255,0.7), transparent),
    radial-gradient(6px 6px at 87% 38%, rgba(255,255,255,0.6), transparent),
    radial-gradient(5px 5px at 8% 80%, rgba(255,255,255,0.9), transparent);
  background-size: 100% 100%;
  background-repeat: no-repeat;
  animation: particleFloat 18s ease-in-out infinite alternate;
  transform: translate(var(--mx, 0px), var(--my, 0px));
  transition: transform 0.15s ease-out;
  will-change: transform, background-position;
}

@keyframes particleFloat {
  0%   { background-position: 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%; }
  33%  { background-position: 3% 2%, -2% 5%, 4% -1%, -3% 6%, 2% 3%, -4% 1%, 5% -2%, 2% 4%, -1% 3%, 3% -2%, -3% 5%, 4% 1%, -2% 4%, 5% -1%, 3% 2%, -4% 3%, 2% -3%, 4% 5%, -1% 2%, 3% -4%, 5% 3%, -2% 6%, 4% -2%, -5% 3%, 2% 5%, -3% 1%, 4% -4%, -2% 6%, 3% -1%, -4% 5%, 2% 3%, -1% 4%, 5% -2%, -3% 6%, 4% 1%, -5% 2%, 3% -4%, -2% 5%, 1% -3%, 4% -2%; }
  66%  { background-position: -4% 3%, 5% -2%, -3% 6%, 2% -5%, -6% 2%, 4% -3%, -2% 5%, 3% -1%, -5% 4%, 2% -3%, -4% 6%, 3% -1%, -6% 4%, 5% -2%, -3% 5%, 4% -4%, -5% 2%, 3% -6%, -2% 5%, 4% -3%, -6% 1%, 5% -4%, -3% 6%, 2% -2%, -4% 5%, 3% -1%, -5% 4%, 2% -6%, -1% 3%, 4% -2%; }
  100% { background-position: -2% 5%, 4% -3%, -3% 2%, 5% -4%, -4% 6%, 3% -1%, -2% 4%, 4% -5%, -1% 2%, 3% -4%, -5% 3%, 2% -2%, -3% 5%, 4% -1%, -2% 6%, 3% -3%, -4% 2%, 5% -4%, -1% 3%, 2% -5%, -3% 1%, 4% -3%, -2% 6%, 3% -2%, -5% 4%, 2% -1%, -4% 5%, 3% -3%, -1% 6%, 2% -4%, -3% 2%, 4% -5%, -2% 3%, 5% -1%, -4% 4%, 3% -2%, -5% 6%, 2% -3%, -1% 5%, 3% -4%; }
}

/* ===== SHELL DO LOGIN (COM ANIMAÇÃO DE ENTRADA) ===== */
.login-shell {
  position: relative;
  z-index: 1;
  width: min(1120px, 100%);
  min-height: min(680px, calc(100vh - 68px));
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(390px, 0.92fr);
  background: rgba(15,23,41,0.78);
  border: 1px solid var(--border);
  border-radius: 30px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(124,58,237,0.15), 0 20px 60px rgba(0,0,0,0.5);
  backdrop-filter: blur(3px);
  animation: fadeUp 0.8s ease forwards;
  opacity: 0;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===== LADO ESQUERDO ===== */
.login-visual {
  position: relative;
  min-height: 100%;
  padding: clamp(30px, 5vw, 62px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(145deg, rgba(10,14,26,0.92), rgba(17,24,39,0.94)),
    url("../../../api/img/fundo_login.jpg") center/cover no-repeat;
}
.login-visual::before {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  right: -160px;
  top: -140px;
  background: radial-gradient(circle, rgba(124,58,237,0.25), transparent 70%);
  pointer-events: none;
}
.login-visual::after {
  content: '';
  position: absolute;
  width: 340px;
  height: 340px;
  left: -150px;
  bottom: -150px;
  background: radial-gradient(circle, rgba(59,130,246,0.2), transparent 70%);
  pointer-events: none;
}

.visual-top, .visual-content, .visual-footer { position: relative; z-index: 1; }

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.brand-logo {
  width: 58px;
  height: 58px;
  padding: 7px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  box-shadow: 0 12px 30px rgba(0,0,0,0.2);
}
.brand-logo img { width: 100%; height: 100%; object-fit: contain; border-radius: 11px; }
.brand-copy { display: flex; flex-direction: column; }
.brand-copy strong { font-size: 17px; font-weight: 800; letter-spacing: -0.02em; }
.brand-copy small { margin-top: 4px; color: #94a3b8; font-size: 10px; text-transform: uppercase; letter-spacing: 0.14em; font-weight: 700; }

.visual-content { max-width: 520px; padding: 45px 0; }
.visual-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(124,58,237,0.15);
  border: 1px solid rgba(124,58,237,0.3);
  color: #c4b5fd;
  font-size: 11px;
  font-weight: 700;
}
.visual-kicker span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 5px rgba(52,211,153,0.15);
}
.visual-content h1 {
  margin: 20px 0 14px;
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.045em;
  font-weight: 800;
}
.visual-content p {
  margin: 0;
  color: #94a3b8;
  line-height: 1.75;
  font-size: 14px;
  max-width: 460px;
}
.feature-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 12px;
  margin-top: 30px;
}
.feature {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 13px;
  border-radius: 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  color: #e2e8f0;
  font-size: 11px;
  font-weight: 600;
}
.feature i { font-size: 18px; color: #8b5cf6; }
.visual-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #64748b;
  font-size: 10px;
  font-weight: 600;
}
.visual-footer i { color: #34d399; font-size: 16px; }

/* ===== LADO DIREITO (FORMULÁRIO) ===== */
.login-panel {
  padding: clamp(28px, 5vw, 62px);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15,23,41,0.6);
  border-left: 1px solid var(--border);
}
.login-content { width: 100%; max-width: 390px; }

.mobile-brand {
  display: none;
  align-items: center;
  gap: 11px;
  margin-bottom: 28px;
}
.mobile-brand img {
  width: 45px;
  height: 45px;
  object-fit: contain;
  padding: 5px;
  border-radius: 14px;
  background: #111827;
  border: 1px solid var(--border);
}
.mobile-brand strong { display: block; font-size: 14px; }
.mobile-brand small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }

.login-heading { margin-bottom: 28px; }
.login-heading .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--primary);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.13em;
}
.login-heading h2 {
  margin: 9px 0 8px;
  font-size: 29px;
  letter-spacing: -0.035em;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.login-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

/* ===== CAMPOS DE INPUT ===== */
.field { margin-bottom: 15px; }
.field label {
  display: block;
  margin-bottom: 7px;
  color: #e2e8f0;
  font-size: 11px;
  font-weight: 700;
}
.input-wrap {
  position: relative;
}
.input-wrap > i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 19px;
  color: #8b5cf6;
  pointer-events: none;
  transition: color 0.3s ease, transform 0.3s ease;
}
.input-wrap:focus-within > i {
  color: var(--primary);
  transform: scale(1.05);
}
.input-wrap input {
  width: 100%;
  height: 49px;
  padding: 0 46px 0 43px;
  border: 1px solid rgba(124,58,237,0.4);
  border-radius: 14px;
  background: #0a0e1a;
  color: var(--text);
  outline: 0;
  font-size: 13px;
  font-weight: 500;
  transition: 0.25s ease;
}
.input-wrap input::placeholder { color: #64748b; }
.input-wrap input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(124,58,237,0.2), 0 0 30px rgba(124,58,237,0.08);
}

.password-toggle {
  position: absolute;
  right: 9px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #64748b;
  display: grid;
  place-items: center;
  font-size: 18px;
  cursor: pointer;
  transition: 0.2s ease;
}
.password-toggle:hover { background: #1e293b; color: #a78bfa; }

/* ===== BOTÃO DE LOGIN COM PULSO ===== */
.login-button {
  width: 100%;
  height: 50px;
  margin-top: 7px;
  border: 0;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  background: linear-gradient(135deg, var(--primary), #6d28d9);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 13px 28px rgba(124,58,237,0.3);
  transition: 0.2s ease;
  animation: softPulse 2.5s ease-in-out infinite;
}
.login-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 17px 34px rgba(124,58,237,0.4);
}
.login-button:active { transform: none; }

@keyframes softPulse {
  0%, 100% { box-shadow: 0 13px 28px rgba(124,58,237,0.3); }
  50%      { box-shadow: 0 13px 40px rgba(124,58,237,0.5); }
}

.login-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 20px;
  color: #64748b;
  font-size: 10px;
  font-weight: 600;
}
.login-note i { font-size: 15px; color: #34d399; }

.login-copyright {
  margin-top: 34px;
  text-align: center;
  color: #475569;
  font-size: 10px;
}

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 900px) {
  body { padding: 15px; }
  .login-shell {
    grid-template-columns: 1fr;
    min-height: 0;
    max-width: 520px;
    border-radius: 24px;
  }
  .login-visual { display: none; }
  .login-panel {
    padding: 32px 24px;
    border-left: 0;
    border-top: 1px solid var(--border);
  }
  .mobile-brand { display: flex; }
}

@media (max-width: 420px) {
  body { padding: 0; background: var(--surface); }
  .login-shell {
    min-height: 100vh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .login-panel { padding: 28px 20px; }
  .login-heading h2 { font-size: 26px; }
}

@media (max-width: 400px) {
  .login-panel { padding: 20px 16px; }
  .login-heading h2 { font-size: 22px; }
  .input-wrap input { height: 44px; font-size: 15px; padding: 0 40px 0 36px; }
  .login-button { height: 44px; font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  body::before { animation: none !important; }
  .login-shell { animation: none !important; opacity: 1; }
  .login-button { animation: none !important; }
}