
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: 100%;
    overscroll-behavior: none;
    font-family: 'Source Sans Pro', sans-serif;
}

.nav-link {
    border-radius: 0.375rem;
    transition: background-color 0.15s ease-in-out;
}
#main-navbar, #main-footer {
    background-color: #0066CC;
}

.nav-link-active {
    background-color: rgba(255, 255, 255, 0.25) !important;
    border-radius: 0.375rem;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 0.375rem;
}

/* Improve navbar toggler visibility */
.navbar-toggler {
    border: 2px solid rgba(255, 255, 255, 0.5);
    padding: 0.5rem;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.3);
}

/* Better spacing for navbar items on mobile */
@media (max-width: 991.98px) {
    .navbar-nav {
        margin-top: 1rem;
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 1rem !important;
        margin: 0.25rem 0 !important;
    }
}

/* Sidebar styles - mobile-first */
.sidebar {
    background-color: #e7f3ff;
    border-right: 1px solid #dee2e6;
    padding: 0;
    min-height: calc(100vh - 56px); /* Full height minus navbar */
}

.sidebar .nav-link {
    color: #212529;
    font-weight: 500;
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
    margin: 0.25rem 0.5rem;
    transition: all 0.2s ease-in-out;
    word-break: break-word;
}

.sidebar .nav-link.active {
    background-color: #0066CC;
    color: white;
}

.sidebar .nav-link:hover {
    background-color: #0066CC;
    color: white;
}

/* Prevent active link from changing on hover */
.sidebar .nav-link.active:hover {
    background-color: #0066CC;
    color: white;
}

.sidebar .nav-link i {
    font-size: 1.1rem;
}

.sidebar-heading {
    font-size: 0.875rem;
    font-weight: 600;
}

/* Mobile sidebar toggle */
@media (max-width: 767.98px) {
    .sidebar {
        display: none !important; /* Hidden on mobile, shown in hamburger menu instead */
    }
    
    /* Add padding to main content on mobile to prevent overlap */
    main {
        padding-top: 1rem;
    }
}

/* Improve footer links on mobile */
@media (max-width: 575.98px) {
    footer .nav-item {
        margin: 0.25rem 0;
    }
    
    footer .nav-link {
        padding: 0.5rem 0 !important;
    }
}

/* Ensure alerts are visible on mobile */
.alert {
    word-wrap: break-word;
    margin-bottom: 1rem;
}

/* Improve button sizing on mobile */
@media (max-width: 767.98px) {
    .btn {
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
    }
}

/* Improve form controls on mobile */
@media (max-width: 767.98px) {
    .form-control,
    .form-select {
        font-size: 1rem;
    }
}

/* Fix Select2 width on mobile */
.select2-container {
    max-width: 100% !important;
    width: 100% !important;
}

.select2-container .select2-selection--single,
.select2-container .select2-selection--multiple {
    width: 100% !important;
}

.select2-dropdown {
    max-width: 100vw !important;
}
