<body>
    <style>
    .topnav {

        overflow: hidden;
        background: var(--gris-oscuro);
        border-top: 10px solid var(--principal);
        display: flex;
        position: fixed;
        top: 0;
        color: #fff;
        z-index: 1;
        box-shadow: 1px 3px 4px 1px rgb(17 17 17 / 32%);
        width: 100%;
        justify-content: space-between;



    }

    /* Style the links inside the navigation bar */
    .topnav a {
        float: left;
        display: block;
        color: #f2f2f2;
        text-align: center;
        padding: 10px 16px;
        text-decoration: none;
        font-size: 15px;
    }

    /* Add an active class to highlight the current page */


    /* Hide the link that should open and close the topnav on small screens */
    .topnav .icon {
        display: none;
    }

    /* Dropdown container - needed to position the dropdown content */
    .dropdown {
        
        overflow: hidden;
        position: relative;
        display: inline-block;
        vertical-align: middle;
        
    }

    /* Style the dropdown button to fit inside the topnav */
    .dropdown .dropbtn {
        font-size: 15px;
        border: none;
        outline: none;
        color: white;
        padding: 10px 16px;
        background-color: inherit;
        font-family: inherit;
        margin: 0;
    }

    /* Style the dropdown content (hidden by default) */
    .dropdown-content {
        position: unset;
        display: none;
        float: right;
        text-align: right;
        list-style: none;
        background-color: #ff7f50;
        border: none;
        outline: none;
        color: white;
        min-width: 0px;
        padding: 1px 0;
        margin: 1px 0 0;
        box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
    }

    /* Style the links inside the dropdown */
    .dropdown-content a {
        float: none;
        color: black;
        padding: 10px 12px;
        text-decoration: none;
        display: block;
        text-align: left;
    }

    /* Add a dark background on topnav links and the dropdown button on hover */
    .topnav a:hover,
    .dropdown:hover .dropbtn {
        background-color: #555;
        color: white;
    }

    /* Add a grey background to dropdown links on hover */
    .dropdown-content a:hover {
        background-color: #ddd;
        color: black;
    }

    /* Show the dropdown menu when the user moves the mouse over the dropdown button */
    .dropdown:hover .dropdown-content {
        display: block;
    }

    /* When the screen is less than 600 pixels wide, hide all links, except for the first one ("Home"). Show the link that contains should open and close the topnav (.icon) */
    @media screen and (max-width: 600px) {

        .topnav a:not(:first-child) {
            display: none;
        }

        .topnav a.icon {
            float: right;
            display: block;
        }

        .topnav .dropdown .dropbtn {
            font-size: 12px;
            border: none;
            outline: none;
            color: white;
            background-color: inherit;
            font-family: inherit;
            margin: 0;
        }
    }

    /* The "responsive" class is added to the topnav with JavaScript when the user clicks on the icon. This class makes the topnav look good on small screens (display the links vertically instead of horizontally) */
    @media screen and (max-width: 800px) {
        .topnav.responsive {
            position: fixed;
        }

        .topnav.responsive a.icon {
            position: absolute;
            right: 0;
            top: 0;

        }

        .topnav.responsive a {
            float: none;
            display: block;
            text-align: left;
            font-size: 10px;
        }

        .topnav.responsive .dropdown {
            float: none;
        }

        .topnav.responsive .dropdown-content {
        position: absolute;
        float: right;
        text-align: right;
        list-style: none;
        background-color: #ff7f50;
        box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
        }

        .topnav.responsive .dropdown-content a {
        float: none;
        color: black;
        text-decoration: none;
        display: block;
        text-align: right;
        font-size: 5px;
        }

        .topnav.responsive .dropdown .dropbtn {
            display: block;
            width: 100%;
            text-align: left;
        }
    }
    </style>
    <div class="topnav" id="myTopnav">
        <div id="spin" style="display: none"></div>


        <div class="dropdown">
            <button class="dropbtn">
                <span class="welcome">Bienvenid@:</span> <i class="fa fa-user"></i><strong style="font-size: 14px;"> <?php
                        echo ($this->session->userdata('TEX_NOMPAR')) ?
                        $this->session->userdata('TEX_NOMPAR') . ' ' . $this->session->userdata('TEX_APEPAR') : $this->session->userdata('TEX_USUARIO')
                        ?></strong>
                <i class="fa fa-caret-down"></i>
            </button>
            <div class="dropdown-content">
                <a href="<?= base_url('acceso/logout/1') ?> "><i class="fa fa-user"></i> Cerrar sesión</a>
            </div>
        </div>
        <a class="active"><?= (isset($nombre_empresa)) ? $nombre_empresa : '' ?></a>
        <a>
            <?= ($this->session->userdata('TEX_NOMSEG')) ? $this->session->userdata('TEX_NOMSEG') : 'AGENCIA' ?>
            : <i
                class="fa fa-home"></i><strong style="font-size: 11px;"><?= ($this->session->userdata('TEX_NOMAGE')) ? $this->session->userdata('TEX_NOMAGE') : '' ?></strong>
        </a>

      <!--  <a href="javascript:void(0);" class="icon" onclick="myFunction()">&#9776;</a>-->
    </div>
    <div class="messages">
        <?php echo ($this->session->flashdata('success')) ? '<div class="success">' . $this->session->flashdata('success') . '</div>' : ''; ?>
        <?php echo ($this->session->flashdata('error')) ? '<div class="error">' . $this->session->flashdata('error') . '</div>' : ''; ?>
    </div>
    <div class="container" id="wrap">
        <script>
        window.oncontextmenu = function() {
            return false;
        }

        function myFunction() {
            var x = document.getElementById("myTopnav");
            if (x.className === "topnav") {
                x.className += " responsive";
            } else {
                x.className = "topnav";
            }
        }
        </script>