/* Gestão de Empreendimentos — estilos isolados (prefixo emp-). Reaproveita as variáveis e as classes
   incorporation-* existentes; não altera nenhum estilo global. */
.emp-section { position: relative; }
.emp-message { margin: 0 0 10px; padding: 9px 12px; border-radius: 8px; font-size: 13px; font-weight: 600; }
.emp-message.error { background: var(--danger-soft, #fee2e2); color: #991b1b; }
.emp-message.success { background: var(--success-soft, #d1fae5); color: #065f46; }
.emp-message.info { background: var(--primary-soft, #dbeafe); color: #1e3a8a; }
.emp-inline { display: flex; flex-direction: column; gap: 3px; font-size: 12px; font-weight: 700; color: #355071; }
.emp-inline select { height: 32px; border: 1px solid var(--border, #e2e8f0); border-radius: 8px; padding: 0 8px; }
.emp-filters { flex-wrap: wrap; }
.emp-filters input, .emp-filters select { min-width: 120px; }
.emp-muted { color: var(--text-muted, #64748b); font-size: 12px; }
.emp-error { color: #b91c1c; font-weight: 600; }
.emp-warn { background: #fff7ed; color: #9a3412; border: 1px solid #fed7aa; padding: 7px 10px; border-radius: 8px; font-size: 13px; }
.emp-info { background: #eff6ff; color: #1e3a8a; border: 1px solid #bfdbfe; padding: 7px 10px; border-radius: 8px; font-size: 13px; }
.emp-empty { padding: 28px; text-align: center; background: var(--surface, #fff); border: 1px dashed var(--border-strong, #cbd5e1); border-radius: 12px; }
.emp-link { background: none; border: 0; padding: 0; color: #075fd6; font-weight: 700; cursor: pointer; text-align: left; }
.emp-link.danger { color: #dc2626; }
.emp-link:hover { text-decoration: underline; }

/* KPIs e painel */
.emp-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-bottom: 12px; }
.emp-kpi { background: var(--surface, #fff); border: 1px solid var(--border, #e2e8f0); border-radius: 10px; padding: 9px 11px; display: flex; flex-direction: column; gap: 3px; }
.emp-kpi span { font-size: 11px; color: var(--text-muted, #64748b); font-weight: 700; text-transform: uppercase; letter-spacing: .02em; }
.emp-kpi strong { font-size: 17px; color: #061a44; }
.emp-grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 12px; }
@media (max-width: 1100px) { .emp-grid-2 { grid-template-columns: 1fr; } }
.emp-alerts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 420px; overflow: auto; }
.emp-alert { padding: 7px 10px; border-radius: 8px; font-size: 12.5px; border-left: 4px solid #94a3b8; background: #f8fafc; }
.emp-alert.alta { border-left-color: #ef4444; background: #fef2f2; }
.emp-alert.media { border-left-color: #f59e0b; background: #fffbeb; }

/* Badges (texto + ícone; nunca só cor) */
.emp-badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 800; border: 1px solid transparent; white-space: nowrap; }
.emp-badge.c-DISPONIVEL { background: #dcfce7; color: #166534; border-color: #86efac; }
.emp-badge.c-RESERVADA { background: #fef3c7; color: #92400e; border-color: #fcd34d; }
.emp-badge.c-VENDIDA { background: #fee2e2; color: #991b1b; border-color: #fca5a5; }
.emp-badge.c-DISTRATO { background: #ffedd5; color: #9a3412; border-color: #fdba74; }
.emp-badge.c-BLOQUEADA { background: #e2e8f0; color: #334155; border-color: #94a3b8; }
.emp-badge.c-INDEFINIDO, .emp-badge.f-SEM_FINANCEIRO, .emp-badge.f-OCULTO { background: #f1f5f9; color: #475569; border-color: #cbd5e1; }
.emp-badge.f-EM_DIA { background: #ecfdf5; color: #065f46; border-color: #6ee7b7; }
.emp-badge.f-VENCENDO { background: #fefce8; color: #854d0e; border-color: #fde047; }
.emp-badge.f-INADIMPLENTE { background: #fef2f2; color: #b91c1c; border-color: #f87171; }
.emp-badge.f-NEGOCIACAO { background: #eff6ff; color: #1d4ed8; border-color: #93c5fd; }
.emp-badge.f-JURIDICO { background: #f5f3ff; color: #6d28d9; border-color: #c4b5fd; }
.emp-badge.r-ATIVA, .emp-badge.s-success { background: #dcfce7; color: #166534; }
.emp-badge.r-EXPIRADA, .emp-badge.s-partial { background: #fef3c7; color: #92400e; }
.emp-badge.r-CANCELADA, .emp-badge.s-error { background: #fee2e2; color: #991b1b; }
.emp-badge.r-CONVERTIDA, .emp-badge.s-running { background: #dbeafe; color: #1e40af; }
.emp-legend { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 10px; }
.emp-legend-sep { font-size: 11px; color: #64748b; font-weight: 700; margin-left: 6px; }
.emp-summary { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; font-size: 12px; }

/* Mapa 2D */
.emp-map-layout { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 12px; }
@media (max-width: 900px) { .emp-map-layout { grid-template-columns: 1fr; } }
.emp-towers { display: flex; flex-direction: column; gap: 6px; }
.emp-towers h4 { margin: 0 0 4px; font-size: 13px; }
.emp-tower { display: flex; flex-direction: column; align-items: flex-start; padding: 8px 10px; border: 1px solid var(--border, #e2e8f0); border-radius: 8px; background: #fff; font-weight: 800; cursor: pointer; color: #061a44; }
.emp-tower small { font-weight: 600; color: #64748b; }
.emp-tower.active { border-color: #075fd6; background: #eff6ff; box-shadow: inset 3px 0 0 #075fd6; }
.emp-map-card { overflow: hidden; }
.emp-map-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.emp-map-head h4 { margin: 0; }
.emp-floors { display: flex; flex-direction: column; gap: 5px; overflow-x: auto; padding-bottom: 4px; }
.emp-floor { display: grid; grid-template-columns: 48px 1fr; gap: 8px; align-items: stretch; }
.emp-floor-label { display: flex; align-items: center; justify-content: flex-end; color: #061a44; font-size: 13px; }
.emp-floor-units { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 5px; }
.emp-unit { position: relative; min-height: 46px; padding: 4px 6px; border: 1px solid rgba(15, 23, 42, .12); border-radius: 6px; cursor: pointer; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; text-align: left; color: #061a44; }
.emp-unit-code { font-weight: 800; font-size: 13px; }
.emp-unit-status { font-size: 10.5px; font-weight: 700; opacity: .85; }
.emp-unit-fin { position: absolute; top: 3px; right: 4px; min-width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center; font-size: 10px; font-weight: 900; background: #fff; border: 1px solid currentColor; }
.emp-unit.c-DISPONIVEL { background: #dcfce7; border-color: #86efac; }
.emp-unit.c-RESERVADA { background: #fef3c7; border-color: #fcd34d; }
.emp-unit.c-VENDIDA { background: #fee2e2; border-color: #fca5a5; }
.emp-unit.c-DISTRATO { background: #ffedd5; border-color: #fdba74; }
.emp-unit.c-BLOQUEADA { background: repeating-linear-gradient(45deg, #e2e8f0, #e2e8f0 6px, #f1f5f9 6px, #f1f5f9 12px); border-color: #94a3b8; }
.emp-unit.c-INDEFINIDO { background: #f8fafc; }
.emp-unit.f-INADIMPLENTE .emp-unit-fin { color: #b91c1c; }
.emp-unit.f-VENCENDO .emp-unit-fin { color: #a16207; }
.emp-unit.f-NEGOCIACAO .emp-unit-fin { color: #1d4ed8; }
.emp-unit.f-JURIDICO .emp-unit-fin { color: #6d28d9; }
.emp-unit.f-EM_DIA .emp-unit-fin { color: #047857; }
.emp-unit.f-INADIMPLENTE { box-shadow: inset 0 -3px 0 #ef4444; }
.emp-unit.dim { opacity: .28; }
.emp-unit.selected, .emp-unit:focus-visible { outline: 3px solid #075fd6; outline-offset: 1px; }

/* Tabelas */
.emp-table-wrap { overflow: auto; max-height: 62vh; border: 1px solid var(--border, #e2e8f0); border-radius: 10px; background: #fff; }
.emp-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.emp-table th { position: sticky; top: 0; background: #f8fafc; text-align: left; padding: 7px 9px; font-size: 11px; text-transform: uppercase; letter-spacing: .02em; color: #475569; border-bottom: 1px solid var(--border, #e2e8f0); white-space: nowrap; z-index: 1; }
.emp-table td { padding: 6px 9px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
.emp-table td.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.emp-table.emp-clickable tbody tr { cursor: pointer; }
.emp-table.emp-clickable tbody tr:hover, .emp-table.emp-clickable tbody tr:focus { background: #f1f7ff; outline: none; }
.emp-table tr.late td { background: #fff7ed; }
.emp-table tr.s-VENCIDA td { color: #b91c1c; }
.emp-table tr.s-PAGA td { color: #047857; }
.emp-stages input[type=number] { width: 70px; }
.emp-stages input { height: 28px; border: 1px solid var(--border, #e2e8f0); border-radius: 6px; padding: 0 6px; }
.emp-pager { display: flex; gap: 8px; align-items: center; justify-content: flex-end; margin-top: 8px; font-size: 12px; }
.emp-pager span { margin-right: auto; color: #475569; }
.emp-progress { display: inline-block; width: 90px; height: 8px; background: #e2e8f0; border-radius: 99px; overflow: hidden; vertical-align: middle; }
.emp-progress span { display: block; height: 100%; background: linear-gradient(90deg, #22c55e, #16a34a); }

/* Drawer da unidade */
.emp-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(520px, 100vw); background: #fff; box-shadow: -18px 0 45px rgba(15, 23, 42, .18); z-index: 60; overflow-y: auto; padding: 18px 20px 28px; }
.emp-drawer-close { position: absolute; top: 10px; right: 12px; border: 0; background: #f1f5f9; width: 30px; height: 30px; border-radius: 50%; font-size: 18px; cursor: pointer; }
.emp-drawer-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; padding-right: 34px; }
.emp-drawer-head h3 { margin: 0; font-size: 20px; color: #061a44; }
.emp-drawer-head p { margin: 2px 0 0; color: #64748b; font-size: 13px; }
.emp-drawer-badges { display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
.emp-drawer section { margin-top: 12px; padding-top: 10px; border-top: 1px solid #f1f5f9; }
.emp-drawer h4 { margin: 0 0 6px; font-size: 13px; color: #0f172a; text-transform: uppercase; letter-spacing: .03em; }
.emp-dl { display: grid; grid-template-columns: 150px 1fr; gap: 4px 10px; margin: 0; font-size: 13px; }
.emp-dl dt { color: #64748b; }
.emp-dl dd { margin: 0; font-weight: 600; color: #0f172a; }
.emp-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.emp-actions button { font-size: 12px; padding: 7px 11px; }
.emp-list { margin: 4px 0 0; padding-left: 18px; font-size: 12.5px; display: flex; flex-direction: column; gap: 4px; }

/* Formulários */
.emp-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; align-items: end; margin: 8px 0; }
.emp-form.inline { grid-template-columns: minmax(200px, 320px) max-content; }
.emp-form label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; font-weight: 700; color: #355071; }
.emp-form label.wide { grid-column: 1 / -1; }
.emp-form input, .emp-form select, .emp-form textarea { border: 1px solid var(--border, #e2e8f0); border-radius: 8px; padding: 6px 8px; font: inherit; font-weight: 500; }
.emp-form textarea { min-height: 64px; resize: vertical; }
.emp-work { margin-top: 12px; }
.emp-updates li { padding: 6px 0; border-bottom: 1px solid #f1f5f9; }
.emp-files { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.emp-files img { width: 96px; height: 72px; object-fit: cover; border-radius: 6px; border: 1px solid #e2e8f0; }

/* Mapa 3D (gerado a partir do Sienge) */
.emp-3d-legend { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 8px 0; font-size: 12px; }
.emp-3d-key { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; color: #334155; }
.emp-3d-key i { width: 14px; height: 14px; border-radius: 3px; display: inline-block; border: 1px solid rgba(15, 23, 42, .25); }
.emp-3d-key i.emp-3d-delinquent { background: #fff; border: 2px solid #b91c1c; }
.emp-3d-stage { position: relative; border: 1px solid var(--border, #e2e8f0); border-radius: 12px; background: linear-gradient(180deg, #f8fbff 0%, #eef3f9 100%); overflow: hidden; }
.emp-3d-stage canvas { display: block; width: 100%; touch-action: none; cursor: grab; outline: none; }
.emp-3d-stage canvas:focus-visible { box-shadow: inset 0 0 0 2px #2563eb; }
.emp-3d-tip { position: absolute; pointer-events: none; background: #0f172a; color: #fff; padding: 6px 9px; border-radius: 8px; font-size: 12px; line-height: 1.35; max-width: 260px; box-shadow: 0 6px 18px rgba(15, 23, 42, .25); }
.emp-3d-stage.night { background: radial-gradient(ellipse at 50% 20%, #1e293b 0%, #0b1220 70%); }
.emp-3d-night { flex-direction: row !important; align-items: center; gap: 6px !important; font-weight: 700; }

/* ---- Maquete 3D (three.js) com HUD no estilo espelho de vendas ---- */
.emp-3d-stage.tower { background: #0a1430; border: 0; border-radius: 16px; min-height: 460px; color: #f5efe4; font-family: inherit; }
.emp-3d-stage.tower.day { background: #a9cdee; }
.emp-3d-stage.tower canvas { display: block; width: 100%; touch-action: none; cursor: grab; outline: none; border-radius: 16px; }
.emp-hud-card { background: rgba(20, 17, 14, .72); border: 1px solid rgba(255, 240, 210, .12); border-radius: 16px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 10px 30px rgba(0, 0, 0, .28); }
.emp-hud-top { position: absolute; top: 14px; left: 14px; right: 14px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; pointer-events: none; }
.emp-hud-top > * { pointer-events: auto; }
.emp-hud-title { padding: 10px 16px; display: flex; flex-direction: column; gap: 2px; max-width: 100%; }
.emp-hud-title b { font-size: 20px; letter-spacing: .02em; color: #e9d29a; font-family: Georgia, "Times New Roman", serif; font-weight: 600; }
.emp-hud-title span { font-size: 12px; color: #d6cbb8; }
.emp-hud-bar { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px; max-width: 100%; overflow-x: auto; }
.emp-seg { display: flex; gap: 2px; padding: 2px; border-radius: 12px; background: rgba(255, 255, 255, .04); }
.emp-seg button { appearance: none; border: 1px solid transparent; background: transparent; color: #e7ddcb; font-family: inherit; font-weight: 600; font-size: 13px; line-height: 1; padding: 9px 12px; border-radius: 10px; cursor: pointer; white-space: nowrap; }
.emp-seg button:hover { background: rgba(255, 255, 255, .08); }
.emp-seg button.on { background: rgba(255, 240, 210, .14); border-color: rgba(255, 240, 210, .22); color: #fff; }
.emp-seg button[data-hud-color].on { background: #d9a35b; color: #2b1d0e; border-color: #d9a35b; letter-spacing: .06em; }
.emp-seg button:focus-visible { outline: 2px solid #e9d29a; outline-offset: 1px; }
.emp-hud-hint { align-self: flex-end; padding: 8px 14px; border-radius: 999px; background: rgba(20, 17, 14, .6); color: #efe6d6; font-size: 13px; }
.emp-hud-hint.hidden { display: none; }
.emp-hud-bottom { position: absolute; left: 14px; right: 14px; bottom: 14px; padding: 14px 18px; display: flex; flex-direction: column; gap: 8px; max-height: 46%; overflow: auto; }
.emp-hud-kpi { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; font-size: 12px; letter-spacing: .08em; color: #d6cbb8; }
.emp-hud-big { font-family: Georgia, "Times New Roman", serif; font-size: 30px; letter-spacing: 0; color: #f3d9a4; }
.emp-hud-mini { letter-spacing: 0; opacity: .8; margin-left: auto; }
.emp-hud-progress { height: 6px; border-radius: 999px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.emp-hud-progress i { display: block; height: 100%; background: linear-gradient(90deg, #d9a35b, #f3d9a4); border-radius: 999px; }
.emp-hud-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: #efe6d6; }
.emp-hud-legend span { display: inline-flex; align-items: center; gap: 6px; }
.emp-hud-legend i { width: 16px; height: 12px; border-radius: 3px; display: inline-block; border: 1px solid rgba(255, 255, 255, .25); }
.emp-hud-legend i.lit { background: #ffd58a; box-shadow: 0 0 8px rgba(255, 200, 110, .8); }
.emp-hud-legend i.dim { background: #8a5a2b; }
.emp-hud-legend i.off { background: #1b2230; }
.emp-hud-mirror summary { cursor: pointer; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: #d6cbb8; padding-top: 6px; border-top: 1px solid rgba(255, 255, 255, .1); }
.emp-hud-mirror-body { display: flex; flex-wrap: wrap; gap: 18px; padding-top: 10px; }
.emp-hud-tower > b { display: block; font-size: 13px; margin-bottom: 6px; color: #f3d9a4; }
.emp-hud-floor { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.emp-hud-floor > span { width: 92px; flex: none; font-size: 11px; color: #bfb3a0; }
.emp-hud-floor > div { display: flex; flex-wrap: wrap; gap: 3px; }
.emp-chip { appearance: none; border: 0; border-radius: 5px; padding: 3px 5px; font-family: inherit; font-weight: 600; font-size: 10px; line-height: 1; cursor: pointer; color: #1b1b1b; background: #64748b; min-width: 30px; }
.emp-chip.s-VENDIDA { background: #ffd58a; }
.emp-chip.s-DISPONIVEL { background: #34465f; color: #e2e8f0; }
.emp-chip.s-RESERVADA { background: #b7792b; color: #fff; }
.emp-chip.s-DISTRATO { background: #f97316; color: #fff; }
.emp-chip.s-BLOQUEADA { background: #94a3b8; }
.emp-chip:hover { outline: 2px solid #fff; }
.emp-hud-unit { position: absolute; left: 14px; right: 14px; bottom: 14px; padding: 18px 20px; z-index: 3; max-width: 760px; }
.emp-hud-unit.hidden, .emp-hud-bottom.hidden { display: none; }
.emp-hud-close { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border-radius: 10px; border: 0; background: rgba(0, 0, 0, .35); color: #fff; font-size: 20px; cursor: pointer; }
.emp-hud-kicker { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: #cbbfab; }
.emp-hud-unit-head { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 4px 0; }
.emp-hud-unit-code { font-family: Georgia, "Times New Roman", serif; font-size: 34px; color: #fbf3e4; }
.emp-hud-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .25); font-size: 13px; font-weight: 700; background: rgba(255, 255, 255, .06); }
.emp-hud-pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--pill); }
.emp-hud-pill.alt { color: #fecaca; border-color: rgba(248, 113, 113, .4); }
.emp-hud-sub { font-family: Georgia, "Times New Roman", serif; font-style: italic; color: #e7ddcb; }
.emp-hud-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 12px 0 8px; }
.emp-hud-grid small { display: block; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: #bfb3a0; }
.emp-hud-grid b { font-size: 16px; color: #fff; }
.emp-hud-grid em { display: block; font-size: 11px; color: #bfb3a0; font-style: normal; }
.emp-hud-note { margin: 6px 0 10px; padding-top: 8px; border-top: 1px solid rgba(255, 255, 255, .1); color: #e7ddcb; font-size: 14px; }
.emp-hud-actions { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; }
.emp-hud-actions button { border: 1px solid rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .04); color: #f5efe4; border-radius: 10px; padding: 10px 12px; font-weight: 600; cursor: pointer; }
.emp-hud-actions button.primary { background: #d9a35b; color: #2b1d0e; border-color: #d9a35b; }
.emp-hud-actions button:hover { filter: brightness(1.1); }
.emp-hud-loading { position: absolute; inset: 0; display: grid; place-items: center; color: #e9d29a; font-size: 15px; letter-spacing: .08em; pointer-events: none; }
.emp-3d-stage.tower .emp-3d-tip { background: rgba(20, 17, 14, .9); border: 1px solid rgba(255, 240, 210, .18); z-index: 4; }
.emp-3d-stage.tower.day .emp-hud-card { background: rgba(255, 255, 255, .78); color: #1f2937; border-color: rgba(15, 23, 42, .1); }
.emp-3d-stage.tower.day .emp-hud-title b { color: #8a5a1f; }
.emp-3d-stage.tower.day .emp-hud-title span, .emp-3d-stage.tower.day .emp-hud-kpi, .emp-3d-stage.tower.day .emp-hud-mirror summary, .emp-3d-stage.tower.day .emp-hud-kicker, .emp-3d-stage.tower.day .emp-hud-grid small, .emp-3d-stage.tower.day .emp-hud-floor > span { color: #475569; }
.emp-3d-stage.tower.day .emp-seg button, .emp-3d-stage.tower.day .emp-hud-legend, .emp-3d-stage.tower.day .emp-hud-note, .emp-3d-stage.tower.day .emp-hud-sub { color: #1f2937; }
.emp-3d-stage.tower.day .emp-hud-big, .emp-3d-stage.tower.day .emp-hud-unit-code, .emp-3d-stage.tower.day .emp-hud-grid b { color: #111827; }
.emp-3d-stage.tower.day .emp-hud-hint { background: rgba(255, 255, 255, .8); color: #1f2937; }
.emp-3d-stage.tower.day .emp-hud-actions button { color: #1f2937; border-color: rgba(15, 23, 42, .15); }
.emp-3d-stage.tower.day .emp-hud-actions button.primary { color: #2b1d0e; }
@media (max-width: 720px) {
  .emp-hud-bar { flex-wrap: nowrap; }
  .emp-hud-hint { display: none; }
  .emp-hud-grid { grid-template-columns: 1fr 1fr; }
  .emp-hud-actions { grid-template-columns: 1fr 1fr; }
  .emp-hud-actions button.primary { grid-column: 1 / -1; order: -1; }
  .emp-hud-mini { margin-left: 0; }
}
.emp-hud-bar { scrollbar-width: none; }
.emp-hud-bar::-webkit-scrollbar { display: none; }
.emp-3d-stage.tower { min-height: 560px; }
.emp-hud-unit { right: auto; width: min(600px, calc(100% - 28px)); }

/* filtros do módulo de empreendimentos: layout flexível (a grade padrão reserva 52px para um título que estes formulários não têm) */
.incorporation-filters.emp-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 10px; overflow: visible; }
.incorporation-filters.emp-filters > label { flex: 1 1 160px; min-width: 150px; }
.incorporation-filters.emp-filters > label:first-child { flex: 2 1 260px; min-width: 220px; }
.incorporation-filters.emp-filters > label.emp-3d-night { flex: 0 0 auto; min-width: 0; }
.incorporation-filters.emp-filters > button { flex: 0 0 auto; }
.incorporation-filters.emp-filters select { width: 100%; text-overflow: ellipsis; }

/* rotinas (telas) dentro de um módulo em Configurações > Módulos e no cadastro de usuário */
.module-toggle.module-child { margin-left: 26px; font-size: .95em; }
.module-toggle.module-child::before { content: "↳"; color: #94a3b8; margin-right: 2px; }

/* totalizadores dos Contratos */
.emp-kpis-contracts { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; margin: 4px 0 14px; }
.emp-kpi-big { padding: 12px 14px; border-radius: 12px; gap: 4px; border-left: 4px solid #2563eb; }
.emp-kpi-big strong { font-size: 22px; line-height: 1.15; }
.emp-kpi-big strong em { font-size: 14px; font-style: normal; color: #64748b; font-weight: 600; }
.emp-kpi-big small { font-size: 12px; color: #64748b; }
.emp-kpi-big.danger { border-left-color: #dc2626; }
.emp-kpi-big.danger strong { color: #b91c1c; }

/* Controle físico-financeiro: mantém o design system da Incorporação sem afetar as demais rotinas. */
.emp-control-toolbar { display: flex; flex-wrap: wrap; align-items: end; gap: 8px; margin-bottom: 12px; }
.emp-control-toolbar .emp-inline { min-width: min(100%, 290px); flex: 1 1 240px; }
.emp-control-toolbar .emp-inline select { width: 100%; }
.emp-control-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin: 4px 0 12px; }
.emp-control-head h4 { margin: 0; color: #061a44; font-size: 18px; }
.emp-control-head p { margin: 3px 0 0; color: var(--text-muted, #64748b); font-size: 12px; }
.emp-control-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; margin-bottom: 12px; }
.emp-control-kpis article { min-height: 98px; display: flex; flex-direction: column; gap: 5px; padding: 12px; border: 1px solid var(--border, #e2e8f0); border-radius: 10px; background: var(--surface, #fff); border-top: 3px solid #075fd6; }
.emp-control-kpis article:nth-child(2) { border-top-color: #64748b; }
.emp-control-kpis article:nth-child(3) { border-top-color: #0f766e; }
.emp-control-kpis article:nth-child(4) { border-top-color: #d97706; }
.emp-control-kpis span { color: var(--text-muted, #64748b); font-size: 11px; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; }
.emp-control-kpis strong { color: #061a44; font-size: 19px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.emp-control-kpis small, .emp-control-gauge small { color: var(--text-muted, #64748b); font-size: 11px; }
.emp-control-gauges { display: grid; grid-template-columns: repeat(3, minmax(180px, 1fr)); gap: 10px; margin-bottom: 12px; }
.emp-control-gauge { min-height: 176px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 12px; border: 1px solid var(--border, #e2e8f0); border-radius: 10px; background: var(--surface, #fff); text-align: center; }
.emp-control-gauge-ring { width: 142px; height: 71px; position: relative; overflow: hidden; }
.emp-control-gauge-ring::before { content: ""; position: absolute; width: 142px; height: 142px; left: 0; top: 0; border-radius: 50%; background: conic-gradient(from 270deg, #0f766e calc(var(--value) * 1.8deg), #e2e8f0 0); }
.emp-control-gauge-ring::after { content: ""; position: absolute; width: 104px; height: 104px; left: 19px; top: 19px; border-radius: 50%; background: var(--surface, #fff); }
.emp-control-gauge-ring strong { position: absolute; z-index: 1; bottom: 0; left: 0; right: 0; color: #061a44; font-size: 23px; font-variant-numeric: tabular-nums; }
.emp-control-gauge > span { color: #334155; font-size: 12px; font-weight: 800; text-transform: uppercase; }
.emp-control-grid-layout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.emp-control-card { min-width: 0; }
.emp-control-card.wide { grid-column: 1 / -1; }
.emp-control-card h4 { margin: 0 0 8px; color: #061a44; }
.emp-control-card-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 7px; }
.emp-control-card-head span { color: var(--text-muted, #64748b); font-size: 11px; }
.emp-control-card-head i { display: inline-block; width: 16px; height: 3px; margin: 0 4px 2px 8px; vertical-align: middle; border-radius: 999px; }
.emp-control-card-head i.planned { background: #075fd6; }
.emp-control-card-head i.actual { background: #0f766e; }
.emp-control-chart { display: block; width: 100%; min-width: 560px; min-height: 220px; overflow: visible; }
.emp-control-chart .emp-control-grid line { stroke: #dbe3ee; stroke-dasharray: 3 4; }
.emp-control-chart .emp-control-grid text, .emp-control-chart .emp-control-axis text { fill: #64748b; font-size: 10px; font-family: inherit; }
.emp-control-line { fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.emp-control-line.planned { stroke: #075fd6; }
.emp-control-line.actual { stroke: #0f766e; stroke-dasharray: 6 5; }
.emp-control-card .emp-table-wrap { max-height: 260px; }
.emp-control-card .emp-inline { width: 100%; margin-bottom: 8px; }
.emp-control-card .emp-inline select { width: 100%; }
.emp-control-card .incorporation-outline { margin-bottom: 8px; }
.emp-control-details { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 14px; margin: 0; font-size: 13px; }
.emp-control-details dt { color: var(--text-muted, #64748b); }
.emp-control-details dd { margin: 0; color: #061a44; font-weight: 800; font-variant-numeric: tabular-nums; }
.emp-control-empty, .emp-control-loading { min-height: 170px; display: grid; place-items: center; padding: 18px; color: var(--text-muted, #64748b); font-size: 13px; text-align: center; border: 1px dashed var(--border-strong, #cbd5e1); border-radius: 8px; }
@media (max-width: 980px) { .emp-control-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .emp-control-grid-layout { grid-template-columns: 1fr; } .emp-control-card.wide { grid-column: auto; } }
@media (max-width: 620px) { .emp-control-head { flex-direction: column; } .emp-control-kpis, .emp-control-gauges { grid-template-columns: 1fr; } .emp-control-chart { min-width: 500px; } .emp-control-card { overflow-x: auto; } }

/* Painel operacional inspirado nos quadros de acompanhamento de obra. */
.emp-reference-layout { display: grid; grid-template-columns: 155px minmax(0, 1fr); min-height: 620px; border: 1px solid #c8d5e7; background: #eef4fb; }
.emp-reference-rail { padding: 16px 10px; background: #f8fbff; border-right: 1px solid #c8d5e7; }
.emp-reference-rail-title { display: flex; justify-content: space-between; align-items: center; padding: 0 8px 14px; color: #122b52; font-size: 16px; }
.emp-reference-rail-title span { color: #6b7f9c; letter-spacing: -3px; }
.emp-reference-rail-label { padding: 8px; color: #6b7f9c; font-size: 10px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.emp-reference-project { display: block; width: 100%; padding: 11px 10px; color: #365273; font: inherit; font-size: 13px; text-align: left; background: transparent; border: 0; border-left: 3px solid transparent; cursor: pointer; }
.emp-reference-project:hover { background: #e5eef9; }
.emp-reference-project.active { color: #0d2b5a; font-weight: 800; background: #e0ebf8; border-left-color: #0f9a8a; }
.emp-reference-main { min-width: 0; padding: 16px; background: linear-gradient(135deg, #133968, #0b2c59 52%, #08264d); }
.emp-reference-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 10px 14px 14px; color: #fff; }
.emp-reference-eyebrow { display: block; margin-bottom: 3px; color: #62d8cd; font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.emp-reference-header h4 { margin: 0; color: #fff; font-size: clamp(19px, 2vw, 27px); letter-spacing: -.03em; }
.emp-reference-header p { margin: 3px 0 0; color: #bbcae1; font-size: 12px; }
.emp-reference-status { display: flex; align-items: center; justify-content: flex-end; gap: 10px; color: #bbcae1; font-size: 11px; text-align: right; }
.emp-reference-status .incorporation-primary { padding: 8px 12px; border-color: #3bc6b7; background: #0f9a8a; }
.emp-reference-expand { padding: 8px 10px; color: #d9ecff; font: inherit; font-size: 11px; font-weight: 700; white-space: nowrap; background: rgba(8, 36, 70, .8); border: 1px solid #5e8fb8; cursor: pointer; }
.emp-reference-expand:hover { color: #fff; border-color: #63d7ca; background: #0f5966; }
.emp-reference-filters { display: flex; justify-content: space-between; gap: 10px; margin: 0 0 12px; padding: 8px 10px; background: rgba(4, 24, 49, .5); border: 1px solid rgba(150, 209, 224, .25); }
.emp-reference-filters > div { display: flex; flex-wrap: wrap; align-items: center; gap: 3px; }
.emp-reference-filters b { margin-right: 5px; color: #8cbbdf; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.emp-reference-filters button { min-width: 34px; padding: 5px 7px; color: #c7d8eb; font: inherit; font-size: 10px; text-transform: capitalize; background: #0a2a54; border: 1px solid #31577f; cursor: pointer; }
.emp-reference-filters button:hover, .emp-reference-filters button.active { color: #fff; background: #0f9a8a; border-color: #61d9cd; }
.emp-reference-physical-kpis { display: grid; grid-template-columns: repeat(3, minmax(190px, 1fr)); gap: 12px; margin-bottom: 12px; }
.emp-reference-gauge { min-height: 170px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 11px; color: #fff; text-align: center; background: linear-gradient(145deg, #173e70, #0b2a55); border: 1px solid rgba(127, 207, 214, .35); box-shadow: inset 0 1px rgba(255, 255, 255, .09); }
.emp-reference-gauge-ring { width: 152px; height: 76px; position: relative; overflow: hidden; }
.emp-reference-gauge-ring::before { position: absolute; top: 0; left: 0; width: 152px; height: 152px; content: ""; background: conic-gradient(from 270deg, #42d2be calc(var(--value) * 1.8deg), #d6e0ed 0); border-radius: 50%; }
.emp-reference-gauge-ring::after { position: absolute; top: 20px; left: 20px; width: 112px; height: 112px; content: ""; background: #123865; border-radius: 50%; }
.emp-reference-gauge-ring strong { position: absolute; right: 0; bottom: 0; left: 0; z-index: 1; color: #fff; font-size: 25px; font-variant-numeric: tabular-nums; }
.emp-reference-gauge > span { color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.emp-reference-gauge small { color: #aecaDF; font-size: 11px; }
.emp-reference-panel { min-width: 0; padding: 12px; color: #fff; background: rgba(4, 26, 53, .72); border: 1px solid rgba(129, 198, 215, .36); box-shadow: inset 0 1px rgba(255, 255, 255, .08); }
.emp-reference-panel-wide { margin-bottom: 12px; }
.emp-reference-panel h4 { margin: 0; color: #fff; font-size: 13px; text-transform: uppercase; }
.emp-reference-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-bottom: 8px; border-bottom: 1px solid rgba(147, 203, 222, .28); }
.emp-reference-panel-head span { color: #a7c6dc; font-size: 10px; }
.emp-reference-panel-head i { display: inline-block; width: 14px; height: 3px; margin: 0 3px 2px 7px; vertical-align: middle; border-radius: 6px; }
.emp-reference-panel-head .planned { background: #3d9cff; }
.emp-reference-panel-head .actual { background: #42d2be; }
.emp-reference-panel .emp-control-chart { min-height: 250px; }
.emp-reference-panel .emp-control-chart .emp-control-grid line { stroke: rgba(178, 212, 235, .26); }
.emp-reference-panel .emp-control-chart .emp-control-grid text, .emp-reference-panel .emp-control-chart .emp-control-axis text { fill: #adcae1; }
.emp-reference-panel .emp-control-chart .emp-control-line.planned { stroke: #3d9cff; }
.emp-reference-panel .emp-control-chart .emp-control-line.actual { stroke: #42d2be; stroke-dasharray: none; }
.emp-control-bar { fill: #1677c9; opacity: .75; }
.emp-reference-bottom { display: grid; grid-template-columns: 1.1fr .9fr; gap: 12px; }
.emp-reference-bottom .emp-muted { color: #b5cbe0; }
.emp-reference-bottom .emp-control-details dt { color: #acc6dd; }
.emp-reference-bottom .emp-control-details dd { color: #fff; }
.emp-reference-financial-kpis { display: grid; grid-template-columns: repeat(6, minmax(120px, 1fr)); gap: 8px; margin-bottom: 12px; }
.emp-reference-metric { min-height: 92px; display: flex; flex-direction: column; justify-content: center; gap: 7px; padding: 11px; color: #fff; background: linear-gradient(145deg, #1a477b, #0b2a55); border: 1px solid rgba(128, 202, 218, .36); box-shadow: inset 0 1px rgba(255, 255, 255, .09); }
.emp-reference-metric span { color: #bcd3e8; font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.emp-reference-metric strong { color: #71e3cd; font-size: clamp(16px, 1.5vw, 21px); line-height: 1.05; font-variant-numeric: tabular-nums; }
.emp-reference-metric small { color: #9dbbd2; font-size: 10px; }
.emp-reference-composition { margin-bottom: 12px; }
.emp-reference-panel .emp-table { color: #e5f0fa; background: transparent; }
.emp-reference-panel .emp-table th { color: #d6f2ec; background: #0b664f; }
.emp-reference-panel .emp-table td { border-color: rgba(154, 211, 225, .22); }
.emp-reference-panel .emp-table tr:nth-child(even) td { background: rgba(36, 97, 115, .26); }
.emp-reference-panel .emp-inline { display: block; color: #d6e6f5; font-size: 12px; }
.emp-reference-panel .emp-inline select { width: 100%; margin-top: 5px; }
.emp-reference-panel .incorporation-outline { margin-top: 8px; color: #fff; border-color: #66cfc5; }
.emp-reference-main .emp-control-empty { min-height: 260px; color: #c9d9e9; border-color: rgba(162, 214, 228, .45); }
.emp-reference-main:fullscreen { width: 100%; height: 100%; min-height: 100vh; padding: clamp(16px, 3vw, 42px); overflow: auto; background: linear-gradient(135deg, #133968, #0b2c59 52%, #08264d); }
.emp-reference-main:fullscreen .emp-reference-panel .emp-control-chart { min-height: min(46vh, 460px); }
@media (min-width: 1181px) { .emp-reference-main:fullscreen .emp-reference-financial-kpis { grid-template-columns: repeat(6, minmax(150px, 1fr)); } }
@media (max-width: 1180px) { .emp-reference-financial-kpis { grid-template-columns: repeat(3, minmax(140px, 1fr)); } }
@media (max-width: 860px) { .emp-reference-layout { grid-template-columns: 1fr; } .emp-reference-rail { display: flex; gap: 3px; overflow-x: auto; padding: 8px; border-right: 0; border-bottom: 1px solid #c8d5e7; } .emp-reference-rail-title, .emp-reference-rail-label { display: none; } .emp-reference-project { width: auto; min-width: max-content; } .emp-reference-main { padding: 10px; } .emp-reference-header, .emp-reference-filters { align-items: flex-start; flex-direction: column; } .emp-reference-status { justify-content: flex-start; } .emp-reference-physical-kpis { grid-template-columns: 1fr; } .emp-reference-bottom { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .emp-reference-financial-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .emp-reference-panel { overflow-x: auto; } .emp-reference-panel .emp-control-chart { min-width: 560px; } }
