@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap');

body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    background: #f4f4f4;
}

.container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.login-box {
    background: #fff;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    width: 350px;
}

h2 {
    text-align: center;
    color: #b30000;
}

.login-box form {
    display: grid;
    gap: 14px;
    margin-top: 20px;
}

.login-box form input,
.login-box form button {
    width: 100%;
    box-sizing: border-box;
}

.login-box form input {
    padding: 10px;
    margin: 0;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.login-box form button {
    padding: 10px;
    background: #b30000;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

button:hover {
    background: #800000;
}

.error {
    color: red;
    text-align: center;
}

.dashboard {
    padding: 20px;
}

.header {
    display: flex;
    justify-content: space-between;
    background: #333;
    color: #fff;
    padding: 15px;
}

/* RESET BÁSICO */
body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f4f4;
}

/* HEADER */
.header {
    background-color: #b30000;
    color: white;
    padding: 15px 40px; /* 🔥 antes 20px, ahora más espacio */
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header .logout {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
}

.header .logout:hover {
    text-decoration: underline;
}


/* SIDEBAR */

.sidebar ul {
    list-style: none;
    padding: 0;
}

.sidebar ul li {
    margin: 0;
}

.sidebar ul li a {
    display: block;
    padding: 15px 20px;
    color: #ccc;
    text-decoration: none;
    transition: 0.3s;
}

/* EFECTO HOVER */
.sidebar ul li a:hover {
    background-color: #b30000;
    color: #fff;
}

/* CONTENIDO */
.content {
    margin-left: 240px; /* mismo ancho del sidebar */
    padding: 30px;
}
.content {
    margin-left: 240px;
    margin-top: 70px;
}

.container {
    display: flex;
    height: calc(100vh - 70px); /* ajusta según altura del header */
}

/* SIDEBAR */
.sidebar {
    width: 240px;
    background-color: #2e2e2e;
    height: 100vh; /* 🔥 ocupa toda la altura */
    position: fixed; /* 🔥 se queda fijo */
    top: 70px; /* altura del header */
    left: 0;
}

.header h3 {
    margin-left: 10px;
}

.sidebar {
    top: 0;
    height: 100vh;
}

/* SECCIÓN LOGO */
.logo-section {
    text-align: center;
    padding: 20px 10px;
    border-bottom: 1px solid #444;
}

.logo-section img {
    width: 80px;
    height: auto;
    margin-bottom: 10px;
}

.logo-section h4 {
    color: #fff;
    font-size: 14px;
    font-weight: normal;
    margin: 0;
}

/* LINKS DEL MENÚ */
.sidebar ul li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 20px;
    color: #ccc;
    text-decoration: none;
    transition: 0.3s;
}

/* ICONOS */
.sidebar ul li a i {
    width: 20px;
    text-align: center;
}

/* HOVER */
.sidebar ul li a:hover {
    background-color: #b30000;
    color: #fff;
}

/* ACTIVO */
.sidebar ul li a.active {
    background-color: #b30000;
    color: #fff;
    border-left: 4px solid #ffffff;
}

.content h2 {
    color: #b30000;
    font-size: 28px;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* ICONO CONFIG */
.dropdown {
    position: relative;
    cursor: pointer;
}

.dropdown-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    min-height: 32px;
    padding: 0;
    border: 0;
    border-radius: 4px;
    color: inherit;
    background: transparent;
    cursor: pointer;
}

.dropdown-toggle:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.dropdown i {
    font-size: 18px;
    color: white;
}

/* SUBMENÚ */
.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background-color: #fff;
    min-width: 220px;
    box-shadow: 0px 4px 10px rgba(0,0,0,0.2);
    border-radius: 5px;
    overflow: hidden;
    z-index: 1000;
}

.dropdown-content a {
    display: block;
    padding: 12px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
}

.dropdown-content a:hover {
    background-color: #f4f4f4;
}

/* MOSTRAR AL HOVER */
.dropdown:hover .dropdown-content,
.dropdown:focus-within .dropdown-content {
    display: block;
}
