/* Modern Login Styles - Automation Theme */

.modern-login-wrapper {
  position: relative;
  min-height: 100vh;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  overflow: hidden;
  transition: background 0.5s ease;
}

/* Color Theme Classes */
.modern-login-wrapper.theme-purple {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.modern-login-wrapper.theme-blue {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.modern-login-wrapper.theme-green {
  background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.modern-login-wrapper.theme-orange {
  background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.modern-login-wrapper.theme-cyan {
  background: linear-gradient(135deg, #30cfd0 0%, #330867 100%);
}

.modern-login-wrapper.theme-pink {
  background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
}

.modern-login-wrapper.theme-dark-blue {
  background: linear-gradient(135deg, #0c3483 0%, #a2b6df 100%);
}

.modern-login-wrapper.theme-tech {
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
}

.modern-login-wrapper::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 50%, rgba(140, 87, 255, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(118, 75, 162, 0.3) 0%, transparent 50%);
  animation: pulse 8s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.8; }
}

/* Animated grid pattern */
.modern-login-wrapper::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: gridMove 20s linear infinite;
  pointer-events: none;
}

@keyframes gridMove {
  0% { transform: translate(0, 0); }
  100% { transform: translate(50px, 50px); }
}

/* Floating particles */
.floating-particles {
  position: absolute;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  animation: float 15s infinite ease-in-out;
}

.particle:nth-child(1) { left: 10%; animation-delay: 0s; }
.particle:nth-child(2) { left: 20%; animation-delay: 2s; }
.particle:nth-child(3) { left: 30%; animation-delay: 4s; }
.particle:nth-child(4) { left: 40%; animation-delay: 6s; }
.particle:nth-child(5) { left: 50%; animation-delay: 8s; }
.particle:nth-child(6) { left: 60%; animation-delay: 10s; }
.particle:nth-child(7) { left: 70%; animation-delay: 12s; }
.particle:nth-child(8) { left: 80%; animation-delay: 14s; }
.particle:nth-child(9) { left: 90%; animation-delay: 16s; }

@keyframes float {
  0%, 100% {
    transform: translateY(100vh) translateX(0) scale(0);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-100px) translateX(100px) scale(1);
    opacity: 0;
  }
}

/* Login card */
.modern-login-card {
  position: relative;
  z-index: 10;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 24px;
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.1) inset;
  border: 1px solid rgba(255, 255, 255, 0.2);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.modern-login-card:hover {
  transform: translateY(-5px);
  box-shadow: 
    0 25px 70px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.2) inset;
}

.modern-login-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #667eea, #764ba2, #667eea);
  background-size: 200% 100%;
  animation: shimmer 3s linear infinite;
  transition: background 0.5s ease;
}

/* Theme-specific card top border */
.modern-login-wrapper.theme-blue .modern-login-card::before {
  background: linear-gradient(90deg, #4facfe, #00f2fe, #4facfe);
}

.modern-login-wrapper.theme-green .modern-login-card::before {
  background: linear-gradient(90deg, #43e97b, #38f9d7, #43e97b);
}

.modern-login-wrapper.theme-orange .modern-login-card::before {
  background: linear-gradient(90deg, #fa709a, #fee140, #fa709a);
}

.modern-login-wrapper.theme-cyan .modern-login-card::before {
  background: linear-gradient(90deg, #30cfd0, #330867, #30cfd0);
}

.modern-login-wrapper.theme-pink .modern-login-card::before {
  background: linear-gradient(90deg, #a8edea, #fed6e3, #a8edea);
}

.modern-login-wrapper.theme-dark-blue .modern-login-card::before {
  background: linear-gradient(90deg, #0c3483, #a2b6df, #0c3483);
}

.modern-login-wrapper.theme-tech .modern-login-card::before {
  background: linear-gradient(90deg, #1e3c72, #2a5298, #1e3c72);
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* Logo animation - removida para logo estático */
.modern-logo {
  /* animation: logoFloat 3s ease-in-out infinite; */
}

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

/* Form inputs */
.modern-login-card .form-control {
  border: 2px solid rgba(102, 126, 234, 0.2);
  border-radius: 12px;
  padding: 14px 18px;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.8);
}

.modern-login-card .form-control:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
  background: #fff;
  transform: translateY(-2px);
}

.modern-login-card .form-floating > label {
  color: #667eea;
  font-weight: 500;
}

/* Button */
.modern-login-card .btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 12px;
  padding: 14px;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

/* Theme-specific button colors */
.modern-login-wrapper.theme-blue .btn-primary {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.modern-login-wrapper.theme-green .btn-primary {
  background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.modern-login-wrapper.theme-orange .btn-primary {
  background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.modern-login-wrapper.theme-cyan .btn-primary {
  background: linear-gradient(135deg, #30cfd0 0%, #330867 100%);
}

.modern-login-wrapper.theme-pink .btn-primary {
  background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
}

.modern-login-wrapper.theme-dark-blue .btn-primary {
  background: linear-gradient(135deg, #0c3483 0%, #a2b6df 100%);
}

.modern-login-wrapper.theme-tech .btn-primary {
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
}

.modern-login-card .btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s;
}

.modern-login-card .btn-primary:hover::before {
  left: 100%;
}

.modern-login-card .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

/* Theme-specific button hover shadows */
.modern-login-wrapper.theme-blue .btn-primary:hover {
  box-shadow: 0 10px 25px rgba(79, 172, 254, 0.4);
}

.modern-login-wrapper.theme-green .btn-primary:hover {
  box-shadow: 0 10px 25px rgba(67, 233, 123, 0.4);
}

.modern-login-wrapper.theme-orange .btn-primary:hover {
  box-shadow: 0 10px 25px rgba(250, 112, 154, 0.4);
}

.modern-login-wrapper.theme-cyan .btn-primary:hover {
  box-shadow: 0 10px 25px rgba(48, 207, 208, 0.4);
}

.modern-login-wrapper.theme-pink .btn-primary:hover {
  box-shadow: 0 10px 25px rgba(168, 237, 234, 0.4);
}

.modern-login-wrapper.theme-dark-blue .btn-primary:hover {
  box-shadow: 0 10px 25px rgba(12, 52, 131, 0.4);
}

.modern-login-wrapper.theme-tech .btn-primary:hover {
  box-shadow: 0 10px 25px rgba(30, 60, 114, 0.4);
}

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

/* Connection lines effect */
.connection-lines {
  position: absolute;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.line {
  position: absolute;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  height: 1px;
  animation: lineMove 10s linear infinite;
}

.line:nth-child(1) {
  top: 20%;
  width: 200px;
  animation-delay: 0s;
}

.line:nth-child(2) {
  top: 40%;
  width: 150px;
  animation-delay: 2s;
}

.line:nth-child(3) {
  top: 60%;
  width: 180px;
  animation-delay: 4s;
}

.line:nth-child(4) {
  top: 80%;
  width: 220px;
  animation-delay: 6s;
}

@keyframes lineMove {
  0% {
    left: -200px;
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    left: 100%;
    opacity: 0;
  }
}

/* Dark theme support */
[data-bs-theme="dark"] .modern-login-wrapper {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

[data-bs-theme="dark"] .modern-login-wrapper::before {
  background: 
    radial-gradient(circle at 20% 50%, rgba(102, 126, 234, 0.2) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(118, 75, 162, 0.2) 0%, transparent 50%);
}

[data-bs-theme="dark"] .modern-login-card {
  background: rgba(26, 26, 46, 0.95);
  border: 1px solid rgba(102, 126, 234, 0.3);
}

[data-bs-theme="dark"] .modern-login-card .form-control {
  background: rgba(22, 33, 62, 0.8);
  border-color: rgba(102, 126, 234, 0.3);
  color: #fff;
}

[data-bs-theme="dark"] .modern-login-card .form-control:focus {
  background: rgba(22, 33, 62, 1);
  border-color: #667eea;
}

[data-bs-theme="dark"] .modern-login-card .form-floating > label {
  color: #8c9eff;
}

/* Color Theme Switcher */
.color-theme-switcher {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 15px;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

[data-bs-theme="dark"] .color-theme-switcher {
  background: rgba(33, 37, 41, 0.95);
  border: 1px solid rgba(102, 126, 234, 0.3);
}

.color-theme-switcher h6 {
  margin: 0 0 10px 0;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #667eea;
}

[data-bs-theme="dark"] .color-theme-switcher h6 {
  color: #8c9eff;
}

.theme-buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.theme-btn {
  width: 40px;
  height: 40px;
  border: 2px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.theme-btn:hover {
  transform: scale(1.1);
  border-color: rgba(0, 0, 0, 0.2);
}

.theme-btn.active {
  border-color: #fff;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
}

.theme-btn.active::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-weight: bold;
  font-size: 16px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.theme-btn.theme-purple { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.theme-btn.theme-blue { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); }
.theme-btn.theme-green { background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%); }
.theme-btn.theme-orange { background: linear-gradient(135deg, #fa709a 0%, #fee140 100%); }
.theme-btn.theme-cyan { background: linear-gradient(135deg, #30cfd0 0%, #330867 100%); }
.theme-btn.theme-pink { background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%); }
.theme-btn.theme-dark-blue { background: linear-gradient(135deg, #0c3483 0%, #a2b6df 100%); }
.theme-btn.theme-tech { background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%); }

/* Tenant buttons styling */
.modern-login-card .btn-tenant {
  margin-bottom: 12px;
  border-radius: 12px;
  padding: 16px;
  font-weight: 600;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  border: none;
}

.modern-login-card .btn-tenant:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(48, 207, 208, 0.3);
}

.modern-login-card .btn-tenant:active {
  transform: translateY(0);
}

/* Theme-specific tenant button hover shadows */
.modern-login-wrapper.theme-blue .btn-tenant:hover {
  box-shadow: 0 8px 20px rgba(79, 172, 254, 0.3);
}

.modern-login-wrapper.theme-green .btn-tenant:hover {
  box-shadow: 0 8px 20px rgba(67, 233, 123, 0.3);
}

.modern-login-wrapper.theme-orange .btn-tenant:hover {
  box-shadow: 0 8px 20px rgba(250, 112, 154, 0.3);
}

.modern-login-wrapper.theme-pink .btn-tenant:hover {
  box-shadow: 0 8px 20px rgba(168, 237, 234, 0.3);
}

.modern-login-wrapper.theme-dark-blue .btn-tenant:hover {
  box-shadow: 0 8px 20px rgba(12, 52, 131, 0.3);
}

.modern-login-wrapper.theme-tech .btn-tenant:hover {
  box-shadow: 0 8px 20px rgba(30, 60, 114, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
  .modern-login-card {
    margin: 20px;
    border-radius: 20px;
  }
  
  .connection-lines {
    display: none;
  }
  
  .color-theme-switcher {
    bottom: 10px;
    right: 10px;
    padding: 10px;
  }
  
  .theme-buttons {
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
  }
  
  .theme-btn {
    width: 35px;
    height: 35px;
  }
}

