/* ==========================================================================
   قالب تبلر (Tabler) - برای سامانه ITVERSE Steel ERP
   طراحی تمیز اروپایی، نوارهای وضعیت (Status Ribbons)، سایدبار روشن و مینیمال
   Full RTL + Light Mode & Dark Mode
   ========================================================================== */

:root {
    --tabler-primary: #206bc4;
    --tabler-primary-hover: #066fd1;
    --tabler-success: #2fb344;
    --tabler-warning: #f76707;
    --tabler-info: #4299e1;
    --tabler-danger: #d63939;
}

/* ==========================================================================
   حالت روز (Light Mode) - تبلر
   ========================================================================== */
html:not(.dark),
body:not(.dark),
body:not(.dark) .fi-body {
    background-color: #f6f8fb !important;
    color: #1e293b !important;
}

/* سایدبار تبلر روز: سفید خالص با حاشیه ظریف */
html:not(.dark) .fi-sidebar,
html:not(.dark) #fi-main-sidebar {
    background-color: #ffffff !important;
    border-inline-end: 1px solid #e6e8eb !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}

html:not(.dark) .fi-sidebar-header,
html:not(.dark) .fi-sidebar-header-ctn {
    background-color: #ffffff !important;
    border-bottom: 1px solid #f1f3f5 !important;
}

html:not(.dark) .fi-sidebar-item-label,
html:not(.dark) .fi-sidebar a span,
html:not(.dark) .fi-sidebar button span {
    color: #495057 !important;
    font-size: 0.88rem !important;
    font-weight: 500 !important;
}

html:not(.dark) .fi-sidebar-item-icon,
html:not(.dark) .fi-sidebar svg {
    color: #6c757d !important;
}

html:not(.dark) .fi-sidebar-item-btn:hover {
    background: rgba(32, 107, 196, 0.06) !important;
    border-radius: 8px !important;
}

html:not(.dark) .fi-sidebar-item-btn:hover .fi-sidebar-item-label,
html:not(.dark) .fi-sidebar-item-btn:hover svg {
    color: #206bc4 !important;
}

/* آیتم فعال در سایدبار تبلر: پس‌زمینه آبی ملایم با خط کناری */
html:not(.dark) .fi-sidebar-item.fi-active .fi-sidebar-item-btn,
html:not(.dark) .fi-sidebar-item-active .fi-sidebar-item-btn {
    background: rgba(32, 107, 196, 0.10) !important;
    border-radius: 8px !important;
    border-inline-start: 3px solid #206bc4 !important;
}

html:not(.dark) .fi-sidebar-item.fi-active .fi-sidebar-item-label,
html:not(.dark) .fi-sidebar-item.fi-active svg,
html:not(.dark) .fi-sidebar-item-active span {
    color: #206bc4 !important;
    font-weight: 700 !important;
}

/* تاپ‌بار تبلر روز */
html:not(.dark) .fi-topbar {
    background-color: #ffffff !important;
    border-bottom: 1px solid #e6e8eb !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03) !important;
}

/* کارت‌های آماری و ویجت‌های تبلر روز: نوارهای وضعیت بالا (Status Ribbon) */
html:not(.dark) .fi-wi-stats-overview-stat {
    background: #ffffff !important;
    border: 1px solid #e6e8ec !important;
    border-top: 3px solid #206bc4 !important;
    border-radius: 8px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}

html:not(.dark) .fi-wi-stats-overview-stat:nth-child(2) { border-top-color: #2fb344 !important; }
html:not(.dark) .fi-wi-stats-overview-stat:nth-child(3) { border-top-color: #f76707 !important; }
html:not(.dark) .fi-wi-stats-overview-stat:nth-child(4) { border-top-color: #4299e1 !important; }

html:not(.dark) .fi-wi-stats-overview-stat-value {
    color: #1e293b !important;
    font-size: 1.75rem !important;
    font-weight: 800 !important;
}

html:not(.dark) .fi-wi-stats-overview-stat-label {
    color: #64748b !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
}

/* سکشن‌ها و جدول‌های تبلر روز */
html:not(.dark) .fi-section,
html:not(.dark) .fi-ta-ctn {
    background: #ffffff !important;
    border: 1px solid #e6e8ec !important;
    border-radius: 8px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}

html:not(.dark) .fi-ta-header-cell {
    background-color: #f8fafc !important;
    color: #475569 !important;
    font-weight: 700 !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

html:not(.dark) .fi-ta-row.fi-striped {
    background-color: rgba(241, 245, 249, 0.72) !important;
}

html:not(.dark) .fi-ta-row:hover,
html:not(.dark) .fi-ta-row.fi-striped:hover {
    background-color: #eef2f7 !important;
}

/* ==========================================================================
   حالت شب (Night / Dark Mode) - تبلر
   ========================================================================== */
html.dark,
body.dark,
html.dark .fi-body,
body.dark .fi-body {
    background-color: #0d1726 !important;
    color: #f1f5f9 !important;
}

/* سایدبار تبلر شب: نیلی-دودی عمیق تبلر */
html.dark .fi-sidebar,
html.dark #fi-main-sidebar {
    background-color: #182433 !important;
    border-inline-end: 1px solid #243346 !important;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3) !important;
}

html.dark .fi-sidebar-header,
html.dark .fi-sidebar-header-ctn {
    background-color: #182433 !important;
    border-bottom: 1px solid #243346 !important;
}

html.dark .fi-sidebar-item-label,
html.dark .fi-sidebar a span,
html.dark .fi-sidebar button span {
    color: #cbd5e1 !important;
}

html.dark .fi-sidebar-item-btn:hover {
    background: rgba(32, 107, 196, 0.18) !important;
}

html.dark .fi-sidebar-item.fi-active .fi-sidebar-item-btn,
html.dark .fi-sidebar-item-active .fi-sidebar-item-btn {
    background: rgba(32, 107, 196, 0.28) !important;
    border-inline-start: 3px solid #36a3f5 !important;
    border-radius: 8px !important;
}

html.dark .fi-sidebar-item.fi-active .fi-sidebar-item-label,
html.dark .fi-sidebar-item.fi-active svg,
html.dark .fi-sidebar-item-active span {
    color: #60a5fa !important;
    font-weight: 700 !important;
}

/* تاپ‌بار تبلر شب */
html.dark .fi-topbar {
    background-color: #182433 !important;
    border-bottom: 1px solid #243346 !important;
}

/* کارت‌های آماری تبلر شب */
html.dark .fi-wi-stats-overview-stat {
    background: #1b293c !important;
    border: 1px solid #28394e !important;
    border-top: 3px solid #36a3f5 !important;
    border-radius: 8px !important;
}

html.dark .fi-wi-stats-overview-stat:nth-child(2) { border-top-color: #2fb344 !important; }
html.dark .fi-wi-stats-overview-stat:nth-child(3) { border-top-color: #f76707 !important; }
html.dark .fi-wi-stats-overview-stat:nth-child(4) { border-top-color: #38bdf8 !important; }

html.dark .fi-wi-stats-overview-stat-value {
    color: #ffffff !important;
}

html.dark .fi-wi-stats-overview-stat-label {
    color: #94a3b8 !important;
}

html.dark .fi-section,
html.dark .fi-ta-ctn {
    background: #1b293c !important;
    border: 1px solid #28394e !important;
    border-radius: 8px !important;
}

html.dark .fi-ta-header-cell {
    background-color: #141f2e !important;
    color: #cbd5e1 !important;
    border-bottom: 1px solid #28394e !important;
}

html.dark .fi-ta-row.fi-striped {
    background-color: rgba(255, 255, 255, 0.038) !important;
}

html.dark .fi-ta-row:hover,
html.dark .fi-ta-row.fi-striped:hover {
    background-color: #24364e !important;
}

/* بردکرامب و نمودارهای اختصاصی تبلر */
.theme-tabler .fi-breadcrumbs-list {
    background: #ffffff !important;
    border: 1px solid #e6e8eb !important;
    border-radius: 6px !important;
}
html.dark.theme-tabler .fi-breadcrumbs-list {
    background: #1b293c !important;
    border: 1px solid #28394e !important;
}
.theme-tabler .fi-breadcrumbs-item .fi-breadcrumbs-item-label[aria-current="page"] {
    color: #206bc4 !important;
    background: rgba(32, 107, 196, 0.1) !important;
    border-color: rgba(32, 107, 196, 0.3) !important;
    border-radius: 4px !important;
}
html.dark.theme-tabler .fi-breadcrumbs-item .fi-breadcrumbs-item-label[aria-current="page"] {
    color: #36a3f5 !important;
    background: rgba(54, 163, 245, 0.15) !important;
    border-color: rgba(54, 163, 245, 0.35) !important;
}
.theme-tabler .fi-wi-chart .fi-section {
    border-radius: 8px !important;
    border: 1px solid #e6e8eb !important;
}
html.dark.theme-tabler .fi-wi-chart .fi-section {
    border: 1px solid #28394e !important;
}

