/**
 * Chong Qing Hotpot ERP - Custom Styles
 * Color Theme based on https://hotpot.co.id/
 */

/* ============================================
   CSS VARIABLES - COLOR THEME
   ============================================ */
:root {
  /* Primary Colors */
  --primary-red: #c52d22;
  --primary-red-dark: #a82419;
  --primary-red-light: #e04035;

  /* Gold/Bronze Accent */
  --gold: #b28e30;
  --gold-dark: #8f7226;
  --gold-light: #d4a83a;

  /* Neutral Colors */
  --dark: #1a1a1a;
  --dark-gray: #333333;
  --gray: #666666;
  --light-gray: #e0e0e0;
  --lighter-gray: #f5f5f5;
  --white: #ffffff;

  /* Semantic Colors */
  --success: #28a745;
  --success-light: #d4edda;
  --warning: #ffc107;
  --warning-light: #fff3cd;
  --danger: #dc3545;
  --danger-light: #f8d7da;
  --info: #17a2b8;
  --info-light: #d1ecf1;

  /* Status Colors */
  --status-available: #28a745;
  --status-occupied: #dc3545;
  --status-reserved: #007bff;
  --status-cleaning: #ffc107;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.12);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.15);

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  /* Transitions */
  --transition: all 0.3s ease;
}

/* ============================================
   GLOBAL STYLES
   ============================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--dark);
  background-color: var(--lighter-gray);
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 0.5rem;
}

h1 { font-size: 1.75rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.875rem; }

a {
  color: var(--primary-red);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-red-dark);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn-primary {
  background-color: var(--primary-red);
  border-color: var(--primary-red);
  color: var(--white);
}

.btn-primary:hover, .btn-primary:focus {
  background-color: var(--primary-red-dark);
  border-color: var(--primary-red-dark);
}

.btn-gold {
  background-color: var(--gold);
  border-color: var(--gold);
  color: var(--white);
}

.btn-gold:hover, .btn-gold:focus {
  background-color: var(--gold-dark);
  border-color: var(--gold-dark);
  color: var(--white);
}

.btn-outline-primary {
  color: var(--primary-red);
  border-color: var(--primary-red);
}

.btn-outline-primary:hover {
  background-color: var(--primary-red);
  border-color: var(--primary-red);
  color: var(--white);
}

.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
}

/* ============================================
   CARDS
   ============================================ */
.card {
  border: none;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

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

.card-header {
  background-color: var(--white);
  border-bottom: 1px solid var(--light-gray);
  padding: 1rem 1.25rem;
  font-weight: 600;
}

.card-body {
  padding: 1.25rem;
}

/* ============================================
   NAVBAR
   ============================================ */
.navbar-brand-erp {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.navbar-brand-erp img {
  height: 40px;
}

.navbar-erp {
  background-color: var(--dark);
  padding: 0.5rem 1rem;
}

.navbar-erp .nav-link {
  color: rgba(255,255,255,0.85);
  padding: 0.5rem 1rem;
  transition: var(--transition);
}

.navbar-erp .nav-link:hover,
.navbar-erp .nav-link.active {
  color: var(--gold);
}

.navbar-erp .navbar-brand {
  color: var(--white);
  font-weight: 700;
  font-size: 1.25rem;
}

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
  background-color: var(--dark);
  height: 100vh;
  width: 250px;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 1000;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.sidebar-header {
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.sidebar-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  flex-shrink: 0;
}

.sidebar-brand {
  color: var(--white);
  font-weight: 700;
  font-size: 1.1rem;
  white-space: nowrap;
}

.navbar-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.sidebar-nav {
  padding: 0.25rem 0;
  padding-bottom: 1rem;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-nav::-webkit-scrollbar {
  width: 4px;
}

.sidebar-nav::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.2);
  border-radius: 2px;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.3);
}

.sidebar-nav .nav-section {
  margin-bottom: 0.25rem;
}

.sidebar-nav .nav-section-title {
  display: block;
  padding: 0.5rem 1.25rem 0.25rem;
  color: var(--gold);
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sidebar-nav .nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.45rem 1.25rem;
  color: rgba(255,255,255,0.7);
  transition: var(--transition);
  border-left: 3px solid transparent;
  font-size: 0.85rem;
}

.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-link.active {
  color: var(--white);
  background-color: rgba(255,255,255,0.08);
  border-left-color: var(--gold);
}

.sidebar-nav .nav-link i {
  width: 20px;
  text-align: center;
  font-size: 1rem;
}

.sidebar-menu {
  list-style: none;
  padding: 0.5rem 0;
  margin: 0;
}

.sidebar-menu li a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  color: rgba(255,255,255,0.7);
  transition: var(--transition);
  border-left: 3px solid transparent;
}

.sidebar-menu li a:hover,
.sidebar-menu li a.active {
  color: var(--white);
  background-color: rgba(255,255,255,0.05);
  border-left-color: var(--gold);
}

.sidebar-menu li a i {
  width: 20px;
  text-align: center;
}

.sidebar-menu .menu-header {
  padding: 1rem 1.25rem 0.5rem;
  color: var(--gold);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.main-content {
  margin-left: 250px;
  min-height: 100vh;
  background-color: var(--lighter-gray);
}

.main-content > .navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 65px;
  padding-top: 0;
  padding-bottom: 0;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(0,0,0,0.1);
}

.main-content > .navbar h5 {
  margin-bottom: 0;
  line-height: 1.4;
}

.main-content > .navbar .form-select-sm {
  height: 32px;
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
}

.main-content > .navbar .btn {
  padding-top: 0.375rem;
  padding-bottom: 0.375rem;
}

.main-content > .navbar .dropdown .badge {
  font-size: 0.6rem;
  padding: 0.15rem 0.35rem;
}

.main-content > .navbar .position-relative > .badge {
  top: 5px !important;
  transform: translateX(-50%) !important;
}

.content-wrapper {
  padding: 1.5rem;
}

/* ============================================
   STATS CARDS
   ============================================ */
.stat-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.stat-card .stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--white);
}

.stat-card .stat-icon.bg-primary { background-color: var(--primary-red); }
.stat-card .stat-icon.bg-gold { background-color: var(--gold); }
.stat-card .stat-icon.bg-success { background-color: var(--success); }
.stat-card .stat-icon.bg-info { background-color: var(--info); }

.stat-card .stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--dark);
}

.stat-card .stat-label {
  color: var(--gray);
  font-size: 0.875rem;
}

.stat-card .stat-change {
  font-size: 0.875rem;
}

.stat-card .stat-change.positive { color: var(--success); }
.stat-card .stat-change.negative { color: var(--danger); }

/* ============================================
   POS SPECIFIC STYLES
   ============================================ */

/* POS Container Layout */
.pos-container {
  display: flex;
  height: calc(100vh - 56px - 60px); /* minus navbar and footer */
  overflow: hidden;
}

.pos-navbar {
  padding: 0.5rem 1rem;
}

.pos-navbar .navbar-brand {
  font-weight: 600;
  font-size: 1.1rem;
}

.pos-layout {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* Menu Panel - Updated */
.pos-menu-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  overflow: hidden;
  min-height: 0; /* Critical for nested flex scroll */
}

/* Category Tabs - Modern Horizontal Scroll */
.pos-category-tabs {
  display: flex;
  gap: 0.5rem;
  padding: 1rem 1rem 0.75rem;
  background: var(--white);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

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

.category-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 0.75rem 1.25rem;
  background: var(--lighter-gray);
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
  min-width: 80px;
  font-size: 0.8rem;
  color: var(--gray);
}

.category-tab i {
  font-size: 1.25rem;
  transition: transform 0.25s ease;
}

.tab-emoji {
  font-size: 1.5rem;
  line-height: 1;
  transition: transform 0.25s ease;
}

.category-tab:hover {
  background: rgba(197, 45, 34, 0.08);
  color: var(--primary-red);
  transform: translateY(-2px);
}

.category-tab:hover i,
.category-tab:hover .tab-emoji {
  transform: scale(1.1);
}

.category-tab.active {
  background: linear-gradient(135deg, var(--primary-red) 0%, var(--primary-red-dark) 100%);
  color: var(--white);
  box-shadow: 0 4px 15px rgba(197, 45, 34, 0.3);
}

.category-tab.active i,
.category-tab.active .tab-emoji {
  transform: scale(1.15);
}

/* Search Bar */
.pos-search {
  padding: 0.75rem 1rem;
  background: var(--white);
}

.pos-search .input-group {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.pos-search .input-group-text {
  background: var(--white);
  border: 1px solid var(--light-gray);
  border-right: none;
  color: var(--gray);
}

.pos-search .form-control {
  border: 1px solid var(--light-gray);
  border-left: none;
  border-right: none;
  font-size: 0.9rem;
}

.pos-search .form-control:focus {
  box-shadow: none;
  border-color: var(--light-gray);
}

.pos-search .btn {
  border: 1px solid var(--light-gray);
  border-left: none;
  background: var(--white);
}

/* Menu Grid */
.pos-menu-grid {
  flex: 1;
  padding: 1rem;
  padding-bottom: 2rem;
  overflow-y: auto;
  overflow-x: hidden;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
  grid-auto-rows: min-content; /* Prevent row stretching */
  gap: 1rem;
  align-content: start;
  align-items: start; /* Prevent item stretching */
  min-height: 0; /* Critical for proper scroll behavior */
}

.pos-menu-grid::-webkit-scrollbar {
  width: 6px;
}

.pos-menu-grid::-webkit-scrollbar-track {
  background: transparent;
}

.pos-menu-grid::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.15);
  border-radius: 3px;
}

/* Menu Item Card - Modern Design */
.menu-item {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1rem 0.75rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid transparent;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 140px;
}

.menu-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-red), var(--gold));
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.menu-item:hover {
  border-color: var(--primary-red);
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(197, 45, 34, 0.15);
}

.menu-item:hover::before {
  transform: scaleX(1);
}

.menu-item:active {
  transform: translateY(-2px) scale(0.98);
}

.menu-item.unavailable {
  opacity: 0.5;
  cursor: not-allowed;
}

.menu-item.unavailable:hover {
  transform: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  border-color: transparent;
}

.menu-item-image {
  width: 56px;
  height: 56px;
  margin-bottom: 0.75rem;
  background: var(--lighter-gray);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  position: relative;
  flex-shrink: 0;
}

.menu-emoji {
  font-size: 2rem;
  line-height: 1;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,0.1));
  display: flex;
  align-items: center;
  justify-content: center;
}

.menu-item-image .spicy-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--danger);
  color: white;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
}

.menu-item-name {
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 0.35rem;
  color: var(--dark);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.menu-item-price {
  color: var(--primary-red);
  font-weight: 700;
  font-size: 0.9rem;
}

.unavailable-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,0.7);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
}

.menu-item-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 0.75rem;
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid transparent;
  text-align: center;
}

.menu-item-card:hover {
  border-color: var(--primary-red);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.menu-item-card .item-name {
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
}

.menu-item-card .item-price {
  color: var(--primary-red);
  font-weight: 700;
}

/* Order Panel - Premium Look */
.pos-order-panel {
  width: 400px;
  background: var(--white);
  border-left: 1px solid rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 20px rgba(0,0,0,0.05);
}

.pos-header {
  background: var(--dark);
  color: var(--white);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pos-header .brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pos-header .brand img {
  height: 32px;
}

.pos-categories {
  background: var(--white);
  padding: 0.75rem;
  border-bottom: 1px solid var(--light-gray);
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.pos-categories .category-btn {
  padding: 0.5rem 1rem;
  border: 1px solid var(--light-gray);
  border-radius: var(--radius-md);
  background: var(--white);
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.875rem;
}

.pos-categories .category-btn:hover,
.pos-categories .category-btn.active {
  background: var(--primary-red);
  color: var(--white);
  border-color: var(--primary-red);
}

/* Order Header */
.order-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  background: linear-gradient(135deg, #fafafa 0%, #f5f5f5 100%);
}

.order-header h5 {
  font-size: 1rem;
  color: var(--dark);
}

.order-header .table-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.order-header .table-badge {
  background: var(--primary-red);
  color: var(--white);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.order-header .btn-outline-secondary,
.order-header .btn-outline-danger {
  border-radius: var(--radius-md);
  padding: 0.375rem 0.5rem;
}

/* Order Items */
.order-items {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem;
  background: var(--white);
}

.order-items::-webkit-scrollbar {
  width: 4px;
}

.order-items::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.1);
  border-radius: 2px;
}

.order-item-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--gray);
}

.order-item-empty i {
  font-size: 3rem;
  opacity: 0.3;
}

.order-item {
  display: flex;
  align-items: flex-start;
  padding: 0.875rem;
  margin-bottom: 0.5rem;
  background: var(--lighter-gray);
  border-radius: var(--radius-md);
  gap: 0.75rem;
  transition: all 0.2s ease;
}

.order-item:hover {
  background: #f0f0f0;
}

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

.order-item-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--dark);
  margin-bottom: 0.25rem;
}

.order-item-price {
  font-size: 0.8rem;
  color: var(--gray);
}

.order-item-total {
  font-weight: 700;
  color: var(--primary-red);
  font-size: 0.9rem;
  white-space: nowrap;
}

.order-item-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.order-item-actions .btn {
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
}

.order-item-actions .qty-display {
  min-width: 24px;
  text-align: center;
  font-weight: 600;
  font-size: 0.9rem;
}

.order-item .qty-controls {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.order-item .qty-btn {
  width: 28px;
  height: 28px;
  border: 1px solid var(--light-gray);
  background: var(--white);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  transition: all 0.2s ease;
}

.order-item .qty-btn:hover {
  background: var(--primary-red);
  color: var(--white);
  border-color: var(--primary-red);
}

.order-item .item-qty {
  text-align: center;
  font-weight: 600;
}

.order-item .item-details {
  flex: 1;
}

.order-item .item-name {
  font-weight: 600;
  font-size: 0.875rem;
}

.order-item .item-modifiers {
  font-size: 0.75rem;
  color: var(--gray);
}

.order-item .item-price {
  font-weight: 600;
  color: var(--primary-red);
}

/* Order Notes */
.order-notes {
  border-top: 1px solid rgba(0,0,0,0.06);
  background: var(--white);
}

.order-notes .form-control {
  border-radius: var(--radius-md);
  background: var(--lighter-gray);
  border: none;
  font-size: 0.85rem;
}

.order-notes .form-control:focus {
  background: var(--white);
  box-shadow: 0 0 0 2px rgba(197, 45, 34, 0.15);
}

/* Order Summary - Premium Styling */
.order-summary {
  padding: 1rem 1.25rem;
  border-top: 1px solid rgba(0,0,0,0.08);
  background: linear-gradient(135deg, #fafafa 0%, #f0f0f0 100%);
}

.order-summary .summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  color: var(--gray);
}

.order-summary .discount-row {
  color: var(--success);
}

.order-summary .total-row {
  font-size: 1.35rem;
  font-weight: 700;
  padding-top: 0.75rem;
  border-top: 2px dashed var(--light-gray);
  margin-top: 0.75rem;
  color: var(--dark);
}

.order-summary .total-row span:last-child {
  color: var(--primary-red);
}

/* Order Actions - Modern Buttons */
.order-actions {
  padding: 1rem;
  background: var(--white);
  border-top: 1px solid rgba(0,0,0,0.06);
}

.order-actions .btn {
  font-weight: 600;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  transition: all 0.25s ease;
}

.order-actions .btn i {
  font-size: 1rem;
}

.order-actions .btn-primary {
  background: linear-gradient(135deg, var(--primary-red) 0%, var(--primary-red-dark) 100%);
  border: none;
  box-shadow: 0 4px 12px rgba(197, 45, 34, 0.25);
}

.order-actions .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(197, 45, 34, 0.35);
}

.order-actions .btn-secondary {
  background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
  border: none;
}

/* POS Footer Navigation - Modern Tab Bar */
.pos-footer-nav {
  display: flex;
  justify-content: space-around;
  align-items: center;
  background: var(--dark);
  padding: 0.5rem 1rem;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
  min-height: 60px;
}

.footer-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.5rem 1rem;
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  font-size: 0.7rem;
  font-weight: 500;
  transition: all 0.25s ease;
  border-radius: var(--radius-md);
  position: relative;
  min-width: 60px;
}

.footer-nav-item i {
  font-size: 1.25rem;
  line-height: 1;
  transition: transform 0.25s ease;
}

.footer-nav-item span {
  display: block;
  white-space: nowrap;
}

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

.footer-nav-item:hover i {
  transform: scale(1.1);
}

.footer-nav-item.active {
  color: var(--gold);
}

.footer-nav-item.active i {
  transform: scale(1.15);
}

.footer-nav-item .badge {
  position: absolute;
  top: 2px;
  right: 8px;
  font-size: 0.6rem;
  padding: 0.15rem 0.4rem;
  border-radius: 10px;
  line-height: 1;
}

/* Table Status Dots */
.table-status-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-right: 0.5rem;
}

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

/* VIP Badge */
.vip-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  color: white;
  font-size: 0.55rem;
  padding: 0.15rem 0.35rem;
  border-radius: 3px;
  font-weight: 700;
}

/* ============================================
   TABLE LAYOUT
   ============================================ */
.table-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 1rem;
  padding: 1rem;
}

.table-item {
  aspect-ratio: 1;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid transparent;
  position: relative;
}

.table-item:hover {
  transform: scale(1.05);
}

.table-item.available {
  background: #d4edda;
  color: var(--success);
}

.table-item.occupied {
  background: #f8d7da;
  color: var(--danger);
}

.table-item.reserved {
  background: #cce5ff;
  color: var(--info);
}

.table-item.cleaning {
  background: #fff3cd;
  color: #856404;
}

.table-item .table-number {
  font-size: 1.25rem;
  font-weight: 700;
}

.table-item .table-capacity {
  font-size: 0.75rem;
}

.table-item .table-timer {
  position: absolute;
  bottom: 5px;
  font-size: 0.7rem;
  font-weight: 600;
}

/* ============================================
   KDS (Kitchen Display System)
   ============================================ */

/* KDS Body - Dark Theme */
.kds-body {
  background: #1a1a1a;
  min-height: 100vh;
  overflow-x: hidden;
}

/* KDS Navbar */
.kds-navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0.5rem 1rem;
  background: #212529 !important;
}

.kds-navbar .navbar-brand {
  font-size: 1.25rem;
  margin-bottom: 0;
}

.kds-navbar .btn-group .btn {
  border-radius: 0;
}

.kds-navbar .btn-group .btn:first-child {
  border-radius: 0.375rem 0 0 0.375rem;
}

.kds-navbar .btn-group .btn:last-child {
  border-radius: 0 0.375rem 0.375rem 0;
}

.kds-navbar .btn-group .btn.active {
  background: var(--primary-red);
  border-color: var(--primary-red);
  color: white;
}

/* KDS Stats Bar */
.kds-stats-bar {
  position: fixed;
  top: 56px;
  left: 0;
  right: 0;
  background: linear-gradient(180deg, #2d2d2d 0%, #252525 100%);
  padding: 0.75rem 0;
  z-index: 999;
  border-bottom: 1px solid #3d3d3d;
}

.kds-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.kds-stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: white;
  line-height: 1.2;
}

.kds-stat-label {
  font-size: 0.7rem;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 0.25rem;
}

/* KDS Container */
.kds-container {
  padding-top: 140px;
  padding-bottom: 1.5rem;
  min-height: 100vh;
}

/* KDS Grid */
.kds-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
  padding: 0 1rem;
}

@media (min-width: 1600px) {
  .kds-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 768px) {
  .kds-grid {
    grid-template-columns: 1fr;
    padding: 0 0.5rem;
  }

  .kds-stats-bar .row {
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  .kds-stat-value {
    font-size: 1.25rem;
  }

  .kds-stat-label {
    font-size: 0.6rem;
  }
}

/* KDS Order Card */
.kds-card {
  background: #2d2d2d;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid #444;
  transition: all 0.2s ease;
  position: relative;
}

.kds-card:hover {
  border-color: #555;
  transform: translateY(-2px);
}

.kds-card.priority-high {
  border-color: var(--primary-red);
  box-shadow: 0 0 20px rgba(197, 45, 34, 0.3);
}

.kds-card.priority-high::before {
  content: 'PRIORITAS';
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: var(--primary-red);
  color: white;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  z-index: 10;
}

.kds-card.delayed {
  animation: kds-pulse 1.5s ease-in-out infinite;
}

@keyframes kds-pulse {
  0%, 100% {
    box-shadow: 0 0 15px rgba(220, 53, 69, 0.3);
    border-color: #dc3545;
  }
  50% {
    box-shadow: 0 0 30px rgba(220, 53, 69, 0.6);
    border-color: #ff4757;
  }
}

@keyframes bumpOut {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  100% {
    transform: scale(0.8) translateY(-20px);
    opacity: 0;
  }
}

/* KDS Card Header */
.kds-card-header {
  background: linear-gradient(180deg, #3d3d3d 0%, #353535 100%);
  padding: 0.75rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #4d4d4d;
}

.kds-order-info {
  display: flex;
  flex-direction: column;
}

.kds-table-number {
  font-size: 1.35rem;
  font-weight: 700;
  color: white;
  line-height: 1.2;
}

.kds-order-number {
  font-size: 0.7rem;
  color: #888;
  margin-top: 0.15rem;
}

.kds-timer {
  font-size: 1.5rem;
  font-weight: 700;
  color: #4CAF50;
  font-family: 'Courier New', Consolas, monospace;
  letter-spacing: 1px;
}

.kds-timer.text-danger {
  color: #ff4757 !important;
  animation: timer-blink 1s ease-in-out infinite;
}

@keyframes timer-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* KDS Card Body */
.kds-card-body {
  padding: 0.75rem;
}

/* KDS Item */
.kds-item {
  display: flex;
  align-items: center;
  padding: 0.65rem 0.75rem;
  margin-bottom: 0.5rem;
  background: #3d3d3d;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  border-left: 4px solid transparent;
}

.kds-item:last-child {
  margin-bottom: 0;
}

.kds-item:hover {
  background: #4a4a4a;
  transform: translateX(2px);
}

.kds-item:active {
  transform: scale(0.98);
}

/* Item Status Variants */
.kds-item.item-pending {
  border-left-color: #ffc107;
}

.kds-item.item-cooking {
  border-left-color: #2196F3;
  background: linear-gradient(90deg, rgba(33, 150, 243, 0.15) 0%, #3d3d3d 100%);
}

.kds-item.item-cooking .item-status {
  color: #2196F3;
  animation: cooking-pulse 0.8s ease-in-out infinite;
}

@keyframes cooking-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.1); }
}

.kds-item.item-ready {
  border-left-color: #4CAF50;
  background: linear-gradient(90deg, rgba(76, 175, 80, 0.15) 0%, #3d3d3d 100%);
}

.kds-item.item-ready .item-status {
  color: #4CAF50;
}

/* Item Elements */
.item-qty {
  background: #555;
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.9rem;
  margin-right: 0.75rem;
  min-width: 40px;
  text-align: center;
}

.item-name {
  flex: 1;
  color: white;
  font-size: 0.95rem;
  font-weight: 500;
}

.item-status {
  color: #888;
  font-size: 1.1rem;
  margin-left: 0.5rem;
}

.item-mods {
  font-size: 0.75rem;
  color: #aaa;
  display: block;
  margin-top: 0.25rem;
}

.item-notes {
  font-size: 0.75rem;
  color: var(--gold);
  font-style: italic;
  display: block;
  margin-top: 0.25rem;
}

/* KDS Card Footer */
.kds-card-footer {
  padding: 0.65rem 0.75rem;
  background: linear-gradient(180deg, #353535 0%, #3d3d3d 100%);
  display: flex;
  gap: 0.5rem;
  border-top: 1px solid #4d4d4d;
}

.kds-card-footer .btn {
  flex: 1;
  font-size: 0.85rem;
  padding: 0.5rem;
}

.kds-card-footer .btn-success {
  background: #4CAF50;
  border-color: #4CAF50;
}

.kds-card-footer .btn-success:hover {
  background: #45a049;
  border-color: #45a049;
}

.kds-card-footer .btn-outline-secondary {
  color: #aaa;
  border-color: #555;
}

.kds-card-footer .btn-outline-secondary:hover {
  background: #555;
  border-color: #555;
  color: white;
}

/* Empty KDS State */
.kds-empty {
  text-align: center;
  padding: 4rem 2rem;
  color: #666;
}

.kds-empty i {
  font-size: 4rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.kds-empty h5 {
  color: #888;
  margin-bottom: 0.5rem;
}

.kds-empty p {
  color: #666;
  font-size: 0.9rem;
}

/* Legacy KDS Styles (for backward compatibility) */
.kds-layout {
  background: var(--dark);
  min-height: 100vh;
  padding: 1rem;
}

.kds-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  color: var(--white);
}

.kds-order-card {
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.kds-order-header {
  padding: 0.75rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
}

.kds-order-header.on-time {
  background: var(--success);
  color: var(--white);
}

.kds-order-header.warning {
  background: var(--warning);
  color: var(--dark);
}

.kds-order-header.overdue {
  background: var(--danger);
  color: var(--white);
}

.kds-order-items {
  padding: 1rem;
}

.kds-order-item {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--light-gray);
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

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

.kds-order-item .item-qty {
  background: var(--lighter-gray);
  padding: 0.125rem 0.5rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.875rem;
}

.kds-order-item .item-name {
  font-weight: 600;
}

.kds-order-item .item-mods {
  font-size: 0.75rem;
  color: var(--gray);
}

.kds-order-item .item-notes {
  font-size: 0.75rem;
  color: var(--primary-red);
  font-style: italic;
}

.kds-order-actions {
  padding: 0.75rem 1rem;
  background: var(--lighter-gray);
}

.kds-order-actions .btn {
  width: 100%;
}

/* ============================================
   DATA TABLES
   ============================================ */
.table-container {
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.table-toolbar {
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--light-gray);
  gap: 1rem;
  flex-wrap: wrap;
}

.table-search {
  display: flex;
  gap: 0.5rem;
  flex: 1;
  max-width: 400px;
}

.table-search .form-control {
  border-radius: var(--radius-md);
}

.table-filters {
  display: flex;
  gap: 0.5rem;
}

.data-table {
  width: 100%;
}

.data-table th {
  background: var(--lighter-gray);
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--light-gray);
}

.data-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--light-gray);
  vertical-align: middle;
}

.data-table tr:hover {
  background: var(--lighter-gray);
}

.data-table .actions {
  display: flex;
  gap: 0.25rem;
}

.data-table .actions .btn {
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
}

/* ============================================
   BADGES & PILLS
   ============================================ */
.badge-status {
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-status.active { background: var(--success-light); color: var(--success); }
.badge-status.pending { background: var(--warning-light); color: #856404; }
.badge-status.inactive { background: var(--light-gray); color: var(--gray); }
.badge-status.danger { background: var(--danger-light); color: var(--danger); }

/* ============================================
   FORMS
   ============================================ */
.form-label {
  font-weight: 500;
  color: var(--dark);
  margin-bottom: 0.375rem;
}

.form-control, .form-select {
  border: 1px solid var(--light-gray);
  border-radius: var(--radius-md);
  padding: 0.5rem 0.75rem;
  font-size: 0.9375rem;
  transition: var(--transition);
}

.form-control:focus, .form-select:focus {
  border-color: var(--primary-red);
  box-shadow: 0 0 0 3px rgba(197, 45, 34, 0.15);
}

/* ============================================
   LOGIN PAGE
   ============================================ */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1a1a1a 0%, #2d1a1a 25%, #3d1f1f 50%, #4a2020 75%, #1a1a1a 100%);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
  padding: 2rem;
  position: relative;
}

.login-page::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at 30% 20%, rgba(197, 45, 34, 0.15) 0%, transparent 50%),
              radial-gradient(ellipse at 70% 80%, rgba(178, 142, 48, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.login-container {
  width: 100%;
  max-width: 480px;
  position: relative;
  z-index: 1;
}

.login-card {
  width: 100%;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.login-header {
  background: var(--primary-red);
  padding: 2rem;
  text-align: center;
}

.login-logo {
  width: 80px;
  height: 80px;
  object-fit: contain;
  margin-bottom: 1rem;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  padding: 10px;
}

.login-title {
  color: var(--white);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.login-subtitle {
  color: rgba(255,255,255,0.85);
  font-size: 0.9rem;
  margin: 0;
}

.login-form {
  padding: 1.5rem;
}

.login-footer {
  padding: 1rem 1.5rem;
  background: var(--lighter-gray);
  text-align: center;
  font-size: 0.8rem;
  color: var(--gray);
}

/* PIN Input */
.pin-input-container {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}

.pin-input {
  width: 45px;
  height: 50px;
  text-align: center;
  font-size: 1.25rem;
  font-weight: 700;
  border: 2px solid var(--light-gray);
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.pin-input:focus {
  border-color: var(--primary-red);
  outline: none;
  box-shadow: 0 0 0 3px rgba(197, 45, 34, 0.15);
}

.btn-login {
  padding: 0.75rem;
  font-size: 1rem;
  font-weight: 600;
}

/* Demo Accounts Card */
.demo-accounts {
  max-width: 480px;
}

.demo-accounts .card {
  background: rgba(255,255,255,0.98);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.demo-accounts .card-body {
  padding: 1rem;
}

.demo-accounts .row {
  margin: 0 -0.375rem;
}

.demo-accounts .row > [class*="col-"] {
  padding: 0.375rem;
}

.demo-accounts .demo-login {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem 0.75rem;
  min-height: 80px;
  font-size: 0.85rem;
  font-weight: 500;
  border-width: 2px;
  transition: all 0.25s ease;
}

.demo-accounts .demo-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(197, 45, 34, 0.2);
}

.demo-accounts .demo-login i {
  font-size: 1.5rem;
  display: block;
  margin-bottom: 0.5rem;
}

.demo-accounts .demo-login small {
  font-size: 0.8rem;
  font-weight: 600;
}

/* ============================================
   CHARTS & ANALYTICS
   ============================================ */
.chart-container {
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 1.25rem;
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.chart-title {
  font-weight: 600;
  font-size: 1rem;
}

/* ============================================
   UTILITIES
   ============================================ */
.text-gold { color: var(--gold) !important; }
.text-primary-red { color: var(--primary-red) !important; }
.bg-gold { background-color: var(--gold) !important; }
.bg-primary-red { background-color: var(--primary-red) !important; }

.border-gold { border-color: var(--gold) !important; }
.border-primary-red { border-color: var(--primary-red) !important; }

.fw-medium { font-weight: 500; }
.fs-sm { font-size: 0.875rem; }
.fs-xs { font-size: 0.75rem; }

.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 1rem; }
.gap-4 { gap: 1.5rem; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1199px) {
  .pos-order-panel {
    width: 360px;
  }

  .pos-menu-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  }
}

@media (max-width: 991px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.show {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
  }

  .pos-order-panel {
    width: 320px;
  }

  .pos-container {
    height: calc(100vh - 56px - 60px);
  }

  .category-tab {
    padding: 0.6rem 1rem;
    min-width: 70px;
  }

  .category-tab i {
    font-size: 1.1rem;
  }

  .menu-item-image {
    width: 48px;
    height: 48px;
  }

  .menu-emoji {
    font-size: 1.85rem;
  }

  .order-summary .total-row {
    font-size: 1.2rem;
  }
}

@media (max-width: 767px) {
  .pos-layout {
    flex-direction: column;
  }

  .pos-container {
    flex-direction: column;
    height: calc(100vh - 56px - 60px);
  }

  .pos-order-panel {
    width: 100%;
    height: 45vh;
    border-left: none;
    border-top: 1px solid rgba(0,0,0,0.1);
  }

  .pos-menu-panel {
    height: 55vh;
  }

  .pos-category-tabs {
    padding: 0.75rem;
  }

  .category-tab {
    padding: 0.5rem 0.875rem;
    min-width: 65px;
    font-size: 0.7rem;
  }

  .category-tab i {
    font-size: 1rem;
  }

  .pos-menu-grid {
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 0.75rem;
    padding: 0.75rem;
    padding-bottom: 1rem;
  }

  .menu-item {
    padding: 0.75rem 0.5rem;
    min-height: 120px;
  }

  .menu-item-image {
    width: 42px;
    height: 42px;
    margin-bottom: 0.5rem;
  }

  .menu-emoji {
    font-size: 1.75rem;
  }

  .menu-item-name {
    font-size: 0.75rem;
  }

  .menu-item-price {
    font-size: 0.8rem;
  }

  .order-header {
    padding: 0.75rem 1rem;
  }

  .order-items {
    padding: 0.5rem;
  }

  .order-item {
    padding: 0.625rem;
    margin-bottom: 0.375rem;
  }

  .order-summary {
    padding: 0.75rem 1rem;
  }

  .order-summary .summary-row {
    font-size: 0.8rem;
  }

  .order-summary .total-row {
    font-size: 1.1rem;
  }

  .order-actions {
    padding: 0.75rem;
  }

  .order-actions .btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
  }

  .footer-nav-item {
    padding: 0.5rem 0.75rem;
    font-size: 0.65rem;
  }

  .footer-nav-item i {
    font-size: 1.1rem;
  }
}

@media (max-width: 480px) {
  .pos-menu-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    padding: 0.5rem;
    padding-bottom: 1rem;
  }

  .menu-item {
    padding: 0.625rem 0.375rem;
    min-height: 100px;
  }

  .menu-item-image {
    width: 36px;
    height: 36px;
  }

  .menu-emoji {
    font-size: 1.5rem;
  }

  .menu-item-name {
    font-size: 0.7rem;
    -webkit-line-clamp: 1;
  }

  .menu-item-price {
    font-size: 0.75rem;
  }

  .category-tab {
    padding: 0.4rem 0.6rem;
    min-width: 55px;
    font-size: 0.65rem;
  }

  .category-tab span {
    display: none;
  }

  .category-tab i {
    font-size: 1.1rem;
  }

  /* Footer navigation for small screens */
  .pos-footer-nav {
    padding: 0.4rem 0.5rem;
  }

  .footer-nav-item {
    padding: 0.4rem 0.5rem;
    min-width: 50px;
    font-size: 0.6rem;
  }

  .footer-nav-item i {
    font-size: 1rem;
  }

  .footer-nav-item span {
    display: block;
  }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
  .sidebar, .navbar-erp, .no-print {
    display: none !important;
  }

  .main-content {
    margin-left: 0 !important;
  }
}
