/* WeChat Mini-Program Premium Theme CSS */
:root {
  --bg-main: #f5f6f7;
  --bg-card: #ffffff;
  --bg-sidebar: #f8f9fa;
  --text-main: #2c3e50;
  --text-muted: #8896a6;
  --primary-green: #48bb78; /* Leaf green from images */
  --primary-green-hover: #38a169;
  --primary-green-light: #e6f4ea;
  --danger-color: #e53e3e;
  --border-color: #edf2f7;
  --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  --header-bg-height: 140px;
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.4;
  overflow-x: hidden;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header Banner Background */
.header-banner {
  height: var(--header-bg-height);
  background: linear-gradient(to bottom, rgba(0,0,0,0.1), rgba(0,0,0,0.5)), url('https://images.unsplash.com/photo-1556910103-1c02745aae4d?auto=format&fit=crop&w=600&q=80') center center / cover no-repeat;
  width: 100%;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
}

/* Page Top Container */
.shop-profile-wrapper {
  margin-top: 50px;
  padding: 0 0.85rem;
  position: relative;
  z-index: 2;
}

.shop-profile-card {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 1rem;
  box-shadow: var(--card-shadow);
  display: flex;
  align-items: center;
  gap: 0.85rem;
  position: relative;
}

.shop-avatar {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  background: #ffecb3;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.shop-info h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #1a202c;
  margin-bottom: 0.2rem;
}

.shop-slogan {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.shop-actions-row {
  margin-top: 0.75rem;
  display: flex;
  gap: 0.5rem;
  padding: 0 0.85rem;
  position: relative;
  z-index: 2;
}

.btn-pill {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 0.45rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  transition: all 0.2s;
  box-shadow: var(--card-shadow);
}

.btn-pill.primary {
  background: var(--primary-green);
  color: white;
  border-color: var(--primary-green);
}

.btn-pill:active {
  transform: scale(0.96);
}

/* Split Column Menu Layout */
.main-menu-layout {
  display: flex;
  flex: 1;
  overflow: hidden;
  margin-top: 1rem;
  background: var(--bg-card);
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  z-index: 2;
  position: relative;
}

/* Left Sidebar Categories */
.left-sidebar {
  width: 90px;
  background-color: var(--bg-sidebar);
  overflow-y: auto;
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.sidebar-item {
  padding: 0.95rem 0.5rem;
  font-size: 0.8rem;
  color: var(--text-main);
  text-align: center;
  font-weight: 500;
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  word-break: break-all;
}

.sidebar-item.active {
  background-color: var(--bg-card);
  color: var(--primary-green);
  font-weight: 600;
  border-left-color: var(--primary-green);
}

/* Right Food Scrollable Area */
.right-food-list {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  height: 100%;
  padding-bottom: 80px; /* offset for bottom tab bar */
}

.category-section-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #1a202c;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.food-row-item {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  position: relative;
}

.food-image-placeholder {
  width: 75px;
  height: 75px;
  border-radius: 10px;
  background: var(--bg-sidebar);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  flex-shrink: 0;
  border: 1px solid var(--border-color);
}

.food-details {
  flex: 1;
  min-width: 0;
}

.food-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #1a202c;
  margin-bottom: 0.15rem;
}

.food-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0.35rem;
}

.food-creator {
  font-size: 0.65rem;
  color: var(--primary-green);
  background: var(--primary-green-light);
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
  display: inline-block;
}

.green-order-btn {
  background: var(--primary-green);
  color: white;
  border: none;
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.green-order-btn:active {
  transform: scale(0.92);
}

/* Floating Shop Cart Icon (WeChat Style) */
.floating-cart-btn {
  position: fixed;
  bottom: 80px;
  left: 1.25rem;
  width: 50px;
  height: 50px;
  border-radius: 25px;
  background: var(--bg-card);
  box-shadow: 0 4px 15px rgba(0,0,0,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  cursor: pointer;
  z-index: 99;
  border: 1px solid var(--border-color);
  transition: all 0.2s;
}

.floating-cart-btn:active {
  transform: scale(0.92);
}

.cart-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: var(--danger-color);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: 10px;
  min-width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* Custom Bottom WeChat Nav Bar */
.bottom-tab-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 58px;
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -2px 10px rgba(0,0,0,0.02);
}

.tab-bar-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  color: var(--text-muted);
  text-decoration: none;
  cursor: pointer;
  background: transparent;
  border: none;
}

.tab-bar-item.active {
  color: var(--primary-green);
}

.tab-icon {
  font-size: 1.3rem;
}

.tab-label {
  font-size: 0.65rem;
  font-weight: 600;
}

/* Modals Modern WeChat Layout */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1.25rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  width: 100%;
  max-width: 380px;
  background: var(--bg-card);
  border-radius: 16px;
  padding: 1.25rem;
  transform: scale(0.9);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.modal.active .modal-content {
  transform: scale(1);
}

.modal-header h2 {
  font-size: 1.1rem;
  font-weight: 700;
}

/* Form Styles */
.form-group label {
  font-size: 0.8rem;
  color: var(--text-main);
  margin-bottom: 0.25rem;
  display: block;
}

.form-group input, .form-group select, .form-group textarea {
  background: #f7f8f9;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.65rem;
  font-size: 0.9rem;
  color: var(--text-main);
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--primary-green);
  outline: none;
  background: var(--bg-card);
}

.submit-btn {
  background: var(--primary-green);
  color: white;
  border-radius: 20px;
  padding: 0.65rem;
  font-size: 0.85rem;
  font-weight: 700;
}

.submit-btn:hover {
  background: var(--primary-green-hover);
}

.category-btn {
  background: #f7f8f9;
  border: 1px solid #e2e8f0;
  color: var(--text-main);
  cursor: pointer;
  outline: none;
  font-weight: 500;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}

.category-btn:hover {
  background: #edf2f7;
}

.category-btn.active {
  background: var(--primary-green-light) !important;
  color: var(--primary-green) !important;
  border-color: var(--primary-green) !important;
  font-weight: 700 !important;
}

.category-btn:active {
  transform: scale(0.95);
}

/* Kitchen Orders Card View (Image 3 & 4) */
.kitchen-page-container {
  padding: 1rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex: 1;
  overflow-y: auto;
  padding-bottom: 80px;
}

.kitchen-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.kitchen-order-card {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 1.1rem;
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.k-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
}

.k-customer-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.k-customer-avatar {
  width: 32px;
  height: 32px;
  border-radius: 16px;
  background: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.k-customer-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: #1a202c;
}

.k-dish-count {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.k-card-content {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.k-dish-preview {
  width: 54px;
  height: 54px;
  border-radius: 8px;
  background: var(--bg-sidebar);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  border: 1px solid var(--border-color);
}

.k-dish-details {
  flex: 1;
}

.k-dish-title {
  font-size: 0.9rem;
  font-weight: 600;
}

.k-dish-notes {
  font-size: 0.75rem;
  color: var(--danger-color);
  margin-top: 0.15rem;
}

.k-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.25rem;
}

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

.k-actions {
  display: flex;
  gap: 0.5rem;
}

.k-btn {
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-main);
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.k-btn.success {
  background: var(--primary-green-light);
  color: var(--primary-green);
  border-color: var(--primary-green-light);
}

.k-btn.danger {
  background: #fff5f5;
  color: var(--danger-color);
  border-color: #fff5f5;
}

.k-btn:active {
  transform: scale(0.94);
}

/* Kanban Mobile Tab Switcher Layout */
.admin-mobile-tabs {
  display: flex;
  background: #ffffff;
  border-radius: 12px;
  padding: 0.25rem;
  box-shadow: var(--card-shadow);
  border: 1px solid var(--border-color);
}

.admin-tab-btn {
  flex: 1;
  border: none;
  background: transparent;
  padding: 0.55rem 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s;
  text-align: center;
  outline: none;
}

.admin-tab-btn.active {
  background: var(--primary-green-light) !important;
  color: var(--primary-green) !important;
  font-weight: 700;
}

/* Kanban Columns Visibility Control */
.kanban-column {
  display: none !important; /* Hide non-active tabs by default */
  flex-direction: column;
  gap: 0.75rem;
}

.kanban-column.active-column {
  display: flex !important; /* Only active tab gets flex display */
}
