/*
==========================================================
Верхняя панель системы
==========================================================
*/

.dashboard-header {
    position: fixed;

    top: 0;
    left: 0;
    right: 0;

    height: var(--header-height);

    display: flex;

    align-items: center;
    justify-content: space-between;

    padding: 0 30px;

    background: #ffffff;

    border-bottom: 1px solid #e5e7eb;

    box-shadow: 0 2px 12px rgba(15, 23, 42, .05);

    z-index: 1000;
}


/*
==========================================================
Левая часть
==========================================================
*/

.dashboard-header-left {
    display: flex;

    align-items: center;

    min-width: 0;
}


/*
==========================================================
Логотип
==========================================================
*/

.dashboard-logo {
    display: inline-flex;

    align-items: center;

    gap: 9px;

    color: var(--primary);

    font-size: 22px;
    font-weight: 750;

    line-height: 1;

    text-decoration: none;

    white-space: nowrap;

    transition: color .18s ease;
}

.dashboard-logo:hover {
    color: var(--primary-hover);

    text-decoration: none;
}


/*
==========================================================
Правая часть
==========================================================
*/

.dashboard-header-right {
    display: flex;

    align-items: center;

    gap: 16px;
}


/*
==========================================================
Информация о пользователе
==========================================================
*/

.user-info {
    display: flex;

    flex-direction: column;

    align-items: flex-end;

    justify-content: center;

    min-width: 0;

    line-height: 1.25;
}

.user-name {
    max-width: 260px;

    overflow: hidden;

    color: var(--text);

    font-size: 14px;
    font-weight: 700;

    text-overflow: ellipsis;

    white-space: nowrap;
}

.user-role {
    margin-top: 4px;

    color: var(--text-light);

    font-size: 12px;

    white-space: nowrap;
}


/*
==========================================================
Кнопка выхода
==========================================================
*/

.logout-button {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    gap: 7px;

    min-height: 39px;

    padding: 8px 14px;

    border-radius: 8px;

    background: #fef2f2;

    border: 1px solid #fecaca;

    color: #dc2626;

    font-size: 13px;
    font-weight: 600;

    text-decoration: none;

    transition:
        background-color .18s ease,
        border-color .18s ease,
        color .18s ease;
}

.logout-button:hover {
    background: #fee2e2;

    border-color: #fca5a5;

    color: #b91c1c;

    text-decoration: none;
}

.logout-button i {
    font-size: 16px;
}


/*
==========================================================
Адаптивность
==========================================================
*/

@media (max-width: 700px) {

    .dashboard-header {
        padding: 0 15px;
    }

    .dashboard-header-right {
        gap: 8px;
    }

    .user-info {
        display: none;
    }

    .dashboard-logo {
        font-size: 20px;
    }

    .logout-button {
        width: 39px;

        min-width: 39px;

        padding: 0;
    }

    .logout-button span {
        display: none;
    }

}