/* Main Styling for SFS Remit Application */

:root {
    --primary-color: #0d6efd;
    --primary-dark: #0143a3;
    --primary-light: #6ea8fe;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
}

/* Default body styling for login */
body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color), #6610f2);
    background-size: 400% 400%;
    animation: gradient 15s ease infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-direction: column;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../images/pattern.svg');
    opacity: 0.05;
    pointer-events: none;
}

/* Dashboard body styling - overrides the default body styling */
body.dashboard-body {
    background: #f5f5f5;
    animation: none;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
    padding-bottom: 0;
}

body.dashboard-body::before {
    display: none;
}

/* Dashboard body style override */
.navbar + .container-fluid {
    min-height: calc(100vh - 65px - 73px); /* Adjusted to account for navbar and footer height */
    padding-top: 56px;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center; /* Add this to center content horizontally */
    justify-content: flex-start; /* Align items to the top */
    margin: 0 auto; /* Center the container horizontally */
}

@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Login Page Styling */
.login-container {
    width: 100%;
    max-width: 450px;
    margin: 40px auto;
    padding: 35px;
    background-color: rgba(255, 255, 255, 0.97);
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    transition: all 0.3s ease;
}

.login-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.login-logo {
    text-align: center;
    margin-bottom: 25px;
}

.login-logo img {
    max-width: 180px;
    height: auto;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

.login-form .form-label {
    font-weight: 500;
    color: var(--dark-color);
    margin-bottom: 8px;
    display: block;
}

.login-form .input-group {
    margin-bottom: 5px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    transition: all 0.3s ease;
    overflow: hidden;
}

.login-form .input-group:focus-within {
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.15);
    transform: translateY(-2px);
}

.login-form .input-group-text {
    background-color: #f8f9fa;
    border-right: none;
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
    color: var(--primary-color);
}

.login-form .form-control {
    border-left: none;
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
    padding: 12px;
    font-size: 16px;
}

.login-form .form-control:focus {
    box-shadow: none;
    border-color: #ced4da;
}

.login-form .btn-primary {
    width: 100%;
    padding: 12px;
    font-weight: 500;
    box-shadow: 0 4px 6px rgba(13, 110, 253, 0.2);
    transition: all 0.3s ease;
    border-radius: 50px;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-form .btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(13, 110, 253, 0.3);
    background-color: #0b5ed7;
}

.password-toggle {
    cursor: pointer;
    color: var(--secondary-color);
    transition: color 0.2s ease;
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
    border-left: none;
}

.password-toggle:hover {
    color: var(--primary-color);
}

.invalid-feedback {
    display: block;
    margin-top: 5px;
    margin-left: 2px;
    font-size: 0.875rem;
}

.alert {
    border-radius: 8px;
    font-weight: 500;
}

.alert-dismissible .btn-close {
    padding: 0.75rem;
}

.form-check {
    margin-top: 10px;
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Dashboard Styling */
/* Add this class to dashboard files */
.navbar + .container-fluid, 
body.dashboard-body {
    background-color: #f5f5f5;
}

.dashboard-header {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1030;
}

.container-fluid {
    padding-top: 56px; /* Navbar height */
    flex: 1 0 auto; /* Changed to flex-grow and flex-shrink */
    padding-left: 0; /* Remove default padding */
    padding-right: 0; /* Remove default padding */
}

.dashboard-container {
    padding: 20px;
}

.dashboard-card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    margin-bottom: 20px;
    background-color: #fff;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.dashboard-card .card-header {
    background-color: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    font-weight: 500;
    padding: 15px 20px;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

.dashboard-card .card-body {
    padding: 20px;
}

.dashboard-card .card-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.stat-card {
    text-align: center;
    padding: 20px;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
}

.stat-label {
    color: var(--secondary-color);
    font-size: 0.9rem;
}

/* Sidebar positioning - replace existing sidebar rules */
.sidebar {
    position: fixed;
    top: 65px; /* Match navbar height */
    left: 0;
    width: 250px;
    height: calc(100vh - 65px); /* Viewport height minus navbar */
    z-index: 100;
    overflow-y: auto;
    background-color: #fff;
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.sidebar-sticky {
    position: sticky;
    top: 0;
    height: calc(100vh - 65px);
    padding-top: 1rem;
    overflow-x: hidden;
    overflow-y: auto;
}

/* Main content area - Replace all existing .main-content rules with this consolidated version */
.main-content {
    padding: 1.5rem;
    width: 100%;
    min-height: calc(100vh - 65px - 73px); /* Account for navbar and footer height */
    display: flex;
    flex-direction: column;
    align-items: center; 
    justify-content: flex-start;
    box-sizing: border-box;
}

/* Desktop view - make sure content is properly positioned with sidebar */
@media (min-width: 992px) {
    .main-content {
        margin-left: 250px !important; /* Match sidebar width */
        width: calc(100% - 250px) !important;
    }
    
    /* All content inside main-content should take full width */
    .main-content > * {
        width: 100%;
        max-width: 100%;
    }
    
    /* Dashboard content wrapper for better alignment */
    .dashboard-content {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }
}

/* Mobile view - adjust for no sidebar */
@media (max-width: 991.98px) {
    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 1rem;
    }
}

/* Media query for smaller screens */
@media (max-width: 768px) {
    .main-content {
        padding: 15px;
    }
}

/* Add media query for smaller screens */
@media (max-width: 768px) {
    .main-content {
        padding: 15px;
    }
}

@media (max-width: 991.98px) {
    .main-content {
        max-width: 100%;
    }
}

/* Mobile view adjustments */
@media (max-width: 991.98px) {
    .sidebar {
        position: static;
        width: 100%;
        height: auto;
        box-shadow: 0 3px 10px rgba(0,0,0,0.1);
        margin-bottom: 1rem;
        border-radius: 8px;
    }
    
    .sidebar-sticky {
        height: auto;
        overflow: visible;
    }
}

@media (max-width: 991.98px) {
    .main-content {
        margin-left: 0;
    }
    
    .container-fluid {
        padding-top: 56px;
    }
}

/* Add/update media query for responsive layout - around line 368-380 */
@media (min-width: 992px) {
    .sidebar {
        width: 250px;
        position: fixed;
    }
    
    .col-md-9.ms-sm-auto.col-lg-10.px-md-4.main-content {
        margin-left: 250px !important; /* Match sidebar width */
        width: calc(100% - 250px) !important; /* Calculate remaining width */
        padding-left: 2rem !important;
        padding-right: 2rem !important;
    }
}

@media (max-width: 767.98px) {
    .login-container {
        margin: 20px 15px;
        padding: 25px;
    }
    
    .dashboard-header .navbar-brand {
        font-size: 1.1rem;
    }
    
    .dashboard-header .navbar-brand img {
        height: 24px;
    }
}

/* Tables */
.table {
    margin-bottom: 0;
}

.table th {
    border-top: none;
    font-weight: 500;
    color: var(--secondary-color);
}

.table td {
    vertical-align: middle;
}

/* Badges */
.badge {
    font-weight: 500;
    padding: 0.45em 0.8em;
}

/* Charts */
canvas {
    width: 100% !important;
    height: 300px !important;
}

/* Dashboard specific overrides */
body.dashboard-body {
    display: block;
    align-items: initial;
    justify-content: initial;
    background: #f5f5f5;
    animation: none;
}

body.dashboard-body::before {
    display: none;
}

.navbar + .container-fluid {
    padding-top: 56px;
    min-height: 100vh;
}

/* Fix for charts in dashboard */
.card-body canvas {
    max-height: 300px !important;
}

/* Fix for sidebar and main content alignment */
@media (min-width: 992px) {
    .sidebar {
        width: 250px;
        position: fixed;
        top: 60px; /* Adjust to match navbar height */
        height: calc(100vh - 60px); /* Adjust height to match screen height minus navbar height */
    }

    .col-md-9.ms-sm-auto.col-lg-10.px-md-4.main-content {
        margin-left: 250px !important; /* Match sidebar width */
        width: calc(100% - 250px) !important; /* Calculate remaining width */
        padding-left: 2rem !important;
        padding-right: 2rem !important;
        display: flex; /* Ensure flexbox is enabled */
        flex-direction: column; /* Stack items vertically */
        align-items: center; /* Center items horizontally */
        justify-content: flex-start; /* Align items to the top */
        box-sizing: border-box; /* Include padding in width calculation */
    }
}

/* Fix for sidebar and main content alignment */
@media (min-width: 992px) {
    .sidebar {
        width: 250px;
        position: fixed;
        top: 60px; /* Adjust to match navbar height */
        height: calc(100vh - 60px); /* Adjust height to match screen height minus navbar height */
    }

    .col-md-9.ms-sm-auto.col-lg-10.px-md-4.main-content {
        margin-left: 250px !important; /* Match sidebar width */
        width: calc(100% - 250px) !important; /* Calculate remaining width */
        padding-left: 2rem !important;
        padding-right: 2rem !important;
        display: flex; /* Ensure flexbox is enabled */
        flex-direction: column; /* Stack items vertically */
        align-items: center; /* Center items horizontally */
        justify-content: center; /* Center items vertically */
        box-sizing: border-box; /* Include padding in width calculation */
    }
}

/* Fix for sidebar and main content alignment */
@media (min-width: 992px) {
    .sidebar {
        width: 250px;
        position: fixed;
        top: 60px; /* Adjust to match navbar height */
        height: calc(100vh - 60px); /* Adjust height to match screen height minus navbar height */
    }

    .col-md-9.ms-sm-auto.col-lg-10.px-md-4.main-content {
        margin-left: 250px !important; /* Match sidebar width */
        width: calc(100% - 250px) !important; /* Exact sidebar width for precise centering */
        display: flex;
        flex-direction: column;
        align-items: center;
        padding-left: 2rem !important; /* Added padding for better spacing */
        padding-right: 2rem !important; /* Added padding for better spacing */
    }
}

/* Add responsive behavior for sidebar and main content */
@media (min-width: 992px) {
    .sidebar {
        width: 250px;
        position: fixed;
    }
    
    .col-md-9.ms-sm-auto.col-lg-10.px-md-4.main-content {
        margin-left: 250px !important; /* Match sidebar width */
        width: calc(100% - 250px) !important; /* Adjust width to account for sidebar */
        max-width: calc(1200px - 250px); /* Limit maximum width */
        padding-left: 2rem !important;
        padding-right: 2rem !important;
        align-items: center; /* Ensure content is centered horizontally */
    }
}

/* Fix for mobile view */
@media (max-width: 991.98px) {
    .sidebar {
        position: static;
        width: 100%;
        height: auto;
        padding: 0;
        margin-bottom: 20px;
    }
    
    .col-md-9.ms-sm-auto.col-lg-10.px-md-4.main-content {
        margin-left: 0;
        width: 100%;
    }
}

/* Dashboard Navigation Header Fixes */
.navbar.dashboard-header {
    padding: 0.5rem 1rem;
    height: 60px;
    z-index: 1030;
}

.navbar.dashboard-header .navbar-brand {
    display: flex;
    align-items: center;
    font-weight: 500;
}

.navbar.dashboard-header .navbar-brand img {
    margin-right: 8px;
}

/* Dashboard Content Layout Fixes */
.dashboard-body .container-fluid {
    padding-top: 60px;
    padding-left: 0;
    padding-right: 0;
}

/* Sidebar positioning fix */
.sidebar {
    top: 60px;
    height: calc(100vh - 60px);
}

.sidebar-sticky {
    height: calc(100vh - 60px);
}

/* Main content spacing fixes */
.main-content {
    padding: 1.5rem;
}

/* Better card spacing */
.dashboard-card {
    margin-bottom: 1.5rem;
}

/* Fix for chart rendering */
.dashboard-card canvas {
    height: 300px !important;
}

/* Improved dashboard stats cards */
.stat-card {
    padding: 1rem;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card .card-icon {
    font-size: 2.2rem;
    height: 70px;
    width: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin: 0 auto 1rem auto;
    background-color: rgba(13, 110, 253, 0.1);
}

.stat-card .stat-value {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

/* Responsive fixes for mobile dashboards */
@media (max-width: 991.98px) {
    .sidebar {
        position: static;
        width: 100%;
        height: auto;
        padding: 0;
        margin-bottom: 1rem;
        box-shadow: 0 3px 10px rgba(0,0,0,0.1);
        border-radius: 8px;
    }
    
    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 1rem;
    }
    
    .sidebar-sticky {
        height: auto;
    }
    
    .navbar.dashboard-header {
        padding: 0.5rem;
    }
    
    .navbar.dashboard-header .navbar-brand {
        font-size: 1rem;
    }
    
    .navbar.dashboard-header .navbar-brand img {
        height: 25px;
    }
}

/* Fix content overflow issues */
.dashboard-body {
    overflow-x: hidden;
}

.table-responsive {
    min-height: 0.01%;
}

/* Logout Modal Styles */
#logoutModal .modal-content {
    border-radius: 12px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    border: none;
    backdrop-filter: blur(10px);
}

#logoutModal .modal-header {
    border-top-left-radius: 11px;
    border-top-right-radius: 11px;
    padding: 1.25rem 1.5rem;
    background-color: rgba(13, 110, 253, 0.05);
}

#logoutModal .modal-header .modal-title {
    font-weight: 600;
}

#logoutModal .modal-body {
    padding: 2rem 1.5rem;
    font-size: 1.1rem;
    text-align: center;
}

#logoutModal .modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(0,0,0,0.05);
}

#logoutModal .modal-footer .btn {
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    font-weight: 500;
    transition: all 0.3s ease;
}

#logoutModal .modal-footer .btn-secondary {
    background-color: #f8f9fa;
    color: #212529;
    border-color: #f8f9fa;
}

#logoutModal .modal-footer .btn-secondary:hover {
    background-color: #e2e6ea;
}

#logoutModal .modal-footer .btn-primary {
    background-color: var(--danger-color);
    border-color: var(--danger-color);
}

#logoutModal .modal-footer .btn-primary:hover {
    background-color: #c82333;
    border-color: #bd2130;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

/* Modern Navigation Bar Enhancements */
.navbar.dashboard-header {
    padding: 0.5rem 1.5rem;
    height: 65px;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color)) !important;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1030;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar.dashboard-header .navbar-brand {
    display: flex;
    align-items: center;
    font-weight: 600;
    letter-spacing: 0.5px;
    padding: 0;
}

.navbar.dashboard-header .navbar-brand img {
    margin-right: 10px;
    height: 36px;
    width: auto;
    filter: drop-shadow(0px 2px 3px rgba(0,0,0,0.2));
    border-radius: 5px;
}

/* Navigation links */
.navbar.dashboard-header .nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: all 0.2s ease;
}

.navbar.dashboard-header .nav-link:hover {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.1);
}

/* Active navigation item */
.navbar.dashboard-header .nav-link.active {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.15);
}

/* Navbar icons */
.navbar.dashboard-header .nav-link i {
    margin-right: 6px;
    font-size: 1.1rem;
    vertical-align: -2px;
}

/* User dropdown */
.navbar.dashboard-header .dropdown-toggle::after {
    margin-left: 8px;
    vertical-align: 2px;
}

.navbar.dashboard-header .dropdown-menu {
    margin-top: 10px;
    border: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 0.5rem 0;
}

.navbar.dashboard-header .dropdown-item {
    padding: 0.5rem 1.2rem;
    font-weight: 500;
}

.navbar.dashboard-header .dropdown-item i {
    margin-right: 8px;
    color: var(--primary-color);
}

.navbar.dashboard-header .dropdown-item:hover {
    background-color: rgba(13, 110, 253, 0.05);
    color: var(--primary-color);
}

.navbar.dashboard-header .dropdown-divider {
    margin: 0.3rem 0;
}

/* Sidebar toggle */
#sidebarToggle {
    background-color: transparent;
    border: none;
    padding: 0.5rem;
    line-height: 1;
    border-radius: 4px;
    transition: background-color 0.15s ease;
}

#sidebarToggle:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

#sidebarToggle i {
    font-size: 1.5rem;
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
    .navbar.dashboard-header {
        padding: 0.5rem 1rem;
    }
    
    .navbar.dashboard-header .navbar-brand {
        font-size: 1rem;
    }
    
    .navbar.dashboard-header .navbar-brand img {
        height: 30px;
    }
}

/* Enhanced Navigation Bar Styling */
.navbar.dashboard-header {
    padding: 0;
    height: 65px;
    background: linear-gradient(135deg, #093170, #0d6efd) !important;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

/* Better navigation container */
.navbar.dashboard-header .container-fluid {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

/* Improved branding */
.navbar.dashboard-header .navbar-brand {
    padding: 0.5rem 1rem;
    margin-right: 1.5rem;
    position: relative;
}

.navbar.dashboard-header .navbar-brand::after {
    content: '';
    position: absolute;
    right: 0;
    top: 15px;
    bottom: 15px;
    width: 1px;
    background-color: rgba(255, 255, 255, 0.2);
}

/* Enhanced navbar links */
.navbar.dashboard-header .nav-link {
    color: rgba(255, 255, 255, 0.8) !important;
    font-weight: 500;
    padding: 1.18rem 1rem;
    transition: all 0.2s ease;
    border-bottom: 3px solid transparent;
    position: relative;
}

/* Better hover effect */
.navbar.dashboard-header .nav-link:hover {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.1);
}

/* More distinct active state */
.navbar.dashboard-header .nav-link.active {
    color: #ffffff !important;
    border-bottom: 3px solid #ffffff;
    background-color: rgba(255, 255, 255, 0.15);
}

/* Active indicator with animation */
.navbar.dashboard-header .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: #ffffff;
    animation: pulseActive 2s infinite;
}

@keyframes pulseActive {
    0% { opacity: 0.7; }
    50% { opacity: 1; }
    100% { opacity: 0.7; }
}

/* User dropdown styling */
.navbar.dashboard-header .nav-item.dropdown {
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar.dashboard-header .nav-link.dropdown-toggle {
    padding: 1.18rem 1.2rem;
    font-weight: 500;
}

.navbar.dashboard-header .dropdown-toggle::after {
    margin-left: 0.5rem;
    vertical-align: middle;
}

/* Navbar icon spacing */
.navbar.dashboard-header .nav-link i {
    margin-right: 8px;
    font-size: 1rem;
}

/* Better mobile navbar */
@media (max-width: 991.98px) {
    .navbar.dashboard-header {
        padding: 0;
    }
    
    .navbar.dashboard-header .nav-link {
        padding: 0.75rem 1rem;
        border-bottom: none;
        border-left: 3px solid transparent;
    }
    
    .navbar.dashboard-header .nav-link.active {
        border-bottom: none;
        border-left: 3px solid #ffffff;
    }
    
    .navbar.dashboard-header .nav-link.active::after {
        display: none;
    }
    
    .navbar.dashboard-header .nav-item.dropdown {
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .navbar.dashboard-header .navbar-collapse {
        background-color: #0d6efd;
        border-radius: 0 0 8px 8px;
        padding: 0;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
        max-height: calc(100vh - 65px);
        overflow-y: auto;
    }
    
    /* Improved dropdown on mobile */
    .navbar.dashboard-header .dropdown-menu {
        margin-top: 0;
        margin-bottom: 0.5rem;
        border: none;
        background-color: rgba(255, 255, 255, 0.1);
        padding: 0.5rem;
        box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.1);
    }
    
    .navbar.dashboard-header .dropdown-item {
        color: rgba(255, 255, 255, 0.85) !important;
    }
    
    .navbar.dashboard-header .dropdown-item:hover {
        background-color: rgba(255, 255, 255, 0.1);
        color: #ffffff !important;
    }
}

/* Footer Styling - replace the existing footer rules */
.footer {
    background: linear-gradient(135deg, #0143a3, #0d6efd, #6610f2);
    color: #fff;
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    width: 100%;
    position: relative;
    z-index: 1;
    margin-top: auto;
}

/* Make sure body fills the viewport height for proper footer positioning */
html, body {
    height: 100%;
    margin: 0;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Add grid layout */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    grid-gap: 20px;
}

/* Add button styling */
.btn-primary {
    background-color: #007bff;
    color: #fff;
}

.btn-secondary {
    background-color: #6c757d;
    color: #fff;
}

.btn-success {
    background-color: #28a745;
    color: #fff;
}

.btn-outline-secondary {
    border-color: #6c757d;
    color: #6c757d;
}

/* Add responsive design */
@media (max-width: 768px) {
    .grid-container {
        grid-template-columns: 1fr;
    }
}

/* Footer Styles */
.footer {
    background-color: #f8f9fa;
    padding: 20px 0;
    border-top: 1px solid #dee2e6;
}

.footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.footer .footer-left {
    font-size: 0.875rem;
    color: #6c757d;
}

.footer .footer-right {
    display: flex;
    align-items: center;
}

.footer .footer-right a {
    font-size: 0.875rem;
    color: #6c757d;
    text-decoration: none;
}

.footer .footer-right a:hover {
    color: #343a40;
}

.footer .social-icons a {
    font-size: 1.25rem;
    color: #6c757d;
    margin-right: 10px;
}

.footer .social-icons a:hover {
    color: #343a40;
}

@media (max-width: 576px) {
    .footer .container {
        flex-direction: column;
        text-align: center;
    }

    .footer .footer-right {
        margin-top: 10px;
    }
}

/* Add this to ensure the footer is pushed to the bottom */

.row {
    flex: 1;
    display: flex;
    flex-direction: column;
}

main.main-content {
    flex: 1;
}

/* Add this improved grid container class */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    grid-gap: 20px;
    width: 100%;
    box-sizing: border-box;
}

/* Container for single-column centered content */
.centered-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

/* Ensure the main content area is centered and utilizes all available white space */
.main-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 20px;
    box-sizing: border-box;
    margin-left: 250px; /* Adjust to match sidebar width */
}

@media (max-width: 991.98px) {
    .main-content {
        margin-left: 0;
        padding: 15px;
    }
}

/* Ensure the sidebar remains fixed on the left side of the screen */
.sidebar {
    position: fixed;
    top: 60px; /* Adjust to match navbar height */
    left: 0;
    width: 250px;
    height: calc(100vh - 60px); /* Adjust height to match screen height minus navbar height */
    overflow-y: auto;
    background-color: #fff;
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, 0.1);
}

.sidebar-sticky {
    position: sticky;
    top: 0;
    height: calc(100vh - 60px);
    padding-top: 1rem;
    overflow-x: hidden;
    overflow-y: auto;
}

/* Adjust the container-fluid padding to ensure proper spacing */
.container-fluid {
    padding-top: 60px; /* Navbar height */
    padding-left: 0;
    padding-right: 0;
    flex: 1 0 auto;
}

/* Ensure dashboard cards are properly centered and use available width */
.dashboard-card {
    width: 100%;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.card-body.stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
}

/* Ensure tables use full width */
.table-responsive {
    width: 100%;
}

form, .input-group {
    width: 100%;
}

/* Center modal content */
.modal-dialog {
    margin-left: auto;
    margin-right: auto;
}

/* Add this to ensure the dashboard content is aligned to the top */
.dashboard-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch; /* Stretch items to fill container width */
    justify-content: flex-start; /* Align items to the top */
}