/* Reset CSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #f4f4f9;
    color: #333;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    padding-bottom: 60px; /* Aumenta este valor según la altura del footer */
}

header {
    background: #0a3d62;
    color: #fff;
    padding: 20px 0;
    text-align: center;
}

header h1 {
    margin: 0;
    font-size: 2.5em;
}

main {
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0px;
    background: #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

h2 {
    color: #0a3d62;
    margin-bottom: 20px;
    font-size: 2em;
    text-align: center;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

table th,
table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

table th {
    background: #0a3d62; /* Reverted to previous blue */
    color: #fff;
}

table tr:hover {
    background: #f1f1f1;
}

button, .button {
    background: #0a3d62;
    color: #fff;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-align: center;
}

button:hover, .button:hover {
    background: #1e3799;
}

.footer {
    /* background: #0a3d62; */  /* Mantenido comentado */ 
    /* color: #fff; */  /* Mantenido comentado */ 
    background-color: #0a3d62; /* Revertido a azul oscuro para coincidir con img 2 */
    color: #fff; /* Texto blanco */
    text-align: center;
    padding: 10px 0;
    width: 100%;
    position: fixed;
    bottom: 0;
    left: 0;
    z-index: 1000; /* Asegura que el footer esté por encima de otros elementos */ 
}

/* Anular estilos del .container general para el div dentro del footer */
.footer .container {
    background: transparent;
    box-shadow: none; 
    border-radius: 0; /* Opcional: quitar bordes redondeados si los hubiera */
    padding: 0; /* Opcional: quitar padding si lo hubiera heredado */
}

.fa-info-circle {
    margin-right: 8px;
}

/* Estilos personalizados adicionales si es necesario */
.navbar {
    background-color: #0a3d62; /* Color de fondo del menú */
    padding: 10px 20px; /* Espaciado interior del menú */
}

.navbar-brand {
    color: #fff; /* Color del texto del logo o título */
    font-size: 1.5rem; /* Tamaño del texto */
    font-weight: bold; /* Grosor del texto */
}

.navbar-nav .nav-item .nav-link {
    color: #fff; /* Color del texto de los enlaces */
    font-weight: 600; /* Grosor del texto */
}

.navbar-nav .nav-item .nav-link:hover {
    color: #f1f1f1; /* Color del texto al pasar el mouse sobre los enlaces */
}

/* Estilo para el botón navbar-toggler en vista móvil */
.navbar-toggler {
    border-color: #fff; /* Cambia el color del borde del botón */
}

.navbar-toggler .navbar-toggler-icon {
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='rgba%28255, 255, 255, 0.7%29' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E"); /* Cambia el color de las líneas */
}

/* Asegura que los íconos tengan un alto y ancho adecuado */
.navbar-toggler .navbar-toggler-icon {
    width: 30px;
    height: 30px;
}

/* Estilo adicional para el botón Volver */
.btn-volver {
    margin-bottom: 20px; /* Espacio en la parte inferior */
}

/* Alinear el contenido del modal */
.modal-body ul {
    padding-left: 20px; /* Ajuste de sangría para la lista */
}

/* Ajuste de margen y padding en el modal */
.modal-content {
    padding: 20px;
}

/* Estilo para el título del modal */
.modal-title {
    font-weight: bold;
    font-size: 1.25rem; /* Tamaño de fuente un poco más grande */
    margin-bottom: 10px; /* Margen inferior para separación */
}

/* Estilo para el modal de inicio de sesión */
#modalIniciarSesion .modal-header {
    background: #0a3d62;
    color: #fff;
    border-bottom: none;
    padding: 15px 20px;
}

#modalIniciarSesion .modal-title {
    font-size: 1.5rem;
}

#modalIniciarSesion .modal-body {
    padding: 20px;
}

#modalIniciarSesion .form-group label {
    font-weight: bold;
    color: #0a3d62;
}

#modalIniciarSesion .form-control {
    border-radius: 5px;
    border: 1px solid #ddd;
    padding: 10px;
    margin-bottom: 15px;
}

#modalIniciarSesion .btn-primary {
    background-color: #0a3d62;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#modalIniciarSesion .btn-primary:hover {
    background-color: #1e3799;
}

/* Remove or comment out previous rank styles */
/* 
.rank-display {
    display: inline-block;
    width: 25px; 
    height: 1.2em; 
    position: relative;
    vertical-align: middle;
    margin-right: 5px; 
    font-size: 0; 
    line-height: 0; 
}

.rank-oficial::before,
.rank-inspector::before,
.rank-inspector::after {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 3px; 
    background-color: #a9a9a9; 
    border-radius: 1px;
}

.rank-oficial::before {
    top: 50%;
    transform: translateY(-50%);
}

.rank-inspector::before {
    top: 30%; 
    transform: translateY(-50%);
}

.rank-inspector::after {
    content: ''; 
    position: absolute;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: #a9a9a9;
    border-radius: 1px;
    bottom: 30%; 
    transform: translateY(50%);
}

.rank-agente {
    width: 0; 
    margin-right: 0;
}
*/

/* Optional: Add styling for the Font Awesome icons if needed */
.rank-icon {
    color: #FCFE06; /* Updated icon color */
    vertical-align: middle; /* Align icon nicely with text in other cells */
    font-size: 0.9em; /* Slightly smaller icon */
    /* Ensure icon is centered within the badge */
    display: inline-block; /* Needed for vertical align */
    line-height: 1; /* Match badge line-height */
}

/* New styles for the rank background badge */
.rank-badge-bg {
    display: inline-flex; /* Use Flexbox for internal alignment */
    align-items: center; /* Vertically center items */
    justify-content: flex-start; /* Align items to the start (letter first) */
    background-color: #02012A; /* Dark blue background */
    width: 55px; /* Fixed width for consistent size */
    padding: 2px 5px; /* Adjust padding (less horizontal now width controls size) */
    border-radius: 3px; /* Slightly rounded corners */
    min-height: 1.2em; /* Ensure empty badges have height */
    vertical-align: middle; /* Align badge with text */
    color: #FCFE06; /* Default text color (for the letter) */
}

/* Style for the rank letter */
.rank-badge-bg b {
    font-weight: bold;
    margin-right: 8px; /* Increased space between letter and icon */
    line-height: 1; /* Match badge line-height */
}

/* Adjust icon style slightly for better contrast/position on badge */
.rank-badge-bg .rank-icon {
    color: #FCFE06; /* Ensure yellow color */
    font-size: 0.9em;
    line-height: 1;
    flex-grow: 1; /* Allow icon to take remaining space */
    text-align: center; /* Center icon within its space */
}

/* Remove rule that hides agent badge */
/*
.rank-agente {
    width: 0;
    margin-right: 0;
}
*/

/* --- Admin Agentes: edición inline --- */
.inline-editing {
    background-color: #fff8e1; /* Suave fondo para modo edición */
}
.inline-editing input.form-control,
.inline-editing select.form-control {
    padding-top: 0.15rem;
    padding-bottom: 0.15rem;
}
.gap-1 > * + * { margin-left: 4px; }

/* --- Modal Administrar Agentes: más ancho y aireado --- */
#modalAdministrarAgente .modal-dialog {
    max-width: 1200px; /* Más ancho que modal-lg estándar */
    width: 95%;
}
/* Modal Administrar Usuarios: más ancho */
#modalAdministrarUsuario .modal-dialog {
    max-width: 1000px;
    width: 95%;
}
#modalAdministrarAgente .modal-body {
    padding-top: 10px;
}
#modalAdministrarAgente table.table {
    margin-top: 10px;
}
