/* Crust & Chilly POS - Modern Premium Stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
  /* Color Palette (Mockup Light Theme - Pure Orange & Slate Gray) */
  --bg-darkest: #f4f5f8;
  /* Neutral light grey backdrop */
  --bg-darker: #ffffff;
  /* Sidebar & header background */
  --bg-dark: #eaecef;
  /* Secondary container bg */
  --bg-card: #ffffff;
  /* Pure white cards */
  --border-color: rgba(0, 0, 0, 0.08);
  /* Soft grey border */
  --border-color-hover: rgba(255, 92, 0, 0.35);

  --primary-gradient: linear-gradient(135deg, #ff5c00 0%, #ff5c00 100%);
  --primary-glow: rgba(255, 92, 0, 0.12);

  --text-main: #3c4048;
  /* Dark charcoal body text */
  --text-muted: #72767d;
  /* Slate grey metadata text */
  --text-dark: #1e2022;
  /* Jet black headers */

  /* Status Colors */
  --color-pending: #ffb300;
  --color-preparing: #00b0ff;
  --color-ready: #00e676;
  --color-completed: #0091ea;
  --color-cancelled: #8d949e;

  /* Layout Settings */
  --sidebar-width: 260px;
  --header-height: 70px;
  --border-radius-lg: 12px;
  --border-radius-md: 8px;
  --border-radius-sm: 6px;
  --transition-smooth: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Global Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 75, 43, 0.2) transparent;
}

body {
  font-family: 'Outfit', 'Plus Jakarta Sans', sans-serif;
  background-color: var(--bg-darkest);
  background-image:
    radial-gradient(at 0% 0%, rgba(255, 75, 43, 0.015) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(255, 128, 8, 0.015) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(255, 75, 43, 0.01) 0px, transparent 50%);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  display: flex;
}

/* App Container Layout */
#app-container {
  display: flex;
  width: 100vw;
  height: 100vh;
  position: relative;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 75, 43, 0.2);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 75, 43, 0.4);
}

/* Glassmorphism Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background-color: #111d2c; /* Dark slate blue matching the screenshot */
  border-right: 1px solid rgba(255,255,255,0.06);
  display: flex;
  flex-direction: column;
  height: 100%;
  z-index: 100;
  flex-shrink: 0;
}

.brand-section {
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border-color);
}

.brand-logo {
  font-size: 24px;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-title {
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.5px;
  color: var(--text-dark);
}

.nav-menu {
  list-style: none;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-grow: 1;
  overflow-y: auto;
}

.nav-item a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  color: #8da2bb; /* Light slate blue matching the screenshot */
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  border-radius: var(--border-radius-md);
  transition: var(--transition-smooth);
  border: 1px solid transparent;
}

.nav-item a i {
  font-size: 18px;
  width: 20px;
  text-align: center;
}

.nav-item a:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.04);
}

.nav-item.active a {
  color: #fff;
  background: #ff5c00; /* Flat bright orange matching active pos selection */
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(255, 92, 0, 0.2);
  font-weight: 600;
}

.user-profile-section {
  padding: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
}

.user-details {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.user-name {
  font-size: 14px;
  font-weight: 600;
  color: #ffffff; /* White text for dark sidebar */
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.user-role {
  font-size: 11px;
  color: #8da2bb; /* Light slate text */
  text-transform: capitalize;
}

.btn-logout {
  background: transparent;
  border: none;
  color: #8da2bb;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--border-radius-sm);
  transition: var(--transition-smooth);
}

.btn-logout:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

/* Main Content Workspace */
.main-workspace {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

/* Header Section */
.top-header {
  height: var(--header-height);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 30px;
  background-color: var(--bg-darker);
  z-index: 90;
  flex-shrink: 0;
}

.header-title-area h2 {
  font-size: 20px;
  font-weight: 700;
}

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

.date-time-widget {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 500;
}

.alert-badge-container {
  position: relative;
  cursor: pointer;
}

.low-stock-alert-pill {
  background: rgba(255, 75, 43, 0.15);
  border: 1px solid #ff4b2b;
  color: #ff4b2b;
  padding: 6px 12px;
  border-radius: var(--border-radius-lg);
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  animation: pulse 2s infinite;
}

/* View Container - Dynamic Mounting */
.view-viewport {
  flex-grow: 1;
  overflow-y: auto;
  padding: 24px 30px;
  position: relative;
}

/* Core Visual Cards - Premium Glassmorphism */
.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 20px;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 20px rgba(180, 160, 140, 0.05), 0 2px 8px rgba(0, 0, 0, 0.015);
}

.glass-card:hover {
  border-color: var(--border-color-hover);
  box-shadow: 0 10px 30px rgba(255, 75, 43, 0.08), 0 4px 12px rgba(180, 160, 140, 0.03);
  transform: translateY(-2px);
}

/* Dashboard Component Styles */
.dashboard-grid-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.stat-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stat-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stat-label {
  font-size: 13px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-dark);
}

.stat-change {
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

.stat-change.up {
  color: #00e676;
}

.stat-change.down {
  color: #ff4b2b;
}

.stat-icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: var(--border-radius-md);
  background: var(--bg-darkest);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #ff5c00;
}

.dashboard-charts-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

@media (max-width: 1024px) {
  .dashboard-charts-row {
    grid-template-columns: 1fr;
  }
}

.chart-card h3 {
  font-size: 16px;
  margin-bottom: 18px;
  font-weight: 600;
}

.chart-container {
  position: relative;
  height: 260px;
  width: 100%;
}

.dashboard-details-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

@media (max-width: 900px) {
  .dashboard-details-row {
    grid-template-columns: 1fr;
  }
}

/* POS Screen Styles */
.pos-layout {
  display: flex;
  flex-direction: column;
  height: 100vh;
  margin: 0;
  overflow: hidden;
  background: var(--bg-darkest);
}

.view-viewport:has(.pos-layout) {
  padding: 0 !important;
  overflow: hidden !important;
}

.pos-custom-header {
  height: 68px;
  background: var(--bg-darker);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 30px;
  flex-shrink: 0;
  box-sizing: border-box;
}

.pos-header-btn {
  background: #ffffff;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  height: 40px;
  padding: 0 18px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition-smooth);
  outline: none;
  box-sizing: border-box;
}

.pos-header-btn.active {
  background: #ff5c00 !important;
  color: #ffffff !important;
  border-color: #ff5c00 !important;
  box-shadow: 0 2px 8px rgba(255, 92, 0, 0.15);
}

.pos-header-btn:hover:not(.active) {
  background: var(--bg-dark);
}

.pos-search-input {
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0 110px 0 38px;
  height: 40px;
  font-size: 13px;
  color: var(--text-dark);
  outline: none;
  width: 100%;
  box-sizing: border-box;
  transition: var(--transition-smooth);
}

.pos-search-input:focus {
  border-color: #ff5c00;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(255, 92, 0, 0.1);
}

.pos-main-content {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 20px;
  flex-grow: 1;
  overflow: hidden;
  padding: 16px 30px;
}

@media (max-width: 1200px) {
  .pos-main-content {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }
}

.pos-footer-bar {
  height: 36px;
  background: var(--bg-darker);
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 30px;
  font-size: 11px;
  font-weight: 500;
  flex-shrink: 0;
}

.pos-products-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100%;
  overflow: hidden;
}

.pos-search-filter-row {
  display: flex;
  gap: 12px;
}

.search-bar-input {
  flex-grow: 1;
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  padding: 12px 16px;
  border-radius: var(--border-radius-md);
  color: var(--text-main);
  outline: none;
  font-family: inherit;
  font-size: 14px;
  transition: var(--transition-smooth);
}

.search-bar-input:focus {
  border-color: #ff4b2b;
  box-shadow: 0 0 10px rgba(255, 75, 43, 0.15);
}

.pos-categories-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  flex-shrink: 0;
}

.category-tab {
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  padding: 10px 18px;
  border-radius: var(--border-radius-md);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  gap: 8px;
}

.category-tab:hover {
  color: var(--text-main);
  border-color: var(--border-color);
}

.category-tab.active {
  background: var(--primary-gradient);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 10px var(--primary-glow);
}

.pos-products-grid-scroll {
  flex-grow: 1;
  overflow-y: auto;
  padding-right: 4px;
}

.pos-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

.product-card {
  background: var(--bg-darker);
  border: 1px solid var(--border-color);
  border-left: 3px solid #ff5c00; /* Orange left border accent from mockup */
  border-radius: var(--border-radius-md);
  padding: 14px;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 115px;
  position: relative;
}

.product-card:hover {
  border-color: var(--border-color-hover);
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(255, 75, 43, 0.08), 0 4px 12px rgba(180, 160, 140, 0.03);
}

.product-card.out-of-stock {
  opacity: 0.5;
  cursor: not-allowed;
}

.product-card.out-of-stock:hover {
  border-color: var(--border-color);
  transform: none;
}

.product-bogo-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: #ff5c00;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 6px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  pointer-events: none;
}

/* Prevent product name overlap with BOGO badge */
.product-card.has-bogo .product-name,
.product-card:has(.product-bogo-badge) .product-name {
  padding-right: 70px;
}

.product-info-top {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}

.product-name {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
}

.product-price {
  font-size: 16px;
  font-weight: 700;
  color: #ff5c00;
}

.product-stock-indicator {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.product-stock-indicator.low {
  color: #ff9100;
  font-weight: 600;
}

/* Cart Panel Layout */
.pos-cart-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  border-left: 1px solid var(--border-color);
  padding-left: 20px;
  overflow: hidden;
}

@media (max-width: 1200px) {
  .pos-cart-panel {
    border-left: none;
    padding-left: 0;
    margin-top: 20px;
    height: 600px;
  }
}

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

.cart-title {
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cart-item-count-badge {
  background: var(--primary-gradient);
  color: #fff;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 20px;
}

.btn-clear-cart {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-clear-cart:hover {
  color: #ff4b2b;
}

.cart-items-scroll {
  flex-grow: 1;
  overflow-y: auto;
  padding: 12px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cart-item-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  background: var(--bg-darker);
  padding: 10px 12px;
  border-radius: var(--border-radius-md);
  border: 1px solid var(--border-color);
}

.cart-item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cart-item-name {
  font-size: 13px;
  font-weight: 600;
}

.cart-item-subtext {
  font-size: 11px;
  color: var(--text-muted);
}

.cart-item-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.quantity-controls {
  display: flex;
  align-items: center;
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  overflow: hidden;
}

.qty-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  width: 24px;
  height: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.qty-btn:hover {
  color: var(--text-main);
  background: var(--border-color);
}

.qty-val {
  font-size: 13px;
  font-weight: 600;
  width: 22px;
  text-align: center;
}

.cart-item-total {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-dark);
  min-width: 50px;
  text-align: right;
}

.btn-remove-item {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-remove-item:hover {
  color: #ff4b2b;
}

.cart-billing-details {
  border-top: 1px solid var(--border-color);
  padding-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
}

.customer-details-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.customer-input {
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  padding: 8px 10px;
  border-radius: var(--border-radius-sm);
  color: var(--text-main);
  outline: none;
  font-size: 12px;
  font-family: inherit;
}

.customer-input:focus {
  border-color: #ff4b2b;
}

.order-settings-row {
  display: flex;
  gap: 8px;
}

.toggle-group {
  display: flex;
  flex-grow: 1;
  background: transparent;
  border: none;
  gap: 8px;
}

.toggle-option {
  flex-grow: 1;
  text-align: center;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-main);
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  transition: var(--transition-smooth);
}

.toggle-option.active {
  background: #ff5c00;
  color: #ffffff;
  border-color: #ff5c00;
}

.billing-summary-lines {
  background: var(--bg-darker);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.billing-line {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-muted);
}

.billing-line.total {
  border-top: 1px solid var(--border-color);
  padding-top: 6px;
  margin-top: 4px;
  font-size: 16px;
  font-weight: 800;
  color: var(--text-dark);
}

.discount-controls {
  display: flex;
  gap: 8px;
}

.checkout-payment-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.payment-btn {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  padding: 10px 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-main);
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.payment-btn i {
  font-size: 14px;
}

.payment-btn.active {
  border-color: #ff5c00;
  background: #ff5c00;
  color: #ffffff;
}

.btn-checkout {
  background: var(--primary-gradient);
  color: #fff;
  border: none;
  padding: 14px;
  border-radius: var(--border-radius-md);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 15px var(--primary-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
}

.btn-checkout:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px var(--primary-glow);
}

/* KDS Kanban board styles */
.kds-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  height: calc(100vh - var(--header-height) - 100px);
  overflow-y: hidden;
}

@media (max-width: 1024px) {
  .kds-board {
    grid-template-columns: 1fr 1fr;
    height: auto;
    overflow-y: visible;
  }
}

@media (max-width: 600px) {
  .kds-board {
    grid-template-columns: 1fr;
  }
}

.kds-column {
  background: var(--bg-darkest);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.kds-column-header {
  padding: 16px;
  background: var(--bg-darker);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  font-size: 15px;
}

.kds-column-header.pending {
  border-top: 4px solid var(--color-pending);
}

.kds-column-header.preparing {
  border-top: 4px solid var(--color-preparing);
}

.kds-column-header.ready {
  border-top: 4px solid var(--color-ready);
}

.kds-column-header.completed {
  border-top: 4px solid var(--color-completed);
}

.kds-order-count {
  background: var(--border-color);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
}

.kds-order-list {
  padding: 12px;
  overflow-y: auto;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.kds-order-card {
  background: var(--bg-card); /* White KDS card background */
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: var(--transition-smooth);
}

/* Dynamic status borders on cards based on parent column state */
.kds-column:has(.kds-column-header.pending) .kds-order-card { border-left: 3px solid var(--color-pending); }
.kds-column:has(.kds-column-header.preparing) .kds-order-card { border-left: 3px solid var(--color-preparing); }
.kds-column:has(.kds-column-header.ready) .kds-order-card { border-left: 3px solid var(--color-ready); }
.kds-column:has(.kds-column-header.completed) .kds-order-card { border-left: 3px solid var(--color-completed); }

.kds-order-card:hover {
  border-color: rgba(255, 75, 43, 0.15);
}

.kds-order-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.kds-order-num {
  font-weight: 700;
  font-size: 14px;
}

.kds-order-time {
  font-size: 11px;
  color: var(--text-muted);
}

.kds-order-type {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--border-color);
}

.kds-order-type.dine-in {
  color: #ff9100;
  background: rgba(255, 145, 0, 0.1);
}

.kds-order-type.takeaway {
  color: #00e676;
  background: rgba(0, 230, 118, 0.1);
}

.kds-order-items {
  list-style: none;
  font-size: 13px;
  border-top: 1px dashed var(--border-color);
  border-bottom: 1px dashed var(--border-color);
  padding: 8px 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.kds-order-item {
  display: flex;
  justify-content: space-between;
  color: var(--text-main);
}

.kds-item-qty {
  font-weight: 700;
  color: #ff5c00;
}

.kds-order-cust {
  font-size: 12px;
  color: var(--text-muted);
}

.kds-btn-advance {
  width: 100%;
  background: #ffffff;
  border: 1px solid #ff5c00;
  color: #ff5c00;
  padding: 8px;
  border-radius: var(--border-radius-sm);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.kds-btn-advance:hover {
  background: #ff5c00;
  color: #ffffff;
  border-color: #ff5c00;
}

/* Forms & Tables styling globally */
.form-group {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.form-input,
.form-select,
.form-textarea {
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 10px 14px;
  color: var(--text-main);
  outline: none;
  font-family: inherit;
  font-size: 14px;
  transition: var(--transition-smooth);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: #ff4b2b;
}

.btn {
  padding: 10px 20px;
  border-radius: var(--border-radius-md);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
}

.btn-primary {
  background: var(--primary-gradient);
  color: #fff;
  box-shadow: 0 4px 10px var(--primary-glow);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 15px var(--primary-glow);
}

.btn-secondary {
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

.btn-secondary:hover {
  background: var(--border-color);
  border-color: var(--border-color);
}

.btn-danger {
  background: rgba(255, 75, 43, 0.1);
  border: 1px solid #ff4b2b;
  color: #ff4b2b;
}

.btn-danger:hover {
  background: #ff4b2b;
  color: #fff;
}

/* Premium Table Layout */
.table-container {
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  background: var(--bg-card);
}

.premium-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.premium-table th {
  background: rgba(0, 0, 0, 0.02);
  padding: 14px 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.premium-table td {
  padding: 14px 18px;
  font-size: 14px;
  color: var(--text-main);
  border-bottom: 1px solid var(--border-color);
}

.premium-table tr:last-child td {
  border-bottom: none;
}

.premium-table tr:hover td {
  background: rgba(0, 0, 0, 0.015);
}

/* Status Pill Badge styles */
.badge {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.badge-pending {
  color: var(--color-pending);
  background: rgba(255, 179, 0, 0.15);
  border: 1px solid rgba(255, 179, 0, 0.25);
}

.badge-preparing {
  color: var(--color-preparing);
  background: rgba(41, 121, 255, 0.15);
  border: 1px solid rgba(41, 121, 255, 0.25);
}

.badge-ready {
  color: var(--color-ready);
  background: rgba(0, 230, 118, 0.15);
  border: 1px solid rgba(0, 230, 118, 0.25);
}

.badge-completed {
  color: var(--color-completed);
  background: rgba(0, 176, 255, 0.15);
  border: 1px solid rgba(0, 176, 255, 0.25);
}

.badge-cancelled {
  color: var(--color-cancelled);
  background: rgba(117, 117, 117, 0.15);
  border: 1px solid rgba(117, 117, 117, 0.25);
}

/* Dialog Modal styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-smooth);
}

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

.modal-content {
  background: var(--bg-darker);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  width: 90%;
  max-width: 500px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
  transform: translateY(20px);
  transition: var(--transition-smooth);
}

.modal-overlay.active .modal-content {
  transform: translateY(0);
}

.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  font-size: 16px;
  font-weight: 700;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.modal-close:hover {
  color: #ff4b2b;
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* Bill Invoice Receipt print mockup */
/* Bill Invoice Receipt print mockup */
/* Bill Invoice Receipt print mockup */
.receipt-wrapper {
  background: #fff;
  color: #000;
  padding: 16px 20px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 13px;
  border-radius: 4px;
  line-height: 1.4;
  width: 100%;
  max-width: 320px;
  /* ~80mm standard thermal paper */
  margin: 0 auto;
  box-sizing: border-box;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.05); /* Premium soft shadow on screen */
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.receipt-logo {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 8px auto;
  display: block;
  border: 1px solid #ddd;
}

.receipt-header {
  text-align: center;
  margin-bottom: 12px;
}

.receipt-title {
  font-weight: 800;
  font-size: 18px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.receipt-subtitle {
  font-size: 11px;
  color: #333;
}

.receipt-dotted-line {
  border-top: 1px dashed #000;
  margin: 8px 0;
}

.receipt-meta {
  font-size: 12px;
  line-height: 1.5;
  margin-bottom: 8px;
}

.receipt-meta-row {
  display: flex;
  justify-content: space-between;
}

.receipt-token-no {
  font-size: 15px;
  font-weight: 800;
  margin-top: 4px;
}

.receipt-table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0;
  font-size: 12px;
}

.receipt-table th {
  text-align: left;
  border-bottom: 1px dashed #000;
  padding: 4px 0 6px 0;
  font-weight: 700;
}

.receipt-table td {
  padding: 6px 0;
  vertical-align: top;
}

.receipt-item-name {
  font-weight: 600;
  display: block;
}

.receipt-bogo-label {
  font-size: 10px;
  color: #555;
  font-style: italic;
}

.receipt-totals {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
}

.receipt-total-line {
  display: flex;
  justify-content: space-between;
}

.receipt-grand-total {
  display: flex;
  justify-content: space-between;
  font-size: 15px;
  font-weight: 800;
  border-top: 1px dashed #000;
  border-bottom: 1px dashed #000;
  padding: 6px 0;
  margin: 6px 0;
}

.receipt-footer {
  text-align: center;
  margin-top: 12px;
  font-size: 11px;
}

.receipt-qr-wrapper {
  text-align: center;
  margin: 12px 0 8px 0;
}

.receipt-qr-img {
  width: 110px;
  height: 110px;
  margin: 0 auto 4px auto;
  display: block;
}

.receipt-qr-text {
  font-size: 10px;
  color: #333;
}

/* Authentication Page View Overlay */
.auth-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, var(--bg-dark) 0%, var(--bg-darkest) 100%);
  position: absolute;
  top: 0;
  left: 0;
  z-index: 10000;
  transition: var(--transition-smooth);
}

.auth-card {
  width: 380px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 40px 30px;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.08);
}

.auth-header {
  text-align: center;
  margin-bottom: 30px;
}

.auth-brand-logo {
  font-size: 48px;
  margin-bottom: 10px;
  color: #ff4b2b;
  animation: float 3s ease-in-out infinite;
}

/* Keyframes animations */
@keyframes pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(255, 75, 43, 0.4);
  }

  70% {
    transform: scale(1.02);
    box-shadow: 0 0 0 10px rgba(255, 75, 43, 0);
  }

  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(255, 75, 43, 0);
  }
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-8px);
  }

  100% {
    transform: translateY(0px);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.view-animate {
  animation: fadeIn 0.4s ease-out forwards;
}

/* Utility Flex & Grids classes */
.flex-space {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.flex-gap-sm {
  display: flex;
  gap: 8px;
  align-items: center;
}

.grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.grid-3col {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}

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

.mb-3 {
  margin-bottom: 16px;
}

.mt-3 {
  margin-top: 16px;
}

.w-100 {
  width: 100%;
}

/* Ingredient check recipe detail line */
.recipe-mapping-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.ingredient-stock-pill {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 500;
}

.ingredient-stock-pill.good {
  background: rgba(0, 230, 118, 0.1);
  color: #00e676;
}

.ingredient-stock-pill.danger {
  background: rgba(255, 75, 43, 0.1);
  color: #ff4b2b;
}

/* Toast alert notification container */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 9999;
}

.toast {
  padding: 14px 20px;
  border-radius: var(--border-radius-md);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  animation: slideIn 0.3s ease-out;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.toast.success {
  background: #008744;
}

.toast.error {
  background: #d62d20;
}

.toast.info {
  background: #0057e7;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.kds-timer-container {

  font-size: 12px;
  background: var(--bg-darkest);
  padding: 6px 10px;
  border-radius: var(--border-radius-sm);
  margin-top: 6px;
  border: 1px solid var(--border-color);
}

.kds-timer-countdown {
  font-weight: 800;
  font-family: monospace;
  font-size: 13px;
  color: var(--text-muted);
}

.kds-timer-countdown.warning-blink {
  color: #ff4b2b;
  animation: warning-pulse 1s infinite alternate;
}

.kds-timer-countdown.overdue {
  color: #d62d20;
}

@keyframes warning-pulse {
  0% {
    opacity: 0.4;
    transform: scale(0.97);
  }

  100% {
    opacity: 1;
    transform: scale(1.03);
  }
}



/* Card bottom add button */
.pos-card-add-btn {
  width: 100%;
  background: #ffffff;
  border: 1px solid var(--border-color);
  color: var(--text-dark);
  padding: 6px;
  border-radius: var(--border-radius-sm);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pos-card-add-btn:hover {
  background: var(--bg-dark);
  border-color: var(--border-color-hover);
}

/* Card bottom active qty control */
.pos-card-qty-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ff5c00;
  border-radius: var(--border-radius-sm);
  overflow: hidden;
  height: 28px;
  width: 100%;
  border: 1px solid #ff5c00;
}

.pos-card-qty-btn {
  background: transparent;
  border: none;
  color: #ffffff;
  width: 28px;
  height: 100%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.pos-card-qty-btn:hover {
  background: rgba(255, 255, 255, 0.18);
}

.pos-card-qty-val {
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
}