/* Base Styles */
body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header Styles */
header {
    background-color: #2c3e50;
    color: white;
    padding: 15px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    margin: 0;
    font-size: 1.5rem;
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

nav ul li {
    margin-left: 20px;
    position: relative;
}

nav ul li a {
    color: white;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 3px;
    transition: background-color 0.3s;
}

nav ul li a:hover {
    background-color: #34495e;
}

.user-menu {
    cursor: pointer;
}

.user-menu ul {
    display: none;
    position: absolute;
    right: 0;
    background-color: white;
    min-width: 150px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    border-radius: 3px;
    padding: 5px 0;
    z-index: 100;
}

.user-menu:hover ul {
    display: block;
}

.user-menu ul li {
    margin: 0;
}

.user-menu ul li a {
    color: #333;
    display: block;
    padding: 8px 15px;
}

.user-menu ul li a:hover {
    background-color: #f0f0f0;
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 8px 15px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #2980b9;
}

.btn-primary {
    background-color: #2ecc71;
}

.btn-primary:hover {
    background-color: #27ae60;
}

.btn-danger {
    background-color: #e74c3c;
}

.btn-danger:hover {
    background-color: #c0392b;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 0.8rem;
}

/* Form Styles */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 1rem;
}

.form-group textarea {
    min-height: 100px;
}

/* Alert Styles */
.alert {
    padding: 10px 15px;
    margin-bottom: 15px;
    border-radius: 3px;
}

.alert.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Login Page */
.login-container {
    max-width: 400px;
    margin: 50px auto;
    padding: 20px;
    background-color: white;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.login-container h2 {
    margin-top: 0;
    text-align: center;
    color: #2c3e50;
}

/* POS Styles */
.pos-dashboard {
    margin-top: 20px;
}

.quick-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.quick-actions a {
    flex: 1;
    text-align: center;
    padding: 20px;
    background-color: white;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.quick-actions a:hover {
    transform: translateY(-5px);
}

.quick-actions i {
    font-size: 2rem;
    margin-bottom: 10px;
    display: block;
}

.recent-orders {
    background-color: white;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

table th {
    background-color: #f8f9fa;
    padding: 10px;
    text-align: left;
    border-bottom: 2px solid #dee2e6;
}

table td {
    padding: 10px;
    border-bottom: 1px solid #dee2e6;
}

table tr:hover {
    background-color: #f8f9fa;
}

.status-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 0.8rem;
    font-weight: bold;
}

.status-badge.pending {
    background-color: #fff3cd;
    color: #856404;
}

.status-badge.completed {
    background-color: #d4edda;
    color: #155724;
}

.status-badge.cancelled {
    background-color: #f8d7da;
    color: #721c24;
}

/* New Order Page */
.pos-order-container {
    background-color: white;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-top: 20px;
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.order-meta div {
    margin-bottom: 5px;
    font-size: 0.9rem;
    color: #666;
}

.order-details {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.order-items-container {
    display: flex;
    gap: 20px;
}

.menu-categories {
    flex: 2;
}

.menu-category {
    margin-bottom: 20px;
}

.menu-category h3 {
    background-color: #f8f9fa;
    padding: 10px;
    margin: 0 0 10px 0;
    border-radius: 3px;
}

.menu-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}

.menu-item {
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 3px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.3s;
}

.menu-item:hover {
    background-color: #f8f9fa;
    transform: translateY(-3px);
    box-shadow: 0 3px 5px rgba(0,0,0,0.1);
}

.menu-item h4 {
    margin: 0 0 5px 0;
    font-size: 1rem;
}

.menu-item p {
    margin: 0;
    color: #2ecc71;
    font-weight: bold;
}

.order-items {
    flex: 1;
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 3px;
}

.items-list {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 15px;
    padding-right: 10px;
}

.order-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px dashed #ddd;
}

.order-item:last-child {
    border-bottom: none;
}

.order-totals {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #ddd;
}

.total-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.total-row.grand-total {
    font-weight: bold;
    font-size: 1.1rem;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #ddd;
}

.payment-details {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #ddd;
}

.order-notes {
    margin-top: 15px;
}

.order-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

/* Receipt Styles */
.receipt-container {
    max-width: 500px;
    margin: 20px auto;
    padding: 20px;
    background-color: white;
    border: 1px solid #ddd;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.receipt-header {
    text-align: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px dashed #000;
}

.receipt-header h2 {
    margin: 0 0 5px 0;
    font-size: 1.2rem;
}

.receipt-header p {
    margin: 3px 0;
    font-size: 0.9rem;
}

.receipt-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.receipt-details {
    font-size: 0.9rem;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px dashed #000;
}

.receipt-details div {
    margin-bottom: 5px;
}

.receipt-title {
    text-align: center;
    font-weight: bold;
    margin: 15px 0;
    font-size: 1.1rem;
}

.receipt-items {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
}

.receipt-items th {
    text-align: left;
    border-bottom: 1px dashed #000;
    padding: 5px 0;
}

.receipt-items td {
    padding: 5px 0;
    border-bottom: 1px dashed #ddd;
}

.receipt-totals {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px dashed #000;
}

.receipt-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 10px;
    border-top: 1px dashed #000;
    font-size: 0.9rem;
}

.receipt-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

/* Admin Dashboard */
.admin-dashboard {
    margin-top: 20px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background-color: white;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    text-align: center;
}

.stat-card h3 {
    margin-top: 0;
    color: #666;
    font-size: 1rem;
}

.stat-card p {
    margin-bottom: 0;
    font-size: 1.5rem;
    font-weight: bold;
    color: #2c3e50;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 20px;
    border-radius: 5px;
    width: 80%;
    max-width: 500px;
    position: relative;
}

.close {
    position: absolute;
    right: 15px;
    top: 10px;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .order-items-container {
        flex-direction: column;
    }
    
    .quick-actions {
        flex-direction: column;
    }
    
    nav ul {
        flex-direction: column;
        gap: 10px;
    }
    
    .user-menu ul {
        position: static;
        box-shadow: none;
    }
    /* POS Specific Styles */
.pos-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.order-header {
    background: #2c3e50;
    color: white;
    padding: 15px;
    border-radius: 5px;
}

.order-header h2 {
    margin: 0;
}

.order-meta {
    display: flex;
    gap: 20px;
    margin-top: 10px;
    font-size: 0.9em;
    color: #ecf0f1;
}

.order-details {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
}

.order-selection {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.menu-categories-tabs {
    display: flex;
    gap: 5px;
    overflow-x: auto;
    padding-bottom: 5px;
}

.tab-btn {
    padding: 8px 15px;
    background: #e0e0e0;
    border: none;
    border-radius: 5px 5px 0 0;
    cursor: pointer;
    white-space: nowrap;
}

.tab-btn.active {
    background: #3498db;
    color: white;
}

.menu-items-grid {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    min-height: 300px;
}

.menu-category {
    display: none;
}

.menu-category.active {
    display: block;
}

.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.menu-item {
    background: white;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.menu-item:hover {
    background: #f0f7ff;
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.menu-item h4 {
    margin: 0 0 5px 0;
    color: #2c3e50;
}

.menu-item p {
    margin: 0;
    color: #27ae60;
    font-weight: bold;
}

.menu-item .description {
    font-size: 0.8em;
    color: #7f8c8d;
    margin-top: 5px;
    font-weight: normal;
}

.order-summary {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
}

#order-items-container {
    max-height: 300px;
    overflow-y: auto;
    margin: 10px 0;
    padding: 10px;
    background: white;
    border-radius: 5px;
    border: 1px solid #ddd;
}

#order-items-container .empty-message {
    color: #7f8c8d;
    text-align: center;
    margin: 20px 0;
}

.order-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px dashed #ddd;
}

.order-item:last-child {
    border-bottom: none;
}

.order-item .item-name {
    flex-grow: 1;
}

.order-item .item-price {
    min-width: 80px;
    text-align: right;
}

.order-item .item-qty {
    display: inline-block;
    min-width: 30px;
    text-align: center;
}

.order-item .item-actions {
    display: inline-flex;
    gap: 5px;
    align-items: center;
}

.order-item .btn-qty {
    width: 25px;
    height: 25px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 3px;
    cursor: pointer;
}

.order-item .btn-remove {
    color: #e74c3c;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2em;
    margin-left: 5px;
}

.order-totals {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #ddd;
}

.total-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.total-row.grand-total {
    font-weight: bold;
    font-size: 1.1em;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #ddd;
}

.payment-details {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #ddd;
}

.form-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 20px;
    border-radius: 5px;
    width: 90%;
    max-width: 500px;
    position: relative;
}

.close {
    position: absolute;
    right: 15px;
    top: 10px;
    font-size: 1.5em;
    font-weight: bold;
    cursor: pointer;
}
}