/* --- BASE & SHARED STYLES --- */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: #f4f4f9;
    margin: 0; 
    padding-bottom: 200px; 
    color: #333;
    scroll-behavior: smooth;
    overflow: hidden;
}

/* --- LOGIN SCREEN --- */
#login-screen {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: #b12a27; z-index: 9999; display: flex; flex-direction: column;
    align-items: center; justify-content: center; color: white; transition: opacity 0.4s ease;
}
.login-box {
    background: white; padding: 30px; border-radius: 12px; width: 80%;
    max-width: 350px; box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    text-align: center; color: #333;
}
.login-box input { margin-bottom: 15px; border: 1px solid #ccc; padding: 12px; font-size: 16px; border-radius: 5px;
    width: 100%; box-sizing: border-box; }
.login-box button { width: 100%; background: #b12a27; color: white; border: none; padding: 15px; border-radius: 5px;
    font-size: 1.1em; font-weight: bold; cursor: pointer; }
.login-error { color: #dc3545; font-weight: bold; margin-top: 10px; display: none; }

header {
    background: #b12a27; color: white; padding: 10px 15px; display: flex;
    justify-content: space-between; align-items: center; position: sticky;
    top: 0; z-index: 103; height: 50px; box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
.header-title { font-weight: bold; font-size: 1.1em; text-align: left; flex-grow: 1; }
.header-site-badge { font-size: 0.8em; background: rgba(255,255,255,0.2); padding: 3px 8px; border-radius: 10px; margin-right: 15px; }

/* --- BURGER MENU STYLES --- */
.burger-btn { background: none; border: none; color: white; font-size: 1.8em; cursor: pointer; padding: 0 5px; line-height: 1; }
.side-menu {
    position: fixed; top: 70px; right: -250px; width: 200px;
    height: calc(100% - 70px);
    background: #fff; box-shadow: -2px 0 5px rgba(0,0,0,0.2); transition: right 0.3s ease; z-index: 102; display: flex;
    flex-direction: column; overflow-y: auto;
}
.side-menu.open { right: 0; }
.side-menu-btn { background: none; border: none; border-bottom: 1px solid #eee;
    padding: 20px 15px; text-align: left; font-size: 1.1em; font-weight: bold; color: #333; cursor: pointer; }
.side-menu-btn.active { color: #b12a27; background: #f9f9f9; border-left: 4px solid #b12a27; }
.menu-overlay { display: none; position: fixed; top: 70px; left: 0; width: 100%; height: calc(100% - 70px);
    background: rgba(0,0,0,0.5); z-index: 101; }
.menu-overlay.open { display: block; }

/* --- MAIN APP STYLES --- */
.nav-bar { background: #fff; display: flex;
    flex-wrap: wrap; justify-content: center; padding: 10px; gap: 6px; position: sticky; top: 70px; z-index: 100; border-bottom: 2px solid #ddd; }
.nav-btn { background: #f0f0f0; border: 1px solid #ccc; padding: 6px 10px; border-radius: 20px; font-size: 0.75em; font-weight: bold; color: #444; text-align: center; cursor: pointer; }
.input-card { background: #fff; padding: 15px; margin: 10px; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
label { display: block; margin-bottom: 5px; font-weight: bold; font-size: 0.8em; color: #666; text-transform: uppercase; }
input, textarea, select { width: 100%; padding: 12px; margin-bottom: 10px; border: 1px solid #ccc; border-radius: 5px; box-sizing: border-box; font-size: 16px; font-family: inherit;}
.category { background: #eee; padding: 12px 15px; font-weight: bold; border-bottom: 1px solid #ddd; margin-top: 5px; color: #b12a27; scroll-margin-top: 125px; }
.item { display: flex; justify-content: space-between; align-items: center; padding: 12px 15px; background: white; border-bottom: 1px solid #eee; }
.item-name { font-weight: 500; font-size: 0.95em; padding-right: 10px; }
.price { color: #888; font-size: 0.85em; }
.controls { display: flex; align-items: center; gap: 12px; }
.controls button { width: 40px; height: 40px; border: none; border-radius: 5px; font-size: 1.2em; font-weight: bold; cursor: pointer; }
.add { background: #28a745; color: white; }
.remove { background: #dc3545; color: white; }
.qty { font-weight: bold; min-width: 20px; text-align: center; }
.sold-out-badge { font-weight: bold; color: #dc3545; font-size: 0.9em; padding: 10px; }

.order-card { background: white; padding: 15px; border-left: 5px solid #ff9800; border-radius: 8px; margin: 10px; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
.order-card.history { border-left-color: #6c757d; }
.order-card.payment { border-left-color: #28a745; cursor: pointer; transition: background 0.2s;}
.order-card.payment:active { background: #f0f8ff; }
.order-card.urgent { border-left-color: #dc3545 !important; animation: pulseRed 2s infinite; }
@keyframes pulseRed { 0% { background-color: #fff; } 50% { background-color: #ffe5e5; } 100% { background-color: #fff; } }

.order-details { white-space: pre-wrap; font-size: 0.95em; line-height: 1.4; margin: 10px 0; }
.btn-done { background: #28a745; color: white; border: none; padding: 12px; border-radius: 5px; width: 100%; font-size: 1em; font-weight: bold; margin-top: 5px; cursor: pointer;}
.btn-kitchen-made { background: #e65100; color: white; border: none; padding: 12px; border-radius: 5px; width: 100%; font-size: 1em; font-weight: bold; margin-top: 5px; cursor: pointer;}
.btn-bar-made { background: #0277bd; color: white; border: none; padding: 12px; border-radius: 5px; width: 100%; font-size: 1em; font-weight: bold; margin-top: 5px; cursor: pointer;}
.btn-clear-history { background: #dc3545; color: white; border: none; padding: 12px; border-radius: 5px; width: calc(100% - 20px); margin: 10px; font-size: 1em; font-weight: bold; cursor: pointer;}

.cart-summary { position: fixed; bottom: 0; width: 100%; background: white; border-top: 3px solid #b12a27; padding: 15px; box-sizing: border-box; z-index: 101; display: none; }
.total-row { font-size: 1.2em; font-weight: bold; display: flex; justify-content: space-between; margin-bottom: 8px; }
.action-buttons { display: flex; gap: 10px; }
.btn-confirm { flex: 2; background: #007bff; color: white; border: none; padding: 15px; border-radius: 5px; font-weight: bold; font-size: 1.1em; cursor: pointer;}
.btn-clear { flex: 1; background: #dc3545; color: white; border: none; padding: 15px; border-radius: 5px; font-weight: bold; font-size: 1.1em; cursor: pointer;}

.modal-overlay { display: none; position: fixed; top:0; left:0; width: 100%; height:100%; background: rgba(0,0,0,0.8); z-index: 200; justify-content: center; align-items: center; }
.modal-content { background: white; width: 90%; max-height: 85%; border-radius: 12px; padding: 20px; overflow-y: auto; }
.btn-save-final { background: #28a745; color: white; border: none; padding: 15px; border-radius: 8px; width: 100%; margin-bottom: 10px; font-weight:bold; cursor: pointer;}
.btn-back { background: #eee; width: 100%; border: none; padding: 12px; border-radius: 8px; font-weight: bold; color: #333; cursor: pointer;}
.tab-content { display: none; }
.tab-content.active { display: block; }

/* --- ALLERGY/MANAGEMENT STYLES --- */
.item-card { background: white; padding: 15px; border-left: 5px solid #007bff; border-radius: 8px; margin: 10px; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
.item-card.danger { border-left-color: #dc3545; }
.dish-name { font-weight: bold; font-size: 1.1em; margin-bottom: 5px; }
.dish-ingredients { font-size: 0.95em; line-height: 1.4; color: #555; }
.btn-primary { background: #28a745; color: white; border: none; padding: 12px; border-radius: 5px; width: 100%; font-size: 1em; font-weight: bold; cursor: pointer; }
.btn-delete { background: #dc3545; color: white; border: none; padding: 8px; border-radius: 5px; font-size: 0.85em; cursor: pointer; }
.highlight { background-color: #ffeb3b; font-weight: bold; color: #d32f2f; }
.quick-btn-container { display: flex; gap: 10px; margin-top: 5px; justify-content: space-between; }
.quick-btn { flex: 1; border: none; padding: 10px 5px; border-radius: 5px; font-weight: bold; font-size: 0.85em; color: white; cursor: pointer; text-align: center; }
.btn-pink { background-color: #ff69b4; }
.btn-seagreen { background-color: #2e8b57; }
.btn-grey { background-color: #808080; }
.btn-purple {background-color: #3D2966;}

.quick-btn:active {
    opacity: 0.7;
}
.user-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid #eee; }

/* --- EXPANDABLE SEARCH BAR & REPORTING --- */
.search-wrapper { display: flex; align-items: center; background: white; margin: 10px; border-radius: 20px; box-shadow: 0 2px 5px rgba(0,0,0,0.1); overflow: hidden; }
.search-icon-btn { background: none; border: none; font-size: 1.2em; padding: 10px 15px; cursor: pointer; color: #b12a27; }
.search-input-expand { width: 0; border: none; outline: none; padding: 0; margin: 0; font-size: 1em; transition: width 0.3s ease, padding 0.3s ease; background: transparent; }
.search-input-expand.expanded { width: 100%; padding: 10px 10px 10px 0; }
.report-box { background: #f8f9fa; border: 1px solid #ddd; padding: 15px; border-radius: 5px; margin-bottom: 15px; }
.z-report-card { background: white; border-left: 5px solid #6f42c1; padding: 15px; border-radius: 8px; margin-bottom: 15px; box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
