@import url('https://fonts.googleapis.com/css2?family=Barlow+Semi+Condensed:wght@300;400;600&display=swap');

:root {
    --primary-color: #FF7316;
    --dark-gray: #585858;
    --medium-gray: #6E6E6E;
    --light-gray: #9B9B9B;
    --background-light: #fff;
    --semi-transparent-dark: #00000029;
    --semi-transparent-light: #00000010;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Barlow Semi Condensed', sans-serif;
}

html, body {
    height: 100%;
    background-color: var(--background-light);
    color: var(--dark-gray);
    font-size: 16px;
}

/* HEADER */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 999;
    background-color: #fff;
    box-shadow: 0 2px 5px var(--semi-transparent-light);
    
}

.header-top {
    background-color: var(--primary-color);
    height: 40px;
    width: 100%;
}

.navbar {
    height: 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}


/* Barra de búsqueda */
.search-bar {
    display: flex;
    align-items: center;
}

.search-bar input {
    padding: 5px;
    border: 1px solid var(--semi-transparent-dark);
    border-radius: 4px;
    font-size: 14px;
}

.search-bar button {
    background-color: var(--primary-color);
    border: none;
    padding: 5px;
    margin-left: 10px;
    cursor: pointer;
    color: white;
}

/* Menú Usuario */
.user-menu .dropdown {

    position: relative;
}

.user-menu .dropdown-button {
    background-color: #9B9B9B;
    color: white;
    padding: 6px 12px; /* antes: 10px 16px */
    font-size: 14px;   /* antes: 16px */
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;           /* un poco menos separación entre íconos/texto */
    transition: background-color 0.3s;
}


.user-menu .dropdown-button:hover {
    background-color: #585858;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background-color: var(--background-light);
    min-width: 200px;
    box-shadow: 0 2px 5px var(--semi-transparent-dark);
    z-index: 1000;
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* SIDEBAR */
.sidebar {
    position: fixed;
    top: 80px; /* Altura header-top (40px) + navbar (40px) */
    left: 0;
    width: 250px;
    height: calc(100vh - 80px); /* Restando altura del header */
    background-color: var(--dark-gray);
    color: white;
    padding-top: 20px;
    overflow-y: auto;
    z-index: 998;
}

.sidebar a {
    display: block;
    color: white;
    padding: 15px 20px;
    font-size: 18px;
    text-decoration: none;
    transition: background-color 0.3s;
    cursor: pointer;
}

.sidebar a:hover {
    background-color: var(--primary-color);
}

.sidebar a.active {
    background-color: var(--primary-color);
}

.submenu {
    display: none;
    background-color: #444;
    padding-left: 30px;
}

.submenu a {
    font-size: 16px;
    padding: 10px 20px;
    color: #fff;
    display: block;
    transition: background-color 0.3s;
}

.submenu a:hover {
    background-color: var(--primary-color);
}

/* MAIN CONTENT */
.main-content {
    margin-left: 250px; /* Ancho del sidebar */
    margin-top: 80px;  /* Altura total header */
    padding: 20px;
    background-color: var(--background-light);
    min-height: calc(100vh - 80px); /* Que no se quede atrás del footer */
}

/* FOOTER */
footer {
    background-color: var(--dark-gray);
    color: white;
    text-align: center;
    padding: 10px;
    width: 100%;
    margin-top: auto;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .sidebar {
        width: 200px;
        height: calc(100vh - 80px);
    }
    .main-content {
        margin-left: 200px;
        margin-top: 80px;
    }
}

@media (max-width: 480px) {
    .sidebar {
        width: 150px;
        height: calc(100vh - 80px);
    }
    .main-content {
        margin-left: 150px;
        margin-top: 80px;
    }

    .search-bar input {
        font-size: 12px;
    }

    .search-bar button {
        padding: 3px;
        font-size: 12px;
    }
}
