:root {
  --bg-primary: #f8f9fa;
  --primary-medium: #c41e3a;
  --primary-light: #a01629;
  --bg-card: rgba(255, 255, 255, 0.95);
  --text-primary: #1a1a1a;
  --text-muted: #6c757d;
  --border-color: rgba(0, 0, 0, 0.1);
  --border-light: rgba(0, 0, 0, 0.15);
  --accent-color: #c41e3a;
  --accent-bg: rgba(196, 30, 58, 0.1);
  --input-bg: #ffffff;
  --danger-color: #dc2626;
  --success-color: #16a34a;
  --warning-color: #d97706;
  --spacing-sm: 6px;
  --spacing-md: 10px;
  --spacing-lg: 16px;
  --radius-md: 12px;
  --radius-lg: 14px;
}

* { box-sizing: border-box; }

body {
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  margin: 0;
  background: #f8f9fa;
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 900px; margin: 0 auto; padding: 18px; }

.card.no-print {
  background-image: linear-gradient(rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.95)), 
                    url('/images/Background.jpg');
  background-size: cover;
  background-position: center;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  margin-top: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

h1, h2, h3 { margin: 0 0 var(--spacing-md) 0; font-weight: 700; }
h1 { font-size: 1.6rem; letter-spacing: -0.02em; }
h2 { font-size: 1.25rem; color: var(--text-primary); }

.muted { color: var(--text-muted); font-size: 0.9rem; }

.row { display: flex; gap: var(--spacing-md); flex-wrap: wrap; }
.row > * { flex: 1; min-width: 200px; }

input, select, button {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border-light);
  background: var(--input-bg);
  color: var(--text-primary);
  font-size: 1rem;
  transition: all 0.2s ease;
}

input:focus, select:focus {
  outline: none;
  border-color: var(--accent-color);
  background: #ffffff;
}

button {
  cursor: pointer;
  font-weight: 600;
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

button:hover { background: #e9ecef; }
button:disabled { opacity: 0.5; cursor: not-allowed; }

button.primary {
  background: var(--primary-medium);
  border-color: var(--primary-medium);
  color: #ffffff !important;
}
button.primary:hover:not(:disabled) { background: var(--primary-light); color: #ffffff !important; }

button {
  color: var(--text-primary);
}

.info-box {
  background: #e3f2fd;
  border: 1px solid #2196f3;
  padding: 10px;
  border-radius: 8px;
  font-size: 0.85rem;
  color: #0c5460;
}

.success { color: var(--success-color); }
.warning { color: var(--warning-color); }

.hidden { display: none !important; }

@media (max-width: 600px) {
  .wrap { padding: 12px; }
  .row { flex-direction: column; }
}

.header-logo {
  height: 120px;
  width: auto;
  object-fit: contain;
  display: block;
}

.header-logo-container {
  flex-shrink: 0;
}

/* ========== LOADING OVERLAY ========== */
.loading-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 20px;
}

.loading-overlay.active {
  display: flex;
}

.loading-spinner {
  width: 60px;
  height: 60px;
  border: 4px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  border-top-color: #0d9488;
  animation: spin 0.8s linear infinite;
}

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

.loading-text {
  color: #ffffff;
  font-size: 1.2rem;
  font-weight: 600;
  text-align: center;
}

.loading-subtext {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
}

/* ========== BUTTON LOADING STATE ========== */
.btn-loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}

.btn-loading::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  top: 50%;
  left: 50%;
  margin-left: -10px;
  margin-top: -10px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #ffffff;
  animation: spin 0.8s linear infinite;
}

/* ========== SUCCESS OVERLAY ========== */
.success-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 10000;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 24px;
  padding: 20px;
}

.success-overlay.show {
  display: flex;
}

.success-icon {
  width: 80px;
  height: 80px;
  animation: scaleIn 0.5s ease-out;
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.5);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.success-title {
  color: #16a34a;
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 8px;
  animation: fadeInUp 0.4s ease-out 0.3s both;
}

.success-subtitle {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.1rem;
  text-align: center;
  margin-bottom: 32px;
  animation: fadeInUp 0.4s ease-out 0.4s both;
}

.success-steps {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 500px;
  width: 100%;
}

.success-step {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: rgba(255, 255, 255, 0.08);
  padding: 20px;
  border-radius: 12px;
  border-left: 4px solid #c41e3a;
  animation: fadeInUp 0.4s ease-out both;
}

.success-step:nth-child(1) {
  animation-delay: 0.5s;
}

.success-step:nth-child(2) {
  animation-delay: 0.6s;
}

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

.step-number {
  background: linear-gradient(135deg, #c41e3a 0%, #a01629 100%);
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.2rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(196, 30, 58, 0.4);
}

.step-content h3 {
  color: white;
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 6px 0;
}

.step-content p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0;
}

.success-footer {
  text-align: center;
  animation: fadeInUp 0.4s ease-out 0.7s both;
}

.success-btn {
  background: linear-gradient(135deg, #c41e3a 0%, #a01629 100%);
  color: white;
  border: none;
  padding: 16px 48px;
  border-radius: 10px;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px rgba(196, 30, 58, 0.4);
  letter-spacing: 0.01em;
}

.success-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(196, 30, 58, 0.5);
}

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

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

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.5);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@media (max-width: 600px) {
  .success-card {
    padding: 30px 20px;
  }
  
  .success-title {
    font-size: 1.5rem;
  }
  
  .success-step {
    padding: 16px;
  }
  
  .step-number {
    width: 32px;
    height: 32px;
    font-size: 1rem;
  }
}
/* ========================================================
   FOOTER LINKS FIX - IN login-style.css EINFÜGEN
   ======================================================== */

/* Footer Links WEISS auf dunklem Hintergrund */
.login-footer a,
footer a {
  color: #ffffff !important;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.login-footer a:hover,
footer a:hover {
  color: #c41e3a !important;
  text-decoration: underline;
}

/* Falls Footer eine andere Klasse hat */
.footer-links a {
  color: #ffffff !important;
}

.footer-links a:hover {
  color: #c41e3a !important;
}