
.admin-login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 2rem;
  padding-top: 6rem;
}

.nav-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: var(--glass-bg);
  border-bottom: 1px solid var(--glass-border);
  backdrop-filter: blur(20px);
  z-index: 100;
  padding: 1rem 2rem;
}

.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 1.1rem;
}

.nav-logo-icon {
  width: 32px;
  height: 32px;
  background: var(--accent-gradient);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.nav-logo-icon::after {
  content: '⚡';
  font-size: 0.9rem;
  color: white;
}

.nav-back {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-back:hover {
  color: var(--text-primary);
}

.admin-login-panel {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 3rem;
  backdrop-filter: blur(20px);
  box-shadow: 0 24px 48px var(--shadow-light);
  max-width: 520px;
  width: 100%;
  animation: slideUp 0.8s ease-out;
  position: relative;
  overflow: hidden;
}

/* Admin-specific styling */
.admin-login-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #dc2626, #ea580c, #d97706);
  border-radius: 24px 24px 0 0;
}

.admin-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.admin-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.1), rgba(234, 88, 12, 0.1));
  border: 1px solid rgba(220, 38, 38, 0.2);
  border-radius: 20px;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #dc2626;
  margin-bottom: 1rem;
}

[data-theme="dark"] .admin-badge {
  background: linear-gradient(135deg, rgba(248, 113, 113, 0.15), rgba(251, 146, 60, 0.15));
  border-color: rgba(248, 113, 113, 0.3);
  color: #f87171;
}

.admin-icon {
  font-size: 1rem;
}

.admin-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, #dc2626, #ea580c);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.admin-header p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  line-height: 1.5;
}

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

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

.form-group label {
  font-weight: 500;
  color: var(--text-primary);
  font-size: 0.9rem;
}

.form-group input {
  padding: 0.875rem 1rem;
  border: 2px solid var(--glass-border);
  border-radius: 12px;
  font-family: inherit;
  font-size: 1rem;
  background: var(--glass-bg);
  color: var(--text-primary);
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.password-input-wrapper {
  position: relative;
}

.password-input-wrapper input {
  padding-right: 3rem;
}

.password-toggle {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  color: var(--text-secondary);
  transition: color 0.3s ease;
  padding: 0.25rem;
}

.password-toggle:hover {
  color: var(--text-primary);
}

.hide-icon {
  display: none;
}

.password-toggle.active .show-icon {
  display: none;
}

.password-toggle.active .hide-icon {
  display: inline;
}

.form-group input:focus {
  outline: none;
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
  background: rgba(255, 255, 255, 0.8);
}

[data-theme="dark"] .form-group input:focus {
  background: rgba(15, 23, 42, 0.8);
  border-color: #f87171;
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.1);
}

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

.mfa-hint {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-style: italic;
}

#mfa-code {
  text-align: center;
  font-size: 1.2rem;
  letter-spacing: 0.2em;
  font-family: 'Courier New', monospace;
}

.security-notice {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: rgba(220, 38, 38, 0.05);
  border: 1px solid rgba(220, 38, 38, 0.1);
  border-radius: 12px;
  padding: 1rem;
  margin: 0.5rem 0;
}

[data-theme="dark"] .security-notice {
  background: rgba(248, 113, 113, 0.08);
  border-color: rgba(248, 113, 113, 0.15);
}

.notice-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}

.notice-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.notice-text strong {
  color: #dc2626;
}

[data-theme="dark"] .notice-text strong {
  color: #f87171;
}

.submit-btn {
  margin-top: 1rem;
  width: 100%;
  padding: 1rem 2rem;
  font-size: 1.1rem;
  background: linear-gradient(135deg, #dc2626, #ea580c);
  border: none;
  color: white;
}

.submit-btn:hover {
  background: linear-gradient(135deg, #b91c1c, #c2410c);
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(220, 38, 38, 0.3);
}

.admin-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 1.5rem 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--glass-border);
}

.emergency-access,
.contact-support {
  color: #dc2626;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: opacity 0.3s ease;
}

[data-theme="dark"] .emergency-access,
[data-theme="dark"] .contact-support {
  color: #f87171;
}

.emergency-access:hover,
.contact-support:hover {
  opacity: 0.8;
  text-decoration: underline;
}

.form-footer {
  text-align: center;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--glass-border);
}

.form-footer p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.link {
  color: var(--text-primary);
  text-decoration: underline;
  font-weight: 500;
  transition: opacity 0.3s ease;
}

.link:hover {
  opacity: 0.8;
}

/* Validation states */
.form-group.error input {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-group.success input {
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.error-message {
  color: #ef4444;
  font-size: 0.8rem;
  margin-top: 0.25rem;
}

/* Loading state */
.submit-btn.loading {
  opacity: 0.7;
  cursor: not-allowed;
}

.submit-btn.loading span::after {
  content: '...';
  animation: dots 1.5s steps(5, end) infinite;
}

@keyframes dots {
  0%, 20% {
    color: rgba(0,0,0,0);
    text-shadow:
      .25em 0 0 rgba(0,0,0,0),
      .5em 0 0 rgba(0,0,0,0);
  }
  40% {
    color: white;
    text-shadow:
      .25em 0 0 rgba(0,0,0,0),
      .5em 0 0 rgba(0,0,0,0);
  }
  60% {
    text-shadow:
      .25em 0 0 white,
      .5em 0 0 rgba(0,0,0,0);
  }
  80%, 100% {
    text-shadow:
      .25em 0 0 white,
      .5em 0 0 white;
  }
}

/* MFA Code special styling */
#mfa-code:valid {
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
  .admin-login-panel {
    padding: 2rem 1.5rem;
    margin: 1rem;
  }
  
  .admin-header h1 {
    font-size: 2rem;
  }
  
  .nav-content {
    padding: 0 1rem;
  }
  
  .admin-options {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .admin-login-container {
    padding: 1rem;
    padding-top: 5rem;
  }
  
  .admin-login-panel {
    padding: 2rem 1rem;
    border-radius: 16px;
  }
  
  .nav-bar {
    padding: 0.75rem 1rem;
  }
  
  .nav-logo span {
    display: none;
  }
  
  .admin-options {
    text-align: center;
  }
}
