/* DISI — Sistema de gestión de equipos de TI
   Diseño CSS basado en los mockups aprobados. */
:root{
    --primary:#38A53A;
    --primary-dark:#2B7E2D;

    --blue:#0B5F99;
    --blue-dark:#084C7A;

    --text:#243746;
    --muted:#6B7C8C;

    --canvas:#F4F8FB;
    --surface:#FFFFFF;
    --border:#D7E3EC;

    --success:#128451;
    --warning:#D58A10;
    --danger:#D93E4F;

    --radius:16px;
    --shadow:0 10px 30px rgba(0,0,0,.08);

    --sidebar-width:280px;
}

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

body{
    font-family:'Segoe UI',sans-serif;
    background:var(--canvas);
    color:var(--text);
}

.app{
    display:flex;
    min-height:100vh;
}

/* SIDEBAR */

.sidebar{
    width:var(--sidebar-width);
    background:#fff;
    border-right:1px solid var(--border);
    padding:20px 15px;
    display:flex;
    flex-direction:column;
    box-shadow:0 0 25px rgba(0,0,0,.05);
}

.brand{
    display:flex;
    align-items:center;
    gap:15px;
    padding-bottom:20px;
    margin-bottom:15px;
    border-bottom:1px solid var(--border);
}

.brand img{
    width:200px;
    height:auto;
}

.brand-info{
    display:flex;
    flex-direction:column;
}

.brand-name{
    font-size:34px;
    font-weight:800;
    color:var(--blue);
    line-height:1;
}

.brand-desc{
    font-size:9px;
    font-weight:700;
    text-transform:uppercase;
    color:#666;
    line-height:1.25;
    margin-top:5px;
    max-width:150px;
}

nav{
    display:flex;
    flex-direction:column;
    gap:5px;
}

.nav-heading{
    margin-top:18px;
    margin-bottom:5px;
    font-size:12px;
    color:var(--muted);
    font-weight:700;
    text-transform:uppercase;
}

.nav-link{
    padding:12px 14px;
    text-decoration:none;
    color:var(--text);
    border-radius:10px;
    display:flex;
    align-items:center;
    gap:10px;
    transition:.3s;
}

.nav-link:hover{
    background:#F1F8FD;
    border-left:4px solid var(--primary);
    color:var(--blue);
}

.nav-link.active{
    background:linear-gradient(
        90deg,
        rgba(56,165,58,.18),
        rgba(11,95,153,.10)
    );
    border-left:4px solid var(--primary);
    color:var(--blue);
    font-weight:600;
}

.nav-icon{
    width:18px;
    text-align:center;
}

.sidebar-footer{
    margin-top:auto;
    padding-top:25px;
    font-size:12px;
    color:var(--blue);
    font-weight:600;
}

/* MAIN */

.main{
    flex:1;
    padding:25px;
}

.topbar{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:25px;
}

.search input{
    width:320px;
    padding:12px 14px;
    border:1px solid var(--border);
    border-radius:10px;
    background:white;
}

.topbar-right{
    display:flex;
    align-items:center;
    gap:15px;
}

.avatar{
    width:42px;
    height:42px;
    border-radius:50%;
    background:linear-gradient(
        135deg,
        var(--blue),
        var(--primary)
    );
    color:white;
    display:flex;
    align-items:center;
    justify-content:center;
    font-weight:bold;
}

.user-meta{
    display:flex;
    flex-direction:column;
}

.user-meta small{
    color:var(--muted);
}

.page-heading{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:25px;
}

h1,h2{
    color:var(--blue-dark);
}

.subtitle{
    color:var(--muted);
    margin-top:5px;
}

/* BOTONES */

.btn{
    border:none;
    border-radius:10px;
    padding:10px 18px;
    cursor:pointer;
}

.btn-green{
    background:linear-gradient(
        135deg,
        var(--blue),
        var(--primary)
    );
    color:white;
}

.btn-sm{
    padding:8px 14px;
}

/* GRID */

.grid{
    display:grid;
    gap:20px;
}

.stats{
    grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
    margin-bottom:25px;
}

.stat{
    background:white;
    border-radius:16px;
    box-shadow:var(--shadow);
    padding:20px;
    display:flex;
    gap:15px;
    align-items:center;
    transition:.3s;
}

.stat:hover{
    transform:translateY(-3px);
}

.stat-icon{
    width:50px;
    height:50px;
    border-radius:12px;
    background:#ECF8EC;
    color:var(--primary);
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:22px;
}

.stat-icon.blue{
    background:#EDF6FD;
    color:var(--blue);
}

.stat-icon.amber{
    background:#FFF4DD;
    color:var(--warning);
}

.stat-icon.red{
    background:#FDEBEC;
    color:var(--danger);
}

.stat-value{
    font-size:28px;
    font-weight:700;
    color:var(--blue);
}

.stat-label{
    color:var(--muted);
}

/* CONTENIDO */

.main-with-aside{
    grid-template-columns:2fr 1fr;
}

.card{
    background:white;
    border-radius:16px;
    box-shadow:var(--shadow);
    padding:22px;
}

.section-heading{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:20px;
}

.table-tools{
    display:flex;
    gap:15px;
    margin-bottom:15px;
}

.select{
    padding:12px;
    border:1px solid var(--border);
    border-radius:10px;
}

.table-wrap{
    overflow:auto;
}

table{
    width:100%;
    border-collapse:collapse;
}

th{
    text-align:left;
    background:#f7f9fc;
}

th,
td{
    padding:14px;
    border-bottom:1px solid var(--border);
}

.badge{
    padding:6px 10px;
    border-radius:20px;
    background:#EDF6FD;
    color:var(--blue);
    font-size:12px;
}

.badge.success{
    background:#E9F9EF;
    color:var(--success);
}

.badge.warning{
    background:#FFF4DD;
    color:var(--warning);
}

.badge.danger{
    background:#FDEBEC;
    color:var(--danger);
}

.list-item{
    display:flex;
    gap:12px;
    margin-bottom:18px;
}

.list-item p{
    color:var(--muted);
    font-size:14px;
}

.muted{
    color:var(--muted);
}

/* RESPONSIVE */

@media(max-width:900px){

    .app{
        flex-direction:column;
    }

    .sidebar{
        width:100%;
    }

    .main-with-aside{
        grid-template-columns:1fr;
    }

    .search input{
        width:100%;
    }

    .topbar{
        flex-direction:column;
        gap:15px;
        align-items:stretch;
    }
}
