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

body {
  font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 50%, #1e293b 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
  overflow: hidden;
}

/* Subtle grid pattern background */
body::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
}

.login-container {
  width: 100%;
  max-width: 480px;
  position: relative;
  z-index: 1;
}

.security-badge {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  color: white;
  text-align: center;
  padding: 8px 16px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  border-radius: 4px 4px 0 0;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
  border: 2px solid #7f1d1d;
  border-bottom: none;
}

.login-card {
  background: #ffffff;
  border-radius: 0 0 12px 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  padding: 40px;
  animation: slideUp 0.4s ease-out;
  border: 2px solid #cbd5e0;
  border-top: 4px solid #1e3a8a;
}

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

/* Logo Section */
.logo-section {
  text-align: center;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 2px solid #e5e7eb;
}

.app-logo {
  max-width: 150px;
  height: auto;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.1));
  display: block;
  margin: 0 auto;
}

/* Header */
.login-header {
  text-align: center;
  margin-bottom: 32px;
}

.login-header h1 {
  font-size: 24px;
  font-weight: 700;
  color: #1e3a8a;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.subtitle {
  font-size: 14px;
  color: #64748b;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.security-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
  padding: 8px 16px;
  background: #f0fdf4;
  border-radius: 20px;
  border: 1px solid #86efac;
}

.security-dot {
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

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

.security-text {
  font-size: 11px;
  font-weight: 700;
  color: #166534;
  letter-spacing: 1px;
}

/* Forms */
.auth-form {
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.form-status {
  background: #f0fdf4;
  border: 2px solid #86efac;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-icon {
  width: 24px;
  height: 24px;
  background: #22c55e;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: bold;
}

.status-text {
  font-size: 14px;
  font-weight: 600;
  color: #166534;
}

.form-group {
  margin-bottom: 24px;
}

label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.input-help {
  font-size: 12px;
  color: #64748b;
  margin-top: 6px;
  font-style: italic;
}

input[type="text"],
input[type="email"] {
  width: 100%;
  padding: 14px 16px;
  font-size: 15px;
  border: 2px solid #cbd5e0;
  border-radius: 6px;
  transition: all 0.2s;
  outline: none;
  background: #f8fafc;
  font-family: 'Courier New', monospace;
}

input[type="text"]:focus,
input[type="email"]:focus {
  border-color: #1e3a8a;
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
  background: white;
}

/* Buttons */
button {
  width: 100%;
  padding: 14px 24px;
  font-size: 14px;
  font-weight: 700;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  outline: none;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary {
  background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
  color: white;
  margin-bottom: 12px;
  box-shadow: 0 4px 12px rgba(30, 58, 138, 0.3);
  border: 2px solid #1e3a8a;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(30, 58, 138, 0.4);
}

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

.btn-primary:disabled {
  background: #cbd5e0;
  cursor: not-allowed;
  border-color: #cbd5e0;
}

.btn-icon {
  font-size: 16px;
}

.btn-secondary {
  background: #f1f5f9;
  color: #475569;
  border: 2px solid #cbd5e0;
}

.btn-secondary:hover {
  background: #e2e8f0;
  border-color: #94a3b8;
}

/* Messages */
.message {
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 24px;
  font-size: 14px;
  font-weight: 600;
  border: 2px solid;
}

.error-message {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fca5a5;
  animation: shake 0.4s;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-10px); }
  75% { transform: translateX(10px); }
}

.success-message {
  background: #f0fdf4;
  color: #166534;
  border-color: #86efac;
}

/* Spinner */
.spinner {
  text-align: center;
  padding: 20px;
}

.spinner-circle {
  border: 4px solid #e5e7eb;
  border-top: 4px solid #1e3a8a;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  animation: spin 1s linear infinite;
  margin: 0 auto 12px;
}

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

.spinner-text {
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Footer */
.login-footer {
  margin-top: 32px;
  padding-top: 24px;
}

.footer-line {
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, #cbd5e0 50%, transparent 100%);
  margin-bottom: 16px;
}

.footer-text {
  font-size: 11px;
  color: #64748b;
  text-align: center;
  line-height: 1.6;
  margin-bottom: 12px;
}

.footer-badge {
  font-size: 10px;
  font-weight: 700;
  color: #94a3b8;
  text-align: center;
  letter-spacing: 2px;
  padding: 6px;
  background: #f8fafc;
  border-radius: 4px;
  border: 1px solid #e2e8f0;
}

/* Responsive */
@media (max-width: 480px) {
  .login-card {
    padding: 32px 24px;
  }

  .app-logo {
    max-width: 260px;
  }

  .login-header h1 {
    font-size: 20px;
  }

  .subtitle {
    font-size: 12px;
  }
}
