/* ============================================================================
   VISUALIZADOR 3D GIS + BIM (v2) — TEMA TÉCNICO ESCURO ESTILO QGIS
   ============================================================================ */
:root {
    --bg-base: #090d16;
    --bg-panel: rgba(15, 23, 42, 0.94);
    --bg-surface: rgba(30, 41, 59, 0.72);
    --bg-hover: rgba(51, 65, 85, 0.55);
    --bg-active: rgba(14, 165, 233, 0.16);
    --border-subtle: rgba(148, 163, 184, 0.14);
    --border-strong: rgba(148, 163, 184, 0.28);
    --accent: #38bdf8;
    --accent-hover: #0ea5e9;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #f43f5e;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --mono: "JetBrains Mono", "Cascadia Code", Consolas, monospace;
    --radius: 6px;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
}

* {
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: var(--bg-base);
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 12px;
    -webkit-font-smoothing: antialiased;
}

body {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* Navbar unificada SK Engenharia */
.sk-nav {
    background-color: #212529;
    border-bottom: 1px solid var(--border-subtle);
    padding: 0.45rem 1.25rem;
    flex-shrink: 0;
    z-index: 350;
    font-family: 'Inter', var(--font);
}

.sk-nav-container {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
}

.sk-back-btn {
    justify-self: start;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #f8f9fa;
    font-weight: 700;
    text-decoration: none;
    font-size: 12px;
    transition: opacity 0.2s;
    white-space: nowrap;
}

.sk-back-btn:hover {
    opacity: 0.75;
}

.sk-back-icon {
    width: 16px;
    height: 16px;
}

.sk-creator-text {
    justify-self: center;
    font-size: 12px;
    font-weight: 500;
    color: #adb5bd;
    white-space: nowrap;
}

.sk-brand-container {
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    white-space: nowrap;
}

.sk-brand-text {
    font-size: 11px;
    font-weight: 900;
    color: #f8f9fa;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.sk-brand-logo {
    width: 26px;
    height: 26px;
    background-color: #0d6efd;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 700;
    font-size: 11px;
}

#app-viewport {
    position: relative;
    flex: 1;
    width: 100%;
    min-height: 0;
    overflow: hidden;
}

/* Scrollbar técnica discreta */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(148, 163, 184, 0.25); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(148, 163, 184, 0.45); }

/* Container Principal Cesium */
#cesiumContainer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-base);
}

body.cursor-mira #cesiumContainer {
    cursor: crosshair !important;
}

/* ============================================================================
   BARRA SUPERIOR (MENU COMPACTO ESTILO QGIS)
   ============================================================================ */
#topbar {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    height: 40px;
    background: var(--bg-panel);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
    z-index: 300;
    gap: 8px;
}

.topbar-esq, .topbar-dir {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.marca-app {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-right: 10px;
    border-right: 1px solid var(--border-subtle);
}

.marca-titulo {
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    white-space: nowrap;
}

.marca-titulo span {
    color: var(--accent);
}

.badge-modo {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 99px;
    background: rgba(16, 185, 129, 0.14);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.35);
    white-space: nowrap;
}

.badge-modo.estatico {
    background: rgba(56, 189, 248, 0.14);
    color: var(--accent);
    border-color: rgba(56, 189, 248, 0.35);
}

.projeto-ativo-nome {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 220px;
}

.badge-pasta {
    background: rgba(30, 41, 59, 0.7);
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: 4px;
    padding: 2px 7px;
    font-size: 10px;
    font-family: var(--mono);
    cursor: pointer;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.badge-pasta:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.sep-vert {
    width: 1px;
    height: 20px;
    background: var(--border-subtle);
    margin: 0 2px;
}

/* Botões base */
.btn {
    background: var(--bg-surface);
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
    border-radius: 4px;
    padding: 5px 10px;
    font-size: 11px;
    font-weight: 500;
    font-family: var(--font);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.btn:hover:not(:disabled) {
    background: var(--bg-hover);
    border-color: var(--border-strong);
}

.btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.btn-primario {
    background: rgba(56, 189, 248, 0.16);
    border-color: rgba(56, 189, 248, 0.45);
    color: var(--accent);
    font-weight: 600;
}

.btn-primario:hover:not(:disabled) {
    background: rgba(56, 189, 248, 0.28);
    border-color: var(--accent);
}

.btn-sucesso {
    background: rgba(16, 185, 129, 0.16);
    border-color: rgba(16, 185, 129, 0.45);
    color: #34d399;
    font-weight: 600;
}

.btn-sucesso:hover:not(:disabled) {
    background: rgba(16, 185, 129, 0.28);
}

.btn-perigo {
    background: rgba(244, 63, 94, 0.12);
    border-color: rgba(244, 63, 94, 0.4);
    color: #fb7185;
}

.btn-perigo:hover:not(:disabled) {
    background: rgba(244, 63, 94, 0.24);
}

.btn-ativo {
    background: var(--accent) !important;
    color: #090d16 !important;
    border-color: var(--accent) !important;
    font-weight: 600;
}

.btn-xs {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid transparent;
    border-radius: 3px;
    padding: 2px 5px;
    font-size: 10px;
    font-family: var(--font);
    cursor: pointer;
    line-height: 1.2;
}

.btn-xs:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--border-subtle);
}

.btn-xs.perigo:hover {
    background: rgba(244, 63, 94, 0.2);
    color: #fb7185;
    border-color: rgba(244, 63, 94, 0.4);
}

/* Dropdown menu exportar */
.dropdown-wrap {
    position: relative;
    display: inline-flex;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 210px;
    background: #0f172a;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 4px;
    display: none;
    flex-direction: column;
    gap: 2px;
    z-index: 500;
}

.dropdown-menu.aberto {
    display: flex;
}

.dropdown-menu.dropdown-acima {
    top: auto;
    bottom: calc(100% + 8px);
    right: 0;
}

.dropdown-item {
    background: transparent;
    border: none;
    color: var(--text-primary);
    text-align: left;
    padding: 7px 10px;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dropdown-item:hover {
    background: var(--bg-hover);
}

.dropdown-item small {
    font-size: 10px;
    color: var(--text-muted);
}

/* ============================================================================
   PAINEL ESQUERDO — ÁRVORE DE CAMADAS ESTILO QGIS
   ============================================================================ */
#painel-camadas {
    position: absolute;
    top: 58px;
    left: 10px;
    bottom: 42px;
    width: 364px;
    background: var(--bg-panel);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    z-index: 250;
    transition: transform 0.22s ease, opacity 0.22s ease;
}

body.tabela-aberta #painel-camadas {
    bottom: calc(36vh + 16px);
}

#painel-camadas.recolhido {
    transform: translateX(-390px);
    opacity: 0;
    pointer-events: none;
}

.painel-cabecalho {
    padding: 9px 12px;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    flex-shrink: 0;
}

.painel-cabecalho h2 {
    margin: 0;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-secondary);
}

.camadas-toolbar {
    padding: 8px 10px;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    gap: 5px;
    align-items: center;
    flex-shrink: 0;
}

.inp-texto, select.inp-select {
    background: rgba(2, 6, 23, 0.55);
    border: 1px solid var(--border-subtle);
    border-radius: 4px;
    color: var(--text-primary);
    padding: 5px 8px;
    font-size: 11px;
    font-family: var(--font);
    outline: none;
}

.inp-texto:focus, select.inp-select:focus {
    border-color: var(--accent);
}

.camadas-arvore {
    flex: 1 1 0%;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 6px 6px 10px 6px;
    display: block;
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.38) transparent;
}

.camadas-arvore::-webkit-scrollbar {
    width: 6px;
}

.camadas-arvore::-webkit-scrollbar-track {
    background: transparent;
}

.camadas-arvore::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.35);
    border-radius: 99px;
}

.camadas-arvore::-webkit-scrollbar-thumb:hover {
    background: rgba(56, 189, 248, 0.55);
}

/* Dropzone rápido na árvore */
.dropzone-mini {
    margin: 6px 8px 4px 8px;
    padding: 7px 10px;
    border: 1px dashed rgba(56, 189, 248, 0.35);
    border-radius: 4px;
    background: rgba(56, 189, 248, 0.04);
    text-align: center;
    font-size: 10px;
    color: var(--text-secondary);
    cursor: pointer;
    flex-shrink: 0;
    transition: border-color 0.15s, background 0.15s;
}

.dropzone-mini:hover {
    border-color: var(--accent);
    background: rgba(56, 189, 248, 0.1);
    color: var(--text-primary);
}

/* Nós da Árvore QGIS (lista plana e rolável sem caixas aninhadas) */
.no-grupo {
    display: block;
    padding-bottom: 4px;
    margin-bottom: 4px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.no-grupo:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.no-grupo .no-grupo {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 1px;
}

.no-grupo.selecionado > .no-cabecalho,
.no-disciplina.selecionado > .no-cabecalho {
    background: var(--bg-active);
    box-shadow: inset 2px 0 0 var(--accent);
}

.no-disciplina {
    display: block;
    margin-top: 1px;
}

.no-cabecalho {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 5px;
    border-radius: 4px;
    cursor: pointer;
    user-select: none;
}

.no-cabecalho:hover {
    background: var(--bg-hover);
}

.no-icone-pasta {
    font-size: 11px;
    color: #fbbf24;
    flex-shrink: 0;
    line-height: 1;
}

.no-icone-disc {
    font-size: 10px;
    color: var(--accent);
    flex-shrink: 0;
    font-family: var(--mono);
    font-weight: 700;
}

.no-arraste-alca {
    color: var(--text-muted);
    font-size: 11px;
    cursor: grab;
    opacity: 0.55;
    flex-shrink: 0;
    padding: 2px 4px;
    user-select: none;
}

.no-arraste-alca:active {
    cursor: grabbing;
}

.no-cabecalho:hover .no-arraste-alca,
.no-folha:hover .no-arraste-alca {
    opacity: 1;
    color: var(--text-secondary);
}

.arrastando {
    opacity: 0.45 !important;
}

.alvo-drop {
    outline: 1.5px dashed var(--accent) !important;
    background: rgba(56, 189, 248, 0.14) !important;
}

.drop-antes {
    box-shadow: inset 0 2px 0 0 var(--accent);
}

.drop-depois {
    box-shadow: inset 0 -2px 0 0 var(--accent);
}

.no-seta {
    width: 12px;
    font-size: 8px;
    color: var(--text-muted);
    text-align: center;
    transition: transform 0.15s;
    flex-shrink: 0;
}

.expandido > .no-cabecalho .no-seta {
    transform: rotate(90deg);
}

.no-chk {
    accent-color: var(--accent);
    margin: 0;
    cursor: pointer;
    flex-shrink: 0;
}

.no-cor {
    width: 8px;
    height: 8px;
    border-radius: 2px;
    flex-shrink: 0;
}

.no-titulo {
    flex: 1;
    min-width: 0;
    font-size: 11px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.no-folha .no-titulo {
    font-weight: 400;
}

.no-tag {
    font-size: 9px;
    font-family: var(--mono);
    padding: 1px 4px;
    border-radius: 3px;
    background: rgba(148, 163, 184, 0.14);
    color: var(--text-secondary);
    flex-shrink: 0;
}

.no-acoes {
    display: flex;
    align-items: center;
    gap: 1px;
    flex-shrink: 0;
}

.no-filhos {
    display: none;
    padding: 1px 0 2px 10px;
    margin-left: 8px;
    border-left: 1px solid rgba(148, 163, 184, 0.18);
}

.no-disciplina > .no-filhos {
    border-left-color: rgba(56, 189, 248, 0.28);
}

.expandido > .no-filhos {
    display: block;
}

.no-folha {
    display: block;
    border-radius: 4px;
    padding: 3px 5px;
    margin-bottom: 1px;
    border: none;
    background: transparent;
    cursor: pointer;
}

.no-folha:hover {
    background: rgba(148, 163, 184, 0.1);
}

.no-folha.selecionado {
    background: var(--bg-active);
    box-shadow: inset 2px 0 0 var(--accent);
}

.no-folha-topo {
    display: flex;
    align-items: center;
    gap: 5px;
}

.no-folha-ctrl {
    display: flex;
    align-items: center;
    gap: 6px;
    padding-left: 19px;
    margin-top: 2px;
}

/* Drawer de Propriedades & Edição QGIS-like */
#drawer-propriedades {
    border-top: 1px solid var(--border-strong);
    background: rgba(2, 6, 23, 0.72);
    padding: 8px 10px;
    display: none;
    flex-direction: column;
    gap: 5px;
    max-height: 38%;
    overflow-y: auto;
    flex-shrink: 0;
}

#drawer-propriedades.aberto {
    display: flex;
}

#drawer-propriedades .linha-form input[type="text"],
#drawer-propriedades .linha-form select {
    width: 165px;
}

.prop-acoes-grade {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding-top: 3px;
}

.prop-acoes-grade .btn {
    padding: 3px 7px;
    font-size: 10px;
}

.slider-opacidade {
    flex: 1;
    height: 3px;
    accent-color: var(--accent);
    cursor: pointer;
}

.val-opacidade {
    font-size: 9px;
    font-family: var(--mono);
    color: var(--text-muted);
    width: 28px;
    text-align: right;
}

/* Drawer de Posicionamento / Transformação no rodapé do painel esquerdo */
#drawer-transform {
    border-top: 1px solid var(--border-strong);
    background: rgba(2, 6, 23, 0.65);
    padding: 10px 12px;
    display: none;
    flex-direction: column;
    gap: 7px;
    max-height: 44%;
    overflow-y: auto;
    flex-shrink: 0;
}

#drawer-transform.aberto {
    display: flex;
}

.drawer-titulo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    font-weight: 700;
    color: var(--accent);
}

.linha-form {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    font-size: 11px;
    color: var(--text-secondary);
}

.linha-form input[type="number"],
.linha-form input[type="text"],
.linha-form select {
    width: 155px;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid var(--border-subtle);
    border-radius: 4px;
    color: var(--text-primary);
    padding: 4px 7px;
    font-size: 11px;
    font-family: var(--mono);
}

.presets-linha {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 3px;
}

.presets-linha.cols-5 { grid-template-columns: repeat(5, 1fr); }
.presets-linha.cols-4 { grid-template-columns: repeat(4, 1fr); }
.presets-linha.cols-3 { grid-template-columns: repeat(3, 1fr); }

.btn-preset {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    border-radius: 3px;
    padding: 3px 2px;
    font-size: 10px;
    cursor: pointer;
    text-align: center;
}

.btn-preset:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.grade-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
}

.grade-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
}

/* ============================================================================
   POPOVER AMBIENTE
   ============================================================================ */
#popover-ambiente {
    position: absolute;
    top: 56px;
    right: 10px;
    width: 300px;
    background: var(--bg-panel);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 12px;
    z-index: 450;
    display: none;
    flex-direction: column;
    gap: 10px;
}

#popover-ambiente.aberto {
    display: flex;
}

/* ============================================================================
   CARD FLUTUANTE — INSPETOR DE ELEMENTO 3D / KMZ
   ============================================================================ */
#inspetor-elemento {
    position: absolute;
    top: 58px;
    right: 10px;
    width: 320px;
    max-height: calc(100% - 75px);
    background: var(--bg-panel);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    z-index: 260;
    display: none;
    flex-direction: column;
    overflow: hidden;
}

body.tabela-aberta #inspetor-elemento {
    max-height: calc(64vh - 76px);
}

#inspetor-elemento.aberto {
    display: flex;
}

.inspetor-corpo {
    padding: 10px 12px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.kv-grid {
    display: grid;
    grid-template-columns: 95px 1fr;
    gap: 4px 8px;
    font-size: 11px;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 8px;
}

.kv-chave { color: var(--text-muted); }
.kv-valor { color: var(--text-primary); word-break: break-word; font-weight: 500; }
.kv-valor.mono { font-family: var(--mono); font-size: 10px; color: var(--accent); }

/* ============================================================================
   PAINEL INFERIOR DOCKÁVEL — TABELA DE ATRIBUTOS ESTILO QGIS
   ============================================================================ */
#tabela-atributos-dock {
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 10px;
    height: 36vh;
    min-height: 220px;
    background: var(--bg-panel);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    z-index: 280;
    display: none;
    flex-direction: column;
    overflow: hidden;
}

#tabela-atributos-dock.aberto {
    display: flex;
}

.tabela-header {
    padding: 7px 12px;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.tabela-filtros {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.tabela-totais {
    padding: 5px 12px;
    background: rgba(2, 6, 23, 0.45);
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-secondary);
    gap: 12px;
}

.totais-chips {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.totais-chips strong {
    color: var(--accent);
    font-family: var(--mono);
}

.tabela-scroll {
    flex: 1;
    overflow: auto;
}

.tabela-qgis {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
}

.tabela-qgis thead th {
    position: sticky;
    top: 0;
    background: #0f172a;
    color: var(--text-secondary);
    font-weight: 600;
    text-align: left;
    padding: 6px 8px;
    border-bottom: 1px solid var(--border-strong);
    white-space: nowrap;
    z-index: 2;
}

.tabela-qgis tbody tr {
    border-bottom: 1px solid rgba(148, 163, 184, 0.08);
    cursor: pointer;
}

.tabela-qgis tbody tr:hover {
    background: var(--bg-hover);
}

.tabela-qgis tbody tr.selecionada {
    background: var(--bg-active);
}

.tabela-qgis tbody td {
    padding: 5px 8px;
    max-width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tabela-qgis td.num {
    font-family: var(--mono);
    text-align: right;
    color: #cbd5e1;
}

/* ============================================================================
   APRESENTAÇÃO / STORYTELLING + ESTÚDIO DE SLIDES + CAIXA DE TEXTO
   ============================================================================ */
.btn-primario-xs {
    background: rgba(56, 189, 248, 0.16);
    color: var(--accent);
    border-color: rgba(56, 189, 248, 0.4);
    font-weight: 600;
}

.btn-primario-xs:hover {
    background: rgba(56, 189, 248, 0.28);
    color: #fff;
}

#painel-slides {
    position: absolute;
    top: 58px;
    right: 10px;
    bottom: 42px;
    width: 340px;
    background: var(--bg-panel);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    z-index: 265;
    display: none;
    flex-direction: column;
    overflow: hidden;
}

#painel-slides.aberto {
    display: flex;
}

body.tabela-aberta #painel-slides {
    bottom: calc(36vh + 16px);
}

body.modo-apresentacao #painel-slides {
    display: none !important;
}

.slides-config-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 7px 10px;
    border-bottom: 1px solid var(--border-subtle);
    background: rgba(2, 6, 23, 0.45);
    flex-shrink: 0;
    flex-wrap: wrap;
}

.slides-cfg-num {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    color: var(--text-secondary);
}

.slides-cfg-num input {
    width: 46px;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid var(--border-subtle);
    border-radius: 3px;
    color: var(--text-primary);
    padding: 2px 4px;
    font-size: 10px;
    font-family: var(--mono);
    text-align: center;
}

#lista-slides-gerenciador {
    flex: 1 1 0%;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    display: block;
    padding: 8px;
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.38) transparent;
}

.slide-card {
    display: block;
    padding: 7px 8px;
    margin-bottom: 6px;
    border-radius: 5px;
    border: 1px solid var(--border-subtle);
    background: rgba(15, 23, 42, 0.65);
    cursor: pointer;
    transition: border-color 0.14s, background 0.14s;
}

.slide-card:hover {
    border-color: var(--border-strong);
    background: rgba(30, 41, 59, 0.65);
}

.slide-card.ativo {
    border-color: rgba(56, 189, 248, 0.7);
    background: var(--bg-active);
}

.slide-card-topo {
    display: flex;
    align-items: center;
    gap: 5px;
}

.slide-card-num {
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 700;
    color: var(--accent);
    flex-shrink: 0;
}

.slide-card-titulo {
    flex: 1;
    min-width: 0;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.slide-pill {
    font-family: var(--mono);
    font-size: 9px;
    padding: 1px 5px;
    border-radius: 3px;
    background: rgba(148, 163, 184, 0.14);
    color: var(--text-secondary);
    flex-shrink: 0;
}

.slide-pill.texto {
    background: rgba(56, 189, 248, 0.16);
    color: var(--accent);
}

.slide-card-desc {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 3px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.slide-card-rodape {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin-top: 6px;
    padding-top: 5px;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.slide-card-meta {
    font-size: 9px;
    color: var(--text-muted);
    font-family: var(--mono);
}

.slide-card-acoes {
    display: flex;
    gap: 3px;
    flex-wrap: wrap;
}

.slide-bloco-caixa {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 9px 10px;
    border-radius: 5px;
    border: 1px solid rgba(56, 189, 248, 0.3);
    background: rgba(56, 189, 248, 0.05);
}

/* Caixa de texto flutuante exibida sobre o mapa durante os slides */
#slide-callout-box {
    position: absolute;
    width: 320px;
    max-width: calc(100vw - 32px);
    max-height: 45vh;
    border-radius: 7px;
    box-shadow: var(--shadow);
    z-index: 280;
    display: none;
    flex-direction: column;
    overflow: hidden;
    backdrop-filter: blur(12px);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

#slide-callout-box.aberto {
    display: flex;
}

#slide-callout-box.pos-top-right {
    top: 62px;
    right: 14px;
}

body:not(.modo-apresentacao) #slide-callout-box.pos-top-right {
    right: 362px;
}

#slide-callout-box.pos-top-left {
    top: 62px;
    left: 14px;
}

body:not(.modo-apresentacao):not(.painel-recolhido) #slide-callout-box.pos-top-left {
    top: 102px;
    left: 384px;
}

#slide-callout-box.pos-top-center {
    top: 62px;
    left: 50%;
    transform: translateX(-50%);
}

#slide-callout-box.pos-bottom-right {
    bottom: 84px;
    right: 14px;
}

#slide-callout-box.pos-bottom-left {
    bottom: 84px;
    left: 14px;
}

body:not(.modo-apresentacao):not(.painel-recolhido) #slide-callout-box.pos-bottom-left {
    left: 384px;
}

#slide-callout-box.estilo-escuro {
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid rgba(148, 163, 184, 0.35);
    color: var(--text-primary);
}

#slide-callout-box.estilo-destaque {
    background: rgba(8, 47, 73, 0.92);
    border: 1px solid rgba(56, 189, 248, 0.7);
    color: #f0f9ff;
}

#slide-callout-box.estilo-claro {
    background: rgba(248, 250, 252, 0.94);
    border: 1px solid rgba(148, 163, 184, 0.6);
    color: #0f172a;
}

.slide-callout-hdr {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 7px 10px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.22);
    font-size: 12px;
}

#slide-callout-box.estilo-claro .slide-callout-hdr {
    border-bottom-color: rgba(15, 23, 42, 0.12);
}

#slide-callout-box.estilo-claro .btn-xs {
    color: #334155;
    border-color: rgba(15, 23, 42, 0.22);
}

.slide-callout-corpo {
    padding: 9px 11px;
    font-size: 11.5px;
    line-height: 1.5;
    white-space: pre-line;
    overflow-y: auto;
}

#slide-callout-box.minimizado .slide-callout-corpo {
    display: none;
}

#barra-apresentacao {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-panel);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    padding: 0;
    display: none;
    flex-direction: column;
    z-index: 320;
    box-shadow: var(--shadow);
    max-width: 94vw;
}

#barra-apresentacao.aberta {
    display: flex;
}

.apresentacao-progresso-trilha {
    width: 100%;
    height: 3px;
    background: rgba(15, 23, 42, 0.85);
    border-radius: 8px 8px 0 0;
    overflow: hidden;
}

.apresentacao-progresso-barra {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #0ea5e9, #38bdf8, #34d399);
}

.apresentacao-controles-linha {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    flex-wrap: wrap;
}

#slide-seletor-rapido {
    max-width: 155px;
    font-size: 11px;
    padding: 4px 6px;
}

.slide-meta {
    min-width: 150px;
    max-width: 280px;
    text-align: center;
}

.slide-titulo {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.slide-desc {
    font-size: 10px;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.slide-cont {
    font-size: 10px;
    font-family: var(--mono);
    color: var(--accent);
}

/* Mini-drawer de camadas para o espectador no modo apresentação */
#drawer-camadas-cliente {
    position: absolute;
    bottom: 78px;
    right: 16px;
    width: 300px;
    max-height: 60vh;
    background: var(--bg-panel);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    z-index: 320;
    display: none;
    flex-direction: column;
    overflow: hidden;
}

#drawer-camadas-cliente.aberto {
    display: flex;
}

/* Modo Apresentação ativa: esconde barra de edição completa */
body.modo-apresentacao #painel-camadas,
body.modo-apresentacao #tabela-atributos-dock,
body.modo-apresentacao #btn-abrir-camadas-flut {
    display: none !important;
}

body.modo-apresentacao .somente-editor {
    display: none !important;
}

#btn-abrir-camadas-flut {
    position: absolute;
    top: 58px;
    left: 10px;
    z-index: 240;
    display: none;
}

/* ============================================================================
   BUSCA RÁPIDA DE CIDADES / ATALHO MATO GROSSO
   ============================================================================ */
#busca-cidade-box {
    position: absolute;
    top: 58px;
    left: 384px;
    width: 296px;
    z-index: 270;
    transition: left 0.22s ease;
}

body.painel-recolhido #busca-cidade-box {
    left: 98px;
}

body.modo-apresentacao #busca-cidade-box {
    left: 10px;
}

.busca-cidade-barra {
    display: flex;
    align-items: center;
    gap: 5px;
    background: var(--bg-panel);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 4px 7px;
}

.busca-cidade-barra:focus-within {
    border-color: var(--accent);
}

.busca-cidade-icone {
    font-size: 13px;
    color: var(--accent);
    line-height: 1;
    flex-shrink: 0;
    user-select: none;
}

#inp-busca-cidade {
    flex: 1;
    min-width: 0;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 11px;
    font-family: var(--font);
    padding: 2px 0;
}

#inp-busca-cidade::placeholder {
    color: var(--text-muted);
}

.btn-ir-cidade {
    color: var(--accent);
    border-color: rgba(56, 189, 248, 0.35);
    font-weight: 700;
    letter-spacing: 0.3px;
}

.btn-ir-cidade:hover {
    background: rgba(56, 189, 248, 0.18);
    border-color: var(--accent);
}

.busca-cidade-dropdown {
    margin-top: 4px;
    background: var(--bg-panel);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: none;
    flex-direction: column;
    max-height: 320px;
    overflow-y: auto;
    padding: 4px;
    gap: 2px;
}

.busca-cidade-dropdown.aberto {
    display: flex;
}

.busca-cidade-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    text-align: left;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 4px;
    padding: 6px 8px;
    color: var(--text-primary);
    cursor: pointer;
    font-family: var(--font);
}

.busca-cidade-item:hover,
.busca-cidade-item.ativo {
    background: var(--bg-hover);
    border-color: rgba(56, 189, 248, 0.35);
}

.busca-cidade-txt {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 1px;
}

.busca-cidade-titulo {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.busca-cidade-sub {
    font-size: 10px;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.busca-cidade-tag {
    flex-shrink: 0;
    font-size: 9px;
    font-weight: 700;
    font-family: var(--mono);
    padding: 2px 5px;
    border-radius: 3px;
    background: rgba(56, 189, 248, 0.14);
    color: var(--accent);
    border: 1px solid rgba(56, 189, 248, 0.3);
}

.busca-cidade-status {
    padding: 6px 8px;
    font-size: 10px;
    color: var(--text-muted);
    text-align: center;
}

@media (max-width: 900px) {
    #busca-cidade-box {
        left: 10px;
        top: 100px;
        width: 250px;
    }
}

/* ============================================================================
   HUD COORDENADAS & TOAST
   ============================================================================ */
#hud-coordenadas {
    position: absolute;
    bottom: 36px;
    left: 10px;
    background: var(--bg-panel);
    border: 1px solid var(--border-subtle);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 10px;
    font-family: var(--mono);
    color: var(--text-secondary);
    z-index: 200;
    pointer-events: none;
}

.cesium-widget-credits {
    z-index: 220 !important;
}

body.tabela-aberta #hud-coordenadas,
body.modo-apresentacao #hud-coordenadas {
    display: none;
}

#toast {
    position: absolute;
    top: 60px;
    left: 50%;
    transform: translateX(-50%) translateY(-16px);
    background: #0f172a;
    color: var(--text-primary);
    border: 1px solid var(--border-strong);
    padding: 8px 16px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 500;
    z-index: 2000;
    box-shadow: var(--shadow);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    max-width: 85vw;
    text-align: center;
}

#toast.ativo {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ============================================================================
   MODAIS LIMPOS
   ============================================================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.78);
    backdrop-filter: blur(5px);
    z-index: 1500;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.modal-overlay.aberto {
    display: flex;
}

.modal-box {
    width: 480px;
    max-width: 95vw;
    max-height: 88vh;
    background: #0f172a;
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.75);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-box.grande {
    width: 640px;
}

.modal-hdr {
    padding: 13px 18px;
    background: rgba(30, 41, 59, 0.45);
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-hdr h3 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
}

.modal-body {
    padding: 16px 18px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.modal-ftr {
    padding: 11px 18px;
    border-top: 1px solid var(--border-subtle);
    background: rgba(2, 6, 23, 0.4);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.campo {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.campo label {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 500;
}

.campo input, .campo select, .campo textarea {
    width: 100%;
    background: rgba(2, 6, 23, 0.65);
    border: 1px solid var(--border-subtle);
    border-radius: 4px;
    color: var(--text-primary);
    padding: 7px 10px;
    font-size: 12px;
    font-family: var(--font);
    outline: none;
}

.campo input:focus, .campo select:focus, .campo textarea:focus {
    border-color: var(--accent);
}

.card-lista {
    background: rgba(2, 6, 23, 0.4);
    border: 1px solid var(--border-subtle);
    border-radius: 5px;
    padding: 9px 11px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.card-lista:hover {
    border-color: var(--border-strong);
}

.aviso-box {
    background: rgba(56, 189, 248, 0.08);
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: 5px;
    padding: 9px 11px;
    font-size: 11px;
    color: #cbd5e1;
    line-height: 1.45;
}

/* ============================================================================
   ISOLAMENTO DE ELEMENTO & CHECKBOX INLINE
   ============================================================================ */
.chk-inline {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
}

.chk-inline input {
    accent-color: var(--accent);
    margin: 0;
    cursor: pointer;
}

.btn-isolar-linha {
    border: 1px solid var(--border-subtle);
    padding: 2px 6px;
    font-size: 10px;
}

#banner-isolamento {
    position: absolute;
    top: 58px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.96);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(56, 189, 248, 0.55);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 6px 12px;
    display: none;
    align-items: center;
    gap: 8px;
    z-index: 290;
    max-width: 82vw;
}

#banner-isolamento.aberto {
    display: flex;
}

#banner-ocultos {
    position: absolute;
    top: 58px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.94);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(245, 158, 11, 0.5);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 5px 12px;
    display: none;
    align-items: center;
    gap: 10px;
    font-size: 11px;
    color: var(--text-primary);
    z-index: 285;
}

#banner-ocultos.aberto {
    display: flex;
}

.inspetor-obj-controle {
    padding: 8px 12px;
    border-top: 1px solid var(--border-subtle);
    background: rgba(2, 6, 23, 0.35);
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex-shrink: 0;
}

.insp-obj-linha {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 10.5px;
    color: var(--text-secondary);
}

.insp-obj-linha strong {
    font-family: var(--mono);
    color: var(--accent);
}

.tabela-qgis tbody tr.linha-oculta td:not(:first-child) {
    opacity: 0.45;
    text-decoration: line-through;
}

.iso-pill-lbl {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--accent);
}

#iso-nome {
    font-size: 11px;
    color: var(--text-primary);
    max-width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.iso-macro-tag {
    font-size: 10px;
    color: var(--text-secondary);
    background: rgba(148, 163, 184, 0.14);
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
}

/* ============================================================================
   OVERLAY DE PROGRESSO EM TEMPO REAL
   ============================================================================ */
.prog-tempo {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--accent);
}

.prog-linha-topo {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
}

.prog-pct {
    font-family: var(--mono);
    color: var(--accent);
}

.prog-trilha {
    width: 100%;
    height: 10px;
    background: rgba(2, 6, 23, 0.75);
    border: 1px solid var(--border-subtle);
    border-radius: 99px;
    overflow: hidden;
}

.prog-barra {
    height: 100%;
    background: linear-gradient(90deg, #0ea5e9, #38bdf8, #34d399);
    border-radius: 99px;
    transition: width 0.25s ease;
}

.prog-detalhe {
    font-size: 11px;
    color: var(--text-secondary);
    min-height: 16px;
}

.prog-macros {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    max-height: 150px;
    overflow-y: auto;
}

.prog-chip {
    font-size: 10px;
    padding: 3px 7px;
    border-radius: 4px;
    border: 1px solid var(--border-subtle);
    background: rgba(30, 41, 59, 0.55);
    color: var(--text-muted);
}

.prog-chip.convertendo {
    border-color: rgba(56, 189, 248, 0.65);
    background: rgba(56, 189, 248, 0.16);
    color: var(--accent);
    font-weight: 600;
}

.prog-chip.concluido {
    border-color: rgba(16, 185, 129, 0.5);
    background: rgba(16, 185, 129, 0.14);
    color: #34d399;
}

.prog-chip.vazio {
    opacity: 0.45;
}

.prog-erro {
    background: rgba(244, 63, 94, 0.14);
    border: 1px solid rgba(244, 63, 94, 0.45);
    color: #fda4af;
    border-radius: 5px;
    padding: 9px 11px;
    font-size: 11px;
    line-height: 1.45;
    word-break: break-word;
}

/* ============================================================================
   RECORTE DE SATÉLITE (<= 100x100m) & MARCA SK ENGENHARIA
   ============================================================================ */
.marca-sk-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: inherit;
}

.marca-sk-link:hover .marca-titulo {
    color: var(--accent);
}

.marca-sk-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 5px;
    background: #1e3a8a;
    color: #ffffff;
    font-weight: 800;
    font-size: 11px;
    letter-spacing: -0.3px;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.18);
}

#card-marca-sk {
    position: absolute;
    bottom: 10px;
    right: 10px;
    z-index: 230;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-panel);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-strong);
    border-radius: 7px;
    padding: 5px 8px;
    box-shadow: var(--shadow);
}

body.tabela-aberta #card-marca-sk {
    display: none;
}

.card-sk-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.card-sk-info a {
    color: var(--text-primary);
    font-weight: 700;
    font-size: 11px;
    text-decoration: none;
}

.card-sk-info a:hover {
    color: var(--accent);
}

.card-sk-info span {
    font-size: 9.5px;
    color: var(--text-muted);
}

.btn-sk-whats {
    background: #16a34a;
    border-color: #15803d;
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
}

.btn-sk-whats:hover {
    background: #15803d;
    color: #ffffff;
}

/* ============================================================================
   CONTROLE DE ACESSO: SOMENTE ESTÚDIO LOCAL & PÁGINA DA OBRA SOMENTE LEITURA
   ============================================================================ */
.somente-estudio-local {
    display: none !important;
}

.somente-web-estatico {
    display: none !important;
}

body.estudio-local:not(.modo-apresentacao):not(.somente-leitura) .somente-estudio-local {
    display: inline-flex !important;
}

body.estudio-local:not(.modo-apresentacao):not(.somente-leitura) .dropdown-wrap.somente-estudio-local {
    display: inline-block !important;
}

body.estudio-local:not(.modo-apresentacao):not(.somente-leitura) .dropdown-item.somente-estudio-local {
    display: flex !important;
}

body:not(.estudio-local):not(.modo-apresentacao):not(.somente-leitura) .somente-web-estatico {
    display: inline-flex !important;
}

.dot-pendencia {
    display: none;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #f59e0b;
    box-shadow: 0 0 6px rgba(245, 158, 11, 0.9);
    flex-shrink: 0;
}

#btn-salvar-projeto.tem-pendencia {
    border-color: rgba(245, 158, 11, 0.75);
}

#btn-salvar-projeto.tem-pendencia .dot-pendencia {
    display: inline-block;
}

#btn-pasta-pc.conectada {
    background: rgba(16, 185, 129, 0.14);
    border-color: rgba(16, 185, 129, 0.45);
    color: #34d399;
}

#btn-pasta-pc.precisa-permissao {
    background: rgba(245, 158, 11, 0.14);
    border-color: rgba(245, 158, 11, 0.55);
    color: #fbbf24;
}

.banner-pasta-local {
    display: none;
    position: absolute;
    top: 56px;
    right: 10px;
    z-index: 290;
    background: var(--bg-panel);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(245, 158, 11, 0.5);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 6px 10px;
    align-items: center;
    gap: 10px;
    font-size: 11px;
    color: var(--text-primary);
    max-width: calc(100% - 20px);
}

body:not(.estudio-local):not(.modo-apresentacao):not(.somente-leitura) .banner-pasta-local.visivel {
    display: inline-flex;
}

body.somente-leitura .somente-editor,
body.somente-leitura #btn-modo-editor,
body.somente-leitura #btn-apresentacao-editar,
body.somente-leitura #btn-fechar-apresentacao,
body.somente-leitura #dropzone-camadas,
body.somente-leitura #btn-novo-grupo,
body.somente-leitura #btn-add-camada-painel,
body.somente-leitura #btn-mover-cima,
body.somente-leitura #btn-mover-baixo,
body.somente-leitura #drawer-propriedades,
body.somente-leitura #drawer-transform,
body.somente-leitura [data-action="add-aqui"],
body.somente-leitura [data-action="posicionar"],
body.somente-leitura [data-action="excluir"] {
    display: none !important;
}

/* ============================================================================
   ORTOFOTOS / PIRÂMIDES XYZ LOCAIS (QGIS -> tiles/<nome>/)
   ============================================================================ */
#sec-ortofotos-xyz {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 7px 8px;
    border-radius: 6px;
    background: rgba(2, 6, 23, 0.45);
    border: 1px solid var(--border-subtle);
}

.xyz-hdr {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    font-size: 10.5px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.xyz-lista {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 180px;
    overflow-y: auto;
}

.xyz-vazio {
    font-size: 10px;
    line-height: 1.4;
    color: var(--text-muted);
}

.xyz-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 5px 6px;
    border-radius: 4px;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid var(--border-subtle);
}

.xyz-item-topo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

.xyz-item-chk {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    min-width: 0;
    flex: 1;
}

.xyz-item-chk span {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.xyz-item-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    color: var(--text-secondary);
}

.xyz-item-meta input[type="range"] {
    flex: 1;
    min-width: 0;
    accent-color: var(--accent);
}

.topbar-esq {
    flex: 1 1 auto;
}

.topbar-dir {
    flex-shrink: 1;
    min-width: 0;
}

@media (max-width: 1280px) {
    #topbar {
        padding: 0 8px;
        gap: 6px;
    }
    .topbar-esq, .topbar-dir {
        gap: 4px;
    }
    .topbar-dir {
        overflow: visible;
    }
    .marca-app {
        gap: 6px;
        padding-right: 7px;
    }
    .marca-titulo {
        font-size: 10.5px;
    }
    .badge-modo {
        font-size: 9px;
        padding: 2px 5px;
    }
    .projeto-ativo-nome {
        max-width: 74px;
        font-size: 10.5px;
    }
    #topbar .btn {
        padding: 3.5px 5.5px;
        font-size: 10px;
        gap: 3px;
    }
    .sep-vert {
        display: none;
    }
}

@media (max-width: 1120px) {
    .marca-titulo {
        display: none;
    }
}
