/*
|--------------------------------------------------------------------------
| SV01 Infrastructure Dashboard
|--------------------------------------------------------------------------
|
| Dashboard CSS
|
| Autor: Miguel Pinto
| Projeto: Website / Dashboard
|
*/

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

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

html,
body{

    width:100%;
    min-height:100%;

}

body{

    font-family:
        "Segoe UI",
        Roboto,
        Arial,
        sans-serif;

    background:
        radial-gradient(
            circle at top,
            #1d4ed8 0%,
            #0f172a 45%,
            #020617 100%
        );

    color:#f8fafc;

    line-height:1.5;

    font-size:15px;

}

/* ==========================================================
   CORES
========================================================== */

:root{

    --primary:#4ea3ff;
    --primary-dark:#2f80ed;

    --success:#6ee7a8;
    --warning:#fbbf24;
    --danger:#f87171;
    --info:#38bdf8;

    --background:#0f172a;

    --surface:#1e293b;

    --surface-light:#243248;

    --border:#334155;

    --text:#f8fafc;

    --muted:#94a3b8;

    --radius:14px;

    --shadow:
        0 12px 30px rgba(0,0,0,.35);

}

/* ==========================================================
   LINKS
========================================================== */

a{

    color:var(--primary);

    text-decoration:none;

    transition:.25s;

}

a:hover{

    color:#ffffff;

}

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

.wrapper{

    width:100%;

    max-width:1600px;

    margin:auto;

    padding:25px;

}

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

.header{

    display:flex;

    justify-content:space-between;

    align-items:center;

    gap:30px;

    margin-bottom:35px;

}

.header-left h1{

    color:#7dd3fc;

    font-size:32px;

    font-weight:700;

}

.subtitle{

    margin-top:8px;

    color:var(--muted);

}

.header-right{

    text-align:right;

}

.clock{

    font-size:32px;

    font-weight:bold;

    color:#7dd3fc;

}

.date{

    color:var(--muted);

    margin-top:4px;

}

/* ==========================================================
   LIVE
========================================================== */

.live{

    display:inline-flex;

    align-items:center;

    gap:8px;

    margin-top:12px;

    padding:8px 14px;

    border-radius:50px;

    background:#16341f;

    color:#b7f7d0;

    font-weight:600;

}

.live::before{

    content:"";

    width:10px;

    height:10px;

    border-radius:50%;

    background:#22c55e;

    animation:pulse 1.5s infinite;

}

@keyframes pulse{

    0%{

        transform:scale(.8);

        opacity:.4;

    }

    50%{

        transform:scale(1.2);

        opacity:1;

    }

    100%{

        transform:scale(.8);

        opacity:.4;

    }

}

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

.menu{

    display:flex;

    gap:10px;

    flex-wrap:wrap;

    margin-bottom:35px;

}

.menu a{

    display:flex;

    align-items:center;

    justify-content:center;

    padding:12px 22px;

    border-radius:10px;

    background:var(--surface-light);

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

    color:#dbeafe;

    font-weight:600;

    transition:.25s;

}

.menu a:hover{

    background:#31415d;

    border-color:var(--primary);

}

.menu a.active{

    background:

        linear-gradient(

            135deg,

            #2563eb,

            #3b82f6

        );

    border-color:#60a5fa;

    color:#ffffff;

}

/* ==========================================================
   MAIN
========================================================== */

main{

    width:100%;

}

/* ==========================================================
   SECTIONS
========================================================== */

section{

    margin-bottom:35px;

}

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

.grid{

    display:grid;

    gap:24px;

}

.grid-2{

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

}

.grid-3{

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

}

.grid-4{

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

}

.grid-5{

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

}


/* ==========================================================
   CARDS
========================================================== */

.card{

    background:var(--surface);

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

    border-radius:var(--radius);

    padding:22px;

    box-shadow:var(--shadow);

    transition:.25s;

}

.card:hover{

    border-color:#4ea3ff;

    transform:translateY(-2px);

}

.card h2{

    color:#7dd3fc;

    margin-bottom:18px;

    font-size:22px;

}

.card h3{

    color:#dbeafe;

    margin-bottom:12px;

}

.card hr{

    border:none;

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

    margin:20px 0;

}

.card p{

    color:var(--muted);

}


/* ==========================================================
   TOP CARDS
========================================================== */

.top-cards{

    display:grid;

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

    gap:24px;

}

.card-title{

    color:var(--muted);

    font-size:14px;

    margin-bottom:12px;

}

.card-value{

    font-size:34px;

    font-weight:bold;

    color:#ffffff;

    margin-bottom:12px;

}


/* ==========================================================
   PROGRESS
========================================================== */

.progress{

    width:100%;

    height:10px;

    margin-top:15px;

    background:#324255;

    border-radius:30px;

    overflow:hidden;

}

.progress div{

    height:100%;

    border-radius:30px;

    background:

        linear-gradient(

            90deg,

            #38bdf8,

            #60a5fa

        );

}


/* ==========================================================
   BADGES
========================================================== */

.badge{

    display:inline-flex;

    align-items:center;

    gap:8px;

    padding:6px 12px;

    border-radius:50px;

    font-size:13px;

    font-weight:600;

}

.success{

    background:#dcfce7;

    color:#166534;

}

.warning{

    background:#fef3c7;

    color:#92400e;

}

.danger{

    background:#fee2e2;

    color:#991b1b;

}

.info{

    background:#dbeafe;

    color:#1d4ed8;

}

.gray{

    background:#e5e7eb;

    color:#374151;

}


/* ==========================================================
   BUTTONS
========================================================== */

button,

.btn{

    display:inline-flex;

    align-items:center;

    justify-content:center;

    gap:8px;

    padding:10px 18px;

    background:var(--primary);

    color:#ffffff;

    border:none;

    border-radius:10px;

    cursor:pointer;

    font-weight:600;

    transition:.25s;

}

button:hover,

.btn:hover{

    background:var(--primary-dark);

}

button.secondary{

    background:#334155;

}

button.secondary:hover{

    background:#475569;

}


/* ==========================================================
   ALERTS
========================================================== */

.alert{

    padding:15px 18px;

    border-radius:12px;

    margin-bottom:20px;

}

.alert-success{

    background:#16341f;

    border-left:4px solid #22c55e;

}

.alert-warning{

    background:#3d300d;

    border-left:4px solid #fbbf24;

}

.alert-danger{

    background:#431818;

    border-left:4px solid #ef4444;

}

.alert-info{

    background:#102d47;

    border-left:4px solid #38bdf8;

}


/* ==========================================================
   ICONS
========================================================== */

.icon{

    margin-right:8px;

    color:#60a5fa;

}


/* ==========================================================
   DIVIDERS
========================================================== */

.divider{

    width:100%;

    height:1px;

    background:var(--border);

    margin:20px 0;

}

/* ==========================================================
   TABLES
========================================================== */

table{

    width:100%;

    border-collapse:collapse;

    margin-top:15px;

    background:transparent;

}

thead{

    background:#23324b;

}

th{

    padding:15px;

    text-align:left;

    color:#7dd3fc;

    font-weight:600;

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

}

td{

    padding:14px 15px;

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

    color:var(--text);

    vertical-align:middle;

}

tbody tr{

    transition:.20s;

}

tbody tr:hover{

    background:#293548;

}

/* ==========================================================
   SEARCH
========================================================== */

.search{

    margin-bottom:20px;

}

.search input{

    width:350px;

    max-width:100%;

    padding:12px 16px;

    border-radius:10px;

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

    background:#0f172a;

    color:white;

    outline:none;

    transition:.2s;

}

.search input:focus{

    border-color:var(--primary);

}

/* ==========================================================
   FORMULÁRIOS
========================================================== */

input,
select,
textarea{

    width:100%;

    padding:12px;

    border-radius:10px;

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

    background:#0f172a;

    color:#ffffff;

    outline:none;

}

input:focus,
select:focus,
textarea:focus{

    border-color:var(--primary);

}

/* ==========================================================
   LOGS
========================================================== */

.log-box{

    background:#050b16;

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

    border-radius:12px;

    padding:18px;

    max-height:650px;

    overflow:auto;

    font-family:

        Consolas,

        Monaco,

        monospace;

    font-size:13px;

    line-height:1.6;

    white-space:pre-wrap;

    color:#cbd5e1;

}

/* ==========================================================
   CODE
========================================================== */

pre{

    overflow:auto;

    background:#050b16;

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

    padding:15px;

    border-radius:10px;

    color:#cbd5e1;

}

/* ==========================================================
   LISTAS
========================================================== */

ul{

    margin-left:20px;

}

li{

    margin-bottom:6px;

}

/* ==========================================================
   UTILITÁRIOS
========================================================== */

.text-center{

    text-align:center;

}

.text-right{

    text-align:right;

}

.text-muted{

    color:var(--muted);

}

.mt-10{

    margin-top:10px;

}

.mt-20{

    margin-top:20px;

}

.mt-30{

    margin-top:30px;

}

.mb-10{

    margin-bottom:10px;

}

.mb-20{

    margin-bottom:20px;

}

.mb-30{

    margin-bottom:30px;

}

.hidden{

    display:none;

}

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

::-webkit-scrollbar{

    width:10px;

    height:10px;

}

::-webkit-scrollbar-track{

    background:#172334;

}

::-webkit-scrollbar-thumb{

    background:#46648f;

    border-radius:20px;

}

::-webkit-scrollbar-thumb:hover{

    background:#5b7ca9;

}

/* ==========================================================
   STATUS BAR
========================================================== */

.statusbar{

    display:flex;

    justify-content:center;

    align-items:center;

    gap:12px;

    flex-wrap:nowrap;

    overflow-x:auto;

    white-space:nowrap;

    margin:18px 0;

    padding:12px 20px;

    background:#16263b;

    border:1px solid #314a6a;

    border-radius:10px;

}

.statusbar .item{

    font-size:14px;

    font-weight:600;

}

.statusbar .separator{

    color:#5b7697;

}

.statusbar .ok{

    color:#7CFC98;

}

.statusbar .warning{

    color:#ffd166;

}

.statusbar .danger{

    color:#ff6b6b;

}

/* ==========================================================
   RESPONSIVO
========================================================== */

@media(max-width:1400px){

    .top-cards{

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

    }

    .grid-4{

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

    }

    .grid-5{

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

    }

}

@media(max-width:992px){

    .header{

        flex-direction:column;

        align-items:flex-start;

    }

    .grid-2,
    .grid-3,
    .grid-4,
    .grid-5{

        grid-template-columns:1fr;

    }

    .top-cards{

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

    }

    .menu{

        flex-direction:column;

    }

    .menu a{

        width:100%;

    }

}

@media(max-width:768px){

    .wrapper{

        padding:15px;

    }

    .top-cards{

        grid-template-columns:1fr;

    }

    .card{

        padding:18px;

    }

    .card-value{

        font-size:28px;

    }

    .clock{

        font-size:26px;

    }

    table{

        display:block;

        overflow-x:auto;

    }

}

@media(max-width:480px){

    body{

        font-size:14px;

    }

    .header-left h1{

        font-size:24px;

    }

    .card h2{

        font-size:20px;

    }

}

/* ==========================================================
   FIM
========================================================== */