body {
    font-family: "IBM Plex Sans", sans-serif;
    font-weight: 400;
    font-style: normal;
    color: #2c3e50;
    background-color: #f8f9fc;
}

/* Sidebar styling - replacing gradient with solid colors */
.gradient-custom {
    background-color: #1a237e; /* Deep Indigo */
}

.gradient-custom-right {
    background-color: #1a237e; /* Deep Indigo */
}

/* Navigation hover effects */
.sidebar .nav-item .nav-link {
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    margin: 0.2rem 1rem;
    transition: all 0.3s ease;
    color: rgba(255, 255, 255, 0.8);
}

.sidebar .nav-item .nav-link:hover {
    background-color: #283593; /* Slightly lighter indigo for hover */
    color: #ffffff;
    transform: translateX(5px);
}

.sidebar .nav-item .nav-link i {
    transition: all 0.3s ease;
    color: rgba(255, 255, 255, 0.6);
}

.sidebar .nav-item .nav-link:hover i {
    transform: scale(1.1);
    color: #ffffff;
}

/* Topbar styling */
.topbar {
    background-color: #1a237e !important;
}

.topbar .nav-item .nav-link {
    color: rgba(255, 255, 255, 0.8) !important;
}

.topbar .nav-item .nav-link:hover {
    color: #ffffff !important;
}

/* Search bar styling */
.navbar-search .input-group {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 2rem;
    overflow: hidden;
}

.navbar-search .form-control {
    background-color: transparent !important;
    border: none;
    color: #ffffff !important;
    padding: 0.75rem 1rem;
}

.navbar-search .form-control::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.navbar-search .btn {
    background-color: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    padding: 0.375rem 1.5rem;
}

.navbar-search .btn:hover {
    color: #ffffff;
}

/* Card Styling */
.card {
    border: none;
    border-radius: 1rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* Button Styling */
.btn {
    border-radius: 0.5rem;
    padding: 0.5rem 1.5rem;
    transition: all 0.3s ease;
}

.btn-orange {
    background-color: #e74c3c;
    border-color: #e74c3c;
    color: white;
}

.btn-orange:hover {
    background-color: #c0392b;
    border-color: #c0392b;
    color: white;
    transform: translateY(-2px);
}

/* Form Styling */
.form-control {
    border-radius: 0.5rem;
    border: 1px solid #e0e0e0;
    padding: 0.75rem 1rem;
}

.form-control:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

/* Table Styling */
.table {
    border-radius: 0.5rem;
    overflow: hidden;
}

.table thead th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #e9ecef;
    color: #2c3e50;
}

/* Pagination Styling */
.pagination > li > a {
    border-radius: 50% !important;
    margin: 0 5px;
    color: #2c3e50;
    border: 1px solid #e0e0e0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2c3e50;
    border: 1px solid #e0e0e0;
    margin: 0 0.25rem;
    transition: all 0.3s ease;
}

.pagination > li > a:hover {
    background-color: #3498db;
    color: white;
    border-color: #3498db;
}

/* Modal Styling */
.modal-content {
    border-radius: 1rem;
    border: none;
}

.modal-header {
    border-bottom: 1px solid #e0e0e0;
    background-color: #f8f9fa;
    border-radius: 1rem 1rem 0 0;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #3498db;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #2980b9;
}

.logout:hover {
    color: #3a3b45 !important;
    background-color: #dde2f1 !important;
    border-color: #d4daed !important;
}

.pagination>li>a { border-radius: 50% !important;margin: 0 5px;}

/* Login Page Styling */
.login-container {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.login-box {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.login-logo {
    transition: transform 0.3s ease;
}

.login-logo:hover {
    transform: scale(1.05);
}

.login-form input {
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
}

.login-form input:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

.error {
    color: #e74c3c;
    background-color: #fdf1f0;
    padding: 0.75rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    text-align: center;
}

/* Dashboard Buttons */
.dashboard-buttons {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.05);
}

.dashboard-btn {
    padding: 1rem 2.5rem !important;
    border-radius: 0.5rem !important;
    transition: all 0.3s ease !important;
    font-weight: 500 !important;
    letter-spacing: 0.5px !important;
    text-transform: uppercase !important;
    font-size: 0.9rem !important;
}

.dashboard-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* File Management Pages */
.file-manager-header {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.05);
}

.file-manager-header h3 {
    color: #2c3e50;
    font-weight: 600;
    margin: 0;
}

.filter-form {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.05);
}

.filter-form label {
    color: #2c3e50;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.filter-form .form-control {
    border-radius: 0.5rem;
    border: 1px solid #e0e0e0;
    padding: 0.75rem 1rem;
}

.filter-form .form-control:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

/* File Table */
.file-table {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.05);
}

.file-table th {
    background: #f8f9fa;
    color: #2c3e50;
    font-weight: 600;
    padding: 1rem;
    border-bottom: 2px solid #e9ecef;
}

.file-table td {
    padding: 1rem;
    vertical-align: middle;
}

.file-table tr:hover {
    background-color: #f8f9fa;
}

/* Action Buttons */
.action-btn {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    margin: 0 0.25rem;
}

.action-btn:hover {
    transform: translateY(-2px);
}

.btn-view {
    background-color: #3498db;
    color: white;
}

.btn-view:hover {
    background-color: #2980b9;
    color: white;
}

.btn-delete {
    background-color: #e74c3c;
    color: white;
}

.btn-delete:hover {
    background-color: #c0392b;
    color: white;
}

/* Alert Messages */
.alert {
    border-radius: 0.5rem;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    border: none;
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.05);
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
}

/* Pagination */
.pagination {
    margin-top: 2rem;
    justify-content: center;
}

.page-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2c3e50;
    border: 1px solid #e0e0e0;
    margin: 0 0.25rem;
    transition: all 0.3s ease;
}

.page-link:hover {
    background-color: #3498db;
    color: white;
    border-color: #3498db;
}

.page-item.active .page-link {
    background-color: #3498db;
    border-color: #3498db;
}

/* Items Per Page Select */
.items-per-page {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.items-per-page select {
    width: auto;
    display: inline-block;
}

/* Logout Button Styling */
.logout-btn {
    background-color: #ff5252 !important;
    color: white !important;
    border-radius: 0.5rem !important;
    padding: 0.5rem 1.5rem !important;
    border: none !important;
    transition: all 0.3s ease !important;
    font-weight: 500 !important;
    box-shadow: 0 2px 4px rgba(255, 82, 82, 0.2) !important;
}

.logout-btn:hover {
    background-color: #ff1744 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 8px rgba(255, 82, 82, 0.3) !important;
}

/* Logout Modal Styling */
#logoutModal .modal-content {
    border: none;
    border-radius: 1rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

#logoutModal .modal-header {
    background-color: #ff5252;
    color: white;
    border-radius: 1rem 1rem 0 0;
    border-bottom: none;
}

#logoutModal .modal-header .close {
    color: white;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

#logoutModal .modal-header .close:hover {
    opacity: 1;
}

#logoutModal .modal-title {
    font-weight: 600;
}

#logoutModal .modal-body {
    padding: 1.5rem;
    font-size: 1.1rem;
    color: #2c3e50;
}

#logoutModal .modal-footer {
    border-top: none;
    padding: 1rem 1.5rem 1.5rem;
}

#logoutModal .btn-secondary {
    background-color: #e9ecef;
    color: #2c3e50;
    border: none;
    font-weight: 500;
    padding: 0.5rem 1.5rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

#logoutModal .btn-secondary:hover {
    background-color: #dee2e6;
    transform: translateY(-2px);
}

/* Sidebar Toggle Button */
#sidebarToggle {
    background-color: rgba(255, 255, 255, 0.1);
    width: 2.5rem;
    height: 2.5rem;
    transition: all 0.3s ease;
}

#sidebarToggle:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

#sidebarToggle .sidebar-toggle-icon {
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
}

#sidebarToggle:hover .sidebar-toggle-icon {
    color: #ffffff;
}

/* Change chevron direction when sidebar is toggled */
.sidebar.toggled #sidebarToggle .sidebar-toggle-icon {
    transform: rotate(180deg);
}

/* Live Search Styling */
#searchResults {
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    border-radius: 0.5rem;
}

.search-result {
    transition: all 0.2s ease;
}

.search-result:hover {
    background-color: #f8f9fa;
}

.search-result a {
    color: inherit;
}

.search-result:last-child {
    border-bottom: none !important;
}

.hover-bg-light:hover {
    background-color: #f8f9fa !important;
}

/* Custom Scrollbar for Search Results */
#searchResults::-webkit-scrollbar {
    width: 6px;
}

#searchResults::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

#searchResults::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

#searchResults::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Modern File Management Layout */
.file-manager-container {
    background: #ffffff;
    border-radius: 1.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.08);
    margin: 2rem;
    padding: 1.5rem;
    min-height: calc(100vh - 8rem);
}

.file-manager-sidebar {
    background: #f8f9fc;
    border-radius: 1rem;
    padding: 1.5rem;
    height: calc(100vh - 11rem);
    position: sticky;
    top: 2rem;
}

.file-manager-content {
    padding: 0 1.5rem;
}

.file-card {
    background: #ffffff;
    border-radius: 1rem;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
    overflow: hidden;
}

.file-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.08);
}

.file-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.file-header h2 {
    margin: 0;
    font-size: 1.25rem;
    color: #1a237e;
}

.file-content {
    padding: 1.5rem;
}

.file-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    padding: 1rem;
}

.file-item {
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 0.75rem;
    padding: 1rem;
    text-align: center;
    transition: all 0.3s ease;
}

.file-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.05);
}

.file-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #1a237e;
}

.file-name {
    font-size: 0.9rem;
    color: #2c3e50;
    margin: 0.5rem 0;
    word-break: break-word;
}

.file-info {
    font-size: 0.8rem;
    color: #6c757d;
}

.upload-zone {
    border: 2px dashed #e9ecef;
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.upload-zone:hover {
    border-color: #1a237e;
    background: #f8f9fc;
}

.upload-icon {
    font-size: 2rem;
    color: #1a237e;
    margin-bottom: 1rem;
}

.filter-section {
    background: #ffffff;
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.filter-title {
    font-size: 1rem;
    color: #1a237e;
    margin-bottom: 1rem;
    font-weight: 600;
}

.filter-option {
    padding: 0.5rem 0;
    color: #2c3e50;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-option:hover {
    color: #1a237e;
}

.filter-option.active {
    color: #1a237e;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 991px) {
    /* Tablet Layout */
    .file-manager-container {
        padding: 10px;
    }

    .file-manager-sidebar {
        margin-bottom: 20px;
    }

    .file-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .file-item {
        margin-bottom: 15px;
    }
}

@media (max-width: 767px) {
    /* Mobile Layout */
    .container-fluid {
        padding: 10px;
    }

    .file-manager-container {
        padding: 5px;
    }

    .file-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .file-manager-sidebar {
        display: none;
        position: fixed;
        left: 0;
        top: 0;
        height: 100vh;
        width: 80%;
        max-width: 300px;
        background: white;
        z-index: 1000;
        padding: 20px;
        box-shadow: 2px 0 5px rgba(0,0,0,0.1);
    }

    .file-manager-sidebar.active {
        display: block;
    }

    /* Add overlay when nav is open */
    .nav-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1040;
    }

    .nav-overlay.show {
        display: block;
    }

    /* Mobile Toggle Button */
    .mobile-sidebar-toggle {
        display: block;
        position: fixed;
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        border-radius: 50%;
        background: #007bff;
        color: white;
        border: none;
        box-shadow: 0 2px 5px rgba(0,0,0,0.2);
        z-index: 1001;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .file-header {
        flex-direction: column;
        gap: 10px;
    }

    .file-header .btn-group {
        width: 100%;
        justify-content: center;
    }

    .file-item {
        padding: 10px;
    }

    .upload-zone {
        margin-bottom: 15px;
    }

    .filter-section {
        margin-bottom: 15px;
    }

    /* Adjust header for mobile */
    .navbar-brand {
        font-size: 1.2rem;
    }

    /* Adjust file actions for mobile */
    .file-item .btn-group {
        flex-wrap: wrap;
        gap: 5px;
    }

    /* Mobile-specific styles for search bar */
    .navbar-search {
        width: calc(100% - 100px);
        margin-left: 10px !important;
    }

    .navbar-search .input-group {
        width: 100%;
    }

    .navbar-search .form-control {
        font-size: 14px;
        height: 35px;
    }

    .navbar-search .btn {
        height: 35px;
        padding: 0 10px;
    }

    #searchResults {
        width: calc(100% - 20px) !important;
        left: 10px !important;
        right: 10px !important;
    }

    #accordionSidebar {
        display: none;
        position: fixed;
        left: 0;
        top: 0;
        height: 100vh;
        width: 240px;
        z-index: 1050;
    }

    #accordionSidebar.show-nav {
        display: block;
    }

    /* Add overlay when nav is open */
    .nav-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1040;
    }

    .nav-overlay.show {
        display: block;
    }
}

@media (min-width: 768px) {
    .mobile-sidebar-toggle {
        display: none;
    }
}

.scroll-to-top {
    right: 1.3rem;
    bottom: 5rem;
}