/* 1. Модалка и overlay */
.dm-auth-overlay {
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
}

#dm-auth-modal .modal-content {
    background-color: #111111;
    color: #F5F5F0;
    border-radius: 16px;
    border: 1px solid #2A2A2A;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    max-width: 420px;
    margin: 0 auto;
    font-family: 'Inter', 'Montserrat', sans-serif;
}

#dm-auth-modal .modal-header {
    border-bottom: none;
    padding: 24px 32px 0;
}

#dm-auth-modal .close {
    color: #A8A29E;
    text-shadow: none;
    opacity: 0.8;
    font-size: 28px;
    transition: color 0.2s;
}

#dm-auth-modal .close:hover {
    color: #F5F5F0;
    opacity: 1;
}

#dm-auth-modal .modal-title {
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 24px;
}

#dm-auth-modal .modal-body {
    padding: 0 32px 32px;
}

/* 2. Кнопки провайдеров */
.dm-btn-provider {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 52px;
    background-color: #1E1E1E;
    color: #F5F5F0;
    border: 1px solid #2A2A2A;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 12px;
    text-decoration: none;
    transition: background-color 0.2s, border-color 0.2s;
    cursor: pointer;
}

.dm-btn-provider:hover {
    background-color: #252525;
    border-color: #3A3A3A;
    color: #F5F5F0;
    text-decoration: none;
}

.dm-btn-provider svg {
    margin-right: 12px;
    width: 24px;
    height: 24px;
}

.dm-toggle-more {
    display: block;
    text-align: center;
    color: #A8A29E;
    font-size: 14px;
    margin: 16px 0;
    cursor: pointer;
    background: none;
    border: none;
    width: 100%;
}

.dm-toggle-more:hover {
    color: #F5F5F0;
}

/* 3. Разделитель "или" */
.dm-auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: #A8A29E;
    font-size: 14px;
    margin: 24px 0;
}

.dm-auth-divider::before,
.dm-auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #2A2A2A;
}

.dm-auth-divider:not(:empty)::before {
    margin-right: .5em;
}

.dm-auth-divider:not(:empty)::after {
    margin-left: .5em;
}

/* 4. Инпуты */
.dm-auth-form .form-group {
    margin-bottom: 16px;
}

.dm-auth-form label {
    display: block;
    color: #A8A29E;
    font-size: 14px;
    margin-bottom: 8px;
    font-weight: 400;
}

.dm-auth-form .form-control {
    background-color: #1A1A1A;
    border: 1px solid #2A2A2A;
    color: #F5F5F0;
    height: 48px;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 16px;
}

.dm-auth-form .form-control:focus {
    border-color: #4A90D9;
    box-shadow: 0 0 0 1px #4A90D9;
    background-color: #1E1E1E;
}

/* 5. Кнопка submit */
.dm-auth-btn-primary {
    width: 100%;
    height: 48px;
    background-color: #4A90D9;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    margin-top: 8px;
    transition: background-color 0.2s;
}

.dm-auth-btn-primary:hover {
    background-color: #3b7abb;
    color: #ffffff;
}

.dm-auth-btn-primary:disabled {
    background-color: #2A2A2A;
    color: #777;
    cursor: not-allowed;
}

/* 6. Индикатор сложности пароля */
.dm-password-strength {
    height: 4px;
    background-color: #2A2A2A;
    border-radius: 2px;
    margin-top: 8px;
    overflow: hidden;
}

.dm-password-strength-bar {
    height: 100%;
    width: 0;
    transition: width 0.3s, background-color 0.3s;
}

.dm-password-hint {
    font-size: 12px;
    color: #A8A29E;
    margin-top: 6px;
}

/* 7. Ошибки и сообщения */
.dm-auth-error {
    color: #E53935;
    font-size: 14px;
    margin-top: 8px;
    display: none;
}
.dm-auth-error.active {
    display: block;
}

.dm-auth-success {
    color: #43A047;
    font-size: 14px;
    margin-top: 8px;
    display: none;
}
.dm-auth-success.active {
    display: block;
}

/* Ссылки */
.dm-auth-link {
    color: #4A90D9;
    text-decoration: none;
    cursor: pointer;
    font-size: 14px;
}
.dm-auth-link:hover {
    text-decoration: underline;
}

.dm-auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: #A8A29E;
}

/* 8. Переходы экранов */
.dm-screen {
    display: none;
    animation: fadeIn 0.3s ease;
}
.dm-screen.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Чекбокс согласия */
.dm-auth-checkbox {
    display: flex;
    align-items: flex-start;
    margin-top: 16px;
    margin-bottom: 16px;
}
.dm-auth-checkbox input[type="checkbox"] {
    margin-top: 4px;
    margin-right: 8px;
}
.dm-auth-checkbox label {
    font-size: 12px;
    margin: 0;
    line-height: 1.4;
}

/* 9. Адаптив */
@media (max-width: 576px) {
    #dm-auth-modal .modal-dialog {
        margin: 10px;
    }
    #dm-auth-modal .modal-content {
        max-width: 100%;
    }
}
