/* ===== داشبورد چندموضوعی محفل — منتقل‌شده از BehniafarAcrylicBlazor ===== */

/* کارت نمودار */
.dash-card {
    --dash-accent: #6366f1;
    --dash-accent-2: #38bdf8;
    position: relative;
    height: 100%;
    background: #fff;
    border: 1px solid #edf0f7;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 12px 30px -16px rgba(15, 23, 42, .16);
    transition: transform .3s ease, box-shadow .3s ease;
}

    .dash-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 22px 42px -16px rgba(15, 23, 42, .22);
    }

    .dash-card::before {
        content: '';
        position: absolute;
        inset-inline: 0;
        top: 0;
        height: 3px;
        background: linear-gradient(90deg, var(--dash-accent), var(--dash-accent-2));
        opacity: .9;
    }

.dash-card-head {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: 1rem 1.2rem .15rem;
}

.dash-card-ico {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 15px;
    background: linear-gradient(135deg, var(--dash-accent), var(--dash-accent-2));
    box-shadow: 0 9px 18px -7px var(--dash-accent);
}

.dash-card-title {
    margin: 0;
    font-size: .92rem;
    font-weight: 700;
    color: #23304a;
    line-height: 1.4;
}

.dash-card-sub {
    margin: 1px 0 0;
    font-size: .72rem;
    color: #8a94a8;
}

.dash-card-actions {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: .4rem;
}

.dash-card-body {
    padding: .35rem .7rem .9rem;
}

/* اکسنت‌های رنگی کارت‌ها */
.dash-acc-indigo  { --dash-accent: #6366f1; --dash-accent-2: #38bdf8; }
.dash-acc-rose    { --dash-accent: #f43f5e; --dash-accent-2: #fb923c; }
.dash-acc-emerald { --dash-accent: #10b981; --dash-accent-2: #2dd4bf; }
.dash-acc-amber   { --dash-accent: #f59e0b; --dash-accent-2: #f97316; }
.dash-acc-violet  { --dash-accent: #8b5cf6; --dash-accent-2: #d946ef; }
.dash-acc-blue    { --dash-accent: #3b82f6; --dash-accent-2: #06b6d4; }
.dash-acc-slate   { --dash-accent: #64748b; --dash-accent-2: #0ea5e9; }

/* فونت فارسی برای متن‌های SVG چارت + تول‌تیپ */
.dash-chart text {
    font-family: var(--default-font-family) !important;
}

.dash-chart .k-tooltip {
    border: 0 !important;
    border-radius: 10px !important;
    box-shadow: 0 14px 32px -10px rgba(15, 23, 42, .45) !important;
}

/* فاصلهٔ عمودی بین کارت‌های چارت */
.dash-stack > * + * {
    margin-top: 1.5rem;
}

.dash-card .row {
    row-gap: 1.25rem;
}

/* گوشهٔ گرد + عمق/سایهٔ میله‌ها */
.dash-bars svg path[fill]:not([fill="none"]):not([fill="transparent"]) {
    clip-path: inset(0.5px round 6px);
    filter: drop-shadow(0 7px 9px rgba(15, 23, 42, .26));
    stroke: rgba(15, 23, 42, .14);
    stroke-width: 1px;
}

/* عمق تکه‌های چارت دایره‌ای */
.dash-pie svg path[fill]:not([fill="none"]):not([fill="transparent"]) {
    filter: drop-shadow(0 10px 14px rgba(15, 23, 42, .32));
}

/* کارت‌های KPI کوچک */
.dash-kpi {
    display: flex;
    align-items: center;
    gap: .8rem;
    height: 100%;
    padding: .85rem 1.05rem;
    background: #fff;
    border: 1px solid #edf0f7;
    border-radius: 16px;
    box-shadow: 0 10px 26px -16px rgba(15, 23, 42, .16);
    transition: transform .25s ease, box-shadow .25s ease;
}

    .dash-kpi:hover {
        transform: translateY(-2px);
        box-shadow: 0 16px 32px -14px rgba(15, 23, 42, .22);
    }

.dash-kpi-ico {
    --k1: #6366f1;
    --k2: #38bdf8;
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    border-radius: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 16px;
    background: linear-gradient(135deg, var(--k1), var(--k2));
    box-shadow: 0 9px 18px -7px var(--k1);
}

.dash-kpi-val {
    font-size: 1.2rem;
    font-weight: 800;
    color: #1f2a44;
    line-height: 1.15;
}

.dash-kpi-lbl {
    font-size: .73rem;
    color: #8a94a8;
    margin-top: 1px;
}

.kpi-blue   { --k1: #6366f1; --k2: #38bdf8; }
.kpi-green  { --k1: #10b981; --k2: #2dd4bf; }
.kpi-rose   { --k1: #f43f5e; --k2: #fb923c; }
.kpi-violet { --k1: #8b5cf6; --k2: #d946ef; }

/* اسکلت لودینگ */
.dash-skel-ico {
    width: 38px;
    height: 38px;
    border-radius: 12px;
}

.dash-skel-line {
    height: 11px;
    border-radius: 6px;
    margin: 4px 0;
}

.dash-skel-chart {
    height: 280px;
    border-radius: 14px;
}

.dash-shimmer {
    background: linear-gradient(90deg, #edf0f7 25%, #f8fafc 45%, #edf0f7 65%);
    background-size: 200% 100%;
    animation: dash-shimmer 1.4s linear infinite;
}

@keyframes dash-shimmer {
    to { background-position: -200% 0; }
}

/* ===== تب‌های موضوعات ===== */
.dash-topic-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
}

.dash-topic-tab {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .55rem 1.1rem;
    border-radius: 0.75rem;
    background: rgb(var(--light-rgb, 240, 241, 246));
    border: 1px solid var(--default-border, #e9edf4);
    color: var(--default-text-color, #1b2a3e);
    font-size: .82rem;
    font-weight: 600;
    text-decoration: none;
    transition: all .25s ease;
}

    .dash-topic-tab i {
        font-size: .9rem;
        opacity: .75;
    }

    .dash-topic-tab:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(0, 0, 0, .1);
        color: var(--default-text-color, #1b2a3e);
    }

    .dash-topic-tab.active {
        background: linear-gradient(135deg, #0162e8 0%, #4a3fa0 100%);
        border-color: transparent;
        color: #fff;
        box-shadow: 0 6px 18px rgba(1, 98, 232, .35);
    }

        .dash-topic-tab.active i {
            opacity: 1;
        }

/* دکمهٔ «نمودارهای پنهان» — انتهای ردیف، جدا از گروه تب‌ها */
.dash-hidden-tab {
    border-style: dashed;
    cursor: pointer;
    font-family: inherit;
    margin-inline-start: auto;
}

.dash-hidden-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: #0162e8;
    color: #fff;
    font-size: .7rem;
    font-weight: 700;
    line-height: 1;
}

/* مودال نمودارهای پنهان */
/* overlay چارت Telerik (k-chart-overlay) z-index:10001 دارد — مودال باید بالاتر باشد */
.hc-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    z-index: 10010;
}

.hc-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(720px, 96vw);
    max-height: min(640px, 92vh);
    max-height: min(640px, 92dvh);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .3);
    z-index: 10020;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.hc-modal-header {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 14px;
    background: linear-gradient(135deg, #0162e8 0%, #4a3fa0 100%);
    color: #fff;
    font-size: .95rem;
    flex-shrink: 0;
}

.hc-modal-close {
    border: none;
    background: transparent;
    color: #fff;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
}

    .hc-modal-close:hover {
        background: rgba(255, 255, 255, .18);
    }

.hc-modal-body {
    flex: 1;
    overflow: auto;
    padding: 14px;
}

.hc-empty {
    text-align: center;
    color: #8a94a8;
    padding: 2rem 1rem;
}

    .hc-empty i {
        font-size: 2rem;
        opacity: .4;
        display: block;
        margin-bottom: .5rem;
    }

.hc-group + .hc-group {
    margin-top: 1rem;
}

.hc-group-title {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .85rem;
    font-weight: 700;
    color: #3b4763;
    margin-bottom: .5rem;
}

.hc-modal .dropdown-menu {
    font-size: .82rem;
    min-width: 180px;
}

/* ===== اسلات‌های نمودار — جابجایی/پنهان/انتقال (per-user) ===== */
.dash-slot {
    position: relative;
    transition: opacity .2s ease;
}

    .dash-slot .dash-slot-menu {
        position: absolute;
        top: .55rem;
        inset-inline-start: .65rem;
        z-index: 10010;
    }

    .dash-slot > .dash-grip {
        position: absolute;
        top: .55rem;
        inset-inline-end: .65rem;
        z-index: 10010;
    }

    /* فضای هدر کارت برای کنترل‌های گوشه‌ای */
    .dash-slot .dash-card-head {
        padding-inline: 2.6rem;
    }

.dash-slot-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #9aa5bd;
    font-size: .8rem;
    line-height: 1;
    padding: 0;
    transition: background .15s ease, color .15s ease;
}

    .dash-slot-btn:hover,
    .dash-slot-btn:focus {
        background: #eef1f8;
        color: #23304a;
    }

.dash-slot-menu-btn {
    background: #fff;
    border: 1px solid #e6eaf3;
    color: #6b7794;
}

    .dash-slot-menu-btn:hover,
    .dash-slot-menu-btn:focus {
        background: #f5f7fc;
        border-color: #d5dbea;
        color: #23304a;
    }

.dash-slot .dropdown-item.dash-item-danger {
    color: #e11d48;
}

    .dash-slot .dropdown-item.dash-item-danger i {
        color: #e11d48;
    }

    .dash-slot .dropdown-item.dash-item-danger:hover,
    .dash-slot .dropdown-item.dash-item-danger:focus {
        background: #fdecec;
        color: #e11d48;
    }

/* دستگیرهٔ درگ */
.dash-grip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    color: #b6c0d6;
    font-size: .85rem;
    cursor: grab;
    touch-action: none;
    transition: background .15s ease, color .15s ease;
}

    .dash-grip:hover {
        background: #eef1f8;
        color: #23304a;
    }

    .dash-grip:active {
        cursor: grabbing;
    }

.dash-slot.dragging {
    opacity: .45;
}

.dash-slot.drag-over > .dash-card,
.dash-slot.drag-over .dash-card {
    outline: 2px dashed #6366f1;
    outline-offset: 3px;
}

/* overlay چارت Telerik (k-chart-overlay) z-index:10001 دارد — منوی ⋮ باید بالاتر باشد */
.dash-slot .dropdown-menu {
    font-size: .82rem;
    min-width: 190px;
    z-index: 10010;
}

.dash-slot .dropdown-item {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .45rem .9rem;
}

.dash-slot .dropdown-item i {
    width: 16px;
    text-align: center;
    color: #8a94a8;
}

.dash-move-check {
    pointer-events: none;
    margin: 0;
    width: .95em;
    height: .95em;
    flex-shrink: 0;
    accent-color: #16a34a;
    cursor: inherit;
}

.dash-move-badge {
    min-width: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: #eef1f8;
    color: #6b7794;
    font-size: .7rem;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    white-space: nowrap;
}

    .dash-move-badge.current {
        background: #e7f6ec;
        color: #16a34a;
    }

.dash-slot .dropdown-item.dash-item-current {
    color: #16a34a;
    font-weight: 600;
}

    .dash-slot .dropdown-item.dash-item-current > i {
        color: #16a34a;
    }

/* ناحیهٔ دراپ انتهای لیست */
.dash-drop-end {
    display: none;
    border: 2px dashed #c6cde0;
    border-radius: 14px;
    color: #8a94a8;
    font-size: .8rem;
    text-align: center;
    padding: 1rem;
}

.dash-stack.dragging-active .dash-drop-end {
    display: block;
}

.dash-drop-end.drag-over {
    border-color: #6366f1;
    color: #6366f1;
    background: #f4f5ff;
}

/* چیپ‌های نمودار پنهان */
.dash-tray-list {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: .6rem;
}

.dash-tray-item {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: #f5f7fc;
    border: 1px solid #e6eaf3;
    border-radius: 999px;
    padding: .3rem .8rem;
    font-size: .78rem;
    color: #45506b;
}

    .dash-tray-item .dash-slot-btn {
        width: 22px;
        height: 22px;
        font-size: .72rem;
    }

/* انتخابگر تاریخ در هیرو — کنار دکمه‌های CTA */
.dash-hero-date {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: rgba(255, 255, 255, .92);
    border: 1px solid #e6eaf3;
    border-radius: 10px;
    padding: .4rem .7rem;
    color: #45506b;
    font-size: .8rem;
    margin-inline-end: .5rem;
}

    .dash-hero-date i {
        color: #8a94a8;
    }

.dash-date-input {
    border: 0;
    background: transparent;
    font-size: .8rem;
    color: inherit;
    font-family: inherit;
}

    .dash-date-input:focus {
        outline: none;
    }

.dash-date-fa {
    color: #8a94a8;
    font-size: .75rem;
    white-space: nowrap;
}

@media (max-width: 767.98px) {
    .dash-hero-date {
        margin-top: .5rem;
    }
}

/* ===== کارت‌های آماری KPI (stat-card — منتقل از Acrylic) ===== */
.stat-card {
    position: relative;
    border: 0;
    border-radius: 18px;
    overflow: hidden;
    color: #fff;
    isolation: isolate;
    box-shadow: 0 14px 30px -14px var(--stat-shadow, rgba(15, 23, 42, .4));
    transition: transform .35s cubic-bezier(.2, .7, .3, 1.4), box-shadow .35s ease;
    background-size: 180% 180%;
    animation: stat-gradient-pan 14s ease-in-out infinite alternate;
}

    .stat-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 24px 44px -14px var(--stat-shadow, rgba(15, 23, 42, .5));
    }

.stat-grad-primary {
    background: linear-gradient(135deg, #38bdf8 0%, #6366f1 55%, #8b5cf6 100%);
    --stat-shadow: rgba(79, 70, 229, .45);
}

.stat-grad-danger {
    background: linear-gradient(135deg, #fb7185 0%, #f43f5e 60%, #e11d48 100%);
    --stat-shadow: rgba(225, 29, 72, .45);
}

.stat-grad-success {
    background: linear-gradient(135deg, #2dd4bf 0%, #10b981 55%, #059669 100%);
    --stat-shadow: rgba(5, 150, 105, .45);
}

.stat-grad-warning {
    background: linear-gradient(135deg, #fbbf24 0%, #f97316 60%, #ea580c 100%);
    --stat-shadow: rgba(234, 88, 12, .45);
}

.stat-grad-violet {
    background: linear-gradient(135deg, #a78bfa 0%, #7c3aed 55%, #4a3fa0 100%);
    --stat-shadow: rgba(112, 94, 200, .45);
}

@keyframes stat-gradient-pan {
    from { background-position: 0% 40%; }
    to   { background-position: 100% 60%; }
}

.stat-blob {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

.stat-blob-1 {
    width: 190px;
    height: 190px;
    top: -90px;
    right: -50px;
    background: radial-gradient(circle, rgba(255, 255, 255, .30), rgba(255, 255, 255, 0) 70%);
}

.stat-blob-2 {
    width: 230px;
    height: 230px;
    bottom: -140px;
    left: -70px;
    background: radial-gradient(circle, rgba(255, 255, 255, .16), rgba(255, 255, 255, 0) 70%);
}

.stat-shine {
    position: absolute;
    top: -40%;
    bottom: -40%;
    right: -45%;
    width: 45%;
    z-index: 0;
    pointer-events: none;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .3), transparent);
    transform: skewX(-18deg);
    transition: right .9s ease;
}

.stat-card:hover .stat-shine {
    right: 135%;
}

.stat-card-body {
    position: relative;
    z-index: 1;
}

.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .18);
    backdrop-filter: blur(4px);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .3), 0 6px 14px -6px rgba(0, 0, 0, .25);
    font-size: 17px;
    color: #fff;
}

.stat-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .18);
    backdrop-filter: blur(4px);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .28);
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
}

.stat-chart {
    position: relative;
    z-index: 1;
    margin-bottom: -4px;
}

.stat-card .stat-chart {
    --kendo-chart-bg: transparent;
}

.stat-card .k-chart svg {
    filter: drop-shadow(0 8px 12px rgba(0, 0, 0, .18));
}

.stat-card--tt {
    overflow: visible;
}

    .stat-card--tt:hover {
        z-index: 5;
    }

.stat-card-decor {
    position: absolute;
    inset: 0;
    overflow: hidden;
    border-radius: inherit;
    pointer-events: none;
    z-index: 0;
}

.stat-card .k-chart-tooltip-wrapper .k-callout,
.stat-card .k-chart-tooltip {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    padding: 0 !important;
}
