/* =========================================
   1. Variables y Reset Scoped (Encapsulado)
   ========================================= */
#eliteed-app {
    --color-primary: #1E73BE;
    --color-primary-dark: #165b9a;
    --color-secondary: #ffc857;
    --color-brand-dark: #021138;
    --color-bg-light: #F9FAFB;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --font-main: 'Montserrat', sans-serif;
    --hero-transition: all 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);

    font-family: var(--font-main);
    background-color: var(--color-bg-light);
    color: var(--text-main);
    line-height: 1.5;
    width: 100%;
    overflow-x: hidden;
}

#eliteed-app * {
    box-sizing: border-box;
}

/* Utilitarios */
#eliteed-app .container-custom {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

#eliteed-app .hidden {
    display: none !important;
}

#eliteed-app .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* =========================================
   2. Componentes UI
   ========================================= */
#eliteed-app .spinner {
    width: 1.2rem;
    height: 1.2rem;
    border: 2px solid #ffffff;
    border-bottom-color: transparent;
    border-radius: 50%;
    display: inline-block;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
}

@keyframes rotation {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

#eliteed-app .btn-primary {
    background: var(--color-primary);
    color: white;
    padding: 0.875rem;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    font-size: 1.3rem;
    transition: 0.2s;
    font-family: var(--font-main);
    text-decoration: none;
}

#eliteed-app .btn-primary:active {
    transform: scale(0.98);
}

#eliteed-app .btn-primary:disabled {
    background-color: #94a3b8;
    cursor: not-allowed;
}

/* =========================================
   3. HERO SECTION
   ========================================= */
#eliteed-app .hero-section {
    position: relative;
    background-color: var(--color-brand-dark);
    min-height: 80vh;
    display: flex;
    align-items: center;
    padding: 4rem 0;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: var(--hero-transition);
    z-index: 1;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

#eliteed-app .hero-section.is-active {
    min-height: auto;
    padding: 3rem 0 3rem 0;
    display: block;
}

#eliteed-app .hero-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    z-index: 1;
    opacity: 0.4;
    transition: var(--hero-transition);
}

#eliteed-app .blob-1 {
    top: -10%;
    right: -5%;
    width: 50vw;
    height: 50vw;
    background: rgba(30, 115, 190, 0.5);
}

#eliteed-app .blob-2 {
    bottom: -10%;
    left: -5%;
    width: 40vw;
    height: 40vw;
    background: rgba(213, 171, 93, 0.3);
}

#eliteed-app .hero-section.is-active .blob-1 {
    top: -2rem;
    right: -2rem;
    width: 12rem;
    height: 12rem;
    opacity: 0.2;
}

#eliteed-app .hero-section.is-active .blob-2 {
    bottom: 2rem;
    left: -2rem;
    width: 10rem;
    height: 10rem;
    opacity: 0.1;
}

#eliteed-app .hero-content {
    position: relative;
    z-index: 10;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    width: 100%;
    transition: var(--hero-transition);
}

#eliteed-app .badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 1rem;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--color-secondary);
    border: 1px solid rgba(255, 200, 87, 0.3);
    border-radius: 99px;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 1.25rem;
    backdrop-filter: blur(4px);
}

#eliteed-app .badge-dot {
    width: 8px;
    height: 8px;
    background: var(--color-secondary);
    border-radius: 50%;
}

#eliteed-app .hero-title {
    font-size: 2.3rem;
    font-weight: 800;
    color: white;
    margin-bottom: 1rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    transition: font-size 0.5s ease;
    font-family: var(--font-main);
}

#eliteed-app .text-gold {
    color: var(--color-secondary);
}

#eliteed-app .d-block-custom {
    display: block;
}

#eliteed-app .hero-description {
    font-size: 1.2rem;
    color: #e2e8f0;
    margin-bottom: 2rem;
    font-weight: 400;
    line-height: 1.6;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
    transition: all 0.5s ease;
}

#eliteed-app .hero-section.is-active .hero-title {
    font-size: 2.4rem;
    margin-bottom: 0.75rem;
}

#eliteed-app .hero-section.is-active .hero-description {
    margin-bottom: 2rem;
    font-size: 1.3rem;
    opacity: 0.9;
}

/* =========================================
   4. Tarjeta de Búsqueda
   ========================================= */
   #eliteed-app .search-tip {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-top: 0.75rem;
    margin-bottom: 0;
    text-align: center;
    font-style: normal;
    animation: fadeInTip 0.3s ease-in-out;
}

@keyframes fadeInTip {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}
/* NUEVO: Estilo para la etiqueta IMPORTANTE */
#eliteed-app .tip-label {
    font-weight: 800; /* Extra negrita */
    color: #5e6371; /* Un color oscuro para resaltar */
    margin-right: 0.3rem; /* Espacio entre los dos puntos y el texto */
    text-transform: uppercase;
}

#eliteed-app .search-card-wrapper {
    position: relative;
    z-index: 50;
    transition: transform 0.5s ease;
}

#eliteed-app .search-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: left;
    width: 100%;
    max-width: 650px;
    margin: 0 auto;
    backdrop-filter: blur(8px);
}

#eliteed-app .hero-section.is-active .search-card {
    background: white;
    backdrop-filter: none;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

#eliteed-app .search-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    background: #f3f4f6;
    padding: 0.25rem;
    border-radius: var(--radius-md);
}

#eliteed-app .search-tab {
    flex: 1;
    cursor: pointer;
    margin-bottom: 0;
}

#eliteed-app .tab-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.75rem 0.5rem;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-muted);
    border-radius: 0.375rem;
    transition: 0.2s;
}

#eliteed-app input[type="radio"]:checked+.tab-content {
    background: white;
    color: var(--color-brand-dark);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

#eliteed-app .search-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

#eliteed-app .input-wrapper {
    position: relative;
    width: 100%;
}

#eliteed-app .input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    transition: all 0.2s ease;
}

#eliteed-app .search-input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 3.75rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: var(--radius-md);
    font-size: 1.4rem;
    outline: none;
    transition: 0.2s;
    height: auto;
    line-height: normal;
    font-family: var(--font-main);
}

#eliteed-app .search-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(30, 115, 190, 0.1);
}

#eliteed-app .search-input:disabled {
    background-color: #f1f5f9;
    cursor: not-allowed;
    opacity: 0.7;
}
#eliteed-app .search-input::placeholder{
    color:#9ca3af;
    font-family: var(--font-main);
}

/* =========================================
   5. Main Content (Resultados)
   ========================================= */
#eliteed-app .main-content-wrapper {
    flex-grow: 1;
    opacity: 0;
    display: none;
    transition: opacity 0.6s ease;
    position: relative;
    z-index: 20;
    background-color: var(--color-bg-light);
    padding-top: 1rem;
    padding-bottom: 4rem;
}

#eliteed-app .main-content-wrapper.is-visible {
    opacity: 1;
    display: block;
    animation: fadeIn 0.8s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#eliteed-app .results-summary {
        /* Cambiado de row/space-between a column/center */
        flex-direction: column; 
        justify-content: center;
        align-items: center;
        padding: 0 1rem;
        text-align: center;
        margin-bottom: 2rem; /* Un poco más de espacio antes de la tabla */
    }

#eliteed-app .summary-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
    font-family: var(--font-main);
}

#eliteed-app .summary-count {
    color: var(--color-primary);
    font-size: 2rem;
    font-weight: 900;
}

#eliteed-app .summary-query {
    font-weight: 400;
    color: var(--text-muted);
    font-size: 1.5rem;
    margin: 0;
}

#eliteed-app .query-highlight {
    font-weight: 600;
    color: var(--color-brand-dark);
    font-style: italic;
    word-break: break-all;
}
#eliteed-app .legend-wrapper {
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 1.5rem;
    width: 100%;
}

#eliteed-app .legend-title {
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

#eliteed-app .legend-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

#eliteed-app .legend-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

#eliteed-app .legend-text {
    font-size: 0.95rem;
    color: var(--text-main);
    font-weight: 500;
}

#eliteed-app .results-container {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid #f3f4f6;
    overflow: hidden;
    width: 100%;
    margin-bottom: 2rem;
}

#eliteed-app .data-table {
    width: 100%;
    border-collapse: collapse;
    border: none;
}

#eliteed-app .data-table thead {
    display: none;
}

#eliteed-app .data-table tbody tr {
    display: block;
    border-bottom: 1px solid #f3f4f6;
    padding: 1.25rem;
    position: relative;
}

#eliteed-app .data-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.4rem 0;
    border: none;
    text-align: right;
    font-size: 1rem;
}

#eliteed-app .data-table td::before {
    content: attr(data-label);
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-muted);
    text-transform: uppercase;
    text-align: left;
    padding-right: 1rem;
    min-width: 90px;
}

#eliteed-app .badge-id {
    font-family: monospace;
    font-size: 1rem;
    background: #f3f4f6;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    color: var(--text-muted);
}

#eliteed-app .badge-cat {
    font-size: 1rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    display: inline-block;
}

#eliteed-app .cat-pae {
    background: #e0e7ff;
    color: #3730a3;
}

#eliteed-app .cat-pe {
    background: #fef3c7;
    color: #92400e;
}

#eliteed-app .cat-ce {
    background: #dcfce7;
    color: #166534;
}

#eliteed-app .cat-mod {
    background: #f3f4f6;
    color: #4b5563;
}

#eliteed-app .text-bold {
    font-weight: 600;
    color: var(--text-main);
    font-size: 1rem;
}

#eliteed-app .text-small {
    font-size: 1.2rem;
    color: var(--text-muted);
}

#eliteed-app .grade {
    font-size: 1.3rem;
    font-weight: 700;
    padding: 0.25rem 0.75rem;
    border-radius: 99px;
}

#eliteed-app .grade-high {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

#eliteed-app .grade-excellent {
    background: #dbeafe;
    color: var(--color-primary);
    border: 1px solid #bfdbfe;
}

#eliteed-app .no-results {
    text-align: center;
    padding: 3rem 1rem;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    margin-top: 2rem;
}

#eliteed-app .no-results-icon {
    font-size: 3rem;
    color: #cbd5e1;
}

#eliteed-app .no-results-title {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

/* Media Queries */
@media (min-width: 768px) {
    #eliteed-app .hero-title {
        font-size: 3rem;
        margin-bottom: 1.5rem;
    }

    #eliteed-app .hero-description {
        font-size: 1.4rem;
    }

    #eliteed-app .hero-section.is-active .hero-title {
        font-size: 2.5rem;
    }

    #eliteed-app .d-block-custom {
        display: inline;
    }

    #eliteed-app .search-form {
        flex-direction: row;
    }

    #eliteed-app .btn-primary {
        width: auto;
        min-width: 160px;
    }

    #eliteed-app .results-summary {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-end;
        padding: 0 1rem;
    }
    #eliteed-app .search-tip {
        text-align: left;
        padding-left: 0.5rem;
    }

    #eliteed-app .summary-title {
        font-size: 2.4rem;
    }

    #eliteed-app .summary-count {
        font-size: 2.4rem;
    }

    #eliteed-app .summary-query {
        margin-top: 0;
        font-size: 1.8rem;
    }

    #eliteed-app .data-table {
        display: table;
    }

    #eliteed-app .data-table thead {
        display: table-header-group;
    }

    #eliteed-app .data-table thead th {
        text-align: left;
        padding: 1.25rem 1.5rem;
        font-size: 1.3rem;
        text-transform: uppercase;
        color: var(--text-muted);
        font-weight: 700;
        background-color: #f9fafb;
        border-bottom: 2px solid #f3f4f6;
    }

    #eliteed-app .data-table tbody tr {
        display: table-row;
        padding: 0;
        border-bottom: 1px solid #f3f4f6;
    }

    #eliteed-app .data-table tbody tr:hover {
        background-color: #f9fafb;
    }

    #eliteed-app .data-table td {
        display: table-cell;
        text-align: left;
        padding: 1.25rem 1.5rem;
        border-bottom: none;
        vertical-align: middle;
        font-size: 0.9rem;
    }

    #eliteed-app .data-table td::before {
        content: none;
    }

    #eliteed-app .data-table td.text-center {
        text-align: center;
    }

    #eliteed-app .text-bold {
        font-size: 1.1rem;
    }

    #eliteed-app .text-small {
        font-size: 1.3rem;
    }

    #eliteed-app .badge-id {
        font-size: 1.3rem;
    }

    #eliteed-app .search-tip {
        text-align: left;
        padding-left: 0.5rem;
    }

    #eliteed-app .legend-wrapper {
        display: flex;
        align-items: center;
        gap: 1.5rem;
        padding: 0.75rem 1.5rem;
    }

    #eliteed-app .legend-title {
        margin-bottom: 0;
        white-space: nowrap;
    }

    #eliteed-app .legend-grid {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 1.5rem;
    }
}

@media (min-width: 1024px) {
    #eliteed-app .hero-title {
        font-size: 4rem;
    }

    #eliteed-app .hero-section.is-active .hero-title {
        font-size: 3.4rem;
    }
}

.tpc-site-content {
    padding: 0px !important;
}