.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 250px;
    background: rgb(140, 141, 219);
    padding-top: 60px;
    color: white;
}

.sidebar .nav-link {
    color: white;
    padding: 15px 25px;
    font-size: 16px;
    transition: all 0.3s;
}

.sidebar .nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    padding-left: 30px;
}

.sidebar .nav-link i {
    margin-right: 10px;
    width: 20px;
}



.main-content {
    margin-left: 250px;
    padding: 20px;
}

.top-navbar {
    position: sticky;
    top: 0;
    right: 0;
    left: 250px;
    height: 60px;
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 0 20px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    z-index: 1000;
    background-color: #fff;
    border-bottom: 1px solid #dee2e6;
}

.top-navbar {
    position: sticky;
    top: 0;

}

.top-navbar h4 {
    font-family: 'Raleway', sans-serif;
    letter-spacing: 1px;
}

.user-dropdown .dropdown-toggle {
    background: none;
    border: none;
    color: #333;
    font-weight: 500;
}

.user-dropdown .dropdown-toggle::after {
    margin-left: 10px;
}

.user-dropdown .dropdown-menu {
    margin-top: 10px;
    border: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.footer {
    margin-top: auto;
    background: rgb(140, 141, 219);
    color: white;
    padding: 2rem 0;
    margin-left: -20px;
    margin-right: -20px;
    margin-bottom: -20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-section h5 {
    color: white;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: white;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    color: white;
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.social-links a:hover {
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    margin-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    margin: 0;
    color: rgba(255, 255, 255, 0.8);
}

/* Make sure main content area pushes footer to bottom */
.main-content {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin-left: 250px;
    padding: 20px 30px;
    max-width: 100%;
}

/* Submenu styling */
.nav-group {
    margin-bottom: 0.5rem;
}

.nav-group-title {
    cursor: pointer;
    padding: 0.75rem 1rem;
    color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-group-title:after {
    content: "\f107";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    transition: transform 0.3s ease;
}

.nav-group.active .nav-group-title:after {
    transform: rotate(180deg);
}

.nav-group-items {
    display: none;
    padding-left: 1rem;
}

.nav-group.active .nav-group-items {
    display: block;
}

.filter-row {
    display: flex;
    align-items: center;
    margin-bottom: 0 !important;
    gap: 0.25rem; /* Tighter gap if needed */    
}

.filter-button {
    padding: 0.5rem 1rem;
    height: 38px;
    /* Match height of other form controls */
    margin-top: 0;
}

.container {
    padding-top: 20px;
}

.btn-group {
    display: flex;
    gap: 5px;
}

.btn-group .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-group .btn i {
    margin-right: 4px;
}

.table th {
    background: linear-gradient(
        135deg,
        var(--primary-color),
        var(--accent-color)
    );
    color: Black;
    font-weight: 600;
    text-align: center;
}

.table td {
    vertical-align: middle;
}

/* Horizontal scroll */
.horizontal-scroll-container {
    overflow-x: auto;
    white-space: nowrap;
}

.inner-scroll-row {
    width: max-content;
    min-width: 900px; /* or 100% if you prefer */
    border-collapse: collapse;
    background-color: #fff;
}

.inner-scroll-row td {
    padding: 12px 10px;
    vertical-align: middle;
    text-align: left;
    border: 1px solid #dee2e6;
}

.badge {
    padding: 0.5em 0.75em;
}

/*pagination */
/* Base pagination container */

.pagination {
    margin: 1rem 0;
}

/* Navigation buttons */
.relative.inline-flex {
    align-items: center;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    line-height: 1.25rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    background-color: #fff;
    transition: all 0.15s ease-in-out;
}

/* Active state */
[aria-current="page"] span {
    background-color: #f3f4f6;
    color: #374151;
    cursor: default;
}

/* Hover states */
.relative.inline-flex:hover:not([aria-current="page"]) {
    background-color: #f9fafb;
    color: #4b5563;
}

/* Disabled state */
[aria-disabled="true"] {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Results text */
.text-sm.text-gray-700 {
    color: #374151;
    font-size: 0.875rem;
    line-height: 1.25rem;
}

/* Navigation arrows */
.w-5.h-5 {
    width: 1.25rem;
    height: 1.25rem;
}

/* Rounded corners for first and last items */
.rounded-l-md {
    border-top-left-radius: 0.375rem;
    border-bottom-left-radius: 0.375rem;
}

.rounded-r-md {
    border-top-right-radius: 0.375rem;
    border-bottom-right-radius: 0.375rem;
}

/* Focus states */
.focus\:ring:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.5);
}

.focus\:border-blue-300:focus {
    border-color: #93c5fd;
}

.sub-link {
    padding: 0.5rem 1rem;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.sub-link:hover {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
}

/* Fix the sticky table header */
.table-responsive thead th {
    position: sticky;
    background-color: #fff; /* keep header visible */
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.table-container {
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 10px;
}

.container-fluid,
.table-container {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Filter and Search Section Enhancement */
.filter-search-section {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 1rem;
}

.filter-search-section .form-control {
    min-width: 220px;
    max-width: 100%;
    padding: 8px 12px;
    border-radius: 5px;
    border: 1px solid #ced4da;
    box-shadow: none;
    transition: border-color 0.2s ease-in-out;

}

.filter-search-section .form-control:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.filter-search-section .btn {
    padding: 8px 16px;
    font-weight: 500;
    border-radius: 5px;
}

/* Full-width table layout */
.scrollable-table {
  width: 100%;
  height: 700px;
  overflow-x: auto;
  overflow-y: auto;
  border: 1px solid #dee2e6;
  border-radius: 5px;
  font-size: small;
  background-color: #fff; /* Optional:ensures  background consistency */
}   

.scrollable-table table tbody tr td {
    padding: 12px 10px;
}
/* Sticky header styling with shadow and z-index */
.sticky-header th {
    position: sticky;
    top: 0; /* stays at top */
    background-color: #ffffff; /* match table bg */
    z-index: 100; /* ensures it stays above the content */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* subtle shadow for visibility */
    padding-top: 12px;
    padding-bottom: 12px;
}

.img-thumbnail {
    border-radius: 8px;
    border: 1px solid #ccc;
}

.custom-pagination nav {
    display: inline-block;
}

.custom-pagination .pagination {
    margin: 0 auto;
    justify-content: center;
}

.custom-pagination .page-item .page-link {
    color: #007bff;
    border: 1px solid #dee2e6;
    margin: 0 3px;
    border-radius: 6px;
    padding: 5px 12px;
}

.custom-pagination .page-item.active .page-link {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

/* forms */
.required {
    color: var(--secondary-color);
}

.card {
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.card-title {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1rem;
}

.form-control {
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--shadow-color);
}


.btn-primary {
    padding: 0.75rem 2rem;
}

.alert {
    border-radius: 8px;
    border: none;
}

/* Dark mode support */

@media (prefers-color-scheme: dark) {
    .relative.inline-flex {
        background-color: #1f2937;
        border-color: #374151;
        color: #e5e7eb;
    }

    [aria-current="page"] span {
        background-color: #374151;
        color: #e5e7eb;
    }

    .relative.inline-flex:hover:not([aria-current="page"]) {
        background-color: #374151;
        color: #e5e7eb;
    }

    .text-sm.text-gray-700 {
        color: #e5e7eb;
    }
}

/* Mobile view styles */
@media (max-width: 640px) {
    .flex-1.sm\:hidden {
        display: flex;
        justify-content: space-between;
        margin-bottom: 1rem;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    /* Responsive padding fix */
    .main-content {
        margin-left: 0;
        padding: 15px;
    }

    .col-md-8 {
        padding: 0 15px;
    }

    .filter-search-section {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-row {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-button {
        width: 100%;
        margin-top: 1rem;
    }

    .btn-group {
        flex-direction: column;
    }

    .table-responsive {
        font-size: 0.875rem;
    }
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }

    .footer {
        margin-left: 0;
    }
}
