/* Mad Agent — Central de Comando (admin) — chrome do painel flutuante.
 * Gêmeo do mad-copilot.css, painel mais largo (a Central tem 2 colunas).
 * Carregado via <link> no layout. O conteúdo (iframe) traz seu próprio tema. */

.notch-agent-console-btn i { color: #F26B1F; } /* Build Orange — distingue do copilot (azul) */

.mad-agent-console-panel {
    position: fixed;
    right: 18px; bottom: 18px;
    width: 760px; max-width: calc(100vw - 24px);
    height: min(820px, 88vh);
    background: #0b0b0f;
    border: 1px solid rgba(0, 0, 0, .18);
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .34);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 99999;
    transition: top .2s ease, left .2s ease, right .2s ease, bottom .2s ease, width .2s ease, height .2s ease;
}
.mad-agent-console-panel.open { display: flex; animation: madAgentConsoleIn .18s ease; }
@keyframes madAgentConsoleIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.mad-agent-console-panel.maximized { left: 24px; right: 24px; top: 24px; bottom: 24px; width: auto; height: auto; max-width: 1480px; margin: auto; }

/* translateZ(0): camada de compositing própria pro iframe (evita o flicker de
 * border-radius + iframe cross-origin do Chromium — mesma guarda do copilot). */
.mad-agent-console-body { flex: 1 1 auto; min-height: 0; background: #0b0b0f; transform: translateZ(0); }
.mad-agent-console-body iframe { border: 0; width: 100%; height: 100%; display: block; }

.mad-agent-console-empty { padding: 18px; font-size: 13px; color: #bbb; line-height: 1.5; background: #15151b; height: 100%; box-sizing: border-box; }
.mad-agent-console-empty code { background: #262630; padding: 1px 5px; border-radius: 4px; }

@media (max-width: 820px) {
    .mad-agent-console-panel { right: 8px; bottom: 8px; left: 8px; width: auto; height: 88vh; }
    .mad-agent-console-panel.maximized { left: 8px; right: 8px; top: 8px; bottom: 8px; }
}

/* Guarda backdrop-filter x iframe cross-origin (mesma do copilot). */
html.mad-agent-console-open body * {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}
