* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    background-color: #333;
    color: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav button {
    background-color: #555;
    color: white;
    border: none;
    padding: 8px 16px;
    margin-left: 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

nav button:hover {
    background-color: #666;
}

.panel {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid #ddd;
}

.tab-btn {
    background: none;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 16px;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
}

.tab-btn.active {
    border-bottom-color: #333;
    font-weight: bold;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.form-container {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

input[type="text"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

textarea {
    resize: vertical;
    min-height: 100px;
}

.btn {
    background-color: #333;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #555;
}

.btn.secondary {
    background-color: #999;
    margin-left: 10px;
}

.btn.secondary:hover {
    background-color: #aaa;
}

.category-filter {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 20px;
    gap: 10px;
}

.filter-btn {
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-btn.active {
    background-color: #333;
    color: white;
    border-color: #333;
}

#dish-items,
#ingredient-items,
#menu-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.dish-item,
.ingredient-item {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.dish-item:hover,
.ingredient-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.dish-item h4,
.ingredient-item h4 {
    margin-bottom: 10px;
    color: #333;
}

.dish-item p,
.ingredient-item p {
    margin-bottom: 10px;
    color: #666;
}

.dish-actions,
.ingredient-actions {
    margin-top: 15px;
    display: flex;
    gap: 10px;
}

.dish-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.dish-list-header h3 {
    margin: 0;
}

.reset-btn {
    background-color: #f44336;
    font-size: 12px;
    padding: 6px 12px;
}

.reset-btn:hover {
    background-color: #da190b;
}

.menu-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.order-summary {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    position: sticky;
    top: 20px;
    height: fit-content;
}

#order-items {
    margin-bottom: 20px;
}

.order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #ddd;
}

.order-item:last-child {
    border-bottom: none;
}

.order-item .quantity {
    display: flex;
    align-items: center;
    gap: 10px;
}

.order-item button {
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.order-total {
    display: flex;
    justify-content: space-between;
    font-weight: bold;
    font-size: 18px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #ddd;
}

.order-float-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #333;
    color: white;
    padding: 15px 25px;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 100;
    transition: transform 0.3s;
}

.order-float-btn:hover {
    transform: scale(1.05);
    background-color: #555;
}

.order-count-badge {
    background-color: #f44336;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
}

.order-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 350px;
    height: 100vh;
    background-color: white;
    box-shadow: -4px 0 12px rgba(0,0,0,0.15);
    transition: right 0.3s ease;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.order-sidebar.open {
    right: 0;
}

.order-sidebar-header {
    background-color: #333;
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.order-sidebar-header h3 {
    margin: 0;
    font-size: 18px;
}

.close-sidebar {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.close-sidebar:hover {
    color: #aaa;
}

#order-items-sidebar {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
}

.order-total-sidebar {
    background-color: #f9f9f9;
    padding: 15px 20px;
    border-top: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    font-weight: bold;
    font-size: 18px;
}

.order-actions-sidebar {
    padding: 15px 20px;
    display: flex;
    gap: 10px;
    border-top: 1px solid #ddd;
}

.clear-order-btn {
    background-color: #999;
    flex: 1;
}

.clear-order-btn:hover {
    background-color: #888;
}

.submit-order-btn {
    background-color: #4CAF50;
    flex: 1;
}

.submit-order-btn:hover {
    background-color: #45a049;
}

.empty-order {
    text-align: center;
    color: #999;
    padding: 30px;
    font-size: 14px;
}

.menu-item-info {
    cursor: pointer;
}

.menu-item-actions {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.add-to-cart-btn {
    width: 100%;
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.add-to-cart-btn:hover {
    background-color: #45a049;
}

.quantity-control {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.qty-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid #ddd;
    background-color: #f5f5f5;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.qty-btn:hover {
    background-color: #e0e0e0;
}

.qty-num {
    font-size: 16px;
    font-weight: bold;
    min-width: 30px;
    text-align: center;
}

.order-item-sidebar {
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

.order-item-info h4 {
    margin: 0 0 5px 0;
    font-size: 14px;
}

.order-item-info p {
    margin: 0;
    color: #666;
    font-size: 13px;
}

.quantity-control-sidebar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.quantity-control-sidebar .qty-btn {
    width: 28px;
    height: 28px;
    font-size: 14px;
}

.quantity-control-sidebar .qty-num {
    font-size: 14px;
    min-width: 24px;
}

.remove-btn {
    width: 28px;
    height: 28px;
    border-radius: 4px;
    border: 1px solid #f44336;
    background-color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f44336;
    margin-left: auto;
    transition: all 0.2s;
}

.remove-btn:hover {
    background-color: #f44336;
    color: white;
}

.menu-category {
    font-size: 12px;
    color: #888;
    margin-bottom: 8px;
}

.menu-price {
    font-size: 20px;
    font-weight: bold;
    color: #e74c3c;
    margin: 0;
}

.menu-desc {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0;
}

.menu-item {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    transition: transform 0.3s, box-shadow 0.3s;
    background-color: white;
}

.menu-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.menu-item-info {
    cursor: pointer;
}

.menu-item-info h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    color: #333;
}

.menu-item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #eee;
}

.menu-item-actions {
    flex-shrink: 0;
}

.menu-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 20px;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    background-color: white;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px;
    border-radius: 8px;
    position: relative;
}

.modal-content .close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.modal-content .close:hover {
    color: black;
}

.modal-dish-info h3 {
    margin: 0 0 10px 0;
    font-size: 22px;
}

.modal-category {
    display: inline-block;
    background-color: #f5f5f5;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 12px;
    color: #666;
    margin-bottom: 15px;
}

.modal-dish-info p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
}

#modal-dish-price {
    font-size: 24px;
    font-weight: bold;
    color: #e74c3c;
    margin-bottom: 20px;
}

.modal-dish-info h4 {
    margin: 15px 0 10px 0;
    font-size: 16px;
    color: #333;
}

.modal-dish-info ul {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}

.modal-dish-info ul li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    color: #666;
    font-size: 14px;
}

.modal-dish-info ul li:last-child {
    border-bottom: none;
}

.modal-actions {
    margin-top: 15px;
}

.modal-actions .btn {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    background-color: #4CAF50;
}

.modal-actions .btn:hover {
    background-color: #45a049;
}

#ingredient-association {
    margin: 20px 0;
}

.ingredient-checkbox {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.ingredient-checkbox input {
    margin-right: 10px;
}

.ingredient-checkbox input[type="number"] {
    width: 80px;
    margin-left: 10px;
}

.ingredient-row {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 15px;
    align-items: end;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px dashed #ddd;
}

.ingredient-row:last-child {
    border-bottom: none;
}

.add-ingredient-row {
    background-color: #4CAF50;
    color: white;
    font-size: 20px;
    font-weight: bold;
    padding: 8px 16px;
    min-width: 40px;
}

.add-ingredient-row:hover {
    background-color: #45a049;
}

.remove-ingredient-row {
    background-color: #f44336;
    color: white;
    font-size: 16px;
    padding: 8px 12px;
    margin-left: 5px;
}

.remove-ingredient-row:hover {
    background-color: #da190b;
}

.welcome-screen {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.welcome-content {
    text-align: center;
    background-color: white;
    padding: 50px 60px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.welcome-content h1 {
    font-size: 36px;
    margin-bottom: 15px;
    color: #333;
}

.welcome-content p {
    font-size: 18px;
    color: #666;
    margin-bottom: 30px;
}

.welcome-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.welcome-btn {
    padding: 15px 40px;
    font-size: 18px;
    border-radius: 8px;
    min-width: 140px;
}

.welcome-btn:first-child {
    background-color: #4CAF50;
}

.welcome-btn:first-child:hover {
    background-color: #45a049;
}

.login-modal-content {
    max-width: 400px;
}

.error-message {
    color: #f44336;
    font-size: 14px;
    margin-bottom: 15px;
    min-height: 20px;
}

input[type="password"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

@media (max-width: 768px) {
    .menu-container {
        grid-template-columns: 1fr;
    }
    
    .order-summary {
        position: static;
    }
    
    #dish-items,
    #ingredient-items,
    #menu-items {
        grid-template-columns: 1fr;
    }
    
    header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    nav button {
        margin-left: 0;
        margin-right: 10px;
    }
    
    .welcome-content {
        padding: 30px 40px;
        margin: 20px;
    }
    
    .welcome-content h1 {
        font-size: 28px;
    }
    
    .welcome-buttons {
        flex-direction: column;
    }
    
    .welcome-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .panel {
        padding: 15px;
    }
    
    .category-filter {
        flex-direction: column;
    }
    
    .filter-btn {
        width: 100%;
        text-align: center;
    }
}

.orders-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.orders-header h3 {
    margin: 0;
}

.order-count {
    background-color: #4CAF50;
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 14px;
}

.empty-orders {
    text-align: center;
    color: #999;
    padding: 40px;
    font-size: 14px;
}

.chef-order-card {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    transition: box-shadow 0.3s;
}

.chef-order-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.chef-order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.chef-order-customer {
    display: flex;
    align-items: center;
    gap: 10px;
}

.customer-name {
    font-weight: bold;
    font-size: 16px;
    color: #333;
}

.order-time {
    font-size: 12px;
    color: #999;
}

.chef-order-actions {
    display: flex;
    gap: 8px;
}

.complete-btn {
    background-color: #4CAF50;
    padding: 6px 12px;
    font-size: 12px;
}

.complete-btn:hover {
    background-color: #45a049;
}

.delete-btn {
    background-color: #f44336;
    padding: 6px 12px;
    font-size: 12px;
}

.delete-btn:hover {
    background-color: #da190b;
}

.chef-order-items {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.order-item-tag {
    background-color: #f5f5f5;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 13px;
    color: #666;
}

.chef-order-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid #eee;
}

.order-total {
    font-weight: bold;
    color: #e74c3c;
    font-size: 15px;
}

.order-remark {
    font-size: 12px;
    color: #666;
    background-color: #fff3e0;
    padding: 4px 8px;
    border-radius: 4px;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.order-user-info {
    padding: 15px;
    background-color: #f9f9f9;
    border-top: 1px solid #eee;
}

.order-user-info .form-group {
    margin-bottom: 12px;
}

.order-user-info .form-group:last-child {
    margin-bottom: 0;
}

.order-user-info label {
    font-size: 13px;
    margin-bottom: 4px;
}

.order-user-info input,
.order-user-info textarea {
    font-size: 14px;
    padding: 8px 10px;
}

.order-user-info textarea {
    min-height: 60px;
    resize: vertical;
}

.required {
    color: #f44336;
}

.error-hint {
    color: #f44336;
    font-size: 12px;
    margin-top: 4px;
    min-height: 16px;
}