:root {
  /* Cores da logo Solucione */
  --azul: #0A0A8C;
  --amarelo: #FFB300;
  --amarelo-esc: #E09E00;
  --preto: #0F1115;
  --branco: #FFFFFF;
  --borda: rgba(0, 0, 0, 0.08);
  
  --bg-color: #F4F6FA;
  --box-bg: rgba(255, 255, 255, 0.9);
  --form-bg: #ffffff;
  --logo-bg: #ffffff;
  --text-color: var(--preto);
  --label-color: #474b57;
  --input-bg: var(--branco);
  --input-border: #ccd1d9;

  /* VARIAVEIS PARA O DASHBOARD E SIDEBAR */
  --color-bg: #F4F6FA;
  --color-text: #0F1115;
  --color-card: #ffffff;
  --color-border: rgba(0,0,0,0.08);
  --color-accent: #0A0A8C;
  --color-gold: #FFB300;
  --color-muted: #64748b;
}

body.theme-dark {
  /* Cores de Login no Dark Mode */
  --bg-color: #020617; /* Azul bem escuro */
  --box-bg: rgba(15, 23, 42, 0.85);
  --form-bg: #0f172a;
  --logo-bg: #0b0f19;
  --text-color: #f1f5f9;
  --label-color: #94a3b8;
  --input-bg: #020617;
  --input-border: #1e293b;
  --borda: rgba(255, 255, 255, 0.05);

  /* VARIAVEIS PARA O DASHBOARD (Azul Escurinho) */
  --color-bg: #020617;
  --color-text: #f1f5f9;
  --color-card: #0f172a;
  --color-border: rgba(255,255,255,0.05);
  --color-accent: #FFB300;
  --color-gold: #FFB300;
  --color-muted: #94a3b8;
}

body.theme-alt {
  --bg-color: #000000;
  --box-bg: #000000;
  --form-bg: #000000;
  --logo-bg: #000000;
  --text-color: #FFFF00;
  --label-color: #FFFF00;
  --input-bg: #000000;
  --input-border: #FFFF00;
  --azul: #000000;
  --amarelo: #FFFF00;
  --amarelo-esc: #FFCC00;
  --borda: #FFFF00;
}

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

body {
  font-family: 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: var(--text-color);
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  transition: color 0.4s ease;
  overflow: hidden;
  position: relative;
  
  /* Fundo Azul Animado Respirando */
  background: linear-gradient(-45deg, #0A0A8C, #1e3a8a, #0f172a, #0A0A8C);
  background-size: 400% 400%;
  animation: breathingBG 12s ease-in-out infinite alternate;
}

body.theme-dark {
  background: linear-gradient(-45deg, #07075f, #0f172a, #020617, #07075f);
  background-size: 400% 400%;
  animation: breathingBG 12s ease-in-out infinite alternate;
}

body.theme-alt {
  background: #000000;
  animation: none;
}

@keyframes breathingBG {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

/* CONTAINER DE LOGIN ESTILO ESCOBAR */
.login-container {
  display: flex;
  width: 780px;
  height: 440px;
  max-width: 90%;
  background: var(--box-bg);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-radius: 16px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5); /* Sombreado mais intenso */
  overflow: hidden;
  border: 1px solid var(--borda);
  position: relative;
  z-index: 10;
  transform: translateY(20px);
  opacity: 0;
  animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideUp {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.login-form-section {
  flex: 1;
  padding: 50px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--form-bg);
  transition: background 0.4s ease;
}

.login-form-section h2 {
  color: var(--azul);
  margin-bottom: 5px;
  margin-top: 0;
  font-size: 28px;
  font-weight: 800;
}

body.theme-dark .login-form-section h2 {
    color: var(--amarelo);
}
body.theme-alt .login-form-section h2 {
    color: var(--amarelo);
}

.login-form-section p.subtitle {
  color: var(--label-color);
  margin-bottom: 30px;
  font-size: 14px;
  font-weight: 400;
}

.input-group {
  margin-bottom: 20px;
  position: relative;
}

.input-group label {
  position: absolute;
  top: 15px;
  left: 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--label-color);
  transition: all 0.3s ease;
  pointer-events: none;
  background: var(--form-bg);
  padding: 0 4px;
}

.input-group input {
  width: 100%;
  padding: 14px 16px;
  font-size: 15px;
  color: var(--text-color);
  background-color: transparent;
  border: 1px solid var(--input-border);
  border-radius: 8px;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
}

/* Floating label effect */
.input-group input:focus ~ label,
.input-group input:not(:placeholder-shown) ~ label {
  top: -8px;
  left: 12px;
  font-size: 12px;
  color: var(--amarelo);
}

.input-group input:focus {
  border-color: var(--amarelo);
  box-shadow: 0 0 0 4px rgba(255, 179, 0, 0.15);
}

.btn-primary {
  width: 100%;
  padding: 14px;
  font-size: 16px;
  font-weight: 600;
  color: var(--branco);
  background: linear-gradient(135deg, var(--azul) 0%, #16365b 100%);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.3s;
  margin-top: 10px;
  box-shadow: 0 8px 20px rgba(10, 10, 140, 0.3);
  font-family: 'Inter', sans-serif;
  letter-spacing: 1px;
}

body.theme-alt .btn-primary {
  background: var(--amarelo);
  color: var(--preto);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 25px rgba(10, 10, 140, 0.5);
}

body.theme-alt .btn-primary:hover {
  box-shadow: 0 12px 25px rgba(255, 255, 0, 0.5);
}

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

/* Loaders */
.btn-primary.loading {
  color: transparent;
  position: relative;
  pointer-events: none;
}
.btn-primary.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 3px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 1s infinite linear;
}
body.theme-alt .btn-primary.loading::after {
  border-top-color: #000;
}
@keyframes spin { 100% { transform: rotate(360deg); } }


.theme-selector {
  display: flex;
  justify-content: flex-start;
  gap: 15px;
  margin-top: 25px;
}

.theme-selector button {
  background: none;
  border: none;
  font-size: 13px;
  font-weight: 500;
  color: var(--label-color);
  cursor: pointer;
  transition: color 0.2s;
  position: relative;
}

.theme-selector button:hover {
  color: var(--amarelo);
}

.theme-selector button.active {
  color: var(--amarelo);
  font-weight: 600;
}

.theme-selector button.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--amarelo);
  border-radius: 2px;
}

/* SEÇÃO DO LOGO */
.logo-section {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--logo-bg);
  position: relative;
  overflow: hidden;
  border-left: 1px solid var(--borda);
  transition: background 0.4s ease;
}

.logo-3d-wrapper {
  position: relative;
  width: 260px;
  text-align: center;
  animation: floatingLogoLogin 8s infinite ease-in-out;
}

/* Reflexo passando por cima da logo */
.logo-3d-wrapper::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -150%;
  width: 200%;
  height: 200%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, 0.7) 50%, rgba(255, 255, 255, 0) 70%);
  z-index: 3;
  pointer-events: none;
  animation: shineEffect 5s infinite linear;
}

@keyframes shineEffect {
  0% { left: -150%; }
  15% { left: 150%; }
  100% { left: 150%; }
}

@keyframes floatingLogoLogin {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.logo-img {
  width: 100%;
  display: block;
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.08));
}

body.theme-dark .logo-img {
  filter: drop-shadow(0 4px 10px rgba(255, 255, 255, 0.08));
}

/* ============================================================
 4. RESPONSIVIDADE (MOBILE)
 ============================================================ */
@media (max-width: 768px) {
  body, html {
    overflow: hidden;
  }

  .login-container {
    flex-direction: column-reverse;
    height: auto;
    width: 100%;
    max-width: 400px;
  }

  .logo-section {
    flex: 0 0 auto;
    padding: 30px 0;
    border-left: none;
    border-bottom: 1px solid var(--borda);
    border-radius: 16px 16px 0 0;
  }

  .logo-3d-wrapper {
    width: 200px;
  }

  .login-form-section {
    flex: 1;
    padding: 30px 25px;
    justify-content: flex-start;
    border-radius: 0 0 16px 16px;
  }

  .login-form-section h2 {
    font-size: 24px;
  }

  .login-form-section p.subtitle {
    font-size: 13px;
    margin-bottom: 20px;
  }

  .theme-selector {
      justify-content: center;
  }
}

/* ============================================================
   5. DASHBOARD & SCROLLBAR
   ============================================================ */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 10px;
}
.menu-text {
    font-family: 'Inter', sans-serif;
}
.menu-item-active {
    background: rgba(10, 10, 140, 0.1);
}
body.theme-dark .menu-item-active {
    background: rgba(255, 179, 0, 0.1);
}
