/*
==========================================================
ASGARD TOOLS 2.0
DoctorMag
==========================================================
*/


/*
==========================================================
RESET
==========================================================
*/

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

html{
    scroll-behavior:smooth;
}

body{

    background:#181818;

    color:#F2F2F2;

    font-family:Trebuchet MS,Arial,sans-serif;

}


/*
==========================================================
COLORI
==========================================================
*/

:root{

    --background:#181818;

    --sidebar:#101010;

    --panel:#242424;

    --panel-hover:#2d2d2d;

    --gold:#d3ac47;

    --gold-light:#efd07b;

    --border:#69501c;

    --text:#efefef;

    --text2:#bfbfbf;

    --radius:18px;

    --transition:.25s;

    --shadow:0 12px 28px rgba(0,0,0,.45);

}


/*
==========================================================
LAYOUT
==========================================================
*/

.layout{

    display:flex;

    min-height:100vh;

}

.main{

    margin-left:250px;

    width:calc(100% - 250px);

    display:flex;

    flex-direction:column;

    min-height:100vh;

}

.content{

    flex:1;

    padding:40px;

}



/*
==========================================================
SIDEBAR
==========================================================
*/

.sidebar{

    position:fixed;

    top:0;

    left:0;

    width:250px;

    height:100vh;

    background-image:url("../ui/sidebar-bg.webp");

    background-size:cover;

    background-position:center;

    border-right:1px solid var(--border);

    display:flex;

    flex-direction:column;

    justify-content:space-between;

    box-shadow:var(--shadow);

    z-index:999;

}


/*
==========================================================
LOGO
==========================================================
*/

.sidebar-logo{

    padding:30px 0;

    display:flex;

    justify-content:center;

}

.sidebar-logo img{

    width:155px;

    transition:var(--transition);

}

.sidebar-logo img:hover{

    transform:scale(1.05);

}



/*
==========================================================
MENU
==========================================================
*/

.sidebar-menu{

    display:flex;

    flex-direction:column;

    gap:12px;

    padding:0 18px;

}

.menu-item{

    display:flex;

    align-items:center;

    gap:18px;

    padding:14px 18px;

    text-decoration:none;

    color:white;

    border-radius:14px;

    transition:var(--transition);

}

.menu-item img{

    width:52px;

    flex-shrink:0;

    transition:var(--transition);

}

.menu-item span{

    font-size:18px;

    font-weight:bold;

}

.menu-item:hover{

    background:rgba(0,0,0,.35);

}

.menu-item:hover img{

    transform:scale(1.10);

    filter:drop-shadow(0 0 10px var(--gold));

}

.menu-item.active{

    background:rgba(212,175,55,.15);

    border:1px solid var(--gold);

}



/*
==========================================================
FOOTER SIDEBAR
==========================================================
*/

.sidebar-footer{

    padding:25px;

    text-align:center;

    color:#b9b9b9;

    font-size:14px;

}


/*
==========================================================
HEADER
==========================================================
*/

.header{

    height:90px;

    background:#232323;

    border-bottom:1px solid var(--border);

    display:flex;

    justify-content:space-between;

    align-items:center;

    padding:0 35px;

    box-shadow:var(--shadow);

}

.header-left{

    display:flex;

    align-items:center;

    gap:20px;

}

.header-logo{

    width:65px;

}

.header-title{

    display:flex;

    flex-direction:column;

}

.header-title h1{

    color:var(--gold);

    font-size:30px;

    margin-bottom:4px;

}

.header-title span{

    color:var(--text2);

    font-size:15px;

}

.header-right h2{

    color:var(--gold-light);

    font-size:28px;

}



/*
==========================================================
DASHBOARD
==========================================================
*/

.dashboard{

    width:100%;

}

.dashboard-title{

    margin-bottom:45px;

}

.dashboard-title h2{

    font-size:36px;

    color:var(--gold);

    margin-bottom:10px;

}

.dashboard-title p{

    color:var(--text2);

    font-size:18px;

}



/*
==========================================================
GRID
==========================================================
*/

.dashboard-grid{

    display:grid;

    grid-template-columns:repeat(2,1fr);

    gap:35px;

}



/*
==========================================================
CARD
==========================================================
*/

.dashboard-card{

    background:linear-gradient(
        180deg,
        #2a2a2a,
        #212121
    );

    border:1px solid var(--border);

    border-radius:20px;

    text-decoration:none;

    color:white;

    padding:40px;

    text-align:center;

    transition:var(--transition);

    box-shadow:var(--shadow);

}

.dashboard-card:hover{

    transform:translateY(-8px);

    border-color:var(--gold);

    box-shadow:
    0 0 25px rgba(212,175,55,.30);

}

.dashboard-card img{

    width:128px;

    margin-bottom:25px;

    transition:.3s;

}

.dashboard-card:hover img{

    transform:scale(1.08);

}

.dashboard-card h3{

    color:var(--gold);

    font-size:28px;

    margin-bottom:15px;

}

.dashboard-card p{

    color:var(--text2);

    font-size:16px;

    line-height:1.6;

}



/*
==========================================================
FOOTER
==========================================================
*/

.footer{

    height:60px;

    background:#232323;

    border-top:1px solid var(--border);

    display:flex;

    justify-content:space-between;

    align-items:center;

    padding:0 35px;

    color:#9a9a9a;

    font-size:14px;

}



/*
==========================================================
RESPONSIVE
==========================================================
*/

@media(max-width:1200px){

.dashboard-grid{

grid-template-columns:1fr;

}

}


@media(max-width:900px){

.sidebar{

width:220px;

}

.main{

margin-left:220px;

width:calc(100% - 220px);

}

.header-right{

display:none;

}

}


@media(max-width:700px){

.layout{

flex-direction:column;

}

.sidebar{

position:relative;

width:100%;

height:auto;

}

.main{

margin-left:0;

width:100%;

}

.header{

flex-direction:column;

height:auto;

padding:20px;

gap:15px;

}

.header-left{

flex-direction:column;

}

.content{

padding:20px;

}

.dashboard-grid{

grid-template-columns:1fr;

}

.dashboard-card{

padding:30px;

}

.dashboard-card img{

width:96px;

}

}



/*
==========================================================
SCROLLBAR
==========================================================
*/

::-webkit-scrollbar{

width:10px;

}

::-webkit-scrollbar-track{

background:#181818;

}

::-webkit-scrollbar-thumb{

background:#444;

border-radius:10px;

}

::-webkit-scrollbar-thumb:hover{

background:var(--gold);

}

/*
==========================================================
UTILITY PAGES
(Difensiva - Offensiva - Gestione Villaggio)
==========================================================
*/

.difensiva-page,
.offensiva-page,
.gestione-page{

    max-width:1400px;
    margin:auto;

}

/* PANEL */

.panel{

    background:linear-gradient(180deg,#2a2a2a,#202020);
    border:1px solid var(--border);
    border-radius:20px;
    padding:30px;
    margin-bottom:30px;
    box-shadow:var(--shadow);

}

.panel h3{

    color:var(--gold);
    font-size:26px;
    margin-bottom:25px;

}

/* FORM */

.form-grid{

    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
    gap:22px;

}

.form-group{

    display:flex;
    flex-direction:column;

}

.form-group label{

    color:var(--gold-light);
    font-weight:bold;
    margin-bottom:8px;

}

.form-group input,
.form-group select{

    background:#141414;
    color:white;
    border:1px solid #4b4b4b;
    border-radius:12px;
    padding:14px;
    font-size:16px;
    transition:.25s;

}

.form-group input:focus,
.form-group select:focus{

    outline:none;
    border-color:var(--gold);

}

/* MODALITA */

.mode-grid{

    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:22px;

}

.mode-card{

    background:#1b1b1b;
    border:1px solid #4b4b4b;
    border-radius:18px;
    padding:30px;
    cursor:pointer;
    text-align:center;
    transition:.25s;

}

.mode-card:hover{

    border-color:var(--gold);
    transform:translateY(-4px);

}

.mode-card.active{

    background:rgba(211,172,71,.15);
    border-color:var(--gold);

}

.mode-card h4{

    color:var(--gold);
    font-size:18px;
    margin-bottom:15px;

}

.mode-card p{

    color:#d6d6d6;
    font-size:16px;
    line-height:1.4;

}

/* RISULTATI */

.results-table{

    display:flex;
    flex-direction:column;
    gap:15px;

}

.result-row{

    display:flex;
    justify-content:space-between;
    align-items:center;
    background:#181818;
    border:1px solid #3a3a3a;
    border-radius:12px;
    padding:16px 20px;

}

.result-row span{

    color:#ddd;
    font-size:17px;

}

.result-row strong{

    color:var(--gold);
    font-size:28px;

}

/* STATISTICHE */

.stats-grid{

    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:20px;

}

.stat-box{

    background:#181818;
    border:1px solid #3a3a3a;
    border-radius:16px;
    padding:22px;
    text-align:center;

}

.stat-box span{

    display:block;
    color:#cfcfcf;
    margin-bottom:18px;

}

.stat-box strong{

    display:block;
    margin-top:15px;
    color:var(--gold);
    font-size:28px;

}

/* BARRA */

.progress{

    width:100%;
    height:20px;
    background:#111;
    border-radius:999px;
    overflow:hidden;

}

.progress-bar{

    width:0%;
    height:100%;
    background:linear-gradient(
        90deg,
        var(--gold),
        var(--gold-light)
    );
    transition:width .4s;

}

/* BUTTON */

.actions{

    display:flex;
    gap:18px;

}

.btn{

    flex:1;
    border:none;
    border-radius:12px;
    padding:16px;
    cursor:pointer;
    font-size:16px;
    font-weight:bold;
    transition:.25s;

}

.btn-primary{

    background:var(--gold);
    color:#181818;

}

.btn-primary:hover{

    transform:translateY(-2px);

}

.btn-secondary{

    background:#404040;
    color:white;

}

.btn-secondary:hover{

    background:#555;

}

/* RESPONSIVE */

@media(max-width:900px){

    .mode-grid{

        grid-template-columns:1fr;

    }

    .stats-grid{

        grid-template-columns:1fr;

    }

    .actions{

        flex-direction:column;

    }

}