/* =========================================================
   DEALER EVALUATION PAGE — Farakolon visual standard
   هماهنگ با RoadsideAssistance.css (جدول Liquid Glass + تم طلایی)
   ========================================================= */
.de-page {
    --de-title: var(--fk-text-main);
    --de-strong: rgba(var(--fk-white-rgb), 0.96);
    --de-body: rgba(var(--fk-white-rgb), 0.84);
    --de-border: rgba(var(--fk-white-rgb), 0.10);
    --de-card: rgba(var(--fk-white-rgb), 0.035);
    --de-sticky-bg: #16100b;
    width: 100%;
    background: var(--fk-bg);
    color: var(--de-body);
    direction: rtl;
    padding-top: 110px;
    padding-bottom: 70px;
}

/* ---------- Header ---------- */
.de-header {
    padding: 32px 0 20px;
    text-align: right;
}

.de-title {
    font-weight: 800 !important;
    font-size: 2.1rem !important;
    line-height: 1.5 !important;
    color: var(--de-title) !important;
    margin-bottom: 14px !important;
}

.de-header-line {
    display: flex;
    align-items: center;
    flex-direction: row-reverse;
    margin-bottom: 20px;
}

.de-header-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--fk-gold);
    flex-shrink: 0;
}

.de-header-bar {
    height: 2px;
    width: 450px;
    max-width: 100%;
    background: linear-gradient(to left, var(--fk-gold), transparent);
    opacity: 0.55;
}

.de-intro {
    color: var(--de-body) !important;
    font-size: 1.05rem !important;
    line-height: 2 !important;
    text-align: justify;
    margin: 0 !important;
}

.de-section {
    padding: 12px 0 24px;
}

/* ---------- Filters ---------- */
.de-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    padding: 16px 18px;
    margin-bottom: 16px;
    border-radius: 14px;
    background: var(--de-card);
    border: 1px solid var(--de-border);
    box-shadow: 0 8px 28px rgba(var(--fk-shadow-rgb), 0.22);
}

.de-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 200px;
}

.de-field-grow {
    flex: 1 1 260px;
}

.de-field-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--de-strong);
}

.de-select,
.de-search {
    height: 44px;
    border-radius: 10px;
    background: rgba(var(--fk-white-rgb), 0.06);
    border: 1px solid rgba(var(--fk-white-rgb), 0.18);
    color: var(--fk-text-main);
    font: inherit;
    font-size: 0.9rem;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.de-select {
    padding: 0 12px;
    cursor: pointer;
    outline: 0;
}

    .de-select option {
        background: #16100b;
        color: #fff;
    }

    .de-select:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }

.de-search {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 12px;
    cursor: text;
}

    .de-select:hover,
    .de-search:hover {
        border-color: rgba(var(--fk-white-rgb), 0.32);
    }

    .de-select:focus,
    .de-search:focus-within {
        border-color: var(--fk-gold);
        box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.18);
    }

.de-search-icon {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    color: var(--fk-gold);
    pointer-events: none;
}

.de-search-input {
    flex: 1;
    min-width: 0;
    height: 100%;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    font: inherit;
    font-size: 0.9rem;
    color: var(--fk-text-main) !important;
    -webkit-text-fill-color: var(--fk-text-main) !important;
    caret-color: var(--fk-gold) !important;
}

    .de-search-input::placeholder {
        color: rgba(var(--fk-white-rgb), 0.45) !important;
        -webkit-text-fill-color: rgba(var(--fk-white-rgb), 0.45) !important;
        opacity: 1 !important;
    }

/* =========================================================
   Liquid Glass Table (۲۳ ستون: اسکرول افقی + ستون‌های ثابت)
   ========================================================= */
.de-glass-table-wrap {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: rgba(var(--fk-white-rgb), 0.04);
    border: 1px solid rgba(var(--fk-white-rgb), 0.12);
    box-shadow: 0 8px 32px rgba(var(--fk-shadow-rgb), 0.28), inset 0 1px 0 rgba(var(--fk-white-rgb), 0.08);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.de-glass-table {
    width: 100%;
    background: transparent !important;
    color: var(--de-body) !important;
}

    .de-glass-table .mud-table-container {
        background: transparent !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    .de-glass-table .mud-table-root,
    .de-glass-table table {
        background: transparent !important;
        min-width: 2300px;
        width: 100%;
    }

    .de-glass-table .mud-table-head {
        background: linear-gradient(to left, rgba(var(--fk-gold-rgb, 212, 175, 55), 0.18), rgba(var(--fk-white-rgb), 0.06)) !important;
    }

    /* جلوگیری از تبدیل ردیف به کارت در MudBlazor */
    .de-glass-table .mud-table-cell:before {
        display: none !important;
        content: none !important;
    }

/* ---------- Header cells ---------- */
.de-th {
    font-weight: 700 !important;
    font-size: 0.88rem !important;
    color: var(--de-strong) !important;
    padding: 16px 10px !important;
    border-bottom: 1px solid rgba(var(--fk-white-rgb), 0.12) !important;
    text-align: center !important;
    vertical-align: middle !important;
    white-space: normal;
    line-height: 1.6;
    min-width: 96px;
}

.de-th-row {
    width: 64px;
    min-width: 64px;
}

.de-th-name {
    min-width: 190px;
}

.de-th-sum {
    color: var(--fk-gold) !important;
}

.de-th-total {
    color: var(--fk-gold) !important;
}

/* ---------- Body cells ---------- */
.de-td {
    padding: 13px 10px !important;
    font-size: 0.9rem !important;
    line-height: 1.75 !important;
    border-bottom: 1px solid rgba(var(--fk-white-rgb), 0.07) !important;
    color: var(--de-body) !important;
    vertical-align: middle !important;
    text-align: right !important;
}

.de-td-center,
.de-td-num,
.de-td-row {
    text-align: center !important;
}

.de-td-num {
    font-variant-numeric: tabular-nums;
}

.de-td-row {
    font-weight: 700;
    color: var(--fk-gold) !important;
}

.de-td-strong {
    font-weight: 700;
    color: var(--de-strong) !important;
}

.de-td-sum {
    font-weight: 700;
    color: var(--de-strong) !important;
    background: rgba(var(--fk-white-rgb), 0.04) !important;
}

.de-td-total {
    background: rgba(var(--fk-gold-rgb, 212, 175, 55), 0.07) !important;
}

.de-td-rank {
    font-weight: 800;
    color: var(--fk-gold) !important;
}

.de-total-badge {
    display: inline-block;
    min-width: 56px;
    padding: 4px 14px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 0.98rem;
    color: #1a1a1a;
    background: linear-gradient(135deg, #f0d78c, #d4af37);
    box-shadow: 0 3px 10px rgba(212, 175, 55, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.de-glass-table tbody tr:hover {
    background: rgba(var(--fk-white-rgb), 0.03) !important;
}

.de-glass-table tbody tr:last-child td {
    border-bottom: none !important;
}

/* ---------- ستون‌های ثابت: ردیف و نام شرکت ---------- */
.de-glass-table th:nth-child(1),
.de-glass-table td:nth-child(1),
.de-glass-table th:nth-child(2),
.de-glass-table td:nth-child(2) {
    position: sticky;
    z-index: 2;
    background: var(--de-sticky-bg) !important;
}

.de-glass-table th:nth-child(1),
.de-glass-table td:nth-child(1) {
    right: 0;
}

.de-glass-table th:nth-child(2),
.de-glass-table td:nth-child(2) {
    right: 64px;
    box-shadow: -6px 0 10px -6px rgba(0, 0, 0, 0.5);
}

/* ---------- Empty ---------- */
.de-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 40px 24px;
    text-align: center;
    color: var(--de-body) !important;
}

.de-empty-icon {
    font-size: 2.2rem !important;
    color: var(--fk-gold) !important;
    opacity: 0.8;
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
    .de-page {
        padding-top: 90px;
        padding-bottom: 40px;
    }

    .de-header {
        text-align: center;
        padding: 24px 16px 16px;
    }

    .de-title {
        font-size: 1.7rem !important;
    }

    .de-header-line {
        justify-content: center;
    }

    .de-header-bar {
        width: 140px;
    }

    .de-intro {
        text-align: right;
        font-size: 1rem !important;
    }

    .de-field {
        min-width: 0;
        flex: 1 1 100%;
    }

    .de-glass-table-wrap {
        border-radius: 12px;
    }

    /* در موبایل ستون نام شرکت ثابت نباشد تا جا برای اسکرول بماند */
    .de-glass-table th:nth-child(2),
    .de-glass-table td:nth-child(2) {
        position: static;
        box-shadow: none;
    }
}
