/*Plantilla cabecera y footer*/
.pagina {
    background-color: #f3f4f6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: sans-serif;
    margin: 0;
}

.pagina__contenido {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    padding-bottom: 4rem; /* Espacio para navegación móvil */
}

@media (min-width: 768px) {
    .pagina__contenido {
        padding-bottom: 1rem;
        align-items: flex-start; /* Para que el dashboard no quede centrado verticalmente */
    }
}

/*Cabecera*/
.cabecera {
    background-color: #2563eb;
    color: white;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1000;
}
.cabecera-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.cabecera__usuario {
    display: block;
}

.cabecera__titulo {
    margin: 0;
    font-size: 1.25rem;
}

@media (min-width: 768px) {
    .cabecera__titulo {
        font-size: 1.5rem;
    }
}

/* Navegación */
.navegacion {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #ffffff;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
}

.navegacion__lista {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: space-around;
}

.navegacion__enlace {
    display: block;
    padding: 0.75rem 0.5rem;
    text-decoration: none;
    color: #4b5563; /* Gris oscuro para la barra blanca inferior en móvil */
    font-weight: bold;
    text-align: center;
    font-size: 0.85rem;
}

/* Forzamos que el nombre de usuario en la cabecera azul sea siempre blanco */
.cabecera .navegacion__enlace {
    color: white;
}

.navegacion__enlace i {
    display: block;
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.navegacion__enlace:hover, .navegacion__enlace--activo {
    color: #2563eb;
}

@media (min-width: 768px) {
    .navegacion {
        position: static;
        background-color: transparent;
        box-shadow: none;
        width: auto;
    }
    .navegacion__lista {
        justify-content: flex-start;
        gap: 1.5rem;
    }
    .navegacion__enlace {
        color: white;
        padding: 0.5rem;
        font-size: 1rem;
    }
    .navegacion__enlace i {
        display: inline;
        font-size: 1rem;
        margin-right: 0.5rem;
    }
    .navegacion__enlace:hover {
        color: #e5e7eb;
    }
}


/*Autenticación*/
.tarjeta {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
}

.tarjeta__titulo {
    margin-bottom: 1.5rem;
    text-align: center;
    color: #1f2937;
}

/*Formulario*/
.formulario__grupo {
    margin-bottom: 1rem;
}

.formulario__etiqueta {
    display: block;
    margin-bottom: 0.5rem;
    color: #4b5563;
}

.formulario__entrada {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    box-sizing: border-box;
}

.formulario__ayuda {
    font-size: 0.8rem; 
    color: #666;
}

.boton {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    text-align: center;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
    border: none;
}

.boton--primario {
    background-color: #2563eb;
    color: white;
}

.boton--primario:hover {
    background-color: #1d4ed8;
}

.boton--secundario {
    background-color: #e5e7eb;
    color: #374151;
}
.boton--secundario:hover {
    background-color: #d1d5db;
}

.boton--pequeno {
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
}

.formulario__error {
    color: #ef4444;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

/*Footer*/
.pie-pagina {
    background-color: #fff;
    padding: 1rem;
    text-align: center;
    color: #6b7280;
    font-size: 0.875rem;
}

/* Landing Page */
.presentacion {
    text-align: center;
    max-width: 600px;
    padding: 2rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.presentacion__slogan {
    font-size: 2rem;
    color: #1f2937;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.presentacion__descripcion {
    font-size: 1.125rem;
    color: #4b5563;
    margin-bottom: 2rem;
}

.presentacion__cabecera {
    margin-bottom: 1.5rem;
}

/*Presentación en resoluciones pequeñas*/
.presentacion__lista {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column; 
    gap: 1rem;
}

/* Dashboard */
.dashboard {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.resumen {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .resumen {
        grid-template-columns: repeat(3, 1fr);
    }
    .presentacion__lista {
        flex-direction: row; /* Botones uno al lado del otro */
        justify-content: center;
    }
}

.resumen__tarjeta {
    padding: 1.25rem;
    text-align: center;
    max-width: none;
}

@media (max-width: 767px) {
    .resumen__tarjeta {
        padding: 1rem;
    }
    .resumen__titulo {
        font-size: 1rem;
    }
    .resumen__valor {
        font-size: 1.75rem;
    }
    .presentacion__slogan {
        font-size: 1.5rem;
    }
}

.resumen__titulo {
    font-size: 1.125rem;
    color: #6b7280;
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.resumen__valor {
    font-size: 2rem;
    font-weight: bold;
    color: #1f2937;
    margin: 0;
}

.texto-positivo {
    color: #10b981;
}

.texto-negativo {
    color: #ef4444;
}

.dashboard__acciones {
    text-align: center;
}



/* Tablas de Datos */
.tabla-contenedor {
     width: 100%;
     overflow-x: auto; /* Scroll horizontal en móviles */
     margin-top: 1rem;
 }

 .tabla-datos {
     width: 100%;
     border-collapse: collapse;
     text-align: left;
}

.tabla-datos__cabecera {
    background-color: #f9fafb;
    border-bottom: 2px solid #d1d5db;
}

.tabla-datos__th {
    padding: 0.75rem;
    color: #4b5563;
    font-weight: bold;
}

.tabla-datos__fila {
    border-bottom: 1px solid #e5e7eb;
    transition: background-color 0.2s;
}

.tabla-datos__fila:hover {
    background-color: #f3f4f6;
}

.tabla-datos__td {
    padding: 0.75rem;
    color: #374151;
}

.tabla-datos__td--id {
    color: #6b7280;
    font-size: 0.875rem;
}

.tabla-datos__td--destacado {
    font-weight: 500;
    color: #111827;
}
.tabla-datos__td--centro {
    text-align: center;
}

/* Badges (Etiquetas) */
.insignia {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
}
.insignia--admin {
    background-color: #dbeafe;
    color: #1e40af;
}

.insignia--estandar {
    background-color: #f3f4f6;
    color: #4b5563;
}
.insignia--premium {
    background-color: #fef3c7;
    color: #047857;
}

.insignia--personal {
    background-color: #f3f4f6;
    color: #4b5563;
}

.insignia--pareja {
    background-color: #fce7f3;
    color: #be185d;
}

.insignia--grupo {
    background-color: #e0f2fe;
    color: #0369a1;
}

/* Paginación */
.paginacion-contenedor {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
}

/* Utilidades para Dashboard y Layout */
.dashboard__seccion {
    margin-bottom: 2.5rem;
}

.dashboard__subtitulo {
    text-align: left;
    color: #374151;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.tarjeta--ancha {
    max-width: none;
    padding: 1.5rem;
}

.texto-muted {
    color: #6b7280;
    font-size: 0.875rem;
    font-weight: normal;
}

.texto-negrita {
    font-weight: bold;
}

/* Clases de Utilidad para Alertas y Mensajes */
.alerta {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.alerta--exito {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

.alerta--error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

/* Ajustes para elementos dentro de tablas */
.formulario__entrada--ancho-auto {
    width: auto;
    padding: 0.25rem;
}

.flex-center-gap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* Características en Welcome */
.presentacion__caracteristicas {
    margin-top: 3rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    text-align: center;
}

@media (min-width: 768px) {
    .presentacion__caracteristicas {
        grid-template-columns: repeat(3, 1fr);
    }
}