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

html,
body {
  height: 100%;
  font-family: -apple-system, BlinkMacMacSystemFont, "Segoe UI", "Helvetica Neue", sans-serif;
  background-color: #f5f7fa;
  /* Changed from pure white to light gray-white */
}

body {
  display: flex;
}

.login-container {
  display: flex;
  width: 100%;
  min-height: 100vh;
  background: #f5f7fa;
  /* Changed from white to light gray-white for subtle, modern look */
}

/* Photo Section - Left 50% */
.photo-section {
  width: 50%;
  background: #e8eef5;
  /* removed gradient, using solid color for better image rendering */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.photo-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Updated image rendering for better quality upscaling */
  image-rendering: high-quality;
  -ms-interpolation-mode: nearest-neighbor;
}

/* Form Section - Right 50% */
.form-section {
  width: 50%;
  display: flex;
  flex-direction: column;
  padding: 32px 48px;
  background: #f5f7fa;
  /* Changed from white to light gray-white */
  overflow-y: auto;
  position: relative;
  /* Add max-width and margin auto to center content with proper spacing */
  align-items: center;
  justify-content: flex-start;
}

/* Language Selector */
.language-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #334155;
  cursor: pointer;
  align-self: flex-end;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 32px;
  transition: color 0.2s;
}

.language-selector:hover {
  color: #0f172a;
}

/* Center form content with proper max-width container */
.form-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  max-width: 400px;
}

/* Logo */
.logo-container {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 48px;
}

/* Added styling for logo image to display properly */
.logo-image {
  height: 40px;
  width: auto;
  object-fit: contain;
}

.logo-box {
  width: 32px;
  height: 32px;
  background-color: #0f172a;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
  font-weight: bold;
}

.logo-euro {
  font-family: "Helvetica Neue", sans-serif;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-main {
  font-size: 13px;
  font-weight: bold;
  color: #0f172a;
  letter-spacing: 0.5px;
}

.logo-sub {
  font-size: 11px;
  color: #0f172a;
  letter-spacing: 0.5px;
}

/* Welcome Section */
.welcome-section {
  margin-bottom: 32px;
}

h1 {
  font-size: 28px;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 16px;
  line-height: 1.3;
}

.description {
  font-size: 14px;
  color: #475569;
  line-height: 1.6;
  margin-bottom: 0;
}

/* Warning Box */
.warning-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 16px;
  margin-bottom: 32px;
  display: flex;
  gap: 12px;
  border-radius: 8px;
}

.warning-icon {
  font-size: 20px;
  color: white;
  background: #3b82f6;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 14px;
  flex-shrink: 0;
}

.warning-content strong {
  display: block;
  font-size: 13px;
  color: #0f172a;
  margin-bottom: 4px;
}

.warning-content p {
  font-size: 13px;
  color: #475569;
  line-height: 1.5;
  margin: 0;
}

/* Error/Success Messages */
/* Enhanced error message styling for better visibility on error pages */
.error-message {
  background-color: #fee2e2;
  color: #991b1b;
  padding: 16px 20px;
  border-radius: 8px;
  margin-bottom: 32px;
  font-size: 15px;
  font-weight: 500;
  border-left: 5px solid #dc2626;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.15);
  animation: slideInError 0.4s ease-out;
}

.success-message {
  background-color: #dcfce7;
  color: #166534;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  font-size: 13px;
  border-left: 4px solid #22c55e;
}

/* Login Form */
/* Center the login form and button */
.login-form {
  margin-bottom: 32px;
  width: 100%;
  display: flex;
  flex-direction: column;
}

/* Form Group */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #334155;
  margin-bottom: 8px;
}

.form-group input {
  width: 100%;
  padding: 12px 16px;
  font-size: 14px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-family: inherit;
  transition: all 0.2s;
  background: white;
}

.form-group input:focus {
  outline: none;
  border-color: #0f172a;
  box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.1);
}

/* Password Input Wrapper */
.password-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-input-wrapper input {
  width: 100%;
  padding-right: 40px;
}

.toggle-password {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  cursor: pointer;
  color: #94a3b8;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.toggle-password:hover {
  color: #0f172a;
}

/* Login Button */
/* Center button with auto margins instead of float left */
.login-button {
  width: 160px;
  padding: 12px 24px;
  background-color: #0f172a;
  color: white;
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s;
  margin-top: 24px;
  margin-left: 0;
}

.login-button:hover {
  background-color: #1e293b;
}

.login-button:active {
  transform: scale(0.98);
}

/* Bottom Links */
/* Ensure bottom links are centered with form */
.bottom-links {
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  padding: 16px 0;
  margin-bottom: 32px;
  width: 100%;
}

.link-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  margin: 0 -12px;
  color: #0f172a;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
  border-radius: 6px;
}

.link-item:hover {
  background-color: #f1f5f9;
}

/* Updated link icons to SVG with proper styling */
.link-icon {
  width: 20px;
  height: 20px;
  min-width: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0f172a;
  stroke: #0f172a;
  flex-shrink: 0;
}

.link-item:hover .link-icon {
  color: #1e293b;
  stroke: #1e293b;
}

.link-item span:first-of-type {
  flex: 1;
}

.arrow {
  color: #94a3b8;
  font-size: 18px;
}

/* Footer Links */
.footer-links {
  display: flex;
  gap: 24px;
  font-size: 12px;
  flex-wrap: wrap;
}

.footer-links a {
  color: #64748b;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: #0f172a;
}

/* Add spinner animation for mobile app confirmation page */
.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid #e2e8f0;
  border-top: 3px solid #0f172a;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

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

/* Added modal popup styling */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

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

.modal {
  background: white;
  border-radius: 8px;
  max-width: 500px;
  width: 90%;
  padding: 40px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  animation: slideIn 0.3s ease-out;
}

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

/* Added animation for error message appearance */
@keyframes slideInError {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-header {
  margin-bottom: 25px;
  text-align: center;
}

.modal-header h1 {
  font-size: 24px;
  color: #0f172a;
  margin-bottom: 8px;
  font-weight: 600;
}

.modal-header p {
  color: #666;
  font-size: 14px;
  line-height: 1.5;
}

.modal-content {
  margin-bottom: 30px;
  color: #333;
  font-size: 14px;
  line-height: 1.6;
}

.modal-content p {
  margin-bottom: 15px;
}

.modal-content strong {
  color: #0f172a;
}

.modal-content ul {
  list-style: none;
  margin: 15px 0;
  padding: 0;
}

.modal-content li {
  padding: 8px 0;
  padding-left: 25px;
  position: relative;
}

.modal-content li:before {
  content: "→";
  position: absolute;
  left: 0;
  color: #0f172a;
  font-weight: bold;
}

.modal-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.modal-btn {
  padding: 12px 30px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-btn-primary {
  background: #0f172a;
  color: white;
  flex: 1;
}

.modal-btn-primary:hover {
  background: #1e293b;
  transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .photo-section {
    width: 35%;
  }

  .form-section {
    width: 65%;
    padding: 24px 32px;
  }

  h1 {
    font-size: 24px;
  }
}

@media (max-width: 768px) {
  .login-container {
    flex-direction: column;
  }

  .photo-section {
    width: 100%;
    height: 300px;
    order: -1;
  }

  .form-section {
    width: 100%;
    padding: 24px;
  }

  .language-selector {
    position: fixed;
    top: 16px;
    right: 16px;
  }

  h1 {
    font-size: 22px;
  }

  .logo-container {
    margin-bottom: 24px;
  }

  .welcome-section {
    margin-bottom: 24px;
  }

  .login-form,
  .bottom-links {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .form-section {
    padding: 16px;
  }

  h1 {
    font-size: 18px;
  }

  .description {
    font-size: 13px;
  }

  .logo-box {
    width: 28px;
    height: 28px;
    font-size: 18px;
  }

  .logo-main {
    font-size: 12px;
  }

  .logo-sub {
    font-size: 10px;
  }

  .modal {
    padding: 30px 20px;
    max-width: 90%;
  }

  .modal-btn-primary {
    padding: 12px 20px;
  }
}

/* Added verification modal styles */
.verification-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}

.verification-modal.active {
  display: flex;
}

.verification-modal-content {
  background: white;
  border-radius: 8px;
  width: 90%;
  max-width: 450px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  animation: slideIn 0.3s ease-out;
}

.verification-modal .modal-header {
  background: #0f172a;
  color: white;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.verification-modal .modal-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
}

.modal-close {
  background: none;
  border: none;
  color: white;
  font-size: 28px;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.modal-body {
  padding: 24px;
  font-size: 14px;
  color: #334155;
  line-height: 1.6;
}

.modal-body p {
  margin: 0 0 12px 0;
}

.modal-body p:first-child {
  color: #0f172a;
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 16px;
}

.modal-body ul {
  list-style-type: disc;
  margin-left: 20px;
  margin-bottom: 12px;
}

.modal-body li {
  margin-bottom: 8px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  gap: 12px;
}

.verification-modal .modal-btn-primary {
  flex: 1;
  padding: 12px;
  background: #0f172a;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  transition: background 0.2s;
}

.verification-modal .modal-btn-primary:hover {
  background: #1e293b;
}

/* Added fullscreen container for verification pages without photo */
.fullscreen-container {
  display: flex;
  width: 100%;
  min-height: 100vh;
  background: #f5f7fa;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 32px 48px;
  position: relative;
}

.form-content-fullscreen {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  width: 100%;
  max-width: 600px;
  margin-top: 24px;
}

@media (max-width: 768px) {
  .fullscreen-container {
    padding: 24px;
  }

  .form-content-fullscreen {
    margin-top: 24px;
  }
}

@media (max-width: 480px) {
  .fullscreen-container {
    padding: 16px;
  }

  .form-content-fullscreen {
    margin-top: 16px;
  }
}

/* Added split layout container styling for verification pages */
.split-layout-container {
  display: flex;
  width: 100%;
  min-height: 100vh;
  background: #f5f7fa;
}

.split-layout-container .photo-section {
  width: 50%;
  background: #e8eef5;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.split-layout-container .photo-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: high-quality;
  -ms-interpolation-mode: nearest-neighbor;
}

/* CHANGE: Modified split-layout-container form-content positioning to match Advanzia screenshot - narrower right side */
.split-layout-container .form-content {
  width: 50%;
  display: flex;
  flex-direction: column;
  padding: 32px 48px;
  background: #f5f7fa;
  overflow-y: auto;
  position: relative;
  align-items: flex-start;
  justify-content: flex-start;
}

/* CHANGE: Ensure language selector on split-layout has proper spacing from form content */
.split-layout-container .form-content {
  position: relative;
  padding-top: 60px; /* Space for language selector above */
}

.split-layout-container .form-content .language-selector {
  position: absolute;
  top: 32px;
  right: 48px;
  margin-bottom: 0;
}

.split-layout-container .form-content-split {
  width: 100%;
  max-width: 350px;
  display: flex;
  flex-direction: column;
}

/* Ensure form-content-split direct children are properly constrained */
.split-layout-container .form-content-split > .language-selector {
  max-width: 100%;
  align-self: flex-end;
  width: auto;
}

.split-layout-container .form-content-split > .logo-container,
.split-layout-container .form-content-split > .welcome-section,
.split-layout-container .form-content-split > .warning-box,
.split-layout-container .form-content-split > .login-form,
.split-layout-container .form-content-split > .footer-links {
  max-width: 400px;
}

/* Responsive split layout for tablets and mobile */
@media (max-width: 1024px) {
  .split-layout-container .photo-section {
    width: 35%;
  }

  .split-layout-container .form-content,
  .split-layout-container .form-content-split {
    width: 65%;
    padding: 24px 32px;
  }
}

@media (max-width: 768px) {
  .split-layout-container {
    flex-direction: column;
  }

  .split-layout-container .photo-section {
    width: 100%;
    height: 300px;
    order: -1;
  }

  .split-layout-container .form-content,
  .split-layout-container .form-content-split {
    width: 100%;
    padding: 24px;
  }

  .split-layout-container .language-selector {
    position: fixed;
    top: 16px;
    right: 16px;
  }

  .split-layout-container .form-content > *,
  .split-layout-container .form-content-split > * {
    max-width: 100%;
  }
}
