        /* Paleta de azules suaves */
        :root {
            --azul-claro: #e6f2ff;
            --azul-medio: #99ccff;
            --azul-oscuro: #4da6ff;
            --azul-profundo: #0066cc;
            --sombra: rgba(0, 102, 204, 0.2);
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        }

        body {
            background-color: var(--azul-claro);
            min-height: 100vh;
            transition: background-color 0.5s ease;
        }

        /* Contenedor principal para centrar el login */
        .login-body {
            display: flex;
            justify-content: center;
            align-items: center;
        }

        /* Contenedor principal para las páginas de contenido */
        .content-body {
            display: flex;
            flex-direction: column;
            align-items: center;
        }


        /* Estilos para el header y la navegación */
        .main-header {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            background-color: white;
            box-shadow: 0 2px 10px var(--sombra);
            z-index: 1000;
        }

        .top-nav {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0 2rem;
            height: 60px;
            max-width: 1200px;
            margin: 0 auto;
        }

        .nav-brand {
            display: flex;
            align-items: center;
            gap: 10px;
            font-size: 1.5rem;
            font-weight: 600;
            color: var(--azul-profundo);
        }

        .nav-brand1 {
            display: flex;
            align-items: center;
            gap: 10px;
            font-size: 1.5rem;
            font-weight: 600;
            color: var(--azul-profundo);
            text-align: center;
        }

        .nav-logo {
            height: 40px;
            /* Puedes ajustar esta altura */
            width: auto;
        }

        .nav-links {
            display: flex;
            gap: 1.5rem;
        }

        .nav-links a {
            text-decoration: none;
            color: var(--azul-profundo);
            font-weight: 500;
            padding: 5px 0;
            border-bottom: 2px solid transparent;
            transition: all 0.3s ease;
        }

        .nav-links a:hover,
        .nav-links a.active {
            border-bottom-color: var(--azul-profundo);
        }

        .content-body {
            padding-top: 80px;
        }

        /* Añadir padding para que el contenido no quede debajo del header fijo */

        .login-container {
            background-color: white;
            padding: 2rem;
            border-radius: 15px;
            box-shadow: 0 10px 25px var(--sombra);
            width: 350px;
            text-align: center;
            transition: transform 0.3s ease, box-shadow 0.3s ease;
        }

        .login-container:hover {
            transform: translateY(-5px);
            box-shadow: 0 15px 30px var(--sombra);
        }

        /* Contenedor para la página de home */
        .data-container {
            background-color: white;
            padding: 2rem 3rem;
            border-radius: 15px;
            box-shadow: 0 10px 25px var(--sombra);
            width: 100%;
            /* Usar un ancho porcentual para la adaptabilidad */
            text-align: center;
            max-width: 90%;
            /* Un ancho máximo para pantallas grandes */
        }

        h1 {
            color: var(--azul-profundo);
            margin-bottom: 1.5rem;
            font-weight: normal;
        }

        .logo {
            max-width: 150px;
            /* Ajusta el tamaño máximo que quieres para tu logo */
            height: auto;
            /* Mantiene la proporción de la imagen para que no se deforme */
            margin-bottom: 1.5rem;
            /* Añade un espacio debajo del logo, igual que el título */
        }

        .input-group {
            position: relative;
            margin-bottom: 1.5rem;
        }

        input {
            width: 100%;
            padding-left:
                35px;
            /* Espacio para el ícono */
            height:
                45px;
            border-radius:
                8px;
            border:
                1px solid var(--azul-medio);
            outline:
                none;
            transition:
                all 0.3s ease;
        }

        input:focus {
            border-color:
                var(--azul-profundo);
            box-shadow: 0 0 5px var(--sombra);
        }

        input::placeholder {
            color:
                var(--azul-medio);
        }

        .input-icon {
            position:
                absolute;
            left:
                10px;
            top:
                50%;
            transform:
                translateY(-50%);
            color:
                var(--azul-medio);
        }

        button {
            background-color:
                var(--azul-profundo);
            color:
                white;
            border:
                none;
            padding:
                12px 20px;
            width:
                100%;
            border-radius:
                8px;
            cursor:
                pointer;
            font-size:
                16px;
            transition:
                background-color 0.3s ease;
        }

        button:hover {
            background-color:

                #005bb7
                /* Azul más oscuro al hover */
        }

        .footer-links {
            margin-top: 20px;
            display: flex;
            justify-content: space-between;
            font-size: 14px;
            color: var(--azul-profundo);
        }

        .footer-links a {
            color: inherit;
            text-decoration: none;
            transition: color 0.3s ease;
        }

        .footer-links a:hover {
            color: #004080;
            /* Azul más oscuro */
        }

        .wave-bg {
            position: absolute;
            bottom: 0;
            z-index: -1;
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
            }

            to {
                opacity: 1;
            }
        }

        .login-container {
            animation: 1s fadeIn ease-in-out forwards;
        }

        /* Estilos para la tabla de datos de usuario */
        .user-table, .pager-table, .clinic-table, .button-table {
            width: 100%;
            margin-top: 1.5rem;
            border-collapse: collapse;
            text-align: left;
            table-layout: fixed;
        }

        .user-table th, .pager-table th, .clinic-table th, .button-table th,
        .user-table td, .pager-table td, .clinic-table td, .button-table td {
            padding: 12px 15px;
            border-bottom: 1px solid var(--azul-claro);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .user-table thead th, .pager-table thead th, .clinic-table thead th, .button-table thead th {
            background-color: var(--azul-claro);
            color: var(--azul-profundo);
            font-weight: 600;
        }

        /* Ancho fijo para la columna de acciones */
        .user-table th:first-child, .pager-table th:first-child, .clinic-table th:first-child, .button-table th:first-child {
            width: 150px;
        }

        .user-table tbody tr:last-child td, .pager-table tbody tr:last-child td, .clinic-table tbody tr:last-child td, .button-table tbody tr:last-child td {
            border-bottom: none;
        }

        .user-table td:first-child, .pager-table td:first-child, .clinic-table td:first-child, .button-table td:first-child {
            font-weight: 500;
            color: #333;
        }

        /* Botón de Logout */
        .logout-button {
            display: inline-block;
            margin-top: 2rem;
            background-color: #e74c3c;
            /* Un color rojo para la acción de salir */
            color: white;
            padding: 10px 20px;
            border-radius: 8px;
            text-decoration: none;
            font-size: 16px;
            transition: background-color 0.3s ease;
        }

        .logout-button:hover {
            background-color: #c0392b;
        }

        /* Ajuste para el botón de logout en la navegación */
        .nav-logout {
            margin-top: 0;
            padding: 8px 16px;
        }

        .data-container p {
            margin-bottom: 1rem;
        }

        /* Estilos para los botones de acción en la tabla */
        .actions-cell {
            width: 150px;
            /* Aumentar el ancho para dos botones */
            text-align: center;
            display: flex;
            gap: 8px;
            /* Espacio entre botones */
            justify-content: center;
        }

        .action-button {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 35px;
            height: 35px;
            border-radius: 50%;
            /* Círculo */
            text-decoration: none;
            color: var(--azul-profundo);
            background-color: var(--azul-claro);
            transition: all 0.3s ease;
        }

        .action-button.edit-button:hover {
            background-color: var(--azul-medio);
            color: white;
            transform: scale(1.1);
        }

        /* Estilos específicos para el botón de eliminar */
        .action-button.delete-button:hover {
            background-color: #e74c3c;
            /* Rojo para indicar peligro */
            color: white;
            transform: scale(1.1);
        }

        /* Estilos específicos para el botón de cambiar contraseña */
        .action-button.change-password-button:hover {
            background-color: #f39c12;
            /* Naranja para indicar una acción de configuración */
            color: white;
            transform: scale(1.1);
        }

        /* Estilos para la paginación */
        .pagination-container {
            margin-top: 2rem;
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 8px;
        }

        .pagination-link {
            text-decoration: none;
            color: var(--azul-profundo);
            padding: 8px 12px;
            border: 1px solid var(--azul-medio);
            border-radius: 5px;
            transition: all 0.3s ease;
        }

        .pagination-link:hover,
        .pagination-link.active {
            background-color: var(--azul-profundo);
            color: white;
            border-color: var(--azul-profundo);
        }

        .pagination-link.disabled {
            color: #aaa;
            pointer-events: none;
            border-color: #ddd;
        }

        /* Estilos para el contenedor de búsqueda */
        .search-container {
            margin-bottom: 1.5rem;
            display: flex;
            gap: 10px;
            align-items: center;
        }

        .search-container form {
            display: flex;
            gap: 10px;
            flex-grow: 1;
            /* Hace que el formulario ocupe el espacio disponible */
            align-items: center;
            /* Centra verticalmente los elementos del form */
        }

        .search-container input {
            flex-grow: 1;
            /* El input ocupa el espacio disponible */
            padding-left: 15px;
            /* Ajuste del padding */
        }

        .search-button {
            width: auto;
            /* Ancho automático para el botón */
            padding: 12px 20px;
        }

        /* Estilos para el botón de limpiar búsqueda */
        .clear-button {
            display: inline-block;
            padding: 12px 20px;
            background-color: #6c757d;
            /* Un color gris neutro */
            color: white;
            text-decoration: none;
            border-radius: 8px;
            transition: background-color 0.3s ease;
            white-space: nowrap;
            /* Evita que el texto se divida en dos líneas */
        }

        .clear-button:hover {
            background-color: #5a6268;
        }

        /* Estilos para el botón de filtros */
        .filter-button {
            background-color: var(--azul-medio);
            color: white;
            border: none;
            padding: 12px 20px;
            border-radius: 8px;
            cursor: pointer;
            font-size: 16px;
            transition: background-color 0.3s ease;
            margin-left: 5px;
            width: auto;
        }

        .filter-button:hover {
            background-color: var(--azul-profundo);
        }

        /* Panel de filtros */
        .filter-panel {
            display: flex;
            gap: 15px;
            margin-bottom: 1.5rem;
            background-color: white;
            padding: 15px;
            border-radius: 8px;
            box-shadow: 0 5px 15px var(--sombra);
            animation: fadeIn 0.3s ease;
            flex-wrap: wrap;
            justify-content: center;
            width: 100%;
        }

        .filter-group {
            flex: 1;
            min-width: 200px;
        }

        .filter-select {
            width: 100%;
            padding: 10px;
            border-radius: 5px;
            border: 1px solid var(--azul-medio);
            outline: none;
            background-color: white;
        }

        /* Contenedor para hacer la tabla desplazable en horizontal */
        .table-responsive {
            overflow-x: auto;
            width: 100%;
        }

        /* Estilos para el botón de agregar */
        .add-button {
            padding: 12px 20px;
            background-color: #28a745;
            /* Verde para acción de agregar */
            color: white;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            font-size: 16px;
            transition: background-color 0.3s ease;
            white-space: nowrap;
            width: 200px;
        }

        .add-button:hover {
            background-color: #218838;
        }

        /* Estilos para el Modal */
        .modal {
            display: none;
            /* Oculto por defecto */
            position: fixed;
            z-index: 1001;
            /* Por encima del header */
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            overflow: auto;
            background-color: rgba(0, 0, 0, 0.5);
            /* Fondo oscuro semitransparente */
            padding-top: 60px;
        }

        .modal-content {
            background-color: #fefefe;
            margin: 5% auto;
            padding: 2rem;
            border: 1px solid #888;
            width: 80%;
            max-width: 400px;
            border-radius: 15px;
            position: relative;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
            animation: fadeIn 0.5s;
        }

        .modal-content h2 {
            margin-top: 0;
        }

        .close-button {
            color: #aaa;
            float: right;
            font-size: 28px;
            font-weight: bold;
            position: absolute;
            top: 10px;
            right: 20px;
        }

        .close-button:hover,
        .close-button:focus {
            color: black;
            text-decoration: none;
            cursor: pointer;
        }

        /* Estilos para Notificaciones (Toasts) */
        #notification-container {
            position: fixed;
            top: 80px;
            /* Debajo del header */
            right: 20px;
            z-index: 2000;
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .notification {
            padding: 15px 20px;
            border-radius: 8px;
            color: white;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
            opacity: 0;
            transform: translateX(100%);
            transition: all 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
            min-width: 250px;
        }

        .notification.show {
            opacity: 1;
            transform: translateX(0);
        }

        .notification.success {
            background-color: #28a745;
        }

        .notification.error {
            background-color: #e74c3c;
        }

        /* Estilos para cabeceras de tabla ordenables */
        .sortable-header {
            padding: 0 !important;
        }

        .sortable-header a {
            color: inherit;
            /* Hereda el color del texto del th */
            text-decoration: none;
            display: flex;
            align-items: center;
            gap: 5px;
            padding: 12px 15px;
            width: 100%;
            height: 100%;
            cursor: pointer;
        }

        .sortable-header a:hover {
            color: #005bb7;
            /* Un azul más oscuro al pasar el mouse */
        }

        .sortable-header i {
            font-size: 0.8em;
        }

        /* Estilos para el footer de la página de login */
        .page-footer {
            position: absolute;
            bottom: 20px;
            left: 0;
            width: 100%;
            text-align: center;
        }

        .page-footer p {
            color: #6c757d;
            /* Un gris neutro */
            font-size: 14px;
            margin-bottom: 10px;
        }

        .footer-logo {
            height: 30px;
            /* Altura del logo en el footer */
        }

        /* Estilos para el footer de las páginas de contenido */
        .main-content-footer {
            width: 100%;
            text-align: center;
            padding: 2rem 0;
            margin-top: auto;
            /* Empuja el footer hacia abajo */
        }

        .main-content-footer p {
            color: #6c757d;
            font-size: 14px;
            margin-bottom: 10px;
        }

        .main-content-footer .footer-logo {
            height: 30px;
        }

        /* Estilos para el Dashboard */
        .dashboard-container {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 2rem;
            margin-top: 2rem;
        }

        .stat-card {
            background-color: var(--azul-claro);
            padding: 2rem;
            border-radius: 15px;
            text-align: center;
            transition: all 0.3s ease;
            border: 1px solid var(--azul-medio);
        }

        .stat-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 8px 20px var(--sombra);
        }

        .stat-icon {
            font-size: 3rem;
            color: var(--azul-profundo);
            margin-bottom: 1rem;
        }

        .stat-number {
            font-size: 2.5rem;
            font-weight: 600;
            color: #333;
        }

        .stat-label {
            font-size: 1rem;
            color: #555;
        }

        .dashboard-subtitle {
            color: var(--azul-profundo);
            font-size: 1.1rem; /* Opcional: para darle un poco más de énfasis */
        }

        .stat-card-link {
            text-decoration: none;
            color: inherit;
        }

        /* Estilos para el contenedor del gráfico */
        .chart-container {
            margin-top: 2rem;
            margin-bottom: 3rem;
            position: relative;
            height: 40vh; /* Altura relativa a la ventana */
            width: 100%;
        }

        /* Estilos para el contenedor de detalles de mensajes */
        .message-details-container {
            margin-top: 2rem;
            width: 100%;
            text-align: left;
        }

        .message-details-container h3 {
            color: var(--azul-profundo);
            border-bottom: 2px solid var(--azul-claro);
            padding-bottom: 0.5rem;
            margin-bottom: 1.5rem;
        }

        .message-details-container h3.hidden {
            border-bottom: none;
            text-align: center;
            color: #6c757d;
        }

        .message-list {
            max-height: 50vh;
            overflow-y: auto;
            padding-right: 10px; /* Espacio para la barra de scroll */
        }

        .message-item {
            background-color: #f8f9fa;
            border: 1px solid #e9ecef;
            border-left: 4px solid var(--azul-medio);
            padding: 1rem;
            border-radius: 8px;
            margin-bottom: 1rem;
        }

        .message-time { float: right; color: #6c757d; font-size: 0.9em; }
        .message-pager { display: block; font-weight: 500; margin-bottom: 0.5rem; }
        .message-text { margin: 0; color: #343a40; }

        /* Estilos para el formulario de filtro de fechas */
        .filter-form {
            display: flex;
            flex-wrap: wrap;
            gap: 1rem;
            align-items: flex-end;
            justify-content: center;
            margin-top: 1.5rem;
            padding: 1rem;
            background-color: var(--azul-claro);
            border-radius: 8px;
        }

        .filter-form .form-group {
            display: flex;
            flex-direction: column;
        }

        .filter-form label {
            margin-bottom: 0.5rem;
            font-size: 0.9em;
            color: var(--azul-profundo);
            font-weight: 500;
        }

        .filter-form input[type="date"] {
            height: 45px; /* Unificar altura */
            padding: 0 10px; /* Ajustar padding vertical a 0 ya que la altura está fija */
        }

        .filter-form .filter-button {
            width: auto;
        }

        .filter-form select {
            height: 45px; /* Unificar altura */
            padding: 8px 10px;
            border-radius: 8px;
            border: 1px solid var(--azul-medio);
            outline: none;
            background-color: white;
            min-width: 150px; /* Ajusta según necesites */
        }

        /* Unificar altura de los botones del formulario de filtro */
        .filter-form .filter-button,
        .filter-form .clear-button,
        .filter-form .export-button {
            height: 45px; /* Misma altura que los inputs */
            display: inline-flex; /* Permite alinear el texto verticalmente */
            align-items: center;
            justify-content: center;
            padding: 0 20px; /* Ajusta el espaciado horizontal */
        }

        /* Contenedor para el título de detalles y el botón de exportar */
        .details-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1.5rem;
            border-bottom: 2px solid var(--azul-claro);
            padding-bottom: 0.5rem;
        }

        .details-header h3 {
            margin: 0;
            padding: 0;
            border: none;
        }

        /* Botón de exportar */
        .export-button {
            background-color: #17a2b8; /* Un color cian para diferenciar */
            color: white;
            padding: 8px 16px;
            border-radius: 5px;
            text-decoration: none;
            font-size: 0.9em;
            transition: background-color 0.3s ease;
        }

        .export-button:hover {
            background-color: #138496;
        }

        .export-button.hidden { display: none; }

        /* Estilo para el aviso de datos de prueba */
        .test-data-notice {
            background-color: #fff3cd;
            color: #856404;
            padding: 0.75rem 1.25rem;
            margin-top: 1.5rem;
            border: 1px solid #ffeeba;
            border-radius: .25rem;
        }

        /* Estilos para el Loader (indicador de carga) */
        .loader-container {
            display: flex;
            justify-content: center;
            align-items: center;
            padding: 2rem 0;
        }

        .loader-container.hidden {
            display: none;
        }

        .loader {
            border: 5px solid var(--azul-claro);
            border-top: 5px solid var(--azul-profundo);
            border-radius: 50%;
            width: 40px;
            height: 40px;
            animation: spin 1s linear infinite;
        }

        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }

        .empty-table-message {
            text-align: center;
            padding: 2rem;
            color: #6c757d;
        }