/* --- ESTILOS GERAIS & TEMA ESCURO --- */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}



body {
    background-color: #050505;
    color: #ffffff;
    display: flex;
    height: 100vh;
    overflow: hidden;
}



/* --- SIDEBAR (MENU ESQUERDA) --- */

.sidebar {
    width: 260px;
    background-color: #111111;
    border-right: 2px solid #5d259c; /* Linha roxa do layout */

    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 25px;
    height: 100%;
}



    .sidebar h2 {
        font-size: 1.2rem;
        font-weight: 600;
        letter-spacing: 1px;
    }



.section-title {
    font-size: 0.95rem;
    color: #dddddd;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}



/* Área de Variáveis com Scroll */

.variables-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}



.variables-list {
    max-height: 150px;
    overflow-y: auto;
    padding-right: 5px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}



/* Customização da barra de rolagem (Scrollbar) */

::-webkit-scrollbar {
    width: 6px;
}



::-webkit-scrollbar-track {
    background: #1a1a1a;
    border-radius: 4px;
}



::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}



    ::-webkit-scrollbar-thumb:hover {
        background: #444;
    }



.var-item {
    font-size: 1.1rem;
    background: #1a1a1a;
    padding: 6px 12px;
    border-radius: 6px;
}



/* Botões Superiores */

.btn-circle {
    width: 40px;
    height: 30px;
    background-color: #222222;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: background 0.2s;
}



    .btn-circle:hover {
        background-color: #333333;
    }



.btn-action {
    background-color: #2a2a2a;
    color: #ffffff;
    border: none;
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.2s;
}



    .btn-action:hover {
        background-color: #3a3a3a;
    }



/* NOVOS BOTÕES DE BAIXO (Separados para não quebrar os de cima) */

.btn-footer {
    border: none;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    color: white;
    flex: 1;
    transition: opacity 0.2s;
}



    .btn-footer:hover {
        opacity: 0.9;
    }



.btn-primary {
    background-color: #5d259c;
}



.btn-danger {
    background-color: #c92a2a;
}



.row-align {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}



/* Lista de restrições salvas */

.restrictions-sidebar-list {
    max-height: 180px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.9rem;
    color: #ccc;
}



.restriction-item {
    background: #161616;
    padding: 8px;
    border-radius: 6px;
    border-left: 3px solid #5d259c;
}



/* --- PAINEL PRINCIPAL (GRID DE 4 BLOCOS) --- */

.main-content {
    flex: 1;
    padding: 25px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 25px;
    background-color: #050505;
}



.card {
    background-color: #0f0f0f;
    border-radius: 24px;
    padding: 20px;
    overflow: auto;
    border: 1px solid #161616;
}



.card-title {
    font-size: 1rem;
    color: #aaa;
    margin-bottom: 15px;
    text-transform: uppercase;
    font-weight: 600;
}



.simplex-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 0.9rem;
}



    .simplex-table th, .simplex-table td {
        border: 1px solid #222;
        padding: 8px;
        text-align: center;
    }



    .simplex-table th {
        background-color: #161616;
    }



.chart-container {
    width: 100%;
    height: 80%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #141414;
    border-radius: 12px;
    margin-bottom: 10px;
}



/* --- MODAIS (TELAS EM OVERLAY COM BLUR) --- */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}



    .modal-overlay.active {
        opacity: 1;
        pointer-events: auto;
    }



.modal-container {
    background-color: #0b0b0b;
    border: 1px solid #222;
    border-radius: 16px;
    padding: 25px;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}



.modal-header {
    font-size: 1.1rem;
    text-align: center;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: bold;
}



.modal-body {
    max-height: 250px;
    overflow-y: auto;
    margin-bottom: 20px;
    padding-right: 5px;
}



.modal-input-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 1.1rem;
}



.modal-input {
    background-color: #1c1c1c;
    border: none;
    border-radius: 20px;
    color: white;
    padding: 8px 15px;
    width: 100px;
    text-align: center;
    outline: none;
    font-size: 1rem;
}



    .modal-input:focus {
        background-color: #252525;
        box-shadow: 0 0 0 1px #5d259c;
    }



.btn-submit {
    width: 100%;
    background-color: #5d259c;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
}



    .btn-submit:hover {
        background-color: #7432c2;
    }
