:root {
    --bg-color: #0f172a;
    --panel-bg: #1e293b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --azul: #3b82f6;
    --vermelho: #ef4444;
    --accent: #10b981;
    --secondary: #475569;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.container {
    width: 95%;
    max-width: 1800px;
    background-color: var(--panel-bg);
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    padding: 2rem;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 1rem;
}

h1 {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.025em;
}

.controls {
    display: flex;
    gap: 0.5rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
}

.btn-primary {
    background-color: var(--accent);
    color: white;
}

.btn-secondary {
    background-color: var(--secondary);
    color: white;
}

.btn-danger {
    background-color: transparent;
    border: 1px solid var(--text-muted);
    color: var(--text-muted);
}
.btn-danger:hover {
    background-color: rgba(255,0,0,0.1);
    border-color: #ef4444;
    color: #ef4444;
}

/* Layout */
.main-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
}

.left-col {
    flex: 1 1 65%;
    min-width: 0;
}

.right-col {
    flex: 1 1 300px;
    min-width: 300px;
}

/* Config Panel Styles */
.config-panel {
    background-color: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.config-panel.hidden {
    display: none;
}

.config-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.config-header h2 {
    font-size: 1.2rem;
    color: var(--text-muted);
}

.btn-icon {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
}
.btn-icon:hover { color: white; }

.table-container {
    overflow-x: auto;
}

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

th, td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

th {
    font-size: 0.85rem;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

input[type="number"] {
    background-color: rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.1);
    color: white;
    padding: 0.5rem;
    border-radius: 6px;
    width: 100%;
    font-family: 'Inter', sans-serif;
}
input[type="number"]:focus {
    outline: none;
    border-color: var(--azul);
}

/* Dashboard Styles */
.dashboard {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 1.5rem;
}

.status-panel {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.stat-box {
    background-color: rgba(255,255,255,0.03);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.05);
}

.stat-box h3 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.percentage {
    font-size: 2.2rem;
    font-weight: 800;
}

.candid-azul .percentage { color: var(--azul); }
.candid-vermelho .percentage { color: var(--vermelho); }

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: rgba(255,255,255,0.1);
    border-radius: 4px;
    margin: 1rem 0 0.5rem;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: var(--accent);
    width: 0%;
    transition: width 0.5s ease;
}

.chart-container {
    background-color: rgba(0,0,0,0.2);
    border-radius: 12px;
    padding: 1.5rem;
    position: relative;
    height: 500px;
}

/* Guide Panel */
.guide-panel {
    background-color: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 12px;
    padding: 1.5rem;
    height: fit-content;
}

.guide-panel h2 {
    font-size: 1.1rem;
    color: var(--text-main);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.guide-content p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 1rem;
}

.guide-content h3 {
    font-size: 0.95rem;
    color: var(--accent);
    margin-bottom: 0.5rem;
    margin-top: 1.5rem;
}

.guide-content ul {
    list-style: none;
    padding-left: 0.5rem;
    margin-bottom: 1rem;
}

.guide-content li {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.3rem;
    position: relative;
    padding-left: 1rem;
}

.guide-content li::before {
    content: "•";
    color: var(--accent);
    position: absolute;
    left: 0;
    top: 0;
}

@media (max-width: 1400px) {
    .dashboard {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .main-layout {
        flex-direction: column;
    }
    .left-col, .right-col {
        flex: 1 1 100%;
        width: 100%;
    }
}
