/* ============================================================
   AOS-Pro Dark Theme — Design System
   Paleta: Dark Navy + Ciano #00BCD4
   Versão: 1.0 | Meruem (CSS Sênior)
   ============================================================ */
:root {
    --bg-primary:      #0B1426;
    --bg-surface:      #111D35;
    --bg-surface-2:    #162042;
    --bg-input:        #0D1A2D;
    --bg-hover:        #1A2940;
    --accent-primary:  #00BCD4;
    --accent-hover:    #26C6DA;
    --accent-glow:     rgba(0, 188, 212, 0.15);
    --text-primary:    #FFFFFF;
    --text-secondary:  #8899AA;
    --text-muted:      #556677;
    --border-default:  #1A2940;
    --border-accent:   rgba(0, 188, 212, 0.3);
    --status-success:  #00E676;
    --status-warning:  #FFC107;
    --status-error:    #FF5252;
    --status-info:     #448AFF;
    --radius-sm:       4px;
    --radius-md:       8px;
    --radius-lg:       12px;
    --shadow-sm:       0 1px 4px rgba(0,0,0,0.3);
    --shadow-md:       0 4px 16px rgba(0,0,0,0.4);
    --shadow-accent:   0 0 20px rgba(0, 188, 212, 0.15);
    --transition-fast: 150ms ease;
    --transition-med:  250ms ease;
}
*,*::before,*::after { box-sizing: border-box; }

/* KPI CARD */
.aospro-kpi-card {
    background: var(--bg-surface); border: 1px solid var(--border-default);
    border-radius: var(--radius-md); padding: 20px 24px;
    display: flex; align-items: center; gap: 16px;
    transition: border-color var(--transition-med), box-shadow var(--transition-med);
}
.aospro-kpi-card:hover { border-color: var(--border-accent); box-shadow: var(--shadow-accent); }
.aospro-kpi-card .kpi-icon {
    width: 48px; height: 48px; border-radius: var(--radius-md);
    background: var(--accent-glow); border: 1px solid var(--border-accent);
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; color: var(--accent-primary); flex-shrink: 0;
}
.aospro-kpi-card .kpi-value { font-size: 28px; font-weight: 700; color: var(--text-primary); line-height: 1; }
.aospro-kpi-card .kpi-label { font-size: 12px; color: var(--text-secondary); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.5px; }

/* TABLE */
.aospro-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.aospro-table th {
    text-align: left; padding: 10px 12px; color: var(--text-secondary);
    font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: 0.6px;
    border-bottom: 1px solid var(--border-default);
}
.aospro-table td { padding: 12px; border-bottom: 1px solid var(--border-default); color: var(--text-primary); vertical-align: middle; }
.aospro-table tbody tr:hover td { background: var(--bg-hover); }

/* BADGE */
.badge-aospro {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 10px; border-radius: 20px; font-size: 11px;
    font-weight: 600; text-transform: uppercase; letter-spacing: 0.4px;
}
.badge-aospro.success  { background: rgba(0,230,118,0.12);  color: var(--status-success); border: 1px solid rgba(0,230,118,0.25); }
.badge-aospro.warning  { background: rgba(255,193,7,0.12);  color: var(--status-warning); border: 1px solid rgba(255,193,7,0.25); }
.badge-aospro.danger   { background: rgba(255,82,82,0.12);  color: var(--status-error);   border: 1px solid rgba(255,82,82,0.25); }
.badge-aospro.info     { background: rgba(68,138,255,0.12); color: var(--status-info);    border: 1px solid rgba(68,138,255,0.25); }
.badge-aospro.secondary{ background: rgba(136,153,170,0.1); color: var(--text-secondary); border: 1px solid var(--border-default); }

/* BTN */
.btn-aospro {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 16px; background: var(--accent-primary); color: #000;
    font-weight: 600; font-size: 13px; border: none; border-radius: var(--radius-sm);
    cursor: pointer; transition: background var(--transition-fast), transform var(--transition-fast);
    text-decoration: none;
}
.btn-aospro:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn-aospro.outline { background: transparent; color: var(--accent-primary); border: 1px solid var(--border-accent); }
.btn-aospro.outline:hover { background: var(--accent-glow); }
.btn-aospro.ghost { background: transparent; color: var(--text-secondary); border: 1px solid var(--border-default); }
.btn-aospro.ghost:hover { border-color: var(--border-accent); color: var(--accent-primary); }
.btn-aospro.danger-ghost { background: transparent; color: var(--status-error); border: 1px solid rgba(255,82,82,0.3); }
.btn-aospro.danger-ghost:hover { background: rgba(255,82,82,0.1); }

/* CARD */
.aospro-card {
    background: var(--bg-surface); border: 1px solid var(--border-default);
    border-radius: var(--radius-md); overflow: hidden;
    transition: border-color var(--transition-med), box-shadow var(--transition-med);
}
.aospro-card:hover { border-color: var(--border-accent); box-shadow: var(--shadow-accent); }
.aospro-card .card-header {
    padding: 16px 20px; border-bottom: 1px solid var(--border-default);
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.aospro-card .card-body { padding: 20px; }
.aospro-card .card-title {
    font-size: 15px; font-weight: 600; color: var(--text-primary);
    display: flex; align-items: center; gap: 8px;
}
.aospro-card .card-title i { color: var(--accent-primary); font-size: 16px; }

/* INPUTS */
.aospro-input, .aospro-select, .aospro-textarea {
    width: 100%; background: var(--bg-input); border: 1px solid var(--border-default);
    border-radius: var(--radius-sm); color: var(--text-primary); padding: 8px 12px;
    font-size: 14px; transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    outline: none;
}
.aospro-input::placeholder, .aospro-textarea::placeholder { color: var(--text-muted); }
.aospro-input:focus, .aospro-select:focus, .aospro-textarea:focus {
    border-color: var(--accent-primary); box-shadow: 0 0 0 3px var(--accent-glow);
}
.aospro-select option { background: var(--bg-surface); }
.aospro-label { display: block; font-size: 12px; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.5px; }

/* MODAL */
.aospro-modal-overlay {
    position: fixed; inset: 0; background: rgba(11,20,38,0.85);
    backdrop-filter: blur(4px); z-index: 1000;
    display: flex; align-items: center; justify-content: center;
    animation: fadeIn 0.15s ease;
}
.aospro-modal {
    background: var(--bg-surface); border: 1px solid var(--border-default);
    border-radius: var(--radius-lg); width: 100%; max-width: 640px;
    max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-md);
    animation: slideUp 0.2s ease;
}
.aospro-modal.wide { max-width: 900px; }
.aospro-modal .modal-header {
    padding: 20px 24px 16px; display: flex; align-items: center;
    justify-content: space-between; border-bottom: 1px solid var(--border-default);
}
.aospro-modal .modal-title { font-size: 16px; font-weight: 700; color: var(--text-primary); display: flex; align-items: center; gap: 8px; }
.aospro-modal .modal-title i { color: var(--accent-primary); }
.aospro-modal .modal-body { padding: 24px; }
.aospro-modal .modal-footer { padding: 16px 24px; border-top: 1px solid var(--border-default); display: flex; justify-content: flex-end; gap: 8px; }
.aospro-modal-close {
    background: none; border: none; color: var(--text-secondary); cursor: pointer;
    padding: 4px; border-radius: var(--radius-sm); font-size: 18px; line-height: 1;
    transition: color var(--transition-fast), background var(--transition-fast);
}
.aospro-modal-close:hover { color: var(--text-primary); background: var(--bg-hover); }

/* STEPPER */
.aospro-stepper { display: flex; align-items: center; gap: 0; margin-bottom: 24px; }
.aospro-stepper .step { flex: 1; display: flex; flex-direction: column; align-items: center; position: relative; }
.aospro-stepper .step:not(:last-child)::after {
    content: ''; position: absolute; top: 16px; left: 50%;
    width: 100%; height: 2px; background: var(--border-default); z-index: 0;
}
.aospro-stepper .step.active:not(:last-child)::after,
.aospro-stepper .step.done:not(:last-child)::after { background: var(--accent-primary); }
.aospro-stepper .step-dot {
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--bg-surface-2); border: 2px solid var(--border-default);
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 700; color: var(--text-muted); z-index: 1;
    transition: all var(--transition-med);
}
.aospro-stepper .step.active .step-dot { border-color: var(--accent-primary); color: var(--accent-primary); background: var(--accent-glow); box-shadow: 0 0 12px var(--accent-glow); }
.aospro-stepper .step.done .step-dot { background: var(--accent-primary); border-color: var(--accent-primary); color: #000; }
.aospro-stepper .step-label { font-size: 11px; color: var(--text-muted); margin-top: 6px; text-align: center; text-transform: uppercase; letter-spacing: 0.4px; }
.aospro-stepper .step.active .step-label { color: var(--accent-primary); }
.aospro-stepper .step.done .step-label { color: var(--status-success); }

/* LOG STREAM */
.aospro-log-stream {
    background: #060e1c; border: 1px solid var(--border-default);
    border-radius: var(--radius-md); padding: 16px;
    font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
    font-size: 12px; max-height: 320px; overflow-y: auto; line-height: 1.6;
}
.aospro-log-stream::-webkit-scrollbar { width: 4px; }
.aospro-log-stream::-webkit-scrollbar-thumb { background: var(--border-default); border-radius: 2px; }
.log-entry { display: flex; gap: 8px; margin: 2px 0; }
.log-timestamp { color: var(--text-muted); flex-shrink: 0; }
.log-entry.success .log-msg { color: var(--status-success); }
.log-entry.info    .log-msg { color: var(--accent-primary); }
.log-entry.warning .log-msg { color: var(--status-warning); }
.log-entry.error   .log-msg { color: var(--status-error); }
.log-entry.default .log-msg { color: var(--text-secondary); }

/* SECTION HEADER */
.aospro-section-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--border-default);
}
.aospro-section-header h2 { font-size: 18px; font-weight: 700; color: var(--text-primary); display: flex; align-items: center; gap: 10px; margin: 0; }
.aospro-section-header h2 .section-icon {
    width: 32px; height: 32px; background: var(--accent-glow); border: 1px solid var(--border-accent);
    border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center;
    color: var(--accent-primary); font-size: 14px;
}

/* AGENT NODES */
.agent-hierarchy { position: relative; }
.agent-node {
    background: var(--bg-surface); border: 1px solid var(--border-default);
    border-radius: var(--radius-md); padding: 12px 16px;
    display: flex; align-items: center; gap: 12px;
    transition: border-color var(--transition-fast);
}
.agent-node:hover { border-color: var(--border-accent); }
.agent-node.orchestrator { border-color: var(--accent-primary); background: rgba(0,188,212,0.05); }
.agent-node .node-icon {
    width: 36px; height: 36px; border-radius: var(--radius-sm);
    background: var(--accent-glow); border: 1px solid var(--border-accent);
    display: flex; align-items: center; justify-content: center;
    color: var(--accent-primary); font-size: 16px; flex-shrink: 0;
}
.agent-connector { width: 2px; height: 24px; background: var(--border-default); margin: 4px auto; }
.agent-connector.active { background: linear-gradient(to bottom, var(--accent-primary), var(--border-default)); }

/* EMPTY STATE */
.aospro-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 60px 20px; text-align: center; }
.aospro-empty .empty-icon { font-size: 48px; color: var(--text-muted); margin-bottom: 16px; opacity: 0.5; }
.aospro-empty .empty-title { font-size: 16px; font-weight: 600; color: var(--text-secondary); margin-bottom: 8px; }
.aospro-empty .empty-desc { font-size: 13px; color: var(--text-muted); max-width: 320px; line-height: 1.5; }

/* ANIMATIONS */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(16px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes pulse-accent { 0%,100% { box-shadow: 0 0 0 0 var(--accent-glow); } 50% { box-shadow: 0 0 0 8px transparent; } }
.pulse-accent { animation: pulse-accent 2s infinite; }

/* SCROLLBAR */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border-default); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* UTILS */
.text-accent    { color: var(--accent-primary) !important; }
.text-muted-ao  { color: var(--text-muted) !important; }
.text-secondary-ao { color: var(--text-secondary) !important; }
.bg-surface-ao  { background: var(--bg-surface) !important; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-1 { flex: 1; }
.nav-section-label { padding: 20px 16px 6px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); }
