/* D:\Área de Trabalho\Apps Dev\style.css */

/* --- Modern Design Token / Variables --- */
:root {
  /* Modern Nude Theme Defaults */
  --bg-primary: #F7F1EC;
  --bg-secondary: #ffffff;
  --bg-tertiary: #EADFD8; /* Nude beige hover/subtle area */
  --border-color: #E4DCD5;
  
  --glass-bg: rgba(255, 255, 255, 0.92);
  --glass-border: rgba(107, 79, 71, 0.12);
  --glass-shadow: 0 8px 30px rgba(107, 79, 71, 0.04), 0 1px 3px rgba(0, 0, 0, 0.01);
  
  --text-primary: #302825;
  --text-secondary: #8A7A74;
  --text-inverse: #ffffff;
  
  --accent-color: #6B4F47; /* Marrom mocha */
  --accent-color-rgb: 107, 79, 71;
  --accent-gradient: linear-gradient(135deg, #6B4F47 0%, #C96B4B 100%);
  --accent-glow: rgba(107, 79, 71, 0.15);
  
  --success-color: #2E7D5A;
  --success-bg: rgba(46, 125, 90, 0.08);
  --warning-color: #E4A62A;
  --warning-bg: rgba(228, 166, 42, 0.08);
  --danger-color: #D9534F;
  --danger-bg: rgba(217, 83, 79, 0.08);
  --info-color: #C96B4B; /* Terracota */
  --info-bg: rgba(201, 107, 75, 0.08);
  
  --border-radius-lg: 20px;
  --border-radius-md: 12px;
  --border-radius-sm: 8px;
  
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Additional SaaS tokens */
  --bg-card: #ffffff;
  color-scheme: light;
}

/* --- Base Resets & Typography --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', -apple-system, sans-serif;
  scrollbar-width: thin;
  scrollbar-color: var(--border-color) transparent;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

/* Custom Sleek Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 20px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, select, textarea {
  background: none;
  border: none;
  font: inherit;
  color: inherit;
  outline: none;
}

/* Perfect native & custom dropdown visibility override for light and dark themes */
select option {
  background-color: var(--bg-card) !important;
  color: var(--text-primary) !important;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* Helper utilities */
.text-secondary { color: var(--text-secondary); }
.text-success { color: var(--success-color); }
.text-warning { color: var(--warning-color); }
.text-danger { color: var(--danger-color); }
.text-primary { color: var(--accent-color); }
.text-right { text-align: right; }

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 30px;
  font-size: 11px;
  font-weight: 600;
  gap: 4px;
}
.badge-success { background: var(--success-bg); color: var(--success-color); }
.badge-warning { background: var(--warning-bg); color: var(--warning-color); }
.badge-danger { background: var(--danger-bg); color: var(--danger-color); }
.badge-info { background: var(--info-bg); color: var(--info-color); }

/* --- App Layout Structure --- */
.app-container {
  display: flex;
  min-height: 100vh;
}

/* --- SIDEBAR --- */
.sidebar {
  width: 260px;
  background-color: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: fixed;
  height: 100vh;
  z-index: 100;
  transition: background-color var(--transition-normal), border-color var(--transition-normal);
}

.sidebar-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px 16px 20px 16px;
  border-bottom: 1px solid var(--border-color);
  text-align: center;
}

.brand-logo {
  width: 96px;
  height: 96px;
  background: transparent;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
  overflow: hidden;
  border: none;
  transition: transform var(--transition-normal);
}

.brand-logo:hover {
  transform: scale(1.05);
}

.brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
}

.logo-icon {
  color: var(--text-inverse);
  width: 64px;
  height: 64px;
  background: var(--accent-gradient);
  border-radius: 50%;
  padding: 16px;
  box-shadow: 0 8px 18px var(--accent-glow);
}

.brand-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.brand-text h1 {
  font-size: 17px;
  line-height: 1.2;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 850;
  letter-spacing: -0.5px;
  margin: 0;
  max-width: 190px;
  word-wrap: break-word;
}

.brand-text span {
  font-size: 10.5px;
  color: var(--text-secondary);
  font-weight: 600;
  letter-spacing: 0.3px;
}

.sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 24px;
  flex-grow: 1;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--border-radius-md);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: all var(--transition-fast);
  position: relative;
}

.menu-item i {
  width: 18px;
  height: 18px;
  transition: transform var(--transition-fast);
}

.menu-item:hover {
  color: var(--text-primary);
  background-color: var(--bg-tertiary);
}

.menu-item:hover i {
  transform: translateX(2px);
}

.menu-item.active {
  color: var(--text-inverse);
  background: var(--accent-gradient);
  box-shadow: 0 8px 20px -6px var(--accent-glow);
}

/* Shortcut Badge Styles (Alt+1~7 Hints) */
.shortcut-badge {
  font-size: 10px;
  font-weight: 700;
  font-family: Consolas, Monaco, monospace;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.1);
  color: var(--text-secondary);
  opacity: 0.75;
  white-space: nowrap;
  line-height: 1.4;
  letter-spacing: 0.5px;
  transition: all var(--transition-fast);
}

/* Contrast adjustment when the parent menu-item is active */
.menu-item.active .shortcut-badge {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: var(--text-inverse) !important;
  opacity: 1;
}

/* Shortcut badge styling */

.cart-badge-indicator {
  position: absolute;
  top: 15px;
  right: 18px;
  width: 8px;
  height: 8px;
  background-color: var(--danger-color);
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--bg-secondary), 0 0 8px var(--danger-color);
  display: none;
}

.sidebar-footer {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

.theme-toggle-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--bg-tertiary);
  padding: 8px 12px;
  border-radius: var(--border-radius-md);
}

.theme-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
  min-width: 85px;
}

.theme-toggle-btn {
  width: 48px;
  height: 24px;
  background-color: var(--border-color);
  border-radius: 30px;
  position: relative;
  cursor: pointer;
  transition: background-color var(--transition-normal);
}



.toggle-circle {
  width: 18px;
  height: 18px;
  background-color: white;
  border-radius: 50%;
  position: absolute;
  top: 3px;
  left: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-normal);
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}



.toggle-circle i {
  width: 11px;
  height: 11px;
  position: absolute;
  transition: opacity var(--transition-fast);
}

.sun-icon { opacity: 1; color: #fbbf24; }
.moon-icon { opacity: 0; color: #8b5cf6; }



.user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.profile-avatar {
  width: 38px;
  height: 38px;
  background: var(--accent-gradient);
  border-radius: 50%;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-family: 'Outfit', sans-serif;
  box-shadow: 0 4px 10px var(--accent-glow);
}

.profile-info {
  display: flex;
  flex-direction: column;
}

.profile-name {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
}

.profile-role {
  font-size: 11px;
  color: var(--text-secondary);
}

.sidebar-copyright {
  font-size: 10px;
  color: var(--text-secondary);
  opacity: 0.6;
  margin-top: 14px;
  text-align: center;
  line-height: 1.4;
  border-top: 1px dashed var(--border-color);
  padding-top: 12px;
}

/* --- MAIN CONTENT AREA --- */
.main-content {
  flex-grow: 1;
  margin-left: 260px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  min-width: 0;
  width: 100%;
  overflow-x: hidden; /* Prevents tables and large components from stretching the main viewport */
}

/* --- TOP HEADER --- */
.top-header {
  height: 64px;
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 90;
  transition: background-color var(--transition-normal), border-color var(--transition-normal);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.menu-toggle-btn {
  display: none;
  font-size: 18px;
  cursor: pointer;
}

.page-title-area h2 {
  font-size: 18px;
  font-weight: 700;
}

.page-title-area p {
  font-size: 11px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.live-clock-card {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: var(--bg-tertiary);
  padding: 8px 16px;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.live-clock-card i {
  width: 14px;
  height: 14px;
  color: var(--accent-color);
}

.header-action-btn {
  width: 40px;
  height: 40px;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: all var(--transition-fast);
}

.header-action-btn:hover {
  background-color: var(--border-color);
  transform: translateY(-2px);
}

.header-action-btn i {
  width: 18px;
  height: 18px;
}

.notification-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background-color: var(--danger-color);
  color: white;
  font-size: 10px;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-secondary);
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
}

/* --- GLASSMORPHIC COMPONENT CARD --- */
.glassmorphic {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--glass-shadow);
  transition: background var(--transition-normal), border var(--transition-normal), box-shadow var(--transition-normal);
}

/* --- CONTENT BODY & SPA VIEW TRANSITION --- */
.content-body {
  padding: 32px;
  flex-grow: 1;
}

.content-section {
  display: none;
  animation: fadeIn var(--transition-normal);
}

.content-section.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- SECTION: DASHBOARD --- */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.metric-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  position: relative;
  overflow: hidden;
}

.metric-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: transparent;
}

.metric-card:nth-child(1)::after { background: var(--accent-gradient); }
.metric-card:nth-child(2)::after { background: linear-gradient(135deg, #2E7D5A 0%, #1e5c41 100%); }
.metric-card:nth-child(3)::after { background: linear-gradient(135deg, #C96B4B 0%, #a44f32 100%); }
.metric-card:nth-child(4)::after { background: linear-gradient(135deg, #E4A62A 0%, #b88118 100%); }

/* First Metric Card Custom Mocha styling to match design guide */
.metric-card:nth-child(1) {
  background-color: var(--accent-color) !important;
  color: #ffffff !important;
  box-shadow: 0 10px 24px rgba(107, 79, 71, 0.18) !important;
}

.metric-card:nth-child(1) .metric-title {
  color: rgba(255, 255, 255, 0.8) !important;
}

.metric-card:nth-child(1) .metric-value {
  color: #ffffff !important;
}

.metric-card:nth-child(1) .metric-footer span {
  color: rgba(255, 255, 255, 0.8) !important;
}

.metric-card:nth-child(1) .metric-icon-box {
  background: rgba(255, 255, 255, 0.15) !important;
}

.metric-card:nth-child(1) .metric-icon-box i {
  color: #ffffff !important;
}

.metric-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.metric-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.metric-icon-box {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  flex-shrink: 0;
  border-radius: var(--border-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.metric-icon-box i { width: 18px; height: 18px; color: var(--text-inverse); }
.sales-bg { background: var(--accent-gradient); }
.profit-bg { background: linear-gradient(135deg, #2E7D5A 0%, #1e5c41 100%); }
.orders-bg { background: linear-gradient(135deg, #C96B4B 0%, #a44f32 100%); }
.stock-bg { background: linear-gradient(135deg, #E4A62A 0%, #b88118 100%); }

.metric-value {
  font-size: 28px;
  font-weight: 800;
  font-family: 'Outfit', sans-serif;
  letter-spacing: -0.03em;
  margin-top: 4px;
}

.metric-footer {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
}

.metric-footer i {
  width: 14px;
  height: 14px;
}

/* Dashboard Details Grid */
.dashboard-details-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 20px;
}

.chart-container-card {
  grid-column: span 6;
}

.low-stock-alerts-card {
  grid-column: span 12;
}

@media (min-width: 1200px) {
  .chart-container-card:nth-of-type(1) { grid-column: span 4; }
  .chart-container-card:nth-of-type(2) { grid-column: span 4; }
  .low-stock-alerts-card { grid-column: span 4; }
}

.details-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--glass-border);
}

.card-header h3 {
  font-size: 16px;
  font-weight: 700;
}

.card-header span {
  font-size: 11px;
}

.chart-wrapper {
  height: 250px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.donut-wrapper {
  height: 250px;
}

/* Low Stock Alerts items rendering */
.alerts-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 250px;
  overflow-y: auto;
}

.alert-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background-color: var(--bg-tertiary);
  border-radius: var(--border-radius-md);
  border: 1px solid transparent;
  transition: background-color var(--transition-fast), border-color var(--transition-fast);
}

.alert-item:hover {
  background-color: var(--border-color);
  border-color: rgba(var(--accent-color-rgb), 0.15);
}

.alert-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.alert-color-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.alert-item-info h4 {
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.3;
  word-break: break-word;
}

.alert-item-info span {
  font-size: 10px;
  color: var(--text-secondary);
}

.alert-item-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.alert-qty-tag {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
}

.alert-restock-btn {
  background-color: var(--accent-color);
  color: var(--text-inverse);
  font-size: 11px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: var(--border-radius-sm);
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.alert-restock-btn:hover {
  opacity: 0.9;
  transform: scale(1.03);
}

.alert-restock-btn i {
  width: 12px;
  height: 12px;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 0;
  gap: 12px;
  color: var(--text-secondary);
  text-align: center;
}

.empty-icon {
  width: 40px;
  height: 40px;
}

.empty-state p {
  font-size: 13px;
  font-weight: 500;
}

/* --- COMMON SECTION CONTROLS --- */
.section-controls {
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}

.search-and-filters {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  flex-grow: 1;
}

.search-input-box {
  position: relative;
  display: flex;
  align-items: center;
  flex-grow: 1;
  max-width: 320px;
  min-width: 200px;
}

.search-input-box i:first-child {
  position: absolute;
  left: 14px;
  width: 16px;
  height: 16px;
  color: var(--text-secondary);
  pointer-events: none;
  z-index: 1;
}

.search-input-box input {
  width: 100%;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  padding: 12px 36px 12px 42px;
  border-radius: var(--border-radius-md);
  font-size: 14.5px;
  color: var(--text-primary);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.search-input-box input:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* Clear (X) Button */
.search-clear-btn {
  position: absolute;
  right: 10px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--text-secondary);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.18s ease, transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.15s ease;
  z-index: 2;
  flex-shrink: 0;
}

.search-clear-btn[style*="display: flex"],
.search-clear-btn.visible {
  opacity: 1;
  transform: scale(1);
}

.search-clear-btn i {
  position: static !important;
  width: 12px !important;
  height: 12px !important;
  color: white !important;
  stroke-width: 2.5px;
}

.search-clear-btn:hover {
  background: var(--danger-color);
  transform: scale(1.12);
}

.search-clear-btn:active {
  transform: scale(0.92);
}

.filter-dropdowns {
  display: flex;
  align-items: center;
  gap: 10px;
}

.custom-select {
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  padding: 10px 16px;
  border-radius: var(--border-radius-md);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  transition: border-color var(--transition-fast);
}

.custom-select:focus {
  border-color: var(--accent-color);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--border-radius-md);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn i {
  width: 16px;
  height: 16px;
}

.btn-primary {
  background: var(--accent-gradient);
  color: var(--text-inverse);
  box-shadow: 0 4px 12px var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px var(--accent-glow);
}

.btn-secondary {
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background-color: var(--border-color);
}

.btn-warning {
  background-color: var(--warning-bg);
  border: 1px solid var(--warning-color);
  color: var(--warning-color);
}

.btn-warning:hover {
  background-color: var(--warning-color);
  color: white;
}

.btn-danger {
  background-color: var(--danger-bg);
  border: 1px solid var(--danger-color);
  color: var(--danger-color);
}

.btn-danger:hover {
  background-color: var(--danger-color);
  color: white;
}

/* --- PREMIUM DATA TABLE --- */
.table-container {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  border-radius: var(--border-radius-lg);
  position: relative;
  -webkit-overflow-scrolling: touch; /* Smooth inertial touch scrolling on mobile */
}

.data-table {
  width: 100%;
  min-width: 100%; /* Adapts to full content area dynamically without forcing horizontal scroll on standard screens */
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}

.data-table th {
  background-color: rgba(0,0,0,0.02);
  padding: 12px 14px; /* Reduced padding from 16px 24px to fit columns perfectly */
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--glass-border);
}



.data-table td {
  padding: 12px 14px; /* Reduced padding from 16px 24px to fit columns perfectly */
  border-bottom: 1px solid var(--glass-border);
  vertical-align: middle;
}

.data-table tbody tr {
  transition: background-color var(--transition-fast);
}

.data-table tbody tr:hover {
  background-color: rgba(var(--accent-color-rgb), 0.02);
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

/* Cell components */
.product-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.product-avatar-box {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08);
}

.product-meta h4 {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
}

.product-meta span {
  font-size: 11px;
  color: var(--text-secondary);
}

.quick-stock-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.btn-icon {
  width: 28px;
  height: 28px;
  border-radius: var(--border-radius-sm);
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-icon:hover {
  background-color: var(--border-color);
  color: var(--accent-color);
}

.btn-icon i {
  width: 14px;
  height: 14px;
}

.btn-edit:hover { background-color: var(--info-bg); color: var(--info-color); border-color: var(--info-color); }
.btn-delete:hover { background-color: var(--danger-bg); color: var(--danger-color); border-color: var(--danger-color); }
.btn-view { background-color: var(--info-bg); color: var(--info-color); border-color: rgba(59, 130, 246, 0.2); }
.btn-view:hover { background-color: var(--info-color); color: #ffffff; border-color: var(--info-color); }

.btn-whatsapp { background-color: rgba(16, 185, 129, 0.15); color: #10b981; border-color: rgba(16, 185, 129, 0.3); }
.btn-whatsapp:hover { background-color: #10b981; color: #ffffff; border-color: #10b981; }

/* --- SECTION: POS LAYOUT --- */
.pos-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 20px;
  min-height: calc(100vh - 170px);
}

.pos-products-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0; /* Crucial: Allows the products grid to shrink and respect the 1fr column width */
}

.pos-controls {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.pos-controls .search-input-box {
  max-width: 320px;
}

.category-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  max-width: calc(100% - 340px);
}

.category-tab {
  padding: 10px 18px;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 30px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.category-tab:hover {
  color: var(--text-primary);
  background-color: var(--border-color);
}

.category-tab.active {
  background: var(--accent-gradient);
  color: var(--text-inverse);
  border-color: transparent;
  box-shadow: 0 4px 10px var(--accent-glow);
}

.pos-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: calc(100vh - 270px);
  overflow-y: auto;
  padding-right: 4px;
}

.pos-card {
  padding: 12px 16px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  position: relative;
  transition: all var(--transition-fast);
  overflow: hidden;
  border-radius: var(--border-radius-md);
  min-height: 64px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.pos-card:not(.out-of-stock):hover {
  transform: translateX(3px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.12);
  border-color: rgba(99, 102, 241, 0.35);
  background: rgba(255, 255, 255, 0.05);
}

.pos-card-color-stripe {
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
}

.pos-card-info {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.pos-card-info-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 2;
}

.pos-card-info h4 {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 2px 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  height: auto;
  line-height: 1.3;
  color: var(--text-primary);
}

.pos-card-info span {
  font-size: 11px;
  color: var(--text-secondary);
  font-family: monospace;
}

.pos-card-specs {
  font-size: 11.5px;
  color: var(--accent-color);
  font-weight: 700;
  white-space: nowrap;
  flex: 1;
  background: rgba(99, 102, 241, 0.08);
  padding: 4px 8px;
  border-radius: var(--border-radius-sm);
  border: 1.5px solid rgba(99, 102, 241, 0.25);
  text-align: center;
}

.pos-card-price {
  font-size: 17px;
  font-weight: 850;
  font-family: 'Outfit', sans-serif;
  color: var(--accent-color);
  margin: 0;
  min-width: 90px;
  text-align: right;
}

.pos-card-stock-status {
  margin-top: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  min-width: 120px;
}

.stock-meter-bg {
  width: 90px;
  height: 5px;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  overflow: hidden;
}

.stock-meter-bar {
  height: 100%;
  border-radius: 10px;
}

.stock-meter-label {
  display: flex;
  justify-content: flex-end;
  font-size: 11px;
  font-weight: 700;
  margin-top: 0;
}

.pos-card.out-of-stock {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
  background: rgba(15, 23, 42, 0.4) !important;
  border-color: rgba(239, 68, 68, 0.15) !important;
}

.pos-card.out-of-stock::after {
  content: 'ESGOTADO';
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(239, 68, 68, 0.15);
  border: 1.5px solid rgba(239, 68, 68, 0.3);
  padding: 4px 10px;
  border-radius: 4px;
  color: #ef4444;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.5px;
  pointer-events: none;
}

.pos-card.low-stock {
  border-color: rgba(245, 158, 11, 0.3) !important;
  background: rgba(245, 158, 11, 0.02);
}

/* POS CART CONTAINER (Right Column) */
.pos-cart-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: calc(100vh - 170px);
  position: sticky;
  top: 110px;
  z-index: 10;
}

.pos-cart-block {
  display: flex;
  flex-direction: column;
  padding: 12px 14px;
}

.pos-checkout-block {
  display: flex;
  flex-direction: column;
  padding: 12px 14px;
}

.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.cart-header h3 {
  font-size: 15px;
  font-weight: 700;
}

.btn-clear-cart {
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity var(--transition-fast);
}

.btn-clear-cart:hover { opacity: 1; }
.btn-clear-cart i { width: 12px; height: 12px; }

.cart-items-container {
  height: auto;
  max-height: none; /* No artificial capping of the items list */
  overflow: visible; /* Prevent internal scrollbar */
  flex-grow: 1;
  flex-shrink: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
  padding-right: 4px;
}

.cart-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-grow: 1;
  gap: 12px;
  color: var(--text-secondary);
  text-align: center;
  padding: 20px;
}

.cart-empty-state i {
  width: 40px;
  height: 40px;
  stroke-width: 1.5;
}

.cart-empty-state p {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.cart-empty-state span {
  font-size: 11px;
}

/* Premium Two-Line Cart Item Layout */
.cart-item {
  display: flex;
  flex-direction: column;
  padding: 6px 10px;
  background-color: var(--bg-tertiary);
  border-radius: var(--border-radius-md);
  gap: 4px;
  border: 1px solid rgba(255, 255, 255, 0.03);
  transition: all var(--transition-fast);
}

body.light-theme .cart-item {
  border: 1px solid rgba(0, 0, 0, 0.03);
}

.cart-item:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

body.light-theme .cart-item:hover {
  background-color: rgba(0, 0, 0, 0.02);
}

.cart-item-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.cart-item-name {
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex-grow: 1;
}

.cart-item-remove {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 17px;
  line-height: 1;
  padding: 0 6px;
  transition: color var(--transition-fast);
}

.cart-item-remove:hover {
  color: var(--danger-color);
}

.cart-item-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.cart-item-price-qty {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 130px;
  min-width: 130px;
  flex-shrink: 0;
  overflow: hidden;
}

.cart-item-price-qty span {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cart-item-price {
  font-size: 12.5px;
  color: var(--text-secondary);
  font-weight: 600;
}

.cart-item-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 20px; /* Capsule pill design */
  padding: 2px 4px;
  width: 100px;
  min-width: 100px;
  flex-shrink: 0;
  box-sizing: border-box;
}

.cart-qty-btn {
  width: 28px;
  height: 28px;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 15px;
  font-weight: bold;
  border-radius: 50%;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.cart-qty-btn:hover {
  background-color: var(--accent-color);
  color: var(--text-inverse);
  transform: scale(1.08);
}

.cart-qty-val {
  font-size: 14.5px;
  font-weight: 700;
  flex-grow: 1;
  text-align: center;
  color: var(--text-primary);
}

.cart-item-total {
  font-size: 15px;
  font-weight: 750;
  color: var(--text-primary);
  font-family: 'Outfit', sans-serif;
  text-align: right;
  flex-grow: 1;
  min-width: 0;
}

/* Cart Summary Calculations */
.cart-summary {
  border-top: 1px dashed var(--border-color);
  padding: 8px 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-secondary);
}

.summary-row span:last-child {
  font-weight: 600;
  color: var(--text-primary);
}

.cart-discount-input {
  width: 110px;
  text-align: right;
  background-color: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(99, 102, 241, 0.45);
  border-radius: var(--border-radius-sm);
  color: var(--text-primary);
  padding: 4px 2px 4px 8px;
  font-family: inherit;
  outline: none;
  font-weight: bold;
  font-size: 12px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

body.light-theme .cart-discount-input {
  background-color: rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.25);
}

.cart-discount-input:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.25);
}

.summary-total-divider {
  height: 1px;
  background-color: var(--border-color);
  margin: 4px 0;
}

.summary-row.total-row {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

.summary-row.total-row span:last-child {
  font-size: 15px;
  font-weight: 800;
  font-family: 'Outfit', sans-serif;
}

/* Step Section Header & Badge */
.step-section-header {
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: 8px;
  margin-bottom: 12px;
}

.step-section-header h3 {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.01em;
}

.step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent-gradient);
  color: var(--text-inverse);
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 3px 8px var(--accent-glow);
}

.cart-header h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 800;
}

/* Enormous High-Contrast Total Display (Emerald Glow Box) */
.elderly-total-box {
  margin-top: 14px;
  padding: 14px 18px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(5, 150, 105, 0.04) 100%);
  border: 1.5px solid rgba(16, 185, 129, 0.35);
  border-radius: var(--border-radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  box-shadow: 0 8px 24px -10px rgba(16, 185, 129, 0.15);
  transition: all var(--transition-normal);
}



.total-label {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-secondary);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.total-value {
  font-size: 38px;
  font-weight: 850;
  color: #10b981; /* Emerald Green */
  font-family: 'Outfit', sans-serif;
  letter-spacing: -0.02em;
}



/* Cart Checkout Actions & Selectors */
.payment-method-selector {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.selector-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
}

.payment-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.payment-option input {
  display: none;
}

.option-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 6px;
  height: 76px; /* Expanded touch height */
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  cursor: pointer;
  text-align: center;
  transition: all var(--transition-fast);
}

.payment-option-icon {
  width: 22px !important;
  height: 22px !important;
  color: var(--text-secondary);
  transition: transform var(--transition-fast), color var(--transition-fast);
}

.payment-option-text {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
}

.payment-option input:checked + .option-card {
  border: 3px solid var(--accent-color) !important; /* Thick prominent border indicator */
  background-color: var(--accent-glow);
  color: var(--accent-color);
  box-shadow: 0 4px 12px rgba(var(--accent-color-rgb), 0.1);
}

.payment-option input:checked + .option-card .payment-option-icon {
  color: var(--accent-color);
  transform: scale(1.15);
}

.payment-option input:checked + .option-card .payment-option-text {
  color: var(--accent-color);
}

/* Giant Highly-Accessible Elderly Checkout Button */
.btn-checkout-elderly {
  width: 100%;
  padding: 15px 20px;
  font-size: 15px;
  font-weight: 800;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important; /* Highly intuitive Emerald Green for validation */
  color: white !important;
  border-radius: var(--border-radius-md);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.35) !important;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all var(--transition-normal);
  
  /* Pulsing glow animation to guide elderly users visually */
  animation: elderlyPulse 2.5s infinite alternate;
}



.btn-checkout-elderly:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.55) !important;
  opacity: 0.95;
}

@keyframes elderlyPulse {
  0% {
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
  }
  100% {
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.65), 0 0 0 4px rgba(16, 185, 129, 0.15);
  }
}

/* --- SECTION: SALES HISTORY SPECIFICS --- */
.sales-summary-stat {
  font-size: 13px;
  font-weight: 500;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  padding: 8px 16px;
  border-radius: 30px;
}

.sales-summary-stat strong {
  margin-left: 6px;
  font-weight: 700;
  font-size: 15px;
}

/* --- SECTION: SETTINGS --- */
.settings-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.settings-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.settings-action-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background-color: var(--bg-tertiary);
  border-radius: var(--border-radius-md);
  flex-wrap: wrap;
  gap: 12px;
}

.action-info {
  flex-grow: 1;
  max-width: 450px;
}

.action-info h4 {
  font-size: 14px;
  font-weight: 600;
}

.action-info p {
  font-size: 11px;
  margin-top: 4px;
}

.settings-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.required-label::after {
  content: " *";
  color: var(--danger-color);
}

.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  padding: 10px 14px;
  border-radius: var(--border-radius-md);
  font-size: 13px;
  color: var(--text-primary);
  transition: all var(--transition-fast);
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px var(--accent-glow);
  outline: none;
}

.form-row-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.form-row-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

/* Color picker inside product modal */
.color-picker-grid {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 4px 0;
}

.color-option-label {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid transparent;
  transition: transform var(--transition-fast);
}

.color-option-label:hover {
  transform: scale(1.1);
}

.color-option-label input {
  display: none;
}

.color-option-label span {
  width: 8px;
  height: 8px;
  background-color: white;
  border-radius: 50%;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.color-option-label input:checked + span {
  opacity: 1;
}

/* --- MODALS OVERLAY SYSTEM --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(8, 12, 20, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
  
  /* GPU Hardware Acceleration to eliminate Chromium backdrop-filter paint jitter (shaking) */
  will-change: opacity;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: translate3d(0, 0, 0);
  -webkit-transform: translate3d(0, 0, 0);
}

body:has(.modal-overlay.active) {
  overflow: hidden;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  width: 100%;
  max-width: 500px;
  border-radius: var(--border-radius-lg);
  padding: 24px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  max-height: 90vh;
  overflow-y: auto;
  
  /* Retain scale transition but promote to independent GPU composite layer to cure shaking on hover/focus */
  transition: transform var(--transition-normal), background var(--transition-normal), border var(--transition-normal), box-shadow var(--transition-normal);
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: scale(0.95) translate3d(0, 0, 0);
  -webkit-transform: scale(0.95) translate3d(0, 0, 0);
}

.modal-overlay.active .modal-card {
  transform: scale(1) translate3d(0, 0, 0);
  -webkit-transform: scale(1) translate3d(0, 0, 0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--glass-border);
}

.modal-header h3 {
  font-size: 18px;
  font-weight: 700;
}

.modal-close-btn {
  font-size: 24px;
  font-weight: 300;
  cursor: pointer;
  color: var(--text-secondary);
  line-height: 1;
  transition: color var(--transition-fast);
}

.modal-close-btn:hover {
  color: var(--danger-color);
}

.modal-footer-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--glass-border);
}

/* RECEIPT MODAL SPECIFIC */
.receipt-modal-card {
  max-width: 400px;
}

.receipt-scroll-area {
  max-height: 60vh;
  overflow-y: auto;
  padding-right: 4px;
}

.paper-receipt {
  background-color: #ffffff;
  color: #1e293b;
  padding: 24px;
  border-radius: 4px;
  font-family: 'Courier New', Courier, monospace;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
  border: 1px solid #e2e8f0;
}

.paper-receipt h4 {
  font-family: 'Courier New', Courier, monospace;
  font-weight: bold;
  text-align: center;
  font-size: 16px;
  margin-bottom: 6px;
}

.paper-receipt p {
  font-size: 11px;
  line-height: 1.4;
  margin-bottom: 4px;
}

.receipt-divider {
  border-top: 1px dashed #94a3b8;
  margin: 12px 0;
}

.receipt-table {
  width: 100%;
  font-size: 11px;
  margin: 12px 0;
}

.receipt-table th {
  border-bottom: 1px dashed #94a3b8;
  padding-bottom: 4px;
  font-weight: bold;
  text-align: left;
}

.receipt-table td {
  padding: 6px 0;
}

.receipt-totals {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  align-items: flex-end;
}

.receipt-totals div {
  width: 100%;
  display: flex;
  justify-content: space-between;
}

.receipt-total-large {
  font-size: 14px;
  font-weight: bold;
  border-top: 1px dashed #94a3b8;
  padding-top: 6px;
  margin-top: 4px;
}

.receipt-footer-msg {
  text-align: center;
  font-size: 10px;
  margin-top: 20px;
  color: #64748b;
}

/* --- TOAST NOTIFICATION CONTAINER --- */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 500;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background-color: var(--bg-secondary);
  border-left: 4px solid var(--accent-color);
  border-radius: var(--border-radius-md);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  min-width: 250px;
  max-width: 380px;
  transform: translateX(120%);
  opacity: 0;
  transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast.show {
  transform: translateX(0);
  opacity: 1;
}

.toast i {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.toast-success { border-left-color: var(--success-color); }
.toast-success i { color: var(--success-color); }
.toast-warning { border-left-color: var(--warning-color); }
.toast-warning i { color: var(--warning-color); }
.toast-danger { border-left-color: var(--danger-color); }
.toast-danger i { color: var(--danger-color); }
.toast-info { border-left-color: var(--info-color); }
.toast-info i { color: var(--info-color); }

/* --- PREMIUM 2-BLOCK POS CART DESKTOP UPGRADE --- */
@media (min-width: 1025px) {
  .pos-layout {
    grid-template-columns: 1fr 410px !important;
    height: calc(100vh - 160px) !important;
    overflow: hidden !important;
  }
  
  .pos-cart-container {
    width: 410px !important;
    height: 100% !important;
    max-height: none !important;
    position: sticky !important;
    top: 110px !important;
    z-index: 10 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    overflow-y: hidden !important; /* Disable parent scrolling since we fit everything */
    padding-right: 0 !important;
  }
  
  .pos-cart-block {
    flex: 1 1 auto !important;
    min-height: 240px !important;
    height: 380px !important; /* Set fixed size so checkout fits below */
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
  }
  
  .cart-items-container {
    flex: 1 1 auto !important;
    min-height: 100px !important;
    height: 140px !important; /* Fixed inner scroll area */
    max-height: 150px !important;
    overflow-y: auto !important; /* Enable scroll inside cart list */
    margin-bottom: 6px !important;
    padding-right: 4px !important;
  }
  
  .pos-checkout-block {
    flex-shrink: 0 !important;
    height: auto !important;
    max-height: calc(100vh - 560px) !important;
    overflow-y: auto !important; /* Safe scroll in checkout block if needed */
  }

  .cart-summary {
    border-top: 1px dashed var(--border-color) !important;
    padding-top: 6px !important;
    margin-bottom: 0 !important;
  }
}

/* --- SUPER WIDE 3-COLUMN LAYOUT FOR ELDERLY ACCESSIBILITY (min-width: 1400px) --- */
@media (min-width: 1400px) {
  .pos-layout {
    grid-template-columns: 1fr 380px 400px !important;
    height: calc(100vh - 165px) !important;
    overflow: hidden !important;
    gap: 16px !important;
  }
  
  .pos-cart-container {
    display: contents !important; /* Flatten DOM wrapper so children become direct grid items */
  }
  
  .pos-cart-block {
    grid-column: 2 !important;
    height: 100% !important;
    min-height: auto !important;
    max-height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
  }
  
  .cart-items-container {
    height: auto !important;
    max-height: calc(100vh - 430px) !important; /* Much larger scroll area */
    overflow-y: auto !important;
    margin-bottom: 8px !important;
  }
  
  .pos-checkout-block {
    grid-column: 3 !important;
    height: 100% !important;
    max-height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    overflow-y: auto !important; /* Safe scroll for all select inputs */
  }
}

/* --- RESPONSIVE ADAPTATIONS --- */
@media (max-width: 1024px) {
  .pos-layout {
    grid-template-columns: 1fr;
    height: auto;
  }
  
  .pos-cart-container {
    height: auto;
    position: static;
  }
  
  .pos-grid {
    max-height: 500px;
  }
  
  .sidebar {
    width: 80px;
    align-items: center;
    padding: 20px 8px;
  }
  
  .brand-text, .menu-item span, .theme-label, .profile-info, .sidebar-copyright {
    display: none;
  }
  
  .brand-logo {
    width: 36px;
    height: 36px;
  }
  
  .logo-icon {
    width: 20px;
    height: 20px;
  }
  
  .menu-item {
    justify-content: center;
    padding: 12px;
  }
  
  .menu-item i {
    transform: none !important;
  }
  
  .main-content {
    margin-left: 80px;
  }
  
  .theme-toggle-container {
    padding: 6px;
  }
  
  .theme-toggle-btn {
    width: 24px;
    height: 24px;
    background: none !important;
  }
  
  .toggle-circle {
    top: 3px;
    left: 3px;
    transform: none !important;
    background: none !important;
    box-shadow: none !important;
  }
  

  
  .toggle-circle i {
    width: 16px;
    height: 16px;
  }
  
  .pos-controls {
    flex-wrap: wrap;
  }
  
  .category-tabs {
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 260px;
    height: 100vh;
    transform: translateX(-100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), background-color var(--transition-normal);
    z-index: 500;
    display: flex !important; /* Force flex display but control visibility via transform translate */
    box-shadow: none;
  }
  
  .sidebar.active {
    transform: translateX(0);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
  }
  
  .sidebar .brand-text, 
  .sidebar .menu-item span, 
  .sidebar .theme-label, 
  .sidebar .profile-info,
  .sidebar .sidebar-copyright {
    display: block !important;
  }
  
  .sidebar .menu-item {
    justify-content: flex-start !important;
    padding: 12px 16px !important;
  }
  
  .sidebar .theme-toggle-container {
    padding: 8px 12px !important;
  }
  
  .sidebar .theme-toggle-btn {
    width: 48px !important;
    height: 24px !important;
    background-color: var(--border-color) !important;
  }
  
  .sidebar .toggle-circle {
    width: 18px !important;
    height: 18px !important;
    background-color: white !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2) !important;
    transform: none !important;
  }
  

  
  .main-content {
    margin-left: 0;
  }
  
  .menu-toggle-btn {
    display: block;
    width: 40px;
    height: 40px;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
  }
  
  .menu-toggle-btn:hover {
    background-color: var(--border-color);
  }
  
  .top-header {
    padding: 0 20px;
  }
  
  .content-body {
    padding: 20px;
  }
  
  .form-row-grid, .form-row-grid-3 {
    grid-template-columns: 1fr;
  }
}

/* Printing receipt stylesheet */
@media print {
  body * {
    visibility: hidden;
  }
  #receipt-modal, #receipt-modal *, #paper-receipt-content, #paper-receipt-content *,
  #report-modal, #report-modal *, #paper-report-content, #paper-report-content * {
    visibility: visible;
  }
  #receipt-modal, #report-modal {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    background: none !important;
    backdrop-filter: none !important;
  }
  .print-footer-btn, .modal-header, .digital-receipt-box {
    display: none !important;
  }
  .receipt-modal-card {
    box-shadow: none !important;
    border: none !important;
    background: none !important;
  }
  .paper-receipt {
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    color: black !important;
    background: white !important;
  }
}

/* APG Lojix CRM Style Rules */
.badge-purple {
  background-color: rgba(139, 92, 246, 0.15);
  color: #a78bfa;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4.5px;
  border: 1px solid rgba(139, 92, 246, 0.25);
}

body.light-theme .badge-purple {
  background-color: rgba(109, 40, 217, 0.10);
  color: #6d28d9;
  border: 1px solid rgba(109, 40, 217, 0.15);
}

.badge-purple i {
  width: 12px;
  height: 12px;
}

#cart-customer-select {
  transition: all var(--transition-fast);
}

#cart-customer-select:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
  outline: none;
}

/* --- MOBILE MAXIMUM OPTIMIZATIONS (<= 576px) --- */
@media (max-width: 576px) {
  .top-header {
    height: 64px;
    padding: 0 16px;
  }
  
  .page-title-area h2 {
    font-size: 18px;
  }
  
  .page-title-area p {
    display: none; /* Hide subtitle to preserve top header row sanity */
  }
  
  .live-clock-card {
    padding: 6px 10px;
    font-size: 11px;
  }
  
  .live-clock-card i {
    width: 12px;
    height: 12px;
  }
  
  .content-body {
    padding: 16px 12px;
  }
  
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr) !important; /* Clean 2x2 grid for metrics cards */
    gap: 12px;
  }
  
  .metric-card {
    padding: 16px;
    gap: 10px;
  }
  
  .metric-value {
    font-size: 20px;
  }
  
  .metric-title {
    font-size: 10px;
  }
  
  .metric-icon-box {
    width: 28px;
    height: 28px;
    min-width: 28px;
    min-height: 28px;
    flex-shrink: 0;
  }
  
  .metric-icon-box i {
    width: 14px;
    height: 14px;
  }
  
  .metric-footer {
    font-size: 10px;
  }
  
  .dashboard-details-grid {
    gap: 16px;
  }
  
  .chart-container-card {
    grid-column: span 12 !important; /* Stack charts vertically */
  }
  
  .section-controls {
    padding: 16px;
    flex-direction: column;
    align-items: stretch;
  }
  
  .search-and-filters {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }
  
  .search-input-box {
    max-width: 100%;
    width: 100%;
  }
  
  .filter-dropdowns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
  }
  
  .custom-select {
    width: 100%;
    padding: 10px;
    font-size: 12px;
  }
  
  .section-controls > div {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 8px;
  }
  
  .section-controls .btn {
    width: 100%;
  }
  
  .pos-controls {
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
  }
  
  .pos-controls .search-input-box {
    max-width: 100%;
    width: 100%;
  }
  
  .category-tabs {
    max-width: 100%;
    width: 100%;
    margin-top: 8px;
  }
  
  .pos-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)) !important;
    gap: 12px;
    max-height: 400px;
  }
  
  .pos-card {
    padding: 12px;
  }
  
  .pos-card-price {
    font-size: 14px;
  }
  
  .cart-qty-val {
    width: 14px;
  }
  
  .cart-qty-btn {
    width: 20px;
    height: 20px;
  }
  
  .cart-item-total {
    min-width: 60px;
    font-size: 12px;
  }
  
  .modal-card {
    padding: 16px;
    width: 95%;
  }
  
  .modal-footer-actions {
    flex-direction: column-reverse;
    gap: 8px;
  }
  
  .modal-footer-actions .btn {
    width: 100%;
  }
}

/* ==========================================================================
   SAAS AUTHENTICATION GATEWAY STYLING
   ========================================================================== */

.auth-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  z-index: 1000;
  overflow: hidden;
  will-change: opacity;
}

/* Password Visibility Toggle Style */
.password-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.password-input-wrapper input {
  padding-right: 44px !important;
  width: 100%;
}

.btn-toggle-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  color: var(--text-secondary);
  transition: color var(--transition-fast), transform var(--transition-fast);
  opacity: 0.75;
  z-index: 5;
}

.btn-toggle-password:hover {
  color: #6b1d2f;
  opacity: 1;
  transform: translateY(-50%) scale(1.08);
}

.btn-toggle-password i,
.btn-toggle-password svg {
  width: 18px;
  height: 18px;
  pointer-events: none;
}

.auth-card {
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: row;
  border-radius: 0;
  box-shadow: none;
  background: #ffffff;
  overflow: hidden;
  z-index: 10;
  position: relative;
  animation: authFadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes authFadeIn {
  from { opacity: 0; transform: translateY(30px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Left Banner Styling - Luxury Closet Image and golden quote frame */
.auth-left-banner {
  flex: 1.1;
  background-image: url('luxury_closet.png');
  background-size: cover;
  background-position: center;
  padding: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  border-radius: 0;
  box-shadow: 6px 0 24px rgba(0, 0, 0, 0.02);
  z-index: 2;
}

.luxury-quote-frame {
  border: 1px solid #b8956c;
  padding: 40px 50px;
  background-color: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(5px);
  text-align: center;
  max-width: 320px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.quote-line {
  display: block;
  font-family: 'Playfair Display', 'Georgia', serif;
  font-size: 26px;
  font-weight: 300;
  color: #4a3e3d;
  letter-spacing: 0.12em;
  line-height: 1.8;
  text-transform: lowercase;
}

/* Right Form Panel - Elegant White/Grey, clean serif titles */
.auth-right-form {
  flex: 1.2;
  padding: 40px 80px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background-color: #ffffff;
  z-index: 1;
  overflow-y: auto;
}

.auth-logo-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 25px;
}

.auth-logo-img {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  border: 1px solid #111111;
  object-fit: contain;
  padding: 4px;
  background: #ffffff;
}

.auth-welcome-title {
  font-family: 'Playfair Display', 'Georgia', serif;
  font-size: 30px;
  font-weight: 400;
  color: #6b1d2f;
  text-align: center;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.auth-helper-text {
  font-size: 13.5px;
  color: #718096;
  text-align: center;
  margin-bottom: 30px;
}

.auth-form {
  display: none;
  flex-direction: column;
  gap: 16px;
}

.auth-form.active {
  display: flex;
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.input-with-icon .input-icon {
  position: absolute;
  left: 16px;
  color: #a0aec0;
  width: 18px;
  height: 18px;
  pointer-events: none;
  z-index: 4;
}

.input-with-icon input {
  width: 100%;
  padding: 13px 16px 13px 46px !important;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 14px;
  color: #2d3748;
  background: #ffffff;
  font-weight: 500;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.input-with-icon input:focus {
  border-color: #6b1d2f;
  box-shadow: 0 0 0 2px rgba(107, 29, 47, 0.08);
  outline: none;
}

.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
  margin-bottom: 8px;
  font-size: 13px;
}

.remember-me-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #4a5568;
  cursor: pointer;
  font-weight: 500;
  user-select: none;
}

.remember-me-checkbox input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkbox-custom {
  height: 16px;
  width: 16px;
  background-color: #ffffff;
  border: 1px solid #cbd5e0;
  border-radius: 4px;
  position: relative;
  transition: all 0.2s ease;
}

.remember-me-checkbox input:checked ~ .checkbox-custom {
  background-color: #6b1d2f;
  border-color: #6b1d2f;
}

.checkbox-custom:after {
  content: "";
  position: absolute;
  display: none;
}

.remember-me-checkbox input:checked ~ .checkbox-custom:after {
  display: block;
}

.remember-me-checkbox .checkbox-custom:after {
  left: 5px;
  top: 1.5px;
  width: 4px;
  height: 8px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.forgot-password-link {
  color: #6b1d2f;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.forgot-password-link:hover {
  color: #521624;
  text-decoration: underline;
}

.btn-wine {
  width: 100%;
  padding: 14px 20px;
  font-size: 14.5px;
  font-weight: 600;
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  background: #6b1d2f;
  border: none;
  color: white;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(107, 29, 47, 0.15);
  transition: all var(--transition-fast);
}

.btn-wine:hover {
  background: #521624;
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(107, 29, 47, 0.25);
}

.btn-outline-gold {
  width: 100%;
  padding: 13px 20px;
  font-size: 14.5px;
  font-weight: 500;
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  background: transparent;
  border: 1px solid #b8956c;
  color: #b8956c;
  border-radius: 8px;
  transition: all var(--transition-fast);
}

.btn-outline-gold:hover {
  background: #b8956c;
  color: white;
  transform: translateY(-1px);
}

.auth-security-footer {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 35px;
  padding: 14px 16px;
  background: #fafaf9;
  border-radius: 8px;
  border: 1px solid #f5f5f4;
}

.auth-security-footer .security-icon {
  color: #b8956c;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.auth-security-footer .security-text {
  font-size: 12px;
  color: #718096;
  line-height: 1.5;
  margin: 0;
  text-align: left;
}

/* Responsive auth styles */
@media (max-width: 992px) {
  .auth-card {
    flex-direction: column;
  }

  .auth-left-banner {
    display: none;
  }

  .auth-right-form {
    flex: 1;
    padding: 40px 30px;
  }
}

.auth-form .form-group label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
}

.auth-form .form-group input, 
.auth-form .form-group select {
  font-size: 14px;
  font-weight: 600;
  padding: 12px 14px;
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  color: var(--text-primary);
  border-radius: var(--border-radius-md);
  transition: all var(--transition-fast);
}

.auth-form .form-group input::placeholder {
  color: #a0aec0;
}

.auth-form .form-group input:focus, 
.auth-form .form-group select:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px var(--accent-glow);
  background-color: #ffffff;
  outline: none;
}

/* Responsive auth styles */
@media (max-width: 992px) {
  .auth-card {
    width: 100%;
    max-width: 500px;
    height: auto;
    flex-direction: column;
    border-radius: 20px;
  }

  .auth-left-banner {
    display: none;
  }

  .auth-right-form {
    padding: 40px 30px;
  }
}

/* Digital Receipt Selector Tabs styling */
.digital-receipt-box button.active {
  background: var(--accent-gradient) !important;
  color: white !important;
  border-color: transparent !important;
  box-shadow: 0 4px 12px var(--accent-glow) !important;
}

body.light-theme .digital-receipt-box button:not(.active) {
  background-color: #f1f5f9 !important;
  color: #64748b !important;
  border-color: #e2e8f0 !important;
}

body.light-theme .digital-receipt-box button:not(.active):hover {
  background-color: #e2e8f0 !important;
}

/* Force uppercase text styling inside form inputs and textareas visually (excluding password toggled to text) */
input[type="text"]:not(#login-password):not(#reg-password):not(#barcode-input), input[type="search"]:not(#barcode-input), textarea {
  text-transform: uppercase;
}

/* Barcode input preserves original case (mixed barcode formats) */
#barcode-input {
  text-transform: none !important;
}

/* ==========================================
   NETWORK STATUS BADGE (PWA & OFFLINE-FIRST)
   ========================================== */
.network-status-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--border-radius-full, 24px);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
  user-select: none;
}

.network-status-badge:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

.network-status-badge:active {
  transform: translateY(0);
}

.network-status-badge .status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  position: relative;
  transition: all 0.3s ease;
}

/* Online status */
.network-status-badge.online {
  border-color: rgba(16, 185, 129, 0.2);
}
.network-status-badge.online:hover {
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.05);
}
.network-status-badge.online .status-dot {
  background: #10b981; /* Emerald */
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.8), 0 0 4px rgba(16, 185, 129, 0.4);
}

/* Offline status */
.network-status-badge.offline {
  border-color: rgba(245, 158, 11, 0.2);
  background: rgba(245, 158, 11, 0.03);
}
.network-status-badge.offline:hover {
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.07);
}
.network-status-badge.offline .status-dot {
  background: #f59e0b; /* Amber */
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.8), 0 0 4px rgba(245, 158, 11, 0.4);
  animation: pulse-offline 2s infinite ease-in-out;
}

/* Syncing status */
.network-status-badge.syncing {
  border-color: rgba(59, 130, 246, 0.2);
  background: rgba(59, 130, 246, 0.03);
}
.network-status-badge.syncing:hover {
  border-color: rgba(59, 130, 246, 0.4);
  background: rgba(59, 130, 246, 0.07);
}
.network-status-badge.syncing .status-dot {
  background: #3b82f6; /* Blue */
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.8), 0 0 4px rgba(59, 130, 246, 0.4);
  animation: pulse-sync 1.2s infinite ease-in-out;
}

/* Animations */
@keyframes pulse-offline {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(0.9);
  }
}

@keyframes pulse-sync {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.4;
    transform: scale(0.85);
  }
}

/* Light theme support */
body.light-theme .network-status-badge {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.08);
  color: var(--text-primary);
}
body.light-theme .network-status-badge:hover {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.15);
}
body.light-theme .network-status-badge.online {
  border-color: rgba(16, 185, 129, 0.3);
}
body.light-theme .network-status-badge.online:hover {
  background: rgba(16, 185, 129, 0.05);
}
body.light-theme .network-status-badge.offline {
  border-color: rgba(245, 158, 11, 0.3);
}
body.light-theme .network-status-badge.offline:hover {
  background: rgba(245, 158, 11, 0.05);
}
body.light-theme .network-status-badge.syncing {
  border-color: rgba(59, 130, 246, 0.3);
}
body.light-theme .network-status-badge.syncing:hover {
  background: rgba(59, 130, 246, 0.05);
}


/* ==========================================================================
   BARCODE SCANNER SYSTEM - PDV (FAB + POPUP MODAL)
   ========================================================================== */

/* --- Floating Action Button (FAB) --- */
.barcode-fab {
  position: fixed;
  bottom: 36px;
  right: 36px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  box-shadow: 0 8px 32px rgba(16, 185, 129, 0.45), 0 0 0 0 rgba(16, 185, 129, 0.3);
  cursor: pointer;
  transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  position: fixed;
  animation: fabEntrance 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes fabEntrance {
  from { transform: scale(0) rotate(-30deg); opacity: 0; }
  to   { transform: scale(1) rotate(0deg);  opacity: 1; }
}

.barcode-fab:hover {
  transform: scale(1.1) translateY(-3px);
  box-shadow: 0 14px 40px rgba(16, 185, 129, 0.55), 0 0 0 8px rgba(16, 185, 129, 0.12);
}

.barcode-fab:active {
  transform: scale(0.96);
}

.barcode-fab-pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(16, 185, 129, 0.5);
  animation: fabPulse 2.2s infinite ease-out;
  pointer-events: none;
}

@keyframes fabPulse {
  0%   { transform: scale(1);    opacity: 0.8; }
  60%  { transform: scale(1.55); opacity: 0; }
  100% { transform: scale(1.55); opacity: 0; }
}

.barcode-fab-icon {
  width: 26px;
  height: 26px;
  color: white;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.25));
}

.barcode-fab-label {
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.9);
  text-transform: uppercase;
  line-height: 1;
}

/* FAB disabled state (scanner off) */
.barcode-fab.scanner-off {
  background: linear-gradient(135deg, #475569 0%, #334155 100%);
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.barcode-fab.scanner-off .barcode-fab-pulse {
  display: none;
}

/* --- Barcode Modal Overlay --- */
.barcode-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 500;
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 28px;
  animation: none;
}

.barcode-modal-overlay.active {
  display: flex;
  animation: barcodeOverlayIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes barcodeOverlayIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* --- Barcode Modal Card --- */
.barcode-modal-card {
  width: 100%;
  max-width: 580px;
  border-radius: 28px;
  overflow: hidden;
  background: linear-gradient(160deg,
    rgba(16, 185, 129, 0.08) 0%,
    rgba(15, 23, 42, 0.96) 40%
  ) !important;
  border: 1px solid rgba(16, 185, 129, 0.25) !important;
  box-shadow:
    0 0 0 1px rgba(16, 185, 129, 0.12),
    0 32px 64px -12px rgba(0, 0, 0, 0.6),
    0 0 80px -20px rgba(16, 185, 129, 0.2) !important;
  animation: barcodeModalSlideUp 0.32s cubic-bezier(0.34, 1.36, 0.64, 1);
  transform-origin: bottom center;
}

@keyframes barcodeModalSlideUp {
  from { transform: translateY(40px) scale(0.96); opacity: 0; }
  to   { transform: translateY(0)    scale(1);    opacity: 1; }
}

/* Flash states */
.barcode-modal-card.barcode-success-flash {
  border-color: rgba(16, 185, 129, 0.6) !important;
  box-shadow:
    0 0 0 1px rgba(16, 185, 129, 0.4),
    0 32px 64px -12px rgba(0, 0, 0, 0.6),
    0 0 60px -10px rgba(16, 185, 129, 0.4) !important;
  animation: barcodeSuccessPulse 0.4s ease;
}

.barcode-modal-card.barcode-error-flash {
  border-color: rgba(239, 68, 68, 0.6) !important;
  box-shadow:
    0 0 0 1px rgba(239, 68, 68, 0.4),
    0 32px 64px -12px rgba(0, 0, 0, 0.6),
    0 0 60px -10px rgba(239, 68, 68, 0.3) !important;
  animation: barcodeErrorShake 0.35s ease;
}

@keyframes barcodeSuccessPulse {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.012); }
  100% { transform: scale(1); }
}

@keyframes barcodeErrorShake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-6px); }
  40%       { transform: translateX(6px); }
  60%       { transform: translateX(-6px); }
  80%       { transform: translateX(6px); }
}

/* --- Modal Header --- */
.barcode-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid rgba(16, 185, 129, 0.12);
  gap: 12px;
}

.barcode-modal-title-group {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.barcode-modal-icon-wrap {
  position: relative;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.barcode-modal-pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(16, 185, 129, 0.4);
  animation: barcodePulseRing 2s infinite ease-out;
}

@keyframes barcodePulseRing {
  0%   { transform: scale(0.85); opacity: 0.8; }
  60%  { transform: scale(1.4);  opacity: 0; }
  100% { transform: scale(1.4);  opacity: 0; }
}

.barcode-modal-icon {
  width: 24px;
  height: 24px;
  color: #10b981;
  filter: drop-shadow(0 0 8px rgba(16, 185, 129, 0.6));
  position: relative;
  z-index: 1;
}

.barcode-modal-title {
  font-size: 13px;
  font-weight: 800;
  color: #10b981;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0;
  font-family: 'Outfit', sans-serif;
}

.barcode-modal-subtitle {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  margin: 3px 0 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 280px;
}

.barcode-modal-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.barcode-modal-toggle-wrap {
  display: flex;
  align-items: center;
  gap: 7px;
}

.barcode-modal-toggle-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.barcode-modal-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  font-size: 20px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.barcode-modal-close:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
  color: var(--danger-color);
}

/* --- Toggle Button (shared) --- */
.barcode-toggle-btn {
  width: 44px;
  height: 24px;
  border-radius: 12px;
  background-color: var(--border-color);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  position: relative;
  transition: background-color 0.25s ease, box-shadow 0.25s ease;
  padding: 0;
  flex-shrink: 0;
}

.barcode-toggle-btn.active {
  background-color: #10b981;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.barcode-toggle-circle {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 1px 4px rgba(0,0,0,0.35);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.barcode-toggle-btn.active .barcode-toggle-circle {
  transform: translateX(20px);
}

/* --- Modal Body --- */
.barcode-modal-body {
  padding: 20px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* --- Input Wrapper --- */
.barcode-modal-input-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(16, 185, 129, 0.05);
  border: 1.5px solid rgba(16, 185, 129, 0.25);
  border-radius: 16px;
  padding: 0 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.barcode-modal-input-wrap:focus-within {
  border-color: rgba(16, 185, 129, 0.55);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1), 0 0 24px -4px rgba(16, 185, 129, 0.2);
  background: rgba(16, 185, 129, 0.07);
}

.barcode-modal-input-icon {
  width: 20px;
  height: 20px;
  color: #10b981;
  flex-shrink: 0;
  filter: drop-shadow(0 0 5px rgba(16, 185, 129, 0.4));
}

.barcode-modal-input-field {
  flex: 1;
  background: none !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  padding: 14px 0 !important;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  text-transform: none !important;
  letter-spacing: 0.02em;
}

.barcode-modal-input-field::placeholder {
  font-size: 12.5px;
  font-weight: 400;
  color: var(--text-secondary);
  opacity: 0.65;
  text-transform: none !important;
}

.barcode-modal-input-field:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* --- Kbd hint --- */
.barcode-modal-kbd {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom-width: 2px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
  white-space: nowrap;
  flex-shrink: 0;
  font-family: monospace;
}

/* --- Last Scan --- */
.barcode-modal-last-scan {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--success-color);
  animation: fadeIn 0.25s ease;
}

.barcode-modal-last-scan span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: none !important;
}

/* --- Tips Section --- */
.barcode-modal-tips {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.025);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.barcode-tip-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85); /* High legibility contrast */
}

/* --- Light theme overrides --- */
body.light-theme .barcode-modal-card {
  background: linear-gradient(160deg,
    rgba(16, 185, 129, 0.06) 0%,
    rgba(255, 255, 255, 0.97) 40%
  ) !important;
}

body.light-theme .barcode-modal-input-wrap {
  background: rgba(16, 185, 129, 0.04);
  border-color: rgba(16, 185, 129, 0.3);
}

body.light-theme .barcode-modal-kbd {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.12);
}

body.light-theme .barcode-modal-tips {
  background: rgba(0, 0, 0, 0.025);
  border-color: rgba(0, 0, 0, 0.06);
}

/* --- Responsive --- */
@media (max-width: 640px) {
  .barcode-modal-card {
    border-radius: 24px 24px 0 0;
    max-width: 100%;
  }
  .barcode-modal-overlay {
    padding-bottom: 0;
    align-items: flex-end;
  }
  .barcode-fab {
    bottom: 24px;
    right: 20px;
    width: 64px;
    height: 64px;
  }
  .barcode-modal-subtitle {
    max-width: 180px;
  }
}

/* ==========================================================================
   SCAN CONFIRM CARD
   ========================================================================== */

.scan-confirm-card {
  position: fixed;
  /* 화면 정중앙 */
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  z-index: 999999 !important; /* 바코드 리더기 모달을 포함한 어떤 오버레이보다 무조건 위에 뜸 */
  width: min(520px, calc(100vw - 32px));
  background: linear-gradient(160deg,
    rgba(16, 185, 129, 0.26) 0%,
    rgba(15, 23, 42, 0.98) 45%
  ) !important;
  border: 2.5px solid rgba(16, 185, 129, 0.65) !important;
  border-radius: 32px;
  padding: 40px 32px 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow:
    0 0 0 1px rgba(16, 185, 129, 0.25),
    0 40px 100px -12px rgba(0, 0, 0, 0.95),
    0 0 120px -20px rgba(16, 185, 129, 0.45);
  text-align: center;
  /* 숨김 */
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.25s ease,
    transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.scan-confirm-card.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.05); /* 약간 크게 줌효과를 주어 존재감 향상 */
  pointer-events: auto;
}

.scan-confirm-card.error {
  background: linear-gradient(160deg,
    rgba(239, 68, 68, 0.26) 0%,
    rgba(15, 23, 42, 0.98) 45%
  ) !important;
  border-color: rgba(239, 68, 68, 0.65) !important;
  box-shadow:
    0 0 0 1px rgba(239, 68, 68, 0.25),
    0 40px 100px -12px rgba(0, 0, 0, 0.95),
    0 0 120px -20px rgba(239, 68, 68, 0.4);
}

/* Status row */
.scan-confirm-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.scan-confirm-icon {
  width: 26px;
  height: 26px;
  color: var(--success-color);
  filter: drop-shadow(0 0 8px rgba(16, 185, 129, 0.7));
  flex-shrink: 0;
}

.scan-confirm-card.error .scan-confirm-icon {
  color: var(--danger-color);
  filter: drop-shadow(0 0 8px rgba(239, 68, 68, 0.7));
}

.scan-confirm-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--success-color);
}

.scan-confirm-card.error .scan-confirm-label {
  color: var(--danger-color);
}

/* Product row */
.scan-confirm-product {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 100%;
}

.scan-confirm-color {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  flex-shrink: 0;
  box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

.scan-confirm-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  min-width: 0;
  width: 100%;
}

.scan-confirm-name {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  font-family: 'Outfit', sans-serif;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin: 0;
  text-transform: none;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scan-confirm-sku {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-secondary);
  font-family: monospace;
  letter-spacing: 0.05em;
  text-transform: none;
}

.scan-confirm-price-block {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 10px;
  margin-top: 4px;
}

.scan-confirm-price {
  font-size: 42px;
  font-weight: 900;
  color: var(--success-color);
  font-family: 'Outfit', sans-serif;
  letter-spacing: -0.04em;
  line-height: 1;
  filter: drop-shadow(0 0 12px rgba(16, 185, 129, 0.4));
}

.scan-confirm-qty {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.09);
  padding: 4px 10px;
  border-radius: 8px;
  line-height: 1;
}

/* Cart total row */
.scan-confirm-cart-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 12px 16px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

.scan-confirm-cart-total strong {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
  font-family: 'Outfit', sans-serif;
  letter-spacing: -0.02em;
}

/* Light theme */
body.light-theme .scan-confirm-card {
  background: linear-gradient(160deg,
    rgba(16, 185, 129, 0.12) 0%,
    rgba(255, 255, 255, 0.99) 45%
  ) !important;
  border-color: rgba(16, 185, 129, 0.38) !important;
  box-shadow:
    0 0 0 1px rgba(16, 185, 129, 0.15),
    0 30px 80px -15px rgba(99, 102, 241, 0.1),
    0 0 80px -30px rgba(16, 185, 129, 0.2) !important;
}

body.light-theme .scan-confirm-card.error {
  background: linear-gradient(160deg,
    rgba(239, 68, 68, 0.12) 0%,
    rgba(255, 255, 255, 0.99) 45%
  ) !important;
  border-color: rgba(239, 68, 68, 0.38) !important;
  box-shadow:
    0 0 0 1px rgba(239, 68, 68, 0.15),
    0 30px 80px -15px rgba(99, 102, 241, 0.1),
    0 0 80px -30px rgba(239, 68, 68, 0.2) !important;
}

body.light-theme .scan-confirm-cart-total {
  background: rgba(0,0,0,0.04);
  border-color: rgba(0,0,0,0.08);
}

body.light-theme .scan-confirm-qty {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text-secondary);
}

/* 모바일 */
@media (max-width: 480px) {
  .scan-confirm-card {
    padding: 24px 20px 20px;
    border-radius: 22px;
  }
  .scan-confirm-name  { font-size: 18px; }
  .scan-confirm-price { font-size: 34px; }
}

/* Progress Bar container */
.scan-confirm-progress {
  position: absolute;
  bottom: 2.5px;
  left: 2.5px;
  right: 2.5px;
  height: 6px;
  overflow: hidden;
  border-bottom-left-radius: 29px;
  border-bottom-right-radius: 29px;
  background: rgba(255, 255, 255, 0.05);
}

.scan-confirm-progress-fill {
  height: 100%;
  width: 100%;
  background: var(--success-color);
  box-shadow: 0 0 10px var(--success-color);
  transform-origin: left;
  transform: scaleX(0);
}

.scan-confirm-card.show .scan-confirm-progress-fill {
  animation: scanConfirmProgressAnim 4.5s linear forwards;
}

.scan-confirm-card.error .scan-confirm-progress-fill {
  background: var(--danger-color);
  box-shadow: 0 0 10px var(--danger-color);
}

body.light-theme .scan-confirm-progress {
  background: rgba(0, 0, 0, 0.05);
}

@keyframes scanConfirmProgressAnim {
  from {
    transform: scaleX(1);
  }
  to {
    transform: scaleX(0);
  }
}

/* Responsive progress bar corner radius adjustments */
@media (max-width: 480px) {
  .scan-confirm-progress {
    border-bottom-left-radius: 19px;
    border-bottom-right-radius: 19px;
  }
}

/* ==========================================================================
   SCAN HISTORY (inside barcode modal)
   ========================================================================== */

.barcode-scan-history {
  border: 1px solid rgba(16, 185, 129, 0.15);
  border-radius: 14px;
  overflow: hidden;
}

.barcode-history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 14px;
  background: rgba(16, 185, 129, 0.07);
  border-bottom: 1px solid rgba(16, 185, 129, 0.1);
}

.barcode-history-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--success-color);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.barcode-history-clear {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-secondary);
  background: none;
  border: none;
  cursor: pointer;
  padding: 3px 7px;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.barcode-history-clear:hover {
  color: var(--danger-color);
  background: rgba(239, 68, 68, 0.1);
}

.barcode-history-list {
  max-height: 190px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

/* Each history row */
.barcode-history-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: background 0.15s ease;
  animation: historyItemIn 0.25s cubic-bezier(0.34, 1.4, 0.64, 1);
}

@keyframes historyItemIn {
  from { opacity: 0; transform: translateX(-10px); }
  to   { opacity: 1; transform: translateX(0); }
}

.barcode-history-item:last-child { border-bottom: none; }

.barcode-history-item:hover { background: rgba(255,255,255,0.03); }

.barcode-history-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.barcode-history-item-name {
  flex: 1;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: none;
}

.barcode-history-item-qty {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  background: rgba(255,255,255,0.07);
  padding: 2px 6px;
  border-radius: 5px;
  white-space: nowrap;
}

.barcode-history-item-price {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--success-color);
  white-space: nowrap;
  font-family: 'Outfit', sans-serif;
}

.barcode-history-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: rgba(255,255,255,0.025);
  border-top: 1px solid rgba(255,255,255,0.06);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
}

.barcode-history-total {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-primary);
  font-family: 'Outfit', sans-serif;
}

/* Legacy classes kept for compatibility */
.barcode-scanner-banner {
  background: linear-gradient(135deg,
    rgba(16, 185, 129, 0.06) 0%,
    rgba(99, 102, 241, 0.06) 100%);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: var(--border-radius-lg);
  padding: 14px 16px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}

.barcode-scanner-banner.barcode-success-flash {
  border-color: rgba(16, 185, 129, 0.6) !important;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(16, 185, 129, 0.04) 100%) !important;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.15), 0 0 0 1px rgba(16, 185, 129, 0.3);
  animation: barcodeSuccessPulse 0.4s ease;
}

.barcode-scanner-banner.barcode-error-flash {
  border-color: rgba(239, 68, 68, 0.6) !important;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.10) 0%, rgba(239, 68, 68, 0.03) 100%) !important;
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.15), 0 0 0 1px rgba(239, 68, 68, 0.3);
  animation: barcodeErrorShake 0.35s ease;
}

@keyframes barcodeSuccessPulse {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.008); }
  100% { transform: scale(1); }
}

@keyframes barcodeErrorShake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-4px); }
  40%       { transform: translateX(4px); }
  60%       { transform: translateX(-4px); }
  80%       { transform: translateX(4px); }
}

.barcode-scanner-status {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
}

.barcode-pulse-ring {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid rgba(16, 185, 129, 0.35);
  animation: barcodePulseRing 2s infinite ease-out;
  pointer-events: none;
}

@keyframes barcodePulseRing {
  0%   { transform: translateY(-50%) scale(0.85); opacity: 0.8; }
  60%  { transform: translateY(-50%) scale(1.35); opacity: 0; }
  100% { transform: translateY(-50%) scale(1.35); opacity: 0; }
}

.barcode-icon-main {
  width: 22px;
  height: 22px;
  color: #10b981;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 0 6px rgba(16, 185, 129, 0.5));
}

.barcode-status-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1;
  min-width: 0;
}

.barcode-label {
  font-size: 11px;
  font-weight: 800;
  color: #10b981;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.barcode-sublabel {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: none;
}

.barcode-toggle-wrapper {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
}

.barcode-toggle-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.barcode-toggle-btn {
  width: 40px;
  height: 22px;
  border-radius: 11px;
  background-color: var(--border-color);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  position: relative;
  transition: background-color 0.25s ease, box-shadow 0.25s ease;
  padding: 0;
  flex-shrink: 0;
}

.barcode-toggle-btn.active {
  background-color: #10b981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}

.barcode-toggle-circle {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.barcode-toggle-btn.active .barcode-toggle-circle {
  transform: translateX(18px);
}

.barcode-input-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.barcode-input-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: var(--border-radius-md);
  padding: 0 12px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.barcode-input-wrapper:focus-within {
  border-color: rgba(16, 185, 129, 0.5);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12);
  background: rgba(16, 185, 129, 0.04);
}

.barcode-input-wrapper > i {
  width: 16px;
  height: 16px;
  color: #10b981;
  flex-shrink: 0;
}

.barcode-input-field {
  flex: 1;
  background: none !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  padding: 10px 0 !important;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  font-family: var(--font-primary);
  text-transform: none !important;
  letter-spacing: 0.02em;
}

.barcode-input-field::placeholder {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-secondary);
  opacity: 0.7;
  text-transform: none !important;
}

.barcode-input-field:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.barcode-kbd-hint {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom-width: 2px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
  white-space: nowrap;
  flex-shrink: 0;
  font-family: monospace;
}

.barcode-last-scan {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--success-color);
  padding: 0 2px;
  text-transform: none;
}

.barcode-last-scan span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: none !important;
}

body.light-theme .barcode-scanner-banner {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.05) 0%, rgba(99, 102, 241, 0.04) 100%);
  border-color: rgba(16, 185, 129, 0.25);
}

body.light-theme .barcode-input-wrapper {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(16, 185, 129, 0.25);
}

body.light-theme .barcode-kbd-hint {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.12);
  color: var(--text-secondary);
}

@media (max-width: 576px) {
  .barcode-scanner-banner {
    padding: 10px 12px;
  }
  .barcode-toggle-label {
    display: none;
  }
  .barcode-kbd-hint {
    display: none;
  }
}

/* Barcode Label Modal Screen Layout Fixes */
.label-controls-panel label {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 10px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  color: var(--text-primary) !important;
  cursor: pointer !important;
  user-select: none !important;
  text-align: left !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 4px 0 !important;
}

.label-controls-panel input[type="radio"],
.label-controls-panel input[type="checkbox"] {
  width: 18px !important;
  height: 18px !important;
  flex-shrink: 0 !important;
  cursor: pointer !important;
  margin: 0 !important;
  padding: 0 !important;
  accent-color: var(--accent-color) !important;
}

.label-controls-panel span {
  flex-grow: 1 !important;
  text-align: left !important;
  line-height: 1.3 !important;
}

/* ==========================================================================
   EAN-13 BARCODE LABEL PRINT SYSTEM (v1.32)
   ========================================================================== */

/* 1. Screen-only wrapper hidden by default (Render off-screen to ensure JsBarcode calculations work 100%) */
#print-labels-container {
  position: absolute !important;
  left: -9999mm !important;
  top: -9999mm !important;
  display: block !important;
}

/* 2. Print styles */
@media print {
  /* Hide only specific UI layers of Lojix, NOT html and body itself */
  .auth-container, 
  .app-container > *:not(.modal-overlay), 
  .modal-overlay:not(.active), 
  .toast-container, 
  #toast-container {
    display: none !important;
  }

  html, body {
    display: block !important;
    background: #ffffff !important;
    color: #000000 !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    height: auto !important;
  }

  /* Only show the print label container */
  #print-labels-container, #print-labels-container * {
    display: block !important;
  }

  #print-labels-container {
    display: block !important;
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    height: auto !important;
    background: #ffffff !important;
    color: #000000 !important;
    margin: 0 !important;
    padding: 0 !important;
    z-index: 9999999 !important;
  }

  /* [A] IMPRESSORA TÉRMICA DE ROLO (40mm x 30mm) */
  .print-mode-roll {
    width: 40mm !important;
    height: 30mm !important;
  }

  .print-mode-roll .print-label-item {
    width: 40mm !important;
    height: 30mm !important;
    box-sizing: border-box !important;
    padding: 2mm 3mm !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    background: #ffffff !important;
    color: #000000 !important;
    text-align: center !important;
    page-break-after: always !important;
    break-after: page !important;
    overflow: hidden !important;
  }

  /* [B] FOLHA ADESIVA A4 (Grade de 3 Colunas) */
  .print-mode-a4 {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 3mm !important;
    padding: 5mm !important;
    box-sizing: border-box !important;
    background: #ffffff !important;
  }

  .print-mode-a4 .print-label-item {
    height: 32mm !important; /* Standard Pimaco labels size */
    box-sizing: border-box !important;
    padding: 3mm 4mm !important;
    border: 1px dashed #dddddd !important; /* Cut margins */
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    background: #ffffff !important;
    color: #000000 !important;
    text-align: center !important;
    overflow: hidden !important;
  }

  /* Label elements typography during printing */
  .print-label-item .print-store-name {
    font-size: 7pt !important;
    font-weight: 800 !important;
    letter-spacing: 0.3px !important;
    text-transform: uppercase !important;
    border-bottom: 0.5px solid #000000 !important;
    width: 100% !important;
    text-align: center !important;
    margin-bottom: 1.5mm !important;
    line-height: 1 !important;
    color: #000000 !important;
  }

  .print-label-item .print-product-name {
    font-size: 8pt !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    width: 100% !important;
    text-align: center !important;
    line-height: 1.1 !important;
    color: #000000 !important;
  }

  .print-label-item .print-specs {
    font-size: 6.5pt !important;
    font-weight: 500 !important;
    color: #444444 !important;
    text-align: center !important;
    width: 100% !important;
    line-height: 1.1 !important;
    margin-bottom: 1mm !important;
  }

  .print-label-item .print-barcode-svg {
    width: 100% !important;
    max-height: 10mm !important;
    margin: 1mm 0 !important;
  }

  .print-label-item .print-price {
    font-size: 9pt !important;
    font-weight: 800 !important;
    border-top: 0.5px dashed #000000 !important;
    width: 100% !important;
    text-align: center !important;
    padding-top: 1mm !important;
    margin-top: 1mm !important;
    line-height: 1 !important;
    color: #000000 !important;
  }
}

@keyframes pulseGlow {
  0% {
    box-shadow: 0 0 8px rgba(236, 72, 153, 0.2);
    border-color: rgba(236, 72, 153, 0.25);
  }
  100% {
    box-shadow: 0 0 18px rgba(236, 72, 153, 0.45);
    border-color: rgba(236, 72, 153, 0.5);
  }
}

/* Employee Mode Dashboard Layout */
#view-dashboard.employee-mode #dash-revenue-card,
#view-dashboard.employee-mode #dash-profit-card,
#view-dashboard.employee-mode #dash-trend-chart-card {
  display: none !important;
}

@media (min-width: 1025px) {
  #view-dashboard.employee-mode #dash-category-chart-card,
  #view-dashboard.employee-mode #dash-alerts-card {
    grid-column: span 6 !important;
  }
}

@media (max-width: 1024px) {
  #view-dashboard.employee-mode #dash-category-chart-card,
  #view-dashboard.employee-mode #dash-alerts-card {
    grid-column: span 12 !important;
  }
}

/* Commission Seller Detail Header */
.commission-seller-header {
  display: none;
  margin-bottom: 20px;
  padding: 14px 20px;
  background: rgba(99, 102, 241, 0.08);
  border-left: 4px solid var(--accent-color);
  border-radius: var(--border-radius-md);
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  border-right: 1px solid rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.commission-seller-header span {
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
  color: var(--accent-color);
  display: block;
  letter-spacing: 0.08em;
}

.commission-seller-header h3 {
  margin: 4px 0 0;
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  font-family: 'Outfit', sans-serif;
  letter-spacing: -0.02em;
}

/* Light Theme overrides */
body.light-theme .commission-seller-header {
  background: rgba(99, 102, 241, 0.05);
  border-top-color: rgba(0, 0, 0, 0.03);
  border-right-color: rgba(0, 0, 0, 0.03);
  border-bottom-color: rgba(0, 0, 0, 0.03);
}

/* Exchange & Return Management Custom Styles */
.search-results-dropdown div {
  padding: 10px 12px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.15s ease, color 0.15s ease;
}

.search-results-dropdown div:hover {
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent-color);
}

body.light-theme .search-results-dropdown {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
}

body.light-theme .search-results-dropdown div {
  border-bottom-color: #f1f5f9;
  color: #334155;
}

body.light-theme .search-results-dropdown div:hover {
  background: #f1f5f9;
  color: var(--accent-color);
}

.exchange-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  transition: all 0.2s ease;
}

.exchange-item-row.active {
  background: rgba(99, 102, 241, 0.05);
  border-color: rgba(99, 102, 241, 0.3);
}

body.light-theme .exchange-item-row {
  background: #f8fafc;
}

body.light-theme .exchange-item-row.active {
  background: #e0e7ff;
  border-color: #818cf8;
}

.badge-exchange {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.badge-exchange-success {
  background-color: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-exchange-danger {
  background-color: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-exchange-neutral {
  background-color: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.3);
}


/* Exchange & Return Management Custom Styles */
.search-results-dropdown div {
  padding: 10px 12px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.15s ease, color 0.15s ease;
}

.search-results-dropdown div:hover {
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent-color);
}

body.light-theme .search-results-dropdown {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
}

body.light-theme .search-results-dropdown div {
  border-bottom-color: #f1f5f9;
  color: #334155;
}

body.light-theme .search-results-dropdown div:hover {
  background: #f1f5f9;
  color: var(--accent-color);
}

.exchange-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  transition: all 0.2s ease;
}

.exchange-item-row.active {
  background: rgba(99, 102, 241, 0.05);
  border-color: rgba(99, 102, 241, 0.3);
}

body.light-theme .exchange-item-row {
  background: #f8fafc;
}

body.light-theme .exchange-item-row.active {
  background: #e0e7ff;
  border-color: #818cf8;
}

.badge-exchange {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.badge-exchange-success {
  background-color: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-exchange-danger {
  background-color: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-exchange-neutral {
  background-color: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

/* --- Modal Tabbed Navigation & Color Chips --- */
.modal-tab-nav {
  scrollbar-width: none;
}
.modal-tab-nav::-webkit-scrollbar {
  display: none;
}
.tab-nav-item:hover {
  color: var(--text-primary) !important;
  border-bottom-color: rgba(var(--accent-color-rgb), 0.3) !important;
}
.tab-nav-item.active {
  color: var(--accent-color) !important;
  border-bottom-color: var(--accent-color) !important;
}
.color-option-radio {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid transparent;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}
.color-option-radio:hover {
  transform: scale(1.15);
}
.color-option-radio input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  cursor: pointer;
  margin: 0;
  border: 2px solid transparent;
}
.color-option-radio input[type="radio"]:checked {
  border: 2px solid var(--bg-card);
  box-shadow: 0 0 0 2px var(--accent-color);
}



/* --- Performance Dashboard Premium Styling --- */
.perf-section-group {
  border-top: 1px solid var(--border-color);
  padding-top: 28px;
  margin-top: 28px;
}

.perf-section-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.02em;
}

.perf-section-title i {
  color: var(--accent-color);
  width: 18px;
  height: 18px;
}

/* Tabular figures for monospaced number look in stats */
.tabular-nums {
  font-variant-numeric: tabular-nums;
}

/* Sleek Tables styling */
.perf-table-card {
  padding: 24px !important;
  border-radius: var(--border-radius-lg) !important;
  box-shadow: var(--glass-shadow);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.perf-table-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.05), var(--glass-shadow);
}

.perf-table-card table.data-table {
  width: 100%;
  border-collapse: collapse;
}

.perf-table-card table.data-table th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  padding: 12px 14px;
  border-bottom: 2px solid var(--border-color);
  font-weight: 700;
}

.perf-table-card table.data-table td {
  padding: 12px 14px;
  font-size: 13px;
  border-bottom: 1px solid var(--border-color);
  transition: background var(--transition-fast), color var(--transition-fast);
}

.perf-table-card table.data-table tr:last-child td {
  border-bottom: none;
}

.perf-table-card table.data-table tr:hover td {
  background: rgba(var(--accent-color-rgb), 0.03);
}

.perf-kpi-card {
  position: relative;
  overflow: hidden;
  padding: 24px;
  border-radius: var(--border-radius-lg);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
}

.perf-kpi-card:hover {
  transform: translateY(-4px);
  border-color: rgba(var(--accent-color-rgb), 0.35);
  box-shadow: 0 12px 30px rgba(var(--accent-color-rgb), 0.08), var(--glass-shadow);
}

.perf-kpi-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.perf-kpi-title {
  font-size: 11px;
  color: var(--text-secondary);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.8px;
}

.perf-kpi-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(var(--accent-color-rgb), 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-color);
  transition: background var(--transition-fast), color var(--transition-fast);
}

.perf-kpi-card:hover .perf-kpi-icon {
  background: var(--accent-gradient);
  color: var(--text-inverse);
}

.perf-kpi-icon i {
  width: 14px;
  height: 14px;
}

.perf-kpi-value {
  font-size: 26px;
  font-weight: 850;
  color: var(--text-primary);
  font-family: 'Outfit', sans-serif;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.perf-comparison-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.perf-comparison-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-radius: var(--border-radius-md);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  transition: all var(--transition-fast);
}

.perf-comparison-item:hover {
  background: rgba(var(--accent-color-rgb), 0.02);
  border-color: rgba(var(--accent-color-rgb), 0.2);
}

/* Responsive adjust for Grid layout 3 */

/* Responsive adjust for Grid layout 3 */
@media (max-width: 1200px) {
  .grid-layout-3 {
    grid-template-columns: 1fr 1fr !important;
  }
}
@media (max-width: 768px) {
  .grid-layout-2, .grid-layout-3 {
    grid-template-columns: 1fr !important;
  }
}

/* Dashboard Tabs styling */
.dashboard-tabs .tab-btn {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  padding: 10px 20px;
  font-size: 13.5px;
  font-weight: 700;
  border-radius: var(--border-radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 8px;
}

.dashboard-tabs .tab-btn.active {
  background: var(--accent-color);
  color: white;
  border-color: var(--accent-color);
  box-shadow: 0 4px 12px var(--accent-glow);
}

.dashboard-tabs .tab-btn:hover:not(.active) {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

.dashboard-tab-content {
  animation: fadeIn var(--transition-fast) ease-in-out;
}
