/* Topbar — Data-Dense Dashboard Style */

.topbar3 {
    margin-bottom: 0;
    padding: 0 !important;
    min-height: 52px;
    box-sizing: border-box;
    background: #fff !important;
    border-bottom: 1px solid #e2e8f0 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06) !important;
    display: flex;
    align-items: stretch;
}

.topbar3-brand {
    display: flex;
    align-items: center;
    padding: 0 1.25rem;
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
    letter-spacing: -0.02em;
    white-space: nowrap;
    border-right: 1px solid #e2e8f0;
}

.topbar3-brand i {
    color: #2563eb;
    margin-right: 8px;
    font-size: 1.1rem;
}

.topbar3-nav {
    display: flex;
    align-items: stretch;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex: 1;
    gap: 0;
    padding: 0 0.5rem;
}

.topbar3-nav::-webkit-scrollbar {
    display: none;
}

.topbar3-nav a {
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none !important;
    font-size: 0.82rem !important;
    font-weight: 500;
    padding: 0 0.75rem !important;
    color: #64748b !important;
    border-bottom: 2px solid transparent;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
    white-space: nowrap;
    cursor: pointer;
    position: relative;
}

.topbar3-nav a i {
    font-size: 0.85rem;
    opacity: 0.7;
}

.topbar3-nav a:hover {
    color: #2563eb !important;
    background: #f1f5f9;
}

.topbar3-nav a.active {
    font-weight: 600 !important;
    color: #2563eb !important;
    border-bottom-color: #2563eb !important;
    background: #eff6ff;
}

.topbar3-nav a.active i {
    opacity: 1;
}

/* Profile / Right section */
.topbar3-right {
    display: flex;
    align-items: center;
    padding: 0 1rem;
    border-left: 1px solid #e2e8f0;
    margin-left: auto;
    flex-shrink: 0;
}

.topbar3-right .btn-user {
    font-size: 0.8rem;
    font-weight: 500;
    color: #475569;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 4px 12px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    text-decoration: none;
}

.topbar3-right .btn-user:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
    color: #1e293b;
}

/* Mobile */
@media (max-width: 768px) {
    .topbar3 {
        flex-direction: column !important;
        padding: 0 !important;
        min-height: auto;
    }

    .topbar3-brand {
        display: none;
    }

    .topbar3-nav {
        width: 100%;
        padding: 0 4px;
        overflow-x: auto;
    }

    .topbar3-nav a {
        font-size: 0.72rem !important;
        padding: 8px 8px !important;
    }

    .topbar3-nav a i {
        display: none;
    }

    .topbar3-right {
        position: absolute;
        right: 6px;
        top: 4px;
        border-left: none;
        padding: 0;
    }

    .topbar3-right .btn-user {
        font-size: 0.68rem;
        padding: 2px 8px;
    }
}
