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

body { font-family: 'Georgia', serif; background: #f5f0e8; color: #2c2c2c; }

/* ============================================
   AUTH
   ============================================ */
#auth-screen { display: flex; min-height: 100vh; }

.auth-left {
  width: 45%;
  background: #4a5e2a;
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px;
}

.auth-left h1 { font-size: 42px; font-weight: bold; margin-bottom: 16px; }
.auth-left p { font-size: 18px; opacity: 0.85; line-height: 1.6; margin-bottom: 32px; }
.food-icons { font-size: 32px; letter-spacing: 8px; }

.device-badge {
  display: inline-block;
  margin-top: 24px;
  padding: 6px 16px;
  background: rgba(255,255,255,0.15);
  border-radius: 20px;
  font-size: 13px;
  font-family: sans-serif;
}

.auth-right {
  width: 55%;
  background: #f5f0e8;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px;
}

.auth-tabs {
  display: flex;
  margin-bottom: 32px;
  background: #e8e2d8;
  border-radius: 8px;
  padding: 4px;
  width: fit-content;
}

.auth-tab {
  padding: 10px 28px;
  border: none;
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
  font-size: 15px;
  color: #666;
}

.auth-tab.active { background: #4a5e2a; color: white; }

#signin-form h2, #signup-form h2 { font-size: 32px; margin-bottom: 8px; }
.auth-sub { color: #888; margin-bottom: 28px; font-family: sans-serif; }

.auth-right input {
  width: 100%;
  padding: 14px 16px;
  margin-bottom: 16px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 16px;
  background: white;
  font-family: sans-serif;
  -webkit-appearance: none;
}

.auth-btn {
  width: 100%;
  padding: 16px;
  background: #4a5e2a;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  margin-top: 8px;
  touch-action: manipulation;
}

.auth-btn:hover { background: #3a4e1a; }

.auth-switch { text-align: center; margin-top: 16px; font-size: 14px; color: #888; font-family: sans-serif; }
.auth-switch span { color: #4a5e2a; cursor: pointer; font-weight: bold; }

/* ============================================
   NAV
   ============================================ */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px;
  background: white;
  border-bottom: 1px solid #e8e2d8;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-logo { font-size: 20px; font-weight: bold; color: #4a5e2a; }

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: sans-serif;
  font-size: 14px;
  color: #666;
}

.nav-right button {
  padding: 8px 16px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: white;
  cursor: pointer;
  font-size: 14px;
  touch-action: manipulation;
}

/* ============================================
   APP TABS — Menu / My Orders
   ============================================ */
.app-tabs {
  display: flex;
  background: white;
  border-bottom: 1px solid #e8e2d8;
  position: sticky;
  top: 57px;
  z-index: 90;
}

.app-tab {
  flex: 1;
  padding: 12px;
  border: none;
  background: transparent;
  font-size: 14px;
  font-family: sans-serif;
  color: #888;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  touch-action: manipulation;
  transition: all 0.15s;
}

.app-tab.active {
  color: #4a5e2a;
  border-bottom-color: #4a5e2a;
  font-weight: 600;
}

/* ============================================
   MAIN
   ============================================ */
main { max-width: 900px; margin: auto; padding: 32px 20px 140px; }

.menu-title { font-size: 32px; margin-bottom: 8px; }
.menu-sub { color: #888; font-family: sans-serif; margin-bottom: 20px; }

/* ============================================
   BUSY BANNER
   ============================================ */
#busy-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff3cd;
  border: 1.5px solid #ffc107;
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 20px;
  font-family: sans-serif;
  font-size: 14px;
  color: #7c5c00;
  animation: banner-slide 0.3s ease;
}

@keyframes banner-slide {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.busy-icon { font-size: 22px; flex-shrink: 0; }
.busy-text { display: flex; flex-direction: column; gap: 2px; line-height: 1.4; }
.busy-text strong { font-size: 15px; }

/* ============================================
   CATEGORY FILTERS
   ============================================ */
#category-filters {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
  overflow-x: auto;
  margin-bottom: 12px;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

#category-filters::-webkit-scrollbar { display: none; }

.cat-pill {
  padding: 8px 18px;
  border-radius: 20px;
  border: 1px solid #ddd;
  background: white;
  cursor: pointer;
  font-size: 14px;
  font-family: sans-serif;
  white-space: nowrap;
  touch-action: manipulation;
  flex-shrink: 0;
}

.cat-pill.active { background: #4a5e2a; color: white; border-color: #4a5e2a; }

/* ============================================
   FOOD TYPE FILTER
   ============================================ */
#foodtype-filters {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
  overflow-x: auto;
  margin-bottom: 20px;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

#foodtype-filters::-webkit-scrollbar { display: none; }

.foodtype-pill {
  padding: 7px 16px;
  border-radius: 20px;
  border: 1.5px solid #ddd;
  background: white;
  cursor: pointer;
  font-size: 13px;
  font-family: sans-serif;
  white-space: nowrap;
  touch-action: manipulation;
  flex-shrink: 0;
  transition: all 0.15s;
}

.foodtype-pill.ft-active-all    { background: #4a5e2a; color: white; border-color: #4a5e2a; }
.foodtype-pill.ft-active-veg    { background: #e8f5e9; color: #2e7d32; border-color: #4caf50; font-weight: 600; }
.foodtype-pill.ft-active-egg    { background: #fffde7; color: #f57f17; border-color: #ffc107; font-weight: 600; }
.foodtype-pill.ft-active-nonveg { background: #ffebee; color: #c62828; border-color: #ef5350; font-weight: 600; }

/* ============================================
   MENU GRID
   ============================================ */
#menu-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.menu-card {
  background: white;
  border-radius: 14px;
  padding: 16px;
  border: 1px solid #eee;
}

.menu-card h3 { font-size: 15px; margin-bottom: 8px; }

.menu-card-img-wrap {
  position: relative;
  display: inline-block;
  margin-bottom: 10px;
}

.menu-card-img-wrap img {
  width: 52px;
  height: 52px;
  display: block;
  margin: 0;
}

.food-dot {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 2px solid white;
  display: block;
}

.veg-dot    { background: #4caf50; }
.egg-dot    { background: #ffc107; }
.nonveg-dot { background: #ef5350; }

.menu-card-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.menu-price { font-size: 15px; font-family: sans-serif; }

.cat-badge {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 10px;
  background: #f0f7e8;
  color: #4a5e2a;
  font-family: sans-serif;
}

.empty-filter {
  color: #aaa;
  font-size: 14px;
  font-family: sans-serif;
  text-align: center;
  padding: 32px 0;
  grid-column: 1 / -1;
}

/* ============================================
   QTY CONTROL
   ============================================ */
.qty-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f5f0e8;
  border-radius: 8px;
  padding: 4px;
}

.qty-control button {
  background: #4a5e2a;
  color: white;
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 6px;
  font-size: 20px;
  cursor: pointer;
  touch-action: manipulation;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qty-control span {
  font-size: 15px;
  font-weight: bold;
  font-family: sans-serif;
  min-width: 30px;
  text-align: center;
}

/* ============================================
   CART
   ============================================ */
#cart-section {
  background: white;
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 16px;
  border: 1px solid #eee;
}

#cart-section h3 { font-size: 18px; margin-bottom: 14px; }

#cart-items p {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  font-family: sans-serif;
  padding: 8px 0;
  border-bottom: 1px solid #f5f0e8;
}

.cart-total { font-size: 18px; font-family: sans-serif; margin-top: 12px; font-weight: bold; }

#round-suggestion {
  background: #f0f7e8;
  border-radius: 8px;
  padding: 12px;
  margin-top: 12px;
  font-size: 13px;
  font-family: sans-serif;
  color: #4a5e2a;
}

#round-suggestion button {
  margin-top: 8px;
  padding: 8px 16px;
  background: #4a5e2a;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  touch-action: manipulation;
}

.empty-cart { color: #aaa; font-size: 13px; font-family: sans-serif; text-align: center; padding: 12px 0; }

/* ============================================
   CHECKOUT
   ============================================ */
#checkout-section {
  background: white;
  border-radius: 14px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  border: 1px solid #eee;
}

#checkout-section input[type="tel"] {
  padding: 14px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 16px;
  font-family: sans-serif;
  -webkit-appearance: none;
  width: 100%;
}

/* PAYMENT OPTIONS */
#payment-options {
  display: flex;
  gap: 12px;
  font-family: sans-serif;
}

.payment-label {
  flex: 1;
  cursor: pointer;
  display: flex;
  position: relative;
}

.payment-label input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.payment-option-box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 12px 16px;
  border-radius: 10px;
  border: 2px solid #ddd;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.15s;
  cursor: pointer;
  text-align: center;
  background: white;
  font-family: sans-serif;
}

.payment-label input[type="radio"]:checked + .online-box {
  border-color: #1a73e8;
  background: #e8f0fe;
  color: #1a73e8;
}

.payment-label input[type="radio"]:checked + .cod-box {
  border-color: #f59f00;
  background: #fff8e1;
  color: #7c5c00;
}

.online-box { color: #555; }
.cod-box    { color: #555; }

#place-order-btn {
  background: #4a5e2a;
  color: white;
  border: none;
  padding: 16px;
  border-radius: 10px;
  font-size: 17px;
  cursor: pointer;
  font-weight: bold;
  touch-action: manipulation;
  width: 100%;
}

#place-order-btn:hover { background: #3a4e1a; }
#place-order-btn:disabled { background: #aaa; cursor: not-allowed; }

/* ============================================
   FLOATING CART BUTTON
   ============================================ */
#floating-cart-btn {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: #4a5e2a;
  color: white;
  border: none;
  border-radius: 50px;
  padding: 14px 24px;
  font-size: 15px;
  font-family: sans-serif;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 6px 24px rgba(74, 94, 42, 0.45);
  min-width: 260px;
  touch-action: manipulation;
  animation: fc-pop 0.2s ease;
}

@keyframes fc-pop {
  from { transform: translateX(-50%) scale(0.9); opacity: 0; }
  to   { transform: translateX(-50%) scale(1);   opacity: 1; }
}

#floating-cart-btn:hover { background: #3a4e1a; }
.fc-left { opacity: 0.9; }
.fc-right { font-weight: bold; }

/* ============================================
   CONFIRMATION SCREEN
   ============================================ */
#confirmation-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px 0 60px;
  font-family: sans-serif;
}

.conf-checkmark {
  font-size: 72px;
  margin-bottom: 16px;
  animation: conf-bounce 0.5s ease;
}

@keyframes conf-bounce {
  0%   { transform: scale(0); opacity: 0; }
  60%  { transform: scale(1.2); }
  100% { transform: scale(1); opacity: 1; }
}

.conf-title {
  font-size: 30px;
  font-family: 'Georgia', serif;
  color: #2c2c2c;
  margin-bottom: 8px;
}

.conf-sub {
  font-size: 15px;
  color: #888;
  margin-bottom: 32px;
  max-width: 340px;
  line-height: 1.5;
}

.conf-token {
  background: #4a5e2a;
  color: white;
  border-radius: 20px;
  padding: 24px 40px;
  margin-bottom: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 220px;
}

.conf-token-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 2px;
  opacity: 0.8;
}

.conf-token-number {
  font-size: 52px;
  font-family: 'Georgia', serif;
  font-weight: bold;
  line-height: 1;
}

.conf-token-hint {
  font-size: 12px;
  opacity: 0.75;
}

.conf-card {
  background: white;
  border-radius: 14px;
  padding: 20px;
  width: 100%;
  max-width: 420px;
  border: 1px solid #eee;
  margin-bottom: 20px;
  text-align: left;
}

.conf-card h4 {
  font-size: 15px;
  color: #888;
  margin-bottom: 14px;
  font-family: sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.conf-items { margin-bottom: 14px; }

.conf-item {
  display: flex;
  justify-content: space-between;
  font-size: 15px;
  padding: 8px 0;
  border-bottom: 1px solid #f5f0e8;
}

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

.conf-total {
  display: flex;
  justify-content: space-between;
  font-size: 17px;
  font-weight: bold;
  padding-top: 12px;
  border-top: 2px solid #f5f0e8;
  margin-top: 4px;
}

.conf-time {
  background: #f0f7e8;
  color: #4a5e2a;
  border-radius: 10px;
  padding: 12px 24px;
  font-size: 15px;
  margin-bottom: 28px;
}

.conf-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.conf-back-btn {
  background: white;
  color: #4a5e2a;
  border: 2px solid #4a5e2a;
  border-radius: 10px;
  padding: 14px 32px;
  font-size: 15px;
  font-family: sans-serif;
  font-weight: bold;
  cursor: pointer;
  touch-action: manipulation;
}

.conf-back-btn:hover { background: #f0f7e8; }

.conf-orders-btn {
  background: #4a5e2a;
  color: white;
  border: none;
  border-radius: 10px;
  padding: 14px 24px;
  font-size: 15px;
  font-family: sans-serif;
  font-weight: bold;
  cursor: pointer;
  touch-action: manipulation;
}

/* PAYMENT BADGE on confirmation */
.conf-payment-badge {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  font-family: sans-serif;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.conf-payment-badge.paid {
  background: #e8f0fe;
  color: #1a73e8;
  border: 1.5px solid #adc6f7;
}

.conf-payment-badge.cod {
  background: #fff8e1;
  color: #7c5c00;
  border: 1.5px solid #ffe082;
}

.payment-id {
  font-size: 11px;
  font-family: monospace;
  background: rgba(0,0,0,0.07);
  padding: 2px 6px;
  border-radius: 4px;
  word-break: break-all;
}

/* ============================================
   MY ORDERS
   ============================================ */
#my-orders-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.my-order-card {
  background: white;
  border-radius: 14px;
  padding: 16px;
  border: 1px solid #eee;
}

.my-order-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.my-order-token {
  font-size: 14px;
  font-weight: 700;
  color: #4a5e2a;
  font-family: sans-serif;
  margin-right: 8px;
}

.my-order-date {
  font-size: 12px;
  color: #aaa;
  font-family: sans-serif;
}

.my-order-total {
  font-size: 16px;
  font-weight: 700;
  font-family: sans-serif;
}

.my-order-items {
  font-size: 13px;
  color: #666;
  font-family: sans-serif;
  margin-bottom: 10px;
  line-height: 1.4;
}

.my-order-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.my-order-pay-badge {
  font-size: 12px;
  font-family: sans-serif;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
}

.my-order-pay-badge.paid {
  background: #e8f0fe;
  color: #1a73e8;
  border: 1px solid #adc6f7;
}

.my-order-pay-badge.cod {
  background: #fff8e1;
  color: #7c5c00;
  border: 1px solid #ffe082;
}

.my-order-status {
  font-size: 12px;
  font-family: sans-serif;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
}

.status-pending   { background: #fff3cd; color: #7c5c00; }
.status-preparing { background: #e3f2fd; color: #1565c0; }
.status-ready     { background: #e8f5e9; color: #2e7d32; }
.status-completed { background: #f5f5f5; color: #888; }

/* ============================================
   MOBILE
   ============================================ */
@media (max-width: 768px) {
  #auth-screen { flex-direction: column; }

  .auth-left {
    width: 100%;
    padding: 40px 24px 32px;
    text-align: center;
  }

  .auth-left h1 { font-size: 32px; }
  .auth-left p { font-size: 15px; }
  .food-icons { font-size: 24px; }

  .auth-right {
    width: 100%;
    padding: 32px 24px 48px;
  }

  #signin-form h2, #signup-form h2 { font-size: 24px; }

  #menu-grid { grid-template-columns: 1fr 1fr; gap: 12px; }

  .menu-title { font-size: 26px; }

  main { padding: 24px 16px 140px; }

  nav { padding: 12px 16px; }
  .nav-logo { font-size: 18px; }
  #nav-user { display: none; }

  #floating-cart-btn {
    bottom: 16px;
    min-width: 240px;
    padding: 13px 20px;
    font-size: 14px;
  }

  .payment-option-box { font-size: 13px; padding: 10px 8px; }
}

@media (max-width: 380px) {
  #menu-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .menu-card { padding: 12px; }
  .menu-card-img-wrap img { width: 44px; height: 44px; }
  .menu-card h3 { font-size: 13px; }
}

/* ============================================
   SOLD OUT — customer menu cards
   ============================================ */
.menu-card-soldout {
  opacity: 0.75;
  background: #fafafa;
}

.sold-out-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(220, 53, 69, 0.88);
  color: white;
  font-size: 10px;
  font-weight: 700;
  font-family: sans-serif;
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
  letter-spacing: 0.5px;
}

.sold-out-btn-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f5f5;
  border-radius: 8px;
  padding: 10px;
  font-size: 13px;
  font-family: sans-serif;
  color: #aaa;
  font-weight: 600;
  border: 1px dashed #ddd;
}

/* ONLINE ONLY BADGE */
.online-only-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border-radius: 10px;
  border: 2px solid #1a73e8;
  background: #e8f0fe;
  color: #1a73e8;
  font-size: 14px;
  font-weight: 600;
  font-family: sans-serif;
  width: 100%;
}