/* Bus Ledger Design System
   Colors:
   Black: #000000
   White: #FFFFFF
   Red (Primary): #E50914
*/

:root {
    /* Override Bootstrap variables */
    --bs-primary: #E50914;
    --bs-primary-rgb: 229, 9, 20;
    
    --bs-link-color: #E50914;
    --bs-link-hover-color: #000000;
    
    --bs-focus-ring-color: rgba(229, 9, 20, 0.25);
    --bs-border-color: #E5E5E5;
    
    /* Layout Variables */
    --sidebar-width: 260px;
    --header-height: 70px;
    
    /* Fonts */
    --bs-body-font-family: 'Poppins', 'Inter', sans-serif;
    --bs-body-bg: #F8F9FA;
}

body {
    background-color: var(--bs-body-bg);
    color: #000000;
    font-family: var(--bs-body-font-family);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: #000000;
}

/* Base Layout Container */
.wrapper {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    max-width: var(--sidebar-width);
    background: #FFFFFF;
    border-right: 1px solid var(--bs-border-color);
    transition: all 0.3s;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1030;
    overflow-y: auto;
}

.sidebar .sidebar-header {
    padding: 20px;
    height: var(--header-height);
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--bs-border-color);
    background: #FFFFFF;
}

.sidebar .brand {
    font-weight: 700;
    font-size: 1.25rem;
    color: #000000;
    text-decoration: none;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar .brand-icon {
    color: var(--bs-primary);
    font-size: 1.5rem;
}

.sidebar ul.components {
    padding: 20px 0;
}

.sidebar .menu-section {
    padding: 10px 25px 5px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #999;
    letter-spacing: 1px;
}

.sidebar ul li a {
    padding: 10px 25px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    color: #333333;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.sidebar ul li a i {
    margin-right: 12px;
    font-size: 1.1rem;
    color: #666;
    transition: all 0.2s;
}

.sidebar ul li a:hover {
    background: rgba(0, 0, 0, 0.02);
    color: #000000;
}

.sidebar ul li a.active {
    color: var(--bs-primary);
    background: rgba(229, 9, 20, 0.05);
    border-left: 3px solid var(--bs-primary);
}

.sidebar ul li a.active i {
    color: var(--bs-primary);
}

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

/* Top Header */
.top-header {
    height: var(--header-height);
    background: #FFFFFF;
    border-bottom: 1px solid var(--bs-border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    position: sticky;
    top: 0;
    z-index: 1020;
}

.top-header .page-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
}

.top-header .user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    text-decoration: none;
    color: #000000;
}

.user-avatar {
    width: 35px;
    height: 35px;
    background: rgba(229, 9, 20, 0.1);
    color: var(--bs-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

/* Page Content Padding */
.page-content {
    padding: 30px;
    flex: 1;
}

/* Cards */
.card {
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
    background-color: #FFFFFF;
    margin-bottom: 24px;
}

.card-header {
    background-color: #FFFFFF;
    border-bottom: 1px solid var(--bs-border-color);
    padding: 16px 20px;
    font-weight: 600;
}

.card-title {
    font-weight: 600;
    font-size: 1.1rem;
    margin: 0;
}

/* Metric Cards */
.metric-card {
    padding: 20px;
}

.metric-label {
    font-size: 0.85rem;
    color: #666;
    font-weight: 500;
    margin-bottom: 8px;
}

.metric-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #000;
}

.metric-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: rgba(229, 9, 20, 0.1);
    color: var(--bs-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

/* Tables */
.table {
    margin-bottom: 0;
}

.table th {
    background-color: #F8F9FA;
    color: #333;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 16px;
    border-bottom: 2px solid var(--bs-border-color);
}

.table td {
    padding: 14px 16px;
    vertical-align: middle;
    font-size: 0.95rem;
    border-bottom: 1px solid var(--bs-border-color);
}

.table-hover tbody tr:hover {
    background-color: rgba(0,0,0,0.01);
}

/* Forms */
.form-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}

.form-control, .form-select {
    border: 1px solid #D1D5DB;
    padding: 10px 14px;
    font-size: 0.95rem;
    border-radius: 6px;
    background-color: #FFFFFF;
    color: #000000;
}

.form-control:focus, .form-select:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.25rem rgba(229, 9, 20, 0.15);
}

/* Buttons */
.btn {
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.95rem;
}

.btn-primary {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
    color: #FFFFFF;
}

.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
    background-color: #CC0812 !important;
    border-color: #CC0812 !important;
}

.btn-outline-dark {
    color: #000000;
    border-color: #000000;
}

.btn-outline-dark:hover {
    background-color: #000000;
    color: #FFFFFF;
}

/* Badges */
.badge {
    padding: 6px 10px;
    font-weight: 500;
    border-radius: 4px;
}

.badge-success { background: rgba(0,0,0,0.05); color: #000; border: 1px solid #000; }
.badge-danger { background: rgba(229, 9, 20, 0.1); color: var(--bs-primary); border: 1px solid var(--bs-primary); }

/* Empty States */
.empty-state {
    padding: 60px 20px;
    text-align: center;
}

.empty-state-icon {
    font-size: 3rem;
    color: #ccc;
    margin-bottom: 16px;
}

/* Auth Pages */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #F8F9FA;
    padding: 20px;
}

.auth-card {
    background: #FFFFFF;
    width: 100%;
    max-width: 400px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05), 0 10px 15px rgba(0,0,0,0.02);
    padding: 40px;
    border: 1px solid var(--bs-border-color);
    border-top: 4px solid var(--bs-primary);
}

.auth-brand {
    text-align: center;
    margin-bottom: 30px;
}

.auth-brand .brand-icon {
    font-size: 2.5rem;
    color: var(--bs-primary);
    margin-bottom: 10px;
}

/* Utilities */
.text-primary { color: var(--bs-primary) !important; }
.bg-primary { background-color: var(--bs-primary) !important; }
.text-danger { color: var(--bs-primary) !important; }
.bg-danger { background-color: var(--bs-primary) !important; }

/* Responsive Sidebar Mobile */
#sidebarCollapse {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #000;
    padding: 0;
}

@media (max-width: 768px) {
    #sidebarCollapse {
        display: block;
    }
    
    .sidebar {
        margin-left: calc(var(--sidebar-width) * -1);
    }
    
    .sidebar.active {
        margin-left: 0;
        box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    }
    
    .main-content {
        width: 100%;
        margin-left: 0;
    }
    
    .top-header {
        padding: 0 15px;
    }
    
    .page-content {
        padding: 15px;
    }
    
    .auth-card {
        padding: 30px 20px;
    }
}

 / *   D a s h b o a r d   R e d e s i g n   A d d i t i o n a l   S t y l e s   * / 
 . s e a r c h - b o x   { 
         p o s i t i o n :   r e l a t i v e ; 
         w i d t h :   3 0 0 p x ; 
 } 
 . s e a r c h - b o x   i n p u t   { 
         p a d d i n g - l e f t :   3 5 p x ; 
         b o r d e r - r a d i u s :   2 0 p x ; 
         b a c k g r o u n d :   # F 3 F 4 F 6 ; 
         b o r d e r :   1 p x   s o l i d   t r a n s p a r e n t ; 
 } 
 . s e a r c h - b o x   i n p u t : f o c u s   { 
         b a c k g r o u n d :   # F F F F F F ; 
         b o r d e r - c o l o r :   # E 5 0 9 1 4 ; 
         b o x - s h a d o w :   0   0   0   0 . 2 r e m   r g b a ( 2 2 9 ,   9 ,   2 0 ,   0 . 1 ) ; 
 } 
 . s e a r c h - b o x   . b i - s e a r c h   { 
         p o s i t i o n :   a b s o l u t e ; 
         l e f t :   1 2 p x ; 
         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 :   # 6 B 7 2 8 0 ; 
 } 
 . c h a r t - c o n t a i n e r   { 
         p o s i t i o n :   r e l a t i v e ; 
         h e i g h t :   3 0 0 p x ; 
         w i d t h :   1 0 0 % ; 
 } 
 . m e t r i c - c a r d - t i t l e   { 
         f o n t - s i z e :   0 . 7 5 r e m ; 
         f o n t - w e i g h t :   7 0 0 ; 
         t e x t - t r a n s f o r m :   u p p e r c a s e ; 
         c o l o r :   # 6 B 7 2 8 0 ; 
         l e t t e r - s p a c i n g :   0 . 5 p x ; 
 } 
 . m e t r i c - c a r d - v a l u e   { 
         f o n t - s i z e :   2 r e m ; 
         f o n t - w e i g h t :   7 0 0 ; 
         c o l o r :   # 0 0 0 0 0 0 ; 
         l i n e - h e i g h t :   1 . 2 ; 
 } 
 . m e t r i c - c a r d - s u b t i t l e   { 
         f o n t - s i z e :   0 . 8 r e m ; 
         c o l o r :   # 9 C A 3 A F ; 
 } 
 . a c t i v e - n a v - b g   { 
         b a c k g r o u n d - c o l o r :   r g b a ( 2 2 9 ,   9 ,   2 0 ,   0 . 1 ) ; 
         c o l o r :   # E 5 0 9 1 4   ! i m p o r t a n t ; 
         b o r d e r - r a d i u s :   8 p x ; 
 } 
 . a c t i v e - n a v - b g   i   { 
         c o l o r :   # E 5 0 9 1 4   ! i m p o r t a n t ; 
 } 
  
 