/* ==========================================================================
   TELA DE LOGIN PREMIUM - BEZERRA IRRIGAÇÕES (SCORE TECH BI)
   ========================================================================== */

.login-screen-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 999999;
  background: radial-gradient(circle at 50% 20%, #0d1b2e 0%, #060b14 60%, #03070d 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.4s ease;
}

.login-screen-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Orbs de iluminação neon no fundo */
.login-glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  opacity: 0.35;
  animation: floatOrb 12s ease-in-out infinite alternate;
}

.login-glow-1 {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(0, 229, 255, 0.5) 0%, rgba(37, 99, 235, 0.2) 60%, transparent 80%);
  top: -10%;
  left: 20%;
}

.login-glow-2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.4) 0%, rgba(139, 92, 246, 0.15) 60%, transparent 80%);
  bottom: -15%;
  right: 15%;
  animation-duration: 16s;
}

.login-glow-3 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.3) 0%, transparent 70%);
  top: 50%;
  left: 10%;
  animation-duration: 14s;
}

@keyframes floatOrb {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, 30px) scale(1.08); }
  100% { transform: translate(-30px, 50px) scale(0.95); }
}

/* Container e Card em Glassmorphism */
.login-card-container {
  position: relative;
  width: 100%;
  max-width: 380px;
  padding: 16px;
  z-index: 10;
  perspective: 1000px;
}

.login-card {
  position: relative;
  background: rgba(13, 23, 42, 0.78);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(0, 229, 255, 0.18);
  box-shadow: 
    0 20px 50px -15px rgba(0, 0, 0, 0.85),
    0 0 30px -5px rgba(0, 229, 255, 0.12),
    inset 0 1px 1px 0 rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 24px 26px 20px;
  color: #f8fafc;
  animation: cardEnter 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes cardEnter {
  0% {
    opacity: 0;
    transform: translateY(20px) scale(0.97);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Shake de erro */
.login-card.shake {
  animation: cardShake 0.45s ease-in-out;
}

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

/* Cabeçalho da Marca */
.login-brand {
  text-align: center;
  margin-bottom: 16px;
}

.login-logo-glow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  position: relative;
}

.login-logo-glow::after {
  content: '';
  position: absolute;
  inset: -8px;
  background: radial-gradient(circle, rgba(0, 229, 255, 0.22) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(10px);
  z-index: -1;
}

.login-logo-img {
  max-width: 120px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(0, 229, 255, 0.18));
}

.login-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
  margin: 0 0 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.login-title-badge {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 1.5px 6px;
  background: rgba(0, 229, 255, 0.15);
  color: #00e5ff;
  border: 1px solid rgba(0, 229, 255, 0.3);
  border-radius: 16px;
}

.login-subtitle {
  font-size: 11.5px;
  color: #94a3b8;
  margin: 0;
  line-height: 1.35;
}

/* Formulário e Inputs */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.login-input-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.login-label {
  font-size: 10.5px;
  font-weight: 600;
  color: #94a3b8;
  letter-spacing: 0.04em;
}

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

.input-icon-wrapper .input-icon {
  position: absolute;
  left: 12px;
  width: 16px;
  height: 16px;
  color: #64748b;
  pointer-events: none;
  transition: color 0.2s ease;
}

.login-input {
  width: 100%;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 10px;
  padding: 10px 36px 10px 38px;
  font-size: 13px;
  color: #ffffff;
  font-family: inherit;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

.login-input:focus {
  outline: none;
  background: rgba(15, 23, 42, 0.95);
  border-color: #00e5ff;
  box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.15), 0 0 16px -3px rgba(0, 229, 255, 0.25);
}

.input-icon-wrapper:focus-within .input-icon {
  color: #00e5ff;
}

.login-input::placeholder {
  color: #475569;
  font-size: 12.5px;
}

/* Botão de Toggle Senha */
.btn-toggle-pwd {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.btn-toggle-pwd:hover {
  color: #00e5ff;
}

.btn-toggle-pwd .eye-icon {
  width: 16px;
  height: 16px;
}

/* Linha de Opções (Lembrar-me) */
.login-options-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: -1px;
}

.remember-me-checkbox {
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  user-select: none;
}

.remember-me-checkbox input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

.custom-checkbox {
  width: 15px;
  height: 15px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.remember-me-checkbox input:checked ~ .custom-checkbox {
  background: #00e5ff;
  border-color: #00e5ff;
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.4);
}

.remember-me-checkbox input:checked ~ .custom-checkbox::after {
  content: '';
  width: 4px;
  height: 8px;
  border: solid #041220;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  margin-top: -2px;
}

.checkbox-label {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 500;
}

.remember-me-checkbox:hover .checkbox-label {
  color: #cbd5e1;
}

/* Alerta de Erro */
.login-error-alert {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 11.5px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 7px;
  animation: fadeInAlert 0.25s ease;
}

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

/* Botão de Entrar */
.btn-login-submit {
  width: 100%;
  background: linear-gradient(135deg, #00e5ff 0%, #0099ff 50%, #4f46e5 100%);
  color: #041220;
  border: none;
  border-radius: 10px;
  padding: 10.5px 18px;
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: 0.02em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 6px 20px -3px rgba(0, 229, 255, 0.45);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  margin-top: 2px;
}

.btn-login-submit:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -3px rgba(0, 229, 255, 0.65);
  filter: brightness(1.08);
}

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

.btn-login-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.btn-arrow-icon {
  width: 16px;
  height: 16px;
  stroke: #041220;
  transition: transform 0.2s ease;
}

.btn-login-submit:hover .btn-arrow-icon {
  transform: translateX(4px);
}

.btn-loader {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(4, 18, 32, 0.3);
  border-top-color: #041220;
  border-radius: 50%;
  animation: btnSpin 0.7s linear infinite;
}

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

/* Rodapé do Card */
.login-card-footer {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.security-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 10.5px;
  color: #64748b;
  font-weight: 500;
}

.security-badge svg {
  width: 12px;
  height: 12px;
  stroke: #00e5ff;
}

.login-copyright {
  font-size: 10px;
  color: #475569;
  margin: 0;
}

/* Estilo do botão de Logout no cabeçalho */
.header-user-logout-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #f87171;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  margin-left: 6px;
}

.header-user-logout-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}

.header-user-logout-btn svg {
  width: 17px;
  height: 17px;
}

/* Botão de Logout na Sidebar (Abaixo das Configurações) */
.nav-item.nav-item-logout {
  color: #64748b;
  margin-top: 6px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-item.nav-item-logout svg {
  width: 22px;
  height: 22px;
  transition: transform 0.2s ease, stroke 0.2s ease;
}

.nav-item.nav-item-logout:hover {
  color: #f87171 !important;
  background: rgba(239, 68, 68, 0.12) !important;
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.3);
  transform: scale(1.06);
}

.nav-item.nav-item-logout:hover svg {
  stroke: #ef4444;
  transform: translateX(2px);
}

