:root {
    --primary-teal: #26a69a; /* Verde/Teal oficial del encabezado de tablas de tu Dashboard */
    --primary-teal-hover: #00897b;
    --primary-teal-light: rgba(38, 166, 154, 0.08);
    --dark-blue: #061943; /* Azul marino oficial de AFOCAT, solicitado por el usuario */
    --dark-blue-hover: #0a296b;
    --text-main: #334155;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --shadow-premium: 0 20px 40px -10px rgba(6, 25, 67, 0.25), 0 10px 20px -8px rgba(6, 25, 67, 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: #f5f7fa; /* Gris azulado limpio que resalta el azul y el verde del card */
    color: var(--text-main);
    line-height: 1.6;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.search-wrapper {
    width: 100%;
    max-width: 580px; /* Tamaño perfecto para móviles y escritorio */
    text-align: center;
    animation: fadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

/* Brand Logo */
.brand-logo {
    height: 95px;
    width: auto;
    margin-bottom: 24px;
    filter: drop-shadow(0 4px 10px rgba(15, 23, 42, 0.05));
    transition: var(--transition);
}

.brand-logo:hover {
    transform: scale(1.03);
}

/* Card Container */
.search-card {
    background-color: var(--dark-blue);
    border-radius: 24px;
    padding: 45px 35px;
    color: #ffffff;
    box-shadow: var(--shadow-premium);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

/* Subtle background glow effect inside the card */
.search-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(59, 168, 70, 0.08) 0%, transparent 60%);
    pointer-events: none;
}

/* Form Styles */
.search-card h2 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 2px; /* Reducción de espacio solicitada por el usuario */
    letter-spacing: -0.03em;
}

.search-card .subtitle {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.65);
    font-weight: 500;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 24px;
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 8px;
    letter-spacing: 0.08em;
    padding-left: 4px;
}

.input-control {
    width: 100%;
    padding: 16px 20px;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    border-radius: 14px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    background-color: rgba(255, 255, 255, 0.07);
    color: #ffffff;
    outline: none;
    transition: var(--transition);
    text-align: center;
}

.input-control::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.input-control:focus {
    border-color: var(--primary-teal);
    background-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 0 4px rgba(38, 166, 154, 0.2);
}

/* Buttons */
.btn-primary {
    width: 100%;
    padding: 16px 26px;
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    background-color: var(--primary-teal);
    border: none;
    border-radius: 14px;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(38, 166, 154, 0.25);
}

.btn-primary:hover {
    background-color: var(--primary-teal-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(38, 166, 154, 0.35);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    width: 100%;
    padding: 16px 26px;
    font-size: 16px;
    font-weight: 700;
    color: #ffffff; /* Texto en blanco puro */
    background-color: var(--primary-teal); /* Fondo verde menta institucional sólido */
    border: none; /* Sin borde, estilo de botón sólido */
    border-radius: 14px;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(38, 166, 154, 0.25);
}

.btn-secondary:hover {
    background-color: var(--primary-teal-hover); /* Oscurece sutilmente en hover */
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(38, 166, 154, 0.35);
}

/* Results Grid */
.results-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.result-item {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 14px 16px;
    text-align: left;
}

.result-item .label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 4px;
    letter-spacing: 0.05em;
}

.result-item .value {
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
}

/* Badges */
.status-badge {
    grid-column: span 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.status-badge.active {
    background-color: rgba(74, 222, 128, 0.14); /* Mayor visibilidad y brillo */
    border: 1px solid rgba(74, 222, 128, 0.45);
    color: #4ade80; /* Verde brillante esmeralda de alto impacto visual */
}

.status-badge.expired {
    background-color: rgba(248, 113, 113, 0.14);
    border: 1px solid rgba(248, 113, 113, 0.45);
    color: #f87171; /* Rojo rosado vibrante de alto contraste */
}

/* Alert States */
.alert-box {
    background-color: rgba(239, 83, 80, 0.08);
    border: 1px solid rgba(239, 83, 80, 0.2);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
    text-align: center;
}

.alert-box i {
    font-size: 32px;
    color: #e57373;
    margin-bottom: 12px;
}

.alert-box p {
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.5;
}

/* Loader Styles */
.spinner-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px 0;
}

.spinner {
    font-size: 36px;
    color: var(--primary-teal);
    margin-bottom: 15px;
}

.spinner-text {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
}

/* Footer */
.main-footer {
    margin-top: 24px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
}

/* View transitions */
.view-section {
    display: none;
}

.view-section.active {
    display: block;
    animation: fadeIn 0.4s ease-out forwards;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .search-card {
        padding: 30px 20px;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .status-badge {
        grid-column: span 1;
    }
}
