/* Фиксируем футер внизу */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
#main {
    flex: 1 0 auto;
}
#footer {
    flex-shrink: 0;
    margin-top: auto;
}
/* Фиксируем футер внизу */

.footer-top {
    background-color: transparent;
    padding: 15px 0;
}
.copyright {
    background-color: transparent;
    border-top: 1px solid rgba(222, 226, 230, 0.5);
    padding: 15px 0;
}

.footer-top p,
.copyright p {
    color: #6c757d;
    font-size: 0.85rem;
}

.footer-top a,
.copyright a {
    color: #6c757d;
    text-decoration: none;
}

.footer-top a:hover,
.copyright a:hover {
    color: #4361ee;
    text-decoration: underline;
}

.bg-gray-gradient {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e7f1 100%);
}

/* Стили для страницы авторизации */
.auth-page {
    min-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-container {
    width: 100%;
    display: flex;
    justify-content: center;
}

.auth-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
    border: 1px solid #eef2f7;
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #4361ee, #3a0ca3);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #4361ee, #3a0ca3);
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.8rem;
}

.auth-title {
    color: #2b2d42;
    font-weight: 600;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
}

.auth-subtitle {
    color: #6c757d;
    font-size: 0.95rem;
    margin-bottom: 0;
}

.auth-alert {
    border-radius: 8px;
    border: 1px solid #fee2e2;
    background-color: #fef2f2;
    color: #991b1b;
    margin-bottom: 1.5rem;
}

/* Стили для input-group */
.input-group {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

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

.input-group.is-invalid {
    border-color: #e2e8f0; /* Убрали красную рамку, оставили серую */
}

.input-group.is-invalid:focus-within {
    border-color: #4361ee; /* При фокусе синяя, как обычно */
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

.input-group-text {
    background: #f8fafc;
    border: none;
    border-radius: 8px 0 0 8px !important;
    color: #64748b;
    font-size: 1rem;
    padding: 0.8rem 1rem;
}

.form-control {
    border: none;
    border-left: 1px solid #e2e8f0 !important;
    border-radius: 0 8px 8px 0 !important;
    padding: 0.8rem 1rem;
    font-size: 1rem;
    height: calc(1.5em + 1.6rem + 2px);
}

.form-control:focus {
    box-shadow: none;
    outline: none;
    border-color: #e2e8f0 !important;
}

.form-control.is-invalid {
    border-color: #e2e8f0 !important;
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.form-control.is-valid {
    border-color: #e2e8f0 !important;
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.form-control.is-invalid:focus,
.form-control.is-valid:focus {
    border-color: #e2e8f0 !important;
    box-shadow: none;
}

.form-control-lg {
    padding: 0.8rem 1.2rem;
    height: calc(1.5em + 1.8rem + 2px);
}

/* Стили для чекбокса remember me */
.form-check-input {
    border: 1px solid #d1d5db;
    width: 1.2rem;
    height: 1.2rem;
    margin-top: 0.1rem;
}

.form-check-input:checked {
    background-color: #4361ee !important;
    border-color: #4361ee !important;
}

.form-check-input:focus {
    border-color: #4361ee;
    box-shadow: 0 0 0 0.2rem rgba(67, 97, 238, 0.25);
}

.form-check-label {
    color: #4b5563 !important;
    font-size: 0.9rem;
    padding-top: 0.1rem;
    margin-left: 0.5rem;
}

.auth-link {
    color: #4361ee;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
    display: block;
}

.auth-link:hover {
    color: #3a0ca3;
    text-decoration: underline;
}

.auth-button {
    background: linear-gradient(135deg, #4361ee, #3a0ca3);
    border: none;
    padding: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-radius: 8px;
}

.auth-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(67, 97, 238, 0.3);
}

.auth-button:active {
    transform: translateY(0);
}

/* Стили для валидации */
.field-loginform-username .invalid-feedback,
.field-loginform-password .invalid-feedback {
    display: block !important;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875em;
    color: #dc3545;
}

#langs .dropdown-toggle::after {
    display: none !important;
}

/* Адаптивность */
@media (max-width: 576px) {
    .auth-card {
        padding: 2rem 1.5rem;
        margin: 0 10px;
    }

    .auth-title {
        font-size: 1.3rem;
    }

    .auth-page {
        margin: -15px -15px 0 -15px;
        padding: 15px;
    }

    .form-control {
        height: calc(1.5em + 1.4rem + 2px);
    }

    .form-control-lg {
        height: calc(1.5em + 1.6rem + 2px);
    }

    .footer-top p,
    .copyright p {
        font-size: 0.8rem;
    }
}

@media (max-width: 400px) {
    .auth-card {
        padding: 1.5rem;
    }

    .auth-logo {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
}