/**
 * Frontend Styles for Auction Statistics
 */

/* Container - Mobile First - Auto Width */
.as-frontend-statistics {
    max-width: 100%;
    width: 100%;
    margin: 0;
    padding: 16px 0;
    direction: rtl;
    box-sizing: border-box;
}

@media (min-width: 768px) {
    .as-frontend-statistics {
        padding: 20px 0;
        max-width: 100%;
        width: 100%;
    }
}

/* Frontend Breadcrumb - Same as auction-map-engine */
.as-frontend-breadcrumb {
    margin-bottom: 16px;
    padding: 0;
    direction: rtl;
}

.as-frontend-breadcrumb-list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 13px;
    color: #6b7280;
    line-height: 1.5;
}

.as-breadcrumb-item {
    display: inline-flex;
    align-items: center;
}

.as-breadcrumb-link {
    color: #6b7280;
    text-decoration: none;
    transition: color 0.2s ease;
    font-weight: 500;
    padding: 2px 0;
}

.as-breadcrumb-link:hover {
    color: #0073aa;
    text-decoration: none;
}

.as-breadcrumb-separator {
    color: #d1d5db;
    margin: 0 2px;
    user-select: none;
    font-size: 12px;
    opacity: 0.6;
}

.as-breadcrumb-current {
    color: #1a1a1a;
    font-weight: 600;
}

.as-breadcrumb-current span {
    color: #1a1a1a;
}

/* Mobile Breadcrumb */
@media (max-width: 768px) {
    .as-frontend-breadcrumb-list {
        font-size: 12px;
        gap: 4px;
    }
    
    .as-breadcrumb-separator {
        margin: 0 2px;
        font-size: 11px;
    }
}

/* Filter */
.as-frontend-filter {
    margin-bottom: 30px;
    text-align: center;
}

.as-frontend-filter label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #333;
}

/* Professional Arabic Time Filter Control Bar */
.as-time-filter-control-bar {
    margin-bottom: 24px;
    direction: rtl;
}

.as-filter-bar-container {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 14px 18px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    min-height: 56px;
    direction: rtl;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Custom Dropdown */
.as-custom-dropdown-wrapper {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 200px;
    direction: rtl;
}

.as-filter-label-section {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    direction: rtl;
}

.as-filter-icon-bar {
    color: #0073aa;
    opacity: 0.8;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
}

.as-filter-icon-bar svg {
    width: 18px;
    height: 18px;
}

.as-filter-label-bar {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    direction: rtl;
    white-space: nowrap;
}

.as-custom-dropdown {
    position: relative;
    flex: 1;
    min-width: 180px;
}

.as-dropdown-trigger {
    width: 100%;
    padding: 10px 16px;
    padding-right: 40px;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    direction: rtl;
    text-align: right;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.as-dropdown-trigger:hover {
    border-color: #0073aa;
    background-color: #f9fafb;
}

.as-dropdown-trigger:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.as-dropdown-selected {
    font-size: 14px;
    font-weight: 700;
    color: #111827;
    direction: rtl;
    text-align: right;
    flex: 1;
}

.as-dropdown-arrow {
    color: #6b7280;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.as-custom-dropdown.active .as-dropdown-arrow {
    transform: rotate(180deg);
}

.as-dropdown-menu {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    left: 0;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06);
    z-index: 1000;
    display: none;
    direction: rtl;
    overflow: hidden;
    max-height: 300px;
    overflow-y: auto;
    text-align: right;
}

.as-custom-dropdown.active .as-dropdown-menu {
    display: block;
}

.as-dropdown-option {
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color 0.15s ease;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    direction: rtl;
    text-align: right;
    border-bottom: 1px solid #f3f4f6;
}

.as-dropdown-option:last-child {
    border-bottom: none;
}

.as-dropdown-option:hover {
    background-color: #f9fafb;
}

.as-dropdown-option[data-selected="true"] {
    background-color: #f0f7ff;
    font-weight: 600;
    color: #0073aa;
}

.as-dropdown-option span {
    font-size: 14px;
    color: inherit;
    direction: rtl;
    text-align: right;
    flex: 1;
}

.as-option-check {
    color: #0073aa;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}

/* Custom Date Range */
.as-custom-date-range {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 300px;
    direction: rtl;
}

.as-date-range-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    flex: 1;
    direction: rtl;
}

.as-date-label-bar {
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
    direction: rtl;
    white-space: nowrap;
    flex-shrink: 0;
}

.as-date-input-bar {
    flex: 1;
    min-width: 140px;
    padding: 10px 14px;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #111827;
    background: #fff;
    transition: all 0.2s ease;
    direction: ltr;
    text-align: left;
}

.as-date-input-bar:hover {
    border-color: #9ca3af;
    background-color: #f9fafb;
}

.as-date-input-bar:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
    background-color: #fff;
}

.as-date-range-separator {
    color: #9ca3af;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    padding: 0 4px;
}

.as-date-range-separator svg {
    width: 16px;
    height: 16px;
}

/* Apply Button */
.as-filter-apply-btn {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    direction: rtl;
    flex-shrink: 0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    min-width: 100px;
    height: 40px;
}

.as-filter-apply-btn:hover:not(:disabled) {
    background: #005a87;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.as-filter-apply-btn:active:not(:disabled) {
    transform: translateY(0);
}

.as-filter-apply-btn:disabled {
    background: #d1d5db;
    color: #9ca3af;
    cursor: not-allowed;
    opacity: 0.6;
}

.as-filter-apply-btn.loading {
    pointer-events: none;
}

.as-filter-apply-btn.loading .as-btn-loading-icon {
    display: block;
    animation: spin 0.8s linear infinite;
}

.as-filter-apply-btn.loading .as-btn-text {
    opacity: 0.7;
}

.as-btn-loading-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.as-btn-text {
    direction: rtl;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Redesigned Attempts Over Time Section */
.as-attempts-over-time-section {
    margin-bottom: 32px;
    direction: rtl;
}

/* Section Header */
.as-section-header-modern {
    margin-bottom: 24px;
    direction: rtl;
    text-align: right;
}

.as-section-title-modern {
    font-size: 24px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 8px 0;
    line-height: 1.3;
    direction: rtl;
}

.as-section-subtitle-modern {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
    line-height: 1.5;
    direction: rtl;
}

/* Two-Column Layout */
.as-attempts-layout-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    direction: rtl;
}

/* Right Side: Stats Column - 2x2 Grid */
.as-attempts-stats-column {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    direction: rtl;
}

/* Left Side: Chart Column */
.as-attempts-chart-column {
    direction: rtl;
}

.as-chart-wrapper-modern {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    height: 100%;
}

.as-chart-wrapper-modern canvas {
    max-height: 400px;
}

/* Stat Cards - Compact Design */
.as-stat-card-modern {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 16px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    transition: all 0.2s ease;
    direction: rtl;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 120px;
    height: 100%;
    justify-content: space-between;
}

.as-stat-card-modern:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
}

.as-stat-card-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    direction: rtl;
}

.as-stat-card-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #f0f7ff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0073aa;
    flex-shrink: 0;
    opacity: 0.8;
}

.as-stat-card-icon svg {
    width: 18px;
    height: 18px;
}

.as-stat-card-title-section {
    flex: 1;
    direction: rtl;
    text-align: right;
}

.as-stat-card-title {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin: 0;
    direction: rtl;
    text-align: right;
    line-height: 1.3;
}

.as-stat-card-subtitle {
    font-size: 11px;
    color: #6b7280;
    margin: 2px 0 0 0;
    line-height: 1.3;
    direction: rtl;
    text-align: right;
}

.as-stat-card-value {
    font-size: 24px;
    font-weight: 700;
    color: #111827;
    direction: ltr;
    text-align: left;
    unicode-bidi: isolate;
    line-height: 1.2;
    margin-top: 4px;
}

/* Trend Card Colors */
.as-stat-card-trend.as-trend-up .as-stat-card-value {
    color: #28a745;
}

.as-stat-card-trend.as-trend-down .as-stat-card-value {
    color: #dc3545;
}

.as-stat-card-trend.as-trend-stable .as-stat-card-value {
    color: #0073aa;
}

.as-stat-card-trend.as-trend-up .as-stat-card-icon {
    background: #f0f9f4;
    color: #28a745;
}

.as-stat-card-trend.as-trend-down .as-stat-card-icon {
    background: #fef2f2;
    color: #dc3545;
}

.as-stat-card-trend.as-trend-stable .as-stat-card-icon {
    background: #f0f7ff;
    color: #0073aa;
}

/* Insight Card - Visually Distinct */
.as-stat-card-insight {
    background: linear-gradient(135deg, #f0f7ff 0%, #f8fbff 100%);
    border-color: #cfe2ff;
    /* No grid-column - occupies one cell in 2x2 grid */
}

.as-stat-card-insight .as-stat-card-icon {
    background: #0073aa;
    color: #fff;
    opacity: 1;
}

.as-stat-card-insight-text {
    font-size: 12px;
    color: #374151;
    line-height: 1.5;
    direction: rtl;
    text-align: right;
    margin-top: 4px;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 1024px) {
    .as-attempts-layout-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .as-attempts-stats-column {
        order: 2;
        grid-template-columns: repeat(2, 1fr);
    }
    
    .as-attempts-chart-column {
        order: 1;
    }
    
}

@media (max-width: 767px) {
    /* Section Header */
    .as-section-title-modern {
        font-size: 20px;
        margin-bottom: 6px;
    }
    
    .as-section-subtitle-modern {
        font-size: 13px;
        margin-bottom: 20px;
    }
    
    /* Layout Container - Stacked Vertical */
    .as-attempts-layout-container {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }
    
    /* Chart Column - First (Full Width) */
    .as-attempts-chart-column {
        order: 1;
        width: 100%;
    }
    
    .as-chart-wrapper-modern {
        padding: 16px;
        width: 100%;
        height: auto;
        min-height: unset;
    }
    
    .as-chart-wrapper-modern canvas {
        max-height: 280px;
        width: 100% !important;
        height: auto !important;
    }
    
    /* Stats Column - Second (Full Width Cards) */
    .as-attempts-stats-column {
        order: 2;
        display: flex;
        flex-direction: column;
        gap: 14px;
        width: 100%;
    }
    
    /* Stat Cards - Full Width */
    .as-stat-card-modern {
        width: 100%;
        padding: 16px;
        min-height: 120px;
        margin: 0;
    }
    
    /* Card Header - Compact */
    .as-stat-card-header {
        gap: 10px;
        margin-bottom: 8px;
    }
    
    .as-stat-card-icon {
        width: 24px;
        height: 24px;
        border-radius: 6px;
        flex-shrink: 0;
    }
    
    .as-stat-card-icon svg {
        width: 14px;
        height: 14px;
    }
    
    /* Card Title Section */
    .as-stat-card-title-section {
        flex: 1;
    }
    
    .as-stat-card-title {
        font-size: 13px;
        font-weight: 600;
        margin-bottom: 2px;
    }
    
    .as-stat-card-subtitle {
        font-size: 11px;
        margin: 0;
    }
    
    /* Card Value - Prominent */
    .as-stat-card-value {
        font-size: 28px;
        font-weight: 700;
        margin-top: 8px;
        line-height: 1.2;
    }
    
    /* Trend Card - Keep Colors */
    .as-stat-card-trend.as-trend-up .as-stat-card-value {
        color: #28a745;
    }
    
    .as-stat-card-trend.as-trend-down .as-stat-card-value {
        color: #dc3545;
    }
    
    .as-stat-card-trend.as-trend-stable .as-stat-card-value {
        color: #0073aa;
    }
    
    /* Insight Card - Full Width */
    .as-stat-card-insight {
        grid-column: 1;
        width: 100%;
    }
    
    .as-stat-card-insight .as-stat-card-header {
        margin-bottom: 10px;
    }
    
    .as-stat-card-insight .as-stat-card-icon {
        width: 20px;
        height: 20px;
        background: #0073aa;
        color: #fff;
    }
    
    .as-stat-card-insight-text {
        font-size: 13px;
        line-height: 1.6;
        margin-top: 0;
        padding-top: 8px;
        border-top: 1px solid rgba(0, 115, 170, 0.1);
    }
}

/* Extra Small Screens - Further Optimization */
@media (max-width: 480px) {
    /* Section Header */
    .as-section-title-modern {
        font-size: 18px;
    }
    
    .as-section-subtitle-modern {
        font-size: 12px;
    }
    
    /* Chart */
    .as-chart-wrapper-modern {
        padding: 14px;
        min-height: unset;
    }
    
    .as-chart-wrapper-modern canvas {
        max-height: 260px;
    }
    
    /* Stats Column */
    .as-attempts-stats-column {
        gap: 12px;
    }
    
    /* Stat Cards */
    .as-stat-card-modern {
        padding: 14px;
        min-height: 110px;
    }
    
    .as-stat-card-icon {
        width: 22px;
        height: 22px;
    }
    
    .as-stat-card-icon svg {
        width: 13px;
        height: 13px;
    }
    
    .as-stat-card-title {
        font-size: 12px;
    }
    
    .as-stat-card-subtitle {
        font-size: 10px;
    }
    
    .as-stat-card-value {
        font-size: 26px;
    }
    
    /* Insight Card */
    .as-stat-card-insight-text {
        font-size: 12px;
        line-height: 1.5;
    }
}

/* Responsive */
@media (max-width: 767px) {
    .as-filter-bar-container {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
        padding: 18px;
        direction: rtl;
    }
    
    /* Custom Dropdown Wrapper - Full Width, Stacked Layout */
    .as-custom-dropdown-wrapper {
        width: 100%;
        min-width: auto;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        order: 1;
    }
    
    /* Filter Label Section - Full Width, Top Position */
    .as-filter-label-section {
        width: 100%;
        margin-bottom: 0;
        padding: 0;
    }
    
    /* Dropdown - Full Width */
    .as-custom-dropdown {
        width: 100%;
        min-width: 100%;
    }
    
    /* Dropdown Trigger - Touch Friendly */
    .as-dropdown-trigger {
        width: 100%;
        padding: 14px 16px;
        padding-right: 40px;
        min-height: 44px;
    }
    
    /* Custom Date Range - Full Width, Stacked */
    .as-custom-date-range {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        min-width: 100%;
        gap: 14px;
        order: 2;
        margin-top: 0;
    }
    
    /* Date Range Item - Full Width, Stacked */
    .as-date-range-item {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 8px;
    }
    
    .as-date-label-bar {
        width: 100%;
        padding: 0;
    }
    
    .as-date-range-separator {
        display: none;
    }
    
    .as-date-input-bar {
        width: 100%;
        min-width: 100%;
        padding: 14px;
        min-height: 44px;
    }
    
    /* Apply Button - Full Width, Bottom Position */
    .as-filter-apply-btn {
        width: 100%;
        min-width: 100%;
        min-height: 44px;
        justify-content: center;
        padding: 14px 24px;
        order: 3;
        margin-top: 0;
    }
}

/* Extra Small Screens */
@media (max-width: 480px) {
    .as-filter-bar-container {
        padding: 16px;
        gap: 14px;
    }
    
    .as-filter-label-section {
        gap: 6px;
    }
    
    .as-filter-label-bar {
        font-size: 13px;
    }
    
    .as-dropdown-trigger {
        padding: 12px 14px;
        padding-right: 36px;
        min-height: 44px;
    }
    
    .as-date-input-bar {
        padding: 12px;
        min-height: 44px;
    }
    
    .as-filter-apply-btn {
        padding: 12px 20px;
        min-height: 44px;
    }
}

/* Legacy Support */
.as-time-filter-professional {
    margin-bottom: 24px;
    direction: rtl;
}

.as-filter-container-modern {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s ease;
}

/* Primary Filter */
.as-filter-primary-modern {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    gap: 16px;
    direction: rtl;
}

.as-filter-label-wrapper {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.as-filter-icon-modern {
    color: #0073aa;
    opacity: 0.8;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
}

.as-filter-icon-modern svg {
    width: 18px;
    height: 18px;
}

.as-filter-label-text {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    direction: rtl;
    margin: 0;
    white-space: nowrap;
}

.as-time-scope-select-modern {
    flex: 1;
    min-width: 200px;
    padding: 10px 40px 10px 16px;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    background: #fff;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    direction: rtl;
    text-align: right;
    color: #111827 !important;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    font-family: inherit;
    line-height: 1.5;
}

/* Ensure selected option text is visible */
.as-time-scope-select-modern option:checked {
    background: #0073aa;
    color: #fff;
    font-weight: 600;
}

.as-time-scope-select-modern:hover {
    border-color: #0073aa;
    background-color: #f9fafb;
}

.as-time-scope-select-modern:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
    background-color: #fff;
}

.as-time-scope-select-modern option {
    direction: rtl;
    text-align: right;
    padding: 10px 12px;
    font-size: 14px;
    font-weight: 500;
    color: #111827;
    background: #fff;
}

/* Fix for selected option visibility - Force display */
.as-time-scope-select-modern::-ms-expand {
    display: none;
}

/* Ensure text is always visible */
.as-time-scope-select-modern,
.as-time-scope-select-modern option {
    color: #111827 !important;
}

.as-time-scope-select-modern option[selected] {
    background: #0073aa;
    color: #fff !important;
    font-weight: 600;
}

/* Custom Range Picker */
.as-custom-range-modern {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
    direction: rtl;
}

.as-range-header {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    gap: 8px;
}

.as-range-icon {
    color: #6b7280;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.as-range-icon svg {
    width: 16px;
    height: 16px;
}

.as-range-title {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    direction: rtl;
}

.as-range-inputs {
    display: flex;
    flex-direction: row-reverse;
    align-items: flex-end;
    gap: 16px;
    flex-wrap: wrap;
}

.as-date-field-modern {
    flex: 1;
    min-width: 160px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.as-date-label-modern {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    direction: rtl;
    text-align: right;
    margin-bottom: 2px;
}

.as-date-input-container {
    position: relative;
}

.as-date-input-modern {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #111827;
    background: #fff;
    transition: all 0.2s ease;
    direction: ltr;
    text-align: left;
}

.as-date-input-modern:hover {
    border-color: #9ca3af;
    background-color: #f9fafb;
}

.as-date-input-modern:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
    background-color: #fff;
}

.as-date-separator-modern {
    color: #9ca3af;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
    margin-bottom: 6px;
    flex-shrink: 0;
}

.as-date-separator-modern svg {
    width: 20px;
    height: 20px;
}

.as-range-actions {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-start;
    gap: 12px;
    padding-top: 4px;
}

.as-apply-btn-modern {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    direction: rtl;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.as-apply-btn-modern:hover {
    background: #005a87;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.as-apply-btn-modern:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.as-apply-btn-modern svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Responsive Design */
@media (max-width: 767px) {
    .as-filter-container-modern {
        padding: 16px;
    }
    
    .as-filter-primary-modern {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .as-filter-label-wrapper {
        justify-content: flex-start;
    }
    
    .as-time-scope-select-modern {
        min-width: 100%;
        width: 100%;
        padding-right: 40px;
        padding-left: 16px;
        direction: rtl;
        text-align: right;
        color: #111827 !important;
    }
    
    .as-time-scope-select-modern {
        min-width: 100%;
        width: 100%;
    }
    
    .as-custom-range-modern {
        margin-top: 16px;
        padding-top: 16px;
        gap: 14px;
    }
    
    .as-range-inputs {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
    }
    
    .as-date-field-modern {
        min-width: 100%;
    }
    
    .as-date-separator-modern {
        display: none;
    }
    
    .as-range-actions {
        width: 100%;
    }
    
    .as-apply-btn-modern {
        width: 100%;
        justify-content: center;
    }
}

/* Legacy Support */
.as-time-filter-wrapper {
    margin-bottom: 24px;
    direction: rtl;
}

.as-time-filter-container {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.as-time-filter-primary {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    gap: 10px;
    direction: rtl;
}

.as-filter-icon {
    color: #0073aa;
    opacity: 0.7;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.as-time-scope-select {
    flex: 1;
    padding: 10px 15px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.2s ease;
    direction: rtl;
    color: #23282d;
    font-weight: 500;
}

/* Statistics Cards - Mobile First */
.as-frontend-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

@media (min-width: 640px) {
    .as-frontend-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

@media (min-width: 1024px) {
    .as-frontend-cards {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 20px;
        margin-bottom: 40px;
    }
}

.as-frontend-cards.as-layout-compact {
    grid-template-columns: 1fr;
}

@media (min-width: 640px) {
    .as-frontend-cards.as-layout-compact {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .as-frontend-cards.as-layout-compact {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 15px;
    }
}

.as-frontend-cards.as-layout-full {
    grid-template-columns: 1fr;
}

@media (min-width: 1024px) {
    .as-frontend-cards.as-layout-full {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }
}

/* Premium KPI Cards - Mobile First Ultra Compact */
.as-frontend-card {
    background: #fff;
    padding: 0;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    text-align: center;
    transition: all 0.2s ease;
    border: 1px solid #e8e8e8;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 75px;
}

@media (min-width: 640px) {
    .as-frontend-card {
        min-height: 100px;
        border-radius: 10px;
    }
}

@media (min-width: 1024px) {
    .as-frontend-card {
        min-height: 160px;
        border-radius: 12px;
    }
}

.as-frontend-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    border-color: #d0d0d0;
}

/* Enhanced KPI Cards - Already defined above, keeping for compatibility */

/* Card Icon - Unified Stroke Style */
/* Card Icon - Top Right Corner (RTL Friendly) */
.as-card-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    opacity: 0.12;
    color: #0073aa;
    transition: opacity 0.2s ease;
    flex-shrink: 0;
    z-index: 1;
}

@media (min-width: 640px) {
    .as-card-icon {
        top: 12px;
        right: 12px;
        width: 22px;
        height: 22px;
        opacity: 0.1;
    }
}

@media (min-width: 1024px) {
    .as-card-icon {
        top: 14px;
        right: 14px;
        width: 24px;
        height: 24px;
    }
}

body[dir="rtl"] .as-card-icon,
[dir="rtl"] .as-card-icon {
    right: 10px;
    left: auto;
}

@media (min-width: 640px) {
    body[dir="rtl"] .as-card-icon,
    [dir="rtl"] .as-card-icon {
        right: 12px;
        left: auto;
    }
}

@media (min-width: 1024px) {
    body[dir="rtl"] .as-card-icon,
    [dir="rtl"] .as-card-icon {
        right: 14px;
        left: auto;
    }
}

.as-kpi-card:hover .as-card-icon {
    opacity: 0.18;
}

.as-card-icon svg {
    width: 100%;
    height: 100%;
    stroke-width: 2;
}

/* Enhanced KPI Cards - Compact & Professional */
.as-kpi-card {
    padding: 14px 12px;
    display: flex;
    flex-direction: column;
    position: relative;
    min-height: 120px;
    justify-content: space-between;
}

@media (min-width: 640px) {
    .as-kpi-card {
        padding: 16px 14px;
        min-height: 130px;
    }
}

@media (min-width: 1024px) {
    .as-kpi-card {
        padding: 18px 16px;
        min-height: 140px;
    }
}

/* Card Value - Compact Typography */
.as-card-value {
    font-size: 32px;
    font-weight: 700;
    color: #23282d;
    margin: 0;
    line-height: 1.1;
    direction: ltr;
    text-align: center;
    unicode-bidi: embed;
    letter-spacing: -0.3px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

@media (min-width: 640px) {
    .as-card-value {
        font-size: 36px;
    }
}

@media (min-width: 1024px) {
    .as-card-value {
        font-size: 40px;
    }
}

.as-kpi-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    direction: rtl;
    text-align: center;
    justify-content: center;
    margin-top: 8px;
}

/* Primary Card - Trading Value (Highest Priority) */
.as-kpi-primary .as-card-value {
    font-size: 36px;
    font-weight: 800;
    color: #005a87;
    line-height: 1.05;
}

@media (min-width: 640px) {
    .as-kpi-primary .as-card-value {
        font-size: 42px;
    }
}

@media (min-width: 1024px) {
    .as-kpi-primary .as-card-value {
        font-size: 46px;
    }
}

.as-kpi-primary .as-card-icon {
    opacity: 0.3;
    color: #005a87;
}

.as-kpi-primary::before {
    background: linear-gradient(90deg, #005a87 0%, #0073aa 100%);
    opacity: 0.8;
    height: 4px;
}

/* Secondary Card - Total Attempts (Reduced Weight) */
.as-kpi-secondary .as-card-value {
    font-size: 28px;
    font-weight: 600;
    color: #6b7280;
    line-height: 1.1;
}

@media (min-width: 640px) {
    .as-kpi-secondary .as-card-value {
        font-size: 30px;
    }
}

@media (min-width: 1024px) {
    .as-kpi-secondary .as-card-value {
        font-size: 32px;
    }
}

.as-kpi-secondary .as-card-icon {
    opacity: 0.15;
    color: #6b7280;
}

.as-kpi-secondary::before {
    background: #e5e7eb;
    opacity: 0.4;
    height: 2px;
}

/* Sold Card - With Progress Bar */
.as-kpi-sold .as-card-value {
    font-size: 32px;
    font-weight: 700;
    color: #28a745;
    line-height: 1.1;
}

@media (min-width: 640px) {
    .as-kpi-sold .as-card-value {
        font-size: 34px;
    }
}

@media (min-width: 1024px) {
    .as-kpi-sold .as-card-value {
        font-size: 36px;
    }
}

.as-card-value-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.as-card-ratio {
    font-size: 10px;
    color: #9ca3af;
    font-weight: 500;
    direction: rtl;
    text-align: center;
    margin-top: 2px;
}

.as-card-progress-bar {
    width: 100%;
    height: 3px;
    background: #f3f4f6;
    border-radius: 2px;
    overflow: hidden;
    margin: 6px 0 2px;
}

.as-card-progress-bar .as-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #28a745 0%, #20c997 100%);
    border-radius: 2px;
    transition: width 0.6s ease;
}

.as-kpi-sold .as-card-icon {
    opacity: 0.25;
    color: #28a745;
}

.as-kpi-sold::before {
    background: linear-gradient(90deg, #28a745 0%, #20c997 100%);
    opacity: 0.6;
}

/* Success Rate Card - Hero Number + Progress Bar */
.as-kpi-success .as-card-value {
    font-size: 36px;
    font-weight: 800;
    margin: 0;
    line-height: 1.05;
}

@media (min-width: 640px) {
    .as-kpi-success .as-card-value {
        font-size: 40px;
    }
}

@media (min-width: 1024px) {
    .as-kpi-success .as-card-value {
        font-size: 44px;
    }
}

/* Success Rate Colors */
.as-success-high .as-card-value {
    color: #28a745;
}

.as-success-medium .as-card-value {
    color: #fd7e14;
}

.as-success-low .as-card-value {
    color: #dc3545;
}

.as-success-high .as-card-icon {
    opacity: 0.12;
    color: #28a745;
}

.as-success-medium .as-card-icon {
    opacity: 0.12;
    color: #fd7e14;
}

.as-success-low .as-card-icon {
    opacity: 0.12;
    color: #dc3545;
}

.as-success-high::before {
    background: linear-gradient(90deg, #28a745 0%, #20c997 100%);
    opacity: 0.6;
}

.as-success-medium::before {
    background: linear-gradient(90deg, #fd7e14 0%, #ff9800 100%);
    opacity: 0.6;
}

.as-success-low::before {
    background: linear-gradient(90deg, #dc3545 0%, #c82333 100%);
    opacity: 0.6;
}

/* Success Rate Progress Bar - Horizontal Thin */
.as-success-progress-bar {
    width: 100%;
    height: 3px;
    background: #f3f4f6;
    border-radius: 2px;
    overflow: hidden;
    margin: 6px 0 2px;
}

.as-success-progress-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.6s ease;
}

.as-success-high .as-success-progress-fill {
    background: linear-gradient(90deg, #28a745 0%, #20c997 100%);
}

.as-success-medium .as-success-progress-fill {
    background: linear-gradient(90deg, #fd7e14 0%, #ff9800 100%);
}

.as-success-low .as-success-progress-fill {
    background: linear-gradient(90deg, #dc3545 0%, #c82333 100%);
}

/* Card Subtitle */
.as-card-subtitle {
    font-size: 9px;
    color: #9ca3af;
    font-weight: 500;
    direction: rtl;
    text-align: center;
    margin-top: 1px;
    line-height: 1.3;
}

/* Card Label - Compact */
.as-card-label {
    font-size: 11px;
    color: #6b7280;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
    margin-top: 2px;
    direction: rtl;
    text-align: center;
    line-height: 1.3;
}

@media (min-width: 640px) {
    .as-card-label {
        font-size: 12px;
    }
}

@media (min-width: 1024px) {
    .as-card-label {
        font-size: 12px;
    }
}

.as-layout-compact .as-card-value {
    font-size: 32px;
}

/* Accent Border - Subtle */
.as-kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    opacity: 0.6;
}

.as-kpi-card:nth-child(1)::before {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

.as-kpi-card:nth-child(2)::before {
    background: linear-gradient(90deg, #28a745 0%, #20c997 100%);
}

.as-kpi-card:nth-child(3)::before {
    background: linear-gradient(90deg, #007bff 0%, #0056b3 100%);
}

.as-kpi-card:nth-child(4)::before {
    background: linear-gradient(90deg, #ffc107 0%, #ff9800 100%);
}

.as-kpi-card:nth-child(5)::before {
    background: linear-gradient(90deg, #6f42c1 0%, #5a32a3 100%);
}

/* Charts */
.as-frontend-charts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.as-chart-wrapper {
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.as-chart-wrapper h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    font-size: 20px;
    text-align: center;
}

.as-chart-wrapper canvas {
    max-height: 400px;
}

/* Loading State */
.as-frontend-cards.loading {
    opacity: 0.6;
    pointer-events: none;
}

.as-frontend-cards.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* RTL Support */
body[dir="rtl"] .as-frontend-statistics,
[dir="rtl"] .as-frontend-statistics {
    direction: rtl;
    text-align: right;
}

body[dir="rtl"] .as-frontend-filter,
[dir="rtl"] .as-frontend-filter {
    text-align: right;
}

body[dir="rtl"] .as-frontend-card,
[dir="rtl"] .as-frontend-card {
    text-align: center;
}

body[dir="rtl"] .as-frontend-cards,
[dir="rtl"] .as-frontend-cards {
    direction: rtl;
}

body[dir="rtl"] .as-frontend-charts,
[dir="rtl"] .as-frontend-charts {
    direction: rtl;
}

body[dir="rtl"] .as-chart-wrapper,
[dir="rtl"] .as-chart-wrapper {
    direction: rtl;
    text-align: right;
}

body[dir="rtl"] .as-chart-wrapper h3,
[dir="rtl"] .as-chart-wrapper h3 {
    text-align: right;
}

/* Arabic Typography */
body[dir="rtl"] .as-card-label,
[dir="rtl"] .as-card-label {
    text-transform: none;
    letter-spacing: 0;
    font-weight: 500;
}

/* RTL Loading Spinner */
body[dir="rtl"] .as-frontend-cards.loading::after,
[dir="rtl"] .as-frontend-cards.loading::after {
    right: 50%;
    left: auto;
    margin-right: -20px;
    margin-left: 0;
}

/* RTL Support for New Sections */
body[dir="rtl"] .as-section,
[dir="rtl"] .as-section {
    direction: rtl;
    text-align: right;
}

body[dir="rtl"] .as-performers-grid,
[dir="rtl"] .as-performers-grid {
    direction: rtl;
}

body[dir="rtl"] .as-performer-name,
[dir="rtl"] .as-performer-name {
    direction: rtl;
    text-align: center;
}

body[dir="rtl"] .as-performer-value,
[dir="rtl"] .as-performer-value {
    direction: ltr !important;
    text-align: center !important;
    unicode-bidi: embed;
}

body[dir="rtl"] .as-frontend-table,
[dir="rtl"] .as-frontend-table {
    direction: rtl;
}

body[dir="rtl"] .as-frontend-table thead th,
[dir="rtl"] .as-frontend-table thead th {
    text-align: right;
    direction: rtl;
}

body[dir="rtl"] .as-frontend-table thead th.numeric,
[dir="rtl"] .as-frontend-table thead th.numeric {
    text-align: left;
}

body[dir="rtl"] .as-frontend-table tbody td.region-name,
[dir="rtl"] .as-frontend-table tbody td.region-name {
    text-align: right;
    direction: rtl;
}

body[dir="rtl"] .as-frontend-table tbody td.numeric-value,
[dir="rtl"] .as-frontend-table tbody td.numeric-value {
    direction: ltr !important;
    text-align: left !important;
    unicode-bidi: embed;
}

body[dir="rtl"] .as-progress-item,
[dir="rtl"] .as-progress-item {
    direction: rtl;
}

body[dir="rtl"] .as-progress-header,
[dir="rtl"] .as-progress-header {
    flex-direction: row-reverse;
}

body[dir="rtl"] .as-progress-label,
[dir="rtl"] .as-progress-label {
    direction: rtl;
    text-align: right;
}

/* RTL Support for Progress Value - Handled in Performance Distribution section below */

/* RTL Support for Activity Cards - Handled in new design above */

/* RTL Support for KPI Cards */
body[dir="rtl"] .as-kpi-card,
[dir="rtl"] .as-kpi-card {
    direction: rtl;
}

body[dir="rtl"] .as-card-icon,
[dir="rtl"] .as-card-icon {
    left: auto;
    right: 16px;
}

body[dir="rtl"] .as-card-label,
[dir="rtl"] .as-card-label {
    direction: rtl;
    text-align: center;
}

body[dir="rtl"] .as-card-value,
[dir="rtl"] .as-card-value {
    direction: ltr !important;
    text-align: center !important;
    unicode-bidi: embed;
}

/* RTL Support for Deed Card - Already using row-reverse, ensure proper alignment */
body[dir="rtl"] .as-deed-card,
[dir="rtl"] .as-deed-card {
    direction: rtl !important;
}

body[dir="rtl"] .as-deed-details,
[dir="rtl"] .as-deed-details {
    direction: rtl;
}

body[dir="rtl"] .as-deed-field,
[dir="rtl"] .as-deed-field {
    flex-direction: row-reverse !important; /* Label on right, value on left */
}

body[dir="rtl"] .as-deed-label,
[dir="rtl"] .as-deed-label {
    text-align: right !important;
    direction: rtl !important;
    margin-left: 12px !important;
    margin-right: 0 !important;
    order: 2 !important; /* Display label second (on the right) */
}

body[dir="rtl"] .as-deed-value,
[dir="rtl"] .as-deed-value {
    text-align: left !important;
    direction: ltr !important;
    unicode-bidi: embed !important;
    margin-right: 0 !important;
    margin-left: 0 !important;
    order: 1 !important; /* Display value first (on the left) */
}

body[dir="rtl"] .as-deed-price,
[dir="rtl"] .as-deed-price {
    direction: rtl;
    text-align: center;
}

body[dir="rtl"] .as-deed-price-label,
[dir="rtl"] .as-deed-price-label {
    direction: rtl;
    text-align: center;
}

body[dir="rtl"] .as-deed-price-value,
[dir="rtl"] .as-deed-price-value {
    text-align: center !important;
    direction: ltr !important;
    unicode-bidi: embed !important;
}

body[dir="rtl"] .as-deed-badge,
[dir="rtl"] .as-deed-badge {
    direction: rtl;
    text-align: center;
}

/* RTL Support for Insight Cards */
body[dir="rtl"] .as-performers-insight,
[dir="rtl"] .as-performers-insight {
    direction: rtl;
    text-align: right;
    border-right: 3px solid #0073aa;
    border-left: none;
}

body[dir="rtl"] .as-insight-content,
[dir="rtl"] .as-insight-content {
    direction: rtl;
}

body[dir="rtl"] .as-insight-name,
[dir="rtl"] .as-insight-name {
    direction: rtl;
    text-align: center;
}

body[dir="rtl"] .as-insight-metric,
[dir="rtl"] .as-insight-metric {
    flex-direction: row-reverse;
}

body[dir="rtl"] .as-metric-label,
[dir="rtl"] .as-metric-label {
    direction: rtl;
}

body[dir="rtl"] .as-metric-value,
[dir="rtl"] .as-metric-value {
    direction: ltr !important;
    unicode-bidi: embed;
}

body[dir="rtl"] .as-insight-detail,
[dir="rtl"] .as-insight-detail {
    flex-direction: row-reverse;
}

body[dir="rtl"] .as-detail-label,
[dir="rtl"] .as-detail-label {
    direction: rtl;
}

body[dir="rtl"] .as-detail-value,
[dir="rtl"] .as-detail-value {
    direction: ltr;
    unicode-bidi: isolate;
    text-align: left;
}

body[dir="rtl"] .as-insight-hero-wrapper,
[dir="rtl"] .as-insight-hero-wrapper {
    flex-direction: row-reverse;
    direction: rtl;
}

body[dir="rtl"] .as-insight-hero-unit,
[dir="rtl"] .as-insight-hero-unit {
    direction: rtl;
    text-align: right;
}

body[dir="rtl"] .as-insight-hero-number,
[dir="rtl"] .as-insight-hero-number {
    direction: ltr;
    unicode-bidi: isolate;
    text-align: left;
}

body[dir="rtl"] .as-insight-hero-value,
[dir="rtl"] .as-insight-hero-value {
    direction: rtl;
    flex-direction: row-reverse;
    text-align: center;
}

body[dir="rtl"] .as-insight-hero-label,
[dir="rtl"] .as-insight-hero-label {
    direction: rtl;
    text-align: center;
}

body[dir="rtl"] .as-insight-helper,
[dir="rtl"] .as-insight-helper {
    direction: rtl;
    text-align: center;
}

/* RTL Support for Performer Icons */
body[dir="rtl"] .as-performer-icon,
[dir="rtl"] .as-performer-icon {
    right: 15px;
    left: auto;
}

body[dir="ltr"] .as-performer-icon {
    right: auto;
    left: 15px;
}

/* RTL Support for Price Growth Card */
body[dir="rtl"] .as-price-label,
[dir="rtl"] .as-price-label {
    direction: rtl;
    text-align: center;
}

body[dir="rtl"] .as-price-value,
[dir="rtl"] .as-price-value {
    direction: ltr !important;
    text-align: center !important;
    unicode-bidi: embed;
}

body[dir="rtl"] .as-growth-helper,
[dir="rtl"] .as-growth-helper {
    direction: rtl;
    text-align: center;
}

/* Responsive adjustments for price comparison */
@media (max-width: 768px) {
    .as-price-comparison {
        gap: 10px;
        padding: 12px 0;
    }
    
    .as-price-value {
        font-size: 16px;
    }
    
    .as-price-final .as-price-value {
        font-size: 18px;
    }
    
    .as-performer-icon {
        width: 18px;
        height: 18px;
        top: 12px;
        right: 12px;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .as-frontend-statistics {
        padding: 15px;
    }
    
    /* Statistics Cards - One Card Per Row, No Horizontal Scroll */
    .as-frontend-cards {
        display: grid;
        grid-template-columns: 1fr;
        gap: 16px;
        margin-bottom: 24px;
        overflow-x: visible;
    }
    
    .as-frontend-card {
        width: 100%;
        min-width: 100%;
        max-width: 100%;
        flex-shrink: 1;
        padding: 18px 16px;
        min-height: 140px;
    }
    
    /* Card Content - Improved Spacing */
    .as-kpi-card-content {
        gap: 8px;
        margin-top: 0;
        padding: 0;
    }
    
    /* Card Value - Larger and More Prominent */
    .as-card-value {
        font-size: 38px;
        line-height: 1.1;
        margin-bottom: 4px;
        word-break: keep-all;
        overflow-wrap: break-word;
    }
    
    /* Card Label - Clear and Readable */
    .as-card-label {
        font-size: 14px;
        font-weight: 600;
        margin-top: 4px;
        line-height: 1.4;
    }
    
    /* Card Subtitle - If Present */
    .as-card-subtitle {
        font-size: 12px;
        margin-top: 2px;
        line-height: 1.3;
    }
    
    /* Card Icon - Smaller, Not Crowding */
    .as-card-icon {
        width: 20px;
        height: 20px;
        top: 12px;
        right: 12px;
        opacity: 0.1;
    }
    
    body[dir="rtl"] .as-card-icon,
    [dir="rtl"] .as-card-icon {
        left: auto;
        right: 12px;
    }
    
    /* Primary Card Value - Even Larger */
    .as-kpi-primary .as-card-value {
        font-size: 42px;
    }
    
    /* Success Card Value */
    .as-kpi-success .as-card-value {
        font-size: 40px;
    }
    
    /* Sold Card Value */
    .as-kpi-sold .as-card-value {
        font-size: 36px;
    }
    
    /* Secondary Card Value */
    .as-kpi-secondary .as-card-value {
        font-size: 32px;
    }
    
    /* Card Value Wrapper - For Sold Card */
    .as-card-value-wrapper {
        gap: 4px;
        margin-bottom: 6px;
    }
    
    .as-card-ratio {
        font-size: 11px;
    }
    
    .as-card-progress-bar {
        margin: 8px 0 4px;
    }
    
    .as-success-progress-bar {
        margin: 8px 0 4px;
    }
    
    /* Insight Box - Full Width, Centered Text */
    .as-insight-box {
        width: 100%;
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 18px 16px;
        gap: 12px;
        margin-bottom: 24px;
    }
    
    .as-insight-icon {
        font-size: 24px;
        margin-bottom: 0;
    }
    
    .as-insight-text {
        font-size: 15px;
        line-height: 1.5;
        max-width: 100%;
        text-align: center;
    }
    
    /* Tablet / Small Laptop: 2 cards per row */
    .as-performers-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .as-performer-card {
        padding: 18px 14px;
        min-height: 170px;
    }
    
    .as-performer-name {
        font-size: 15px;
        min-height: 40px;
    }
    
    .as-performer-value {
        font-size: 26px;
    }
    
    .as-frontend-charts {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .as-chart-wrapper canvas {
        max-height: 300px;
    }
    
    .as-section {
        padding: 20px;
    }
    
    .as-frontend-table-wrapper {
        overflow-x: scroll;
    }
    
    .as-frontend-table {
        min-width: 500px;
    }
    
    .as-deed-price-value {
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    /* Statistics Cards - Extra Small Screens */
    .as-frontend-card {
        padding: 16px 14px;
        min-height: 130px;
    }
    
    /* Card Content - Tighter Spacing */
    .as-kpi-card-content {
        gap: 6px;
    }
    
    /* Card Value - Optimized Size */
    .as-card-value {
        font-size: 34px;
        line-height: 1.1;
    }
    
    /* Primary Card Value */
    .as-kpi-primary .as-card-value {
        font-size: 38px;
    }
    
    /* Success Card Value */
    .as-kpi-success .as-card-value {
        font-size: 36px;
    }
    
    /* Sold Card Value */
    .as-kpi-sold .as-card-value {
        font-size: 32px;
    }
    
    /* Secondary Card Value */
    .as-kpi-secondary .as-card-value {
        font-size: 28px;
    }
    
    /* Card Label - Smaller Font */
    .as-card-label {
        font-size: 13px;
    }
    
    /* Card Subtitle */
    .as-card-subtitle {
        font-size: 11px;
    }
    
    /* Card Icon - Smaller */
    .as-card-icon {
        width: 18px;
        height: 18px;
        top: 10px;
        right: 10px;
    }
    
    body[dir="rtl"] .as-card-icon,
    [dir="rtl"] .as-card-icon {
        right: 10px;
    }
    
    /* Insight Box - Compact */
    .as-insight-box {
        padding: 16px 14px;
        gap: 10px;
    }
    
    .as-insight-icon {
        font-size: 22px;
    }
    
    .as-insight-text {
        font-size: 14px;
        line-height: 1.5;
    }
    
    .as-chart-wrapper {
        padding: 20px 15px;
    }
}

/* Typography */
.as-frontend-statistics {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.as-card-value {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Arabic Typography */
body[dir="rtl"] .as-frontend-statistics,
[dir="rtl"] .as-frontend-statistics {
    font-family: 'Segoe UI', Tahoma, Arial, 'Arabic UI Text', 'Arabic Typesetting', sans-serif;
    font-size: 16px;
    line-height: 1.7;
}

body[dir="rtl"] .as-card-value,
[dir="rtl"] .as-card-value {
    font-family: 'Segoe UI', Tahoma, Arial, 'Arabic UI Text', 'Arabic Typesetting', sans-serif;
    font-weight: 700;
}

body[dir="rtl"] .as-chart-wrapper h3,
[dir="rtl"] .as-chart-wrapper h3 {
    font-family: 'Segoe UI', Tahoma, Arial, 'Arabic UI Text', 'Arabic Typesetting', sans-serif;
    font-weight: 600;
}

/* Smooth Transitions */
.as-frontend-card,
.as-time-scope-select,
.as-chart-wrapper {
    transition: all 0.2s ease;
}

/* Equal Card Heights */
.as-frontend-cards {
    align-items: stretch;
}

.as-frontend-card {
    display: flex;
    flex-direction: column;
}

/* Sections - Mobile First */
.as-section {
    background: #fff;
    padding: 20px 16px;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    margin-bottom: 20px;
}

@media (min-width: 768px) {
    .as-section {
        padding: 30px;
        border-radius: 12px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        margin-bottom: 30px;
    }
}

.as-section-title {
    margin-top: 0;
    margin-bottom: 16px;
    color: #23282d;
    font-size: 20px;
    font-weight: 700;
    text-align: right;
    direction: rtl;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 12px;
    padding-right: 0;
    padding-left: 0;
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    justify-content: flex-start;
    cursor: default;
    width: 100%;
}

@media (min-width: 768px) {
    .as-section-title {
        font-size: 24px;
        margin-bottom: 25px;
        border-bottom-width: 3px;
        padding-bottom: 15px;
        cursor: default;
    }
}

/* Ensure section title text starts from right */
.as-section-title-text {
    direction: rtl;
    text-align: right;
    flex: 1;
}

/* Section title icon alignment */
.as-section-title-icon {
    margin-left: 8px;
    margin-right: 0;
    order: -1; /* Icon appears before text in RTL */
}

body[dir="rtl"] .as-section-title,
[dir="rtl"] .as-section-title {
    direction: rtl;
    text-align: right;
    justify-content: flex-start;
}

body[dir="rtl"] .as-section-title-icon,
[dir="rtl"] .as-section-title-icon {
    margin-left: 8px;
    margin-right: 0;
    order: -1;
}

/* Collapsible Sections - Default Collapsed on Mobile */
.as-collapsible-section .as-section-title {
    cursor: pointer;
    user-select: none;
}

.as-toggle-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    color: #0073aa;
    transition: transform 0.3s ease;
    flex-shrink: 0;
    margin-right: 0;
    margin-left: 8px;
    order: -1; /* Icon appears before text in RTL */
}

body[dir="rtl"] .as-toggle-icon,
[dir="rtl"] .as-toggle-icon {
    margin-right: 0;
    margin-left: 8px;
    order: -1;
}

.as-collapsible-section.as-collapsed .as-toggle-icon {
    transform: rotate(-90deg);
}

.as-section-content {
    display: block;
}

.as-collapsible-section.as-collapsed .as-section-content {
    display: none;
}

@media (min-width: 768px) {
    .as-collapsible-section .as-section-title {
        cursor: default;
    }
    
    .as-toggle-icon {
        display: none;
    }
    
    .as-section-content {
        display: block !important;
    }
}

/* Insight Box */
.as-insight-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 20px 25px;
    border-radius: 12px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 15px;
    direction: rtl;
    text-align: right;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.as-insight-icon {
    font-size: 28px;
    flex-shrink: 0;
}

.as-insight-text {
    font-size: 16px;
    font-weight: 500;
    line-height: 1.6;
    flex: 1;
}

/* Top Performers - Mobile First */
.as-top-performers {
    margin-top: 24px;
}

@media (min-width: 768px) {
    .as-top-performers {
        margin-top: 30px;
    }
}

/* Performers Rows - Logical Grouping */
.as-performers-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 14px;
}

.as-performers-row:last-child {
    margin-bottom: 0;
}

/* Unified Row Types - Clean Grid Layout */
.as-performers-row-kpi-fast,
.as-performers-row-kpi-analytic {
    gap: 12px;
}

@media (min-width: 768px) {
    .as-performers-row-kpi-fast {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
    
    .as-performers-row-kpi-analytic {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
}

@media (min-width: 1024px) {
    .as-performers-row-kpi-fast,
    .as-performers-row-kpi-analytic,
    .as-performers-row-details {
        gap: 20px;
    }
}

/* Legacy support */
.as-performers-row-primary,
.as-performers-row-medium,
.as-performers-row-light {
    gap: 12px;
}

@media (min-width: 768px) {
    .as-performers-row-primary {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .as-performers-row-medium {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
    
    .as-performers-row-light {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 16px;
    }
    
    .as-performers-row-compact {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
    
    .as-performers-row-extended {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
    
    .as-performers-row-insights {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
}

@media (min-width: 1024px) {
    .as-performers-row-primary,
    .as-performers-row-medium,
    .as-performers-row-light {
        gap: 20px;
    }
    
    .as-performers-row {
        gap: 20px;
    }
    
    .as-performers-row-compact,
    .as-performers-row-extended,
    .as-performers-row-insights {
        gap: 20px;
    }
}

/* Unified Performer Card - Minimal Padding, Consistent Height */
.as-performer-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    padding: 10px 8px;
    text-align: right;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-height: 110px;
    direction: rtl;
}

/* KPI Fast Cards - Compact */
/* Unified Card Heights - All Cards Same Height */
.as-performer-card-kpi-fast,
.as-performer-card-kpi-analytic,
.as-performer-card-details {
    min-height: 110px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .as-performer-card-kpi-fast,
    .as-performer-card-kpi-analytic,
    .as-performer-card-details {
        min-height: 120px;
        padding: 12px 14px;
    }
}

/* Primary Cards - Highest Visual Weight */
.as-performer-card-primary {
    min-height: 150px;
    border-width: 1.5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.06);
}

.as-performer-card-primary::before {
    height: 4px;
    opacity: 0.8;
}

@media (min-width: 768px) {
    .as-performer-card-primary {
        min-height: 160px;
        padding: 16px 14px;
    }
}

/* Medium Cards - Medium Visual Weight */
.as-performer-card-medium {
    min-height: 140px;
}

@media (min-width: 768px) {
    .as-performer-card-medium {
        min-height: 150px;
        padding: 15px 13px;
    }
}

/* Light Cards - Reduced Visual Weight */
.as-performer-card-light {
    min-height: 130px;
    border-color: #f0f0f0;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.as-performer-card-light::before {
    height: 2px;
    opacity: 0.4;
}

@media (min-width: 768px) {
    .as-performer-card-light {
        min-height: 140px;
        padding: 14px 12px;
    }
}

/* Legacy support */
.as-performer-card-compact {
    min-height: 140px;
}

@media (min-width: 768px) {
    .as-performer-card-compact {
        min-height: 150px;
        padding: 15px 13px;
    }
}

.as-performer-card-extended {
    min-height: 200px;
}

@media (min-width: 768px) {
    .as-performer-card-extended {
        min-height: 240px;
        padding: 18px 16px;
    }
}

.as-performer-card:hover {
    background-color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0,0,0,0.08);
    border-color: #d0d0d0;
}

.as-performer-card-primary:hover {
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

/* Unified Header - Icon + Badge Side by Side - Compact */
.as-performer-header-unified {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    margin-bottom: 8px;
    direction: rtl;
    min-height: 20px;
}

.as-performer-badge-unified {
    font-size: 11px;
    color: #6b7280;
    font-weight: 600;
    direction: rtl;
    text-align: right;
    line-height: 1.3;
    flex: 1;
}

.as-performer-icon-unified {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    opacity: 0.15;
    color: #0073aa;
    transition: opacity 0.2s ease;
    flex-shrink: 0;
}

.as-performer-icon-unified svg {
    width: 100%;
    height: 100%;
    stroke-width: 2;
}

.as-performer-card:hover .as-performer-icon-unified {
    opacity: 0.22;
}

/* Legacy Support */
.as-performer-icon-top {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 18px;
    height: 18px;
    opacity: 0.12;
    color: #0073aa;
    transition: opacity 0.2s ease;
    z-index: 1;
}

.as-performer-icon-top svg {
    width: 100%;
    height: 100%;
    stroke-width: 2;
}

.as-performer-card:hover .as-performer-icon-top {
    opacity: 0.18;
}

.as-performer-badge-top {
    font-size: 10px;
    color: #6b7280;
    font-weight: 600;
    direction: rtl;
    text-align: right;
    margin-bottom: 8px;
    line-height: 1.3;
    padding-top: 2px;
}

/* Hero Value - Large Number */
.as-performer-value-hero {
    font-size: 32px;
    font-weight: 900;
    color: #0073aa;
    direction: ltr;
    text-align: center;
    unicode-bidi: embed;
    letter-spacing: -0.5px;
    line-height: 1.1;
    margin: 2px 0;
}

@media (min-width: 768px) {
    .as-performer-value-hero {
        font-size: 36px;
    }
}

/* Name Compact - Small Secondary Text */
.as-performer-name-compact {
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    direction: rtl;
    text-align: center;
    line-height: 1.3;
    margin-top: 4px;
}

/* Fastest Sale Value Wrapper - RTL with Unit on Right */
.as-fastest-value-wrapper {
    display: flex;
    flex-direction: row-reverse;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
    direction: rtl;
    margin: 4px 0;
}

.as-fastest-unit {
    font-size: 14px;
    font-weight: 600;
    color: #6f42c1;
    direction: rtl;
}

.as-fastest-number {
    font-size: 32px;
    font-weight: 900;
    color: #6f42c1;
    direction: ltr;
    unicode-bidi: isolate;
    letter-spacing: -0.5px;
    line-height: 1.1;
}

@media (min-width: 768px) {
    .as-fastest-number {
        font-size: 36px;
    }
}

/* Color System */
.as-value-blue {
    color: #0073aa;
}

.as-value-green {
    color: #28a745;
}

.as-value-purple {
    color: #6f42c1;
}

/* Growth Card Simplified */
.as-growth-card-simple {
    border-color: #e8f5e9;
}

.as-growth-auction-name {
    font-size: 12px;
    color: #6b7280;
    font-weight: 500;
    direction: rtl;
    text-align: right;
    line-height: 1.3;
    margin-bottom: 6px;
    margin-top: -2px;
}

.as-growth-hero-value {
    font-size: 32px;
    font-weight: 900;
    color: #28a745;
    direction: ltr;
    text-align: center;
    unicode-bidi: embed;
    letter-spacing: -0.5px;
    line-height: 1.1;
    margin: 4px 0;
}

@media (min-width: 768px) {
    .as-growth-hero-value {
        font-size: 36px;
    }
}

.as-growth-price-range {
    font-size: 11px;
    color: #9ca3af;
    direction: rtl;
    text-align: center;
    line-height: 1.3;
    margin-top: 4px;
}

.as-growth-price-range span {
    direction: ltr;
    unicode-bidi: isolate;
    font-weight: 600;
    color: #6b7280;
}

/* Deed Details - Enhanced Two Columns Layout RTL */
/* Deed Details Grid - Two Columns RTL Layout */
.as-deed-details-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 8px 12px;
    direction: rtl;
    margin-top: 8px;
    align-items: start;
}

.as-deed-detail-label {
    color: #9ca3af;
    font-weight: 500;
    font-size: 11px;
    direction: rtl;
    text-align: right;
    line-height: 1.4;
}

.as-deed-detail-value {
    color: #374151;
    font-weight: 600;
    font-size: 12px;
    direction: rtl;
    text-align: right;
    line-height: 1.4;
}

.as-deed-detail-value[dir="ltr"] {
    direction: ltr;
    unicode-bidi: isolate;
}

.as-deed-auction-name-bold {
    font-weight: 700;
    color: #1f2937;
}

/* Deed Number Badge Compact */
.as-deed-number-badge-compact {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 5px;
    direction: ltr;
    text-align: left;
    font-size: 11px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.as-deed-number-badge-compact svg {
    width: 10px;
    height: 10px;
    opacity: 0.7;
    color: #6b7280;
    flex-shrink: 0;
}

.as-deed-number-badge-compact span {
    font-weight: 600;
    color: #374151;
    direction: ltr;
    unicode-bidi: isolate;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, monospace;
}

@media (min-width: 768px) {
    .as-deed-details-grid {
        gap: 10px 14px;
        margin-top: 10px;
    }
    
    .as-deed-detail-label {
        font-size: 12px;
    }
    
    .as-deed-detail-value {
        font-size: 13px;
    }
}

/* Legacy Support */
.as-deed-details-two-columns {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 8px;
    direction: rtl;
    margin-top: 4px;
}

.as-deed-column-labels {
    display: flex;
    flex-direction: column;
    gap: 5px;
    direction: rtl;
    text-align: right;
    justify-content: flex-start;
}

.as-deed-column-values {
    display: flex;
    flex-direction: column;
    gap: 5px;
    direction: rtl;
    text-align: right;
    justify-content: flex-start;
}

.as-deed-label-item {
    font-size: 11px;
    color: #9ca3af;
    font-weight: 500;
    direction: rtl;
    line-height: 1.4;
    min-height: 20px;
    display: flex;
    align-items: center;
}

.as-deed-value-item {
    font-size: 11px;
    color: #374151;
    font-weight: 600;
    direction: rtl;
    line-height: 1.4;
    min-height: 20px;
    display: flex;
    align-items: center;
}

/* Deed Number Badge */
.as-deed-number-badge {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    background: #f0f7ff;
    border: 1px solid #dbeafe;
    border-radius: 6px;
    direction: ltr;
    unicode-bidi: isolate;
}

.as-deed-badge-icon {
    width: 12px;
    height: 12px;
    color: #0073aa;
    opacity: 0.7;
    flex-shrink: 0;
}

.as-deed-number-text {
    font-size: 11px;
    font-weight: 600;
    color: #005a87;
    direction: ltr;
    unicode-bidi: isolate;
}

/* Auction Name Bold */
.as-deed-auction-name-bold {
    font-weight: 700;
    color: #23282d;
}

/* Legacy Support */
.as-deed-details-compact {
    display: flex;
    flex-direction: column;
    gap: 6px;
    direction: rtl;
    margin-top: 8px;
}

.as-deed-detail-row {
    display: flex;
    flex-direction: row-reverse;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    line-height: 1.4;
}

.as-deed-detail-label {
    color: #9ca3af;
    font-weight: 500;
    direction: rtl;
}

.as-deed-detail-value {
    color: #374151;
    font-weight: 600;
    direction: rtl;
}

.as-deed-detail-value[dir="ltr"] {
    direction: ltr;
    unicode-bidi: isolate;
}

/* Region Contribution - Enhanced Design */
.as-region-contribution-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
    direction: rtl;
    margin-top: 8px;
    flex: 1;
}

.as-region-name-main {
    font-size: 14px;
    font-weight: 700;
    color: #1f2937;
    text-align: right;
    direction: rtl;
    line-height: 1.3;
    margin-bottom: 4px;
}

.as-region-progress-full {
    width: 100%;
    height: 6px;
    background: #f3f4f6;
    border-radius: 3px;
    overflow: hidden;
    margin: 4px 0;
}

.as-region-progress-bar-full {
    height: 100%;
    background: linear-gradient(90deg, #0073aa 0%, #005a87 100%);
    border-radius: 3px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 2px rgba(0, 115, 170, 0.2);
}

.as-region-contribution-value {
    font-size: 22px;
    font-weight: 800;
    color: #0073aa;
    direction: ltr;
    text-align: right;
    unicode-bidi: embed;
    line-height: 1.2;
    margin-top: 2px;
}

@media (min-width: 768px) {
    .as-region-name-main {
        font-size: 15px;
    }
    
    .as-region-progress-full {
        height: 8px;
    }
    
    .as-region-contribution-value {
        font-size: 24px;
    }
}

/* Legacy Header Support */
.as-performer-header {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
    direction: rtl;
    min-height: 24px;
}

.as-performer-badge {
    display: inline-block;
    background: #f0f7ff;
    color: #0073aa;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    direction: rtl;
    text-align: right;
    line-height: 1.3;
    white-space: nowrap;
    flex: 1;
}

/* Performer Card Icon - Unified Size and Alignment */
.as-performer-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    opacity: 0.3;
    color: #0073aa;
    transition: opacity 0.2s ease;
    flex-shrink: 0;
}

.as-performer-card:hover .as-performer-icon {
    opacity: 0.45;
}

.as-performer-icon svg {
    width: 100%;
    height: 100%;
    display: block;
    stroke: currentColor;
    stroke-width: 2;
}

/* RTL Support for Performer Header */
body[dir="rtl"] .as-performer-header,
[dir="rtl"] .as-performer-header {
    flex-direction: row-reverse;
    direction: rtl;
}

body[dir="rtl"] .as-performer-badge,
[dir="rtl"] .as-performer-badge {
    text-align: right;
    direction: rtl;
}

.as-performer-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    opacity: 0.6;
    border-radius: 10px 10px 0 0;
}

/* Deed Card Compact */
.as-deed-content-compact {
    display: flex;
    flex-direction: column;
    gap: 8px;
    direction: rtl;
}

.as-deed-name-compact {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    text-align: center;
    direction: rtl;
    margin-bottom: 4px;
    line-height: 1.3;
}

.as-deed-price-compact {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.as-deed-price-value {
    font-size: 28px;
    font-weight: 800;
    color: #0073aa;
    direction: ltr;
    unicode-bidi: isolate;
    line-height: 1.2;
}

.as-deed-badge-small {
    font-size: 10px;
    color: #6b7280;
    font-weight: 500;
    direction: rtl;
    text-align: center;
    line-height: 1.3;
}

/* Region Progress Compact */
.as-region-progress-wrapper-compact {
    width: 100%;
    height: 3px;
    background: #f3f4f6;
    border-radius: 2px;
    overflow: hidden;
    margin-top: 6px;
}

.as-region-progress-bar-compact {
    height: 100%;
    background: linear-gradient(90deg, #0073aa 0%, #005a87 100%);
    border-radius: 2px;
    transition: width 0.6s ease;
}

.as-performer-name {
    font-size: 15px;
    font-weight: 700;
    color: #23282d;
    margin-bottom: 8px;
    direction: rtl;
    text-align: right;
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    line-height: 1.3;
}

.as-performer-card-compact .as-performer-name,
.as-performer-card-medium .as-performer-name,
.as-performer-card-light .as-performer-name {
    text-align: center;
    justify-content: center;
    min-height: 32px;
    margin-bottom: 6px;
}

.as-performer-value {
    font-size: 28px;
    font-weight: 800;
    color: #0073aa;
    margin-bottom: 6px;
    direction: ltr;
    text-align: center;
    unicode-bidi: embed;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.as-performer-card-compact .as-performer-value {
    font-size: 30px;
    margin-bottom: 8px;
}

.as-performer-card-extended .as-performer-value {
    font-size: 26px;
}

.as-performer-label {
    font-size: 11px;
    color: #6b7280;
    direction: rtl;
    text-align: center;
    font-weight: 500;
    margin-top: auto;
    padding-top: 2px;
    line-height: 1.3;
}

/* Region Card Content */
.as-region-content {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
    z-index: 1;
}

/* Region Card Insights */
.as-region-insights {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid #e8e8e8;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.as-region-progress-wrapper {
    width: 100%;
    height: 4px;
    background-color: #f0f0f0;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 4px;
}

.as-region-progress-bar {
    height: 100%;
    background: linear-gradient(to right, #0073aa, #005a87);
    border-radius: 2px;
    transition: width 0.3s ease;
    opacity: 0.7;
}

.as-region-insight-item {
    display: flex;
    flex-direction: row-reverse;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    gap: 8px;
}

.as-insight-label {
    color: #666;
    font-weight: 500;
    direction: rtl;
    text-align: right;
    flex: 1;
    line-height: 1.4;
}

.as-insight-value {
    color: #23282d;
    font-weight: 700;
    direction: ltr;
    text-align: left;
    unicode-bidi: embed;
    flex-shrink: 0;
    font-size: 12px;
}

/* RTL Support for Region Insights */
body[dir="rtl"] .as-region-insight-item,
[dir="rtl"] .as-region-insight-item {
    flex-direction: row-reverse;
}

body[dir="rtl"] .as-insight-label,
[dir="rtl"] .as-insight-label {
    direction: rtl;
    text-align: right;
}

body[dir="rtl"] .as-insight-value,
[dir="rtl"] .as-insight-value {
    direction: ltr !important;
    text-align: left !important;
    unicode-bidi: embed;
}

/* Performers Insight Text */
.as-performers-insight {
    background: #f8f9fa;
    border-right: 3px solid #0073aa;
    padding: 12px 20px;
    margin-bottom: 20px;
    border-radius: 6px;
    direction: rtl;
    text-align: right;
}

.as-performers-insight p {
    margin: 0;
    color: #495057;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.6;
}

/* Insight Cards - Advanced Analytics */
.as-insight-card {
    padding: 14px 12px;
}

.as-insight-content {
    text-align: center;
    direction: rtl;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.as-insight-name {
    font-size: 14px;
    font-weight: 700;
    color: #23282d;
    margin-bottom: 6px;
    direction: rtl;
    text-align: center;
    line-height: 1.3;
    line-height: 1.3;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.as-insight-metric {
    display: flex;
    flex-direction: row-reverse;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 12px;
    flex-wrap: wrap;
}

.as-metric-label {
    color: #666;
    font-weight: 500;
    direction: rtl;
}

.as-metric-value {
    color: #23282d;
    font-weight: 600;
    direction: ltr;
    unicode-bidi: embed;
}

.as-metric-arrow {
    color: #999;
    margin: 0 4px;
}

.as-insight-detail {
    display: flex;
    flex-direction: row-reverse;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 13px;
    direction: rtl;
}

.as-detail-label {
    color: #666;
    font-weight: 500;
    direction: rtl;
    text-align: right;
    order: 2;
}

.as-detail-value {
    color: #23282d;
    font-weight: 600;
    direction: rtl;
    text-align: left;
    order: 1;
}

/* Hero Value Wrapper for RTL Duration Display (Unit + Number) */
.as-insight-hero-wrapper {
    display: flex;
    flex-direction: row-reverse;
    align-items: baseline;
    justify-content: center;
    gap: 6px;
    margin: 10px 0 6px;
    direction: rtl;
}

.as-insight-hero-unit {
    font-size: 1.5rem;
    font-weight: 600;
    color: #0073aa;
    direction: rtl;
    text-align: right;
    line-height: 1.1;
}

.as-insight-hero-number {
    font-size: 28px;
    font-weight: 800;
    color: #0073aa;
    direction: ltr;
    unicode-bidi: isolate;
    text-align: left;
    letter-spacing: -0.5px;
    line-height: 1.1;
}

/* Fallback for old format */
.as-insight-hero-value {
    font-size: 28px;
    font-weight: 800;
    color: #0073aa;
    margin: 10px 0 6px;
    direction: rtl;
    text-align: center;
    display: flex;
    flex-direction: row-reverse;
    align-items: baseline;
    justify-content: center;
    gap: 6px;
    letter-spacing: -0.5px;
    line-height: 1.1;
}

.as-insight-hero-label {
    font-size: 12px;
    color: #666;
    direction: rtl;
    text-align: center;
    font-weight: 500;
    margin-bottom: 6px;
    line-height: 1.3;
}

.as-insight-helper {
    font-size: 11px;
    color: #666;
    direction: rtl;
    text-align: center;
    line-height: 1.4;
    margin-top: 6px;
    font-style: italic;
}

.as-insight-helper strong {
    color: #23282d;
    font-weight: 700;
    font-style: normal;
}

/* Price Growth Card - Compact Layout */
.as-growth-card .as-insight-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 4px 0;
}

/* Price Comparison - Enhanced with SVG Arrow */
.as-price-comparison-enhanced {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 6px 0 4px;
    direction: rtl;
}

.as-price-opening {
    font-weight: 600;
    font-size: 13px;
    color: #6b7280;
    direction: ltr;
    unicode-bidi: isolate;
}

.as-price-final {
    font-weight: 700;
    font-size: 14px;
    color: #23282d;
    direction: ltr;
    unicode-bidi: isolate;
}

.as-price-arrow-svg {
    color: #0073aa;
    opacity: 0.6;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}

.as-growth-result-compact {
    margin-top: 4px;
    padding-top: 0;
}

.as-insight-hero-value-compact {
    font-size: 24px;
    font-weight: 800;
    color: #0073aa;
    direction: ltr;
    text-align: center;
    unicode-bidi: embed;
    line-height: 1.2;
}

.as-insight-name-compact {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
    direction: rtl;
    text-align: center;
    line-height: 1.3;
}

.as-insight-hero-label-compact {
    font-size: 10px;
    color: #9ca3af;
    direction: rtl;
    text-align: center;
    font-weight: 500;
    margin-top: 2px;
    line-height: 1.3;
}

.as-insight-hero-wrapper-compact {
    display: flex;
    flex-direction: row-reverse;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
    margin: 4px 0;
    direction: rtl;
}

/* Legacy support */
.as-price-comparison-inline {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 4px 0;
    font-size: 14px;
    direction: rtl;
    line-height: 1.4;
}

.as-price-arrow-inline {
    color: #999;
    font-size: 14px;
    opacity: 0.5;
    margin: 0 2px;
    font-weight: 400;
}

.as-growth-result {
    margin-top: 2px;
    padding-top: 0;
}

.as-price-arrow {
    color: #0073aa;
    opacity: 0.6;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 4px 0;
    transition: opacity 0.2s ease;
}

.as-growth-card:hover .as-price-arrow {
    opacity: 0.8;
}

.as-price-arrow svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
}

@media (min-width: 640px) {
    .as-price-arrow {
        margin: 6px 0;
    }
    
    .as-price-arrow svg {
        width: 18px;
        height: 18px;
    }
}

/* Growth result styles already defined above - keeping compact */

.as-growth-helper {
    font-size: 10px;
    color: #999;
    direction: rtl;
    text-align: center;
    font-style: italic;
    margin-top: 2px;
    display: none; /* Hidden on mobile, can be shown on larger screens if needed */
}

/* Small Tooltip Icon */
.as-info-tooltip-small {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 4px;
    color: #999;
    cursor: help;
    vertical-align: middle;
    position: relative;
    transition: color 0.2s ease;
    width: 14px;
    height: 14px;
}

.as-info-tooltip-small:hover {
    color: #0073aa;
}

.as-info-tooltip-small svg {
    width: 100%;
    height: 100%;
    display: block;
}

.as-info-tooltip-small[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    right: 0;
    margin-bottom: 6px;
    padding: 8px 12px;
    background: #23282d;
    color: #fff;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 400;
    line-height: 1.4;
    white-space: normal;
    width: 200px;
    max-width: 90vw;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    direction: rtl;
    text-align: right;
    pointer-events: none;
}

.as-info-tooltip-small[data-tooltip]:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    right: 8px;
    margin-bottom: 2px;
    border: 5px solid transparent;
    border-top-color: #23282d;
    z-index: 1001;
    pointer-events: none;
}

/* Best Deed Card - Special Design */
.as-deed-content {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.as-deed-watermark,
.as-region-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 0;
    opacity: 0.03;
}

.as-deed-watermark svg,
.as-region-watermark svg {
    width: 100%;
    height: 100%;
    display: block;
}

.as-deed-details {
    margin-bottom: 0;
    direction: rtl;
    position: relative;
    z-index: 1;
}

/* Deed Info Row - RTL Layout */
.as-deed-field {
    display: flex;
    flex-direction: row-reverse; /* Forces label to the right, value to the left */
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 13px;
}

.as-deed-field:last-child {
    border-bottom: none;
}

.as-deed-label {
    text-align: right;
    direction: rtl;
    font-weight: 600;
    color: #666;
    flex-shrink: 0;
    margin-left: 12px;
    margin-right: 0;
    order: 2; /* Display label second (on the right) */
}

.as-deed-value {
    text-align: left;
    direction: ltr;
    unicode-bidi: embed;
    font-weight: 700;
    color: #23282d;
    flex-shrink: 0;
    margin-right: 0;
    margin-left: 0;
    order: 1; /* Display value first (on the left) */
}

/* Deed Price Section */
.as-deed-price {
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid #e8e8e8;
    text-align: center;
    direction: rtl;
    position: relative;
    z-index: 1;
}

.as-deed-badge-small {
    display: inline-block;
    background: #e8f5e9;
    color: #2e7d32;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    margin-top: 6px;
    border: 1px solid #c8e6c9;
}

.as-deed-price-label {
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
    direction: rtl;
    text-align: center;
    font-weight: 500;
}

.as-deed-price-value {
    font-size: 32px;
    font-weight: 800;
    color: #28a745;
    margin-bottom: 6px;
    text-align: center;
    direction: ltr;
    unicode-bidi: embed;
    letter-spacing: -0.5px;
    cursor: help;
    position: relative;
    line-height: 1.2;
}

@media (min-width: 768px) {
    .as-deed-price-value {
        font-size: 36px;
    }
}

.as-deed-price-value:hover::after {
    content: attr(data-full-value);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 8px;
    padding: 6px 10px;
    background: #23282d;
    color: #fff;
    border-radius: 4px;
    font-size: 14px;
    white-space: nowrap;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.as-deed-price-value:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 2px;
    border: 5px solid transparent;
    border-top-color: #23282d;
    z-index: 11;
}

.as-deed-badge {
    display: inline-block;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: #fff;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    direction: rtl;
    text-align: center;
}

/* Top Regions Table */
.as-top-regions {
    margin-top: 40px;
}

.as-frontend-table-wrapper {
    overflow-x: auto;
    margin-top: 20px;
    width: 100%;
    max-width: 100%;
}

.as-frontend-table {
    width: 100%;
    border-collapse: collapse;
    direction: rtl;
    background: #fff;
}

.as-frontend-table thead {
    background: #f8f9fa;
}

.as-frontend-table thead th {
    padding: 15px;
    text-align: right;
    direction: rtl;
    font-weight: 700;
    color: #23282d;
    border-bottom: 2px solid #dee2e6;
}

.as-frontend-table thead th.numeric {
    text-align: left;
}

.as-frontend-table tbody td {
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.as-frontend-table tbody td.region-name {
    text-align: right;
    direction: rtl;
    font-weight: 600;
}

.as-frontend-table tbody td.numeric-value {
    text-align: left;
    direction: ltr;
    unicode-bidi: embed;
    font-family: 'Courier New', monospace;
    font-weight: 600;
}

.as-frontend-table tbody tr:hover {
    background-color: #f8f9fa;
}

/* Performance Rankings Tabs Section */
.as-rankings-tabs {
    margin-top: 40px;
}

/* Tabs Navigation - Premium Pill Style (RTL: Start from Right) */
.as-rankings-tabs-nav {
    display: flex;
    flex-direction: row;
    gap: 8px;
    margin-bottom: 24px;
    padding: 4px;
    background: #f5f5f5;
    border-radius: 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    position: relative;
    direction: rtl;
    justify-content: flex-start;
}

.as-tab-button {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    direction: rtl;
    text-align: right;
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    flex-shrink: 0;
}

/* Unified hover style for all tabs */
.as-tab-button:hover {
    color: #0073aa;
    background: #f0f7fa;
    border-color: #b3d9e6;
    box-shadow: 0 2px 4px rgba(0, 115, 170, 0.1);
    transform: translateY(-1px);
}

/* Unified active style for all tabs (same color as agents) */
.as-tab-button.active,
.as-tab-button[data-tab="agents"].active,
.as-tab-button[data-tab="platforms"].active,
.as-tab-button[data-tab="auctions"].active {
    color: #ffffff;
    background: #0073aa;
    border-color: #0073aa;
    box-shadow: 0 4px 12px rgba(0, 115, 170, 0.25), 0 2px 4px rgba(0, 115, 170, 0.15);
    transform: translateY(-2px);
}

/* Unified bottom indicator for all active tabs */
.as-tab-button.active::after,
.as-tab-button[data-tab="agents"].active::after,
.as-tab-button[data-tab="platforms"].active::after,
.as-tab-button[data-tab="auctions"].active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    right: 50%;
    transform: translateX(50%);
    width: 40%;
    height: 3px;
    background: #0073aa;
    border-radius: 2px;
    box-shadow: 0 2px 4px rgba(0, 115, 170, 0.3);
}

/* Tab Icon */
.as-tab-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    transition: all 0.3s ease;
}

.as-tab-button .as-tab-icon svg {
    width: 16px;
    height: 16px;
    stroke-width: 2;
    transition: all 0.3s ease;
}

.as-tab-button:not(.active) .as-tab-icon {
    color: #666;
}

.as-tab-button.active .as-tab-icon {
    color: #ffffff;
}

.as-tab-button:hover:not(.active) .as-tab-icon {
    color: #0073aa;
}

/* Apply trophy icon colors to all tab icons (matching agent rankings style) */
.as-tab-button[data-tab="agents"] .as-tab-icon {
    color: #666;
}

.as-tab-button[data-tab="agents"].active .as-tab-icon {
    color: #ffffff;
}

.as-tab-button[data-tab="platforms"] .as-tab-icon {
    color: #666;
}

.as-tab-button[data-tab="platforms"].active .as-tab-icon {
    color: #ffffff;
}

.as-tab-button[data-tab="auctions"] .as-tab-icon {
    color: #666;
}

.as-tab-button[data-tab="auctions"].active .as-tab-icon {
    color: #ffffff;
}

.as-tab-button[data-tab="agents"]:hover:not(.active) .as-tab-icon,
.as-tab-button[data-tab="platforms"]:hover:not(.active) .as-tab-icon,
.as-tab-button[data-tab="auctions"]:hover:not(.active) .as-tab-icon {
    color: #0073aa;
}

/* Tab Text */
.as-tab-text {
    font-weight: 600;
    transition: color 0.3s ease;
}

/* Tab Content with Smooth Transitions */
.as-tab-content {
    display: none;
    opacity: 0;
    animation: fadeIn 0.3s ease-in-out forwards;
}

.as-tab-content.active {
    display: block;
    opacity: 1;
}

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

/* Mobile: Horizontal Scroll with Centered Active Tab */
@media (max-width: 767px) {
    .as-rankings-tabs-nav {
        gap: 6px;
        padding: 3px;
        border-radius: 10px;
    }
    
    .as-tab-button {
        padding: 10px 16px;
        font-size: 13px;
        min-height: 44px;
        gap: 6px;
    }
    
    .as-tab-icon {
        width: 14px;
        height: 14px;
    }
    
    .as-tab-button .as-tab-icon svg {
        width: 14px;
        height: 14px;
    }
    
    /* Auto-center active tab on mobile */
    .as-rankings-tabs-nav .as-tab-button.active {
        scroll-margin: 0 50%;
    }
}

/* Rankings Table (Shared Styles) - Enhanced */
.as-rankings-table {
    margin-top: 16px;
    min-width: 700px;
    border-collapse: separate;
    border-spacing: 0;
}

.as-rankings-table .name-col {
    text-align: right;
    direction: rtl;
    font-weight: 600;
}

/* Enhanced Row Styling */
.as-rankings-table tbody tr {
    transition: background-color 0.15s ease;
    border-bottom: 1px solid #f3f4f6;
}

.as-rankings-table tbody tr:first-child {
    background: rgba(0, 115, 170, 0.03);
    border-top: 2px solid #0073aa;
}

.as-rankings-table tbody tr.as-top-rank {
    background: rgba(0, 115, 170, 0.02);
}

.as-rankings-table tbody tr.as-rank-1 {
    background: rgba(255, 215, 0, 0.06);
}

.as-rankings-table tbody tr.as-rank-2 {
    background: rgba(192, 192, 192, 0.06);
}

.as-rankings-table tbody tr.as-rank-3 {
    background: rgba(205, 127, 50, 0.06);
}

/* Hover Effects */
.as-rankings-table tbody tr:hover {
    background: rgba(0, 115, 170, 0.04) !important;
}

.as-rankings-table tbody tr.as-rank-1:hover {
    background: rgba(255, 215, 0, 0.1) !important;
}

.as-rankings-table tbody tr.as-rank-2:hover {
    background: rgba(192, 192, 192, 0.1) !important;
}

.as-rankings-table tbody tr.as-rank-3:hover {
    background: rgba(205, 127, 50, 0.1) !important;
}

/* Enhanced Numeric Values */
.as-value-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    direction: ltr;
    text-align: center;
    padding: 4px 0;
}

.as-value-main {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
    direction: ltr;
    unicode-bidi: isolate;
}

.as-value-label {
    font-size: 10px;
    color: #9ca3af;
    font-weight: 500;
    direction: rtl;
    text-align: center;
    line-height: 1.2;
    white-space: nowrap;
}

/* Value Type Colors */
.as-value-trading .as-value-main {
    color: #0073aa;
}

/* Trading Analytics Mini Cards/Tabs - Enhanced Design */
.as-trading-mini-cards {
    margin-top: 10px;
    display: flex;
    flex-direction: row-reverse;
    align-items: stretch;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    direction: rtl;
    width: 100%;
}

.as-mini-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    min-width: 65px;
    flex: 0 1 auto;
    direction: rtl;
    text-align: center;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.as-mini-card:hover {
    background: #fafafa;
    border-color: #d1d5db;
    transform: translateY(-2px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.as-mini-card-value {
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
    direction: ltr;
    unicode-bidi: isolate;
    text-align: center;
    line-height: 1.2;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, monospace;
    margin-bottom: 4px;
}

.as-mini-card-label {
    font-size: 10px;
    color: #6b7280;
    font-weight: 500;
    direction: rtl;
    text-align: center;
    line-height: 1.3;
    white-space: nowrap;
}

/* Mini Card Colors */
.as-mini-card-auctions {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.as-mini-card-auctions .as-mini-card-value {
    color: #2563eb;
}

.as-mini-card-assets {
    background: #f9fafb;
    border-color: #e5e7eb;
}

.as-mini-card-assets .as-mini-card-value {
    color: #4b5563;
}

.as-mini-card-sold {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.as-mini-card-sold .as-mini-card-value {
    color: #16a34a;
}

.as-mini-card-unsold {
    background: #fff7ed;
    border-color: #fed7aa;
}

.as-mini-card-unsold .as-mini-card-value {
    color: #ea580c;
}

@media (min-width: 768px) {
    .as-trading-mini-cards {
        margin-top: 12px;
        gap: 10px;
    }
    
    .as-mini-card {
        padding: 10px 14px;
        min-width: 75px;
        border-radius: 10px;
    }
    
    .as-mini-card-value {
        font-size: 18px;
        margin-bottom: 5px;
    }
    
    .as-mini-card-label {
        font-size: 11px;
    }
}

@media (max-width: 767px) {
    .as-trading-mini-cards {
        gap: 6px;
    }
    
    .as-mini-card {
        padding: 6px 10px;
        min-width: 55px;
    }
    
    .as-mini-card-value {
        font-size: 14px;
        margin-bottom: 3px;
    }
    
    .as-mini-card-label {
        font-size: 9px;
    }
}

.as-value-count .as-value-main {
    color: #374151;
}

.as-value-rate.as-value-success-high .as-value-main {
    color: #28a745;
}

.as-value-rate.as-value-success-medium .as-value-main {
    color: #fd7e14;
}

.as-value-rate.as-value-success-low .as-value-main {
    color: #dc3545;
}

/* Regions Table - Enhanced Design */
.as-regions-table {
    margin-top: 16px;
    border-collapse: separate;
    border-spacing: 0;
}

.as-regions-table tbody tr {
    transition: background-color 0.15s ease;
    border-bottom: 1px solid #f3f4f6;
}

.as-regions-table tbody tr:first-child,
.as-regions-table tbody tr.as-region-first {
    background: rgba(0, 115, 170, 0.03);
    border-top: 2px solid #0073aa;
}

.as-regions-table tbody tr:hover {
    background: rgba(0, 115, 170, 0.04) !important;
}

.as-regions-table tbody td {
    padding: 14px 12px;
    vertical-align: middle;
}

.as-regions-table thead th {
    padding: 12px;
    font-weight: 600;
    font-size: 13px;
    color: #374151;
    border-bottom: 2px solid #e5e7eb;
    background: #f9fafb;
    direction: rtl;
    text-align: right;
}

/* Region Name Cell */
.region-name-cell {
    direction: rtl;
    text-align: right;
}

.as-region-name-wrapper {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    direction: rtl;
    justify-content: flex-start;
}

.as-region-icon {
    color: #6b7280;
    opacity: 0.7;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}

.as-region-name {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    direction: rtl;
    text-align: right;
    margin: 0;
}

/* Success Rate Badge */
.as-value-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    direction: ltr;
    unicode-bidi: isolate;
}

.as-rate-badge-as-value-success-high {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.as-rate-badge-as-value-success-medium {
    background: rgba(253, 126, 20, 0.1);
    color: #fd7e14;
}

.as-rate-badge-as-value-success-low {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

/* Mobile Responsive - Convert Regions Table to Cards */
@media (max-width: 768px) {
    /* Hide Table Headers on Mobile */
    .as-regions-table thead {
        display: none;
    }
    
    /* Convert Table Rows to Cards */
    .as-regions-table tbody {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }
    
    /* Each Row = Region Card */
    .as-regions-table tbody tr {
        display: flex;
        flex-direction: column;
        background: #fff;
        border: 1px solid #e5e7eb;
        border-radius: 12px;
        padding: 18px 16px;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
        transition: all 0.2s ease;
        gap: 14px;
    }
    
    .as-regions-table tbody tr:hover {
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
        transform: translateY(-2px);
    }
    
    /* First Region Card - Special Styling */
    .as-regions-table tbody tr.as-region-first {
        background: linear-gradient(135deg, rgba(0, 115, 170, 0.05) 0%, rgba(0, 115, 170, 0.02) 100%);
        border-color: rgba(0, 115, 170, 0.3);
        border-width: 2px;
    }
    
    /* Table Cells = Card Sections */
    .as-regions-table tbody td {
        display: flex;
        flex-direction: column;
        padding: 0;
        border: none;
        width: 100%;
        gap: 8px;
    }
    
    /* Region Name Cell - Top Section */
    .as-regions-table tbody td.region-name-cell {
        order: 1;
        margin-bottom: 4px;
    }
    
    .as-region-name-wrapper {
        align-items: center;
        gap: 8px;
    }
    
    .as-region-icon {
        width: 18px;
        height: 18px;
        opacity: 0.8;
    }
    
    .as-region-name {
        font-size: 18px;
        font-weight: 700;
        color: #111827;
    }
    
    /* Trading Value Cell - Main Section */
    .as-regions-table tbody td.numeric-value:first-of-type {
        order: 2;
        align-items: flex-start;
        text-align: right;
        direction: rtl;
        padding: 12px 0;
        border-top: 1px solid #f3f4f6;
        border-bottom: 1px solid #f3f4f6;
    }
    
    /* Value Cell - Full Width */
    .as-regions-table tbody td.numeric-value:first-of-type .as-value-cell {
        width: 100%;
        align-items: flex-start;
        text-align: right;
        direction: rtl;
        gap: 8px;
    }
    
    /* Trading Value - Primary Number */
    .as-regions-table tbody td.numeric-value:first-of-type .as-value-main {
        font-size: 28px;
        font-weight: 700;
        line-height: 1.2;
        direction: ltr;
        unicode-bidi: embed;
        text-align: left;
        color: #0073aa;
    }
    
    .as-regions-table tbody td.numeric-value:first-of-type .as-value-label {
        font-size: 13px;
        color: #6b7280;
        font-weight: 600;
        direction: rtl;
        text-align: right;
    }
    
    /* Mini Cards - Indicators (4 Boxes) */
    .as-regions-table tbody td.numeric-value:first-of-type .as-trading-mini-cards {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin-top: 8px;
        direction: rtl;
    }
    
    .as-regions-table tbody td.numeric-value:first-of-type .as-mini-card {
        padding: 12px 10px;
        min-width: auto;
        border-radius: 8px;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
    }
    
    .as-regions-table tbody td.numeric-value:first-of-type .as-mini-card-value {
        font-size: 18px;
        font-weight: 700;
        margin-bottom: 2px;
    }
    
    .as-regions-table tbody td.numeric-value:first-of-type .as-mini-card-label {
        font-size: 11px;
        line-height: 1.3;
        white-space: normal;
        text-align: center;
    }
    
    /* Success Rate Cell - Bottom Section */
    .as-regions-table tbody td.numeric-value:last-of-type {
        order: 3;
        align-items: flex-start;
        text-align: right;
        direction: rtl;
        padding: 8px 0 0;
    }
    
    .as-regions-table tbody td.numeric-value:last-of-type .as-value-cell {
        width: 100%;
        align-items: flex-start;
        text-align: right;
        direction: rtl;
    }
    
    /* Success Rate Badge */
    .as-regions-table tbody td.numeric-value:last-of-type .as-value-badge {
        font-size: 14px;
        font-weight: 600;
        padding: 6px 12px;
        border-radius: 8px;
    }
    
    /* Remove Table Wrapper Scroll */
    .as-regions-table {
        min-width: 100%;
        width: 100%;
        display: block;
    }
    
    .as-frontend-table-wrapper.as-desktop-view {
        overflow-x: visible;
    }
}

/* Extra Small Screens - Further Optimization */
@media (max-width: 480px) {
    /* Region Cards - Compact */
    .as-regions-table tbody tr {
        padding: 16px 14px;
        gap: 12px;
        border-radius: 10px;
    }
    
    /* Region Name */
    .as-region-name {
        font-size: 16px;
    }
    
    .as-region-icon {
        width: 16px;
        height: 16px;
    }
    
    /* Trading Value */
    .as-regions-table tbody td.numeric-value:first-of-type .as-value-main {
        font-size: 26px;
    }
    
    .as-regions-table tbody td.numeric-value:first-of-type .as-value-label {
        font-size: 12px;
    }
    
    /* Mini Cards - 2 Columns */
    .as-regions-table tbody td.numeric-value:first-of-type .as-trading-mini-cards {
        gap: 8px;
    }
    
    .as-regions-table tbody td.numeric-value:first-of-type .as-mini-card {
        padding: 10px 8px;
        border-radius: 6px;
    }
    
    .as-regions-table tbody td.numeric-value:first-of-type .as-mini-card-value {
        font-size: 16px;
    }
    
    .as-regions-table tbody td.numeric-value:first-of-type .as-mini-card-label {
        font-size: 10px;
    }
    
    /* Success Rate Badge */
    .as-regions-table tbody td.numeric-value:last-of-type .as-value-badge {
        font-size: 13px;
        padding: 5px 10px;
    }
}

@media (min-width: 768px) {
    .as-regions-table tbody td {
        padding: 16px 14px;
    }
    
    .as-region-name {
        font-size: 15px;
    }
    
    .as-region-icon {
        width: 18px;
        height: 18px;
    }
}

/* Enhanced Table Cell Padding */
.as-rankings-table tbody td {
    padding: 14px 12px;
    vertical-align: middle;
}

.as-rankings-table thead th {
    padding: 12px;
    font-weight: 600;
    font-size: 13px;
    color: #374151;
    border-bottom: 2px solid #e5e7eb;
    background: #f9fafb;
}

@media (min-width: 768px) {
    .as-rankings-table {
        margin-top: 20px;
        min-width: auto;
    }
    
    .as-rankings-table tbody td {
        padding: 16px 14px;
    }
    
    .as-value-main {
        font-size: 17px;
    }
    
    .as-value-label {
        font-size: 11px;
    }
}

/* Agent Rankings Section (Keep for backward compatibility) */
.as-agent-rankings {
    margin-top: 40px;
}

.as-section-subtitle {
    font-size: 14px;
    color: #666;
    margin-top: -10px;
    margin-bottom: 20px;
    direction: rtl;
    text-align: right;
    font-weight: 400;
    font-style: italic;
}

.as-agent-rankings-table {
    margin-top: 16px;
    min-width: 700px; /* Prevent table from being too narrow on mobile */
}

@media (min-width: 768px) {
    .as-agent-rankings-table {
        margin-top: 20px;
        min-width: auto;
    }
}

.as-agent-rankings-table .rank-col {
    width: 70px;
    text-align: center;
}

@media (min-width: 768px) {
    .as-agent-rankings-table .rank-col {
        width: 80px;
    }
}

.as-agent-rankings-table .agent-col {
    text-align: right;
    direction: rtl;
    font-weight: 600;
    min-width: 120px;
}

@media (min-width: 768px) {
    .as-agent-rankings-table .agent-col {
        min-width: 150px;
    }
}

.as-rank-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    direction: ltr;
    padding: 8px 0;
}

/* Enhanced Table Cell Padding */
.as-rankings-table tbody td {
    padding: 14px 12px;
    vertical-align: middle;
}

.as-rankings-table thead th {
    padding: 12px;
    font-weight: 600;
    font-size: 13px;
    color: #374151;
    border-bottom: 2px solid #e5e7eb;
    background: #f9fafb;
}

.as-rank-number {
    font-weight: 700;
    font-size: 16px;
    color: #23282d;
    direction: ltr;
    unicode-bidi: embed;
}

/* Rank Circle for positions 4+ */
.as-rank-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f3f4f6;
    color: #6b7280;
    font-weight: 600;
    font-size: 14px;
    direction: ltr;
    unicode-bidi: embed;
}

.as-trophy-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.as-trophy-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* Trophy Colors */
.as-trophy-1 {
    color: #ffd700;
}

.as-trophy-2 {
    color: #c0c0c0;
}

.as-trophy-3 {
    color: #cd7f32;
}

/* Top 3 Agent Highlighting */
.as-agent-rankings-table tbody tr.as-top-agent {
    background: linear-gradient(to left, rgba(255, 215, 0, 0.05), transparent);
    border-right: 3px solid transparent;
}

.as-agent-rankings-table tbody tr.as-rank-1 {
    border-right-color: #ffd700;
    background: linear-gradient(to left, rgba(255, 215, 0, 0.08), transparent);
}

.as-agent-rankings-table tbody tr.as-rank-1 .as-trophy-icon {
    color: #ffd700;
    opacity: 0.9;
}

.as-agent-rankings-table tbody tr.as-rank-2 {
    border-right-color: #c0c0c0;
    background: linear-gradient(to left, rgba(192, 192, 192, 0.06), transparent);
}

.as-agent-rankings-table tbody tr.as-rank-2 .as-trophy-icon {
    color: #c0c0c0;
    opacity: 0.85;
}

.as-agent-rankings-table tbody tr.as-rank-3 {
    border-right-color: #cd7f32;
    background: linear-gradient(to left, rgba(205, 127, 50, 0.05), transparent);
}

.as-agent-rankings-table tbody tr.as-rank-3 .as-trophy-icon {
    color: #cd7f32;
    opacity: 0.8;
}

.as-agent-rankings-table tbody tr.as-top-agent:hover {
    background: linear-gradient(to left, rgba(255, 215, 0, 0.12), rgba(255, 215, 0, 0.03));
    transform: translateX(-2px);
    transition: all 0.2s ease;
}

.as-agent-rankings-table tbody tr.as-rank-1:hover {
    background: linear-gradient(to left, rgba(255, 215, 0, 0.15), rgba(255, 215, 0, 0.05));
}

.as-agent-rankings-table tbody tr.as-rank-2:hover {
    background: linear-gradient(to left, rgba(192, 192, 192, 0.12), rgba(192, 192, 192, 0.03));
}

.as-agent-rankings-table tbody tr.as-rank-3:hover {
    background: linear-gradient(to left, rgba(205, 127, 50, 0.1), rgba(205, 127, 50, 0.02));
}

/* Execution Quality Score with Progress Bar */
.as-score-cell {
    min-width: 120px;
}

.as-score-wrapper {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-start;
}

.as-score-value {
    font-weight: 600;
    color: #23282d;
    direction: ltr;
    unicode-bidi: embed;
}

.as-score-progress {
    width: 100%;
    height: 3px;
    background-color: #f0f0f0;
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.as-score-progress-bar {
    height: 100%;
    background: linear-gradient(to right, #0073aa, #005a87);
    border-radius: 2px;
    transition: width 0.3s ease;
    opacity: 0.6;
}

.as-score-missing {
    color: #999;
    font-style: italic;
}

/* Ensure Rank 4+ rows are clean and neutral */
.as-agent-rankings-table tbody tr:not(.as-top-agent) {
    background: transparent;
    border-right: 2px solid transparent;
}

.as-agent-rankings-table tbody tr:not(.as-top-agent):hover {
    background-color: #f8f9fa;
    transform: none;
    transition: background-color 0.2s ease;
}

/* Ensure rank numbers for Rank 4+ are neutral */
.as-agent-rankings-table tbody tr:not(.as-top-agent) .as-rank-number {
    color: #666;
    font-weight: 600;
}

/* Info Tooltip for Execution Quality Column */
.as-info-tooltip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 6px;
    margin-left: 4px;
    color: #999;
    cursor: help;
    vertical-align: middle;
    position: relative;
    transition: color 0.2s ease;
}

.as-info-tooltip:hover {
    color: #0073aa;
}

.as-info-tooltip svg {
    width: 14px;
    height: 14px;
    display: block;
}

.as-info-tooltip[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    right: 50%;
    transform: translateX(50%);
    margin-bottom: 8px;
    padding: 10px 14px;
    background: #23282d;
    color: #fff;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.5;
    white-space: normal;
    width: 280px;
    max-width: 90vw;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    direction: rtl;
    text-align: right;
    pointer-events: none;
}

.as-info-tooltip[data-tooltip]:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    right: 50%;
    transform: translateX(50%);
    margin-bottom: 2px;
    border: 6px solid transparent;
    border-top-color: #23282d;
    z-index: 1001;
    pointer-events: none;
}

/* RTL Support for Tooltip */
body[dir="rtl"] .as-info-tooltip,
[dir="rtl"] .as-info-tooltip {
    margin-right: 6px;
    margin-left: 4px;
}

body[dir="rtl"] .as-info-tooltip[data-tooltip]:hover::after,
[dir="rtl"] .as-info-tooltip[data-tooltip]:hover::after {
    right: 50%;
    transform: translateX(50%);
    direction: rtl;
    text-align: right;
}

body[dir="rtl"] .as-info-tooltip[data-tooltip]:hover::before,
[dir="rtl"] .as-info-tooltip[data-tooltip]:hover::before {
    right: 50%;
    transform: translateX(50%);
}

/* Refine Top 3 highlighting to be more subtle */
.as-agent-rankings-table tbody tr.as-top-agent {
    background: linear-gradient(to left, rgba(255, 215, 0, 0.03), transparent);
    border-right: 2px solid transparent;
}

.as-agent-rankings-table tbody tr.as-rank-1 {
    border-right-color: rgba(255, 215, 0, 0.4);
    background: linear-gradient(to left, rgba(255, 215, 0, 0.05), transparent);
}

.as-agent-rankings-table tbody tr.as-rank-2 {
    border-right-color: rgba(192, 192, 192, 0.4);
    background: linear-gradient(to left, rgba(192, 192, 192, 0.04), transparent);
}

.as-agent-rankings-table tbody tr.as-rank-3 {
    border-right-color: rgba(205, 127, 50, 0.4);
    background: linear-gradient(to left, rgba(205, 127, 50, 0.03), transparent);
}

.as-agent-rankings-table tbody tr.as-top-agent:hover {
    background: linear-gradient(to left, rgba(255, 215, 0, 0.08), rgba(255, 215, 0, 0.02));
    transform: translateX(-1px);
}

.as-agent-rankings-table tbody tr.as-rank-1:hover {
    background: linear-gradient(to left, rgba(255, 215, 0, 0.1), rgba(255, 215, 0, 0.03));
}

.as-agent-rankings-table tbody tr.as-rank-2:hover {
    background: linear-gradient(to left, rgba(192, 192, 192, 0.08), rgba(192, 192, 192, 0.02));
}

.as-agent-rankings-table tbody tr.as-rank-3:hover {
    background: linear-gradient(to left, rgba(205, 127, 50, 0.08), rgba(205, 127, 50, 0.02));
}

/* RTL Support for Agent Rankings */
body[dir="rtl"] .as-section-subtitle,
[dir="rtl"] .as-section-subtitle {
    direction: rtl;
    text-align: right;
}

body[dir="rtl"] .as-agent-rankings-table .agent-col,
[dir="rtl"] .as-agent-rankings-table .agent-col {
    direction: rtl;
    text-align: right;
}

body[dir="rtl"] .as-rank-display,
[dir="rtl"] .as-rank-display {
    direction: ltr;
    justify-content: center;
}

body[dir="rtl"] .as-rank-number,
[dir="rtl"] .as-rank-number {
    direction: ltr !important;
    unicode-bidi: embed;
}

/* Mobile Responsive - Convert Tables to Cards */
@media (max-width: 768px) {
    /* Hide Table Headers on Mobile */
    .as-rankings-table thead,
    .as-agent-rankings-table thead {
        display: none;
    }
    
    /* Convert Table Rows to Cards */
    .as-rankings-table tbody,
    .as-agent-rankings-table tbody {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }
    
    /* Each Row = Card */
    .as-rankings-table tbody tr,
    .as-agent-rankings-table tbody tr {
        display: flex;
        flex-direction: column;
        background: #fff;
        border: 1px solid #e5e7eb;
        border-radius: 12px;
        padding: 18px 16px;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
        transition: all 0.2s ease;
        gap: 12px;
    }
    
    .as-rankings-table tbody tr:hover,
    .as-agent-rankings-table tbody tr:hover {
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
        transform: translateY(-2px);
    }
    
    /* Top Rank Cards - Special Styling */
    .as-rankings-table tbody tr.as-rank-1,
    .as-agent-rankings-table tbody tr.as-rank-1 {
        background: linear-gradient(135deg, rgba(255, 215, 0, 0.08) 0%, rgba(255, 215, 0, 0.03) 100%);
        border-color: rgba(255, 215, 0, 0.3);
        border-width: 2px;
    }
    
    .as-rankings-table tbody tr.as-rank-2,
    .as-agent-rankings-table tbody tr.as-rank-2 {
        background: linear-gradient(135deg, rgba(192, 192, 192, 0.08) 0%, rgba(192, 192, 192, 0.03) 100%);
        border-color: rgba(192, 192, 192, 0.3);
        border-width: 2px;
    }
    
    .as-rankings-table tbody tr.as-rank-3,
    .as-agent-rankings-table tbody tr.as-rank-3 {
        background: linear-gradient(135deg, rgba(205, 127, 50, 0.08) 0%, rgba(205, 127, 50, 0.03) 100%);
        border-color: rgba(205, 127, 50, 0.3);
        border-width: 2px;
    }
    
    /* Table Cells = Card Sections */
    .as-rankings-table tbody td,
    .as-agent-rankings-table tbody td {
        display: flex;
        flex-direction: column;
        padding: 0;
        border: none;
        width: 100%;
        gap: 6px;
    }
    
    /* Rank Column - Top Section */
    .as-rankings-table tbody td.rank-col,
    .as-agent-rankings-table tbody td.rank-col {
        order: 1;
        align-items: flex-start;
        margin-bottom: 8px;
    }
    
    .as-rank-display {
        flex-direction: row;
        gap: 8px;
        align-items: center;
    }
    
    .as-trophy-icon {
        width: 20px;
        height: 20px;
    }
    
    .as-rank-circle {
        width: 28px;
        height: 28px;
        font-size: 13px;
    }
    
    /* Name Column - Agent/Platform Name */
    .as-rankings-table tbody td.agent-col,
    .as-rankings-table tbody td.name-col,
    .as-agent-rankings-table tbody td.agent-col {
        order: 2;
        font-size: 18px;
        font-weight: 700;
        color: #111827;
        margin-bottom: 4px;
        text-align: right;
        direction: rtl;
    }
    
    /* Numeric Value Columns - Stacked */
    .as-rankings-table tbody td.numeric-value,
    .as-agent-rankings-table tbody td.numeric-value {
        order: 3;
        align-items: flex-start;
        text-align: right;
        direction: rtl;
        padding: 12px 0;
        border-top: 1px solid #f3f4f6;
    }
    
    .as-rankings-table tbody td.numeric-value:first-of-type,
    .as-agent-rankings-table tbody td.numeric-value:first-of-type {
        border-top: none;
        padding-top: 0;
    }
    
    /* Value Cell - Full Width */
    .as-value-cell {
        width: 100%;
        align-items: flex-start;
        text-align: right;
        direction: rtl;
        gap: 4px;
    }
    
    .as-value-main {
        font-size: 24px;
        font-weight: 700;
        line-height: 1.2;
        direction: ltr;
        unicode-bidi: embed;
        text-align: left;
    }
    
    .as-value-label {
        font-size: 12px;
        color: #6b7280;
        font-weight: 600;
        direction: rtl;
        text-align: right;
    }
    
    /* Trading Value - Primary Color */
    .as-value-trading .as-value-main {
        color: #0073aa;
        font-size: 26px;
    }
    
    /* Success Rate - Color Coding */
    .as-value-success-high .as-value-main {
        color: #28a745;
    }
    
    .as-value-success-medium .as-value-main {
        color: #fd7e14;
    }
    
    .as-value-success-low .as-value-main {
        color: #dc3545;
    }
    
    /* Score Cell */
    .as-rankings-table tbody td.as-score-cell,
    .as-agent-rankings-table tbody td.as-score-cell {
        order: 4;
        align-items: flex-start;
        padding: 12px 0;
        border-top: 1px solid #f3f4f6;
    }
    
    .as-score-wrapper {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 6px;
    }
    
    .as-score-value {
        font-size: 20px;
        font-weight: 700;
        color: #111827;
        direction: ltr;
        unicode-bidi: embed;
    }
    
    .as-score-progress {
        width: 100%;
        height: 6px;
        background: #f3f4f6;
        border-radius: 3px;
        overflow: hidden;
    }
    
    .as-score-progress-bar {
        height: 100%;
        background: linear-gradient(90deg, #0073aa 0%, #005a87 100%);
        border-radius: 3px;
        transition: width 0.3s ease;
    }
    
    .as-score-missing {
        color: #9ca3af;
        font-size: 14px;
    }
    
    /* Remove Table Wrapper Scroll */
    .as-frontend-table-wrapper {
        overflow-x: visible;
    }
    
    .as-rankings-table,
    .as-agent-rankings-table {
        min-width: 100%;
        width: 100%;
        display: block;
    }
    
    /* Tabs - Full Width on Mobile */
    .as-rankings-tabs-nav {
        flex-direction: column;
        gap: 8px;
        padding: 0;
        background: transparent;
        border-radius: 0;
    }
    
    .as-tab-button {
        width: 100%;
        justify-content: center;
        padding: 14px 20px;
        font-size: 14px;
        min-height: 48px;
        border-radius: 10px;
    }
    
    .as-tab-icon {
        width: 18px;
        height: 18px;
    }
    
    .as-tab-button .as-tab-icon svg {
        width: 18px;
        height: 18px;
    }
}

/* Extra Small Screens - Further Optimization */
@media (max-width: 480px) {
    /* Ranking Cards - Compact */
    .as-rankings-table tbody tr,
    .as-agent-rankings-table tbody tr {
        padding: 16px 14px;
        gap: 10px;
        border-radius: 10px;
    }
    
    /* Rank Display */
    .as-trophy-icon {
        width: 18px;
        height: 18px;
    }
    
    .as-rank-circle {
        width: 26px;
        height: 26px;
        font-size: 12px;
    }
    
    /* Name Column */
    .as-rankings-table tbody td.agent-col,
    .as-rankings-table tbody td.name-col,
    .as-agent-rankings-table tbody td.agent-col {
        font-size: 16px;
    }
    
    /* Value Main */
    .as-value-main {
        font-size: 22px;
    }
    
    .as-value-trading .as-value-main {
        font-size: 24px;
    }
    
    .as-value-label {
        font-size: 11px;
    }
    
    /* Score */
    .as-score-value {
        font-size: 18px;
    }
    
    .as-score-progress {
        height: 5px;
    }
    
    /* Tabs */
    .as-tab-button {
        padding: 12px 16px;
        font-size: 13px;
        min-height: 44px;
    }
    
    .as-tab-icon {
        width: 16px;
        height: 16px;
    }
    
    .as-tab-button .as-tab-icon svg {
        width: 16px;
        height: 16px;
    }
}

/* Performance Distribution - Professional Redesign */
.as-performance-distribution {
    margin-top: 24px;
    direction: rtl;
}

@media (min-width: 768px) {
    .as-performance-distribution {
        margin-top: 40px;
    }
}

.as-progress-bars {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 16px;
}

@media (min-width: 768px) {
    .as-progress-bars {
        gap: 18px;
        margin-top: 20px;
    }
}

.as-progress-item {
    direction: rtl;
}

.as-progress-header {
    display: flex;
    flex-direction: row-reverse;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    gap: 12px;
}

.as-progress-label-wrapper {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.as-progress-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    opacity: 0.9;
}

.as-progress-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.as-icon-sold {
    color: #22c55e;
}

.as-icon-not-sold {
    color: #f97316;
}

.as-progress-label {
    font-weight: 600;
    color: #1f2937;
    direction: rtl;
    text-align: right;
    font-size: 14px;
}

@media (min-width: 768px) {
    .as-progress-label {
        font-size: 15px;
    }
}

/* Progress Stats Container */
.as-progress-stats {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.as-progress-percent {
    font-weight: 600;
    color: #374151;
    direction: ltr;
    text-align: left;
    unicode-bidi: embed;
    font-size: 14px;
    min-width: 45px;
}

/* Count Badge - Separated from Percent */
.as-progress-count-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    direction: rtl;
    text-align: right;
    font-size: 12px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.as-count-label {
    color: #6b7280;
    font-weight: 500;
    direction: rtl;
    font-size: 11px;
}

.as-count-value {
    color: #1f2937;
    font-weight: 700;
    direction: ltr;
    unicode-bidi: isolate;
    font-size: 13px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, monospace;
}

.as-progress-item-sold .as-progress-count-badge {
    background: #f0fdf4;
    border-color: #dcfce7;
}

.as-progress-item-sold .as-count-value {
    color: #166534;
}

.as-progress-item-not-sold .as-progress-count-badge {
    background: #fff7ed;
    border-color: #fed7aa;
}

.as-progress-item-not-sold .as-count-value {
    color: #9a3412;
}

@media (min-width: 768px) {
    .as-progress-stats {
        gap: 14px;
    }
    
    .as-progress-percent {
        font-size: 15px;
        min-width: 50px;
    }
    
    .as-progress-count-badge {
        padding: 5px 12px;
        font-size: 13px;
    }
    
    .as-count-label {
        font-size: 12px;
    }
    
    .as-count-value {
        font-size: 14px;
    }
}

/* Progress Bar - Enhanced with Animation */
.as-progress-bar {
    height: 26px;
    background: #f3f4f6;
    border-radius: 13px;
    overflow: hidden;
    position: relative;
    border: 1px solid #e5e7eb;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
}

@media (min-width: 768px) {
    .as-progress-bar {
        height: 30px;
        border-radius: 15px;
    }
}

.as-progress-fill {
    height: 100%;
    border-radius: 13px;
    transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 14px;
    color: #fff;
    font-weight: 600;
    font-size: 11px;
    position: relative;
    overflow: hidden;
}

.as-progress-fill::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%);
    pointer-events: none;
}

@media (min-width: 768px) {
    .as-progress-fill {
        border-radius: 15px;
        padding: 0 16px;
        font-size: 12px;
    }
}

/* Sold Progress Fill - Green Gradient */
.as-progress-sold {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 50%, #15803d 100%);
    box-shadow: 0 2px 4px rgba(34, 197, 94, 0.2);
}

/* Not Sold Progress Fill - Orange/Red Gradient */
.as-progress-not-sold {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 50%, #c2410c 100%);
    box-shadow: 0 2px 4px rgba(249, 115, 22, 0.2);
}

/* Mobile Responsive */
@media (max-width: 767px) {
    .as-progress-header {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .as-progress-stats {
        width: 100%;
        justify-content: space-between;
        margin-top: 4px;
    }
    
    .as-progress-count-badge {
        padding: 3px 8px;
        font-size: 11px;
    }
    
    .as-count-label {
        font-size: 10px;
    }
    
    .as-count-value {
        font-size: 12px;
    }
    
    .as-progress-percent {
        font-size: 13px;
    }
}

/* Info Tooltip for Section Title */
.as-performance-distribution .as-section-title .as-info-tooltip-small {
    margin-left: 8px;
    margin-right: 0;
    order: -1;
    opacity: 0.6;
}

.as-performance-distribution .as-section-title .as-info-tooltip-small:hover {
    opacity: 1;
}

/* RTL Support */
body[dir="rtl"] .as-progress-header,
[dir="rtl"] .as-progress-header {
    flex-direction: row-reverse;
}

body[dir="rtl"] .as-progress-label-wrapper,
[dir="rtl"] .as-progress-label-wrapper {
    flex-direction: row-reverse;
}

body[dir="rtl"] .as-progress-label,
[dir="rtl"] .as-progress-label {
    direction: rtl;
    text-align: right;
}

body[dir="rtl"] .as-progress-value,
[dir="rtl"] .as-progress-value {
    flex-direction: row-reverse;
    direction: rtl;
    text-align: right;
}

body[dir="rtl"] .as-progress-percent,
[dir="rtl"] .as-progress-percent {
    direction: ltr !important;
    text-align: left !important;
    unicode-bidi: embed;
}

body[dir="rtl"] .as-progress-count,
[dir="rtl"] .as-progress-count {
    direction: ltr !important;
    text-align: left !important;
    unicode-bidi: embed;
}

/* Recent Activity - Complete Redesign */
.as-recent-activity {
    margin-top: 24px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    direction: rtl;
}

@media (min-width: 768px) {
    .as-recent-activity {
        margin-top: 40px;
        padding: 32px;
        border-radius: 14px;
    }
}

/* Section Header - Independent Header */
.as-recent-activity .as-section-title {
    margin: 0 0 24px 0;
    padding: 0 0 16px 0;
    border-bottom: 1px solid #e5e7eb;
    width: 100%;
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    gap: 10px;
    direction: rtl;
    text-align: right;
}

@media (min-width: 768px) {
    .as-recent-activity .as-section-title {
        margin-bottom: 28px;
        padding-bottom: 18px;
    }
}

.as-recent-activity .as-section-title-text {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    direction: rtl;
    text-align: right;
    flex: 1;
}

@media (min-width: 768px) {
    .as-recent-activity .as-section-title-text {
        font-size: 22px;
    }
}

.as-recent-activity .as-section-title-icon {
    width: 24px;
    height: 24px;
    color: #0073aa;
    opacity: 0.8;
    flex-shrink: 0;
    order: -1;
}

@media (min-width: 768px) {
    .as-recent-activity .as-section-title-icon {
        width: 26px;
        height: 26px;
    }
}

/* Section Title with Icon */
.as-section-title-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin-left: 8px;
    margin-right: 0;
    color: #0073aa;
    opacity: 0.7;
    flex-shrink: 0;
    order: -1; /* Icon appears before text in RTL */
}

body[dir="rtl"] .as-section-title-icon,
[dir="rtl"] .as-section-title-icon {
    margin-left: 8px;
    margin-right: 0;
    order: -1;
}

.as-section-title-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* Activity List - Body Container */
.as-activity-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 0;
}

@media (min-width: 768px) {
    .as-activity-list {
        gap: 14px;
    }
}

/* Attempt Card - Complete Redesign */
.as-attempt-item {
    display: flex;
    flex-direction: row-reverse;
    border-radius: 12px;
    padding: 12px;
    background: #fff;
    margin-bottom: 12px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    transition: all 0.2s ease;
    position: relative;
    direction: rtl;
}

@media (min-width: 768px) {
    .as-attempt-item {
        padding: 14px;
    }
}

/* Status Bar - Side Indicator */
.as-attempt-item::before {
    content: '';
    width: 4px;
    border-radius: 4px;
    margin-left: 12px;
    flex-shrink: 0;
    background: #e5e7eb;
}

.as-attempt-item.sold::before {
    background: #22c55e;
}

.as-attempt-item.unsold::before,
.as-attempt-item.not-sold::before {
    background: #f97316;
}

/* Card Background Colors */
.as-attempt-item.sold {
    background: #f6fff8;
    border-color: #dcfce7;
}

.as-attempt-item.sold:hover {
    background: #f0fdf4;
    box-shadow: 0 2px 4px rgba(34, 197, 94, 0.1);
}

.as-attempt-item.unsold,
.as-attempt-item.not-sold {
    background: #fff7ed;
    border-color: #fed7aa;
}

.as-attempt-item.unsold:hover,
.as-attempt-item.not-sold:hover {
    background: #fffbeb;
    box-shadow: 0 2px 4px rgba(249, 115, 22, 0.1);
}

/* Card Content - Vertical Stack (using existing structure) */
.as-attempt-item {
    display: flex;
    flex-direction: column;
    padding-right: 4px; /* Space for status bar */
}

/* Wrapper for content rows */
.as-attempt-top-row,
.as-attempt-meta-row {
    flex: 0 0 auto;
    padding-right: 0;
}

/* Row 1: Primary Row (Badge + Asset Title + Ref) */
.as-attempt-top-row {
    display: flex;
    flex-direction: row-reverse;
    gap: 10px;
    flex-wrap: nowrap;
    align-items: center;
    margin: 0;
    padding: 0;
    width: 100%;
    margin-bottom: 10px;
    line-height: 1.4;
}

.as-attempt-title-wrapper {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
    flex-wrap: nowrap;
    direction: rtl;
}

/* Asset Title - Primary Visual Element */
.as-attempt-title {
    font-weight: 800;
    color: #111827;
    font-size: 15px;
    line-height: 1.4;
    direction: rtl;
    text-align: right;
    word-wrap: break-word;
    overflow-wrap: break-word;
    margin: 0;
    padding: 0;
    flex: 1;
    min-width: 0;
    letter-spacing: -0.2px;
}

@media (min-width: 768px) {
    .as-attempt-title {
        font-size: 16px;
    }
}

.as-attempt-link {
    color: #23282d;
    text-decoration: none;
    transition: color 0.2s ease;
    display: inline;
    direction: rtl;
    text-align: right;
}

.as-attempt-link:hover {
    color: #0073aa;
    text-decoration: underline;
}

/* Status Badge */
.as-attempt-status {
    flex-shrink: 0;
    margin: 0;
    padding: 0;
}

.as-status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    line-height: 1.4;
    direction: rtl;
    text-align: center;
}

.as-status-badge.as-status-sold {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

.as-status-badge.as-status-unsold {
    background: #fed7aa;
    color: #9a3412;
    border: 1px solid #fdba74;
}

/* Deed Badge / Ref - Smaller Chip */
.as-deed-badge-compact {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 7px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #e5e7eb;
    border-radius: 5px;
    direction: ltr;
    text-align: left;
    font-size: 10px;
    flex-shrink: 0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    margin: 0;
    opacity: 0.9;
}

.as-deed-badge-compact svg {
    width: 9px;
    height: 9px;
    opacity: 0.6;
    color: #6b7280;
    flex-shrink: 0;
}

.as-deed-badge-compact .as-deed-number {
    font-size: 9px;
    color: #4b5563;
    font-weight: 600;
    direction: ltr;
    unicode-bidi: isolate;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, monospace;
}

/* Row 2: Secondary Row (Auction • Agent • Region • Time) */
.as-attempt-meta-row {
    display: flex;
    flex-direction: row-reverse;
    gap: 6px;
    flex-wrap: wrap;
    font-size: 11px;
    color: #9ca3af;
    direction: rtl;
    text-align: right;
    margin: 0;
    padding: 0;
    line-height: 1.5;
    width: 100%;
}

@media (min-width: 768px) {
    .as-attempt-meta-row {
        font-size: 12px;
        gap: 8px;
    }
}

.as-meta-item-inline {
    display: inline-flex;
    align-items: center;
    gap: 0;
    direction: rtl;
    color: #6b7280;
    white-space: normal;
    line-height: 1.3;
}

.as-meta-item-inline svg {
    display: none;
}

.as-meta-item-inline .as-meta-text {
    font-size: 11px;
    font-weight: 400;
    color: #9ca3af;
    direction: rtl;
    line-height: 1.5;
}

@media (min-width: 768px) {
    .as-meta-item-inline .as-meta-text {
        font-size: 12px;
    }
}

.as-meta-separator {
    display: inline-block;
    margin: 0 5px;
    color: #d1d5db;
    font-weight: 400;
    opacity: 0.5;
    font-size: 10px;
}

@media (min-width: 768px) {
    .as-meta-separator {
        margin: 0 6px;
        font-size: 11px;
    }
}

/* Mobile Responsive - Enhanced Mobile Experience */
@media (max-width: 767px) {
    .as-recent-activity {
        padding: 18px;
        border-radius: 10px;
    }
    
    .as-recent-activity .as-section-title-text {
        font-size: 18px;
    }
    
    .as-recent-activity .as-section-title-icon {
        width: 22px;
        height: 22px;
    }
    
    /* Activity List - Increased spacing between cards */
    .as-activity-list {
        gap: 14px;
    }
    
    /* Attempt Card - Full width, optimized padding */
    .as-attempt-item {
        width: 100%;
        padding: 14px 16px;
        padding-right: 4px; /* Space for status bar */
        margin-bottom: 14px;
        min-height: auto;
    }
    
    /* Status Bar - Keep visible, fixed width */
    .as-attempt-item::before {
        width: 4px;
        margin-left: 12px;
        flex-shrink: 0;
    }
    
    /* Row 1: Title Row - Keep compact */
    .as-attempt-top-row {
        gap: 10px;
        margin-bottom: 10px;
        flex-wrap: nowrap;
        align-items: center;
    }
    
    /* Asset Title - Clear and readable */
    .as-attempt-title {
        font-size: 14px;
        font-weight: 800;
        line-height: 1.5;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    /* Status Badge - Slightly smaller */
    .as-status-badge {
        font-size: 10px;
        padding: 4px 9px;
        flex-shrink: 0;
    }
    
    /* Row 2: Meta Row - Stacked/Wrapped layout */
    .as-attempt-meta-row {
        font-size: 11px;
        gap: 6px;
        flex-wrap: wrap;
        line-height: 1.6;
        margin: 0;
        padding: 0;
    }
    
    /* Meta Text - Smaller, better readability */
    .as-meta-item-inline {
        display: inline-flex;
        flex-wrap: wrap;
        gap: 0;
    }
    
    .as-meta-item-inline .as-meta-text {
        font-size: 11px;
        font-weight: 400;
        color: #9ca3af;
        line-height: 1.6;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    /* Meta Separator - Smaller */
    .as-meta-separator {
        margin: 0 5px;
        font-size: 10px;
        opacity: 0.5;
    }
}

@media (min-width: 768px) {
    .as-attempt-item {
        display: flex;
        flex-direction: column;
    }
    
    .as-attempt-top-row {
        flex-wrap: nowrap;
    }
    
    .as-attempt-meta-row {
        flex-wrap: wrap;
    }
}

/* Sold Attempts - Very Light Green */
/* Sold Attempts - Very Light Green Background + Green Sidebar */
.as-attempt-item.sold {
    background: #f0fdf4;
    border-color: #dcfce7;
    border-right: 3px solid #22c55e;
}

.as-attempt-item.sold::before {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #22c55e;
}

.as-attempt-item.sold:hover {
    background: #ecfdf5;
    border-color: #bbf7d0;
    box-shadow: 0 1px 3px rgba(34, 197, 94, 0.1);
    transform: translateY(-1px);
}

/* Unsold Attempts - Very Light Orange Background + Orange Sidebar */
.as-attempt-item.unsold {
    background: #fff7ed;
    border-color: #fed7aa;
    border-right: 3px solid #f97316;
}

.as-attempt-item.unsold::before {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #f97316;
}

.as-attempt-item.unsold:hover {
    background: #fffbeb;
    border-color: #fde68a;
    box-shadow: 0 1px 3px rgba(249, 115, 22, 0.1);
    transform: translateY(-1px);
}

/* Top Row: Title (RIGHT FIRST) + Status Badge + Deed Number Badge */
.as-attempt-top-row {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    justify-content: flex-start;
    gap: 0;
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: auto;
    line-height: 1.3; /* Reduced line height */
}

.as-attempt-title-wrapper {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
    flex-wrap: wrap;
    justify-content: flex-start;
    direction: rtl;
    width: 100%;
}

.as-attempt-title {
    font-weight: 700;
    color: #1f2937;
    font-size: 13px;
    line-height: 1.4;
    direction: rtl;
    text-align: right;
    word-wrap: break-word;
    overflow-wrap: break-word;
    margin: 0;
    padding: 0;
    flex-shrink: 0;
    min-width: 0;
    order: 1; /* Title FIRST from RIGHT (with row-reverse, lower order = appears first) */
}

@media (min-width: 768px) {
    .as-attempt-item {
        padding: 6px 12px; /* Reduced vertical padding */
        border-radius: 10px;
        gap: 3px; /* Reduced gap */
    }
    
    .as-attempt-title {
        font-size: 14px;
        line-height: 1.3;
    }
}

.as-attempt-link {
    color: #23282d;
    text-decoration: none;
    transition: color 0.2s ease;
    display: inline;
    direction: rtl;
    text-align: right;
}

.as-attempt-link:hover {
    color: #0073aa;
    text-decoration: underline;
}

/* Deed Badge Compact - LAST (after status) */
.as-deed-badge-compact {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 6px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #e5e7eb;
    border-radius: 5px;
    direction: ltr;
    text-align: left;
    font-size: 10px;
    flex-shrink: 0;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    order: 3; /* Deed number LAST (with row-reverse, higher order = appears last) */
    margin: 0;
}

.as-deed-badge-compact svg {
    width: 10px;
    height: 10px;
    opacity: 0.7;
    color: #6b7280;
    flex-shrink: 0;
}

.as-deed-badge-compact .as-deed-number {
    font-size: 10px;
    color: #374151;
    font-weight: 600;
    direction: ltr;
    unicode-bidi: isolate;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, monospace;
}

/* Legacy Deed Badge (for backward compatibility) */
.as-deed-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #e0e7ef;
    border-radius: 14px;
    direction: rtl;
    text-align: right;
    font-size: 11px;
    line-height: 1.4;
    width: fit-content;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    margin: 0;
    align-self: flex-start;
}

.as-deed-badge svg {
    width: 12px;
    height: 12px;
    opacity: 0.7;
    color: #0073aa;
    flex-shrink: 0;
}

.as-deed-number {
    font-size: 11px;
    color: #0073aa;
    font-weight: 600;
    direction: ltr;
    text-align: left;
    unicode-bidi: isolate;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, monospace;
    margin: 0;
}

@media (min-width: 768px) {
    .as-deed-badge {
        font-size: 12px;
        padding: 5px 11px;
        border-radius: 16px;
    }
    
    .as-deed-badge svg {
        width: 13px;
        height: 13px;
    }
    
    .as-deed-number {
        font-size: 12px;
    }
}

.as-activity-link {
    color: #23282d;
    text-decoration: none;
    transition: color 0.2s ease;
    display: inline-block;
    direction: rtl;
    text-align: right;
}

.as-activity-link:hover {
    color: #0073aa;
    text-decoration: underline;
}

@media (min-width: 768px) {
    .as-activity-name {
        font-size: 15px;
        margin-bottom: 0;
        padding-bottom: 0;
    }
    
    .as-deed-badge {
        margin-top: 10px;
        margin-right: 0;
        margin-left: auto;
    }
    
    .as-activity-meta {
        margin-top: 10px;
    }
}

/* Middle Row: Auction Name + Agent Name (Compact) */
.as-attempt-middle-row {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    gap: 0;
    flex-wrap: wrap;
    font-size: 11px;
    color: #6b7280;
    direction: rtl;
    margin: 0;
    padding: 0;
    min-height: auto;
    line-height: 1.4;
}

/* Bottom Row: Region + Time (Compact) */
.as-attempt-bottom-row {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    gap: 0;
    flex-wrap: wrap;
    font-size: 11px;
    color: #6b7280;
    direction: rtl;
    margin: 0;
    padding: 0;
    min-height: auto;
    line-height: 1.4;
}

/* Meta Separator (•) */
.as-meta-separator {
    display: inline-block;
    margin: 0 6px;
    color: #9ca3af;
    font-weight: 400;
    opacity: 0.6;
}

/* Inline Meta Items */
.as-meta-item-inline {
    display: inline-flex;
    align-items: center;
    gap: 0;
    direction: rtl;
    color: #6b7280;
    white-space: normal;
    line-height: 1.3;
}

.as-meta-item-inline svg {
    display: none; /* Hide icons for cleaner look */
}

.as-meta-item-inline .as-meta-text {
    font-size: 11px;
    font-weight: 400;
    color: #6b7280;
    direction: rtl;
    line-height: 1.3;
}

.as-meta-item-inline .as-meta-text[dir="ltr"] {
    direction: ltr;
    unicode-bidi: isolate;
}

/* Legacy Meta (for backward compatibility) */
.as-attempt-meta {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 12px;
    color: #666;
    direction: rtl;
    margin: 0;
    padding: 0;
    width: 100%;
}

@media (min-width: 768px) {
    .as-attempt-meta {
        font-size: 13px;
        gap: 12px;
    }
}

.as-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    direction: rtl;
}

.as-meta-item svg {
    width: 14px;
    height: 14px;
    opacity: 0.6;
    color: #666;
    flex-shrink: 0;
}

.as-meta-text {
    direction: rtl;
    text-align: right;
}

/* Attempt Status Badge - Always Right of Title */
.as-attempt-status {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin: 0;
    padding: 0;
    flex-shrink: 0;
}

.as-status-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
    line-height: 1.3;
    direction: rtl;
    text-align: center;
}

.as-status-badge.as-status-sold {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.as-status-badge.as-status-unsold {
    background: #fff3e0;
    color: #e65100;
    border: 1px solid #ffe0b2;
}

/* Ensure Status Badge Never Moves - Always Right */
.as-attempt-status {
    flex-shrink: 0;
    order: 2; /* Status SECOND (after title) */
    margin: 0;
    padding: 0;
}

.as-status-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
    line-height: 1.3;
}

.as-status-badge.as-status-sold {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

.as-status-badge.as-status-unsold {
    background: #fed7aa;
    color: #9a3412;
    border: 1px solid #fdba74;
}

@media (min-width: 768px) {
    .as-status-badge {
        font-size: 11px;
        padding: 4px 10px;
    }
}

/* Activity Footer - View All Link */
.as-activity-footer {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
    text-align: center;
}

.as-view-all-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #0073aa;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    direction: rtl;
}

.as-view-all-link:hover {
    color: #005a87;
    text-decoration: underline;
}

.as-view-all-link svg {
    width: 14px;
    height: 14px;
    opacity: 0.8;
    flex-shrink: 0;
    transform: rotate(180deg); /* Rotate for RTL */
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.as-view-all-link:hover svg {
    opacity: 1;
    transform: rotate(180deg) translateX(-2px);
}

.as-view-all-link[data-action="hide"] svg {
    transform: rotate(0deg);
}

.as-view-all-link[data-action="hide"]:hover svg {
    transform: rotate(0deg) translateX(2px);
}

/* RTL Support */
body[dir="rtl"] .as-activity-card-header,
[dir="rtl"] .as-activity-card-header {
    flex-direction: row-reverse;
}

body[dir="rtl"] .as-activity-info,
[dir="rtl"] .as-activity-info {
    direction: rtl;
    text-align: right;
}

body[dir="rtl"] .as-activity-meta,
[dir="rtl"] .as-activity-meta {
    flex-direction: row-reverse;
}

body[dir="rtl"] .as-activity-deed,
body[dir="rtl"] .as-activity-region,
body[dir="rtl"] .as-activity-time,
[dir="rtl"] .as-activity-deed,
[dir="rtl"] .as-activity-region,
[dir="rtl"] .as-activity-time {
    direction: rtl;
    text-align: right;
}

body[dir="rtl"] .as-view-all-link,
[dir="rtl"] .as-view-all-link {
    direction: rtl;
}

/* Mobile: Force Stacked Layout - No Horizontal Alignment */
@media (max-width: 767px) {
    .as-attempt-item {
        padding: 8px 10px;
        gap: 5px;
    }
    
    .as-attempt-top-row {
        gap: 8px;
        flex-wrap: wrap;
    }
    
    .as-attempt-title-wrapper {
        gap: 6px;
        flex-wrap: wrap;
    }
    
    .as-attempt-title {
        font-size: 13px;
        min-width: 0;
        order: 1; /* Title FIRST from RIGHT */
    }
    
    .as-attempt-status {
        flex-shrink: 0;
        order: 2; /* Status SECOND */
    }
    
    .as-deed-badge-compact {
        align-self: flex-start;
        margin: 0;
        order: 3; /* Deed number LAST */
    }
    
    .as-attempt-meta-row {
        gap: 0;
    }
    
    /* Legacy support */
    .as-attempt-middle-row,
    .as-attempt-bottom-row {
        gap: 0;
    }
    
    .as-attempt-meta {
        gap: 8px;
    }
}

/* RTL Support for Deed Number - Number LTR */
body[dir="rtl"] .as-deed-number,
[dir="rtl"] .as-deed-number {
    direction: ltr !important;
    text-align: left !important;
    unicode-bidi: isolate !important;
}

/* RTL Support for Title Row - Status Always Right */
body[dir="rtl"] .as-attempt-title-row,
[dir="rtl"] .as-attempt-title-row {
    flex-direction: row-reverse !important;
}

body[dir="rtl"] .as-attempt-status,
[dir="rtl"] .as-attempt-status {
    order: -1 !important; /* Status on right */
}

body[dir="rtl"] .as-attempt-title,
[dir="rtl"] .as-attempt-title {
    order: 0 !important; /* Title on left */
}

/* Chart Enhancements */
.as-frontend-charts {
    margin-top: 24px;
    direction: rtl;
}

@media (min-width: 768px) {
    .as-frontend-charts {
        margin-top: 40px;
    }
}

.as-chart-wrapper {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* Professional Chart Header */
.as-chart-header-professional {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    padding: 20px 24px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
    direction: rtl;
}

.as-chart-header-content {
    display: flex;
    flex-direction: row-reverse;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    flex-wrap: wrap;
}

.as-chart-header-text {
    flex: 1;
    min-width: 200px;
}

.as-chart-title-professional {
    font-size: 22px;
    font-weight: 800;
    color: #23282d;
    margin: 0 0 8px 0;
    direction: rtl;
    text-align: right;
    line-height: 1.3;
}

.as-chart-description {
    font-size: 14px;
    color: #666;
    margin: 0;
    direction: rtl;
    text-align: right;
    line-height: 1.5;
}

.as-chart-header-badges {
    display: flex;
    flex-direction: row-reverse;
    gap: 12px;
    flex-wrap: wrap;
}

.as-chart-badge {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: #f8f9fa;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    min-width: 140px;
    direction: rtl;
    transition: all 0.2s ease;
}

.as-chart-badge:hover {
    background: #f0f7ff;
    border-color: #0073aa;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

.as-badge-icon {
    color: #0073aa;
    opacity: 0.8;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.as-badge-icon svg {
    width: 16px;
    height: 16px;
}

.as-badge-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.as-badge-label {
    font-size: 11px;
    color: #666;
    font-weight: 500;
    direction: rtl;
    text-align: right;
}

.as-badge-value {
    font-size: 16px;
    font-weight: 700;
    color: #23282d;
    direction: ltr;
    text-align: right;
    unicode-bidi: embed;
}

.as-trend-badge.as-trend-up .as-badge-icon,
.as-trend-badge.as-trend-up .as-badge-value {
    color: #28a745;
}

.as-trend-badge.as-trend-down .as-badge-icon,
.as-trend-badge.as-trend-down .as-badge-value {
    color: #dc3545;
}

.as-trend-badge.as-trend-stable .as-badge-icon,
.as-trend-badge.as-trend-stable .as-badge-value {
    color: #0073aa;
}

/* Professional Chart Wrapper */
.as-chart-wrapper-professional {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    padding: 24px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
    position: relative;
    direction: rtl;
}

.as-chart-wrapper-professional canvas {
    direction: ltr;
}

@media (max-width: 767px) {
    .as-chart-header-professional {
        padding: 16px;
    }
    
    .as-chart-header-content {
        flex-direction: column;
        gap: 16px;
    }
    
    .as-chart-title-professional {
        font-size: 18px;
    }
    
    .as-chart-description {
        font-size: 13px;
    }
    
    .as-chart-header-badges {
        width: 100%;
        flex-direction: column;
    }
    
    .as-chart-badge {
        width: 100%;
        min-width: auto;
    }
    
    .as-chart-wrapper-professional {
        padding: 16px;
    }
}

/* Legacy Chart Styles (for backward compatibility) */
.as-chart-title {
    font-size: 18px;
    font-weight: 700;
    color: #23282d;
    margin: 0 0 12px 0;
    direction: rtl;
    text-align: right;
}

.as-chart-insight {
    font-size: 13px;
    color: #666;
    margin: 0 0 16px 0;
    padding: 10px 14px;
    background: #f8f9fa;
    border-right: 3px solid #0073aa;
    border-radius: 4px;
    direction: rtl;
    text-align: right;
    line-height: 1.5;
}

.as-chart-wrapper canvas {
    direction: ltr;
}

/* Enhanced Chart Insight Summary */
.as-chart-insight-enhanced {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
    border: 1px solid #e8e8e8;
}

.as-insight-stats {
    display: flex;
    flex-direction: row-reverse;
    justify-content: space-around;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    direction: rtl;
}

.as-insight-stat-item {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}

.as-insight-label {
    color: #666;
    font-weight: 500;
}

.as-insight-value {
    color: #23282d;
    font-weight: 700;
    font-size: 14px;
}

.as-trend-up .as-insight-value {
    color: #28a745;
}

.as-trend-down .as-insight-value {
    color: #dc3545;
}

.as-trend-stable .as-insight-value {
    color: #0073aa;
}

/* Chart Toggles */
.as-chart-toggles {
    display: flex;
    flex-direction: row-reverse;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    direction: rtl;
}

.as-toggle-btn {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 12px;
    color: #666;
    direction: rtl;
}

.as-toggle-btn:hover {
    background: #f8f9fa;
    border-color: #0073aa;
    color: #0073aa;
}

.as-toggle-btn.active {
    background: #f0f7ff;
    border-color: #0073aa;
    color: #0073aa;
}

.as-toggle-btn:not(.active) {
    opacity: 0.5;
}

.as-toggle-indicator {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    display: inline-block;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.as-toggle-label {
    font-weight: 500;
}

@media (max-width: 767px) {
    .as-chart-insight-enhanced {
        padding: 10px 12px;
    }
    
    .as-insight-stats {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .as-insight-stat-item {
        width: 100%;
        justify-content: space-between;
    }
    
    .as-chart-toggles {
        justify-content: flex-start;
        gap: 6px;
    }
    
    .as-toggle-btn {
        padding: 5px 10px;
        font-size: 11px;
    }
    
    .as-toggle-indicator {
        width: 10px;
        height: 10px;
    }
}

/* Market Snapshot Card - Professional Market Intelligence */
.as-market-snapshot-wrapper {
    max-width: 100%;
    margin: 0 auto 24px;
    direction: rtl;
}

.as-market-snapshot-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    transition: all 0.3s ease;
}

.as-market-snapshot-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* Header */
.as-market-header {
    display: flex;
    flex-direction: row-reverse;
    align-items: flex-start;
    justify-content: space-between;
    padding: 24px 28px;
    border-bottom: 1px solid #e5e7eb;
    gap: 20px;
    background: linear-gradient(to left, #f8fafc 0%, #ffffff 100%);
}

.as-market-header-content {
    flex: 1;
    min-width: 0;
}

.as-market-title {
    font-size: 22px;
    font-weight: 800;
    color: #111827;
    margin: 0 0 6px 0;
    line-height: 1.2;
    direction: rtl;
    text-align: right;
    letter-spacing: -0.3px;
}

.as-market-subtitle {
    font-size: 14px;
    color: #6b7280;
    margin: 0 0 6px 0;
    line-height: 1.5;
    direction: rtl;
    text-align: right;
    font-weight: 500;
}

/* Date Range - Homepage Card Only */
.as-market-snapshot-card .as-market-date-range {
    font-size: 12px;
    color: #9ca3af;
    margin: 0;
    line-height: 1.4;
    direction: rtl;
    text-align: right;
    font-weight: 400;
}

.as-market-details-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #0073aa;
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(0, 115, 170, 0.15);
}

.as-market-details-btn:hover {
    background: #005a87;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 115, 170, 0.25);
}

.as-market-details-btn svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* Market Signals Bar - Removed for Homepage Card */

/* Market Trend Section */
.as-market-trend {
    padding: 24px 28px;
    border-bottom: 1px solid #e5e7eb;
    background: #fafbfc;
}

.as-market-trend-header {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 16px;
}

/* Market Trend Label - Homepage Card Only */
.as-market-snapshot-card .as-market-trend-label {
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
    direction: rtl;
}

/* Chart Container */
.as-market-chart-container {
    height: 120px;
    width: 100%;
    position: relative;
}

.as-market-sparkline {
    width: 100% !important;
    height: 100% !important;
}

.as-market-chart-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #9ca3af;
    font-size: 13px;
    direction: rtl;
    text-align: center;
}

.as-market-chart-empty p {
    margin: 0;
}

/* Market Insight - Removed for Homepage Card */

/* Market Signals */
.as-market-signals {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    padding: 0;
}

.as-market-signal {
    padding: 28px 24px;
    text-align: center;
    border-right: 1px solid #e5e7eb;
    transition: background-color 0.2s ease;
    position: relative;
}

.as-market-signal:last-child {
    border-right: none;
}

.as-market-signal:hover {
    background-color: #f9fafb;
}

.as-market-signal-value {
    font-size: 28px;
    font-weight: 700;
    color: #111827;
    line-height: 1.2;
    margin-bottom: 8px;
    direction: ltr;
    text-align: center;
    unicode-bidi: embed;
    letter-spacing: -0.5px;
}

.as-market-signal-label {
    font-size: 12px;
    color: #6b7280;
    font-weight: 500;
    line-height: 1.4;
    direction: rtl;
    text-align: center;
}

/* Mobile Responsive */
@media (max-width: 767px) {
    .as-market-snapshot-wrapper {
        margin-bottom: 20px;
    }
    
    .as-market-header {
        flex-direction: column;
        align-items: flex-start;
        padding: 20px;
        gap: 16px;
    }
    
    .as-market-header-content {
        width: 100%;
    }
    
    .as-market-title {
        font-size: 20px;
    }
    
    .as-market-subtitle {
        font-size: 13px;
    }
    
    .as-market-details-btn {
        width: 100%;
        justify-content: center;
        padding: 12px 20px;
    }
    
    .as-market-snapshot-card .as-market-trend {
        padding: 20px;
    }
    
    .as-market-snapshot-card .as-market-chart-container {
        height: 100px;
    }
    
    .as-market-snapshot-card .as-market-date-range {
        font-size: 11px;
    }
    
    /* Stack signals vertically on mobile */
    .as-market-signals {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .as-market-signal {
        padding: 24px 20px;
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
    }
    
    .as-market-signal:last-child {
        border-bottom: none;
    }
    
    .as-market-signal-value {
        font-size: 26px;
    }
    
    .as-market-signal-label {
        font-size: 11px;
    }
}

/* Empty State */
.as-empty-state {
    padding: 40px 20px;
    text-align: center;
    color: #666;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px dashed #ddd;
    margin: 20px 0;
}

.as-empty-state p {
    margin: 0;
    font-size: 16px;
    font-style: italic;
    direction: rtl;
    text-align: center;
}

/* Loading State */
.as-loading {
    opacity: 0.7;
    pointer-events: none;
    position: relative;
}

.as-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 50px;
    height: 50px;
    margin: -25px 0 0 -25px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 1000;
}

/* Chart Empty State */
.as-chart-empty {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

/* Monthly Market Snapshot Card - Homepage Only */
.as-monthly-snapshot-wrapper {
    max-width: 100%;
    margin: 0 auto 24px;
    direction: rtl;
}

.as-monthly-snapshot-card {
    background: #fff;
    border: 1px solid rgba(229, 231, 235, 0.8);
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.as-monthly-snapshot-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08), 0 4px 8px rgba(0, 0, 0, 0.04);
    transform: translateY(-3px);
    border-color: rgba(229, 231, 235, 1);
}

/* Header */
.as-monthly-header {
    padding: 28px 28px 24px;
    border-bottom: none;
    background: linear-gradient(to left, #f8fafc 0%, #ffffff 100%);
    position: relative;
}

.as-monthly-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    left: 0;
    height: 1px;
    background: linear-gradient(to right, transparent 0%, rgba(229, 231, 235, 0.5) 20%, rgba(229, 231, 235, 0.5) 80%, transparent 100%);
}

.as-monthly-header-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.as-monthly-title {
    font-size: 22px;
    font-weight: 800;
    color: #111827;
    margin: 0;
    line-height: 1.2;
    direction: rtl;
    text-align: right;
    letter-spacing: -0.3px;
}

.as-monthly-subtitle {
    font-size: 14px;
    color: #6b7280;
    margin: 8px 0 0 0;
    line-height: 1.5;
    direction: rtl;
    text-align: right;
    font-weight: 500;
}

.as-monthly-date-range {
    font-size: 12px;
    color: #9ca3af;
    margin: 0;
    line-height: 1.4;
    direction: rtl;
    text-align: right;
    font-weight: 400;
}

/* Chart Section - Hero Treatment */
.as-monthly-chart-section {
    padding: 32px 28px 40px;
    border-bottom: none;
    background: linear-gradient(to bottom, #fafbfc 0%, #f8fafc 50%, #ffffff 100%);
    position: relative;
}

.as-monthly-chart-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    left: 0;
    height: 1px;
    background: linear-gradient(to right, transparent 0%, rgba(229, 231, 235, 0.5) 20%, rgba(229, 231, 235, 0.5) 80%, transparent 100%);
}

.as-monthly-chart-header {
    margin-bottom: 20px;
}

.as-monthly-chart-title {
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
    margin: 0;
    direction: rtl;
    text-align: right;
    letter-spacing: 0.2px;
    text-transform: uppercase;
}

.as-monthly-chart-wrapper {
    position: relative;
    height: 300px;
    width: 100%;
    padding: 8px 0;
}

.as-monthly-chart-wrapper canvas {
    max-height: 300px;
    width: 100% !important;
    height: 100% !important;
}

/* Metrics Section - Premium KPI Cards */
.as-monthly-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 32px 28px;
    background: #fff;
}

.as-monthly-metric {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px 20px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid rgba(229, 231, 235, 0.6);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.as-monthly-metric::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(to left, #0073aa 0%, rgba(0, 115, 170, 0.3) 100%);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.as-monthly-metric:hover {
    background: #fff;
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 115, 170, 0.2);
}

.as-monthly-metric:hover::before {
    opacity: 1;
}

.as-monthly-metric-value {
    font-size: 38px;
    font-weight: 800;
    color: #111827;
    line-height: 1.1;
    margin-bottom: 10px;
    direction: ltr;
    unicode-bidi: embed;
    text-align: center;
    letter-spacing: -0.5px;
}

.as-monthly-metric-label {
    font-size: 12px;
    color: #9ca3af;
    font-weight: 500;
    direction: rtl;
    text-align: center;
    line-height: 1.5;
    letter-spacing: 0.1px;
}

/* Responsive - Mobile */
@media (max-width: 767px) {
    .as-monthly-header {
        padding: 22px 20px 20px;
    }
    
    .as-monthly-title {
        font-size: 20px;
    }
    
    .as-monthly-subtitle {
        font-size: 13px;
    }
    
    .as-monthly-date-range {
        font-size: 11px;
    }
    
    .as-monthly-chart-section {
        padding: 24px 20px 28px;
    }
    
    .as-monthly-chart-wrapper {
        height: 240px;
    }
    
    .as-monthly-chart-wrapper canvas {
        max-height: 240px;
    }
    
    .as-monthly-metrics {
        grid-template-columns: 1fr;
        padding: 24px 20px;
        gap: 16px;
    }
    
    .as-monthly-metric {
        padding: 20px 16px;
    }
    
    .as-monthly-metric-value {
        font-size: 32px;
    }
    
    .as-monthly-metric-label {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .as-monthly-header {
        padding: 20px 18px 18px;
    }
    
    .as-monthly-title {
        font-size: 18px;
    }
    
    .as-monthly-chart-section {
        padding: 20px 18px 24px;
    }
    
    .as-monthly-chart-wrapper {
        height: 220px;
    }
    
    .as-monthly-chart-wrapper canvas {
        max-height: 220px;
    }
    
    .as-monthly-metrics {
        padding: 20px 18px;
        gap: 14px;
    }
    
    .as-monthly-metric {
        padding: 18px 14px;
    }
    
    .as-monthly-metric-value {
        font-size: 30px;
    }
    
    .as-monthly-metric-label {
        font-size: 11px;
    }
}


/* Monthly Card - Stat Cards Styling (Remove borders and shadows for cleaner look) */
.as-monthly-snapshot-card .as-stat-card-modern {
    padding: 18px;
    background: #fafbfc;
    border: none;
    box-shadow: none;
    border-radius: 12px;
    transition: all 0.2s ease;
    position: relative;
}

.as-monthly-snapshot-card .as-stat-card-modern::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(to bottom, #0073aa 0%, rgba(0, 115, 170, 0.3) 100%);
    border-radius: 12px 0 0 12px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.as-monthly-snapshot-card .as-stat-card-modern:hover {
    background: #f0f4f8;
    transform: translateY(-2px);
}

.as-monthly-snapshot-card .as-stat-card-modern:hover::before {
    opacity: 1;
}

/* Monthly Card - Chart Wrapper Styling (Remove borders and shadows) */
.as-monthly-snapshot-card .as-chart-wrapper-modern {
    background: #fafbfc;
    border: none;
    box-shadow: none;
    border-radius: 12px;
    padding: 20px;
}

/* Monthly Card - Add padding to layout container for spacing */
.as-monthly-snapshot-card .as-attempts-layout-container {
    padding: 10px 10px;
    gap: 20px;
}

/* Home Market Day Selector - Scoped to homepage only */
.home-market-day-selector {
    display: flex;
    flex-direction: row-reverse;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 20px;
    padding: 12px 0;
    justify-content: flex-start;
    align-items: center;
}

.home-day-btn {
    min-width: 40px;
    height: 36px;
    padding: 0 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    color: #6b7280;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    direction: rtl;
}

.home-day-btn:hover:not(.home-day-btn-disabled):not(.home-day-btn-active) {
    background: #f0f4f8;
    border-color: #0073aa;
    color: #0073aa;
    transform: translateY(-1px);
}

.home-day-btn-active {
    background: #0073aa;
    border-color: #0073aa;
    color: #fff;
    box-shadow: 0 2px 6px rgba(0, 115, 170, 0.25);
}

.home-day-btn-disabled {
    opacity: 0.35;
    cursor: not-allowed;
    background: #f9fafb;
    border-color: #e5e7eb;
}

.home-day-btn-disabled:hover {
    background: #f9fafb;
    border-color: #e5e7eb;
    color: #6b7280;
    transform: none;
}

.home-market-day-message {
    margin-top: 12px;
    padding: 10px 16px;
    background: #fef3c7;
    border: 1px solid #fde68a;
    border-radius: 8px;
    color: #92400e;
    font-size: 13px;
    text-align: center;
    direction: rtl;
}

/* Responsive */
@media (max-width: 767px) {
    .home-market-day-selector {
        overflow-x: auto;
        overflow-y: hidden;
        flex-wrap: nowrap;
        padding: 10px 0;
        margin-top: 16px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scrollbar-color: #cbd5e1 transparent;
    }
    
    .home-market-day-selector::-webkit-scrollbar {
        height: 4px;
    }
    
    .home-market-day-selector::-webkit-scrollbar-track {
        background: transparent;
    }
    
    .home-market-day-selector::-webkit-scrollbar-thumb {
        background: #cbd5e1;
        border-radius: 2px;
    }
    
    .home-day-btn {
        min-width: 36px;
        height: 32px;
        padding: 0 10px;
        font-size: 12px;
    }
    
    .home-day-btn[data-day="all"] {
        min-width: auto;
        padding: 0 14px;
    }
}

@media (max-width: 767px) {
    .as-monthly-snapshot-card .as-stat-card-modern {
        padding: 16px;
    }
    
    .as-monthly-snapshot-card .as-attempts-layout-container {
        padding: 10px 10px;
        gap: 16px;
    }
    
    .as-monthly-snapshot-card .as-chart-wrapper-modern {
        padding: 16px;
    }
}

/* Home Market Chart Contextual Legend - Inside Chart Container (Scoped to homepage only) */
.home-market-chart-notice {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    flex-direction: row-reverse;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: flex-end;
    direction: rtl;
    text-align: right;
}

.home-notice-label {
    font-size: 10px;
    color: #9ca3af;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 0;
    margin-right: 0;
    order: 3;
}

.home-notice-item {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    gap: 6px;
    direction: rtl;
}

.home-notice-dot {
    display: inline-block;
    font-size: 10px;
    line-height: 1;
    flex-shrink: 0;
    margin-left: 0;
    margin-right: 0;
}

.home-notice-blue {
    color: #0073aa;
}

.home-notice-green {
    color: #28a745;
}

.home-notice-text {
    font-size: 10px;
    color: #6b7280;
    font-weight: 400;
    line-height: 1.3;
    direction: rtl;
    text-align: right;
}

/* Responsive */
@media (max-width: 767px) {
    .home-market-chart-notice {
        margin-top: 10px;
        padding-top: 10px;
        gap: 10px;
        flex-direction: column;
        align-items: flex-end;
        justify-content: flex-end;
    }
    
    .home-notice-item {
        width: 100%;
        justify-content: flex-end;
        flex-direction: row-reverse;
    }
    
    .home-notice-label {
        font-size: 9px;
        order: -1;
        width: 100%;
        text-align: right;
        margin-bottom: 4px;
    }
    
    .home-notice-text {
        font-size: 9px;
    }
    
    .home-notice-dot {
        font-size: 9px;
    }
}

/* Footer Statistics */
.as-footer-statistics {
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    direction: rtl;
    text-align: right;
}

.as-footer-statistics-container {
    max-width: 100%;
    margin: 0;
    padding: 0;
    width: 100%;
}

.as-footer-statistics-title {
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    display: block;
}

.as-footer-statistics-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    direction: rtl;
}

.as-footer-stat-item {
    display: flex;
    align-items: center;
    padding: 0;
    background: transparent;
    border: none;
    transition: opacity 0.2s ease;
    flex: 1;
    width: 100%;
    position: relative;
}

.as-footer-stat-item:not(:last-child)::after {
    content: '';
    position: absolute;
    bottom: -3px;
    right: 0;
    left: 0;
    height: 1px;
    background: linear-gradient(to left, transparent, rgba(255, 255, 255, 0.1), transparent);
}

.as-footer-stat-item:hover {
    opacity: 0.85;
}

.as-footer-stat-content {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 4px 0;
}

.as-footer-stat-icon {
    font-size: 16px;
    line-height: 1;
    flex-shrink: 0;
    opacity: 0.8;
}

.as-footer-stat-text {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex: 1;
}

.as-footer-stat-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 400;
    line-height: 1.3;
}

.as-footer-stat-value {
    font-size: 13px;
    color: #ffffff;
    font-weight: 700;
    direction: ltr;
    unicode-bidi: embed;
    font-family: 'Courier New', monospace;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .as-footer-statistics-title {
        font-size: 13px;
        margin-bottom: 10px;
        padding-bottom: 5px;
    }
    
    .as-footer-statistics-list {
        gap: 5px;
    }
    
    .as-footer-stat-content {
        gap: 6px;
        padding: 3px 0;
    }
    
    .as-footer-stat-icon {
        font-size: 14px;
    }
    
    .as-footer-stat-label {
        font-size: 11px;
    }
    
    .as-footer-stat-value {
        font-size: 12px;
    }
    
    .as-footer-stat-item:not(:last-child)::after {
        bottom: -2px;
    }
    
    .as-footer-stat-text {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }
}
