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

body {
    font-family: 'Noto Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #fff;
    color: #1a1a1a;
    overflow-x: hidden;
}

#app {
    width: 100vw;
    height: 100vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Header */
.header {
    background: #fff;
    padding: 1rem;
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header h1 {
    font-size: 1.2rem;
    font-weight: 700;
}

.back-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    margin-left: -0.5rem;
}

/* Home Screen */
.home {
    display: flex;
    flex-direction: column;
    height: 100vh;
    padding: 2rem 1rem;
}

.logo {
    text-align: center;
    margin-bottom: 3rem;
}

.logo h1 {
    font-size: 2rem;
    font-weight: 800;
    color: #d32f2f;
    margin-bottom: 0.5rem;
}

.logo p {
    color: #666;
    font-size: 0.9rem;
}

.order-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex: 1;
}

.option-card {
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 2rem 1.5rem;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.option-card:active {
    transform: scale(0.98);
    border-color: #d32f2f;
}

.option-card .icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.option-card h2 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.option-card p {
    color: #666;
    font-size: 0.9rem;
}

/* Button Styles */
.btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
}

.btn-primary {
    background: #d32f2f;
    color: white;
}

.btn-primary:active {
    background: #b71c1c;
}

.btn-secondary {
    background: #f5f5f5;
    color: #1a1a1a;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

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

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.875rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #d32f2f;
}

/* Menu */
.menu-container {
    padding: 1rem;
}

.menu-categories {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
}

.category-chip {
    padding: 0.5rem 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    background: white;
    white-space: nowrap;
    cursor: pointer;
    font-size: 0.9rem;
}

.category-chip.active {
    background: #d32f2f;
    color: white;
    border-color: #d32f2f;
}

.menu-items {
    display: grid;
    gap: 1rem;
}

.menu-item {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    gap: 1rem;
}

.menu-item-image-container {
    position: relative;
    width: 80px;
    height: 80px;
    flex-shrink: 0;
}

.menu-item-image {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    background: #f5f5f5;
    object-fit: cover;
}

.discount-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #d32f2f;
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
}

.menu-item-info {
    flex: 1;
}

.menu-item-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.menu-item-description {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.menu-item-pricing {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.menu-item-price {
    font-weight: 700;
    color: #d32f2f;
    font-size: 1.1rem;
}

.original-price {
    font-size: 0.9rem;
    color: #999;
    text-decoration: line-through;
}

.menu-item-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.quantity-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #e0e0e0;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.quantity-display {
    min-width: 30px;
    text-align: center;
    font-weight: 600;
}

/* Cart Footer */
.cart-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    padding: 1rem;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-total {
    font-size: 1.3rem;
    font-weight: 700;
}

.view-cart-btn {
    padding: 0.875rem 2rem;
    background: #d32f2f;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

/* Cart Screen */
.cart-items {
    padding: 1rem;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    padding: 1rem 0;
    border-bottom: 1px solid #e0e0e0;
}

.cart-item-info h3 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.cart-item-quantity {
    color: #666;
    font-size: 0.9rem;
}

.cart-item-price {
    font-weight: 700;
}

.cart-summary {
    padding: 1rem;
    background: #f9f9f9;
    margin: 1rem;
    border-radius: 8px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.summary-row.total {
    font-size: 1.3rem;
    font-weight: 700;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px solid #e0e0e0;
}

/* Upload Section */
.upload-section {
    padding: 1rem;
}

.upload-box {
    border: 2px dashed #e0e0e0;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    background: #fafafa;
}

.upload-box:active {
    background: #f0f0f0;
}

.upload-preview {
    max-width: 100%;
    max-height: 200px;
    margin-top: 1rem;
    border-radius: 8px;
}

/* Admin */
.admin-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    padding: 1rem;
}

.stat-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1.5rem 1rem;
    text-align: center;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #d32f2f;
}

.stat-label {
    color: #666;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.order-list {
    padding: 1rem;
}

.order-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.order-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.order-id {
    font-weight: 700;
}

.order-status {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-pending {
    background: #fff3e0;
    color: #f57c00;
}

.status-approved {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-delivered {
    background: #e3f2fd;
    color: #1565c0;
}

.order-items {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.order-total {
    font-weight: 700;
    font-size: 1.1rem;
    margin-top: 0.5rem;
}

.order-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.order-actions button {
    flex: 1;
    padding: 0.5rem;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
}

.approve-btn {
    background: #4caf50;
    color: white;
}

.reject-btn {
    background: #f44336;
    color: white;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: flex-end;
    z-index: 1000;
    animation: fadeIn 0.2s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: white;
    border-radius: 16px 16px 0 0;
    padding: 1.5rem;
    max-height: 80vh;
    overflow-y: auto;
    width: 100%;
    animation: slideUp 0.3s;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Loading */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #d32f2f;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Tab Navigation */
.tab-nav {
    display: flex;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 1rem;
}

.tab-btn {
    flex: 1;
    padding: 1rem;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-weight: 600;
}

.tab-btn.active {
    border-bottom-color: #d32f2f;
    color: #d32f2f;
}

/* QR Grid */
.qr-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.qr-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.qr-card:active {
    transform: scale(0.95);
    border-color: #d32f2f;
}

.qr-code {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.qr-table-number {
    font-weight: 700;
    font-size: 1.1rem;
    color: #1a1a1a;
}

/* Admin Dishes */
.admin-dishes {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.admin-dish-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.admin-dish-card.inactive {
    opacity: 0.5;
    background: #f5f5f5;
}

.btn-icon {
    background: #f5f5f5;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:active {
    background: #e0e0e0;
}

/* Customer Cards */
.customer-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.customer-card.blocked {
    opacity: 0.6;
    background: #ffebee;
}

.btn-danger {
    background: #f44336;
    color: white;
}

.btn-success {
    background: #4caf50;
    color: white;
}

.status-preparing {
    background: #fff3e0;
    color: #f57c00;
}

.status-on-the-way {
    background: #e3f2fd;
    color: #1976d2;
}

.status-rejected {
    background: #ffebee;
    color: #c62828;
}

/* Utility */
.mt-1 { margin-top: 1rem; }
.mb-1 { margin-bottom: 1rem; }
.text-center { text-align: center; }
.text-sm { font-size: 0.875rem; }
.text-gray { color: #666; }