* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    color: white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.detail-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 10px;
}

.restaurant-actions {
    display: flex;
    gap: 10px;
    margin-left: auto;
}

.back-btn {
    background: #f8f9fa;
    color: #333;
    border: 1px solid #ddd;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: #e9ecef;
    transform: translateY(-1px);
}

.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.add-btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.add-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
}

.restaurant-card {
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 20px;
}

.restaurant-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-color: #667eea;
}

.restaurant-logo {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #e1e5e9;
}

.restaurant-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.restaurant-info {
    flex: 1;
}

.restaurant-info h3 {
    margin-bottom: 5px;
}

.restaurant-info p {
    margin-bottom: 3px;
}

.view {
    display: none;
}

.view.active {
    display: block;
}

.section {
    background: white;
    border-radius: 10px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.section h2 {
    margin-bottom: 20px;
    color: #333;
    font-size: 1.5rem;
}

form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

input, select, textarea {
    padding: 12px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #667eea;
}

textarea {
    resize: vertical;
    min-height: 80px;
}

#dish-name, #edit-dish {
    min-height: 100px;
    font-family: inherit;
}

button {
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.restaurants-grid, .orders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.restaurant-card, .order-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    border: 2px solid #e1e5e9;
    transition: all 0.3s ease;
}

.restaurant-card:hover, .order-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border-color: #667eea;
}

.restaurant-card h3, .order-card h3 {
    margin-bottom: 10px;
    color: #333;
}

.restaurant-card p, .order-card p {
    margin-bottom: 5px;
    color: #666;
}

.card-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.card-actions button {
    padding: 8px 16px;
    font-size: 0.9rem;
    flex: 1;
}

.edit-btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.delete-btn {
    background: linear-gradient(135deg, #dc3545 0%, #e74c3c 100%);
}

.filter-controls {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.filter-controls select {
    flex: 1;
}

.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: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    position: relative;
}

.close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    color: #999;
}

.close:hover {
    color: #333;
}

.person-you {
    border-left: 4px solid #28a745;
}

.person-girlfriend {
    border-left: 4px solid #e74c3c;
}

.order-items {
    margin: 15px 0;
}

.order-item {
    margin-bottom: 12px;
}

.item-main {
    font-weight: 500;
    color: #333;
    margin-bottom: 4px;
}

.item-customizations {
    margin-left: 20px;
}

.customization {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 2px;
}

.order-notes {
    margin-top: 12px;
    font-size: 0.9rem;
    color: #666;
}

.order-date {
    margin-top: 10px;
    font-size: 0.85rem;
    color: #999;
}

.no-items {
    color: #999;
    font-style: italic;
}

.empty-state {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 40px;
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .tabs {
        flex-direction: column;
    }
    
    .restaurants-grid, .orders-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-controls {
        flex-direction: column;
    }
    
    .modal-content {
        width: 95%;
        margin: 5% auto;
    }
}

@media (max-width: 480px) {
    .section {
        padding: 20px;
    }
    
    .card-actions {
        flex-direction: column;
    }
    
    .card-actions button {
        width: 100%;
    }
}