/* --- RESET & GLOBAL (Compartilhado com Settings) --- */
:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --warning-color: #f59e0b;
    --warning-hover: #d97706;
    --danger-color: #ef4444;
    --bg-sidebar: #0f172a;
    --bg-content: #f1f5f9;
    --text-dark: #1e293b;
    --border-color: #e2e8f0;
}

body {
    margin: 0;
    font-family: 'Inter', -apple-system, sans-serif;
    background-color: var(--bg-content);
    color: var(--text-dark);
}

/* LAYOUT DASHBOARD */
.dashboard-wrapper {
    display: flex;
    height: 100vh;
}

/* SIDEBAR */
.sidebar {
    width: 260px;
    background-color: var(--bg-sidebar);
    color: white;
    display: flex;
    flex-direction: column;
    padding: 20px;
    flex-shrink: 0;
}

.brand {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #60a5fa;
}

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

.menu-item {
    text-decoration: none;
    color: #94a3b8;
    padding: 12px 15px;
    border-radius: 8px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 12px;
}
.menu-item:hover { background-color: rgba(255,255,255,0.05); color: white; }
.menu-item.active { background-color: var(--primary-color); color: white; }

.sidebar-footer { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; }
.status-indicator { color: #94a3b8; font-size: 0.85rem; display: flex; align-items: center; gap: 8px; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot.online { background-color: #10b981; box-shadow: 0 0 5px #10b981; }

/* CONTENT AREA */
.content-area { flex: 1; padding: 30px 40px; overflow-y: auto; }

.section-header { margin-bottom: 30px; }
.section-header h2 { margin: 0; font-size: 1.8rem; color: #0f172a; }
.section-header p { color: #64748b; margin-top: 5px; }

/* --- ESTILOS ESPECÍFICOS DA OPERAÇÃO --- */

.operation-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

/* Cards de Controle */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
    padding: 20px;
    margin-bottom: 20px;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}
.card-header i { font-size: 1.5rem; color: #64748b; }
.card-header h3 { margin: 0; font-size: 1.2rem; }

.input-wrapper { margin-bottom: 20px; }
.input-wrapper label { display: block; margin-bottom: 8px; font-weight: 600; font-size: 0.9rem; color: #64748b; }
.input-wrapper input {
    width: 100%; padding: 12px; font-size: 1rem;
    border: 1px solid var(--border-color); border-radius: 6px; box-sizing: border-box;
}

.card-desc { color: #64748b; margin-bottom: 20px; font-size: 0.9rem; }

/* Botões de Ação */
.btn-action {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    transition: filter 0.2s, transform 0.1s;
    color: white;
}
.btn-action:hover { filter: brightness(110%); }
.btn-action:active { transform: scale(0.98); }
.btn-action:disabled { background-color: #cbd5e1; cursor: not-allowed; transform: none; filter: none; }

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

/* Terminal de Logs */
.log-card {
    height: 600px;
    padding: 0; /* Remover padding do container principal */
    display: flex;
    flex-direction: column;
    background-color: #1e293b;
    border-color: #334155;
    overflow: hidden;
}

.card-header-small {
    padding: 15px;
    background-color: #0f172a;
    border-bottom: 1px solid #334155;
    color: #e2e8f0;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-clear {
    background: none; border: 1px solid #475569; color: #94a3b8;
    padding: 4px 10px; border-radius: 4px; cursor: pointer; font-size: 0.8rem;
}
.btn-clear:hover { color: white; border-color: white; }

.terminal-body {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    color: #cbd5e1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.log-entry { padding: 8px; border-radius: 4px; border-left: 3px solid transparent; background: rgba(0,0,0,0.2); }
.log-entry.system { color: #94a3b8; }
.log-entry.success { border-left-color: #10b981; color: #10b981; background: rgba(16, 185, 129, 0.05); }
.log-entry.error { border-left-color: #ef4444; color: #ef4444; background: rgba(239, 68, 68, 0.05); }
.timestamp { color: #64748b; font-size: 0.8em; margin-right: 8px; }


/* --- LÓGICA DE ABAS (Troca de Tela) --- */

/* 1. Por padrão, todas as seções ficam escondidas */
.content-section {
    display: none;
}

/* 2. Apenas a seção que tiver a classe 'active' aparece */
.content-section.active {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

/* Animação suave de entrada */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- ESTILO DE MOCK (Em Desenvolvimento) --- */
.mock-content {
    text-align: center;
    padding: 80px 20px;
    color: #94a3b8;
    background: white;
    border-radius: 12px;
    border: 1px solid var(--border-color, #e2e8f0);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.mock-content i {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.3;
    color: var(--text-dark, #1e293b);
}

.mock-content h3 {
    margin: 10px 0;
    font-size: 1.5rem;
    color: var(--text-dark, #1e293b);
}

/* Responsividade */
@media (max-width: 900px) {
    .operation-grid { grid-template-columns: 1fr; }
    .sidebar { display: none; } /* Em mobile esconderia, mas ideal é fazer um menu toggle */
    .dashboard-wrapper { flex-direction: column; }
    .content-area { padding: 20px; }
}