:root {
    --bg-dark: #050608;
    --bg-panel: #0f111a;
    --border: #1f2937;
    --primary: #3b82f6;
    --accent: #00f2ff;
    --accent-purple: #8b5cf6;
    --text-main: #e2e8f0;
    --text-muted: #94a3b8;
    --header-height: 60px;
    --gap: 12px;
}

body { background-color: var(--bg-dark); color: var(--text-main); font-family: 'Inter', sans-serif; margin: 0; height: 100vh; display: flex; flex-direction: column; overflow: hidden; }

/* HEADER */
.top-bar { background: rgba(15, 17, 26, 0.95); border-bottom: 1px solid var(--border); height: var(--header-height); padding: 0 25px; display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; }
.logo { font-weight: 800; font-size: 1.1rem; letter-spacing: 1px; color: white; }
.nav-link { color: var(--text-muted); font-weight: 600; font-size: 0.82rem; padding: 8px 18px; border-radius: 6px; transition: 0.2s; text-transform: uppercase; border: 1px solid transparent; cursor: pointer; }

/* CORES ORIGINAIS DOS BOTÕES */
.nav-link.active-flowspec { background: var(--accent) !important; color: black !important; box-shadow: 0 0 15px rgba(0, 242, 255, 0.3); }
.nav-link.active-global { background: var(--primary) !important; color: white !important; box-shadow: 0 0 15px rgba(59, 130, 246, 0.3); }
.nav-link.active-inbound { background: #ef4444 !important; color: white !important; box-shadow: 0 0 15px rgba(239, 68, 68, 0.3); }
.nav-link.active-outbound { background: #f59e0b !important; color: white !important; box-shadow: 0 0 15px rgba(245, 158, 11, 0.3); }
.nav-link.active-forensics { background: var(--accent-purple) !important; color: white !important; box-shadow: 0 0 15px rgba(139, 92, 246, 0.3); }

/* LAYOUT DINÂMICO ORIGINAL */
.dashboard-content { flex-grow: 1; padding: 12px; display: none; opacity: 0; transition: opacity 0.3s; height: calc(100vh - var(--header-height)); flex-direction: column; gap: var(--gap); }
.dashboard-content.active { display: flex; opacity: 1; }

.row-flex { display: flex; width: 100%; gap: var(--gap); min-height: 0; }
.col-flex { display: flex; flex-direction: column; gap: var(--gap); min-width: 0; flex-shrink: 0; }

/* LARGURAS RÍGIDAS ORIGINAIS */
.w-25p { width: calc(25% - (var(--gap) * 0.75)); flex-basis: 25%; }
.w-33p { width: calc(33.33% - (var(--gap) * 0.66)); flex-basis: 33.33%; }
.w-50p { width: calc(50% - (var(--gap) * 0.5)); flex-basis: 50%; }
.w-60p { width: calc(60% - (var(--gap) * 0.4)); flex-basis: 60%; }
.w-66p { width: calc(66.66% - (var(--gap) * 0.33)); flex-basis: 66.66%; }
.w-100p { width: 100%; flex-basis: 100%; }

/* ALTURAS POR ABA ORIGINAIS + FLOWSPEC */
#view-flowspec .row-flex:nth-child(1) { flex: 0.15; }
#view-flowspec .row-flex:nth-child(2) { flex: 0.85; }

#view-overview .row-flex:nth-child(1) { flex: 0.35; }
#view-overview .row-flex:nth-child(2) { flex: 0.65; }

#view-inbound .row-flex { flex: 1; }

#view-outbound .row-flex:nth-child(1) { flex: 0.40; }
#view-outbound .row-flex:nth-child(2) { flex: 0.60; }

#view-forensics .row-flex:nth-child(1) { flex: 0.30; }
#view-forensics .row-flex:nth-child(2) { flex: 0.35; }
#view-forensics .row-flex:nth-child(3) { flex: 0.35; }

/* COMPONENTES */
.card-box { background: var(--bg-panel); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; height: 100%; }
.card-header-sm { padding: 0 15px; border-bottom: 1px solid var(--border); background: rgba(255,255,255,0.02); font-size: 0.72rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; height: 36px; display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; }
.iframe-container { flex: 1; position: relative; background: var(--bg-panel); overflow: hidden; }
iframe { width: 100%; height: 100%; border: none; display: block; }

/* TABELA SOC */
.table-soc { font-size: 0.8rem; color: var(--text-main); }
.table-soc thead th { background: #1a1c26; color: var(--accent); border-bottom: 1px solid var(--border); padding: 12px; text-align: left; }
.table-soc td { border-bottom: 1px solid rgba(255,255,255,0.05); padding: 10px 12px; vertical-align: middle; }

/* MODAIS */
.modal-content { background: #0f111a; border: 1px solid var(--accent); color: white; }
.modal-header { border-bottom: 1px solid var(--border); }
.btn-close { filter: invert(1); }

.pulse { animation: pulse-red 2s infinite; }
@keyframes pulse-red { 0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); } 70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); } 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); } }

.time-control-group { display: flex; background: #0a0c14; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.time-select-preset { background: #0a0c14; color: #fff; border: none; padding: 5px 12px; font-size: 0.8rem; cursor: pointer; outline: none; }

/* LOADER */
#loader-layer { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: var(--bg-dark); z-index: 9999; display: flex; flex-direction: column; align-items: center; justify-content: center; transition: opacity 0.6s ease; }
