.auth-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 160px);
    padding: 1rem 0 2rem;
    gap: 1.5rem;
}

.auth-container-centered {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 1100px !important;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Контейнер авторизации */
.auth-container {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    width: 100%;
    transition: all 0.3s ease;
}

.auth-container:hover {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 20px rgba(124, 58, 237, 0.3);
    transform: translateY(-5px);
}

/* Внутренние отступы формы */
.auth-form-container {
    padding: 2.5rem 3rem !important; /* Увеличены отступы */
    animation: fadeInAuth 0.6s ease;
}

/* ========== ТАБЫ ========== */
.services-tabs.auth-tabs {
    margin: 0;
    border-radius: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(124, 58, 237, 0.05);
    padding: 0.5rem;
    display: flex;
    width: 100%;
}

.auth-tabs .tab-btn {
    min-width: 180px;
    padding: 1.2rem 2rem;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border: 2px solid transparent;
    border-bottom: 3px solid transparent;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.auth-tabs .tab-btn.active {
    border-color: transparent;
    background: rgba(124, 58, 237, 0.1);
    color: white;
}

.auth-tabs .tab-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
    color: white;
}

/* ========== ФОРМА ========== */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Группы полей */
.form-row {
    display: flex;
    gap: 1.5rem;
    width: 100%;
}

.form-row .form-group {
    flex: 1;
    min-width: 0; /* Предотвращает переполнение */
}

/* Специально для поля ФИО - делаем его больше */
.form-row:first-child .form-group:first-child,
.fio-group {
    flex: 2 !important; /* Занимает 2/3 места */
}

.form-row:first-child .form-group:last-child {
    flex: 1 !important; /* Занимает 1/3 места */
}

/* Группа формы */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: relative;
    width: 100%;
}

.form-group label {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.form-group label i {
    color: #7c3aed;
    width: 18px;
    font-size: 1rem;
}

/* ========== ПОЛЯ ВВОДА ========== */
.form-control {
    padding: 1rem 1.2rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    width: 100%;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.2);
    background: rgba(255, 255, 255, 0.08);
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* Специально для поля ФИО - увеличенный размер */
#fio {
    font-size: 1.1rem;
    letter-spacing: 0.3px;
}

/* Для длинных ФИО */
#fio.long-text {
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ========== ПОЛЕ ПАРОЛЯ ========== */
.password-input {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.password-input .form-control {
    padding-right: 64px !important; /* Увеличенный отступ, чтобы иконка не перекрывала плейсхолдер */
    width: 100%;
}

.password-toggle {
    position: absolute;
    right: 8px !important; /* Фиксированная позиция справа */
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(124, 58, 237, 0.15);
    border-radius: 8px;
    z-index: 10;
    cursor: pointer;
    transition: all 0.2s ease;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    border: none;
}

.password-toggle:hover {
    background: rgba(124, 58, 237, 0.25);
    color: white;
    transform: translateY(-50%) scale(1.05);
}

.password-toggle i {
    font-size: 1.1rem;
}

/* ========== ПОЛЕ ТЕЛЕФОНА ========== */
input[type="tel"] {
    font-family: 'Courier New', monospace;
    letter-spacing: 0.5px;
}

/* Стили для неверного ввода */
.form-control.error {
    border-color: rgba(239, 68, 68, 0.5);
    background: rgba(239, 68, 68, 0.05);
}

.form-control.error:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

/* Сообщение об ошибке */
.field-error {
    color: #ef4444;
    font-size: 0.85rem;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: fadeInAuth 0.3s ease;
}

.field-error i {
    font-size: 0.9rem;
}

/* ========== РАДИО КНОПКИ ========== */
.radio-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.8rem 1.2rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    transition: all 0.3s ease;
    flex: 1;
    min-width: 160px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.radio-option:hover {
    background: rgba(124, 58, 237, 0.1);
    border-color: rgba(124, 58, 237, 0.2);
}

.radio-option input[type="radio"] {
    margin: 0;
    width: 18px;
    height: 18px;
    accent-color: #7c3aed;
}

.radio-option span {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    font-size: 0.95rem;
}

/* ========== ЧЕКБОКСЫ ========== */
.checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    user-select: none;
    transition: all 0.3s ease;
}

.checkbox:hover {
    color: white;
}

.checkbox input[type="checkbox"] {
    margin: 0;
    width: 18px;
    height: 18px;
    accent-color: #7c3aed;
}

.checkbox a {
    color: #7c3aed;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
    display: inline-block;
}

.checkbox a:hover {
    color: #9f7aea;
    text-decoration: underline;
    filter: drop-shadow(0 0 8px rgba(6, 182, 212, 0.6));
}

/* ========== ОПЦИИ ФОРМЫ ========== */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
}

.forgot-link {
    color: #7c3aed;
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    font-weight: 500;
}

.forgot-link:hover {
    color: #9f7aea;
    text-decoration: underline;
}

/* ========== СОГЛАШЕНИЕ ========== */
.form-agreement {
    margin-top: 1rem;
    padding: 1.2rem;
    background: rgba(124, 58, 237, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(124, 58, 237, 0.1);
    transition: all 0.3s ease;
}

.form-agreement:hover {
    background: rgba(124, 58, 237, 0.08);
    border-color: rgba(124, 58, 237, 0.2);
}

/* ========== КНОПКИ ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    position: relative;
    overflow: hidden;
}


.btn-primary {
    color: white;
    box-shadow: 0 10px 25px -5px rgba(124, 58, 237, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px -5px rgba(124, 58, 237, 0.5);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

/* ========== ХЕДЕР И БЕЙДЖИ ========== */
.security-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 2rem;
    background: rgba(124, 58, 237, 0.1);
    border-radius: 50px;
    color: white;
    font-size: 1rem;
    border: 1px solid rgba(124, 58, 237, 0.2);
    backdrop-filter: blur(10px);
    margin-top: 1rem;
}

.security-badge i {
    color: #7c3aed;
}

/* ========== КАЛЕНДАРЬ ========== */
input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(0.8);
    cursor: pointer;
    padding: 0.2rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

input[type="date"]::-webkit-calendar-picker-indicator:hover {
    filter: invert(1);
    background: rgba(124, 58, 237, 0.1);
}

/* ========== АНИМАЦИИ ========== */
@keyframes fadeInAuth {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-container {
    animation: fadeInAuth 0.5s ease-out;
}

.tab-content {
    animation: fadeInAuth 0.4s ease;
}

@keyframes slideInAuth {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

#login-tab.active .auth-form {
    animation: slideInAuth 0.5s ease;
}

#register-tab.active .auth-form {
    animation: slideInAuth 0.5s ease 0.1s backwards;
}

/* ========== ПРОГРЕСС БАР ПАРОЛЯ ========== */
.password-strength {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.password-strength.show {
    opacity: 1;
}

.strength-bar {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s ease, background-color 0.3s ease;
}

.strength-fill.weak {
    width: 33%;
    background: linear-gradient(90deg, #ef4444, #f87171);
}

.strength-fill.medium {
    width: 66%;
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.strength-fill.strong {
    width: 100%;
    background: linear-gradient(90deg, #10b981, #34d399);
}

.strength-text {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    min-width: 60px;
    text-align: right;
}

/* ========== УСПЕХ/ОШИБКА ========== */
.form-control.valid {
    border-color: rgba(16, 185, 129, 0.3);
    background: rgba(16, 185, 129, 0.05);
}

.form-control.valid:focus {
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* ========== ЗАГРУЗЧИК ========== */
.loading-indicator {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 0.5rem;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ========== АДАПТИВНОСТЬ ========== */

/* Планшеты */
@media (max-width: 992px) {
    .auth-container-centered {
        max-width: 800px;
    }
    
    .auth-form-container {
        padding: 2rem !important;
    }
}

@media (max-width: 768px) {
    .auth-container-centered {
        max-width: 95%;
        padding: 0 0.5rem;
    }
    
    .auth-container-centered {
        width: 98% !important;
    }
    
    .auth-form-container {
        padding: 1.5rem !important;
    }
    
    /* Вертикальное расположение на мобильных */
    .form-row {
        flex-direction: column;
        gap: 1rem;
    }
    
    .form-row:first-child .form-group:first-child,
    .fio-group,
    .form-row:first-child .form-group:last-child {
        flex: 1 !important;
        width: 100%;
    }
    
    .auth-tabs .tab-btn {
        min-width: 120px;
        padding: 1rem;
        font-size: 0.9rem;
    }
    
    .radio-group {
        flex-direction: column;
    }
    
    .radio-option {
        min-width: auto;
        width: 100%;
    }
    
    .password-toggle {
        right: 5px !important;
        width: 40px;
        height: 40px;
    }
    
    .hero h1 span:first-child {
        font-size: 2rem !important;
    }
    
    .hero h1 span:last-child {
        font-size: 1rem !important;
    }
    
    .security-badge {
        font-size: 0.9rem;
        padding: 0.6rem 1.2rem;
    }
}

/* Телефоны */
@media (max-width: 480px) {
    .auth-container-centered {
        width: 100% !important;
        padding: 0 0.25rem;
    }
    
    .auth-form-container {
        padding: 1rem !important;
    }
    
    .auth-tabs {
        flex-direction: column;
        gap: 0.3rem;
    }
    
    .auth-tabs .tab-btn {
        width: 100%;
        justify-content: center;
        min-width: auto;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .forgot-link {
        align-self: flex-end;
    }
    
    .form-agreement {
        padding: 0.8rem;
        font-size: 0.85rem;
    }
    
    .checkbox {
        font-size: 0.85rem;
    }
    
    .hero h1 span:first-child {
        font-size: 1.5rem !important;
    }
    
    .hero h1 span:last-child {
        font-size: 0.85rem !important;
    }
    
    .security-badge {
        font-size: 0.8rem;
        padding: 0.5rem 1rem;
    }
    
    .btn {
        padding: 0.8rem 1.2rem;
        font-size: 0.9rem;
    }
}

/* Маленькие телефоны */
@media (max-width: 360px) {
    .auth-form-container {
        padding: 0.8rem !important;
    }
    
    .form-group label {
        font-size: 0.85rem;
    }
    
    .form-control {
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
    }

    .password-input .form-control {
        padding-right: 56px !important;
    }
    
    .password-toggle {
        width: 35px;
        height: 35px;
        right: 2px !important;
    }
    
    .password-toggle i {
        font-size: 1rem;
    }
}

/* ========== УТИЛИТЫ ========== */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.w-100 { width: 100%; }

/* Для очень длинных email */
input[type="email"] {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Стили для поля email с новым плейсхолдером */
input[type="email"]::placeholder {
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
}

/* Дополнительные стили для поля телефона */
input[type="tel"]:focus {
    font-family: 'Courier New', monospace;
}

/* Убираем стрелки у number полей */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
}

/* Ховер эффекты для всех полей */
.form-control:hover:not(:focus):not(.error) {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.07);
}

/* Стили для автозаполнения */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
    -webkit-text-fill-color: white;
    -webkit-box-shadow: 0 0 0px 1000px rgba(124, 58, 237, 0.1) inset;
    transition: background-color 5000s ease-in-out 0s;
    border-color: #7c3aed;
}

/* ========== РЈРўРћР§РќР•РќРРЇ Р”Р›РЇ Р Р•Р“РРЎРўР РђР¦РР ========== */
.form-row:first-child .form-group:first-child,
.fio-group,
.form-row-wide .form-group:first-child {
    flex: 2.4 !important;
}

.form-row:first-child .form-group:last-child,
.form-row-wide .form-group:last-child {
    flex: 1 !important;
}

.password-input .form-control {
    padding-right: 86px !important;
}

.password-toggle {
    right: 12px !important;
    width: 40px;
    height: 40px;
}
