/* Reset CSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}



h1 {
    text-align: center;
    font-size: 2.5em;
    margin-bottom: 20px;
    color: #000000;
}



.login-form {
    margin-top: 30px;
}

.login-container h2 {
    font-size: 1.8em;
    margin-bottom: 15px;
    color: #0a0909;
}

.login-container input {
    width: 500px;
    padding: 12px;
    margin: 10px 0;
    border-radius: 5px;
    border: 1px solid #ccc;
    font-size: 16px;
}

.login-form button {
    width: 90%;
    padding: 12px;
    background-color: #007BFF;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.login-form button:hover {
    background-color: #0056b3;
}

.error-message {
    color: red;
    font-size: 14px;
    margin-bottom: 10px;
}

.login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    max-width: 1500px;
    width: 100%;
    padding: 20px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.5s ease-in-out;
}
/* Fade-in animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* Creative Navigation Bar */
.creative-navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    background: linear-gradient(135deg, #365071, #45586d);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
}



/* Navigation Buttons */
.nav-buttons {
    display: flex;
    gap: 15px;
}

.nav-buttons button {
    background-color: #fffffe;
    color: #627f8d;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 1em;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s, transform 0.2s;
}

.nav-buttons button:hover {
    background-color: #5879e5;
    transform: translateY(-3px);
}

.nav-buttons button:active {
    transform: translateY(1px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .creative-navbar {
        flex-direction: column;
        align-items: flex-start;
        padding: 10px;
    }

    .nav-buttons {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }

    .nav-buttons button {
        width: 100%;
        text-align: left;
    }
}

/* Global Anchor Tag Button Style for Links Inside Table Cells */
td a {
    display: inline-block;
    padding: 10px 15px;
    font-size: 14px;
    font-weight: bold;
    color: #fff;
    background-color: #4a6572;
    text-decoration: none;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

/* Hover and Active States for Anchor Tags Inside Table Cells */
td a:hover {
    background-color: #3b5360;
    transform: translateY(-2px);
}

td a:active {
    transform: translateY(1px);
}

/* Special Styling for Specific Links Using Attributes */
td a[href*="finish_job"] {
    background-color: #50c36b;
}

td a[href*="finish_job"]:hover {
    background-color: #50c36b;
}

td a[href*="deliver_job"] {
    background-color: #50c36b;
}

td a[href*="deliver_job"]:hover {
    background-color: #50c36b;
}

td a[href*="edit_job"] {
    background-color: #f39c12;
}

td a[href*="edit_job"]:hover {
    background-color: #e67e22;
}

td a[href*="view_receipt"] {
    background-color: #3498db;
}

td a[href*="view_receipt"]:hover {
    background-color: #2980b9;
}

/* Dropdown Menu Styling */
.dropdown {
    position: relative;
    display: inline-block;
}

.nav-btn {
    padding: 12px 20px;
    font-size: 16px;
    color: #fff;
    background-color: #4a6572;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.3s;
}

.nav-btn:hover {
    background-color: #3b5360;
}


.autocomplete-suggestions {
    position: absolute;
    width: 100%;
    border: 1px solid #ccc;
    background-color: #fff;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.autocomplete-suggestions div {
    padding: 10px;
    cursor: pointer;
    border-bottom: 1px solid #ddd;
}

.autocomplete-suggestions div:hover {
    background-color: #f0f0f0;
}

#suggestions {
    position: absolute;
    border: 1px solid #ccc;
    background-color: #fff;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    width: calc(100% - 20px);
}

#suggestions div {
    padding: 8px;
    cursor: pointer;
}

#suggestions div:hover {
    background-color: #f0f0f0;
}
.btn-delete {
    background-color: #e74c3c;
    color: #fff;
    padding: 5px 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
}

.btn-delete:hover {
    background-color: #c0392b;
}
/*newwww*/
/* General Styling */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f9f9f9;
    color: #333;
}

h2 {
    text-align: center;
    margin-top: 20px;
    font-size: 24px;
    color: #000000;
}

/* Buttons */
button {
    padding: 10px 20px;
    font-size: 14px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin: 5px;
}

button:hover {
    background-color: #007BFF;
    color: white;
}

button.nav-btn, button.stock-btn, button.use-btn,  button.add-stock-btn {
    background-color: #28a745;
    color: white;
}

button.nav-btn:hover, button.stock-btn:hover, button.use-btn:hover {
    background-color: #218838;
}

button.edit-btn {
    background-color: #ffc107;
    color: black;
}

button.edit-btn:hover {
    background-color: #e0a800;
}

button.done-btn {
    background-color: #28a745;
    color: white;
}

button.done-btn:hover {
    background-color: #218838;
}

button.order-btn {
    background-color: #007BFF;
    color: white;
}

button.order-btn:hover {
    background-color: #0056b3;
}

button.add-stock-btn {
    background-color: #6c727dF;
    color: white;
}

button.add-stock-btn:hover {
    background-color: #5a6268;
}


button.delete-btn {
    background-color: #dc3545;
    color: white;
}

button.delete-btn:hover {
    background-color: #c82333;
}

button.download-btn {
    background-color: #6c757d;
    color: white;
}

button.download-btn:hover {
    background-color: #5a6268;
}
button.use-btn:hover {
    background-color: #41f092;
}



/* Tables */
table {
    width: 90%;
    margin: 20px auto;
    border-collapse: collapse;
    background-color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

thead {
    background-color: #8c9299;
    color: white;
}
th{
    position: sticky;
    top: 0; /* Position the headers at the top of the container */
    background-color: #4a6572; /* Same background color as the header */
    color: white; /* Text color */
    z-index: 2; /* Ensure headers appear above table rows */
    padding: 15px;
    text-align: left;
}
td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: left;
}

tr:nth-child(even) {
    background-color: #f2f2f2;
}

tr:hover {
    background-color: #f1f1f1;
}

/* Search Bar */
#search {
    display: block;
    margin: 20px auto;
    width: 80%;
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    table {
        font-size: 12px;
    }

    button {
        font-size: 12px;
        padding: 8px 15px;
    }

    #search {
        font-size: 14px;
        padding: 8px;
    }
}


/* Dropdown Content */
.dropdown-content {
    display: none;
    position: absolute;
    background-color: #ecf0f1;
    min-width: 180px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    z-index: 1;
}

.dropdown-content a {
    color: #2c3e50;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    border-radius: 6px;
    transition: background-color 0.3s;
}

.dropdown-content a:hover {
    background-color: #a3d5ff;
}

/* Submenu Styling */
.submenu {
    position: relative;
}

.submenu-content {
    display: none;
    position: absolute;
    left: 100%;
    top: 0;
    background-color: #ecf0f1;
    min-width: 180px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    z-index: 1;
}

.submenu-content a {
    color: #2c3e50;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    border-radius: 6px;
    transition: background-color 0.3s;
}

.submenu-content a:hover {
    background-color: #a3d5ff;
}

/* Show Dropdown on Hover */
.dropdown:hover .dropdown-content {
    display: block;
}

.submenu:hover .submenu-content {
    display: block;
}



/* Container */
.container {
    max-width: 1500px;
    margin: 0 auto;
    padding: 20px;
    background: #ecf0f1;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(44, 62, 80, 0.1);
}
/* Home Page */
.home-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* Centered Logo Image */
.logo-image {
    width: 400px;
    height: auto;
    margin-bottom: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Centered Button Group */
.button-group {
    display: flex;
    flex-direction: column;
    gap: 20px;
}



.home-container h1 {
    font-size: 2.8em;
    margin-bottom: 20px;
    text-shadow: 1px 2px 4px rgba(0, 0, 0, 0.3);
}

/* Main Button */
.main-btn {
    display: inline-block;
    padding: 14px 28px;
    margin: 10px;
    font-size: 18px;
    font-weight: bold;
    color: #fff;
    background-color: #4a6572;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(44, 62, 80, 0.2);
    transition: all 0.3s ease;
}

.main-btn:hover {
    background-color: #3b5360;
    transform: translateY(-3px);
}

.main-btn:active {
    transform: translateY(1px);
}

/* Navigation Button */
.nav-btn {
    padding: 12px 24px;
    font-size: 16px;
    background-color: #82e0aa;
    color: #2c3e50;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    margin-bottom: 20px;
    transition: background-color 0.3s, transform 0.2s;
}

.nav-btn:hover {
    background-color: #68c78a;
    transform: scale(1.05);
}
.use-btn {
    padding: 12px 24px;
    font-size: 16px;
    background-color: #82e0aa;
    color: #2c3e50;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    margin-bottom: 20px;
    transition: background-color 0.3s, transform 0.2s;
}

.use-btn:hover {
    background-color: #68c78a;
    transform: scale(1.05);
}
.status{
    color: #ff1900;
}

/* Floating Button */
.floating-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    background-color: #c73015;
    color: white;
    font-size: 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.floating-btn:hover {
    transform: scale(1.1);
}

/* Table Styles */
.table-responsive {
    overflow-x: auto;
}

.job-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: #ecf0f1;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(44, 62, 80, 0.1);
}

.job-table th, .job-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #bdc3c7;
}

.job-table th {
    background-color: #4a6572;
    color: #fff;
}

.job-table tr:hover {
    background-color: #a3d5ff;
}

/* Increase the width for date columns */
.job-table th:nth-child(3),  /* Receiving Date */
.job-table th:nth-child(4),  /* Due Date */
.job-table th:nth-child(8),  /* Finished Date */
.job-table th:nth-child(9) { /* Delivery Date */
    min-width: 150px; /* Increase the minimum width */
    width: 150px; /* Set a fixed width */
}

/* Ensure table cells in date columns also have sufficient space */
.job-table td:nth-child(3),
.job-table td:nth-child(4),
.job-table td:nth-child(8),
.job-table td:nth-child(9) {
    min-width: 150px;
    width: 150px;
    white-space: nowrap; /* Prevent text wrapping */
}


/* Modal Form (Improved) */
.modal {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(44, 62, 80, 0.7);
    justify-content: center;
    align-items: flex-start;
    padding-top: 20px;
    overflow-y: auto; /* Allow scrolling if content overflows */
}

.modal-content {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    animation: fadeIn 0.3s ease-in-out;
    position: relative;
}

/* Close Button */
.close-btn {
    position: absolute;
    top: 0px;
    right: 0px;
    background-color: #e74c3c;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.close-btn:hover {
    background-color: #c0392b;
}

/* Form Styles */
form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

form input, form select, form textarea {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #bdc3c7;
    font-size: 14px;
    background: #ecf0f1;
}

form button {
    padding: 14px;
    margin-top: 20px;
    background-color: #4a6572;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s;
}

form button:hover {
    background-color: #3b5360;
}

/* Responsive Design */
@media (max-width: 768px) {
    .modal-content {
        max-width: 95%;
        padding: 15px;
    }

    .close-btn {
        width: 30px;
        height: 30px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .modal-content {
        max-width: 100%;
        padding: 10px;
    }

    form input, form textarea {
        font-size: 12px;
    }

    .close-btn {
        width: 25px;
        height: 25px;
        font-size: 14px;
    }
}
