/*
 * Dispatch Orders System Styles
 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap');

body {
    font-family: 'Inter', sans-serif;
    color: #333;
    background-color: #f4f5f7;
}

.dispatch-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 30px;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
}

h1 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 30px;
    font-size: 2em;
    font-weight: 600;
}

.permission-denied {
    color: #e74c3c;
    text-align: center;
    font-size: 1.2em;
    font-weight: 600;
}

/* Form Styles */
.form-grid {
    /* Adjusted minmax to ensure fields have enough space */
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.form-grid input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s;
}

.form-grid input:focus {
    border-color: #3498db;
    outline: none;
}

.button-group {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 20px;
}

.button-group button {
    padding: 12px 25px;
    font-size: 1em;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    border: none;
    transition: background-color 0.3s, transform 0.2s;
}

#add_item_btn {
    background-color: #3498db;
    color: #fff;
}

#add_item_btn:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
}

#save_btn {
    background-color: #2ecc71;
    color: #fff;
}

#save_btn:hover {
    background-color: #27ae60;
    transform: translateY(-2px);
}

/* Table Styles */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 25px;
    background-color: #fff;
    border: 1px solid #e0e0e0;
}

thead {
    background-color: #f8f9fa;
}

th, td {
    padding: 12px;
    text-align: left;
    border: 1px solid #e0e0e0;
}

th {
    font-weight: 600;
    color: #555;
}

tbody tr:hover {
    background-color: #fbfbfb;
}

/* Message Box */
.message-box {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    text-align: center;
    max-width: 400px;
}

.message-box.success {
    border-left: 5px solid #2ecc71;
}

.message-box.error {
    border-left: 5px solid #e74c3c;
}

.message-box-hidden {
    display: none;
}

#message-text {
    font-size: 1.2em;
    margin: 0 0 20px;
}

#message-close-btn {
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    position: absolute;
    top: 10px;
    right: 15px;
    color: #888;
}

#message-close-btn:hover {
    color: #333;
}