@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:'Poppins',sans-serif;
}

html{
    scroll-behavior:smooth;
}

body{
    background:#f1f5f9;
    color:#0f172a;
    display:flex;
    min-height:100vh;
}

/* SIDEBAR */

.sidebar{
    width:260px;
    height:100vh;
    background:linear-gradient(180deg,#0f172a,#1e293b);
    position:fixed;
    left:0;
    top:0;
    padding:30px 20px;
    overflow-y:auto;
    z-index:1000;
    box-shadow:4px 0 20px rgba(0,0,0,.08);
}

.logo{
    font-size:28px;
    font-weight:700;
    color:#fff;
    margin-bottom:40px;
    text-align:center;
}

.menu{
    display:flex;
    flex-direction:column;
    gap:8px;
}

.menu a{
    text-decoration:none;
    padding:14px 16px;
    border-radius:14px;
    color:#cbd5e1;
    transition:0.3s;
    font-size:15px;
    font-weight:500;
}

.menu a:hover,
.menu a.active{
    background:#2563eb;
    color:#fff;
    transform:translateX(5px);
}

/* MAIN */

.main{
    margin-left:260px;
    padding:40px;
    width:calc(100% - 260px);
}

.topo,
.topbar{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:15px;
    margin-bottom:30px;
    flex-wrap:wrap;
}

.topo h1,
.topbar h1{
    font-size:32px;
    font-weight:700;
    color:#0f172a;
}

/* CARDS */

.cards{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(240px,1fr));
    gap:20px;
    margin-bottom:30px;
}

.card{
    background:#fff;
    padding:25px;
    border-radius:24px;
    box-shadow:0 5px 20px rgba(0,0,0,0.05);
    transition:0.3s;
}

.card:hover{
    transform:translateY(-5px);
}

.card h3{
    font-size:14px;
    color:#64748b;
    margin-bottom:10px;
}

.card h1,
.card p{
    font-size:42px;
    font-weight:700;
    color:#0f172a;
}

/* TABELAS */

.table,
.table-area{
    background:#fff;
    padding:25px;
    border-radius:24px;
    box-shadow:0 5px 20px rgba(0,0,0,0.05);
    overflow:auto;
}

table{
    width:100%;
    border-collapse:collapse;
}

table th,
th{
    background:#0f172a;
    color:#fff;
    padding:16px;
    text-align:left;
    font-size:14px;
    white-space:nowrap;
}

table td,
td{
    padding:16px;
    border-bottom:1px solid #e2e8f0;
    font-size:14px;
    vertical-align:middle;
}

table tr:hover,
tr:hover{
    background:#f8fafc;
}

/* BOTÕES */

.btn,
.box-btn{
    background:#2563eb;
    color:#fff;
    padding:12px 18px;
    border:none;
    border-radius:12px;
    cursor:pointer;
    text-decoration:none;
    font-size:14px;
    font-weight:600;
    transition:0.3s;
    display:inline-block;
}

.btn:hover,
.box-btn:hover{
    background:#1d4ed8;
}

.btn-danger{
    background:#dc2626;
}

.btn-danger:hover{
    background:#b91c1c;
}

/* FORMULÁRIOS */

input,
select,
textarea{
    width:100%;
    padding:14px;
    border:1px solid #cbd5e1;
    border-radius:14px;
    outline:none;
    transition:0.3s;
    font-size:14px;
    background:#fff;
}

input:focus,
select:focus,
textarea:focus{
    border-color:#2563eb;
    box-shadow:0 0 0 3px rgba(37,99,235,.15);
}

textarea{
    resize:vertical;
    min-height:120px;
}

label{
    font-size:14px;
    font-weight:600;
    color:#334155;
}

.form-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:20px;
}

.full{
    grid-column:span 2;
}

/* ALERTAS */

.success{
    background:#dcfce7;
    color:#166534;
    padding:15px;
    border-radius:14px;
    margin-bottom:20px;
}

.erro{
    background:#fee2e2;
    color:#991b1b;
    padding:15px;
    border-radius:14px;
    margin-bottom:20px;
}

/* STATUS */

.status{
    padding:8px 12px;
    border-radius:10px;
    font-size:13px;
    font-weight:600;
    display:inline-block;
}

.status-success{
    background:#dcfce7;
    color:#166534;
}

.status-warning{
    background:#fef3c7;
    color:#92400e;
}

.status-danger{
    background:#fee2e2;
    color:#991b1b;
}

.status-info{
    background:#dbeafe;
    color:#1d4ed8;
}

/* DASHBOARD */

.boxes{
    display:flex;
    flex-wrap:wrap;
    gap:15px;
    margin-top:20px;
}

canvas{
    width:100% !important;
    max-width:100%;
    background:#fff;
    padding:20px;
    border-radius:24px;
    box-shadow:0 5px 20px rgba(0,0,0,0.05);
    margin-top:20px;
}

/* SCROLL */

::-webkit-scrollbar{
    width:8px;
    height:8px;
}

::-webkit-scrollbar-track{
    background:#e2e8f0;
}

::-webkit-scrollbar-thumb{
    background:#94a3b8;
    border-radius:20px;
}

/* RESPONSIVO */

@media(max-width:900px){

    body{
        flex-direction:column;
    }

    .sidebar{
        width:100%;
        height:auto;
        position:relative;
    }

    .main{
        margin-left:0;
        width:100%;
        padding:20px;
    }

    .form-grid{
        grid-template-columns:1fr;
    }

    .full{
        grid-column:span 1;
    }

    .cards{
        grid-template-columns:1fr;
    }

    .topo,
    .topbar{
        flex-direction:column;
        align-items:flex-start;
    }

    table{
        min-width:700px;
    }
}