.main-nav {
    background-color: #f8f9fa;
    padding: 1rem;
    margin-bottom: 2rem;
    border-radius: 4px;
    display: flex;
    justify-content: space-between; /* Ensures links and user info are on the same line */
    align-items: center; /* Vertically aligns items in the nav */
}

.main-nav a {
    color: #4CAF50;
    text-decoration: none;
    padding: 10px 0;
}

.nav-links {
    display: flex;
    gap: 15px;
}

button:disabled {
    background-color: #ccc !important;
    color: #666 !important;
    cursor: not-allowed;
}

/* General table styles */
#order-items-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed; /* Ensures columns do not expand uncontrollably */
}

#order-items-table input[type="text"],
#order-items-table input[type="password"],
#order-items-table input[type="email"],
#order-items-table input[type="number"],
#order-items-table select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

/* Define column widths */
#order-items-table th,
#order-items-table td {
    padding: 8px;
    text-align: left;
   /* white-space: nowrap;*/
}

/* Set specific column widths */
#order-items-table th:nth-child(1),
#order-items-table td:nth-child(1) {
    width: 60px; /* Product Code */
}

#order-items-table th:nth-child(2),
#order-items-table td:nth-child(2) {
    width: 150px; /* Product Name */
}

#order-items-table th:nth-child(3),
#order-items-table td:nth-child(3) {
    width: 50px; /* Quantity */
}

#order-items-table th:nth-child(4),
#order-items-table td:nth-child(4) {
    width: 80px; /* Description */
}

#order-items-table th:nth-child(5),
#order-items-table td:nth-child(5) {
    width: 80px; /* Quoted Price */
}

#order-items-table th:nth-child(7),
#order-items-table td:nth-child(7) {
    width: 80px; /* Stock Cost */
}

#order-items-table th:nth-child(9),
#order-items-table td:nth-child(9) {
    width: 50px; /* Sundry Qty */
}

#order-items-table th:nth-child(10),
#order-items-table td:nth-child(10) {
    width: 80px; /* Sundry Quotes Price */
}

/* Make table container scrollable */
.table-wrapper {
    max-width: 100%;
    overflow-x: auto;
}

/* Responsive: Stack table and allow scrolling on small screens */
@media screen and (max-width: 768px) {
    .table-wrapper {
        overflow-x: scroll;
    }

    #order-items-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}


.user-info {
    display: flex;
    gap: 10px;
    font-size: 0.9em;
    color: #333;
    align-items: center; /* Ensures vertical alignment with links */
}

.main-nav a:hover {
    text-decoration: underline;
}

.filter-container {
  /*margin-bottom: 1em;*/
  display: flex;
  flex-wrap: nowrap;
  align-items: baseline;
}

#filter-status {
  padding: 0.5em;
  font-size: 1em;
}

body {
    font-family: Arial, sans-serif;
    line-height: .9;
 /* line-height: 1.6;*/
    margin: 0;
    padding: 20px;
    background-color: #f4f4f4;
}

/*added product list for quote*/
.product-list {
            margin-bottom: 20px;
        }
        .product-list table {
            width: 100%;
            border-collapse: collapse;
        }
        .product-list th, .product-list td {
            padding: 10px;
            text-align: left;
            border: 1px solid #ddd;
        }
        .product-list th {
            background-color: #f1f1f1;
        }
        .product-list td input {
            width: 80px;
        }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background-color: white;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.login-container {
    max-width: 400px;
    margin: 100px auto;
    padding: 20px;
    background-color: white;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

#single-update {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
}

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

/* Add this to your style.css */
table tbody tr:nth-child(odd) {
    background-color: #ffffff; /* Light gray for odd rows */
}

table tbody tr:nth-child(even) {
    background-color: #f2f2f2; /* White for even rows */
}

#client-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
}

/* Basic layout for form rows */
.form-row {
  margin-bottom: 5px;
  display: flex;
  /*justify-content: space-between;*/
  /*added*/
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
}

.form-row label {
  width: 110px;
  font-weight: bold;
  margin: auto 0;
  /*added*/
  margin-right: 10px;
}

.form-row input,
.form-row select,
.form-row textarea {
  flex: 1;
  padding: 5px;
}

textarea {
  resize: vertical;
}

#notes {
  width: 50%;
  height: 100px; /* Set to your preferred height */
  padding: 10px; /* Optional padding */
}

label {
    display: block;
    margin-bottom: 5px;
}

.login-form input[type="text"],
.login-form input[type="password"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

ul li, ol li {
    margin-bottom: 10px; /* Adjust the value as needed */
    list-style: disc inside; /* Optional: customize list bullet styles */
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
select {
   /* width: 100%;*/
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

/*ORDER ITEMS*/

.reset-order {
  display: inline-block;     /* Make it inline with the submit button */
  margin: 20px 10px 20px 0;  /* Add space between reset and submit buttons */
  padding: 10px 20px;        /* Add padding for a better look */
  background-color: #f44336; /* Red background for reset */
  color: white;              /* White text color */
  border: none;              /* Remove border */
  border-radius: 5px;        /* Add rounded corners */
  cursor: pointer;           /* Add pointer cursor on hover */
  font-size: 16px;           /* Adjust font size */
}

.reset-order:hover {
  background-color: #d32f2f; /* Darker red on hover */
}

.submit-order {
  display: inline-block;     /* Keep inline with reset button */
  margin: 20px 0;            /* Center vertically */
  padding: 10px 20px;
  background-color: #4CAF50; /* Green background for submit */
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 16px;
}

.submit-order:hover {
  background-color: #45a049; /* Darker green on hover */
}

.form-buttons {
  text-align: center; /* Center both buttons in the form */
}

/* Responsive adjustments for product fields */
.order-item .input-group {
    display: flex;
    flex-wrap: nowrap; 
   /* gap: 10px;*/
    align-items:center;
}

.order-item .input-group label {
    flex: 1 1 100px; /* Ensure labels have a minimum width but shrink if needed */
    text-align: left; /* Align text to the left for readability */
    margin: 5px 5px 0;
}

.order-item .input-group input,
.order-item .input-group select {
    flex: 1 1 100px; /* Each field takes at least 300px or adjusts as needed */
    /*min-width: 150px; /* Minimum width for the fields */
    padding: 8px;
    box-sizing: border-box;
    margin: 5px 5px 0 0;
}

/* For smaller devices */
/* Responsive adjustments */
@media (max-width: 1080px) {
    
    .order-item .input-group {
        flex-wrap: wrap;
    }
    
    .order-item .input-group input,
    .order-item .input-group select {
        flex: 1 1 100%; /* Make fields full-width on smaller screens */
        min-width: unset; /* Remove the minimum width constraint */
    }
}
@media (max-width: 768px) {
    .order-item .input-group {
        align-items: stretch;
    }

    .order-item .input-group input,
    .order-item .input-group select {
        flex: 1 1 100%; /* Full-width fields on small screens */
        min-width: unset; /* Remove the minimum width constraint */
    }
}


/* SUNDRY STOCK ITEMS */
.sundry-item .input-group {
    display: flex;
    flex-wrap: wrap; 
    gap: 10px;
    align-items: center; /* Ensure vertical alignment */
}

.sundry-item .input-group label {
    flex: 1 1 100px; /* Similar to order-item, ensures labels have a minimum width */
    text-align: left; 
    margin: 5px 0;
}

.sundry-item .input-group input,
.sundry-item .input-group select {
    flex: 1 1 100px; /* Matches the width behavior of the fields */
    padding: 8px;
    box-sizing: border-box;
}

/* Initially hide the remove button for the first item */
.sundry-item:first-of-type .remove-sundry-item-btn {
  display: none;
}

/* Responsive adjustments for smaller devices */
@media (max-width: 1080px) {
    .sundry-item .input-group {
        flex-wrap: wrap;
    }

    .sundry-item .input-group input,
    .sundry-item .input-group select {
        flex: 1 1 100%; /* Full-width fields on smaller screens */
        min-width: unset; /* Remove minimum width constraints */
    }
}

@media (max-width: 768px) {
    .sundry-item .input-group {
        align-items: stretch;
    }

    .sundry-item .input-group input,
    .sundry-item .input-group select {
        flex: 1 1 100%; /* Full-width fields on smaller screens */
        min-width: unset; 
    }
}

.error-messages {
    color: red;
}

.success-message {
    color: green;
}

.actions {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
}

.button {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: #4CAF50;
    color: white;
    text-decoration: none;
    border-radius: 4px;
}

.button:hover {
    background-color: #45a049;
}


button {
    background-color: #4CAF50;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin: 5px 0px;
}

button:hover {
    background-color: #45a049;
}

.error {
    color: red;
    margin-bottom: 10px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

th, td {
    padding: 12px;
    border-bottom: 1px solid #ddd;
}

th {
    background-color: #f4f4f4;
    text-align: left;
}

.item-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.checkbox-label {
    display: inline-block;
    margin-right: 15px;
}

nav {
    margin-bottom: 20px;
}

nav a {
    margin-right: 15px;
    text-decoration: none;
    color: #4CAF50;
}

nav a:hover {
    text-decoration: underline;
}

.filter {
    margin: 20px 0;
}

.filters {
    display: flex;
    gap: 20px;
   /* margin: 20px 0;*/
}

.filter {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter select {
    padding: 5px;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.filter label {
    margin: 0;
    white-space: nowrap;
}

.center-column {
    text-align: center;
}

.pagination {
    text-align:right;
}

.pagination {
    display: flex;
    justify-content: right;
    margin: 20px 0;
}

.pagination a {
    margin: 0 5px;
    padding: 8px 12px;
    text-decoration: none;
    color: #007bff;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.pagination a.active {
    background-color: #007bff;
    color: #fff;
    border-color: #007bff;
}

.pagination a:hover {
    background-color: #0056b3;
    color: #fff;
}

.loading {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(0, 0, 0, 0.5);
      color: #fff;
      text-align: center;
      font-size: 24px;
      padding-top: 20%;
    }

/* Horizontal layout for the filter form */
    #filter-form {
      display: flex;
      justify-content: flex-start; /* Align items to the left */
      gap: 20px; /* Space between filter fields */
      /*margin-bottom: 20px;*/
    }
    
    #filter-form label {
      font-weight: bold;
    }

    #filter-form select, #filter-form button {
      padding: 5px 10px;
    }

/* Inline form styling */
.inline-form {
  display: flex;
  align-items: center;
  gap: 10px; /* Adjust spacing between the label and input field */
}

.inline-form label {
  flex-shrink: 0; /* Ensure the label doesn't shrink */
}

.inline-form input {
  flex-grow: 1; /* Allow the input to take the remaining space if needed */
  width: auto; /* Prevent the input from stretching unnecessarily */
}

.media-selection {
    display: flex;
    align-items: center; /* Align label and select vertically */
    gap: 10px; /* Adds spacing between label and dropdown */
}

.media-selection label {
    white-space: nowrap; /* Prevents label from wrapping */
}



@media (max-width: 768px) {
    .login-container {
        max-width: 90%; /* Increase the width to fill most of the screen */
        padding: 30px; /* Add more padding for better spacing */
        font-size: 1.2em; /* Increase font size for better readability */
    }
    
    .filters {
    display: flex;
    gap: 20px;
    margin: 20px 0;
    flex-wrap: wrap;
}
    .pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: right;
    margin: 20px 0;
}

    .logo-container {
        text-align: center;
    }
    
    .form-row label {
     width: 100px;
    }

    input[type="text"],
    input[type="password"] {
        font-size: 1.1em; /* Increase input text size */
        padding: 10px; /* Add more padding for inputs */
    }

    button {
       /* font-size: 1.2em; /* Make the button text larger */
        padding: 15px 20px; /* Increase button size */
        text-align: center;
    }
    
    table {
        width: 100%;
        overflow-x: auto;
        display: block;
        -webkit-overflow-scrolling: touch;
    }

    .table-container {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Style the table for mobile */
    table th,
    table td {
        padding: 10px;
        font-size: 0.9em;  /* Adjust font size */
    }

    th {
        text-align: left;
    }

    /* Stack table columns on smaller devices */
    .action-buttons {
        display: flex;
        gap: 5px;
        justify-content: center;
    }

    .action-buttons a {
        text-align: center;
    }

.main-nav {
        flex-wrap: wrap; /* Allow wrapping */
        padding: 1rem;
    }

    .nav-links {
        width: 100%; /* Make the links stack vertically */
        justify-content: center; /* Center the links */
        gap: 10px;
        flex-wrap: wrap;
    }

    .user-info {
        width: 100%; /* Take up full width */
        justify-content: center; /* Center the user info */
        margin-top: 10px; /* Add some spacing */
    }

    .main-nav {
        display: flex;
        flex-direction: column; /* Stack items vertically */
        align-items: center; /* Center items horizontally */
    }

input[type="number"] {
    -webkit-appearance: textfield;  /* Fix for Safari */
    -moz-appearance: textfield;     /* Fix for Firefox */
    appearance: textfield;          /* Standardized fix */
}

/* Add custom spinner styles if you want to style the arrows */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

}

