/* General page style */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 20px;
    background-color: #fdf2e9;
    color: #333;
}

h2 {
    margin-top: 0;
    color: #d35400; 
    border-bottom: 2px solid #fce5cd;
    padding-bottom: 10px;
}

/* Dashboard and stats bar */
.dashboard {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.stat-card {
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
    border-top: 4px solid #e67e22;
}

.stat-card h3 {
    margin: 0;
    font-size: 0.9em;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-card p {
    margin: 5px 0 0;
    font-size: 1.6em;
    font-weight: bold;
    color: #d35400;
}

/* Grid layout */
.main-grid {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 20px;
}

.form-container {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    height: fit-content;
}

label {
    font-weight: bold;
    display: block;
    margin-top: 12px;
    font-size: 0.85em;
    color: #555;
}

input, select, button {
    display: block;
    width: 100%;
    margin-bottom: 10px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1em;
}

/* The cards for the orders */
.order-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
}

.order-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border-left: 6px solid #e67e22; /* The required orange sidebar */
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: transform 0.2s;
}

.order-card:hover {
    transform: translateY(-3px); /* Lifts up slightly on hover */
}

.order-card h4 {
    margin: 0 0 10px 0;
    color: #d35400;
    font-size: 1.2em;
}

.order-details {
    font-size: 0.95em;
    margin-bottom: 15px;
    line-height: 1.4;
}

.pizza-img {
    width: 100%;
    height: 180px;
    object-fit: cover; /* Ensures any image fills the space without stretching */
    background-color: #fce5cd; /* A light orange fallback while the image is loading */
    border-radius: 4px;
}

/* Pagination "Active" state */
.btn-nav.active {
    background: #d35400;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}

/* Button styles */
.btn-add { background: #e67e22; color: white; border: none; font-weight: bold; cursor: pointer; }
.btn-edit { background: #ffc107; color: #000; border: none; cursor: pointer; }
.btn-delete { background: #dc3545; color: white; border: none; cursor: pointer; }

.btn-add:hover { background: #d35400; }

/* The "pagination of the project */
.pagination-nav {
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.btn-nav {
    min-width: 45px; /* Ensures the buttons are uniform squares/rectangles */
    padding: 8px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
}

.btn-nav.disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Popup window */
.modal {
    display: none; 
    position: fixed; 
    top: 0; left: 0; 
    width: 100%; height: 100%; 
    background: rgba(0,0,0,0.7); /* Darkens background */
    z-index: 1000;
}

.modal-content {
    background: white;
    max-width: 400px;
    margin: 40px auto;
    padding: 25px;
    border-radius: 10px;
    max-height: 90vh;
    overflow-y: auto;
}

/* Mobile handling */
@media (max-width: 768px) {
    .main-grid {
        grid-template-columns: 1fr;
    }
    .dashboard {
        grid-template-columns: 1fr;
    }
}