/* Подключаем кастомный шрифт Manrope */
@font-face {
  font-family: 'Manrope';
  src: url('/static/fonts/Manrope-Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* Общие настройки страницы */
html {
  scrollbar-gutter: stable;
}

body {
    background-color: #121212; /* Почти чёрный фон */
    color: #e0e0e0; /* Основной цвет текста */
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    padding: 1rem;
}

/* Контейнер формы — центрируем по экрану */
.container {
    width: 100%;
    max-width: 500px;
}

/* Карточка входа */
.card-signin {
    background: #1e1e1e; /* Фон карточки — тёмный, но не чёрный */
    border: 0;
    border-radius: 1rem;
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.4);
    overflow: hidden;
}

/* Внутренний отступ карточки */
.card-body {
    padding: 2.5rem;
    text-align: center; /* Центрируем всё содержимое по умолчанию */
}

/* Логотип */
.img-fluid {
    display: block;
    margin: 0 auto 1.5rem;
    max-width: 240px;
    height: auto;
}

/* Описание под логотипом */
.card-title {
    margin-bottom: 1.5rem;
    font-weight: 500;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #b0b0b0;
    text-align: center; /* Выравниваем текст по центру */
    padding: 0 1rem; /* Мягкие отступы по бокам */
}

/* Стиль ссылки внутри описания */
.card-title a {
    color: #81d4fa;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.card-title a:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* Группа полей ввода (логин/пароль) */
.form-label-group {
    position: relative;
    margin-bottom: 1.5rem;
    text-align: left; /* Поля ввода выравниваем по левому краю внутри формы */
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
}

/* Стиль инпутов */
.form-label-group input.form-control {
    width: 100%;
    padding: 0.75rem 1.25rem;
    border-radius: 2rem;
    border: 1px solid #333;
    background: #2a2a2a; /* Тёмный фон инпута */
    color: #ffffff; /* Белый текст */
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
    font-family: 'Manrope', sans-serif;
}

/* Стиль при фокусе */
.form-label-group input.form-control:focus {
    border-color: #64b5f6;
    box-shadow: 0 0 0 0.2rem rgba(100, 181, 246, 0.25);
}

/* Скрываем placeholder при фокусе — решаем проблему дублирования */
.form-label-group input.form-control::placeholder {
    color: transparent;
    opacity: 1;
}

.form-label-group input.form-control:focus::placeholder {
    opacity: 0;
}

/* Плавающий лейбл */
.form-label-group label {
    position: absolute;
    top: 0.75rem;
    left: 1.25rem;
    color: #aaaaaa;
    font-size: 1rem;
    pointer-events: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
    font-family: 'Manrope', sans-serif;
}

/* Когда инпут в фокусе или заполнен — лейбл поднимается ВВЕРХ */
.form-label-group input.form-control:focus + label,
.form-label-group input.form-control:not(:placeholder-shown) + label {
    top: -1.3rem;
    left: 1rem;
    font-size: 0.85rem;
    color: #64b5f6;
    /* УБРАНО: background и padding — чтобы не было "тёмного пятна" */
    /* Теперь лейбл просто парит в воздухе, сливаясь с фоном карточки #1e1e1e */
}

/* Кнопка "Войти" */
.btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 2rem;
    border: 2px solid #64b5f6;
    background: transparent;
    color: #64b5f6;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Manrope', sans-serif;
}

.btn:hover {
    background: #64b5f6;
    color: #121212;
}

/* Центрируем кнопку */
.text-center {
    text-align: center;
}

/* Блок с телефоном и ссылкой на сайт — ОДНА СТРОКА */
.row {
    display: flex;
    flex-wrap: nowrap; /* Запрещаем перенос — всё в одной строке */
    margin-top: 1.5rem;
    justify-content: space-between; /* Телефон слева, сайт справа */
    align-items: center;
    gap: 1rem;
}

/* Контейнер текста в строке */
.col {
    flex: 1 0 auto;
    font-size: 0.95rem;
    color: #b0b0b0;
    white-space: nowrap;
    font-family: 'Manrope', sans-serif;
    text-align: left;
}

/* Стиль ссылки на сайт — прижимаем вправо */
.col .float-end {
    margin-left: auto;
    white-space: nowrap;
}

/* Общий стиль ссылок */
.col a,
.card-title a {
    color: #81d4fa;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
    font-family: 'Manrope', sans-serif;
}

.col a:hover,
.card-title a:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* Стиль номера телефона — крупный, контрастный, но в тон дизайну */
.col a[href^="tel"] {
    font-size: 1.1rem;
    font-weight: 600;
    color: #ffffff;
    display: inline-block;
}

/* Адаптив для мобильных устройств */
@media (max-width: 600px) {
    .container {
        max-width: 95vw;
        padding: 0;
    }

    .card-body {
        padding: 1.5rem;
    }

    .img-fluid {
        max-width: 80vw;
    }

    /* На мобильных — позволяем перенос строки, если не помещается */
    .row {
        flex-wrap: wrap;
        text-align: center;
        justify-content: center;
    }

    .col {
        flex: 1 0 100%;
        text-align: center;
    }

    .col .float-end {
        margin-left: 0;
        margin-top: 0.5rem;
    }
}