/* =========================
🎨 VARIÁVEIS
========================= */

:root{
    --bg:#020617;
    --card:#0f172a;
    --text:#e2e8f0;
    --border:#1e293b;
    --accent:#22c55e;
}

/* LIGHT MODE */
body.light{
    --bg:#f1f5f9;
    --card:#ffffff;
    --text:#0f172a;
    --border:#e2e8f0;
}

/* =========================
🌍 BASE
========================= */

body{
    margin:0;
    font-family: 'Segoe UI', Arial;
    background:var(--bg);
    color:var(--text);
}

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

.sidebar{
    width:200px;
    height:100vh;
    position:fixed;
    left:0;
    top:0;
    background:var(--bg);
    border-right:1px solid var(--border);
    display:flex;
    flex-direction:column;
    padding:15px;
    z-index:1000;
}

.logo-area{
    text-align:center;
    margin-bottom:30px;
}

.logo-area img{
    width:90px;
}

.menu hr{
    border: none;
    height: 1px;
    background: var(--border);
    margin: 10px 0;
}

.menu{
    display:flex;
    flex-direction:column;
    gap:6px;
}

.menu a{
    display:flex;
    align-items:center;
    gap:10px;
    padding:10px;
    border-radius:10px;
    text-decoration:none;
    color:var(--text);
    font-size:14px;
    transition:0.2s;
}

.menu a:hover{
    background:var(--card);
    transform:translateX(5px);
}

.menu a.active{
    background:var(--accent);
    color:#000;
    font-weight:bold;
}

/* =========================
📄 CONTEÚDO
========================= */

.conteudo{
    margin-left:220px;
    padding:20px;
    max-width:1300px;
    width:calc(100% - 220px);
}

/* =========================
📊 GRID DE CARDS (NOVO)
========================= */

.cards{
    display:grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap:15px;
    margin-top:20px;
}

/* =========================
📊 CARD (UPGRADE)
========================= */

.card{
    background:linear-gradient(145deg, #1e293b, #0f172a);
    border-radius:14px;
    padding:18px;
    box-shadow:0 4px 15px rgba(0,0,0,0.4);
    transition:0.2s;
}

.card:hover{
    transform:translateY(-3px);
    box-shadow:0 6px 25px rgba(0,0,0,0.6);
}

/* TEXTO CARD */

.card h3{
    font-size:14px;
    opacity:0.7;
    margin-bottom:5px;
}

.card div{
    font-size:26px;
    font-weight:bold;
    color:#38bdf8;
}

/* =========================
📋 TABELA
========================= */

table{
    width:100%;
    border-collapse:collapse;
    background:var(--card);
    border-radius:12px;
    overflow:hidden;
}

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

th{
    background:#1e293b;
    color:#94a3b8;
    cursor:pointer;
}

body.light th{
    background:#e2e8f0;
    color:#0f172a;
}

tr:nth-child(even){
    background:rgba(255,255,255,0.02);
}

tr:hover{
    background:#0d1628;
    transition:0.2s;
}

/* =========================
🟢 STATUS
========================= */

.online{color:#22c55e;font-weight:bold;}
.offline{color:#ef4444;font-weight:bold;}

/* =========================
🚨 ALERTAS
========================= */

.alerta{
    background:#7f1d1d;
    padding:12px;
    margin-top:10px;
    border-radius:10px;
}

.alerta-piscando{
    animation:piscar 1s infinite;
}

@keyframes piscar{
    0%{opacity:1}
    50%{opacity:0.3}
    100%{opacity:1}
}

/* =========================
🔘 BOTÕES
========================= */

.toggle{
    position:fixed;
    top:20px;
    right:20px;
    background:var(--card);
    padding:10px;
    border-radius:10px;
    cursor:pointer;
}

.tv-btn{
    position:fixed;
    top:20px;
    right:80px;
    background:var(--accent);
    color:#000;
    padding:10px;
    border:none;
    border-radius:10px;
    cursor:pointer;
    font-weight:bold;
}

/* =========================
📺 TV MODE
========================= */

.tv-mode .sidebar{
    display:none;
}

.tv-mode .conteudo{
    margin-left:0;
}

.tv-mode .card{
    transform:scale(1.2);
}

/* =========================
🔍 INPUT
========================= */

input{
    padding:12px;
    border-radius:10px;
    border:none;
    background:var(--card);
    color:var(--text);
}

/* =========================
🔐 LOGOUT
========================= */

.menu-bottom{
    position:absolute;
    bottom:20px;
    width:100%;
}

.logout-btn{
    width:100%;
    background:#ef4444;
    border:none;
    padding:10px;
    border-radius:8px;
    color:white;
    cursor:pointer;
}

/* =========================
📌 MODAL
========================= */

.modal{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,0.6);
    display:flex;
    justify-content:center;
    align-items:center;
}

.modal-content{
    background:#0f172a;
    padding:20px;
    border-radius:12px;
    width:500px;
    max-height:90vh;
    overflow:auto;
}

/* =========================
📦 KANBAN
========================= */

.kanban{
    display:flex;
    gap:15px;
}

.coluna{
    flex:1;
    background:#111827;
    padding:10px;
    border-radius:10px;
}

.servidor-card {
display:flex;
flex-direction:column;
gap:10px;
}

.servidor-card .topo {
display:flex;
justify-content:space-between;
font-weight:bold;
}

.servidor-card .nome {
font-size:16px;
}

.servidor-card .info {
font-size:14px;
opacity:0.8;
}

.status.online {
color:#22c55e;
}

.status.offline {
color:#ef4444;
}

.barra {
height: 8px;
background: #1e293b;
border-radius: 6px;
overflow: hidden;
margin-top: 6px;
}

.barra-fill {
height: 100%;
transition: 0.3s;
}

.barra-verde { background: #22c55e; }
.barra-amarelo { background: #facc15; }
.barra-vermelho { background: #ef4444; }

.servidor-critico {
border: 2px solid #ef4444;
animation: piscar 1s infinite;
}

@keyframes piscar {
0% {opacity:1}
50% {opacity:0.5}
100% {opacity:1}
}

.ranking-card {
background: #0f172a;
padding: 10px;
border-radius: 10px;
margin-bottom: 8px;
display: flex;
justify-content: space-between;
font-size: 14px;
}

/* =========================
🔐 PERMISSÕES (USUÁRIOS)
========================= */

.permissoes{
    display:grid;
    grid-template-columns: 1fr 1fr;
    gap:10px;
    margin-top:15px;
}

.permissoes label{
    display:flex;
    align-items:center;
    gap:10px;
    background:rgba(255,255,255,0.03);
    padding:10px;
    border-radius:8px;
    cursor:pointer;
    transition:0.2s;
}

.permissoes label:hover{
    background:rgba(255,255,255,0.08);
}

.permissoes input{
    width:16px;
    height:16px;
    cursor:pointer;
}
