/* Variables globales */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --accent-color: #0dcaf0;
    --text-color: #212529;
    --light-bg: #f8f9fa;
    --white: #ffffff;
    --error-color: #dc3545;
    --success-color: #198754;
}

/* Reset y estilos base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

#visor-container {
  margin-top: 65px;
  height: calc(100vh - 65px) !important;
}


#spinner-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
}



/* Header y navegación */
header {
    background-color: var(--primary-color);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.logo {
    color: var(--white);
    font-size: 1.5rem;
    font-weight: bold;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li a {
    color: var(--white);
    text-decoration: none;
    padding: 0.5rem 1rem;
    transition: color 0.3s ease;
}

nav ul li a:hover {
    color: var(--secondary-color);
}

.card-min-fixed {
  min-height: 85vh;
}


#navbar-container {
  height: 30px; 
}


/* Sección Hero */
.hero {
    height: 100vh;
    background: linear-gradient(rgba(44, 62, 80, 0.9), rgba(44, 62, 80, 0.9)),
        url('../img/hero-bg.jpg') center/cover;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--white);
    padding: 0 2rem;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* Contenedor del mapa */
.map-container {
    padding: 4rem 2rem;
    background-color: var(--light-bg);
}

#map {
    height: 500px;
    background-color: #ddd;
    border-radius: 8px;
    margin-top: 2rem;
}

/* Sección de estadísticas */
.stats {
    padding: 4rem 2rem;
    background-color: var(--white);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 2rem auto;
}

.stat-card {
    background-color: var(--light-bg);
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: var(--white);
    text-align: center;
    padding: 2rem;
    margin-top: 4rem;
}

/* Contenedor del login y welcome */
.login-container,
.welcome-container {
    width: 100%;
    max-width: 400px;
    padding: 2rem;
}

.login-box,
.welcome-box {
    background-color: var(--white);
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    text-align: center;
}

.login-header {
    margin-bottom: 2rem;
}

.login-header h1 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.login-header p {
    color: var(--text-color);
    opacity: 0.8;
}

/* Formulario */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    text-align: left;
}

.form-group label {
    color: var(--text-color);
    font-weight: 500;
}

.form-group input {
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--secondary-color);
}

.login-button {
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 1rem;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: 100%;
}

.login-button:hover {
    background-color: #2980b9;
}

/* Mensaje de error */
.error-message {
    color: var(--error-color);
    text-align: center;
    font-size: 0.9rem;
    min-height: 1.2rem;
}

/* Animaciones */
@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

.error {
    animation: shake 0.5s ease-in-out;
    border-color: var(--error-color) !important;
}

/* Estilos para la página de bienvenida */
.welcome-box h1 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 1rem;
}

.welcome-box p {
    color: var(--text-color);
    margin-bottom: 2rem;
}

/* Responsive */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        text-align: center;
    }

    nav ul {
        margin-top: 1rem;
        flex-direction: column;
    }

    nav ul li {
        margin: 0.5rem 0;
    }

    .hero h1 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {

    .login-container,
    .welcome-container {
        padding: 1rem;
    }

    .login-box,
    .welcome-box {
        padding: 1.5rem;
    }
}

/* Estilos personalizados para el formulario de login */
.card {
    border: none;
    border-radius: 15px;
}

.card-body {
    border-radius: 15px;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.btn-primary {
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}


.navbar-brand {
    font-weight: 600;
    font-size: 1.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .card-body {
        padding: 2rem !important;
    }
}

/* Footer */
.footer {
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer span {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Animaciones */
@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

.error-shake {
    animation: shake 0.5s ease-in-out;
}

/* Estilos para la sección de carga de Excel */
.excel-upload {
    padding: 2rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    margin: 2rem 0;
}

.upload-container {
    max-width: 600px;
    margin: 0 auto;
}

.file-input-container {
    margin-bottom: 1rem;
}

.file-input-container input[type="file"] {
    display: none;
}

.file-input-label {
    display: block;
    padding: 1rem;
    background-color: #e9ecef;
    border: 2px dashed #6c757d;
    border-radius: 4px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-input-label:hover {
    background-color: #dee2e6;
    border-color: #495057;
}

.upload-button {
    display: block;
    width: 100%;
    padding: 0.75rem;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease;
}

.upload-button:hover {
    background-color: #0056b3;
}

.upload-button:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}

/* Estilos para los mensajes de validación */
.validation-messages {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: 4px;
}

.validation-message {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mensaje-principal {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.validation-message.error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.validation-message.success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.validation-message i {
    font-size: 1.2rem;
}

.filas-error {
    font-size: 0.9rem;
    margin-top: 0.5rem;
    padding-left: 1.5rem;
    color: #721c24;
    border-top: 1px solid rgba(114, 28, 36, 0.1);
    padding-top: 0.5rem;
}

.filas-error strong {
    color: #721c24;
    font-weight: 600;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    display: none;
}

.modal-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1002;
    width: 80%;
    background: white;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
}

/* Estilos para pestañas del formulario REO */
#reoTabs .nav-link i {
  margin-right: 0.5rem;
}

.tab-pane .col {
  padding: 0.5rem;
}

/* Estilos para la tabla de REOs - altura mínima para mostrar acciones sin scroll */
.dynamic-table-container {
  min-height: 500px;
}

.dynamic-table-container .table-responsive {
  min-height: 400px;
}

/* Asegurar que el dropdown de acciones se muestre correctamente */
.dropdown-menu {
  z-index: 1050;
}

