/* School Profile V2 Dashboard Styles */

/* Page Structure */
.page-container[b-gb46bcb0c6] {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.page-header[b-gb46bcb0c6] {
    flex-shrink: 0;
    background: white;
    border-bottom: 2px solid #dee2e6;
    padding: 1.5rem 2rem;
}

.header-content[b-gb46bcb0c6] {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.header-title h1[b-gb46bcb0c6] {
    font-size: 1.75rem;
    font-weight: 700;
    color: #212529;
    margin: 0 0 0.25rem 0;
}

.header-subtitle[b-gb46bcb0c6] {
    font-size: 0.95rem;
    color: #6c757d;
    margin: 0;
}

.header-controls[b-gb46bcb0c6] {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.control-group[b-gb46bcb0c6] {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.control-group label[b-gb46bcb0c6] {
    font-size: 0.875rem;
    font-weight: 600;
    color: #495057;
    margin: 0;
    white-space: nowrap;
}

.control-group .form-select[b-gb46bcb0c6] {
    min-width: 150px;
}

.view-toggle .btn[b-gb46bcb0c6] {
    min-width: 110px;
    height: 44px;
    border-radius: 0;
}

.view-toggle .btn:first-child[b-gb46bcb0c6] {
    border-top-left-radius: 6px;
    border-bottom-left-radius: 6px;
}

.view-toggle .btn:last-child[b-gb46bcb0c6] {
    border-top-right-radius: 6px;
    border-bottom-right-radius: 6px;
}

/* Custom primary color matching chat icon blue */
.view-toggle .btn-primary[b-gb46bcb0c6] {
    background-color: #0C5FE3 !important;
    border-color: #0C5FE3 !important;
    color: white;
}

.view-toggle .btn-primary:hover[b-gb46bcb0c6] {
    background-color: #0a4fc0 !important;
    border-color: #0a4fc0 !important;
}

.view-toggle .btn-primary:active[b-gb46bcb0c6],
.view-toggle .btn-primary:focus[b-gb46bcb0c6] {
    background-color: #083fa0 !important;
    border-color: #083fa0 !important;
    box-shadow: 0 0 0 0.2rem rgba(12, 95, 227, 0.25) !important;
}

.view-toggle .btn-outline-primary[b-gb46bcb0c6] {
    color: #0C5FE3;
    border-color: #dee2e6;
}

.view-toggle .btn-outline-primary:hover[b-gb46bcb0c6] {
    background-color: #f0f6ff;
    border-color: #0C5FE3;
    color: #0C5FE3;
}

.page-body[b-gb46bcb0c6] {
    flex: 1;
    padding: 2rem;
    background: white;
}

/* AI Open Data Analysis Section */
.ai-opendata-section[b-gb46bcb0c6] {
    background: #f8f9fa;
    margin: 0 0 1.5rem 0;
    padding: 0;
}

.ai-section-header[b-gb46bcb0c6] {
    background: #f8f9fa;
}

.ai-section-body[b-gb46bcb0c6] {
    background: #f8f9fa;
}

/* Loading & Empty States */
.loading-container[b-gb46bcb0c6],
.no-data-container[b-gb46bcb0c6],
.no-selection-container[b-gb46bcb0c6] {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
}

.loading-text[b-gb46bcb0c6] {
    margin-top: 1rem;
    color: #6c757d;
    font-size: 1rem;
}

.no-data-container i[b-gb46bcb0c6],
.no-selection-container i[b-gb46bcb0c6] {
    font-size: 4rem;
    color: #6c757d;
    opacity: 0.5;
    margin-bottom: 1rem;
}

.no-data-container h3[b-gb46bcb0c6],
.no-selection-container h3[b-gb46bcb0c6] {
    font-size: 1.5rem;
    color: #212529;
    margin-bottom: 0.5rem;
}

.no-data-container p[b-gb46bcb0c6],
.no-selection-container p[b-gb46bcb0c6] {
    color: #6c757d;
    margin-bottom: 1rem;
}

.no-data-container ul[b-gb46bcb0c6] {
    text-align: left;
    color: #495057;
}

/* EXECUTIVE VIEW */
.executive-view[b-gb46bcb0c6] {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.summary-cards[b-gb46bcb0c6] {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.summary-card[b-gb46bcb0c6] {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    border: 1px solid #dee2e6;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.summary-card:hover[b-gb46bcb0c6] {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.summary-card.priority[b-gb46bcb0c6] {
    border: 2px solid #dc3545;
    background: linear-gradient(135deg, white, #fff5f5);
}

.card-icon[b-gb46bcb0c6] {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    flex-shrink: 0;
}

.card-content[b-gb46bcb0c6] {
    flex: 1;
}

.card-label[b-gb46bcb0c6] {
    font-size: 0.875rem;
    color: #6c757d;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.card-value[b-gb46bcb0c6] {
    font-size: 2rem;
    font-weight: 700;
    color: #212529;
    line-height: 1;
}

.card-value.priority-value[b-gb46bcb0c6] {
    color: #dc3545;
}

.card-sublabel[b-gb46bcb0c6] {
    font-size: 0.75rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

/* Priority Schools Section */
.priority-section[b-gb46bcb0c6] {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    border: 2px solid #dc3545;
}

.section-title[b-gb46bcb0c6] {
    font-size: 1.25rem;
    font-weight: 600;
    color: #212529;
    margin: 0 0 1.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-title i[b-gb46bcb0c6] {
    color: #dc3545;
}

.priority-schools-grid[b-gb46bcb0c6] {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.priority-school-card[b-gb46bcb0c6] {
    background: #fff5f5;
    border: 1px solid #ffc8c8;
    border-radius: 6px;
    padding: 1.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.priority-school-card:hover[b-gb46bcb0c6] {
    background: #ffe5e5;
    border-color: #dc3545;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.2);
}

.priority-header[b-gb46bcb0c6] {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.priority-header .school-name[b-gb46bcb0c6] {
    font-weight: 700;
    color: #212529;
    font-size: 1rem;
}

.priority-header .school-phase[b-gb46bcb0c6] {
    background: white;
    color: #495057;
    padding: 0.125rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.priority-metrics[b-gb46bcb0c6] {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.concern-item[b-gb46bcb0c6] {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #721c24;
}

.concern-item i[b-gb46bcb0c6] {
    color: #dc3545;
    flex-shrink: 0;
}

.action-btn[b-gb46bcb0c6] {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.heatmap-section[b-gb46bcb0c6] {
    background: white;
    border-radius: 8px;
    padding: 0;
    border: 1px solid #dee2e6;
    overflow: hidden;
}

/* DETAILED VIEW */
.detailed-view[b-gb46bcb0c6] {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.metric-selector-bar[b-gb46bcb0c6] {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    border: 1px solid #dee2e6;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.metric-selector-bar label[b-gb46bcb0c6] {
    font-weight: 600;
    color: #495057;
    margin: 0;
}

.metric-buttons[b-gb46bcb0c6] {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.metric-btn[b-gb46bcb0c6] {
    padding: 0.5rem 1rem;
    border: 2px solid #dee2e6;
    background: white;
    color: #495057;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.metric-btn:hover[b-gb46bcb0c6] {
    border-color: #1976d2;
    color: #1976d2;
}

.metric-btn.active[b-gb46bcb0c6] {
    background: #1976d2;
    border-color: #1976d2;
    color: white;
}

.distribution-section[b-gb46bcb0c6] {
    background: white;
    border-radius: 8px;
    padding: 0;
    border: 1px solid #dee2e6;
    overflow: hidden;
}

.schools-table-section[b-gb46bcb0c6] {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    border: 1px solid #dee2e6;
}

.table-responsive[b-gb46bcb0c6] {
    overflow-x: auto;
}

.schools-table[b-gb46bcb0c6] {
    margin: 0;
}

.schools-table thead th[b-gb46bcb0c6] {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
    padding: 0.75rem;
}

.schools-table tbody tr[b-gb46bcb0c6] {
    transition: background-color 0.2s ease;
}

.schools-table tbody tr:hover[b-gb46bcb0c6] {
    background: #f8f9fa;
}

.schools-table tbody td[b-gb46bcb0c6] {
    padding: 0.75rem;
    vertical-align: middle;
}

.metric-badge[b-gb46bcb0c6] {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    display: inline-block;
}

/* DEEP DIVE VIEW */
.deepdive-view[b-gb46bcb0c6] {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.school-selector-bar[b-gb46bcb0c6] {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    border: 1px solid #dee2e6;
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.selector-group[b-gb46bcb0c6] {
    flex: 1;
    min-width: 300px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.selector-group label[b-gb46bcb0c6] {
    font-weight: 600;
    color: #495057;
    margin: 0;
    white-space: nowrap;
}

.selector-group .form-select[b-gb46bcb0c6] {
    flex: 1;
}

.comparison-selector-group[b-gb46bcb0c6] {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.comparison-selector-group label[b-gb46bcb0c6] {
    font-weight: 600;
    color: #495057;
    margin: 0;
    white-space: nowrap;
}

.comparison-selector-group .btn-group button[b-gb46bcb0c6] {
    min-width: 120px;
    height: 38px;
}

.scorecard-section[b-gb46bcb0c6] {
    background: white;
    border-radius: 8px;
    padding: 0;
    border: 1px solid #dee2e6;
    overflow: hidden;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .header-content[b-gb46bcb0c6] {
        flex-direction: column;
        align-items: flex-start;
    }

    .header-controls[b-gb46bcb0c6] {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .control-group[b-gb46bcb0c6] {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
    }

    .control-group .form-select[b-gb46bcb0c6] {
        width: 100%;
    }

    .view-toggle[b-gb46bcb0c6] {
        width: 100%;
    }

    .view-toggle .btn[b-gb46bcb0c6] {
        flex: 1;
    }

    .summary-cards[b-gb46bcb0c6] {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }

    .priority-schools-grid[b-gb46bcb0c6] {
        grid-template-columns: 1fr;
    }

    .school-selector-bar[b-gb46bcb0c6] {
        flex-direction: column;
        align-items: stretch;
    }

    .selector-group[b-gb46bcb0c6] {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
    }

    .comparison-selector-group[b-gb46bcb0c6] {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
    }

    .comparison-selector-group .btn-group[b-gb46bcb0c6] {
        width: 100%;
    }

    .comparison-selector-group .btn-group button[b-gb46bcb0c6] {
        flex: 1;
    }
}

@media (max-width: 768px) {
    .page-header[b-gb46bcb0c6] {
        padding: 1rem;
    }

    .page-body[b-gb46bcb0c6] {
        padding: 1rem;
    }

    .summary-cards[b-gb46bcb0c6] {
        grid-template-columns: 1fr;
    }

    .metric-selector-bar[b-gb46bcb0c6] {
        padding: 1rem;
    }

    .metric-buttons[b-gb46bcb0c6] {
        width: 100%;
        flex-direction: column;
    }

    .metric-btn[b-gb46bcb0c6] {
        width: 100%;
    }

    .schools-table-section[b-gb46bcb0c6] {
        padding: 1rem;
    }

    .schools-table[b-gb46bcb0c6] {
        font-size: 0.875rem;
    }

    .schools-table thead th[b-gb46bcb0c6],
    .schools-table tbody td[b-gb46bcb0c6] {
        padding: 0.5rem;
    }
}

/* Touch-friendly for tablets */
@media (hover: none) and (pointer: coarse) {
    .btn[b-gb46bcb0c6] {
        min-height: 44px;
    }

    .priority-school-card[b-gb46bcb0c6] {
        min-height: 44px;
    }

    .metric-btn[b-gb46bcb0c6] {
        min-height: 44px;
    }
}

/* Print Styles */
@media print {
    .page-header[b-gb46bcb0c6] {
        background: white;
        border-bottom: 2px solid #000;
    }

    .header-controls[b-gb46bcb0c6] {
        display: none;
    }

    .page-body[b-gb46bcb0c6] {
        overflow: visible;
        padding: 0;
    }

    .summary-card[b-gb46bcb0c6],
    .priority-section[b-gb46bcb0c6],
    .schools-table-section[b-gb46bcb0c6],
    .scorecard-section[b-gb46bcb0c6] {
        page-break-inside: avoid;
        border: 1px solid #000;
    }

    .priority-school-card[b-gb46bcb0c6] {
        background: white;
        border: 1px solid #000;
    }
}

/* Trust UID Controls Styling */
.header-filters-row[b-gb46bcb0c6] {
    display: flex;
    gap: 1.5rem;
    align-items: flex-end;
    flex-wrap: wrap;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #dee2e6;
}

.filter-group[b-gb46bcb0c6] {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label[b-gb46bcb0c6] {
    font-size: 0.875rem;
    font-weight: 600;
    color: #495057;
    margin: 0;
}

.filter-group .form-select[b-gb46bcb0c6],
.filter-group .form-control[b-gb46bcb0c6] {
    height: 38px;
    border-radius: 6px;
    border: 1px solid #ced4da;
}

.filter-group .form-select:focus[b-gb46bcb0c6],
.filter-group .form-control:focus[b-gb46bcb0c6] {
    border-color: #0C5FE3;
    box-shadow: 0 0 0 0.2rem rgba(12, 95, 227, 0.25);
}

.trust-uid-controls[b-gb46bcb0c6] {
    display: flex;
    gap: 0.5rem;
    align-items: stretch;
}

.trust-uid-controls .form-control[b-gb46bcb0c6] {
    min-width: 200px;
}

.trust-uid-controls .btn[b-gb46bcb0c6] {
    height: 38px;
    padding: 0 1rem;
    border-radius: 6px;
    font-weight: 600;
    white-space: nowrap;
}

.trust-uid-controls .btn-primary[b-gb46bcb0c6] {
    background-color: #0C5FE3 !important;
    border-color: #0C5FE3 !important;
    color: white;
}

.trust-uid-controls .btn-primary:hover[b-gb46bcb0c6] {
    background-color: #0a4fc0 !important;
    border-color: #0a4fc0 !important;
}

.trust-uid-controls .btn-primary:disabled[b-gb46bcb0c6] {
    background-color: #6c757d !important;
    border-color: #6c757d !important;
    opacity: 0.65;
}

.trust-uid-controls .btn-outline-secondary[b-gb46bcb0c6] {
    background-color: white;
    border-color: #6c757d;
    color: #6c757d;
}

.trust-uid-controls .btn-outline-secondary:hover[b-gb46bcb0c6] {
    background-color: #6c757d;
    border-color: #6c757d;
    color: white;
}
