/* Google Font: Montserrat */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;700&display=swap');

/* Animaciones */
@keyframes spin { 100% { transform: rotate(360deg); } }

/* Variables de Color */
:root {
    --header-bg: #f8f9fa;
    --header-title-color: #333;
    --main-bg: #ffffff;
    --section-title-color: #333;
    --section-subtitle-color: #6c757d;
    --search-btn-bg: #2f4f4f;
    --reset-btn-bg: #808080;
    --search-border-color: #c89c6c;
    --results-box-bg: #f8f9fa;
    --results-border: #dee2e6;
    --footer-bg: #611232;
    --footer-text: #ffffff;
}

/* Estilos Generales */
body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--main-bg);
    color: #333;
}
.page-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
.content-wrapper {
    flex: 1;
}

/* Encabezado */
.main-header {
    background-color: var(--header-bg);
    padding: 1rem 0;
    border-bottom: 1px solid var(--results-border);
}
.header-logo {
    height: 50px;
    width: auto;
    margin-right: 15px;
}
.header-title h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--header-title-color);
    margin: 0;
}

/* Sección de Validación */
.validation-section {
    padding: 2rem 0;
}
.section-title {
    font-weight: 500;
    font-size: 2.2rem;
    color: #4a4a4a;
    line-height: 1.2;
    margin-bottom: 1rem;
    border-bottom: 3px solid var(--search-border-color);
    padding-bottom: 1rem;
}
.section-subtitle {
    font-size: 1rem;
    color: var(--section-subtitle-color);
    max-width: 800px;
    margin-top: 1rem;
    margin-bottom: 2.5rem;
}
.search-container {
    padding: 1rem;
    border: 1px solid var(--search-border-color);
    border-radius: 5px;
}
.search-form-v2 {
    display: flex;
    gap: 10px;
}
.search-form-v2 .form-control {
    border-radius: 5px;
    border: 1px solid #ccc;
    flex-grow: 1;
}
.btn-search-v2 {
    background-color: var(--search-btn-bg);
    color: white;
    border: none;
    border-radius: 5px;
    padding: 0.5rem 1.5rem;
    font-weight: 500;
}
.btn-reset-v2 {
    background-color: var(--reset-btn-bg);
    color: white;
    border: none;
    border-radius: 5px;
    padding: 0.5rem 1.5rem;
    font-weight: 500;
}

/* Sección de Resultados */
.results-box {
    background-color: var(--results-box-bg);
    border: 1px solid var(--results-border);
    padding: 2rem;
}
.results-title {
    font-weight: 500;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--results-border);
}
.results-box p {
    font-size: 0.95rem;
    margin-bottom: 1rem;
}
.results-box p strong {
    display: block;
    color: #6c757d;
    font-size: 0.8rem;
    text-transform: uppercase;
    margin-bottom: 0.1rem;
}
.status-badge {
    background-color: #28a745;
    color: white;
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
    border-radius: 4px;
    font-weight: 500;
}

/* Aviso Legal */
.legal-section {
    text-align: justify;
    font-size: 0.85rem;
    color: #6c757d;
}
.legal-title {
    font-weight: bold;
    color: #333;
    font-size: 1rem;
    margin-bottom: 1rem;
}

/* Footer */
.main-footer {
    background-color: var(--footer-bg);
    color: var(--footer-text);
    padding: 2.5rem 0;
    font-size: 0.9rem;
    margin-top: auto;
}
.footer-logo {
    max-width: 150px;
    height: auto;
    filter: brightness(0) invert(1);
}
.footer-contact p {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}
.footer-contact strong {
    font-size: 1.1rem;
}
.footer-divider {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    margin: 2rem 0;
}
.footer-copyright p {
    margin-bottom: 0.25rem;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
}

/* Modal de Carga */
.loading-modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    display: none; justify-content: center; align-items: center;
    z-index: 9999;
}
.loading-box {
    background-color: white; padding: 35px 45px;
    border-radius: 5px; box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    text-align: center; display: flex;
    flex-direction: column; align-items: center; gap: 20px;
    border: 1px solid #ddd;
}
.spinner-custom {
    width: 48px; height: 48px;
    border: 5px solid rgba(0, 0, 0, 0.1);
    border-left-color: var(--search-btn-bg);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
.loading-box p {
    margin: 0; font-size: 1rem; font-weight: 500;
    color: #333;
}

/* --- INICIO: REGLAS RESPONSIVAS --- */
@media (max-width: 768px) {
    .header-title h1 { font-size: 1rem; }
    .section-title { font-size: 1.5rem; }
    .main-footer { text-align: center; }
    .search-form-v2 { flex-direction: column; gap: 10px; }
    .search-form-v2 .btn-reset-v2 { margin-left: 0; }
    .results-box { padding: 1.5rem; }
    .footer-contact { margin-bottom: 1.5rem; }
}

@media (max-width: 576px) {
    .content-wrapper { padding: 1.5rem; }
}
/* --- FIN: REGLAS RESPONSIVAS --- */

/* --- INICIO: ESTILOS PARA EL PANEL DE ADMIN --- */
.login-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 100vh;
    background-color: #f4f4f4;
}
.login-container {
    width: 100%;
    max-width: 400px;
    padding: 30px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.admin-nav {
    background-color: #343a40 !important; /* Un color oscuro para el panel */
}
.admin-nav .navbar-text {
    color: rgba(255, 255, 255, 0.7);
}
.admin-nav .nav-link {
    color: rgba(255, 255, 255, 0.9);
}
.admin-nav .nav-link:hover {
    color: #fff;
}
/* --- FIN: ESTILOS PARA EL PANEL DE ADMIN --- */