/* General styles */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f9;
}

header {
    background-color: #333;
    color: #fff;
    padding: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header .header-left h1 {
    margin: 0;
}

header .header-right {
    margin-right: 20px;
}

.logout-button {
    color: #fff;
    text-decoration: none;
    background-color: #e74c3c;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 14px;
}

.logout-button:hover {
    background-color: #c0392b;
}

/* Toolbar styles */
#toolbar {
    background-color: #007bff; /* Blue background */
    padding: 10px;
    text-align: left;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

#toolbar button {
    background-color: #0056b3;
    color: #fff;
    border: none;
    border-radius: 5px;
    padding: 10px 15px;
    font-size: 14px;
    cursor: pointer;
    margin-right: 5px;
}

#toolbar button:hover {
    background-color: #003d80;
}

/* Search bar styles */
#search-bar {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

#search-bar input {
    width: 70%;
    padding: 10px;
    margin-right: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 14px;
}

#search-bar button {
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 5px;
    padding: 10px 15px;
    cursor: pointer;
}

#search-bar button:hover {
    background-color: #0056b3;
}

/* Table styles */
#product-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background-color: #fff;
    border: 1px solid #ddd;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    table-layout: fixed; /* Prevents layout breaking */
    overflow: hidden;
}

#product-table th,
#product-table td {
    padding: 10px;
    text-align: left;
    border: 1px solid #ddd;
    word-wrap: break-word; /* Prevents text overflow */
    overflow: hidden;
}

/* Set specific column widths */
#product-table th:nth-child(1),
#product-table td:nth-child(1) { 
    width: 120px; /* SKU */
}

#product-table th:nth-child(2),
#product-table td:nth-child(2) {
    width: 200px; /* Title */
}

#product-table th:nth-child(3),
#product-table td:nth-child(3) {
    width: 250px; /* Description */
}

#product-table th:nth-child(4),
#product-table td:nth-child(4) {
    width: 100px; /* Price */
    text-align: center;
}

#product-table th:nth-child(5),
#product-table td:nth-child(5) {
    width: 100px; /* On Hand */
    text-align: center;
}

#product-table th:nth-child(6),
#product-table td:nth-child(6) {
    width: 120px; /* Images */
    text-align: center;
}

#product-table th:nth-child(7),
#product-table td:nth-child(7) {
    width: 100px; /* Action */
    text-align: center;
}

/* Styling for product images */
.product-image {
    width: 50px;  /* Resize images */
    height: 50px; /* Resize images */
    object-fit: cover;  /* Maintain aspect ratio without distortion */
    margin: 5px;
    display: inline-block;  /* Ensure images are inline, preventing overlap */
}

/* Ensure proper image layout in table */
#product-table td img {
    width: 50px;  /* Keep the image width consistent */
    height: 50px; /* Keep the image height consistent */
    object-fit: cover;  /* Ensures the images fit nicely within the cell */
    display: inline-block; /* Prevents images from stacking */
    margin: 4px 6px; /* Space between images */
}

/* Next button */
#next-button {
    display: inline-block;
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
    margin-top: 10px;
}

#next-button:hover {
    background-color: #0056b3;
}


/* Login container styles */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #f4f4f9;
}

/* Login form styles */
.login-form {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    width: 300px;
    text-align: center;
}

.login-form h2 {
    margin-bottom: 20px;
    color: #333;
}

.login-form input {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 14px;
}

.login-form button {
    width: 100%;
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
}

.login-form button:hover {
    background-color: #0056b3;
}

.login-form .error {
    color: #e74c3c;
    font-size: 14px;
    margin-bottom: 15px;
}

/* Pagination container */
.pagination {
    display: flex;
    justify-content: center; /* Center buttons */
    align-items: center;
    margin: 15px 0;
}

/* General pagination button styles */
.pagination button {
    background-color: #007bff; /* Match toolbar button color */
    color: #fff;
    border: none;
    border-radius: 5px;
    padding: 10px 15px;
    font-size: 14px;
    cursor: pointer;
    margin: 0 5px; /* Add space between buttons */
    transition: background-color 0.3s, transform 0.2s;
}

/* Hover effect for pagination buttons */
.pagination button:hover {
    background-color: #0056b3; /* Darker blue for hover */
}

/* Active state for pagination buttons */
.pagination button:active {
    background-color: #003d80; /* Even darker blue */
    transform: scale(0.98); /* Slightly shrink button on click */
}

/* Disabled button style */
.pagination button:disabled {
    background-color: #cccccc; /* Gray background for disabled buttons */
    color: #666666;
    cursor: not-allowed;
}

/* Optional hidden button for pagination logic */
.pagination button[style*="display: none"] {
    visibility: hidden; /* Ensure it doesn't break layout */
}

/* Responsive Fix */
@media screen and (max-width: 768px) {
    #product-table {
        display: block;
        overflow-x: auto; /* Enables horizontal scrolling */
        white-space: nowrap;
    }
}



/* Ticket manager container */
#ticketDiv {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    width: 80%;
    max-width: 800px;
    margin: 20px auto;
}

/* Ticket manager heading */
#ticketDiv h3 {
    margin-bottom: 15px;
    color: #333;
}

/* Ticket inputs */
#ticketTitle, #ticketDescription {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 14px;
}

/* Submit ticket button */
#submitTicket {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
}

#submitTicket:hover {
    background-color: #218838;
}

/* Open and closed tickets sections */
#ticketDiv h4 {
    margin-top: 20px;
    color: #333;
}

/* Ticket list style */
#openTicketList, #closedTicketList {
    list-style-type: none;
    padding-left: 0;
}

#openTicketList li, #closedTicketList li {
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Close button for open tickets */
#openTicketList li button {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    cursor: pointer;
}

#openTicketList li button:hover {
    background-color: #c0392b;
}

/* Styling for closed tickets */
#closedTicketList li {
    background-color: #ecf0f1;
    color: #7f8c8d;
    text-decoration: line-through;
}

#ticketDiv input[type="text"] {
    box-sizing: border-box;
}
