/* AIMON-PATCH-REGIME-COMPACT-V1 */
/* ===== DASHBOARD.CSS - STILI COMPLETI DASHBOARD AIMON ===== */
/* Versione 13.1 - Fix: margin-right separato in has-right-sidebar */

:root {
    --sidebar-width: 190px;
    --carousel-transition: 0.8s;
    --regime-espansione: #11df13;
    --regime-espansione-dark: #0fc911;
    --regime-risk-on: #17bb18;
    --regime-risk-on-dark: #149414;
    --regime-neutrale: #e7c027;
    --regime-neutrale-dark: #d4af1f;
    --regime-cautela: #e07b1f;
    --regime-cautela-dark: #d4921f;
    --regime-risk-off: #cd1919;
    --regime-risk-off-dark: #b81616;
    --regime-stress: #b0191e;
    --regime-stress-dark: #9a1519;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--aimon-light);
    margin: 0;
    padding: 0;
}

/* ===== LAYOUT A 3 COLONNE ===== */
.aimon-sidebar {
    background: white;
    border-right: 1px solid var(--aimon-border);
    height: calc(100vh - 73px);
    width: var(--sidebar-width);
    position: fixed;
    left: 0;
    top: 73px;
    overflow-y: auto;
    padding: 1rem 0;
    box-shadow: 1px 0 3px rgba(0,0,0,0.1);
    z-index: 999;
    border-top-right-radius: 16px;
}

.sidebar-section { padding: 0 0.8rem; margin-bottom: 0.5rem; }

.sidebar-sub-items { margin-left: 0.8rem; border-left: 2px solid #e2e8f0; display: none; }
.sidebar-sub-items.show { display: block; }

.sidebar-sub-item {
    padding: 0.4rem 0.8rem;
    margin: 0.1rem 0;
    color: var(--aimon-secondary);
    text-decoration: none;
    border-radius: 0.5rem;
    font-size: 0.85rem;
    display: block;
    transition: all 0.3s;
}

.sidebar-sub-item:hover { background: #f1f5f9; color: var(--aimon-primary); text-decoration: none; }

/* FIX: margin-right base = 0, aggiunto solo con has-right-sidebar */
.aimon-main-content {
    margin-left: var(--sidebar-width);
    margin-right: 0;
    padding: 1.5rem;
    min-height: calc(100vh - 73px);
    background-color: var(--aimon-light);
    transition: margin-right 0.3s ease;
}

.aimon-main-content.has-right-sidebar {
    margin-right: 300px;
}

.aimon-right-sidebar {
    width: 300px;
    position: fixed;
    right: 0;
    top: 73px;
    height: calc(100vh - 73px);
    background: white;
    border-left: 1px solid var(--aimon-border);
    padding: 1.5rem;
    overflow-y: auto;
    box-shadow: -1px 0 3px rgba(0,0,0,0.1);
    z-index: 999;
    border-top-left-radius: 16px;
}

/* ===== CARDS ===== */
.aimon-card {
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid var(--aimon-border);
    overflow: hidden;
    overflow-x: hidden;
    margin-bottom: 1.5rem;
    transition: all 0.3s;
}

.aimon-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.15); }

/* ===== AIMON CARD BORDERED · Bordo viola sfumato emergente dall'alto =====
   Si applica solo ai box specifici (sidebar destra + 2 box bottom homepage).
   - Top centrale: filo viola sfumato che svanisce verso i lati
   - Lati sup. (arrotondati): trasparenti in cima, pieni scendendo
   - Lati sx/dx: pieni sotto l'angolo, sfumano scendendo verso il basso
   - Lato inferiore + angoli inf.: invariati (come .aimon-card base)
   Implementazione: pseudo-elemento ::before sovrapposto che disegna SOLO la
   parte alta del perimetro, con doppia maschera (lineare verticale + radiale)
   per ottenere il fade. Border-radius mantenuto identico alla card base. */
.aimon-card-bordered {
    position: relative;
}
.aimon-card-bordered::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 0.75rem;
    pointer-events: none;
    /* Disegna un rettangolo "vuoto" con bordo viola tramite box-shadow inset.
       1.2px = filo delicato, colore brand #534AB7 ammorbidito a 0.55 di alpha. */
    box-shadow: inset 0 0 0 1.2px rgba(83, 74, 183, 0.55);
    /* DOPPIA MASCHERA combinata (mask-composite: intersect):
       1) Verticale: opaco in alto, dissolve scendendo (lato sx/dx che sfumano in basso)
       2) Orizzontale: dissolve al centro-top e ai bordi orizzontali (top centrale
          sfumato che svanisce simmetricamente verso gli angoli superiori).
       Le due maschere si intersecano: il bordo è visibile solo dove ENTRAMBE
       le maschere sono opache. */
    -webkit-mask-image:
        linear-gradient(to bottom,
            rgba(0,0,0,1) 0%,
            rgba(0,0,0,1) 25%,
            rgba(0,0,0,0.35) 70%,
            rgba(0,0,0,0) 100%),
        linear-gradient(to right,
            rgba(0,0,0,0.15) 0%,
            rgba(0,0,0,1) 18%,
            rgba(0,0,0,0.6) 50%,
            rgba(0,0,0,1) 82%,
            rgba(0,0,0,0.15) 100%);
            mask-image:
        linear-gradient(to bottom,
            rgba(0,0,0,1) 0%,
            rgba(0,0,0,1) 25%,
            rgba(0,0,0,0.35) 70%,
            rgba(0,0,0,0) 100%),
        linear-gradient(to right,
            rgba(0,0,0,0.15) 0%,
            rgba(0,0,0,1) 18%,
            rgba(0,0,0,0.6) 50%,
            rgba(0,0,0,1) 82%,
            rgba(0,0,0,0.15) 100%);
    -webkit-mask-composite: source-in;
            mask-composite: intersect;
    z-index: 2;
}

/* ===== HEADER WIDGET LATERALI · Variante H (senza ombra esterna) ===== */
/* Doppio bordo sinistro viola + icona viola libera con drop-shadow, no ombra esterna */
.aimon-card-header {
    background: white;
    border-radius: 10px 10px 0 0;
    padding: 11px 14px 11px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0;
    position: relative;
    box-shadow:
        inset 3px 0 0 #534AB7,
        inset 4px 0 0 #8B7EE3;
    border: 1px solid rgba(83,74,183,0.10);
    border-left: none;
    border-bottom: 1px solid rgba(83,74,183,0.10);
}

.aimon-card-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: #3C3489;
    margin: 0;
    display: flex;
    align-items: center;
    letter-spacing: -0.1px;
    margin-left: 18px;
    flex: 1;
}

.aimon-card-title i {
    color: #534AB7;
    font-size: 1.05rem;
    margin-right: 8px;
    filter: drop-shadow(0 1.5px 2px rgba(83, 74, 183, 0.35));
    line-height: 1;
}

.aimon-card-body { padding: 0; }
.card-title-icon { width: 20px; height: 20px; object-fit: contain; }
.aimon-card-header small.text-muted { display: none !important; }

/* Link/azione a destra dell'header widget (es. "Dettagli →", "Tutte le notizie →") */
.aimon-card-header a {
    font-size: 0.72rem;
    color: #534AB7;
    text-decoration: none;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}
.aimon-card-header a:hover { text-decoration: underline; }

/* ===== MARKET OVERVIEW ===== */
.market-overview-section {
    background: white;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid var(--aimon-border);
}

/* ===== HEADER L1 COLONNA CENTRALE · Variante H (con ombra esterna) ===== */
/* Doppio bordo sinistro viola + icona viola libera con drop-shadow + ombra esterna */
.section-header-bar {
    background: white;
    border-radius: 12px;
    padding: 14px 22px 14px 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0;
    position: relative;
    box-shadow:
        inset 4px 0 0 #534AB7,
        inset 5px 0 0 #8B7EE3,
        0 1px 3px rgba(0,0,0,0.04),
        0 8px 24px rgba(83,74,183,0.08);
    border: 1px solid rgba(83,74,183,0.10);
    border-left: none;
    margin-bottom: 14px;
}

/* TITOLO H2 con icona inline */
.section-title {
    color: #3C3489;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.2px;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    margin-left: 22px;
}

/* Icona viola libera con drop-shadow (no box di sfondo) */
.section-title i {
    color: #534AB7;
    font-size: 1.4rem;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 3px rgba(83, 74, 183, 0.35));
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    margin: 0;
}

/* Divider verticale sottile tra titolo e subtitle */
.section-divider {
    width: 1px;
    height: 16px;
    background: rgba(83,74,183,0.25);
    flex-shrink: 0;
    margin: 0 14px;
}

/* Sottotitolo grigio inline */
.section-subtitle {
    color: #5F5E5A;
    font-size: 0.82rem;
    font-weight: 500;
    margin: 0;
    padding: 0;
    border: none;
    flex: 1;
    line-height: 1.3;
}

/* Area destra (es. category label di Market Overview) */
.section-header-extra {
    margin-left: auto;
    padding-right: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* ===== Override specifici legacy ===== */
/* Tutti gli header L1 usano lo stesso stile: rimuoviamo eventuali override */
.section-header-bar.market-overview-header,
.section-header-bar.regime-header,
.section-header-bar.liquidity-header {
    background: white;
    border: 1px solid rgba(83,74,183,0.10);
    border-left: none;
    padding: 14px 22px 14px 0;
    min-height: 0;
    overflow: visible;
}

.regime-header { margin-bottom: 14px; }
.liquidity-header { margin-bottom: 14px; }

/* Carousel category label nell'header Market Overview · stile coerente */
.section-header-extra .carousel-category-label {
    display: flex;
    align-items: center;
    gap: 6px;
    background: white;
    padding: 4px 10px;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    box-shadow: none;
}

.carousel-indicators-container { display: flex; align-items: center; gap: 8px; }

/* Category badge dentro section-header-extra (area destra header L1) */
.section-header-extra .category-badge {
    background: rgba(115, 93, 225, 0.1);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.section-header-extra .category-badge.active {
    border-color: var(--aimon-primary);
    box-shadow: 0 2px 8px rgba(115, 93, 225, 0.25);
}

.section-header-extra .category-badge .category-icon {
    filter: none;
    opacity: 0.9;
}

.section-header-extra .category-badge .category-text {
    color: #5b4cba;
}

.carousel-category-label {
    display: flex;
    align-items: center;
    gap: 6px;
    background: white;
    padding: 4px 10px;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
}

.category-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(115, 93, 225, 0.1);
    padding: 3px 8px;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.category-badge .category-icon { width: 16px; height: 16px; opacity: 0.9; }
.category-badge .category-icon-emoji { font-size: 12px; line-height: 1; }
.category-badge .category-text { font-size: 0.65rem; font-weight: 600; color: #5b4cba; white-space: nowrap; }
.category-separator { color: rgba(115, 93, 225, 0.4); font-size: 0.5rem; }

/* ===== FRECCE NAVIGAZIONE CAROUSEL ===== */
.carousel-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(115, 93, 225, 0.1);
    border: 1px solid rgba(115, 93, 225, 0.3);
    color: #735de1;
    font-size: 1.2rem;
    font-weight: 300;
    cursor: pointer;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    opacity: 0.6;
    line-height: 1;
    padding: 0;
    padding-bottom: 2px;
}

.carousel-nav-btn:hover {
    background: rgba(115, 93, 225, 0.2);
    border-color: #735de1;
    opacity: 1;
}

.carousel-prev { left: -14px; }
.carousel-next { right: -14px; }

/* ===== GROUP LABELS ===== */
.market-carousel-wrapper {
    position: relative;
    overflow: visible;
    padding: 0 20px;
}

.group-labels-container {
    display: flex;
    position: relative;
    height: 20px;
    margin-bottom: 4px;
    overflow: hidden;
}

.group-label {
    position: absolute;
    font-size: 0.65rem;
    font-weight: 600;
    color: #64748b;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 4px;
}

.group-label::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #735de1;
}

.group-label-line {
    position: absolute;
    top: 18px;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, #c4b5fd 10%, #c4b5fd 90%, transparent 100%);
}

.market-grid-container {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 12px;
    padding: 4px 0;
    opacity: 1;
    transition: opacity var(--carousel-transition) ease-in-out;
    width: 100%;
}

.market-grid-container.fade-out { opacity: 0; }

/* ===== TICKER BOX ===== */
.market-ticker-box {
    background: #fafbfc;
    border: 2px solid #d0d4d8;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    aspect-ratio: 1.8 / 1;
    width: 100%;
    min-width: 0;
    max-width: none;
    position: relative;
}

.market-ticker-box:hover {
    border-color: var(--aimon-primary);
    box-shadow: 0 4px 12px rgba(115, 93, 225, 0.2);
    transform: translateY(-2px);
    z-index: 10;
}

.market-ticker-box.updating { animation: tickerPulse 0.5s ease; }

@keyframes tickerPulse {
    0% { box-shadow: 0 0 0 0 rgba(115, 93, 225, 0.4); }
    50% { box-shadow: 0 0 0 4px rgba(115, 93, 225, 0.2); }
    100% { box-shadow: 0 0 0 0 rgba(115, 93, 225, 0); }
}

.ticker-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    height: 100%;
    width: 100%;
}

.ticker-q1 {
    background: #f0f1f3;
    padding: 2px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #e2e8f0;
    border-right: 1px solid #e2e8f0;
    border-radius: 6px 0 0 0;
    overflow: hidden;
    gap: 1px;
}

.ticker-asset-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
    border-radius: 2px;
}

.ticker-name {
    font-size: 0.65rem;
    font-weight: 700;
    color: #374151;
    text-align: center;
    line-height: 1.1;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    word-break: break-word;
    max-width: 100%;
    padding: 0;
}

.forex-pair {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    line-height: 1;
    font-size: 0.6rem;
    font-weight: 700;
    color: #374151;
    gap: 2px;
}

.forex-cur { font-size: 0.6rem; font-weight: 700; }
.forex-divider { font-size: 0.5rem; color: #9ca3af; margin: 0 1px; }

.ticker-q2 {
    padding: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid #e2e8f0;
    overflow: hidden;
}

.ticker-price {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--aimon-dark);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.ticker-price.updated { animation: priceFlash 0.5s ease; }

@keyframes priceFlash {
    0% { background-color: transparent; }
    50% { background-color: rgba(115, 93, 225, 0.15); }
    100% { background-color: transparent; }
}

.ticker-q3 {
    padding: 2px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    border-bottom: 1px solid #e2e8f0;
    border-radius: 0 6px 0 0;
    overflow: hidden;
}

.ticker-sparkline { width: 38px; height: 18px; }
.ticker-sparkline canvas { width: 38px !important; height: 18px !important; }

.ticker-7d-info { display: flex; align-items: center; gap: 2px; }
.ticker-period { font-size: 0.55rem; font-weight: 500; color: #9ca3af; }
.ticker-change-7d { font-size: 0.6rem; font-weight: 700; }
.ticker-change-7d.positive { color: #10b981; }
.ticker-change-7d.negative { color: #ef4444; }

.ticker-q4 {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0 0 6px 0;
    overflow: hidden;
    padding: 2px;
}

.ticker-change-24h {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 3px 5px;
    border-radius: 3px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.ticker-change-24h.positive { background: rgba(16, 185, 129, 0.18); color: #059669; }
.ticker-change-24h.negative { background: rgba(239, 68, 68, 0.18); color: #dc2626; }

/* ===== REGIME ENGINE ===== */
.regime-section {
    background: #ffffff;
    border-radius: 12px;
    padding: 0.7rem 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid var(--aimon-border);
}

.regime-header { margin-bottom: 0.55rem; }

.regime-main-container {
    background: white;
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    border: 1px solid #e2e8f0;
}

.regime-subsection-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    margin-bottom: 5px;
}

.regime-subsection-header .violet-bar {
    width: 5px;
    height: 18px;
    background: var(--aimon-violet, #735de1);
    border-radius: 2px;
    flex-shrink: 0;
}

.regime-subsection-title { font-size: 0.8rem; font-weight: 700; color: var(--aimon-violet, #735de1); }

.regime-subsection-description {
    font-size: 0.72rem;
    font-weight: 400;
    color: #888780;
    margin-left: 4px;
    line-height: 1.3;
}

.regime-content-row { display: flex; gap: 10px; align-items: stretch; margin-bottom: 10px; }
.geo-regions-grid { display: flex; gap: 10px; flex: 1; }

.geo-region-column {
    flex: 1;
    background: white;
    border-radius: 8px;
    padding: 8px;
    border: 1px solid #e2e8f0;
    min-width: 0;
}

.geo-region-column .link-indicator { font-size: 0.72rem; font-weight: 600; color: #94a3b8; text-align: right; margin-bottom: 3px; }
.geo-region-column .link-indicator a { color: #94a3b8; text-decoration: none; }
.geo-region-column .link-indicator a:hover { color: var(--aimon-violet, #735de1); }

.geo-region-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-bottom: 4px;
    background: #e0e3e7;
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid #d0d3d7;
}

.geo-region-header .geo-label { font-size: 0.7rem; font-weight: 700; color: #1e293b; letter-spacing: 0.5px; }
.geo-region-header .geo-flags { display: flex; gap: 3px; margin-left: 6px; }
.geo-region-header .geo-flag { width: 14px; height: 10px; object-fit: cover; border-radius: 2px; box-shadow: 0 1px 2px rgba(0,0,0,0.15); }
.geo-assets-row { display: flex; gap: 5px; }

/* ===== REGIME ASSET BOX · design pastello chiaro · 6 fasce gauge ufficiale ===== */
.regime-asset-box {
    flex: 1;
    border-radius: 8px;
    padding: 8px 9px 7px 9px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    min-height: 80px;
    position: relative;
    overflow: hidden;
    border: 1px solid;
    background: white;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
    transition: all 0.2s ease;
    gap: 3px;
}

/* Strip colorata top spessa (stesso colore del bordo via currentColor) */
.regime-asset-box::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: currentColor;
    pointer-events: none;
}

.regime-asset-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(83, 74, 183, 0.18);
}

.regime-asset-box.selected {
    box-shadow: 0 0 0 2px var(--aimon-violet, #735de1), 0 4px 12px rgba(115, 93, 225, 0.25);
}

/* =========================
   6 FASCE - colori derivati dal gauge ufficiale (immagine 9)
   Mappatura: regime label → fascia gauge
   ESPANSIONE  = Molto Forte  (#4ADE80 verde chiaro)
   RISK-ON     = Forte        (#157F3D verde scuro)
   NEUTRALE    = Neutrale     (#FBC02D giallo ambra, distinto da arancione CAUTELA)
   CAUTELA     = Cautela      (#E07B1F arancione)
   RISK-OFF    = Debole       (#CD191A rosso)
   STRESS      = Risk-Off     (#B0191E rosso scuro)
   ========================= */

.regime-asset-box.espansione {
    background: linear-gradient(180deg, #D7F8E3 0%, #F4FDF7 100%);
    border-color: #4ADE80;
    color: #4ADE80;
}
.regime-asset-box.risk-on {
    background: linear-gradient(180deg, #CCE3D4 0%, #F1F7F3 100%);
    border-color: #157F3D;
    color: #157F3D;
}
.regime-asset-box.neutrale {
    background: linear-gradient(180deg, #FEF1D1 0%, #FFFBF2 100%);
    border-color: #FBC02D;
    color: #FBC02D;
}
.regime-asset-box.cautela {
    background: linear-gradient(180deg, #FAEBCF 0%, #FEFAF2 100%);
    border-color: #E07B1F;
    color: #E07B1F;
}
.regime-asset-box.risk-off {
    background: linear-gradient(180deg, #F4CCCD 0%, #FCF1F1 100%);
    border-color: #CD191A;
    color: #CD191A;
}
.regime-asset-box.stress {
    background: linear-gradient(180deg, #EECCCE 0%, #FAF1F2 100%);
    border-color: #B0191E;
    color: #B0191E;
}

/* Override bond speciali: stesso stile delle fasce equivalenti */
.regime-asset-box.bond-cautela {
    background: linear-gradient(180deg, #FAEBCF 0%, #FEFAF2 100%);
    border-color: #E07B1F;
    color: #E07B1F;
}
.regime-asset-box.bond-exit {
    background: linear-gradient(180deg, #F4CCCD 0%, #FCF1F1 100%);
    border-color: #CD191A;
    color: #CD191A;
}

/* =========================
   Contenuto card - allineato a sinistra
   Layout: [type-label] [score+arrow] [sparkline] [regime-pill]
   ========================= */

/* Label tipo asset in alto (es. "AZIONI", "BOND") */
.regime-asset-box .asset-type-label {
    font-size: 0.62rem;
    font-weight: 700;
    color: inherit;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    line-height: 1;
    text-shadow: none;
    order: 1;
    margin-top: 2px;
}

/* Score grande (es. "62%↑") */
.regime-asset-box .asset-score {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1;
    text-shadow: none;
    order: 2;
    margin: 1px 0;
}

/* Sparkline - posizionata tra score e pill */
.regime-asset-box .asset-sparkline {
    width: 100%;
    height: 12px;
    display: block;
    order: 3;
    margin: 1px 0;
}

/* Pill di status in basso (regime label) - base */
.regime-asset-box .asset-regime-label {
    font-size: 0.55rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 9px;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    order: 4;
    align-self: flex-start;
    line-height: 1.4;
}

/* 6 fasce - colori specifici della pill (background del colore regime) */
.regime-asset-box.espansione   .asset-regime-label { background: #4ADE80; color: #0E5A26; }
.regime-asset-box.risk-on      .asset-regime-label { background: #157F3D; color: white; }
.regime-asset-box.neutrale     .asset-regime-label { background: #FBC02D; color: #5C4410; }
.regime-asset-box.cautela      .asset-regime-label { background: #E07B1F; color: white; }
.regime-asset-box.risk-off     .asset-regime-label { background: #CD191A; color: white; }
.regime-asset-box.stress       .asset-regime-label { background: #B0191E; color: white; }
.regime-asset-box.bond-cautela .asset-regime-label { background: #E07B1F; color: white; }
.regime-asset-box.bond-exit    .asset-regime-label { background: #CD191A; color: white; }

/* Colore testo (label tipo e score) scuro dello stesso tono - 6 fasce */
.regime-asset-box.espansione .asset-type-label,
.regime-asset-box.espansione .asset-score { color: #21643A; }
.regime-asset-box.risk-on .asset-type-label,
.regime-asset-box.risk-on .asset-score { color: #09391B; }
.regime-asset-box.neutrale .asset-type-label,
.regime-asset-box.neutrale .asset-score { color: #715614; }
.regime-asset-box.cautela .asset-type-label,
.regime-asset-box.cautela .asset-score { color: #684A11; }
.regime-asset-box.risk-off .asset-type-label,
.regime-asset-box.risk-off .asset-score { color: #5C0B0C; }
.regime-asset-box.stress .asset-type-label,
.regime-asset-box.stress .asset-score { color: #4F0B0D; }
.regime-asset-box.bond-cautela .asset-type-label,
.regime-asset-box.bond-cautela .asset-score { color: #684A11; }
.regime-asset-box.bond-exit .asset-type-label,
.regime-asset-box.bond-exit .asset-score { color: #5C0B0C; }

/* Icone bandiere/asset dentro card - non più con shadow, allineate a sx */
.regime-asset-box .asset-flag-icon {
    width: 14px;
    height: 10px;
    object-fit: cover;
    border-radius: 2px;
    box-shadow: none;
    order: 0;
    margin-bottom: 1px;
}

.regime-asset-box .asset-icons-row {
    display: flex;
    gap: 2px;
    order: 0;
    margin-bottom: 1px;
}

.aimon-rate-panel {
    min-width: 220px;
    max-width: 240px;
    background: #fafbfc;
    border-radius: 8px;
    padding: 12px 10px;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    transition: all 0.2s ease;
}

.aimon-rate-panel.selected { border: 3px solid var(--aimon-violet, #735de1); box-shadow: 0 0 0 2px rgba(115, 93, 225, 0.3), 0 4px 12px rgba(0,0,0,0.15); }

.aimon-rate-content { display: flex; flex-direction: column; gap: 6px; animation: regimeFadeIn 0.3s ease; }

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

.panel-title-row { display: flex; align-items: center; justify-content: center; flex-wrap: nowrap; margin-bottom: 4px; margin-top: 8px; }
.panel-title-text { font-size: 0.75rem; font-weight: 700; color: #1e293b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; }

/* ===== TITOLO BOX SOPRA AL PANNELLO AIMON RATE MARKET REGIME =====
   Pill-shape (border-radius elevato) con doppio bordo viola effetto etichetta.
   Layout su 2 righe: "AIMON RATE" sopra in bold, "MARKET REGIME" sotto in corsivo.
   Coerente con la palette brand (viola #534AB7). */
.panel-header-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: #3C3489;
    text-align: center;
    margin: 0 auto 8px auto;
    padding: 4px 24px;
    border: 1.5px solid #534AB7;
    border-radius: 999px;
    background: white;
    /* Doppio bordo: anello esterno separato dal bordo principale */
    box-shadow: 0 0 0 1.5px white, 0 0 0 2.5px rgba(83, 74, 183, 0.55);
    letter-spacing: 0.4px;
    line-height: 1.05;
    text-transform: uppercase;
    display: inline-block;
}
.panel-header-title em {
    font-style: italic;
    font-weight: 500;
    color: #534AB7;
    letter-spacing: 0.2px;
}

/* Wrapper che centra il titolo nel pannello */
.aimon-rate-content > .panel-header-title {
    align-self: center;
}
.aimon-rate-display { display: flex; align-items: center; gap: 10px; }

.aimon-rate-meta .panel-flags {
    display: flex;
    gap: 3px;
    justify-content: flex-start;
    margin-bottom: 4px;
}
.aimon-rate-meta .panel-flag {
    width: 18px;
    height: 13px;
    object-fit: cover;
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.aimon-score-circle {
    border-radius: 10px;
    width: 95px;
    height: 95px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    flex-shrink: 0;
}

/* Cerchio AImon Rate nel pannello a destra · allineato al gauge ufficiale */
.aimon-score-circle.espansione-bg { background: #4ADE80; color: #0E5A26; }
.aimon-score-circle.risk-on-bg    { background: #157F3D; color: white; }
.aimon-score-circle.neutrale-bg   { background: #FBC02D; color: #5C4410; }
.aimon-score-circle.cautela-bg    { background: #E07B1F; color: white; }
.aimon-score-circle.risk-off-bg   { background: #CD191A; color: white; }
.aimon-score-circle.stress-bg     { background: #B0191E; color: white; }
.aimon-score-circle.bond-cautela-bg { background: #E07B1F; color: white; }
.aimon-score-circle.bond-exit-bg    { background: #CD191A; color: white; }

.aimon-score-circle .score-value { font-size: 2.4rem; font-weight: 800; color: inherit; text-shadow: none; line-height: 1; }
.aimon-score-circle .score-label { font-size: 0.65rem; font-weight: 600; color: inherit; opacity: 0.9; }
.aimon-rate-meta { display: flex; flex-direction: column; gap: 5px; }

.regime-badge { padding: 5px 8px; border-radius: 6px; font-size: 0.65rem; font-weight: 700; color: white; text-align: center; white-space: nowrap; }

/* Regime badge nel pannello AImon Rate · allineato al gauge ufficiale */
.regime-badge.espansione { background: #4ADE80; color: #0E5A26; }
.regime-badge.risk-on    { background: #157F3D; color: white; }
.regime-badge.neutrale   { background: #FBC02D; color: #5C4410; }
.regime-badge.cautela    { background: #E07B1F; color: white; }
.regime-badge.risk-off   { background: #CD191A; color: white; }
.regime-badge.stress     { background: #B0191E; color: white; }
.regime-badge.bond-cautela { background: #E07B1F; color: white; }
.regime-badge.bond-exit    { background: #CD191A; color: white; }

.aimon-progress-bar { width: 70px; height: 4px; background: #e2e8f0; border-radius: 2px; overflow: hidden; }
.aimon-progress-bar .progress-fill { height: 100%; border-radius: 2px; transition: width 0.3s ease; }

/* Progress bar fill · allineata al gauge ufficiale */
.aimon-progress-bar .progress-fill.espansione { background: #4ADE80; }
.aimon-progress-bar .progress-fill.risk-on    { background: #157F3D; }
.aimon-progress-bar .progress-fill.neutrale   { background: #FBC02D; }
.aimon-progress-bar .progress-fill.cautela    { background: #E07B1F; }
.aimon-progress-bar .progress-fill.risk-off   { background: #CD191A; }
.aimon-progress-bar .progress-fill.stress     { background: #B0191E; }
.aimon-progress-bar .progress-fill.bond-cautela { background: #888780; }
.aimon-progress-bar .progress-fill.bond-exit    { background: #5F5E5A; }

.aimon-rate-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 100px;
    text-align: center;
    color: #94a3b8;
    font-size: 0.75rem;
}

.aimon-rate-placeholder strong { color: var(--aimon-violet, #735de1); }

.regime-info-row { display: flex; gap: 10px; }

.regime-motivations-box {
    flex: 1;
    background: #f1f4f9;
    border-radius: 8px;
    padding: 0;
    border-left: 3px solid var(--aimon-violet, #735de1);
    overflow: hidden;
}

.regime-factors-box { flex: 1; background: #f1f4f9; border-radius: 8px; padding: 0; overflow: hidden; }

.regime-info-title {
    font-size: 0.7rem;
    font-weight: 800;
    color: #1e293b;
    margin: 0;
    padding: 8px 12px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    background: #e0e3e7;
}

.regime-motivations-box p {
    font-size: 0.78rem;
    color: #374151;
    line-height: 1.5;
    margin: 0;
    padding: 10px 12px;
}
.regime-motivations-box p strong { font-weight: 700; color: #1e293b; }

.regime-factors-box ul {
    margin: 0;
    padding: 10px 12px;
    font-size: 0.75rem;
    color: #374151;
    line-height: 1.45;
    list-style: none;
    columns: 2;
    column-gap: 16px;
}

.regime-factors-box li {
    margin-bottom: 3px;
    padding: 3px 6px 3px 14px;
    position: relative;
    break-inside: avoid;
    border-radius: 3px;
    transition: transform 0.2s ease, background 0.2s ease;
}
.regime-factors-box li::before { content: "\2022"; position: absolute; left: 0; color: var(--aimon-violet, #735de1); font-weight: bold; font-size: 0.8rem; }
.regime-factors-box li strong { font-weight: 700; color: var(--aimon-violet, #735de1); }

.regime-motivations-box p,
.regime-factors-box ul { animation: contentFadeIn 0.4s ease; }

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

.global-categories-grid { display: flex; gap: 10px; flex: 1; }
.global-category-column { background: white; border-radius: 8px; padding: 8px; border: 1px solid #e2e8f0; min-width: 0; }
.global-category-column.crypto-col { min-width: 85px; flex: 0 0 auto; }
.global-category-column.crypto-col .global-assets-row { align-items: flex-start; }
.global-category-column.crypto-col .regime-asset-box { flex: none; }
.global-category-column.commodities-col { flex: 1; }
.global-category-column.forex-col { flex: 1.5; }
.global-category-column .link-indicator { font-size: 0.72rem; font-weight: 600; color: #94a3b8; text-align: right; margin-bottom: 3px; }
.global-category-column .link-indicator a { color: #94a3b8; text-decoration: none; }
.global-category-column .link-indicator a:hover { color: var(--aimon-violet, #735de1); }

.global-category-header {
    background: #e0e3e7;
    padding: 5px 8px;
    border-radius: 4px;
    border: 1px solid #d0d3d7;
    margin-bottom: 6px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.global-category-header .category-label { font-size: 0.65rem; font-weight: 700; color: #1e293b; letter-spacing: 0.5px; }
.global-category-header .category-icon { width: 14px; height: 14px; object-fit: contain; }
.global-assets-row { display: flex; gap: 5px; }

/* ===== LIQUIDITY FLOW MONITOR WIDGET ===== */
/* V13.1: layout orizzontale compatto, 3 sezioni con bordo, context row sottile */

.liquidity-section {
    background: white;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid var(--aimon-border);
}

.liquidity-header { margin-bottom: 0.8rem; }

.liq-details-link {
    display: flex;
    align-items: center;
    gap: 3px;
    color: #534AB7;
    text-decoration: none;
    font-size: 0.72rem;
    font-weight: 600;
    transition: color 0.2s;
}

.liq-details-link:hover { color: #3C3489; text-decoration: underline; }

.liq-widget-content {
    display: flex;
    flex-direction: column;
    gap: 0;
    animation: regimeFadeIn 0.4s ease;
}

.liq-columns-row {
    display: flex;
    gap: 0;
    align-items: stretch;
}

.liq-gauge-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 260px;
    min-width: 240px;
    flex-shrink: 0;
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-right: 8px;
    background: #fafbfc;
}

.liq-gauge-label {
    color: #64748b;
    font-size: 0.7rem;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    margin-bottom: 1px;
    text-align: center;
    font-weight: 600;
}

.liq-gauge-svg { display: block; }

.liq-regime-badge {
    padding: 3px 10px;
    border-radius: 4px;
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.7px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    text-align: center;
    margin-top: 2px;
}

.liq-regime-badge.espansione { background: linear-gradient(135deg, var(--regime-espansione), var(--regime-espansione-dark)); }
.liq-regime-badge.risk-on { background: linear-gradient(135deg, var(--regime-risk-on), var(--regime-risk-on-dark)); }
.liq-regime-badge.neutrale { background: linear-gradient(135deg, var(--regime-neutrale), var(--regime-neutrale-dark)); color: #1e293b; }
.liq-regime-badge.cautela { background: linear-gradient(135deg, var(--regime-cautela), var(--regime-cautela-dark)); color: #1e293b; }
.liq-regime-badge.risk-off { background: linear-gradient(135deg, var(--regime-risk-off), var(--regime-risk-off-dark)); }
.liq-regime-badge.stress { background: linear-gradient(135deg, var(--regime-stress), var(--regime-stress-dark)); }

.liq-trend-row {
    display: flex;
    align-items: center;
    gap: 3px;
    margin-top: 3px;
}

.liq-trend-icon { font-size: 0.65rem; }
.liq-trend-icon.positive { color: #10b981; }
.liq-trend-icon.negative { color: #ef4444; }

.liq-trend-value { font-size: 0.7rem; font-weight: 600; }
.liq-trend-value.positive { color: #10b981; }
.liq-trend-value.negative { color: #ef4444; }

.liq-trend-period { color: #64748b; font-size: 0.65rem; }

.liq-gauge-footer {
    color: #64748b;
    font-size: 0.7rem;
    font-weight: 500;
    margin-top: 6px;
    text-align: center;
    line-height: 1.3;
}

.liq-flows-area {
    flex: 1;
    min-width: 240px;
    padding: 8px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-right: 8px;
    background: #fafbfc;
}

.liq-flows-label {
    color: #64748b;
    font-size: 0.7rem;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    display: block;
    margin-bottom: 2px;
    font-weight: 600;
}

.liq-flows-grid {
    display: flex;
    gap: 2px;
}

.liq-flows-column { flex: 1; }

.liq-flow-row {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 1px 0;
}

.liq-flow-from {
    font-size: 0.75rem;
    width: 74px;
    text-align: right;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.liq-flow-from.bold { font-weight: 600; }

.liq-flow-to {
    font-size: 0.75rem;
    width: 90px;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.liq-flow-to.bold { font-weight: 600; }

.liq-flow-arrow { display: flex; align-items: center; }

.liq-flows-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 8px;
    margin-top: 3px;
    padding-top: 3px;
    border-top: 1px solid #e8eaed;
}

.liq-legend-item {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
}

.liq-legend-text { color: #64748b; font-size: 0.58rem; white-space: nowrap; }

.liq-summary-area {
    width: 220px;
    min-width: 200px;
    flex-shrink: 0;
    padding: 8px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fafbfc;
}

.liq-summary-label {
    color: #64748b;
    font-size: 0.7rem;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    display: block;
    margin-bottom: 2px;
    font-weight: 600;
}

.liq-summary-text {
    color: #475569;
    font-size: 0.75rem;
    line-height: 1.4;
    margin: 0;
}

.liq-summary-footer {
    margin-top: 3px;
    display: flex;
    align-items: center;
    gap: 3px;
}

.liq-summary-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #735de1;
}

.liq-summary-note { color: #94a3b8; font-size: 0.6rem; }

.liq-context-text {
    color: #64748b;
    font-size: 0.68rem;
    line-height: 1.35;
    margin: 6px 0 0 0;
    text-align: center;
    font-style: italic;
}

/* ===== TOP ASSETS SECTION ===== */
.top-assets-section { margin-top: 1.5rem; }

.assets-table-header {
    background: #f8fafc;
    border-bottom: 1px solid var(--aimon-border);
    padding: 0.5rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.assets-header-row {
    display: flex;
    align-items: center;
    font-weight: 600;
    color: var(--aimon-dark);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    flex: 1;
}

.assets-header-row-with-rank {
    display: flex;
    align-items: center;
    font-weight: 600;
    color: var(--aimon-dark);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    flex: 1;
}

.assets-col-name { flex: 2.5; text-align: left; }
.assets-col-aimon { flex: 1.5; text-align: center; }
.assets-col-price { flex: 1.5; text-align: right; }
.assets-col-rank { flex: 0.5; text-align: center; min-width: 24px; }
.assets-col-name-smaller { flex: 2.2; text-align: left; }
.assets-col-aimon-smaller { flex: 1.4; text-align: center; }
.assets-col-price-smaller { flex: 1.4; text-align: right; }

.assets-table-body { padding: 0; overflow-x: hidden; }

.aimon-asset-item {
    display: flex;
    align-items: center;
    padding: 0.6rem 1rem;
    border-bottom: 1px solid #f8fafc;
    transition: all 0.2s;
    min-height: 50px;
    position: relative;
    overflow: visible;
}

.aimon-asset-item:hover { background: #f8fafc; }
.aimon-asset-item:last-child { border-bottom: none; }

.asset-rank-col { flex: 0 0 24px; display: flex; justify-content: center; align-items: center; position: relative; overflow: visible; padding-right: 0 !important; }
.rank-number { font-weight: 600; color: #6b7280; font-size: 0.75rem; text-align: center; }

.asset-name-col-smaller { flex: 1; display: flex; flex-direction: column; align-items: flex-start; min-width: 0; position: relative; padding-left: 4px; z-index: 1; }
.asset-aimon-col-smaller { flex: 0 0 90px; display: flex; justify-content: center; align-items: center; z-index: 1; }
.asset-price-col-smaller { flex: 0 0 80px; display: flex; flex-direction: column; align-items: flex-end; text-align: right; z-index: 1; }
.aimon-asset-name { font-weight: 500; color: var(--aimon-dark); font-size: 0.85rem; line-height: 1.2; margin: 0; display: flex; align-items: center; }
.compact-asset-symbol { font-size: 0.7rem; color: var(--aimon-secondary); margin-top: 1px; }
.aimon-asset-price { font-weight: 600; color: var(--aimon-dark); font-size: 0.85rem; margin: 0; line-height: 1.2; }
.aimon-asset-change { font-size: 0.7rem; padding: 0.1rem 0.4rem; border-radius: 0.25rem; font-weight: 500; margin-top: 1px; }
.aimon-positive { background: #dcfce7; color: #166534; }
.aimon-negative { background: #fecaca; color: #991b1b; }
.asset-icon { width: 16px; height: 16px; margin-right: 8px; vertical-align: middle; border-radius: 2px; object-fit: cover; }

.asset-icon-fallback {
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 8px;
    text-align: center;
    line-height: 16px;
    font-size: 10px;
    font-weight: bold;
    border-radius: 2px;
    vertical-align: middle;
}

/* ===== AIMON RATE BADGES ===== */
.aimon-rate-badge { padding: 0.25rem 0.5rem; border-radius: 0.375rem; font-size: 0.75rem; font-weight: 600; white-space: nowrap; }
.aimon-rate-very-poor { background: linear-gradient(135deg, #7f1d1d, #991b1b); color: white; }
.aimon-rate-poor { background: linear-gradient(135deg, #991b1b, #dc2626); color: white; }
.aimon-rate-below { background: linear-gradient(135deg, #c2410c, #ea580c); color: white; }
.aimon-rate-average { background: linear-gradient(135deg, #ca8a04, #eab308); color: white; }
.aimon-rate-good { background: linear-gradient(135deg, #15803d, #22c55e); color: white; }
.aimon-rate-excellent { background: linear-gradient(135deg, #047857, #10b981); color: white; }

/* ===== LOADING STATES ===== */
.loading-placeholder { display: flex; align-items: center; justify-content: center; padding: 2rem; color: var(--aimon-secondary); }

.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--aimon-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 0.5rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== DROPDOWN MENU ===== */
.dropdown-menu {
    border: 1px solid var(--aimon-border);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border-radius: 0.5rem;
    animation: dropdownFadeIn 0.2s ease-out;
    min-width: 200px;
}

@keyframes dropdownFadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.dropdown-item { transition: all 0.2s; font-size: 0.85rem; }
.dropdown-item:hover { background-color: #f1f5f9; color: var(--aimon-primary); transform: translateX(4px); }
.dropdown-header { font-weight: 600; color: var(--aimon-primary); font-size: 0.8rem; }

/* ===== BOOTSTRAP OVERRIDES ===== */
.bg-success { background-color: var(--aimon-success) !important; color: white !important; }
.bg-info { background-color: #ebebeb !important; color: #000000 !important; border: 1px solid #d0d0d0; }
.bg-warning { background-color: var(--aimon-warning) !important; color: white !important; }
.bg-danger { background-color: var(--aimon-danger) !important; color: white !important; }
.bg-primary { background-color: var(--aimon-primary) !important; color: white !important; }
.text-success { color: var(--aimon-success) !important; }
.text-danger { color: var(--aimon-danger) !important; }
.text-warning { color: var(--aimon-warning) !important; }
.text-muted { color: var(--aimon-secondary) !important; }
.text-primary { color: var(--aimon-primary) !important; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1400px) {
    .market-grid-container { grid-template-columns: repeat(4, 1fr); }
    .aimon-rate-panel { min-width: 200px; max-width: 220px; }
    .aimon-score-circle { width: 70px; height: 70px; }
    .aimon-score-circle .score-value { font-size: 1.6rem; }
    .carousel-nav-btn { display: none; }
    .market-carousel-wrapper { padding: 0; }
    .liq-summary-area { width: 180px; min-width: 170px; }
    .liq-legend-text { font-size: 0.55rem; }
    .liq-flows-legend { gap: 5px; }
    .liq-gauge-area { width: 220px; min-width: 200px; }
}

@media (max-width: 1200px) {
    .market-grid-container { grid-template-columns: repeat(4, 1fr); }
    .regime-content-row { flex-direction: column; }
    .aimon-rate-panel { min-width: 100%; max-width: 100%; flex-direction: row; align-items: center; justify-content: center; }
    .aimon-rate-content { flex-direction: row; align-items: center; gap: 20px; }
    .geo-regions-grid, .global-categories-grid { flex-wrap: wrap; }
    .geo-region-column { min-width: calc(50% - 5px); flex: 1 1 calc(50% - 5px); }
    .global-category-column.crypto-col { min-width: calc(33% - 7px); }
    .regime-factors-box ul { columns: 1; }
    .section-header-bar { flex-wrap: wrap; }
    .section-header-extra { margin-left: 22px; margin-top: 4px; }
    /* Liquidity responsive 1200 */
    .liq-columns-row { flex-wrap: wrap; }
    .liq-gauge-area {
        flex-direction: row;
        gap: 12px;
        width: 100%;
        min-width: 100%;
        justify-content: center;
        margin-right: 0;
        margin-bottom: 8px;
    }
    .liq-flows-area { min-width: 100%; margin-right: 0; margin-bottom: 8px; }
    .liq-summary-area { width: 100%; min-width: 100%; }
    .liq-flows-legend { flex-wrap: wrap; gap: 6px 10px; }
    /* has-right-sidebar responsive 1200 */
    .aimon-main-content.has-right-sidebar { margin-right: 0; }
    .aimon-right-sidebar { display: none; }
}

@media (max-width: 992px) {
    .aimon-main-content { margin-right: 0; }
    .aimon-main-content.has-right-sidebar { margin-right: 0; }
    .aimon-right-sidebar { display: none; }
    .market-grid-container { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 768px) {
    .aimon-sidebar { transform: translateX(-100%); z-index: 1050; }
    .aimon-main-content { margin-left: 0; margin-right: 0; padding: 1rem; }
    .aimon-main-content.has-right-sidebar { margin-right: 0; }
    .aimon-right-sidebar { display: none; }
    .market-grid-container { grid-template-columns: repeat(2, 1fr); }
    .regime-info-row { flex-direction: column; }
    .regime-subsection-header { flex-wrap: wrap; }
    .regime-subsection-description { width: 100%; margin-left: 0; }
    .geo-region-column, .global-category-column, .global-category-column.crypto-col,
    .global-category-column.commodities-col, .global-category-column.forex-col { min-width: 100%; flex: 1 1 100%; }
    .aimon-rate-content { flex-direction: column; }
    .regime-motivations-box p { font-size: 0.75rem; }
    .regime-factors-box ul { font-size: 0.7rem; columns: 1; }
    .section-header-extra .carousel-category-label { display: none; }
    .group-labels-container { display: none; }
    /* Liquidity responsive 768 */
    .liq-columns-row { flex-direction: column; gap: 8px; }
    .liq-gauge-area { width: 100%; min-width: 100%; margin-right: 0; }
    .liq-flows-area { min-width: 100%; margin-right: 0; }
    .liq-flows-grid { flex-direction: column; gap: 0; }
    .liq-summary-area { width: 100%; min-width: 100%; }
    .liq-flows-legend { flex-wrap: wrap; gap: 4px 8px; }
}

@media (max-width: 576px) {
    .market-grid-container { grid-template-columns: repeat(2, 1fr); }
    .ticker-name, .forex-pair { font-size: 0.55rem; }
    .ticker-price { font-size: 0.7rem; }
    .ticker-sparkline { width: 34px; height: 16px; }
    .ticker-sparkline canvas { width: 34px !important; height: 16px !important; }
    .section-subtitle { display: none; }
    .ticker-asset-icon { width: 12px; height: 12px; }
    /* Liquidity responsive 576 */
    .liq-flow-from { font-size: 0.65rem; width: 60px; }
    .liq-flow-to { font-size: 0.65rem; width: 72px; }
}

/* === AIMON-PATCH-REGIME-UNIFIED-V5: do not duplicate === */
/* ------------------------------------------------------------
   AImon Rate Â· Market Regime layout unificato Â· Step 7 finale
   Applicato il 20260601_162115
   ------------------------------------------------------------ */

.regime-unified-container {
  background: white;
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  border: 1px solid #e2e8f0;
}

.regime-unified-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 12px;
  align-items: stretch;
  margin-bottom: 10px;
}

.regime-left-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

/* Detail panel unificato: bordo viola spesso + alone (come mini-card selezionata) */
html body .aimon-rate-panel-unified {
  min-width: 0 !important;
  max-width: none !important;
  background: white !important;
  border: 2.5px solid var(--violet-strong, #534AB7) !important;
  border-radius: 12px !important;
  padding: 18px 14px 16px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  box-shadow: 0 0 0 2px rgba(83,74,183,0.18), 0 6px 18px rgba(83,74,183,0.18) !important;
}

/* Testo introduttivo Â· italic violet Â· in alto, staccato */
html body .aimon-rate-panel-unified .detail-intro {
  font-size: 10px;
  font-style: italic;
  color: var(--violet-strong, #534AB7);
  text-align: center;
  line-height: 1.4;
  padding: 0 2px;
  font-weight: 500;
  margin-bottom: 8px;
}

/* Wrapper contenuto interno (titolo pill, score box, status, bar, asset row) centrato */
html body .aimon-rate-panel-unified .detail-content-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
}

/* Placeholder: anche lui centrato, con detail-intro in alto */
html body .aimon-rate-panel-unified .aimon-rate-placeholder {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
}
html body .aimon-rate-panel-unified .aimon-rate-placeholder p {
  font-size: 0.78rem;
  color: #94a3b8;
  line-height: 1.5;
}

/* Title pill: staccato dal score box */
html body .aimon-rate-panel-unified .panel-header-title {
  margin: 0 0 6px 0 !important;
}

/* Score box: sfumato (NON piu pieno) Â· gradient pastello Â· bordo colorato Â· numero scuro */
html body .aimon-rate-panel-unified .aimon-score-circle {
  width: 100% !important;
  height: auto !important;
  min-height: 80px !important;
  border-radius: 10px !important;
  padding: 10px 18px 12px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05) !important;
  border: 1.5px solid !important;
  background: white !important;
}
html body .aimon-rate-panel-unified .aimon-score-circle .score-value {
  font-size: 2.6rem !important;
  font-weight: 900 !important;
  letter-spacing: -1.5px !important;
  line-height: 1 !important;
  text-shadow: none !important;
}
html body .aimon-rate-panel-unified .aimon-score-circle .score-label {
  font-size: 0.65rem !important;
  font-weight: 600 !important;
  margin-top: 2px !important;
  text-shadow: none !important;
}

/* Score box Â· 6 fasce + 2 bond defensive Â· pastello + bordo */
html body .aimon-rate-panel-unified .aimon-score-circle.espansione-bg { background: linear-gradient(180deg, var(--rate-espansione-bg-top) 0%, var(--rate-espansione-bg-bot) 50%, #FFFFFF 100%) !important; border-color: var(--rate-espansione) !important; }
html body .aimon-rate-panel-unified .aimon-score-circle.espansione-bg .score-value,
html body .aimon-rate-panel-unified .aimon-score-circle.espansione-bg .score-label { color: var(--rate-espansione-dark) !important; }

html body .aimon-rate-panel-unified .aimon-score-circle.risk-on-bg { background: linear-gradient(180deg, var(--rate-risk-on-bg-top) 0%, var(--rate-risk-on-bg-bot) 50%, #FFFFFF 100%) !important; border-color: var(--rate-risk-on) !important; }
html body .aimon-rate-panel-unified .aimon-score-circle.risk-on-bg .score-value,
html body .aimon-rate-panel-unified .aimon-score-circle.risk-on-bg .score-label { color: var(--rate-risk-on-dark) !important; }

html body .aimon-rate-panel-unified .aimon-score-circle.neutrale-bg { background: linear-gradient(180deg, var(--rate-neutrale-bg-top) 0%, var(--rate-neutrale-bg-bot) 50%, #FFFFFF 100%) !important; border-color: var(--rate-neutrale) !important; }
html body .aimon-rate-panel-unified .aimon-score-circle.neutrale-bg .score-value,
html body .aimon-rate-panel-unified .aimon-score-circle.neutrale-bg .score-label { color: var(--rate-neutrale-dark) !important; }

html body .aimon-rate-panel-unified .aimon-score-circle.cautela-bg { background: linear-gradient(180deg, var(--rate-cautela-bg-top) 0%, var(--rate-cautela-bg-bot) 50%, #FFFFFF 100%) !important; border-color: var(--rate-cautela) !important; }
html body .aimon-rate-panel-unified .aimon-score-circle.cautela-bg .score-value,
html body .aimon-rate-panel-unified .aimon-score-circle.cautela-bg .score-label { color: var(--rate-cautela-dark) !important; }

html body .aimon-rate-panel-unified .aimon-score-circle.risk-off-bg { background: linear-gradient(180deg, var(--rate-risk-off-bg-top) 0%, var(--rate-risk-off-bg-bot) 50%, #FFFFFF 100%) !important; border-color: var(--rate-risk-off) !important; }
html body .aimon-rate-panel-unified .aimon-score-circle.risk-off-bg .score-value,
html body .aimon-rate-panel-unified .aimon-score-circle.risk-off-bg .score-label { color: var(--rate-risk-off-dark) !important; }

html body .aimon-rate-panel-unified .aimon-score-circle.stress-bg { background: linear-gradient(180deg, var(--rate-stress-bg-top) 0%, var(--rate-stress-bg-bot) 50%, #FFFFFF 100%) !important; border-color: var(--rate-stress) !important; }
html body .aimon-rate-panel-unified .aimon-score-circle.stress-bg .score-value,
html body .aimon-rate-panel-unified .aimon-score-circle.stress-bg .score-label { color: var(--rate-stress-dark) !important; }

html body .aimon-rate-panel-unified .aimon-score-circle.bond-cautela-bg { background: linear-gradient(180deg, var(--bond-cautela-bg-top) 0%, var(--bond-cautela-bg-bot) 50%, #FFFFFF 100%) !important; border-color: var(--bond-cautela-border) !important; }
html body .aimon-rate-panel-unified .aimon-score-circle.bond-cautela-bg .score-value,
html body .aimon-rate-panel-unified .aimon-score-circle.bond-cautela-bg .score-label { color: var(--bond-cautela-dark) !important; }

html body .aimon-rate-panel-unified .aimon-score-circle.bond-exit-bg { background: linear-gradient(180deg, var(--bond-exit-bg-top) 0%, var(--bond-exit-bg-bot) 50%, #FFFFFF 100%) !important; border-color: var(--bond-exit-border, #444441) !important; }
html body .aimon-rate-panel-unified .aimon-score-circle.bond-exit-bg .score-value,
html body .aimon-rate-panel-unified .aimon-score-circle.bond-exit-bg .score-label { color: var(--bond-exit-dark) !important; }

/* Progress bar full width */
html body .aimon-rate-panel-unified .aimon-progress-bar {
  width: 100% !important;
  height: 5px !important;
  background: rgba(0,0,0,0.06) !important;
  border-radius: 3px !important;
  overflow: hidden !important;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.08) !important;
}
html body .aimon-rate-panel-unified .progress-fill {
  height: 100% !important;
  border-radius: 3px !important;
  transition: width 0.4s ease !important;
}

/* Asset row con bandiera affiancata */
html body .aimon-rate-panel-unified .panel-asset-row {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  justify-content: center !important;
  flex-wrap: wrap !important;
  width: 100% !important;
}
html body .aimon-rate-panel-unified .panel-asset-row .panel-title-text {
  font-size: 0.78rem !important;
  font-weight: 700 !important;
  color: #1e293b !important;
  white-space: normal !important;
  text-align: center !important;
}
html body .aimon-rate-panel-unified .panel-asset-row .panel-flags {
  display: flex !important;
  gap: 3px !important;
  margin: 0 !important;
}
html body .aimon-rate-panel-unified .panel-asset-row .panel-flag {
  width: 22px !important;
  height: 15px !important;
  object-fit: cover !important;
  border-radius: 2px !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2) !important;
}

/* Override: aimon-rate-display non piu usato come flex orizzontale */
html body .aimon-rate-panel-unified .aimon-rate-content {
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
  height: 100% !important;
  align-items: center !important;
  gap: 0 !important;
}

/* Responsive: su schermo piu stretto, layout in colonna */
@media (max-width: 1024px) {
  html body .regime-unified-layout {
    grid-template-columns: 1fr;
  }
}
/* === /AIMON-PATCH-REGIME-UNIFIED-V5 === */

/* === AIMON-PATCH-REGIME-UNIFIED-V51: do not duplicate === */
/* ------------------------------------------------------------
   AImon Rate Â· Market Regime Â· aggiustamenti grafici v5.1
   Applicato il 20260601_163626

   - Detail panel piu stretto (240px) per dare piu spazio alle card
   - Detail panel allineato in cima alla 1a riga di card (NON al subhead)
   - Pill AIMON RATE a meta strada tra intro text e score box
   ------------------------------------------------------------ */

/* 1) Layout grid: colonna destra piu stretta */
html body .regime-unified-layout {
  grid-template-columns: 1fr 240px !important;
  align-items: start !important;
}

/* 2) Detail panel allineato in cima alla prima riga delle card
      Il subhead Geographic e alto circa 28px (incl. margin),
      e ha gap di 10px verso la riga geo-regions-grid sotto.
      Quindi spostiamo il panel giu di ~36px per allinearlo. */
html body .aimon-rate-panel-unified {
  margin-top: 36px !important;
  padding: 14px 12px 14px !important;
}

/* 3) Pill AIMON RATE / MARKET REGIME a meta strada tra intro e score
      Aggiungo margin-top per spaziarlo dal testo intro,
      mantenendo lo spazio sotto verso lo score */
html body .aimon-rate-panel-unified .detail-content-wrap {
  gap: 8px !important;
}

html body .aimon-rate-panel-unified .panel-header-title {
  margin: 12px 0 8px 0 !important;
}

/* 4) Intro text: ridotto padding sotto */
html body .aimon-rate-panel-unified .detail-intro {
  margin-bottom: 0 !important;
  padding: 0 !important;
}

/* 5) Score box leggermente piu piccolo per il panel piu stretto */
html body .aimon-rate-panel-unified .aimon-score-circle {
  padding: 8px 14px 10px !important;
  min-height: 70px !important;
}
html body .aimon-rate-panel-unified .aimon-score-circle .score-value {
  font-size: 2.3rem !important;
}
/* === /AIMON-PATCH-REGIME-UNIFIED-V51 === */

/* === AIMON-PATCH-REGIME-UNIFIED-V52: do not duplicate === */
/* ------------------------------------------------------------
   AImon Rate Â· Fix bordo viola mini-card .selected Â· v5.2
   Applicato il 20260601_191515

   Le regole .regime-asset-box.cautela / .neutrale / etc. fissano
   border-color del colore della fascia con specificita 0,2,0 e
   vengono caricate DOPO la regola .selected. Forziamo il viola
   con selettore html body (specificita 0,2,2) e !important su
   border-color, border-width, box-shadow.
   ------------------------------------------------------------ */

html body .regime-asset-box.selected {
  border-color: var(--violet-strong, #534AB7) !important;
  border-width: 2.5px !important;
  border-style: solid !important;
  box-shadow:
    0 0 0 2px rgba(83, 74, 183, 0.18),
    0 6px 18px rgba(83, 74, 183, 0.18) !important;
}

/* Override anche per ogni fascia specifica, per evitare prevalenze inattese */
html body .regime-asset-box.selected.espansione,
html body .regime-asset-box.selected.risk-on,
html body .regime-asset-box.selected.neutrale,
html body .regime-asset-box.selected.cautela,
html body .regime-asset-box.selected.risk-off,
html body .regime-asset-box.selected.stress,
html body .regime-asset-box.selected.bond-cautela,
html body .regime-asset-box.selected.bond-exit {
  border-color: var(--violet-strong, #534AB7) !important;
  border-width: 2.5px !important;
}
/* === /AIMON-PATCH-REGIME-UNIFIED-V52 === */

/* === AIMON-PATCH-PILL-V8: do not duplicate === */
/* ------------------------------------------------------------
   AImon Rate Pill - design V4c-3 Animated Shimmer + V3 Deepest Bold
   Selettore: .panel-header-title
   ------------------------------------------------------------ */
html body .panel-header-title {
    background: linear-gradient(135deg, #ffffff 0%, #EEEDFE 50%, #E0DEFA 100%) !important;
    box-shadow: 0 3px 10px rgba(83, 74, 183, 0.14) !important;
    border: 1.5px solid #534AB7 !important;
    color: #3C3489 !important;
    font-weight: 900 !important;
    letter-spacing: 0.3px !important;
    position: relative !important;
    overflow: hidden !important;
}

/* Shimmer sweep animato */
html body .panel-header-title::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: -75% !important;
    width: 50% !important;
    height: 100% !important;
    background: linear-gradient(110deg,
        transparent 0%,
        rgba(255, 255, 255, 0.7) 50%,
        transparent 100%) !important;
    animation: aimonPillShimmer 4.5s ease-in-out infinite !important;
    pointer-events: none !important;
    z-index: 1 !important;
}

/* Highlight superiore (effetto luce) */
html body .panel-header-title::after {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 45% !important;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.40), transparent) !important;
    pointer-events: none !important;
    z-index: 1 !important;
    border-radius: inherit !important;
}

/* Testo sopra agli pseudo-elementi */
html body .panel-header-title > * {
    position: relative !important;
    z-index: 2 !important;
}

/* Testo em (Market Regime / STOCK / ETF / FX / CRYPTO / COMM) */
html body .panel-header-title em {
    font-style: italic !important;
    font-weight: 700 !important;
    font-size: 0.78em !important;
    color: #3C3489 !important;
    opacity: 1 !important;
    letter-spacing: 0.5px !important;
}

@keyframes aimonPillShimmer {
    0%, 80% { left: -75%; }
    100% { left: 175%; }
}
/* === /AIMON-PATCH-PILL-V8 === */

/* === AIMON-PATCH-BG-FINAL: background sfumato + glass UI consolidato === */
/* Consolidato il 20260616_173526 - sostituisce tutti i blocchi v9 -> v9.17 */

/* -------------------------------------------------------------
   1. BODY Â· sfumatura lineare verticale che scorre col contenuto
   ------------------------------------------------------------- */
html body {
    background-color: #FCFBFE !important;
    background-image:
        linear-gradient(180deg,
            rgba(139, 126, 227, 0.22) 0%,
            rgba(83, 74, 183, 0.30) 30%,
            rgba(139, 126, 227, 0.28) 60%,
            rgba(74, 222, 128, 0.18) 100%) !important;
    background-attachment: scroll !important;
    background-repeat: no-repeat !important;
    background-size: 100% 100% !important;
    min-height: 100vh !important;
}

/* -------------------------------------------------------------
   2. BODY::before Â· aloni laterali fissi in viewport
   ------------------------------------------------------------- */
html body::before {
    content: '' !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: -1 !important;
    pointer-events: none !important;
    background-image:
        radial-gradient(ellipse 55% 80% at 0% 50%, rgba(139, 126, 227, 0.22), transparent 60%),
        radial-gradient(ellipse 55% 80% at 100% 50%, rgba(83, 74, 183, 0.20), transparent 60%) !important;
    background-attachment: fixed !important;
    background-repeat: no-repeat !important;
}

/* -------------------------------------------------------------
   3. MAIN CONTENT Â· trasparente (sfumatura body filtra)
   ------------------------------------------------------------- */
html body .aimon-main-content {
    background-color: transparent !important;
    background: transparent !important;
    margin-left: 165px !important;
}
html body .aimon-main-content.has-right-sidebar {
    margin-right: 260px !important;
}

/* -------------------------------------------------------------
   4. SIDEBAR SX Â· glassmorphism + larghezza ridotta + fit-content
   ------------------------------------------------------------- */
html body .aimon-sidebar {
    width: 165px !important;
    height: fit-content !important;
    max-height: calc(100vh - 90px) !important;
    background: rgba(255, 255, 255, 0.55) !important;
    backdrop-filter: blur(4px) !important;
    -webkit-backdrop-filter: blur(4px) !important;
    border-right: 1px solid rgba(83, 74, 183, 0.12) !important;
    border-radius: 16px !important;
    box-shadow: 1px 0 4px rgba(83, 74, 183, 0.05) !important;
}

/* -------------------------------------------------------------
   5. SIDEBAR DX Â· glassmorphism + larghezza ridotta + fit-content
   ------------------------------------------------------------- */
html body .aimon-right-sidebar {
    width: 260px !important;
    height: fit-content !important;
    max-height: calc(100vh - 90px) !important;
    background: rgba(255, 255, 255, 0.55) !important;
    backdrop-filter: blur(4px) !important;
    -webkit-backdrop-filter: blur(4px) !important;
    border-left: 1px solid rgba(83, 74, 183, 0.12) !important;
    border-radius: 16px !important;
    box-shadow: -1px 0 4px rgba(83, 74, 183, 0.05) !important;
}

/* -------------------------------------------------------------
   6. HEADER Â· glassmorphism leggero
   ------------------------------------------------------------- */
html body .aimon-header {
    background: rgba(255, 255, 255, 0.65) !important;
    backdrop-filter: blur(6px) !important;
    -webkit-backdrop-filter: blur(6px) !important;
}

/* -------------------------------------------------------------
   7. SECTION PRINCIPALI Â· glass al 40% + bordo viola
   ------------------------------------------------------------- */
html body .market-overview-section,
html body .regime-section,
html body .liquidity-section,
html body .top-assets-section {
    background: rgba(255, 255, 255, 0.40) !important;
    background-color: rgba(255, 255, 255, 0.40) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    box-shadow: 0 4px 16px rgba(83, 74, 183, 0.08) !important;
    border: 1px solid rgba(83, 74, 183, 0.25) !important;
    border-radius: 12px !important;
}

/* -------------------------------------------------------------
   8. CONTAINER INTERNI Â· ancora piu trasparenti
   ------------------------------------------------------------- */
html body .section-header-bar,
html body .regime-main-container {
    background: rgba(255, 255, 255, 0.35) !important;
    background-color: rgba(255, 255, 255, 0.35) !important;
    backdrop-filter: blur(6px) !important;
    -webkit-backdrop-filter: blur(6px) !important;
    border: 1px solid rgba(83, 74, 183, 0.15) !important;
}

/* -------------------------------------------------------------
   9. TOP ASSETS Â· grid wrapper trasparente
   ------------------------------------------------------------- */
html body .top-assets-grid,
html body .top-assets-section .top-assets-grid {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: none !important;
    border: none !important;
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
@media (max-width: 992px) {
    html body .top-assets-grid { grid-template-columns: 1fr !important; }
}

/* -------------------------------------------------------------
   10. TOP ASSETS Â· pane (le 2 sub-card Stocks/Crypto)
   ------------------------------------------------------------- */
html body .top-asset-pane {
    background: rgba(255, 255, 255, 0.55) !important;
    backdrop-filter: blur(6px) !important;
    -webkit-backdrop-filter: blur(6px) !important;
    border: 1px solid rgba(83, 74, 183, 0.15) !important;
    box-shadow: 0 2px 8px rgba(83, 74, 183, 0.05) !important;
    border-radius: 14px !important;
    padding: 1rem 1.25rem !important;
    overflow: hidden;
}

html body .top-asset-pane-header {
    background: transparent !important;
    margin-bottom: 0.5rem;
    padding: 0;
    border: none;
}
html body .top-asset-pane-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--violet-deepest, #3C3489);
    margin: 0;
    display: flex;
    align-items: center;
}
html body .top-asset-pane-title .card-title-icon {
    width: 22px;
    height: 22px;
}
html body .top-asset-pane-body {
    background: transparent !important;
    padding: 0;
}

/* -------------------------------------------------------------
   11. TOP ASSETS Â· trasparenza forzata elementi interni
   (assets-table-header aveva linear-gradient grigio nascosto)
   ------------------------------------------------------------- */
html body .top-asset-pane .assets-table-header,
html body .top-asset-pane .assets-table-body,
html body .top-asset-pane .assets-header-row,
html body .top-asset-pane .assets-header-row-with-rank,
html body .top-asset-pane .aimon-card-header,
html body .top-asset-pane .aimon-card-body {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
}

/* Decorazioni top-1/2/3 piu sottili sul background trasparente */
html body .top-asset-pane .assets-table-body .aimon-asset-item.top-1-row::before,
html body .top-asset-pane .assets-table-body .aimon-asset-item.top-2-row::before,
html body .top-asset-pane .assets-table-body .aimon-asset-item.top-3-row::before {
    opacity: 0.45 !important;
}

/* -------------------------------------------------------------
   12. TOP ASSETS Â· header bar e spaziatura
   ------------------------------------------------------------- */
html body .top-assets-header {
    margin-bottom: 1rem !important;
}
html body .top-assets-section {
    padding: 1rem 1.25rem !important;
    margin-bottom: 4rem !important;
    overflow: hidden;
}

/* -------------------------------------------------------------
   13. FOOTER Â· glass semi-trasparente
   ------------------------------------------------------------- */
html body .aimon-footer,
html body footer.aimon-footer,
html body footer {
    background: rgba(255, 255, 255, 0.40) !important;
    background-color: rgba(255, 255, 255, 0.40) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    border-top: 1px solid rgba(83, 74, 183, 0.20) !important;
    margin-top: 3rem !important;
}

/* === /AIMON-PATCH-BG-FINAL === */

/* AIMON-PATCH-GEO-LINKS-V1 : due link affiancati (stocks sx / bonds dx) */
.geo-region-column .link-indicator-dual {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
    gap: 6px;
}
.geo-region-column .link-indicator-dual a {
    color: #94a3b8;
    text-decoration: none;
    white-space: nowrap;
}
.geo-region-column .link-indicator-dual a:hover {
    color: var(--aimon-violet, #735de1);
}


/* === AIMON-PATCH-REGIME-BOX-V1 START === */
/* Restyling box MOTIVAZIONI / FATTORI CHIAVE: badge lilla + barrette stato. */
.regime-info-row { display: flex; gap: 28px; }

.regime-motivations-box,
.regime-factors-box {
    flex: 1;
    background: transparent;
    border: none;
    border-left: none;
    border-radius: 0;
    padding: 0;
    overflow: visible;
}

/* Titolo come badge lilla */
.regime-motivations-box .regime-info-title,
.regime-factors-box .regime-info-title {
    display: inline-block;
    background: #ECEAFB;
    color: #6a5fc0;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    margin: 0 0 12px 0;
    padding: 5px 12px;
    border-radius: 6px;
}

/* Motivazioni: testo semplice, niente sfondo */
.regime-motivations-box p {
    background: transparent;
    font-size: 0.82rem;
    color: #374151;
    line-height: 1.7;
    margin: 0;
    padding: 0;
}
.regime-motivations-box p strong { font-weight: 700; color: #1e293b; }

/* Fattori: lista in colonna singola, niente sfondo */
.regime-factors-box ul {
    margin: 0;
    padding: 0;
    font-size: 0.82rem;
    color: #374151;
    line-height: 1.5;
    list-style: none;
    columns: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.regime-factors-box li {
    margin: 0;
    padding: 0 0 0 13px;
    position: relative;
    border-radius: 0;
    background: transparent;
}
/* barretta verticale colorata a sinistra */
.regime-factors-box li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 2px;
    width: 3px;
    height: 15px;
    border-radius: 2px;
    background: #735de1;           /* default (fallback vecchi engine) */
}
.regime-factors-box li.fk-favorevole::before  { background: #1D9E75; }
.regime-factors-box li.fk-neutro::before      { background: #EF9F27; }
.regime-factors-box li.fk-sfavorevole::before { background: #D85A30; }
.regime-factors-box li strong { font-weight: 700; color: #1e293b; }

/* Legenda colori sotto i fattori */
.regime-factors-legend {
    display: flex;
    gap: 16px;
    margin-top: 14px;
    font-size: 0.68rem;
    color: #64748b;
}
.regime-factors-legend span { display: inline-flex; align-items: center; gap: 5px; }
.regime-factors-legend i {
    width: 8px; height: 8px; border-radius: 50%; display: inline-block;
}
.regime-factors-legend i.fk-favorevole  { background: #1D9E75; }
.regime-factors-legend i.fk-neutro       { background: #EF9F27; }
.regime-factors-legend i.fk-sfavorevole  { background: #D85A30; }

@media (max-width: 768px) {
    .regime-info-row { flex-direction: column; gap: 18px; }
}
/* === AIMON-PATCH-REGIME-BOX-V1 END === */


/* -------------------------------------------------------------
   AIMON-PATCH-MO-HEADER-V1
   Market Overview: badge categorie rimossi dall'header L1.
   Group label sopra le cards ingrandite.
   ------------------------------------------------------------- */
.group-labels-container {
    height: 24px;
    margin-bottom: 6px;
}

.group-label {
    font-size: 0.80rem;
    font-weight: 700;
    letter-spacing: -0.1px;
    color: #4f5b73;
    gap: 6px;
}

.group-label::before {
    width: 7px;
    height: 7px;
}

.group-label-line {
    top: 22px;
}


/* === AIMON-PATCH-LIQ-LABELS-V1 === */
/* Evidenzia i titoletti del Liquidity Flow Monitor (home) nel viola accento del sito. */
.liq-gauge-label,
.liq-flows-label,
.liq-summary-label {
    color: var(--aimon-violet, #735de1);
    font-weight: 700;
}
/* === /AIMON-PATCH-LIQ-LABELS-V1 === */


/* === AIMON-PATCH-REGIME-SUBDESC-COLOR-V1 === */
/* Allinea le descrizioni delle sottosezioni regime al colore di .section-subtitle */
.regime-subsection-description { color: #5F5E5A; }
/* === /AIMON-PATCH-REGIME-SUBDESC-COLOR-V1 === */
