/* Screen Theme Overrides - Industria (scoped under .screen-theme) */

/* --- Search Focus --- */
.screen-theme .industria-search:focus {
    box-shadow: 0 0 0 2px rgba(123, 45, 142, 0.2);
}

/* --- Button States --- */
.screen-theme .btn-execute.btn-active {
    box-shadow: 0 0 0 2px rgba(123, 45, 142, 0.5), 0 4px 12px rgba(123, 45, 142, 0.3);
}

.screen-theme .btn-execute.btn-inactive:hover {
    box-shadow: 0 4px 12px rgba(123, 45, 142, 0.3);
}

/* --- Main Table Scrollbar --- */
.screen-theme .industria-page .ranking-scrollable::-webkit-scrollbar-thumb {
    background: rgba(123, 45, 142, 0.25);
}

.screen-theme .industria-page .ranking-scrollable::-webkit-scrollbar-thumb:hover {
    background: rgba(123, 45, 142, 0.5);
}

/* --- Table Rows --- */
.screen-theme .industria-page .ranking-table tbody tr:nth-child(even) {
    background: rgba(123, 45, 142, 0.015);
}

.screen-theme .industria-page .ranking-table tbody tr:hover {
    background: rgba(123, 45, 142, 0.06);
    box-shadow: inset 3px 0 0 0 #7B2D8E;
}

/* --- Badge Cell --- */
.screen-theme .badge-cell {
    background: rgba(123, 45, 142, 0.15);
}

/* --- TOTAL Row --- */
.screen-theme .industria-page .ranking-table tbody tr.tr-total {
    background: rgba(123, 45, 142, 0.06);
    box-shadow: inset 4px 0 0 0 #7B2D8E;
}

.screen-theme .industria-page .ranking-table tbody tr.tr-total:hover {
    background: rgba(123, 45, 142, 0.1);
}

.screen-theme .industria-page .ranking-table tbody tr.tr-total td {
    border-bottom: 2px solid rgba(123, 45, 142, 0.15);
}

.screen-theme .industria-page .ranking-table tbody tr.tr-total .badge-cell {
    background: rgba(123, 45, 142, 0.15);
}

/* --- Back to Top Button --- */
.screen-theme .btn-back-to-top {
    box-shadow:
        0 4px 16px rgba(123, 45, 142, 0.4),
        0 0 0 0 rgba(123, 45, 142, 0);
}

.screen-theme .btn-back-to-top:hover {
    box-shadow:
        0 8px 28px rgba(123, 45, 142, 0.5),
        0 0 0 6px rgba(123, 45, 142, 0.12);
}

.screen-theme .btn-back-to-top:active {
    box-shadow:
        0 2px 8px rgba(123, 45, 142, 0.4),
        0 0 0 3px rgba(123, 45, 142, 0.15);
}

.screen-theme .btn-back-to-top.visible::after {
    border: 2px solid rgba(123, 45, 142, 0.4);
}

/* --- Sub-Ranking Modal Container --- */
.screen-theme .subranking-modal {
    box-shadow:
        0 24px 80px rgba(0, 0, 0, 0.45),
        0 0 0 1px rgba(123, 45, 142, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* --- Modal Scrollbar --- */
.screen-theme .subranking-modal-scrollable::-webkit-scrollbar-thumb {
    background: rgba(123, 45, 142, 0.25);
}

.screen-theme .subranking-modal-scrollable::-webkit-scrollbar-thumb:hover {
    background: rgba(123, 45, 142, 0.5);
}

/* --- Modal Table Rows --- */
.screen-theme .subranking-modal-table tbody tr:nth-child(even) {
    background: rgba(123, 45, 142, 0.015);
}

.screen-theme .subranking-modal-table tbody tr:hover {
    background: rgba(123, 45, 142, 0.06);
    box-shadow: inset 3px 0 0 0 #7B2D8E;
}

/* --- Modal TOTAL Row --- */
.screen-theme .subranking-modal-table tbody tr.tr-total {
    background: rgba(123, 45, 142, 0.06);
    box-shadow: inset 4px 0 0 0 #7B2D8E;
}

.screen-theme .subranking-modal-table tbody tr.tr-total:hover {
    background: rgba(123, 45, 142, 0.1);
}

.screen-theme .subranking-modal-table tbody tr.tr-total td {
    border-bottom: 2px solid rgba(123, 45, 142, 0.15);
}

/* --- Modal Back to Top Button --- */
.screen-theme .btn-modal-back-to-top {
    box-shadow:
        0 3px 12px rgba(123, 45, 142, 0.4),
        0 0 0 0 rgba(123, 45, 142, 0);
}

.screen-theme .btn-modal-back-to-top:hover {
    box-shadow:
        0 6px 20px rgba(123, 45, 142, 0.5),
        0 0 0 4px rgba(123, 45, 142, 0.12);
}

.screen-theme .btn-modal-back-to-top:active {
    box-shadow:
        0 2px 6px rgba(123, 45, 142, 0.4),
        0 0 0 2px rgba(123, 45, 142, 0.15);
}

.screen-theme .btn-modal-back-to-top.visible::after {
    border: 2px solid rgba(123, 45, 142, 0.4);
}

/* --- Industria Detalle: Expand All Button --- */
.screen-theme .ind-btn-expand-all {
    background: rgba(123, 45, 142, 0.12);
    color: #7B2D8E;
    border: 1px solid rgba(123, 45, 142, 0.25);
}

.screen-theme .ind-btn-expand-all:hover {
    background: rgba(123, 45, 142, 0.22);
    border-color: rgba(123, 45, 142, 0.45);
}

/* --- Industria Detalle: Total Row --- */
.screen-theme .ind-total-row {
    background: rgba(123, 45, 142, 0.07);
    border-left: 3px solid #7B2D8E;
}

/* --- Industria Detalle: Group Header --- */
.screen-theme .ind-group-header:hover {
    background: rgba(123, 45, 142, 0.08);
}

.screen-theme .ind-group-rank {
    color: rgba(123, 45, 142, 0.7);
}

.screen-theme .ind-group-badge {
    background: rgba(123, 45, 142, 0.12);
    color: #c89dd4;
    border: 1px solid rgba(123, 45, 142, 0.2);
}

/* --- Industria Detalle: Chevron --- */
.screen-theme .ind-chevron.expanded {
    color: #7B2D8E;
}

/* --- Industria Detalle: Detail Row Hover --- */
.screen-theme .ind-detail-row:hover {
    background: rgba(123, 45, 142, 0.06);
}

/* ── Empty State ── */
.ind-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    flex: 1;
    padding: 20px;
    text-align: center;
    animation: indEmptyFadeIn 0.6s ease;
}

.ind-empty-state svg {
    width: 140px;
    height: 120px;
    color: rgba(255,255,255,0.7);
    margin-bottom: 16px;
}

.light-mode .ind-empty-state svg {
    color: rgba(0,0,0,0.4);
}

.ind-empty-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    opacity: 0.8;
}

.ind-empty-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
    max-width: 380px;
    line-height: 1.5;
    opacity: 0.7;
}

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

@media (max-width: 480px) {
    .ind-empty-state {
        padding: 40px 16px 60px;
    }

    .ind-empty-state svg {
        width: 110px;
        height: 95px;
    }

    .ind-empty-title {
        font-size: 1rem;
    }

    .ind-empty-subtitle {
        font-size: 0.8rem;
    }
}

/* --- Toggle Desglose Agencia --- */
.ind-toggle-desglose {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 8px;
    padding-left: 12px;
    border-left: 1px solid var(--border-color);
}

.ind-toggle-label {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
    user-select: none;
}

.ind-switch {
    position: relative;
    display: inline-block;
    width: 38px;
    height: 20px;
    flex-shrink: 0;
}

.ind-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.ind-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--primary-gradient);
    border: 1px solid rgba(240, 116, 0, 0.4);
    border-radius: 20px;
    transition: border-color 0.25s;
}

.ind-slider::before {
    content: "";
    position: absolute;
    height: 14px;
    width: 14px;
    left: 2px;
    bottom: 2px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.25s;
}

.ind-switch input:checked + .ind-slider::before {
    transform: translateX(18px);
}
