:root {
    --bg: #0b0f19;
    --panel: #111827;
    --panel-2: #0f172a;
    --text: rgba(255,255,255,.90);
    --muted: #94a3b8;
    --border: rgba(255,255,255,.10);
    --focus: rgba(99,102,241,.55);
    --work-h: 520px;
}

body.ui-dark {
    --bg: #0b1220;
    --panel: #0f172a;
    --panel-2: #111c33;
    --text: #e5e7eb;
    --muted: #9ca3af;
    --border: rgba(255,255,255,.12);
    --focus: rgba(99,102,241,.55);
}

o container do editor deve preencher o host
#scriptEditor {
    height: var(--work-h) !important;
    width: 100% !important;
}

 /*o "bloco de trabalho" do editor: cresce e segura o Monaco*/
.editor-host {
    height: var(--work-h) !important;
}

body.ui-light {
    --bg: #f6f7fb;
    --panel: #ffffff;
    --panel-2: #f3f4f6;
    --text: #111827;
    --muted: #4b5563;
    --border: rgba(17,24,39,.16);
    --focus: rgba(37,99,235,.35);
}

/*body.ui-dark, body.ui-light {
    background: var(--bg);
    color: var(--text);
}*/

html, body {
    height: 100%;
    margin: 0;
    background: var(--bg);
    color: var(--text);
}

.panel {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 0;
    color: var(--text);
}

.panel-title {
    color: var(--text);
}

.panel-toolbar {
    color: var(--text);
}

.panel-footer {
    padding: 10px 12px;
}

.panel-title {
    font-size: 13px;
    color: var(--muted);
    font-weight: 600;
    border-bottom: 1px solid var(--border);
    background: rgba(255,255,255,.02);
}

body.ui-light .panel-title {
    background: rgba(0,0,0,.02);
}

.panel-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--border);
    background: rgba(255,255,255,.02);
}

body.ui-light .panel-toolbar {
    background: rgba(0,0,0,.02);
}

.toolbar-label {
    font-size: 13px;
    color: var(--muted);
    font-weight: 600;
}

.toolbar-select,
select.toolbar-select,
select {
    background: var(--panel-2) !important;
    color: var(--text) !important;
    border: 1px solid var(--border) !important;
    border-radius: 0;
    padding: 6px 10px;
    outline: none;
}

    .toolbar-select:focus,
    select:focus {
        box-shadow: 0 0 0 3px var(--focus);
    }

    /* Options (alguns browsers ignoram, mas ajuda) */
    select option {
        background: var(--panel) !important;
        color: var(--text) !important;
    }

/* Checkbox e textos ao lado */
.optline {
    color: var(--text);
}

    .optline input[type="checkbox"] {
        accent-color: #6366f1; /* ok manter fixo ou trocar por var se quiser */
    }

.panel-footer {
    border-top: 1px solid var(--border);
    background: rgba(255,255,255,.02);
}

body.ui-light .panel-footer {
    background: rgba(0,0,0,.02);
}

.optline {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text);
}

.results-pre {
    background: var(--panel2);
}

/* Botões próprios (sem Bootstrap) */
.btn-min {
    height: 36px;
    padding: 0 12px;
    border-radius: 0;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text);
    font-weight: 500;
    font-size: 13px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: none;
    outline: none;
}

    .btn-min:disabled {
        opacity: .45;
        cursor: default;
    }

.btn-min-primary {
    background: rgba(255,255,255,.08);
}

body.ui-light .btn-min-primary {
    background: rgba(0,0,0,.06);
}

.btn-min:hover:not(:disabled) {
    background: rgba(255,255,255,.10);
}

body.ui-light .btn-min:hover:not(:disabled) {
    background: rgba(0,0,0,.08);
}

.btn-min:focus-visible {
    outline: 2px solid rgba(148,163,184,.35);
    outline-offset: 2px;
}

/* ===== PATCH: sem arredondamento + mais altura + legibilidade ===== */

:root {
    --work-h: 520px;
}

.panel,
.btn,
.panel-title,
.results-pre {
    border-radius: 0 !important;
}

.editor-host {
    height: var(--work-h) !important;
}

#scriptEditor {
    height: var(--work-h) !important;
    width: 100% !important;
}

.results-pre {
    height: var(--work-h) !important;
    color: var(--text) !important;
    background: var(--panel2) !important;
}

.toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.toolbar-label {
    font-size: 13px;
    color: var(--muted);
    font-weight: 600;
}

.toolbar-select {
    height: 36px;
    padding: 0 10px;
    border: 1px solid var(--border);
    background: var(--panel);
    color: var(--text);
    box-sizing: border-box;
}

:root {
    --result-font: 13px;
}

.results-pre {
    font-size: var(--result-font) !important;
    line-height: 1.4;
}

.monaco-editor .overview-ruler {
    width: 14px !important;
}

/* =========================
   app.css (padronizado)
   Layout oficial: .workspace / .panel
   Objetivo: moderno, minimalista, neutro (sem azul/Bootstrap)
   ========================= */

/* --------- Tokens (default: dark) --------- */
/*:root {
    --bg: #0b0f19;
    --panel: #111827;
    --panel2: #0f172a;
    --text: rgba(255,255,255,.90);
    --muted: #94a3b8;
    --border: rgba(255,255,255,.10);
    --mono-font: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    --ui-font: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    --work-h: 420px;*/ /* altura única do bloco de trabalho (editor e resultados) */
    /*--btn-radius: 8px;
}*/

/* --------- Theme switch via body class --------- */
/*body.ui-dark {
    --bg: #0b0f19;
    --panel: #111827;
    --panel2: #0f172a;
    --text: rgba(255,255,255,.90);
    --muted: #94a3b8;
    --border: rgba(255,255,255,.10);
}

body.ui-light {
    --bg: #f6f7fb;
    --panel: #ffffff;
    --panel2: #ffffff;
    --text: rgba(0,0,0,.90);
    --muted: rgba(0,0,0,.65);
    --border: rgba(0,0,0,.12);
}*/

/* --------- Base --------- */
/*html, body {
    height: 100%;
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--ui-font);
}*/

/* Acessibilidade */
/*.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}*/

/* =========================
   WORKSPACE (2 colunas)
   ========================= */

/*.workspace {
    width: 100%;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px;
    align-items: stretch;
}

@media (max-width: 1100px) {
    .workspace {
        grid-template-columns: 1fr;
    }
}*/

/* =========================
   Painéis
   ========================= */

/*.panel {
    border: 1px solid var(--border);
    background: var(--panel);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 560px;*/
    /* crítico para grid + Monaco/pre */
    /*min-width: 0;
}*/

/* Título do painel */
/*.panel-title {
    padding: 10px 12px;
    font-size: 13px;
    color: var(--muted);
    font-weight: 600;
    border-bottom: 1px solid var(--border);
    background: rgba(255,255,255,.02);
}

body.ui-light .panel-title {
    background: rgba(0,0,0,.02);
}*/

/* Toolbar do painel (tema) */
/*.panel-toolbar {
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--border);
    background: rgba(255,255,255,.02);
}

body.ui-light .panel-toolbar {
    background: rgba(0,0,0,.02);
}

.toolbar-label {
    font-size: 13px;
    color: var(--muted);
    font-weight: 600;
}

.toolbar-select {
    height: 34px;
    padding: 0 10px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text);
    font-size: 13px;
    outline: none;
}*/

/* =========================
   Monaco (esquerda)
   ========================= */

/* o "bloco de trabalho" do editor: cresce e segura o Monaco */
/*.editor-host {
    flex: 1 1 auto;
    height: var(--work-h);
    min-height: var(--work-h);
    width: 100%;
    position: relative;
    overflow: hidden;*/ /* impede Monaco de invadir o footer */
/*}*/

/* o container do editor deve preencher o host */
/*#scriptEditor {
    height: 100%;
    width: 100%;
}*/

/* Footer abaixo do editor */
/*.editor-footer {
    flex: 0 0 auto;
    border-top: 1px solid var(--border);
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: rgba(255,255,255,.02);*/
    /* garante que fique acima de qualquer overlay do Monaco */
    /*position: relative;
    z-index: 2;
}

body.ui-light .editor-footer {
    background: rgba(0,0,0,.02);
}

.optline {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
}*/

/* =========================
   Resultados (direita)
   ========================= */

/*.results {
    flex: 1 1 auto;
    height: var(--work-h);
    min-height: var(--work-h);
    width: 100%;
    padding: 0;
    overflow: hidden;
}

.results-pre {
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 12px;
    overflow: auto;
    background: var(--panel2);
    color: var(--text);
    font-family: var(--mono-font);
    font-size: 13px;
    line-height: 1.45;
    white-space: pre-wrap;
    word-break: break-word;
    box-sizing: border-box;
}*/

/* =========================
   Botões (moderno/minimalista, neutro)
   Blindagem agressiva contra Bootstrap/estilos globais
   ========================= */

/*.btnrow {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}*/

/* BASE: força estilo neutro (mata Bootstrap) */
/*.workspace .btn {
    height: 36px !important;
    padding: 0 12px !important;
    border-radius: var(--btn-radius) !important;
    border: 1px solid var(--border) !important;
    background: transparent !important;
    background-image: none !important;
    color: var(--text) !important;
    font-weight: 500 !important;
    font-size: 13px !important;
    line-height: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    box-sizing: border-box !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    box-shadow: none !important;
    outline: none !important;
    text-decoration: none !important;
    transition: background .15s ease, border-color .15s ease, transform .02s ease !important;
}

    .workspace .btn:disabled {
        opacity: .45 !important;
        cursor: default !important;
    }*/

    /* clique sutil */
    /*.workspace .btn:active:not(:disabled) {
        transform: translateY(1px) !important;
    }*/

    /* PRIMÁRIO: destaque sutil (ainda neutro) */
    /*.workspace .btn.btn-primary {
        background: rgba(255,255,255,.08) !important;
        border-color: var(--border) !important;
    }

body.ui-light .workspace .btn.btn-primary {
    background: rgba(0,0,0,.06) !important;
}*/

/* HOVER */
/*.workspace .btn:hover:not(:disabled) {
    background: rgba(255,255,255,.10) !important;
}

body.ui-light .workspace .btn:hover:not(:disabled) {
    background: rgba(0,0,0,.08) !important;
}*/

/* GHOST */
/*.workspace .btn.btn-ghost {
    background: transparent !important;
}

    .workspace .btn.btn-ghost:hover:not(:disabled) {
        background: rgba(255,255,255,.06) !important;
    }

body.ui-light .workspace .btn.btn-ghost:hover:not(:disabled) {
    background: rgba(0,0,0,.05) !important;
}*/

/* FOCO acessível (sem glow azul) */
/*.workspace .btn:focus-visible {
    outline: 2px solid rgba(148,163,184,.35) !important;
    outline-offset: 2px !important;
}*/
