/* ==========================================================================
   RESET & VARIABLES
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body.CRM-body-bg {
    font-family: 'Poppins', sans-serif;
    color: #ffffff;
    min-height: 100vh;
    width: 100vw;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;

    /* Fondo e imagen desde URL externa */
    background-image: url('https://sistema-convencion.cruzrojamexicana.org.mx/panel-administrador/assets/Aguascalientes.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    position: relative;
}

/* Capa de degradado azul institucional */
body.CRM-body-bg::before {
    content: '';
    position: fixed;
    inset: 0;
    background: linear-gradient(to bottom, rgba(24, 56, 117, 0.6) 0%, rgba(24, 56, 117, 1) 100%);
    z-index: 1;
}

/* Contenedor Principal: Centrado vertical y horizontal con márgenes simétricos */
.CRM-main-container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1100px;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding: 3rem 1.5rem;
    margin: auto 0;
}

.CRM-d-none {
    display: none !important;
}

/* ==========================================================================
   CABECERA PRINCIPAL
   ========================================================================== */
.CRM-header-section {
    margin-bottom: 0.5rem;
    text-align: center;
}

.CRM-title-primary {
    font-size: 2.2rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.35rem;
}

.CRM-subtitle-primary {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.85);
}

/* ==========================================================================
   ALERTA BANNER (¡IMPORTANTE!)
   ========================================================================== */
.CRM-alert-banner {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    animation: CRM_fadeIn 300ms ease-out;
}

.CRM-alert-banner-content {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
}

.CRM-alert-banner-icon {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    object-fit: contain;
}

.CRM-alert-banner-texts {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.CRM-alert-banner-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: #ffffff;
}

.CRM-alert-banner-desc {
    font-size: 0.9rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.9);
}

.CRM-alert-banner-close {
    background: transparent;
    border: none;
    font-size: 1.6rem;
    line-height: 1;
    color: #ffffff;
    cursor: pointer;
    padding: 0 0.25rem;
    opacity: 0.8;
    transition: opacity 200ms ease;
}

.CRM-alert-banner-close:hover {
    opacity: 1;
}

/* ==========================================================================
   TARJETA DE BÚSQUEDA & INPUTS (EFECTO GLASSMORPHISM)
   ========================================================================== */
.CRM-search-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 20px 40px #071644;
}

.CRM-search-title {
    font-size: 1.35rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 0.35rem;
}

.CRM-search-subtitle {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2.5rem;
}

.CRM-search-form {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    flex-wrap: wrap;
}

.CRM-input-wrapper {
    flex: 1;
    min-width: 250px;
}

.CRM-form-input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    padding: 0.6rem 0;
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    color: #ffffff;
    transition: border-color 250ms ease;
}

.CRM-form-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
    transition: color 250ms ease;
}

.CRM-form-input:focus {
    border-bottom-color: #ffffff;
    color: #ffffff;
}

/* ==========================================================================
   BOTÓN DE BÚSQUEDA (ANIMACIÓN PREMIUM)
   ========================================================================== */
.CRM-btn-search {
    background-color: #ff3333;
    color: #ffffff;
    border: none;
    padding: 0.85rem 3.5rem;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 50px;
    cursor: pointer;
    flex-shrink: 0;
    box-shadow: 0 6px 15px #071644;
    transition: transform 300ms cubic-bezier(0.2, 0.8, 0.2, 1),
                padding 300ms cubic-bezier(0.2, 0.8, 0.2, 1),
                box-shadow 300ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.CRM-btn-search:hover {
    box-shadow: none;
    transform: translateY(7px);
    padding-left: calc(3.5rem + 7px);
    padding-right: calc(3.5rem + 7px);
}

/* ==========================================================================
   ESTRUCTURA GENERAL DE TARJETA DE RESULTADOS
   ========================================================================== */
.CRM-results-container {
    width: 100%;
}

.CRM-result-card {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    gap: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-left-width: 12px;
    animation: CRM_slideUp 400ms cubic-bezier(0.1, 0.8, 0.2, 1);
}

.CRM-result-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.CRM-result-icon {
    width: 56px;
    height: 56px;
    object-fit: contain;
}

.CRM-result-header-texts {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.CRM-result-main-title {
    font-size: 1.35rem;
    font-weight: 600;
}

.CRM-result-main-subtitle {
    font-size: 0.9rem;
}

.CRM-data-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem 2rem;
}

.CRM-data-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.CRM-data-label {
    font-weight: 600;
    white-space: nowrap;
}

.CRM-data-value {
    font-weight: 400;
}

.CRM-badge {
    padding: 0.25rem 0.85rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #ffffff;
    display: inline-block;
}

/* ==========================================================================
   ESTILOS ESPECÍFICOS: CONFIRMADO
   ========================================================================== */
.CRM-card-confirmed {
    border-color: #85c988;
    border-left-style: solid;
}

.CRM-text-confirmed-dark { color: #345134; }
.CRM-text-confirmed-light { color: #568256; }

.CRM-grid-confirmed .CRM-data-label { color: #345134; }
.CRM-grid-confirmed .CRM-data-value { color: #568256; }

.CRM-badge-confirmed {
    background-color: #85c988;
}

/* ==========================================================================
   ESTILOS ESPECÍFICOS: NO CONFIRMADO
   ========================================================================== */
.CRM-card-unconfirmed {
    border-color: #fc5b5b;
    border-left-style: solid;
}

.CRM-text-unconfirmed-dark { color: #543456; }
.CRM-text-unconfirmed-light { color: #8a5b8e; }

.CRM-grid-unconfirmed .CRM-data-label { color: #543456; }
.CRM-grid-unconfirmed .CRM-data-value { color: #8a5b8e; }

.CRM-badge-unconfirmed {
    background-color: #fc5b5b;
}

/* ==========================================================================
   ANIMACIONES Y RESPONSIVE
   ========================================================================== */
@keyframes CRM_fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes CRM_slideUp {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 900px) {
    .CRM-data-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .CRM-main-container {
        padding: 2rem 1rem;
    }
    .CRM-search-card, .CRM-result-card {
        padding: 1.5rem;
    }
    .CRM-search-form {
        flex-direction: column;
        align-items: stretch;
        gap: 1.5rem;
    }
    .CRM-input-wrapper {
        min-width: 100%;
    }
    .CRM-btn-search {
        width: 100%;
        text-align: center;
    }
    .CRM-data-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .CRM-result-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
}