/* ============================================================================
   Шапка приложения и навигация
   ============================================================================ */

.app-header {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    position: relative;
    z-index: 1100;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1.25rem;
    padding-bottom: 1.25rem;
}

.logo {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.logo a {
    font-size: 1.5rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #495057;
    text-decoration: none;
    display: inline-block;
    transition: color 0.2s ease;
}


.logo a:hover {
    color: #212529;
}

.logo-tagline {
    font-size: 0.875rem;
    line-height: 1.25rem;
    font-style: italic;
    color: #6b7280;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-button {
    border-radius: 8px;
    padding: 0.625rem 1.5rem;
    font-size: 1rem;
    line-height: 1.5rem;
    font-weight: 600;
    transition: 0.3s;
    background: #fff;
    border: 2px solid rgba(16, 100, 209, 0.3);
    color: var(--brand-text);
}

.nav-button:hover {
    border:2px solid var(--accent-color);
}

.nav-button-primary {
    background: var(--accent-color);
    color: #fff;
    border: 2px solid var(--accent-color);
    cursor: default;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-size: 0.95rem;
}

.user-info-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    padding: 0.5rem 1rem;
    background: rgb(255, 255, 255);
    border: 2px solid rgba(16, 100, 209, 0.3);
    border-radius: 8px;
}

.user-name {
    font-weight: 600;
    color: var(--brand-text);
    font-size: 0.9rem;
    line-height: 1.2;
}

.user-role {
    font-weight: 500;
    color: #6b7280;
    font-size: 0.8rem;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.link-button {
    cursor: pointer;
    border: 2px solid var(--brand-red);
    border-radius: 8px;
    height: 56px;
    width: 100px;
    background-color: transparent;
    padding: 0;
    font-weight: 600;
    color: var(--brand-red);
    transition: 0.3s;
}

.link-button:hover {
    background-color: var(--brand-red);
    color: #ffffff;
}

/* ============================================================================
   АДАПТИВНОСТЬ ДЛЯ МОБИЛЬНЫХ УСТРОЙСТВ
   ============================================================================ */

/* Мобильное меню (бургер) */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1101;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--brand-red);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Адаптивность для планшетов и мобильных */
@media (max-width: 1024px) {
    .header-content {
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .main-nav {
        order: 3;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    
    .main-nav.active {
        max-height: 500px;
        padding-top: 1rem;
    }
    
    .nav-button,
    .nav-button-primary {
        width: 100%;
        text-align: center;
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    .user-info {
        order: 2;
        margin-left: auto;
        gap: 1rem;
    }
    
    .user-info-content {
        font-size: 0.85rem;
    }
    
    .logo {
        order: 1;
    }
    
    .logo a {
        font-size: 1.25rem;
    }
    
    .logo-tagline {
        font-size: 0.75rem;
    }
}

/* Мобильные устройства */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
        order: 2;
    }
    
    .header-content {
        padding-top: 1rem;
        padding-bottom: 1rem;
    }
    
    .logo {
        flex: 1;
    }
    
    .logo a {
        font-size: 1.1rem;
    }
    
    .logo-tagline {
        display: none;
    }
    
    .user-info {
        order: 3;
        width: 100%;
        justify-content: space-between;
        margin-left: 0;
        margin-top: 0.5rem;
    }
    
    .user-info-content {
        flex: 1;
        padding: 0.4rem 0.75rem;
    }
    
    .user-name {
        font-size: 0.85rem;
    }
    
    .user-role {
        font-size: 0.7rem;
    }
    
    .main-nav {
        order: 4;
    }
}

