/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body,
html {
    overflow-x: hidden;
}

/* Tables Screen Styles */
.area-nav {
    display: flex;
    gap: 10px;
    margin: 20px 0;
    justify-content: center;
    flex-wrap: wrap;
}

.area-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 20px;
    background: #f5f5f5;
    color: #333;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.area-btn.active,
.area-btn:hover {
    background: #ff6b35;
    color: white;
}

.area-btn.takeaway-area {
    background: #ff9800;
    color: white;
    font-weight: bold;
}

.area-btn.takeaway-area.active,
.area-btn.takeaway-area:hover {
    background: #f57c00;
    color: white;
}

.tables-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
    padding: 20px 0;
    max-width: 800px;
    margin: 0 auto;
}

.table-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.table-card:hover {
    border-color: #ff6b35;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 53, 0.2);
}

.table-card.has-orders {
    background: #fff3f0;
    border-color: #ff6b35;
}

.table-card .table-name {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.table-card .table-area {
    font-size: 12px;
    color: #666;
    margin-bottom: 10px;
}

.table-card .item-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff6b35;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.table-card .table-status {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 10px;
    margin-top: 5px;
}

.table-card .table-status.empty {
    background: #e8f5e8;
    color: #4caf50;
}

.table-card .table-status.occupied {
    background: #fff3f0;
    color: #ff6b35;
}

/* Takeaway table cards styling */
.table-card[data-table^="T"] {
    border-color: #ff9800;
    background: linear-gradient(135deg, #fff8e1 0%, #ffffff 100%);
}

.table-card[data-table^="T"]:hover {
    border-color: #f57c00;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 152, 0, 0.3);
}

.table-card[data-table^="T"] .table-name {
    color: #e65100;
    font-weight: bold;
}

.table-card[data-table^="T"] .table-area {
    color: #ff9800;
    font-weight: 500;
}

.table-card[data-table^="T"].has-orders {
    background: linear-gradient(135deg, #fff3e0 0%, #ffcc80 100%);
    border-color: #f57c00;
}

/* Mobile responsive for tables */
@media (max-width: 768px) {
    .tables-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
        padding: 15px 0;
    }
    
    .table-card {
        padding: 15px;
        min-height: 80px;
    }
    
    .table-card .table-name {
        font-size: 14px;
    }
    
    .table-card .table-area {
        font-size: 11px;
    }
    
    .area-nav {
        gap: 8px;
        margin: 15px 0;
    }
    
    .area-btn {
        padding: 6px 12px;
        font-size: 13px;
    }
}

/* General Styles */
body {
    font-family: Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.4;
}

/* Header */
.header {
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    color: white;
    padding: 15px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: relative;
}

.header h1 {
    font-size: 24px;
    margin-bottom: 10px;
}

/* Settings Button */
.settings-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 12px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s ease;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.settings-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: rotate(90deg);
}

.table-selector {
    margin-bottom: 10px;
}

.table-selector label {
    font-weight: bold;
    margin-right: 10px;
}

.table-selector select {
    padding: 8px 12px;
    border: none;
    border-radius: 5px;
    font-size: 16px;    
    background-color: darkorange;
    color: #ffffff;
}

/* Navigation Tabs - Mobile Style Bottom Navigation */
.nav-tabs {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    background-color: white;
    border-top: 1px solid #e0e0e0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 100;
    height: 60px;
}

.tab-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6px 4px;
    border: none;
    background-color: white;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #999;
    text-decoration: none;
    border-radius: 0;
    position: relative;
}

.tab-btn.active {
    background-color: #fff3f0;
    color: #ff6b35;
    transform: translateY(-2px);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 3px;
    background-color: #ff6b35;
    border-radius: 0 0 3px 3px;
}

.tab-btn:hover:not(.active) {
    background-color: #f8f8f8;
}

/* Tab Icons */
.tab-btn::before {
    content: '';
    display: block;
    width: 20px;
    height: 20px;
    margin-bottom: 2px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.6;
    transition: all 0.2s ease;
}

.tab-btn.active::before {
    opacity: 1;
    transform: scale(1.1);
}

/* Menu Tab Icon */
#menuTab::before {
    content: '🍜';
    font-size: 16px;
    width: auto;
    height: auto;
}

/* Payment Tab Icon */
#paymentTab::before {
    content: '💰';
    font-size: 16px;
    width: auto;
    height: auto;
}

/* Bill List Tab Icon */
#billListTab::before {
    content: '📋';
    font-size: 16px;
    width: auto;
    height: auto;
}

/* Statistics Tab Icon */
#statisticsTab::before {
    content: '📊';
    font-size: 16px;
    width: auto;
    height: auto;
}

/* Screen Management */
.screen {
    display: none;
    min-height: calc(100vh - 140px);
}

.screen.active {
    display: block;
}

/* Container */
.container {
    padding: 15px;
    max-width: 800px;
    margin: 0 auto;
    margin-bottom: 70px;
    /* Space for bottom navigation */
}

/* Menu Sections */
.menu-section {
    background-color: white;
    margin-bottom: 20px;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.menu-section h2 {
    color: #ff6b35;
    margin-bottom: 15px;
    font-size: 20px;
    border-bottom: 2px solid #ff6b35;
    padding-bottom: 5px;
}

/* Menu Items */
.menu-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.menu-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background-color: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
}

.menu-item:hover {
    background-color: #f0f0f0;
    border-color: #ff6b35;
}

.item-info h3 {
    font-size: 16px;
    margin-bottom: 5px;
    color: #333;
}

.item-info .price {
    font-size: 14px;
    color: #ff6b35;
    font-weight: bold;
}

.add-btn {
    background-color: #ff6b35;
    color: white;
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.add-btn:hover {
    background-color: #e55a2b;
    transform: scale(1.1);
}

.add-btn:active {
    transform: scale(0.95);
}

/* Order Summary */
.order-summary {
    position: fixed;
    bottom: 60px;
    /* Above bottom navigation */
    left: 0;
    right: 0;
    background-color: white;
    border-top: 2px solid #ff6b35;
    padding: 15px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    max-height: 200px;
    overflow-y: auto;
}

.order-summary h3 {
    color: #ff6b35;
    margin-bottom: 10px;
    font-size: 16px;
}

/* Order Header with buttons inline */
.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.header-buttons {
    display: flex;
    gap: 8px;
}

.header-buttons .action-btn {
    padding: 6px 12px;
    font-size: 14px;
    white-space: nowrap;
}

.payment-btn {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.payment-btn:hover {
    background: linear-gradient(135deg, #218838, #1ba085);
    transform: translateY(-1px);
}

.order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    font-size: 14px;
    gap: 10px;
}

.order-item:last-child {
    border-bottom: none;
}

.order-item-details {
    flex: 1;
}

.order-item-name {
    font-weight: 500;
    display: block;
}

.order-item-note {
    font-size: 12px;
    color: #666;
    font-style: italic;
    margin-top: 2px;
    line-height: 1.3;
    max-width: 150px;
    word-wrap: break-word;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 5px;
}

.qty-btn {
    background-color: #ff6b35;
    color: white;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-btn:hover {
    background-color: #e55a2b;
    transform: scale(1.1);
}

.qty-btn.minus {
    background-color: #f44336;
}

.qty-btn.minus:hover {
    background-color: #da190b;
}

.order-item-qty,
.qty-display {
    color: black;
    font-size: 17px;
    font-weight: bold;
    min-width: 25px;
    text-align: center;
}

.order-item-price {
    font-weight: bold;
    color: #ff6b35;
    min-width: 70px;
    text-align: right;
}

.order-item-actions {
    display: flex;
    gap: 5px;
    align-items: center;
}

.edit-btn {
    background-color: #17a2b8;
    color: white;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.edit-btn:hover {
    background-color: #138496;
    transform: scale(1.1);
}

.remove-btn {
    background-color: #f44336;
    color: white;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-btn:hover {
    background-color: #da190b;
    transform: scale(1.1);
}

.separate-bill-btn {
    background-color: #2196F3;
    color: white;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 2px;
}

.separate-bill-btn:hover {
    background-color: #1976D2;
    transform: scale(1.1);
}

.separate-bill-btn-list {
    background-color: #2196F3;
    color: white;
    border: none;
    border-radius: 4px;
    width: 28px;
    height: 28px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 2px;
}

.separate-bill-btn-list:hover {
    background-color: #1976D2;
    transform: scale(1.05);
}

.order-total {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 2px solid #ff6b35;
    text-align: right;
    font-size: 18px;
    color: #ff6b35;
}

.empty-order {
    color: #999;
    font-style: italic;
    text-align: center;
    padding: 10px;
}

/* Payment Screen */
.payment-header {
    background-color: white;
    padding: 10px;
    border-radius: 10px;
    margin-bottom: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.payment-header h2 {
    color: #ff6b35;
    font-size: 22px;
}

.order-details {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.order-details h3 {
    color: #ff6b35;
    margin-bottom: 15px;
    font-size: 18px;
}

.payment-order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
    gap: 15px;
}

.payment-order-item:last-child {
    border-bottom: none;
}

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

.payment-item-info .item-note {
    font-size: 12px;
    color: #666;
    font-style: italic;
}

.payment-item-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.payment-item-controls .edit-btn {
    width: 28px;
    height: 28px;
    font-size: 10px;
}

.payment-item-controls .separate-bill-btn {
    width: 28px;
    height: 28px;
}

.payment-item-controls .remove-btn {
    width: 28px;
    height: 28px;
}

.payment-item-price {
    min-width: 80px;
    text-align: right;
}

.payment-total {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 20px;
    font-weight: bold;
    color: #ff6b35;
}

.payment-actions {
    display: flex;
    gap: 15px;
    flex-direction: column;
}

.action-btn {
    padding: 15px;
    border: none;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.print-btn {
    background-color: #4CAF50;
    color: white;
}

.print-btn:hover {
    background-color: #45a049;
}

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

.clear-btn:hover:not(:disabled) {
    background-color: #da190b;
}

.clear-btn:disabled {
    background-color: #cccccc;
    color: #888888;
    cursor: not-allowed;
    opacity: 0.6;
}

.action-btn:disabled {
    background-color: #cccccc;
    color: #888888;
    cursor: not-allowed;
    opacity: 0.6;
    transform: none;
}

.print-btn:disabled {
    background: #cccccc;
    color: #888888;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Modal */
.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.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Add Item Modal Styles */
.add-item-modal {
    max-width: 400px;
    width: 90%;
    height: auto;
    max-height: 80vh;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.modal-header {
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-body {
    padding: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
}

.quantity-input-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

.quantity-input-group input {
    width: 80px;
    padding: 10px;
    text-align: center;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
}

.quantity-input-group .qty-btn {
    width: 40px;
    height: 40px;
    font-size: 20px;
}

textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: Arial, sans-serif;
    font-size: 14px;
    resize: vertical;
    box-sizing: border-box;
}

textarea:focus {
    border-color: #ff6b35;
    outline: none;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 10px;
}

.cancel-btn {
    background: #6c757d;
    color: white;
    flex: 1;
}

.cancel-btn:hover {
    background: #545b62;
}

.confirm-btn {
    background: #ff6b35;
    color: white;
    flex: 1;
}

.confirm-btn:hover {
    background: #e55a2b;
}

.modal-content {
    background-color: white;
    border-radius: 10px;
    max-width: 400px;
    width: 90%;
    overflow-y: auto;
    height: 100%;
}

/* Receipt */
.receipt {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 20px;
    padding: 10px;
}

.receipt-header {
    text-align: center;
    margin-bottom: 5px;
}

.receipt-header h2 {
    font-size: 18px;
    margin-bottom: 5px;
}

.receipt-body p {
    margin-bottom: 5px;
}

.receipt-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 3px;
}

.receipt-total {
    text-align: center;
    font-size: 16px;
    margin-top: 10px;
}

.receipt-footer {
    text-align: center;
    margin-top: 15px;
}

.receipt-table thead tr {
    border-top: 1px solid #000;
    border-bottom: 1px solid #000;
}

.receipt-table th {
    font-size: 15px;
}

.receipt-table td {
    padding: 3px 0px;
    font-size: 15px;
}

.receipt-table tbody tr {
    border-bottom: 1px dashed #ccc;
}

.receipt-logo {
    width: 20%;
}

.modal-actions {
    display: flex;
    gap: 10px;
    padding: 10px;
}

.modal-actions .action-btn {
    flex: 1;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 10px;
}

/* Bill List Styles */
.bill-item {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    margin-bottom: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    animation: fadeInUp 0.3s ease-out;
}

.bill-item:hover {
    box-shadow: 0 6px 12px rgba(255, 107, 53, 0.15);
    transform: translateY(-2px);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bill-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px;
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    color: white;
    font-weight: bold;
    border-radius: 8px 8px 0 0;
    box-shadow: 0 2px 4px rgba(255, 107, 53, 0.2);
}

.bill-status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bill-status.pending {
    background: rgba(255, 255, 255, 0.9);
    color: #d73502;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.bill-status.completed {
    background: rgba(255, 255, 255, 0.9);
    color: #28a745;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.takeaway-badge {
    background: #28a745;
    color: white;
    padding: 2px 6px;
    border-radius: 12px;
    font-size: 0.7em;
    font-weight: 600;
    margin-left: 8px;
    display: inline-block;
}

/* Bill Lock Styles */
.lock-badge {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7em;
    font-weight: 600;
    margin-left: 8px;
    display: inline-block;
    animation: pulse 2s infinite;
}

.lock-badge.own-lock {
    background: #007bff;
    color: white;
}

.lock-badge.other-lock {
    background: #dc3545;
    color: white;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

.bill-item.own-locked {
    border: 2px solid #007bff;
    background: linear-gradient(135deg, rgba(0, 123, 255, 0.1), rgba(0, 123, 255, 0.05));
}

.bill-item.other-locked {
    border: 2px solid #dc3545;
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.1), rgba(220, 53, 69, 0.05));
    opacity: 0.8;
}

.bill-item.other-locked .checkout-btn,
.bill-item.other-locked .separate-bill-btn-list {
    opacity: 0.5;
    cursor: not-allowed;
}

.locked-message {
    color: #dc3545;
    font-style: italic;
    font-size: 0.9em;
}

.bill-items {
    margin-bottom: 12px;
    padding: 0 16px;
}

.bill-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.bill-item-row:hover {
    background-color: rgba(0, 123, 255, 0.02);
    transform: translateX(2px);
}

.bill-item-row:last-child {
    border-bottom: none;
}

.item-details {
    flex: 1;
    transition: all 0.3s ease;
}

.item-details .item-note {
    font-size: 11px;
    color: #666;
    font-style: italic;
    margin-top: 2px;
    line-height: 1.2;
}

.item-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.item-status {
    font-size: 16px;
}

.bell-btn {
    background: #ffc107;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bell-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.bell-btn:active::before {
    width: 120%;
    height: 120%;
}

.bell-btn:hover {
    background: #ffb300;
    transform: scale(1.05);
}

.bell-btn:active {
    transform: scale(0.95);
}

.bell-btn.completed {
    background: #28a745;
    color: white;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.bell-btn.completed:hover {
    background: #218838;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
}

.bell-btn:disabled {
    cursor: not-allowed;
    pointer-events: none;
}

/* Smooth animation for status changes */
.item-status {
    font-size: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
}

.bill-status {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    display: inline-block;
}

.bill-status.pending {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.bill-status.completed {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* Loading animation for smooth transitions */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideOutDown {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(20px);
    }
}

.bill-item {
    animation: slideInUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Ripple effect for button clicks */
@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

.bill-actions {
    text-align: right;
    padding: 12px 16px;
    background: #f8f9fa;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bill-actions .total-amount {
    font-weight: bold;
    font-size: 16px;
    color: #ff6b35;
}

.checkout-btn {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    margin-left: 8px;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.2);
    position: relative;
    overflow: hidden;
    transform: translateY(0);
}

.checkout-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.checkout-btn:hover::before {
    left: 100%;
}

.checkout-btn:hover {
    background: linear-gradient(135deg, #218838, #1ba085);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(40, 167, 69, 0.4);
}

.checkout-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.create-bill-btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
}

.order-actions {
    margin-top: 12px;
}

/* Statistics Screen Styles */
.stats-header {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.stats-header h2 {
    color: #ff6b35;
    font-size: 22px;
}

.stats-filter {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.stats-filter h3 {
    color: #ff6b35;
    margin-bottom: 15px;
    font-size: 18px;
}

.date-inputs {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    align-items: end;
}

.stats-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
    justify-content: center;
}

.sync-btn {
    background: linear-gradient(135deg, #17a2b8, #138496);
    color: white;
}

.sync-btn:hover {
    background: linear-gradient(135deg, #138496, #117a8b);
}

@media (max-width: 768px) {
    .date-inputs {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }

    .date-group {
        flex: none;
    }
}

@media (max-width: 480px) {
    .stats-filter h3 {
        font-size: 16px;
        text-align: center;
    }

    .date-group label {
        font-size: 14px;
    }
}

.date-group {
    flex: 1;
}

.date-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.date-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

.stats-btn {
    background-color: #ff6b35;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.stats-btn:hover {
    background-color: #e55a2b;
}

.stats-content {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    min-height: 300px;
}

.empty-stats {
    color: #999;
    font-style: italic;
    text-align: center;
    padding: 60px 20px;
    font-size: 16px;
}

.stats-iframe {
    width: 100%;
    min-height: 600px;
    border: none;
    border-radius: 10px;
    height: auto;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .header h1 {
        font-size: 20px;
    }

    .menu-section h2 {
        font-size: 18px;
    }

    .menu-item {
        padding: 10px;
    }

    .item-info h3 {
        font-size: 14px;
    }

    .add-btn {
        width: 30px;
        height: 30px;
        font-size: 18px;
    }

    .order-summary {
        padding: 10px;
        max-height: 220px;
    }

    .order-header {
        align-items: stretch;
        gap: 10px;
    }

    .header-buttons {
        justify-content: center;
    }

    .header-buttons .action-btn {
        flex: 1;
        max-width: 120px;
    }

    .container {
        padding: 10px;
        margin-bottom: 270px;
        /* Space for fixed order summary + bottom nav */
    }

    .payment-actions {
        position: fixed;
        bottom: 60px;
        /* Above bottom navigation */
        left: 0;
        right: 0;
        background-color: white;
        padding: 15px;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
        flex-direction: row;
    }

    .action-btn {
        padding: 12px;
        font-size: 14px;
    }

    .order-item {
        flex-wrap: wrap;
        gap: 5px;
    }

    .order-item-name {
        flex-basis: 100%;
        margin-bottom: 5px;
    }

    .quantity-controls {
        gap: 3px;
    }

    .qty-btn {
        width: 22px;
        height: 22px;
        font-size: 12px;
    }

    .remove-btn {
        width: 22px;
        height: 22px;
        font-size: 14px;
    }

    .payment-order-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .payment-item-controls {
        width: 100%;
        justify-content: space-between;
    }

    .payment-item-price {
        min-width: auto;
        text-align: left;
    }
}

/* Settings Modal Styles */
.settings-modal-content {
    max-width: 600px;
    width: 90%;
}

.role-selection {
    margin: 20px 0;
}

.role-selection h4 {
    color: #333;
    margin-bottom: 20px;
    text-align: center;
    font-size: 18px;
}

.role-option {
    margin-bottom: 15px;
}

.role-card {
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 20px;
    background: #f9f9f9;
}

.role-card:hover {
    border-color: #ff6b35;
    background: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.15);
}

.role-card.selected {
    border-color: #ff6b35;
    background: #fff5f3;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.2);
}

.role-icon {
    font-size: 48px;
    min-width: 60px;
    text-align: center;
}

.role-info h5 {
    color: #ff6b35;
    font-size: 20px;
    margin-bottom: 8px;
    font-weight: bold;
}

.role-info p {
    color: #666;
    margin-bottom: 12px;
    line-height: 1.4;
}

.role-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.feature {
    background: #e8f5e8;
    color: #2e7d32;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.current-role {
    background: #f0f8ff;
    border: 1px solid #2196f3;
    border-radius: 8px;
    padding: 15px;
    margin-top: 20px;
    text-align: center;
    color: #1976d2;
}

#currentRoleDisplay {
    color: #ff6b35;
    font-weight: bold;
}

/* Mobile responsive for settings modal */
@media (max-width: 768px) {
    .settings-modal-content {
        width: 95%;
        margin: 20px auto;
    }
    
    .role-card {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .role-icon {
        font-size: 40px;
    }
    
    .role-info h5 {
        font-size: 18px;
    }
    
    .role-features {
        justify-content: center;
    }
}

/* Print Styles */
@media print {
    body * {
        visibility: hidden;
    }

    .receipt,
    .receipt * {
        visibility: visible;
    }

    .receipt {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
    }

    .modal-actions {
        display: none;
    }

    .receipt-table thead tr {
        border-top: 1px solid #000;
        border-bottom: 1px solid #000;
    }

    .receipt-table th {
        font-size: 12px;
    }

    .receipt-table tbody tr {
        border-bottom: 1px dashed #ccc;
    }
}