* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Segoe UI', Arial, sans-serif;
    background-color: #f4f6f9;
    color: #1f2933;
}

.pagina-login {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.tarjeta-login {
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(18, 58, 112, 0.12);
    padding: 40px 44px;
    width: 100%;
    max-width: 420px;
}

.logo-login {
    width: 100%;
    max-width: 300px;
    display: block;
    margin: 0 auto 28px auto;
}

.campo-formulario {
    margin-bottom: 18px;
}

.campo-formulario label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #123a70;
    margin-bottom: 6px;
}

.campo-formulario input[type="text"],
.campo-formulario input[type="email"],
.campo-formulario input[type="password"],
.campo-formulario input[type="date"],
.campo-formulario select {
    box-sizing: border-box;
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #d3d9e2;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    background-color: #ffffff;
}

.campo-formulario input:focus,
.campo-formulario select:focus {
    outline: none;
    border-color: #1fb6a6;
    box-shadow: 0 0 0 3px rgba(31, 182, 166, 0.15);
}

.mensaje-validacion {
    color: #d64545;
    font-size: 12px;
    display: block;
    margin-top: 4px;
}

.mensaje-error {
    display: block;
    color: #b42318;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 16px;
}

.boton-primario {
    width: 100%;
    background-color: #123a70;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s ease-in-out;
}

.boton-primario:hover {
    background-color: #0d2c56;
}

.pie-login {
    text-align: center;
    font-size: 12px;
    color: #9aa4b2;
    margin-top: 22px;
}

.texto-ayuda {
    font-size: 13px;
    color: #6b7684;
    margin: 0 0 20px 0;
}

.enlace-olvido {
    display: block;
    text-align: right;
    font-size: 12px;
    color: #123a70;
    text-decoration: none;
    margin: -10px 0 18px 0;
}

.enlace-olvido:hover {
    text-decoration: underline;
}

.cabecera-app {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #ffffff;
    padding: 14px 30px;
    box-shadow: 0 2px 8px rgba(18, 58, 112, 0.08);
}

.cabecera-app .logo-app {
    height: 42px;
}

.zona-usuario {
    display: flex;
    align-items: center;
    gap: 14px;
}

.insignia-rol {
    background-color: #e8f7f5;
    color: #0f7d6f;
    border: 1px solid #bfe9e2;
    border-radius: 20px;
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

.enlace-salir {
    color: #b42318;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.enlace-salir:hover {
    text-decoration: underline;
}

.contenido-principal {
    max-width: 1100px;
    margin: 0 auto;
    padding: 34px 24px 60px 24px;
}

.bienvenida h1 {
    font-size: 22px;
    color: #123a70;
    margin: 0 0 6px 0;
}

.bienvenida p {
    color: #6b7684;
    margin: 0 0 8px 0;
}

.bienvenida .info-sesion {
    font-size: 12px;
    color: #0f7d6f;
    font-weight: 600;
    margin: 0 0 30px 0;
}

.grilla-menu {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 18px;
}

.tarjeta-opcion {
    display: block;
    text-decoration: none;
    color: inherit;
    background-color: #ffffff;
    border: 1px solid #e4e8ee;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 6px rgba(18, 58, 112, 0.05);
    transition: box-shadow 0.15s ease-in-out, transform 0.15s ease-in-out;
}

.tarjeta-opcion:not(.tarjeta-opcion-inactiva):hover {
    box-shadow: 0 6px 16px rgba(18, 58, 112, 0.12);
    transform: translateY(-2px);
}

.tarjeta-opcion-inactiva {
    cursor: default;
}

.tarjeta-opcion h3 {
    font-size: 15px;
    color: #123a70;
    margin: 0 0 8px 0;
}

.tarjeta-opcion p {
    font-size: 13px;
    color: #6b7684;
    margin: 0;
}

.sin-opciones {
    color: #6b7684;
    font-style: italic;
}

.barra-acciones {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.enlace-volver {
    color: #123a70;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.enlace-volver:hover {
    text-decoration: underline;
}

.alerta-bloqueados {
    background-color: #fff4e5;
    border: 1px solid #f3c98b;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 24px;
}

.alerta-bloqueados h3 {
    margin: 0 0 10px 0;
    font-size: 15px;
    color: #8a5a00;
}

.fila-bloqueado {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 7px 0;
    font-size: 13px;
    color: #6b4600;
    border-top: 1px solid #f3c98b;
}

.fila-bloqueado:first-of-type {
    border-top: none;
}

.mensaje-exito {
    background-color: #e8f7f5;
    color: #0f7d6f;
    border: 1px solid #bfe9e2;
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 13px;
    margin-bottom: 16px;
    display: block;
}

.aviso-password {
    background-color: #eaf1ff;
    border: 1px solid #a9c4ee;
    color: #123a70;
    border-radius: 8px;
    padding: 14px 18px;
    margin-bottom: 20px;
    font-size: 14px;
}

.aviso-password strong {
    font-family: 'Courier New', monospace;
    font-size: 16px;
}

.panel-formulario {
    background-color: #ffffff;
    border: 1px solid #e4e8ee;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 28px;
    max-width: 560px;
}

.panel-formulario h2 {
    font-size: 17px;
    color: #123a70;
    margin: 0 0 18px 0;
}

.fila-filtros {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 4px;
}

.lista-roles label {
    font-weight: 400;
    display: inline-block;
    margin-right: 16px;
    color: #1f2933;
    font-size: 13px;
}

.acciones-formulario {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.acciones-formulario .boton-primario,
.acciones-formulario .boton-secundario {
    width: auto;
}

.boton-secundario {
    background-color: transparent;
    color: #123a70;
    border: 1px solid #123a70;
    border-radius: 6px;
    padding: 11px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.boton-secundario:hover {
    background-color: #f0f4fa;
}

.tabla-usuarios {
    width: 100%;
    border-collapse: collapse;
    background-color: #ffffff;
    border: 1px solid #d3d9e2;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(18, 58, 112, 0.07);
}

.tabla-usuarios th {
    text-align: left;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #ffffff;
    background-color: #123a70;
    padding: 12px 14px;
    border-right: 1px solid rgba(255, 255, 255, 0.15);
}

.tabla-usuarios th:last-child {
    border-right: none;
}

.tabla-usuarios td {
    padding: 11px 14px;
    font-size: 13px;
    color: #1f2933;
    border-right: 1px solid #e9edf3;
    border-bottom: 1px solid #e9edf3;
    vertical-align: middle;
}

.tabla-usuarios td:last-child {
    border-right: none;
}

.tabla-usuarios tbody tr:nth-child(even) {
    background-color: #f5f8fb;
}

.tabla-usuarios tbody tr:hover {
    background-color: #eaf1ff;
}

.tabla-usuarios tr:last-child td {
    border-bottom: none;
}

.badge-estado {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.badge-estado-activo {
    background-color: #e8f7f5;
    color: #0f7d6f;
}

.badge-estado-bloqueado {
    background-color: #fdecec;
    color: #b42318;
}

.badge-estado-inactivo {
    background-color: #f0f1f3;
    color: #6b7684;
}

.badge-riesgo-bajo {
    background-color: #e8f7f5;
    color: #0f7d6f;
}

.badge-riesgo-medio {
    background-color: #fff4e5;
    color: #8a5a00;
}

.badge-riesgo-alto {
    background-color: #ffe8d9;
    color: #b4530f;
}

.badge-riesgo-critico {
    background-color: #fdecec;
    color: #b42318;
}

.hash-integridad {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: #6b7684;
    margin-right: 6px;
}

.enlace-accion {
    color: #123a70;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    margin-right: 10px;
    white-space: nowrap;
}

.enlace-accion.enlace-peligro {
    color: #b42318;
}

.enlace-accion:hover {
    text-decoration: underline;
}
