:root{--md-ink:#101820;--md-soft:#f4f6f8;--md-line:#dfe4e8;--md-white:#fff;--md-accent:#ffcc00;--md-good:#147a3d;--md-muted:#63707b}
.md-app-shell{width:min(1440px,calc(100% - 40px));margin:22px auto 56px;color:var(--md-ink);font-family:Arial,Helvetica,sans-serif}
.md-app-topbar{display:flex;align-items:center;gap:24px;background:var(--md-ink);color:#fff;border-radius:18px;padding:16px 20px;box-shadow:0 12px 32px rgba(16,24,32,.12)}
.md-app-brand{font-weight:900;letter-spacing:.04em;color:#fff!important;text-decoration:none;font-size:18px;white-space:nowrap}.md-app-brand:hover{color:var(--md-accent)!important}
.md-app-nav{display:flex;gap:4px;flex:1;justify-content:center;flex-wrap:wrap}.md-app-nav a{color:#dfe6eb!important;text-decoration:none;padding:9px 12px;border-radius:10px;font-weight:700;font-size:14px}.md-app-nav a:hover,.md-app-nav a.is-active{background:rgba(255,255,255,.12);color:#fff!important}
.md-app-user{display:flex;align-items:center;gap:12px;font-size:13px;color:#cfd6dc}.md-app-user a{color:var(--md-accent)!important;font-weight:800;text-decoration:none}
.md-dashboard-main{padding:34px 4px}.md-welcome{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:26px}.md-welcome h1{font-size:clamp(30px,4vw,50px);line-height:1.03;margin:5px 0 10px;font-weight:900;letter-spacing:-.035em}.md-welcome p{margin:0;color:var(--md-muted)}.md-eyebrow{font-size:12px!important;font-weight:900;letter-spacing:.15em;color:var(--md-ink)!important}
.md-security-badge{border-radius:999px;padding:9px 12px;font-size:12px;font-weight:900;white-space:nowrap;border:1px solid var(--md-line);background:#fff}.md-security-badge.is-on{color:var(--md-good);border-color:#b8dcc5;background:#f0fbf4}.md-security-badge.is-off{color:#875c00;background:#fff9e6;border-color:#ead694}
.md-kpi-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin-bottom:22px}.md-kpi{background:#fff;border:1px solid var(--md-line);border-radius:16px;padding:20px;min-height:140px;display:flex;flex-direction:column;justify-content:space-between;box-shadow:0 6px 20px rgba(16,24,32,.04)}.md-kpi-label{font-weight:800;font-size:14px}.md-kpi strong{font-size:38px;line-height:1;margin:12px 0}.md-kpi small{color:var(--md-muted);font-size:12px}
.md-panel-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin-bottom:22px}.md-panel{background:#fff;border:1px solid var(--md-line);border-radius:16px;padding:22px;box-shadow:0 6px 20px rgba(16,24,32,.035)}.md-panel h2{margin:0 0 10px;font-size:21px}.md-panel p{color:var(--md-muted)}.md-panel-muted{background:var(--md-soft)}
.md-action-list{display:grid;gap:8px;margin-top:15px}.md-action-list a{display:flex;justify-content:space-between;align-items:center;padding:12px 14px;border:1px solid var(--md-line);border-radius:11px;text-decoration:none!important;color:var(--md-ink)!important;font-weight:800;background:#fff}.md-action-list a:after{content:'→';color:var(--md-muted)}.md-action-list a:hover{border-color:#aeb8c1}
.md-btn{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:0 17px;border-radius:11px;text-decoration:none!important;font-weight:900;border:1px solid transparent;cursor:pointer}.md-btn-primary{background:var(--md-ink);color:#fff!important}.md-btn-primary:hover{background:#27333d;color:#fff!important}.md-btn-secondary{background:#fff;color:var(--md-ink)!important;border-color:var(--md-line)}
.md-activity-panel{margin-top:2px}.md-panel-heading{display:flex;justify-content:space-between;align-items:center;gap:15px}.md-panel-heading span{font-size:12px;color:var(--md-muted)}.md-activity-list{list-style:none;margin:14px 0 0;padding:0}.md-activity-list li{display:flex;justify-content:space-between;gap:20px;padding:12px 0;border-top:1px solid var(--md-line)}.md-activity-list span{color:var(--md-muted);font-size:13px}.md-empty{margin-bottom:0}.md-dashboard-guest{max-width:520px;margin:50px auto;padding:25px;border:1px solid var(--md-line);border-radius:16px;background:#fff;text-align:center}
@media(max-width:900px){.md-app-topbar{align-items:flex-start;flex-wrap:wrap}.md-app-nav{order:3;width:100%;justify-content:flex-start}.md-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.md-panel-grid{grid-template-columns:1fr}.md-welcome{flex-direction:column}}
@media(max-width:560px){.md-app-shell{width:min(100% - 18px,1440px);margin-top:12px}.md-app-topbar{border-radius:14px;padding:14px}.md-app-user span{display:none}.md-app-nav{gap:1px}.md-app-nav a{padding:8px 9px;font-size:13px}.md-dashboard-main{padding-top:24px}.md-kpi-grid{grid-template-columns:1fr}.md-kpi{min-height:115px}.md-welcome h1{font-size:34px}.md-security-badge{align-self:flex-start}.md-activity-list li{flex-direction:column;gap:4px}}

/* FASE C v0.14.1 — isolamento della Dashboard dal layout GeneratePress. */
body.md-system-dashboard-page .site-header,
body.md-system-dashboard-page #masthead{display:none!important}
body.md-system-dashboard-page #page,
body.md-system-dashboard-page #page.grid-container,
body.md-system-dashboard-page .site.grid-container{width:100%!important;max-width:none!important;margin:0!important;padding:0!important}
body.md-system-dashboard-page .site-content,
body.md-system-dashboard-page #content{display:block!important;width:100%!important;max-width:none!important;margin:0!important;padding:0!important}
body.md-system-dashboard-page .content-area,
body.md-system-dashboard-page #primary{float:none!important;width:100%!important;max-width:none!important;margin:0!important;padding:0!important}
body.md-system-dashboard-page .site-main,
body.md-system-dashboard-page #main{width:100%!important;max-width:none!important;margin:0!important;padding:0!important}
body.md-system-dashboard-page article.page,
body.md-system-dashboard-page .inside-article{width:100%!important;max-width:none!important;margin:0!important;padding:0!important;background:transparent!important}
body.md-system-dashboard-page .entry-header,
body.md-system-dashboard-page .entry-title{display:none!important}
body.md-system-dashboard-page .entry-content{width:100%!important;max-width:none!important;margin:0!important;padding:0!important}
body.md-system-dashboard-page .widget-area{display:none!important}

/* Il profilo mantiene il proprio layout dedicato, ma senza sidebar o titolo WordPress. */
.md-system-profile-page .entry-header{display:none!important}
.md-system-profile-page .site-content{display:block}
.md-system-profile-page .content-area{width:100%}

/* FASE C v0.14.2 — template applicativo standalone. */
html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit}
body.md-standalone-dashboard{margin:0!important;background:#fff!important;overflow-x:hidden}
body.md-standalone-dashboard .md-dashboard-root{display:block!important;width:100%!important;max-width:none!important;margin:0!important;padding:0!important}
body.md-standalone-dashboard .md-app-shell{
    display:block!important;
    width:calc(100% - 48px)!important;
    max-width:1440px!important;
    min-width:0!important;
    margin:24px auto 56px!important;
    padding:0!important;
}
body.md-standalone-dashboard .md-app-topbar{width:100%!important;max-width:none!important}
body.md-standalone-dashboard .md-dashboard-main{width:100%!important;max-width:none!important}
body.md-standalone-dashboard .md-kpi-grid,
body.md-standalone-dashboard .md-panel-grid,
body.md-standalone-dashboard .md-activity-panel{width:100%!important;max-width:none!important}
@media(max-width:900px){body.md-standalone-dashboard .md-app-shell{width:calc(100% - 28px)!important;margin-top:16px!important}}
@media(max-width:560px){body.md-standalone-dashboard .md-app-shell{width:calc(100% - 18px)!important;margin-top:10px!important}}
