/* ══════════════════════════════════════════════════════════
   HOTEL DELIGHTS - ORDERING SYSTEM STYLES
   ══════════════════════════════════════════════════════════ */

/* ─── CSS Variables ─── */
:root {
  --primary: #e67e22;
  --primary-dark: #d35400;
  --primary-light: #fdebd0;
  --secondary: #2c3e50;
  --secondary-light: #34495e;
  --success: #27ae60;
  --success-light: #d5f5e3;
  --warning: #f39c12;
  --warning-light: #fef9e7;
  --danger: #e74c3c;
  --danger-light: #fdedec;
  --info: #3498db;
  --info-light: #d6eaf8;
  --bg: #f8f9fa;
  --bg-white: #ffffff;
  --text: #2c3e50;
  --text-muted: #7f8c8d;
  --border: #e0e0e0;
  --shadow: 0 2px 10px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --radius: 12px;
  --radius-sm: 8px;
  --transition: all 0.3s ease;
  --font: 'Poppins', sans-serif;
  --sidebar-width: 260px;
}

/* ─── Reset ─── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; }

/* ─── Scrollbar ─── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }

/* ══════════════════════════════════════════════════════════
   BUTTONS
   ══════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--primary);
  color: white;
}
.btn-primary:hover { background: var(--primary-dark); }

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.btn-outline:hover {
  background: var(--primary);
  color: white;
}

.btn-sm { padding: 6px 14px; font-size: 0.8rem; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }
.btn-block { width: 100%; justify-content: center; }

.btn-success { background: var(--success); color: white; }
.btn-success:hover { background: #219a52; }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #c0392b; }
.btn-warning { background: var(--warning); color: white; }
.btn-warning:hover { background: #e67e22; }
.btn-info { background: var(--info); color: white; }
.btn-info:hover { background: #2980b9; }

.btn-close {
  background: none;
  border: none;
  font-size: 1.3rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  transition: var(--transition);
}
.btn-close:hover { color: var(--danger); }

/* ══════════════════════════════════════════════════════════
   LANDING PAGE
   ══════════════════════════════════════════════════════════ */
.landing-page {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  min-height: 100vh;
  color: white;
}

.landing-header {
  padding: 20px 40px;
  display: flex;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

.logo i { font-size: 1.8rem; }

.hero {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 140px);
  padding: 40px 20px;
}

.hero-content {
  text-align: center;
  max-width: 900px;
}

.hero-content h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 16px;
  line-height: 1.2;
}

.highlight { color: var(--primary); }

.tagline {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.7);
  margin-bottom: 50px;
}

.hero-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  margin-bottom: 50px;
}

.hero-card {
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  padding: 30px 24px;
  transition: var(--transition);
}

.hero-card:hover {
  background: rgba(255,255,255,0.1);
  transform: translateY(-5px);
}

.card-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 1.4rem;
}

.hero-card h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.hero-card p {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.landing-footer {
  text-align: center;
  padding: 20px;
  color: rgba(255,255,255,0.4);
  font-size: 0.85rem;
}

/* ══════════════════════════════════════════════════════════
   MENU PAGE
   ══════════════════════════════════════════════════════════ */
.menu-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-white);
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow);
}

.header-left .logo { font-size: 1.2rem; }
.header-left .logo i { font-size: 1.4rem; }

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.table-badge {
  background: var(--primary-light);
  color: var(--primary-dark);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-cart {
  position: relative;
  background: var(--primary);
  color: white;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  transition: var(--transition);
}

.btn-cart:hover { background: var(--primary-dark); }

.cart-count {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--danger);
  color: white;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

/* Category Navigation */
.category-nav {
  position: sticky;
  top: 68px;
  z-index: 90;
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  padding: 0 20px;
}

.category-tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 10px 0;
  -webkit-overflow-scrolling: touch;
}

.category-tabs::-webkit-scrollbar { display: none; }

.cat-tab {
  background: none;
  border: 2px solid transparent;
  padding: 8px 18px;
  border-radius: 25px;
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  color: var(--text-muted);
  transition: var(--transition);
}

.cat-tab:hover { color: var(--primary); border-color: var(--primary-light); }
.cat-tab.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* Search */
.menu-container { padding: 20px; max-width: 1200px; margin: 0 auto; }

.search-bar {
  position: relative;
  margin-bottom: 20px;
}

.search-bar i {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.search-bar input {
  width: 100%;
  padding: 12px 16px 12px 44px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition);
}

.search-bar input:focus { border-color: var(--primary); }

/* Menu Grid */
.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.menu-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.menu-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.menu-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}

.dish-emoji {
  font-size: 2.5rem;
  line-height: 1;
}

.dish-price {
  background: var(--primary-light);
  color: var(--primary-dark);
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 1rem;
}

.dish-name {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.dish-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 6px;
  flex-grow: 1;
}

.dish-category {
  display: inline-block;
  font-size: 0.72rem;
  color: var(--info);
  background: var(--info-light);
  padding: 2px 10px;
  border-radius: 10px;
  margin-bottom: 14px;
  font-weight: 500;
}

.menu-card-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.qty-control {
  display: flex;
  align-items: center;
  gap: 0;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.qty-btn {
  background: var(--bg);
  border: none;
  width: 34px;
  height: 34px;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: var(--text);
}

.qty-btn:hover { background: var(--primary-light); color: var(--primary); }

.qty-value {
  width: 36px;
  text-align: center;
  font-weight: 600;
  font-size: 0.95rem;
  background: white;
  border-left: 2px solid var(--border);
  border-right: 2px solid var(--border);
  height: 34px;
  line-height: 34px;
}

.btn-add-cart {
  flex: 1;
  background: var(--primary);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-add-cart:hover { background: var(--primary-dark); }
.btn-add-cart.added {
  background: var(--success);
}

/* ─── Cart Sidebar ─── */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.cart-overlay.active { opacity: 1; visibility: visible; }

.cart-sidebar {
  position: fixed;
  top: 0;
  right: -400px;
  width: 380px;
  max-width: 90vw;
  height: 100vh;
  background: var(--bg-white);
  z-index: 210;
  display: flex;
  flex-direction: column;
  transition: right 0.35s ease;
  box-shadow: var(--shadow-lg);
}

.cart-sidebar.active { right: 0; }

.cart-header {
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
}

.cart-header h2 {
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cart-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
}

.cart-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.cart-empty i { font-size: 3rem; margin-bottom: 16px; opacity: 0.3; }
.cart-empty p { font-size: 1.1rem; font-weight: 500; margin-bottom: 4px; }
.cart-empty span { font-size: 0.85rem; }

.cart-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.cart-item-emoji { font-size: 1.8rem; }

.cart-item-info { flex: 1; }
.cart-item-name { font-weight: 600; font-size: 0.95rem; }
.cart-item-price { font-size: 0.82rem; color: var(--text-muted); }

.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cart-qty-btn {
  background: var(--bg);
  border: 1px solid var(--border);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition);
}

.cart-qty-btn:hover { background: var(--primary-light); border-color: var(--primary); }

.cart-item-remove {
  background: none;
  border: none;
  color: var(--danger);
  cursor: pointer;
  font-size: 0.9rem;
  padding: 4px;
  transition: var(--transition);
}

.cart-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.cart-name-input { margin-bottom: 12px; }
.cart-name-input input {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition);
}
.cart-name-input input:focus { border-color: var(--primary); }

.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
}

/* ─── Success Modal ─── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-content {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 32px;
  max-width: 500px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.3s ease;
}

@keyframes modalIn {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.success-modal { text-align: center; }

.success-icon {
  font-size: 4rem;
  color: var(--success);
  margin-bottom: 16px;
}

.success-modal h2 {
  font-size: 1.8rem;
  margin-bottom: 8px;
  color: var(--success);
}

.success-modal p {
  color: var(--text-muted);
  margin-bottom: 20px;
}

.order-summary {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 20px;
  text-align: left;
  font-size: 0.9rem;
}

.order-summary-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
}

.order-summary-row.total {
  border-top: 2px solid var(--border);
  margin-top: 8px;
  padding-top: 8px;
  font-weight: 700;
  font-size: 1rem;
}

/* ─── Empty State ─── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-state i { font-size: 3rem; margin-bottom: 16px; opacity: 0.3; display: block; }
.empty-state p { font-size: 1.1rem; font-weight: 500; margin-bottom: 4px; }
.empty-state span { font-size: 0.85rem; }


/* ══════════════════════════════════════════════════════════
   ADMIN PAGE
   ══════════════════════════════════════════════════════════ */
.admin-page {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.admin-sidebar {
  width: var(--sidebar-width);
  background: var(--secondary);
  color: white;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 100;
  transition: var(--transition);
}

.sidebar-logo {
  padding: 24px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}

.nav-item:hover { background: rgba(255,255,255,0.08); color: white; }
.nav-item.active { background: var(--primary); color: white; }

.nav-item .badge {
  margin-left: auto;
  background: var(--danger);
  color: white;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.72rem;
  font-weight: 600;
}

.sidebar-footer {
  padding: 12px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

/* Admin Topbar (mobile) */
.admin-topbar {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: var(--bg-white);
  box-shadow: var(--shadow);
  align-items: center;
  padding: 0 16px;
  z-index: 90;
  gap: 12px;
}

.btn-menu {
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  color: var(--text);
}

.admin-topbar h1 { font-size: 1.1rem; flex: 1; }

.topbar-right {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--success);
  font-weight: 600;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  animation: pulse 2s infinite;
}

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

/* Admin Main */
.admin-main {
  margin-left: var(--sidebar-width);
  padding: 30px;
  flex: 1;
  min-height: 100vh;
}

.admin-section { }

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.section-header h2 {
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.header-actions select,
.input-sm {
  padding: 8px 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.85rem;
  outline: none;
  transition: var(--transition);
}

.input-sm { width: 70px; text-align: center; }
.header-actions select:focus,
.input-sm:focus { border-color: var(--primary); }

/* Stats Row */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow);
  border-left: 4px solid transparent;
}

.stat-pending { border-left-color: var(--warning); }
.stat-preparing { border-left-color: var(--primary); }
.stat-ready { border-left-color: var(--info); }
.stat-completed { border-left-color: var(--success); }

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.stat-pending .stat-icon { background: var(--warning-light); color: var(--warning); }
.stat-preparing .stat-icon { background: var(--primary-light); color: var(--primary); }
.stat-ready .stat-icon { background: var(--info-light); color: var(--info); }
.stat-completed .stat-icon { background: var(--success-light); color: var(--success); }

.stat-value { font-size: 1.8rem; font-weight: 700; display: block; line-height: 1; }
.stat-label { font-size: 0.8rem; color: var(--text-muted); }

/* Orders List */
.orders-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.loading {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
}

.order-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: var(--transition);
}

.order-card:hover { box-shadow: var(--shadow-lg); }

.order-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 8px;
}

.order-id {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--secondary);
}

.order-meta {
  display: flex;
  gap: 16px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.order-meta i { margin-right: 4px; }

.order-status {
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-pending { background: var(--warning-light); color: var(--warning); }
.status-preparing { background: var(--primary-light); color: var(--primary-dark); }
.status-ready { background: var(--info-light); color: var(--info); }
.status-completed { background: var(--success-light); color: var(--success); }

.order-card-body { padding: 16px 20px; }

.order-items-list {
  list-style: none;
  margin-bottom: 12px;
}

.order-items-list li {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 0.9rem;
  border-bottom: 1px dashed var(--border);
}

.order-items-list li:last-child { border-bottom: none; }

.order-item-name { font-weight: 500; }
.order-item-detail { color: var(--text-muted); }

.order-total {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  font-size: 1.05rem;
  padding-top: 8px;
  border-top: 2px solid var(--border);
}

.order-card-actions {
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

/* ─── Table ─── */
.table-container {
  background: var(--bg-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  text-align: left;
  padding: 14px 20px;
  background: var(--bg);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--border);
}

.data-table td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--bg); }

.dish-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dish-cell-emoji { font-size: 1.5rem; }
.dish-cell-name { font-weight: 600; }
.dish-cell-desc { font-size: 0.78rem; color: var(--text-muted); }

.badge-available {
  background: var(--success-light);
  color: var(--success);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-unavailable {
  background: var(--danger-light);
  color: var(--danger);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.table-actions {
  display: flex;
  gap: 6px;
}

.table-actions .btn { padding: 6px 10px; font-size: 0.8rem; }

/* ─── Modal Form ─── */
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.modal-header h2 {
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition);
  resize: vertical;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
}

/* ─── QR Grid ─── */
.qr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

.qr-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  text-align: center;
  transition: var(--transition);
}

.qr-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }

.qr-card canvas { max-width: 100%; margin-bottom: 12px; }

.qr-table-label {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
}

.qr-table-url {
  font-size: 0.7rem;
  color: var(--text-muted);
  word-break: break-all;
}

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

/* QR Info Box */
.qr-info-box {
  display: flex;
  gap: 14px;
  background: var(--info-light);
  border: 1px solid var(--info);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 24px;
  align-items: flex-start;
}

.qr-info-icon {
  font-size: 1.3rem;
  color: var(--info);
  flex-shrink: 0;
  margin-top: 2px;
}

.qr-info-text {
  font-size: 0.88rem;
  color: var(--secondary);
  line-height: 1.6;
}

.qr-network-url {
  margin-top: 8px;
  font-family: monospace;
  font-size: 0.85rem;
  background: white;
  padding: 6px 12px;
  border-radius: 6px;
  color: var(--primary-dark);
  font-weight: 600;
  display: inline-block;
}

/* ══════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .hero-content h1 { font-size: 2rem; }
  .tagline { font-size: 1rem; }
  .hero-cards { grid-template-columns: 1fr; }

  .menu-grid { grid-template-columns: 1fr; }

  /* Admin responsive */
  .admin-sidebar {
    left: -300px;
  }
  .admin-sidebar.active { left: 0; }
  .admin-topbar { display: flex; }
  .admin-main {
    margin-left: 0;
    padding: 80px 16px 30px;
  }

  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .form-row { grid-template-columns: 1fr; }
  .order-card-header { flex-direction: column; align-items: flex-start; }
  .section-header { flex-direction: column; align-items: flex-start; }
  .qr-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .stats-row { grid-template-columns: 1fr; }
  .qr-grid { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════════════════════════════
   OWNER DASHBOARD STYLES
   ══════════════════════════════════════════════════════════ */

.dash-date {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Dashboard Stats Grid */
.dash-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.dash-stat-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 18px;
  transition: var(--transition);
  border-bottom: 4px solid transparent;
}

.dash-stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.dash-revenue { border-bottom-color: var(--success); }
.dash-orders { border-bottom-color: var(--info); }
.dash-active { border-bottom-color: var(--warning); }
.dash-items { border-bottom-color: var(--primary); }

.dash-stat-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.dash-revenue .dash-stat-icon { background: var(--success-light); color: var(--success); }
.dash-orders .dash-stat-icon { background: var(--info-light); color: var(--info); }
.dash-active .dash-stat-icon { background: var(--warning-light); color: var(--warning); }
.dash-items .dash-stat-icon { background: var(--primary-light); color: var(--primary); }

.dash-stat-value {
  font-size: 1.8rem;
  font-weight: 700;
  display: block;
  line-height: 1.1;
  color: var(--text);
}

.dash-stat-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Dashboard Two Column */
.dash-grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

/* Dashboard Panel */
.dash-panel {
  background: var(--bg-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.dash-panel.dash-full-width {
  margin-bottom: 24px;
}

.dash-panel-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dash-panel-header h3 {
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--secondary);
}

.dash-link {
  font-size: 0.82rem;
  color: var(--primary);
  font-weight: 600;
  transition: var(--transition);
}
.dash-link:hover { color: var(--primary-dark); text-decoration: underline; }

.dash-panel-body {
  padding: 16px 20px;
  max-height: 380px;
  overflow-y: auto;
}

.text-muted { color: var(--text-muted); font-size: 0.9rem; }

/* Table Map */
.table-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
}

.table-tile {
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 12px;
  text-align: center;
  transition: var(--transition);
  cursor: default;
  position: relative;
}

.table-tile:hover { box-shadow: var(--shadow); }

.table-tile.has-active {
  border-color: var(--warning);
  background: var(--warning-light);
}

.table-tile.occupied {
  border-color: var(--primary);
  background: var(--primary-light);
}

.table-tile.table-free {
  border-color: var(--border);
  background: var(--bg);
}

.table-tile-number {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--secondary);
  display: block;
}

.table-tile-status {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 4px;
  display: block;
}

.table-tile.has-active .table-tile-status { color: var(--warning); }
.table-tile.occupied .table-tile-status { color: var(--primary-dark); }
.table-tile.table-free .table-tile-status { color: var(--text-muted); }

.table-tile-info {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 4px;
  display: block;
}

/* Recent Orders Mini List */
.recent-order-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

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

.recent-order-table {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--primary-light);
  color: var(--primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.recent-order-info { flex: 1; min-width: 0; }

.recent-order-items-text {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recent-order-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
  display: flex;
  gap: 10px;
  margin-top: 2px;
}

.recent-order-amount {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--success);
  white-space: nowrap;
}

.recent-order-status {
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
}

/* Popular Dishes */
.popular-dishes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}

.popular-dish-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.popular-dish-card:hover { background: var(--primary-light); }

.popular-dish-rank {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  flex-shrink: 0;
}

.popular-dish-emoji { font-size: 1.6rem; flex-shrink: 0; }

.popular-dish-info { flex: 1; min-width: 0; }

.popular-dish-name {
  font-weight: 600;
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.popular-dish-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* Dashboard responsive */
@media (max-width: 768px) {
  .dash-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-grid-2col { grid-template-columns: 1fr; }
  .table-grid { grid-template-columns: repeat(3, 1fr); }
  .popular-dishes-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .dash-stats-grid { grid-template-columns: 1fr; }
  .table-grid { grid-template-columns: repeat(2, 1fr); }
  .popular-dishes-grid { grid-template-columns: 1fr; }
}

/* ─── Print Styles (for QR codes) ─── */
@media print {
  body * { visibility: hidden; }
  .qr-grid, .qr-grid * { visibility: visible; }
  .qr-grid {
    position: absolute;
    top: 0;
    left: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 20px;
  }
  .qr-card { box-shadow: none; border: 1px solid #ddd; page-break-inside: avoid; }
  .admin-sidebar, .admin-topbar, .section-header { display: none !important; }
}

/* ═══════════════════════════════════════
   MY ORDERS PANEL (Customer Side)
   ═══════════════════════════════════════ */

.my-orders-fab {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 90;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: 14px 22px;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
}
.my-orders-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(255, 107, 53, 0.5);
}

.my-orders-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 99;
}
.my-orders-overlay.active { display: block; }

.my-orders-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-height: 85vh;
  background: var(--card-bg);
  border-radius: 20px 20px 0 0;
  z-index: 100;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.my-orders-panel.active { transform: translateY(0); }

.my-orders-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}
.my-orders-header h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.my-orders-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
}

.my-orders-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}
.my-orders-empty i {
  font-size: 2.5rem;
  margin-bottom: 12px;
  opacity: 0.4;
}
.my-orders-empty p {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 4px;
  color: var(--text-primary);
}
.my-orders-empty span {
  font-size: 0.85rem;
}

.my-order-card {
  background: var(--light-bg);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 14px;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}
.my-order-card.status-cancelled {
  opacity: 0.65;
  border-color: #e74c3c33;
}

.my-order-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}
.my-order-id {
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--primary);
}
.my-order-time {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-left: 8px;
}

/* Status badges for My Orders */
.my-order-status {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.status-badge-pending { background: #fff3cd; color: #856404; }
.status-badge-preparing { background: #cce5ff; color: #004085; }
.status-badge-ready { background: #d4edda; color: #155724; }
.status-badge-completed { background: #e0e0e0; color: #555; }
.status-badge-cancelled { background: #f8d7da; color: #721c24; }

.my-order-items {
  margin-bottom: 10px;
}
.my-order-item-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  padding: 3px 0;
  color: var(--text-secondary);
}

.my-order-total {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  font-size: 0.95rem;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
  color: var(--text-primary);
}

/* Cancel Section */
.cancel-section {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.cancel-section.expired {
  font-size: 0.78rem;
  color: var(--text-muted);
  flex-direction: row;
  gap: 6px;
}

.btn-cancel-order {
  background: #e74c3c;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
}
.btn-cancel-order:hover {
  background: #c0392b;
  transform: scale(1.03);
}

.cancel-timer {
  font-size: 0.78rem;
  color: #e74c3c;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  animation: pulse-timer 1.5s ease-in-out infinite;
}
@keyframes pulse-timer {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ─── Admin Cancelled Status ─── */
.order-status.status-cancelled,
.status-cancelled {
  background: #f8d7da;
  color: #721c24;
}
.cancelled-label {
  font-size: 0.8rem;
  color: #e74c3c;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* ─── My Orders Responsive ─── */
@media (min-width: 768px) {
  .my-orders-panel {
    max-width: 480px;
    left: auto;
    right: 20px;
    bottom: 20px;
    max-height: 75vh;
    border-radius: 16px;
  }
  .my-orders-fab {
    left: 24px;
    bottom: 24px;
  }
}

/* ══════════════════════════════════════════════════════════
   BILL / PAYMENT PANEL
   ══════════════════════════════════════════════════════════ */

/* FAB Button for Bill */
.bill-fab {
  position: fixed;
  left: 20px;
  bottom: 80px;
  background: linear-gradient(135deg, #27ae60, #2ecc71);
  color: white;
  border: none;
  border-radius: 50px;
  padding: 14px 22px;
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(39, 174, 96, 0.4);
  z-index: 100;
  transition: all 0.3s ease;
}
.bill-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(39, 174, 96, 0.5);
}
.bill-fab i { font-size: 1.1rem; }

/* Bill Overlay */
.bill-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 999;
  display: none;
  backdrop-filter: blur(2px);
}
.bill-overlay.active { display: block; }

/* Bill Panel */
.bill-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  border-radius: 20px 20px 0 0;
  z-index: 1000;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 -4px 30px rgba(0,0,0,0.15);
}
.bill-panel.active { transform: translateY(0); }

.bill-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}
.bill-panel-header h2 {
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--secondary);
}
.bill-panel-header h2 i { color: #27ae60; }

.bill-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.bill-loading, .bill-empty {
  text-align: center;
  padding: 40px 0;
  color: var(--text-muted);
}
.bill-loading i, .bill-empty i {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 12px;
  color: #27ae60;
}
.bill-empty p { font-weight: 600; margin-bottom: 4px; }
.bill-empty span { font-size: 0.85rem; }

/* Bill Content */
.bill-restaurant {
  text-align: center;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 2px dashed var(--border);
}
.bill-restaurant h3 {
  font-size: 1.2rem;
  color: var(--secondary);
}
.bill-restaurant p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Bill Items */
.bill-items-section {
  margin-bottom: 16px;
}
.bill-items-header {
  display: grid;
  grid-template-columns: 1fr 50px 70px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 6px;
}
.bill-items-header span:last-child {
  text-align: right;
}
.bill-items-header span:nth-child(2) {
  text-align: center;
}

.bill-item-row {
  display: grid;
  grid-template-columns: 1fr 50px 70px;
  padding: 8px 0;
  font-size: 0.88rem;
  border-bottom: 1px solid #f0f0f0;
  align-items: center;
}
.bill-item-name { font-weight: 500; }
.bill-item-qty { text-align: center; color: var(--text-muted); font-size: 0.82rem; }
.bill-item-amount { text-align: right; font-weight: 600; }

/* Bill Totals */
.bill-totals {
  padding: 14px 0;
  border-top: 2px dashed var(--border);
  margin-top: 10px;
}
.bill-row {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
  font-size: 0.9rem;
}
.bill-row.tax {
  color: var(--text-muted);
  font-size: 0.85rem;
}
.bill-row.grand-total {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--secondary);
  padding-top: 10px;
  margin-top: 6px;
  border-top: 2px solid var(--secondary);
}

/* Orders Breakdown */
.bill-orders-breakdown {
  background: #f8f9fa;
  border-radius: 10px;
  padding: 12px;
  margin: 14px 0;
}
.breakdown-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.breakdown-row {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 10px;
  align-items: center;
  font-size: 0.78rem;
  padding: 4px 0;
  border-bottom: 1px solid #eee;
}
.breakdown-row:last-child { border-bottom: none; }
.breakdown-row span:first-child { font-weight: 500; color: var(--primary); font-size: 0.72rem; }
.breakdown-time { color: var(--text-muted); }

/* Payment Section */
.bill-payment {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 2px dashed var(--border);
}
.bill-payment h4 {
  font-size: 0.95rem;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--secondary);
}

.payment-methods {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.pay-method-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px 10px;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: white;
  font-family: var(--font);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: all 0.25s ease;
}
.pay-method-btn i {
  font-size: 1.5rem;
  color: var(--text-muted);
  transition: color 0.25s ease;
}
.pay-method-btn:hover {
  border-color: #27ae60;
  background: #f0fdf4;
}
.pay-method-btn.selected {
  border-color: #27ae60;
  background: #d5f5e3;
  color: #155724;
}
.pay-method-btn.selected i {
  color: #27ae60;
}

/* Paid Stamp */
.bill-paid {
  text-align: center;
  padding: 24px 0 10px;
  margin-top: 18px;
  border-top: 2px dashed var(--border);
}
.paid-stamp {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 30px;
  background: #d5f5e3;
  border-radius: 12px;
  border: 3px solid #27ae60;
  color: #27ae60;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 3px;
  text-transform: uppercase;
  animation: stampBounce 0.5s ease;
}
.paid-stamp i { font-size: 1.6rem; }

@keyframes stampBounce {
  0% { transform: scale(1.5); opacity: 0; }
  60% { transform: scale(0.9); }
  100% { transform: scale(1); opacity: 1; }
}

.paid-info {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 10px;
}

/* Bill Responsive */
@media (min-width: 768px) {
  .bill-panel {
    max-width: 480px;
    left: auto;
    right: 20px;
    bottom: 20px;
    max-height: 80vh;
    border-radius: 16px;
  }
  .bill-fab {
    left: 24px;
    bottom: 84px;
  }
}

/* ══════════════════════════════════════════════════════════
   UPI PAYMENT STYLES
   ══════════════════════════════════════════════════════════ */

.upi-payment-panel {
  margin-top: 16px;
  animation: fadeSlideUp 0.3s ease;
}

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

/* QR Section */
.upi-qr-section {
  text-align: center;
  padding: 16px 0;
}

.upi-scan-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--secondary);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.upi-scan-label i {
  color: var(--primary);
  font-size: 1rem;
}

.upi-qr-box {
  display: inline-block;
  padding: 12px;
  background: white;
  border: 3px solid #5f259f;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(95, 37, 159, 0.15);
  position: relative;
}
.upi-qr-box::before {
  content: 'UPI';
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: #5f259f;
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 12px;
  border-radius: 10px;
  letter-spacing: 1px;
}
.upi-qr-box img {
  width: 200px;
  height: 200px;
  display: block;
  border-radius: 8px;
}

.upi-amount-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 14px;
  padding: 8px 20px;
  background: linear-gradient(135deg, #5f259f, #7b42bf);
  color: white;
  border-radius: 25px;
  font-weight: 700;
  font-size: 1.1rem;
  box-shadow: 0 3px 12px rgba(95, 37, 159, 0.3);
}

/* UPI Apps Section */
.upi-apps-section {
  padding: 16px 0;
  border-top: 1px dashed var(--border);
  margin-top: 14px;
}

.upi-apps-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.upi-app-buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.upi-app-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 8px;
  border: 2px solid var(--border);
  border-radius: 14px;
  background: white;
  text-decoration: none;
  color: var(--text);
  font-size: 0.75rem;
  font-weight: 600;
  transition: all 0.25s ease;
  cursor: pointer;
}
.upi-app-btn img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}
.upi-app-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0,0,0,0.1);
}

.upi-app-btn.gpay:hover { border-color: #4285F4; background: #e8f0fe; }
.upi-app-btn.phonepe:hover { border-color: #5f259f; background: #f3eef9; }
.upi-app-btn.paytm:hover { border-color: #00BAF2; background: #e6f7fd; }

/* UPI ID Copy Section */
.upi-id-section {
  padding: 14px 0;
  border-top: 1px dashed var(--border);
  margin-top: 10px;
}

.upi-id-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.upi-id-copy {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #f8f9fa;
  border: 2px dashed var(--border);
  border-radius: 10px;
  padding: 10px 16px;
}

.upi-id-value {
  font-family: 'Courier New', monospace;
  font-size: 0.95rem;
  font-weight: 700;
  color: #5f259f;
  letter-spacing: 0.5px;
}

.upi-copy-btn {
  background: none;
  border: none;
  font-size: 1.1rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.2s ease;
}
.upi-copy-btn:hover {
  background: #e8e8e8;
  color: #5f259f;
}

/* UPI Divider */
.upi-divider {
  height: 1px;
  background: var(--border);
  margin: 16px 0;
}

/* UPI Confirm Button */
.upi-confirm-btn {
  background: linear-gradient(135deg, #5f259f, #7b42bf) !important;
  font-size: 0.95rem !important;
}
.upi-confirm-btn:hover {
  background: linear-gradient(135deg, #4a1d7a, #6935a3) !important;
}

/* UPI Note */
.upi-note {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.upi-note i { color: #5f259f; }

/* ══════════════════════════════════════════════════════════
   ADMIN - PENDING BILLS DASHBOARD
   ══════════════════════════════════════════════════════════ */

.bills-grand-total {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: white;
  padding: 8px 18px;
  border-radius: 10px;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 6px;
}
.bills-grand-total strong { font-size: 1.05rem; }

.badge-green {
  background: #27ae60 !important;
}

.pending-bills-list {
  display: grid;
  gap: 16px;
}

.pending-bill-card {
  background: white;
  border-radius: 14px;
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.25s ease;
}
.pending-bill-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.pb-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 18px;
  background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
}

.pb-table-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.pb-table-badge {
  background: var(--secondary);
  color: white;
  padding: 5px 14px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.88rem;
}

.pb-customer {
  font-size: 0.82rem;
  color: var(--secondary-light);
  display: flex;
  align-items: center;
  gap: 4px;
}

.pb-order-count {
  font-size: 0.78rem;
  color: var(--text-muted);
  background: rgba(255,255,255,0.6);
  padding: 2px 10px;
  border-radius: 12px;
}

.pb-total {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--secondary);
}

.pb-items {
  padding: 14px 18px;
  border-bottom: 1px dashed var(--border);
}

.pb-item-row {
  display: grid;
  grid-template-columns: 1fr 50px 70px;
  font-size: 0.85rem;
  padding: 4px 0;
  align-items: center;
}
.pb-item-row span:nth-child(2) { text-align: center; color: var(--text-muted); }
.pb-item-row span:nth-child(3) { text-align: right; font-weight: 600; }

.pb-totals {
  padding: 10px 18px;
  border-bottom: 1px solid var(--border);
}
.pb-totals-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  padding: 3px 0;
}
.pb-tax { color: var(--text-muted); }
.pb-grand {
  font-weight: 700;
  font-size: 1rem;
  padding-top: 6px;
  border-top: 1px dashed var(--border);
  margin-top: 4px;
}

.pb-orders {
  padding: 10px 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pb-order-chip {
  font-size: 0.72rem;
  padding: 4px 10px;
  border-radius: 16px;
  font-weight: 500;
}

.pb-actions {
  padding: 14px 18px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  border-top: 1px solid var(--border);
  background: #fafafa;
}

/* ══════════════════════════════════════════════════════════
   ADMIN - UPI SETTINGS
   ══════════════════════════════════════════════════════════ */

.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.settings-card {
  background: white;
  border-radius: 14px;
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.settings-card-header {
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f8f9fa;
  border-bottom: 1px solid var(--border);
}
.settings-card-header i {
  font-size: 1.2rem;
  color: #5f259f;
}
.settings-card-header h3 {
  font-size: 1rem;
  font-weight: 600;
}

.settings-card-body {
  padding: 18px;
}

.settings-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 14px;
  line-height: 1.5;
}

.settings-card .form-group {
  margin-bottom: 14px;
}
.settings-card .form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--secondary);
  margin-bottom: 5px;
}
.settings-card .form-group input {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid var(--border);
  border-radius: 10px;
  font-family: var(--font);
  font-size: 0.9rem;
  transition: border-color 0.2s ease;
  outline: none;
}
.settings-card .form-group input:focus {
  border-color: #5f259f;
}

.settings-current {
  background: #f0fdf4;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.82rem;
  color: #155724;
  display: flex;
  align-items: center;
  gap: 6px;
}
.settings-current i { color: #27ae60; }

/* QR Upload Area */
.qr-upload-area {
  border: 3px dashed var(--border);
  border-radius: 14px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.qr-upload-area:hover,
.qr-upload-area.drag-over {
  border-color: #5f259f;
  background: #f8f0ff;
}

.qr-upload-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
}
.qr-upload-placeholder i {
  font-size: 2.5rem;
  color: #5f259f;
}
.qr-upload-placeholder p { font-weight: 600; font-size: 0.9rem; }
.qr-upload-placeholder span { font-size: 0.78rem; }

.qr-upload-preview {
  max-width: 200px;
  max-height: 200px;
  border-radius: 10px;
  object-fit: contain;
}

.qr-upload-actions {
  margin-top: 10px;
  display: flex;
  gap: 8px;
}

/* Settings Preview */
.settings-preview-card {
  background: linear-gradient(135deg, #1a1a2e, #16213e) !important;
  color: white;
}
.settings-preview-card .settings-card-header {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.1);
}
.settings-preview-card .settings-card-header i { color: #e67e22; }
.settings-preview-card .settings-card-header h3 { color: white; }
.settings-preview-card .settings-desc { color: rgba(255,255,255,0.5); }

.settings-preview-box {
  text-align: center;
  padding: 12px 0;
}

.preview-qr-frame {
  display: inline-block;
  padding: 10px;
  background: white;
  border-radius: 14px;
  margin-bottom: 12px;
}
.preview-qr-frame img {
  width: 160px;
  height: 160px;
  border-radius: 8px;
  display: block;
}

.preview-upi-id {
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  font-weight: 700;
  color: #e67e22;
  margin-bottom: 4px;
}

.preview-merchant {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.5);
}

/* Save Bar */
.settings-save-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 0;
  border-top: 1px solid var(--border);
}

.settings-save-status {
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* ══════════════════════════════════════════════════════════
   TABLE SCANNER SECTION
   ══════════════════════════════════════════════════════════ */

.ts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 8px;
}

.ts-card {
  background: white;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
}

.ts-card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}

.ts-card.ts-free {
  border-color: #e0e0e0;
  background: #fafafa;
}

.ts-card.ts-active {
  border-color: #e67e22;
  background: linear-gradient(135deg, #fff7ed, #ffffff);
}

.ts-card.ts-unpaid {
  border-color: #e74c3c;
  background: linear-gradient(135deg, #fef2f2, #ffffff);
}

.ts-card.ts-served {
  border-color: #27ae60;
  background: linear-gradient(135deg, #f0fdf4, #ffffff);
}

.ts-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px 0;
}

.ts-table-num {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--secondary);
}

.ts-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 50px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ts-badge-active {
  background: #fff3e0;
  color: #e67e22;
}

.ts-badge-unpaid {
  background: #fde8e8;
  color: #e74c3c;
}

.ts-badge-served {
  background: #e8f5e9;
  color: #27ae60;
}

.ts-card.ts-free .ts-badge {
  background: #f5f5f5;
  color: #999;
}

.ts-card-body {
  padding: 12px 16px;
  min-height: 70px;
}

.ts-empty-icon {
  text-align: center;
  font-size: 2rem;
  color: #ccc;
  margin-bottom: 4px;
}

.ts-empty-text {
  text-align: center;
  color: #aaa;
  font-size: 0.85rem;
}

.ts-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: var(--text-light);
  margin-bottom: 6px;
}

.ts-info-row i {
  margin-right: 4px;
  font-size: 0.75rem;
  opacity: 0.7;
}

.ts-amount {
  font-weight: 700;
  color: var(--secondary);
}

.ts-unpaid-bar {
  margin-top: 8px;
  padding: 6px 10px;
  background: #fde8e8;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #e74c3c;
  text-align: center;
}

.ts-card-footer {
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.ts-card.ts-free .ts-card-footer {
  opacity: 0.5;
}

/* Table Detail Modal */
.modal-lg {
  max-width: 700px;
}

.modal-body {
  padding: 20px;
  max-height: 70vh;
  overflow-y: auto;
}

.td-empty {
  text-align: center;
  padding: 40px 20px;
  color: #aaa;
}

.td-empty i {
  font-size: 3rem;
  margin-bottom: 12px;
  display: block;
}

.td-empty h3 {
  color: var(--secondary);
  margin-bottom: 8px;
}

.td-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.td-summary-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: #f8f9fa;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.td-summary-card i {
  font-size: 1.3rem;
  color: var(--primary);
  width: 30px;
  text-align: center;
}

.td-summary-card strong {
  display: block;
  font-size: 1rem;
  color: var(--secondary);
}

.td-summary-card small {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.td-summary-card.td-unpaid {
  background: #fef2f2;
  border-color: #e74c3c30;
}

.td-summary-card.td-unpaid i { color: #e74c3c; }
.td-summary-card.td-unpaid strong { color: #e74c3c; }

.td-summary-card.td-all-paid {
  background: #f0fdf4;
  border-color: #27ae6030;
}

.td-summary-card.td-all-paid i { color: #27ae60; }
.td-summary-card.td-all-paid strong { color: #27ae60; }

.td-section-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--secondary);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.td-section-title i {
  color: var(--primary);
  font-size: 0.9rem;
}

.td-orders-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.td-order {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: white;
  transition: var(--transition);
}

.td-order:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.td-order-paid {
  opacity: 0.6;
  background: #f8f9fa;
}

.td-order-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.td-order-id {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  font-family: monospace;
}

.td-order-status {
  font-size: 0.68rem;
}

.td-paid-badge {
  font-size: 0.68rem;
  font-weight: 700;
  color: #27ae60;
  background: #e8f5e9;
  padding: 2px 8px;
  border-radius: 50px;
}

.td-order-items {
  font-size: 0.82rem;
  color: var(--text-light);
  margin-bottom: 6px;
  line-height: 1.5;
}

.td-order-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.td-order-amount {
  font-weight: 700;
  color: var(--secondary);
  font-size: 0.9rem;
}

.td-pay-actions {
  padding: 16px;
  background: linear-gradient(135deg, #f8f9fa, #e8e8e8);
  border-radius: var(--radius-sm);
  border: 2px dashed var(--border);
}

.td-pay-actions h4 {
  font-size: 0.95rem;
  color: var(--secondary);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.td-pay-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.td-pay-buttons .btn {
  flex: 1;
  min-width: 120px;
}

/* QR Scanner in Admin */
.ts-scanner-box {
  position: relative;
  width: 280px;
  height: 280px;
  border-radius: 16px;
  overflow: hidden;
  margin: 0 auto 16px;
  background: #000;
}

.ts-scanner-box video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ts-scanner-box .scan-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.ts-scanner-box .scan-corner {
  position: absolute;
  width: 36px;
  height: 36px;
  border: 4px solid #e67e22;
}

.ts-scanner-box .scan-corner.tl { top: 14px; left: 14px; border-right: none; border-bottom: none; border-radius: 8px 0 0 0; }
.ts-scanner-box .scan-corner.tr { top: 14px; right: 14px; border-left: none; border-bottom: none; border-radius: 0 8px 0 0; }
.ts-scanner-box .scan-corner.bl { bottom: 14px; left: 14px; border-right: none; border-top: none; border-radius: 0 0 0 8px; }
.ts-scanner-box .scan-corner.br { bottom: 14px; right: 14px; border-left: none; border-top: none; border-radius: 0 0 8px 0; }

.ts-scanner-box .scan-line {
  position: absolute;
  left: 18px;
  right: 18px;
  height: 3px;
  background: linear-gradient(90deg, transparent, #e67e22, transparent);
  animation: scanMove 2s ease-in-out infinite;
  border-radius: 2px;
}

@keyframes scanMove {
  0%, 100% { top: 18px; }
  50% { top: calc(100% - 18px); }
}

.ts-scanner-status {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-top: 8px;
}

.ts-scanner-status.ts-scanning { color: #e67e22; }
.ts-scanner-status.ts-success { color: #27ae60; }
.ts-scanner-status.ts-error { color: #e74c3c; }

/* Responsive Table Scanner */
@media (max-width: 768px) {
  .ts-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .ts-card-header { padding: 10px 12px 0; }
  .ts-table-num { font-size: 1.1rem; }
  .ts-badge { font-size: 0.65rem; padding: 3px 7px; }
  .ts-card-body { padding: 8px 12px; min-height: 50px; }
  .ts-card-footer { padding: 8px 12px; }

  .td-summary {
    grid-template-columns: repeat(2, 1fr);
  }

  .td-pay-buttons .btn {
    min-width: 90px;
    font-size: 0.82rem;
  }
}

@media (max-width: 480px) {
  .ts-grid {
    grid-template-columns: 1fr;
  }
}

/* ══════════════════════════════════════════════════════════
   LOGIN OVERLAY
   ══════════════════════════════════════════════════════════ */

.login-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, #2c3e50 0%, #34495e 50%, #e67e22 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.login-card {
  background: white;
  border-radius: 20px;
  padding: 40px 36px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  text-align: center;
}

.login-logo {
  width: 70px; height: 70px;
  background: var(--primary);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
  font-size: 1.8rem;
  color: white;
}

.login-card h2 {
  font-size: 1.5rem;
  color: var(--secondary);
  margin-bottom: 4px;
}

.login-subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 24px;
}

.login-card .form-group {
  text-align: left;
  margin-bottom: 16px;
}

.login-card .form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--secondary);
  margin-bottom: 6px;
}

.login-card .form-group input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.95rem;
  transition: var(--transition);
}

.login-card .form-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(230,126,34,0.15);
}

.login-error {
  color: var(--danger);
  font-size: 0.85rem;
  min-height: 20px;
  margin-bottom: 8px;
}

.login-card .btn-block {
  padding: 14px;
  font-size: 1rem;
}

/* ══════════════════════════════════════════════════════════
   NEW ORDER STATUSES
   ══════════════════════════════════════════════════════════ */

.status-pending_payment,
.order-status.status-pending_payment {
  background: #fff3e0;
  color: #e65100;
  border: 1px solid #ffcc80;
}

.status-confirmed,
.order-status.status-confirmed {
  background: #e0f2f1;
  color: #00695c;
  border: 1px solid #80cbc4;
}

.status-badge-pending_payment {
  background: #fff3e0 !important;
  color: #e65100 !important;
}

.status-badge-confirmed {
  background: #e0f2f1 !important;
  color: #00695c !important;
}

.stat-card.stat-confirmed {
  border-left: 4px solid #00897b;
}

.stat-card.stat-confirmed .stat-icon {
  background: #e0f2f1;
  color: #00897b;
}

.order-card-pending_payment {
  border-left: 4px solid #e65100;
}

.order-card-confirmed {
  border-left: 4px solid #00897b;
}

/* ══════════════════════════════════════════════════════════
   TABLE MANAGEMENT SECTION
   ══════════════════════════════════════════════════════════ */

.table-mgmt-add {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  align-items: center;
}

.table-mgmt-add .input-lg {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.95rem;
}

.table-mgmt-add .input-lg:focus {
  outline: none;
  border-color: var(--primary);
}

.table-mgmt-count {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
}

.table-mgmt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.table-mgmt-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: white;
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.table-mgmt-card:hover {
  box-shadow: var(--shadow-lg);
}

.table-mgmt-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.table-mgmt-name {
  font-weight: 600;
  font-size: 1rem;
  color: var(--secondary);
}

.table-mgmt-id {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: monospace;
}

.table-mgmt-actions {
  display: flex;
  gap: 8px;
}

/* ══════════════════════════════════════════════════════════
   THANK YOU / PAYMENT SCREEN
   ══════════════════════════════════════════════════════════ */

.thankyou-screen {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 16px;
  overflow-y: auto;
}

.ty-content {
  background: white;
  border-radius: 20px;
  padding: 32px 24px;
  width: 100%;
  max-width: 440px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.ty-header {
  text-align: center;
  margin-bottom: 20px;
}

.ty-check {
  width: 70px; height: 70px;
  background: var(--success-light);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 12px;
  font-size: 2rem;
  color: var(--success);
  animation: tyPulse 0.6s ease;
}

@keyframes tyPulse {
  0% { transform: scale(0); opacity: 0; }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); opacity: 1; }
}

.ty-header h2 {
  font-size: 1.5rem;
  color: var(--success);
  margin-bottom: 4px;
}

.ty-header p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.ty-order-summary {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 20px;
}

.ty-order-id {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.ty-item {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 0.9rem;
  border-bottom: 1px dashed var(--border);
}

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

.ty-total {
  text-align: right;
  font-size: 1.1rem;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 2px solid var(--border);
}

.ty-payment-section {
  margin-bottom: 16px;
}

.ty-payment-section h3 {
  font-size: 1rem;
  color: var(--secondary);
  margin-bottom: 16px;
  text-align: center;
}

.ty-upi-box {
  text-align: center;
  margin-bottom: 16px;
}

.ty-scan-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.ty-qr-frame {
  display: inline-block;
  padding: 12px;
  background: white;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 8px;
}

.ty-qr-frame img {
  width: 180px;
  height: 180px;
  object-fit: contain;
}

.ty-pay-amount {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
}

.ty-upi-apps {
  text-align: center;
  margin-bottom: 16px;
}

.ty-upi-apps p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.ty-app-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.ty-app-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 20px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  transition: var(--transition);
  text-decoration: none;
  color: var(--text);
}

.ty-app-btn:hover {
  background: var(--primary-light);
  transform: translateY(-2px);
}

.ty-app-btn img {
  width: 36px; height: 36px;
  object-fit: contain;
}

.ty-app-btn span {
  font-size: 0.75rem;
  font-weight: 500;
}

.ty-upi-id-box {
  text-align: center;
  margin-bottom: 16px;
}

.ty-upi-id-box p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.ty-upi-id-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.ty-upi-id {
  font-family: monospace;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--secondary);
}

.ty-copy-btn {
  background: var(--primary);
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  cursor: pointer;
  font-family: var(--font);
  transition: var(--transition);
}

.ty-copy-btn:hover {
  background: var(--primary-dark);
}

.ty-cash-option {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px;
  background: #e8f5e9;
  border-radius: var(--radius-sm);
  color: #2e7d32;
  font-weight: 500;
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.ty-cash-option i {
  font-size: 1.1rem;
}

.ty-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 12px;
  background: #fff8e1;
  border-radius: var(--radius-sm);
  color: #f57f17;
  font-size: 0.82rem;
  margin-bottom: 16px;
  line-height: 1.4;
}

.ty-note i {
  margin-top: 2px;
  flex-shrink: 0;
}

/* ══════════════════════════════════════════════════════════
   CART PAYMENT METHOD RADIO
   ══════════════════════════════════════════════════════════ */

.cart-payment-select {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}

.pay-radio {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  transition: var(--transition);
}

.pay-radio:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-light);
}

.pay-radio input[type="radio"] {
  accent-color: var(--primary);
}

.pay-radio i {
  font-size: 1rem;
  color: var(--text-muted);
}

.pay-radio:has(input:checked) i {
  color: var(--primary);
}

/* ══════════════════════════════════════════════════════════
   MENU ERROR STATE
   ══════════════════════════════════════════════════════════ */

.menu-error {
  text-align: center;
  padding: 60px 20px;
  color: var(--warning);
}

.menu-error i {
  font-size: 3rem;
  margin-bottom: 16px;
  display: block;
}

.menu-error p {
  font-size: 1.1rem;
  font-weight: 500;
}

/* ══════════════════════════════════════════════════════════
   RESPONSIVE: TABLE MANAGEMENT
   ══════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .table-mgmt-add {
    flex-direction: column;
  }
  .table-mgmt-add .btn {
    width: 100%;
    justify-content: center;
  }
  .table-mgmt-grid {
    grid-template-columns: 1fr;
  }
  .login-card {
    margin: 16px;
    padding: 28px 20px;
  }
}

/* ══════════════════════════════════════════════════════════
   ORDER HISTORY
   ══════════════════════════════════════════════════════════ */

.history-filters {
  background: white;
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

.history-filter-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: end;
}

.history-filter-row .filter-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 140px;
}

.history-filter-row .filter-group:first-child {
  flex: 2;
  min-width: 220px;
}

.history-filter-row .filter-group label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.history-filter-row .filter-group input,
.history-filter-row .filter-group select {
  padding: 9px 12px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.85rem;
  transition: var(--transition);
}

.history-filter-row .filter-group input:focus,
.history-filter-row .filter-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(230,126,34,0.12);
}

.history-result-info {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  padding-left: 4px;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.history-card {
  background: white;
  border-radius: var(--radius);
  padding: 16px 20px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--border);
  transition: var(--transition);
}

.history-card:hover {
  box-shadow: var(--shadow-lg);
}

.history-card-completed { border-left-color: var(--success); }
.history-card-cancelled { border-left-color: var(--danger); }
.history-card-preparing { border-left-color: var(--warning); }
.history-card-ready { border-left-color: #2196f3; }
.history-card-confirmed { border-left-color: #00897b; }
.history-card-pending_payment { border-left-color: #e65100; }

.hist-row-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 8px;
}

.hist-order-id {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hist-id {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--secondary);
  font-family: monospace;
}

.hist-time {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.hist-time i {
  margin-right: 4px;
}

.hist-row-details {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.hist-detail {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text);
}

.hist-detail i {
  color: var(--text-muted);
  width: 14px;
  text-align: center;
  font-size: 0.8rem;
}

.hist-amount {
  margin-left: auto;
}

.hist-amount strong {
  color: var(--primary);
  font-size: 1rem;
}

.hist-row-items {
  font-size: 0.82rem;
  color: var(--text-muted);
  padding: 8px 0;
  border-top: 1px dashed var(--border);
  line-height: 1.4;
}

.hist-row-items i {
  margin-right: 6px;
  color: var(--text-muted);
}

.hist-row-payment {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
  margin-top: 4px;
}

.hist-payment-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.hist-payment-id {
  font-family: monospace;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--success);
  background: var(--success-light);
  padding: 2px 10px;
  border-radius: 6px;
}

.hist-paid-time {
  font-size: 0.78rem;
  color: var(--success);
  margin-left: auto;
}

.hist-paid-time i {
  margin-right: 4px;
}

@media (max-width: 768px) {
  .history-filter-row {
    flex-direction: column;
  }
  .history-filter-row .filter-group {
    min-width: 100%;
  }
  .hist-row-details {
    flex-direction: column;
    gap: 6px;
  }
  .hist-amount {
    margin-left: 0;
  }
  .hist-row-payment {
    flex-direction: column;
    align-items: flex-start;
  }
  .hist-paid-time {
    margin-left: 0;
  }
}
