/* ======= REINICIO DE ESTILOS ======= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    padding: 20px;
}

/* ======= CONTENEDOR PRINCIPAL ======= */
.container {
    width: 95%;
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* ======= ENCABEZADO Y TÍTULOS ======= */
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    width: 100%;
}

/* Título centrado */
h1, h2, h3 {
    text-align: center;
    width: 100%;
    margin-bottom: 10px;
}

/* Links sin subrayado */
.enlace {
	text-decoration: none;
	color:gray;
}

.extra-options {
	padding-top: 20px;
}

/* Contenedor para el botón "Volver" alineado a la derecha */
.btn-volver-container {
    display: flex;
    justify-content: flex-end;
    width: 100%;
    margin-bottom: 20px;
}

/* Botón "Volver" */
.btn-volver {
    background-color: #ff9800;
    color: white;
    padding: 10px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    border: none;
}

.btn-volver:hover {
    background-color: #e68900;
}



/* ======= FORMULARIOS ======= */
.form-container {
    background: #fafafa;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 30px;
}

label {
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
	margin-top: 15px;
}

input[type="text"],
input[type="date"],
input[type="time"],
input[type="number"],
input[type="password"],
input[type="email"],
select,
textarea {
    width: 100%;
    height: 36px;
    padding: 5px 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
    font-size: 16px;
}

/* Ajuste especial para textarea (solo una línea) */
textarea {
    height: auto;
}


/* ======= BOTONES GENERALES ======= */



/* ======= BOTONES ======= */
button, .btn-agregar, .btn-editar, .btn-eliminar, .btn-mas-datos, .btn-agrupar {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    color: white;
    font-weight: bold;
    cursor: pointer;
    display: inline-block;
    text-decoration: none;
    margin-top: 15px;
}

/* Botón verde para agregar */
.btn-agregar {
    background-color: #4caf50;
}

.btn-agregar:hover {
    background-color: #45a049;
}

/* Botón azul para editar */
.btn-editar {
    background-color: #007bff;
}

.btn-editar:hover {
    background-color: #0056b3;
}

/* Botón rojo para eliminar */
.btn-eliminar {
    background-color: #dc3545;
}

.btn-eliminar:hover {
    background-color: #c82333;
}

/* Botón azul para "Más datos" */
.btn-mas-datos {
    background-color: #2874a6;
}

.btn-mas-datos:hover {
    background-color: #21618c;
}

.btn-agrupar, .fila-grupo {
	background-color: #004080;
	color: white;
}

/* ======= TABLAS ======= */
.styled-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

/* Estilos para encabezados */
.styled-table th {
    background-color: #f2f2f2;
    font-weight: bold;
    padding: 12px;
    text-align: left;
}

/* Estilos para filas */
.styled-table td {
    padding: 12px;
    text-align: left;
}

td {
  vertical-align: middle;
}

th {
  white-space: nowrap;
}

/* Estilos de filas alternadas */
.styled-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.styled-table tr:nth-child(odd) {
    background-color: #ffffff;
}

/* Quitar bordes en celdas */
.styled-table th, .styled-table td {
    border: none;
}

/* ======= RESPONSIVE ======= */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        align-items: flex-start;
    }

    .btn-volver {
        margin-top: 10px;
        align-self: flex-end;
    }

    .form-container label {
        margin-bottom: 3px;
    }

    .form-container input, 
    .form-container select, 
    .form-container textarea {
        font-size: 16px;
    }
}



/* ======= CONTENEDOR FLEX PARA BOTONES ======= */
.btn-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px; /* Espaciado uniforme entre los botones */
}

/* ======= ESTILOS PARA LOS BOTONES ICONOS ======= */
.btn-icon {
    font-size: 16px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    text-decoration: none;
	margin:0;
}


/* Ajuste para las imágenes dentro de los botones */
.btn-icon img {
    width: 16px;
    height: 16px;
    vertical-align: middle;
}


/* Asegurar que los botones queden bien alineados */
.btn-container form {
    display: inline-block;
    margin: 0;
    padding: 0;
}

/* Ajuste para evitar desfases en botones */
.btn-container button{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
}

/* Efecto al pasar el mouse */
.btn-icon:hover {
    opacity: 0.7;
}

/* ======= ESTILOS PARA EL DASHBOARD ======= */
.dashboard-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin-top: 20px;
}

/* ======= BOTONES DEL DASHBOARD ======= */
.dashboard-btn {
    width: 140px;
    height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: #007bff;
    color: white;
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    text-decoration: none;
    border-radius: 10px;
    transition: 0.3s;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
    cursor: pointer;
}

/* Efecto hover */
.dashboard-btn:hover {
    background-color: #0056b3;
}

/* ======= ESTILO DEL ICONO DENTRO DEL BOTÓN ======= */
.dashboard-btn i {
    font-size: 50px; /* Icono más grande */
    margin-bottom: 8px;
}

/* ======= DASHBOARD ESTILOS ======= */
.dashboard-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin-top: 20px;
    text-align: center;
}

/* Título centrado */
.title {
    font-size: 28px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 15px;
}

/* Información del usuario */
.rol {
    font-size: 16px;
    text-align: center;
    color: #666;
    margin-bottom: 20px;
}

/* ======= GRID DEL MENÚ ======= */
.menu-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content:center;
    gap: 20px;
}

/* ======= BOTONES GRANDES DEL DASHBOARD ======= */
.menu-item {
    width: 140px;
    height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: #f2f2f2;
    color: black;
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    text-decoration: none;
    border-radius: 10px;
    transition: 0.3s;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
    cursor: pointer;
}

.menu-item:hover {
    background-color: #0056b3;
}

/* ======= ICONO MÁS GRANDE ======= */
.menu-icon {
    font-size: 50px;
    margin-bottom: 8px;
}

/* ======= BOTÓN CERRAR SESIÓN ======= */
.logout-container {
    margin-top: 30px;
    text-align: center;
}

.btn-logout {
    background-color: #dc3545;
    color: white;
    padding: 12px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
}

.btn-logout:hover {
    background-color: #c82333;
}
/* ======= BLOQUES DE RECORDATORIOS ======= */
.bloque-recordatorios {
    padding: 12px;
    border-radius: 5px;
    margin-bottom: 10px;
    font-weight: bold;
}

/* Recordatorios del pasado (Anteriores) - Rojo */
.bloque-rojo {
    background-color: #f8d7da !important; /* Rojo suave */
    color: #721c24 !important;
}

/* Recordatorios de hoy - Verde */
.bloque-verde {
    background-color: #d4edda !important; /* Verde suave */
    color: #155724 !important;
}

/* Recordatorios futuros - Gris */
.bloque-gris {
    background-color: #e2e3e5 !important; /* Gris claro */
    color: #383d41 !important;
}


/* ======= ESTILO PARA SUBTÍTULOS ======= */
.subtitle {
    font-size: 22px;  /* Tamaño del texto */
    font-weight: bold;  /* Negrita */
    text-align: left;  
    margin-top: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #ddd; /* Línea separadora debajo */
    color: #333;  /* Color oscuro para mejor contraste */
}


/* ======= INTERCALAR COLORES EN BLOQUES DE RECORDATORIOS ======= */

/* Anteriores (Rojo oscuro y claro) */
.bloque-rojo-oscuro { background-color: #f5c6cb !important; color: #721c24; }
.bloque-rojo-claro { background-color: #f8d7da !important; color: #721c24; }

/* Hoy (Verde oscuro y claro) */
.bloque-verde-oscuro { background-color: #c3e6cb !important; color: #155724; }
.bloque-verde-claro { background-color: #d4edda !important; color: #155724; }

/* Próximos (Gris oscuro y claro) */
.bloque-gris-oscuro { background-color: #d6d8db !important; color: #383d41; }
.bloque-gris-claro { background-color: #e2e3e5 !important; color: #383d41; }

/* Mensajes */
.mensaje-exito {
    background-color: #d4edda;
    color: #155724;
    padding: 12px;
    border-radius: 5px;
    margin-bottom: 20px;
    text-align: center;
    font-weight: bold;
}

.mensaje-error {
    background-color: #f8d7da;
    color: #721c24;
    padding: 12px;
    border-radius: 5px;
    margin-bottom: 20px;
    text-align: center;
    font-weight: bold;
}

.mensaje-importante {
    background-color: #d8d8dd;
    color: #E41014;
	border-color:crimson;
    padding: 12px;
    border-radius: 5px;
    margin-bottom: 20px;
    text-align: center;
    font-weight: bold;
}

.mensaje-discreto {
    background-color: #d8d8dd;
    color:cadetblue;
	border-color:cadetblue;
    padding: 12px;
    border-radius: 5px;
    margin-bottom: 5px;
    text-align: left;
}

.alerta-cautelar {
  border-left: 5px solid red;
  background-color: #fff3f3;
  padding: 15px;
  margin: 20px 0;
  color: #a10000;
}

.lista-cautelares {
  margin-top: 10px;
  padding-left: 20px;
  list-style: none;
}
