/* Secao 626: Estimate no Bolso -- o gabarito e o mockup aprovado (https://claude.ai/artifact/4vCS2WVuoRA1tEq2ENEnrd). */
.eb {
    --eb-chao: #eef1f6; --eb-folha: #ffffff; --eb-tinta: #16202e; --eb-tinta2: #5a6676; --eb-tinta3: #8b95a3;
    --eb-linha: #e1e6ee; --eb-fundo2: #f3f5f9;
    --eb-azul: #3d5bd9; --eb-azul-suave: #e8edfc; --eb-verde: #118a6c; --eb-verde-suave: #dcf3ec;
    --eb-ambar: #a8670c; --eb-ambar-suave: #fbefd9; --eb-vermelho: #c2362b; --eb-vermelho-suave: #fbe1de;
    --eb-titulo: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
    --eb-texto: "Figtree", "Segoe UI", system-ui, sans-serif;
    --eb-num: "JetBrains Mono", ui-monospace, Consolas, monospace;
    font-family: var(--eb-texto); color: var(--eb-tinta);
    max-width: 560px; margin: 0 auto; padding: 12px 0 96px; display: flex; flex-direction: column; gap: 12px;
}
[data-theme="dark"] .eb, [data-bs-theme="dark"] .eb {
    --eb-chao: #0d1118; --eb-folha: #161c26; --eb-tinta: #e8ecf2; --eb-tinta2: #a6afbd; --eb-tinta3: #7a8494; --eb-linha: #29313d; --eb-fundo2: #1d2430;
    --eb-azul: #7d95ff; --eb-azul-suave: #232c4a; --eb-verde: #4fcca6; --eb-verde-suave: #173a31; --eb-ambar: #f0b45a; --eb-ambar-suave: #3a2c15;
    --eb-vermelho: #ff7b6e; --eb-vermelho-suave: #3d1f1c;
}
.eb *, .eb *::before, .eb *::after { box-sizing: border-box; }
.eb h3 { font-family: var(--eb-titulo); font-size: 22px; font-weight: 800; margin: 0; letter-spacing: -.01em; }
.eb .eb-num { font-family: var(--eb-num); font-variant-numeric: tabular-nums; }
.eb-etq { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--eb-tinta3); }
.eb-topo { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.eb-voltar { border: 0; background: none; color: var(--eb-tinta2); font-size: 14px; padding: 4px 0; }
.eb-pilula { font-size: 11.5px; font-weight: 700; border-radius: 999px; padding: 2px 10px; white-space: nowrap; }
.eb-pilula.azul { background: var(--eb-azul-suave); color: var(--eb-azul); }
.eb-pilula.verde { background: var(--eb-verde-suave); color: var(--eb-verde); }
.eb-pilula.ambar { background: var(--eb-ambar-suave); color: var(--eb-ambar); }
.eb-pilula.vermelho { background: var(--eb-vermelho-suave); color: var(--eb-vermelho); }
.eb-pilula.cinza { background: var(--eb-fundo2); color: var(--eb-tinta2); }
.eb-bloco { background: var(--eb-folha); border: 1px solid var(--eb-linha); border-radius: 18px; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.eb-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.eb-kpi { background: var(--eb-folha); border: 1px solid var(--eb-linha); border-radius: 16px; padding: 10px 12px; min-width: 0; }
.eb-kpi b { display: block; font-family: var(--eb-titulo); font-size: 20px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.eb-kpi span { font-size: 11.5px; color: var(--eb-tinta2); }
.eb-lista { display: flex; flex-direction: column; }
.eb-linha-lista { display: flex; align-items: center; gap: 10px; padding: 10px 2px; border-top: 1px solid var(--eb-linha); color: inherit; text-decoration: none; min-width: 0; }
.eb-linha-lista:first-child { border-top: 0; }
.eb-linha-lista .eb-meio { flex: 1; min-width: 0; }
.eb-linha-lista .eb-meio b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eb-linha-lista .eb-meio small { color: var(--eb-tinta3); }
.eb-av { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--eb-azul); color: #fff; font-weight: 700; font-size: 13px; flex: none; }
.eb-campo { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.eb-campo label { font-size: 12px; font-weight: 600; color: var(--eb-tinta2); }
.eb input, .eb select, .eb textarea { font-family: inherit; font-size: 16px; color: var(--eb-tinta); background: var(--eb-folha); border: 1px solid var(--eb-linha); border-radius: 12px; padding: 9px 11px; width: 100%; min-width: 0; }
.eb .eb-combo { display: flex; gap: 6px; }
.eb .eb-combo button { flex: none; width: 44px; border: 1px solid var(--eb-linha); background: var(--eb-fundo2); border-radius: 12px; color: var(--eb-tinta2); }
.eb-fotos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.eb-foto { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--eb-fundo2); max-width: 100%; }
.eb-foto img { width: 100%; height: 100%; object-fit: cover; }
.eb-foto button { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff; font-size: 12px; }
.eb-foto.mais { border: 1.5px dashed var(--eb-linha); background: transparent; display: grid; place-items: center; color: var(--eb-tinta3); font-size: 24px; cursor: pointer; }
.eb-ditar { background: var(--eb-azul-suave); border-radius: 16px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.eb-ditar textarea { background: var(--eb-folha); }
.eb-ditar .eb-mic { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--eb-azul); color: #fff; font-size: 18px; flex: none; }
.eb-ditar .eb-mic.on { background: var(--eb-vermelho); animation: eb-pulso 1.2s infinite; }
@keyframes eb-pulso { 0% { box-shadow: 0 0 0 0 rgba(194, 54, 43, .45); } 70% { box-shadow: 0 0 0 10px rgba(194, 54, 43, 0); } 100% { box-shadow: 0 0 0 0 rgba(194, 54, 43, 0); } }
.eb-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; padding: 10px 0; border-top: 1px solid var(--eb-linha); }
.eb-item:first-child { border-top: 0; }
.eb-item .eb-nome { font-weight: 600; font-size: 14px; }
.eb-item .eb-val { font-weight: 600; text-align: right; }
.eb-item .eb-sub { grid-column: 1 / -1; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12.5px; color: var(--eb-tinta3); }
.eb-item .eb-sub input { width: 86px; padding: 5px 8px; font-size: 15px; }
.eb-item .eb-sub .eb-tirar { margin-left: auto; border: 0; background: none; color: var(--eb-vermelho); font-size: 13px; }
.eb-cat { display: flex; flex-wrap: wrap; gap: 6px; }
.eb-cat button { border: 1.5px dashed var(--eb-linha); background: none; border-radius: 999px; padding: 4px 11px; font-size: 13px; color: var(--eb-tinta2); }
.eb-tot { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; align-items: center; font-size: 14px; }
.eb-tot .eb-grande { font-family: var(--eb-titulo); font-size: 24px; font-weight: 800; }
.eb-tot label { display: flex; align-items: center; gap: 6px; color: var(--eb-tinta2); }
.eb-tot input { width: 78px; padding: 5px 8px; font-size: 15px; }
.eb-acoes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.eb-bt { border: 0; border-radius: 14px; padding: 12px 10px; font-weight: 700; font-size: 14px; display: flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none; }
.eb-bt.pri { background: var(--eb-azul); color: #fff; }
.eb-bt.verde { background: var(--eb-verde); color: #fff; }
.eb-bt.sec { background: var(--eb-fundo2); color: var(--eb-tinta); }
.eb-bt.cheio { grid-column: 1 / -1; }
.eb-bt:disabled { opacity: .5; }
.eb-ia { font-size: 12px; color: var(--eb-tinta2); display: flex; gap: 6px; align-items: flex-start; }
.eb-ia i { font-style: normal; background: var(--eb-ambar-suave); color: var(--eb-ambar); border-radius: 6px; padding: 0 5px; font-weight: 700; }
.eb-tempo { list-style: none; margin: 0; padding: 0; position: relative; }
.eb-tempo::before { content: ""; position: absolute; left: 10px; top: 10px; bottom: 10px; width: 2px; background: var(--eb-linha); }
.eb-tempo li { position: relative; display: flex; gap: 12px; padding: 7px 0; font-size: 14px; }
.eb-tempo li i { width: 22px; height: 22px; border-radius: 50%; flex: none; background: var(--eb-folha); border: 2px solid var(--eb-linha); display: grid; place-items: center; font-style: normal; font-size: 11px; z-index: 1; }
.eb-tempo li.ok i { background: var(--eb-verde); border-color: var(--eb-verde); color: #fff; }
.eb-tempo li.vez i { border-color: var(--eb-azul); background: var(--eb-azul-suave); }
.eb-tempo li.ruim i { background: var(--eb-vermelho); border-color: var(--eb-vermelho); color: #fff; }
.eb-tempo li small { display: block; color: var(--eb-tinta3); font-size: 12px; }
.eb-tempo li.espera { color: var(--eb-tinta3); }
.eb-aviso { border-radius: 12px; padding: 9px 12px; font-size: 13px; font-weight: 600; }
.eb-aviso.ruim { background: var(--eb-vermelho-suave); color: var(--eb-vermelho); }
.eb-aviso.bom { background: var(--eb-verde-suave); color: var(--eb-verde); }
.eb-fab { position: fixed; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(76px + env(safe-area-inset-bottom, 0px)); z-index: 30; border-radius: 999px; box-shadow: 0 10px 24px rgba(15, 23, 36, .25); padding: 13px 18px; }
@media (min-width: 992px) { .eb-fab { bottom: 28px; } }
@media (prefers-reduced-motion: reduce) { .eb-ditar .eb-mic.on { animation: none; } }

/* Secao 647: Medicao de Obra (mockup https://claude.ai/artifact/Y4ck6AQws3R41KjoVjuEtw) -- usa as pecas .eb-* acima. */
.mo .mo-medida { font-family: var(--eb-num); font-variant-numeric: tabular-nums; }
.mo .mo-tres { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.mo .mo-checks { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 14px; }
.mo .mo-checks label { display: flex; align-items: center; gap: 6px; min-height: 36px; }
.mo .mo-checks input { width: 20px; height: 20px; padding: 0; }
.mo .mo-planta { padding: 6px; align-items: center; }
.mo .mo-planta svg { width: 100%; max-width: 380px; height: auto; display: block; }
.mo .mo-piso { fill: var(--eb-fundo2); }
.mo .mo-lado { stroke: var(--eb-tinta); stroke-width: 5; stroke-linecap: square; }
.mo .mo-lado.on { stroke: var(--eb-azul); stroke-width: 8; }
.mo .mo-cota { font-family: var(--eb-num); font-size: 12px; font-weight: 600; fill: var(--eb-tinta); }
.mo .mo-meio { font-size: 13px; fill: var(--eb-tinta2); }
.mo .mo-parede { display: grid; grid-template-columns: 34px 92px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 6px 0; border-top: 1px solid var(--eb-linha); }
.mo .mo-parede:first-of-type { border-top: 0; }
.mo .mo-parede input { padding: 6px 8px; }
.mo .mo-parede .mo-resumo { font-size: 12.5px; color: var(--eb-tinta2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.mo .mo-letra { width: 34px; height: 34px; border-radius: 9px; border: 0; background: var(--eb-fundo2); color: var(--eb-tinta); font-weight: 800; }
.mo .mo-parede.aberta .mo-letra { background: var(--eb-azul); color: #fff; }
.mo .mo-detalhe { background: var(--eb-fundo2); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.mo .mo-conta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--eb-tinta2); }
.mo .mo-conta b { color: var(--eb-tinta); }
.mo .mo-recorte { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.mo .mo-recorte select { width: auto; flex: 1 1 110px; padding: 6px 8px; }
.mo .mo-recorte .mo-medida { width: 76px; padding: 6px 8px; }
.mo .mo-qtd { width: 70px; padding: 6px 8px; }
.mo .mo-recorte .eb-tirar { border: 0; background: none; color: var(--eb-vermelho); min-width: 36px; min-height: 36px; }
.mo .mo-linha { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 14px; }
.mo .mo-seg { display: flex; gap: 4px; background: var(--eb-fundo2); border-radius: 10px; padding: 3px; }
.mo .mo-seg button { min-width: 40px; min-height: 36px; border: 0; border-radius: 8px; background: transparent; color: var(--eb-tinta2); font-family: var(--eb-num); font-weight: 700; }
.mo .mo-seg button.on { background: var(--eb-azul); color: #fff; }
.mo .mo-comodo { width: 100%; background: none; border-left: 0; border-right: 0; border-bottom: 0; text-align: left; font: inherit; }
.mo .mo-cheio { grid-column: 1 / -1; }
.mo .mo-perigo { color: var(--eb-vermelho); }
.mo .eb-cat .mo-perigo { border-color: var(--eb-vermelho-suave); }

/* Secao 651: planta escaneada pelo RoomPlan */
.mo-scan .mo-obj { fill: var(--eb-ambar-suave); stroke: var(--eb-ambar); stroke-width: 1; }
.mo-scan .mo-obj-t { font-size: 8px; font-weight: 600; fill: var(--eb-ambar); pointer-events: none; }
.mo-scan .mo-porta { stroke: var(--eb-verde); stroke-width: 5; stroke-linecap: butt; }
.mo-scan .mo-janela { stroke: var(--eb-azul); stroke-width: 6; stroke-linecap: butt; }
.mo-scan .mo-vao { stroke: var(--eb-folha); stroke-width: 5; }
.mo-scan .mo-letra-scan { font-size: 10px; font-weight: 800; fill: var(--eb-tinta2); paint-order: stroke; stroke: var(--eb-folha); stroke-width: 3px; }
.mo-legenda { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 12px; color: var(--eb-tinta2); }
.mo-legenda span { display: inline-flex; align-items: center; gap: 6px; }
.mo-lg { display: inline-block; width: 16px; height: 5px; border-radius: 2px; }
.mo-lg.porta { background: var(--eb-verde); }
.mo-lg.janela { background: var(--eb-azul); }
.mo-lg.obj { height: 10px; background: var(--eb-ambar-suave); border: 1px solid var(--eb-ambar); }
.mo-3d { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.mo-3d img { position: absolute; width: 1px; height: 1px; opacity: 0; }
.mo-objetos { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.mo-objetos li { display: flex; flex-wrap: wrap; gap: 2px 8px; border-top: 1px solid var(--eb-linha); padding-top: 4px; }
.mo-objetos span { color: var(--eb-tinta3); font-family: var(--eb-num); font-size: 12px; }
.mo .mo-scan { align-items: stretch; }
.mo .mo-scan svg { margin: 0 auto; }
.mo-3d { position: relative; }
.mo-scan .mo-nome-scan { font-size: 10px; font-weight: 700; fill: var(--eb-tinta); paint-order: stroke; stroke: var(--eb-fundo2); stroke-width: 3px; }

/* Secao 658: parede vista de frente (atras da parede) */
.pe-bloco { display: flex; flex-direction: column; gap: 8px; }
.pe-bloco svg { width: 100%; max-width: 560px; height: auto; display: block; margin: 0 auto; }
.pe-parede { fill: var(--eb-fundo2); stroke: var(--eb-tinta); stroke-width: 2; }
.pe-montante { stroke: var(--eb-linha); stroke-width: 1; stroke-dasharray: 2 3; }
.pe-faixa { fill: var(--eb-vermelho); opacity: .12; }
.pe-ia { stroke-dasharray: 7 4; }
.pe-ponto, .pe-bloco polyline { cursor: pointer; }
.pe-sel { fill: none; stroke: var(--eb-azul); stroke-width: 3; }
.pe-cota { font-family: var(--eb-num); font-size: 10px; fill: var(--eb-tinta2); }
.pe-filtros { display: flex; flex-wrap: wrap; gap: 6px; }
.pe-chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--eb-linha); background: var(--eb-folha); color: var(--eb-tinta); border-radius: 999px; padding: 4px 10px; font-size: 12.5px; }
.pe-chip i { width: 16px; height: 5px; border-radius: 3px; display: inline-block; }
.pe-chip.off { opacity: .45; text-decoration: line-through; }
.pe-aviso { background: var(--eb-vermelho-suave); color: var(--eb-vermelho); border-radius: 10px; padding: 8px 10px; font-size: 13px; font-weight: 600; }

/* pagina da casa (QR) */
.cp { max-width: 760px; margin: 0 auto; padding: 16px max(16px, env(safe-area-inset-right, 0px)) 40px max(16px, env(safe-area-inset-left, 0px)); display: flex; flex-direction: column; gap: 14px; }
.cp-centro { display: flex; flex-direction: column; gap: 10px; align-items: center; text-align: center; padding: 40px 0; }
.cp-pin { width: 100%; max-width: 320px; text-align: left; }
.cp-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.cp-card { display: flex; flex-direction: column; gap: 4px; text-align: left; border: 1px solid var(--eb-linha); background: var(--eb-folha); color: var(--eb-tinta); border-radius: 14px; padding: 12px; }
.cp-card small { color: var(--eb-tinta3); }
.cp-cores { display: flex; gap: 4px; }
.cp-cores i { width: 14px; height: 5px; border-radius: 3px; display: inline-block; }
.cp-paredes { display: flex; flex-wrap: wrap; gap: 6px; }
.cp-paredes .eb-bt { padding: 8px 12px; }
.cp-video { width: 100%; border-radius: 12px; background: #000; }
.cp-marca { display: flex; flex-direction: column; gap: 8px; }
.cp-marca img { width: 100%; border-radius: 10px; }
.cp-bola { width: 12px; height: 12px; border-radius: 50%; display: inline-block; flex: none; }
.cp-circ { display: grid; grid-template-columns: 56px 1fr auto; gap: 8px; align-items: center; width: 100%; text-align: left; border: 0; border-top: 1px solid var(--eb-linha); background: none; color: var(--eb-tinta); padding: 8px 2px; }
.cp-circ.on { background: var(--eb-azul-suave); }
.cp-circ small { color: var(--eb-tinta3); }
.cp-onde { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 2px 10px; }

/* ERP: casa digital e circuitos */
.mo-abrir { display: flex; justify-content: space-between; align-items: center; width: 100%; border: 0; background: none; color: var(--eb-tinta); padding: 0; }
.mo-casa-link { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.mo-casa-link img { border-radius: 8px; background: #fff; padding: 4px; }
.mo-codigo { font-family: var(--eb-num); font-size: 12px; word-break: break-all; }
.mo-circ { display: grid; grid-template-columns: 64px 1fr 72px 36px; gap: 6px; align-items: center; }
.mo-x { border: 0; background: none; color: var(--eb-tinta3); }

/* secao 660: lados do deck (casa, guarda-corpo, escada) e a calculadora de material */
.mo .mo-lado-opcoes { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.mo .mo-chip { border: 1px solid var(--eb-linha); background: var(--eb-folha); color: var(--eb-tinta2); border-radius: 999px; padding: 4px 11px; font-size: 12px; font-weight: 600; min-height: 30px; }
.mo .mo-chip.on { background: var(--eb-azul-suave); border-color: var(--eb-azul); color: var(--eb-azul); }
.mo .mo-calc { display: grid; grid-template-columns: minmax(120px, 2fr) minmax(110px, 1.4fr) minmax(70px, 1fr) minmax(110px, 1.4fr) minmax(60px, .8fr) auto; gap: 6px; align-items: center; margin-bottom: 8px; }
.mo .mo-calc > input, .mo .mo-calc > select, .mo .mo-calc-peca input { min-width: 0; width: 100%; }
.mo .mo-calc-peca { display: flex; align-items: center; gap: 4px; min-width: 0; }
@media (max-width: 640px) {
    .mo .mo-calc { grid-template-columns: 1fr 1fr; padding-bottom: 8px; border-bottom: 1px solid var(--eb-linha); }
    .mo .mo-calc > input:first-child { grid-column: 1 / -1; }
}
