:root {
  --blue: #2f5d4c; --blue-2: #234a3c; --blue-50: #e8efe5; --gold: #b4915c; --forest: #203b32;
  --ink: #1f362e; --ink-2: #3a5047; --muted: #6a786f; --line: #e0e5dc; --line-2: #edf0e9;
  --bg: #f3f4ef; --card: #ffffff; --green: #16a34a; --amber: #d97706; --red: #e5484d;
  --shadow: 0 1px 2px rgba(28, 48, 40, .06), 0 8px 24px rgba(28, 48, 40, .09);
  --r: 14px;
  --font: 'DM Sans', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 14px/1.45 var(--font); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
svg { display: block; }
svg path, svg circle { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
#app { height: 100dvh; display: flex; flex-direction: column; }

/* ---------- barra superior ---------- */
.topbar { height: 64px; display: flex; align-items: center; gap: 14px; padding: 0 18px; background: #fff; border-bottom: 1px solid var(--line); z-index: 6; padding-top: env(safe-area-inset-top); flex: none; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); flex: none; }
.brand .logo svg { width: 34px; height: 34px; }
.brand .logo svg path { fill: #fff; stroke: none; }
.brand-name { font: 800 19px/1 'Manrope', var(--font); letter-spacing: -.2px; }
.search { position: relative; display: flex; align-items: center; gap: 8px; background: var(--bg); border: 1px solid var(--line); border-radius: 11px; padding: 0 10px; width: min(420px, 34vw); height: 40px; margin-left: 18px; }
.search > svg { width: 17px; height: 17px; color: var(--muted); flex: none; }
.search input { border: 0; background: transparent; outline: none; flex: 1; min-width: 0; height: 100%; }
.search:focus-within { border-color: var(--blue); background: #fff; box-shadow: 0 0 0 3px rgba(47,93,76,.14); }
.search kbd { font: 600 11px var(--font); color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; background: #fff; }
.suggest { position: absolute; left: 0; right: 0; top: calc(100% + 6px); background: #fff; border-radius: 12px; box-shadow: var(--shadow); border: 1px solid var(--line); padding: 6px; z-index: 30; }
.suggest button { display: flex; width: 100%; justify-content: space-between; align-items: center; gap: 10px; border: 0; background: none; padding: 9px 10px; border-radius: 8px; cursor: pointer; text-align: left; }
.suggest button:hover, .suggest button:focus { background: var(--blue-50); outline: none; }
.suggest small { color: var(--muted); }
.spacer { flex: 1; }
.site-card { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 12px; padding: 5px 12px 5px 6px; }
.site-badge { width: 34px; height: 34px; border-radius: 9px; background: var(--blue); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.site-txt { display: flex; flex-direction: column; line-height: 1.15; }
.site-txt b { font-size: 14px; }
.site-txt small { color: var(--muted); font-size: 12px; }
.live { display: flex; align-items: center; gap: 7px; background: #ecfdf3; color: #067647; border-radius: 10px; padding: 8px 12px; font-variant-numeric: tabular-nums; }
.live .dot { width: 8px; height: 8px; border-radius: 50%; background: #17b26a; box-shadow: 0 0 0 0 rgba(23,178,106,.6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px rgba(23,178,106,0); } 100% { box-shadow: 0 0 0 0 rgba(23,178,106,0); } }
.live small { color: #079455; font-size: 11px; }
.account { position: relative; display: flex; justify-content: flex-end; }
.user-chip { display: flex; align-items: center; gap: 9px; border: 0; background: none; padding: 4px; border-radius: 12px; cursor: pointer; text-align: left; }
.user-chip:hover { background: var(--bg); }
.user-chip .avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.user-chip .who { display: flex; flex-direction: column; line-height: 1.2; }
.user-chip small { color: var(--muted); font-size: 12px; }
.menu { position: absolute; right: 0; top: calc(100% + 8px); background: #fff; border-radius: 12px; box-shadow: var(--shadow); border: 1px solid var(--line); padding: 6px; min-width: 210px; z-index: 30; }
.menu button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 10px 12px; border-radius: 8px; cursor: pointer; font-weight: 500; }
.menu button:hover { background: var(--bg); }

/* ---------- palco ---------- */
.stage { position: relative; flex: 1; min-height: 0; overflow: hidden; background: #dfe8ee; }
.view { position: absolute; inset: 0; }
#view3d canvas { width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
.loading { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 12px; background: var(--bg); color: var(--ink-2); font-weight: 600; z-index: 9; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--blue); animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.tip { position: absolute; z-index: 8; pointer-events: none; background: #fff; color: var(--ink); padding: 7px 11px; border-radius: 9px; font-size: 13px; white-space: nowrap; display: flex; align-items: center; gap: 5px; box-shadow: var(--shadow); }
.tip .dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; margin-left: 4px; }
.tip span { color: var(--muted); }

/* ---------- indicadores ---------- */
.kpis { position: absolute; left: 18px; top: 18px; display: flex; gap: 12px; z-index: 3; max-width: calc(100% - 36px); }
.kpi { display: flex; gap: 12px; align-items: flex-start; background: rgba(255,255,255,.97); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 14px 16px; min-width: 214px; text-align: left; cursor: pointer; }
.kpi:hover { border-color: #c9d6ea; }
.kpi-ic { width: 38px; height: 38px; border-radius: 10px; background: var(--blue-50); color: var(--blue); display: grid; place-items: center; flex: none; }
.kpi-ic svg { width: 20px; height: 20px; }
.kpi-txt { display: flex; flex-direction: column; gap: 1px; }
.kpi-txt > small { color: var(--ink-2); font-size: 13px; }
.kpi-v { display: flex; align-items: baseline; gap: 5px; }
.kpi-v b { font: 700 25px/1.15 var(--font); letter-spacing: -.5px; }
.kpi-v em { font-style: normal; color: var(--ink-2); font-size: 13px; }
.kpi-v i { font-style: normal; font-size: 12px; font-weight: 600; color: var(--green); }
.kpi-sub { color: var(--muted) !important; font-size: 12px !important; }

/* ---------- controles ---------- */
.tools { position: absolute; left: 18px; top: 50%; transform: translateY(-40%); display: flex; flex-direction: column; gap: 10px; z-index: 3; }
.tool-group { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 4px; }
.tool-group button { width: 38px; height: 38px; border: 0; background: none; border-radius: 9px; display: grid; place-items: center; cursor: pointer; color: var(--ink-2); }
.tool-group button svg { width: 19px; height: 19px; }
.tool-group button:hover:not(:disabled) { background: var(--bg); color: var(--ink); }
.tool-group button:disabled { opacity: .35; cursor: default; }
.tool-group button.txt { font-weight: 700; font-size: 13px; }
.tool-group button.on { background: var(--blue-50); color: var(--blue); }
.tool-group .sep { height: 1px; background: var(--line); margin: 4px 6px; }
.compass #needle { width: 22px; height: 22px; transition: transform .15s linear; }

/* ---------- cartão do lote (inferior esquerdo) ---------- */
.lotcard { position: absolute; left: 18px; bottom: 18px; width: min(720px, calc(100% - 520px)); min-width: 560px; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); z-index: 4; padding: 14px 16px 16px 20px; animation: up .22s ease; }
@keyframes up { from { transform: translateY(10px); } }
.lc-head { display: flex; align-items: center; gap: 10px; }
.lc-head .icon-btn { margin-left: auto; }
.lc-meta + .icon-btn { margin-left: 0; }
.lc-title { display: flex; align-items: center; gap: 7px; font-size: 16px; }
.lc-title svg { width: 18px; height: 18px; color: var(--blue); }
.lc-title > span { color: var(--muted); font-size: 14px; }
.lc-meta { margin-left: auto; color: var(--muted); font-size: 13px; }
.lc-body { display: flex; gap: 18px; margin-top: 12px; align-items: stretch; }
.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex: 1; }
.timeline li { flex: 1; display: flex; flex-direction: column; align-items: center; text-align: center; position: relative; gap: 3px; }
.timeline li::before { content: ''; position: absolute; top: 15px; right: 50%; width: 100%; height: 3px; background: var(--line); z-index: 0; }
.timeline li:first-child::before { display: none; }
.timeline li.done::before, .timeline li.cur::before { background: var(--blue); }
.timeline .node { width: 32px; height: 32px; border-radius: 50%; border: 2px solid #d5dbe4; background: #fff; display: grid; place-items: center; z-index: 1; color: #fff; }
.timeline li.done .node { background: var(--blue); border-color: var(--blue); }
.timeline li.done .node svg { width: 16px; height: 16px; }
.timeline li.cur .node { border-color: var(--blue); box-shadow: inset 0 0 0 6px #fff, inset 0 0 0 12px var(--blue); }
.timeline b { font-size: 13px; font-weight: 600; margin-top: 4px; }
.timeline li.cur b { color: var(--blue); }
.timeline small { color: var(--muted); font-size: 12px; }
.lc-side { display: flex; flex-direction: column; gap: 8px; background: var(--bg); border-radius: 12px; padding: 12px; width: 220px; flex: none; }
.lc-side > div { display: flex; flex-direction: column; }
.lc-side small { color: var(--muted); font-size: 12px; }
.lc-side small.own { color: var(--ink-2); font-weight: 600; }
.lc-ic { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; }
.lc-ic svg { width: 19px; height: 19px; }
.lc-side { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; align-items: start; column-gap: 10px; }
.lc-side .btn { grid-column: 1 / -1; }

/* ---------- lista com abas (inferior direito) ---------- */
.listpanel { position: absolute; right: 18px; bottom: 18px; width: 470px; max-height: min(420px, calc(100% - 150px)); background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); z-index: 3; display: flex; flex-direction: column; overflow: hidden; }
.listpanel.collapsed .lp-body, .listpanel.collapsed .lp-filters { display: none; }
.listpanel.collapsed .lp-toggle svg { transform: rotate(180deg); }
.lp-tabs { flex: none; display: flex; gap: 2px; padding: 10px 46px 0 12px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.lp-tabs button { border: 0; background: none; padding: 8px 10px 10px; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; margin-bottom: -1px; }
.lp-tabs button span { color: #94a3b8; font-weight: 500; margin-left: 4px; font-size: 12px; }
.lp-tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); background: none; }
.lp-tabs button[aria-selected="true"] { background: var(--bg); border-radius: 8px 8px 0 0; }
.lp-toggle { position: absolute; right: 8px; top: 8px; width: 32px; height: 32px; border: 0; background: none; border-radius: 8px; cursor: pointer; color: var(--muted); display: grid; place-items: center; }
.lp-toggle:hover { background: var(--bg); }
.lp-toggle svg { width: 18px; height: 18px; transition: transform .2s; }
.lp-filters { flex: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 12px 6px; align-items: center; }
.fchip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 4px 10px; cursor: pointer; font-size: 12px; font-weight: 600; }
.fchip i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.fchip span { color: var(--muted); font-weight: 500; }
.fchip.on { border-color: var(--ink); background: var(--ink); color: #fff; }
.fchip.on span { color: #cbd5e1; }
.qsel { width: auto; min-height: 0; height: 28px; padding: 0 8px; border-radius: 999px; font-size: 12px; }
.lp-body { overflow-y: auto; padding: 4px 8px 8px; }
.row { display: flex; align-items: center; gap: 11px; width: 100%; border: 0; background: none; padding: 9px 8px; border-radius: 10px; cursor: pointer; text-align: left; border-bottom: 1px solid var(--line-2); }
.row:hover { background: var(--bg); }
.row.sel { background: var(--blue-50); }
.row-ic { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; flex: none; font-weight: 800; }
.row-ic svg { width: 18px; height: 18px; }
.row-ic.q { background: #f3ecdf; color: #7d6236; }
.row-ic.lz { background: #ecfdf3; color: #067647; }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.row-main b { font-weight: 600; }
.row-main small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-n { color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.prog { width: 46px; height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; flex: none; }
.prog i { display: block; height: 100%; background: var(--blue); border-radius: 4px; }
.chev { width: 16px; height: 16px; color: #94a3b8; flex: none; }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 8px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.pill.sm { font-size: 12px; padding: 3px 8px; }
.st-terreno { background: #eef2f6; color: #475569; }
.st-projeto { background: #f5eddf; color: #85622c; }
.st-em_obra { background: #fff4e0; color: #b45309; }
.st-construido { background: #e1eff1; color: #2c6470; }

/* ---------- ficha completa (gaveta direita) ---------- */
.panel { position: absolute; right: 18px; top: 18px; bottom: 18px; width: 400px; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); z-index: 5; display: flex; flex-direction: column; animation: slidein .22s ease; }
@keyframes slidein { from { transform: translateX(16px); } }
.panel .close { position: absolute; right: 10px; top: 10px; z-index: 2; }
#panelBody { flex: 1; min-height: 0; display: flex; }
.p-scroll { overflow-y: auto; padding: 22px 20px 20px; flex: 1; }
.p-head .eyebrow { font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); font-weight: 700; display: flex; gap: 8px; align-items: center; }
.p-head h2 { font: 800 30px/1.1 'Manrope', var(--font); margin: 4px 0 10px; letter-spacing: -.5px; }
.tag { display: inline-block; font-size: 11px; font-weight: 700; background: var(--bg); color: var(--ink-2); padding: 2px 8px; border-radius: 999px; margin-left: 6px; text-transform: none; letter-spacing: 0; }
.tag.mine { background: #fff4d6; color: #8a5a00; margin-left: 4px; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 16px 0 6px; }
.facts div { background: var(--bg); border-radius: 10px; padding: 9px 11px; }
.facts dt { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; font-weight: 700; }
.facts dd { margin: 2px 0 0; font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; }
.locked { margin-top: 18px; border: 1px dashed #cdd6e3; border-radius: 12px; padding: 14px; display: grid; grid-template-columns: auto 1fr; gap: 10px 12px; background: #fafbfd; }
.locked > svg { width: 24px; height: 24px; color: var(--blue); margin-top: 2px; }
.locked p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.locked .btn { grid-column: 1 / -1; }
.admin-bar { display: flex; gap: 8px; margin: 14px 0 4px; }
.admin-bar .btn { flex: 1; padding: 9px 10px; }
.sec { border-top: 1px solid var(--line); padding: 14px 0 4px; margin-top: 12px; }
.sec h3 { margin: 0 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: var(--ink-2); }
.kv { margin: 0; display: grid; gap: 6px; }
.kv div { display: grid; grid-template-columns: 110px 1fr; gap: 8px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; word-break: break-word; }
.empty { color: var(--muted); margin: 0; font-style: italic; }
.empty.pad, .muted.pad { padding: 14px 10px; }
.lic, .docs { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.lic li { background: var(--bg); border-radius: 10px; padding: 9px 11px; }
.lic-top { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.lic small { color: var(--muted); }
.badge { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--bg); white-space: nowrap; }
.badge.ok { background: #e7f8f0; color: #0e7a55; } .badge.warn { background: #fff4e0; color: #b45309; } .badge.bad { background: #fde8e8; color: #b42318; }
.docs li { display: flex; align-items: center; gap: 4px; border: 1px solid var(--line); border-radius: 10px; padding: 6px 6px 6px 8px; }
.docs li > a:first-child { flex: 1; display: flex; gap: 10px; align-items: center; text-decoration: none; color: inherit; min-width: 0; }
.docs .ext { width: 38px; height: 38px; border-radius: 8px; background: var(--ink); color: #fff; display: grid; place-items: center; font-size: 10px; font-weight: 800; flex: none; }
.docs .dn { min-width: 0; }
.docs .dn b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.docs .dn small { color: var(--muted); }
.obs { white-space: pre-wrap; margin: 0; }
.updated { font-size: 12px; color: var(--muted); margin: 16px 0 0; }
.skeleton { height: 60px; border-radius: 10px; background: linear-gradient(90deg, var(--bg) 25%, #fff 50%, var(--bg) 75%); background-size: 200% 100%; animation: sk 1.2s infinite; margin-top: 12px; }
.skeleton.short { height: 38px; width: 70%; }
@keyframes sk { to { background-position: -200% 0; } }

/* ---------- botões e formulários ---------- */
.btn { white-space: nowrap; border: 1px solid var(--line); background: #fff; padding: 9px 16px; border-radius: 10px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.btn:hover { border-color: #c7d2e1; background: #fbfcfe; }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.primary:hover { background: var(--blue-2); }
.btn.danger { color: var(--red); border-color: #f5c2c2; }
.btn.small { padding: 6px 11px; font-size: 13px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .55; cursor: wait; }
.icon-btn { width: 34px; height: 34px; border-radius: 9px; border: 0; background: transparent; display: grid; place-items: center; cursor: pointer; color: var(--ink-2); flex: none; }
.icon-btn:hover { background: var(--bg); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn.danger { color: var(--red); }
.linkish { background: none; border: 0; color: var(--blue); cursor: pointer; padding: 4px 6px; font-weight: 600; font-size: 12px; justify-self: center; }
dialog { border: 0; padding: 0; background: transparent; max-width: calc(100vw - 24px); max-height: calc(100dvh - 24px); }
dialog::backdrop { background: rgba(20, 38, 31, .5); backdrop-filter: blur(2px); }
.modal-card { background: #fff; border-radius: 18px; width: 420px; max-width: 100%; max-height: calc(100dvh - 24px); display: flex; flex-direction: column; box-shadow: var(--shadow); }
.modal-card.wide { width: 760px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 4px 22px; }
.modal-head h2 { margin: 0; font: 800 21px/1.2 'Manrope', var(--font); }
.modal-body { padding: 8px 22px 22px; overflow-y: auto; }
.form { display: grid; gap: 12px; }
.form.grid { grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.form.grid .full, .form.grid h4, .form.grid .form-error { grid-column: 1 / -1; }
.form h4 { margin: 8px 0 0; font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.field { display: grid; gap: 4px; }
.field > span { font-weight: 600; font-size: 13px; }
.field small { color: var(--muted); font-size: 12px; }
input, select { min-height: 40px; }
input, select, textarea { width: 100%; border: 1px solid #d5dce6; background: #fff; border-radius: 9px; padding: 8px 11px; outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(47,93,76,.16); }
input[type=checkbox] { width: auto; min-height: 0; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 600; align-self: end; padding-bottom: 10px; }
.form-error { background: #fde8e8; color: #b42318; padding: 9px 12px; border-radius: 9px; margin: 0; font-weight: 600; }
.muted { color: var(--muted); margin: 0; }
.note { background: var(--blue-50); color: #2b5141; padding: 10px 12px; border-radius: 10px; margin: 0; font-size: 13px; }
.actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 6px; }
.actions .grow { flex: 1; }
.lic-edit { display: grid; gap: 8px; }
.lic-row { display: grid; grid-template-columns: 1.4fr 1fr 1.3fr auto auto auto; gap: 6px; align-items: end; background: var(--bg); padding: 8px; border-radius: 10px; }
.lic-row .mini { display: grid; font-size: 11px; color: var(--muted); font-weight: 700; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.tabs button { border: 0; background: none; padding: 9px 14px; cursor: pointer; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--blue); }
.tab-top { display: flex; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); padding: 6px 8px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 9px 8px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.mono { font-family: ui-monospace, Menlo, monospace; font-size: 13px; }
.pane-title { margin: 0 0 12px; font-size: 16px; }
.cred { background: var(--blue-50); border-radius: 12px; padding: 12px; display: grid; gap: 8px; justify-items: start; }
.cred pre { margin: 0; white-space: pre-wrap; font-size: 13px; background: #fff; padding: 10px; border-radius: 8px; width: 100%; }
.toast { position: fixed; left: 50%; top: 78px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 100; box-shadow: var(--shadow); max-width: calc(100vw - 32px); font-weight: 500; }

/* ---------- planta 2D ---------- */
.plan { width: 100%; height: 100%; display: block; background: #e9e2cf; cursor: grab; touch-action: none; user-select: none; }
.plan.panning { cursor: grabbing; }
.p-out { fill: #ede6d3; }
.p-road { fill: #ddd0ad; }
.p-roadtxt { font: 600 2.6px var(--font); fill: #7a6a48; }
.p-site { fill: #d9d6cf; }
.p-wall { fill: none; stroke: #6b7280; stroke-width: .5; }
.p-green { fill: #bfd39a; stroke: #9fb779; stroke-width: .2; }
.p-street { fill: #f7f7f5; stroke: #d8d4ca; stroke-width: .2; }
.p-streettxt { font: 600 2.2px var(--font); fill: #8a8f96; text-anchor: middle; }
.p-lzarea { fill: #f1c8c8; }
.p-deck { fill: #d8b98f; }
.p-water { fill: #4cb6d0; }
.p-sand { fill: #ead79f; }
.p-bldg { fill: #fff; stroke: #94a3b8; stroke-width: .2; }
.p-portico { fill: #e5ddcc; stroke: #a8a294; stroke-width: .2; }
.p-lztxt { font: 600 1.8px var(--font); fill: #374151; text-anchor: middle; }
.p-gate { font: 800 2.6px var(--font); fill: var(--ink); text-anchor: middle; letter-spacing: .3px; }
.p-qbadge circle { fill: #fff; stroke: var(--ink); stroke-width: .35; }
.p-qbadge text { font: 800 3.2px var(--font); fill: var(--ink); text-anchor: middle; }
.p-north path { fill: var(--red); stroke: none; } .p-north text { font: 800 4px var(--font); fill: var(--ink); text-anchor: middle; }
.p-lot { cursor: pointer; outline: none; }
.p-lot polygon { stroke: #fff; stroke-width: .35; transition: opacity .2s; }
.p-lot text { font: 700 3px var(--font); text-anchor: middle; pointer-events: none; }
.p-lot:hover polygon, .p-lot:focus-visible polygon { stroke: var(--ink); stroke-width: .6; }
.p-lot.mine polygon { stroke: #f5b301; stroke-width: .9; }
.p-lot.sel polygon { stroke: var(--red); stroke-width: 1.1; }
.p-lot.dim { opacity: .22; pointer-events: none; }

/* ---------- telas médias ---------- */
@media (max-width: 1280px) {
  .site-card { display: none; }
  .kpi { min-width: 0; padding: 12px 13px; }
  .kpi-v b { font-size: 21px; }
  .lotcard { width: calc(100% - 530px); min-width: 0; }
  .lc-body { flex-direction: column; }
  .lc-side { width: auto; }
  .lc-meta { display: none; }
}
@media (max-width: 1080px) {
  .kpis .kpi:nth-child(n+3) { display: none; }
  .listpanel { width: 400px; }
  .lotcard { width: calc(100% - 456px); }
}

/* ---------- celular ---------- */
@media (max-width: 760px) {
  .topbar { height: 56px; padding: 0 10px; gap: 8px; }
  .brand-name { display: none; }
  .search { margin-left: 4px; width: auto; flex: 1; height: 38px; }
  .search kbd, .spacer, .live small, .user-chip .who { display: none; }
  .live { padding: 7px 9px; }
  .live b { font-size: 12px; }
  .kpis { left: 10px; right: 10px; top: 10px; overflow-x: auto; scrollbar-width: none; gap: 8px; }
  .kpis .kpi:nth-child(n+3) { display: flex; }
  .kpi { min-width: 0; flex: none; padding: 8px 12px; gap: 8px; align-items: center; }
  .kpi-ic { width: 28px; height: 28px; } .kpi-ic svg { width: 16px; height: 16px; }
  .kpi-txt > small { font-size: 11px; white-space: nowrap; }
  .kpi-v b { font-size: 17px; }
  .kpi-sub { display: none; }
  .tools { left: auto; right: 10px; top: 76px; transform: none; gap: 6px; }
  .tool-group button[data-act="rl"], .tool-group button[data-act="rr"] { display: none; }
  .tool-group button { width: 36px; height: 36px; }
  .listpanel { left: 10px; right: 10px; bottom: 10px; width: auto; max-height: 46%; padding-bottom: env(safe-area-inset-bottom); }
  .lotcard { left: 0; right: 0; bottom: 0; width: auto; min-width: 0; border-radius: 18px 18px 0 0; padding: 12px 14px calc(14px + env(safe-area-inset-bottom)); z-index: 6; }
  .lc-body { flex-direction: column; gap: 12px; }
  .lc-head .icon-btn { margin-left: auto !important; }
  .timeline b { font-size: 11px; } .timeline small { font-size: 10px; }
  .timeline .node { width: 26px; height: 26px; } .timeline li::before { top: 12px; }
  .lc-side { width: auto; }
  .panel { left: 0; right: 0; bottom: 0; top: auto; width: auto; max-height: 78%; border-radius: 18px 18px 0 0; z-index: 7; padding-bottom: env(safe-area-inset-bottom); }
  .form.grid { grid-template-columns: 1fr; }
  .lic-row { grid-template-columns: 1fr 1fr; }
  .lic-row > input:first-child { grid-column: 1 / -1; }
  .tab-top { flex-direction: column; align-items: stretch; }
  .tip { display: none !important; }
  .toast { top: auto; bottom: 24px; }
}
#needle path { stroke: none; }
#needle path:first-child { fill: var(--red); }
#needle path:last-child { fill: #9aa4ae; }

.stage:has(#panel:not([hidden])) .listpanel { display: none; }
@media (max-width: 760px) { .stage:has(#lotcard:not([hidden])) .listpanel { display: none; } }

/* ---------- maquete: chamada para o passeio e atalhos de vista ---------- */
.scene-canvas { display: block; width: 100%; height: 100%; touch-action: none; }
.stage-cta { position: absolute; top: 112px; right: 18px; z-index: 4; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.walk-btn { background: #294e40; color: #fff; border-color: #294e40; box-shadow: var(--shadow); }
.walk-btn:hover { background: #203b32; }
.walk-btn svg { width: 18px; height: 18px; }
.focus-chips { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.focus-chips button { border: 1px solid var(--line); background: rgba(255,255,255,.92); border-radius: 999px; padding: 5px 11px; font-size: 12px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.focus-chips button:hover { border-color: #294e40; color: #294e40; }
.page.full:has(#view2d:not([hidden])) .stage-cta .focus-chips { display: none; }
.passeio-ov { position: fixed; inset: 0; z-index: 100; background: #203b32; }
.passeio-ov iframe { width: 100%; height: 100%; border: 0; display: block; }
@media (max-width: 1280px) { .stage-cta { top: 108px; } }
@media (max-width: 760px) { .stage-cta { top: auto; bottom: calc(50% + 10px); right: auto; left: 12px; align-items: flex-start; } .walk-btn { padding: 8px 12px; font-size: 13px; } .focus-chips { display: none; } }

/* ---------- clima (maquete) ---------- */
.wx-chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: rgba(255,255,255,.94); border-radius: 999px; padding: 6px 12px; font-weight: 700; color: var(--ink); cursor: pointer; box-shadow: var(--shadow); }
.wx-chip .wx-ic { width: 18px; height: 18px; color: var(--gold); }
.wx-chip span { font-weight: 500; color: var(--muted); font-size: 12px; }
.wx-slot { position: absolute; top: 190px; left: 72px; right: 18px; z-index: 6; max-width: 1100px; margin-left: auto; }
.wx-panel { background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; }
.wx-panel .pad { padding: 16px 20px; margin: 0; }
.wx-grid { display: grid; grid-template-columns: 1.1fr 1fr 1.2fr 1.2fr; }
.wx-cell { padding: 16px 20px; display: flex; flex-direction: column; gap: 6px; border-left: 1px solid var(--line-2); min-width: 0; }
.wx-cell:first-child { border-left: 0; }
.wx-eyebrow { font-size: 10px; letter-spacing: 1.2px; color: var(--gold); font-weight: 700; }
.wx-top { display: flex; align-items: center; gap: 10px; }
.wx-top b { display: block; font-size: 15px; }
.wx-ic { width: 30px; height: 30px; color: var(--gold); flex: none; }
.wx-ic circle, .wx-ic path { stroke: currentColor; fill: none; stroke-width: 1.6; }
.wx-temp { font: 500 34px/1 'Manrope', var(--font); color: var(--ink); }
.wx-temp span { font-size: 16px; color: var(--muted); margin-left: 2px; }
.wx-wind { display: flex; align-items: baseline; gap: 8px; }
.wx-wind b { font: 500 28px/1 'Manrope', var(--font); }
.wx-wind span:last-child { color: var(--muted); font-size: 12px; }
.wx-arrow { display: inline-block; font-size: 22px; color: var(--blue); line-height: 1; }
.wx-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 13px; }
.wx-arc svg { width: 100%; max-width: 220px; height: 70px; display: block; margin: 0 auto; }
.wx-arc-path { fill: none; stroke: #c9cfc3; stroke-width: 1.2; stroke-dasharray: 2 3; }
.wx-arc-base { stroke: #d8ddd2; stroke-width: 1; }
.wx-sun { fill: var(--gold); }
.wx-days { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.wx-days li { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: baseline; font-size: 13px; }
.wx-days li > span:first-child { color: var(--gold); font-weight: 600; }
.wx-days b { font-weight: 600; }
.wx-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 20px; border-top: 1px solid var(--line-2); flex-wrap: wrap; }
.wx-foot a { color: var(--blue); }
@media (max-width: 1100px) { .wx-grid { grid-template-columns: 1fr 1fr; } .wx-cell:nth-child(3) { border-left: 0; } .wx-cell:nth-child(n+3) { border-top: 1px solid var(--line-2); } }
@media (max-width: 760px) { .wx-slot { top: 64px; left: 10px; right: 10px; max-height: calc(100% - 80px); overflow: auto; border-radius: 16px; } .wx-chip span { display: none; } }
@media (max-width: 560px) { .wx-grid { grid-template-columns: 1fr; } .wx-cell { border-left: 0 !important; border-top: 1px solid var(--line-2); } .wx-cell:first-child { border-top: 0; } }
