/* === Import Open Sans === */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;500;600;700&display=swap');

/* === Base Settings === */
body, html {
    font-family: 'Open Sans', sans-serif;
    font-size: 12px;
    line-height: 1.6;
    color: #000;
    background-color: #f5f7fa;
    padding-top: 10px;
}

/* === Navbar Customization === */
.navbar-custom {
    background-color: #20558a !important;
}
.navbar-custom .navbar-nav .nav-link,
.navbar-custom .navbar-brand,
.navbar-custom .navbar-toggler-icon {
    color: #ffffff !important;
}

/* === Login Card === */
.login-card {
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    overflow: hidden;
}
.login-image {
    background: url('/images/login-side.jpg') center center/cover no-repeat;
    min-height: 400px;
}
@media (max-width: 768px) {
    .login-image {
        display: none;
    }
}
h1, h2, h3, h4, h5 {
    color: #20558a;
    font-weight: bold;
}

/* === Sidebar Styling === */
.sidebar {
    background-color: #2f6d9e;
    min-height: 100vh;
    width: 200px;
    position: fixed;
    top: 0;
    left: 0;
    
    margin-top: 60px; /* push sidebar below header */
    padding: 20px 15px;
    z-index: 1000;
    overflow-y: auto;
    max-height: 100vh;
    transition: left 0.3s ease;
    
}
.sidebar::-webkit-scrollbar {
    width: 6px;
}
.sidebar::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}
.sidebar .nav-link {
    color: #f8f9fa;
    padding: 6px 10px;
    font-size: 12px;
    border-radius: 6px;
    transition: background-color 0.2s ease-in-out;
}
.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    background-color: #90c3ef;
    color: #ffffff;
}
.sidebar .nav-link i {
    margin-right: 8px;
}
.sidebar .text-center img {
    max-height: 50px;
}
.sidebar .text-center p {
    font-size: 12px;
    color: #d6e2f1;
    margin-top: 6px;
}
.sidebar .nav-section {
    font-weight: 600;
    font-size: 12px;
    margin-top: 10px;
    margin-bottom: 5px;
    color: #d6e2f1;
    padding-left: 12px;
}
.sidebar .sidebar-group {
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    margin-bottom: 6px;
    padding-bottom: 4px;
}
.sidebar .sidebar-group:last-child {
    border-bottom: none;
}
.sidebar .bi-chevron-down {
    font-size: 0.7rem;
}

/* === Toggle Button === */
.toggle-sidebar-btn {
    position: fixed;
    top: 15px;
    left: 15px;
    background: #007bff;
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    z-index: 1100;
    display: none;
}

/* === Main Content === */
main, .flex-fill, .flex-grow-1, .main-content {
    margin-left: 200px;
    padding: 30px;
    transition: margin-left 0.3s ease;
}

/* === Responsive Sidebar for Mobile === */
@media (max-width: 992px) {
    .sidebar {
        left: -220px;
        width: 200px;
    }

    .sidebar.active {
        left: 0;
    }

    .toggle-sidebar-btn {
        display: block;
    }

    main, .flex-fill, .flex-grow-1, .main-content {
        margin-left: 0;
        padding: 20px 30px 30px;
    }
}

/* === Forms & Inputs === */
input, select, textarea, button,
.form-control, .form-select, .form-label, label {
    font-size: 12px !important;
    font-family: 'Open Sans', sans-serif !important;
    line-height: 1.5;
}

/* === Cards === */
.card {
    font-size: 12px;
}
.card-title, .card-text {
    color: #20558a;
    font-weight: 600;
}

/* === Footer === */
.footer a:hover {
    text-decoration: underline;
}
@media (max-width: 768px) {
  .sidebar {
    margin-top: 60px; /* Pushes sidebar below the fixed header on mobile */
  }
}
