/* :root rimosso - importato da variables.css */

/* ============================================================
   TEMA DARK "MOONLIGHT TWILIGHT" (V7 - SOFT WHITE #f5f5f7)
   ============================================================ */
body.theme-pro-dark {
    /* 1. VARIABILI */
    background-color: transparent !important; 
    --header-grad: linear-gradient(90deg, #5A7FFF 0%, #D926A9 25%, #FFFFFF 50%, #D926A9 75%, #5A7FFF 100%);
    --bg-color-top: #231a38 !important;
    --bg-color-bottom: #121216 !important;
    
    --card-bg: rgba(30, 30, 40, 0.6) !important;
    
    /* Bordo Soft White */
    --glass-border: rgba(245, 245, 247, 0.15) !important;
    
    --text-color: #f5f5f7 !important; /* Soft White */
    --secondary-text-color: #a0a0a5 !important; 
    
    --input-bg: rgba(0, 0, 0, 0.3) !important;
    
    /* Bordo Input Soft White */
    --border-color: rgba(245, 245, 247, 0.2) !important;
    
    /* Colori Stato */
    --primary-color: #0A84FF !important;
    --primary-dark: #007AFF !important;
    --green: #05ab3a !important;
    --yellow: #FF9F0A !important;
    --orange: #FF700A !important;
    --red: #FF453A !important;
    
    --toast-bg: #2C2C2E !important;
    
    /* TWILIGHT COLORS */
    --neb-1: #5A7FFF; 
    --neb-2: #A855C9; 
    --neb-3: #D926A9; 
}

/* 2. SFONDO MOONLIGHT */
body.theme-pro-dark::before {
    content: ''; position: fixed; inset: 0; z-index: -1;
    background-image: linear-gradient(180deg, #231a38 0%, #121216 100%) !important;
    background-size: auto; filter: none; opacity: 1;
}

/* 3. CARD & BOX */
body.theme-pro-dark .card,
body.theme-pro-dark .total-box,
body.theme-pro-dark .category-item,
body.theme-pro-dark .expense-category-item,
body.theme-pro-dark .recent-expense-item,
body.theme-pro-dark .saving-goal-card,
body.theme-pro-dark .btn:not(.btn-secondary),
body.theme-pro-dark .btn-secondary,
body.theme-pro-dark .btn-danger,
body.theme-pro-dark .tag-chip,
body.theme-pro-dark .extra-budget-box {
    background-image: none !important;
    background: linear-gradient(145deg, rgba(60, 60, 80, 0.5) 0%, rgba(20, 20, 30, 0.8) 100%) !important;
    color: var(--text-color) !important;
    
    /* Bordi Soft White */
    border: 1px solid rgba(245, 245, 247, 0.15) !important;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3) !important;
    
    backdrop-filter: blur(20px) !important;
    position: relative !important; z-index: 1;
    border-radius: 14px !important; overflow: hidden !important;
}

/* 4. BORDI TWILIGHT */
body.theme-pro-dark .category-item::before,
body.theme-pro-dark .btn:not(.btn-secondary)::before,
body.theme-pro-dark .btn-secondary::before,
body.theme-pro-dark .btn-danger::before,
body.theme-pro-dark .expense-category-item::before,
body.theme-pro-dark .recent-expense-item::before,
body.theme-pro-dark .tag-chip::before,
body.theme-pro-dark #monthly-history-grid .expense-category-item::before,
body.theme-pro-dark #chart-screen .card::before {
    display: block !important; content: ''; position: absolute; inset: 0;
    padding: 1.5px !important; border-radius: 14px;
    background: linear-gradient(135deg, var(--neb-1), var(--neb-2), var(--neb-3)) !important;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: xor; mask-composite: exclude;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    z-index: 5; pointer-events: none; opacity: 0.8 !important; filter: brightness(1.2);
}

/* 5. BARRE LATERALI */
body.theme-pro-dark .category-item::after,
body.theme-pro-dark .expense-category-item::after,
body.theme-pro-dark .recent-expense-item::after,
body.theme-pro-dark #monthly-history-grid .expense-category-item::after {
    content: ''; display: block !important; position: absolute;
    left: 0; top: 15%; height: 70%; width: 3px;
    border-radius: 0 4px 4px 0;
    background: linear-gradient(180deg, var(--neb-1), var(--neb-3));
    z-index: 6;
}
/* Eccezioni */
body.theme-pro-dark .btn::after,
body.theme-pro-dark .btn-secondary::after,
body.theme-pro-dark .tag-chip::after,
body.theme-pro-dark #chart-screen .card::after { display: none !important; }

/* 6. STATI ATTIVI */
body.theme-pro-dark .category-item:active,
body.theme-pro-dark .btn:active,
body.theme-pro-dark .btn-secondary:active,
body.theme-pro-dark .recent-expense-item:active,
body.theme-pro-dark .expense-list-item:active,
body.theme-pro-dark .tag-chip:active {
    background: #2C2C35 !important;
    transform: translateY(1px);
}
body.theme-pro-dark .category-item:active::before,
body.theme-pro-dark .btn:active::before,
body.theme-pro-dark .tag-chip:active::before { display: none !important; }

/* 7. HEADER, NAV E INPUT */
body.theme-pro-dark #home-screen .header, body.theme-pro-dark .header {
    background-color: rgba(30, 25, 45, 0.85) !important;
    backdrop-filter: blur(40px) saturate(180%) !important;
    /* Bordo Soft White */
    border-bottom: 1px solid rgba(245, 245, 247, 0.15) !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5) !important;
}
body.theme-pro-dark .bottom-nav-bar {
    background-color: rgba(30, 25, 45, 0.95) !important;
    background-image: none !important;
    /* Bordo Soft White */
    border-top: 1px solid rgba(245, 245, 247, 0.15) !important;
    backdrop-filter: blur(25px) !important;
}
body.theme-pro-dark input, body.theme-pro-dark textarea, body.theme-pro-dark select {
    background-color: rgba(0, 0, 0, 0.3) !important; 
    /* Bordo Input Soft White */
    border: 1px solid rgba(245, 245, 247, 0.2) !important; 
    color: var(--text-color) !important;
}
/* Icona Select SVG aggiornata con colore #f5f5f7 */
body.theme-pro-dark .input-group select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23f5f5f7' stroke-width='2' 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 12px center !important;
}

/* 8. TESTI GRADIENTE */
body.theme-pro-dark label, body.theme-pro-dark option { color: var(--text-color) !important; }

body.theme-pro-dark .total-box h3,
body.theme-pro-dark #monthly-card-title, 
body.theme-pro-dark #weekly-card-title,
body.theme-pro-dark #weekly-card-title span,
body.theme-pro-dark .amount, 
body.theme-pro-dark .expense-category-item .amount,
body.theme-pro-dark #stat-total-count,
body.theme-pro-dark #stat-categories-count {
    background: linear-gradient(90deg, var(--neb-1) 0%, var(--neb-2) 50%, var(--neb-3) 100%) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    color: transparent !important;
    font-weight: 800 !important; 
}

/* NAVIGAZIONE ATTIVA */
body.theme-pro-dark .nav-btn.active span,
body.theme-pro-dark .nav-btn.active svg {
    background: linear-gradient(135deg, var(--neb-1), var(--neb-3)) !important;
    -webkit-background-clip: text !important; background-clip: text !important;
    color: transparent !important; stroke: var(--neb-2) !important;
}

body.theme-pro-dark .category-summary-item .amount.status-green { color: var(--green) !important; }
body.theme-pro-dark .category-summary-item .amount.status-red { color: var(--red) !important; }

/* FIX LEGGIBILITÀ */
.header p, 
.input-group p, 
div[style*="font-size:11px"], 
div[style*="font-size: 11px"] {
    font-size: 13px !important;
    font-weight: 600 !important;
    opacity: 1 !important;
    color: var(--secondary-text-color) !important;
} 

/* Grafico */
body.theme-pro-dark #chart-screen .card {
    background: linear-gradient(160deg, #28283299, #0a0a0fcc) !important;
    border: 1px solid rgba(245, 245, 247, 0.1) !important; /* Soft White Border */
    box-shadow: 0 10px 30px #00000080 !important;
}

/* Pulsante Google */
body.theme-pro-dark .btn-social.google { 
    background-color: #f5f5f7 !important; /* Soft White */
    color: #000 !important; box-shadow: none !important; 
}

/* Toast */
body.theme-pro-dark #toast-message { 
    background-color: var(--toast-bg) !important; 
    color: var(--text-color) !important; 
}

/* Icone e Bottoni Header (Glass Soft White) */
body.theme-pro-dark #open-search-btn, 
body.theme-pro-dark #privacy-btn, 
body.theme-pro-dark .header-icon-btn,
body.theme-pro-dark #theme-toggle-btn {
    background: rgba(245, 245, 247, 0.1) !important; /* Soft White Alpha */
    color: #D926A9 !important; /* Soft White */
    opacity: 1 !important;
}

body.theme-pro-dark .img-dark { display: block !important; }
body.theme-pro-dark .img-light { display: none !important; }

/* ============================================================
   FIX ANIMAZIONI TWILIGHT (CON SOFT WHITE)
   ============================================================ */

/* 2. ENERGY BLADE (Barra Settimana) */
body.theme-pro-dark .blade-current {
    background-image: linear-gradient(
        110deg, 
        #5A7FFF 0%,    /* Start: Blu */
        #D926A9 25%,   /* Fucsia */
        #f5f5f7 50%,   /* LUCE SOFT WHITE */
        #D926A9 75%,   /* Fucsia */
        #5A7FFF 100%   /* End: Blu */
    ) !important;
    
    box-shadow: 0 0 15px rgba(217, 38, 169, 0.6) !important; 
    border: 1px solid rgba(245, 245, 247, 0.5) !important; /* Bordo Soft White */
    
    background-size: 200% 100% !important;
    animation: bladeFlow 3s infinite linear !important;
}

/* 3. LAME PASSATE (Statiche) */
body.theme-pro-dark .blade-active:not(.blade-current) {
    background: linear-gradient(90deg, #5A7FFF, #D926A9) !important;
    opacity: 0.7 !important;
}

/* ============================================================
   TEMA LIGHT "SOLID PLATINUM" (V11 - LIGHTER CARDS)
   ============================================================ */
body.theme-pro-light {
    /* 1. VARIABILI */
    background-color: transparent !important; 
    --header-grad: linear-gradient(90deg, #5A7FFF 0%, #D926A9 25%, #7d7d7d 50%, #D926A9 75%, #5A7FFF 100%);
    /* Sfondo Solido (Resta Grigio Medio per contrasto) */
    --bg-color-top: #E5E5EA !important;    
    --bg-color-bottom: #E5E5EA !important; 
    
    /* Card Solide (Grigio Ghiaccio - QUASI BIANCO) */
    --card-bg: #F5F5F7 !important; 
    
    --glass-border: #D1D1D6 !important;
    
    /* Testi (SOFT BLACK) */
    --text-color: #736672 !important;       
    --secondary-text-color: #3C3C43 !important; 
    
    /* Input BIANCHI PURI */
    --input-bg: #FFFFFF !important;
    --border-color: #C7C7CC !important;
    
    /* Colori Stato */
    --primary-color: #0A84FF !important;
    --primary-dark: #007AFF !important;
    
    --green: #05ab3a !important; 
    --yellow: #FF9F0A !important; /* Giallo Oro */
    --orange: #FF700A !important; /* Arancio Acceso (Ben diverso dal rosso) */
    --red: #FF453A !important;    /* Rosso Apple (Ben diverso dall'arancio) */
    
    --toast-bg: #252527 !important;
    
    /* TWILIGHT COLORS */
    --neb-1: #5A7FFF; 
    --neb-2: #A855C9; 
    --neb-3: #D926A9; 
}

/* 2. SFONDO SOLIDO */
body.theme-pro-light::before {
    content: ''; position: fixed; inset: 0; z-index: -1;
    background: #E5E5EA !important;
    opacity: 1;
}

/* 3. CARD & BOX (Nuovo Colore Chiaro) */
body.theme-pro-light .card,
body.theme-pro-light .total-box,
body.theme-pro-light .category-item,
body.theme-pro-light .expense-category-item,
body.theme-pro-light .recent-expense-item,
body.theme-pro-light .saving-goal-card,
body.theme-pro-light .btn:not(.btn-secondary),
body.theme-pro-light .btn-secondary,
body.theme-pro-light .btn-danger,
body.theme-pro-light .tag-chip,
body.theme-pro-light .extra-budget-box {
    background-image: none !important;
    background-color: #F5F5F7 !important; /* LIGHTER GREY */
    color: var(--text-color) !important;
    border: 1px solid #D1D1D6 !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05) !important;
    backdrop-filter: none !important;
    position: relative !important; z-index: 1;
    border-radius: 14px !important; overflow: hidden !important;
}

/* 4. BORDI TWILIGHT */
body.theme-pro-light .category-item::before,
body.theme-pro-light .btn:not(.btn-secondary)::before,
body.theme-pro-light .btn-secondary::before,
body.theme-pro-light .btn-danger::before,
body.theme-pro-light .expense-category-item::before,
body.theme-pro-light .recent-expense-item::before,
body.theme-pro-light .tag-chip::before,
body.theme-pro-light #monthly-history-grid .expense-category-item::before,
body.theme-pro-light #chart-screen .card::before {
    display: block !important; content: ''; position: absolute; inset: 0;
    padding: 1.5px !important; border-radius: 14px;
    background: linear-gradient(135deg, var(--neb-1), var(--neb-2), var(--neb-3)) !important;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: xor; mask-composite: exclude;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    z-index: 5; pointer-events: none; opacity: 1 !important;
}

/* 5. BARRE LATERALI */
body.theme-pro-light .category-item::after,
body.theme-pro-light .expense-category-item::after,
body.theme-pro-light .recent-expense-item::after,
body.theme-pro-light #monthly-history-grid .expense-category-item::after {
    content: ''; display: block !important; position: absolute;
    left: 0; top: 15%; height: 70%; width: 4px;
    border-radius: 0 4px 4px 0;
    background: linear-gradient(180deg, var(--neb-1), var(--neb-3));
    z-index: 6;
}
/* Eccezioni */
body.theme-pro-light .btn::after,
body.theme-pro-light .btn-secondary::after,
body.theme-pro-light .tag-chip::after,
body.theme-pro-light #chart-screen .card::after { display: none !important; }

/* 6. STATI ATTIVI */
body.theme-pro-light .category-item:active,
body.theme-pro-light .btn:active,
body.theme-pro-light .btn-secondary:active,
body.theme-pro-light .recent-expense-item:active,
body.theme-pro-light .expense-list-item:active,
body.theme-pro-light .tag-chip:active {
    background-color: #E5E5EA !important; 
    transform: translateY(1px);
}
body.theme-pro-light .category-item:active::before,
body.theme-pro-light .btn:active::before,
body.theme-pro-light .tag-chip:active::before { display: none !important; }

/* 7. HEADER, NAV E INPUT */
body.theme-pro-light #home-screen .header, body.theme-pro-light .header {
    background-color: #F5F5F7 !important; /* Header Chiaro */
    backdrop-filter: none !important;
    border-bottom: 1px solid #D1D1D6 !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02) !important;
}
body.theme-pro-light .bottom-nav-bar {
    background-color: #F5F5F7 !important; /* Navbar Chiara */
    border-top: 1px solid #D1D1D6 !important;
    backdrop-filter: none !important;
}
body.theme-pro-light input, body.theme-pro-light textarea, body.theme-pro-light select {
    background-color: #FFFFFF !important; 
    border: 1px solid #C7C7CC !important; 
    color: #736672 !important; 
}
body.theme-pro-light .input-group select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%231c1c1e' stroke-width='2' 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 12px center !important;
}

/* 8. ICONE HEADER */
body.theme-pro-light .header-icon-btn {
    background-color: #E5E5EA !important;
    border: 1px solid #D1D1D6 !important;
    box-shadow: none !important;
    color: #D926A9 !important; 
}
body.theme-pro-light .header-icon-btn svg { stroke: #D926A9 !important; }

/* FIX BORDO ICONA SOLE (TEMA LIGHT) */
body.theme-pro-light #home-screen .header #theme-toggle-btn {
    border: 1px solid #D1D1D6 !important; /* Grigio visibile */
    background-color: #E5E5EA !important; /* Sfondo coerente */
    box-shadow: none !important;
}

/* 9. TESTI E BILANCIO */
body.theme-pro-light label, body.theme-pro-light option { color: var(--text-color) !important; }
/* LEGGIBILITÀ */
.header p, 
.input-group p, 
div[style*="font-size:11px"], 
div[style*="font-size: 11px"] {
    font-size: 13px !important;      
    font-weight: 600 !important;     
    opacity: 1 !important;           
    color: var(--secondary-text-color) !important;
}

/* CONTO BLU */
body.theme-pro-light #balance-strip span {
    color: #736672 !important; 
    opacity: 0.8 !important;
    font-weight: 700 !important;
    -webkit-text-fill-color: #736672 !important;
}
body.theme-pro-light #global-balance-display {
    color: var(--primary-color) !important; 
    -webkit-text-fill-color: var(--primary-color) !important;
    background: none !important;
}

/* VERDE */
body.theme-pro-light #monthly-budget-summary .remaining-budget[style*="rgb(52, 199, 89)"], 
body.theme-pro-light #monthly-income-display,
body.theme-pro-light .amount.status-green,
body.theme-pro-light .expense-list-item .amount[style*="green"],
body.theme-pro-light .category-summary-item .amount[style*="green"],
body.theme-pro-light .amount[style*="color: var(--green)"] {
    color: var(--green) !important;
    -webkit-text-fill-color: var(--green) !important;
    font-weight: 800 !important;
    background: none !important;
}

/* BUDGET RESIDUO */
body.theme-pro-light #monthly-budget-summary .remaining-budget {
    color: #736672 !important;
    text-shadow: none !important;
    -webkit-text-fill-color: initial !important;
    background: none !important;
}

/* GRADIENTI */
body.theme-pro-light .total-box h3,
body.theme-pro-light #monthly-card-title, 
body.theme-pro-light #weekly-card-title,
body.theme-pro-light #weekly-card-title span,
body.theme-pro-light .amount:not(.status-green):not(.status-red):not(.status-orange):not([style*="green"]):not([style*="var(--primary-color)"]), 
body.theme-pro-light .expense-category-item .amount,
body.theme-pro-light #stat-total-count,
body.theme-pro-light #stat-categories-count {
    background: linear-gradient(90deg, var(--neb-1) 0%, var(--neb-2) 50%, var(--neb-3) 100%) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    color: transparent !important;
    font-weight: 800 !important;
    display: inline-block !important; 
}

/* NAVIGAZIONE */
body.theme-pro-light .nav-btn.active span,
body.theme-pro-light .nav-btn.active svg {
    background: linear-gradient(135deg, var(--neb-1), var(--neb-3)) !important;
    -webkit-background-clip: text !important; background-clip: text !important;
    color: transparent !important;
    stroke: var(--neb-2) !important;
}

/* 10. ELEMENTI SPECIALI */
body.theme-pro-light .category-summary-item .amount {
    background: none !important; -webkit-text-fill-color: initial !important; color: var(--text-color) !important;
}
body.theme-pro-light .category-summary-item .amount.status-green,
body.theme-pro-light .expense-category-item .amount.status-green { 
    color: var(--green) !important; 
    background: none !important; 
    -webkit-text-fill-color: initial !important; 
}
body.theme-pro-light .category-summary-item .amount.status-red,
body.theme-pro-light .expense-category-item .amount.status-red { 
    color: var(--red) !important; 
    background: none !important; 
    -webkit-text-fill-color: initial !important; 
}
body.theme-pro-light .category-summary-item .amount.status-orange,
body.theme-pro-light .expense-category-item .amount.status-orange { 
    color: var(--orange) !important; 
    background: none !important; 
    -webkit-text-fill-color: initial !important; 
}

/* FINESTRE UNIFORMATE AL GRIGIO GHIACCIO */
body.theme-pro-light #chart-screen .card,
body.theme-pro-light #quick-actions-menu,
body.theme-pro-light .search-header-container,
body.theme-pro-light .btn-social.google {
    background-color: #F5F5F7 !important; /* LIGHTER GREY */
    border: 1px solid #D1D1D6 !important;
}

/* Barra Settimana Animata */
body.theme-pro-light .blade-current {
    background-image: linear-gradient(
        110deg, 
        var(--neb-1) 0%, var(--neb-2) 35%, #FFF 50%, var(--neb-2) 65%, var(--neb-1) 100%
    ) !important;
    box-shadow: 0 0 10px rgba(168, 85, 201, 0.3) !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
}

/* Gestione Icone */
body.theme-pro-light .img-light { display: block !important; }
body.theme-pro-light .img-dark { display: none !important; }

/* Toast */
body.theme-pro-light #toast-message { background-color: #736672 !important; color: #FFF !important; }

/* ============================================================
   FIX LEGGIBILITÀ TESTI HEADER (TEMA LIGHT)
   ============================================================ */

/* 1. Sottotitoli generici */
body.theme-pro-light .header p {
    color: #736672 !important; /* Grigio Antracite */
    opacity: 0.9 !important;   /* Quasi pieno */
    font-weight: 600 !important;
}

/* 2. Giorno della settimana */
body.theme-pro-light #current-date h4 {
    color: #736672 !important; /* Grigio Scuro */
    opacity: 1 !important;     /* Niente trasparenza */
    font-weight: 700 !important;
}

/* 3. Etichetta "BUDGET RESIDUO" */
body.theme-pro-light #monthly-budget-summary h4 {
    color: #736672 !important; /* Grigio Scuro */
    opacity: 1 !important;
    font-weight: 700 !important;
}

/* 4. Data Principale */
body.theme-pro-light #current-date p {
    color: #736672 !important; /* Nero Morbido */
    opacity: 1 !important;
}

/* ============================================================
   FIX NAVBAR TEMA LIGHT (ICONE CHIARE)
   ============================================================ */

body.theme-pro-light .nav-btn:not(.active) {
    color: #736672 !important; /* Grigio Chiaro (Silver) */
    opacity: 1 !important;     /* Rimuove opacità strana */
}

body.theme-pro-light .nav-btn:not(.active) span {
    color: #736672 !important;
    -webkit-text-fill-color: #736672 !important;
}

/* L'icona attiva rimane col gradiente */
body.theme-pro-light .nav-btn.active {
    opacity: 1 !important;
}

/* STILE SPECIFICO PER TEMA LIGHT (Sovrascrive il default) */
body.theme-pro-light #quick-actions-menu {
    background-color: #FFFFFF !important;
    border: 1px solid #D1D1D6 !important;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15) !important;
    color: #000 !important;
}

/* STILE SPECIFICO PER TEMA DARK (Sovrascrive il default) */
body.theme-pro-dark #quick-actions-menu {
    background-color: rgba(30, 30, 40, 0.95) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: #fff !important;
}

/* SOVRASCRITTURA TEMI (Colori corretti) */
/* TEMA LIGHT: Bianco */
body.theme-pro-light #quick-actions-menu {
    background-color: #FFFFFF !important;
    color: #1F2937 !important;
    border: 1px solid #D1D1D6 !important;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2) !important;
}

/* TEMA DARK: Vetro Scuro */
body.theme-pro-dark #quick-actions-menu {
    background: rgba(25, 25, 35, 0.95) !important;
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 10px 40px rgba(0,0,0,0.8) !important;
}

/* Colori voci Dark */
body.theme-pro-dark .quick-action-item { background: rgba(255,255,255,0.1); }
/* Colori voci Light */
body.theme-pro-light .quick-action-item { background: #F2F2F7; color: #1F2937; }


/* ============================================================
   FIX GRADIENTI DARK MODE (Uniformità con Light)
   ============================================================ */
body.theme-pro-dark .category-summary-item .amount:not(.status-green):not(.status-red):not(.status-orange),
body.theme-pro-dark .expense-list-item .amount:not([style*="green"]):not([style*="rgb(52, 199, 89)"]):not([style*="var(--green)"]):not([style*="#AF52DE"]) {
    
    /* 1. Gradiente Nebulosa */
    background: linear-gradient(90deg, #5A7FFF 0%, #A855C9 50%, #D926A9 100%) !important;
    
    /* 2. Applicazione al testo */
    -webkit-background-clip: text !important;
    background-clip: text !important;
    color: transparent !important;
    -webkit-text-fill-color: transparent !important;
    
    /* 3. Geometria Corretta (Fit Content) */
    width: fit-content !important;
    display: block !important;
    margin-left: auto !important; /* Mantiene l'allineamento a destra */
    
    /* 4. Peso Font */
    font-weight: 800 !important;
}

/* Colore: TEMA DARK (Luce Bianca) */
body.theme-pro-dark .header h1,
body.theme-pro-dark #home-screen .header h1 {
    background-image: linear-gradient(
        90deg,
        #5A7FFF 0%,    
        #D926A9 25%,   
        #FFFFFF 50%,   /* Bianco Puro */
        #D926A9 75%,   
        #5A7FFF 100%   
    ) !important;
}

/* Colore: TEMA LIGHT (Luce Grigia) */
body.theme-pro-light .header h1,
body.theme-pro-light #home-screen .header h1 {
    background-image: linear-gradient(
        90deg,
        #5A7FFF 0%, 
        #D926A9 25%, 
        #7d7d7d 50%,   /* Grigio per contrasto su chiaro */
        #D926A9 75%, 
        #5A7FFF 100%
    ) !important;
}

/* Colori Sfondo Modale (Reinseriti qui perché tolti dai temi sopra) */
body.theme-pro-dark .modal-content {
    background-color: rgba(30, 30, 40, 0.95) !important;
    color: #f5f5f7 !important;
    border: 1px solid rgba(245, 245, 247, 0.15) !important;
    overflow-y: auto !important;
}
body.theme-pro-light .modal-content {
    background-color: #F5F5F7 !important;
    color: #736672 !important;
    border: 1px solid #D1D1D6 !important;
    overflow-y: auto !important;
}

/* ============================================================
   CALENDAR HEATMAP THEMES
   ============================================================ */

/* TEMA LIGHT (Sfondo Pastello) */
body.theme-pro-light .calendar-day.heat-low {
    background-color: rgba(52, 199, 89, 0.25) !important; /* Verde */
    border: 1px solid rgba(52, 199, 89, 0.3) !important;
}
body.theme-pro-light .calendar-day.heat-med {
    background-color: rgba(255, 159, 10, 0.25) !important; /* Arancio */
    border: 1px solid rgba(255, 159, 10, 0.3) !important;
}
body.theme-pro-light .calendar-day.heat-high {
    background-color: rgba(255, 59, 48, 0.25) !important; /* Rosso */
    border: 1px solid rgba(255, 59, 48, 0.3) !important;
}

/* TEMA DARK (Bordi Neon + Sfondo scuro colorato) */
body.theme-pro-dark .calendar-day.heat-low {
    background-color: rgba(50, 215, 75, 0.15) !important;
    border: 1px solid #32D74B !important; /* Verde Neon */
}
body.theme-pro-dark .calendar-day.heat-low .day-amount { color: #32D74B !important; }

body.theme-pro-dark .calendar-day.heat-med {
    background-color: rgba(255, 159, 10, 0.15) !important;
    border: 1px solid #FF9F0A !important; /* Arancio Neon */
}
body.theme-pro-dark .calendar-day.heat-med .day-amount { color: #FF9F0A !important; }

body.theme-pro-dark .calendar-day.heat-high {
    background-color: rgba(255, 69, 58, 0.15) !important;
    border: 1px solid #FF453A !important; /* Rosso Neon */
}
body.theme-pro-dark .calendar-day.heat-high .day-amount { color: #FF453A !important; }
