/* ???????????????????????????????????????????????????????????????????
   Portal Ciudadano – Estilos ESPECÍFICOS del layout post-login.
   Los componentes compartidos (tabla, grilla, paginación, botones,
   formularios, badges, modales) ahora viven en:
     ~/_content/WebDesignSystem/css/mre-components.css
   ??????????????????????????????????????????????????????????????????? */

:root {
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-scale: 1;
    --base-font-size: 16px;
}

html { font-size: calc(var(--base-font-size) * var(--font-scale)); }

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--soft-bg);
    color: #1E293B;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}
.animate-fade { animation: fadeIn 0.4s ease-out forwards; }

/* ??? Sección principal ??? */
#portalSection {
    padding: 1rem 3%;
    max-width: 3400px;
    margin: 0 auto;
    flex: 1;
    width: 100%;
}

/* ??? Divisores de sección ??? */
.action-divider {
    border-bottom: 2px solid #E2E8F0;
    margin: 1.5rem 0 1rem 0;
    display: flex; align-items: center;
}
.action-label {
    background: #E2E8F0;
    color: var(--mre-blue);
    font-size: 0.65rem; font-weight: 800;
    padding: 2px 10px;
    border-radius: 4px 4px 0 0;
    text-transform: uppercase;
}

/* ??? Bandejas de estado ??? */
.status-scroll-wrapper {
    position: relative;
    display: flex; align-items: center;
    margin-bottom: 1.25rem;
}

.status-container {
    display: flex; gap: 0.65rem;
    margin-bottom: 0;
    overflow-x: auto;
    padding-bottom: 5px;
    scroll-behavior: smooth;
    -ms-overflow-style: none;
    scrollbar-width: none;
    flex: 1;
}
.status-container::-webkit-scrollbar { display: none; }

.status-btn {
    background: white;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    flex: 1;
    display: flex; align-items: center; justify-content: space-between;
    transition: var(--transition);
    cursor: pointer;
    min-width: 170px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}
.status-btn:hover { transform: translateY(-2px); border-color: #CBD5E1; }
.status-btn.active { border: 2px solid var(--mre-blue); background: #f0f7ff; }

.scroll-btn {
    background: white;
    border: 1px solid #E2E8F0;
    border-radius: 50%;
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    color: var(--mre-blue);
    transition: var(--transition);
    flex-shrink: 0;
}
.scroll-btn:hover {
    background: #F8FAFC;
    color: var(--mre-blue-light);
    border-color: var(--mre-blue-light);
    transform: scale(1.05);
}
.scroll-btn.left { margin-right: 8px; }
.scroll-btn.right { margin-left: 8px; }

@media (min-width: 1400px) {
    .scroll-btn { display: none; }
}

/* ??? Badges de estado (portal ciudadano) ??? */
.badge-status {
    padding: 4px 8px; border-radius: 99px;
    font-size: 0.65rem; font-weight: 800;
    text-transform: uppercase;
}
.bg-analisis { background: #E0F2FE; color: #0369A1; }
.bg-pagado   { background: #D1FAE5; color: #065F46; }
.bg-devuelto { background: #FEF3C7; color: #92400E; }

/* ??? Botón Ver Detalle ??? */
.btn-ver-detalle {
    background: #E0F2FE; color: #0284C7;
    border: 1px solid #BAE6FD;
    padding: 4px 10px; border-radius: 6px;
    font-size: 0.65rem; font-weight: 800;
    text-transform: uppercase;
    transition: var(--transition);
    cursor: pointer;
}
.btn-ver-detalle:hover { background: #BAE6FD; }

/* ??? Utilidades ??? */
.text-navy { color: var(--mre-blue) !important; }
.fw-black  { font-weight: 900 !important; }

/* ??? RESPONSIVE ??? */
@media (max-width: 768px) {
    .grid-frame { border-radius: 16px; }
    .grid-header-frame {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    .grid-header-frame > div {
        width: 100%;
        justify-content: flex-start !important;
        flex-wrap: wrap;
        gap: 8px;
    }
    .btn-main { width: 100%; justify-content: center; padding: 1rem; }
}
