/* General Layout and Centering Styles */
body, html {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    height: 100vh; /* Full height for the viewport */
    font-family: Arial, sans-serif;
}

.layout {
    display: flex;
    height: calc(100vh - 60px); /* Full height minus the fixed header */
    box-sizing: border-box;
}

/* Master Header */
.master-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #333;
    color: white;
    padding: 10px 20px;
    position: fixed;
    top: 0;
    width: 100%;
    height: 60px;
    z-index: 1100;
}


.header-user span {
    margin-right: 15px;
}

/* Sidebar */
/* Sidebar */
.sidebar {
    width: 200px;
    padding: 20px;
    background-color: #333;
    color: white;
    height: 100%;
    position: fixed;
    top: 60px; /* Directly below the header */
    transition: width 0.3s ease;
    overflow: hidden;
}

.sidebar.sidebar-collapsed {
    width: 60px;
}

.sidebar a {
    color: #ccc;
    text-decoration: none;
    display: block;
    margin: 10px 0;
}

.sidebar-toggle {
    background-color: #444;
    color: white;
    border: none;
    padding: 8px;
    font-size: 18px;
    cursor: pointer;
    width: 100%;
    border-radius: 5px;
    transition: transform 0.3s ease;
}

/* Rotate button when sidebar is collapsed */
.sidebar.sidebar-collapsed .sidebar-toggle {
    transform: rotate(180deg);
}

/* Hide content inside collapsed sidebar */
.sidebar.sidebar-collapsed a,
.sidebar.sidebar-collapsed h3 {
    display: none;
}


/* Main Content Styling */
.main-content {
    margin-left: 220px; /* Adjust for sidebar width */
    padding: 20px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    box-sizing: border-box;
}

/* Centered Content Wrapper for Home Page */
.center-content {
    text-align: center;
}

/* Option Cards */
/* Options Container */
/* Content Wrapper to manage layout */
.content-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 100px; /* Increased padding to prevent overlap with header */
}

/* Welcome Heading Styling */
.welcome-heading {
    font-size: 2em; /* Larger font size */
    font-weight: bold;
    text-align: center;
    margin-bottom: 30px; /* Space between heading and tiles */
    color: #333; /* Darker color for visibility */
}

/* Options Container */
.options-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Two columns */
    gap: 60px; /* Space between tiles */
    justify-content: center;
    width: 100%;
    max-width: 1000px; /* Control width of the grid */
}

/* Option Cards */
.option-card {
    width: 250px; /* Fixed width */
    height: 250px; /* Fixed height */
    color: white;
    border-radius: 15px;
    box-shadow: 0 15px 25px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    font-size: 1.5em;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-weight: 600;
}

/* Hover Effect */
.option-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 35px rgba(0, 0, 0, 0.2);
}

/* Custom Colors for Each Tile */
.card-employee {
    background-color: #FF8A65; /* Soft Coral */
    background-image: url("/static/images/employee.png");
    background-size: 120px; /* Icon size */
    background-repeat: no-repeat;
    background-position: center 40px; /* Position icon a bit higher */
    color: white;
    padding-top: 160px; /* Increased padding to shift text down */
    text-align: center;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-fleet {
    background-color: #7986CB;
    background-image: url("/static/images/fleet.png");
    background-size: 120px; /* Icon size */
    background-repeat: no-repeat;
    background-position: center 40px; /* Position icon a bit higher */
    color: white;
    padding-top: 160px; /* Increased padding to shift text down */
    text-align: center;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Optional: Hover effect for interactivity */
.card-fleet:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

/* Styling for Tile Text */
.card-fleet h3 {
    margin-top: 20px; /* Additional margin to push text down */
    font-size: 1.2em;
    font-weight: bold;
}



.card-invoices {
    background-color: #4DB6AC; /* Muted Teal */
    background-image: url("/static/images/Access.png");
    background-size: 120px; /* Icon size */
    background-repeat: no-repeat;
    background-position: center 40px; /* Position icon a bit higher */
    color: white;
    padding-top: 160px; /* Increased padding to shift text down */
    text-align: center;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card-incidents {
    background-color: #FFB74D; /* Light Orange */
    background-image: url("/static/images/Vendor.png");
    background-size: 120px; /* Icon size */
    background-repeat: no-repeat;
    background-position: center 40px; /* Position icon a bit higher */
    color: white;
    padding-top: 160px; /* Increased padding to shift text down */
    text-align: center;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}


/* Card for Roster with Background Image */
.card-roster {
    background-color: #FF8A65; /* Coral color as a base */
    background-image: url('/static/images/roster.png'); /* Replace with your roster image path */
    background-size: 120px; /* Size of the image */
    background-repeat: no-repeat;
    background-position: center 40px; /* Positioning image above the text */
    color: white;
    padding-top: 160px; /* Padding to shift text below the image */
    text-align: center;
    border-radius: 10px; /* Rounded corners */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); /* Subtle shadow for depth */
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Optional: Hover effect for interactivity */
.card-roster:hover {
    transform: translateY(-5px); /* Lift the card slightly */
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3); /* Enhanced shadow on hover */
}

/* Styling for Tile Text */
.card-roster h3 {
    margin-top: 20px; /* Additional margin to push text down */
    font-size: 1.2em;
    font-weight: bold;
}


/* Card for Routing with Background Image */
.card-routing {
    background-color: #4DB6AC; /* Teal color as a base */
    background-image: url('/static/images/route.png'); /* Replace with your route image path */
    background-size: 120px; /* Size of the image */
    background-repeat: no-repeat;
    background-position: center 40px; /* Positioning image above the text */
    color: white;
    padding-top: 160px; /* Padding to shift text below the image */
    text-align: center;
    border-radius: 10px; /* Rounded corners */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); /* Subtle shadow for depth */
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Optional: Hover effect for interactivity */
.card-routing:hover {
    transform: translateY(-5px); /* Lift the card slightly */
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3); /* Enhanced shadow on hover */
}

/* Styling for Tile Text */
.card-routing h3 {
    margin-top: 20px; /* Additional margin to push text down */
    font-size: 1.2em;
    font-weight: bold;
}


/* Card for Log Out with Background Image */
.card-signout {
    background-color: #FF7043; /* Bright Coral for Log Out */
    background-image: url('/static/images/logout.png'); /* Replace with your logout image path */
    background-size: 120px; /* Size of the image */
    background-repeat: no-repeat;
    background-position: center 40px; /* Positioning image above the text */
    color: white;
    padding-top: 160px; /* Padding to shift text below the image */
    text-align: center;
    border-radius: 10px; /* Rounded corners */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); /* Subtle shadow for depth */
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Optional: Hover effect for interactivity */
.card-signout:hover {
    transform: translateY(-5px); /* Lift the card slightly */
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3); /* Enhanced shadow on hover */
}

/* Styling for Tile Text */
.card-signout h3 {
    margin-top: 20px; /* Additional margin to push text down */
    font-size: 1.2em;
    font-weight: bold;
}


.card-tbd {
    background-color: #FFB74D; /* Orange */
}


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

/* Full-Page Scroll Container */
.form-page-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 120px;
    min-height: 100vh;
    padding-bottom: 40px;
    background-color: #f9f9f9;
}

/* Styled Form Container */
.styled-form-container {
    width: 90%; /* Increased width for better use of space */
    max-width: 1000px; /* Wider form for large screens */
    background-color: #ffffff;
    padding: 40px;
    border: 1px solid #ddd;
    border-radius: 10px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    overflow: visible; /* Ensure no inner scroll */
}

/* Form Title Styling */
.styled-form-container h2 {
    color: #333;
    font-weight: bold;
    text-align: center;
    margin-bottom: 30px;
}

/* Two-Column Grid for Form Fields */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Two equal columns */
    gap: 20px; /* Space between fields */
}

/* Full-Width Row for Notes */
.full-width {
    grid-column: span 2; /* Spans across both columns */
}

/* Individual Form Field Styling */
.form-row {
    display: flex;
    flex-direction: column;
}

.form-row input, .form-row select, .form-row textarea {
    width: 100%;
    padding: 12px; /* Increased padding for spacious look */
    border-radius: 5px;
    border: 1px solid #ccc;
}

/* Button Row Styling */
.button-row {
    grid-column: span 2; /* Makes the button row full width */
    display: flex;
    justify-content: flex-end; /* Aligns buttons to the right */
    gap: 10px; /* Space between Save and Cancel buttons */
}

.button-row .btn {
    width: auto; /* Ensures buttons fit content */
    padding: 10px 20px;
    font-weight: bold;
    border-radius: 5px;
}

/* Success Button Styling */
.styled-form-container .btn-success {
    background-color: #28a745;
    border: none;
}

.styled-form-container .btn-success:hover {
    background-color: #218838;
}

/* Secondary Button Styling */
.styled-form-container .btn-secondary {
    background-color: #6c757d;
    border: none;
}

.styled-form-container .btn-secondary:hover {
    background-color: #5a6268;
}

/* Responsive Adjustments for Smaller Screens */
@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr; /* Switch to single column on smaller screens */
    }
}
/* Full-Page Scroll Container */
.form-page-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 120px;
    min-height: 100vh;
    padding-bottom: 40px;
    background-color: #f9f9f9;
}

/* Styled Form Container */
.styled-form-container {
    width: 95%; /* Expanded width */
    max-width: 1200px; /* Set a larger max-width */
    background-color: #ffffff;
    padding: 40px;
    border: 1px solid #ddd;
    border-radius: 10px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    overflow: visible; /* Ensure no inner scroll */
}

/* Form Title Styling */
.styled-form-container h2 {
    color: #333;
    font-weight: bold;
    text-align: center;
    margin-bottom: 30px;
}

/* Three-Column Grid for Form Fields */
.form-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Three equal columns */
    gap: 20px; /* Space between fields */
}

/* Full-Width Row for Notes */
.full-width {
    grid-column: span 3; /* Spans across all three columns */
}

/* Individual Form Field Styling */
.form-row {
    display: flex;
    flex-direction: column;
}

.form-row input, .form-row select, .form-row textarea {
    width: 100%;
    padding: 12px; /* Increased padding for spacious look */
    border-radius: 5px;
    border: 1px solid #ccc;
}

/* Button Row Styling */
.button-row {
    grid-column: span 3; /* Makes the button row full width */
    display: flex;
    justify-content: flex-end; /* Aligns buttons to the right */
    gap: 10px; /* Space between Save and Cancel buttons */
}

.button-row .btn {
    width: auto; /* Ensures buttons fit content */
    padding: 10px 20px;
    font-weight: bold;
    border-radius: 5px;
}

/* Success Button Styling */
.styled-form-container .btn-success {
    background-color: #28a745;
    border: none;
}

.styled-form-container .btn-success:hover {
    background-color: #218838;
}

/* Secondary Button Styling */
.styled-form-container .btn-secondary {
    background-color: #6c757d;
    border: none;
}

.styled-form-container .btn-secondary:hover {
    background-color: #5a6268;
}

/* Responsive Adjustments for Smaller Screens */
@media (max-width: 992px) {
    .form-grid {
        grid-template-columns: repeat(2, 1fr); /* Switch to two columns on medium screens */
    }
}

@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr; /* Switch to single column on smaller screens */
    }
}

/* General Styling for Form Fields */
.form-row input, .form-row select, .form-row textarea {
    width: 100%;
    padding: 10px; /* Adjusted padding for consistency */
    border-radius: 5px;
    border: 1px solid #ccc;
    background-color: #fff; /* White background for visibility */
    color: #333; /* Dark text color for readability */
    font-size: 1em;
    line-height: 1.6; /* Slightly increased line-height for better visibility */
    box-sizing: border-box; /* Ensures padding is included in the width */
}

/* Specific Styling for Select (Dropdown) Elements */
.form-row select {
    appearance: none; /* Remove default arrow for consistency */
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 24px; /* Space for custom dropdown arrow */
    padding-top: 8px; /* Adjusted top padding to prevent clipping */
    padding-bottom: 8px; /* Adjusted bottom padding to prevent clipping */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5z' fill='%23333'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center; /* Position custom arrow */
    background-size: 12px;
}

/* Focus and Hover Styling */
.form-row select:focus,
.form-row input:focus {
    border-color: #80bdff;
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Login Page Styling */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #f9f9f9; /* Light background for contrast */
    padding: 20px;
}

.login-box {
    width: 100%;
    max-width: 400px;
    background-color: #ffffff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); /* Soft shadow for depth */
}

.login-box h2 {
    color: #333;
    font-weight: bold;
    text-align: center;
    margin-bottom: 20px;
}

/* Form Group Styling */
.login-box .form-group label {
    font-weight: bold;
    color: #555;
}

.login-box .form-group input {
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #ccc;
    width: 100%;
    box-sizing: border-box;
}

/* Button Styling */
.login-box .btn-primary {
    background-color: #007bff;
    border: none;
    padding: 10px;
    border-radius: 5px;
    font-weight: bold;
    margin-top: 15px;
}

.login-box .btn-primary:hover {
    background-color: #0056b3;
}

/* Error Messages */
.messages p {
    color: #d9534f; /* Red color for error messages */
    text-align: center;
    font-weight: bold;
}
label span {
    color: red;
    font-weight: bold;
}
/* Style for Vehicle List Table */

.vehicle-list-container {
    max-height: 400px; /* Reduced height for better visibility of buttons */
    overflow-y: auto; /* Enables vertical scrolling for the table body */
    overflow-x: auto; /* Enables horizontal scrolling */
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */
    margin-top: 20px; /* Space between buttons and table */
}

.vehicle-list-table {
    font-size: 0.85rem; /* Slightly increased font size for better readability */
    border-collapse: collapse;
    text-align: center;
    width: 100%;
    table-layout: auto;
    position: relative; /* Added for sticky header support */
}

.vehicle-list-table th {
    background-color: #343a40;
    color: white;
    white-space: nowrap;
    padding: 10px;
    font-size: 0.9rem; /* Slightly larger font for the header */
    text-align: center;
    position: sticky; /* Makes the header fixed while scrolling */
    top: 0; /* Sticks to the top of the container */
    z-index: 2; /* Ensures it stays above table rows */
}

.vehicle-list-table td {
    padding: 10px;
    vertical-align: middle;
}

.action-buttons {
    display: flex; /* Align buttons horizontally */
    gap: 5px; /* Add spacing between buttons */
    justify-content: center; /* Center buttons within the cell */
    align-items: center; /* Vertically align buttons */
    white-space: nowrap; /* Prevent text wrapping */
}

.pagination {
    margin-top: 10px;
}

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

/* Action Buttons - Ensure they are aligned in a row */
.vehicle-list-table .btn {
    font-size: 0.75rem;
    padding: 4px 8px;
    margin: 2px;
    display: inline-block;
}

.vehicle-list-table .btn-sm {
    font-size: 0.8rem;
    padding: 4px 10px;
}

/* Optional: Add hover effect for table rows */
.vehicle-list-table tbody tr:hover {
    background-color: #f1f1f1;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .vehicle-list-table th, .vehicle-list-table td {
        font-size: 0.7rem;
    }
}
.fixed-add-button {
    position: relative;
    margin-left: 15px; /* Space from the dropdown */
}

.header-logo img {
    height: 60px; /* Adjust the height as needed */
    width: auto; /* Maintain the aspect ratio */
    max-width: 100%; /* Ensure the logo doesn't overflow the container */
    object-fit: contain; /* Ensure the logo is resized proportionally */
}
.vehicle-list-title {
    font-size: 1.5rem;
    font-weight: 500;
    color: #333;
    margin: 0;
    text-align: left; /* Align text to the left */
}

.d-flex.justify-content-between {
    align-items: center; /* Ensure alignment of title and button */
}
.btn-success i {
    margin-right: 5px; /* Space between icon and text */
}

.d-flex.justify-content-between .btn-success {
    display: flex;
    align-items: center; /* Align icon with button text */
    margin-right: 10px; /* Space between Export and Add buttons */
}

/* General Styling for Select (Dropdown) Elements */
select {
    width: 100%;
    padding: 12px; /* Adjust padding to ensure text fits */
    border-radius: 5px;
    border: 1px solid #ccc;
    font-size: 1rem; /* Ensure consistent font size */
    line-height: 1.6; /* Adjust line-height to prevent clipping */
    appearance: none; /* Remove browser-specific styles */
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5z' fill='%23333'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center; /* Align dropdown arrow */
    background-size: 12px;
}

/* Fix for selected value visibility */
select option {
    padding: 10px; /* Add padding for dropdown options */
    line-height: 1.6; /* Ensure line height matches select field */
}

/* Focus and hover styling for better interaction */
select:focus,
select:hover {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 4px rgba(0, 123, 255, 0.5);
}

/* Responsive adjustments for select elements */
@media (max-width: 768px) {
    select {
        font-size: 0.9rem; /* Slightly smaller font size for mobile */
        padding: 10px; /* Adjust padding for smaller screens */
    }
}
select.form-control {
    
    height: 40px; /* Adjust height for consistency */
    line-height: 1.5; /* Ensure vertical alignment */
    background-color: #fff; /* Keep default background */
}
@media (max-width: 768px) {
    /* Adjust the container for mobile */
    .options-container {
        grid-template-columns: 1fr; /* Single column for tiles */
        gap: 15px; /* Reduced spacing between tiles */
        padding: 10px; /* Add padding to the container */
    }

    /* Adjust tiles for smaller screens */
    .option-card {
        width: 90%; /* Take up 90% of the screen width */
        height: auto; /* Adjust height dynamically */
        font-size: 1.2em; /* Slightly smaller font size */
        padding: 15px; /* Add padding inside the tile */
        margin: 0 auto; /* Center-align the tile */
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1); /* Softer shadow for smaller screens */
    }

    /* Adjust tile background icon for smaller tiles */
    .card-fleet, .card-employee, .card-invoices, .card-incidents {
        background-size: 60px; /* Smaller background icon */
        background-position: center 10px; /* Adjust position of the icon */
    }

    /* Reduce text margin */
    .option-card h3 {
        margin-top: 10px; /* Reduce margin above text */
        font-size: 1em; /* Smaller text for compact layout */
    }

    /* Add space between the last tile and the bottom of the screen */
    .options-container:last-child {
        margin-bottom: 20px;
    }
}
@media (max-width: 768px) {
    /* Adjust the sidebar for smaller screens */
    .sidebar {
        width: 100%; /* Sidebar takes full width */
        height: auto; /* Adjust height dynamically */
        position: relative; /* Remove fixed positioning */
        padding: 10px; /* Add padding for better spacing */
        background-color: #333; /* Keep sidebar background */
        z-index: 1000; /* Ensure it appears behind other content when collapsed */
    }

    /* Ensure links in the sidebar stack vertically */
    .sidebar a {
        display: block;
        margin: 10px 0; /* Add space between links */
        font-size: 1rem; /* Adjust font size for readability */
    }

    /* Adjust the main content */
    .main-content {
        margin-left: 0; /* Remove margin caused by the desktop sidebar */
        padding: 15px; /* Add padding for better spacing */
    }

    /* Options Container Adjustments */
    .options-container {
        margin-top: 20px; /* Add spacing between the sidebar and tiles */
    }
}
/* Style for smaller buttons */
.btn-sm {
    padding: 5px 10px;
    font-size: 0.875rem;
    border-radius: 4px;
}

/* Right-align the Next button */
.button-row .btn-primary {
    margin-left: auto; /* Align Next button to the right */
    padding: 5px 15px; /* Smaller button size for Next */
    font-size: 0.875rem;
}

.button-row .btn-success, .button-row .btn-secondary {
    width: 45%; /* Save and Cancel take equal space */
    text-align: center;
    padding: 10px 20px;
    font-size: 1rem;
    border-radius: 5px;
}

/* Next button alignment */
.mb-3 {
    margin-bottom: 1rem !important;
}

.d-flex.justify-content-end {
    display: flex;
    justify-content: flex-end;
}

/* Save and Cancel buttons styling */
.button-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
}

.button-row .btn-success {
    width: 100%;
    padding: 10px 20px;
    font-size: 1rem;
    text-align: center;
    margin-right: 15px; /* Optional margin for spacing */
    border-radius: 5px;
}

.button-row .btn-secondary {
    width: 100%;
    padding: 10px 20px;
    font-size: 1rem;
    text-align: center;
    border-radius: 5px;
}
/* Reduce size of Next button */
.btn-sm {
    font-size: 0.875rem;
    padding: 6px 12px;
}

/* Ensure Next button is aligned properly */
.d-flex.justify-content-end {
    margin-bottom: 10px; /* Space below Next button */
}

/* Align the NEXT button to the right on its own row */
.button-row .btn-next {
    float: right;
    margin-bottom: 10px;
    padding: 6px 12px; /* Adjust padding for a smaller size */
    font-size: 0.875rem; /* Smaller font size */
    border-radius: 5px;
}

/* Submit button styling (full width) */
.button-row .btn-submit,
.button-row .btn-cancel {
    width: 100%; /* Ensure both buttons are the same width */
    padding: 10px 20px;
    font-size: 1rem;
    text-align: center;
    border-radius: 5px;
}

/* Reduce the gap between Submit and Cancel buttons */
.button-row .btn-submit {
    margin-bottom: 5px; /* Small gap below Submit button */
}
/* Employee List Table */
.employee-list-table {
    font-size: 0.9rem;
    border-collapse: collapse;
    text-align: center;
    width: 100%;
    table-layout: auto; /* Allows dynamic column widths */
}

.employee-list-table th {
    background-color: #343a40; /* Black background for the header */
    color: white;
    white-space: nowrap; /* Prevents header text wrapping */
    padding: 10px;
    font-size: 0.85rem;
    text-align: center;
    position: sticky; /* Keeps the header fixed during vertical scrolling */
    top: 0;
    z-index: 2; /* Ensures the header stays above table content */
    border-bottom: 2px solid #ddd; /* Adds a subtle border for clarity */
}

.employee-list-table td {
    padding: 8px;
    vertical-align: middle;
    border-bottom: 1px solid #ddd; /* Adds a border between rows */
    text-overflow: ellipsis; /* Ensures overflowing text is truncated */
    white-space: nowrap; /* Prevents text wrapping */
    overflow: hidden; /* Ensures text stays within the cell */
}


/* Custom width for specific columns */
.employee-list-table th:nth-child(9), /* Start Date Header */
.employee-list-table td:nth-child(9) { /* Start Date Data */
    min-width: 140px; /* Ensures enough space for date */
    max-width: 180px; /* Prevents the column from becoming too wide */
    text-align: center; /* Align date values centrally */
}

/* General adjustments for better visibility */
.employee-list-table th,
.employee-list-table td {
    border: 1px solid #ddd; /* Uniform borders for table cells */
}

.employee-list-table th,
.employee-list-table td {
    vertical-align: middle; /* Align content in the middle */
}

/* Hover effect for rows */
.employee-list-table tbody tr:hover {
    background-color: #f9f9f9; /* Highlight row on hover */
}

.export-add-buttons-container {
    position: sticky; /* Fixes the position */
    top: 0; /* Sticks to the top of the page */
    z-index: 10; /* Ensures it stays above other elements */
    background-color: #fff; /* Optional: matches the background color */
    padding: 10px; /* Adds padding for a cleaner look */
    border-bottom: 1px solid #ccc; /* Optional: adds a subtle border */
}


/* Flex-wrap for responsive pagination and controls */
.flex-wrap {
    flex-wrap: wrap;
}

/* Margin adjustments for dropdown and pagination */
.mb-2 {
    margin-bottom: 0.5rem !important;
}
/* Sticky header for Employee List */
.sticky-header-container {
    position: sticky;
    top: 70px; /* Adjust based on header height, e.g., navbar */
    z-index: 10;
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Optional: subtle shadow for clarity */
    border-bottom: 1px solid #ddd;
}
/* Fixed header for the employee list table */
.fixed-header-table {
    max-height: 400px; /* Set a fixed height for the table content */
    overflow-y: auto; /* Enable vertical scrolling */
    position: relative; /* Positioning context for header */
}

/* Fixed header for the employee list table */
/* Fixed header for the employee list table */

/* Fixed header for the employee list table */
.fixed-header-table thead th {
    position: sticky;
    top: 0;
    background-color: #000000; /* Set header background color to black */
    color: #ffffff; /* Set header text color to white */
    z-index: 5; /* Ensure header stays above content */
    font-weight: bold; /* Make header text bold */
    text-align: center; /* Center align header text */
    border-bottom: 2px solid #444; /* Subtle bottom border for separation */
    padding: 10px; /* Add spacing for readability */
}

/* Table Body Styling */
.fixed-header-table tbody td {
    color: #000000; /* Keep body text black */
    background-color: #ffffff; /* Ensure body cells have a white background */
    padding: 8px; /* Add consistent spacing */
    border: 1px solid #ddd; /* Match the border styling */
    vertical-align: middle; /* Align text vertically in the middle */
}


.fixed-header-table table {
    width: 100%; /* Ensures the table spans the full width of the container */
    border-collapse: collapse;
}

/* Add spacing below the search bar */
/* Add spacing for the search bar */

/* Ensure the search bar is separated and fully visible */


/* Adjust the employee list container */
.employee-list-container {
    margin-top: 10px; /* Adds spacing between the search bar and the table */
    max-height: 500px; /* Keeps table scrolling intact */
    overflow-x: auto;
    overflow-y: auto;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    background-color: #fff;
}

.sticky-header-container .d-flex {
    flex-wrap: wrap; /* Allows wrapping on smaller screens */
    gap: 10px; /* Adds spacing between elements */
}

.search-bar-container form {
    display: flex;
    gap: 5px; /* Adds space between input and button */
}

/* Add margins for better spacing */
.search-bar-container {
    margin-top: 10px;
}

select {
    height: auto;
    padding: 5px;
    border-radius: 4px;
    border: 1px solid #ccc;
    background-color: #fff;
}

#employee-list-left,
#employee-list-right {
    height: 300px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#search-employee-left,
#search-employee-right {
    margin-bottom: 1rem;
    width: 100%;
    padding: 5px 10px;
    border-radius: 4px;
    border: 1px solid #ccc;
}

button {
    width: auto; /* Allow the button to adjust based on text */
    padding: 10px 20px; /* Add sufficient padding for readability */
    font-size: 1rem; /* Set a consistent and readable font size */
    white-space: nowrap; /* Prevent text wrapping */
    text-align: center;
    border-radius: 4px; /* Optional: Add rounded corners for modern styling */
    transition: all 0.2s ease; /* Add smooth hover effects */
}

button:hover {
    transform: scale(1.05); /* Slightly enlarge on hover */
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2); /* Add a shadow for hover effect */
}

.btn-success {
    background-color: #28a745; /* Green background */
    color: white; /* White text */
    border: 1px solid #28a745; /* Green border */
}

.btn-success:hover {
    background-color: #218838; /* Darker green on hover */
    border-color: #1e7e34;
}

.btn-warning {
    background-color: #ffc107; /* Yellow background */
    color: #212529; /* Dark text for contrast */
    border: 1px solid #ffc107;
}

.btn-warning:hover {
    background-color: #e0a800; /* Darker yellow on hover */
    border-color: #d39e00;
}

.d-flex.justify-content-end button {
    margin-left: 10px; /* Ensure proper spacing between the buttons */
}
.existing-slots {
    margin-top: 20px;
    border: 1px solid #ddd;
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 8px;
    max-height: 200px;
    overflow-y: auto;
}

.slot-card {
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 10px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #fff;
}

.slot-card h6 {
    margin: 0;
    font-size: 16px;
}

.slot-card .actions button {
    margin-left: 5px;
}

.form-group {
    margin-bottom: 15px;
}

.form-label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    color: #555;
}

.form-control {
    width: 100%;
    padding: 8px 10px;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.form-control:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
}

.btn {
    padding: 10px 20px;
    font-size: 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    color: #fff;
    background-color: #007bff;
    transition: background-color 0.3s ease;
}

.btn:hover {
    background-color: #0056b3;
}

.btn:active {
    background-color: #004085;
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 100%; /* Allow the container to take full width */
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}



.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}



.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}


.form-group {
    margin-bottom: 15px;
}


.btn-primary {
    background-color: #007bff;
    border-color: #007bff;
    padding: 10px 20px;
    font-size: 16px;
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
}

.btn-primary:hover {
    background-color: #0056b3;
}

.form-actions {
    text-align: center;
    margin-top: 20px;
}


h1 {
    font-size: 2rem;
    color: #333;
    text-align: center;
    margin-bottom: 20px;
    margin-top: 20px; /* Add space above the title */
}

/* Main Content Wrapper */
.main-content-wrapper {
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}


/* Modal Adjustments */
.modal-content {
    max-height: 100vh; /* Ensure modal fits within the screen */
    overflow-y: auto; /* Add scroll if content exceeds height */
    width: 80%;
    max-width: 600px;
    margin: auto;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Modal Header */
.modal-header {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
    text-align: center;
    margin-bottom: 20px;
}

/* Employee List */
.employee-list {
    max-height: 300px; /* Increased height for better scrollable view */
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px;
    background-color: #f9f9f9;
    margin-top: 10px;
}

/* Responsive Adjustments for Calendar */
@media (max-width: 992px) {
    #calendar {
        width: 95%; /* Take more width on smaller screens */
        height: 70vh; /* Adjust height for better visibility */
    }
}

@media (max-width: 768px) {
    #calendar {
        width: 100%; /* Use full width on mobile devices */
        height: 60vh; /* Reduce height slightly for smaller screens */
    }
}

/* Ensure "Roster Management" is visible */
.page-title {
    font-size: 2.5rem;
    text-align: center;
    margin-top: 20px; /* Add spacing above the title */
    margin-bottom: 20px;
    color: #333;
}

#calendar {
    width: 95%; /* Expanded width for better visibility */
    height: 70vh; /* Adjust height for more slots */
    margin: 0 auto;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Modal adjustments for Add/Edit slot */

/* Ensure Save button is visible */
.form-actions {
    text-align: center;
    margin-top: 20px;
}
/* 🌟 Route Dashboard Container */
/* ✅ FIX 3: Set Correct Height for Full Page Scrolling */
.route-dashboard-container {
    height: calc(100vh - 80px); /* ✅ Ensures full-page scroll */
    overflow: auto; /* ✅ Allows scrolling */
}

/* ✅ FIX 4: Table Container Should Scroll Separately */
.handsontable-container {
    max-height: calc(100vh - 120px); /* ✅ Adjust height to fit content */
    overflow: auto;
    border: 1px solid #ddd;
}

/* 🌟 Dashboard Title */
.dashboard-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #003366;
}

/* 🌟 Actions Bar (Search + Export) */
.actions-bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 15px;
    background: white;
    padding: 10px;
    border-bottom: 2px solid #ddd;
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.1); /* ✅ Slight shadow effect */
}


/* 🌟 Search Input */
.search-input {
    width: 250px;
    height: 38px;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

/* 🌟 Export Button */
.btn-success {
    padding: 10px 20px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn-success:hover {
    background-color: #218838;
}

/* 🌟 Handsontable (Table) Styling */
.handsontable {
    width: 100%;
}

/* 🌟 Table Header Styling */
.handsontable thead th {
    background-color: #003366 !important; /* Dark Blue */
    color: white !important;
    text-align: center;
    font-size: 14px;
    padding: 10px;
    border: 1px solid #ccc !important;
}

/* 🌟 Alternate Row Colors (✅ Fixed) */
.handsontable tbody tr:nth-child(odd) td {
    background-color: #ffffff !important; /* White */
}

.handsontable tbody tr:nth-child(even) td {
    background-color: #f2f2f2 !important; /* Light Gray */
}

/* 🌟 Table Borders */
.handsontable td,
.handsontable th {
    border: 1px solid #ddd !important;
}

.handsontable thead th,
.handsontable td {
    text-align: left !important;
    padding-left: 10px; /* Optional: Adds slight padding for better spacing */
}

/* 🌟 Pagination */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
}

/* 🌟 Pagination Buttons */
.page-indicator {
    font-weight: bold;
    font-size: 16px;
}

.btn-dark {
    padding: 8px 15px;
    font-size: 14px;
    border-radius: 4px;
    background-color: #333;
    color: white;
    cursor: pointer;
}

.btn-dark:hover {
    background-color: #555;
}

/* 🌟 Pagination Buttons Styling */
.dataTables_paginate {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
}

.dataTables_paginate a {
    padding: 8px 15px;
    border-radius: 4px;
    background-color: #f1f1f1;
    color: #007bff;
    text-decoration: none;
    border: 1px solid #ccc;
}

.dataTables_paginate .current {
    background-color: #007bff;
    color: #fff;
}

.dataTables_paginate a:hover {
    background-color: #0056b3;
    color: white;
}

/* 🌟 Responsive Adjustments */
@media (max-width: 1024px) {
    .handsontable thead th {
        font-size: 12px; /* ✅ Slightly smaller for mobile */
        padding: 8px; /* ✅ Adjust padding */
    }

    .handsontable-container {
        max-height: calc(100vh - 160px); /* ✅ More space for action bar */
    }
}

@media (max-width: 768px) {
    .handsontable thead th {
        font-size: 11px; /* ✅ Smaller text on mobile */
        padding: 6px; /* ✅ Compact padding */
    }

    .handsontable-container {
        max-height: calc(100vh - 180px); /* ✅ Prevents overlapping on mobile */
    }
}

/* 📅 Calendar Icon */
.calendar-icon {
    cursor: pointer;
    font-size: 18px;
    padding: 5px 8px;
    background-color: #007bff;
    color: white;
    border-radius: 4px;
    display: inline-block;
    text-align: center;
    transition: background-color 0.3s ease;
}

.calendar-icon:hover {
    background-color: #0056b3;
}

/* 📅 Hidden Date Picker (Only Appears When Clicked) */
#date-picker {
    position: absolute;
    z-index: 1000;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: white;
    display: none; /* Hidden by default */
}


/* No Records Message */
.no-records-message {
    font-size: 16px;
    font-weight: bold;
    color: #d9534f;
    text-align: center;
    padding: 10px;
}

.dropdown-cell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 100%;
    white-space: nowrap;
    overflow: hidden;
    padding-right: 5px; /* Ensures text does not touch the dropdown */
}

.cell-text {
    flex-grow: 1;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

.dropdown-icon {
    font-size: 12px;
    cursor: pointer;
    color: #007bff;
    padding-left: 5px;
    padding-right: 2px;
}
.no-data-message {
    text-align: center;
    font-size: 16px;
    font-weight: bold;
    color: red;
    margin-top: 20px;
}

.route-heading {
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #003366; /* Dark blue for consistency */
}

/* 🌟 Adjust Main Content Padding */

.accessories-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 85%;
    margin: 0 auto;
    padding-top: 10px;
}



/* ✅ Accessories Heading */
.accessories-heading {
    position: sticky;
    top: 60px; /* ✅ Positioned below the main header */
    background-color: transparent; /* ✅ No white box */
    z-index: 102; /* ✅ Higher than table but below tabs */
    padding-bottom: 10px; /* ✅ Space between heading & tabs */
}

/* ✅ Accessories Tabs */
.accessories-tabs {
    position: sticky;
    top: 110px; /* ✅ Moved down below heading */
    background-color: transparent;
    z-index: 101; /* ✅ Slightly lower than heading */
    padding-top: 5px; /* ✅ Space between tabs & search */
}

/* 🌟 Improve Tab Button Styling */
.accessories-tab-btn {
    padding: 8px 16px;
    background: #003366;
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 4px;
    font-size: 14px;
}
.accessories-tab-btn.active {
    background: #007bff;
}
.accessories-tab-btn:hover {
    background: #0056b3;
}

.accessories-controls {
    position: sticky;
    top: 150px; /* ✅ Positioned below the tabs */
    background-color: white; /* ✅ Matches the background (avoids transparency issues) */
    z-index: 100;
    display: flex;
    justify-content: flex-end; /* ✅ Aligns Search & Export to the right */
    align-items: center;
    padding: 8px 15px; /* ✅ Adjusts spacing */
    gap: 10px; /* ✅ Ensures proper spacing between elements */
    width: 100%;
    border-bottom: 1px solid #ddd; /* ✅ Adds subtle separation from the table */
    
}


/* 🌟 Adjust Search Box */
.accessories-search {
    width: 250px;
    padding: 6px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

/* 🌟 Export Button */
.accessories-export {
    padding: 6px 12px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}
.accessories-export:hover {
    background-color: #218838;
}

.accessories-table-container {
    margin-top: 120px;
    overflow-y: auto; /* ✅ Enables scrolling for table */
    max-height: calc(100vh - 180px); /* ✅ Adjust height dynamically */
    padding-right: 15px; /* ✅ Ensures no cutoff */
}   




/* 🌟 Ensure it adapts for smaller screens */
@media screen and (max-width: 1024px) {
    .accessories-table-container { 
        width: 100%; /* ✅ Full width on small screens */
        margin-left: 0; /* ✅ Remove unnecessary margins */
        padding-left: 10px;
    }
}

/* 🌟 Table Styling */
.accessories-table {
    width: 100%;
    max-width: none;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 14px; /* Match Route Dashboard */
}

/* 🌟 Table Headers */
.accessories-table thead {
    background-color: #003366;
    color: white;
}

/* 🌟 Table Cells */
.accessories-table th,
.accessories-table td {
    padding: 8px;
    border: 1px solid #ddd;
    text-align: left;
    white-space: nowrap; /* Prevent wrapping */
}

/* 🌟 Ensure Column Consistency */
.accessories-table th:nth-child(1),
.accessories-table td:nth-child(1) {
    width: 15%;
}
.accessories-table th:nth-child(2),
.accessories-table td:nth-child(2) {
    width: 20%;
}
.accessories-table th:nth-child(3),
.accessories-table td:nth-child(3) {
    width: 15%;
}
.accessories-table th:nth-child(4),
.accessories-table td:nth-child(4) {
    width: 10%;
}
.accessories-table th:nth-child(5),
.accessories-table td:nth-child(5) {
    width: 20%;
}
.accessories-table th:nth-child(6),
.accessories-table td:nth-child(6) {
    width: 20%;
}

/* 🌟 Edit & Delete Buttons */

/* 🌟 Updated Button Styling for Accessories (Matching Vehicle Module) */
.accessories-edit {
    background-color: #17a2b8; /* Blue color for Edit */
    color: white;
    padding: 5px 10px;
    border: none;
    cursor: pointer;
    border-radius: 4px;
    font-size: 12px;
}

.accessories-edit:hover {
    background-color: #138496; /* Slightly darker on hover */
}

.accessories-delete {
    background-color: #dc3545; /* Red color */
    color: white;
    padding: 5px 10px;
    border: none;
    cursor: pointer;
    border-radius: 4px;
    font-size: 12px;
}

.accessories-delete:hover {
    background-color: #c82333; /* Slightly darker on hover */
}


.accessories-add {
    padding: 6px 12px;
    background-color: #007bff; /* ✅ Blue for Add Button */
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.accessories-add:hover {
    background-color: #0056b3;
}

.accessories-form-row {
    display: flex;
    flex-direction: column;
    min-height: 75px;  /* Ensures consistent spacing even without validation errors */
    margin-bottom: 10px;
}

.accessories-form-row .form-error {
    color: red;
    margin-top: 4px;
    font-size: 12px;
}

.accessories-form-row .form-label {
    margin-bottom: 5px;
}

.rescue-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #ffffff;
    border-radius: 12px;
    padding: 25px 30px;
    width: 400px;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    font-family: 'Segoe UI', sans-serif;
  }
  
  .rescue-modal h4 {
    margin-top: 0;
    font-size: 20px;
    font-weight: 600;
    color: #333;
  }
  
  .modal-form-group {
    margin-bottom: 20px;
  }
  
  .modal-form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #444;
  }
  
  .modal-select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 15px;
    background-color: #f9f9f9;
  }
  
  #rescueSubmitBtn {
    width: 100%;
    padding: 10px;
    font-weight: 600;
    font-size: 16px;
    border-radius: 6px;
    background-color: #007bff;
    border: none;
    color: white;
    cursor: pointer;
    transition: background-color 0.2s ease;
  }
  
  #rescueSubmitBtn:hover {
    background-color: #0056b3;
  }
  
  .rescue-modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 20px;
    cursor: pointer;
    color: #999;
  }
  
  .rescue-modal-close:hover {
    color: #333;
  }
/* 🔶 Final override with extra specificity */
.handsontable .htCore tr td.rescue-highlight {
    background-color: #fff9c4 !important;
}

  
.workflow-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.6rem;
    margin: 12px auto 18px auto;
    font-size: 0.9rem;
    font-weight: 500; /* ✅ Lighter font weight */
}

.workflow-nav a {
    text-decoration: none;
    color: #003366;
    padding: 6px 12px;
    background-color: #f2f2f2;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.workflow-nav a.active {
    background-color: #cce5ff;  /* ✅ Subtle blue highlight */
    color: #003366;
}

.workflow-nav a:hover:not(.active) {
    background-color: #eaeaea;
}



#saveAllBtn {
    background-color: #0d6efd; /* Bootstrap Primary Blue */
    color: white;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 18px 8px 16px;
    border: none;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

#saveAllBtn:hover {
    transform: translateY(-2px);
    background-color: #0b5ed7;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
}

#saveAllBtn .save-icon {
    font-size: 16px;
}
.toast-container {
    position: fixed;
    bottom: 90px;
    right: 20px;
    z-index: 10000;
    min-width: 250px;
    max-width: 400px;
    padding: 0;
}

.toast-message {
    padding: 12px 18px;
    font-size: 14px;
    color: white;
    background-color: #198754; /* Success green */
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    animation: fadeInOut 3s ease forwards;
}

.toast-message.error {
    background-color: #dc3545; /* Bootstrap red */
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translateY(20px); }
    10% { opacity: 1; transform: translateY(0); }
    90% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-10px); }
}


.print-modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.5);
  z-index: 2000;
  justify-content: center;
  align-items: center;
}

.print-modal-content {
  background: #fff;
  padding: 30px;
  border-radius: 8px;
  width: 70%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.print-modal-content h3 {
  margin-top: 0;
  font-size: 20px;
  margin-bottom: 20px;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.print-modal-actions {
  margin-top: 25px;
  display: flex;
  justify-content: flex-end;
  gap: 15px;
}

.btn {
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
}

.btn-primary {
  background-color: #007bff;
  color: #fff;
}

.btn-secondary {
  background-color: #ccc;
  color: #333;
}

.handsontable .htCore tr td.ridealong-green {
    background-color: #c8e6c9 !important;  /* light green */
}

/* Keep Save All as-is */
.save-all-footer {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
}

/* Summary fixed bottom-left, aligned with table container */
.summary-footer {
  position: fixed;
  bottom: 20px;
  left: 250px; /* adjust if your sidebar/menu width changes */
  z-index: 9998;
}

/* Summary inline layout */
.summary-inline {
  display: flex;
  gap: 12px;
  font-weight: 600;
}

.summary-inline .pill {
  background: #f8f9fa;              /* soft gray background */
  border: 1px solid #d1d5db;        /* subtle border */
  border-radius: 20px;              /* pill shape */
  padding: 6px 14px;
  font-size: 14px;
  font-weight: 600;
  color: #003366;                   /* matches your header dark blue */
  box-shadow: 0 1px 3px rgba(0,0,0,0.1); /* soft shadow for depth */
  transition: background 0.2s, color 0.2s;
}

.summary-inline .pill:hover {
  background: #003366;   /* dark blue on hover */
  color: #fff;           /* white text */
  cursor: default;
}


/* Responsive sidebar collapse handling */
@media (max-width: 1100px) {
  .summary-footer { left: 160px; }
}

@media (max-width: 900px) {
  .summary-footer { left: 100px; }
}

@media (max-width: 768px) {
  .summary-footer { left: 40px; }
}

.icon-btn {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 2px 4px;
}
.icon-btn.danger { filter: grayscale(0.2); transition: transform .1s, filter .15s; }
.icon-btn.danger:hover { transform: scale(1.1); filter: none; }



/* =======================================================
   Employee Management — Accessories-matched styling
   (centered heading, sticky controls, inner scroll, sorting)
   + Safe fixes for header/cell overlap via clipping/ellipsis
   ======================================================= */

.employee-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 85%;
  margin: 0 auto;
  padding-top: 10px;
}

/* ── Page Heading (sticky, centered) ─────────────────── */
.employee-heading {
  position: sticky;
  top: 60px;                 /* adjust if your global navbar height differs */
  z-index: 102;
  width: 100%;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;   /* center icon + text */
  text-align: center;
  margin-bottom: 8px;
}
.employee-heading h1 {
  font-size: 28px;
  font-weight: 700;
  color: #003366;
}
.employee-heading .fa,
.employee-heading i { margin-right: 8px; }

/* ── Controls row (sticky, like Accessories) ─────────── */
.employee-controls {
  position: sticky;
  top: 110px;                /* sits below heading */
  z-index: 101;
  width: 100%;
  background: #fff;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  padding: 8px 15px;
  border-bottom: 1px solid #ddd;
}
.employee-search {
  width: 250px;
  padding: 6px 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
}
.employee-export {
  padding: 6px 12px;
  background: #28a745;
  color: #fff;
  border: none;
  border-radius: 4px;
}
.employee-export:hover { background: #218838; }
.employee-add {
  padding: 6px 12px;
  background: #007bff;
  color: #fff;
  border: none;
  border-radius: 4px;
}
.employee-add:hover { background: #0056b3; }

/* ── Scrollable table area (inner scroll) ────────────── */
.employee-table-container {
  margin-top: 120px;                     /* clear sticky controls */
  overflow-y: auto;                      /* inner vertical scroll */
  max-height: calc(100vh - 180px);       /* viewport-based */
  padding-right: 15px;                   /* avoid scrollbar covering text */
  width: 100%;
}

/* ── Table base styling ──────────────────────────────── */
.employee-table {
  width: 100%;
  max-width: none;
  border-collapse: collapse;
  table-layout: fixed;                   /* ensures <colgroup> widths respected */
  font-size: 14px;
}

/* Header bar */
.employee-table thead {
  background: #003366;
  color: #fff;
}

/* Cells */
.employee-table th,
.employee-table td {
  padding: 8px;
  border: 1px solid #ddd;
  text-align: left;                      /* body left; header centered below */
  white-space: nowrap;                   /* single-line cells (we clip long text) */
  height: 44px;
  line-height: 1.2;
}

/* Prevent label overlap + tidy sort arrow in headers */
.employee-table thead th {
  position: relative;                    /* anchor for arrow */
  overflow: hidden;                      /* clip long header labels */
  text-overflow: ellipsis;
  white-space: nowrap;
  padding-right: 22px;                   /* space for arrow */
  text-align: center;                    /* centered header text */
}

/* Sort arrow pinned to right */
.employee-table thead th .sort-arrow {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  margin: 0;
  pointer-events: none;                  /* clicks still hit the th */
  opacity: .9;
  font-size: 12px;
}

/* Clip long body cell text with ellipsis to prevent bleed */
.employee-table td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Make clickable headers feel interactive */
.employee-table .sortable { cursor: pointer; user-select: none; }

/* ── Action buttons in table ─────────────────────────── */
.employee-edit {
  background: #0d6efd;
  color: #fff;
  padding: 5px 10px;
  border: none;
  border-radius: 4px;
  font-size: 12px;
  display: inline-block;
}
.employee-edit:hover { background: #0b5ed7; }

.employee-delete {
  background: #dc3545;
  color: #fff;
  padding: 5px 10px;
  border: none;
  border-radius: 4px;
  font-size: 12px;
  display: inline-block;
  margin-left: 6px;
}
.employee-delete:hover { background: #c82333; }

/* ── Column widths via <colgroup> classes ──────────────
   Add the <colgroup> with these classes in your table:
   <col class="col-action"> ... etc.
   This keeps header/body widths consistent and gives room
   to longer fields (email, position qual, shift, etc.)
   ------------------------------------------------------ */
.employee-table col.col-action        { width: 140px; } /* Edit/Delete */
.employee-table col.col-sno           { width: 80px; }
.employee-table col.col-transporte    { width: 120px; }
.employee-table col.col-first         { width: 140px; }
.employee-table col.col-last          { width: 140px; }
.employee-table col.col-ssn           { width: 110px; }
.employee-table col.col-status        { width: 110px; }
.employee-table col.col-status-reason { width: 200px; }
.employee-table col.col-start-date    { width: 130px; }
.employee-table col.col-position      { width: 140px; }

/* Wider for the problem columns you highlighted */
.employee-table col.col-pos-qual      { width: 240px; } /* Position Qualification */
.employee-table col.col-phone         { width: 170px; }
.employee-table col.col-email         { width: 260px; } /* Preferred Email */
.employee-table col.col-dl-exp        { width: 140px; }
.employee-table col.col-payroll       { width: 160px; }
.employee-table col.col-shift         { width: 170px; }

/* ── Responsive tweaks ───────────────────────────────── */
@media (max-width: 1024px) {
  .employee-table-container { width: 100%; margin-left: 0; padding-left: 10px; }
}

/* === Switch to PAGE scroll (keep horizontal scroll in table) === */
.employee-container { --heading-height: 0px; --sticky-offset: 0px; }

.employee-heading{
  position: sticky;
  top: 0;                      /* stick to very top */
  z-index: 102;
  background: #fff;            /* prevents see-through when sticky */
}

.employee-controls{
  position: sticky;
  top: var(--heading-height);  /* sits right below the heading */
  z-index: 101;
  background: #fff;
  border-bottom: 1px solid #ddd;
}

/* table area now only handles horizontal scroll */
.employee-table-container{
  overflow-x: auto;            /* keep horizontal scroll for wide tables */
  overflow-y: visible !important;   /* let the PAGE own vertical scrolling */
  max-height: none !important;
  height: auto !important;
  margin-top: 0;               /* heading/controls are sticky now, no spacer */
  padding-right: 15px;
}

/* table header sticks under controls using computed offset */
.employee-table thead th{
  position: sticky;
  top: var(--sticky-offset);   /* total height of heading + controls */
  z-index: 50;
}
/* === Sticky offsets that include the global app header === */
.employee-container{
  --global-header: 0px;      /* measured via JS */
  --heading-height: 0px;     /* measured via JS */
  --controls-height: 0px;    /* measured via JS */
}

/* Heading sits just below the global app header */
.employee-heading{
  position: sticky;
  top: var(--global-header);
  z-index: 102;
  background: #fff;
}

/* Controls row sits below global header + heading */
.employee-controls{
  position: sticky;
  top: calc(var(--global-header) + var(--heading-height));
  z-index: 101;
  background: #fff;
  border-bottom: 1px solid #ddd;
}

/* Table uses PAGE vertical scroll; only horizontal scroll here */
.employee-table-container{
  overflow-x: auto;
  overflow-y: visible !important;
  max-height: none !important;
  height: auto !important;
  margin-top: 0;
  padding-right: 15px;
}

/* Table header sticks below global header + heading + controls */
.employee-table thead th{
  position: sticky;
  top: calc(var(--global-header) + var(--heading-height) + var(--controls-height));
  z-index: 50;
}
/* === Sticky header row (robust across browsers) === */
.employee-table thead{
  position: sticky;
  top: calc(var(--global-header, 0px) + var(--heading-height, 0px) + var(--controls-height, 0px));
  z-index: 55;                     /* above table cells, below controls */
  background: #003366;             /* keep the dark header color */
}

/* The header cells no longer need sticky; keep arrow layout only */
.employee-table thead th{
  position: relative;              /* anchor arrow */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding-right: 22px;
  text-align: center;
}

/* Keep sort arrow aligned to the right edge of the header cell */
.employee-table thead th .sort-arrow{
  position: absolute;
  right: 6px; top: 50%;
  transform: translateY(-50%);
  margin: 0;
  pointer-events: none;
  opacity: .9;
  font-size: 12px;
}

/* === Controls bar: avoid clipping on the right; wrap on narrow widths === */
.employee-controls{
  flex-wrap: wrap;                 /* allow search + buttons to flow onto next line */
  gap: 10px 12px;                  /* row/column gaps */
  padding-right: 16px;             /* small breathing room on the right edge */
}
.employee-controls > *{            /* small vertical spacing when wrapping */
  margin-top: 2px;
}

/* Floating header host */
.employee-sticky-header{
  position: fixed;
  top: 0;               /* JS sets exact top based on global header + bars */
  left: 0;              /* JS sets left to align with table container */
  width: 100%;
  z-index: 70;          /* above table content, below your site nav if needed */
  background: #003366;  /* matches thead background */
  display: none;        /* toggled by JS */
  pointer-events: none; /* clicks go to the page; sorting done on real thead */
}
.employee-sticky-header .employee-table{
  margin: 0;
  border-collapse: collapse;
}
.employee-sticky-header th{
  color: #fff;
  border: 1px solid #ddd;
  padding: 8px;
  text-align: center;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

/* ===== Reset to stable Accessories-style behavior =====
   - Inner vertical scroll in the table container
   - Sticky thead (top: 0) within the container
   - Heading + controls stick below the global header
   - Controls can wrap so buttons don't get cut
======================================================= */

.employee-container{
  --global-header: 0px;  /* set by JS */
  --heading-h: 0px;      /* set by JS */
  --controls-h: 0px;     /* set by JS */
}

/* Heading and controls stick under your site-wide topbar */
.employee-heading{
  position: sticky;
  top: var(--global-header);
  z-index: 102;
  background:#fff;
  display:flex; align-items:center; justify-content:center;
  text-align:center;
}
.employee-heading h1{ font-size:28px; font-weight:700; color:#003366; }
.employee-heading .fa, .employee-heading i{ margin-right:8px; }

.employee-controls{
  position: sticky;
  top: calc(var(--global-header) + var(--heading-h));
  z-index: 101;
  background:#fff;
  border-bottom:1px solid #ddd;
  display:flex; justify-content:flex-end; align-items:center;
  gap:10px 12px;           /* row/col gap */
  flex-wrap: wrap;         /* avoid clipping of Add button */
  padding:8px 16px;
}

/* INNER scroll: vertical scroll lives here */
.employee-table-container{
  overflow: auto;          /* vertical + horizontal as needed */
  max-height: var(--table-max-h, 70vh);  /* JS will set exact value */
  padding-right: 12px;     /* keep text clear of scrollbar */
}

/* Table base (same as before) */
.employee-table{
  width:100%;
  border-collapse:collapse;
  table-layout:fixed;
  font-size:14px;
}
.employee-table thead{
  background:#003366; color:#fff;
}

/* RELIABLE sticky header: top:0 INSIDE the scroll container */
.employee-table thead th{
  position: sticky;
  top: 0;
  z-index: 3;                 /* above body cells */
  background:#003366;         /* ensure solid header bar while sticky */
  text-align:center;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  padding-right:22px;         /* space for sort arrow */
}
.employee-table thead th .sort-arrow{
  position:absolute; right:6px; top:50%; transform:translateY(-50%);
  pointer-events:none; font-size:12px; opacity:.9;
}
.employee-table td{
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}

/* Buttons in rows (unchanged) */
.employee-edit{ background:#0d6efd; color:#fff; padding:5px 10px; border:none; border-radius:4px; font-size:12px; }
.employee-edit:hover{ background:#0b5ed7; }
.employee-delete{ background:#dc3545; color:#fff; padding:5px 10px; border:none; border-radius:4px; font-size:12px; margin-left:6px; }
.employee-delete:hover{ background:#c82333; }

/* ===== Stable Accessories-like layout ===== */

/* Page heading and controls (keep visible, allow wrapping) */
.employee-heading{
  position: sticky;
  top: 0;                 /* if your global header is fixed, bump this down later */
  z-index: 102;
  background:#fff;
  display:flex; align-items:center; justify-content:center;
  text-align:center;
}
.employee-heading h1{ font-size:28px; font-weight:700; color:#003366; }
.employee-heading .fa, .employee-heading i{ margin-right:8px; }

.employee-controls{
  position: sticky;
  top: 48px;              /* sits below heading; adjust if your heading is taller */
  z-index: 101;
  background:#fff;
  border-bottom:1px solid #ddd;
  display:flex; justify-content:flex-end; align-items:center;
  gap:10px 12px;
  flex-wrap: wrap;        /* prevents “Add New Employee” clipping */
  padding:8px 16px;
}

/* The scroll area for the table */
/* FIXED, working height. Adjust the 210px if needed for your top bar + heading + controls */
.employee-table-container{
  position: relative;
  overflow: auto;                      /* vertical + horizontal */
  height: calc(100vh - 210px);         /* <-- tweak if the header still overlaps */
  padding-right: 12px;
}

/* Table */
.employee-table{
  width:100%;
  border-collapse:collapse;
  table-layout:fixed;
  font-size:14px;
}

/* Sticky header INSIDE the scroll container: this is the reliable combo */
.employee-table thead{
  background:#003366; color:#fff;
}
.employee-table thead th{
  position: sticky;
  top: 0;                              /* sticks to top of the scroll container */
  z-index: 3;
  background:#003366;
  text-align:center;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  padding:8px 22px 8px 8px;            /* space on right for arrow */
  border:1px solid #ddd;
}
.employee-table thead th .sort-arrow{
  position:absolute; right:6px; top:50%; transform:translateY(-50%);
  pointer-events:none; font-size:12px; opacity:.9;
}

.employee-table td{
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
  border:1px solid #eee;
  padding:8px;
}

/* Row buttons */
.employee-edit{ background:#0d6efd; color:#fff; padding:5px 10px; border:none; border-radius:4px; font-size:12px; }
.employee-edit:hover{ background:#0b5ed7; }
.employee-delete{ background:#dc3545; color:#fff; padding:5px 10px; border:none; border-radius:4px; font-size:12px; margin-left:6px; }
.employee-delete:hover{ background:#c82333; }
/* ===================== Employee page (moved from template) ===================== */

/* ===== Employee page container ===== */
.employee-container {
  display: grid;
  grid-template-rows: auto auto 1fr; /* heading, controls, table area */
  gap: 10px;
  width: 100%;
  padding-top: 10px;
}

/* Heading (non-sticky to avoid stack math) */
.employee-heading {
  background: #fff;
  padding: 15px 0;
  border-bottom: 1px solid #ddd;
}
.employee-heading h1 { margin: 0; }

/* Controls row */
.employee-controls {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;          /* RIGHT align */
  position: static !important;        /* neutralize any global sticky */
  top: auto !important;
  z-index: auto !important;
  background: #fff;
  padding: 8px 0;
  border-bottom: 1px solid #ddd;
}

/* Scrollable table region (like Accessories) */
.employee-table-wrap {
  overflow: auto; /* vertical + horizontal */
  max-height: calc(100vh - 190px);
  /* Adjust 190px if your global header is taller/shorter */
  background: #fff;
  border: 1px solid #e6e6e6;
  border-radius: 8px;
  -webkit-overflow-scrolling: touch;
}

/* Keep headers/cells on one line (Accessories behavior) */
.employee-table-wrap table th,
.employee-table-wrap table td {
  white-space: nowrap;
}

/* Sticky header INSIDE the scroll container */
.employee-table-wrap thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #003366 !important;  /* Accessories blue */
  color: #fff !important;
  text-align: left;
  font-weight: 600;
}

/* Table sizing—allow horizontal scroll when content overflows */
#employeeTable {
  width: max(100%, 1200px);
  table-layout: auto; /* don’t squish columns */
}

/* Optional hover for body rows */
#employeeTable tbody tr:hover td {
  background: #fafafa;
}

/* Action links */
.action-buttons { display: flex; gap: 6px; align-items: center; }
.accessories-edit {
  background-color: #17a2b8;
  color: #fff;
  padding: 5px 10px;
  border: none;
  border-radius: 4px;
  text-decoration: none;
  font-size: 12px;
}
.accessories-edit:hover { background-color: #138496; }
.accessories-delete {
  background-color: #dc3545;
  color: #fff;
  padding: 5px 10px;
  border: none;
  border-radius: 4px;
  text-decoration: none;
  font-size: 12px;
}
.accessories-delete:hover { background-color: #c82333; }

/* ==== Fine-tuning Employee heading and controls spacing ==== */

/* tighten the gap between title and controls */
.employee-heading {
  margin-top: 70px;      /* keep this (so it's visible below header) */
  margin-bottom: 4px;    /* reduce large gap */
  border-bottom: none;   /* remove line under heading */
}

/* remove lines above/below search/export row */
.employee-controls {
  border-top: none !important;
  border-bottom: none !important;
  padding-top: 0;
  padding-bottom: 0;
}

/* ===================== Fleet page (mirrors Employee; scoped with fleet-*) ===================== */

/* ===== container (grid: heading, controls, table) ===== */
.fleet-container{
  display:grid;
  grid-template-rows:auto auto 1fr;
  gap:10px;
  width:100%;
  padding-top:10px;
}
/* ===== Refined Fleet heading alignment (closer to search bar) ===== */
.fleet-heading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;                 /* space between icon and text */
  background: #fff;
  padding: 6px 0;            /* reduced vertical padding */
  margin-top: 80px;          /* reduced from 70px → 30px */
  margin-bottom: 0;          /* pull closer to controls/search row */
  border-bottom: none;
}

.fleet-heading h1 {
  font-size: 26px;
  font-weight: 700;
  color: #003366;
}

/* Icon adjustments (keep visual balance) */
.fleet-heading-icon {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.fleet-heading i.fleet-heading-icon {
  font-size: 28px;
  color: #003366;
  margin-right: 6px;
}

/* ===== controls (RIGHT align; remove top/bottom lines) ===== */
.fleet-controls{
  display:flex;
  gap:10px;
  align-items:center;
  justify-content:flex-end;
  position:static !important; /* neutralize any global sticky */
  top:auto !important;
  z-index:auto !important;
  background:#fff;
  padding:0;                  /* tight spacing (Employee final) */
  border-top:none !important;
  border-bottom:none !important;
}

/* --- Fleet: make the inner scroller behave like Employee --- */
.fleet-table-wrap{
  /* inner scroll both ways */
  overflow-x: auto;
  overflow-y: auto;
  max-height: calc(100vh - 190px);
  background:#fff;
  border:1px solid #e6e6e6;
  border-radius:8px;
  -webkit-overflow-scrolling: touch;
}

/* Let the table be wider than the viewport to create H-scroll.
   Use auto layout (not fixed) so widths can breathe. */
.fleet-table{
  width: max(100%, 1400px);  /* pick a base, increase if you still feel cramped */
  table-layout: auto;        /* matches Employee */
  border-collapse: collapse;
  font-size: 14px;
}

/* Keep everything on one line so it scrolls horizontally instead of wrapping */
.fleet-table th,
.fleet-table td{
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Sticky header in the scrollport (unchanged) */
.fleet-table thead th{
  position: sticky;
  top: 0;
  z-index: 2;
  background: #003366 !important;
  color: #fff !important;
  font-weight: 600;
  padding: 8px;
  border: 1px solid #ddd;
}
.fleet-table td{
  padding: 8px;
  border: 1px solid #eee;
}

/* Optional: ensure no outer Bootstrap responsive wrapper fights our scroll */
.fleet-table-wrap .table-responsive { overflow: visible; }


.fleet-action-buttons{ display:flex; gap:6px; align-items:center; }

/* ===== match Employee’s accessories-style controls ===== */
.accessories-search{
  width:250px;
  padding:6px 10px;
  border:1px solid #ccc;
  border-radius:4px;
  font-size:14px;
}
.accessories-export{
  padding:6px 12px;
  background:#28a745;
  color:#fff;
  border:none;
  border-radius:4px;
}
.accessories-export:hover{ background:#218838; }
.accessories-add{
  padding:6px 12px;
  background:#007bff;
  color:#fff;
  border:none;
  border-radius:4px;
}
.accessories-add:hover{ background:#0056b3; }
/* Sort arrow in fleet header cells */
.fleet-table thead th .sort-arrow{
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  margin: 0;
  pointer-events: none;
  opacity: .9;
  font-size: 12px;
}
/* Make headers feel clickable */
.fleet-table .sortable{ cursor: pointer; user-select: none; }
/* Ensure header th can position the arrow */
.fleet-table thead th{ position: sticky; } /* already set; keeps sticky + allows absolute child */
/* Controls bar same alignment as Employee */
.fleet-controls{
  display:flex;
  gap:10px;
  align-items:center;
  justify-content:flex-end;
  padding:0;                 /* no extra lines/space like Employee */
  border:0;
}

/* Make the header cells behave like Employee */
.fleet-table thead th{
  /* You already have sticky/blue; keep that. These ensure arrow doesn't overlap */
  position: sticky;          /* already set in your stylesheet */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 22px;       /* space reserved for the arrow */
}

/* Sort arrow placement (same as Employee) */
.fleet-table thead th .sort-arrow{
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  margin: 0;
  pointer-events: none;
  opacity: .9;
  font-size: 12px;
}

/* Clickable feel */
.fleet-table .sortable{ cursor: pointer; user-select: none; }
/* ===== Employee heading (matches Fleet & Accessories) ===== */
.employee-heading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;                /* icon + text spacing */
  background: #fff;
  padding: 6px 0;           /* same vertical rhythm as Fleet */
  margin-top: 80px;         /* moved closer to search bar */
  margin-bottom: 0;
  border-bottom: none;
}

.employee-heading h1 {
  font-size: 26px;
  font-weight: 700;
  color: #003366;
}

/* Icon (Font Awesome or image) */
.employee-heading-icon {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.employee-heading i.employee-heading-icon {
  font-size: 28px;
  color: #003366;
  margin-right: 6px;
}
/* ---------- FORCE Address to span full row width ---------- */
.form-grid .form-row textarea[name="address"] {
  flex: 1 1 100% !important;
  width: 100% !important;
  min-width: 100% !important;
  max-width: 100% !important;
  display: block !important;
  box-sizing: border-box;
  margin-right: 0 !important;
}

/* also ensure its container (form-row) itself takes full width */
.form-grid .form-row:has(textarea[name="address"]) {
  flex: 0 0 100% !important;
  max-width: 100% !important;
  width: 100% !important;
  display: block !important;
}

/* Optional: align label above textarea */
.form-grid .form-row label[for="id_address"] {
  display: block !important;
  width: 100% !important;
  margin-bottom: 4px;
}
/* ===================== Vendor Module (Refined) ===================== */

.vendor-container {
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 10px;
  width: 100%;
  padding-top: 10px;
}

/* ---- Heading (Centered + Moved Slightly Down) ---- */
.vendor-heading {
  background: #fff;
  padding: 70px 0 20px;
  margin-top: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-bottom: none;
}

.vendor-heading-icon {
  font-size: 26px;
  color: #003366;
  margin-right: 10px;
}

.vendor-heading h1 {
  font-size: 28px;
  font-weight: 700;
  color: #003366;
  margin: 0;
}


/* ---- Controls ---- */
.vendor-controls {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  background: #fff;
  padding: 8px 0;
  border-bottom: 1px solid #ddd;
}
.vendor-search {
  width: 250px;
  padding: 6px 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
}
.vendor-export {
  padding: 6px 12px;
  background: #28a745;
  color: #fff;
  border: none;
  border-radius: 4px;
}
.vendor-export:hover { background: #218838; }
.vendor-add {
  padding: 6px 12px;
  background: #007bff;
  color: #fff;
  border: none;
  border-radius: 4px;
}
.vendor-add:hover { background: #0056b3; }

/* ---- Scrollable Table ---- */
.vendor-table-wrap {
  overflow: auto;
  max-height: calc(100vh - 190px);
  background: #fff;
  border: 1px solid #e6e6e6;
  border-radius: 8px;
  -webkit-overflow-scrolling: touch;
}

/* ---- Table ---- */
.vendor-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 14px;
}
.vendor-table thead {
  background: #003366;
  color: #fff;
}
.vendor-table th,
.vendor-table td {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border: 1px solid #ddd;
  padding: 8px;
  text-align: left;
}

/* Sticky Header */
.vendor-table thead th {
  position: sticky;
  top: 0;
  background: #003366;
  color: #fff;
  z-index: 3;
  text-align: center;
}
.vendor-table th .sort-arrow {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  pointer-events: none;
  opacity: 0.9;
}

/* ---- Action Buttons ---- */
.vendor-edit {
  background: #17a2b8; /* ✅ matches your screenshot turquoise blue */
  color: #fff;
  padding: 5px 10px;
  border: none;
  border-radius: 4px;
  font-size: 12px;
  display: inline-block;
  transition: background 0.2s ease-in-out;
}
.vendor-edit:hover {
  background: #138496; /* darker teal hover */
}

.vendor-delete {
  background: #dc3545;
  color: #fff;
  padding: 5px 10px;
  border: none;
  border-radius: 4px;
  font-size: 12px;
  display: inline-block;
  margin-left: 6px;
  transition: background 0.2s ease-in-out;
}
.vendor-delete:hover { background: #c82333; }

.vendor-action-buttons {
  display: flex;
  justify-content: center;
  gap: 6px;
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .vendor-table-wrap { max-height: calc(100vh - 160px); }
}
