body {
    font-family:Verdana, Geneva, Tahoma, sans-serif;
    background-color: #f0f0f0;
    font-size: 13px;
    margin: 0;
    padding: 0;
    transition: background-color 0.3s;
    overflow-x: hidden; /* Evita desbordamiento horizontal */
}

.container {
    display: flex;
    flex-direction: column;
}

.sidebar {
    width: 250px;
    background: linear-gradient(to right, rgb(8, 189, 249), rgb(0, 123, 255));
    border-right: 1px solid #ccc;
    transition: width 0.3s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px;
    height: 95vh;
    position: fixed;
    border-radius: 15px;
    overflow-y: auto; /* Permite desplazamiento vertical si el contenido es largo */
    overflow-x: hidden; /* Evita desbordamiento horizontal */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}
.sidebar {
    z-index: 1000; /* Establece un z-index alto */
}

.sidebar.collapsed {
    width: 50px;
}

.top-section {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.logo {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.logo .icon {
    font-size: 1.5em;
}

.logo .text {
    font-size: 1.5em;
    font-weight: bold;
    display: block;
}

.logo .dot {
    color: rgb(240, 47, 47);
}

.sidebar.collapsed .logo .text {
    display: none;
}

.create-btn {
    background-color: #000;
    color: #fff;
    border: none;
    padding: 10px;
    margin: 20px 0;
    cursor: pointer;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1em;
    border-radius: 8px;
    transition: background-color 0.3s;
}

.create-btn:hover {
    background-color: #333;
}

.sidebar.collapsed .create-btn {
    justify-content: center;
    font-size: 1.5em;
    padding: 10px 0;
}

.menu {
    list-style-type: none;
    padding: 0;
    margin: 0;
    flex-grow: 1;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 10px;
    cursor: pointer;
    position: relative;
    transition: background-color 0.2s;
}

.menu-item:hover {
    background-color: #e0e0e0;
    border-radius: 8px;
}

.menu-item .icon {
    font-size: 1.2em;
}

.menu-item .text {
    margin-left: 10px;
    flex-grow: 1;
}

.menu-item .badge {
    background-color: red;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    display: inline-block;
    position: absolute;
    right: -34px;
}

.sidebar.collapsed .menu-item .text,
.sidebar.collapsed .menu-item .badge {
    display: none;
}

.bottom-section {
    display: flex;
    flex-direction: column;
    margin-top: auto;
}

.menu-item.active {
    background-color: #0f8adb;
    color: #fff;
    border-radius: 8px;
    transition: background-color 0.3s, color 0.3s;
}

.dark-mode {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.dark-mode .icon {
    font-size: 1.2em;
}

.dark-mode .text {
    margin-left: 10px;
}

.switch {
    margin-left: auto;
}

.switch input {
    display: none;
}

.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.switch input { 
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #2196F3;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.icon-on, .icon-off {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    transition: opacity 0.3s;
}

.icon-on {
    left: 8px;
    opacity: 0;
}

.icon-off {
    right: 8px;
}

input:checked + .slider + .icon-on {
    opacity: 1;
}

input:not(:checked) + .slider + .icon-off {
    opacity: 1;
}

.user-info {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.user-info img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: bold;
}

.user-email {
    font-size: 0.8em;
    color: #393b3e;
    font-weight: 7px;
}

.sidebar.collapsed .text,
.sidebar.collapsed .user-details {
    display: none;
}

.main-content {
    flex-grow: 1;
    margin-left: 292px;
    padding: 20px;
    overflow: auto;
    max-height: 100vh;
    box-sizing: border-box;
    transition: margin-left 0.3s;
}

/* Tu CSS existente va aquí */
/* Tu CSS existente va aquí */

.main-content {
    padding: 20px;
}

.row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    grid-gap: 20px;
    margin-bottom: 20px;
}

.grid-item {
 

    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease-in-out;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-align: center;
    font-size: 12px;
    color: #333;
    border: 2px solid transparent;
}

.grid-item:hover {
    transform: translateY(-5px);
    border-color: #3498db;
}

@media (max-width: 768px) {
    .row {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
}
/* Estilos para la barra de notificaciones */

.main-content {
    padding-top: 40px; /* Asegura espacio suficiente para la barra de notificaciones */
    position: relative; /* Permite que la barra de notificaciones fija sea relativa a este contenedor */
}

.main-content {
    position: relative; /* Importante para el posicionamiento relativo */

}

.notification-bar {
    background-color: #fafdff00;
    color: #000;
    padding: 10px 20px;
    display: flex;
        margin-bottom: 15px;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box; /* Asegura que el padding no aumente el tamaño */
    position: sticky; /* Posicionamiento pegajoso */
    top: 0; /* Pegado a la parte superior */
    left: 0;
    width: 96%; /* Ocupa todo el ancho disponible */
    z-index: 999; /* Asegura que esté por encima del contenido */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Sombra para efecto visual */
}


.notification-bar .date {
    font-size: 0.9em;
}

.notification-bar .notifications {
    font-size: 0.9em;
    background-color: #2980b9;
    padding: 5px 10px;
    border-radius: 10px;
}

/* Ajuste para evitar solapamiento con la barra de notificaciones */


.main-content {
    margin-top: -37px; /* Ajusta el espacio para no ocultar la barra de notificaciones */
}


.sidebar.collapsed + .main-content {
    margin-left: 110px;
}
.sidebar.collapsed + .notification-bar  {
    margin-left: 110px;
}

.toggle-btn {
    background-color: transparent;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    position: fixed;
    top: 10px;
    right: 20px;
    z-index: 1000;
    transition: color 0.3s;
}

.toggle-btn:hover {
    color: #3498db;
}

.toggle-btn:focus {
    outline: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        width: 198px;
        display: none;
    }
    
    .main-content {
        margin-left: 0;
        padding-top: 60px;
    }

    .toggle-btn {
        display: block;
    }
}

@media (max-width: 480px) {
    .toggle-btn {
        font-size: 1.2em;
        top: 10px;
        right: 10px;
    }

    .sidebar.collapsed {
        display: none;
    }
}
.sidebar.collapsed .dark-mode {
    display: none;
}
.sidebar.collapsed .dark-mode {
    display: none;
}
@media (max-width: 768px) {
    
    .main-content {
        padding-top: 60px;
        margin-left: 0; /* Ajusta el margen izquierdo a 0 en modo celular */
    }

    
}

@media (max-width: 480px) {
    
    .sidebar.collapsed + .main-content {
        margin-left: 0; /* Establece el margen izquierdo a 0 cuando el menú está colapsado en modo celular */
    }
}






.form-container {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    margin: 0 auto 20px;
}

.grid-form {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    font-size: 14px;
    color: #555;
}

.input-container {
    position: relative;
}

.input-container input {
    width: calc(100% - 25px); /* Ajuste para espacio del icono */
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    font-size: 14px;
    color: #333;
}

.input-container input:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 10px rgba(52, 152, 219, 0.5);
}

.input-container .icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: #888;
}

.input-container input:focus + .icon {
    color: #3498db;
}

.form-group.full-width {
    grid-column: span 2; /* Ocupa ambas columnas */
    text-align: center; /* Centra el contenido */
}

.form-group button {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: bold;
    width: 80%; /* Ancho del botón */
    padding: 12px;
    background-color: #3498db;
    color: #fff;
    border: none;
    cursor: pointer;
    border-radius: 6px;
    font-size: 16px;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group button:hover {
    background-color: #2980b9;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}








/* Popup styles */
.popup-overlay {
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6); /* Fondo oscuro semi-transparente */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    z-index: 9999;
}

.popup-container {
    position: relative;
    background-color: #fff;
    max-width: 50%;
    max-height: 90%;
    width: 39%;
    height: 86%;
    padding: 30px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.5s ease, transform 0.5s ease, box-shadow 0.5s ease;
    z-index: 1010;
    overflow-y: auto; /* Agregar desplazamiento vertical */
    overflow-x: hidden; /* Evitar desplazamiento horizontal */
}

/* Media query para pantallas pequeñas */
@media (max-width: 768px) {
    .popup-container {
        width: 90%; /* Ajustar ancho para pantallas pequeñas */
        height: auto; /* Permitir altura automática */
        max-height: 80%; /* Limitar altura máxima */
        padding: 20px; /* Ajustar el padding para pantallas pequeñas */
    }
}

/* Media query para pantallas aún más pequeñas */
@media (max-width: 480px) {
    .popup-container {
        width: 95%; /* Ajustar ancho para pantallas muy pequeñas */
        padding: 15px; /* Ajustar el padding para pantallas muy pequeñas */
    }
}


.popup-container.show {
    opacity: 1;
    transform: translateY(0);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.popup-overlay.show {
    opacity: 1;
    visibility: visible;
}

.popup-container.hide {
    opacity: 0;
    transform: translateY(50px);
}

.popup-content {
    text-align: center;
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    color: #333;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    cursor: pointer;
    font-size: 20px;
    color: #eb1111;
    font-weight: bold;
    transition: color 0.3s ease;
}

.close-btn:hover {
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    color: #666;
    transform: scale(1.2);
    transition: transform 0.3s ease;
}

.close-popup-btn {
    margin-top: 20px;
    padding: 10px 20px;
    background-color: #2dc9f8;
    color: #070707;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.close-popup-btn:hover {
    background-color: #52ecef;
    transform: translateY(-3px);
}



.dashboard {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 20px;
}

.stat-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 20px;
    flex: 1 1 0; /* Hace que cada tarjeta ocupe el 100% del espacio disponible */
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 100%; /* Establece el ancho máximo al 100% */
    width: 100%; /* Asegura que ocupe todo el ancho disponible */
}

@media (min-width: 768px) {
    .stat-card {
        max-width: calc(100% - 20px); /* Ancho máximo de 50% del contenedor menos espacios */
        margin: 20px; /* Añade margen entre las tarjetas */
    }
}


.stat-card h2 {
    margin: 0 0 10px 0;
    text-align: center;
}

.counter {
    font-size: 2em;
    color: #333;
    text-align: center;
}

.chart-container {
    width: 100%;
    position: relative;
    padding-bottom: 50%;
    height: 0;
}

.chart-container canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

#debtsList {
    list-style: none;
    padding: 0;
}

#debtsList li {
    font-size: 1.2em;
    margin: 5px 0;
    text-align: center;
}
@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.grid-item {
    opacity: 0;
    animation: fadeInUp 0.5s ease-in-out forwards;
}

/* Aplicar retraso para cada grid-item individualmente */
.grid-item:nth-child(1) {
    animation-delay: 0.1s;
}
.grid-item:nth-child(2) {
    animation-delay: 0.2s;
}
.grid-item:nth-child(3) {
    animation-delay: 0.3s;
}
.grid-item:nth-child(4) {
    animation-delay: 0.4s;
}
.grid-item:nth-child(5) {
    animation-delay: 0.5s;
}
.grid-item:nth-child(6) {
    animation-delay: 0.6s;
}
.grid-item:nth-child(7) {
    animation-delay: 0.7s;
}
.grid-item:nth-child(8) {
    animation-delay: 0.8s;
}
.grid-item:nth-child(9) {
    animation-delay: 0.9s;
}
.grid-item:nth-child(10) {
    animation-delay: 1.0s;
}
.grid-item:nth-child(11) {
    animation-delay: 1.1s;
}
.grid-item:nth-child(12) {
    animation-delay: 1.2s;
}
@keyframes slideInLeft {
    0% {
        opacity: 0;
        transform: translateX(-100%);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

.sidebar {
    animation: slideInLeft 0.5s ease-in-out;
}
