/* ==========================================================================
   DUBAI BITES POS SYSTEM - MASTER DESIGN SYSTEM & CSS
   Theme: Crimson & Amber Gold Luxury Fast Food POS
   Target: Desktop, Tablet, Mobile & 58mm Thermal Printer
   ========================================================================== */

:root {
  /* Color Palette */
  --bg-dark: #0f1217;
  --bg-card: #181d26;
  --bg-card-hover: #222936;
  --bg-glass: rgba(24, 29, 38, 0.85);
  
  --primary-amber: #f59e0b;
  --primary-amber-hover: #d97706;
  --accent-red: #e11d48;
  --accent-red-hover: #be123c;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dark: #0f172a;
  
  --border-color: rgba(255, 255, 255, 0.08);
  --border-amber: rgba(245, 158, 11, 0.3);
  
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #06b6d4;

  --shadow-sm: 0 2px 4px rgba(0,0,0,0.3);
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.4);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base Styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Glassmorphism & Card Utility */
.glass-panel {
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--glass-shadow);
}

/* Layout Grid System */
.app-container {
  display: flex;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

.pos-layout {
  display: grid;
  grid-template-columns: 1fr 400px;
  height: 100vh;
  width: 100%;
}

@media (max-width: 1024px) {
  .pos-layout {
    grid-template-columns: 1fr 340px;
  }
}

@media (max-width: 768px) {
  .pos-layout {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr auto;
  }
}

/* Splash Screen Animation */
#splashScreen {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at center, #1e2532 0%, #0b0d11 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.6s;
}

#splashScreen.fade-out {
  opacity: 0;
  visibility: hidden;
}

.splash-logo {
  width: 140px;
  height: 140px;
  object-fit: contain;
  animation: pulseLogo 2s infinite ease-in-out;
  filter: drop-shadow(0 0 20px rgba(245, 158, 11, 0.4));
}

@keyframes pulseLogo {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); filter: drop-shadow(0 0 30px rgba(245, 158, 11, 0.7)); }
}

.splash-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(245, 158, 11, 0.2);
  border-top-color: var(--primary-amber);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-top: 24px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .splash-logo { animation: none; }
  .splash-spinner { animation-duration: 2s; }
}

/* Authentication Page & Setup Page */
.login-body, .setup-body {
  position: relative;
  background: linear-gradient(135deg, rgba(15, 18, 23, 0.72) 0%, rgba(11, 14, 20, 0.88) 100%),
              url('../../Images/loginpagebackground.png') no-repeat center center / cover;
  background-attachment: fixed;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
  overflow-x: hidden;
}

.login-card, .setup-card {
  width: 100%;
  max-width: 440px;
  padding: 40px 32px;
  background: rgba(20, 26, 36, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: var(--radius-md);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(245, 158, 11, 0.15);
  position: relative;
  z-index: 2;
  transition: var(--transition-normal);
}

.setup-card {
  max-width: 520px;
}

@media (max-width: 640px) {
  .login-body, .setup-body {
    padding: 16px;
    background-attachment: scroll; /* Optimal scrolling performance on mobile browsers */
  }
  .login-card, .setup-card {
    padding: 28px 20px;
    border-radius: var(--radius-sm);
  }
}

.login-brand-logo {
  width: 110px;
  height: auto;
  margin: 0 auto 16px;
  display: block;
}

body:not(.login-body):not(.setup-body) {
  background-color: #0b0e14 !important;
  background-image: none !important;
}

/* POS Screen Main Area */
.pos-main {
  display: flex;
  flex-direction: column;
  height: 100%;
  background-color: #0b0e14 !important;
  background-image: none !important;
  overflow: hidden;
}

.pos-header {
  height: 64px !important;
  min-height: 64px !important;
  max-height: 64px !important;
  padding: 0 20px !important;
  background: var(--bg-card) !important;
  border-bottom: 1px solid var(--border-color) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

.pos-brand-wrapper {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  flex-shrink: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

.pos-brand-logo, .admin-sidebar-logo img {
  height: 38px !important;
  width: 38px !important;
  min-width: 38px !important;
  max-width: 38px !important;
  min-height: 38px !important;
  max-height: 38px !important;
  object-fit: contain !important;
  border-radius: 50% !important;
  background: rgba(245, 158, 11, 0.15) !important;
  border: 1px solid var(--border-amber) !important;
  filter: drop-shadow(0 0 6px rgba(245, 158, 11, 0.35)) !important;
  flex-shrink: 0 !important;
  display: block !important;
}

.pos-search-bar {
  position: relative;
  flex: 1;
  max-width: 420px;
}

.pos-search-bar input {
  width: 100%;
  padding: 10px 16px 10px 42px;
  background: #0f131a;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  color: #fff;
  font-size: 0.95rem;
  transition: var(--transition-fast);
}

.pos-search-bar input:focus {
  outline: none;
  border-color: var(--primary-amber);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

.pos-search-bar i {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

/* Category Navigation Filter Pills */
.category-bar {
  padding: 12px 24px;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
  background: #0f1218;
  border-bottom: 1px solid var(--border-color);
}

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

.category-pill {
  padding: 10px 20px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 8px;
}

.category-pill:hover {
  background: var(--bg-card-hover);
  color: #fff;
}

.category-pill.active {
  background: var(--primary-amber);
  color: var(--text-dark);
  border-color: var(--primary-amber);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
}

/* Product Cards Grid */
.products-grid-container {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
}

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

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: var(--transition-normal);
  position: relative;
  user-select: none;
}

.product-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary-amber);
  box-shadow: var(--shadow-lg);
}

.product-card:active {
  transform: scale(0.97);
}

/* Product Table Image Thumbnail & Hover Preview */
.table-img-box {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  min-height: 44px !important;
  max-width: 44px !important;
  max-height: 44px !important;
  border-radius: var(--radius-sm);
  background: #0f131a;
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  position: relative;
  flex-shrink: 0;
}

.table-img-box img {
  width: 44px !important;
  height: 44px !important;
  max-width: 44px !important;
  max-height: 44px !important;
  object-fit: cover !important;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s ease;
}

.table-img-box img:hover {
  transform: scale(3.5);
  z-index: 999;
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.9), 0 0 12px rgba(245, 158, 11, 0.6);
}

.product-img-wrapper {
  width: 100%;
  height: 120px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #0f131a;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-img-wrapper img {
  width: 100% !important;
  height: 100% !important;
  max-height: 120px !important;
  object-fit: cover !important;
}

.product-img-fallback {
  font-size: 2.2rem;
  color: var(--primary-amber);
  opacity: 0.8;
}

.product-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
  line-height: 1.3;
}

.product-price {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--primary-amber);
  margin-top: auto;
}

.product-stock-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.2);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.product-stock-badge.low {
  background: rgba(245, 158, 11, 0.2);
  color: var(--warning);
  border-color: var(--warning);
}

.product-card.out-of-stock {
  opacity: 0.5;
  pointer-events: none;
  filter: grayscale(0.8);
}

.product-card.out-of-stock::after {
  content: 'OUT OF STOCK';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.65);
  color: #ff4d4d;
  font-weight: 800;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
}

/* POS Side Cart Panel */
.pos-cart-panel {
  background: var(--bg-card);
  border-left: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  height: 100vh;
}

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

.cart-header-title {
  font-size: 1.1rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 10px;
}

.cart-items-wrapper {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.cart-empty-state {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  text-align: center;
  padding: 40px;
}

.cart-empty-state i {
  font-size: 3rem;
  color: rgba(255,255,255,0.1);
  margin-bottom: 12px;
}

.cart-item {
  background: #0f131a;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cart-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.cart-item-name {
  font-weight: 700;
  font-size: 0.92rem;
  color: #fff;
}

.cart-item-addons {
  font-size: 0.78rem;
  color: var(--text-muted);
  padding-left: 8px;
  border-left: 2px solid var(--primary-amber);
  margin-top: 2px;
}

.cart-item-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
}

.qty-control {
  display: flex;
  align-items: center;
  background: #1a202c;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.qty-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  transition: var(--transition-fast);
}

.qty-btn:hover {
  background: var(--primary-amber);
  color: var(--text-dark);
}

.qty-val {
  padding: 0 10px;
  font-size: 0.88rem;
  font-weight: 700;
}

.cart-item-total {
  font-weight: 800;
  color: var(--primary-amber);
  font-size: 0.95rem;
}

/* Cart Footer Summary & Checkout */
.cart-summary {
  padding: 18px;
  background: #11151d;
  border-top: 1px solid var(--border-color);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.summary-row.total {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  border-top: 1px dashed var(--border-color);
  padding-top: 10px;
  margin-top: 10px;
}

.summary-row.total .total-amount {
  color: var(--primary-amber);
}

.checkout-btn-group {
  display: grid;
  grid-template-columns: 1fr 2.5fr;
  gap: 10px;
  margin-top: 16px;
}

/* General Buttons */
/* General Buttons & Micro-interactions */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  border: none;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), 
              box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1), 
              background-color 0.2s ease, 
              border-color 0.2s ease,
              filter 0.2s ease;
  text-decoration: none;
  user-select: none;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: scale(0.96) translateY(0);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-amber) 0%, #d97706 100%);
  color: var(--text-dark);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
}

.btn-primary:hover {
  filter: brightness(1.1);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.45);
}

.btn-accent {
  background: linear-gradient(135deg, var(--accent-red) 0%, #be123c 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(225, 29, 72, 0.25);
}

.btn-accent:hover {
  filter: brightness(1.1);
  box-shadow: 0 6px 20px rgba(225, 29, 72, 0.45);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

.btn-outline:hover {
  background: rgba(255,255,255,0.05);
  border-color: var(--primary-amber);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.btn-danger:hover {
  filter: brightness(0.9);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.35);
}

/* Modals & Spring Animations */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s;
}

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

.modal-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  width: 90%;
  max-width: 520px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85), 0 0 35px rgba(245, 158, 11, 0.2);
  transform: scale(0.88) translateY(20px);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active .modal-box {
  transform: scale(1) translateY(0);
}

/* Floating Toast Notification System */
#toastContainer {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

.toast-message {
  pointer-events: auto;
  min-width: 280px;
  max-width: 420px;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  background: rgba(24, 29, 38, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-amber);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.8), 0 0 20px rgba(245, 158, 11, 0.25);
  color: #fff;
  font-weight: 700;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0;
  transform: translateY(-24px) scale(0.92);
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.toast-message.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.toast-message.toast-success {
  border-color: rgba(16, 185, 129, 0.6);
  box-shadow: 0 12px 35px rgba(0,0,0,0.8), 0 0 20px rgba(16, 185, 129, 0.25);
}

.toast-message.toast-danger {
  border-color: rgba(239, 68, 68, 0.6);
  box-shadow: 0 12px 35px rgba(0,0,0,0.8), 0 0 20px rgba(239, 68, 68, 0.25);
}

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

.modal-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background: #11151e;
}

/* Quick Pay Buttons Grid */
.quick-pay-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 10px;
}

.quick-pay-btn {
  padding: 12px;
  background: #131822;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-fast);
}

.quick-pay-btn:hover {
  border-color: var(--primary-amber);
  background: var(--bg-card-hover);
}

/* Admin Sidebar Layout */
.admin-layout {
  display: flex;
  height: 100vh;
  width: 100vw;
}

.admin-sidebar {
  width: 260px;
  background: var(--bg-card);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
}

.admin-sidebar-logo {
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border-color);
}

.admin-sidebar-logo img {
  height: 38px;
}

.admin-nav {
  flex: 1;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  transition: var(--transition-fast);
}

.nav-link:hover {
  background: var(--bg-card-hover);
  color: #fff;
}

.nav-link.active {
  background: rgba(245, 158, 11, 0.15);
  color: var(--primary-amber);
  border-left: 3px solid var(--primary-amber);
}

.admin-main {
  flex: 1;
  background: #0b0e14;
  overflow-y: auto;
  padding: 28px;
}

/* Data Tables */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

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

.table th {
  background: #141923;
  padding: 12px 16px;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
}

.table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.9rem;
  vertical-align: middle;
}

.table tbody tr:hover {
  background: rgba(255,255,255,0.02);
}

/* Form Controls */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  background: #0f131a;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 0.92rem;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-amber);
}

/* Metrics Cards & Custom Dashboard System */
.dash-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}

.dash-filter-container {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 8px 14px;
  border-radius: var(--radius-md);
  flex-wrap: wrap;
}

.dash-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

@media (max-width: 1024px) {
  .dash-metrics-grid {
    grid-template-columns: 1fr;
  }
}

.dash-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.dash-card-amber { border-left: 4px solid var(--primary-amber); }
.dash-card-cyan { border-left: 4px solid var(--info); }
.dash-card-emerald { border-left: 4px solid var(--success); }
.dash-card-rose { border-left: 4px solid var(--danger); }

.dash-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.dash-card-title {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.dash-card-val {
  font-size: 1.8rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
}

.dash-icon-box {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.dash-icon-amber { background: rgba(245, 158, 11, 0.15); color: var(--primary-amber); border: 1px solid var(--border-amber); }
.dash-icon-cyan { background: rgba(6, 182, 212, 0.15); color: var(--info); border: 1px solid rgba(6, 182, 212, 0.3); }
.dash-icon-emerald { background: rgba(16, 185, 129, 0.15); color: var(--success); border: 1px solid rgba(16, 185, 129, 0.3); }
.dash-icon-rose { background: rgba(239, 68, 68, 0.15); color: var(--danger); border: 1px solid rgba(239, 68, 68, 0.3); }

.dash-prog-bar {
  width: 100%;
  height: 6px;
  background: #0f131a;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 4px;
}

.dash-prog-fill-emerald { height: 100%; background: var(--success); border-radius: 999px; }
.dash-prog-fill-cyan { height: 100%; background: var(--info); border-radius: 999px; }
.dash-prog-fill-amber { height: 100%; background: var(--primary-amber); border-radius: 999px; }

/* 2-Column Section Layout */
.dash-columns-grid {
  display: grid;
  grid-template-columns: 2.2fr 1fr;
  gap: 24px;
}

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

.dash-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
}

.dash-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.dash-panel-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Leaderboard Item Row */
.leaderboard-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: #0f131a;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.leaderboard-row:hover {
  border-color: var(--primary-amber);
  transform: translateX(3px);
}

.rank-badge {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.75rem;
  flex-shrink: 0;
}

.rank-badge-1 { background: var(--primary-amber); color: var(--text-dark); }
.rank-badge-2 { background: #cbd5e1; color: var(--text-dark); }
.rank-badge-3 { background: #b45309; color: #fff; }
.rank-badge-other { background: #1e293b; color: var(--text-muted); border: 1px solid var(--border-color); }

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

.metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
}

.metric-val {
  font-size: 1.8rem;
  font-weight: 800;
  color: #fff;
  margin-top: 4px;
}

/* Utility Classes */
.hidden {
  display: none !important;
}

/* Alerts */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.alert-danger {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

.alert-success {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #6ee7b7;
}

.alert-info {
  background: rgba(6, 182, 212, 0.15);
  border: 1px solid rgba(6, 182, 212, 0.4);
  color: #67e8f9;
}

.btn-login-submit {
  width: 100%;
  padding: 14px 24px;
  font-size: 1.05rem;
  font-weight: 800;
  margin-top: 12px;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.35);
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-login-submit:hover {
  box-shadow: 0 6px 22px rgba(245, 158, 11, 0.55);
  transform: translateY(-2px);
}

/* ==========================================================================
   58mm THERMAL RECEIPT PRINT STYLES (@media print)
   Paper Width: 58mm (~32 chars per line)
   ========================================================================== */
@media print {
  body * {
    visibility: hidden;
  }
  
  #printableReceipt, #printableReceipt * {
    visibility: visible;
  }
  
  #printableReceipt {
    position: absolute;
    left: 0;
    top: 0;
    width: 58mm;
    margin: 0;
    padding: 2mm;
    font-family: 'Courier New', Courier, monospace;
    font-size: 11px;
    line-height: 1.2;
    color: #000;
    background: #fff;
  }

  @page {
    size: 58mm auto;
    margin: 0;
  }

  .receipt-center {
    text-align: center;
  }
  
  .receipt-divider {
    border-top: 1px dashed #000;
    margin: 4px 0;
  }

  .receipt-table {
    width: 100%;
    border-collapse: collapse;
  }

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

  .receipt-bold {
    font-weight: bold;
  }
}
