.trade-dashboard-section {
    position: relative;
    padding: 60px 0;
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    overflow: hidden;
    direction: rtl;
}

.trade-dashboard-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at 30% 20%, rgba(245, 158, 11, 0.07) 0%, transparent 60%),
                radial-gradient(ellipse at 70% 80%, rgba(234, 88, 12, 0.06) 0%, transparent 60%);
    pointer-events: none;
}

.dashboard-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

.dashboard-header {
    text-align: center;
    margin-bottom: 40px;
}

.dashboard-title-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
}

.dashboard-icon-pulse {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f59e0b, #ea580c);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: #fff;
    animation: dashPulse 2s ease-in-out infinite;
    box-shadow: 0 0 30px rgba(245, 158, 11, 0.35);
}

@keyframes dashPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 30px rgba(245, 158, 11, 0.35); }
    50% { transform: scale(1.08); box-shadow: 0 0 50px rgba(245, 158, 11, 0.55); }
}

.dashboard-title {
    font-size: 28px;
    font-weight: 900;
    background: linear-gradient(90deg, #f59e0b, #fbbf24, #ea580c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
}

.dashboard-subtitle {
    color: #64748b;
    font-size: 14px;
    margin: 4px 0 0 0;
}

.dashboard-filters {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    flex-wrap: wrap;
    padding: 24px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(245, 158, 11, 0.1);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    margin-bottom: 24px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-group label {
    color: rgba(255,255,255,0.7);
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.filter-group label i {
    color: #f59e0b;
    font-size: 11px;
}

.filter-country-group {
    flex: 1;
    min-width: 220px;
}

.trade-type-toggle,
.value-type-toggle {
    display: flex;
    gap: 0;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(245, 158, 11, 0.15);
}

.trade-btn,
.vtype-btn {
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    border: none;
    background: rgba(255,255,255,0.04);
    color: rgba(255,255,255,0.6);
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.trade-btn:hover,
.vtype-btn:hover {
    background: rgba(245, 158, 11, 0.1);
    color: #fbbf24;
}

.trade-btn.active {
    background: linear-gradient(135deg, #f59e0b, #ea580c);
    color: #fff;
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.35);
}

.vtype-btn.active {
    background: linear-gradient(135deg, #ea580c, #dc2626);
    color: #fff;
    box-shadow: 0 0 15px rgba(234, 88, 12, 0.35);
}

.filter-select {
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid rgba(245, 158, 11, 0.15);
    background: rgba(255,255,255,0.04);
    color: #fff;
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    outline: none;
    min-width: 100px;
    transition: border-color 0.3s;
}

.filter-select:focus {
    border-color: #f59e0b;
}

.filter-select option {
    background: #0f172a;
    color: #fff;
}

.country-search-wrap {
    position: relative;
}

.filter-input {
    width: 100%;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid rgba(245, 158, 11, 0.15);
    background: rgba(255,255,255,0.04);
    color: #fff;
    font-size: 13px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.filter-input:focus {
    border-color: #f59e0b;
}

.filter-input::placeholder {
    color: rgba(255,255,255,0.3);
}

.country-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 250px;
    overflow-y: auto;
    background: #0f172a;
    border: 1px solid rgba(245, 158, 11, 0.15);
    border-radius: 10px;
    z-index: 100;
    margin-top: 4px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.6);
}

.country-dropdown::-webkit-scrollbar {
    width: 6px;
}

.country-dropdown::-webkit-scrollbar-thumb {
    background: rgba(245, 158, 11, 0.25);
    border-radius: 3px;
}

.country-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 13px;
    color: rgba(255,255,255,0.8);
    gap: 8px;
}

.country-item:hover {
    background: rgba(245, 158, 11, 0.1);
}

.country-item.selected {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.country-item small {
    color: rgba(255,255,255,0.35);
    font-size: 11px;
}

.country-item .fa-check {
    color: #f59e0b;
    font-size: 11px;
}

.country-item-empty {
    padding: 14px;
    text-align: center;
    color: rgba(255,255,255,0.3);
    font-size: 13px;
}

.selected-countries-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.country-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 20px;
    font-size: 11px;
    color: #fbbf24;
}

.country-tag .fa-times {
    cursor: pointer;
    font-size: 10px;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.country-tag .fa-times:hover {
    opacity: 1;
    color: #ef4444;
}

.btn-apply-filters {
    padding: 10px 28px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #f59e0b, #ea580c);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    white-space: nowrap;
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.35);
}

.btn-apply-filters:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(245, 158, 11, 0.5);
}

.btn-apply-filters.loading {
    opacity: 0.7;
    pointer-events: none;
}

.btn-apply-filters.loading i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    100% { transform: rotate(360deg); }
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(245, 158, 11, 0.08);
    border-radius: 14px;
    backdrop-filter: blur(10px);
    transition: all 0.3s;
}

.stat-card:hover {
    background: rgba(245, 158, 11, 0.06);
    border-color: rgba(245, 158, 11, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.1);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.stat-card:nth-child(1) .stat-icon { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.stat-card:nth-child(2) .stat-icon { background: rgba(234, 88, 12, 0.15); color: #ea580c; }
.stat-card:nth-child(3) .stat-icon { background: rgba(251, 191, 36, 0.15); color: #fbbf24; }
.stat-card:nth-child(4) .stat-icon { background: rgba(245, 158, 11, 0.12); color: #f59e0b; }

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 22px;
    font-weight: 900;
    color: #ffffff;
    line-height: 1.2;
}

.stat-label {
    font-size: 11px;
    color: #64748b;
    margin-top: 2px;
}

.dashboard-main-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    min-height: 500px;
}

.globe-panel,
.treemap-panel {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(245, 158, 11, 0.08);
    border-radius: 18px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(245, 158, 11, 0.08);
}

.panel-header h3 {
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.panel-header h3 i {
    color: #f59e0b;
}

.treemap-subtitle {
    font-size: 11px;
    color: #64748b;
}

.globe-controls {
    display: flex;
    gap: 6px;
}

.globe-ctrl-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid rgba(245, 158, 11, 0.15);
    background: rgba(255,255,255,0.04);
    color: rgba(255,255,255,0.6);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.2s;
}

.globe-ctrl-btn:hover {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border-color: rgba(245, 158, 11, 0.35);
}

.globe-ctrl-btn.active {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
    border-color: rgba(245, 158, 11, 0.4);
}

.globe-container {
    flex: 1;
    min-height: 450px;
    position: relative;
    background: radial-gradient(ellipse at center, rgba(15, 23, 42, 0.5) 0%, transparent 70%);
}

.globe-container canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

.globe-loading,
.treemap-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #64748b;
    font-size: 13px;
    z-index: 10;
    background: rgba(15, 23, 42, 0.85);
}

.globe-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(245, 158, 11, 0.15);
    border-top-color: #f59e0b;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.globe-legend {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 20px;
    border-top: 1px solid rgba(245, 158, 11, 0.08);
}

.legend-low,
.legend-high {
    font-size: 10px;
    color: #64748b;
}

.legend-gradient {
    width: 150px;
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(to left, #ea580c, #f59e0b, #fbbf24, #fde68a);
}

.treemap-container {
    flex: 1;
    min-height: 400px;
    position: relative;
    padding: 10px;
    overflow: hidden;
}

.treemap-container svg {
    display: block;
    width: 100%;
    height: 100%;
}

.treemap-empty {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #64748b;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.treemap-tooltip {
    display: none;
    position: fixed;
    z-index: 99999;
    background: rgba(15, 23, 42, 0.97);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 14px;
    padding: 18px;
    min-width: 260px;
    max-width: 320px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.7), 0 0 30px rgba(245, 158, 11, 0.08);
    backdrop-filter: blur(20px);
    pointer-events: none;
}

.tt-header {
    font-size: 14px;
    color: #f59e0b;
    margin-bottom: 6px;
    direction: ltr;
    text-align: right;
}

.tt-header strong {
    color: #ffffff;
    font-weight: 800;
}

.tt-desc {
    font-size: 12px;
    color: rgba(255,255,255,0.8);
    line-height: 1.7;
    margin-bottom: 8px;
}

.tt-divider {
    height: 1px;
    background: rgba(245, 158, 11, 0.12);
    margin: 8px 0;
}

.tt-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    padding: 3px 0;
    gap: 10px;
}

.tt-row span:first-child {
    color: #64748b;
    white-space: nowrap;
}

.tt-row span:last-child {
    color: #ffffff;
    font-weight: 600;
    direction: ltr;
    text-align: right;
}

.globe-tooltip {
    display: none;
    position: absolute;
    z-index: 50;
    background: rgba(15, 23, 42, 0.97);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 14px;
    padding: 16px;
    min-width: 220px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.6), 0 0 25px rgba(245, 158, 11, 0.06);
    backdrop-filter: blur(20px);
    pointer-events: none;
}

.gt-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 14px;
    color: #ffffff;
}

.gt-flag {
    width: 24px;
    height: 16px;
    border-radius: 2px;
    object-fit: cover;
}

.gt-row {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    padding: 2px 0;
}

.gt-row span:first-child {
    color: #64748b;
}

.gt-row span:last-child {
    color: #ffffff;
    font-weight: 600;
    direction: ltr;
}

@media (max-width: 1024px) {
    .dashboard-main-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .dashboard-filters {
        gap: 12px;
    }
}

@media (max-width: 640px) {
    .trade-dashboard-section {
        padding: 30px 0;
    }

    .dashboard-stats {
        grid-template-columns: 1fr;
    }

    .dashboard-title-wrap {
        flex-direction: column;
        text-align: center;
    }

    .dashboard-title {
        font-size: 22px;
    }

    .trade-type-toggle,
    .value-type-toggle {
        flex-wrap: wrap;
    }

    .dashboard-filters {
        flex-direction: column;
        padding: 16px;
    }

    .filter-group {
        width: 100%;
    }

    .btn-apply-filters {
        width: 100%;
        justify-content: center;
    }

    .globe-container {
        min-height: 300px;
    }

    .treemap-container {
        min-height: 280px;
    }

    .stat-card {
        padding: 14px 16px;
    }

    .stat-value {
        font-size: 18px;
    }

    .panel-header {
        padding: 12px 16px;
    }

    .treemap-tooltip {
        min-width: 200px;
        max-width: 260px;
        padding: 14px;
        font-size: 11px;
    }
}
