/* assets/css/style.css - Rooftop Cafe POS Design System */
@import url('https://fonts.googleapis.com/css2?family=Hind+Siliguri:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --primary: #4A2810;
  --primary-light: #6E3F1A;
  --primary-dark: #2B1704;
  --accent: #E0533C;
  --accent-hover: #C9422C;
  --gold: #D97706;
  --gold-light: #FEF3C7;
  --bg: #F8F5F0;
  --card-bg: #FFFFFF;
  --surface: #F1ECE4;
  --border: #E5DED5;
  --text-main: #1F1B18;
  --text-muted: #6B655F;
  --text-light: #9C948B;
  --success: #15803D;
  --success-bg: #DCFCE7;
  --warning: #B45309;
  --warning-bg: #FEF3C7;
  --danger: #B91C1C;
  --danger-bg: #FEE2E2;
  --info: #0369A1;
  --info-bg: #E0F2FE;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --shadow-sm: 0 1px 3px rgba(43, 23, 4, 0.06);
  --shadow-md: 0 4px 14px rgba(43, 23, 4, 0.08);
  --shadow-lg: 0 10px 25px rgba(43, 23, 4, 0.12);
  --font-sans: 'Plus Jakarta Sans', 'Hind Siliguri', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* APP SHELL & NAVIGATION */
.app-layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 260px;
  background: var(--primary-dark);
  color: #FDFBF7;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 90;
  transition: transform 0.3s ease;
}

.brand-section {
  padding: 24px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo-img {
  width: 44px;
  height: 44px;
  border-radius: 12px;
}

.brand-text h1 {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: #FFFFFF;
}

.brand-text p {
  font-size: 11px;
  color: #D1BBA2;
}

.nav-menu {
  list-style: none;
  padding: 16px 12px;
  flex: 1;
  overflow-y: auto;
}

.nav-item {
  margin-bottom: 6px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  color: #D8CCC0;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.nav-link:hover, .nav-link.active {
  background: rgba(255, 255, 255, 0.12);
  color: #FFFFFF;
}

.nav-link.active {
  background: var(--accent);
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(224, 83, 60, 0.3);
}

.nav-icon {
  font-size: 18px;
  width: 24px;
  text-align: center;
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12px;
  color: #A39281;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.db-pill {
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  background: rgba(217, 119, 6, 0.2);
  color: #FBBF24;
}

.main-content {
  flex: 1;
  padding: 24px;
  max-width: 1440px;
  margin: 0 auto;
  width: 100%;
}

/* TOPBAR */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--card-bg);
  padding: 14px 20px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
  border: 1px solid var(--border);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.menu-toggle-btn {
  display: none;
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: var(--primary);
}

.page-title-box h2 {
  font-size: 20px;
  font-weight: 800;
  color: var(--primary);
}

.page-title-box p {
  font-size: 12px;
  color: var(--text-muted);
}

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

.table-tag {
  background: var(--gold-light);
  color: var(--gold);
  border: 1px solid #FCD34D;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
}

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

.stat-card {
  background: var(--card-bg);
  padding: 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
  overflow: hidden;
}

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.stat-icon.coffee { background: #FDF2E9; color: #D35400; }
.stat-icon.sales { background: #E8F8F5; color: #16A085; }
.stat-icon.orders { background: #EBF5FB; color: #2980B9; }
.stat-icon.expense { background: #FDEDEC; color: #C0392B; }

.stat-info .stat-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
}

.stat-info .stat-value {
  font-size: 24px;
  font-weight: 800;
  color: var(--primary);
  margin-top: 2px;
}

/* CATEGORY TABS */
.category-scroller {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 12px;
  margin-bottom: 20px;
  scrollbar-width: none;
}

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

.cat-chip {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 25px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.2s ease;
}

.cat-chip:hover {
  border-color: var(--primary-light);
}

.cat-chip.active {
  background: var(--primary);
  color: #FFFFFF;
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(74, 40, 16, 0.25);
}

/* MENU GRID */
.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 18px;
  margin-bottom: 40px;
}

.menu-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

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

.menu-card-top {
  display: flex;
  gap: 14px;
}

.item-avatar {
  width: 68px;
  height: 68px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #FFF3E0, #FFE0B2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  flex-shrink: 0;
}

.item-details {
  flex: 1;
}

.item-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary-dark);
  line-height: 1.3;
}

.item-title-bn {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 1px;
}

.item-desc {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 4px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.item-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.tag {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  text-transform: uppercase;
}

.tag-veg { background: var(--success-bg); color: var(--success); }
.tag-bestseller { background: var(--gold-light); color: var(--gold); }
.tag-sizes { background: var(--info-bg); color: var(--info); }
.tag-out { background: var(--danger-bg); color: var(--danger); }

.menu-card-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}

.price-box {
  display: flex;
  flex-direction: column;
}

.price-num {
  font-size: 18px;
  font-weight: 800;
  color: var(--primary);
}

.price-sub {
  font-size: 11px;
  color: var(--text-light);
}

.btn-add {
  background: var(--primary);
  color: #FFFFFF;
  border: none;
  padding: 9px 18px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

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

.btn-add.in-cart {
  background: var(--success);
}

/* MODAL - BOTTOM SHEET */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(20, 10, 5, 0.65);
  backdrop-filter: blur(4px);
  z-index: 1000;
  align-items: flex-end;
  justify-content: center;
}

.modal-overlay.active {
  display: flex;
}

.modal-sheet {
  background: #FFFFFF;
  width: 100%;
  max-width: 580px;
  max-height: 88vh;
  border-radius: 28px 28px 0 0;
  overflow-y: auto;
  padding: 24px;
  animation: slideUp 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.modal-title-box h3 {
  font-size: 20px;
  font-weight: 800;
  color: var(--primary);
}

.modal-title-box p {
  font-size: 13px;
  color: var(--text-muted);
}

.btn-close-modal {
  background: #F3ECE2;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
}

.mod-group-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary-dark);
  margin: 18px 0 8px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mod-group-title span {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: normal;
}

.options-pill-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.opt-pill {
  padding: 8px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  background: #FFFFFF;
  color: var(--text-main);
  transition: all 0.2s ease;
}

.opt-pill.selected {
  border-color: var(--primary);
  background: #F7EFE8;
  color: var(--primary);
}

.opt-extra-charge {
  font-size: 11px;
  color: var(--accent);
  margin-left: 4px;
  font-weight: 700;
}

.special-note-input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 13px;
  margin-top: 6px;
  resize: none;
}

.modal-footer {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 14px;
}

.qty-stepper {
  display: flex;
  align-items: center;
  background: #F5ECE2;
  border-radius: var(--radius-md);
  padding: 4px;
}

.qty-btn {
  width: 36px;
  height: 36px;
  background: #FFFFFF;
  border: none;
  border-radius: 10px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.qty-val {
  min-width: 36px;
  text-align: center;
  font-size: 16px;
  font-weight: 800;
}

.btn-confirm-add {
  flex: 1;
  background: var(--accent);
  color: #FFFFFF;
  border: none;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(224, 83, 60, 0.35);
  display: flex;
  justify-content: space-between;
}

/* FLOATING CART BAR (MOBILE/PWA) */
.floating-cart-bar {
  position: fixed;
  bottom: 20px;
  left: 20px;
  right: 20px;
  max-width: 500px;
  margin: 0 auto;
  background: var(--primary-dark);
  color: #FFFFFF;
  padding: 14px 20px;
  border-radius: 20px;
  display: none;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 10px 30px rgba(43, 23, 4, 0.4);
  z-index: 500;
  cursor: pointer;
  animation: popIn 0.3s ease;
}

.floating-cart-bar.active {
  display: flex;
}

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

.cart-bar-badge {
  background: var(--accent);
  color: #FFFFFF;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 800;
}

.cart-bar-total {
  font-size: 18px;
  font-weight: 800;
  color: #FCD34D;
}

/* TABLES GRID */
.tables-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.table-card {
  background: var(--card-bg);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

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

.table-card.available {
  border-color: #86EFAC;
}

.table-card.occupied {
  border-color: #FCA5A5;
  background: #FFFBFB;
}

.table-card.reserved {
  border-color: #93C5FD;
}

.table-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.table-card-number {
  font-size: 17px;
  font-weight: 800;
  color: var(--primary);
}

.table-status-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 12px;
  text-transform: uppercase;
}

.status-available { background: var(--success-bg); color: var(--success); }
.status-occupied { background: var(--danger-bg); color: var(--danger); }
.status-reserved { background: var(--info-bg); color: var(--info); }

/* KDS - KITCHEN DISPLAY SCREEN */
.kds-container {
  padding: 16px;
  background: #111827;
  min-height: 100vh;
  color: #F3F4F6;
}

.kds-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: #1F2937;
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
}

.kds-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}

.kds-card {
  background: #1F2937;
  border-radius: var(--radius-lg);
  border-top: 6px solid var(--accent);
  padding: 18px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.kds-card.preparing { border-top-color: #F59E0B; }
.kds-card.ready { border-top-color: #10B981; }

.kds-card-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}

.kds-order-num {
  font-size: 18px;
  font-weight: 800;
  color: #FFFFFF;
}

.kds-tbl-badge {
  background: #374151;
  color: #FBBF24;
  padding: 4px 10px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 13px;
}

.kds-item-list {
  list-style: none;
  margin-bottom: 16px;
}

.kds-item-list li {
  padding: 8px 0;
  border-bottom: 1px solid #374151;
  font-size: 15px;
}

.kds-qty {
  background: var(--accent);
  color: white;
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 800;
  margin-right: 8px;
}

.kds-action-btn {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-kds-prep { background: #F59E0B; color: #111827; }
.btn-kds-ready { background: #10B981; color: #FFFFFF; }
.btn-kds-serve { background: #3B82F6; color: #FFFFFF; }

/* TOAST NOTIFICATION */
.toast-msg {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary-dark);
  color: #FFFFFF;
  padding: 12px 24px;
  border-radius: 30px;
  box-shadow: var(--shadow-lg);
  font-size: 14px;
  font-weight: 700;
  z-index: 2000;
  animation: fadeIn 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translate(-50%, -10px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .sidebar {
    position: fixed;
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .menu-toggle-btn {
    display: block;
  }
  .main-content {
    padding: 14px;
  }
}

@media (max-width: 600px) {
  .menu-grid {
    grid-template-columns: 1fr;
  }
  .topbar {
    padding: 12px 14px;
  }
}
