/*--------------------------------------------------------------
# General
--------------------------------------------------------------*/
:root {
    scroll-behavior: smooth;
    --primary-color: #2c3e50; /* Azul Índigo */
    --secondary-color: #1abc9c; /* Verde Menta */
    --text-color: #555;
    --bg-light: #f6f9ff;
    --bg-dark: #e9ecef;
}

body {
    font-family: "Poppins", sans-serif;
    background: var(--bg-light);
    color: var(--text-color);
}

a {
    color: var(--secondary-color);
    text-decoration: none;
}

a:hover {
    color: #ff472e;
    text-decoration: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: "Nunito", sans-serif;
    color: var(--primary-color);
}

/*--------------------------------------------------------------
# Main
--------------------------------------------------------------*/
#main {
    margin-top: 60px;
    padding: 20px 30px;
    transition: all 0.3s;
}

@media (max-width: 1199px) {
    #main {
        padding: 20px;
    }
}

/*--------------------------------------------------------------
# Page Title
--------------------------------------------------------------*/
.pagetitle {
    margin-bottom: 20px;
}

.pagetitle h1 {
    font-size: 24px;
    margin-bottom: 0;
    font-weight: 600;
    color: var(--primary-color);
}

/*--------------------------------------------------------------
# Back to top button
--------------------------------------------------------------*/
.back-to-top {
    position: fixed;
    visibility: hidden;
    opacity: 0;
    right: 15px;
    bottom: 15px;
    z-index: 99999;
    background: var(--secondary-color);
    width: 40px;
    height: 40px;
    border-radius: 4px;
    transition: all 0.4s;
}

.back-to-top i {
    font-size: 24px;
    color: #fff;
    line-height: 0;
}

.back-to-top:hover {
    background: #159b85;
    color: #fff;
}

.back-to-top.active {
    visibility: visible;
    opacity: 1;
}

/*--------------------------------------------------------------
# Override some default Bootstrap stylings
--------------------------------------------------------------*/
/* Dropdown menus */
.dropdown-menu {
    border-radius: 4px;
    padding: 10px 0;
    -webkit-animation-name: dropdown-animate;
    animation-name: dropdown-animate;
    -webkit-animation-duration: 0.2s;
    animation-duration: 0.2s;
    -webkit-animation-fill-mode: both;
    animation-fill-mode: both;
    border: 0;
    box-shadow: 0 5px 30px 0 rgba(82, 63, 105, 0.2);
}

.dropdown-menu .dropdown-header,
.dropdown-menu .dropdown-footer {
    text-align: center;
    font-size: 15px;
    padding: 10px 25px;
}

.dropdown-menu .dropdown-footer a {
    color: #444444;
    text-decoration: underline;
}

.dropdown-menu .dropdown-footer a:hover {
    text-decoration: none;
}

.dropdown-menu .dropdown-divider {
    color: #a5c5fe;
    margin: 0;
}

.dropdown-menu .dropdown-item {
    font-size: 14px;
    padding: 10px 15px;
    transition: 0.3s;
}

.dropdown-menu .dropdown-item i {
    margin-right: 10px;
    font-size: 18px;
    line-height: 0;
}

.dropdown-menu .dropdown-item:hover {
    background-color: #f6f9ff;
}

@media (min-width: 768px) {
    .dropdown-menu-arrow::before {
        content: "";
        width: 13px;
        height: 13px;
        background: #fff;
        position: absolute;
        top: -7px;
        right: 20px;
        transform: rotate(45deg);
        border-top: 1px solid #eaedf1;
        border-left: 1px solid solid #eaedf1;
    }
}

@-webkit-keyframes dropdown-animate {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }

    0% {
        opacity: 0;
    }
}

@keyframes dropdown-animate {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }

    0% {
        opacity: 0;
    }
}

/* Light Backgrounds */
.bg-primary-light {
    background-color: #cfe2ff;
    border-color: #cfe2ff;
}

.bg-secondary-light {
    background-color: #e2e3e5;
    border-color: #e2e3e5;
}

.bg-success-light {
    background-color: #d1e7dd;
    border-color: #d1e7dd;
}

.bg-danger-light {
    background-color: #f8d7da;
    border-color: #f8d7da;
}

.bg-warning-light {
    background-color: #fff3cd;
    border-color: #fff3cd;
}

.bg-info-light {
    background-color: #cff4fc;
    border-color: #cff4fc;
}

.bg-dark-light {
    background-color: #d3d3d4;
    border-color: #d3d3d4;
}

/* Cards */
.card {
    margin-bottom: 30px;
    border: none;
    border-radius: 10px;
    box-shadow: 0px 0 30px rgba(1, 41, 112, 0.1);
}

.card-header,
.card-footer {
    border-color: #ebeef4;
    background-color: #fff;
    color: #798eb3;
    padding: 15px;
}

.card-title {
    padding: 20px 0 15px 0;
    font-size: 18px;
    font-weight: 500;
    color: #012970;
    margin-bottom: 0;
}

.card-title span {
    color: #899bbd;
    font-size: 14px;
    font-weight: 400;
}

.card-body {
    padding: 0 20px 20px 20px;
}

.card-img-overlay {
    background-color: rgba(255, 255, 255, 0.6);
}

/* Alerts */
.alert-heading {
    font-weight: 500;
    font-family: "Poppins", sans-serif;
    font-size: 20px;
}

/* Close Button */
.btn-close {
    background-size: 25%;
}

.btn-close:focus {
    outline: 0;
    box-shadow: none;
}

/* Accordion */
.accordion-item {
    border: 1px solid #ebeef4;
}

.accordion-button:focus {
    outline: 0;
    box-shadow: none;
}

.accordion-button:not(.collapsed) {
    color: #012970;
    background-color: #f6f9ff;
}

.accordion-flush .accordion-button {
    padding: 15px 0;
    background: none;
    border: 0;
}

.accordion-flush .accordion-button:not(.collapsed) {
    box-shadow: none;
    color: #4154f1;
}

.accordion-flush .accordion-body {
    padding: 0 0 15px 0;
    color: #3e4f6f;
    font-size: 15px;
}

/* Breadcrumbs */
.breadcrumb {
    font-size: 14px;
    font-family: "Nunito", sans-serif;
    color: #899bbd;
    font-weight: 600;
}

.breadcrumb a {
    color: #899bbd;
    transition: 0.3s;
}

.breadcrumb a:hover {
    color: #51678f;
}

.breadcrumb .breadcrumb-item::before {
    color: #899bbd;
}

.breadcrumb .active {
    color: #51678f;
    font-weight: 600;
}

/*--------------------------------------------------------------
# Header
--------------------------------------------------------------*/
.header {
    transition: all 0.5s;
    z-index: 997;
    height: 60px;
    box-shadow: 0px 2px 20px rgba(1, 41, 112, 0.1);
    background-color: var(--primary-color);
    padding-left: 20px;
}

.header .logo {
    line-height: 1;
}

/* Ajustes para el logo */
.header .logo img {
    max-height: 40px;
    width: auto;
}

/* Ajustes para las imágenes de perfil en el header */
.header .nav-profile img {
    max-height: 40px;
    width: auto;
}

.header .search-bar {
    min-width: 360px;
    padding: 0 20px;
}

/* Color para el texto de la hora */
.header .search-bar,
.header .search-bar span {
    color: #fff;
}

/* Botón para ocultar/mostrar el menú */
.toggle-sidebar-btn {
    font-size: 32px;
    padding-left: 10px;
    cursor: pointer;
    color: #fff;
}

/*--------------------------------------------------------------
# Header Nav
--------------------------------------------------------------*/
.header-nav ul {
    list-style: none;
}

.header-nav>ul {
    margin: 0;
    padding: 0;
}

.header-nav .nav-icon {
    font-size: 22px;
    color: #f6f9ff75;
    margin-right: 25px;
    position: relative;
}

.header-nav .nav-profile {
    color: #f6f9ff75;
}

.header-nav .nav-profile span {
    font-size: 14px;
    font-weight: 600;
}

.header-nav .badge-number {
    position: absolute;
    inset: -2px -5px auto auto;
    font-weight: normal;
    font-size: 12px;
    padding: 3px 6px;
}

.header-nav .notifications {
    inset: 8px -15px auto auto !important;
}

.header-nav .notifications .notification-item {
    display: flex;
    align-items: center;
    padding: 15px 10px;
    transition: 0.3s;
}

.header-nav .notifications .notification-item i {
    margin: 0 20px 0 10px;
    font-size: 24px;
}

.header-nav .notifications .notification-item h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 5px;
}

.header-nav .notifications .notification-item p {
    font-size: 13px;
    margin-bottom: 3px;
    color: #919191;
}

.header-nav .notifications .notification-item:hover {
    background-color: #f6f9ff;
}

/*--------------------------------------------------------------
# Sidebar
--------------------------------------------------------------*/
.sidebar {
    position: fixed;
    top: 60px;
    left: 0;
    bottom: 0;
    width: 300px;
    z-index: 996;
    transition: all 0.3s;
    padding: 20px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--secondary-color) rgba(0, 0, 0, 0.1);
    background-color: var(--primary-color);
    box-shadow: 0px 0px 20px rgba(1, 41, 112, 0.1);
}

.sidebar-nav {
    padding: 0;
    margin: 0;
    list-style: none;
}

.sidebar .sidebar-nav .nav-item {
    margin-bottom: 5px;
}

.sidebar .sidebar-nav .nav-heading {
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 600;
    color: #a4c6e9;
    margin: 10px 0 5px 15px;
}

.sidebar .sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    transition: 0.3s;
    background: var(--primary-color);
    padding: 10px 15px;
    border-radius: 8px;
}

.sidebar .sidebar-nav .nav-link i {
    font-size: 1.2rem;
    margin-right: 15px;
    color: #a4c6e9;
}

.sidebar .sidebar-nav .nav-link.collapsed {
    color: #fff;
    background: var(--primary-color);
}

.sidebar .sidebar-nav .nav-link:hover {
    color: #fff;
    background: var(--secondary-color);
}

.sidebar .sidebar-nav .nav-link:hover i {
    color: #fff;
}

.sidebar .sidebar-nav .nav-link .bi-chevron-down {
    margin-right: 0;
    transition: transform 0.2s ease-in-out;
}

.sidebar .sidebar-nav .nav-link:not(.collapsed) .bi-chevron-down {
    transform: rotate(180deg);
}

.sidebar .sidebar-nav .nav-content {
    list-style: none;
    padding-left: 10px;
}

.sidebar .sidebar-nav .nav-content a {
    display: flex;
    align-items: center;
    font-size: 14px;
    font-weight: 600;
    color: #f7f9fd;
    transition: 0.3;
    padding: 8px 0 8px 30px;
}

.sidebar .sidebar-nav .nav-content a i {
    font-size: 8px;
    margin-right: 8px;
    line-height: 0;
    border-radius: 50%;
}

.sidebar .sidebar-nav .nav-content a:hover,
.sidebar .sidebar-nav .nav-content a.active {
    color: #fff;
}

/* Reglas de movimiento del sidebar */

/* 🚀 FIX para ocultar el sidebar en todas las resoluciones cuando el body tiene la clase 'toggle-sidebar' */
body.toggle-sidebar .sidebar {
    left: -300px !important;
}
/* --------------------------------------------------------------------------------------------------- */


@media (min-width: 1200px) {
    #main,
    #footer,
    .pagetitle {
        margin-left: 300px;
    }
}

/* @media (min-width: 1200px) {
    .toggle-sidebar #sidebar { 
        left: -300px;
    } 
} */ /* REGLA ANTERIOR COMENTADA/REEMPLAZADA */

@media (min-width: 1200px) {
    body.toggle-sidebar #main,
    body.toggle-sidebar #footer,
    body.toggle-sidebar .pagetitle {
        margin-left: 0;
    }
}