/* File: /assets/css/style.css */

/* --- Sticky Footer & Full Height Layout --- */
html, body {
    height: 100%;
}

/* Flex wrapper to push footer down.
  We will add this 'd-flex' wrapper in header.php
  and 'mt-auto' on the footer.
*/
body {
    display: flex;
    flex-direction: column;
}

main {
    flex-shrink: 0; /* Prevents main content from shrinking */
}

/* --- Sidebar Styling --- */
.sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100; /* Behind navbar */
    padding: 48px 0 0; /* Navbar height */
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
    height: 100vh; /* Full-height */
}

/* Adjust main content to not be hidden by fixed sidebar */
@media (min-width: 768px) {
    main {
        padding-left: 200px; /* Adjust this to your sidebar width (col-md-3/col-lg-2) */
    }
}

.sidebar-sticky {
    position: relative;
    top: 0;
    height: calc(100vh - 48px);
    padding-top: .5rem;
    overflow-x: hidden;
    overflow-y: auto; /* Scrollable sidebar */
}

.nav-link {
    color: #333;
}

.nav-link.active {
    color: #0d6efd;
    font-weight: 500;
}

.nav-link .fa-fw {
    width: 1.25em;
}


/* --- Professional Card Styling --- */
.stat-card {
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.08);
}

.stat-card .card-body {
    padding: 1.5rem;
}

.stat-card-icon {
    font-size: 2.5rem;
    opacity: 0.3;
}



/* --- record page --- */
/* --- Record Table Styling --- */
.table-responsive {
    max-height: 70vh; /* Set a max height for the table body to scroll vertically */
}

/* This makes the <thead> "sticky" */
.table-responsive thead th {
    position: -webkit-sticky; /* Safari */
    position: sticky;
    top: 0;
    z-index: 2;
    background-color: #f8f9fa; /* Light background for header */
    box-shadow: inset 0 -2px 0 #dee2e6; /* Bottom border */
}

/* Styling for the filter inputs we will add */
.filter-input {
    width: 100%;
    font-size: 0.85rem;
    padding: 0.25rem 0.5rem;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
}

/* Make table cells non-breaking to force horizontal scroll */
.table-bordered td, .table-bordered th {
    white-space: nowrap; 
}




bg-primary-soft {
    background-color: rgba(13, 110, 253, 0.1);
    color: #0d6efd;
}

/* --- NEW: Quick Edit Sidebar Styles --- */

#quickEditSidebar {
    /* Set a light gray background */
    background-color: #f8f9fa;
    color: #212529; /* Dark text for readability */
    box-shadow: -0.5rem 0 1rem rgba(0, 0, 0, 0.15) !important;
}

#quickEditSidebar .offcanvas-header {
    background-color: #ffffff;
    border-bottom: 1px solid #dee2e6;
}

#quickEditSidebar .offcanvas-title {
    color: #0d6efd;
    font-weight: 500;
}

/* *** THIS IS THE FIX for the blank content *** */
#quickEditSidebar .form-control {
    background-color: #ffffff; /* Ensure input background is white */
    color: #212529 !important; /* Ensure input TEXT is dark (FORCED) */
    border: 1px solid #ced4da;
}

#quickEditSidebar .form-label {
    color: #495057; /* Slightly lighter label text */
}

#sidebar-edit-loading {
    padding: 2rem;
    color: #6c757d;
}

#sidebar-edit-error {
    margin: 1rem; /* Add some space for the error alert */
}

#quickEditSidebar .modal-footer { /* Re-using modal-footer class for consistency */
    background-color: #ffffff;
    border-top: 1px solid #dee2e6;
}
/* --- End of Quick Edit Styles --- */


/* --- NEW: Bulk Edit Sidebar Styles --- */

#bulkEditSidebar {
    background-color: #f8f9fa;
    color: #212529;
    box-shadow: -0.5rem 0 1rem rgba(0, 0, 0, 0.15) !important;
}

#bulkEditSidebar .offcanvas-header {
    background-color: #0d6efd;
    color: #ffffff;
    border-bottom: 1px solid #dee2e6;
}

#bulkEditSidebar .offcanvas-title {
    color: #ffffff;
    font-weight: 500;
}

#bulkEditSidebar .form-control {
    background-color: #ffffff;
    color: #212529 !important; /* Ensure input TEXT is dark (FORCED) */
    border: 1px solid #ced4da;
}

#bulkEditSidebar .form-label {
    color: #495057;
}

/* Special class for bulk edit to show "no change" */
#bulkEditSidebar .form-control::placeholder {
    color: #999;
    font-style: italic;
}

#bulk-edit-error {
    margin: 1rem;
}

#bulkEditSidebar .modal-footer {
    background-color: #ffffff;
    border-top: 1px solid #dee2e6;
}


/* This is the fix in your style.css */
#quickEditSidebar .form-control {
    background-color: #ffffff; 
    color: #212529 !important; /* <-- This forces the text to be dark */
    border: 1px solid #ced4da;
}