/* ==========================================================================
   البرز رایا | پنل فیلامنت ۳ - نسخه لوکس و بهینه‌سازی فاصله‌ها (Compact Glass)
   ========================================================================== */

/* ۱. تنظیمات سراسری */
:root {
    --ar-primary: 99, 102, 241;
    --ar-surface-light: rgba(255, 255, 255, 0.75);
    --ar-surface-border: rgba(255, 255, 255, 0.85);
    --ar-card-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.04), 0 12px 18px -4px rgba(99, 102, 241, 0.04);
}

.dark {
    --ar-surface-light: rgba(15, 23, 42, 0.72);
    --ar-surface-border: rgba(255, 255, 255, 0.08);
    --ar-card-shadow: 0 16px 32px -8px rgba(0, 0, 0, 0.5), 0 0 15px 0 rgba(99, 102, 241, 0.12);
}

body, .fi-body {
    direction: rtl !important;
    background: #f8fafc !important;
    background-image: 
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.10) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(236, 72, 153, 0.07) 0px, transparent 50%),
        radial-gradient(at 50% 100%, rgba(56, 189, 248, 0.08) 0px, transparent 50%) !important;
    background-attachment: fixed !important;
    min-height: 100vh;
}

.dark body, .dark .fi-body {
    background: #090d16 !important;
    background-image: 
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.18) 0px, transparent 55%),
        radial-gradient(at 100% 100%, rgba(139, 92, 246, 0.12) 0px, transparent 55%),
        radial-gradient(at 50% 50%, rgba(15, 23, 42, 0.8) 0px, transparent 100%) !important;
    background-attachment: fixed !important;
}

/* بهینه‌سازی فاصله سراسری صفحات و گریدها */
.fi-page {
    gap: 1rem !important;
}

.fi-page-header {
    margin-bottom: 0.75rem !important;
    padding-bottom: 0 !important;
}

.fi-page-header-heading {
    font-size: 1.35rem !important;
}

/* ۲. سایدبار و منوها با فواصل فشرده‌تر */
.fi-sidebar {
    background: var(--ar-surface-light) !important;
    backdrop-filter: blur(28px) saturate(190%) !important;
    -webkit-backdrop-filter: blur(28px) saturate(190%) !important;
    border-inline-start: 1px solid var(--ar-surface-border) !important;
    box-shadow: 0 0 35px rgba(0, 0, 0, 0.04) !important;
    padding: 10px 8px !important;
}

.fi-sidebar-group {
    background: rgba(255, 255, 255, 0.55) !important;
    border: 1px solid rgba(226, 232, 240, 0.8) !important;
    border-radius: 16px !important;
    padding: 6px 6px !important;
    margin-bottom: 8px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02) !important;
}

.dark .fi-sidebar-group {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
}

.fi-sidebar-group-label {
    color: #6366f1 !important;
    font-weight: 800 !important;
    font-size: 0.78rem !important;
    padding: 3px 8px !important;
}

.dark .fi-sidebar-group-label {
    color: #a5b4fc !important;
}

.fi-sidebar-item a {
    display: flex !important;
    align-items: center !important;
    background: rgba(255, 255, 255, 0.6) !important;
    border: 1px solid rgba(226, 232, 240, 0.9) !important;
    border-radius: 10px !important;
    margin: 3px 1px !important;
    padding: 6px 10px !important;
    font-weight: 600 !important;
    font-size: 0.86rem !important;
    color: #475569 !important;
    transition: all 0.2s ease !important;
}

.dark .fi-sidebar-item a {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    color: #cbd5e1 !important;
}

.fi-sidebar-item a:hover {
    background: rgba(99, 102, 241, 0.12) !important;
    border-color: rgba(99, 102, 241, 0.4) !important;
    color: #4f46e5 !important;
    transform: translateX(-3px) !important;
}

.fi-sidebar-item-active a {
    background: linear-gradient(135deg, #6366f1 0%, #5, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    color: #cbd5e1 !important;
}

.fi-sidebar-item a:hover {
    background: rgba(99, 102, 241, 0.12) !important;
    border-color: rgba(99, 102, 241, 0.4) !important;
    color: #4f46e5 !important;
    transform: translateX(-3px) !important;
}

.fi-sidebar-item-active a {
    background: linear-gradient(135deg, #6366f1 0%, #
    border-bottom: 1px solid var(--ar-surface-border) !important;
    min-height: 52px !important;
}

/* ۴. باکس‌ها، سکشن‌ها و کارت‌ها با فاصله‌های جمع‌وجور (Compact Margins & Padding) */
.fi-section,
.fi-wi-widget,
.fi-wi-stats-overview-stat,
.fi-ta-ctn,
.fi-card {
    background: var(--ar-surface-light) !important;
    backdrop-filter: blur(24px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
    border: 1px solid var(--ar-surface-border) !important;
    border-radius: 18px !important;
    box-shadow: var(--ar-card-shadow) !important;
    margin-bottom: 0.85rem !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

.fi-section-content,
.fi-section-header {
    padding: 12px 18px !important;
}

.fi-wi-stats-overview-stat {
    position: relative !important;
    padding: 14px 18px !important;
}

.fi-wi-stats-overview-stat::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #6366f1, #ec4899);
    border-radius: 4px 0 0 4px;
}

/* ۵. فرم‌ها و ورودی‌ها */
.fi-input-wrp {
    background: rgba(255, 255, 255, 0.8) !important;
    border: 1.5px solid rgba(203, 213, 225, 0.9) !important;
    border-radius: 12px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02) !important;
    transition: all 0.2s ease !important;
}

.dark .fi-input-wrp {
    background: rgba(15, 23, 42, 0.6) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.1) !important;
}

.fi-input-wrp:focus-within {
    border-color: #6366f1 !important;
    background: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2) !important;
}

.dark .fi-input-wrp:focus-within {
    background: rgba(15, 23, 42, 0.95) !important;
}

.fi-fo-field-wrp {
    margin-bottom: 0.75rem !important;
}

/* ۶. دکمه‌ها */
.fi-btn-color-primary {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%) !important;
    border-radius: 12px !important;
    font-weight: 700 !important;
    padding: 7px 16px !important;
    box-shadow: 0 6px 16px -3px rgba(99, 102, 241, 0.4) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    transition: all 0.2s ease !important;
}

.fi-btn-color-primary:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 10px 20px -3px rgba(99, 102, 241, 0.5) !important;
}

.fi-btn-color-gray {
    border-radius: 12px !important;
    padding: 7px 14px !important;
    background: rgba(255, 2: 1.5px solid rgba(255, 255, 255, 0.1) !important;
}

.fi-input-wrp:focus-within {
    border-color: #6366f1 !important;
    background: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2) !important;
}

.dark .fi-input-wrp:focus-within {
    background: rgba(15, 23, 42, 0.95) !important;
}

.fi-fo-field-wrp {
    margin-bottom: 0.75rem !important;
}

/* ۶. دکمه‌ها */
.fi-btn-color-primary {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%) !important;
    border-radius: 12px !important;
    font-weight: 700 !important;
    padding: 7px 16px !important;
    box-shadow: 0 6px 16px -3px rgba(99, 102, 241, 0.4) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    transition: all 0.2s ease !important;
}

.fi-btn-color-primary:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 10px 20px -3px rgba(99, 102, 241, 0.5) !important;
}

.fi-btn-color-gray {
    border-radius: 12px !important;
    padding: 7px 14px !important;
    background: rgba(255, 2 
