/* Espaço Empresa: chave Pessoal/Empresa/Tudo, painel da empresa, retirada e card de Config. */

:root { --emp: #60a5fa; }
:root[data-theme="light"] { --emp: #2563eb; }

/* Chave no topo */
.space-bar { padding: 10px 24px 0; }
.space-seg { display: flex; gap: 2px; background: var(--bg3); border-radius: 11px; padding: 3px; max-width: 420px; }
.space-seg button { flex: 1; background: none; border: 0; color: var(--text2); font: inherit; font-size: 13px; padding: 7px 6px; border-radius: 9px; cursor: pointer; white-space: nowrap; }
.space-seg button.on { background: var(--card); color: var(--text); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,0.2); }
.space-seg button.e.on { color: var(--emp); }
@media (max-width: 640px) { .space-bar { padding: 10px 16px 0; } .space-seg { max-width: none; } }

/* Visão Empresa: cards que são só do orçamento pessoal ficam escondidos */
body[data-space="empresa"] #prev-balance-bar,
body[data-space="empresa"] #summary-grid,
body[data-space="empresa"] #perf-card,
body[data-space="empresa"] #fatura-card { display: none !important; }

/* Painel da empresa */
.emp-head { margin-bottom: 14px; }
.emp-name { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 700; font-size: 16px; color: var(--emp); }
.emp-sub { font-size: 12px; color: var(--text3); margin-top: 2px; line-height: 1.5; }
.emp-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
@media (max-width: 900px) { .emp-kpis { grid-template-columns: 1fr 1fr; } }
.emp-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
@media (max-width: 760px) { .emp-row { grid-template-columns: 1fr; } }
.emp-card { padding: 20px; }
.emp-card h3 { font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.emp-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.mei-val { font-size: 13px; color: var(--text2); margin: 4px 0 10px; }
.mei-val b { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 18px; color: var(--text); }
.mei-bar { margin-bottom: 8px; }
.mei-warn { margin-top: 10px; font-size: 12px; line-height: 1.5; color: var(--warn); background: rgba(255,165,2,0.1); border-radius: 10px; padding: 10px 12px; }
.emp-das { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 20px; margin-bottom: 16px; font-size: 13px; color: var(--text2); }
.emp-das b { color: var(--text); }
.emp-ok { color: var(--green); font-weight: 700; font-size: 13px; }

/* Etiquetas na lista */
.space-tag { font-size: 10px; font-weight: 700; padding: 1px 8px; border-radius: 10px; white-space: nowrap; }
.space-tag.emp { background: rgba(96,165,250,0.14); color: var(--emp); }
.space-tag.wd { background: rgba(196,241,53,0.14); color: var(--acc-ink); }

/* Lançamento: "De quem é" */
.field-label { font-size: 11px; color: var(--text2); text-transform: uppercase; letter-spacing: 0.4px; margin-bottom: 8px; font-weight: 600; }
.space-chips { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.space-chips button { background: var(--bg3); border: 1.5px solid var(--border); color: var(--text2); border-radius: 10px; padding: 10px; font: inherit; font-size: 13px; cursor: pointer; }
.space-chips button.on { border-color: var(--accent); color: var(--text); font-weight: 600; }
.space-chips button.e.on { border-color: var(--emp); color: var(--emp); }

/* Retirada */
.rt-flow { display: flex; align-items: center; justify-content: space-between; gap: 6px; background: var(--bg3); border-radius: 12px; padding: 12px 16px; margin-bottom: 12px; }
.rt-flow div { text-align: center; font-size: 12px; color: var(--text2); }
.rt-flow b { display: block; font-size: 16px; margin-top: 2px; font-family: 'Plus Jakarta Sans', sans-serif; }
.rt-flow .o b { color: var(--red); }
.rt-flow .i b { color: var(--green); }
.rt-flow span { font-size: 20px; color: var(--text3); }
.rt-hint { font-size: 12px; color: var(--text2); line-height: 1.5; margin-bottom: 14px; }

/* Config → Empresa */
.emp-badge { font-size: 10.5px; font-weight: 700; color: var(--emp); background: rgba(96,165,250,0.12); border-radius: 20px; padding: 2px 8px; margin-left: 6px; vertical-align: middle; }
.emp-switch { display: flex; justify-content: space-between; align-items: center; margin: 12px 0 14px; cursor: pointer; font-size: 14px; }
.emp-switch input { display: none; }
.emp-switch i { width: 42px; height: 24px; border-radius: 12px; background: var(--border); position: relative; transition: background 0.2s; flex-shrink: 0; }
.emp-switch i::after { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--text2); transition: left 0.2s; }
.emp-switch input:checked + i { background: var(--accent); }
.emp-switch input:checked + i::after { left: 21px; background: #0a0a0f; }
.emp-cats { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.emp-cats i { font-style: normal; font-size: 12px; background: var(--bg3); border-radius: 20px; padding: 4px 10px; color: var(--text2); }
