:root {
    --primary-color: #152c4a;
    --primary-dark: #0B1535;
    --secondary-color: #f4a261;
    --background-color: #f8f9fa;
    --text-color: #333;
    --muted-color: #152c4a;
    --card-background: #ffffff;
}

body {
    font-family: "Inter", sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    transition: background-color 0.3s ease;
}

.sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    padding: 0;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
    background-color: var(--primary-dark) !important;
    transition: all 0.3s ease;
    width: 250px;
}

.sidebar.collapsed {
    width: 60px;
    overflow: hidden;
}

.sidebar-sticky {
    position: relative;
    top: 0;
    height: calc(100vh - 48px);
    padding-top: 0.5rem;
    overflow-x: hidden;
    overflow-y: auto;
}

.sidebar .nav-link {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.sidebar .nav-link:hover {
    color: #fff;
    background-color: #152c4a;
}

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

.sidebar-header {
    padding: 1rem;
    background-color: var(--primary-dark);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    max-width: 150px;
    height: auto;
    /*filter: brightness(0) invert(1);*/
    margin: 0px auto;
}

.sidebar .nav-link i {
    margin-right: 10px;
}

.sidebar .menu-text {
    display: inline;
    opacity: 1;
    width: auto;
    height: auto;
    transition: opacity 0.3s ease, width 0.3s ease;
}

span.menu-text {
    padding-left: 10px;
}

.sidebar.collapsed .menu-text {
    opacity: 0;
    width: 0;
    display: none;
}

.sidebar.collapsed .nav-link {
    justify-content: center;
}

.sidebar.collapsed .nav-link i {
    margin-right: 0;
}

main {
    padding-top: 2rem;
    padding-left: 2rem;
    transition: margin-left 0.3s ease, width 0.3s ease;
}

.card {
    margin-bottom: 1.5rem;
    border: none;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    background-color: var(--card-background);
}

.card:hover {
    /*transform: translateY(-5px);*/
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.btn-group .btn {
    font-size: 0.875rem;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

#salesChart {
    max-height: 300px;
}

#sidebarToggle {
    z-index: 1000;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 1.5rem;
    cursor: pointer;
}

#sidebarToggle:hover {
    color: #ffffff;
}

.sidebar-toggle-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background-color: var(--primary-color);
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sidebar-toggle-icon:hover {
    background-color: var(--primary-dark);
}

.date-range-buttons {
    display: flex;
}

.date-range-select {
    display: none;
}

.hamburger-menu {
    display: none;
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1001;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-color);
    cursor: pointer;
}

.company-info-btn {
    width: 100%;
    background-color: var(--company-info-bg);
    color: #ffffff;
    padding: 0.75rem 1rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.company-info-btn:hover {
    background-color: #152c4a;
}

.company-info-content {
    display: flex;
    flex-direction: column;
}

.company-name {
    font-weight: 500;
    font-size: 0.9rem;
}

.company-balance {
    font-size: 1.1rem;
    display: flex;
    align-items: center;
}

.info-icon {
    width: 16px;
    height: 16px;
    margin-left: 5px;
}

.chevron-icon {
    width: 20px;
    height: 20px;
}

.companyInfoBtn-div {
    padding: 10px;
    height: auto;
    transition: .2s;
}

.company-info-btn {
    background-color: #0F215D;
    border-radius: 7px;
}

ul.nav.flex-column {
    padding: 10px !important;
}

.sidebar.collapsed .companyInfoBtn-div {
    height: 0px;
    display: none;
}

.sidebar.collapsed ul.nav.flex-column {
    padding: 0px !important;
}

.company-balance {
    font-family: "Inter", sans-serif;
    font-style: normal;
    color: #ff6a73;
    font-weight: 600;
    font-size: 15px;
    line-height: 12px;
    margin-top: 10px;
}

.nav-item svg {
    width: 20px;
}

.company-balance svg {
    color: #ffffff;
}

h6.card-subtitle.mb-2.text-muted {
    color: #8d8fba !important;
    font-style: normal;
    font-weight: 600;
    font-size: 14px;
    line-height: 24px;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.card-title {
    color: #212247;
    font-size: 30px;
    font-weight: 700;
}

.card.card-custom .card-title {
    width: calc(100% - 32px);
    font-style: normal;
    font-weight: 700;
    font-size: 24px;
    line-height: 29px;
    letter-spacing: -0.01em;
    color: #212247;
    padding-bottom: 24px;
    border-bottom: 1px solid #d8d8e8;
}

.card.card-custom h2 {
    font-style: normal;
    font-weight: 700;
    font-size: 30px;
    line-height: 40px;
    letter-spacing: -0.02em;
    color: #585987;
}

.card.card-custom p.card-text.text-muted {
    font-style: normal;
    font-weight: 600;
    font-size: 14px;
    line-height: 24px;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: #8d8fba;
}

.projects-list {
    margin-top: 1rem;
}

.project-item {
    margin-bottom: 1rem;
}

.project-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.25rem;
}

.project-name {
    font-weight: 500;
}

.project-percentage {
    font-weight: 500;
}

.progress {
    height: 0.5rem;
    border-radius: 0.25rem;
}

.progress-bar {
    transition: width 0.6s ease;
}

.chart-container {
    position: relative;
    min-height: 300px;
    width: 100%;
}

.chart-container canvas {
    max-width: 100%;
    height: auto;
}

.sidebar.collapsed .logo {
    display: none;
}

.sidebar.collapsed .sidebar-header {
    padding: 10px 10px 10px 14px;
}

.chart-container {
    position: relative;
    min-height: 450px;
    width: 100%;
    margin-top: 50px;
}


.chart-container-large {
    position: relative;
    min-height: 850px;
    width: 100%;
    margin-top: 50px;
}

#radarChart, #donutChart {
    width: 100% !important;
    height: 100% !important;
}

.search-container {
    position: relative;
    width: 250px;
}

.search-container input {
    padding-right: 30px;
}

.search-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
}

.table th {
    font-weight: 600;
    color: #495057;
}

.table td {
    vertical-align: middle;
}

.pagination {
    margin-top: 1rem;
}

.page-link {
    color: var(--primary-color);
}

.page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.progress-bar.bg-danger {
    background-color: #5eb5ef !important;
}

.progress-bar.bg-warning {
    background-color: #6fcdcd !important;
}

.progress-bar.bg-primary {
    background-color: #ad85ff !important;
}

.progress-bar.bg-success {
    background-color: #bde0eb !important;
}

span.badge.bg-success {
    background-color: #5eb5ef !important;
}

span.badge.bg-warning.text-dark {
    background-color: #bde0eb !important;
}

.accordion-button:not(.collapsed) {
    background-color: var(--primary-color);
    color: white;
}
.accordion-button:focus {
    box-shadow: 0 0 0 0.25rem rgba(48, 101, 172, 0.25);
}
.accordion-button {
    font-weight: 500;
}
.accordion-body {
    background-color: #f8f9fa;
}
.accordion .btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}
.accordion .btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.form-label {
    font-weight: 500;
    color: var(--text-color);
}

.form-control, .form-select {
    border-color: #ced4da;
    border-radius: 0.25rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(48, 101, 172, 0.25);
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.form-range::-webkit-slider-thumb {
    background-color: var(--primary-color);
}

.form-range::-moz-range-thumb {
    background-color: var(--primary-color);
}

form .btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

form .btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

form .invalid-feedback {
    color: #dc3545;
    font-size: 0.875em;
    margin-top: 0.25rem;
}

@media (max-width: 768px) {
    .chart-container {
        height: 200px;
    }
}

@media (min-width: 992px) and (max-width: 1300px) {
    .sidebar {
        width: 250px;
    }
    .sidebar.collapsed {
        width: 60px;
    }
    main {
        margin-left: 250px;
        width: calc(100% - 250px);
    }
    .sidebar.collapsed + main {
        margin-left: 60px;
        width: calc(100% - 60px);
    }
}

@media (max-width: 991px) {
    .sidebar {
        width: 60px;
    }
    .sidebar .menu-text {
        display: none;
    }
    .sidebar .nav-link i {
        margin-right: 0;
    }
    main {
        margin-left: 60px;
        width: calc(100% - 60px);
    }
    .sidebar-toggle-icon {
        display: none;
    }
}

@media (max-width: 767px) {
    main {
        margin-left: 0;
        width: 100%;
    }
    .sidebar {
        width: 100%;
        height: auto;
        position: static;
    }
}

@media (max-width: 900px) {
    .date-range-buttons { 
        display: none; 
    }
    .date-range-select { 
        display: block; 
    }
}

@media (min-width: 901px) {
    .date-range-buttons { 
        display: flex; 
    }
    .date-range-select { 
        display: none; 
    }
}

@media (max-width: 992px) {
    body {
        padding-top: 60px;
    }
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: 250px;
        height: 100%;
        z-index: 1000;
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
    }
    .sidebar.show {
        transform: translateX(0);
    }
    .sidebar .nav-link {
        padding: 1rem;
    }
    .sidebar .menu-text {
        display: inline;
    }
    main {
        margin-left: 0 !important;
        width: 100% !important;
    }
    .hamburger-menu {
        display: block;
    }
}


 /*submenús */
 .submenu {
    display: none;
    list-style: none;
    padding-left: 30px;
}

.submenu li {
    margin-bottom: 5px;
}

.submenu a {
    color: #6c757d;
    font-size: 0.9rem;
}

.submenu .submenu {
    padding-left: 15px;
    transition: .2s;
}

.has-submenu > a:after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: 5px;
    background-image: url("data:image/svg+xml;charset=utf-8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-chevron-right'><polyline points='9 18 15 12 9 6'></polyline></svg>"); /* Insertar el código SVG del icono como imagen de fondo */
    background-repeat: no-repeat;
    background-size: contain;
    filter: invert(100%);
    transition: transform 0.3s ease-in-out;
}

.has-submenu.open > a:after {
    transform: rotate(90deg); 
}

ul.submenu a {
    text-decoration: none;
    transition: .2s;
    display: flex;
    align-items: center;
    margin: 10px 0px;
}

ul.submenu a:hover {
    color: #ffffff;
}

.sidebar.collapsed .has-submenu > a:after {
    display: none;
}
.project-label {
    font-weight: 600;
}

main.col-lg-10 {
    width: calc(100% - 250px);
}

select#limit {
    width: auto;
}


/*
Estilos personalizados hector
*/
.asc:after {
    content: " \2193";
}
.desc:after {
    content: " \2191";
}
a {
    text-decoration: none;
}
.form-check{
    margin-left: 15px;
}

.project-label{
    font-weight: bold;
}

.size-16{
    width: 16px;
    height: 16px;
}

.thead-sticky th {
    position: sticky;
    top: 0;
    background-color: #fff; /* Para que el encabezado no quede transparente al hacer scroll */
    z-index: 1; /* Asegura que el encabezado se muestre por encima del contenido */
}

.pagination{
    overflow: auto;
}
.text-right {
    text-align: right;
}
