/* SnackToken POS - Modern Dark Theme with Quick PIN & Auth */
:root {
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --success: #10b981;
  --success-dark: #059669;
  --upi: #6366f1;
  --danger: #ef4444;
  --warning: #f59e0b;
  --bg-dark: #0f172a;
  --bg-card: #1e293b;
  --bg-card-hover: #334155;
  --border: #334155;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --radius: 12px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
header.app-header {
  background: #111827;
  border-bottom: 1px solid var(--border);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  gap: 10px;
}

.brand-area {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  font-size: 24px;
  background: #1f2937;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid #374151;
}

.brand-info h1 {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

.brand-info p {
  font-size: 11px;
  color: var(--text-muted);
}

.nav-links {
  display: flex;
  gap: 8px;
  align-items: center;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 8px;
  background: #1f2937;
  color: #e5e7eb;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid #374151;
  transition: all 0.15s ease;
  cursor: pointer;
}

.nav-btn:hover, .nav-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.user-badge-header {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #1e293b;
  border: 1px solid #334155;
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 12px;
}

.user-name-txt { font-weight: 700; color: #38bdf8; }
.user-role-txt { font-size: 10px; background: #374151; padding: 2px 6px; border-radius: 10px; color: #cbd5e1; }

.mobile-connect-btn {
  background: #065f46;
  border: 1px solid #10b981;
  color: #a7f3d0;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}

.shift-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #1e293b;
  border: 1px solid #334155;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
}

.shift-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.shift-label { color: var(--text-muted); }
.shift-val { font-weight: 700; color: #34d399; }
.shift-val.upi { color: #818cf8; }

/* POS Layout */
.pos-container {
  display: grid;
  grid-template-columns: 1fr 380px;
  flex: 1;
  height: calc(100vh - 65px);
  overflow: hidden;
}

.catalog-section {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.catalog-header {
  padding: 12px 16px;
  background: #131d31;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 10px;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 10;
}

.category-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  flex: 1;
  -webkit-overflow-scrolling: touch;
}

.cat-tab {
  padding: 8px 14px;
  border-radius: 8px;
  background: #1e293b;
  border: 1px solid #334155;
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: 0.15s;
}

.cat-tab.active, .cat-tab:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.items-grid {
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
  flex: 1;
}

.item-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  transition: transform 0.1s ease, border-color 0.15s ease, background 0.15s ease;
  user-select: none;
  touch-action: manipulation;
}

.item-card:hover {
  transform: translateY(-2px);
  border-color: #6366f1;
  background: var(--bg-card-hover);
}

.item-card:active {
  transform: scale(0.96);
  background: #334155;
}

.item-icon {
  font-size: 38px;
  margin-bottom: 8px;
}

.item-name {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #f1f5f9;
  line-height: 1.3;
}

.item-price {
  font-size: 17px;
  font-weight: 800;
  color: #34d399;
  margin-top: auto;
}

.empty-catalog-box {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 50px 20px;
  text-align: center;
  color: var(--text-muted);
  gap: 10px;
}

.empty-catalog-box h3 { color: #fff; font-size: 18px; }
.empty-catalog-box a {
  display: inline-block;
  margin-top: 8px;
  background: var(--primary);
  color: #fff;
  padding: 10px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
}

/* Cart Panel (Always Visible Directly) */
.cart-section {
  display: flex;
  flex-direction: column;
  background: #111827;
  overflow: hidden;
  border-left: 1px solid var(--border);
}

.cart-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-title {
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.clear-cart-btn {
  background: transparent;
  border: 1px solid #4b5563;
  color: #9ca3af;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
}

.clear-cart-btn:hover {
  background: #374151;
  color: #f87171;
}

.cart-items-list {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  -webkit-overflow-scrolling: touch;
}

.cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-muted);
  gap: 8px;
  padding: 30px 0;
}

.cart-item-row {
  background: #1f2937;
  border: 1px solid #374151;
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cart-item-info { flex: 1; }
.cart-item-name { font-size: 14px; font-weight: 600; }
.cart-item-rate { font-size: 12px; color: var(--text-muted); }

.cart-item-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.qty-btn {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  background: #374151;
  border: none;
  color: #fff;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
}

.qty-btn:active { background: #4b5563; }
.qty-val { font-size: 14px; font-weight: 700; width: 20px; text-align: center; }
.cart-item-total { font-size: 15px; font-weight: 700; color: #34d399; width: 65px; text-align: right; }

.cart-footer {
  padding: 14px 16px;
  background: #131d31;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.total-label { font-size: 15px; color: #cbd5e1; }
.total-amount { font-size: 24px; font-weight: 800; color: #10b981; }

.payment-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.pay-btn {
  padding: 12px 8px;
  border-radius: 10px;
  border: none;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  touch-action: manipulation;
}

.pay-btn.cash { background: linear-gradient(135deg, #10b981, #059669); }
.pay-btn.cash:active { background: #047857; }
.pay-btn.upi { background: linear-gradient(135deg, #6366f1, #4f46e5); }
.pay-btn.upi:active { background: #4338ca; }
.pay-btn.split { grid-column: span 2; background: #374151; padding: 10px; font-size: 13px; }
.pay-btn span.hotkey { font-size: 10px; opacity: 0.8; font-weight: normal; }

/* Mobile Bottom Nav */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #111827;
  border-top: 1px solid var(--border);
  height: 54px;
  z-index: 95;
  justify-content: space-around;
  align-items: center;
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 11px;
  gap: 3px;
  font-weight: 600;
}

.mobile-nav-item.active { color: #38bdf8; }
.mobile-nav-icon { font-size: 18px; }

/* Action Buttons & Badges */
.action-btn {
  padding: 10px 16px;
  border-radius: 8px;
  border: none;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
}

.action-btn.prep { background: #f59e0b; color: #000; }
.action-btn.ready { background: #10b981; color: #fff; }
.action-btn.danger { background: #ef4444; color: #fff; }

.action-btn-sm {
  padding: 5px 10px;
  border-radius: 6px;
  border: none;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.action-btn-sm.edit { background: #3b82f6; color: #fff; }
.action-btn-sm.delete { background: #7f1d1d; color: #fca5a5; }
.action-btn-sm.approve { background: #059669; color: #fff; }

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 16px;
}

.modal-backdrop.active { display: flex; }

.modal-box {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 16px;
  width: 100%;
  max-width: 460px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 20px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 { font-size: 17px; font-weight: 700; }
.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  cursor: pointer;
}

/* Quick PIN Keypad */
.pin-pad-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 10px;
}

.pin-key {
  background: #0f172a;
  border: 1px solid #334155;
  color: #fff;
  font-size: 24px;
  font-weight: 700;
  padding: 14px;
  border-radius: 12px;
  cursor: pointer;
  text-align: center;
  user-select: none;
}

.pin-key:active { background: #4f46e5; border-color: #4f46e5; }
.pin-key.action { font-size: 16px; font-weight: bold; background: #1f2937; }

.qr-code-box {
  background: #fff;
  padding: 16px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: 0 auto;
}

.qr-code-box img { width: 180px; height: 180px; }
.qr-amount { color: #0f172a; font-weight: 800; font-size: 20px; }

/* Reports Dashboard */
.reports-container {
  padding: 16px;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.metrics-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.metric-card {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.metric-title { font-size: 12px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; }
.metric-number { font-size: 24px; font-weight: 800; color: #fff; }
.metric-number.cash { color: #34d399; }
.metric-number.upi { color: #818cf8; }
.metric-number.total { color: #f59e0b; }

.report-section-card {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 20px;
}

.report-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid #334155;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.data-table th { padding: 8px 10px; color: var(--text-muted); font-size: 12px; border-bottom: 1px solid #334155; }
.data-table td { padding: 10px; border-bottom: 1px solid #293548; font-size: 13px; }

/* Status Badges */
.status-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: bold;
  text-transform: uppercase;
}

.status-badge.pending { background: #78350f; color: #fde68a; }
.status-badge.approved { background: #064e3b; color: #a7f3d0; }
.status-badge.rejected { background: #7f1d1d; color: #fca5a5; }

/* Emoji Selection Buttons */
.emoji-picker-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.emoji-btn {
  font-size: 20px;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 6px;
  padding: 4px 8px;
  cursor: pointer;
}

.emoji-btn:hover {
  border-color: #6366f1;
  background: #334155;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .shift-pill { display: none; }
  
  .pos-container {
    display: flex;
    flex-direction: column;
    height: auto;
    overflow: visible;
    padding-bottom: 70px;
  }

  .catalog-section {
    border-right: none;
    overflow: visible;
  }

  .items-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 12px;
  }

  .item-card { padding: 12px 8px; }
  
  .cart-section {
    border-left: none;
    border-top: 2px solid var(--border);
    margin-top: 10px;
    background: #111827;
  }

  .mobile-bottom-nav { display: flex; }
}

/* Thermal Printer */
@media print {
  body { background: #fff !important; color: #000 !important; }
  header, .nav-links, .catalog-section, .cart-section, .no-print, .mobile-bottom-nav, .modal-backdrop {
    display: none !important;
  }
}




/* v:1787953207 */