/* Import Google Fonts for a modern, clean look */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');
/* Animate.css for professional animations */
@import url('https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css');

:root {
    --primary-color: #0056b3; /* A professional blue */
    --accent-color: #28a745;  /* Success green */
    --bg-dark-color: #1a202c; /* Deep dark background */
    --text-light-color: #e2e8f0; /* Light text for dark backgrounds */
    --header-bg: rgba(26, 32, 44, 0.8);
}

body {
    font-family: 'Roboto', sans-serif;
    color: var(--text-light-color);
    background-color: var(--bg-dark-color);
    overflow: hidden;
}

/* Full-screen hero section */
.hero-section {
    height: 100vh;
    padding: 2rem;
    position: relative;
    z-index: 1;
    animation: fadeInBackground 1s ease-in-out;
}

@keyframes fadeInBackground {
    from { background-color: #000; }
    to { background-color: var(--bg-dark-color); }
}

/* Header/Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    background-color: var(--header-bg);
    backdrop-filter: blur(5px);
    transition: background-color 0.3s ease-in-out;
}

.header-logo {
    max-width: 150px;
    height: auto;
    filter: brightness(0) invert(1); /* This makes the logo white for the dark background */
}

/* Titles and text */
h1 {
    font-weight: 700;
    color: #fff;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.lead {
    font-weight: 300;
    color: var(--text-light-color);
}

/* Animated button style */
.btn-login {
    background-color: var(--primary-color);
    border: none;
    padding: 15px 40px;
    border-radius: 50px;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(0, 86, 179, 0.3);
    transition: all 0.3s ease;
}

.btn-login:hover {
    background-color: var(--accent-color);
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(40, 167, 69, 0.4);
}

.btn-login:active {
    transform: translateY(-2px);
}

.footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    text-align: center;
    padding: 1rem;
    color: var(--text-light-color);
    font-size: 0.85rem;
    z-index: 1;
    background-color: rgba(26, 32, 44, 0.5);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    .lead {
        font-size: 1rem;
    }

    .btn-login {
        padding: 12px 30px;
    }
}










/* Login Page: Modern, Minimalist, Gradient Background */
.login-body {
    background: linear-gradient(45deg, #1A2980, #26D0CE);
    background-size: 200% 200%;
    animation: gradientShift 20s ease infinite;
    height: 100vh;
    overflow: hidden;
    color: #fff;
    font-family: 'Roboto', sans-serif;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.login-container {
    height: 100vh;
    padding: 2rem;
}

.login-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
    max-width: 400px;
    width: 100%;
    animation: fadeIn 1s ease-out;
}

.login-card .logo {
    max-width: 200px;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
}

.login-card h2, .login-card p {
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.form-control {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    font-weight: 300;
    padding: 1rem 1.25rem;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.form-control:focus {
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 0 0 0.25rem rgba(255, 255, 255, 0.2);
    color: #fff;
}

.input-group-text {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    border-radius: 50px 0 0 50px;
    padding-left: 1.25rem;
}

.input-group-text i {
    font-size: 1.1rem;
}

.btn-login {
    background: #fff;
    color: #1A2980;
    border: none;
    font-weight: 700;
    padding: 1rem 2rem;
    border-radius: 50px;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.btn-login:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    background: #f0f0f0;
}






/* Dashboard Specific Styles (Corrected) */
.dashboard-body {
    display: flex;
    height: 100vh;
    background: linear-gradient(135deg, #1A2980, #00A693);
    background-size: 200% 200%;
    animation: gradientShift 20s ease infinite;
    overflow-x: hidden;
    color: #fff;
}

.dashboard-header {
    background-color: transparent; /* Changed to transparent for the glass effect */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-header {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.welcome-text {
    font-weight: 300;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
}

.welcome-text strong {
    font-weight: 500;
    color: #fff;
}

.dashboard-content {
    min-height: calc(100vh - 70px); /* Adjust based on header height */
    padding-top: 2rem;
}

.btn-logout {
    background-color: transparent;
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: #fff;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.btn-logout:hover {
    background-color: #d63031;
    border-color: #d63031;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(214, 48, 49, 0.3);
}

.btn-logout:active {
    transform: translateY(0);
}



/* Dashboard side panel related style */
.sidebar {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(15px);
    width: 280px;
    flex-shrink: 0;
    transition: all 0.3s ease;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 2px 0 15px rgba(0, 0, 0, 0.1);
    
    /* ADDED RULES BELOW */
    display: flex; /* Ensures content is laid out correctly */
    flex-direction: column; /* Stacks items vertically */
    height: 100vh; /* Sets the sidebar to the full viewport height */
    overflow-y: auto; /* Enables vertical scrolling when content overflows */
	
}

.sidebar-logo {
    max-width: 150px;
    height: auto;
	align: center;
}

.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.7);
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    border-radius: 0.5rem;
    position: relative;
    z-index: 1;
}

.sidebar .nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.sidebar .nav-link.active {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-weight: 500;
}

.sidebar .sub-link {
    padding-left: 2.5rem;
    font-size: 1rem;
    opacity: 0.8;
}

.main-content {
    background-color: transparent;
    padding: 3rem !important;
    overflow-y: auto;          /* This enables vertical scrolling for the main content */
    flex-grow: 1;              /* Ensures the content panel fills available space */
}

/* Glass Card Style */
.glass-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    color: #fff;
}

.glass-card .card-body p, .glass-card .card-body h2 {
    color: #fff;
}

/* Dashboard Title Box Animation - Adjusted to fire only once */
.dashboard-title-box {
    color: #fff;
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    background: linear-gradient(45deg, rgba(255,255,255,0.2), rgba(255,255,255,0.05));
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.animate__tada.animate__infinite {
    /* Remove infinite animation for dashboard title */
    animation-iteration-count: 1;
}

/* User Management Module Styles */

.compact-form .form-label {
    font-size: 0.85rem;
    color: #a0a0a0;
    margin-bottom: 0.25rem;
}

.compact-form .form-control,
.compact-form .form-select {
    font-size: 0.95rem;
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    transition: all 0.3s ease;
}

.compact-form .form-control:focus,
.compact-form .form-select:focus {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: #007bff;
    box-shadow: 0 0 0 0.25rem rgba(0, 123, 255, 0.25);
}

.compact-form .form-control::placeholder {
    color: #6c757d;
}

.glass-card-modal {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 1rem;
}

.modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-primary-custom {
    background: linear-gradient(45deg, #007bff, #0056b3);
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 50px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
    background: linear-gradient(45deg, #0056b3, #007bff);
}

.btn-loading {
    margin-left: 10px;
}

.btn-primary-custom .btn-text {
    display: inline-block;
    transition: all 0.3s ease;
}

.btn-primary-custom.is-loading .btn-text {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.btn-primary-custom.is-loading .btn-loading {
    display: inline-block !important;
}

.form-select option {
    background: #0d1a33;
    color: white;
}





/* Table Specific Styles */

/* Reduces font size for all text inside the table */
.user-table, .pending-user-table {
    font-size: 0.9rem; /* Adjust this value as needed */
}

/* This container holds the scrollable content */
.table-responsive {
    overflow-y: auto;
    max-height: 70vh; /* Sets a max height to enable scrolling */
    border-radius: 1rem;
}

//* This is the key part for a sticky header */
.user-table thead th, 
.pending-user-table thead th {
    position: sticky; /* Makes the header sticky */
    top: 0;          /* Sticks it to the top of the container */
    background-color: #212529; /* A solid background color to prevent content bleed-through */
    z-index: 10;     /* Ensures it stays on top of other content */
    box-shadow: 0 2px 2px -1px rgba(0, 0, 0, 0.4); /* Optional shadow for visual effect */
}

/* Optional: Re-styling the table to ensure it looks good with the new header */
.user-table, .pending-user-table {
    width: 100%;
    margin-bottom: 0;
    font-size: 0.9rem;
    color: #f8f9fa; /* Light text color for better contrast */
}

/* Applies a faded, semi-transparent background to the table body */
.glass-card-table {
    background: rgba(255, 255, 255, 0.05); /* Faded white background */
    backdrop-filter: blur(5px);           /* Optional blur effect */
    border-radius: 1rem;                  /* Matches the card's border radius */
    padding: 1rem;                        /* Adds some padding inside the container */
}

/* Ensures table rows have a transparent background to show the faded container */
.user-table tbody tr, .pending-user-table tbody tr {
    background-color: transparent !important;
}

/* Style for hover effect on rows */
.user-table tbody tr:hover, .pending-user-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
}

/* Changes font color inside table for better contrast */
.user-table td, .pending-user-table td {
    color: rgba(255, 255, 255, 0.9);
}

/* Improves readability of text inside the table body */
.user-table td, .pending-user-table td {
    color: #333; /* Dark gray for better contrast */
}



/* ...existing CSS... */

/* Checkbox List Container */
.checkbox-list-container {
    padding: 1rem;
    height: 250px;
    overflow-y: auto;
}

.checkbox-list-container .form-check {
    margin-bottom: 0.5rem;
}

.checkbox-list-container .form-check-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.checkbox-list-container .form-check-input:checked ~ .form-check-label {
    color: #007bff;
    font-weight: 500;
}



/* Ensure text in the assignments table is white for better visibility */
#assignmentsTableBody tr td {
    color: white !important; /* Use !important to override potential Bootstrap styles */
}

/* Also ensure the table headers are white if they are not already */
#assignmentsTable thead th {
    color: white !important;
}

/* --- Styles for the "Assign Tasks" tab elements --- */


/* Revert select boxes and date input to a darker theme */
#assignTasksForm .form-select,
#assignTasksForm .form-control {
    background-color: rgba(255, 255, 255, 0.05) !important; /* Semi-transparent dark background */
    color: white !important; /* White text for readability */
    border: 1px solid rgba(255, 255, 255, 0.2) !important; /* Lighter border */
}

/* Specific styling for the user selection container */
#assignTasksForm .user-selection-container {
    background-color: white !important; /* White background */
    color: #333 !important; /* Dark text for readability */
    border: 1px solid #ced4da !important; /* Standard border */
    padding: 15px; /* Add some padding */
    border-radius: 0.25rem; /* Match Bootstrap's border-radius */
    max-height: 250px; /* Limit height to enable scrolling if many users */
    overflow-y: auto; /* Enable vertical scrolling */
}

/* Ensure checkboxes and their labels are visible */
#assignTasksForm .form-check-label {
    color: white !important; /* White text for labels */
}

/* Adjust checkbox appearance if necessary (though Bootstrap usually handles this well) */
#assignTasksForm .form-check-input {
    border-color: #6c757d; /* A bit darker border for contrast */
}

/* Make placeholder text and option colors visible */
#assignTasksForm .form-control::placeholder,
#assignTasksForm .form-select option {
    color: rgba(255, 255, 255, 0.7) !important; /* Semi-transparent white placeholder text */
    
}



/* Additional styling for the buttons if needed to ensure consistency */
.btn-primary-custom { /* Assuming this is your submit button class */
    background-color: #007bff; /* Bootstrap primary blue */
    color: white;
    border-color: #007bff;
}
.btn-primary-custom.is-loading {
    background-color: #0056b3; /* Darker blue when loading */
    border-color: #0056b3;
}

/* Optional: Make filter labels and input text white/visible as well if needed */
.modal-body label {
    color: white;
}

.modal-body .form-control,
.modal-body .form-select {
    color: #333; /* Keep input text dark for readability inside input fields */
    background-color: rgba(255, 255, 255, 0.8); /* Slightly transparent white background */
    border-color: rgba(255, 255, 255, 0.3);
}

.modal-body .form-control::placeholder,
.modal-body .form-select option {
    color: #666;
}

/* Styling for the new user selection list */
.user-checkbox-list {
    background-color: white !important;
    color: #333 !important;
    border: 1px solid #ced4da !important;
    padding: 15px;
    border-radius: 0.25rem;
}


.user-checkbox-list .form-check-label {
    color: #333 !important;
}


/* Specific styling for the user selection container */
#assignTasksForm .user-checkbox-list {
    background-color: rgba(255, 255, 255, 0.05) !important; /* Semi-transparent dark background */
    color: white !important; /* White text */
    border: 1px solid rgba(255, 255, 255, 0.2) !important; /* Lighter border */
    padding: 15px;
    border-radius: 0.5rem;
    max-height: 250px;
    overflow-y: auto;
}

/* Styling for the Task IDs textarea */
#source_record_ids {
    background-color: rgba(255, 255, 255, 0.05) !important;
    color: white !important;
}

.modal-body .form-control {
    border-radius: 0.5rem; /* Set a consistent border-radius */
    padding: 0.5rem 0.75rem; /* Match the padding to the compact-input class */
}

input[type="date"].form-control {
    border-radius: 0.5rem; /* Ensure it has the same corner rounding */
    padding: 0.5rem 0.75rem; /* Match the padding for height consistency */
}

#myTasksTableBody td {
    color: white;
}



/* --- Pick Shorts Audit Modal Specific Styles --- */

/* Ensure all text inside the modal's table is white */
#pickShortsAuditModal .table-dark tbody td {
    color: white !important;
}

/* Style for table headers in the Pick Shorts Audit modal */
#pickShortsAuditModal .table-dark thead th {
    color: white; /* Ensure header text is white */
    font-weight: bold; /* Make headers bold */
    text-align: center; /* Align headers to center */
}

/* Align specific table data cells */
#pickShortsAuditModal #jobsTableBody td {
    text-align: center; /* Default center alignment for all data cells */
}

/* Override for Job # to be left-aligned */
#pickShortsAuditModal #jobsTableBody tr td:first-child {
    text-align: center;
}

/* Style for the Progress bar text to be visible */
#pickShortsAuditModal .progress-bar {
    color: white; /* Make text inside progress bar white */
    font-weight: bold; /* Make progress text bold */
    display: flex; /* Use flexbox to center content */
    align-items: center; /* Vertically center */
    justify-content: center; /* Horizontally center */
}