/* ============================================================
   sMoney - White Liquid Glass Design System
   Ottimizzato per Smartphone (iOS / Android) e Desktop
   ============================================================ */

:root {
  /* Palette Eterea Bianca & Trasparenze Liquid Glass */
  --bg-primary: #f6f8fb;
  --bg-mesh-1: rgba(224, 242, 254, 0.6);   /* Soft sky cyan */
  --bg-mesh-2: rgba(236, 253, 245, 0.55);  /* Mint emerald sheen */
  --bg-mesh-3: rgba(243, 244, 246, 0.8);   /* Ethereal pearl */
  --bg-mesh-center: rgba(224, 231, 255, 0.5);

  /* Glass Surface Tokens */
  --glass-bg: rgba(255, 255, 255, 0.72);
  --glass-bg-hover: rgba(255, 255, 255, 0.85);
  --glass-bg-active: rgba(255, 255, 255, 0.94);
  --glass-bg-subtle: rgba(255, 255, 255, 0.45);
  --glass-border: rgba(255, 255, 255, 0.9);
  --glass-border-subtle: rgba(226, 232, 240, 0.7);
  --glass-shadow: 0 16px 36px -12px rgba(15, 23, 42, 0.08);
  --glass-shadow-lg: 0 24px 50px -15px rgba(15, 23, 42, 0.12);
  --glass-inset-highlight: inset 0 1.5px 1px 0 rgba(255, 255, 255, 0.95), inset 0 -1px 1px 0 rgba(226, 232, 240, 0.4);

  /* Blur Intensità Ottimizzata GPU (Zero Lag & Alto Risparmio Energetico) */
  --glass-blur: blur(14px) saturate(150%);
  --glass-blur-subtle: blur(8px) saturate(130%);

  /* Accenti Funzionali */
  --income-green: #059669;
  --income-green-light: #10b981;
  --income-bg: rgba(16, 185, 129, 0.12);
  --income-border: rgba(16, 185, 129, 0.35);

  --expense-red: #e11d48;
  --expense-red-light: #f43f5e;
  --expense-bg: rgba(244, 63, 94, 0.12);
  --expense-border: rgba(244, 63, 94, 0.35);

  --cash-amber: #d97706;
  --cash-bg: rgba(245, 158, 11, 0.12);
  --cash-border: rgba(245, 158, 11, 0.35);

  --card-blue: #2563eb;
  --card-bg: rgba(37, 99, 235, 0.1);
  --card-border: rgba(37, 99, 235, 0.3);

  /* Testo ad alto contrasto & leggibilità */
  --text-main: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-light: #94a3b8;

  /* Raggi e Animazioni */
  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-full: 9999px;

  --transition-smooth: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-spring: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Reset Moderno */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Plus Jakarta Sans", "Inter", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text-main);
  background-color: var(--bg-primary);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: 
    radial-gradient(circle at 10% 20%, var(--bg-mesh-1) 0%, transparent 40%),
    radial-gradient(circle at 90% 10%, var(--bg-mesh-2) 0%, transparent 45%),
    radial-gradient(circle at 50% 80%, var(--bg-mesh-center) 0%, transparent 50%),
    radial-gradient(circle at 20% 90%, var(--bg-mesh-2) 0%, transparent 40%);
  background-repeat: no-repeat;
  pointer-events: none;
  z-index: -2;
  transform: translateZ(0);
  will-change: transform;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
  padding-bottom: calc(90px + env(safe-area-inset-bottom, 20px));
  touch-action: manipulation;
  -webkit-touch-callout: none;
  user-select: none;
  -webkit-user-select: none;
}

input, textarea, select {
  user-select: text !important;
  -webkit-user-select: text !important;
}

/* Pulsante Privacy Occhio (Nasconde/Mostra Importi) */
.btn-privacy-toggle {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: var(--radius-full);
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-main);
  transition: var(--transition-smooth);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06), inset 0 1px 1px #ffffff;
  padding: 0;
}
/* La lista desideri usa lo stesso controllo compatto della privacy. */
.header-wishlist-tab svg {
  width: 18px;
  height: 18px;
}
.header-wishlist-tab.active {
  color: #2563eb;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.3);
}
html[data-theme="dark"] .header-wishlist-tab.active {
  color: #7dd3fc;
  background: rgba(30, 41, 59, 0.95);
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.5);
}
.btn-privacy-toggle:hover {
  background: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.1);
}
.btn-privacy-toggle:active {
  transform: scale(0.92);
}
html[data-theme="dark"] .btn-privacy-toggle {
  background: rgba(30, 41, 59, 0.85);
  border-color: rgba(255, 255, 255, 0.14);
  color: #f1f5f9;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* Modalità Privacy: maschera tutti gli importi */
body.privacy-active .privacy-sensitive,
body.privacy-active .hero-trio-val,
body.privacy-active .tx-amount,
body.privacy-active .account-balance,
body.privacy-active .finance-pill-val,
body.privacy-active .stat-val,
body.privacy-active .report-stat-val,
body.privacy-active .debt-amount,
body.privacy-active .inv-val,
body.privacy-active #accountsTotalBalance,
body.privacy-active #debtsNetBalance,
body.privacy-active #debtsSummaryCredits,
body.privacy-active #debtsSummaryDebts,
body.privacy-active #invTotalVal,
body.privacy-active #assetsTotalValue,
body.privacy-active #reportGlobalPatrimonio {
  filter: blur(6px) !important;
  user-select: none !important;
  transition: filter 0.2s ease;
}

/* Sfondo con orbi luminosi stile liquid glass stabili e ancorati (Zero Blur Filter per GPU) */
.ambient-glow {
  position: fixed;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  z-index: -1;
  pointer-events: none;
  opacity: 0.5;
  transform: translateZ(0);
  contain: strict;
}
.ambient-glow-1 {
  top: -60px;
  left: -60px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.40) 0%, rgba(56, 189, 248, 0.12) 45%, rgba(56, 189, 248, 0) 72%);
}
.ambient-glow-2 {
  bottom: 60px;
  right: -60px;
  background: radial-gradient(circle, rgba(52, 211, 153, 0.38) 0%, rgba(52, 211, 153, 0.12) 45%, rgba(52, 211, 153, 0) 72%);
}

/* Contenitore Applicazione Smartphone / Desktop */
.app-viewport {
  width: 100%;
  max-width: 580px; /* Perfetto formato app nativa smartphone su desktop */
  margin: 0 auto;
  padding: calc(16px + env(safe-area-inset-top, 0px)) 16px 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

@media (min-width: 900px) {
  .app-viewport {
    max-width: 760px;
    padding-top: 24px;
    gap: 20px;
  }
}

/* ============================================================
   GLASS COMPONENTS & UTILITIES
   ============================================================ */

.glass-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow), var(--glass-inset-highlight);
  border-radius: var(--radius-lg);
  padding: 18px;
  position: relative;
  overflow: hidden;
  transition: var(--transition-smooth);
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.9) 30%, rgba(255, 255, 255, 0.9) 70%, transparent);
}

.glass-card-interactive:hover {
  background: var(--glass-bg-hover);
  transform: translateY(-2px);
  box-shadow: var(--glass-shadow-lg), var(--glass-inset-highlight);
}

/* Header Superiore */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 6px;
}

.brand-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-main);
}

.brand-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.9);
  padding: 4px;
  box-shadow: 0 8px 18px -4px rgba(15, 23, 42, 0.08), inset 0 1px 1px rgba(255, 255, 255, 1);
  border: 1px solid rgba(255, 255, 255, 0.9);
}

.brand-text h1 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #0f172a 0%, #334155 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.1;
}

.brand-text p {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.user-profile-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  padding: 6px 14px 6px 8px;
  border-radius: var(--radius-full);
  box-shadow: var(--glass-shadow);
  cursor: pointer;
  transition: var(--transition-smooth);
}
.user-profile-badge:hover {
  background: #ffffff;
  transform: scale(1.02);
}

.avatar-circle {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #38bdf8, #10b981);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  box-shadow: 0 3px 8px rgba(16, 185, 129, 0.3);
}

.user-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
}

/* ============================================================
   HERO CARD: LIQUIDITÀ & SALDI PRINCIPALI
   ============================================================ */

.liquidity-hero-card {
  padding: 24px 20px;
  border-radius: var(--radius-xl);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0.65) 100%);
}

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

.hero-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 6px;
}

.live-indicator {
  display: none !important;
}

.hero-edit-btn {
  background: rgba(241, 245, 249, 0.8);
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: var(--radius-full);
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition-smooth);
}
.hero-edit-btn:hover {
  background: #ffffff;
  color: var(--text-main);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.hero-balance-val {
  font-size: 2.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-main);
  margin-bottom: 18px;
  line-height: 1.1;
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.hero-balance-val .currency-symbol {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* Split Contanti vs Carta/Banca */
.liquidity-split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.split-pill {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  transition: var(--transition-smooth);
}
.split-pill:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: translateY(-1px);
}

.split-pill-cash {
  border-left: 3.5px solid var(--cash-amber);
}
.split-pill-card {
  border-left: 3.5px solid var(--card-blue);
}

.split-pill-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.split-pill-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
}

.split-pill-badge {
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  font-weight: 700;
  text-transform: uppercase;
}
.badge-cash {
  background: var(--cash-bg);
  color: var(--cash-amber);
}
.badge-card {
  background: var(--card-bg);
  color: var(--card-blue);
}

.split-pill-amount {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

/* Barra Totale Spese vs Entrate */
.summary-bars-row {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(226, 232, 240, 0.6);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.stat-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 800;
}
.stat-icon-expense {
  background: var(--expense-bg);
  color: var(--expense-red);
  border: 1px solid var(--expense-border);
}
.stat-icon-income {
  background: var(--income-bg);
  color: var(--income-green);
  border: 1px solid var(--income-border);
}

.stat-details {
  display: flex;
  flex-direction: column;
}
.stat-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 500;
}
.stat-val {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
}

/* ============================================================
   TASTI DI AZIONE RAPIDA: + VERDE E - ROSSO
   ============================================================ */

.quick-action-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.btn-action {
  position: relative;
  border: none;
  outline: none;
  padding: 16px 14px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-spring);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: 0 10px 24px -6px rgba(15, 23, 42, 0.08), inset 0 1px 1px rgba(255, 255, 255, 0.9);
}

.btn-action:active {
  transform: scale(0.97);
}

/* + VERDE (Entrata / Guadagno) */
.btn-action-income {
  background: linear-gradient(145deg, rgba(236, 253, 245, 0.95) 0%, rgba(209, 250, 229, 0.8) 100%);
  color: #065f46;
  border: 1.5px solid rgba(52, 211, 153, 0.6);
}
.btn-action-income:hover {
  background: linear-gradient(145deg, #d1fae5 0%, #a7f3d0 100%);
  box-shadow: 0 14px 28px -6px rgba(16, 185, 129, 0.25), inset 0 1px 1px #ffffff;
  transform: translateY(-2px);
}
.btn-action-income .action-symbol {
  width: 32px;
  height: 32px;
  background: #059669;
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: 0 4px 10px rgba(5, 150, 105, 0.35);
}

/* - ROSSO (Spesa / Uscita) */
.btn-action-expense {
  background: linear-gradient(145deg, rgba(255, 241, 242, 0.95) 0%, rgba(255, 228, 230, 0.8) 100%);
  color: #9f1239;
  border: 1.5px solid rgba(251, 113, 133, 0.6);
}
.btn-action-expense:hover {
  background: linear-gradient(145deg, #ffe4e6 0%, #fecdd3 100%);
  box-shadow: 0 14px 28px -6px rgba(225, 29, 72, 0.25), inset 0 1px 1px #ffffff;
  transform: translateY(-2px);
}
.btn-action-expense .action-symbol {
  width: 32px;
  height: 32px;
  background: #e11d48;
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: 0 4px 10px rgba(225, 29, 72, 0.35);
}

/* ============================================================
   BARRA RICERCA & FILTRI
   ============================================================ */

.search-filter-card {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 14px;
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius-full);
  padding: 11px 40px 11px 42px;
  font-size: 0.9rem;
  color: var(--text-main);
  outline: none;
  transition: var(--transition-smooth);
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.03);
}
.search-input:focus {
  border-color: #38bdf8;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2), inset 0 1px 2px rgba(15, 23, 42, 0.02);
}

.search-clear-btn {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  display: none;
  padding: 4px;
}

/* Filtri a pillole a scorrimento orizzontale */
.filters-pills-row {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}
.filters-pills-row::-webkit-scrollbar {
  display: none;
}

.filter-pill {
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: var(--radius-full);
  padding: 5px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-smooth);
}
.filter-pill:hover {
  background: #ffffff;
  color: var(--text-main);
}
.filter-pill.active {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.15);
}

/* ============================================================
   FEED TRANSAZIONI & DRAG AND DROP GRADUATORIA
   ============================================================ */

.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 6px 2px 2px 2px;
}

.section-title {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.drag-hint {
  font-size: 0.74rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.transactions-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 120px;
}

.transaction-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow), var(--glass-inset-highlight);
  border-radius: var(--radius-md);
  padding: 14px 14px 14px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  user-select: none;
}

.transaction-card:hover {
  background: var(--glass-bg-hover);
  box-shadow: var(--glass-shadow-lg), var(--glass-inset-highlight);
}

/* Maniglia Drag & Drop (affordance touch e desktop) */
.drag-handle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 38px;
  color: var(--text-light);
  cursor: grab;
  touch-action: none;
  border-radius: var(--radius-xs);
  transition: var(--transition-smooth);
}
.drag-handle:hover {
  color: var(--text-main);
  background: rgba(0, 0, 0, 0.04);
}
.drag-handle:active {
  cursor: grabbing;
}

.drag-handle svg {
  width: 18px;
  height: 18px;
}

/* Stato durante il Drag */
.transaction-card.is-dragging {
  opacity: 0.45;
  transform: scale(0.98);
  border: 1.5px dashed #38bdf8;
  background: #ffffff;
}

.transaction-card.drag-over {
  border-top: 3px solid #2563eb;
  transform: translateY(2px);
}

/* Icona Transazione */
.tx-type-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  font-weight: 800;
  flex-shrink: 0;
}
.tx-type-income {
  background: var(--income-bg);
  color: var(--income-green);
  border: 1px solid var(--income-border);
}
.tx-type-expense {
  background: var(--expense-bg);
  color: var(--expense-red);
  border: 1px solid var(--expense-border);
}

/* Dettagli Transazione */
.tx-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.tx-main-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.tx-title {
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: capitalize;
}

.tx-amount {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.tx-amount-expense {
  color: var(--expense-red);
}
.tx-amount-income {
  color: var(--income-green);
}

.tx-meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.tx-badge {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 1.5px 7px;
  border-radius: var(--radius-xs);
}
.tx-badge-cat {
  background: rgba(241, 245, 249, 0.9);
  color: var(--text-secondary);
  border: 1px solid rgba(226, 232, 240, 0.8);
}
.tx-badge-method-cash {
  background: var(--cash-bg);
  color: var(--cash-amber);
}
.tx-badge-method-card {
  background: var(--card-bg);
  color: var(--card-blue);
}

.tx-date {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-left: auto;
}

.tx-note-preview {
  display: none !important;
  font-size: 0.76rem;
  color: var(--text-secondary);
  margin-top: 6px;
  line-height: 1.35;
  font-style: italic;
  background: rgba(0, 0, 0, 0.04);
  padding: 5px 8px;
  border-radius: 6px;
  border-left: 2.5px solid var(--card-blue);
  word-break: break-word;
}

.transaction-card.is-expanded .tx-note-preview {
  display: block !important;
  animation: fadeIn 0.2s ease-in-out;
}

html[data-theme="dark"] .tx-note-preview {
  background: rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
}

/* Azioni Transazione (Modifica / Elimina) */
.tx-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 4px;
}

.btn-icon-sm {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(226, 232, 240, 0.6);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
}
.btn-icon-sm:hover {
  background: #ffffff;
  color: var(--text-main);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}
.btn-icon-danger:hover {
  background: #ffe4e6;
  color: var(--expense-red);
  border-color: rgba(244, 63, 94, 0.4);
}

/* Stato vuoto */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.empty-icon {
  font-size: 2.4rem;
  margin-bottom: 4px;
}
.empty-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
}
.empty-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  max-width: 280px;
}

/* ============================================================
   SEZIONE: LISTA DEI DESIDERI (WISHLIST)
   ============================================================ */

.wishlist-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.wishlist-summary-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(241, 245, 249, 0.75) 100%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--glass-shadow), var(--glass-inset-highlight);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wishlist-total-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.wishlist-total-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.wishlist-total-val {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #2563eb;
}

.wishlist-items-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wishlist-item-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  transition: var(--transition-smooth);
}

.wishlist-item-card.is-bought {
  background: rgba(248, 250, 252, 0.6);
  opacity: 0.65;
  border-color: rgba(226, 232, 240, 0.6);
}
.wishlist-item-card.is-bought .wishlist-item-name {
  text-decoration: line-through;
  color: var(--text-muted);
}

/* Custom Checkbox Glass */
.wishlist-check-label {
  position: relative;
  display: flex;
  align-items: center;
  cursor: pointer;
  margin-top: 3px;
}
.wishlist-check-box {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-sm);
  border: 2px solid #cbd5e1;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}
.wishlist-check-label input {
  display: none;
}
.wishlist-check-label input:checked + .wishlist-check-box {
  background: #059669;
  border-color: #059669;
  color: #ffffff;
  box-shadow: 0 3px 8px rgba(5, 150, 105, 0.3);
}

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

.wishlist-item-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.wishlist-item-name {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-main);
}

.wishlist-item-price {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-main);
  white-space: nowrap;
}

.wishlist-item-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 3px;
  line-height: 1.35;
}

.wishlist-actions-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.btn-convert-expense {
  background: rgba(236, 253, 245, 0.9);
  border: 1px solid rgba(52, 211, 153, 0.4);
  color: #065f46;
  border-radius: var(--radius-full);
  padding: 4px 10px;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition-smooth);
}
.btn-convert-expense:hover {
  background: #d1fae5;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.2);
}

/* ============================================================
   SEZIONE: REPORT MESE PER MESE
   ============================================================ */

.report-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.month-picker-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.month-select {
  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-full);
  padding: 8px 16px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
  outline: none;
  cursor: pointer;
  box-shadow: var(--glass-shadow);
}

.report-overview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}

.report-stat-card {
  padding: 14px 12px;
  text-align: center;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.report-stat-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
}
.report-stat-val {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* Categorie Progress Bars */
.categories-breakdown-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.category-bar-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.category-bar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  font-weight: 600;
}

.category-progress-track {
  width: 100%;
  height: 9px;
  background: rgba(226, 232, 240, 0.6);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}

.category-progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, #38bdf8 0%, #2563eb 100%);
  transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ============================================================
   BOTTOM DOCK / NAVBAR (APPLE & ANDROID APP STYLE)
   ============================================================ */

.bottom-dock-nav {
  position: fixed;
  bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%) translateZ(0);
  width: calc(100% - 10px);
  max-width: 540px;
  background: rgba(255, 255, 255, 0.90);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 16px 38px -8px rgba(15, 23, 42, 0.16), inset 0 1px 1px #ffffff;
  border-radius: var(--radius-full);
  padding: 3px 2px;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  align-items: center;
  justify-items: center;
  gap: 1px;
  z-index: 100;
  contain: layout style;
  isolation: isolate;
}

.dock-item {
  width: 100%;
  min-width: 0;
  background: none;
  border: none;
  outline: none;
  padding: 4px 1px;
  border-radius: var(--radius-full);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-smooth);
  text-align: center;
}

.dock-item svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  transition: var(--transition-spring);
}

.dock-item span {
  font-size: 0.58rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  letter-spacing: -0.4px;
  display: block;
  line-height: 1.1;
}

.dock-item-relative {
  position: relative;
}

.dock-badge-dot {
  position: absolute;
  top: 3px;
  right: calc(50% - 13px);
  width: 9px;
  height: 9px;
  background-color: #ef4444;
  border: 2px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.85);
  z-index: 2;
  transform: translateZ(0);
}

.dock-item:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.5);
}

.dock-item.active {
  color: #0f172a;
  background: #ffffff;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}
.dock-item.active svg {
  transform: scale(1.12);
  color: #2563eb;
}

/* VOCE CENTRALE TONDA CHE FUORIESCE IN ALTO: ROBOTTINO CHATBOT AI */
.dock-center-ai-wrap {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: 2px;
}

.dock-center-ai-btn {
  position: absolute;
  top: -18px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 50%, #ec4899 100%);
  border: 3px solid #ffffff;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(124, 58, 237, 0.45), 0 0 12px rgba(37, 99, 235, 0.35);
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
  z-index: 2;
  outline: none;
  transform: translateZ(0);
}

.dock-center-ai-btn:hover {
  transform: translateY(-3px) scale(1.1);
}

.dock-center-ai-btn:active {
  transform: translateY(0) scale(0.92);
}

.dock-center-ai-btn svg {
  width: 22px;
  height: 22px;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3));
}

.dock-center-ai-label {
  font-size: 0.52rem;
  font-weight: 800;
  color: #7c3aed;
  letter-spacing: -0.4px;
  margin-top: 24px;
  line-height: 1;
}

/* MODALE E COMPONENTI CHATBOT AI */
.ai-chat-sheet {
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -12px 40px rgba(15, 23, 42, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.9);
}

.ai-pill-btn {
  white-space: nowrap;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.76rem;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.ai-pill-btn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #0f172a;
  transform: translateY(-1px);
}

.ai-pill-btn:active {
  transform: scale(0.96);
}

.ai-bubble-user {
  align-self: flex-end;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff;
  padding: 10px 14px;
  border-radius: 18px 18px 4px 18px;
  max-width: 82%;
  font-size: 0.88rem;
  line-height: 1.45;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
  word-break: break-word;
}

.ai-bubble-bot {
  align-self: flex-start;
  background: #ffffff;
  color: #1e293b;
  padding: 12px 16px;
  border-radius: 18px 18px 18px 4px;
  max-width: 88%;
  font-size: 0.88rem;
  line-height: 1.5;
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
  word-break: break-word;
}

.ai-bubble-bot.blocked {
  border-color: #fca5a5;
  background: #fff1f2;
  color: #9f1239;
}

.ai-bubble-bot-header {
  font-size: 0.72rem;
  font-weight: 700;
  color: #7c3aed;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.ai-typing-dots {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.ai-typing-dots span {
  width: 5px;
  height: 5px;
  background: #7c3aed;
  border-radius: 50%;
  animation: ai-dot-bounce 1.4s infinite ease-in-out both;
}

.ai-typing-dots span:nth-child(1) { animation-delay: -0.32s; }
.ai-typing-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes ai-dot-bounce {
  0%, 80%, 100% { transform: scale(0); opacity: 0.3; }
  40% { transform: scale(1); opacity: 1; }
}

/* OVERRIDES DARK THEME PER CHATBOT & DOCK */
html[data-theme="dark"] .dock-center-ai-btn {
  border-color: #0f172a;
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.65), 0 0 14px rgba(37, 99, 235, 0.45);
}

html[data-theme="dark"] .dock-center-ai-label {
  color: #c084fc;
}

html[data-theme="dark"] .ai-chat-sheet {
  background: #0f172a !important;
  border-color: rgba(255, 255, 255, 0.12);
  color: #f8fafc;
}

html[data-theme="dark"] .ai-chat-header {
  background: rgba(15, 23, 42, 0.9) !important;
  border-bottom-color: rgba(255, 255, 255, 0.1) !important;
}

html[data-theme="dark"] .ai-pills-bar {
  background: rgba(30, 41, 59, 0.6) !important;
  border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}

html[data-theme="dark"] .ai-pill-btn {
  background: #1e293b !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
  color: #e2e8f0 !important;
}

html[data-theme="dark"] .ai-pill-btn:hover {
  background: #334155 !important;
  color: #ffffff !important;
}

html[data-theme="dark"] .ai-bubble-bot {
  background: #1e293b !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: #f1f5f9 !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

html[data-theme="dark"] .ai-bubble-bot.blocked {
  background: #3b111e !important;
  border-color: #f43f5e !important;
  color: #fecdd3 !important;
}

html[data-theme="dark"] #aiChatForm {
  background: rgba(15, 23, 42, 0.95) !important;
  border-top-color: rgba(255, 255, 255, 0.1) !important;
}

html[data-theme="dark"] #aiTypingIndicator {
  background: rgba(30, 41, 59, 0.8) !important;
}

/* ============================================================
   MODALS & BOTTOM SHEETS
   ============================================================ */

html.modal-open,
body.modal-open {
  overflow: hidden !important;
  overscroll-behavior: none !important;
  touch-action: none !important;
  height: 100% !important;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1200;
  display: flex;
  align-items: flex-end; /* Bottom sheet per smartphone */
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.modal-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.modal-sheet {
  width: 100%;
  max-width: 520px;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(36px) saturate(200%);
  -webkit-backdrop-filter: blur(36px) saturate(200%);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: 22px 20px calc(24px + env(safe-area-inset-bottom, 12px)) 20px;
  box-shadow: 0 -20px 50px rgba(15, 23, 42, 0.15), inset 0 1px 1px #ffffff;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  max-height: calc(100dvh - 30px);
  max-height: 88vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

.modal-backdrop.is-open .modal-sheet {
  transform: translateY(0);
}

@media (min-width: 600px) {
  .modal-backdrop {
    align-items: center;
    padding: 24px;
  }
  .modal-sheet {
    border-radius: var(--radius-xl);
    max-height: 85vh;
    max-height: 85dvh;
    transform: translateY(20px) scale(0.97);
  }
  .modal-backdrop.is-open .modal-sheet {
    transform: translateY(0) scale(1);
  }
}

.modal-handle-bar {
  width: 44px;
  height: 5px;
  background: rgba(203, 213, 225, 0.8);
  border-radius: var(--radius-full);
  margin: 0 auto 16px auto;
}

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

.modal-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.modal-close-btn {
  background: rgba(241, 245, 249, 0.9);
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: var(--transition-smooth);
}
.modal-close-btn:hover {
  background: #ffffff;
  color: var(--text-main);
}

/* Moduli Form */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.form-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  background: #ffffff;
  border: 1.5px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-size: 0.95rem;
  color: var(--text-main);
  outline: none;
  transition: var(--transition-smooth);
  font-family: inherit;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* Segmented Control per Tipo Entrata / Uscita e Metodo */
.segmented-control {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: rgba(241, 245, 249, 0.85);
  padding: 4px;
  border-radius: var(--radius-md);
}

.segmented-btn {
  border: none;
  background: none;
  padding: 10px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-smooth);
}
.segmented-btn.active {
  background: #ffffff;
  color: var(--text-main);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.06);
}
.segmented-btn-income.active {
  background: #059669;
  color: #ffffff;
}
.segmented-btn-expense.active {
  background: #e11d48;
  color: #ffffff;
}

/* Tasto Submit Principale */
.btn-primary {
  width: 100%;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  padding: 15px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 22px -5px rgba(15, 23, 42, 0.25);
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px -5px rgba(15, 23, 42, 0.3);
}

/* ============================================================
   COOKIE CONSENT BANNER & PRIVACY
   ============================================================ */

.cookie-glass-banner {
  position: fixed;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 520px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(32px) saturate(200%);
  -webkit-backdrop-filter: blur(32px) saturate(200%);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: var(--radius-xl);
  padding: 20px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18), inset 0 1px 1px #ffffff;
  z-index: 250;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: var(--transition-smooth);
}

.cookie-banner-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

.cookie-banner-text {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.cookie-banner-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-cookie-accept {
  flex: 1;
  background: #0f172a;
  color: #ffffff;
  border: none;
  padding: 10px 14px;
  border-radius: var(--radius-full);
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
}

.btn-cookie-manage {
  background: rgba(241, 245, 249, 0.9);
  color: var(--text-secondary);
  border: 1px solid rgba(226, 232, 240, 0.8);
  padding: 10px 14px;
  border-radius: var(--radius-full);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-report-action {
  background: rgba(241, 245, 249, 0.95);
  color: var(--text-secondary);
  border: 1px solid rgba(226, 232, 240, 0.85);
  padding: 12px 14px;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-smooth);
}
.btn-report-action:hover {
  background: #ffffff;
  color: var(--text-main);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.card-note-box {
  font-size: 0.78rem;
  color: var(--text-muted);
  background: rgba(241, 245, 249, 0.75);
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid rgba(226, 232, 240, 0.6);
  line-height: 1.35;
}

.inv-summary-strip {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-secondary);
  background: rgba(241, 245, 249, 0.75);
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid rgba(226, 232, 240, 0.6);
}

.cookie-pref-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(241, 245, 249, 0.8);
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(226, 232, 240, 0.7);
}

.account-sync-text {
  font-size: 0.72rem;
  color: #2563eb;
  font-weight: 700;
}

.badge-status-completed {
  background: #e2e8f0;
  color: #475569;
}
.badge-status-credit {
  background: #d1fae5;
  color: #065f46;
}
.badge-status-debt {
  background: #fee2e2;
  color: #991b1b;
}
.badge-status-bought {
  background: #d1fae5;
  color: #065f46;
  font-weight: 700;
}
.badge-profile-role {
  background: #e0f2fe;
  color: #0284c7;
  font-weight: 700;
}

/* ============================================================
   TOAST NOTIFICHE LIQUID GLASS (DISATTIVATI SU RICHIESTA UTENTE)
   ============================================================ */

.toast-container {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.toast-item {
  display: none !important;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.12), inset 0 1px 1px #ffffff;
  border-radius: var(--radius-full);
  padding: 12px 18px;
  font-size: 0.86rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideDownToast 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  pointer-events: auto;
}
.toast-success {
  border-left: 4px solid var(--income-green);
  color: #065f46;
}
.toast-error {
  border-left: 4px solid var(--expense-red);
  color: #9f1239;
}
.toast-info {
  border-left: 4px solid #2563eb;
  color: #1e3a8a;
}

@keyframes slideDownToast {
  from { opacity: 0; transform: translateY(-16px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Footer Legale & SEO */
.app-footer {
  text-align: center;
  padding: 20px 10px;
  font-size: 0.74rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.footer-links {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}
.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition-smooth);
}
.footer-links a:hover {
  color: #0f172a;
}

/* ============================================================
   5 INDICATORI PATRIMONIO IN SPESE (LIQUIDITÀ, DEBITI, CREDITI, INVESTIMENTI, PATRIMONIO)
   ============================================================ */

.patrimonio-pills-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 14px;
}

@media (min-width: 520px) {
  .patrimonio-pills-row {
    grid-template-columns: repeat(4, 1fr);
  }
}

.finance-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(226, 232, 240, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03);
  transition: var(--transition-smooth);
}

.finance-pill:hover {
  background: rgba(255, 255, 255, 0.95);
  transform: translateY(-1px);
}

.finance-pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot-red { background: #ef4444; box-shadow: 0 0 8px rgba(239, 68, 68, 0.6); }
.dot-green { background: #10b981; box-shadow: 0 0 8px rgba(16, 185, 129, 0.6); }
.dot-purple { background: #8b5cf6; box-shadow: 0 0 8px rgba(139, 92, 246, 0.6); }
.dot-gold { background: #f59e0b; box-shadow: 0 0 8px rgba(245, 158, 11, 0.6); }

.finance-pill-content {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.finance-pill-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-muted);
}

.finance-pill-val {
  font-size: 0.88rem;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pill-debts .finance-pill-val { color: #dc2626; }
.pill-credits .finance-pill-val { color: #059669; }
.pill-investments .finance-pill-val { color: #7c3aed; }
.pill-patrimonio .finance-pill-val { color: #b45309; }

/* ============================================================
   AVVISO RATA NEL MESE CORRENTE (SPESE & PRESTITI)
   ============================================================ */

.installment-month-alert {
  background: linear-gradient(135deg, rgba(254, 242, 242, 0.95), rgba(255, 255, 255, 0.98)) !important;
  border: 1.5px solid rgba(239, 68, 68, 0.5) !important;
  box-shadow: 0 10px 25px -5px rgba(239, 68, 68, 0.18) !important;
}

.installment-month-inner {
  display: flex;
  align-items: center;
  gap: 12px;
}

.installment-bell-pulsing {
  font-size: 1.4rem;
  flex-shrink: 0;
  transform: translateZ(0);
}

.installment-month-info {
  flex: 1;
}

.installment-month-badge {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #dc2626;
  letter-spacing: 0.5px;
}

.installment-month-text {
  font-size: 0.85rem;
  font-weight: 700;
  color: #1e293b;
  margin-top: 2px;
}

.btn-installment-view {
  background: #dc2626;
  color: #ffffff;
  border: none;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25);
  transition: var(--transition-smooth);
  flex-shrink: 0;
}

.btn-installment-view:hover {
  background: #b91c1c;
  transform: translateY(-1px);
}

/* Bottone Storno */
.btn-storno {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 0.85rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-storno:hover {
  background: #dc2626;
  color: #ffffff;
  border-color: #dc2626;
}

/* ============================================================
   CONTROLS: SWITCHES & FORM GROUP CARDS
   ============================================================ */

.switch-container {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.switch-container input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #cbd5e1;
  transition: .3s;
  border-radius: 24px;
}

.switch-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.switch-container input:checked + .switch-slider {
  background-color: #2563eb;
}

.switch-container input:checked + .switch-slider:before {
  transform: translateX(20px);
}

.form-group-card {
  background: rgba(248, 250, 252, 0.85);
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 12px;
}

/* ============================================================
   SEZIONE CONTI & WALLET
   ============================================================ */

.accounts-hero-card {
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.95), rgba(255, 255, 255, 0.95));
  border: 1px solid rgba(191, 219, 254, 0.9);
}

.accounts-hero-sub {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 4px;
  margin-bottom: 0;
}

.primary-sync-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid #bfdbfe;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  margin-top: 14px;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.05);
}

.sync-icon {
  font-size: 1.2rem;
}

.accounts-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.account-card {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(226, 232, 240, 0.85);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 4px 15px rgba(15, 23, 42, 0.04);
  transition: var(--transition-smooth);
}

.account-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(15, 23, 42, 0.08);
}

.account-card.is-primary {
  border: 2px solid #2563eb !important;
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.92), rgba(255, 255, 255, 0.98)) !important;
  box-shadow: 0 10px 30px rgba(37, 99, 235, 0.12) !important;
}

.account-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.account-card-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.account-icon {
  font-size: 1.35rem;
}

.account-name {
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--text-main);
}

.account-type-badge {
  font-size: 0.68rem;
  font-weight: 700;
  background: #f1f5f9;
  color: #475569;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.account-balance-val {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-main);
}

.account-primary-star {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--radius-full);
}

.account-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid rgba(226, 232, 240, 0.6);
}

/* ============================================================
   SEZIONE PRESTITI E CREDITI
   ============================================================ */

.debts-hero-card {
  background: linear-gradient(135deg, rgba(248, 250, 252, 0.95), rgba(255, 255, 255, 0.95));
}

.debts-split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}

.split-pill-credits {
  background: rgba(236, 253, 245, 0.7);
  border: 1px solid rgba(167, 243, 208, 0.9);
}

.split-pill-debts {
  background: rgba(254, 242, 242, 0.7);
  border: 1px solid rgba(254, 202, 202, 0.9);
}

.btn-hero-credit {
  background: #10b981 !important;
  color: #ffffff !important;
}

.btn-hero-debt {
  background: #ef4444 !important;
  color: #ffffff !important;
}

.debt-due-banner-red {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #fee2e2, #fef2f2);
  border: 1.5px solid #ef4444;
  color: #991b1b;
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 25px rgba(239, 68, 68, 0.2);
}

.due-banner-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.due-banner-title {
  font-size: 0.92rem;
  font-weight: 800;
  display: block;
}

.due-banner-desc {
  font-size: 0.82rem;
  margin-top: 3px;
  color: #7f1d1d;
  font-weight: 600;
}

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

.debt-card {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(226, 232, 240, 0.85);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 4px 15px rgba(15, 23, 42, 0.04);
  transition: var(--transition-smooth);
}

.debt-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(15, 23, 42, 0.08);
}

/* Debito in scadenza nel mese corrente: EVIDENZIATO IN ROSSO! */
.debt-card.due-this-month {
  border: 2px solid #ef4444 !important;
  background: linear-gradient(135deg, rgba(254, 242, 242, 0.9), rgba(255, 255, 255, 0.98)) !important;
  box-shadow: 0 10px 30px rgba(239, 68, 68, 0.22) !important;
}

.debt-due-badge-red {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #f87171;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--radius-full);
}

.debt-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.debt-person {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
}

.debt-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-main);
  margin-top: 2px;
}

.debt-amount {
  font-size: 1.15rem;
  font-weight: 800;
}

.debt-amount.credit { color: #059669; }
.debt-amount.debt { color: #dc2626; }

.debt-installment-info {
  background: rgba(241, 245, 249, 0.7);
  padding: 8px 12px;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.debt-card.due-this-month {
  border: 1.5px solid #ef4444 !important;
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.18) !important;
}

.debt-card.due-this-month .debt-installment-info {
  background: rgba(254, 226, 226, 0.7);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #991b1b;
  font-weight: 700;
}

/* ============================================================
   SEZIONE INVESTIMENTI
   ============================================================ */

.investments-hero-card {
  background: linear-gradient(135deg, rgba(245, 243, 255, 0.95), rgba(255, 255, 255, 0.95));
  border: 1px solid rgba(221, 214, 254, 0.9);
}

.investments-split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}

.split-pill-invested {
  background: rgba(243, 244, 246, 0.7);
  border: 1px solid #e5e7eb;
}

.split-pill-profit {
  background: rgba(245, 243, 255, 0.7);
  border: 1px solid #ddd6fe;
}

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

.investment-card {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(226, 232, 240, 0.85);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 4px 15px rgba(15, 23, 42, 0.04);
  transition: var(--transition-smooth);
}

.investment-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(15, 23, 42, 0.08);
}

.inv-profit-badge {
  font-size: 0.75rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--radius-full);
}

.inv-profit-badge.positive {
  background: #dcfce7;
  color: #15803d;
}

.inv-profit-badge.negative {
  background: #fee2e2;
  color: #b91c1c;
}

/* ============================================================
   TEMA DARK: REGOLE COMPLETE & PALETTE LIQUID GLASS OBSIDIAN
   ============================================================ */

/* Variabili CSS Dark Mode per selettore esplicito e sistema */
html[data-theme="dark"],
:root[data-theme="dark"],
[data-theme="dark"] {
  --bg-primary: #0b0f19;
  --bg-mesh-1: rgba(30, 58, 138, 0.40);
  --bg-mesh-2: rgba(5, 150, 105, 0.22);
  --bg-mesh-3: rgba(17, 24, 39, 0.98);
  --bg-mesh-center: rgba(30, 58, 138, 0.20);

  --glass-bg: rgba(17, 24, 39, 0.88);
  --glass-bg-hover: rgba(30, 41, 59, 0.94);
  --glass-bg-active: rgba(30, 41, 59, 0.98);
  --glass-bg-subtle: rgba(15, 23, 42, 0.70);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-border-subtle: rgba(255, 255, 255, 0.08);
  --glass-shadow: 0 16px 36px -12px rgba(0, 0, 0, 0.75);
  --glass-shadow-lg: 0 24px 50px -15px rgba(0, 0, 0, 0.85);
  --glass-inset-highlight: inset 0 1.5px 1px 0 rgba(255, 255, 255, 0.12), inset 0 -1px 1px 0 rgba(0, 0, 0, 0.6);

  --text-main: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-light: #64748b;
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]),
  :root:not([data-theme="light"]) {
    --bg-primary: #0b0f19;
    --bg-mesh-1: rgba(30, 58, 138, 0.40);
    --bg-mesh-2: rgba(5, 150, 105, 0.22);
    --bg-mesh-3: rgba(17, 24, 39, 0.98);
    --bg-mesh-center: rgba(30, 58, 138, 0.20);

    --glass-bg: rgba(17, 24, 39, 0.88);
    --glass-bg-hover: rgba(30, 41, 59, 0.94);
    --glass-bg-active: rgba(30, 41, 59, 0.98);
    --glass-bg-subtle: rgba(15, 23, 42, 0.70);
    --glass-border: rgba(255, 255, 255, 0.12);
    --glass-border-subtle: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 16px 36px -12px rgba(0, 0, 0, 0.75);
    --glass-shadow-lg: 0 24px 50px -15px rgba(0, 0, 0, 0.85);
    --glass-inset-highlight: inset 0 1.5px 1px 0 rgba(255, 255, 255, 0.12), inset 0 -1px 1px 0 rgba(0, 0, 0, 0.6);

    --text-main: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --text-light: #64748b;
  }
}

/* Sfondo Globale HTML & BODY */
html[data-theme="dark"] {
  background-color: #0b0f19 !important;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(30, 58, 138, 0.35) 0%, transparent 40%),
    radial-gradient(circle at 90% 10%, rgba(5, 150, 105, 0.20) 0%, transparent 45%),
    radial-gradient(circle at 50% 80%, rgba(30, 58, 138, 0.20) 0%, transparent 50%),
    radial-gradient(circle at 20% 90%, rgba(5, 150, 105, 0.18) 0%, transparent 40%) !important;
  color: #f8fafc !important;
}

html[data-theme="dark"] body {
  background-color: transparent !important;
  color: #f8fafc !important;
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) {
    background-color: #0b0f19 !important;
    background-image: 
      radial-gradient(circle at 10% 20%, rgba(30, 58, 138, 0.35) 0%, transparent 40%),
      radial-gradient(circle at 90% 10%, rgba(5, 150, 105, 0.20) 0%, transparent 45%),
      radial-gradient(circle at 50% 80%, rgba(30, 58, 138, 0.20) 0%, transparent 50%),
      radial-gradient(circle at 20% 90%, rgba(5, 150, 105, 0.18) 0%, transparent 40%) !important;
    color: #f8fafc !important;
  }
  html:not([data-theme="light"]) body {
    background-color: transparent !important;
    color: #f8fafc !important;
  }
}

/* Ambient Glow */
html[data-theme="dark"] .ambient-glow-1 {
  background: radial-gradient(circle, rgba(37, 99, 235, 0.22) 0%, transparent 70%) !important;
}
html[data-theme="dark"] .ambient-glow-2 {
  background: radial-gradient(circle, rgba(16, 185, 129, 0.16) 0%, transparent 70%) !important;
}

/* Header & Top Controls */
html[data-theme="dark"] .brand-icon {
  background: rgba(30, 41, 59, 0.9) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4) !important;
}

html[data-theme="dark"] .brand-text h1 {
  background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

html[data-theme="dark"] .brand-text p {
  color: #38bdf8 !important;
}

html[data-theme="dark"] .btn-theme-toggle,
html[data-theme="dark"] .user-profile-badge {
  background: rgba(30, 41, 59, 0.85) !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  color: #f8fafc !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4) !important;
}
html[data-theme="dark"] .btn-theme-toggle:hover,
html[data-theme="dark"] .user-profile-badge:hover {
  background: rgba(51, 65, 85, 0.95) !important;
}

html[data-theme="dark"] .user-name {
  color: #f8fafc !important;
}

/* Tutte le Glass Cards & Tutte le Hero Cards */
html[data-theme="dark"] .glass-card,
html[data-theme="dark"] .liquidity-hero-card,
html[data-theme="dark"] .debts-hero-card,
html[data-theme="dark"] .accounts-hero-card,
html[data-theme="dark"] .investments-hero-card,
html[data-theme="dark"] .wishlist-summary-card,
html[data-theme="dark"] .report-stat-card,
html[data-theme="dark"] .search-filter-card {
  background: rgba(17, 24, 39, 0.88) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 16px 36px -12px rgba(0, 0, 0, 0.75), inset 0 1px 1px 0 rgba(255, 255, 255, 0.08) !important;
  color: #f8fafc !important;
}

html[data-theme="dark"] .glass-card::before {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2) 30%, rgba(255, 255, 255, 0.2) 70%, transparent) !important;
}

/* Hero Balance & Valori Finanziari */
html[data-theme="dark"] .hero-label {
  color: #94a3b8 !important;
}

html[data-theme="dark"] .hero-balance-val {
  color: #ffffff !important;
  text-shadow: 0 0 24px rgba(56, 189, 248, 0.25);
}

html[data-theme="dark"] .hero-balance-val .currency-symbol {
  color: #64748b !important;
}

html[data-theme="dark"] .hero-edit-btn {
  background: rgba(30, 41, 59, 0.85) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  color: #e2e8f0 !important;
}
html[data-theme="dark"] .hero-edit-btn:hover {
  background: rgba(51, 65, 85, 0.95) !important;
  color: #ffffff !important;
}

html[data-theme="dark"] .btn-hero-credit {
  background: rgba(16, 185, 129, 0.25) !important;
  border: 1px solid rgba(16, 185, 129, 0.55) !important;
  color: #34d399 !important;
}

html[data-theme="dark"] .btn-hero-debt {
  background: rgba(239, 68, 68, 0.25) !important;
  border: 1px solid rgba(239, 68, 68, 0.55) !important;
  color: #f87171 !important;
}

/* Pillole Indicatori in Spese: Debiti, Crediti, Investimenti, Patrimonio */
html[data-theme="dark"] .finance-pill {
  background: rgba(30, 41, 59, 0.75) !important;
  border: 1px solid rgba(255, 255, 255, 0.10) !important;
  color: #f8fafc !important;
}
html[data-theme="dark"] .finance-pill-label {
  color: #94a3b8 !important;
}
html[data-theme="dark"] .finance-pill-val {
  color: #ffffff !important;
}

/* Split Grid Contanti vs Carta */
html[data-theme="dark"] .split-pill {
  background: rgba(30, 41, 59, 0.75) !important;
  border: 1px solid rgba(255, 255, 255, 0.10) !important;
}
html[data-theme="dark"] .split-pill-label {
  color: #cbd5e1 !important;
}
html[data-theme="dark"] .split-pill-amount {
  color: #ffffff !important;
}

/* Split Grid Prestiti (Crediti vs Debiti) */
html[data-theme="dark"] .split-pill-credits {
  background: rgba(6, 78, 59, 0.4) !important;
  border: 1px solid rgba(52, 211, 153, 0.35) !important;
}
html[data-theme="dark"] .split-pill-debts {
  background: rgba(127, 29, 29, 0.4) !important;
  border: 1px solid rgba(248, 113, 113, 0.35) !important;
}

/* Split Grid Investimenti (Investito vs Rendimento) */
html[data-theme="dark"] .split-pill-invested {
  background: rgba(30, 41, 59, 0.8) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
}
html[data-theme="dark"] .split-pill-profit {
  background: rgba(76, 29, 149, 0.35) !important;
  border: 1px solid rgba(167, 139, 250, 0.3) !important;
}

/* Pulsanti Quick Action (+ Entrata, - Spesa) */
html[data-theme="dark"] .btn-action-income {
  background: linear-gradient(145deg, rgba(6, 78, 59, 0.6) 0%, rgba(6, 95, 70, 0.45) 100%) !important;
  color: #6ee7b7 !important;
  border: 1.5px solid rgba(52, 211, 153, 0.45) !important;
  box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.5) !important;
}
html[data-theme="dark"] .btn-action-income:hover {
  background: linear-gradient(145deg, rgba(6, 78, 59, 0.8) 0%, rgba(6, 95, 70, 0.65) 100%) !important;
  color: #a7f3d0 !important;
}

html[data-theme="dark"] .btn-action-expense {
  background: linear-gradient(145deg, rgba(136, 19, 55, 0.6) 0%, rgba(159, 18, 57, 0.45) 100%) !important;
  color: #fda4af !important;
  border: 1.5px solid rgba(251, 113, 133, 0.45) !important;
  box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.5) !important;
}
html[data-theme="dark"] .btn-action-expense:hover {
  background: linear-gradient(145deg, rgba(136, 19, 55, 0.8) 0%, rgba(159, 18, 57, 0.65) 100%) !important;
  color: #fecdd3 !important;
}

/* Ricerca e Filtri */
html[data-theme="dark"] .section-title {
  color: #f8fafc !important;
}
html[data-theme="dark"] .section-subtitle,
html[data-theme="dark"] .drag-hint {
  color: #94a3b8 !important;
}

html[data-theme="dark"] .search-input {
  background: rgba(30, 41, 59, 0.88) !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  color: #f8fafc !important;
}
html[data-theme="dark"] .search-input:focus {
  border-color: #38bdf8 !important;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.25) !important;
}
html[data-theme="dark"] .search-icon {
  color: #94a3b8 !important;
}

html[data-theme="dark"] .filter-pill {
  background: rgba(30, 41, 59, 0.8) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #94a3b8 !important;
}
html[data-theme="dark"] .filter-pill:hover {
  background: rgba(51, 65, 85, 0.9) !important;
  color: #f8fafc !important;
}
html[data-theme="dark"] .filter-pill.active {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
  border-color: #3b82f6 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4) !important;
}

/* Schede Elementi (Transazioni, Wishlist, Debiti, Investimenti, Conti) */
html[data-theme="dark"] .transaction-card,
html[data-theme="dark"] .wishlist-item-card,
html[data-theme="dark"] .investment-card,
html[data-theme="dark"] .account-card,
html[data-theme="dark"] .debt-card {
  background: rgba(17, 24, 39, 0.85) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 8px 24px -6px rgba(0, 0, 0, 0.5) !important;
  color: #f8fafc !important;
}
html[data-theme="dark"] .transaction-card:hover,
html[data-theme="dark"] .wishlist-item-card:hover,
html[data-theme="dark"] .investment-card:hover,
html[data-theme="dark"] .account-card:hover,
html[data-theme="dark"] .debt-card:hover {
  background: rgba(30, 41, 59, 0.92) !important;
}

html[data-theme="dark"] .tx-title,
html[data-theme="dark"] .account-name,
html[data-theme="dark"] .debt-person,
html[data-theme="dark"] .inv-asset-name,
html[data-theme="dark"] .wishlist-item-name {
  color: #f8fafc !important;
}

html[data-theme="dark"] .tx-date,
html[data-theme="dark"] .debt-title,
html[data-theme="dark"] .inv-platform,
html[data-theme="dark"] .accounts-hero-sub {
  color: #94a3b8 !important;
}

html[data-theme="dark"] .tx-drag-handle {
  color: #64748b !important;
}

/* Importi e Valori */
html[data-theme="dark"] .tx-amount-income {
  color: #34d399 !important;
  text-shadow: 0 0 12px rgba(52, 211, 153, 0.3);
}
html[data-theme="dark"] .tx-amount-expense {
  color: #f87171 !important;
}

html[data-theme="dark"] .tx-type-income {
  background: rgba(6, 78, 59, 0.45) !important;
  color: #34d399 !important;
  border: 1px solid rgba(52, 211, 153, 0.4) !important;
}
html[data-theme="dark"] .tx-type-expense {
  background: rgba(136, 19, 55, 0.45) !important;
  color: #f87171 !important;
  border: 1px solid rgba(251, 113, 133, 0.4) !important;
}

/* Badge Categoria e Metodo Pagamento */
html[data-theme="dark"] .tx-badge-cat {
  background: rgba(30, 41, 59, 0.9) !important;
  color: #93c5fd !important;
  border: 1px solid rgba(147, 197, 253, 0.25) !important;
}
html[data-theme="dark"] .tx-badge-method-cash {
  background: rgba(245, 158, 11, 0.2) !important;
  color: #fbbf24 !important;
  border: 1px solid rgba(245, 158, 11, 0.35) !important;
}
html[data-theme="dark"] .tx-badge-method-card {
  background: rgba(59, 130, 246, 0.2) !important;
  color: #60a5fa !important;
  border: 1px solid rgba(59, 130, 246, 0.35) !important;
}

/* Note e Strisce di Riepilogo */
html[data-theme="dark"] .card-note-box,
html[data-theme="dark"] .tx-note-preview,
html[data-theme="dark"] .inv-summary-strip {
  background: rgba(30, 41, 59, 0.75) !important;
  color: #cbd5e1 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

html[data-theme="dark"] .btn-icon-sm {
  background: rgba(30, 41, 59, 0.85) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  color: #cbd5e1 !important;
}
html[data-theme="dark"] .btn-icon-sm:hover {
  background: rgba(51, 65, 85, 1) !important;
  color: #ffffff !important;
}
html[data-theme="dark"] .btn-icon-danger:hover {
  background: rgba(239, 68, 68, 0.25) !important;
  color: #f87171 !important;
}

html[data-theme="dark"] .tx-thumb-circle,
html[data-theme="dark"] .wishlist-thumb-circle {
  border-color: rgba(255, 255, 255, 0.25) !important;
  background: rgba(30, 41, 59, 0.85) !important;
}

/* ============================================================
   AVVISI RATA IN SCADENZA (SPESE & PRESTITI)
   ============================================================ */
html[data-theme="dark"] .installment-month-alert {
  background: linear-gradient(135deg, rgba(80, 15, 15, 0.85), rgba(17, 24, 39, 0.95)) !important;
  border: 1.5px solid rgba(239, 68, 68, 0.6) !important;
  box-shadow: 0 10px 25px -5px rgba(239, 68, 68, 0.4) !important;
}
html[data-theme="dark"] .installment-month-text {
  color: #f8fafc !important;
}
html[data-theme="dark"] .installment-month-badge {
  color: #f87171 !important;
}

html[data-theme="dark"] .debt-card.due-this-month {
  border: 2px solid #ef4444 !important;
  background: linear-gradient(135deg, rgba(80, 15, 15, 0.85), rgba(25, 15, 20, 0.95)) !important;
  box-shadow: 0 8px 25px rgba(239, 68, 68, 0.35) !important;
}
html[data-theme="dark"] .debt-card.due-this-month .debt-installment-info {
  background: rgba(127, 29, 29, 0.5) !important;
  border-color: rgba(239, 68, 68, 0.5) !important;
  color: #fca5a5 !important;
}

html[data-theme="dark"] .debt-due-banner-red {
  background: linear-gradient(135deg, rgba(127, 29, 29, 0.55), rgba(30, 15, 20, 0.9)) !important;
  border: 1.5px solid rgba(239, 68, 68, 0.6) !important;
  color: #fca5a5 !important;
}
html[data-theme="dark"] .due-banner-desc {
  color: #fecaca !important;
}
html[data-theme="dark"] .debt-due-badge-red {
  background: rgba(127, 29, 29, 0.5) !important;
  color: #fca5a5 !important;
  border: 1px solid rgba(239, 68, 68, 0.5) !important;
}

html[data-theme="dark"] .debt-installment-info {
  background: rgba(30, 41, 59, 0.75) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #cbd5e1 !important;
}

html[data-theme="dark"] .debt-amount.credit { color: #34d399 !important; }
html[data-theme="dark"] .debt-amount.debt { color: #f87171 !important; }

/* Badge Stato Prestiti */
html[data-theme="dark"] .badge-status-completed {
  background: rgba(51, 65, 85, 0.7) !important;
  color: #cbd5e1 !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}
html[data-theme="dark"] .badge-status-credit {
  background: rgba(6, 78, 59, 0.4) !important;
  color: #6ee7b7 !important;
  border: 1px solid rgba(52, 211, 153, 0.3) !important;
}
html[data-theme="dark"] .badge-status-debt {
  background: rgba(127, 29, 29, 0.4) !important;
  color: #fca5a5 !important;
  border: 1px solid rgba(248, 113, 113, 0.3) !important;
}

/* ============================================================
   SEZIONE CONTI & WALLET
   ============================================================ */
html[data-theme="dark"] .account-card.is-primary {
  border: 2px solid #38bdf8 !important;
  background: linear-gradient(135deg, rgba(15, 30, 55, 0.95), rgba(17, 24, 39, 0.96)) !important;
  box-shadow: 0 10px 30px rgba(56, 189, 248, 0.22) !important;
}
html[data-theme="dark"] .account-primary-star {
  background: rgba(30, 58, 138, 0.6) !important;
  color: #93c5fd !important;
  border: 1px solid rgba(96, 165, 250, 0.3) !important;
}
html[data-theme="dark"] .account-balance-val {
  color: #ffffff !important;
}
html[data-theme="dark"] .account-type-badge {
  background: rgba(30, 41, 59, 0.9) !important;
  color: #94a3b8 !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}
html[data-theme="dark"] .account-sync-text {
  color: #38bdf8 !important;
}
html[data-theme="dark"] .primary-sync-notice {
  background: rgba(30, 41, 59, 0.85) !important;
  border: 1px solid rgba(56, 189, 248, 0.3) !important;
  color: #cbd5e1 !important;
}
html[data-theme="dark"] .primary-sync-notice strong {
  color: #f8fafc !important;
}

/* ============================================================
   SEZIONE INVESTIMENTI
   ============================================================ */
html[data-theme="dark"] .inv-type-badge {
  background: rgba(139, 92, 246, 0.25) !important;
  color: #c4b5fd !important;
  border: 1px solid rgba(139, 92, 246, 0.4) !important;
}
html[data-theme="dark"] .inv-profit-badge.positive {
  background: rgba(6, 95, 70, 0.4) !important;
  color: #6ee7b7 !important;
  border: 1px solid rgba(52, 211, 153, 0.35) !important;
}
html[data-theme="dark"] .inv-profit-badge.negative {
  background: rgba(127, 29, 29, 0.4) !important;
  color: #fca5a5 !important;
  border: 1px solid rgba(248, 113, 113, 0.35) !important;
}

/* ============================================================
   SEZIONE DESIDERI (WISHLIST)
   ============================================================ */
html[data-theme="dark"] .wishlist-total-val {
  color: #38bdf8 !important;
  text-shadow: 0 0 20px rgba(56, 189, 248, 0.3);
}
html[data-theme="dark"] .wishlist-item-price {
  color: #ffffff !important;
}
html[data-theme="dark"] .btn-convert-expense {
  background: rgba(6, 95, 70, 0.35) !important;
  border: 1px solid rgba(52, 211, 153, 0.4) !important;
  color: #6ee7b7 !important;
}
html[data-theme="dark"] .btn-convert-expense:hover {
  background: rgba(6, 95, 70, 0.6) !important;
  color: #a7f3d0 !important;
}
html[data-theme="dark"] .badge-status-bought {
  background: rgba(6, 78, 59, 0.4) !important;
  color: #6ee7b7 !important;
  border: 1px solid rgba(52, 211, 153, 0.3) !important;
}

/* ============================================================
   MODALI E FORM CONTROLS
   ============================================================ */
html[data-theme="dark"] .modal-backdrop {
  background: rgba(0, 0, 0, 0.8) !important;
}

html[data-theme="dark"] .modal-sheet {
  background: rgba(15, 23, 42, 0.98) !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  color: #f8fafc !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.9) !important;
}

html[data-theme="dark"] .modal-title {
  color: #f8fafc !important;
}

html[data-theme="dark"] .modal-handle-bar {
  background: rgba(255, 255, 255, 0.25) !important;
}

html[data-theme="dark"] .modal-close-btn {
  background: rgba(30, 41, 59, 0.9) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  color: #cbd5e1 !important;
}

html[data-theme="dark"] .form-label {
  color: #e2e8f0 !important;
}

html[data-theme="dark"] .form-input,
html[data-theme="dark"] .form-select,
html[data-theme="dark"] .form-textarea,
html[data-theme="dark"] .month-select {
  background: rgba(30, 41, 59, 0.95) !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  color: #ffffff !important;
}
html[data-theme="dark"] .form-input:focus,
html[data-theme="dark"] .form-select:focus,
html[data-theme="dark"] .form-textarea:focus,
html[data-theme="dark"] .month-select:focus {
  border-color: #38bdf8 !important;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.25) !important;
}
html[data-theme="dark"] .form-select option,
html[data-theme="dark"] .month-select option {
  background-color: #0f172a !important;
  color: #f8fafc !important;
}

html[data-theme="dark"] .form-group-card {
  background: rgba(30, 41, 59, 0.7) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
}

html[data-theme="dark"] .switch-slider {
  background-color: #334155 !important;
}
html[data-theme="dark"] .switch-container input:checked + .switch-slider {
  background-color: #2563eb !important;
}

html[data-theme="dark"] .segmented-control {
  background: rgba(15, 23, 42, 0.95) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
}

html[data-theme="dark"] .segmented-btn {
  color: #94a3b8 !important;
}
html[data-theme="dark"] .segmented-btn.active {
  background: rgba(37, 99, 235, 0.95) !important;
  color: #ffffff !important;
}
html[data-theme="dark"] .segmented-btn-income.active {
  background: #059669 !important;
  color: #ffffff !important;
}
html[data-theme="dark"] .segmented-btn-expense.active {
  background: #dc2626 !important;
  color: #ffffff !important;
}

html[data-theme="dark"] .image-upload-wrapper {
  background: rgba(30, 41, 59, 0.7) !important;
  border: 2px dashed rgba(255, 255, 255, 0.2) !important;
}
html[data-theme="dark"] .image-upload-label {
  color: #cbd5e1 !important;
}
html[data-theme="dark"] .image-upload-sub {
  color: #64748b !important;
}

/* Pulsante Primario, Storno e Report Export */
html[data-theme="dark"] .btn-primary {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.45) !important;
}

html[data-theme="dark"] .btn-storno {
  background: rgba(245, 158, 11, 0.2) !important;
  border: 1px solid rgba(245, 158, 11, 0.5) !important;
  color: #fbbf24 !important;
}
html[data-theme="dark"] .btn-storno:hover {
  background: #d97706 !important;
  color: #ffffff !important;
  border-color: #d97706 !important;
}

html[data-theme="dark"] .btn-report-action {
  background: rgba(30, 41, 59, 0.88) !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  color: #f8fafc !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4) !important;
}
html[data-theme="dark"] .btn-report-action:hover {
  background: rgba(51, 65, 85, 0.95) !important;
  color: #ffffff !important;
}

/* Bottom Dock Navigation */
html[data-theme="dark"] .bottom-dock-nav {
  background: rgba(15, 23, 42, 0.94) !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.75) !important;
}

html[data-theme="dark"] .dock-item {
  color: #94a3b8 !important;
}
html[data-theme="dark"] .dock-item:hover {
  color: #f8fafc !important;
  background: rgba(255, 255, 255, 0.08) !important;
}
html[data-theme="dark"] .dock-item.active {
  color: #38bdf8 !important;
  background: rgba(30, 41, 59, 0.95) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5) !important;
}
html[data-theme="dark"] .dock-item.active svg {
  color: #38bdf8 !important;
  stroke: #38bdf8 !important;
}

/* ============================================================
   REPORT & GRAFICI A CIAMBELLA
   ============================================================ */
html[data-theme="dark"] .stat-card-val,
html[data-theme="dark"] .donut-center-value,
html[data-theme="dark"] .category-bar-header {
  color: #f8fafc !important;
}
html[data-theme="dark"] .stat-card-label,
html[data-theme="dark"] .donut-center-label {
  color: #94a3b8 !important;
}
html[data-theme="dark"] .donut-legend-item {
  background: rgba(30, 41, 59, 0.75) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #cbd5e1 !important;
}
html[data-theme="dark"] .donut-legend-item strong {
  color: #f8fafc !important;
}
html[data-theme="dark"] .category-progress-track {
  background: rgba(51, 65, 85, 0.6) !important;
}

html[data-theme="dark"] .btn-cookie-manage,
html[data-theme="dark"] .btn-secondary {
  background: rgba(30, 41, 59, 0.85) !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  color: #f8fafc !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}
html[data-theme="dark"] .btn-cookie-manage:hover,
html[data-theme="dark"] .btn-secondary:hover {
  background: rgba(51, 65, 85, 0.95) !important;
  color: #ffffff !important;
}

/* Profile, Footer & Cookie */
html[data-theme="dark"] .badge-profile-role {
  background: rgba(30, 58, 138, 0.5) !important;
  color: #93c5fd !important;
  border: 1px solid rgba(96, 165, 250, 0.3) !important;
}
html[data-theme="dark"] .cookie-pref-row {
  background: rgba(30, 41, 59, 0.75) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #f8fafc !important;
}
html[data-theme="dark"] .cookie-glass-banner {
  background: rgba(15, 23, 42, 0.96) !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  color: #f8fafc !important;
}
html[data-theme="dark"] .app-footer {
  color: #64748b !important;
}
html[data-theme="dark"] .footer-links a {
  color: #94a3b8 !important;
}
html[data-theme="dark"] .footer-links a:hover {
  color: #38bdf8 !important;
}
html[data-theme="dark"] .empty-title {
  color: #f8fafc !important;
}
html[data-theme="dark"] .empty-desc {
  color: #94a3b8 !important;
}

/* ============================================================
   CERCHIETTO MINIATURA FOTO TRANSAZIONI & DESIDERI
   ============================================================ */

.tx-thumb-circle {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  border: 2.5px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
  background: rgba(226, 232, 240, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s;
}

.tx-thumb-circle:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.25);
}

.tx-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.wishlist-thumb-circle {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  border: 2.5px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
  background: rgba(226, 232, 240, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.wishlist-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Anteprima e Pulsanti Upload Immagine nelle Modali */
.image-upload-wrapper {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  background: rgba(241, 245, 249, 0.6);
  border: 1.5px dashed var(--glass-border-subtle);
  border-radius: var(--radius-md);
  align-items: center;
  justify-content: center;
  position: relative;
}


.image-preview-circle {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
  background: #e2e8f0;
  display: none;
  align-items: center;
  justify-content: center;
  position: relative;
}

.image-preview-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.btn-theme-toggle {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  color: var(--text-main);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: var(--transition-smooth);
}

.btn-theme-toggle:hover {
  background: var(--glass-bg-hover);
  transform: translateY(-1px);
}

/* ============================================================
   GRAFICI A CIAMBELLA (DONUT CHARTS) NEI REPORT
   ============================================================ */

.donut-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 16px 0;
}

.donut-chart-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

@media (min-width: 580px) {
  .donut-chart-wrapper {
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 28px;
  }
}

.donut-svg-container {
  position: relative;
  width: 170px;
  height: 170px;
  flex-shrink: 0;
}

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

.donut-slice {
  transition: stroke-width 0.25s ease, opacity 0.25s ease;
  cursor: pointer;
}

.donut-slice:hover {
  stroke-width: 28 !important;
  opacity: 0.9;
}

.donut-center-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  text-align: center;
}

.donut-center-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.donut-center-value {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
  margin-top: 2px;
}

.donut-legend {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  max-width: 280px;
}

.donut-legend-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-secondary);
  padding: 5px 10px;
  border-radius: 8px;
  background: rgba(241, 245, 249, 0.7);
  border: 1px solid var(--glass-border-subtle);
  transition: background 0.2s;
}


.donut-legend-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.donut-legend-color {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ============================================================
   UPGRADE SMONEY 2026 - PUNTI 1-20
   ============================================================ */

/* Punto 9: Liquidità, Contanti e Carta/Conto sulla STESSA riga */
.hero-trio-row {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
  margin-bottom: 12px;
}
.hero-trio-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8px 6px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(226, 232, 240, 0.7);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03);
}
.hero-trio-col.trio-liquidity {
  background: linear-gradient(135deg, rgba(238, 242, 255, 0.8), rgba(255, 255, 255, 0.85));
  border-color: rgba(199, 210, 254, 0.8);
}
.hero-trio-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 3px;
}
.hero-trio-val {
  font-size: 0.96rem;
  font-weight: 800;
  color: var(--text-main);
  white-space: nowrap;
}
html[data-theme="dark"] .hero-trio-col {
  background: rgba(30, 41, 59, 0.6);
  border-color: rgba(255, 255, 255, 0.08);
}
html[data-theme="dark"] .hero-trio-col.trio-liquidity {
  background: linear-gradient(135deg, rgba(30, 27, 75, 0.5), rgba(15, 23, 42, 0.7));
  border-color: rgba(99, 102, 241, 0.3);
}

/* Punto 11: Avviso Scadenza Rata SOTTILE (Slim) */
.installment-slim-alert {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: rgba(251, 146, 60, 0.12);
  border: 1px solid rgba(251, 146, 60, 0.35);
  font-size: 0.76rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
  transition: var(--transition-smooth);
}
.installment-slim-alert:hover {
  background: rgba(251, 146, 60, 0.18);
}
.installment-slim-icon {
  font-size: 0.85rem;
  flex-shrink: 0;
}
.installment-slim-text {
  flex: 1;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.installment-slim-btn {
  font-size: 0.70rem;
  font-weight: 800;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(249, 115, 22, 0.6);
  background: rgba(249, 115, 22, 0.15);
  color: #ea580c;
  cursor: pointer;
  white-space: nowrap;
}
html[data-theme="dark"] .installment-slim-alert {
  background: rgba(124, 45, 18, 0.25);
  border-color: rgba(251, 146, 60, 0.4);
}
html[data-theme="dark"] .installment-slim-btn {
  color: #fb923c;
  background: rgba(249, 115, 22, 0.25);
}

/* Prompt Rientro Credito (Punto 2) */
.credit-due-alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(254, 243, 199, 0.85), rgba(255, 251, 235, 0.95));
  border: 1.5px solid #f59e0b;
  margin-bottom: 8px;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.15);
}
html[data-theme="dark"] .credit-due-alert {
  background: linear-gradient(135deg, rgba(120, 53, 15, 0.4), rgba(69, 26, 3, 0.5));
  border-color: #f59e0b;
}

/* Punto 12: Barra di ricerca e pulsante Filtri sulla stessa riga */
.search-filter-row {
  display: flex;
  gap: 8px;
  align-items: center;
  width: 100%;
}
.search-filter-row .search-input-wrapper {
  flex: 1;
  min-width: 0;
  margin-bottom: 0 !important;
}
.btn-filters-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 42px;
  padding: 0 14px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(226, 232, 240, 0.85);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(14px);
  color: var(--text-main);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-smooth);
}
.btn-filters-toggle:hover {
  background: rgba(255, 255, 255, 1);
  border-color: var(--color-primary);
}
.btn-filters-toggle.is-open {
  background: var(--color-primary) !important;
  color: #ffffff !important;
  border-color: var(--color-primary) !important;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}
.filters-badge-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ea580c;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
}
.filters-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(226, 232, 240, 0.8);
  margin-top: 6px;
  animation: slideDownFade 0.2s ease-out;
}
html[data-theme="dark"] .btn-filters-toggle {
  background: rgba(30, 41, 59, 0.7);
  border-color: rgba(255, 255, 255, 0.1);
  color: #f1f5f9;
}
html[data-theme="dark"] .filters-panel {
  background: rgba(15, 23, 42, 0.85);
  border-color: rgba(255, 255, 255, 0.08);
}
@keyframes slideDownFade {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Punto 17: Totali Spese ed Entrate perfettamente centrate nella propria colonna */
.summary-bars-row {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 12px !important;
  width: 100% !important;
}
.summary-bars-row .stat-item {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  padding: 12px 10px !important;
  width: 100% !important;
}
.summary-bars-row .stat-details {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  width: 100% !important;
}
.summary-bars-row .stat-label {
  text-align: center !important;
}
.summary-bars-row .stat-amount {
  text-align: center !important;
}

/* Punto 4 & 5: Colori personalizzati righe transazioni & Credito Arancione */
.tx-item {
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.tx-item.tx-color-custom {
  border-left-width: 4px !important;
  border-left-style: solid !important;
}
.tx-item.tx-is-credit {
  border-left: 4px solid #f97316 !important;
  background: linear-gradient(90deg, rgba(254, 243, 199, 0.45) 0%, rgba(255, 255, 255, 0.85) 15%) !important;
}
html[data-theme="dark"] .tx-item.tx-is-credit {
  background: linear-gradient(90deg, rgba(124, 45, 18, 0.35) 0%, rgba(30, 41, 59, 0.7) 18%) !important;
  border-left-color: #f97316 !important;
}
.badge-credit-orange {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: #ffedd5;
  color: #c2410c;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  border: 1px solid #fdba74;
}
html[data-theme="dark"] .badge-credit-orange {
  background: rgba(124, 45, 18, 0.4);
  color: #fb923c;
  border-color: rgba(249, 115, 22, 0.4);
}

/* Palette selettore colori transazione (Punto 5) */
.color-swatch-picker {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.color-swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.15s ease, border-color 0.15s ease;
  position: relative;
}
.color-swatch:hover {
  transform: scale(1.15);
}
.color-swatch.is-selected {
  border-color: var(--text-main);
  box-shadow: 0 0 0 2px var(--color-primary);
  transform: scale(1.12);
}
.color-swatch.swatch-none {
  background: repeating-linear-gradient(45deg, #e2e8f0, #e2e8f0 3px, #ffffff 3px, #ffffff 6px);
  border: 1px solid #cbd5e1;
}

/* Punto 7: Loghi Banche Autentici e Rapidi */
.bank-logo-box {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
  flex-shrink: 0;
}
.bank-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}
.bank-quick-grid {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 6px 2px;
  scrollbar-width: thin;
}
.bank-quick-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(226, 232, 240, 0.8);
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-smooth);
}
.bank-quick-chip:hover, .bank-quick-chip.is-active {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

/* Punto 14 & 6: Profilo Dropdown con Tema Solo Light/Dark */
.profile-dropdown-menu {
  position: absolute;
  top: 60px;
  right: 16px;
  width: 250px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(226, 232, 240, 0.85);
  border-radius: var(--radius-xl);
  padding: 14px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
  z-index: 1000;
  animation: slideDownFade 0.2s ease-out;
}
html[data-theme="dark"] .profile-dropdown-menu {
  background: rgba(15, 23, 42, 0.94);
  border-color: rgba(255, 255, 255, 0.1);
}
.theme-switch-duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: rgba(241, 245, 249, 0.8);
  padding: 4px;
  border-radius: var(--radius-lg);
  margin-top: 8px;
}
html[data-theme="dark"] .theme-switch-duo {
  background: rgba(30, 41, 59, 0.8);
}
.theme-switch-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: var(--radius-md);
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-smooth);
}
.theme-switch-btn.active {
  background: #ffffff;
  color: var(--text-main);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
}
html[data-theme="dark"] .theme-switch-btn.active {
  background: #0f172a;
  color: #f8fafc;
}

/* Punto 19: Sezione Beni */
.pill-assets {
  background: rgba(245, 243, 255, 0.85);
  border: 1px solid rgba(221, 214, 254, 0.9);
}
.pill-assets .finance-pill-dot {
  background: #8b5cf6;
  box-shadow: 0 0 8px rgba(139, 92, 246, 0.6);
}
html[data-theme="dark"] .pill-assets {
  background: rgba(46, 16, 101, 0.35);
  border-color: rgba(139, 92, 246, 0.4);
}
.asset-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: 0 4px 15px rgba(15, 23, 42, 0.03);
  transition: var(--transition-smooth);
}
.asset-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.07);
}
html[data-theme="dark"] .asset-card {
  background: rgba(30, 41, 59, 0.65);
  border-color: rgba(255, 255, 255, 0.07);
}

/* Stampa / Esportazione PDF pulita e proporzionata (Punti 16) */
#pdfPrintSection {
  display: none !important;
}

@media print {
  @page {
    margin: 10mm;
    size: A4 portrait;
  }
  html, body {
    background: #ffffff !important;
    color: #0f172a !important;
    height: auto !important;
    min-height: auto !important;
    overflow: visible !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  body > *:not(#pdfPrintSection) {
    display: none !important;
  }
  #pdfPrintSection {
    display: block !important;
    position: static !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
    color: #0f172a !important;
  }
}
/* Pull to Refresh Indicator (Punto 3) */
.pull-to-refresh-indicator {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translate(-50%, -120%);
  z-index: 9999;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.12);
  border-radius: var(--radius-full);
  padding: 8px 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-main);
  pointer-events: none;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
  opacity: 0;
}
html[data-theme="dark"] .pull-to-refresh-indicator {
  background: rgba(15, 23, 42, 0.92);
  border-color: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}
.pull-to-refresh-indicator .pull-icon {
  font-size: 1rem;
  transition: transform 0.2s ease;
}
.pull-to-refresh-indicator.is-ready .pull-icon {
  transform: rotate(180deg);
  color: var(--income-green);
}

/* FlusNey: identità e token semantici condivisi. */
:root {
  --flusney-lime:#CAFA24; --flusney-mint:#01F7C9; --flusney-teal:#01ECAD;
  --flusney-green:#1FE88F; --flusney-deep-teal:#006C60;
  --flusney-bg:#001615; --flusney-surface:#062A27; --flusney-surface-raised:#123D37;
  --flusney-ink:#07302B; --flusney-white:#FFFFFF; --flusney-off-white:#F5F8F6;
  --flusney-muted-text:#CBDBD6;
  --flusney-gradient:linear-gradient(110deg,#01F7C9 0%,#1FE88F 55%,#CAFA24 100%);
  --brand-action:var(--flusney-mint); --brand-action-text:var(--flusney-ink);
  --brand-focus:var(--flusney-deep-teal); --brand-border:#b9d0c9;
  --brand-danger:#b91c1c; --brand-warning:#9a5400; --brand-info:#075e75;
  --bg-primary:var(--flusney-off-white); --text-main:var(--flusney-ink);
  --text-secondary:#365951; --text-muted:#526b65;
  --bg-mesh-1:rgba(1,247,201,.08); --bg-mesh-2:rgba(31,232,143,.08);
  --bg-mesh-center:rgba(202,250,36,.06); --income-green:#006c60;
}
html[data-theme="dark"] {
  --bg-primary:var(--flusney-bg); --glass-bg:var(--flusney-surface);
  --glass-bg-hover:var(--flusney-surface-raised); --glass-bg-active:var(--flusney-surface-raised);
  --glass-bg-subtle:var(--flusney-surface); --glass-border:rgba(203,219,214,.24);
  --glass-border-subtle:rgba(203,219,214,.16); --text-main:var(--flusney-white);
  --text-secondary:var(--flusney-muted-text); --text-muted:var(--flusney-muted-text);
  --brand-focus:var(--flusney-mint); --brand-border:#46756b;
  background:var(--flusney-bg) !important; color:var(--flusney-white) !important;
}
html[data-theme="dark"] body {color:var(--flusney-white) !important}
html[data-theme="dark"] .ambient-glow {opacity:.24}
html[data-theme="dark"] .glass-card,html[data-theme="dark"] .liquidity-hero-card,
html[data-theme="dark"] .debts-hero-card,html[data-theme="dark"] .accounts-hero-card,
html[data-theme="dark"] .investments-hero-card,html[data-theme="dark"] .wishlist-summary-card,
html[data-theme="dark"] .report-stat-card,html[data-theme="dark"] .search-filter-card,
html[data-theme="dark"] .transaction-card,html[data-theme="dark"] .wishlist-item-card,
html[data-theme="dark"] .investment-card,html[data-theme="dark"] .account-card,
html[data-theme="dark"] .debt-card,html[data-theme="dark"] .modal-sheet {
  background:var(--flusney-surface) !important;
  border-color:var(--brand-border) !important;
}
html[data-theme="dark"] .ai-chat-header,html[data-theme="dark"] .ai-chat-sheet,
html[data-theme="dark"] .ai-bubble-bot {background:var(--flusney-surface-raised) !important;color:var(--flusney-white) !important}
.brand-badge {flex:0 1 auto;min-width:0}
.brand-wordmark {display:block;width:clamp(94px,27vw,145px);height:auto;object-fit:contain}
.brand-wordmark-dark {display:none}
html[data-theme="dark"] .brand-wordmark-light {display:none}
html[data-theme="dark"] .brand-wordmark-dark {display:block}
.auth-brand {margin:0 0 8px}
.auth-brand img {width:145px;height:auto;object-fit:contain}
.btn-privacy-toggle svg {width:18px;height:18px}
.btn-primary {background:var(--brand-action) !important;color:var(--brand-action-text) !important;box-shadow:none}
.btn-primary:hover {filter:brightness(.95);box-shadow:none}
.btn-primary:disabled {opacity:.55;cursor:not-allowed}
.dock-item.active,.header-wishlist-tab.active {color:var(--flusney-deep-teal)}
html[data-theme="dark"] .dock-item.active,html[data-theme="dark"] .header-wishlist-tab.active {color:var(--flusney-teal) !important}
.dock-item.active svg {color:inherit}
.ai-bubble-user {background:var(--flusney-deep-teal);color:var(--flusney-white);box-shadow:none}
.ai-avatar-badge {background:var(--flusney-gradient) !important;color:var(--flusney-ink) !important;box-shadow:none !important}
.ai-chat-header {border-color:var(--brand-border) !important}
.notes-panel {background:var(--flusney-white) !important;color:var(--flusney-ink) !important}
html[data-theme="dark"] .notes-panel {background:var(--flusney-surface) !important;color:var(--flusney-white) !important}
.notes-btn:not(.notes-secondary):not(.notes-danger) {background:var(--flusney-mint) !important;color:var(--flusney-ink) !important}
:focus-visible {outline:3px solid var(--brand-focus);outline-offset:3px}
@media(max-width:390px) {
  .app-header {gap:4px}
  .app-header .user-name {display:none}
  .brand-wordmark {width:clamp(86px,27vw,108px)}
}
@media(prefers-reduced-motion:reduce) {
  *,*::before,*::after {animation-duration:.01ms !important;animation-iteration-count:1 !important;scroll-behavior:auto !important;transition-duration:.01ms !important}
}

html[data-theme="dark"] {
  --bg-mesh-1:rgba(0,108,96,.12);--bg-mesh-2:rgba(31,232,143,.06);
  --bg-mesh-3:rgba(0,22,21,.98);--bg-mesh-center:rgba(0,108,96,.08);
}
.dock-center-ai-btn,html[data-theme="dark"] .dock-center-ai-btn {
  background:var(--flusney-gradient);color:var(--flusney-ink);
  box-shadow:0 3px 12px rgba(0,108,96,.25);border-color:var(--flusney-off-white);
}
html[data-theme="dark"] .dock-center-ai-btn {border-color:var(--flusney-bg)}
.dock-center-ai-btn svg {filter:none}
.dock-center-ai-label,html[data-theme="dark"] .dock-center-ai-label {color:var(--flusney-deep-teal)}
html[data-theme="dark"] .dock-center-ai-label {color:var(--flusney-teal)}
