/* ===== HEADER STYLES ===== */
/*
 * Стили для верхней панели дашборда
 * 
 * Содержит:
 * - Основная структура header
 * - Заголовки страниц
 * - Кнопки действий
 * - Уведомления и dropdown
 * - Мобильная адаптивность header
 */

/* ===== ВЕРХНЯЯ ПАНЕЛЬ ===== */
.top-header {
    background: rgba(26, 26, 46, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(102, 126, 234, 0.1);
    border-radius: 20px;
    padding: 1.25rem 1.5rem;
    margin: 1rem 1.5rem 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 100;
    min-height: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.top-header:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 48px rgba(102, 126, 234, 0.15);
}

.header-left {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    gap: 0.5rem;
    position: relative;
}

.page-title h1 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.1;
    letter-spacing: -0.025em;
    background: linear-gradient(120deg, var(--primary) 0%, var(--secondary) 50%, var(--secondary-alt) 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all 0.3s ease;
    position: relative;
}

.page-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.4;
    font-weight: 400;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.page-subtitle:hover {
    opacity: 1;
    color: var(--text-primary);
}

.page-badges {
    display: none;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    height: fit-content;
}

.header-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-secondary);
    padding: 0.75rem;
    border-radius: 12px;
    position: relative;
    font-size: 1.1rem;
    cursor: pointer;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
}

.header-btn:hover {
    background: rgba(102, 126, 234, 0.15);
    border-color: rgba(102, 126, 234, 0.35);
    color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.2);
}

.header-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
}

.notification-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.15rem 0.35rem;
    border-radius: 12px;
    min-width: 18px;
    text-align: center;
    line-height: 1;
    box-shadow: 0 3px 12px rgba(239, 68, 68, 0.4);
    border: 2px solid rgba(26, 26, 46, 1);
    animation: pulse 2s infinite;
    z-index: 10;
}

/* ===== УВЕДОМЛЕНИЯ ===== */
/* Стили перенесены в notification.css */

/* ===== МОБИЛЬНАЯ АДАПТИВНОСТЬ HEADER ===== */

/* Стили для кнопки сайдбара на мобильных */
.sidebar-toggle {
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.2);
    color: var(--primary);
    font-size: 1.1rem;
    padding: 0.75rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
}

.sidebar-toggle:hover {
    background: rgba(102, 126, 234, 0.2);
    border-color: rgba(102, 126, 234, 0.4);
    color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

.sidebar-toggle:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
}

@media (max-width: 991px) {
    .top-header {
        padding: 1rem 1.25rem;
        margin: 0.75rem 1.25rem 0 1.25rem;
        border-radius: 16px;
        min-height: 70px;
    }
    
    .page-title h1 {
        font-size: 1.75rem;
    }
    
    .header-left {
        align-items: center;
        flex-direction: row;
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .top-header {
        padding: 0.875rem 1rem;
        margin: 0.5rem 1rem 0 1rem;
        border-radius: 14px;
        flex-direction: row;
        align-items: center;
        gap: 0.875rem;
        min-height: 64px;
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
    }
    
    .header-left {
        flex: 1;
        flex-direction: row;
        align-items: center;
        gap: 0.875rem;
        min-width: 0; /* Позволяет тексту сжиматься */
    }
    
    .page-title {
        flex: 1;
        min-width: 0; /* Позволяет тексту сжиматься */
    }
    
    .page-title h1 {
        font-size: 1.4rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        line-height: 1.2;
    }
    
    .page-subtitle {
        font-size: 0.8rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        margin-top: 0.125rem;
    }
    
    .header-right {
        align-items: center;
        gap: 0.75rem;
        flex-shrink: 0;
    }
    
    .header-btn {
        padding: 0.5rem;
        font-size: 1rem;
        min-width: 42px;
        min-height: 42px;
        border-radius: 11px;
    }
    
    .notification-badge {
        top: -1px;
        right: -1px;
        font-size: 0.6rem;
        padding: 0.125rem 0.3rem;
        min-width: 16px;
        border-radius: 10px;
    }
    
    .notification-dropdown {
        min-width: 300px;
        right: 0;
        left: auto;
        transform: translateX(0);
    }
}

@media (max-width: 576px) {
    .top-header {
        padding: 0.75rem 0.875rem;
        margin: 0.5rem 0.875rem 0 0.875rem;
        border-radius: 12px;
        gap: 0.75rem;
        min-height: 58px;
    }
    
    .header-left {
        gap: 0.75rem;
    }
    
    .sidebar-toggle {
        width: 40px;
        height: 40px;
        padding: 0.625rem;
        font-size: 1rem;
    }
    
    .page-title h1 {
        font-size: 1.2rem;
        line-height: 1.1;
    }
    
    .page-subtitle {
        font-size: 0.75rem;
        line-height: 1.3;
        margin-top: 0.1rem;
    }
    
    .page-badges {
        display: none;
    }
    
    .header-right {
        gap: 0.625rem;
    }
    
    .header-btn {
        min-width: 38px;
        min-height: 38px;
        padding: 0.45rem;
        font-size: 0.95rem;
        border-radius: 10px;
    }
    
    .notification-badge {
        font-size: 0.55rem;
        padding: 0.1rem 0.25rem;
        min-width: 14px;
        border-radius: 8px;
    }
    
    .notification-dropdown {
        min-width: 280px;
        max-width: calc(100vw - 2rem);
        right: 0.5rem;
        left: auto;
    }
}

@media (max-width: 480px) {
    .top-header {
        padding: 0.625rem 0.75rem;
        margin: 0.375rem 0.75rem 0 0.75rem;
        gap: 0.625rem;
        min-height: 54px;
    }
    
    .sidebar-toggle {
        width: 36px;
        height: 36px;
        padding: 0.5rem;
        font-size: 0.9rem;
    }
    
    .page-title h1 {
        font-size: 1.1rem;
    }
    
    .page-subtitle {
        font-size: 0.7rem;
        opacity: 0.7;
    }
    
    .header-btn {
        min-width: 36px;
        min-height: 36px;
        padding: 0.4rem;
        font-size: 0.9rem;
        border-radius: 9px;
    }
    
    .notification-dropdown {
        min-width: 260px;
        max-width: calc(100vw - 1.5rem);
        right: 0.25rem;
    }
} 