.header {
    background: rgba(255, 255, 255, 0.96);
    border-radius: 16px;
    padding: 8px 16px;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.15);
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 100px;
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.35);
    overflow: hidden;
}

.header-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 46px;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.brand-logo {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: #fff;
    background: linear-gradient(135deg, #667eea, #764ba2);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.25);
}

.brand-copy strong {
    font-size: 0.9rem;
    color: #1f2937;
}

.brand-copy span {
    font-size: 0.75rem;
    color: #4a5568;
    opacity: 0.8;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.icon-btn {
    border: none;
    background: #f1f5f9;
    border-radius: 12px;
    padding: 8px 10px;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
}

.icon-btn:hover {
    transform: translateY(-1px);
    background: #e2e8f0;
}

.icon-btn.danger {
    background: #fee2e2;
    color: #c53030;
}

.sync-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #1f2937;
}

.sync-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #38a169;
    box-shadow: 0 0 0 4px rgba(56, 161, 105, 0.2);
}

.sync-indicator.syncing {
    background: #f6ad55;
}

.sync-indicator.error {
    background: #e53e3e;
}

.user-info {
    background: #eef2ff;
    padding: 6px 12px;
    border-radius: 12px;
    font-weight: 600;
    color: #312e81;
    display: flex;
    align-items: center;
    gap: 6px;
}

.header-nav-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 36px;
}

.nav-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
    flex: 1;
}

.nav-scroll::-webkit-scrollbar {
    height: 6px;
}

.nav-scroll::-webkit-scrollbar-thumb {
    background: rgba(56, 161, 105, 0.35);
    border-radius: 10px;
}

.nav-btn {
    border: none;
    background: #fdfdfd;
    border-radius: 12px;
    padding: 6px 12px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
}

.nav-btn.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    box-shadow: 0 15px 25px rgba(102, 126, 234, 0.3);
}

.notification-badge {
    margin-left: 6px;
    font-size: 0.65rem;
    font-weight: 700;
    background: #dc2626;
    color: white;
    border-radius: 999px;
    padding: 0 6px;
    min-width: 20px;
    height: 18px;
    display: none;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.nav-btn:hover {
    transform: translateY(-1px);
    border: 1px solid rgba(103, 126, 234, 0.5);
    color: #4c51bf;
}

.nav-more {
    position: relative;
    display: flex;
    align-items: center;
}

.dropdown-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    min-width: 220px;
    background: white;
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, 0.1);
    box-shadow: 0 20px 35px rgba(15, 23, 42, 0.25);
    display: none;
    flex-direction: column;
    padding: 6px 0;
    z-index: 1000;
}

.dropdown-menu.is-open {
    display: flex;
}

.dropdown-item {
    border: none;
    background: transparent;
    text-align: left;
    padding: 9px 16px;
    width: 100%;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    color: #1f2937;
    transition: background 0.2s ease;
}

.dropdown-item:hover {
    background: #f1f5f9;
}

.dropdown-item.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

@media (max-width: 960px) {
    .header {
        max-height: none;
    }

    .nav-scroll {
        gap: 6px;
    }

    .header-actions {
        flex: 1;
        justify-content: flex-end;
    }
}

@media (max-width: 720px) {
    .header-main {
        flex-direction: column;
        align-items: flex-start;
    }

    .header-nav-row {
        flex-direction: column;
        align-items: stretch;
    }

    .nav-scroll {
        order: 2;
        padding-top: 6px;
    }

    .nav-more {
        order: 1;
        align-self: flex-end;
    }
}
