/* ==========================================================================
   Gadget Grid - Electronics Retail Customer Loyalty Management System Styles
   Theme Primary: #171717 | Coral: #F56F6A | Soft Pink: #F5A6A1 | Cream: #F8F3F3
   ========================================================================== */

:root {
  --primary: #171717;
  --sidebar-bg: #F9EEEE;
  --sidebar-hover: #F6DFDE;
  --sidebar-border: #F0D5D4;
  --coral: #F56F6A;
  --coral-soft: #F5A6A1;
  --coral-light: #FBEAEA;
  --coral-hover: #E85B56;
  --coral-glow: rgba(245, 111, 106, 0.25);
  
  --purple: #8B7CFF;
  --purple-light: #A79BFF;
  --purple-bg: #F4F1FE;
  
  --accent-primary: #F56F6A;
  --accent-soft: #F5A6A1;
  --accent-hover: #E85B56;
  
  --bg-main: #F8F3F3;
  --bg-secondary: #FBEAEA;
  --card-bg: #FFFFFF;
  --card-tint: #FFFAFA;
  --card-glass: rgba(255, 255, 255, 0.95);
  --card-glass-border: #F3DDDC;
  
  --text-dark: #171717;
  --text-muted: #736E6E;
  --border-color: #EEDCDA;
  
  --shadow-sm: 0 2px 6px rgba(245, 111, 106, 0.05);
  --shadow-md: 0 8px 24px -4px rgba(245, 111, 106, 0.08), 0 2px 6px -1px rgba(23, 23, 23, 0.03);
  --shadow-lg: 0 16px 36px -4px rgba(245, 111, 106, 0.12), 0 4px 12px -2px rgba(23, 23, 23, 0.03);
  --shadow-card: 0 4px 16px rgba(245, 111, 106, 0.07);
  
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --transition: all 0.24s cubic-bezier(0.16, 1, 0.3, 1);
  
  /* Status & Tier Colors (Harmonious with Soft Warm Palette) */
  --bronze: #E08244;
  --silver: #8A8594;
  --gold: #F59E0B;
  --diamond: #EC4899;
  --success: #10B981;
  --danger: #EF4444;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-dark);
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* App Layout */
.app-container {
  display: flex;
  min-height: 100vh;
}

/* SIDEBAR - Warm Soft Blush #F9EEEE */
.sidebar {
  width: 260px;
  background-color: var(--sidebar-bg);
  color: var(--text-dark);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  border-right: 1px solid var(--sidebar-border);
  box-shadow: 2px 0 14px rgba(245, 111, 106, 0.04);
}

.sidebar-header {
  padding: 22px 20px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--sidebar-border);
}

.brand-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.sidebar-brand-logo {
  max-width: 175px;
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
}

.brand-subtext {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.3px;
  line-height: 1.2;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: #181414;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(217, 20, 56, 0.25);
  flex-shrink: 0;
  overflow: hidden;
  padding: 3px;
}

.logo-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.logo-text h2 {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--text-dark);
}

.logo-text p {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
}

.sidebar-nav {
  flex: 1;
  padding: 20px 14px;
  overflow-y: auto;
}

.sidebar-nav ul {
  list-style: none;
}

.sidebar-nav li {
  margin-bottom: 6px;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 16px;
  color: var(--text-dark);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.sidebar-nav a i {
  font-size: 16px;
  width: 20px;
  text-align: center;
  color: var(--text-dark);
}

.sidebar-nav li:hover a {
  background-color: var(--sidebar-hover);
  color: var(--text-dark);
}

.sidebar-nav li.active a {
  background-color: var(--coral);
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(245, 111, 106, 0.3);
}

.sidebar-nav li.active a i {
  color: #FFFFFF;
}

.sidebar-footer {
  padding: 18px 20px;
  border-top: 1px solid var(--sidebar-border);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-badge {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-badge .avatar {
  width: 36px;
  height: 36px;
  background-color: var(--sidebar-hover);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary);
  font-size: 15px;
}

.admin-info h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-dark);
}

.admin-info p {
  font-size: 11px;
  color: var(--text-muted);
}

.btn-backup-trigger {
  width: 100%;
  padding: 9px 12px;
  background: var(--bg-main);
  border: 1px solid var(--sidebar-border);
  color: var(--text-dark);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition);
}

.btn-backup-trigger:hover {
  background: #EFE8E5;
  color: var(--text-dark);
}

/* MAIN CONTENT */
.main-content {
  margin-left: 260px;
  flex: 1;
  padding: 30px;
  min-width: 0;
}

/* TOP HEADER */
.top-header {
  display: none;
}

.header-title h1 {
  font-size: 22px;
  font-weight: 700;
  color: var(--primary);
}

.header-title p {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

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

.search-box {
  position: relative;
  width: 240px;
}

.search-box i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 14px;
}

.search-box input {
  width: 100%;
  padding: 8px 12px 8px 36px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 13px;
  outline: none;
  background-color: var(--bg-main);
  transition: var(--transition);
}

.search-box input:focus {
  border-color: var(--purple);
  background-color: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(109, 93, 251, 0.15);
}

.header-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dark);
  cursor: pointer;
  position: relative;
  transition: var(--transition);
}

.header-icon-btn:hover {
  background: var(--purple-bg);
  color: var(--purple);
}

.badge-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  background: var(--purple);
  border-radius: 50%;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 8px;
  border-left: 1px solid var(--border-color);
}

.admin-avatar-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), var(--purple-light));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-size: 16px;
}

.user-profile img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.user-profile span {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
}

/* PAGE VIEWS */
.page-view {
  display: none;
}

.page-view.active {
  display: block;
  animation: fadeIn 0.25s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===================== STORE OVERVIEW HERO ===================== */

.store-overview-banner {
  background: #FFFFFF;
  border-radius: var(--radius-xl);
  padding: 34px 36px;
  margin-bottom: 28px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
}

.store-overview-content {
  max-width: 620px;
}

.store-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  background: var(--purple-bg);
  border: 1px solid rgba(232, 111, 97, 0.2);
  border-radius: 30px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  color: var(--accent-primary);
  margin-bottom: 14px;
}

.store-status-dot {
  width: 7px;
  height: 7px;
  background-color: var(--success);
  border-radius: 50%;
}

.store-overview-title {
  font-size: 30px;
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1.2;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.store-overview-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 22px;
}

.store-overview-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.store-overview-quickpills {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 240px;
}

.quickpill-card {
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: var(--transition);
}

.quickpill-card:hover {
  background: #FFFFFF;
  border-color: var(--accent-soft);
  transform: translateX(3px);
}

.quickpill-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.quickpill-val {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text-dark);
}

.text-accent {
  color: var(--accent-primary);
}

/* ===================== CARDS & GLASS SURFACE ===================== */

.card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  margin-bottom: 24px;
  transition: var(--transition);
}

.glass-card {
  background: var(--card-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--card-glass-border);
  box-shadow: var(--shadow-md);
}

.glass-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: rgba(109, 93, 251, 0.25);
  transform: translateY(-3px);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.card-header h2 {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

/* STATS GRID */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  padding: 22px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.stat-card.glass-card {
  background: var(--card-glass);
  backdrop-filter: blur(16px);
  border: 1px solid var(--card-glass-border);
}

.stat-card.glass-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 32px -4px rgba(109, 93, 251, 0.15), 0 4px 10px -2px rgba(17, 24, 39, 0.04);
  border-color: rgba(109, 93, 251, 0.35);
}

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.stat-icon.purple { background: var(--purple-bg); color: var(--purple); }
.stat-icon.gold { background: #FEF3C7; color: var(--bronze); }
.stat-icon.green { background: #D1FAE5; color: var(--success); }
.stat-icon.blue { background: #E0F2FE; color: #0284C7; }

.stat-details h3 {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.6px;
}

.stat-value {
  font-size: 24px;
  font-weight: 800;
  color: var(--primary);
  margin: 2px 0;
}

.stat-desc {
  font-size: 11px;
  color: var(--text-muted);
}

/* DASHBOARD GRID */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
}

.grid-col-8 { grid-column: span 8; }
.grid-col-4 { grid-column: span 4; }
.grid-2-col { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }

/* MEMBERSHIP DISTRIBUTION BARS */
.membership-distribution {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dist-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dist-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
}

.dist-bar {
  height: 8px;
  background: var(--bg-main);
  border-radius: 4px;
  overflow: hidden;
}

.dist-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.4s ease;
}

.dist-fill.bronze { background-color: var(--bronze); }
.dist-fill.silver { background-color: var(--silver); }
.dist-fill.gold { background-color: var(--gold); }
.dist-fill.diamond { background-color: var(--diamond); }

.rule-box {
  background: var(--bg-main);
  padding: 14px;
  border-radius: var(--radius-md);
  font-size: 12px;
  color: var(--text-muted);
  border: 1px solid var(--border-color);
}

.rule-box h4 {
  color: var(--primary);
  font-size: 13px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ===================== SALES VELOCITY & TOP ELECTRONICS ===================== */

.sales-analytics-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.analytics-metrics-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  background: rgba(248, 250, 252, 0.85);
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.metric-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.metric-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.metric-value {
  font-size: 16px;
  font-weight: 800;
}

.sales-bars-visual {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sales-bar-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sales-bar-header {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dark);
}

.sales-bar-track {
  height: 8px;
  background: #EEF2F6;
  border-radius: 4px;
  overflow: hidden;
}

.sales-bar-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--purple), var(--purple-light));
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* TOP ELECTRONICS LIST */
.top-products-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.top-product-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(248, 250, 252, 0.85);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.top-product-item:hover {
  background: #FFFFFF;
  border-color: rgba(109, 93, 251, 0.3);
  box-shadow: 0 4px 14px rgba(109, 93, 251, 0.08);
  transform: translateX(4px);
}

.top-product-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.top-product-thumb {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.top-product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.top-product-meta h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

.top-product-meta h4:hover { color: var(--purple); }

.top-product-sub {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  gap: 8px;
}

.top-product-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.top-product-price {
  font-size: 13px;
  font-weight: 800;
  color: var(--primary);
  text-align: right;
}

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

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}

.data-table th {
  background: var(--bg-main);
  color: var(--text-muted);
  font-weight: 600;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-dark);
  vertical-align: middle;
}

.data-table tbody tr:hover {
  background-color: #F9FAFB;
}

.clickable-link {
  color: var(--purple);
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

.clickable-link:hover {
  text-decoration: underline;
}

/* TIER BADGES */
.tier-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tier-badge.bronze { background: #FEF3C7; color: #B45309; }
.tier-badge.silver { background: #F1F5F9; color: #475569; }
.tier-badge.gold { background: #FEF9C3; color: #A16207; }
.tier-badge.diamond { background: #CFFAFE; color: #0E7490; }

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary {
  background-color: var(--accent-primary);
  color: #FFFFFF;
}

.btn-primary:hover {
  background-color: var(--accent-hover);
  box-shadow: 0 4px 14px rgba(232, 111, 97, 0.3);
}

.btn-secondary {
  background-color: #FFFFFF;
  color: var(--text-dark);
  border-color: var(--border-color);
}

.btn-secondary:hover {
  background-color: var(--bg-main);
  border-color: #D6CBC6;
  color: var(--text-dark);
}

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

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

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 12px 24px;
  font-size: 14.5px;
}

.btn-icon {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-link {
  background: none;
  border: none;
  color: var(--accent-primary);
  font-weight: 700;
  cursor: pointer;
  font-size: 13px;
  transition: var(--transition);
}

.btn-link:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

/* CATEGORY FILTER CHIPS */
.category-chips-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 14px 2px;
  margin-bottom: 20px;
  scrollbar-width: thin;
}

.category-chip {
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 7px 16px;
  border-radius: 24px;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: var(--transition);
  outline: none;
}

.category-chip:hover {
  border-color: var(--accent-soft);
  color: var(--text-dark);
  background: #FCF9F8;
}

.category-chip.active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(232, 111, 97, 0.25);
}

/* SEARCH & ACTION BARS */
.page-actions-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  gap: 16px;
}

.search-filter-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.search-input-wrap {
  position: relative;
  width: 320px;
}

.search-input-wrap.width-full { width: 100%; }

.search-input-wrap i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.search-input-wrap input {
  width: 100%;
  padding: 9px 12px 9px 36px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 13px;
  background-color: var(--card-bg);
  outline: none;
}

.search-input-wrap input:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(109, 93, 251, 0.15);
}

/* PRODUCT ACTION THREE-DOT MENU */
.product-menu-container {
  position: relative;
  display: inline-block;
}

.product-action-menu-btn {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  color: var(--text-dark);
  font-size: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.product-action-menu-btn:hover,
.product-action-menu-btn.active {
  background: var(--sidebar-hover);
  border-color: var(--coral);
  color: var(--coral);
  transform: translateY(-1px);
}

.product-action-menu-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  min-width: 190px;
  padding: 6px;
  z-index: 120;
  display: none;
  flex-direction: column;
  gap: 4px;
  animation: fadeIn 0.15s ease;
}

.product-action-menu-dropdown.active {
  display: flex;
}

.product-menu-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  border: none;
  background: none;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dark);
  cursor: pointer;
  text-align: left;
  transition: var(--transition);
}

.product-menu-dropdown-item:hover {
  background: var(--sidebar-hover);
  color: var(--primary);
}

.product-menu-dropdown-item.danger {
  color: #DC2626;
}

.product-menu-dropdown-item.danger:hover {
  background: #FEE2E2;
  color: #B91C1C;
}

/* DELETE PRODUCTS MODAL STYLES */
.modal-delete-products {
  max-width: 720px;
  width: 95%;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
}

.delete-products-content {
  padding: 20px 24px 10px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
  flex: 1;
}

.delete-products-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.4;
  margin: 0;
}

.delete-products-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.delete-search-wrapper {
  flex: 1;
  min-width: 240px;
  position: relative;
}

.delete-search-wrapper i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 13px;
}

.delete-search-wrapper input {
  width: 100%;
  padding: 9px 12px 9px 36px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 13px;
  outline: none;
  background: var(--bg-main);
  transition: var(--transition);
}

.delete-search-wrapper input:focus {
  border-color: var(--coral);
  box-shadow: 0 0 0 3px rgba(245, 111, 106, 0.12);
}

.delete-actions-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
}

.select-all-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-dark);
  user-select: none;
}

.select-all-checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--coral);
}

.selected-count-badge {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  background: var(--sidebar-hover);
  color: var(--primary);
  border: 1px solid var(--sidebar-border);
}

.delete-products-scroll-list {
  overflow-y: auto;
  max-height: 380px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 4px;
}

.delete-product-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--card-bg);
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
}

.delete-product-row:hover {
  background: #FFF8F8;
  border-color: var(--coral-soft);
}

.delete-product-row.selected {
  border-color: #EF4444;
  background: #FEF2F2;
}

.delete-product-checkbox-wrap {
  display: flex;
  align-items: center;
}

.delete-product-checkbox-wrap input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #EF4444;
}

.delete-product-thumb {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.delete-product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}

.delete-product-info {
  flex: 1;
  min-width: 0;
}

.delete-product-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}

.delete-product-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.delete-product-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-muted);
}

.delete-product-pricing {
  text-align: right;
  flex-shrink: 0;
}

.delete-product-price {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-dark);
}

.delete-product-stock {
  font-size: 11px;
  color: var(--text-muted);
}

.btn-danger:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}


.form-select {
  padding: 9px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 13px;
  background-color: var(--card-bg);
  outline: none;
  cursor: pointer;
  color: var(--text-dark);
}

.form-select:focus {
  border-color: var(--purple);
}

.form-group .form-select {
  width: 100%;
}

/* CUSTOMER PROFILE VIEW */
.profile-header-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.profile-main {
  display: flex;
  align-items: center;
  gap: 20px;
}

.profile-avatar-large {
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, var(--purple), var(--purple-light));
  color: #FFFFFF;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 800;
  box-shadow: 0 6px 16px rgba(109, 93, 251, 0.3);
}

.profile-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.profile-title-row h2 {
  font-size: 22px;
  font-weight: 700;
}

.prof-id {
  font-size: 13px;
  color: var(--text-muted);
  margin: 4px 0 8px 0;
}

.prof-meta {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: var(--text-muted);
}

/* PROGRESS BAR */
.progress-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 700;
}

.progress-bar-bg {
  height: 12px;
  background-color: var(--bg-main);
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--purple), var(--purple-light));
  border-radius: 6px;
  transition: width 0.5s ease;
}

.progress-text {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.rewards-mini-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.reward-mini-item {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-main);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.reward-status-badge {
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
}

.reward-status-badge.available { background: #D1FAE5; color: var(--success); }
.reward-status-badge.used { background: #F3F4F6; color: var(--text-muted); }

/* PRODUCTS GRID */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 22px;
}

.product-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, border-color 0.25s ease;
  position: relative;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px -6px rgba(23, 23, 23, 0.08);
  border-color: var(--accent-soft);
}

.product-img-wrap {
  width: 100%;
  height: 200px;
  background: #FCF9F8;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  padding: 16px;
}

.product-img-wrap img {
  max-width: 85%;
  max-height: 85%;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.product-card:hover .product-img-wrap img {
  transform: scale(1.05);
}

.product-card-body {
  padding: 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.badge-cat {
  font-size: 11px;
  color: var(--accent-primary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 6px;
}

.product-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
  cursor: pointer;
  line-height: 1.35;
  transition: color 0.2s ease;
}

.product-title:hover {
  color: var(--accent-primary);
}

.product-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
}

.price-tag {
  font-size: 18px;
  font-weight: 800;
  color: var(--primary);
}

.points-tag {
  font-size: 12px;
  color: var(--gold);
  font-weight: 700;
}

.stock-tag {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.stock-tag.out-of-stock {
  color: var(--danger);
  font-weight: 700;
}

.offer-badge {
  background: var(--purple-bg);
  color: var(--accent-primary);
  border: 1px solid rgba(232, 111, 97, 0.15);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 14px;
}

.product-card-footer {
  margin-top: auto;
}

.product-card-footer .btn {
  width: 100%;
}

/* PRODUCT DETAIL VIEW */
.product-detail-card {
  padding: 36px;
}

.product-detail-layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 40px;
}

.product-detail-img-wrap {
  width: 100%;
  height: 380px;
  background: #FCF9F8;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.product-detail-img-wrap img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
}

.product-detail-info h1 {
  font-size: 28px;
  font-weight: 800;
  margin: 6px 0 16px 0;
}

.product-price-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.detail-price {
  font-size: 28px;
  font-weight: 800;
  color: var(--primary);
}

.detail-points-badge {
  background: #FEF3C7;
  color: var(--bronze);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
}

.stock-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 20px;
}

.stock-badge.in-stock { color: var(--success); }
.stock-badge.out-of-stock { color: var(--danger); }

.offer-box {
  background: var(--purple-bg);
  border: 1px solid rgba(109, 93, 251, 0.2);
  padding: 14px 18px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
  color: var(--purple);
}

.offer-box i { font-size: 20px; }

.detail-section {
  margin-bottom: 24px;
}

.detail-section h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--primary);
}

.detail-section p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
}

.specs-list {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.specs-list li {
  font-size: 13px;
  color: var(--text-dark);
  background: var(--bg-main);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

/* MEMBERSHIP & REWARDS CARDS */
.membership-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--purple-bg);
  border-color: rgba(109, 93, 251, 0.3);
}

.membership-banner i { font-size: 28px; }

.tiers-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.tier-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}

.tier-card:hover {
  transform: translateY(-8px) scale(1.01);
  box-shadow: 0 20px 40px -8px rgba(17, 24, 39, 0.12);
}

.tier-card-header {
  padding: 24px;
  text-align: center;
  color: #FFFFFF;
}

.tier-card-header.bronze { background: linear-gradient(135deg, #B45309, #D97706); }
.tier-card-header.silver { background: linear-gradient(135deg, #475569, #94A3B8); }
.tier-card-header.gold { background: linear-gradient(135deg, #B45309, #F59E0B); }
.tier-card-header.diamond { background: linear-gradient(135deg, #0E7490, #06B6D4); }

.tier-card-header i { font-size: 32px; margin-bottom: 8px; }
.tier-card-header h2 { font-size: 20px; font-weight: 800; }
.tier-spending-range { font-size: 13px; opacity: 0.9; }

.tier-card-body {
  padding: 20px;
}

.tier-card-body h4 {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.tier-card-body ul {
  list-style: none;
}

.tier-card-body li {
  font-size: 13px;
  margin-bottom: 10px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.rewards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.reward-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}

.reward-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 36px -6px rgba(109, 93, 251, 0.12);
  border-color: rgba(109, 93, 251, 0.35);
}

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

.reward-icon {
  width: 44px;
  height: 44px;
  background: var(--purple-bg);
  color: var(--purple);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

/* MODALS */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(17, 24, 39, 0.6);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-overlay.active {
  display: flex;
  animation: fadeIn 0.2s ease;
}

.modal-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 520px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  overflow: hidden;
}

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

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

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

.modal-card form {
  padding: 24px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-dark);
}

.form-group input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 14px;
  outline: none;
}

.form-group input:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(109, 93, 251, 0.15);
}

.modal-footer {
  padding-top: 16px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.calculation-summary-box {
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 16px;
}

.calc-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 6px;
}

.calc-note {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 8px;
  border-top: 1px dashed var(--border-color);
  padding-top: 6px;
}

/* BACKUP MODAL */
.backup-options-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

.backup-card h4 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
}

.backup-card p {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.border-danger {
  border-color: #FCA5A5;
  background: #FEF2F2;
}

/* UTILITY CLASSES */
.text-purple { color: var(--purple); }
.text-gold { color: var(--bronze); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.mt-4 { margin-top: 16px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.flex-wrap { flex-wrap: wrap; }

/* PRODUCT MANAGEMENT MODAL (wider) */
.modal-card-wide {
  max-width: 640px;
}

.modal-card-wide form {
  padding: 24px;
  max-height: 75vh;
  overflow-y: auto;
}

/* IMAGE UPLOAD */
.image-upload-area {
  margin-top: 4px;
}

.image-preview-box {
  width: 100%;
  height: 160px;
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: var(--bg-main);
  overflow: hidden;
  transition: var(--transition);
}

.image-preview-box:hover {
  border-color: var(--purple);
  background: var(--purple-bg);
}

.image-preview-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.upload-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 13px;
}

.upload-placeholder i {
  font-size: 28px;
  color: var(--purple-light);
}

/* TEXTAREA */
.form-textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 13px;
  font-family: inherit;
  resize: vertical;
  outline: none;
}

.form-textarea:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(109, 93, 251, 0.15);
}

/* PRODUCT CARD ACTIONS ROW */
.product-card-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.product-card-actions .btn {
  flex: 1;
}

/* Toast Notification */
.toast-notification {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: var(--primary);
  color: #FFFFFF;
  padding: 14px 22px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  z-index: 2000;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideInToast 0.3s ease-out;
}

@keyframes slideInToast {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ===================== CART SYSTEM ===================== */

/* Floating Cart Button */
.floating-cart-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 56px;
  height: 56px;
  background: var(--accent-primary);
  color: #FFFFFF;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(232, 111, 97, 0.35);
  z-index: 900;
  transition: var(--transition);
}

.floating-cart-btn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 10px 25px rgba(232, 111, 97, 0.45);
}

.cart-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--primary);
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 800;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #FFFFFF;
}

/* Cart Overlay */
.cart-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(17, 24, 39, 0.4);
  z-index: 950;
  display: none;
}

.cart-overlay.active { display: block; }

/* Cart Panel (slide-in right) */
.cart-panel {
  position: fixed;
  top: 0;
  right: -420px;
  width: 400px;
  height: 100vh;
  background: var(--card-bg);
  box-shadow: -4px 0 20px rgba(0,0,0,0.15);
  z-index: 960;
  display: flex;
  flex-direction: column;
  transition: right 0.3s ease;
}

.cart-panel.active { right: 0; }

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

.cart-panel-header h3 {
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

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

.cart-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  background: var(--bg-main);
}

.cart-item-img {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #F3F4F6;
  flex-shrink: 0;
}

.cart-item-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.cart-item-info h4 {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-item-info .cart-item-price {
  font-size: 14px;
  font-weight: 800;
  color: var(--primary);
}

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

.cart-qty-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}

.cart-qty-controls button {
  width: 26px;
  height: 26px;
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.cart-qty-controls button:hover {
  background: var(--purple-bg);
  border-color: var(--purple);
  color: var(--purple);
}

.cart-qty-controls span {
  font-size: 14px;
  font-weight: 700;
  min-width: 24px;
  text-align: center;
}

.cart-item-remove {
  align-self: flex-start;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
  padding: 4px;
  transition: var(--transition);
}

.cart-item-remove:hover { color: var(--danger); }

.cart-panel-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  background: var(--card-bg);
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
}

.cart-total-row strong {
  color: var(--purple);
  font-size: 18px;
}

.cart-empty-msg {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}

.cart-empty-msg i {
  font-size: 40px;
  margin-bottom: 12px;
  color: #D1D5DB;
}

/* Checkout Customer Search */
.customer-search-wrap {
  position: relative;
}

.customer-search-wrap input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 14px;
  outline: none;
}

.customer-search-wrap input:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(109, 93, 251, 0.15);
}

.customer-search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  z-index: 50;
  max-height: 200px;
  overflow-y: auto;
  display: none;
}

.customer-search-results.active { display: block; }

.cust-result-item {
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
}

.cust-result-item:last-child { border-bottom: none; }

.cust-result-item:hover { background: var(--purple-bg); }

.cust-result-item strong {
  display: block;
  font-size: 13px;
}

.cust-result-item small {
  color: var(--text-muted);
  font-size: 11px;
}

.cust-result-add-new {
  padding: 10px 14px;
  cursor: pointer;
  background: var(--purple-bg);
  color: var(--purple);
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.cust-result-add-new:hover { background: #E0DAFE; }

.selected-customer-info {
  margin-top: 8px;
  padding: 10px 14px;
  background: #D1FAE5;
  border: 1px solid #6EE7B7;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  color: #065F46;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.selected-customer-info .clear-cust {
  background: none;
  border: none;
  color: #065F46;
  cursor: pointer;
  font-size: 16px;
}

/* Inline New Customer Form */
.inline-new-customer {
  padding: 14px;
  background: var(--purple-bg);
  border: 1px solid rgba(109, 93, 251, 0.2);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
}

.inline-new-customer h4 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Checkout Cart Summary */
.checkout-cart-summary {
  margin-bottom: 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.checkout-summary-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  font-size: 13px;
  border-bottom: 1px solid var(--border-color);
}

.checkout-summary-item:last-child { border-bottom: none; }

.checkout-summary-item .item-name {
  font-weight: 600;
}

.checkout-summary-item .item-detail {
  color: var(--text-muted);
}

/* ===================== END CART ===================== */

/* ==========================================================================
   ENHANCED 3D HERO, KPI CARDS, SALES CHART, DONUT CHART & REVENUE STYLES
   ========================================================================== */

/* HEADER SEARCH & DROPDOWN ENHANCEMENTS */
.header-left-col {
  flex: 1;
  max-width: 480px;
}

.header-global-search {
  position: relative;
  width: 100%;
}

.header-global-search i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 14px;
  pointer-events: none;
}

.header-global-search input {
  width: 100%;
  padding: 10px 16px 10px 42px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 13.5px;
  outline: none;
  background-color: var(--bg-main);
  transition: var(--transition);
  color: var(--text-dark);
}

.header-global-search input:focus {
  border-color: var(--purple);
  background-color: #FFFFFF;
  box-shadow: 0 0 0 4px rgba(109, 93, 251, 0.12);
}

.global-search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: #FFFFFF;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  max-height: 380px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
}

.global-search-results.active {
  display: block;
  animation: fadeIn 0.2s ease-in-out;
}

.gs-group-header {
  padding: 8px 14px;
  background: #F8FAFC;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-color);
}

.gs-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid #F1F5F9;
  cursor: pointer;
  transition: background 0.15s ease;
}

.gs-item:hover {
  background: var(--purple-bg);
}

.gs-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.gs-item-left i {
  color: var(--purple);
  font-size: 14px;
}

.gs-item-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dark);
}

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

.sidebar-cart-badge {
  background: var(--purple);
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 12px;
  margin-left: auto;
  min-width: 18px;
  text-align: center;
}

/* User Profile Dropdown */
.dropdown-trigger {
  position: relative;
  cursor: pointer;
}

.user-meta-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.user-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
}

.user-role-badge {
  font-size: 10.5px;
  color: var(--purple);
  font-weight: 600;
}

.user-dropdown-caret {
  font-size: 11px;
  color: var(--text-muted);
  margin-left: 4px;
  transition: transform 0.2s ease;
}

.user-profile-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 210px;
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 8px 0;
  z-index: 1000;
  display: none;
}

.user-profile-dropdown.active {
  display: block;
  animation: fadeIn 0.2s ease-in-out;
}

.dropdown-header {
  padding: 10px 16px 8px;
}

.dropdown-header strong {
  display: block;
  font-size: 13px;
  color: var(--text-dark);
}

.dropdown-header small {
  color: var(--text-muted);
  font-size: 11px;
}

.dropdown-divider {
  height: 1px;
  background: #E2E8F0;
  margin: 6px 0;
}

.user-profile-dropdown a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-dark);
  text-decoration: none;
  transition: background 0.15s ease;
}

.user-profile-dropdown a:hover {
  background: var(--purple-bg);
  color: var(--purple);
}

/* ==========================================================================
   LARGE WARM PEACH & BLUSH HERO SECTION (Reference Matched)
   ========================================================================== */
.dashboard-hero-card {
  position: relative;
  background: linear-gradient(135deg, #FDF4F3 0%, #FBEAEA 50%, #F9E2E1 100%);
  border-radius: var(--radius-xl);
  padding: 44px 48px;
  margin-bottom: 28px;
  border: 1px solid #F3DDDC;
  box-shadow: 0 10px 30px -8px rgba(245, 111, 106, 0.12), 0 4px 12px rgba(23, 23, 23, 0.02);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 40px;
  overflow: hidden;
}

.hero-bg-accent {
  position: absolute;
  top: -30%;
  right: -10%;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(245, 166, 161, 0.35) 0%, rgba(251, 234, 234, 0.2) 50%, transparent 70%);
  filter: blur(55px);
  pointer-events: none;
}

.hero-grid-pattern {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(245, 111, 106, 0.08) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}

.hero-welcome-left {
  position: relative;
  z-index: 2;
  max-width: 540px;
  color: var(--text-dark);
}

.hero-heading {
  font-size: 38px;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 14px;
  letter-spacing: -0.8px;
  color: #171717;
}

.hero-description {
  font-size: 15px;
  color: #5C5656;
  line-height: 1.6;
  margin-bottom: 28px;
  font-weight: 500;
}

.hero-btn-group {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.btn-hero-coral {
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 700;
  border-radius: var(--radius-md);
  background: var(--coral);
  color: #FFFFFF;
  border: none;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(245, 111, 106, 0.35);
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-hero-coral:hover {
  background: var(--coral-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(245, 111, 106, 0.42);
}

.btn-hero-white {
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 700;
  border-radius: var(--radius-md);
  background: #FFFFFF;
  color: #171717;
  border: 1px solid var(--border-color);
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(245, 111, 106, 0.08);
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-hero-white:hover {
  background: #FFF5F5;
  border-color: var(--coral-soft);
  transform: translateY(-2px);
  color: var(--coral);
}

/* 3D ELECTRONICS VISUAL STAGE - PREMIUM COMPOSITION */
.hero-stage-right {
  position: relative;
  width: 440px;
  height: 330px;
  flex-shrink: 0;
  perspective: 1200px;
}

.scene-3d-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.15s ease-out;
}

.scene-glow-disc {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 340px;
  height: 340px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(245, 166, 161, 0.45) 0%, rgba(251, 234, 234, 0.25) 50%, transparent 70%);
  filter: blur(40px);
  border-radius: 50%;
  pointer-events: none;
}

.scene-circuit-rings {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 300px;
  height: 300px;
  transform: translate(-50%, -50%);
  border: 1px dashed rgba(245, 111, 106, 0.2);
  border-radius: 50%;
  pointer-events: none;
  animation: rotateCircuit 40s linear infinite;
}

@keyframes rotateCircuit {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

.scene-layer {
  position: absolute;
  will-change: transform;
  transition: transform 0.14s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Product Render Wrapper & Badges (Clean Soft Lighting) */
.product-render-wrap {
  position: relative;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), filter 0.35s ease;
  cursor: pointer;
}

.product-render-wrap:hover {
  transform: scale(1.04) translateY(-4px);
  filter: drop-shadow(0 14px 22px rgba(245, 111, 106, 0.25));
}

.render-img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.render-floating-tag {
  position: absolute;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 4px 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 14px rgba(245, 111, 106, 0.12);
  pointer-events: none;
  opacity: 0;
  transform: translateY(6px);
  transition: all 0.25s ease;
  white-space: nowrap;
}

.product-render-wrap:hover .render-floating-tag {
  opacity: 1;
  transform: translateY(0);
}

.render-floating-tag span {
  font-size: 11px;
  font-weight: 700;
  color: #171717;
}

.render-floating-tag strong {
  font-size: 11px;
  font-weight: 800;
  color: var(--coral);
}

/* 1. LAPTOP (Center-Back Anchor) */
.layer-laptop-product {
  top: 15px;
  left: 60px;
  width: 290px;
  z-index: 3;
}

.tag-laptop {
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%) translateY(6px);
}
.product-render-wrap:hover .tag-laptop {
  transform: translateX(-50%) translateY(0);
}

/* 2. SMARTPHONE (Front-Left Overlapping Laptop) */
.layer-phone-product {
  top: 60px;
  left: 10px;
  width: 135px;
  z-index: 6;
}

.phone-render {
  animation: floatPhone 6s ease-in-out infinite;
}

@keyframes floatPhone {
  0%, 100% { transform: translateY(0) rotate(-5deg); }
  50% { transform: translateY(-6px) rotate(-3deg); }
}

.phone-render:hover {
  animation-play-state: paused;
}

.tag-phone {
  bottom: 15px;
  left: 10px;
}

/* 3. OVER-EAR HEADPHONES (Back-Right Floating Depth) */
.layer-headphones-product {
  top: -5px;
  right: 15px;
  width: 175px;
  z-index: 4;
}

.headphones-render {
  animation: floatHeadphones 7s ease-in-out infinite;
}

@keyframes floatHeadphones {
  0%, 100% { transform: translateY(0) rotate(6deg); }
  50% { transform: translateY(-7px) rotate(4deg); }
}

.headphones-render:hover {
  animation-play-state: paused;
}

.tag-headphones {
  top: 15px;
  right: 0px;
}

/* 4. SMARTWATCH (Foreground-Right Side) */
.layer-watch-product {
  bottom: 25px;
  right: 25px;
  width: 120px;
  z-index: 7;
}

.watch-render {
  animation: floatWatch 5.5s ease-in-out infinite;
}

@keyframes floatWatch {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50% { transform: translateY(-5px) rotate(-2deg); }
}

.watch-render:hover {
  animation-play-state: paused;
}

.tag-watch {
  bottom: 10px;
  right: 5px;
}

/* 5. WIRELESS EARBUDS & CASE (Foreground-Center Floating) */
.layer-earbuds-product {
  bottom: 10px;
  left: 130px;
  width: 140px;
  z-index: 8;
}

.earbuds-render {
  animation: floatEarbuds 5s ease-in-out infinite;
}

@keyframes floatEarbuds {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.earbuds-render:hover {
  animation-play-state: paused;
}

.tag-earbuds {
  top: 5px;
  left: 20px;
}

/* Floating 3D Loyalty Coin (Coral/Gold) */
.layer-coin {
  top: 30px;
  right: 175px;
  z-index: 9;
}

.floating-loyalty-coin {
  position: relative;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, #F5A6A1, #F56F6A);
  border: 2px solid #FFFFFF;
  box-shadow: 0 8px 18px rgba(245, 111, 106, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: floatCoin 4s ease-in-out infinite;
}

@keyframes floatCoin {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.coin-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
  color: #FFFFFF;
}

.coin-inner i {
  font-size: 11px;
  margin-bottom: 2px;
}

.coin-inner span {
  font-size: 12px;
  font-weight: 800;
}

.coin-inner small {
  font-size: 7.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* Floating VIP Diamond Chip */
.layer-vip {
  bottom: 20px;
  left: 15px;
  z-index: 9;
}

.floating-vip-chip {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid #F3DDDC;
  border-radius: 24px;
  padding: 6px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #171717;
  box-shadow: 0 6px 16px rgba(245, 111, 106, 0.12);
}

.floating-vip-chip strong {
  display: block;
  font-size: 10.5px;
  color: var(--coral);
}

.floating-vip-chip small {
  font-size: 9px;
  color: var(--text-muted);
}

/* ==========================================================================
   KPI CARDS ENHANCEMENTS & SPARKLINES (Warm White + Subtle Pink Shadow)
   ========================================================================== */
.kpi-card-enhanced {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 16px;
  padding: 22px 20px;
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 18px rgba(245, 111, 106, 0.06);
  transition: var(--transition);
}

.kpi-card-enhanced:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(245, 111, 106, 0.12);
  border-color: var(--coral-soft);
}

.stat-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.stat-icon-wrap.purple-glow {
  background: #FFF1F2;
  color: var(--coral);
  box-shadow: 0 4px 12px rgba(245, 111, 106, 0.15);
}

.stat-icon-wrap.gold-glow {
  background: #FEF3C7;
  color: #D97706;
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.15);
}

.stat-icon-wrap.blue-glow {
  background: #FDF2F8;
  color: #DB2777;
  box-shadow: 0 4px 12px rgba(219, 39, 119, 0.15);
}

.stat-icon-wrap.cyan-glow {
  background: #F5EEFD;
  color: #9333EA;
  box-shadow: 0 4px 12px rgba(147, 51, 234, 0.15);
}

.stat-details {
  flex: 1;
  min-width: 0;
}

.kpi-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.6px;
}

.kpi-value-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 3px 0 6px;
}

.kpi-value-row .stat-value {
  font-size: 24px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}

.trend-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 12px;
}

.trend-badge.trend-up {
  background: #FEE2E2;
  color: #991B1B;
}

.kpi-sparkline-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.kpi-sparkline {
  width: 70px;
  height: 18px;
  flex-shrink: 0;
}

/* ==========================================================================
   SALES OVERVIEW SVG CHART & METRICS STRIP
   ========================================================================== */
.sales-chart-wrapper {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sales-chart-metrics-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  background: #FFF9F9;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.strip-metric small {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.strip-metric strong {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-dark);
}

.sales-svg-chart-container {
  width: 100%;
  height: 180px;
  position: relative;
  background: #FFF5F5;
  border-radius: var(--radius-md);
  padding: 10px 14px;
  border: 1px solid #FCE7F3;
  overflow: hidden;
}

.sales-trend-svg {
  width: 100%;
  height: 100%;
}

.sales-month-labels-row {
  display: flex;
  justify-content: space-between;
  padding: 0 14px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}

/* ==========================================================================
   DONUT CHART CONTAINER & LEGEND LIST
   ========================================================================== */
.donut-chart-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 10px 0;
}

.donut-svg-wrap {
  position: relative;
  width: 160px;
  height: 160px;
}

.donut-ring-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.donut-ring-svg circle {
  transition: stroke-dashoffset 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.donut-center-info {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;
}

.donut-center-val {
  display: block;
  font-size: 24px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}

.donut-center-info small {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
}

.donut-legend-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.donut-legend-item {
  display: grid;
  grid-template-columns: 12px 1fr auto 28px 40px;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  padding: 6px 10px;
  background: #F8FAFC;
  border-radius: var(--radius-sm);
  border: 1px solid #F1F5F9;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.legend-title {
  font-weight: 700;
  color: var(--text-dark);
}

.legend-spending {
  color: var(--text-muted);
  font-size: 11px;
}

.legend-count {
  font-weight: 800;
  color: var(--primary);
  text-align: right;
}

.legend-pct {
  color: var(--text-muted);
  text-align: right;
  font-weight: 600;
}

/* ==========================================================================
   TOP SELLING PRODUCTS GRID (Clean Retail Hover)
   ========================================================================== */
.top-selling-products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.top-selling-card {
  background: #FFF9F9;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.24s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.top-selling-card:hover {
  background: #FFFFFF;
  border-color: var(--coral-soft);
  transform: translateY(-4px);
  box-shadow: 0 10px 24px -4px rgba(245, 111, 106, 0.16);
}

.top-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.top-rank-badge {
  font-size: 10px;
  font-weight: 800;
  color: #B91C1C;
  background: #FEE2E2;
  padding: 2px 7px;
  border-radius: 8px;
}

.top-card-image-holder {
  width: 100%;
  height: 75px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}

.top-card-image-holder img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.25s ease;
}

.top-selling-card:hover .top-card-image-holder img {
  transform: scale(1.08);
}

.top-card-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

.top-card-title:hover {
  color: var(--purple);
}

.top-card-cat {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.top-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #EEF2F6;
  padding-top: 8px;
}

.top-card-price {
  font-size: 14px;
  font-weight: 800;
  color: var(--primary);
}

.top-card-pts {
  font-size: 10.5px;
  font-weight: 700;
  color: #D97706;
}

/* ==========================================================================
   LOYALTY PERFORMANCE METRICS & QUICK ACTIONS (Warm Clean Palette)
   ========================================================================== */
.loyalty-metrics-row-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.loyalty-sub-metric-card {
  background: #FFF9F9;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.sub-metric-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.loyalty-sub-metric-card small {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}

.loyalty-sub-metric-card strong {
  display: block;
  font-size: 16px;
  font-weight: 800;
  color: var(--primary);
  margin: 1px 0;
}

.sub-stat-note {
  font-size: 10.5px;
  font-weight: 600;
}

.quick-actions-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quick-action-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: #FFF9F9;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  width: 100%;
}

.quick-action-btn:hover {
  background: #FFFFFF;
  border-color: var(--coral-soft);
  box-shadow: 0 4px 12px rgba(245, 111, 106, 0.12);
  transform: translateX(3px);
}

.qa-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}

.qa-content {
  flex: 1;
}

.qa-content strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-dark);
}

.qa-content small {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
}

.qa-arrow {
  color: var(--text-muted);
  font-size: 11px;
}

/* ==========================================================================
   ANALYTICS & SETTINGS VIEW STYLES
   ========================================================================== */
.analytics-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.analytics-stat-card {
  background: #F8FAFC;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
}

.analytics-stat-card small {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.analytics-stat-card h3 {
  font-size: 22px;
  font-weight: 800;
  color: var(--primary);
  margin: 4px 0 2px;
}

.analytics-stat-card span {
  font-size: 11px;
  color: var(--text-muted);
}

.analytics-trends-box, .analytics-tier-breakdown {
  min-height: 180px;
}

.settings-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.setting-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: #F8FAFC;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.setting-item strong {
  font-size: 13.5px;
  color: var(--text-dark);
}

/* User avatar pill in recent transaction table */
.customer-table-pill {
  display: flex;
  align-items: center;
  gap: 10px;
}

.customer-table-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple-bg), #EDE9FE);
  color: var(--purple);
  font-weight: 700;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.points-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 12px;
  background: #FEF3C7;
  color: #D97706;
  font-weight: 700;
  font-size: 12px;
}

/* RESPONSIVE DESIGN */
@media (max-width: 1024px) {
  .dashboard-hero-card { flex-direction: column; align-items: flex-start; gap: 24px; padding: 28px; }
  .hero-stage-right { width: 100%; height: 260px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .tiers-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-col-8, .grid-col-4, .grid-col-6 { grid-column: span 12; }
  .product-detail-layout { grid-template-columns: 1fr; }
  .grid-2-col { grid-template-columns: 1fr; }
  .analytics-stat-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .dashboard-hero-card { padding: 22px 18px; }
  .hero-heading { font-size: 26px; }
  .hero-stage-right { display: none; }
  .sidebar { width: 70px; }
  .brand-subtext, .logo-text, .sidebar-nav span, .admin-info, .btn-backup-trigger span { display: none; }
  .main-content { margin-left: 70px; padding: 16px; }
  .stats-grid { grid-template-columns: 1fr; }
  .tiers-grid { grid-template-columns: 1fr; }
  .page-actions-bar { flex-direction: column; align-items: stretch; }
  .search-input-wrap { width: 100%; }
  .cart-panel { width: 100%; right: -100%; }
  .analytics-stat-grid { grid-template-columns: 1fr; }
  .top-selling-products-grid { grid-template-columns: 1fr; }
  .loyalty-metrics-row-cards { grid-template-columns: 1fr; }
}

/* REDUCED MOTION PREFERENCE (ACCESSIBILITY & PERFORMANCE) */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}


