.mthcw-dashboard{
    background: linear-gradient(180deg, #0b1220 0%, #111a2e 100%);
    color: #e8eef9;
    border: 1px solid #243149;
    border-radius: 18px;
    padding: 24px;
    font-family: Montserrat, Arial, sans-serif;
}

.mthcw-head{
    display:flex;
    justify-content:space-between;
    gap:20px;
    align-items:flex-start;
    margin-bottom:20px;
}

.mthcw-kicker{
    font-size:12px;
    text-transform:uppercase;
    letter-spacing:.12em;
    color:#6cc8ff;
    margin-bottom:8px;
}

.mthcw-head h2{
    margin:0;
    font-size:30px;
}

.mthcw-head p{
    margin:8px 0 0;
    color:#9fb0c9;
}

.mthcw-status{
    background:#172235;
    border:1px solid #243149;
    border-radius:999px;
    padding:10px 14px;
    color:#9fb0c9;
    font-size:13px;
}

.mthcw-cards{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:16px;
    margin-bottom:16px;
}

.mthcw-card{
    background:#172235;
    border:1px solid #243149;
    border-radius:16px;
    padding:18px;
}

.mthcw-card span{
    display:block;
    color:#9fb0c9;
    font-size:13px;
    margin-bottom:10px;
}

.mthcw-card strong{
    display:block;
    font-size:28px;
    line-height:1.1;
}

.mthcw-card small{
    display:block;
    margin-top:8px;
    color:#9fb0c9;
    font-size:12px;
}

.mthcw-mini-breakdown{
    margin-top:14px;
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:8px 12px;
}

.mthcw-mini-breakdown div{
    background:#0f1728;
    border:1px solid #243149;
    border-radius:10px;
    padding:8px 10px;
}

.mthcw-mini-breakdown span{
    display:block;
    margin:0 0 4px 0;
    font-size:11px;
    color:#8fa6c6;
}

.mthcw-mini-breakdown b{
    font-size:13px;
    color:#ffffff;
}

.mthcw-periods{
    display:flex;
    gap:8px;
    margin-top:14px;
    flex-wrap:wrap;
}

.mthcw-period{
    appearance:none;
    border:1px solid #2c4264;
    background:#0f1728;
    color:#dbe8fb;
    padding:8px 10px;
    border-radius:10px;
    font-size:12px;
    cursor:pointer;
}

.mthcw-period:hover{
    border-color:#4f83ff;
}

.mthcw-period.is-active{
    background:#2f6df6;
    border-color:#2f6df6;
    color:#fff;
}

.mthcw-panel{
    background:#172235;
    border:1px solid #243149;
    border-radius:16px;
    padding:18px;
}

.mthcw-panel-head{
    display:flex;
    justify-content:space-between;
    gap:20px;
    align-items:center;
    margin-bottom:14px;
}

.mthcw-panel-head h3{
    margin:0;
    font-size:18px;
}

.mthcw-progress{
    height:16px;
    border-radius:999px;
    overflow:hidden;
    background:#0c1423;
    border:1px solid #243149;
}

.mthcw-progress-bar{
    height:100%;
    width:0;
    transition:width .25s ease;
}

.mthcw-progress-bar--ok{
    background:linear-gradient(90deg, #1dbf73, #40d98a);
}

.mthcw-progress-bar--warn{
    background:linear-gradient(90deg, #f0b429, #ffd166);
}

.mthcw-progress-bar--danger{
    background:linear-gradient(90deg, #e04848, #ff6b6b);
}

.mthcw-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:16px;
    margin-top:16px;
}

.mthcw-chart{
    min-height:240px;
}

.mthcw-empty{
    min-height:220px;
    display:flex;
    align-items:center;
    justify-content:center;
    border:1px dashed #243149;
    border-radius:12px;
    color:#9fb0c9;
    background:#0c1423;
}

.mthcw-svg{
    width:100%;
    height:240px;
    display:block;
}

.mthcw-line{
    fill:none;
    stroke:#63a9ff;
    stroke-width:4;
    stroke-linecap:round;
    stroke-linejoin:round;
}

.mthcw-dots circle{
    fill:#ffffff;
    stroke:#63a9ff;
    stroke-width:2;
}

.mthcw-contract-line{
    stroke:#ff6b6b;
    stroke-width:2;
    stroke-dasharray:6 4;
}

.mthcw-contract-text{
    fill:#ff9b9b;
    font-size:12px;
}

.mthcw-axis-label{
    fill:#8fa6c6;
    font-size:11px;
}

.mthcw-bars{
    display:flex;
    align-items:flex-end;
    gap:12px;
    min-height:220px;
    padding-top:12px;
}

.mthcw-bar-wrap{
    flex:1;
    text-align:center;
}

.mthcw-bar-stack{
    height:160px;
    display:flex;
    flex-direction:column-reverse;
    background:#0c1423;
    border:1px solid #243149;
    border-radius:10px;
    overflow:hidden;
}

.mthcw-bar{
    width:100%;
}

.mthcw-bar-dir{
    background:linear-gradient(180deg, #4c86ff, #2f6df6);
}

.mthcw-bar-db{
    background:linear-gradient(180deg, #ff9393, #ff6b6b);
}

.mthcw-bar-label{
    margin-top:8px;
    color:#9fb0c9;
    font-size:11px;
}

.mthcw-error{
    padding:16px;
    border-radius:12px;
    background:#2a1515;
    color:#ffd5d5;
    border:1px solid #6b2c2c;
}

.mthcw-login-box{
    max-width:720px;
    margin:40px auto;
    padding:36px 28px;
    border-radius:18px;
    background:linear-gradient(180deg, #111a2e 0%, #0b1220 100%);
    border:1px solid #243149;
    box-shadow:0 12px 30px rgba(0,0,0,.25);
    text-align:center;
    color:#ffffff;
    font-family:Montserrat, Arial, sans-serif;
}

.mthcw-login-box__icon{
    font-size:42px;
    line-height:1;
    margin-bottom:14px;
}

.mthcw-login-box__title{
    font-size:28px;
    font-weight:700;
    margin-bottom:10px;
    color:#ffffff;
}

.mthcw-login-box__text{
    font-size:16px;
    line-height:1.5;
    color:#ffffff;
    margin-bottom:22px;
}

.mthcw-login-box__button{
    display:inline-block !important;
    padding:12px 24px;
    border-radius:10px;
    background:#E30C14;
    color:#ffffff !important;
    text-decoration:none !important;
    font-weight:700;
    border:1px solid #E30C14;
    transition:all .2s ease;
    box-shadow:0 8px 18px rgba(227,12,20,.25);
}

.mthcw-login-box__button:hover{
    background:#b90a10;
    border-color:#b90a10;
    color:#ffffff !important;
    text-decoration:none !important;
}

.mthcw-login-box a.mthcw-login-box__button,
.mthcw-login-box a.mthcw-login-box__button:visited,
.mthcw-login-box a.mthcw-login-box__button:hover,
.mthcw-login-box a.mthcw-login-box__button:active{
    color:#ffffff !important;
    text-decoration:none !important;
    display:inline-block !important;
}

.mthcw-login-notice{
    max-width:720px;
    margin:24px auto 20px auto;
    padding:20px 22px;
    border-radius:16px;
    font-family:Montserrat, Arial, sans-serif;
    border:1px solid transparent;
}

.mthcw-login-notice__title{
    font-size:22px;
    font-weight:700;
    margin-bottom:8px;
}

.mthcw-login-notice__text{
    font-size:15px;
    line-height:1.6;
}

.mthcw-login-notice--success{
    background:#eef8f1;
    border-color:#b7e3c2;
    color:#1d4f2c;
}

/* -------------------------------------------------
   FIX WIDGET ELEMENTOR "ACCEDI" QUANDO UTENTE È GIÀ LOGGATO
------------------------------------------------- */

.elementor-widget-login .elementor-login{
    color:#ffffff;
}

.elementor-widget-login .elementor-login__logged-in-message{
    color:#ffffff !important;
    font-size:18px;
    line-height:1.7;
}

.elementor-widget-login .elementor-login__logged-in-message a,
.elementor-widget-login .elementor-login__logged-in-message a:visited{
    color:#6cc8ff !important;
    text-decoration:none !important;
    font-weight:700;
}

.elementor-widget-login .elementor-login__logged-in-message a:hover,
.elementor-widget-login .elementor-login__logged-in-message a:focus{
    color:#E30C14 !important;
    text-decoration:underline !important;
}

.elementor-widget-login .elementor-login__logged-in-message,
.elementor-widget-login .elementor-login__logged-in-message *{
    text-shadow:none !important;
}

/* opzionale: rende più leggibile il box login di Elementor */
.elementor-widget-login .elementor-widget-container{
    color:#ffffff;
}

@media (max-width: 980px){
    .mthcw-cards{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }

    .mthcw-grid{
        grid-template-columns:1fr;
    }
}

@media (max-width: 640px){
    .mthcw-head{
        flex-direction:column;
    }

    .mthcw-cards{
        grid-template-columns:1fr;
    }

    .mthcw-mini-breakdown{
        grid-template-columns:1fr;
    }

    .mthcw-login-box{
        margin:24px auto;
        padding:28px 18px;
    }

    .mthcw-login-box__title{
        font-size:24px;
    }

    .mthcw-login-box__text{
        font-size:15px;
    }

    .mthcw-login-box__button{
        width:100%;
        max-width:260px;
    }

    .mthcw-login-notice{
        margin:18px auto 16px auto;
        padding:18px 16px;
    }

    .mthcw-login-notice__title{
        font-size:20px;
    }

    .elementor-widget-login .elementor-login__logged-in-message{
        font-size:16px;
    }
}