/* ===== Dahs shell (پوستهٔ /panel) — استخراج‌شده از Dahs.razor برای استفادهٔ سراسری ===== */
/* ===== ریشه و فونت ===== */
.dahs-root {
    --d-blue: #2563eb;
    --d-blue-dark: #1e3a8a;
    --d-teal: #0f9d8a;
    --d-ink: #1f2937;
    --d-muted: #6b7280;
    --d-line: #eef2f7;
    --d-bg: #f4f7fb;
    min-height: 100vh;
    background: var(--d-bg);
    font-family: "IRANSansX", "IRANSans", "Vazir", "Yekan", sans-serif;
    color: var(--d-ink);
}

/* ===== تاپ‌بار ===== */
.dahs-topbar {
    background: #fff;
    border-bottom: 1px solid var(--d-line);
    box-shadow: 0 1px 0 rgba(15,23,42,.02);
    position: sticky;
    top: 0;
    z-index: 30;
}
.dahs-topbar-inner {
    display: flex;
    align-items: center;
    gap: 22px;
    padding: 12px 26px;
}
.dahs-brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.dahs-brand-logo { width: 46px; height: 46px; display: flex; align-items: center; justify-content: center; }
.dahs-brand-text h1 { margin: 0; font-size: 1.12rem; font-weight: 800; color: #0f172a; line-height: 1.5; }
.dahs-brand-text p { margin: 0; font-size: .8rem; color: var(--d-muted); }

.dahs-search {
    flex: 1;
    max-width: 420px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f3f5f9;
    border: 1px solid #eef1f6;
    border-radius: 12px;
    padding: 9px 14px;
    color: #9aa3b2;
}
.dahs-search input {
    border: 0; background: transparent; outline: none; width: 100%;
    font-family: inherit; font-size: .9rem; color: var(--d-ink);
    text-align: right;
}
.dahs-search input::placeholder { color: #9aa3b2; }

.dahs-topbar-actions { display: flex; align-items: center; gap: 14px; margin-inline-start: auto; flex-shrink: 0; }
.dahs-icon-btn {
    position: relative; border: 0; background: transparent; cursor: pointer;
    color: #64748b; width: 38px; height: 38px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center; transition: background .15s;
}
.dahs-icon-btn:hover { background: #f1f5f9; }
.dahs-badge {
    position: absolute; top: 2px; inset-inline-start: 4px;
    min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px;
    font-size: .68rem; font-weight: 700; color: #fff;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid #fff;
}
.dahs-badge--blue { background: #2563eb; }

.dahs-user { display: flex; align-items: center; gap: 10px; padding-inline: 6px; cursor: pointer; }
.dahs-user-caret { color: #9aa3b2; }
.dahs-user-meta { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.35; }
.dahs-user-name { font-size: .9rem; font-weight: 700; color: #0f172a; }
.dahs-user-role { font-size: .72rem; color: var(--d-muted); }
.dahs-user-avatar {
    width: 40px; height: 40px; border-radius: 50%;
    background: #eef2f7; color: #94a3b8;
    display: flex; align-items: center; justify-content: center;
}

.dahs-bank { display: flex; align-items: center; gap: 10px; padding-inline-start: 14px; border-inline-start: 1px solid var(--d-line); }
.dahs-bank-text { font-size: .82rem; font-weight: 700; color: #1d4ed8; }

/* ===== بدنه + سایدبار ===== */
.dahs-body { display: flex; align-items: flex-start; }
.dahs-sidebar {
    width: 84px; flex-shrink: 0;
    background: #fff; border-inline-end: 1px solid var(--d-line);
    min-height: calc(100vh - 71px);
    padding: 22px 0; display: flex; flex-direction: column; align-items: center; gap: 10px;
    position: sticky; top: 71px;
    z-index: 40; /* کل سایدبار روی محتوای صفحه تا فلای‌اوت پشت کارت‌ها نرود */
}
.dahs-nav-cell { position: relative; }
.dahs-nav-cell:hover { z-index: 100; }
.dahs-nav-item {
    width: 50px; height: 50px; border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    color: #94a3b8; cursor: pointer; transition: all .15s;
    text-decoration: none;
}
.dahs-nav-item:hover { background: #f1f5f9; color: #475569; }
.dahs-nav-item--active { background: #2563eb; color: #fff; box-shadow: 0 10px 22px rgba(37,99,235,.32); }
.dahs-nav-item--active:hover { background: #2563eb; color: #fff; }

/* ===== فلای‌اوت زیرمنو (hover خودکار) ===== */
/* باکس همیشه سمت چپِ فیزیکیِ آیکون باز می‌شود (سایدبار سمت راست است) */
.dahs-flyout {
    position: absolute; right: calc(100% + 14px); left: auto; top: 50%;
    transform: translateY(-50%) translateX(-8px);
    min-width: 220px; max-width: 280px;
    background: #fff; border: 1px solid var(--d-line); border-radius: 14px;
    box-shadow: 0 20px 45px rgba(15,23,42,.16);
    padding: 12px; z-index: 110;
    opacity: 0; visibility: hidden; pointer-events: none;
    transition: opacity .14s ease, transform .14s ease, visibility .14s;
}
/* پل نامرئی بین آیکون و باکس (سمت راستِ باکس) تا با حرکت ماوس بسته نشود */
.dahs-flyout::before {
    content: ""; position: absolute; left: 100%; top: 0; bottom: 0; width: 14px;
}
/* فلش رو به آیکون (سمت راستِ باکس) */
.dahs-flyout::after {
    content: ""; position: absolute; left: 100%; top: 50%; transform: translateY(-50%);
    border: 7px solid transparent; border-left-color: #fff;
    filter: drop-shadow(-1px 0 0 var(--d-line));
}
.dahs-nav-cell:hover .dahs-flyout {
    opacity: 1; visibility: visible; pointer-events: auto;
    transform: translateY(-50%) translateX(0);
}
.dahs-flyout-title {
    font-size: .92rem; font-weight: 800; color: #0f172a;
    padding: 4px 8px 10px; border-bottom: 1px solid #f1f5f9; margin-bottom: 6px;
    text-align: right;
}
.dahs-flyout-list { display: flex; flex-direction: column; max-height: 340px; overflow-y: auto; }
.dahs-flyout-link {
    display: block; text-align: right; text-decoration: none;
    font-size: .84rem; color: #475569; font-weight: 600;
    padding: 9px 10px; border-radius: 9px; transition: all .12s;
}
.dahs-flyout-link:hover { background: #eff6ff; color: #1d4ed8; }
.dahs-flyout-link--muted { color: #94a3b8; font-weight: 500; cursor: default; }
.dahs-flyout-link--muted:hover { background: transparent; color: #94a3b8; }
/* سرتیترِ زیرگروه داخل فلای‌اوت */
.dahs-flyout-subhead {
    display: block; text-align: right;
    font-size: .72rem; font-weight: 800; color: #94a3b8;
    letter-spacing: .2px; text-transform: none;
    padding: 10px 10px 4px; margin-top: 2px;
    border-top: 1px solid #f1f5f9;
}
.dahs-flyout-subhead:first-child { border-top: 0; margin-top: 0; padding-top: 2px; }

/* ===== محتوای اصلی ===== */
.dahs-main { flex: 1; padding: 26px 30px; min-width: 0; }

.dahs-page-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 22px; }
.dahs-page-head h2 { margin: 0; font-size: 1.5rem; font-weight: 800; color: #0f172a; }
.dahs-page-head p { margin: 6px 0 0; font-size: .88rem; color: var(--d-muted); }
.dahs-date-pill {
    display: flex; align-items: center; gap: 8px;
    background: #fff; border: 1px solid var(--d-line); border-radius: 12px;
    padding: 9px 14px; font-family: inherit; font-size: .85rem; color: #475569; cursor: pointer;
}

/* ===== KPI ===== */
.dahs-kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 20px; margin-bottom: 22px; }
.dahs-kpi-card {
    background: #fff; border: 1px solid var(--d-line); border-radius: 18px;
    padding: 22px 22px 18px; box-shadow: 0 6px 18px rgba(15,23,42,.03);
}
.dahs-kpi-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.dahs-kpi-title { font-size: .9rem; font-weight: 600; color: #64748b; }
.dahs-kpi-icon { width: 50px; height: 50px; border-radius: 16px; display: flex; align-items: center; justify-content: center; }
.dahs-kpi-value { font-size: 2rem; font-weight: 900; line-height: 1.1; }
.dahs-kpi-unit { font-size: .82rem; color: var(--d-muted); margin-top: 2px; }
.dahs-kpi-foot { display: flex; align-items: center; gap: 5px; margin-top: 16px; font-size: .8rem; }
.dahs-kpi-foot span { font-weight: 700; }
.dahs-kpi-foot-label { color: var(--d-muted) !important; font-weight: 500 !important; }

/* ===== ردیف میانی ===== */
.dahs-mid-grid { display: grid; grid-template-columns: 1fr 1.5fr 1.2fr; gap: 20px; margin-bottom: 22px; }
.dahs-panel { background: #fff; border: 1px solid var(--d-line); border-radius: 18px; padding: 20px 22px; box-shadow: 0 6px 18px rgba(15,23,42,.03); }
.dahs-panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.dahs-panel-title { font-size: 1.02rem; font-weight: 800; color: #0f172a; }
.dahs-panel-link { font-size: .8rem; color: #2563eb; font-weight: 600; text-decoration: none; cursor: pointer; }

/* خدمات پرکاربرد */
.dahs-quick-list { display: flex; flex-direction: column; gap: 10px; }
.dahs-quick-item {
    display: flex; align-items: center; gap: 12px;
    background: #f8fafc; border: 1px solid #f1f5f9; border-radius: 12px;
    padding: 12px 14px; cursor: pointer; font-family: inherit; transition: all .15s;
}
.dahs-quick-item:hover { background: #eff6ff; border-color: #dbeafe; }
.dahs-quick-chevron { color: #cbd5e1; }
.dahs-quick-label { flex: 1; text-align: right; font-size: .88rem; font-weight: 600; color: #334155; }
.dahs-quick-icon { width: 34px; height: 34px; border-radius: 10px; background: #eef2ff; color: #4f46e5; display: flex; align-items: center; justify-content: center; }

/* نمودار */
.dahs-chart-range {
    display: flex; align-items: center; gap: 4px;
    background: #f8fafc; border: 1px solid var(--d-line); border-radius: 10px;
    padding: 6px 10px; font-family: inherit; font-size: .8rem; color: #475569; cursor: pointer;
}
.dahs-chart-legend { display: flex; gap: 18px; justify-content: center; margin-bottom: 6px; }
.dahs-legend-item { display: flex; align-items: center; gap: 6px; font-size: .82rem; color: #475569; }
.dahs-legend-item i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.dahs-chart-wrap { margin-top: 4px; }

/* اطلاعیه‌ها */
.dahs-notice-list { display: flex; flex-direction: column; }
.dahs-notice-item { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid #f4f6fa; }
.dahs-notice-item:last-child { border-bottom: 0; }
.dahs-notice-date { font-size: .76rem; color: #94a3b8; flex-shrink: 0; min-width: 78px; text-align: left; }
.dahs-notice-text { flex: 1; font-size: .86rem; color: #334155; text-align: right; }
.dahs-notice-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

/* جدول */
.dahs-table-panel { padding-bottom: 8px; }
.dahs-table-scroll { overflow-x: auto; }
.dahs-table { width: 100%; border-collapse: collapse; }
.dahs-table th {
    text-align: right; font-size: .8rem; font-weight: 600; color: #94a3b8;
    padding: 10px 14px; border-bottom: 1px solid var(--d-line);
}
.dahs-table td { text-align: right; font-size: .87rem; color: #334155; padding: 16px 14px; border-bottom: 1px solid #f4f6fa; }
.dahs-table tbody tr:last-child td { border-bottom: 0; }
.dahs-row-status { display: flex; align-items: center; gap: 10px; }
.dahs-row-more { color: #cbd5e1; cursor: pointer; }
.dahs-status-badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 12px; border-radius: 999px; font-size: .8rem; font-weight: 700;
}
.dahs-status-dot { width: 8px; height: 8px; border-radius: 50%; }

/* ===== ریسپانسیو ===== */
@media (max-width: 1200px) {
    .dahs-kpi-grid { grid-template-columns: repeat(2, 1fr); }
    .dahs-mid-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .dahs-kpi-grid { grid-template-columns: 1fr; }
    .dahs-search { display: none; }
}
