/* ==========================================================================
   GAJANAND MOTORS — ENTERPRISE ERP DESIGN SYSTEM THEME
   Brand Palette:
     - Primary Deep Blue:   #123B6D
     - Secondary Pro Green: #15966F
     - Accent Warm Gold:    #D9A441
     - Background:          #F5F7FA
     - Surface / Card:      #FFFFFF
     - Border Subtle:       #E4E7EC
     - Primary Text:        #172033
     - Secondary Text:      #667085
   ========================================================================== */

:root {
    --gm-primary: #123B6D;
    --gm-primary-dark: #0c294d;
    --gm-primary-light: #1b5499;
    --gm-secondary: #15966F;
    --gm-accent: #D9A441;
    --gm-danger: #D92D20;
    --gm-warning: #F79009;
    --gm-info: #1570EF;
    --gm-bg: #F5F7FA;
    --gm-border: #E4E7EC;
    --gm-text-main: #172033;
    --gm-text-muted: #667085;
}

/* 1. Global Typography & Body Background */
body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    background-color: var(--gm-bg) !important;
    color: var(--gm-text-main) !important;
    -webkit-font-smoothing: antialiased;
}

/* 2. Topbar Styling */
.fi-topbar {
    background-color: #ffffff !important;
    border-bottom: 1px solid var(--gm-border) !important;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.04), 0 1px 2px -1px rgba(0, 0, 0, 0.02) !important;
}

/* 3. Compact & Modern Sidebar Styling */
.fi-sidebar {
    background-color: #ffffff !important;
    border-right: 1px solid var(--gm-border) !important;
}

.fi-sidebar-nav {
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
    padding-left: 0.6rem !important;
    padding-right: 0.6rem !important;
    gap: 0.15rem !important;
}

.fi-sidebar-nav > ul,
.fi-sidebar-nav-groups {
    gap: 0.15rem !important;
}

.fi-sidebar-group {
    margin-top: 0.15rem !important;
    margin-bottom: 0.15rem !important;
    padding: 0 !important;
}

.fi-sidebar-group-btn,
.fi-sidebar-group-button,
.fi-sidebar-group header button,
.fi-sidebar-group header {
    padding-top: 0.4rem !important;
    padding-bottom: 0.4rem !important;
    padding-left: 0.65rem !important;
    padding-right: 0.65rem !important;
    font-size: 0.82rem !important;
    font-weight: 600 !important;
    border-radius: 0.5rem !important;
    color: #334155 !important;
    transition: all 0.15s ease-in-out !important;
}

.fi-sidebar-group-btn:hover,
.fi-sidebar-group-button:hover,
.fi-sidebar-group header button:hover {
    background-color: #F8FAFC !important;
    color: var(--gm-primary) !important;
}

.fi-sidebar-group-label {
    font-size: 0.7rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.05em !important;
    text-transform: uppercase !important;
    color: var(--gm-text-muted) !important;
    padding-top: 0.4rem !important;
    padding-bottom: 0.2rem !important;
}

.fi-sidebar-group-items {
    padding-left: 0.5rem !important;
    padding-top: 0.15rem !important;
    padding-bottom: 0.25rem !important;
    gap: 0.1rem !important;
}

.fi-sidebar-item {
    margin-bottom: 0.08rem !important;
}

.fi-sidebar-item-btn,
.fi-sidebar-item-button,
.fi-sidebar-item a {
    padding-top: 0.35rem !important;
    padding-bottom: 0.35rem !important;
    padding-left: 0.6rem !important;
    padding-right: 0.6rem !important;
    font-size: 0.8rem !important;
    border-radius: 0.4rem !important;
    transition: all 0.12s ease-in-out !important;
}

.fi-sidebar-item-active > a,
.fi-sidebar-item-active > button {
    background-color: rgba(18, 59, 109, 0.08) !important;
    color: var(--gm-primary) !important;
    font-weight: 600 !important;
    border-left: 3px solid var(--gm-primary) !important;
    border-radius: 0 0.4rem 0.4rem 0 !important;
}

.fi-sidebar-item-active .fi-sidebar-item-icon {
    color: var(--gm-primary) !important;
}

.fi-sidebar-item > a:hover {
    background-color: rgba(18, 59, 109, 0.04) !important;
    color: var(--gm-primary) !important;
}

/* 4. Cards & Section Elevation */
.fi-section,
.fi-card,
.fi-ta-ctn {
    border: 1px solid var(--gm-border) !important;
    border-radius: 0.75rem !important;
    box-shadow: 0 1px 3px 0 rgba(16, 24, 40, 0.05), 0 1px 2px -1px rgba(16, 24, 40, 0.03) !important;
    background-color: #ffffff !important;
}

.fi-section-header-heading {
    font-size: 1.05rem !important;
    font-weight: 600 !important;
    color: var(--gm-text-main) !important;
}

.fi-header-heading {
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    color: var(--gm-text-main) !important;
    letter-spacing: -0.02em !important;
}

/* 5. Tables & Grids */
.fi-ta-table thead tr {
    background-color: #f8fafc !important;
    border-bottom: 1px solid var(--gm-border) !important;
}

.fi-ta-table th {
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
    color: var(--gm-text-muted) !important;
    padding-top: 0.75rem !important;
    padding-bottom: 0.75rem !important;
}

.fi-ta-table tbody tr {
    border-bottom: 1px solid #f1f5f9 !important;
    transition: background-color 0.15s ease-in-out;
}

.fi-ta-table tbody tr:hover {
    background-color: #f8fafc !important;
}

.fi-ta-cell {
    padding-top: 0.75rem !important;
    padding-bottom: 0.75rem !important;
    font-size: 0.875rem !important;
}

/* Numeric & Monetary Alignment */
.text-right-aligned {
    text-align: right !important;
    font-variant-numeric: tabular-nums !important;
}

/* 6. Form Inputs & Selects */
.fi-input-wrp {
    border-radius: 0.5rem !important;
    border: 1px solid var(--gm-border) !important;
    box-shadow: 0 1px 2px 0 rgba(16, 24, 40, 0.05) !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.fi-input-wrp:focus-within {
    border-color: var(--gm-primary) !important;
    box-shadow: 0 0 0 3px rgba(18, 59, 109, 0.12) !important;
}

/* 7. Action Buttons */
.fi-btn-primary {
    background-color: var(--gm-primary) !important;
    border-color: var(--gm-primary) !important;
    box-shadow: 0 1px 2px 0 rgba(16, 24, 40, 0.05) !important;
    font-weight: 500 !important;
}

.fi-btn-primary:hover {
    background-color: var(--gm-primary-dark) !important;
    border-color: var(--gm-primary-dark) !important;
}

/* 8. Status Badges */
.fi-badge {
    font-weight: 600 !important;
    font-size: 0.75rem !important;
    border-radius: 9999px !important;
    padding: 0.2rem 0.6rem !important;
    letter-spacing: 0.02em !important;
}

/* 9. KPI Stat Widgets */
.fi-wi-stats-overview-stat {
    border: 1px solid var(--gm-border) !important;
    border-radius: 0.75rem !important;
    background-color: #ffffff !important;
    padding: 1.25rem !important;
    box-shadow: 0 1px 3px 0 rgba(16, 24, 40, 0.05) !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.fi-wi-stats-overview-stat:hover {
    box-shadow: 0 4px 6px -1px rgba(16, 24, 40, 0.08), 0 2px 4px -2px rgba(16, 24, 40, 0.04) !important;
}

.fi-wi-stats-overview-stat-value {
    font-size: 1.65rem !important;
    font-weight: 700 !important;
    color: var(--gm-text-main) !important;
    letter-spacing: -0.02em !important;
}

.fi-wi-stats-overview-stat-label {
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
    color: var(--gm-text-muted) !important;
}

/* 10. Simple Auth Layout (Login Page) */
.fi-simple-main-ctn {
    background-color: #F5F7FA !important;
}

.fi-simple-main {
    background-color: #ffffff !important;
    border: 1px solid var(--gm-border) !important;
    border-radius: 1rem !important;
    box-shadow: 0 10px 15px -3px rgba(16, 24, 40, 0.08), 0 4px 6px -4px rgba(16, 24, 40, 0.03) !important;
    padding: 2.25rem !important;
}

.fi-icon-btn svg,
.fi-icon svg,
.fi-input-wrp svg {
    max-width: 1.25rem !important;
    max-height: 1.25rem !important;
    display: inline-block !important;
}

/* 11. Scrollbar Refinements */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

