.header {
    background: white;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 72px;
}

.logo a {
    text-decoration: none;
    align-items: center;
}

.logo-text {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: #1e293b;
}

.logo-accent {
    background: linear-gradient(135deg, #4361ee, #3a0ca3);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
}

.logo-accent::before {
    content: '';
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    opacity: 0.5;
    filter: blur(1px);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-action {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 12px;
    color: #475569;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.15s ease;
    border: 2px solid transparent;
}

.nav-action:hover,
.nav-action:focus {
    background: #f1f5ff;
    color: #4361ee;
}

.nav-action.active {
    background: #eef4ff;
    color: #4361ee;
    border-color: #cbd5ff;
}

.nav-action svg {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    stroke-width: 1.8;
}

.nav-telegram {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #eef7ff;
    color: #0088cc;
    text-decoration: none;
    transition: all 0.2s ease;
}

.nav-telegram:hover {
    background: #dbebff;
    transform: scale(1.08);
}

.nav-telegram svg {
    width: 18px;
    height: 18px;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: #1e293b;
}

.logout-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #f1f3f5;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
}

.logout-btn:hover {
    background: #e2e8f0;
    transform: rotate(15deg);
}

.logout-btn svg {
    width: 16px;
    height: 16px;
    stroke-width: 2;
}

.btn-primary {
    padding: 8px 20px;
    font-weight: 600;
    border-radius: 12px;
    background: #4361ee;
    color: white;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: #3a56e4;
}

.burger-btn {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
}

.burger-btn span {
    display: block;
    width: 20px;
    height: 2px;
    background: #334155;
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.2s;
}



@media (max-width: 768px) {
    .burger-btn {
        display: flex !important;
    }

    .nav-menu {
        position: fixed;
        top: 72px;
        right: -100%;
        flex-direction: column;
        background: white;
        width: 260px;
        height: calc(100vh - 72px);
        padding: 32px 20px;
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.12);
        transition: right 0.3s cubic-bezier(0.2, 0, 0, 1);
        z-index: 1000;
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-action,
    .nav-telegram,
    .nav-user {
        width: 100%;
        justify-content: flex-start;
        padding: 14px 0;
        font-size: 1.1rem;
    }

    .nav-action svg,
    .nav-telegram svg {
        width: 20px;
        height: 20px;
    }

    .nav-telegram {
        border-radius: 12px;
        justify-content: flex-start;
        gap: 12px;
        background: #f0f9ff;
        padding-left: 16px;
    }

    .nav-user {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding-top: 24px;
        margin-top: 16px;
        border-top: 1px solid #e2e8f0;
    }

    .logout-btn {
        align-self: flex-start;
        width: auto;
        padding: 0 12px;
        height: 36px;
    }

    .mobile-hide {
        display: none;
    }

    body.menu-open::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.4);
        z-index: 999;
    }

    body.menu-open {
        overflow: hidden;
    }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ===== ВЫПАДАЮЩИЕ МЕНЮ ===== */
.nav-dropdown {
    position: relative;
}

.nav-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border-radius: 12px;
    color: #475569;
    background: none;
    border: none;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.nav-toggle:hover,
.nav-toggle.active {
    background: #f1f5ff;
    color: #4361ee;
}

.nav-dropdown.open .arrow,

.arrow {
    transition: transform 0.2s ease;
}

@media (min-width: 769px) {
    .nav-dropdown:hover .arrow {
        transform: rotate(180deg);
    }
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    min-width: 200px;
    overflow: hidden;
    z-index: 1000;
    display: none;
    animation: slideDown 0.2s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nav-dropdown.open .dropdown-menu {
    display: block;
}

@media (min-width: 769px) {
    .nav-dropdown:hover .dropdown-menu {
        display: block;
    }
}

.dropdown-item {
    display: block;
    padding: 12px 20px;
    color: #334155;
    text-decoration: none;
    transition: background 0.15s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dropdown-item:hover {
    background: #f8f9fa;
}

.dropdown-item.active {
    background: #eef4ff;
    color: #4361ee;
    font-weight: 600;
}

@media (max-width: 768px) {
    .nav-dropdown {
        width: 100%;
    }

    .nav-toggle {
        width: 100%;
        justify-content: space-between;
        text-align: left;
        padding: 14px 0;
    }

    .dropdown-menu {
        position: static;
        box-shadow: none;
        margin-top: 12px;
        border-radius: 10px;
        animation: none;
        display: none;
    }

    .nav-dropdown.open .dropdown-menu {
        display: block;
    }
}