@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

/* --- VARIABILI DESIGN SYSTEM --- */
:root {
  /* Temi Chiaro */
  --bg-primary: #f8fafc;
  --bg-secondary: #f1f5f9;
  --surface: rgba(255, 255, 255, 0.85);
  --border-color: rgba(226, 232, 240, 0.8);
  --text-main: #0f172a;
  --text-muted: #64748b;
  
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-light: #e0e7ff;
  --secondary: #7c3aed;
  
  --success: #10b981;
  --success-light: #d1fae5;
  --warning: #f59e0b;
  --warning-light: #fef3c7;
  --danger: #ef4444;
  --danger-light: #fee2e2;
  --info: #3b82f6;
  --info-light: #dbeafe;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.08);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.6);
  --glass-blur: blur(12px);
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

[data-theme="dark"] {
  /* Temi Scuro */
  --bg-primary: #0f172a;
  --bg-secondary: #020617;
  --surface: rgba(30, 41, 59, 0.85);
  --border-color: rgba(51, 65, 85, 0.5);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  
  --primary: #818cf8;
  --primary-hover: #6366f1;
  --primary-light: rgba(99, 102, 241, 0.15);
  --secondary: #a78bfa;
  
  --success: #34d399;
  --success-light: rgba(52, 211, 153, 0.15);
  --warning: #fbbf24;
  --warning-light: rgba(251, 191, 36, 0.15);
  --danger: #f87171;
  --danger-light: rgba(248, 113, 113, 0.15);
  --info: #60a5fa;
  --info-light: rgba(96, 165, 250, 0.15);
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -4px rgba(0, 0, 0, 0.4);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
  
  --glass-bg: rgba(15, 23, 42, 0.7);
  --glass-border: rgba(30, 41, 59, 0.5);
}

/* --- RESET & GLOBAL --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Inter', sans-serif;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* --- CLASSI DI STILE PREMIUM --- */
.gradient-text {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gradient-bg {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
}

.glass-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  gap: 8px;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(79, 70, 229, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(79, 70, 229, 0.45);
  filter: brightness(1.1);
}

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

.btn-secondary:hover {
  background-color: var(--border-color);
  transform: translateY(-1px);
}

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

.btn-danger:hover {
  background-color: #dc2626;
  transform: translateY(-2px);
}

/* --- BADGES DI STATO --- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 9999px;
  gap: 4px;
}

.badge-pending {
  background-color: var(--warning-light);
  color: #b45309;
}

.badge-completed {
  background-color: var(--success-light);
  color: #065f46;
}

.badge-in-prep {
  background-color: var(--info-light);
  color: #1e40af;
}

.badge-ready {
  background-color: var(--success-light);
  color: #065f46;
  animation: pulse-animation 1.5s infinite;
}

.badge-cancelled {
  background-color: var(--danger-light);
  color: #991b1b;
}

@keyframes pulse-animation {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

/* --- LAYOUT DEL SITO --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

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

.logo {
  font-size: 24px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 10px;
}

.theme-lang-switch {
  display: flex;
  align-items: center;
  gap: 12px;
}

select {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background-color: var(--surface);
  color: var(--text-main);
  font-weight: 500;
  cursor: pointer;
  outline: none;
}

/* --- CAROSELLO PROMO & COUNTDOWN --- */
.promo-carousel-wrapper {
  margin-bottom: 40px;
  overflow: hidden;
  position: relative;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}

.promo-slide {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.95) 0%, rgba(124, 58, 237, 0.95) 100%), url('/img/hero-pattern.png');
  padding: 30px;
  color: #ffffff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  position: relative;
}

.promo-info {
  flex: 1;
  min-width: 280px;
}

.promo-tag {
  background-color: rgba(255, 255, 255, 0.2);
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: inline-block;
  margin-bottom: 10px;
}

.promo-title {
  font-size: 28px;
  margin-bottom: 8px;
}

.promo-desc {
  font-size: 14px;
  opacity: 0.9;
  margin-bottom: 15px;
}

.promo-price-tag {
  display: flex;
  align-items: center;
  gap: 15px;
}

.original-price {
  text-decoration: line-through;
  opacity: 0.6;
  font-size: 18px;
}

.promo-price {
  font-size: 32px;
  font-weight: 800;
}

.discount-badge {
  background-color: var(--success);
  color: #ffffff;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 14px;
}

.promo-countdown-wrapper {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 15px 25px;
  border-radius: var(--radius-lg);
  text-align: center;
  min-width: 180px;
  backdrop-filter: var(--glass-blur);
}

.countdown-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.8;
  margin-bottom: 5px;
}

.countdown-timer {
  font-family: monospace;
  font-size: 24px;
  font-weight: 700;
}

/* --- TABELLE E GRIGLIE DI PRODOTTI --- */
.menu-section-title {
  font-size: 22px;
  margin-bottom: 20px;
  border-left: 4px solid var(--primary);
  padding-left: 10px;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 12px;
  margin-bottom: 50px;
}

.product-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s ease;
  position: relative;
  padding: 15px;
  gap: 15px;
  overflow: visible !important;
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-xl);
}

.product-popular-badge {
  position: absolute;
  top: -8px;
  right: 15px;
  background-color: var(--warning);
  color: #0f172a;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  z-index: 10;
  box-shadow: var(--shadow-sm);
}

/* Stili per la card in evidenza */
.product-card.featured-card {
  border: 1.5px solid var(--warning);
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.1);
}

.product-card.featured-card:hover {
  box-shadow: 0 10px 20px rgba(245, 158, 11, 0.2);
}

.product-card.featured-card .product-popular-badge {
  background: var(--danger);
  color: #ffffff;
}

/* Stili per la card quando il prodotto è nel carrello (cornice viola) */
.product-card.in-cart {
  border: 2px solid var(--primary) !important;
  box-shadow: 0 4px 15px rgba(79, 70, 229, 0.15) !important;
}

.product-card.in-cart:hover {
  box-shadow: 0 10px 20px rgba(79, 70, 229, 0.25) !important;
}

.product-image-container {
  width: 50px;
  height: 50px;
  background-color: var(--bg-secondary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 24px;
  color: var(--text-muted);
}

.product-card-body {
  padding: 0;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  width: calc(100% - 65px);
}

.product-card-title {
  font-size: 16px;
  margin-bottom: 4px;
  font-weight: 700;
}

.product-card-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 10px;
  line-height: 1.4;
  flex-grow: 1;
}

.product-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}

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

/* --- CARRELLO GALLEGGIANTE (FLOATING CAR) --- */
.floating-cart-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px rgba(79, 70, 229, 0.4);
  cursor: pointer;
  z-index: 99;
  border: none;
  font-size: 24px;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.floating-cart-btn:hover {
  transform: scale(1.1) rotate(-5deg);
}

.cart-badge-count {
  position: absolute;
  top: -5px;
  right: -5px;
  background-color: var(--danger);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-primary);
}

/* --- MODALI (CART & CHECKOUT) --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

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

.modal-container {
  width: 95%;
  max-width: 550px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  transform: translateY(30px);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

/* --- BOTTOM SHEET (CARRELLO TIPO INSTAGRAM) --- */
.bottom-sheet-overlay {
  align-items: flex-end !important;
  justify-content: center;
}

.bottom-sheet-container {
  width: 100% !important;
  max-width: 500px !important;
  max-height: 85vh !important;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0 !important;
  margin: 0 !important;
  transform: translateY(100%) !important;
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1) !important;
}

.modal-overlay.active .bottom-sheet-container {
  transform: translateY(0) !important;
}

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

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

.modal-close:hover {
  color: var(--text-main);
}

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

.modal-footer {
  padding: 20px;
  border-top: 1px solid var(--border-color);
  background-color: var(--bg-secondary);
}

/* Elementi nel carrello */
.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
}

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

.cart-item-info {
  flex: 1;
}

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

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

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

.qty-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background-color: var(--bg-primary);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: 700;
}

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

.qty-value {
  font-weight: 700;
  width: 20px;
  text-align: center;
  font-size: 14px;
}

.btn-remove {
  background: none;
  border: none;
  color: var(--danger);
  cursor: pointer;
  font-size: 16px;
  margin-left: 10px;
}

/* --- SEZIONE UPSELL --- */
.upsell-section {
  background-color: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 15px;
  margin-top: 20px;
  border: 1px dashed var(--border-color);
}

.upsell-title {
  font-size: 13px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
  letter-spacing: 0.05em;
  font-weight: 700;
}

.upsell-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--surface);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
}

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

/* --- FORM E CHECKOUT --- */
.form-group {
  margin-bottom: 15px;
}

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

.form-control {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background-color: var(--bg-primary);
  color: var(--text-main);
  outline: none;
  font-size: 14px;
}

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

.payment-method-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin: 15px 0;
}

.payment-option {
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px;
  text-align: center;
  cursor: pointer;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.payment-option.selected {
  border-color: var(--primary);
  background-color: var(--primary-light);
}

.payment-option img {
  height: 25px;
}

/* --- SCHERMATA RICEVUTA CLIENTE --- */
.receipt-wrapper {
  max-width: 500px;
  margin: 40px auto;
  text-align: center;
  padding: 30px;
}

.receipt-success-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background-color: var(--success-light);
  color: var(--success);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  margin-bottom: 20px;
}

.receipt-shortcode {
  font-size: 36px;
  letter-spacing: 4px;
  font-weight: 800;
  font-family: monospace;
  background-color: var(--bg-secondary);
  padding: 12px 24px;
  border-radius: var(--radius-md);
  display: inline-block;
  margin: 15px 0;
  border: 2px dashed var(--border-color);
}

.receipt-qrcode {
  margin: 25px auto;
  padding: 15px;
  background-color: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  display: inline-block;
  border: 1px solid var(--border-color);
}

.receipt-qrcode canvas {
  display: block;
}

/* --- INTERFACCIA DRAG & DROP ADMIN --- */
.admin-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 30px;
  min-height: calc(100vh - 120px);
}

.admin-sidebar {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.admin-menu-item:hover, .admin-menu-item.active {
  background-color: var(--primary-light);
  color: var(--primary);
}

.admin-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.kpi-card {
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.kpi-title {
  font-size: 13px;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
}

.kpi-value {
  font-size: 24px;
  font-weight: 800;
  margin-top: 5px;
}

.kpi-icon {
  font-size: 32px;
  opacity: 0.8;
}

/* Lista Prodotti per Drag & Drop */
.drag-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.drag-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  background-color: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: grab;
  transition: box-shadow 0.2s, transform 0.2s;
  user-select: none;
}

.drag-item.dragging {
  opacity: 0.5;
  cursor: grabbing;
  border-style: dashed;
  background-color: var(--bg-secondary);
}

.drag-handle {
  display: flex;
  align-items: center;
  color: var(--text-muted);
  font-size: 20px;
  padding-right: 15px;
}

/* --- TABELLE STANDARD ADMIN --- */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
}

table.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  background-color: var(--surface);
}

table.admin-table th {
  background-color: var(--bg-secondary);
  padding: 12px 18px;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
}

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

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

/* --- CAMERA SCANNER MOBILE-FIRST --- */
.scanner-container {
  max-width: 480px;
  margin: 0 auto;
}

#reader {
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 2px solid var(--border-color);
  background-color: #000;
}

.scanner-manual-search {
  display: flex;
  gap: 10px;
  margin: 15px 0;
}

/* Erogazione Parziale Controlli */
.delivery-grid {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin: 20px 0;
}

.delivery-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  background-color: var(--bg-secondary);
  border-radius: var(--radius-md);
}

.delivery-item-name {
  font-weight: 700;
}

.delivery-item-qty-status {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.delivery-item-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Log delle operazioni punto di ritiro */
.log-box {
  background-color: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 15px;
  max-height: 250px;
  overflow-y: auto;
  font-family: monospace;
  font-size: 12px;
  border: 1px solid var(--border-color);
}

.log-entry {
  padding: 6px 0;
  border-bottom: 1px dashed var(--border-color);
  color: var(--text-main);
}

.log-entry:last-child {
  border-bottom: none;
}

/* Responsive */
@media(max-width: 768px) {
  .admin-grid {
    grid-template-columns: 1fr;
  }
  .admin-sidebar {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 10px;
  }
  .admin-menu-item {
    white-space: nowrap;
  }
}

/* --- CAPSULA QUANTITÀ CARRELLO IN CARD --- */
.cart-qty-capsule {
  display: inline-flex;
  align-items: center;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: #ffffff;
  border-radius: 999px;
  padding: 4px 10px;
  gap: 12px;
  font-weight: 600;
  font-size: 14px;
  box-shadow: 0 4px 10px rgba(79, 70, 229, 0.2);
  user-select: none;
}

.capsule-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: #ffffff;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  transition: background 0.15s ease;
}

.capsule-btn:hover {
  background: rgba(255, 255, 255, 0.35);
}

.capsule-btn-del {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  transition: color 0.15s ease;
}

.capsule-btn-del:hover {
  color: #ffffff;
}

/* --- ANIMAZIONE EMOJI UPSELL POPUP --- */
#upsell-popup-icon {
  animation: emoji-bounce 2.5s infinite ease-in-out;
  display: inline-block;
}

@keyframes emoji-bounce {
  0%, 100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-8px) scale(1.05);
  }
}
/* --- INTERRUTTORE TOGGLE SWITCH (DASHBOARD UPPER BAR) --- */
.switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 22px;
}
.switch input { 
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--border-color);
  transition: .3s;
  border-radius: 24px;
}
.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: #ffffff;
  transition: .3s;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
input:checked + .slider {
  background-color: var(--success);
}
input:checked + .slider:before {
  transform: translateX(20px);
}
