/* Bankio Inspired Modern Dashboard Styles */

:root {
    --coachpro-primary: #004D40;
    --coachpro-primary-hover: #003d33;
    --coachpro-bg-start: #F8FAFB;
    --coachpro-bg-end: #F0F4F7;
    --coachpro-glass-bg: #FFFFFF;
    --coachpro-glass-border: rgba(0, 0, 0, 0.05);
    --coachpro-card-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.04), 0 2px 4px -2px rgba(0, 0, 0, 0.02);
    --coachpro-radius: 24px;
}

/* Background Wrapper */
body.fi-body {
    background-color: var(--coachpro-bg-start) !important;
    background-image: radial-gradient(at 0% 0%, rgba(0, 77, 64, 0.03) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(0, 77, 64, 0.03) 0px, transparent 50%) !important;
    min-height: 100vh;
}

/* Sidebar Styling */
.fi-sidebar {
    background: #FFFFFF !important;
    border-inline-end: 1px solid rgba(0, 0, 0, 0.05) !important;
    border-inline-start: none !important;
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.02) !important;
}

[dir="rtl"] .fi-sidebar {
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.02) !important;
}

.fi-sidebar-header {
    border-bottom: none !important;
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
}

/* Sidebar Item Active State */
.fi-sidebar-active {
    position: relative;
}

.fi-sidebar-item-active>a {
    background: var(--coachpro-primary) !important;
    color: white !important;
    border-radius: 14px !important;
    margin-inline: 0.75rem !important;
    box-shadow: 0 8px 20px -6px rgba(0, 77, 64, 0.4) !important;
}

.fi-sidebar-item-active>a * {
    color: white !important;
}

/* Dashboard Cards & Widgets */
.fi-wi-widget>div,
.fi-section,
.fi-ta-content,
.fi-wi-stats-overview-stat {
    background: #FFFFFF !important;
    border: 1px solid rgba(0, 0, 0, 0.04) !important;
    border-radius: var(--coachpro-radius) !important;
    box-shadow: var(--coachpro-card-shadow) !important;
    overflow: hidden;
}

/* Section Spacing */
.fi-main {
    padding: 2rem 2.5rem !important;
}

.fi-page-header {
    margin-bottom: 2.5rem !important;
}

.fi-page-header-title {
    font-size: 1.875rem !important;
    font-weight: 700 !important;
    color: #1a1a1a !important;
    letter-spacing: -0.025em !important;
}

/* Stats Widgets Enhancement */
.fi-wi-stats-overview-stat {
    padding: 1.5rem !important;
}

.fi-wi-stats-overview-stat-label {
    font-weight: 500 !important;
    color: #666 !important;
}

.fi-wi-stats-overview-stat-value {
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    color: #1a1a1a !important;
    margin-top: 0.5rem !important;
}

/* Inputs & Buttons */
.fi-input-wrp,
.fi-btn {
    border-radius: 12px !important;
}

.fi-btn-color-primary {
    background: var(--coachpro-primary) !important;
    box-shadow: 0 4px 12px rgba(0, 77, 64, 0.2) !important;
}

/* ===== RTL Layout Fixes ===== */
/* Ensure sidebar navigation groups and items align correctly in RTL */
[dir="rtl"] .fi-sidebar-nav {
    text-align: right;
}

[dir="rtl"] .fi-sidebar-group-label {
    text-align: right;
}

/* Fix sidebar item icon + text alignment in RTL */
[dir="rtl"] .fi-sidebar-item a {
    flex-direction: row-reverse;
}

[dir="rtl"] .fi-sidebar-item-icon {
    margin-inline-start: 0 !important;
    margin-inline-end: 0 !important;
}

/* Fix topbar elements for RTL */
[dir="rtl"] .fi-topbar {
    direction: rtl;
}

/* Fix table alignment in RTL */
[dir="rtl"] .fi-ta-header-cell,
[dir="rtl"] .fi-ta-cell {
    text-align: right !important;
}

/* Fix page header action buttons alignment */
[dir="rtl"] .fi-page-header-actions {
    flex-direction: row-reverse;
}

/* Fix form layout spacing in RTL */
[dir="rtl"] .fi-fo-field-wrp {
    text-align: right;
}

/* Dark Mode Overrides */
.dark body.fi-body {
    background: #0A0F1D !important;
}

.dark .fi-sidebar,
.dark .fi-wi-widget>div,
.dark .fi-section,
.dark .fi-ta-content,
.dark .fi-wi-stats-overview-stat {
    background: #111827 !important;
    border-color: rgba(255, 255, 255, 0.05) !important;
    color: #F3F4F6 !important;
}

.dark .fi-sidebar-item-active>a {
    box-shadow: 0 4px 12px rgba(0, 77, 64, 0.15) !important;
}

.dark .fi-page-header-title {
    color: #FFFFFF !important;
}
