/* =========================================================
   REXIA CUSTOM STYLES & LAYOUT
   Objective: 
   - Centralize layout settings and colors for Rexia
   - Unify header aesthetics with Checkinnova & Validoc layout
   - Eliminate inline styling for easier maintainability
   ========================================================= */

.wp-theme-rexia .rx-main-card {
    border: 0;
    box-shadow: var(--wp-shadow-sm, 0 2px 8px rgba(16, 24, 40, 0.05));
    padding: 2rem;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    border-radius: 16px;
    background-color: #ffffff;
    margin-bottom: 2rem;
}

.wp-theme-rexia .rx-header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--wp-border, #e5eaf1);
}

.wp-theme-rexia .rx-header-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
    color: var(--rx-primary);
    display: flex;
    align-items: center;
    line-height: 1.2;
}

.wp-theme-rexia .rx-header-icon {
    margin-right: 0.75rem;
    color: var(--rx-primary);
}

.wp-theme-rexia .rx-header-subtitle {
    color: var(--wp-text-muted, #7b88a1);
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* Common Layout Elements */
.wp-theme-rexia .rx-table-responsive {
    overflow: auto;
}

.wp-theme-rexia .rx-table-min-width {
    min-width: 1100px;
}

.wp-theme-rexia .rx-table-min-width-lg {
    min-width: 1200px;
}

.wp-theme-rexia .rx-modal-overlay {
    background: rgba(0,0,0,0.45); 
    backdrop-filter: blur(4px);
}

.wp-theme-rexia .rx-modal-overlay-dark {
    background: rgba(0,0,0,0.35);
}

.wp-theme-rexia .rx-progress-height {
    height: 20px;
}

.wp-theme-rexia .rx-badge-circle {
    width: 28px;
    height: 28px;
}

.wp-theme-rexia .rx-col-w-40 {
    width: 40%;
}

.wp-theme-rexia .rx-col-w-45 {
    width: 45%;
}

.wp-theme-rexia .rx-col-w-20 {
    width: 20%;
}

.wp-theme-rexia .rx-col-w-25 {
    width: 25%;
}

.wp-theme-rexia .rx-col-w-30 {
    width: 30%;
}

.wp-theme-rexia .rx-col-w-35 {
    width: 35%;
}

.wp-theme-rexia .rx-col-w-10 {
    width: 10%;
}

.wp-theme-rexia .rx-col-w-15 {
    width: 15%;
}

.wp-theme-rexia .rx-col-w-50 {
    width: 50%;
}

.wp-theme-rexia .rx-max-w-100 {
    max-width: 100px;
}

.wp-theme-rexia .rx-min-h-350 {
    min-height: 350px;
}

.wp-theme-rexia .rx-min-h-400 {
    min-height: 400px;
}

/* Subtle warning row for near-due invoices */
.wp-theme-rexia .table-warning-subtle > td {
    background-color: rgba(255, 193, 7, 0.06) !important;
}

/* =========================================================
   REPORTES REXIA & ANALÍTICA
   ========================================================= */

/* KPI Cards */
.wp-theme-rexia .rx-kpi-label,
.rx-kpi-label {
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

.wp-theme-rexia .rx-kpi-badge,
.rx-kpi-badge {
    font-size: 0.72rem;
}

.wp-theme-rexia .rx-kpi-subtext,
.rx-kpi-subtext {
    font-size: 0.8rem;
}

/* Tablas de Reportes */
.wp-theme-rexia .rx-report-table,
.rx-report-table {
    font-size: 0.875rem;
}

.wp-theme-rexia .rx-report-th,
.rx-report-th {
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

.wp-theme-rexia .rx-report-icon-sm,
.rx-report-icon-sm {
    font-size: 0.7rem;
}

.wp-theme-rexia .rx-report-icon-sort,
.rx-report-icon-sort {
    font-size: 0.75rem;
}

.wp-theme-rexia .rx-report-search,
.rx-report-search {
    max-width: 300px;
}

.wp-theme-rexia .rx-report-overlay,
.rx-report-overlay {
    z-index: 10;
}

/* Gráficos Reportes */
.wp-theme-rexia .rx-chart-container,
.rx-chart-container {
    height: 320px;
    min-height: 320px;
}

.wp-theme-rexia .rx-chart-h-280,
.rx-chart-h-280 {
    height: 280px;
    min-height: 280px;
}

.wp-theme-rexia .rx-chart-h-320,
.rx-chart-h-320 {
    height: 320px;
    min-height: 320px;
}

.wp-theme-rexia .rx-chart-h-340,
.rx-chart-h-340 {
    height: 340px;
    min-height: 340px;
}

.wp-theme-rexia .rx-chart-h-360,
.rx-chart-h-360 {
    height: 360px;
    min-height: 360px;
}

.wp-theme-rexia .rx-chart-empty,
.rx-chart-empty {
    min-height: 320px;
}

.wp-theme-rexia .rx-chart-empty.rx-chart-h-280,
.rx-chart-empty.rx-chart-h-280 {
    min-height: 280px;
}

.wp-theme-rexia .rx-chart-empty.rx-chart-h-320,
.rx-chart-empty.rx-chart-h-320 {
    min-height: 320px;
}

.wp-theme-rexia .rx-chart-empty.rx-chart-h-340,
.rx-chart-empty.rx-chart-h-340 {
    min-height: 340px;
}

.wp-theme-rexia .rx-chart-empty.rx-chart-h-360,
.rx-chart-empty.rx-chart-h-360 {
    min-height: 360px;
}

/* Filtro Barra */
.wp-theme-rexia .rx-filter-preset-btn,
.rx-filter-preset-btn {
    min-width: 140px;
}

/* Spinners y UI comunes en Reportes */
.wp-theme-rexia .rx-spinner-lg,
.rx-spinner-lg {
    width: 3rem;
    height: 3rem;
}

.wp-theme-rexia .rx-lead-text-lg,
.rx-lead-text-lg {
    max-width: 620px;
}

.wp-theme-rexia .rx-lead-text-md,
.rx-lead-text-md {
    max-width: 580px;
}

.wp-theme-rexia .rx-lead-text-sm,
.rx-lead-text-sm {
    max-width: 500px;
}

.wp-theme-rexia .rx-col-checkbox,
.rx-col-checkbox {
    width: 40px;
}

.wp-theme-rexia .rx-variants-desc,
.rx-variants-desc {
    max-width: 380px;
}

/* =========================================================
   RESPONSIVE MÓVIL REXIA
   ========================================================= */
@media (max-width: 767.98px) {
    .wp-theme-rexia .rx-main-card {
        padding: 1rem !important;
        border-radius: 12px;
        margin-bottom: 1rem;
    }

    .wp-theme-rexia .rx-header-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
        margin-bottom: 1.25rem;
        padding-bottom: 0.75rem;
    }

    .wp-theme-rexia .rx-header-title {
        font-size: 1.25rem;
    }

    .wp-theme-rexia .rx-header-subtitle {
        font-size: 0.82rem;
    }

    .wp-theme-rexia .rx-col-w-40,
    .wp-theme-rexia .rx-col-w-45,
    .wp-theme-rexia .rx-col-w-20,
    .wp-theme-rexia .rx-col-w-25,
    .wp-theme-rexia .rx-col-w-30,
    .wp-theme-rexia .rx-col-w-35,
    .wp-theme-rexia .rx-col-w-50 {
        width: 100% !important;
    }

    .wp-theme-rexia .rx-table-responsive {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

