/* AGRI CO-OP ERP CUSTOM THEME STYLES */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --agri-primary: #1b4332;
    --agri-primary-hover: #2d6a4f;
    --agri-secondary: #40916c;
    --agri-accent: #74c69d;
    --agri-light: #f4f7f5;
    --agri-dark: #081c15;
    --agri-sidebar-width: 260px;
    --agri-navbar-height: 65px;
    --bs-body-font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    font-family: var(--bs-body-font-family);
    background-color: #f8f9fa;
    color: #212529;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Sidebar Styling */
.sidebar-wrapper {
    width: var(--agri-sidebar-width);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    background-color: var(--agri-dark);
    color: #ffffff;
    z-index: 1040;
    transition: all 0.3s ease;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.sidebar-brand {
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, #081c15, #1b4332);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-brand .logo-icon {
    width: 40px;
    height: 40px;
    background: var(--agri-accent);
    color: var(--agri-dark);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 700;
}

.sidebar-brand .brand-text {
    line-height: 1.2;
}

.sidebar-menu {
    padding: 1rem 0;
    list-style: none;
    margin: 0;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

.menu-header {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #74c69d;
    padding: 1rem 1.5rem 0.4rem;
    font-weight: 600;
}

.menu-item {
    margin: 2px 10px;
}

.menu-link {
    display: flex;
    align-items: center;
    padding: 0.65rem 1rem;
    color: #b7e4c7;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.92rem;
    font-weight: 500;
    transition: all 0.2s ease;
    gap: 10px;
}

.menu-link:hover, .menu-link.active {
    background-color: var(--agri-primary-hover);
    color: #ffffff;
}

.menu-link i {
    font-size: 1.1rem;
    width: 22px;
    text-align: center;
}

/* Main Content Wrapper */
.main-content-wrapper {
    margin-left: var(--agri-sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

/* Top Navbar */
.top-navbar {
    height: var(--agri-navbar-height);
    background-color: #ffffff;
    border-bottom: 1px solid #e9ecef;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1030;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

/* KPI Cards */
.kpi-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    background: #ffffff;
}

.kpi-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.kpi-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

/* COA Tree Styling */
.coa-tree-level-1 { font-weight: 700; background-color: #e8f5e9; }
.coa-tree-level-2 { font-weight: 600; padding-left: 20px !important; }
.coa-tree-level-3 { font-weight: 400; padding-left: 40px !important; }

/* Responsive sidebar toggle */
@media (max-width: 991.98px) {
    .sidebar-wrapper {
        margin-left: calc(-1 * var(--agri-sidebar-width));
    }
    .sidebar-wrapper.show {
        margin-left: 0;
    }
    .main-content-wrapper {
        margin-left: 0;
    }
}

/* Print Invoice Styling overrides */
@media print {
    .sidebar-wrapper,
    .top-navbar,
    .d-print-none,
    aside,
    footer,
    nav {
        display: none !important;
    }
    .main-content-wrapper {
        margin-left: 0 !important;
        padding: 0 !important;
    }
    .card {
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
    }
    body {
        background-color: #ffffff !important;
        color: #000000 !important;
    }
    .col-lg-9 {
        width: 100% !important;
    }
}

/* ──────────────────────────────────────────
   COLLAPSIBLE SUBMENU STYLES
────────────────────────────────────────── */
.menu-group-toggle {
    cursor: pointer;
    user-select: none;
}

.toggle-icon {
    font-size: 0.72rem !important;
    width: auto !important;
    transition: transform 0.25s ease;
}

.menu-group-toggle:not(.collapsed) .toggle-icon {
    transform: rotate(180deg);
}

.submenu-collapse {
    overflow: hidden;
}

.submenu-list {
    list-style: none;
    padding: 2px 0 4px 0;
    margin: 0;
}

.submenu-link {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 0.42rem 0.9rem 0.42rem 2.5rem;
    color: #95d4b1;
    text-decoration: none;
    font-size: 0.84rem;
    font-weight: 400;
    border-radius: 7px;
    margin: 1px 10px;
    transition: all 0.18s ease;
}

.submenu-link i {
    font-size: 0.88rem;
    width: 18px;
    text-align: center;
    opacity: 0.8;
}

.submenu-link:hover,
.submenu-link.active {
    background-color: var(--agri-primary-hover);
    color: #ffffff;
}

.submenu-link.active i {
    opacity: 1;
}

/* sidebar flex layout handled above */

.sidebar-user-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.85rem 1rem;
    margin: 0 10px 12px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    flex-shrink: 0;
}

.sidebar-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #40916c, #74c69d);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    font-weight: 700;
    flex-shrink: 0;
    letter-spacing: 0.5px;
}

.sidebar-user-info {
    flex: 1;
    min-width: 0;
}

.sidebar-user-name {
    color: #fff;
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-role {
    color: #74c69d;
    font-size: 0.72rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-logout-btn {
    color: #95d4b1;
    font-size: 1rem;
    text-decoration: none;
    padding: 5px 6px;
    border-radius: 6px;
    transition: color 0.2s ease, background 0.2s ease;
    flex-shrink: 0;
}

.sidebar-logout-btn:hover {
    color: #ff6b6b;
    background: rgba(255,107,107,0.12);
}

 
 / *   P r e m i u m   U I   E n h a n c e m e n t s   * / 
 . h o v e r - e l e v a t e   { 
         t r a n s i t i o n :   t r a n s f o r m   0 . 2 5 s   c u b i c - b e z i e r ( 0 . 3 4 ,   1 . 5 6 ,   0 . 6 4 ,   1 ) ,   b o x - s h a d o w   0 . 2 5 s   e a s e ; 
 } 
 . h o v e r - e l e v a t e : h o v e r   { 
         t r a n s f o r m :   t r a n s l a t e Y ( - 4 p x ) ; 
         b o x - s h a d o w :   0   1 2 p x   2 4 p x   r g b a ( 0 , 0 , 0 , 0 . 0 6 )   ! i m p o r t a n t ; 
         z - i n d e x :   1 ; 
 } 
 
 . a v a t a r - c i r c l e   { 
         w i d t h :   4 8 p x ; 
         h e i g h t :   4 8 p x ; 
         b o r d e r - r a d i u s :   5 0 % ; 
         d i s p l a y :   f l e x ; 
         a l i g n - i t e m s :   c e n t e r ; 
         j u s t i f y - c o n t e n t :   c e n t e r ; 
         f o n t - w e i g h t :   7 0 0 ; 
         f o n t - s i z e :   1 . 1 r e m ; 
         c o l o r :   # f f f ; 
         b a c k g r o u n d :   l i n e a r - g r a d i e n t ( 1 3 5 d e g ,   v a r ( - - a g r i - s e c o n d a r y ) ,   v a r ( - - a g r i - p r i m a r y ) ) ; 
         b o x - s h a d o w :   0   4 p x   1 0 p x   r g b a ( 2 7 ,   6 7 ,   5 0 ,   0 . 2 ) ; 
 } 
 . a v a t a r - c i r c l e - s m   { 
         w i d t h :   3 6 p x ; 
         h e i g h t :   3 6 p x ; 
         f o n t - s i z e :   0 . 9 r e m ; 
 } 
 
 . a v a t a r - c i r c l e - l g   { 
         w i d t h :   8 0 p x ; 
         h e i g h t :   8 0 p x ; 
         f o n t - s i z e :   2 r e m ; 
         b o x - s h a d o w :   0   8 p x   2 0 p x   r g b a ( 2 7 ,   6 7 ,   5 0 ,   0 . 2 5 ) ; 
         b o r d e r :   4 p x   s o l i d   # f f f ; 
 } 
 
 . p r o f i l e - b a n n e r   { 
         h e i g h t :   1 2 0 p x ; 
         b a c k g r o u n d :   l i n e a r - g r a d i e n t ( 1 2 0 d e g ,   # 1 b 4 3 3 2   0 % ,   # 4 0 9 1 6 c   1 0 0 % ) ; 
         b o r d e r - r a d i u s :   1 6 p x   1 6 p x   0   0 ; 
         p o s i t i o n :   r e l a t i v e ; 
 } 
 
 . g l a s s - c a r d   { 
         b a c k g r o u n d :   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 8 5 ) ; 
         b a c k d r o p - f i l t e r :   b l u r ( 1 2 p x ) ; 
         - w e b k i t - b a c k d r o p - f i l t e r :   b l u r ( 1 2 p x ) ; 
         b o r d e r :   1 p x   s o l i d   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 3 ) ; 
 } 
 
 . t a b l e - r o w - h o v e r   t b o d y   t r   { 
         t r a n s i t i o n :   a l l   0 . 2 s   e a s e ; 
 } 
 . t a b l e - r o w - h o v e r   t b o d y   t r : h o v e r   { 
         b a c k g r o u n d - c o l o r :   # f 8 f b f a ; 
         t r a n s f o r m :   s c a l e ( 1 . 0 0 5 ) ; 
         b o x - s h a d o w :   0   4 p x   1 2 p x   r g b a ( 0 , 0 , 0 , 0 . 0 3 ) ; 
         b o r d e r - r a d i u s :   8 p x ; 
 } 
 . t a b l e - r o w - h o v e r   t b o d y   t d   { 
         b o r d e r - b o t t o m - c o l o r :   t r a n s p a r e n t   ! i m p o r t a n t ; 
 } 
 
 . s e a r c h - i c o n - i n p u t   { 
         p a d d i n g - l e f t :   2 . 5 r e m ; 
 } 
 . s e a r c h - i c o n - w r a p p e r   { 
         p o s i t i o n :   a b s o l u t e ; 
         l e f t :   1 r e m ; 
         t o p :   5 0 % ; 
         t r a n s f o r m :   t r a n s l a t e Y ( - 5 0 % ) ; 
         c o l o r :   # 9 4 a 3 b 8 ; 
 } 
  
 