/* =========================================
   1. GLOBAL BASE STYLES
   ========================================= */
* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; }
body { background-color: #faf8f5; color: #333; line-height: 1.6; }
a { text-decoration: none; color: inherit; }

/* Navigation */
header { background-color: #8b0000; color: #fff; padding: 15px 20px; display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; z-index: 100; }
.logo { font-size: 24px; font-weight: bold; letter-spacing: 1px; color: #f1c40f; }
.nav-links a { color: #fff; margin-left: 20px; font-weight: 500; transition: color 0.3s; }
.nav-links a:hover { color: #f1c40f; }
.user-greeting { font-size: 14px; margin-left: 20px; color: #ddd; }

/* Base Buttons */
.btn { padding: 15px 25px; font-size: 16px; font-weight: bold; border-radius: 5px; cursor: pointer; border: none; transition: 0.2s; text-align: center; display: inline-block; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0,0,0,0.3); }
.btn-primary { background-color: #f1c40f; color: #8b0000; }
.btn-secondary { background-color: #fff; color: #8b0000; border: 2px solid #f1c40f; }
.btn-submit { width: 100%; background: #f1c40f; color: #8b0000; border: none; padding: 12px; font-size: 16px; font-weight: bold; border-radius: 5px; cursor: pointer; margin-top: 10px; }

/* Base Forms & Tables */
.form-group { margin-bottom: 15px; }
label { display: block; font-weight: bold; margin-bottom: 5px; }
input[type="text"], input[type="password"], input[type="time"], input[type="date"], input[type="number"] { width: 100%; padding: 10px; border: 1px solid #ccc; border-radius: 4px; box-sizing: border-box; }
table { width: 100%; border-collapse: collapse; margin-top: 15px; font-size: 14px; }
th, td { text-align: left; padding: 12px; border-bottom: 1px solid #eee; }
th { background: #f8f9fa; color: #555; font-weight: bold; text-transform: uppercase; }

/* Alerts */
.msg { padding: 10px; border-radius: 4px; margin-bottom: 15px; text-align: center; font-weight: bold; }
.msg-error { background: #f8d7da; color: #721c24; }
.msg-success { background: #d4edda; color: #155724; }

/* =========================================
   2. INDEX PAGE SPECIFIC
   ========================================= */
.hero { background: linear-gradient(rgba(139, 0, 0, 0.8), rgba(139, 0, 0, 0.8)), url('hero-bg.jpg') center/cover; color: white; padding: 80px 20px; text-align: center; }
.hero h1 { font-size: 48px; margin-bottom: 15px; color: #f1c40f; }
.hero p { font-size: 18px; max-width: 600px; margin: 0 auto 30px auto; }
.btn-group { display: flex; justify-content: center; gap: 15px; flex-wrap: wrap; }
.promos { display: flex; flex-wrap: wrap; gap: 20px; padding: 40px 20px; max-width: 1000px; margin: 0 auto; }
.promo-card { background: #fff; flex: 1 1 300px; padding: 25px; text-align: center; border-radius: 8px; box-shadow: 0 4px 6px rgba(0,0,0,0.05); border-top: 4px solid #8b0000; }
.promo-card h3 { color: #8b0000; margin-bottom: 10px; }
footer { background-color: #222; color: #aaa; text-align: center; padding: 30px 20px; margin-top: 40px; }
footer p { margin-bottom: 10px; }

/* =========================================
   3. MENU & CART SPECIFIC
   ========================================= */
.menu-category { margin-top: 30px; margin-bottom: 15px; color: #8b0000; border-bottom: 2px solid #f1c40f; padding-bottom: 5px; }
.menu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; margin-bottom: 80px; }
.menu-card { background: #fff; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.1); overflow: hidden; display: flex; flex-direction: column; border-bottom: 4px solid #8b0000; }
.menu-card img { width: 100%; height: 180px; object-fit: cover; }
.menu-info { padding: 15px; flex-grow: 1; display: flex; flex-direction: column; }
.menu-title { font-size: 18px; font-weight: bold; margin-bottom: 5px; }
.menu-title-zh { font-size: 14px; color: #666; margin-bottom: 10px; }
.menu-price { font-size: 16px; font-weight: bold; color: #8b0000; margin-bottom: 15px; }
.btn-add { background: #8b0000; color: #f1c40f; text-align: center; border: none; padding: 10px; font-weight: bold; border-radius: 5px; cursor: pointer; margin-top: auto; transition: 0.2s; }
.btn-add:hover { background: #660000; }
.cart-bar { position: fixed; bottom: 0; left: 0; width: 100%; background: #222; color: white; padding: 15px 20px; display: flex; justify-content: space-between; align-items: center; z-index: 1000; }
.cart-bar .btn-primary { padding: 10px 20px; font-size: 16px; }

/* =========================================
   4. KITCHEN DISPLAY (DARK MODE)
   ========================================= */
.kitchen-mode { background: #1a1a1a; color: #fff; padding: 20px; margin: 0; height: 100vh; overflow-y: auto; }
.kitchen-mode .header { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid #333; padding-bottom: 15px; margin-bottom: 20px; background: transparent; position: relative; }
.kitchen-mode h1 { margin: 0; color: #f1c40f; }
.tabs { display: flex; gap: 10px; margin-bottom: 20px; }
.tab-btn { background: #333; color: #fff; border: none; padding: 10px 20px; font-size: 18px; font-weight: bold; cursor: pointer; border-radius: 5px; }
.tab-btn.active { background: #f1c40f; color: #1a1a1a; }
.ticket { background: #fff; color: #000; border-radius: 8px; padding: 15px; box-shadow: 0 4px 10px rgba(0,0,0,0.5); display: flex; flex-direction: column; justify-content: space-between; }
.ticket.received { border-top: 10px solid #d9534f; }
.ticket.cooking { border-top: 10px solid #f0ad4e; }
.ticket.ready, .ticket.completed { border-top: 10px solid #5cb85c; opacity: 0.85; }
.ticket-header { border-bottom: 2px dashed #ccc; padding-bottom: 10px; margin-bottom: 10px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(400px, 1fr)); gap: 20px; }
.ticket-header h2 { font-size: 22px; margin: 0; }
.badge-dine { background: #d9534f; color: white; padding: 4px 8px; border-radius: 4px; font-weight: bold; font-size: 12px; }
.badge-pickup { background: #0275d8; color: white; padding: 4px 8px; border-radius: 4px; font-weight: bold; font-size: 12px; }
.items { list-style: none; padding: 0; margin: 0 0 15px 0; font-size: 18px; flex-grow: 1; }
.items li { padding: 8px 0; border-bottom: 1px solid #eee; display: flex; align-items: flex-start; }
.qty { font-weight: bold; font-size: 20px; color: #d9534f; margin-right: 15px; min-width: 30px; }
.btn-cook { background: #f0ad4e; width: 100%; border:none; padding:12px; color:white; font-weight:bold; border-radius:5px; cursor:pointer;}
.btn-ready { background: #5cb85c; width: 100%; border:none; padding:12px; color:white; font-weight:bold; border-radius:5px; cursor:pointer;}
.hidden { display: none !important; }

/* =========================================
   5. ADMIN DASHBOARD LAYOUT
   ========================================= */
.admin-layout { display: flex; margin: 0; min-height: 100vh; background: #f4f7f6; }
.sidebar { width: 250px; background: #8b0000; color: #fff; padding: 20px; flex-shrink: 0; }
.sidebar h2 { color: #f1c40f; text-align: center; border-bottom: 1px solid rgba(255,255,255,0.2); padding-bottom: 15px; margin-top: 0; }
.sidebar ul { list-style: none; padding: 0; }
.sidebar li { margin-bottom: 15px; }
.sidebar a { color: #fff; display: block; padding: 10px; border-radius: 5px; }
.sidebar a:hover, .sidebar a.active { background: rgba(255,255,255,0.2); font-weight: bold; }
.main-content { flex-grow: 1; padding: 30px; box-sizing: border-box; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-bottom: 30px; }
.stat-card { background: #fff; padding: 20px; border-radius: 8px; box-shadow: 0 2px 5px rgba(0,0,0,0.05); border-left: 5px solid #f1c40f; }
.stat-card h3 { margin: 0 0 10px 0; color: #666; font-size: 14px; text-transform: uppercase; }
.stat-card .value { font-size: 28px; font-weight: bold; color: #8b0000; }
.card-admin { background: #fff; border-radius: 8px; box-shadow: 0 2px 5px rgba(0,0,0,0.05); padding: 20px; overflow-x: auto; }