/* Base CSS Customizations for Base2026 */

body {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    color: #334155;
    background-color: #f8fafc;
}

/* Sidebar Custom styling for Desktop and Mobile responsiveness */
#sidebar {
    height: 100vh;
    position: sticky;
    top: 0;
    transition: all 0.25s ease-in-out;
}

#sidebar .nav-link {
    font-weight: 500;
    border-radius: 6px;
    padding: 0.6rem 0.8rem;
    transition: background-color 0.15s ease-in-out, color 0.15s ease-in-out;
}

#sidebar .nav-link:hover {
    background-color: #f1f5f9;
}

#sidebar .nav-link.active {
    background-color: #0d6efd; /* Solid color only, no gradients */
    color: #ffffff !important;
}

/* Mobile responsive overlay sidebar */
@media (max-width: 767.98px) {
    #sidebar {
        position: fixed;
        left: -260px;
        top: 0;
        bottom: 0;
        height: 100vh;
        width: 260px !important;
        opacity: 1 !important;
    }
    
    #sidebar.mobile-show {
        left: 0;
    }
}

/* Minimalist Flat Card Design */
.card {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background-color: #ffffff;
    overflow: hidden; /* Prevents inner content from bleeding out of rounded corners */
}

.card-header {
    background-color: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    font-weight: 600;
}

/* Simple Button Styling (Flat colors, clean hover effect, no gradients) */
.btn {
    font-weight: 500;
    border-radius: 6px;
    padding: 0.5rem 1rem;
    box-shadow: none !important;
}

.btn-primary {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
}

/* Form control focus styles */
.form-control:focus, .form-select:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.15);
}

/* Tom Select layout correction for clean Bootstrap 5 theme */
.ts-wrapper.form-control {
    padding: 0.25rem 0.5rem;
}

.ts-dropdown {
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    border-radius: 6px;
}

/* Sticky Action Column for Tables on Mobile screens */
.table-sticky-actions {
    border-collapse: separate !important;
    border-spacing: 0 !important;
}

.table-sticky-actions th,
.table-sticky-actions td {
    border-bottom: 1px solid #e2e8f0 !important;
}

.table-sticky-actions th:last-child,
.table-sticky-actions td:last-child {
    position: sticky;
    right: 0;
    z-index: 10;
    background-clip: padding-box; /* Fixes background bleeding over borders */
}

.table-sticky-actions th:last-child {
    background-color: #f8f9fa !important; /* Matches table-light theme */
}

.table-sticky-actions td:last-child {
    background-color: #ffffff !important;
    box-shadow: -6px 0 10px -6px rgba(0, 0, 0, 0.15); /* Clear separation shadow */
}

/* Maintain hover effect on the sticky cell */
.table-hover > tbody > tr:hover > td:last-child {
    background-color: #f1f5f9 !important;
}

