/* Login page styles (served as a file so the login CSP needs no hashes). */
:root {
  --primary-color: #667eea;
  --primary-dark: #5a6fd8;
  --success-color: #28a745;
  --danger-color: #dc3545;
  --warning-color: #ffc107;
  --info-color: #17a2b8;
  --text-primary: #ffffff;
  --text-secondary: #a0a0b0;
  --bg-overlay: rgba(22, 24, 46, 0.9);
  --gradient-primary: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

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

html,
body {
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background: #1a1a2e;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

/* Glassmorphism Overlay */
body::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-overlay);
  backdrop-filter: blur(5px);
}

.login-container {
  position: relative;
  z-index: 10;
  background: #2a2a3e;
  backdrop-filter: blur(20px);
  border: 1px solid #3a3a4e;
  border-radius: 20px;
  padding: 3rem;
  width: 100%;
  max-width: 450px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
}

.login-header {
  text-align: center;
  margin-bottom: 2rem;
}

.login-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.login-title img {
  height: 32px;
  width: auto;
  object-fit: contain;
}

.login-subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
  font-weight: 300;
}

@keyframes textGlow {
  from {
    filter: drop-shadow(0 0 10px rgba(102, 126, 234, 0.5));
  }
  to {
    filter: drop-shadow(0 0 20px rgba(102, 126, 234, 0.8));
  }
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-group input {
  padding: 1rem;
  border: 1px solid #3a3a4e;
  border-radius: 12px;
  background: #16213e;
  color: var(--text-primary);
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-group input::placeholder {
  color: var(--text-secondary);
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary-color);
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
}

.login-button {
  padding: 1rem 2rem;
  background: var(--gradient-primary);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

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

.login-button:active {
  transform: translateY(0);
}

.error-message {
  background: rgba(220, 53, 69, 0.2);
  border: 1px solid rgba(220, 53, 69, 0.4);
  color: #ff6b6b;
  padding: 1rem;
  border-radius: 12px;
  text-align: center;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  backdrop-filter: blur(10px);
}

.error-message.success {
  background: rgba(40, 167, 69, 0.2);
  border-color: rgba(40, 167, 69, 0.4);
  color: #51cf66;
}

.loading {
  pointer-events: none;
  opacity: 0.7;
}

.loading .login-button {
  cursor: not-allowed;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top: 2px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.login-footer {
  text-align: center;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid #3a3a4e;
}

.version-info {
  color: var(--text-secondary);
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

/* Responsive */
@media (max-width: 600px) {
  .login-container {
    margin: 1rem;
    padding: 2rem;
  }

  .login-title {
    font-size: 2rem;
  }
}
