/* ========================================
   DSE INTERIM DASHBOARD CSS - UPDATED
   ======================================== */

.dse-dashboard-container {
    font-family: 'Segoe UI', 'Bangla', Arial, sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    color: #1e293b;
}

/* ===== SELECT2 OVERRIDES ===== */
.dse-select2 {
    width: 100% !important;
}

.select2-container--default .select2-selection--single {
    height: 44px !important;
    padding: 5px 0;
    border: 2px solid #e2e8f0 !important;
    border-radius: 8px !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 32px !important;
    font-size: 14px;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 40px !important;
}

.select2-dropdown {
    border: 2px solid #e2e8f0 !important;
    border-radius: 8px !important;
}

.select2-results__option {
    padding: 8px 12px !important;
}

.select2-results__option--highlighted {
    background: #0d9488 !important;
}

/* ===== HERO SECTION ===== */
.dse-intro-hero {
    background: linear-gradient(135deg, #0f766e 0%, #0d9488 50%, #14b8a6 100%);
    border-radius: 16px;
    padding: 40px 30px;
    margin-bottom: 30px;
    color: white;
    box-shadow: 0 4px 20px rgba(13, 148, 136, 0.3);
}

.dse-hero-content h2 {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 10px 0;
}

.dse-hero-icon {
    margin-right: 10px;
}

.dse-hero-subtitle {
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: 20px;
}

.dse-hero-stats {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.dse-hero-stats .dse-stat-item {
    background: rgba(255,255,255,0.15);
    padding: 10px 20px;
    border-radius: 8px;
    text-align: center;
}

.dse-hero-stats .dse-stat-number {
    font-size: 24px;
    font-weight: 700;
    display: block;
}

.dse-hero-stats .dse-stat-label {
    font-size: 12px;
    opacity: 0.8;
}

/* ===== QUICK STATS ===== */
.dse-quick-stats {
    margin-bottom: 30px;
}

.dse-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.dse-stat-card {
    background: white;
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border-left: 4px solid #0d9488;
}

.dse-stat-card .dse-stat-label {
    font-size: 12px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dse-stat-card .dse-stat-value {
    font-size: 22px;
    font-weight: 700;
    color: #0f172a;
    margin-top: 5px;
}

/* ===== FEATURED LEADERS ===== */
.dse-featured-leaders {
    margin-bottom: 30px;
}

.dse-featured-leaders h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #0f172a;
}

.dse-section-icon {
    margin-right: 8px;
}

.dse-featured-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

.dse-featured-card {
    background: white;
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border-top: 4px solid #0d9488;
    transition: transform 0.2s;
}

.dse-featured-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.dse-featured-rank {
    font-size: 12px;
    color: #94a3b8;
    font-weight: 600;
}

.dse-featured-code {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    margin: 5px 0;
}

.dse-featured-value {
    font-size: 20px;
    font-weight: 700;
}

.dse-featured-value.positive {
    color: #10b981;
}

.dse-featured-value.negative {
    color: #ef4444;
}

.dse-featured-detail {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 4px;
}

.dse-featured-period {
    font-size: 11px;
    color: #0d9488;
    font-weight: 600;
    margin-top: 2px;
}

/* ===== CONTROLS ===== */
.dse-controls {
    background: #f8fafc;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.dse-control-group {
    flex: 1;
    min-width: 300px;
}

.dse-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 5px;
}

/* ===== TABLE SCROLL WRAPPER ===== */
.dse-table-scroll-wrapper {
    overflow: auto;
    max-height: 600px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.dse-table-scroll-wrapper table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.dse-table-scroll-wrapper thead {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #f1f5f9;
}

.dse-table-scroll-wrapper thead th {
    padding: 12px 10px;
    text-align: left;
    font-weight: 600;
    color: #475569;
    white-space: nowrap;
    border-bottom: 2px solid #e2e8f0;
    background: #f1f5f9;
}

.dse-table-scroll-wrapper tbody td {
    padding: 10px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

/* ===== TABLES ===== */
.dse-table-container {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    margin-bottom: 30px;
    overflow: hidden;
}

.dse-table-container h3 {
    font-size: 18px;
    margin: 0 0 15px 0;
    color: #0f172a;
}

.dse-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    min-width: 900px;
}

.dse-table thead {
    background: #f1f5f9;
}

.dse-table th {
    padding: 12px 10px;
    text-align: left;
    font-weight: 600;
    color: #475569;
    white-space: nowrap;
    border-bottom: 2px solid #e2e8f0;
    position: sticky;
    top: 0;
    background: #f1f5f9;
    z-index: 10;
}

.dse-table td {
    padding: 10px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.dse-table tbody tr:hover {
    background: #f8fafc;
}

.dse-table .positive {
    color: #10b981;
    font-weight: 600;
}

.dse-table .negative {
    color: #ef4444;
    font-weight: 600;
}

.dse-table .neutral {
    color: #94a3b8;
}

/* ===== FILTER/CLONE TABLE ===== */
.dse-filter-table {
    margin-bottom: 20px;
}

.dse-filter-table.hidden {
    display: none;
}

.dse-filter-table .dse-table-scroll-wrapper {
    max-height: 400px;
}

/* ===== PAGINATION ===== */
.dse-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #f1f5f9;
}

.dse-pagination button {
    padding: 8px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.dse-pagination button:hover:not(:disabled) {
    background: #0d9488;
    color: white;
    border-color: #0d9488;
}

.dse-pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.dse-pagination-info {
    font-size: 14px;
    color: #64748b;
}

/* ===== LEADERBOARDS ===== */
.dse-leaderboards {
    margin-bottom: 30px;
}

.dse-leaderboards h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #0f172a;
}

.dse-leaderboards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
}

.dse-leaderboard-container {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.dse-leaderboard-container h3 {
    font-size: 16px;
    margin: 0 0 15px 0;
    color: #0f172a;
}

.dse-leaderboard-table {
    overflow-x: auto;
}

.dse-table-header {
    display: grid;
    grid-template-columns: 50px 100px 1fr 80px 80px;
    background: #f1f5f9;
    padding: 10px 12px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 12px;
    color: #475569;
}

.dse-table-row {
    display: grid;
    grid-template-columns: 50px 100px 1fr 80px 80px;
    padding: 8px 12px;
    border-bottom: 1px solid #f1f5f9;
    align-items: center;
    font-size: 13px;
}

.dse-table-row:hover {
    background: #f8fafc;
}

.dse-header-cell,
.dse-row-cell {
    padding: 4px 0;
}

.dse-rank-badge {
    display: inline-block;
    background: #f1f5f9;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    text-align: center;
    line-height: 28px;
    font-weight: 600;
    font-size: 12px;
}

.dse-row-cell.value.positive {
    color: #10b981;
    font-weight: 600;
}

.dse-row-cell.value.negative {
    color: #ef4444;
    font-weight: 600;
}

.dse-row-cell.period {
    font-size: 11px;
    color: #64748b;
}

/* ===== VISUALIZATIONS ===== */
.dse-visualizations {
    margin-bottom: 30px;
}

.dse-visualizations h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #0f172a;
}

.dse-viz-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.dse-viz-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.dse-viz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.dse-viz-header h4 {
    margin: 0;
    font-size: 16px;
}

.dse-viz-badge {
    background: #f1f5f9;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    color: #475569;
}

.dse-viz-container {
    width: 100%;
    overflow-x: auto;
}

.dse-viz-container svg {
    max-width: 100%;
    height: auto;
}

.dse-viz-footer {
    margin-top: 15px;
    text-align: right;
}

.dse-chart-download {
    padding: 8px 16px;
    background: #0d9488;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.2s;
}

.dse-chart-download:hover {
    background: #0f766e;
}

/* ===== INSIGHTS ===== */
.dse-insights {
    margin-bottom: 30px;
}

.dse-insights h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #0f172a;
}

.dse-insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
}

.dse-insight-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.dse-insight-card h3 {
    font-size: 16px;
    margin: 0 0 15px 0;
    color: #0f172a;
}

.dse-commentary-content h3 {
    font-size: 15px;
    margin: 15px 0 10px 0;
    color: #0f172a;
}

.dse-commentary-content ul,
.dse-insight-list {
    padding-left: 20px;
    margin: 10px 0;
}

.dse-commentary-content li,
.dse-insight-list li {
    margin-bottom: 6px;
}

/* Comparison */
.dse-comparison-item {
    background: #f8fafc;
    border-radius: 12px;
    padding: 15px;
    text-align: center;
}

.dse-comparison-top,
.dse-comparison-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.dse-comparison-top {
    border-bottom: 2px dashed #e2e8f0;
}

.dse-comparison-vs {
    font-size: 12px;
    color: #94a3b8;
    font-weight: 600;
    padding: 8px 0;
}

.dse-comp-code {
    font-weight: 600;
    font-size: 14px;
}

.dse-comp-value {
    font-weight: 700;
    font-size: 16px;
}

.dse-comp-value.positive {
    color: #10b981;
}

.dse-comp-value.negative {
    color: #ef4444;
}

.dse-comparison-note {
    margin: 10px 0 0 0;
    font-size: 12px;
    color: #64748b;
}

/* Momentum */
.dse-momentum-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dse-momentum-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    border-radius: 8px;
    margin-bottom: 4px;
    font-size: 13px;
}

.dse-momentum-item.positive {
    background: #ecfdf5;
    border-left: 3px solid #10b981;
}

.dse-momentum-item.negative {
    background: #fef2f2;
    border-left: 3px solid #ef4444;
}

.dse-momentum-item.neutral {
    background: #f1f5f9;
    border-left: 3px solid #94a3b8;
}

.dse-momentum-code {
    font-weight: 600;
}

/* ===== SECTOR ANALYSIS ===== */
.dse-sector-analysis {
    margin-bottom: 30px;
}

.dse-sector-analysis h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #0f172a;
}

/* ===== FAQ ===== */
.dse-faq {
    margin-bottom: 30px;
}

.dse-faq h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #0f172a;
}

.dse-faq-container {
    background: white;
    border-radius: 12px;
    padding: 10px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.dse-faq-item {
    border-bottom: 1px solid #f1f5f9;
}

.dse-faq-item:last-child {
    border-bottom: none;
}

.dse-faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    padding: 16px 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    color: #0f172a;
    text-align: left;
    transition: background 0.2s;
}

.dse-faq-question:hover {
    background: #f8fafc;
}

.dse-faq-number {
    font-size: 12px;
    color: #94a3b8;
    margin-right: 12px;
    font-weight: 600;
}

.dse-faq-text {
    flex: 1;
}

.dse-faq-toggle {
    font-size: 20px;
    color: #94a3b8;
    transition: transform 0.3s;
}

.dse-faq-question[aria-expanded="true"] .dse-faq-toggle {
    transform: rotate(45deg);
}

.dse-faq-answer {
    padding: 0 20px 20px 20px;
    font-size: 14px;
    color: #475569;
    line-height: 1.6;
}

.dse-faq-answer ul {
    padding-left: 20px;
    margin: 8px 0;
}

.dse-faq-answer li {
    margin-bottom: 4px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
    .dse-featured-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .dse-dashboard-container {
        padding: 10px;
    }
    
    .dse-intro-hero {
        padding: 25px 20px;
    }
    
    .dse-hero-content h2 {
        font-size: 22px;
    }
    
    .dse-hero-stats {
        gap: 15px;
    }
    
    .dse-hero-stats .dse-stat-item {
        padding: 8px 12px;
    }
    
    .dse-hero-stats .dse-stat-number {
        font-size: 18px;
    }
    
    .dse-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .dse-featured-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .dse-leaderboards-grid,
    .dse-insights-grid {
        grid-template-columns: 1fr;
    }
    
    .dse-table-header,
    .dse-table-row {
        grid-template-columns: 40px 80px 1fr 60px 60px;
        font-size: 12px;
    }
    
    .dse-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .dse-control-group {
        min-width: 100%;
    }
    
    .dse-table th,
    .dse-table td {
        padding: 8px 6px;
        font-size: 12px;
    }
    
    .dse-table-scroll-wrapper {
        max-height: 400px;
    }
    
    .dse-select2 {
        min-width: 100% !important;
    }
}

@media (max-width: 480px) {
    .dse-featured-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .dse-featured-card {
        padding: 10px;
    }
    
    .dse-featured-code {
        font-size: 13px;
    }
    
    .dse-featured-value {
        font-size: 16px;
    }
    
    .dse-stat-card .dse-stat-value {
        font-size: 18px;
    }
}

/* ===== UTILITY ===== */
.dse-no-data {
    color: #94a3b8;
    text-align: center;
    padding: 20px;
}

.dse-hidden {
    display: none !important;
}