/* ==========================================================================
   AURAPOCKET DESIGN SYSTEM & STYLESHEET
   ========================================================================== */

:root {
  /* Dynamic Color Palette */
  --bg-primary: #070913;
  --bg-card: rgba(10, 14, 30, 0.45);
  --border-card: rgba(129, 140, 248, 0.15);
  
  --indigo-primary: #818cf8;
  --indigo-glow: rgba(129, 140, 248, 0.4);
  
  --purple-primary: #c084fc;
  --purple-glow: rgba(192, 132, 252, 0.4);
  
  --pink-primary: #f472b6;
  --pink-glow: rgba(244, 114, 182, 0.4);
  
  --emerald-primary: #34d399;
  --emerald-glow: rgba(52, 211, 153, 0.4);
  
  --amber-primary: #fbbf24;
  --amber-glow: rgba(251, 191, 36, 0.4);

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  
  --font-family: 'Outfit', sans-serif;
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   RESET & BASE STYLES
   ========================================================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  min-height: 100vh;
}

/* Apply premium multi-layered 4-color ambient radial gradient on html ONLY when Cyber Dark is active */
html:not(:has(body.light-theme)):not(:has(body.ocean-theme)) {
  background: 
    radial-gradient(circle at 10% 20%, rgba(129, 140, 248, 0.15) 0%, transparent 45%), /* Indigo glow top-left */
    radial-gradient(circle at 85% 15%, rgba(192, 132, 252, 0.12) 0%, transparent 40%), /* Purple glow top-right */
    radial-gradient(circle at 80% 80%, rgba(244, 114, 182, 0.12) 0%, transparent 45%), /* Pink glow bottom-right */
    radial-gradient(circle at 15% 85%, rgba(52, 211, 153, 0.08) 0%, transparent 40%),  /* Emerald glow bottom-left */
    var(--bg-primary); /* Dark base #070913 */
}

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-family);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 20px;
}

/* Force transparent body ONLY when Cyber Dark is active to show the dynamic background */
body:not(.light-theme):not(.ocean-theme) {
  background: transparent !important;
}

/* ==========================================================================
   PREMIUM CYBER DARK DYNAMIC BACKGROUND
   ========================================================================== */
.cyber-dark-bg {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -2;
  background-color: #060713; /* Elegant deep dark navy space obsidian */
  overflow: hidden;
  pointer-events: none;
}

/* Hide completely in Light and Ocean themes */
body.light-theme .cyber-dark-bg,
body.ocean-theme .cyber-dark-bg {
  display: none !important;
}

/* Futuristic Fine Cyber Grid */
.cyber-grid {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(129, 140, 248, 0.012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(129, 140, 248, 0.012) 1px, transparent 1px);
  background-size: 60px 60px;
  background-position: center center;
  mask-image: radial-gradient(circle at 50% 50%, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(circle at 50% 50%, black 30%, transparent 80%);
  opacity: 0.85;
}

/* 1. Vibrant Indigo Glow (Top-Left) */
.cyber-glow-indigo {
  position: absolute;
  width: 55vw;
  height: 55vw;
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(99, 102, 241, 0.15) 0%, rgba(99, 102, 241, 0) 70%);
  top: -15%;
  left: -10%;
  animation: cyber-drift-indigo 24s ease-in-out infinite alternate;
  filter: blur(50px);
}

/* 2. Cyber Pink Glow (Bottom-Right) */
.cyber-glow-pink {
  position: absolute;
  width: 50vw;
  height: 50vw;
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(244, 114, 182, 0.13) 0%, rgba(244, 114, 182, 0) 70%);
  bottom: -15%;
  right: -10%;
  animation: cyber-drift-pink 28s ease-in-out infinite alternate-reverse;
  filter: blur(50px);
}

/* 3. Emerald Green Glow (Bottom-Left) */
.cyber-glow-green {
  position: absolute;
  width: 45vw;
  height: 45vw;
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(52, 211, 153, 0.11) 0%, rgba(52, 211, 153, 0) 70%);
  bottom: -10%;
  left: -5%;
  animation: cyber-drift-green 26s ease-in-out infinite alternate;
  filter: blur(60px);
}

/* 4. Imperial Purple Glow (Top-Right) */
.cyber-glow-purple {
  position: absolute;
  width: 50vw;
  height: 50vw;
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(168, 85, 247, 0.13) 0%, rgba(168, 85, 247, 0) 70%);
  top: -10%;
  right: -5%;
  animation: cyber-drift-purple 32s ease-in-out infinite alternate-reverse;
  filter: blur(50px);
}

/* 5. Matrix Neon Cyan Glow (Center-Right Breathing) */
.cyber-glow-cyan {
  position: absolute;
  width: 40vw;
  height: 40vw;
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(6, 182, 212, 0.13) 0%, rgba(6, 182, 212, 0) 70%);
  top: 30%;
  right: 25%;
  animation: cyber-drift-cyan 22s ease-in-out infinite alternate;
  filter: blur(60px);
}

@keyframes cyber-drift-indigo {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(6vw, 4vw) scale(1.08); }
  100% { transform: translate(-3vw, 8vw) scale(0.95); }
}

@keyframes cyber-drift-pink {
  0% { transform: translate(0, 0) scale(0.95); }
  50% { transform: translate(-5vw, -6vw) scale(1.05); }
  100% { transform: translate(4vw, 3vw) scale(1); }
}

@keyframes cyber-drift-green {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(5vw, -5vw) scale(0.9); }
  100% { transform: translate(10vw, 4vw) scale(1.1); }
}

@keyframes cyber-drift-purple {
  0% { transform: translate(0, 0) scale(1.05); }
  50% { transform: translate(-8vw, 4vw) scale(0.95); }
  100% { transform: translate(-2vw, -6vw) scale(1.08); }
}

@keyframes cyber-drift-cyan {
  0% { transform: translate(0, 0) scale(0.9); }
  50% { transform: translate(-4vw, 8vw) scale(1.1); }
  100% { transform: translate(6vw, -4vw) scale(1); }
}

/* ==========================================================================
   APP CONTAINER & GLASS CARDS
   ========================================================================== */
.app-container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(28px) saturate(185%);
  -webkit-backdrop-filter: blur(28px) saturate(185%);
  border: 1px solid var(--border-card);
  border-radius: 16px;
  padding: 30px;
  box-shadow: 0 16px 40px 0 rgba(0, 0, 0, 0.45), inset 0 0 12px rgba(129, 140, 248, 0.03);
  transition: var(--transition-smooth);
}

.glass-card:hover {
  border-color: rgba(129, 140, 248, 0.35);
  box-shadow: 0 20px 48px 0 rgba(0, 0, 0, 0.65), inset 0 0 20px rgba(129, 140, 248, 0.08);
}

/* ==========================================================================
   HEADER STYLE
   ========================================================================== */

.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 30px;
  width: 100%;
  box-sizing: border-box;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 20px;
}

.app-logo {
  width: 58px;
  height: 58px;
  filter: drop-shadow(0 0 10px var(--indigo-glow));
  animation: pulse-glow 3s infinite alternate;
}

@keyframes pulse-glow {
  0% { filter: drop-shadow(0 0 8px var(--indigo-glow)); }
  100% { filter: drop-shadow(0 0 16px var(--purple-glow)); }
}

.logo-area h1 {
  font-size: 2.0rem;
  font-weight: 800;
  background: linear-gradient(135deg, #ffffff 30%, #a5b4fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.5px;
  margin: 0 !important;
  line-height: 1.1;
}

.tagline {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0 !important;
  margin-top: 4px !important;
}

/* ==========================================================================
   MAIN LAYOUT (2 COLUMNS)
   ========================================================================== */
.main-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  width: 100%;
  box-sizing: border-box;
}

.column {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-height: 80vh;
}

h2 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #ffffff 60%, var(--text-muted) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ==========================================================================
   BUDGET CARD & NEON SLIDER
   ========================================================================== */
.budget-card {
  position: relative;
  overflow: hidden;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0;
  margin-bottom: 30px; /* Matches the 30px top padding of the glass-card for vertical symmetry */
}

.currency-symbol {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--indigo-primary);
  background: rgba(129, 140, 248, 0.1);
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid rgba(129, 140, 248, 0.2);
}

.budget-input-group {
  margin-bottom: 24px;
}



.slider-header .value {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--indigo-primary);
  text-shadow: 0 0 10px var(--indigo-glow);
  transition: var(--transition-smooth);
}

.neon-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  outline: none;
  transition: var(--transition-smooth);
}

.neon-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--text-main);
  cursor: pointer;
  box-shadow: 0 0 10px var(--indigo-primary), 0 0 20px var(--indigo-glow);
  transition: transform 0.1s;
}

.neon-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.budget-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 15px;
  margin-bottom: 24px;
}

.stat-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 16px;
  padding: 12px 15px;
  display: flex;
  flex-direction: column;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.stat-val {
  font-size: 1.35rem;
  font-weight: 800;
}

.text-indigo { color: var(--indigo-primary); text-shadow: 0 0 10px var(--indigo-glow); }
.text-pink { color: var(--pink-primary); text-shadow: 0 0 10px var(--pink-glow); }
.text-emerald { color: var(--emerald-primary); text-shadow: 0 0 10px var(--emerald-glow); }

/* ==========================================================================
   PROGRESS BAR WITH AURA
   ========================================================================== */
.progress-container {
  width: 100%;
  height: 12px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 30px;
  position: relative;
  overflow: visible;
}

.progress-bar {
  height: 100%;
  width: 0%;
  border-radius: 30px;
  background: linear-gradient(90deg, var(--indigo-primary), var(--purple-primary));
  position: relative;
  z-index: 2;
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1), background 0.4s;
}

.progress-bar-glow {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  border-radius: 30px;
  background: inherit;
  filter: blur(8px);
  opacity: 0.6;
  z-index: 1;
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1), background 0.4s;
}

/* ==========================================================================
   FORMS & INPUTS
   ========================================================================== */
.expense-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

input, select {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 12px 16px;
  color: var(--text-main);
  font-family: var(--font-family);
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition-smooth);
}

input:focus, select:focus {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--indigo-primary);
  box-shadow: 0 0 10px rgba(129, 140, 248, 0.15);
}

select option {
  background: #0f1324;
  color: var(--text-main);
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
  font-family: var(--font-family);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 14px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: var(--transition-smooth);
}

.btn-indigo {
  background: linear-gradient(135deg, var(--indigo-primary), var(--purple-primary));
  color: #ffffff;
  box-shadow: 0 4px 20px rgba(129, 140, 248, 0.3);
}

.btn-indigo:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(129, 140, 248, 0.5);
}

.btn-primary {
  background: linear-gradient(135deg, #ffffff 0%, #e2e8f0 100%);
  color: #0f172a;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.3);
}

.btn-glow {
  animation: pulse-button 2s infinite alternate;
}

@keyframes pulse-button {
  0% { box-shadow: 0 0 8px rgba(255, 255, 255, 0.1); }
  100% { box-shadow: 0 0 16px var(--indigo-glow); }
}

.btn-outline {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-main);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.3);
}

.btn-danger-outline {
  background: transparent;
  border: 1px solid rgba(244, 114, 182, 0.3);
  color: var(--pink-primary);
}

.btn-danger-outline:hover {
  background: rgba(244, 114, 182, 0.08);
  border-color: var(--pink-primary);
}

.btn-block {
  width: 100%;
}

.select-small {
  padding: 8px 12px;
  font-size: 0.8rem;
  border-radius: 10px;
}

/* ==========================================================================
   CHART SECTION
   ========================================================================== */
.chart-card {
  position: relative;
}

.chart-container {
  position: relative;
  width: 100%;
  height: 250px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.no-data-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: rgba(13, 18, 38, 0.8);
  backdrop-filter: blur(8px);
  border-radius: 20px;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition-smooth);
  z-index: 10;
}

.no-data-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

.no-data-icon {
  font-size: 3rem;
  margin-bottom: 12px;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* ==========================================================================
   TRANSACTIONS REGISTRY
   ========================================================================== */
.list-card {
  display: flex;
  flex-direction: column;
  min-height: auto;
}

.transactions-container {
  overflow-y: auto;
  max-height: 210px;
  height: 210px;
  margin-bottom: 20px;
  padding-right: 16px;
}

/* ==========================================================================
   GLOBAL PREMIUM NEON GLOWING SCROLLBARS
   ========================================================================== */
/* For Chrome, Safari, Edge, Opera (Global Page Scrollbar) */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(5, 7, 18, 0.6);
  backdrop-filter: blur(10px);
  border-left: 1px solid rgba(255, 255, 255, 0.03);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--indigo-primary), var(--purple-primary));
  border-radius: 10px;
  border: 1px solid rgba(5, 7, 18, 0.5);
  box-shadow: 0 0 10px var(--indigo-glow);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--purple-primary), var(--pink-primary));
  box-shadow: 0 0 15px var(--pink-glow);
}

/* Specific scrollbar styling for list elements with improved contrast and grab area */
.transactions-container::-webkit-scrollbar,
.reminder-list::-webkit-scrollbar,
#notesListContainer::-webkit-scrollbar,
#archiveList::-webkit-scrollbar,
#reportModalBody::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.transactions-container::-webkit-scrollbar-track,
.reminder-list::-webkit-scrollbar-track,
#notesListContainer::-webkit-scrollbar-track,
#archiveList::-webkit-scrollbar-track,
#reportModalBody::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.transactions-container::-webkit-scrollbar-thumb,
.reminder-list::-webkit-scrollbar-thumb,
#notesListContainer::-webkit-scrollbar-thumb,
#archiveList::-webkit-scrollbar-thumb,
#reportModalBody::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--indigo-primary), var(--purple-primary));
  border-radius: 10px;
  box-shadow: 0 0 6px rgba(129, 140, 248, 0.4);
}

.transactions-container::-webkit-scrollbar-thumb:hover,
.reminder-list::-webkit-scrollbar-thumb:hover,
#notesListContainer::-webkit-scrollbar-thumb:hover,
#archiveList::-webkit-scrollbar-thumb:hover,
#reportModalBody::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--purple-primary), var(--pink-primary));
  box-shadow: 0 0 10px rgba(244, 114, 182, 0.6);
}

/* Firefox compatibility */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--indigo-primary) rgba(13, 18, 38, 0.25);
}

.transaction-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 16px;
  margin-bottom: 10px;
  animation: slide-up 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: var(--transition-smooth);
}

.transaction-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateX(3px);
}

@keyframes slide-up {
  0% { opacity: 0; transform: translateY(12px); }
  100% { opacity: 1; transform: translateY(0); }
}

.item-left {
  display: flex;
  align-items: center;
  gap: 15px;
}

.item-icon {
  width: 42px;
  height: 42px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.item-details {
  display: flex;
  flex-direction: column;
}

.item-title {
  font-weight: 600;
  font-size: 0.95rem;
}

.item-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 3px;
}

.item-right {
  display: flex;
  align-items: center;
  gap: 15px;
}

.item-amount {
  font-weight: 800;
  font-size: 1.05rem;
}

.btn-delete {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-delete:hover {
  color: var(--pink-primary);
  background: rgba(244, 114, 182, 0.1);
}

.actions-footer {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 20px;
}

/* ==========================================================================
   TOAST NOTIFICATION BANNER
   ========================================================================== */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  background: rgba(13, 18, 38, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--indigo-primary);
  color: var(--text-main);
  padding: 14px 28px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.92rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.65), 0 0 15px var(--indigo-glow);
  z-index: 99999; /* Ensure it stays above everything, even lock screen overlays! */
  opacity: 0;
  transform: translateX(-50%) translateY(25px);
  transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  pointer-events: none;
  text-align: center;
  max-width: 90%;
  width: max-content;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ==========================================================================
   RESPONSIVE DESIGN (TABLET & MOBILE)
   ========================================================================== */
@media (max-width: 1024px) {
  .main-content {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  body {
    padding: 12px 8px;
  }
  .app-header {
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 14px 10px !important; /* Allineamento millimetrico laterale con le card */
    gap: 10px !important;
  }
  .logo-area {
    gap: 10px !important;
  }
  .logo-area div {
    display: flex;
    flex-direction: column;
  }
  .logo-area h1 {
    font-size: 1.45rem !important;
    letter-spacing: -0.3px;
    line-height: 1.2;
  }
  .logo-area .tagline {
    font-size: 0.78rem !important;
    white-space: normal !important;
    max-width: none !important;
    display: block !important;
    margin-top: 2px !important;
    color: var(--text-muted) !important;
  }
  .app-logo {
    width: 38px !important;
    height: 38px !important;
  }
  .header-actions {
    gap: 6px !important;
    display: flex !important;
    align-items: center !important;
  }
  #multiUserHeaderPill {
    padding: 3px 6px !important;
    font-size: 0.72rem !important;
    margin-left: 2px !important;
    max-width: 90px !important;
    gap: 4px !important;
    align-items: center !important;
  }
  #multiUserHeaderName {
    max-width: 60px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    display: inline-block !important;
    vertical-align: middle !important;
  }
  #travelHeaderBadge {
    padding: 3px 6px !important;
    font-size: 0.72rem !important;
    max-width: 80px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    align-items: center !important;
  }
  #installBtn {
    width: 40px !important;
    height: 40px !important;
    padding: 0 !important;
    border-radius: 10px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
  }
  #installBtn.hidden {
    display: none !important;
  }
  @media (display-mode: standalone), (display-mode: minimal-ui) {
    #installBtn {
      display: none !important;
    }
  }
  #installBtn span {
    display: none !important;
  }
  #installBtn svg {
    margin-right: 0 !important;
    width: 20px !important;
    height: 20px !important;
  }
  .header-greeting {
    display: none !important; /* Hide greeting text on tiny screens to avoid layout pushing */
  }
  .btn-hamburger {
    width: 40px !important;
    height: 40px !important;
    border-radius: 10px !important;
    flex-shrink: 0 !important;
  }
  .btn-hamburger svg {
    width: 20px !important;
    height: 20px !important;
  }
  .glass-card {
    padding: 18px !important;
    border-radius: 12px !important;
  }
  .budget-stats {
    grid-template-columns: 1fr 1fr 1fr !important;
    gap: 6px !important;
  }
  .stat-item {
    padding: 6px 4px !important;
    text-align: center !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
  }
  .stat-label {
    font-size: clamp(0.7rem, 2.5vw, 0.85rem) !important;
    margin-bottom: 2px !important;
  }
  .stat-val {
    font-size: clamp(0.92rem, 3.2vw, 1.2rem) !important;
    font-weight: 700 !important;
  }
  .form-row {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .actions-footer {
    flex-direction: column;
  }
  .actions-footer button {
    width: 100%;
  }
  
  /* Vertical stacking for inline groups (Savings, Budget allocation, note entries) */
  .inline-action-group {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
  }
  .inline-action-group input, 
  .inline-action-group select,
  .inline-action-group button {
    width: 100% !important;
    max-width: 100% !important;
    height: 42px !important;
  }
  
  /* Transaction item mobile wrapping & alignment */
  .transaction-item {
    padding: 10px 12px !important;
    gap: 10px !important;
  }
  .item-left {
    flex: 1 !important;
    min-width: 0 !important;
    gap: 10px !important;
  }
  .item-icon {
    width: 36px !important;
    height: 36px !important;
    font-size: 1.05rem !important;
    border-radius: 10px !important;
  }
  .item-details {
    flex: 1 !important;
    min-width: 0 !important;
  }
  .item-title {
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
    overflow: hidden !important;
    max-width: 120px !important;
    font-size: 0.88rem !important;
  }
  .item-date {
    font-size: 0.7rem !important;
  }
  .item-right {
    gap: 8px !important;
    flex-shrink: 0 !important;
  }
  .item-amount {
    font-size: 0.92rem !important;
  }
  
  /* Chart and statistics mobile enhancements */
  .chart-container {
    height: 220px !important;
  }
  .charts-wrapper {
    gap: 15px !important;
  }
  
  /* Container layout gaps */
  .column {
    gap: 16px !important;
  }
  .app-container {
    gap: 16px !important;
  }

  /* Sidebar Mobile Optimizations to prevent bottom elements from being cut off */
  .profile-sidebar {
    width: 100% !important;
    max-width: 100vw !important;
    right: -100vw !important;
    height: 100% !important;
    height: 100dvh !important; /* Use dynamic viewport height to handle mobile bars */
  }
  .profile-sidebar.active {
    right: 0 !important;
  }
  .sidebar-content {
    padding: 20px 20px 60px 20px !important; /* Added extra bottom padding to bypass mobile address/navigation bar overlaps */
    gap: 20px !important;
  }

  /* Stack widget action buttons vertically on mobile for perfect centering and alignment (fixes long Spanish translations) */
  .widget-action-buttons {
    flex-direction: column !important;
    gap: 8px !important;
    width: 100% !important;
  }
  .widget-action-buttons button {
    width: 100% !important;
    max-width: 100% !important;
    flex: 1 1 100% !important;
    padding: 10px !important;
    font-size: 0.85rem !important;
    box-sizing: border-box !important;
  }

  /* Prevent text wrapping inside the budget allocation sliders and savings labels */
  .slider-header span.label {
    font-size: clamp(0.72rem, 2.3vw, 0.9rem) !important;
    white-space: nowrap !important;
  }
  .slider-header span.value {
    font-size: clamp(0.82rem, 2.6vw, 1.05rem) !important;
    font-weight: 700 !important;
  }
  .savings-amount-display {
    font-size: clamp(1.4rem, 5.5vw, 2.2rem) !important;
    font-weight: 800 !important;
  }

  /* Spaziatura omogenea per i pulsanti Deposita/Preleva del Fondo Risparmio su Mobile */
  .savings-card .widget-action-buttons {
    margin-top: 15px !important;
    gap: 12px !important;
  }
  .savings-card .widget-action-buttons button {
    padding: 12px 16px !important;
  }
  .savings-card .widget-action-buttons button:not(:last-child) {
    margin-bottom: 12px !important;
  }

  /* Ultra-narrow screen optimizations (under 400px) to prevent header items from collapsing in Spanish */
  @media (max-width: 400px) {
    .logo-area h1 {
      font-size: 1.3rem !important;
    }
    .logo-area .tagline {
      font-size: 0.7rem !important;
      white-space: normal !important;
      max-width: none !important;
      display: block !important;
      color: var(--text-muted) !important;
    }
    .app-logo {
      width: 32px !important;
      height: 32px !important;
    }
    .header-actions {
      gap: 4px !important;
    }
    .app-header {
      padding: 12px 8px !important;
    }
    .card-header, .glass-card > h2 {
      padding: 14px 8px !important;
      min-height: 60px !important;
      box-sizing: border-box !important;
    }
    #multiUserHeaderName {
      max-width: 45px !important;
    }
    #travelHeaderBadge {
      max-width: 55px !important;
    }
  }
}

/* ==========================================================================
   VOICE CONTROL BUTTON & MICROPHONE STYLES
   ========================================================================== */
.input-with-button {
  display: flex;
  gap: 10px;
  width: 100%;
}

.input-with-button input {
  flex-grow: 1;
}

.btn-voice {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: var(--transition-smooth);
}

.btn-voice:hover {
  background: rgba(129, 140, 248, 0.1);
  border-color: var(--indigo-primary);
  color: var(--indigo-primary);
  box-shadow: 0 0 12px var(--indigo-glow);
}

/* Active listening state (pulsing animation) */
.btn-voice.listening {
  background: rgba(244, 114, 182, 0.15) !important;
  border-color: var(--pink-primary) !important;
  color: var(--pink-primary) !important;
  animation: pulse-recording 1.5s infinite;
  box-shadow: 0 0 15px var(--pink-glow) !important;
}

@keyframes pulse-recording {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(244, 114, 182, 0.5); }
  70% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(244, 114, 182, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(244, 114, 182, 0); }
}

/* ==========================================================================
   IMPORTO PRINCIPALE & INLINE GROUPS STYLES
   ========================================================================== */
.main-amount-display {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--emerald-primary);
  text-shadow: 0 0 15px var(--emerald-glow);
  margin: 10px 0 20px 0;
  transition: var(--transition-smooth);
}

.inline-action-group {
  display: flex;
  gap: 10px;
  width: 100%;
  align-items: center;
}

.inline-action-group input {
  flex-grow: 1;
}

.inline-action-group button {
  flex-shrink: 0;
}



/* ==========================================================================
   DRAG AND DROP SORTABLE WIDGETS (DRAG BY HEADERS)
   ========================================================================== */
.glass-card h2, .glass-card .card-header {
  cursor: grab;
  user-select: none;
}

.glass-card h2:active, .glass-card .card-header:active {
  cursor: grabbing;
}

.glass-card.dragging {
  opacity: 0.35;
  border: 1px dashed var(--indigo-primary) !important;
  transform: scale(0.97);
  box-shadow: 0 4px 12px rgba(0,0,0,0.5) !important;
}

/* ==========================================================================
   HAMBURGER MENU & ACCOUNT SIDEBAR PANELS
   ========================================================================== */
.header-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

.btn-hamburger {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-hamburger:hover {
  background: rgba(129, 140, 248, 0.1);
  border-color: var(--indigo-primary);
  box-shadow: 0 0 15px var(--indigo-glow);
  color: var(--indigo-primary);
}

@keyframes spin-refresh {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.refresh-icon.spinning {
  animation: spin-refresh 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Sidebar overlay background blur */
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(4, 6, 15, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.sidebar-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* Slide-out Sidebar Panel (Glassmorphism + Neon) */
.profile-sidebar {
  position: fixed;
  top: 0;
  right: -380px;
  width: 360px;
  height: 100vh;
  background: rgba(10, 14, 33, 0.85);
  backdrop-filter: blur(35px) saturate(180%);
  -webkit-backdrop-filter: blur(35px) saturate(180%);
  border-left: 1px solid rgba(129, 140, 248, 0.15);
  box-shadow: -15px 0 45px rgba(0, 0, 0, 0.6), 0 0 30px rgba(129, 140, 248, 0.05);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  transition: right 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.profile-sidebar.active {
  right: 0;
}

.sidebar-header {
  padding: 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sidebar-header h3 {
  font-size: 1.2rem;
  font-weight: 800;
  background: linear-gradient(135deg, #ffffff 40%, var(--indigo-primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.btn-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1;
}

.btn-close:hover {
  background: rgba(244, 114, 182, 0.1);
  color: var(--pink-primary);
}

.sidebar-content {
  padding: 30px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 30px;
  overflow-y: auto;
}

/* Profile Avatar Section */
.profile-avatar-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.profile-avatar-glow {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--indigo-primary) 0%, var(--purple-primary) 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  font-weight: 800;
  box-shadow: 0 0 25px rgba(129, 140, 248, 0.6);
  border: 3px solid rgba(255, 255, 255, 0.1);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  transition: var(--transition-smooth);
}

.profile-avatar-glow:hover {
  transform: rotate(360deg);
  box-shadow: 0 0 35px rgba(192, 132, 252, 0.8);
}

.profile-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.sidebar-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sidebar-info-footer {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.4;
}

/* Elegant greeting text next to hamburger menu */
.header-greeting {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-right: 15px;
  display: inline-block;
  vertical-align: middle;
  letter-spacing: 0.3px;
}

/* Monthly Archive & Report Modals */
.archive-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 10px 14px;
  transition: var(--transition-smooth);
}

.archive-item:hover {
  background: rgba(129, 140, 248, 0.08);
  border-color: rgba(129, 140, 248, 0.25);
  box-shadow: 0 0 10px rgba(129, 140, 248, 0.1);
}

.archive-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.archive-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
}

.archive-meta {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.archive-buttons {
  display: flex;
  gap: 8px;
}

.report-modal.active, .modal-overlay.active {
  display: block !important;
}

.report-stat-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 15px;
  margin-bottom: 10px;
}

.report-stat-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 15px 12px;
  text-align: center;
}

.report-stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 5px;
  display: block;
}

.report-stat-value {
  font-size: 1.15rem;
  font-weight: 800;
}

.report-section-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--indigo-primary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 6px;
  margin-top: 10px;
}

.report-category-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(255, 255, 255, 0.01);
  padding: 8px 10px;
  border-radius: 8px;
}

.report-category-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 600;
}

.report-category-bar-bg {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  overflow: hidden;
}

.report-category-bar-fg {
  height: 100%;
  border-radius: 10px;
}

.report-expense-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 0.8rem;
}

details.sidebar-details {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}
details.sidebar-details summary::-webkit-details-marker,
#travelCard details summary::-webkit-details-marker {
  display: none !important;
}
details.sidebar-details summary,
#travelCard details summary {
  list-style: none !important;
}
details.sidebar-details[open] .dropdown-arrow,
.pro-guide-details[open] .dropdown-arrow {
  transform: rotate(180deg);
}

.reminder-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 182px; /* Perfect height for displaying exactly 3 notifications (reminders) */
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 5px;
}

/* ==========================================================================
   LIGHT THEME INTERACTIVE DESIGN SYSTEM
   ========================================================================== */
body.light-theme {
  --bg-primary: #f1f5f9;
  --bg-card: rgba(255, 255, 255, 0.45);
  --border-card: rgba(15, 23, 42, 0.08);
  
  --indigo-primary: #4f46e5;
  --indigo-glow: rgba(79, 70, 229, 0.15);
  
  --purple-primary: #7c3aed;
  --purple-glow: rgba(124, 58, 237, 0.15);
  
  --pink-primary: #db2777;
  --pink-glow: rgba(219, 39, 119, 0.15);
  
  --emerald-primary: #059669;
  --emerald-glow: rgba(5, 150, 105, 0.15);
  
  --amber-primary: #d97706;
  --amber-glow: rgba(217, 119, 6, 0.15);

  --text-main: #0f172a;
  --text-muted: #475569;
}

body.light-theme .glass-card, 
body.light-theme .glass-panel {
  background: rgba(255, 255, 255, 0.45) !important;
  border-color: rgba(79, 70, 229, 0.12) !important;
  box-shadow: 0 12px 32px 0 rgba(79, 70, 229, 0.05), inset 0 0 12px rgba(255, 255, 255, 0.4) !important;
  backdrop-filter: blur(28px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(28px) saturate(180%) !important;
}

body.light-theme .glass-card:hover, 
body.light-theme .glass-panel:hover {
  border-color: rgba(79, 70, 229, 0.28) !important;
  box-shadow: 0 16px 40px 0 rgba(79, 70, 229, 0.12), inset 0 0 16px rgba(255, 255, 255, 0.5) !important;
}

body.light-theme .modal-overlay {
  background: rgba(255, 255, 255, 0.5) !important;
}

body.light-theme .report-modal {
  background: rgba(255, 255, 255, 0.8) !important;
  border-color: rgba(79, 70, 229, 0.25) !important;
}



body.light-theme input, 
body.light-theme select {
  background: rgba(15, 23, 42, 0.03);
  border-color: rgba(15, 23, 42, 0.08);
  color: #0f172a;
}

body.light-theme input:focus, 
body.light-theme select:focus {
  background: rgba(255, 255, 255, 0.9);
  border-color: var(--indigo-primary);
}

body.light-theme .btn-hamburger {
  color: #0f172a;
  background: rgba(15, 23, 42, 0.04);
}

body.light-theme .btn-hamburger:hover {
  background: rgba(15, 23, 42, 0.08);
}

/* Light Theme Contrast & Text Readability Overrides */
body.light-theme h1,
body.light-theme h2,
body.light-theme h3,
body.light-theme h4,
body.light-theme h1 *,
body.light-theme h2 *,
body.light-theme h3 *,
body.light-theme h4 *,
body.light-theme #reportTitle {
  background: none !important;
  -webkit-text-fill-color: var(--text-main) !important;
  color: var(--text-main) !important;
}

body.light-theme .text-indigo,
body.light-theme .text-pink,
body.light-theme .text-emerald {
  text-shadow: none !important;
}

body.light-theme .currency-symbol {
  background: rgba(79, 70, 229, 0.08);
  border-color: rgba(79, 70, 229, 0.15);
}

body.light-theme .slider-header .value {
  text-shadow: none !important;
}

body.light-theme .btn-indigo {
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.25);
}

body.light-theme .btn-indigo:hover {
  box-shadow: 0 6px 18px rgba(79, 70, 229, 0.4);
}

body.light-theme .transaction-item {
  background: rgba(15, 23, 42, 0.02);
  border-color: rgba(15, 23, 42, 0.04);
}

body.light-theme .transaction-item:hover {
  background: rgba(15, 23, 42, 0.04);
  border-color: rgba(15, 23, 42, 0.08);
}

body.light-theme .archive-item {
  background: rgba(15, 23, 42, 0.02);
  border-color: rgba(15, 23, 42, 0.04);
}

body.light-theme .archive-item:hover {
  background: rgba(15, 23, 42, 0.04);
}

body.light-theme select option {
  background: #ffffff !important;
  color: #0f172a !important;
}

body.light-theme .profile-sidebar {
  background: rgba(241, 245, 249, 0.9) !important;
  border-left-color: rgba(15, 23, 42, 0.08) !important;
  box-shadow: -15px 0 45px rgba(15, 23, 42, 0.05), 0 0 30px rgba(15, 23, 42, 0.02) !important;
}

body.light-theme .sidebar-header h3 {
  background: none !important;
  -webkit-text-fill-color: var(--text-main) !important;
  color: var(--text-main) !important;
}

body.light-theme .btn-outline {
  border: 1px solid rgba(15, 23, 42, 0.2) !important;
  color: #0f172a !important;
  background: rgba(15, 23, 42, 0.02) !important;
}
body.light-theme .btn-outline:hover {
  background: rgba(15, 23, 42, 0.06) !important;
  border-color: rgba(15, 23, 42, 0.35) !important;
}

body.light-theme .btn-danger-outline {
  border: 1px solid rgba(244, 114, 182, 0.5) !important;
  color: #ec4899 !important;
  background: rgba(244, 114, 182, 0.02) !important;
}
body.light-theme .btn-danger-outline:hover {
  background: rgba(244, 114, 182, 0.08) !important;
  border-color: #ec4899 !important;
}

body.light-theme .toast {
  background: rgba(255, 255, 255, 0.92) !important;
  color: #0f172a !important;
  border-color: rgba(79, 70, 229, 0.3) !important;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.15), 0 0 10px rgba(79, 70, 229, 0.1) !important;
}

/* Light Theme Scrollbars overrides */
body.light-theme .transactions-container::-webkit-scrollbar-thumb,
body.light-theme .reminder-list::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.18) !important;
  border-radius: 10px;
}
body.light-theme .transactions-container::-webkit-scrollbar-thumb:hover,
body.light-theme .reminder-list::-webkit-scrollbar-thumb:hover {
  background: rgba(15, 23, 42, 0.35) !important;
}

/* ==========================================================================
   GLASSMORPHISM TOGGLE SWITCH SYSTEM
   ========================================================================== */
.switch-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.switch-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(129, 140, 248, 0.25);
  transform: translateY(-1px);
}

.switch-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-right: 15px;
}

.switch-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-color, #e2e8f0);
}

.switch-desc {
  font-size: 0.78rem;
  color: var(--text-muted, #94a3b8);
  line-height: 1.4;
}

.switch-control {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 26px;
  flex-shrink: 0;
}

.switch-control input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 26px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15);
}

.switch-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: #ffffff;
  transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input:checked + .switch-slider {
  background-color: rgba(129, 140, 248, 0.25);
  border-color: rgba(129, 140, 248, 0.4);
  box-shadow: 0 0 12px rgba(129, 140, 248, 0.25);
}

input:checked + .switch-slider:before {
  transform: translateX(20px);
  background-color: #818cf8;
}

/* Light theme switches overrides */
body.light-theme .switch-item {
  background: rgba(15, 23, 42, 0.02) !important;
  border-color: rgba(15, 23, 42, 0.08) !important;
}

body.light-theme .switch-item:hover {
  background: rgba(15, 23, 42, 0.04) !important;
  border-color: rgba(79, 70, 229, 0.2) !important;
}

body.light-theme .switch-title {
  color: #0f172a !important;
}

body.light-theme .switch-desc {
  color: #475569 !important;
}

body.light-theme .switch-slider {
  background-color: rgba(15, 23, 42, 0.08) !important;
  border-color: rgba(15, 23, 42, 0.12) !important;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05) !important;
}

body.light-theme input:checked + .switch-slider {
  background-color: rgba(79, 70, 229, 0.15) !important;
  border-color: rgba(79, 70, 229, 0.35) !important;
}

body.light-theme input:checked + .switch-slider:before {
  background-color: #4f46e5 !important;
}

/* ==========================================================================
   NOTES & TASKS WIDGET CUSTOM STYLES
   ========================================================================== */
.note-item {
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.note-item:hover {
  background: rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(129, 140, 248, 0.2) !important;
  transform: translateX(2px);
}

body.light-theme .note-item {
  background: rgba(15, 23, 42, 0.02) !important;
  border-color: rgba(15, 23, 42, 0.06) !important;
}

body.light-theme .note-item:hover {
  background: rgba(15, 23, 42, 0.04) !important;
  border-color: rgba(79, 70, 229, 0.18) !important;
}

/* ==========================================================================
   AURA POCKET CUSTOM GLASSMORPHIC CALENDAR STYLES
   ========================================================================== */
.aura-calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  color: #fff;
}

body.light-theme .aura-calendar-header {
  color: #0f172a;
}

.aura-calendar-title {
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.3px;
}

.aura-calendar-btn {
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.85rem;
  transition: all 0.2s;
}

body.light-theme .aura-calendar-btn {
  color: rgba(15, 23, 42, 0.7);
}

.aura-calendar-btn:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

body.light-theme .aura-calendar-btn:hover {
  background: rgba(15, 23, 42, 0.06);
  color: #0f172a;
}

.aura-calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 0.72rem;
  color: var(--text-muted, #94a3b8);
  margin-bottom: 8px;
  font-weight: 700;
  text-transform: uppercase;
}

.aura-calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.aura-calendar-day {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.85);
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s;
  font-weight: 500;
}

body.light-theme .aura-calendar-day {
  color: rgba(15, 23, 42, 0.85);
}

.aura-calendar-day:hover {
  background: rgba(129, 140, 248, 0.2);
  color: #fff;
}

body.light-theme .aura-calendar-day:hover {
  background: rgba(79, 70, 229, 0.12);
  color: #4f46e5;
}

.aura-calendar-day.empty {
  cursor: default;
}

.aura-calendar-day.empty:hover {
  background: transparent;
}

.aura-calendar-day.selected {
  background: linear-gradient(135deg, #818cf8 0%, #c084fc 100%) !important;
  color: #fff !important;
  font-weight: 700;
  box-shadow: 0 0 12px rgba(129, 140, 248, 0.45);
}

body.light-theme .aura-calendar-day.selected {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%) !important;
}

.aura-calendar-day.today {
  border: 1px dashed rgba(129, 140, 248, 0.7);
}

body.light-theme .aura-calendar-day.today {
  border-color: rgba(79, 70, 229, 0.7);
}

body.light-theme .aura-calendar {
  background: rgba(255, 255, 255, 0.95) !important;
  border: 1px solid rgba(79, 70, 229, 0.2) !important;
  box-shadow: 0 10px 40px rgba(15, 23, 42, 0.15), 0 0 20px rgba(79, 70, 229, 0.08) !important;
}

/* ==========================================================================
   USER PROFILE & SECURITY PIN CSS STYLES
   ========================================================================== */

/* Avatar option buttons in Profile Selector */
.avatar-option-btn {
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.avatar-option-btn:hover {
  transform: scale(1.1);
  border-color: var(--indigo-primary) !important;
  box-shadow: 0 0 10px rgba(129, 140, 248, 0.3);
}

.avatar-option-btn.selected {
  transform: scale(1.15);
  border-color: var(--purple-primary) !important;
  background: rgba(192, 132, 252, 0.15) !important;
  box-shadow: 0 0 15px rgba(192, 132, 252, 0.5) !important;
}

/* Numeric lock screen keys */
.num-key:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: var(--indigo-primary) !important;
  transform: scale(1.08) !important;
  box-shadow: 0 0 12px rgba(129, 140, 248, 0.25);
}

.num-key:active {
  background: rgba(129, 140, 248, 0.15) !important;
  transform: scale(0.95) !important;
}

.num-key.action-key:hover {
  background: rgba(244, 114, 182, 0.15) !important;
  border-color: var(--pink-primary) !important;
}

/* Pulse Lock Dots */
.pin-dot.filled {
  background-color: var(--indigo-primary) !important;
  border-color: var(--indigo-primary) !important;
  box-shadow: 0 0 12px var(--indigo-primary), 0 0 20px var(--indigo-glow) !important;
  transform: scale(1.15);
}

/* Light Theme overrides for Profile & Lockpad */
body.light-theme .lock-screen-overlay {
  background: rgba(241, 245, 249, 0.95) !important;
}

body.light-theme #pinLockView h3, 
body.light-theme #pinRecoveryView h3 {
  color: #0f172a !important;
}

body.light-theme .lock-screen-overlay p {
  color: #475569 !important;
}

body.light-theme .num-key {
  background: rgba(15, 23, 42, 0.03) !important;
  border-color: rgba(15, 23, 42, 0.08) !important;
  color: #0f172a !important;
}

body.light-theme .num-key:hover {
  background: rgba(15, 23, 42, 0.06) !important;
  border-color: var(--indigo-primary) !important;
}

body.light-theme .num-key.action-key {
  color: var(--indigo-primary) !important;
  border-color: rgba(129, 140, 248, 0.3) !important;
}

body.light-theme .pin-dot {
  border-color: rgba(15, 23, 42, 0.2) !important;
}

/* Ocean Theme overrides for Lock Screen */
body.ocean-theme .lock-screen-overlay {
  background: linear-gradient(135deg, rgba(5, 18, 32, 0.97) 0%, rgba(8, 28, 48, 0.97) 100%) !important;
  backdrop-filter: blur(35px) !important;
  -webkit-backdrop-filter: blur(35px) !important;
}

body.ocean-theme #pinLockView h3, 
body.ocean-theme #pinRecoveryView h3,
body.ocean-theme h3[data-i18n="pinLockTitle"],
body.ocean-theme h3[data-i18n="pinRecoveryTitle"] {
  color: #ffffff !important; /* Pure white for max visibility */
  -webkit-text-fill-color: #ffffff !important; /* Override theme's dark text-fill */
  text-shadow: 0 0 15px rgba(56, 189, 248, 0.8) !important; /* Brighter glow */
}

body.ocean-theme .lock-screen-overlay p {
  color: #e2e8f0 !important; /* Crisp light slate gray for perfect readability */
}

body.ocean-theme .num-key {
  background: rgba(255, 255, 255, 0.03) !important;
  border-color: rgba(56, 189, 248, 0.3) !important; /* Cyan border */
  color: #ffffff !important; /* Crisp white digits */
}

body.ocean-theme .num-key:hover {
  background: rgba(56, 189, 248, 0.15) !important;
  border-color: #38bdf8 !important;
  color: #ffffff !important;
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.5) !important;
}

body.ocean-theme .num-key.action-key {
  color: #38bdf8 !important; /* Bright sky blue for action keys */
  border-color: rgba(56, 189, 248, 0.4) !important;
  background: rgba(56, 189, 248, 0.06) !important;
}

body.ocean-theme .pin-dot {
  border-color: rgba(56, 189, 248, 0.4) !important;
}

body.ocean-theme .pin-dot.filled {
  background-color: var(--sky-primary) !important;
  border-color: var(--sky-primary) !important;
  box-shadow: 0 0 12px var(--sky-primary), 0 0 20px rgba(56, 189, 248, 0.5) !important;
}

body.ocean-theme #btnTriggerPinRecovery {
  color: #38bdf8 !important;
  text-decoration: underline !important;
  font-weight: 600 !important;
  transition: all 0.2s ease-in-out !important;
}

body.ocean-theme #btnTriggerPinRecovery:hover {
  color: #7dd3fc !important;
  text-shadow: 0 0 10px rgba(56, 189, 248, 0.5) !important;
}

body.light-theme .avatar-option-btn {
  border-color: rgba(15, 23, 42, 0.08) !important;
}

body.light-theme .avatar-option-btn.selected {
  background: rgba(124, 58, 237, 0.08) !important;
  border-color: var(--purple-primary) !important;
}

/* Lockpad shake animation for wrong PIN */
@keyframes lockpad-shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

.lockpad-shake {
  animation: lockpad-shake 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

/* ==========================================================================
   FORECAST SECTION & DYNAMIC CHROME
   ========================================================================== */
.forecast-card {
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 20px !important;
  height: fit-content;
}

.forecast-card.ghost-pulse-danger {
  border: 1.5px solid rgba(244, 114, 182, 0.7) !important;
  box-shadow: 0 0 25px rgba(244, 114, 182, 0.3) !important;
  animation: forecastPulseDanger 2s infinite alternate ease-in-out;
}

@keyframes forecastPulseDanger {
  0% {
    box-shadow: 0 0 15px rgba(244, 114, 182, 0.15);
    border-color: rgba(244, 114, 182, 0.4);
  }
  100% {
    box-shadow: 0 0 35px rgba(244, 114, 182, 0.45);
    border-color: rgba(244, 114, 182, 0.95);
  }
}

.forecast-card .status-badge.badge-safe {
  background: rgba(52, 211, 153, 0.15);
  border: 1px solid rgba(52, 211, 153, 0.35);
  color: #34d399;
}

.forecast-card .status-badge.badge-warning {
  background: rgba(251, 191, 36, 0.15);
  border: 1px solid rgba(251, 191, 36, 0.35);
  color: #fbbf24;
}

.forecast-card .status-badge.badge-danger {
  background: rgba(244, 114, 182, 0.15);
  border: 1px solid rgba(244, 114, 182, 0.35);
  color: #f472b6;
}

.forecast-card .trend-badge.trend-up {
  color: #f472b6;
}

.forecast-card .trend-badge.trend-down {
  color: #34d399;
}

.forecast-tooltip-content .breakdown-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.8);
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  gap: 12px;
  flex-wrap: wrap;
}

.forecast-tooltip-content .breakdown-item:last-child {
  border-bottom: none;
}

/* Travel Mode Premium Styles */
.badge-active {
  background: rgba(244, 114, 182, 0.15) !important;
  color: var(--pink-primary) !important;
  border: 1px solid rgba(244, 114, 182, 0.35) !important;
  box-shadow: 0 0 10px rgba(244, 114, 182, 0.2);
  animation: pulse-pink 2.5s infinite;
}

@keyframes pulse-pink {
  0% { opacity: 0.8; box-shadow: 0 0 5px rgba(244, 114, 182, 0.2); }
  50% { opacity: 1; box-shadow: 0 0 15px rgba(244, 114, 182, 0.4); }
  100% { opacity: 0.8; box-shadow: 0 0 5px rgba(244, 114, 182, 0.2); }
}

#travelCard {
  border: 1px solid rgba(129, 140, 248, 0.2);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.travel-active-border {
  border-color: rgba(244, 114, 182, 0.4) !important;
  box-shadow: 0 0 25px rgba(244, 114, 182, 0.15);
}

/* HTML background overrides when theme body classes are active to ensure coverage of full canvas */
html:has(body.light-theme) {
  background-color: #f1f5f9 !important;
}
html:has(body.ocean-theme) {
  background-color: #f0f6fa !important;
}



/* ==========================================================================
   OCEAN FROST GLASSMORPHISM DESIGN SYSTEM (THEME 3)
   ========================================================================== */
body.ocean-theme {
  --bg-primary: #f0f6fa;
  --bg-card: rgba(255, 255, 255, 0.62);
  --border-card: rgba(14, 165, 233, 0.14);
  
  --indigo-primary: #0284c7; /* Sky Blue */
  --indigo-glow: rgba(2, 132, 199, 0.3);
  --purple-primary: #0369a1; /* Cobalt Azure */
  --purple-glow: rgba(3, 105, 161, 0.25);
  --pink-primary: #0d9488; /* Teal / Turquoise */
  --pink-glow: rgba(13, 148, 136, 0.25);
  
  --sky-primary: #38bdf8; /* Frost/Ice Cyan */
  --sky-glow: rgba(56, 189, 248, 0.4);
  
  --text-main: #0f172a;
  --text-muted: #475569;
}

body.ocean-theme .app-container {
  background: radial-gradient(circle at 10% 20%, rgba(240, 246, 250, 0.8) 0%, rgba(224, 242, 254, 0.5) 90%);
}

body.ocean-theme .glass-card, 
body.ocean-theme .glass-panel {
  background: rgba(255, 255, 255, 0.62) !important;
  border-color: rgba(14, 165, 233, 0.22) !important;
  box-shadow: 0 12px 36px 0 rgba(14, 165, 233, 0.08), inset 0 0 12px rgba(255, 255, 255, 0.5) !important;
  backdrop-filter: blur(28px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(28px) saturate(180%) !important;
}

body.ocean-theme .glass-card:hover, 
body.ocean-theme .glass-panel:hover {
  border-color: rgba(14, 165, 233, 0.45) !important;
  box-shadow: 0 16px 42px 0 rgba(14, 165, 233, 0.18), inset 0 0 16px rgba(255, 255, 255, 0.6) !important;
}

body.ocean-theme .modal-overlay {
  background: rgba(224, 242, 254, 0.5) !important;
  backdrop-filter: blur(8px) !important;
}

body.ocean-theme .report-modal {
  background: rgba(255, 255, 255, 0.85) !important;
  border-color: rgba(2, 132, 199, 0.25) !important;
  box-shadow: 0 20px 50px rgba(14, 165, 233, 0.15) !important;
}



body.ocean-theme input, 
body.ocean-theme select,
body.ocean-theme textarea {
  background: rgba(224, 242, 254, 0.3) !important;
  border-color: rgba(14, 165, 233, 0.15) !important;
  color: #0f172a !important;
}

body.ocean-theme input:focus, 
body.ocean-theme select:focus,
body.ocean-theme textarea:focus {
  background: rgba(255, 255, 255, 0.95) !important;
  border-color: #0284c7 !important;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15) !important;
}

body.ocean-theme .btn-hamburger {
  color: #0f172a !important;
  background: rgba(14, 165, 233, 0.08) !important;
}

body.ocean-theme .btn-hamburger:hover {
  background: rgba(14, 165, 233, 0.15) !important;
}

body.ocean-theme h1,
body.ocean-theme h2,
body.ocean-theme h3,
body.ocean-theme h4,
body.ocean-theme h1 *,
body.ocean-theme h2 *,
body.ocean-theme h3 *,
body.ocean-theme h4 *,
body.ocean-theme #reportTitle {
  background: none !important;
  -webkit-text-fill-color: #0f172a !important;
  color: #0f172a !important;
}

body.ocean-theme .text-indigo {
  color: #0284c7 !important;
}
body.ocean-theme .text-pink {
  color: #0d9488 !important;
}
body.ocean-theme .text-emerald {
  color: #10b981 !important;
}

body.ocean-theme .text-indigo,
body.ocean-theme .text-pink,
body.ocean-theme .text-emerald {
  text-shadow: none !important;
}

body.ocean-theme .currency-symbol {
  background: rgba(2, 132, 199, 0.08) !important;
  border-color: rgba(2, 132, 199, 0.15) !important;
  color: #0284c7 !important;
}

body.ocean-theme .slider-header .value {
  text-shadow: none !important;
  color: #0284c7 !important;
}

body.ocean-theme .btn-indigo {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.25) !important;
  color: #ffffff !important;
}

body.ocean-theme .btn-indigo:hover {
  background: linear-gradient(135deg, #0369a1 0%, #0284c7 100%) !important;
  box-shadow: 0 6px 18px rgba(2, 132, 199, 0.4) !important;
}

body.ocean-theme .transaction-item {
  background: rgba(14, 165, 233, 0.03) !important;
  border-color: rgba(14, 165, 233, 0.06) !important;
}

body.ocean-theme .transaction-item:hover {
  background: rgba(14, 165, 233, 0.06) !important;
  border-color: rgba(14, 165, 233, 0.12) !important;
}

body.ocean-theme .archive-item {
  background: rgba(14, 165, 233, 0.03) !important;
  border-color: rgba(14, 165, 233, 0.06) !important;
}

body.ocean-theme select option {
  background: #ffffff !important;
  color: #0f172a !important;
}

body.ocean-theme .profile-sidebar {
  background: rgba(240, 246, 250, 0.95) !important;
  border-left-color: rgba(14, 165, 233, 0.12) !important;
  box-shadow: -15px 0 45px rgba(14, 165, 233, 0.05) !important;
}

body.ocean-theme .sidebar-header h3 {
  background: none !important;
  -webkit-text-fill-color: #0f172a !important;
  color: #0f172a !important;
}

body.ocean-theme .btn-outline {
  border: 1px solid rgba(14, 165, 233, 0.25) !important;
  color: #0284c7 !important;
  background: rgba(14, 165, 233, 0.02) !important;
}
body.ocean-theme .btn-outline:hover {
  background: rgba(14, 165, 233, 0.08) !important;
  border-color: #0284c7 !important;
}

body.ocean-theme .btn-danger-outline {
  border: 1px solid rgba(13, 148, 136, 0.5) !important;
  color: #0d9488 !important;
  background: transparent !important;
}

body.ocean-theme .btn-danger-outline:hover {
  background: rgba(13, 148, 136, 0.08) !important;
  border-color: #0d9488 !important;
}

body.ocean-theme .switch-item {
  background: rgba(14, 165, 233, 0.03) !important;
  border-color: rgba(14, 165, 233, 0.06) !important;
}

body.ocean-theme .switch-title {
  color: #0f172a !important;
}

body.ocean-theme .switch-desc {
  color: #334155 !important;
}

body.ocean-theme .switch-slider {
  background-color: rgba(14, 165, 233, 0.25) !important;
}

body.ocean-theme input:checked + .switch-slider {
  background-color: #0284c7 !important;
}

body.ocean-theme input:checked + .switch-slider::before {
  background-color: #ffffff !important;
}

body.ocean-theme .btn-close {
  background: rgba(14, 165, 233, 0.08) !important;
  color: #0f172a !important;
}

body.ocean-theme .btn-close:hover {
  background: rgba(14, 165, 233, 0.15) !important;
}

body.ocean-theme .btn-primary {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
  color: #ffffff !important;
}

body.ocean-theme .badge {
  background: rgba(2, 132, 199, 0.08) !important;
  border-color: rgba(2, 132, 199, 0.15) !important;
  color: #0284c7 !important;
}

body.ocean-theme .aura-intelligence-slot {
  background: rgba(2, 132, 199, 0.05) !important;
  border-color: rgba(2, 132, 199, 0.15) !important;
  color: #0f172a !important;
}

/* Aura Intelligence Advice Slot Rules */
.aura-intelligence-slot {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 12px;
  margin-top: 14px;
  margin-bottom: 14px;
  transition: var(--transition-smooth);
}

.aura-intelligence-slot.advice-danger {
  background: rgba(244, 114, 182, 0.08) !important;
  border-color: rgba(244, 114, 182, 0.25) !important;
}
.aura-intelligence-slot.advice-warning {
  background: rgba(251, 191, 36, 0.08) !important;
  border-color: rgba(251, 191, 36, 0.25) !important;
}
.aura-intelligence-slot.advice-success {
  background: rgba(52, 211, 153, 0.08) !important;
  border-color: rgba(52, 211, 153, 0.25) !important;
}

/* Light Theme Overrides for High Legibility */
body.light-theme .aura-intelligence-slot {
  background: rgba(15, 23, 42, 0.02) !important;
  border-color: rgba(15, 23, 42, 0.06) !important;
}

body.light-theme .aura-intelligence-slot.advice-danger {
  background: rgba(239, 68, 68, 0.06) !important;
  border-color: rgba(239, 68, 68, 0.18) !important;
}
body.light-theme .aura-intelligence-slot.advice-warning {
  background: rgba(245, 158, 11, 0.06) !important;
  border-color: rgba(245, 158, 11, 0.18) !important;
}
body.light-theme .aura-intelligence-slot.advice-success {
  background: rgba(16, 185, 129, 0.06) !important;
  border-color: rgba(16, 185, 129, 0.18) !important;
}

/* Ocean Theme Overrides for Advice Slot */
body.ocean-theme .aura-intelligence-slot.advice-danger {
  background: rgba(239, 68, 68, 0.05) !important;
  border-color: rgba(239, 68, 68, 0.15) !important;
}
body.ocean-theme .aura-intelligence-slot.advice-warning {
  background: rgba(245, 158, 11, 0.05) !important;
  border-color: rgba(245, 158, 11, 0.15) !important;
}
body.ocean-theme .aura-intelligence-slot.advice-success {
  background: rgba(16, 185, 129, 0.05) !important;
  border-color: rgba(16, 185, 129, 0.15) !important;
}

.card-header h2,
.glass-card h2,
.trend-container h3 {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.card-header h2 {
  margin: 0 !important;
  min-width: 0;
}

.card-header h2 span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  display: block;
}

.glass-card > h2 {
  margin-top: 0 !important;
  margin-bottom: 30px !important; /* Symmetry on desktop for titles without header wrapper */
}

.widget-icon {
  color: var(--indigo-primary);
  flex-shrink: 0;
  transition: var(--transition-smooth);
}

body.light-theme .widget-icon {
  color: var(--indigo-primary) !important;
}

body.ocean-theme .widget-icon {
  color: #0284c7 !important;
}

/* Premium Light & Ocean Theme Forecast Overrides */
body.light-theme .forecast-card .status-badge.badge-safe {
  background: rgba(16, 185, 129, 0.12) !important;
  border-color: rgba(16, 185, 129, 0.25) !important;
  color: #059669 !important;
}
body.light-theme .forecast-card .status-badge.badge-warning {
  background: rgba(245, 158, 11, 0.12) !important;
  border-color: rgba(245, 158, 11, 0.25) !important;
  color: #d97706 !important;
}
body.light-theme .forecast-card .status-badge.badge-danger {
  background: rgba(244, 114, 182, 0.15) !important;
  border-color: rgba(244, 114, 182, 0.3) !important;
  color: #db2777 !important;
}
body.light-theme .forecast-card .trend-badge.trend-up {
  color: #db2777 !important;
}
body.light-theme .forecast-card .trend-badge.trend-down {
  color: #059669 !important;
}
body.light-theme .forecast-tooltip-content {
  background: rgba(15, 23, 42, 0.04) !important;
  border-color: rgba(15, 23, 42, 0.1) !important;
}
body.light-theme .forecast-tooltip-content .breakdown-item {
  border-bottom-color: rgba(15, 23, 42, 0.06) !important;
}
body.light-theme .forecast-tooltip-content .breakdown-item .cat-label {
  color: #1e293b !important;
}
body.light-theme .forecast-tooltip-content .breakdown-item .cat-amount {
  color: #4f46e5 !important;
  font-weight: 700;
}

body.neon-pulse-theme .forecast-tooltip-content .breakdown-item {
  border-bottom-color: rgba(142, 84, 233, 0.15) !important;
}
body.neon-pulse-theme .forecast-tooltip-content .breakdown-item .cat-label {
  color: var(--text-muted, #534b6b) !important;
}
body.neon-pulse-theme .forecast-tooltip-content .breakdown-item .cat-amount {
  color: var(--purple-primary, #5c00d2) !important;
  font-weight: 700;
}


body.ocean-theme .forecast-card .status-badge.badge-safe {
  background: rgba(16, 185, 129, 0.1) !important;
  border-color: rgba(16, 185, 129, 0.2) !important;
  color: #059669 !important;
}
body.ocean-theme .forecast-card .status-badge.badge-warning {
  background: rgba(245, 158, 11, 0.1) !important;
  border-color: rgba(245, 158, 11, 0.2) !important;
  color: #d97706 !important;
}
body.ocean-theme .forecast-card .status-badge.badge-danger {
  background: rgba(13, 148, 136, 0.1) !important;
  border-color: rgba(13, 148, 136, 0.2) !important;
  color: #0d9488 !important;
}
body.ocean-theme .forecast-card .trend-badge.trend-up {
  color: #0d9488 !important;
}
body.ocean-theme .forecast-card .trend-badge.trend-down {
  color: #059669 !important;
}
body.ocean-theme .forecast-tooltip-content {
  background: rgba(14, 165, 233, 0.08) !important;
  border-color: rgba(14, 165, 233, 0.22) !important;
}
body.ocean-theme .forecast-tooltip-content .breakdown-item {
  border-bottom-color: rgba(14, 165, 233, 0.15) !important;
}
body.ocean-theme .forecast-tooltip-content .breakdown-item .cat-label {
  color: #0c4a6e !important;
}
body.ocean-theme .forecast-tooltip-content .breakdown-item .cat-amount {
  color: #0284c7 !important;
  font-weight: 700;
}

/* Premium Toast Notification Backgrounds per Theme */
body.light-theme .toast {
  background: rgba(255, 255, 255, 0.92) !important;
  border-color: #818cf8 !important;
  color: #0f172a !important;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12), 0 0 10px rgba(129, 140, 248, 0.2) !important;
}

body.ocean-theme .toast {
  background: rgba(224, 242, 254, 0.92) !important;
  border-color: #0284c7 !important;
  color: #0c4a6e !important;
  box-shadow: 0 12px 32px rgba(14, 165, 233, 0.12), 0 0 10px rgba(2, 132, 199, 0.2) !important;
}

/* Global Utility Classes */
.hidden {
  display: none !important;
}


/* Force automatic text wrapping for widget switch descriptions to prevent horizontal expanding on mobile */
.switch-desc {
  white-space: normal !important;
  word-break: break-word !important;
  display: block !important;
  max-width: 100% !important;
}

/* Ocean Frost Theme Premium Visual Adjustments (fixes white-on-white text issues) */
body.ocean-theme .aura-calendar,
body.ocean-theme .aura-calendar *,
body.ocean-theme .aura-calendar-day,
body.ocean-theme .aura-cal-header button,
body.ocean-theme .aura-cal-header select,
body.ocean-theme .note-item,
body.ocean-theme .note-item *,
body.ocean-theme .note-text,
body.ocean-theme .reminder-item,
body.ocean-theme .reminder-item * {
  color: #0f172a !important; /* Force highly readable slate blue text color */
}

body.ocean-theme .note-text {
  color: #0f172a !important;
}

body.ocean-theme .note-item.done .note-text {
  color: var(--text-muted) !important;
  text-decoration: line-through !important;
}

body.ocean-theme .aura-calendar-day.empty {
  color: transparent !important;
}

body.ocean-theme .aura-calendar-day.selected {
  color: #ffffff !important;
}

body.ocean-theme .note-item, 
body.ocean-theme .reminder-item {
  background: rgba(14, 165, 233, 0.04) !important;
  border: 1px solid rgba(14, 165, 233, 0.16) !important;
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.02) !important;
  border-radius: 12px !important;
}

body.ocean-theme .note-item:hover, 
body.ocean-theme .reminder-item:hover {
  background: rgba(14, 165, 233, 0.08) !important;
  border-color: rgba(2, 132, 199, 0.35) !important;
  box-shadow: 0 6px 16px rgba(14, 165, 233, 0.05) !important;
}

body.ocean-theme .note-checkbox {
  accent-color: #0284c7 !important;
}

body.ocean-theme .delete-note-btn,
body.ocean-theme .delete-reminder-btn {
  color: #0369a1 !important;
  opacity: 0.6;
  transition: all 0.2s ease;
}

body.ocean-theme .delete-note-btn:hover,
body.ocean-theme .delete-reminder-btn:hover {
  color: #ef4444 !important; /* Turns bright red on hover */
  opacity: 1 !important;
}

/* Perfect alignment & color adaptations for the Savings Amount Display Widget */
.savings-amount-display {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--pink-primary);
  text-shadow: 0 0 15px var(--pink-glow);
  margin: 10px 0 20px 0;
  transition: var(--transition-smooth);
}

/* Light theme overrides for high legibility */
body.light-theme .savings-amount-display {
  color: var(--pink-primary) !important;
  text-shadow: none !important;
}
body.light-theme #multiUserHeaderPill {
  color: var(--text-main) !important;
  background: rgba(0, 0, 0, 0.05) !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
}

/* Ocean theme overrides (mint green / seafoam contrast to align with the palette of Ocean Frost) */
body.ocean-theme .savings-amount-display {
  color: #0d9488 !important; /* Beautiful deep seafoam cyan */
  text-shadow: none !important;
}
body.ocean-theme #multiUserHeaderPill {
  color: var(--text-main) !important;
  background: rgba(2, 132, 199, 0.08) !important;
  border-color: rgba(2, 132, 199, 0.15) !important;
}

/* 🇪🇸 Spanish & Long Translation Visual Safety Guards (prevents display overflow) */
.stat-label, 
.slider-header span.label, 
.switch-title,
.switch-desc,
.profile-subtitle {
  white-space: normal !important;
  word-break: break-word !important;
  line-height: 1.35 !important;
}

/* Hard constraint on button scaling to avoid overflowing the main viewport */
button, input, select {
  max-width: 100% !important;
  box-sizing: border-box !important;
}

/* 📱 MOBILE VIEWPORT OVERFLOW SAFEGUARDS (Resolves horizontal widget scroll pushes) */
@media (max-width: 600px) {
  body {
    overflow-x: hidden !important;
    width: 100vw !important;
    position: relative !important;
    padding: 10px 4px !important;
  }
  
  .app-container {
    width: 100% !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
    padding: 0 4px !important;
    margin: 0 !important;
  }
  
  .main-content {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
    gap: 16px !important;
  }

  .column {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
    gap: 16px !important;
  }

  .glass-card {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 20px !important; /* 20px space above the title */
  }

  /* Center headers vertically and align left on mobile */
  .card-header {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important; /* Force space for side icons */
    margin-top: 0 !important; /* Reset margin to respect the 20px card padding */
    margin-bottom: 20px !important; /* 20px space below the title, to the tabs */
    min-height: 28px !important;
  }
  .card-header h2, .glass-card > h2 {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important; /* Allineato a sinistra */
    text-align: left !important; /* Allineato a sinistra */
    font-size: 0.90rem !important; /* Ridotto per titoli lunghi su mobile */
  }
  .card-header h2 {
    margin: 0 !important;
  }
  .glass-card > h2 {
    margin-top: 0 !important; /* Reset margin to respect the 20px card padding */
    margin-bottom: 20px !important; /* 20px margin-bottom for titles without headers */
  }

  /* Travel Hub Mobile Optimizations */
  .travel-stats-summary-grid {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }
  
  .travel-meta-row {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 6px !important;
  }

  .travel-card-header {
    flex-wrap: wrap !important;
    gap: 8px !important;
  }
  
  .travel-card-title {
    font-size: 0.95rem !important;
    word-break: break-word !important;
    white-space: normal !important;
    flex-grow: 1 !important;
    max-width: 100% !important;
  }

  /* Mobile Tab Bar Optimization (2x2 Grid Layout) */
  #travelHubTabs, .notes-tabs {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    row-gap: 16px !important; /* Clear visual separation between the two rows of buttons */
    column-gap: 10px !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin-top: 0 !important; /* Removed top margin so header margin handles exact spacing */
    margin-bottom: 35px !important; /* Clear visual separation from the content grid below */
  }
  .notes-tabs .tab-btn {
    flex: none !important;
    width: 100% !important;
    padding: 10px 8px !important;
    font-size: 0.78rem !important;
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 10px !important;
  }
  .notes-tabs .tab-btn.active {
    background: linear-gradient(135deg, var(--indigo-primary), var(--purple-primary)) !important;
    border-color: transparent !important;
  }
}

/* ==========================================================================
   PREMIUM VISUAL THEMES - DYNAMIC BACKGROUND OVERRIDES
   ========================================================================== */

/* 1. Midnight Blue Theme Background & Glows */
body.midnight-blue-theme .cyber-dark-bg {
  background-color: #020617; /* Deep midnight void */
}
body.midnight-blue-theme .cyber-grid {
  background-image: 
    linear-gradient(rgba(99, 102, 241, 0.016) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99, 102, 241, 0.016) 1px, transparent 1px);
  mask-image: radial-gradient(circle at 50% 50%, black 25%, transparent 75%);
  -webkit-mask-image: radial-gradient(circle at 50% 50%, black 25%, transparent 75%);
  opacity: 0.9;
}
body.midnight-blue-theme .cyber-glow-indigo {
  background: radial-gradient(circle at center, rgba(30, 64, 175, 0.18) 0%, rgba(30, 64, 175, 0) 70%);
}
body.midnight-blue-theme .cyber-glow-pink {
  background: radial-gradient(circle at center, rgba(147, 51, 234, 0.15) 0%, rgba(147, 51, 234, 0) 70%);
}
body.midnight-blue-theme .cyber-glow-green {
  background: radial-gradient(circle at center, rgba(13, 148, 136, 0.13) 0%, rgba(13, 148, 136, 0) 70%);
}
body.midnight-blue-theme .cyber-glow-purple {
  background: radial-gradient(circle at center, rgba(79, 70, 229, 0.16) 0%, rgba(79, 70, 229, 0) 70%);
}
body.midnight-blue-theme .cyber-glow-cyan {
  background: radial-gradient(circle at center, rgba(59, 130, 246, 0.15) 0%, rgba(59, 130, 246, 0) 70%);
}

/* 2. Sunset Gold Theme Background & Glows */
body.sunset-gold-theme .cyber-dark-bg {
  background-color: #0c0a06; /* Deep black-gold/bronze obsidian space */
}
body.sunset-gold-theme .cyber-grid {
  background-image: 
    linear-gradient(rgba(212, 175, 55, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(212, 175, 55, 0.015) 1px, transparent 1px);
  mask-image: radial-gradient(circle at 50% 50%, black 25%, transparent 75%);
  -webkit-mask-image: radial-gradient(circle at 50% 50%, black 25%, transparent 75%);
  opacity: 0.9;
}
body.sunset-gold-theme .cyber-glow-indigo {
  background: radial-gradient(circle at center, rgba(212, 175, 55, 0.16) 0%, rgba(212, 175, 55, 0) 70%); /* Metallic Gold */
}
body.sunset-gold-theme .cyber-glow-pink {
  background: radial-gradient(circle at center, rgba(243, 229, 171, 0.14) 0%, rgba(243, 229, 171, 0) 70%); /* Luminous Champagne */
}
body.sunset-gold-theme .cyber-glow-green {
  background: radial-gradient(circle at center, rgba(226, 183, 60, 0.14) 0%, rgba(226, 183, 60, 0) 70%); /* Warm liquid gold */
}
body.sunset-gold-theme .cyber-glow-purple {
  background: radial-gradient(circle at center, rgba(212, 175, 55, 0.14) 0%, rgba(212, 175, 55, 0) 70%); /* Luminous Brass */
}
body.sunset-gold-theme .cyber-glow-cyan {
  background: radial-gradient(circle at center, rgba(255, 243, 205, 0.12) 0%, rgba(255, 243, 205, 0) 70%); /* Pale gold/white gold highlight */
}

/* 3. Forest Zen Theme Background & Glows */
body.forest-zen-theme .cyber-dark-bg {
  background-color: #030a08; /* Deep mystical jade void */
}
body.forest-zen-theme .cyber-grid {
  background-image: 
    linear-gradient(rgba(16, 185, 129, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 185, 129, 0.015) 1px, transparent 1px);
  mask-image: radial-gradient(circle at 50% 50%, black 25%, transparent 75%);
  -webkit-mask-image: radial-gradient(circle at 50% 50%, black 25%, transparent 75%);
  opacity: 0.85;
}
body.forest-zen-theme .cyber-glow-indigo {
  background: radial-gradient(circle at center, rgba(16, 185, 129, 0.17) 0%, rgba(16, 185, 129, 0) 70%);
}
body.forest-zen-theme .cyber-glow-pink {
  background: radial-gradient(circle at center, rgba(132, 204, 22, 0.15) 0%, rgba(132, 204, 22, 0) 70%);
}
body.forest-zen-theme .cyber-glow-green {
  background: radial-gradient(circle at center, rgba(4, 120, 87, 0.15) 0%, rgba(4, 120, 87, 0) 70%);
}
body.forest-zen-theme .cyber-glow-purple {
  background: radial-gradient(circle at center, rgba(52, 211, 153, 0.14) 0%, rgba(52, 211, 153, 0) 70%);
}
body.forest-zen-theme .cyber-glow-cyan {
  background: radial-gradient(circle at center, rgba(34, 197, 94, 0.14) 0%, rgba(34, 197, 94, 0) 70%);
}

}

#searchBarContainer #expenseSearchInput {
  padding-left: 48px !important;
  padding-right: 14px !important;
  box-sizing: border-box !important;
  width: 100% !important;
}

select {
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e") !important;
  background-repeat: no-repeat !important;
  background-position: right 14px center !important;
  background-size: 16px !important;
  padding-right: 40px !important;
}

/* Make PWA Install Button icon transparent (no background, no border) */
#installBtn {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  color: var(--text-main) !important;
}

#installBtn:hover {
  background: transparent !important;
  color: var(--indigo-primary) !important;
  filter: drop-shadow(0 0 8px var(--indigo-glow)) !important;
}

/* Segmented Tab Switcher for Notes & Deadlines Widget */
.notes-tabs {
  display: flex;
  gap: 4px !important;
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  padding: 4px !important;
  border-radius: 12px !important;
  margin-bottom: 20px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.notes-tabs .tab-btn {
  flex: 1 !important;
  padding: 8px 16px !important;
  font-size: 0.82rem !important;
  font-weight: 600 !important;
  border-radius: 8px !important;
  border: none !important;
  background: transparent !important;
  color: var(--text-muted) !important;
  cursor: pointer !important;
  transition: var(--transition-smooth) !important;
  font-family: var(--font-family) !important;
  outline: none !important;
  text-align: center !important;
  box-sizing: border-box !important;
}

.notes-tabs .tab-btn:hover {
  color: var(--text-main) !important;
  background: rgba(255, 255, 255, 0.02) !important;
}

.notes-tabs .tab-btn.active {
  background: linear-gradient(135deg, var(--indigo-primary), var(--purple-primary)) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 15px rgba(129, 140, 248, 0.25) !important;
}

/* Travel Hub Premium UI Styles */
/* Travel Hub Premium UI Styles */
@media (min-width: 601px) {
  /* Removed legacy negative margin to fix closed widget vertical centering */
}
.pro-guide-details {
  margin-top: 20px !important;
  margin-bottom: -5px !important;
}
.travel-grid {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 15px !important;
  width: 100% !important;
}

.travel-hub-card {
  background: rgba(255, 255, 255, 0.02) !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  border-radius: 14px !important;
  padding: 16px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  cursor: pointer !important;
  transition: var(--transition-smooth) !important;
  position: relative !important;
  overflow: hidden !important;
}

.travel-hub-card:hover {
  background: rgba(255, 255, 255, 0.04) !important;
  border-color: rgba(129, 140, 248, 0.25) !important;
  transform: translateY(-2px) !important;
}

.travel-card-header {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  width: 100% !important;
}

.travel-card-title {
  font-size: 0.95rem !important;
  font-weight: 700 !important;
  color: #ffffff !important;
  margin: 0 !important;
}

.travel-status-badge {
  font-size: 0.68rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  padding: 3px 8px !important;
  border-radius: 20px !important;
}

.travel-status-badge.active {
  background: rgba(16, 185, 129, 0.1) !important;
  border: 1px solid rgba(16, 185, 129, 0.3) !important;
  color: #10b981 !important;
}

.travel-status-badge.planned {
  background: rgba(56, 189, 248, 0.1) !important;
  border: 1px solid rgba(56, 189, 248, 0.3) !important;
  color: #38bdf8 !important;
}

.travel-status-badge.archived {
  background: rgba(148, 163, 184, 0.1) !important;
  border: 1px solid rgba(148, 163, 184, 0.3) !important;
  color: #94a3b8 !important;
}

.travel-meta-row {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  font-size: 0.8rem !important;
  color: var(--text-muted) !important;
}

.travel-progress-bar-container {
  width: 100% !important;
  height: 6px !important;
  background: rgba(255, 255, 255, 0.05) !important;
  border-radius: 4px !important;
  overflow: hidden !important;
  margin-top: 4px !important;
}

.travel-progress-bar-fill {
  height: 100% !important;
  border-radius: 4px !important;
  background: linear-gradient(90deg, var(--indigo-primary), var(--purple-primary)) !important;
  width: 0%;
  transition: width 0.4s ease !important;
}

.travel-progress-bar-fill.overbudget {
  background: linear-gradient(90deg, var(--pink-primary), #ef4444) !important;
}

.travel-stats-summary-grid {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 12px !important;
  width: 100% !important;
}

.travel-stat-summary-card {
  background: rgba(255, 255, 255, 0.01) !important;
  border: 1px solid rgba(255, 255, 255, 0.04) !important;
  border-radius: 12px !important;
  padding: 12px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
}

.travel-stat-summary-val {
  font-size: 1.15rem !important;
  font-weight: 800 !important;
  color: #ffffff !important;
}

/* PC Browser specific override for New Travel creation modal (prevents scrollbars) */
@media (min-width: 601px) {
  #travelSetupModal {
    max-width: 620px !important;
    max-height: 92vh !important;
  }
}

/* ==========================================================================
   EXECUTIVE SLATE THEME (PRO)
   ========================================================================== */
body.executive-slate-theme {
  --bg-primary: #121824; /* Velvet charcoal grey */
  --bg-card: rgba(18, 24, 38, 0.1); /* 10% satin glassmorphism */
  --border-card: rgba(71, 85, 105, 0.25); /* graphite border */
  
  --indigo-primary: #2563eb; /* Electric Navy Blue */
  --indigo-glow: rgba(37, 99, 235, 0.25);
  --purple-primary: #1d4ed8; /* Navy Blue Accent */
  --purple-glow: rgba(29, 78, 216, 0.2);
  --pink-primary: #3b82f6; /* Lighter Accent */
  --pink-glow: rgba(59, 130, 246, 0.2);
  --emerald-primary: #047857; /* Muted corporate emerald */
  --emerald-glow: rgba(4, 120, 87, 0.2);
  --amber-primary: #d97706; /* Muted corporate amber */
  --amber-glow: rgba(217, 119, 6, 0.2);

  --text-main: #f3f4f6; /* Pearl White */
  --text-muted: #9ca3af; /* Light Slate Grey */
}

/* Glass card overrides for Executive Slate */
body.executive-slate-theme .glass-card,
body.executive-slate-theme .glass-panel {
  background: rgba(18, 24, 38, 0.1) !important;
  border-color: rgba(71, 85, 105, 0.25) !important;
  border-radius: 6px !important; /* Slightly rounded geometric corners */
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15) !important;
}

/* Accent element color adjustments for buttons to ensure contrast */
body.executive-slate-theme .btn-indigo {
  background: linear-gradient(135deg, #1d4ed8, #2563eb) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25) !important;
}
body.executive-slate-theme .btn-indigo:hover {
  background: linear-gradient(135deg, #2563eb, #3b82f6) !important;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4) !important;
}

/* Dynamic background for Executive Slate */
body.executive-slate-theme .cyber-dark-bg {
  background-color: #121824; /* Vellutato antracite */
}
body.executive-slate-theme .cyber-grid {
  background-image: 
    linear-gradient(rgba(37, 99, 235, 0.01) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 99, 235, 0.01) 1px, transparent 1px);
  mask-image: radial-gradient(circle at 50% 50%, black 25%, transparent 75%);
  -webkit-mask-image: radial-gradient(circle at 50% 50%, black 25%, transparent 75%);
  opacity: 0.85;
}
/* Subdued glow, navy blue alone */
body.executive-slate-theme .cyber-glow-indigo,
body.executive-slate-theme .cyber-glow-pink,
body.executive-slate-theme .cyber-glow-green,
body.executive-slate-theme .cyber-glow-purple,
body.executive-slate-theme .cyber-glow-cyan {
  background: radial-gradient(circle at center, rgba(37, 99, 235, 0.03) 0%, rgba(37, 99, 235, 0) 70%);
}

/* Mobile & WebView GPU optimization: Disable animated heavy blur glows on screens <= 1024px to prevent hardware acceleration glitches (blue overlapping screens) */
@media (max-width: 1024px) {
  .cyber-glow-indigo,
  .cyber-glow-pink,
  .cyber-glow-green,
  .cyber-glow-purple,
  .cyber-glow-cyan,
  body.midnight-blue-theme .cyber-glow-indigo,
  body.midnight-blue-theme .cyber-glow-pink,
  body.midnight-blue-theme .cyber-glow-green,
  body.midnight-blue-theme .cyber-glow-purple,
  body.midnight-blue-theme .cyber-glow-cyan,
  body.sunset-gold-theme .cyber-glow-indigo,
  body.sunset-gold-theme .cyber-glow-pink,
  body.sunset-gold-theme .cyber-glow-green,
  body.sunset-gold-theme .cyber-glow-purple,
  body.sunset-gold-theme .cyber-glow-cyan,
  body.forest-zen-theme .cyber-glow-indigo,
  body.forest-zen-theme .cyber-glow-pink,
  body.forest-zen-theme .cyber-glow-green,
  body.forest-zen-theme .cyber-glow-purple,
  body.forest-zen-theme .cyber-glow-cyan,
  body.executive-slate-theme .cyber-glow-indigo,
  body.executive-slate-theme .cyber-glow-pink,
  body.executive-slate-theme .cyber-glow-green,
  body.executive-slate-theme .cyber-glow-purple,
  body.executive-slate-theme .cyber-glow-cyan {
    display: none !important;
    animation: none !important;
  }
  
  /* Disable backdrop-filter on fixed overlays covering the screen to prevent WebView rendering/compositing bugs */
  .sidebar-overlay,
  .modal-overlay,
  .lock-screen-overlay {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  /* Disable backdrop-filter on the header to prevent animation repaint glitches from corrupting the GPU layer */
  .app-header {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: rgba(10, 14, 33, 0.9) !important;
  }

  /* Hide the sidebar overlay completely when inactive */
  .sidebar-overlay {
    display: none !important;
    background: rgba(4, 6, 15, 0.8) !important;
  }
  .sidebar-overlay.active {
    display: block !important;
  }

  /* Solid fallback colors for mobile overlays to maintain premium readability */
  .modal-overlay {
    background: rgba(4, 6, 15, 0.85) !important;
  }
  .lock-screen-overlay {
    background: #050712 !important;
  }
  .profile-sidebar {
    background: #0a0e21 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  /* Disable backdrop-filter on glass cards and panels to prevent GPU composition/rendering glitches (e.g. blue overlay rectangular blocks) on mobile WebViews */
  .glass-card,
  .glass-panel {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: rgba(10, 14, 33, 0.92) !important;
  }

  body.light-theme .glass-card,
  body.light-theme .glass-panel {
    background: rgba(245, 247, 250, 0.95) !important;
  }

  body.ocean-theme .glass-card,
  body.ocean-theme .glass-panel {
    background: rgba(224, 242, 254, 0.95) !important;
  }

  body.executive-slate-theme .glass-card,
  body.executive-slate-theme .glass-panel {
    background: rgba(17, 24, 39, 0.95) !important;
  }
  
  /* Apply premium lightweight static gradients to backgrounds */
  .cyber-dark-bg {
    background: radial-gradient(circle at 10% 10%, #17193b 0%, #060713 70%) !important;
  }
  body.midnight-blue-theme .cyber-dark-bg {
    background: radial-gradient(circle at 10% 10%, #1e3a8a 0%, #020617 70%) !important;
  }
  body.sunset-gold-theme .cyber-dark-bg {
    background: radial-gradient(circle at 10% 10%, #451a03 0%, #0c0a06 70%) !important;
  }
  body.forest-zen-theme .cyber-dark-bg {
    background: radial-gradient(circle at 10% 10%, #064e3b 0%, #020804 70%) !important;
  }
  body.executive-slate-theme .cyber-dark-bg {
    background: radial-gradient(circle at 10% 10%, #1f2937 0%, #0f172a 70%) !important;
  }
}






