:root {
  --med-blue: #2E86AB;
  --med-blue-dark: #1f5f7a;
  --med-blue-light: rgba(46, 134, 171, 0.15);
  --med-green: #10b981;
  --med-green-dark: #059669;
  --med-bg-form: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  --med-bg-success: linear-gradient(135deg, #10b981 0%, #059669 100%);
  --med-shadow: 0 10px 30px rgba(46, 134, 171, 0.15);
  --med-success-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  --med-radius: 12px;
  --med-radius-lg: 20px;
}

body.site-access-page {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 4vw, 24px);
  margin: 0;
  box-sizing: border-box;
}

body.site-access-form {
  background: var(--med-bg-form);
}

body.site-access-success {
  background: var(--med-bg-success);
}

.container-site-access {
  width: 100%;
}

.site-access-container {
  background: white;
  border-radius: var(--med-radius);
  box-shadow: var(--med-shadow);
  padding: clamp(24px, 4vw, 40px) clamp(20px, 4vw, 36px);
  max-width: 420px;
  width: 100%;
  margin: 0 auto;
  position: relative;
  z-index: 1000;
}

.site-access-container .logo {
  max-width: clamp(144px, 36vw, 200px);
  height: auto;
  margin-bottom: clamp(1rem, 3vw, 2rem);
}

.brand-title {
  color: var(--med-blue);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.subtitle {
  color: #000000;
  margin-bottom: clamp(1rem, 3vw, 2rem);
  font-size: 0.95rem;
}

.access-info {
  background: #f1f8ff;
  border-left: 4px solid var(--med-blue);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  color: #1f5f7a;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.access-info-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--med-blue);
}

.form-control-site {
  border: 2px solid #e9ecef;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  transition: all 0.3s ease;
  width: 100%;
  box-sizing: border-box;
}

.form-control-site:focus {
  border-color: var(--med-blue);
  box-shadow: 0 0 0 0.2rem rgba(46, 134, 171, 0.25);
  outline: none;
}

.btn-access {
  background: var(--med-blue);
  border: none;
  border-radius: 8px;
  padding: 0.75rem 2rem;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  width: 100%;
  color: white;
  cursor: pointer;
}

.btn-access:hover {
  background: var(--med-blue-dark);
  transform: translateY(-1px);
}

.btn-access:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.btn-access .spinner-border-sm {
  width: 1rem;
  height: 1rem;
  border-width: 0.15em;
  margin-right: 0.5rem;
  vertical-align: text-bottom;
}

.error-message {
  background: #fff2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
  border-left: 4px solid #ef4444;
  border-radius: 6px;
  padding: 0.75rem 1rem;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.error-message-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: #ef4444;
}

.footer-text {
  color: #000000;
  font-size: 0.8rem;
  text-align: center;
  margin-top: clamp(1.25rem, 3vw, 2rem);
  padding-top: clamp(1rem, 2.5vw, 1.5rem);
  border-top: 1px solid #e9ecef;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

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

.btn-password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #000000;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-password-toggle:hover {
  color: var(--med-blue);
  background: rgba(46, 134, 171, 0.1);
}

.btn-password-toggle:focus {
  outline: 2px solid rgba(46, 134, 171, 0.3);
  outline-offset: 2px;
}

.password-input-group .form-control-site {
  padding-right: 48px;
}

.caps-lock-warning {
  color: #92400e;
  font-size: 0.85rem;
  margin-top: 0.25rem;
  display: none;
  align-items: center;
  gap: 0.25rem;
}

.language-switcher {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.lang-btn {
  background: none;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
  color: #495057;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.lang-btn:hover {
  border-color: var(--med-blue);
  color: var(--med-blue);
  background: rgba(46, 134, 171, 0.05);
}

.lang-btn.active {
  background: var(--med-blue);
  color: white;
  border-color: var(--med-blue);
}

.success-container {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: var(--med-radius-lg);
  box-shadow: var(--med-success-shadow);
  text-align: center;
  max-width: 420px;
  width: 100%;
  margin: 0 auto;
  position: relative;
  z-index: 1000;
  padding: clamp(32px, 5vw, 40px) clamp(24px, 4vw, 30px);
  min-height: min(460px, calc(100svh - clamp(32px, 8vw, 48px)));
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
}

.success-logo {
  margin: 0;
}

.success-logo img {
  max-height: 60px;
  width: auto;
}

.success-checkmark {
  width: 64px;
  height: 64px;
  margin: 0 auto;
  background: linear-gradient(135deg, var(--med-green) 0%, var(--med-green-dark) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.success-title {
  color: #000000;
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0;
}

.success-message {
  color: #000000;
  margin: 0;
  line-height: 1.5;
}

.redirect-info {
  background: #f8f9fa;
  border-radius: 10px;
  padding: 15px;
  margin: 0;
  font-size: 0.9rem;
  color: #495057;
}

.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid #dee2e6;
  border-radius: 50%;
  border-top-color: var(--med-blue);
  animation: spin 1s ease-in-out infinite;
  margin-right: 8px;
}

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

.btn-continue {
  background: linear-gradient(45deg, var(--med-blue), var(--med-blue-dark));
  border: none;
  border-radius: 25px;
  padding: 12px 30px;
  color: white;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  display: inline-block;
}

.btn-continue:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(46, 134, 171, 0.3);
  color: white;
  text-decoration: none;
}

.footer-success {
  margin-top: 0;
  padding-top: 20px;
  border-top: 1px solid #e9ecef;
  color: #000000;
  font-size: 0.8rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
}

/* Responsive */
@media (max-width: 575.98px) {
  .site-access-container {
    border-radius: 10px;
    padding: 22px 18px;
  }

  .subtitle {
    font-size: 0.9rem;
  }

  .form-control-site,
  .btn-access {
    padding-top: 0.7rem;
    padding-bottom: 0.7rem;
  }

  .footer-text,
  .footer-success {
    font-size: 0.75rem;
    gap: 0.5rem;
  }

  .footer-text img,
  .footer-success img {
    width: 48px;
    height: 48px;
  }

  .success-container {
    gap: 18px;
    min-height: auto;
  }

  .success-checkmark {
    width: 56px;
    height: 56px;
  }

/* Responsive */
@media (max-width: 575.98px) {
  .site-access-container,
  .success-container {
    max-width: 440px;
  }
}

/* Hide Symfony debug toolbar */
.sf-toolbar {
  display: none !important;
}
