/* General Styles */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    background-color: #ecf0f1; /* Secondary color for background */
    color: #333;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

header {
    background-color: #3498db; /* Primary color */
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

header h1 {
    margin: 0;
    font-size: 1.8rem;
    display: inline-block;
}

header .header-actions {
    float: right;
    display: flex;
    gap: 10px;
    align-items: center;
}

main {
    flex-grow: 1;
    padding: 2rem 0;
}

footer {
    background-color: #2c3e50;
    color: white;
    text-align: center;
    padding: 1rem 0;
    margin-top: auto;
}

/* Buttons */
.button, button {
    background-color: #3498db; /* Primary color */
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    text-decoration: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease, transform 0.1s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.button:hover, button:hover {
    background-color: #2980b9;
}
.button:active, button:active {
    transform: translateY(1px);
}


.primary-button {
    background-color: #2ecc71; /* Accent green */
}
.primary-button:hover {
    background-color: #27ae60;
}

.secondary-button {
    background-color: #e74c3c; /* Destructive red */
}
.secondary-button:hover {
    background-color: #c0392b;
}

/* Forms */
.form-card, .login-form-container {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="password"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 1rem;
}
.form-group input[type="checkbox"] {
    margin-right: 0.5rem;
    vertical-align: middle;
}


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


/* POS Layout */
.pos-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.menu-section, .order-section {
    background-color: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.menu-section h2, .order-section h2 {
    margin-top: 0;
    color: #3498db; /* Primary color */
    border-bottom: 2px solid #ecf0f1;
    padding-bottom: 0.5rem;
}

/* Menu Display */
.category-filter {
    margin-bottom: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.category-filter button {
    background-color: #ecf0f1;
    color: #3498db;
    border: 1px solid #bdc3c7;
}
.category-filter button.active {
    background-color: #3498db;
    color: white;
    border-color: #3498db;
}


.menu-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

.menu-item-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    background-color: #f9f9f9;
    transition: box-shadow 0.3s ease;
}
.menu-item-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.menu-item-card img {
    max-width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}
.menu-item-card h3 {
    margin: 0.5rem 0;
    font-size: 1.1rem;
}
.menu-item-card .price {
    font-weight: bold;
    color: #27ae60; /* Accent green */
    margin-bottom: 0.5rem;
}

/* Order Display */
#order-list {
    list-style-type: none;
    padding: 0;
    max-height: 400px;
    overflow-y: auto;
}

#order-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 0;
    border-bottom: 1px solid #eee;
}
#order-list li:last-child {
    border-bottom: none;
}
#order-list .item-name {
    flex-grow: 1;
}
#order-list .item-quantity input {
    width: 40px;
    text-align: center;
    margin: 0 0.5rem;
    padding: 0.3rem;
}
#order-list .item-total {
    min-width: 60px;
    text-align: right;
}


.order-summary {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px solid #3498db;
    font-size: 1.2rem;
    font-weight: bold;
}
.order-summary p {
    display: flex;
    justify-content: space-between;
}

#current-order button {
    width: 100%;
    margin-top: 0.5rem;
}

/* Admin Pages */
.menu-admin-list .menu-item-admin, .orders-list .order-card {
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.menu-admin-list .menu-item-info, .orders-list .order-info {
    flex-grow: 1;
}

.menu-admin-list .actions button, .orders-list .actions button {
    margin-left: 0.5rem;
}

.order-card .order-details {
    font-size: 0.9em;
    color: #555;
}
.order-card .order-details ul {
    padding-left: 20px;
}

/* Message Container */
.message-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    width: 300px;
}

.message {
    padding: 1rem;
    margin-bottom: 0.5rem;
    border-radius: 5px;
    color: white;
    opacity: 0.9;
    transition: opacity 0.5s ease-out;
}
.message.success {
    background-color: #2ecc71; /* Accent green */
}
.message.error {
    background-color: #e74c3c;
}

/* Responsive */
@media (max-width: 992px) {
    .pos-layout {
        grid-template-columns: 1fr;
    }
    .order-section {
        margin-top: 2rem;
    }
}

@media (max-width: 768px) {
    header h1 {
        font-size: 1.5rem;
    }
    .button, button {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
    .menu-items-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }
    .menu-item-card {
        padding: 0.8rem;
    }
     .menu-item-card img {
        height: 120px;
    }
}

@media (max-width: 480px) {
    .container {
        width: 95%;
    }
    header .header-actions {
        font-size: 0.8rem; /* Smaller buttons/links on mobile */
        gap: 5px;
    }
    header .header-actions .button, header .header-actions button {
      padding: 0.5rem 0.8rem;
    }
}
