/* Основные переменные (цвета банка) */
:root {
  --bank-blue: #4a90e2;   /* (74, 144, 226) */
  --bank-white: #ffffff;  /* (255, 255, 255) */
  --gray-light: #f8f9fc;
  --gray-border: #e2e8f0;
  --text-dark: #2c3e50;
  --text-muted: #5a6e8a;
  --success-green: #2e7d32;
  --success-bg: #e8f5e9;
}

/* Глобальные стили */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', sans-serif;
  background-color: var(--gray-light);
  padding: 1rem;
}

/* Обёртка для страницы логина */
.login-wrapper {
  display: flex;
  align-items: stretch;
  width: 100%;
  max-width: 1344px;
  max-height: 1050px;
  background: var(--bank-white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 35px -10px rgba(0, 0, 0, 0.1);
}

/* Левая колонка с картинкой */
.login-image {
  flex: 1;
  background-color: #eef2f9; /* fallback, пока нет картинки */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.login-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Правая колонка — форма (переопределяем стили .form_auth_block) */
.login-wrapper .form_auth_block {
  width: 420px;
  max-width: 100%;
  box-shadow: none;
  border-radius: 0;
  padding: 2.5rem 2rem;
  background: var(--bank-white);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Место для картинок банка (логотип, баннер и т.п.) */
.form_auth_block img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto 1.5rem auto;
}

/* Заголовок */
.form_auth_block_head_text {
  text-align: center;
  margin: 0 0 1.75rem 0;
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--text-dark);
  letter-spacing: -0.3px;
}

/* Форма */
.form_auth_style {
  display: grid;
  gap: 1.25rem;
}

/* Метки (labels) */
.form_auth_style label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

/* Контейнер поля ввода */
.form_input_container {
  width: 100%;
  position: relative;
}

/* Поля ввода */
.form_input_container input {
  width: 100%;
  padding: 0.75rem 1rem;
  padding-left: 32px;
  font-size: 1rem;
  font-family: inherit;
  border: 1px solid var(--gray-border);
  border-radius: 12px;
  background-color: var(--bank-white);
  transition: all 0.2s ease;
  outline: none;
  box-sizing: border-box;
}

.icon {
  fill: var(--bank-blue);
  position: absolute;
  width: 24px;
  height: 24px;
  left: 5px;
  top: 25%;
}

.form_input_container input:focus {
  border-color: var(--bank-blue);
  box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.2);
}

.form_input_container input::placeholder {
  color: #a0b3c9;
  font-weight: 400;
}

/* Кнопка входа */
.form_auth_button {
  width: 100%;
  padding: 0.85rem 1rem;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--bank-white);
  background-color: var(--bank-blue);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease;
  margin-top: 0.5rem;
}

.form_auth_button:hover {
  background-color: #3a7bc9;
}

.form_auth_button:active {
  transform: scale(0.98);
}

.form_auth_button:focus-visible {
  outline: 2px solid var(--bank-blue);
  outline-offset: 2px;
}

/* Блок формы должен быть позиционирован относительно */
.form_auth_block {
    position: relative;
}

/* Затемняющий слой при загрузке */
.form_auth_block.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.25);
    border-radius: inherit; /* чтобы повторял скругление блока */
    z-index: 5;
    pointer-events: none; /* чтобы клики проходили сквозь, но кнопка уже заблокирована */
}

.spinner {
  display: none;
  width: 48px;
  height: 48px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: var(--bank-blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  position: relative;
  right: -40%;
  top: -200%;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.flashes {
  list-style: none;
  margin: 0 0 1.25rem 0;
  padding: 0.75rem 1rem;
  background-color: #fff5f5;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 500;
  color: #c0392b;
  text-align: center;
}

.flashes li {
  margin: 0;
  padding: 0;
}

/* ========== СТРАНИЦА ПОДТВЕРЖДЕНИЯ ========== */
.success_message {
  max-width: 480px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem 2rem;
  background: var(--bank-white);
  border-radius: 24px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05),
              0 8px 10px -6px rgba(0, 0, 0, 0.02);
  text-align: center;
}

.success_message p {
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text-dark);
  margin-bottom: 1rem;
}

.success_message p:first-child {
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--success-green);
  margin-bottom: 0.75rem;
}

.success_message p:last-child {
  margin-bottom: 0;
  color: var(--text-muted);
}

/* ========== СТРАНИЦА МЕССЕНДЖЕРА (ССЫЛКА-КНОПКА) ========== */
.main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.main_butn {
  display: inline-block;
  padding: 0.85rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  text-decoration: none;
  color: var(--bank-white);
  background-color: var(--bank-blue);
  border-radius: 12px;
  transition: background-color 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  text-align: center;
}

.main_butn:hover {
  background-color: #3a7bc9;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.main_butn:active {
  transform: scale(0.98);
}

.main_butn:focus-visible {
  outline: 2px solid var(--bank-blue);
  outline-offset: 2px;
}

.landing-container {
  max-width: 700px;
  width: 100%;
  margin: 0 auto;
  background: var(--bank-white);
  border-radius: 12px;
  box-shadow: 0 20px 35px -10px rgba(0, 0, 0, 0.1);
  padding: 2rem 2rem 2.5rem;
  text-align: center;
}

.bank-logo {
  position: relative;
  top: 0;
  margin-bottom: 70px;
}

/* Слайдер */
.carousel {
  position: relative;
  margin: 2rem 0;
}

/* Скрываем радио-кнопки */
.carousel input[type="radio"] {
  display: none;
}

/* Контейнер для слайдов */
.carousel-slides {
  position: relative;
  min-height: 180px;
  overflow: hidden;
}

/* Общий стиль слайда */
.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  transition: opacity 0.4s ease;
  text-align: center;
  padding: 0.5rem;
}

/* Активный слайд */
#slide1:checked ~ .carousel-slides .slide:nth-child(1),
#slide2:checked ~ .carousel-slides .slide:nth-child(2),
#slide3:checked ~ .carousel-slides .slide:nth-child(3),
#slide4:checked ~ .carousel-slides .slide:nth-child(4) {
  opacity: 1;
  position: relative;
}

/* Навигация (точки) */
.carousel-nav {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 2rem;
}

.nav-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #cbd5e1;
  cursor: pointer;
  transition: all 0.2s ease;
}

.nav-dot:hover {
  background-color: var(--text-muted);
}

/* Активная точка */
#slide1:checked ~ .carousel-nav label[for="slide1"],
#slide2:checked ~ .carousel-nav label[for="slide2"],
#slide3:checked ~ .carousel-nav label[for="slide3"],
#slide4:checked ~ .carousel-nav label[for="slide4"] {
  background-color: var(--bank-blue);
  width: 24px;
  border-radius: 8px;
}

/* Иконки слайдов */
.slide-icon {
  display: block;
  margin: 0 auto 1rem auto;
  color: var(--bank-blue);
  stroke-width: 1.5;
}

.dot_in_msg {
  fill: var(--bank-blue);
}

/* Стили текста слайдов */
.slide h3 {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.75rem;
}

.slide p {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.5;
  max-width: 500px;
  margin: 0 auto;
}

.footer {
  font-size: 10px;
  position: fixed;
  bottom: 0;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 480px) {
  .login-wrapper {
    flex-direction: column;
    min-height: auto;
    max-width: 500px;
  }
  
  .login-image {
    min-height: 200px;
  }
    
  .login-wrapper .form_auth_block {
    width: 100%;
    padding: 2rem 1.5rem;
  }

  .form_auth_block_head_text {
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
  }

  .form_input_container input {
    padding: 0.7rem 0.9rem;
  }

  .form_auth_button {
    padding: 0.7rem 0.9rem;
  }

  .success_message {
    padding: 1.5rem 1.25rem;
  }

  .success_message p:first-child {
    font-size: 1.1rem;
  }

  body > a {
    padding: 0.7rem 1.5rem;
    font-size: 0.95rem;
  }

  .landing-container {
    padding: 1.5rem;
  }
  .slide h3 {
    font-size: 1.2rem;
  }
  .slide p {
    font-size: 0.9rem;
  }
  .carousel-slides {
    min-height: 220px;
  }
}