/* Main CSS file for NWM Portal */

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #ffffff;
    margin: 0;
    padding: 0;
}

.navbar-brand {
    font-weight: bold;
}

/* Updated navbar with new color scheme */
.navbar {
    background-color: #2B3B2B !important; /* Dark green */
    box-shadow: 0 2px 4px rgba(0,0,0,.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    margin-bottom: 0;
}

/* Sidebar styles */
.sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    padding: 48px 0 0;
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
}

.sidebar-sticky {
    position: relative;
    top: 0;
    height: calc(100vh - 48px);
    padding-top: .5rem;
    overflow-x: hidden;
    overflow-y: auto;
}

.sidebar .nav-link {
    font-weight: 500;
    color: #fff;
}

.sidebar .nav-link:hover {
    color: #ffd139;
}

.sidebar .nav-link.active {
    color: #ffd139;
}

.sidebar-heading {
    font-size: .75rem;
    text-transform: uppercase;
}

/* Updated button colors to match new theme */
.btn-primary {
    background-color: #33cc34; /* Green */
    border-color: #33cc34;
}

.btn-primary:hover {
    background-color: #2B3B2B; /* Dark green */
    border-color: #2B3B2B;
}

.btn-success {
    background-color: #33cc34; /* Green */
    border-color: #33cc34;
}

.btn-success:hover {
    background-color: #2B3B2B; /* Dark green */
    border-color: #2B3B2B;
}

/* Updated dashboard cards */
.dashboard-card {
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
    height: 100%;
    border-top: 4px solid #ffd139; /* Yellow accent */
}

.dashboard-card:hover {
    transform: translateY(-5px);
}

.dashboard-card .card-body {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.dashboard-card .card-body .btn {
    margin-top: auto;
}

footer {
    margin-top: 50px;
}

.form-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 30px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

.profile-img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 50%;
}

.alert {
    border-radius: 5px;
}

/* Mobile menu styles - Hamburger menu that slides from top right */
.navbar-toggler {
    border: none;
    position: relative;
    width: 30px;
    height: 30px;
    padding: 0;
}

.navbar-toggler:focus {
    box-shadow: none;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Mobile menu slide from top right */
@media (max-width: 991.98px) {
    .navbar-collapse {
        position: fixed;
        top: 56px;
        right: 0;
        width: 300px;
        height: calc(100vh - 56px);
        background: #2B3B2B;
        padding: 20px;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
        transform: translateX(100%);
        transition: transform 0.3s ease-in-out;
        overflow-y: auto;
    }
    
    .navbar-collapse.show {
        transform: translateX(0);
    }
    
    .navbar-nav {
        flex-direction: column;
    }
    
    .nav-item {
        margin: 10px 0;
    }
    
    .nav-link {
        color: white !important;
        padding: 10px 15px;
        border-radius: 5px;
    }
    
    .nav-link:hover {
        background: rgba(255,255,255,0.1);
    }
    
    .dropdown-menu {
        background: rgba(255,255,255,0.1);
        border: none;
    }
    
    .dropdown-item {
        color: white;
    }
    
    .dropdown-item:hover {
        background: rgba(255,255,255,0.2);
    }
    
    .sidebar {
        position: static;
        padding: 0;
        box-shadow: none;
    }
}

/* Footer menu for mobile - app-like appearance */
@media (max-width: 768px) {
    footer {
        position: fixed;
        bottom: 0;
        width: 100%;
        background: #2B3B2B;
        color: white;
        padding: 10px 0;
        z-index: 1000;
        margin-top: 0;
    }
    
    body {
        padding-bottom: 70px; /* Account for fixed footer */
        padding-top: 0;
    }
    
    .footer-nav {
        display: flex;
        justify-content: space-around;
        align-items: center;
    }
    
    .footer-nav a {
        color: white;
        text-decoration: none;
        text-align: center;
        font-size: 12px;
    }
    
    .footer-nav i {
        display: block;
        font-size: 20px;
        margin-bottom: 5px;
    }
    
    .container {
        padding-bottom: 20px;
        padding-top: 0;
    }
}

/* Center footer content */
.footer-content {
    text-align: center;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1rem;
    }
    
    .form-container {
        margin: 15px;
        padding: 20px;
    }
    
    .profile-img {
        width: 100px;
        height: 100px;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    .lead {
        font-size: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
}

/* Responsive footer */
@media (max-width: 768px) {
    footer .text-md-end {
        text-align: center !important;
        margin-top: 15px;
    }
}

/* Dashboard specific responsive styles */
@media (max-width: 768px) {
    .dashboard-card {
        margin-bottom: 20px;
    }
    
    .table-responsive {
        font-size: 0.9rem;
    }
    
    .table th, .table td {
        padding: 0.5rem;
    }
}




/* Make sidebar scrollable */
#sidebarMenu {
    height: 100vh;
    overflow-y: auto;
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
}

#sidebarMenu .position-sticky {
    height: calc(100vh - 40px);
    overflow-y: auto;
    padding-right: 15px;
    padding-left: 15px;
    padding-top: 15px;
    padding-bottom: 15px;
}

/* Ensure sidebar content doesn't overflow */
.sidebar {
    height: 100%;
    overflow-y: auto;
}

/* Custom scrollbar for sidebar */
#sidebarMenu::-webkit-scrollbar {
    width: 8px;
}

#sidebarMenu::-webkit-scrollbar-track {
    background: #212529;
    border-radius: 4px;
}

#sidebarMenu::-webkit-scrollbar-thumb {
    background: #495057;
    border-radius: 4px;
}

#sidebarMenu::-webkit-scrollbar-thumb:hover {
    background: #6c757d;
}

/* Fix for sidebar scrolling - override Bootstrap classes */
#sidebarMenu .position-sticky {
    position: relative !important;
    height: calc(100vh - 48px) !important;
    overflow-y: auto !important;
    padding-top: .5rem !important;
    overflow-x: hidden !important;
}

/* Ensure sidebar nav is scrollable */
#sidebarMenu .nav {
    flex-direction: column !important;
    overflow-y: auto !important;
    max-height: calc(100vh - 200px) !important;
}

/* Additional fixes for sidebar scrolling */
.sidebar {
    position: fixed !important;
    top: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    z-index: 100 !important;
    padding: 48px 0 0 !important;
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1) !important;
    overflow-y: auto !important;
}

.sidebar-sticky {
    position: relative !important;
    top: 0 !important;
    height: calc(100vh - 48px) !important;
    padding-top: .5rem !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
}

/* Ensure the nav flex column scrolls */
.nav.flex-column {
    overflow-y: auto !important;
    max-height: calc(100vh - 150px) !important;
    flex-direction: column !important;
}

/* Mobile fixes */
@media (max-width: 991.98px) {
    .sidebar {
        position: static !important;
        padding: 0 !important;
        box-shadow: none !important;
        height: auto !important;
        overflow-y: visible !important;
    }
    
    .nav.flex-column {
        max-height: none !important;
        overflow-y: visible !important;
    }
}
