

/* ==========================================================
   ОСНОВНОЙ MODAL
   ========================================================== */

.account-modal .modal-dialog {
    width: 100%;
    max-width: 440px;
    margin: 1rem auto;
}

.account-modal .account-modal-content {
    overflow: hidden;

    border: 0;
    border-radius: 22px;

    background: #ffffff;

    box-shadow:
        0 25px 70px rgba(15, 23, 42, .20);
}


/* ==========================================================
   ЕДИНАЯ ШАПКА
   ========================================================== */

.account-modal .account-modal-header {

    position: relative;

    display: flex;
    align-items: center;
    justify-content: space-between;

    min-height: 78px;

    padding: 15px 20px;

    overflow: hidden;

    color: #ffffff;

    background:
        linear-gradient(
            135deg,
            #0d6efd 0%,
            #2563eb 48%,
            #4f46e5 100%
        );

    border: 0;
}


/* Декоративный круг */

.account-modal .account-modal-header::before {

    content: "";

    position: absolute;

    width: 180px;
    height: 180px;

    top: -115px;
    right: -55px;

    border-radius: 50%;

    background: rgba(255,255,255,.10);

    pointer-events: none;
}


/* Второй декоративный элемент */

.account-modal .account-modal-header::after {

    content: "";

    position: absolute;

    width: 90px;
    height: 90px;

    right: 105px;
    bottom: -65px;

    border-radius: 50%;

    background: rgba(255,255,255,.06);

    pointer-events: none;
}


/* ==========================================================
   ЛЕВАЯ ЧАСТЬ ШАПКИ
   ========================================================== */

.account-modal .account-header-left {

    position: relative;
    z-index: 2;

    display: flex;
    align-items: center;

    min-width: 0;

    gap: 12px;
}


/* ==========================================================
   ИКОНКА ШАПКИ
   ========================================================== */

.account-modal .account-header-icon {

    width: 44px;
    height: 44px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    border-radius: 13px;

    color: #ffffff;

    background: rgba(255,255,255,.15);

    border: 1px solid rgba(255,255,255,.20);

    box-shadow:
        inset 0 1px 1px rgba(255,255,255,.10),
        0 5px 18px rgba(0,0,0,.08);

    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);

    font-size: 17px;
}


/* ==========================================================
   ТЕКСТ ШАПКИ
   ========================================================== */

.account-modal .account-header-info {

    min-width: 0;
}

.account-modal .account-header-info .modal-title {

    margin: 0;

    color: #ffffff;

    font-size: 17px;
    line-height: 1.2;

    font-weight: 700;

    letter-spacing: -.15px;
}

.account-modal .account-header-info span {

    display: block;

    margin-top: 4px;

    color: rgba(255,255,255,.72);

    font-size: 11px;
    line-height: 1.2;

    white-space: nowrap;
}


/* ==========================================================
   КНОПКА ЗАКРЫТИЯ
   ========================================================== */

.account-modal .account-close {

    position: relative;

    z-index: 5;

    width: 34px;
    height: 34px;

    flex-shrink: 0;

    margin-left: 12px;

    padding: 0;

    border-radius: 10px;

    opacity: .75;

    background-color: rgba(255,255,255,.10);

    background-size: 11px;

    transition:
        opacity .2s ease,
        background-color .2s ease,
        transform .2s ease;
}

.account-modal .account-close:hover {

    opacity: 1;

    background-color: rgba(255,255,255,.20);

    transform: rotate(90deg);
}


/* ==========================================================
   ТЕЛО АККАУНТА
   ========================================================== */

#modalAccount .account-modal-body {

    padding: 24px;

    background:
        linear-gradient(
            180deg,
            #f8faff 0%,
            #f3f6fb 100%
        );
}


/* ==========================================================
   ПРОФИЛЬ
   ========================================================== */

#modalAccount .account-profile {

    padding-bottom: 18px;

    text-align: center;
}


/* ==========================================================
   АВАТАР
   ========================================================== */

#modalAccount .account-avatar-link {

    display: inline-flex;

    align-items: center;
    justify-content: center;

    padding: 4px;

    border-radius: 50%;

    background: #ffffff;

    box-shadow:
        0 8px 28px rgba(37,99,235,.16);

    transition:
        transform .2s ease,
        box-shadow .2s ease;
}

#modalAccount .account-avatar-link:hover {

    transform: translateY(-2px);

    box-shadow:
        0 12px 32px rgba(37,99,235,.22);
}

#modalAccount .account-avatar {

    display: block;

    width: 86px;
    height: 86px;

    object-fit: cover;

    border-radius: 50%;
}


/* ==========================================================
   ЛОГИН
   ========================================================== */

#modalAccount .account-login {

    margin: 10px 0 3px;

    color: #1f2937;

    font-size: 17px;
    line-height: 1.3;

    font-weight: 700;
}

#modalAccount .account-profile-link {

    display: inline-flex;

    align-items: center;

    gap: 5px;

    color: #2563eb;

    font-size: 12px;

    font-weight: 600;

    text-decoration: none;
}

#modalAccount .account-profile-link:hover {

    color: #1d4ed8;

    text-decoration: underline;
}


/* ==========================================================
   АДМИНПАНЕЛЬ — ЦЕНТР
   ========================================================== */

#modalAccount .account-admin {

    display: flex;

    justify-content: center;

    width: 100%;

    margin-bottom: 10px;
}

#modalAccount .account-admin-button {

    width: 100%;

    min-height: 54px;

    display: flex;

    align-items: center;
    justify-content: center;

    gap: 10px;

    padding: 7px 15px;

    color: #92400e;

    text-decoration: none;

    background:
        linear-gradient(
            135deg,
            #fff7ed 0%,
            #fffbeb 100%
        );

    border: 1px solid #fed7aa;

    border-radius: 13px;

    transition:
        transform .18s ease,
        box-shadow .18s ease,
        border-color .18s ease;
}

#modalAccount .account-admin-button:hover {

    color: #78350f;

    border-color: #fdba74;

    transform: translateY(-1px);

    box-shadow:
        0 6px 18px rgba(234,88,12,.10);
}

#modalAccount .account-admin-icon {

    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    border-radius: 10px;

    color: #ea580c;

    background: #ffedd5;

    font-size: 14px;
}

#modalAccount .account-admin-text {

    font-size: 13px;

    line-height: 1;

    font-weight: 700;
}


/* ==========================================================
   ДЕЙСТВИЯ — 2 КОЛОНКИ
   ========================================================== */

#modalAccount .account-actions {

    display: grid;

    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 8px;

    margin-bottom: 12px;
}


/* ==========================================================
   КНОПКА ДЕЙСТВИЯ
   ========================================================== */

#modalAccount .account-action {

    min-width: 0;

    min-height: 56px;

    display: flex;

    align-items: center;

    padding: 7px 10px;

    color: #1f2937;

    text-decoration: none;

    background: #ffffff;

    border: 1px solid #e5e7eb;

    border-radius: 13px;

    transition:
        transform .18s ease,
        border-color .18s ease,
        box-shadow .18s ease;
}

#modalAccount .account-action:hover {

    color: #1f2937;

    border-color: #d1d5db;

    transform: translateY(-1px);

    box-shadow:
        0 6px 18px rgba(15,23,42,.07);
}


/* ==========================================================
   ИКОНКИ ДЕЙСТВИЙ
   ========================================================== */

#modalAccount .account-action-icon {

    width: 40px;
    height: 40px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    border-radius: 11px;

    font-size: 14px;
}


/* Цвета */

#modalAccount .account-icon-green {
    color: #16a34a;
    background: #f0fdf4;
}

#modalAccount .account-icon-blue {
    color: #2563eb;
    background: #eff6ff;
}

#modalAccount .account-icon-orange {
    color: #ea580c;
    background: #fff7ed;
}

#modalAccount .account-icon-yellow {
    color: #ca8a04;
    background: #fefce8;
}

#modalAccount .account-icon-purple {
    color: #7c3aed;
    background: #f5f3ff;
}

#modalAccount .account-icon-red {
    color: #dc2626;
    background: #fef2f2;
}


/* ==========================================================
   НАЗВАНИЕ ДЕЙСТВИЯ
   ========================================================== */

#modalAccount .account-action-name {

    min-width: 0;

    margin-left: 9px;

    overflow: hidden;

    color: #374151;

    font-size: 11.5px;

    line-height: 1.25;

    font-weight: 650;

    white-space: nowrap;

    text-overflow: ellipsis;
}


/* ==========================================================
   СТРЕЛКА
   ========================================================== */

#modalAccount .account-button-arrow {

    margin-left: auto;

    flex-shrink: 0;

    color: #cbd5e1;

    font-size: 9px;
}


/* ==========================================================
   СЧЁТЧИКИ
   ========================================================== */

#modalAccount .account-badge {

    min-width: 21px;
    height: 21px;

    display: inline-flex;

    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    margin-left: auto;
    margin-right: 6px;

    padding: 0 5px;

    border-radius: 20px;

    font-size: 9px;

    line-height: 1;

    font-weight: 700;
}

#modalAccount .account-badge-danger {

    color: #ffffff;

    background: #dc3545;
}

#modalAccount .account-badge-yellow {

    color: #664d03;

    background: #ffc107;
}


/* ==========================================================
   ВЫХОД — ПО ЦЕНТРУ
   ========================================================== */

#modalAccount .account-logout-wrapper {

    display: flex;

    justify-content: center;

    width: 100%;

    padding-top: 2px;
}

#modalAccount .account-logout {

    display: inline-flex;

    align-items: center;
    justify-content: center;

    gap: 8px;

    min-width: 170px;

    padding: 11px 18px;

    color: #dc2626;

    text-decoration: none;

    border-radius: 11px;

    font-size: 12px;

    font-weight: 650;

    transition:
        color .18s ease,
        background-color .18s ease;
}

#modalAccount .account-logout:hover {

    color: #b91c1c;

    background: #fef2f2;
}


/* ==========================================================
   LOGIN — ТЕЛО
   ========================================================== */

#modalLogin .login-modal-body {

    padding: 25px;

    background:
        linear-gradient(
            180deg,
            #f8faff 0%,
            #f3f6fb 100%
        );
}


/* ==========================================================
   LOGIN — ФОРМА
   ========================================================== */

#modalLogin .login-form {

    width: 100%;
}

#modalLogin .login-field {

    margin-bottom: 17px;
}

#modalLogin .login-label {

    display: block;

    margin-bottom: 7px;

    color: #374151;

    font-size: 12px;

    font-weight: 700;
}


/* ==========================================================
   LOGIN — ЗАБЫЛИ ПАРОЛЬ
   ========================================================== */

#modalLogin .login-password-header {

    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 10px;

    margin-bottom: 7px;
}

#modalLogin .forgot-password {

    color: #2563eb;

    font-size: 11px;

    text-decoration: none;

    white-space: nowrap;
}

#modalLogin .forgot-password:hover {

    color: #1d4ed8;

    text-decoration: underline;
}


/* ==========================================================
   LOGIN — INPUT
   ========================================================== */

#modalLogin .login-input {

    position: relative;

    display: flex;

    align-items: center;

    min-height: 48px;

    overflow: hidden;

    background: #ffffff;

    border: 1px solid #e5e7eb;

    border-radius: 12px;

    transition:
        border-color .18s ease,
        box-shadow .18s ease;
}

#modalLogin .login-input:focus-within {

    border-color: #86b7fe;

    box-shadow:
        0 0 0 3px rgba(13,110,253,.10);
}

#modalLogin .login-input-icon {

    width: 45px;

    display: flex;

    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    color: #94a3b8;

    font-size: 14px;
}

#modalLogin .login-input .form-control {

    height: 46px;

    padding: 8px 12px 8px 0;

    color: #1f2937;

    background: transparent;

    border: 0;

    box-shadow: none;

    font-size: 13px;
}

#modalLogin .login-input .form-control:focus {

    box-shadow: none;

    background: transparent;
}

#modalLogin .login-input .form-control::placeholder {

    color: #9ca3af;
}


/* ==========================================================
   LOGIN — ЗАПОМНИТЬ
   ========================================================== */

#modalLogin .login-remember {

    margin: -2px 0 18px;

    color: #6b7280;

    font-size: 12px;
}

#modalLogin .login-remember .form-check-input {

    margin-top: .15em;

    cursor: pointer;
}

#modalLogin .login-remember .form-check-label {

    cursor: pointer;
}


/* ==========================================================
   LOGIN — КНОПКА
   ========================================================== */

#modalLogin .login-submit {

    width: 100%;

    min-height: 48px;

    display: flex;

    align-items: center;
    justify-content: center;

    gap: 8px;

    padding: 10px 16px;

    color: #ffffff;

    background:
        linear-gradient(
            135deg,
            #0d6efd 0%,
            #2563eb 55%,
            #4f46e5 100%
        );

    border: 0;

    border-radius: 12px;

    font-size: 13px;

    font-weight: 700;

    box-shadow:
        0 7px 18px rgba(37,99,235,.20);

    transition:
        transform .18s ease,
        box-shadow .18s ease;
}

#modalLogin .login-submit:hover {

    color: #ffffff;

    transform: translateY(-1px);

    box-shadow:
        0 10px 24px rgba(37,99,235,.28);
}

#modalLogin .login-submit:active {

    transform: translateY(0);
}


/* ==========================================================
   СОЦИАЛЬНАЯ АВТОРИЗАЦИЯ
   ========================================================== */

#modalLogin .social-login {

    margin-top: 22px;
}

#modalLogin .social-divider {

    position: relative;

    display: flex;

    align-items: center;
    justify-content: center;

    margin: 0 0 16px;

    text-align: center;
}

#modalLogin .social-divider::before,
#modalLogin .social-divider::after {

    content: "";

    flex: 1;

    height: 1px;

    background: #e5e7eb;
}

#modalLogin .social-divider span {

    margin: 0 10px;

    color: #9ca3af;

    font-size: 10px;

    white-space: nowrap;
}


/* ==========================================================
   СОЦИАЛЬНЫЕ КНОПКИ
   ========================================================== */

#modalLogin .social-auth-buttons-round {

    display: flex;

    align-items: center;
    justify-content: center;

    flex-wrap: wrap;

    gap: 8px;
}

#modalLogin .social-btn {

    width: 40px;
    height: 40px;

    display: inline-flex;

    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    color: #ffffff;

    border-radius: 50%;

    text-decoration: none;

    font-size: 15px;

    box-shadow:
        0 4px 12px rgba(15,23,42,.10);

    transition:
        transform .18s ease,
        box-shadow .18s ease,
        filter .18s ease;
}

#modalLogin .social-btn:hover {

    color: #ffffff;

    transform: translateY(-2px);

    filter: brightness(1.05);

    box-shadow:
        0 7px 16px rgba(15,23,42,.16);
}


/* VK */

#modalLogin .social-btn.vk {
    background: #0077ff;
}


/* Google */

#modalLogin .social-btn.google {
    background: #ffffff;

    color: #4285f4;

    border: 1px solid #e5e7eb;
}

#modalLogin .social-btn.google:hover {
    color: #4285f4;
}


/* Facebook */

#modalLogin .social-btn.facebook {
    background: #1877f2;
}


/* Яндекс */

#modalLogin .social-btn.yandex {
    background: #fc3f1d;
}


/* Одноклассники */

#modalLogin .social-btn.ok {
    background: #ee8208;
}


/* Mail.ru */

#modalLogin .social-btn.mailru {
    background: #168de2;
}


/* ==========================================================
   РЕГИСТРАЦИЯ
   ========================================================== */

#modalLogin .register-hint {

    display: flex;

    align-items: center;
    justify-content: center;

    flex-wrap: wrap;

    gap: 4px;

    margin-top: 22px;
    padding-top: 18px;

    color: #6b7280;

    border-top: 1px solid #e5e7eb;

    font-size: 12px;

    text-align: center;
}

#modalLogin .register-hint a {

    color: #2563eb;

    font-weight: 700;

    text-decoration: none;
}

#modalLogin .register-hint a:hover {

    color: #1d4ed8;

    text-decoration: underline;
}


/* ==========================================================
   МОБИЛЬНАЯ ВЕРСИЯ
   ========================================================== */

@media (max-width: 575.98px) {

    .account-modal .modal-dialog {

        max-width: none;

        margin: .5rem;
    }


    .account-modal .account-modal-content {

        border-radius: 19px;
    }


    /* Шапка */

    .account-modal .account-modal-header {

        min-height: 70px;

        padding: 13px 16px;
    }


    .account-modal .account-header-left {

        gap: 10px;
    }


    .account-modal .account-header-icon {

        width: 40px;
        height: 40px;

        border-radius: 11px;

        font-size: 15px;
    }


    .account-modal .account-header-info .modal-title {

        font-size: 15px;
    }


    .account-modal .account-header-info span {

        margin-top: 3px;

        font-size: 10px;
    }


    .account-modal .account-close {

        width: 32px;
        height: 32px;

        margin-left: 8px;
    }


    /* Тело */

    #modalAccount .account-modal-body,
    #modalLogin .login-modal-body {

        padding: 20px 15px;
    }


    /* Аватар */

    #modalAccount .account-avatar {

        width: 78px;
        height: 78px;
    }


    /* Действия */

    #modalAccount .account-actions {

        gap: 7px;
    }


    #modalAccount .account-action {

        min-height: 53px;

        padding: 6px 8px;
    }


    #modalAccount .account-action-icon {

        width: 36px;
        height: 36px;

        border-radius: 10px;
    }


    #modalAccount .account-action-name {

        margin-left: 7px;

        font-size: 10.5px;
    }


    #modalAccount .account-button-arrow {

        font-size: 8px;
    }


    #modalAccount .account-badge {

        min-width: 19px;
        height: 19px;

        margin-right: 4px;

        font-size: 8px;
    }


    /* Админ */

    #modalAccount .account-admin-button {

        min-height: 52px;
    }


    /* Выход */

    #modalAccount .account-logout {

        min-width: 160px;

        padding: 10px 15px;
    }


    /* Login */

    #modalLogin .social-btn {

        width: 38px;
        height: 38px;

        font-size: 14px;
    }

}


/* ==========================================================
   ОЧЕНЬ УЗКИЕ ЭКРАНЫ
   ========================================================== */

@media (max-width: 360px) {

    #modalAccount .account-modal-body {

        padding: 18px 10px;
    }


    #modalAccount .account-action {

        min-height: 50px;

        padding: 5px 6px;
    }


    #modalAccount .account-action-icon {

        width: 32px;
        height: 32px;

        font-size: 12px;
    }


    #modalAccount .account-action-name {

        font-size: 9.5px;
    }


    #modalAccount .account-button-arrow {

        display: none;
    }


    #modalAccount .account-badge {

        margin-left: 3px;
        margin-right: 2px;
    }

}


/* ==========================================================
   DARK MODE
   ========================================================== */

[data-bs-theme="dark"] .account-modal .account-modal-content {

    background: #111827;
}


/* Аккаунт */

[data-bs-theme="dark"] #modalAccount .account-modal-body,
[data-bs-theme="dark"] #modalLogin .login-modal-body {

    background:
        linear-gradient(
            180deg,
            #111827 0%,
            #0f172a 100%
        );
}


[data-bs-theme="dark"] #modalAccount .account-login {

    color: #f9fafb;
}


[data-bs-theme="dark"] #modalAccount .account-profile-link {

    color: #60a5fa;
}


[data-bs-theme="dark"] #modalAccount .account-action {

    color: #e5e7eb;

    background: #111827;

    border-color: #1f2937;
}


[data-bs-theme="dark"] #modalAccount .account-action:hover {

    color: #ffffff;

    border-color: #374151;
}


[data-bs-theme="dark"] #modalAccount .account-action-name {

    color: #e5e7eb;
}


/* Админ */

[data-bs-theme="dark"] #modalAccount .account-admin-button {

    color: #fed7aa;

    background:
        linear-gradient(
            135deg,
            #431407 0%,
            #422006 100%
        );

    border-color: #7c2d12;
}


[data-bs-theme="dark"] #modalAccount .account-admin-button:hover {

    color: #ffedd5;

    border-color: #9a3412;
}


[data-bs-theme="dark"] #modalAccount .account-admin-icon {

    color: #fb923c;

    background: rgba(234,88,12,.18);
}


/* Выход */

[data-bs-theme="dark"] #modalAccount .account-logout {

    color: #f87171;
}


[data-bs-theme="dark"] #modalAccount .account-logout:hover {

    color: #fca5a5;

    background: rgba(220,38,38,.08);
}


/* Login */

[data-bs-theme="dark"] #modalLogin .login-label {

    color: #e5e7eb;
}


[data-bs-theme="dark"] #modalLogin .login-input {

    background: #111827;

    border-color: #374151;
}


[data-bs-theme="dark"] #modalLogin .login-input .form-control {

    color: #f9fafb;
}


[data-bs-theme="dark"] #modalLogin .login-input .form-control::placeholder {

    color: #6b7280;
}


[data-bs-theme="dark"] #modalLogin .login-remember {

    color: #9ca3af;
}


[data-bs-theme="dark"] #modalLogin .social-divider::before,
[data-bs-theme="dark"] #modalLogin .social-divider::after {

    background: #374151;
}


[data-bs-theme="dark"] #modalLogin .register-hint {

    color: #9ca3af;

    border-color: #374151;
}


[data-bs-theme="dark"] #modalLogin .social-btn.google {

    background: #111827;

    border-color: #374151;
}


/* ==========================================================
   REDUCED MOTION
   ========================================================== */

@media (prefers-reduced-motion: reduce) {

    .account-modal *,
    .account-modal *::before,
    .account-modal *::after {

        scroll-behavior: auto !important;

        transition: none !important;

        animation: none !important;
    }


    .account-modal .account-close:hover,
    #modalAccount .account-avatar-link:hover,
    #modalAccount .account-action:hover,
    #modalAccount .account-admin-button:hover,
    #modalLogin .login-submit:hover,
    #modalLogin .social-btn:hover {

        transform: none !important;
    }

}


