:root {
  --bg: #f3f6fb;
  --card: #ffffff;
  --accent: #2b6edf;
  --muted: #6b7280;
}

* {
  box-sizing: border-box;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
}

body {
  background-image: url('../assets/img_vkc/vkc_fon.jpg');
  padding: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.card {
  width: 100%;
  max-width: 520px;
  background: var(--card);
  border-radius: 14px;
  padding: 0px 28px 28px 28px;
  box-shadow: 0 8px 30px rgba(43, 110, 223, 0.06);
}

.header {
  display: flex;
  align-items: center;          /* Вертикальное выравнивание */
  
  border-bottom: 1.5px solid rgba(43, 110, 223, 0.2); /* Общая линия снизу */
  
  gap: 16px;                    /* Расстояние между логотипом и заголовком */
  margin-bottom: 24px;          /* Отступ снизу */
}

.logo {
  flex: 0 0 80px;               /* Фиксированная ширина логотипа */
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  /* background-color: #f0f0f0; */
}

.org-name {
  flex: 1;                     /* Занимает оставшееся пространство */
  text-align: left;            /* Текст по левому краю */
  
  padding-left: 20px;
  padding-bottom: 12px;
  
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #000000;
  margin-top: 10px;
  
  border-radius: 8px 8px 0 0;
  background: var(--card);
  user-select: none;
}

h2 {
  display: block;
  width: fit-content;
  padding: 10px 20px;
  
  background: linear-gradient(
    135deg,
    rgba(173, 216, 230, 0.4) 0%,
    rgba(224, 255, 255, 0.3) 40%,
    rgba(173, 216, 230, 0.2) 60%,
    rgba(224, 255, 255, 0.5) 100%
  );
  
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  
  border-radius: 14px;

  border: 1.5px solid rgba(0, 0, 0, 0.25);
  
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  
  color: #000000;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  
  margin: 0 auto 20px auto;
  text-align: center;
  
  user-select: none;
}

.custom-select-wrapper {
  width: 100%;
  max-width: none;
  position: relative;
  margin-top: 6px;
  box-sizing: border-box;

  border: 1.5px solid #cbd5e1;  
  border-radius: 8px;
  background: #fbfdff;
}

/* Строка выбора (триггер) */
.custom-select-trigger {
  display: block;
  width: 100%;
  padding: 10px 12px;
  font-size: 16px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #333;
  background-color: transparent;
  border: none;
  border-radius: 0;

  cursor: pointer;
  text-align: left;
  position: relative;
  user-select: none;
  box-sizing: border-box;
  
  padding-right: 40px;
}

.custom-select-trigger::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 14px;
  width: 12px;
  height: 12px;
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3csvg fill='%23666' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3e%3cpath d='M7 10l5 5 5-5z'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-size: contain;
  pointer-events: none;
  transform: translateY(-50%);
  transition: transform 0.3s ease;
}

.custom-select-wrapper.open .custom-select-trigger::after {
  transform: translateY(-50%) rotate(180deg);
}

/* Выпадающий список */
.custom-options {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  width: 100%;

  max-height: 0;
  overflow: hidden;

  background: #fbfdff;
  
  border: none;
  border-radius: 0 0 8px 8px;
  
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  
  transition: max-height 0.3s ease;
  z-index: 10;

  list-style: none;
  padding-left: 0;
  margin: 0;
}

.custom-select-wrapper.open .custom-options {
  max-height: 200px;
  overflow-y: auto;
}

/* Элементы списка */
.custom-option {
  padding: 6px 12px;
  font-size: 14px;
  cursor: pointer;
  color: #333;
  transition: background-color 0.2s ease;
  background: transparent;
}

.custom-option:hover,
.custom-option.selected {
  background-color: #2b6edf;
  color: #fff;
}

label {
  display: block;
  margin-top: 20px;
  color: #374151;
  font-weight: 600;
  font-size: 13px;
}

input[type="text"],
input[type="password"],
select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #e6eef8;
  margin-top: 6px;
  background: #fbfdff;
}

.actions {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 18px;
}

button {
  display: inline-block;

  /* Матовый стеклянный фон с градиентом */
  background: linear-gradient(
    135deg,
    rgba(173, 216, 230, 0.4) 0%,
    rgba(224, 255, 255, 0.3) 40%,
    rgba(173, 216, 230, 0.2) 60%,
    rgba(224, 255, 255, 0.5) 100%
  );
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  border: 1.5px solid rgba(0, 0, 0, 0.25);
  border-radius: 14px;
  /box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);

  color: #000000;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-weight: 700;
  
  font-size: 14px;           /* уменьшенный размер шрифта */
  letter-spacing: 1px;
  text-transform: uppercase;
  text-align: center;
  user-select: none;
  cursor: pointer;

  padding: 8px 20px;         /* уменьшены внутренние отступы */

  transition: background-color 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
}

button:hover, 
button:focus {
  background: linear-gradient(
    135deg,
    rgba(173, 216, 230, 0.5) 0%,
    rgba(224, 255, 255, 0.4) 40%,
    rgba(173, 216, 230, 0.3) 60%,
    rgba(224, 255, 255, 0.6) 100%
  );
  box-shadow: 0 6px 12px rgba(43, 110, 223, 0.25);
  color: #1b1b1b;
  outline: none;
}
footer.muted {
  margin-top: 16px;
  color: var(--muted);
  font-size: 12px;
}

a {
  color: var(--accent);
  text-decoration: none;
}

/* Стили для выделения названия организации */
.org-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

/* Адаптация под мобильные устройства */
@media (max-width: 520px) {
  body {
    padding: 20px;
  }

  footer.muted {
    text-align: center;
  }

  .card {
    padding: 18px;
  }

  .org-name {
    font-size: 16px;
    padding: 8px 12px;
  }

  .org-tag {
    padding: 4px 8px;
    font-size: 11px;
  }


  /* === Мобильная адаптация для выбора комнаты === */

  /* Скрываем кастомный список и триггер */
  .custom-select-wrapper {
    border: none;
    box-shadow: none;
  }

  .custom-select-wrapper .custom-select-trigger,
  .custom-select-wrapper .custom-options {
    display: none !important;
  }

  /* Показываем нативный select */
  select[name="room"] {
    display: block !important;
    width: 100%;
    padding: 10px 12px;
    font-size: 16px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    background: #fbfdff;
    -webkit-appearance: menulist-button;
    appearance: menulist-button;
    cursor: pointer;
  }
}
