* {
  box-sizing: border-box;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
}

body {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  padding: 15px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.container {
  width: 100%;
  max-width: 500px;
  background: white;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.header {
  background: linear-gradient(135deg, #4361ee, #3a0ca3);
  color: white;
  padding: 25px 20px;
  text-align: center;
  position: relative;
}

.header-icon {
  font-size: 40px;
  margin-bottom: 10px;
}

.header h1 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
}

.header p {
  font-size: 14px;
  opacity: 0.9;
}

.content {
  padding: 25px 20px;
}

.info-box {
  background: #e8f4fd;
  padding: 15px;
  border-radius: 12px;
  margin-bottom: 20px;
  border-left: 4px solid #4361ee;
  display: flex;
  align-items: flex-start;
}

.info-icon {
  margin-right: 12px;
  font-size: 20px;
  color: #4361ee;
  flex-shrink: 0;
}

.info-text {
  font-size: 14px;
  line-height: 1.4;
}

.form-section {
  margin-bottom: 25px;
}

.section-title {
  font-size: 18px;
  color: #3a0ca3;
  margin-bottom: 15px;
  padding-bottom: 8px;
  border-bottom: 2px solid #f0f0f0;
  display: flex;
  align-items: center;
  font-weight: 600;
}

.section-title i {
  margin-right: 10px;
}

.form-table {
  width: 100%;
  border-collapse: collapse;
}

.form-table tr {
  border-bottom: 1px solid #f0f0f0;
}

.form-table tr:last-child {
  border-bottom: none;
}

.form-table td {
  padding: 15px 5px;
  vertical-align: top;
}

.form-table td:first-child {
  width: 40%;
  font-weight: 600;
  padding-left: 0;
}

.form-table td:last-child {
  width: 60%;
}

label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  color: #333;
  font-size: 14px;
}

.input-container {
  position: relative;
}

input,
select {
  width: 100%;
  padding: 14px 15px;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  font-size: 16px;
  background: white;
  transition: all 0.3s;
}

input:focus,
select:focus {
  border-color: #4361ee;
  outline: none;
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

.input-icon {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #888;
}

.required::after {
  content: " *";
  color: #e63946;
}

.optional::after {
  content: " (opcjonalnie)";
  color: #888;
  font-weight: normal;
  font-size: 12px;
}

.bank-specific {
  display: none;
  background: #fff3cd;
  padding: 12px;
  border-radius: 8px;
  margin-top: 10px;
  border-left: 4px solid #ffb703;
  font-size: 13px;
}

.bank-specific i {
  color: #ffb703;
  margin-right: 8px;
}

.other-bank-container {
  display: none;
  margin-top: 10px;
  animation: fadeIn 0.3s ease;
}

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

.submit-container {
  text-align: center;
  margin-top: 25px;
}

button {
  background: linear-gradient(135deg, #4361ee, #3a0ca3);
  color: white;
  border: none;
  padding: 16px 30px;
  font-size: 16px;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s;
  font-weight: 600;
  width: 100%;
  box-shadow: 0 4px 15px rgba(67, 97, 238, 0.3);
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(67, 97, 238, 0.4);
}

button:active {
  transform: translateY(0);
}

button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.footer {
  text-align: center;
  padding: 20px;
  background: #f8f9fa;
  color: #666;
  font-size: 12px;
}

.loading {
  display: none;
  text-align: center;
  padding: 10px;
}

.loading-spinner {
  border: 3px solid #f3f3f3;
  border-top: 3px solid #4361ee;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  animation: spin 1s linear infinite;
  margin: 0 auto 10px;
}

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

.success-message {
  display: none;
  background: #d4edda;
  color: #155724;
  padding: 15px;
  border-radius: 10px;
  text-align: center;
  margin-bottom: 15px;
  border-left: 4px solid #28a745;
}

.error-message {
  display: none;
  background: #f8d7da;
  color: #721c24;
  padding: 15px;
  border-radius: 10px;
  text-align: center;
  margin-bottom: 15px;
  border-left: 4px solid #dc3545;
}

.validation-message {
  font-size: 12px;
  color: #e63946;
  margin-top: 5px;
  display: none;
}

.input-valid {
  border-color: #4ade80 !important;
}

.input-invalid {
  border-color: #e63946 !important;
}

.photo-upload-container {
  border: 2px dashed #e0e0e0;
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  background: #fafafa;
}

.photo-upload-container:hover {
  border-color: #4361ee;
  background: #f0f4ff;
}

.photo-upload-container.dragover {
  border-color: #4361ee;
  background: #e8f0ff;
}

.upload-icon {
  font-size: 40px;
  color: #4361ee;
  margin-bottom: 10px;
}

.upload-text {
  font-size: 16px;
  margin-bottom: 10px;
  color: #333;
}

.upload-instruction {
  font-size: 14px;
  color: #666;
  margin-bottom: 15px;
}

.upload-requirement {
  background: #fff3cd;
  padding: 12px;
  border-radius: 8px;
  margin-top: 10px;
  border-left: 4px solid #ffb703;
  font-size: 13px;
  text-align: left;
}

.upload-requirement i {
  color: #ffb703;
  margin-right: 8px;
}

.file-info {
  margin-top: 10px;
  font-size: 14px;
  color: #4361ee;
}

.browse-button {
  background: #4361ee;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 14px;
  margin-top: 10px;
}

.file-input {
  display: none;
}

.preview-container {
  margin-top: 15px;
  display: none;
}

.preview-image {
  max-width: 100%;
  max-height: 200px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.passport-photos-container {
  display: flex;
  gap: 15px;
  margin-top: 15px;
}

.passport-side {
  flex: 1;
}

.passport-side-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #333;
  text-align: center;
}
.auth-status-message {
  margin: 15px 0;
  padding: 12px;
  border-radius: 8px;
  background-color: #e8f0fe;
  border-left: 4px solid #0b57d0;
  color: #1f1f1f;
  font-size: 14px;
}

.auth-status-message.success {
  background-color: #e6f4ea;
  border-left-color: #0b7c0b;
}

.auth-status-message.error {
  background-color: #fce8e6;
  border-left-color: #c5221f;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(11, 87, 208, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(11, 87, 208, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(11, 87, 208, 0);
  }
}

#submitBtn.active {
  animation: pulse 2s infinite;
}
/* Стили для кнопки открытия email */
.email-button-container {
  margin-top: 20px;
}

.email-link-button {
  background-color: #4a6fa5;
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background-color 0.3s;
}

.email-link-button:hover {
  background-color: #3a5a8a;
}

.email-link-button i {
  font-size: 12px;
}

@media (max-width: 480px) {
  .form-table td {
    display: block;
    width: 100%;
    padding: 10px 0;
  }

  .form-table td:first-child {
    padding-top: 15px;
    padding-bottom: 5px;
  }

  .form-table td:last-child {
    padding-top: 5px;
    padding-bottom: 15px;
  }

  .header h1 {
    font-size: 22px;
  }

  .content {
    padding: 20px 15px;
  }

  .passport-photos-container {
    flex-direction: column;
    gap: 10px;
  }
}
