/* CB TEC — Projetos Visuais */
:root {
  --navy: #003362; --cyan: #1D9CD3; --orange: #F28C28; --red: #E5484D;
  --bg: #eef3f8; --surface: #ffffff; --surface-2: #f5f8fb; --line: #dfe7ef;
  --text: #0e2238; --muted: #5d6d80; --accent: var(--navy); --accent-2: var(--cyan);
  --stage: #d9e2ea; --shadow: 0 6px 24px rgba(0, 35, 70, .08);
  --radius: 14px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0a1420; --surface: #111e2d; --surface-2: #162638; --line: #22364b;
  --text: #e6eef7; --muted: #8fa3b8; --accent: #1D9CD3; --accent-2: #5cc3ee;
  --stage: #070f18; --shadow: 0 6px 24px rgba(0, 0, 0, .35);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg); color: var(--text);
  font: 14px/1.45 Inter, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; color: inherit; }
.ic { width: 20px; height: 20px; flex: none; }

/* Topo */
.top {
  height: 60px; display: flex; align-items: center; gap: 12px; padding: 0 16px;
  background: var(--surface); border-bottom: 1px solid var(--line); position: relative; z-index: 5;
}
.top .logo { height: 34px; }
:root[data-theme="dark"] .top .logo { filter: brightness(1.15); background: #fff; border-radius: 8px; padding: 3px 6px; }
.top .ttl { display: flex; flex-direction: column; min-width: 0; }
.top .ttl b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top .ttl small { color: var(--muted); font-size: 12px; }
.sp { flex: 1; }
.status { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.status i { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; display: inline-block; }
.status.saving i { background: var(--orange); }
.status.err i { background: var(--red); }

.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px;
  border-radius: 10px; border: 1px solid var(--line); background: var(--surface); cursor: pointer;
  font-weight: 600; white-space: nowrap; transition: .15s;
}
a.btn { color: var(--text); text-decoration: none; }
.btn:hover { border-color: var(--accent-2); color: var(--accent-2); }
.btn.pri { background: var(--navy); color: #fff; border-color: var(--navy); }
:root[data-theme="dark"] .btn.pri { background: var(--cyan); border-color: var(--cyan); color: #04121f; }
.btn.pri:hover { filter: brightness(1.12); color: #fff; }
.btn.danger:hover { border-color: var(--red); color: var(--red); }
.btn.ico { width: 38px; padding: 0; justify-content: center; }
.btn:disabled { opacity: .4; pointer-events: none; }

/* ====== Tela inicial ====== */
.wrap { max-width: 1240px; margin: 0 auto; padding: 24px 16px 60px; }
.hero { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.hero h1 { margin: 0; font-size: 28px; letter-spacing: -.5px; }
.hero p { margin: 4px 0 0; color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.card .th { aspect-ratio: 4/3; background: var(--surface-2) center/cover no-repeat; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--muted); }
.card .bd { padding: 14px 16px 6px; }
.card .bd b { display: block; font-size: 15px; }
.card .bd small { color: var(--muted); }
.card .ft { display: flex; gap: 8px; padding: 10px 16px 16px; }
.card .ft .btn { height: 34px; }
.empty { text-align: center; padding: 60px 20px; color: var(--muted); border: 2px dashed var(--line); border-radius: var(--radius); }

/* Modal */
.modal { position: fixed; inset: 0; background: rgba(3, 14, 26, .55); display: none; align-items: center; justify-content: center; z-index: 50; padding: 16px; }
.modal.open { display: flex; }
.modal .box { background: var(--surface); border-radius: 18px; width: min(560px, 100%); max-height: 92vh; overflow: auto; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.modal .box.wide { width: min(980px, 100%); }
.modal .hd { display: flex; align-items: center; gap: 10px; padding: 18px 20px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); z-index: 2; }
.modal .hd h3 { margin: 0; font-size: 17px; flex: 1; }
.modal .ct { padding: 18px 20px; display: grid; gap: 14px; }
.modal .fo { display: flex; gap: 10px; justify-content: flex-end; padding: 14px 20px 20px; }
.drop { border: 2px dashed var(--line); border-radius: 12px; padding: 22px; text-align: center; color: var(--muted); cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.drop:hover, .drop.over { border-color: var(--cyan); color: var(--cyan); }
.bar { height: 6px; background: var(--surface-2); border-radius: 4px; overflow: hidden; display: none; }
.bar i { display: block; height: 100%; width: 0; background: var(--cyan); transition: width .2s; }

/* Formulários */
.f { display: grid; gap: 6px; }
.f > span { font-size: 12px; font-weight: 600; color: var(--muted); }
.f input[type=text], .f input[type=number], .f select, .in {
  height: 38px; border: 1px solid var(--line); border-radius: 9px; padding: 0 10px; background: var(--surface-2); width: 100%; min-width: 0;
}
.f input:focus, .f select:focus, .in:focus { outline: 2px solid var(--cyan); outline-offset: -1px; }
.rr { display: flex; align-items: center; gap: 8px; }
.rr input[type=range] { flex: 1; accent-color: var(--cyan); min-width: 0; }
.rr .num { width: 74px !important; flex: none; height: 32px !important; }
.rr em { font-style: normal; color: var(--muted); font-size: 12px; width: 18px; }
.chk { display: flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 500; }
.chk input { width: 18px; height: 18px; accent-color: var(--cyan); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* Padrões (tabela de modelos) */
.mlist { display: grid; gap: 8px; }
.mrow { display: grid; gap: 8px; align-items: center; grid-template-columns: 1fr 44px 80px 80px 38px; }
.mrow.p { grid-template-columns: 1fr 44px 120px 38px; }
.mrow.d { grid-template-columns: 1fr 44px 38px; }
.mrow input[type=color] { width: 44px; height: 38px; border: 1px solid var(--line); border-radius: 9px; padding: 2px; background: var(--surface-2); }
.mhead { font-size: 11px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.sec-t { font-size: 12px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; color: var(--accent-2); margin: 6px 0 -4px; }

/* ====== Editor ====== */
.ed { display: grid; grid-template-columns: 64px 1fr 350px; height: calc(100% - 60px); }
/* overflow visível: a dica (tooltip) sai pro lado sem criar barra de rolagem */
.tools { background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; padding: 10px 0; gap: 6px; overflow: visible; position: relative; z-index: 6; }
.tools, .panel { scrollbar-width: none; }
.tools::-webkit-scrollbar { display: none; }
.tools hr { width: 32px; border: 0; border-top: 1px solid var(--line); margin: 4px 0; }
.tool {
  width: 46px; height: 46px; border-radius: 12px; border: 0; background: transparent; cursor: pointer;
  display: flex; align-items: center; justify-content: center; color: var(--muted); position: relative;
}
.tool:hover { background: var(--surface-2); color: var(--text); }
.tool.on { background: var(--navy); color: #fff; }
:root[data-theme="dark"] .tool.on { background: var(--cyan); color: #04121f; }
.tool .ic { width: 22px; height: 22px; }
.tool[data-tip]:hover::after {
  content: attr(data-tip); position: absolute; left: 54px; top: 50%; transform: translateY(-50%);
  background: #0b1a2b; color: #fff; font-size: 12px; padding: 6px 10px; border-radius: 8px; white-space: nowrap; z-index: 20; pointer-events: none;
}
.stage-wrap { position: relative; overflow: hidden; background: var(--stage); }
#stage { width: 100%; height: 100%; display: block; touch-action: none; user-select: none; -webkit-user-select: none; }
#stage.t-select { cursor: default; }
#stage.panning { cursor: grabbing; }
#stage:not(.t-select) { cursor: crosshair; }
#stage [data-role="body"] { cursor: move; }
#stage [data-role="cone"] { cursor: grab; }
#stage .hd { cursor: pointer; }
.zoom { position: absolute; right: 14px; bottom: 14px; display: flex; gap: 6px; background: var(--surface); padding: 6px; border-radius: 12px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.zoom .btn { height: 34px; width: 34px; }
.zoom span { min-width: 52px; text-align: center; align-self: center; font-size: 12px; color: var(--muted); font-weight: 600; }
.hint { position: absolute; left: 14px; bottom: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; font-size: 12px; color: var(--muted); box-shadow: var(--shadow); max-width: calc(100% - 260px); }
.nophoto { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; }
.nophoto.on { display: flex; }
.nophoto .drop { background: var(--surface); width: min(480px, 90%); padding: 40px; }

.panel { background: var(--surface); border-left: 1px solid var(--line); overflow-y: auto; }
.ph { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); z-index: 2; }
.ph .badge { width: 34px; height: 34px; border-radius: 10px; background: var(--navy); color: #fff; display: flex; align-items: center; justify-content: center; }
:root[data-theme="dark"] .ph .badge { background: var(--cyan); color: #04121f; }
.ph b { flex: 1; font-size: 15px; }
.ph .btn { height: 34px; width: 34px; }
.sec { padding: 14px 16px; border-bottom: 1px solid var(--line); display: grid; gap: 12px; }
.sec h4 { margin: 0; font-size: 11px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--accent-2); display: flex; align-items: center; gap: 8px; }
.sec h4 .sp { flex: 1; }
.cam { border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: grid; gap: 10px; background: var(--surface-2); cursor: pointer; }
.cam.on { border-color: var(--cyan); box-shadow: 0 0 0 2px rgba(29, 156, 211, .25); }
.camh { display: flex; align-items: center; gap: 8px; }
.camh .dot { width: 12px; height: 12px; border-radius: 50%; }
.camh .btn { height: 30px; width: 30px; }
.camh .ic { width: 16px; height: 16px; }
.sum { display: grid; gap: 4px; }
.sum div { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.sum div:last-child { border: 0; }
.sum b { font-size: 16px; }
.items { display: grid; gap: 4px; }
.items button { display: flex; align-items: center; gap: 10px; text-align: left; border: 0; background: transparent; padding: 7px 8px; border-radius: 8px; cursor: pointer; }
.items button:hover { background: var(--surface-2); }
.items .ic { width: 16px; height: 16px; color: var(--muted); }
.items small { color: var(--muted); margin-left: auto; }
.kbd { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; font-size: 12px; color: var(--muted); }
.kbd kbd { background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; font: 600 11px/1.6 inherit; color: var(--text); text-align: center; }
.panel-toggle { display: none; }

#toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 30px); opacity: 0; transition: .25s;
  background: #0b1a2b; color: #fff; padding: 10px 18px; border-radius: 10px; z-index: 99; pointer-events: none; font-weight: 600;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.err { background: var(--red); }

/* ====== Toque (iPhone / Android / iPad) ====== */
html { -webkit-text-size-adjust: 100%; }
button, .btn, .tool, a, label { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
/* editor ocupa exatamente a tela visível (sem a barra do Safari cortar nada) */
body.edp { position: fixed; inset: 0; height: 100%; height: 100dvh; overflow: hidden; overscroll-behavior: none; display: flex; flex-direction: column; }
body.edp .top { flex: none; }
body.edp .ed { flex: 1; min-height: 0; height: auto; }
.top { height: calc(60px + env(safe-area-inset-top)); padding-top: env(safe-area-inset-top); padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
.modal .box { max-height: 92dvh; }
/* tela com pouca altura: menu pode rolar, mas sem barra e sem dica */
@media (min-width: 901px) and (max-height: 620px) {
  .tools { overflow-y: auto; overflow-x: hidden; }
  .tool[data-tip]:hover::after { display: none; }
}
/* aparelho sem mouse: não deixa o "hover" grudar depois do toque */
@media (hover: none) {
  .tool[data-tip]:hover::after { display: none; }
  .btn:not(.pri):hover { border-color: var(--line); color: var(--text); }
  .tool:not(.on):hover { background: transparent; color: var(--muted); }
}

/* ====== Celular / tablet ====== */
@media (max-width: 900px) {
  .top .ttl small, .top .hide-m { display: none; }
  .top { gap: 6px; padding-left: max(10px, env(safe-area-inset-left)); padding-right: max(10px, env(safe-area-inset-right)); }
  .top .ttl { flex: 1; }
  .top .sp { display: none; }
  .top .btn.ico { width: 36px; height: 36px; }
  .top .btn.pri { height: 36px; padding: 0 11px; }
  .top .status span { display: none; }
  .top .status { padding: 0 2px; }
  .ed { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) calc(60px + env(safe-area-inset-bottom)); }
  .tools { grid-row: 2; flex-direction: row; border-right: 0; border-top: 1px solid var(--line); padding: 0 6px env(safe-area-inset-bottom); gap: 2px; overflow-x: auto; overflow-y: hidden; justify-content: space-around; align-items: center; }
  .tools hr { display: none; }
  .tool { width: 42px; height: 42px; flex: none; }
  .tool[data-tip]:hover::after { display: none; }
  .stage-wrap { grid-row: 1; }
  .zoom { right: 10px; bottom: 10px; padding: 4px; }
  .panel { position: fixed; left: 0; right: 0; bottom: calc(60px + env(safe-area-inset-bottom)); max-height: 55vh; max-height: 55dvh; border-left: 0; border-top: 1px solid var(--line); border-radius: 18px 18px 0 0; box-shadow: 0 -10px 40px rgba(0,0,0,.25); transform: translateY(110%); transition: transform .25s; z-index: 10; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
  .panel.open { transform: none; }
  .panel-toggle { display: inline-flex; }
  .hint { display: none; }
  /* letra 16px nos campos = o iPhone não dá zoom sozinho ao tocar pra digitar */
  input, select, textarea, .f input[type=text], .f input[type=number], .f select, .in { font-size: 16px !important; }
  .f input[type=text], .f input[type=number], .f select, .in { height: 42px; }
  .rr input[type=range] { height: 32px; }
  .rr .num { height: 38px !important; }
  .chk input { width: 22px; height: 22px; }
  /* Padrões: nome numa linha inteira, o resto embaixo */
  .mrow { grid-template-columns: 44px 1fr 1fr 38px; padding-bottom: 10px; border-bottom: 1px dashed var(--line); }
  .mrow.p { grid-template-columns: 44px 1fr 38px; }
  .mrow:not(.d) > :first-child { grid-column: 1 / -1; }
  .mrow.mhead { border: 0; padding-bottom: 0; }
  .mrow.d { grid-template-columns: 1fr 44px 38px; }
  .two { grid-template-columns: 1fr; }
  .modal { padding: 10px; padding-bottom: max(10px, env(safe-area-inset-bottom)); }
  .wrap { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
  .hero h1 { font-size: 24px; }
}

/* Seletor de cor por ponto */
.sw { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.swc { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line); background: var(--c); cursor: pointer; padding: 0; position: relative; flex: none; box-shadow: inset 0 0 0 2px var(--surface); }
.swc.on { border-color: var(--accent-2); box-shadow: inset 0 0 0 2px var(--surface), 0 0 0 2px var(--accent-2); }
.swc.free { display: inline-flex; align-items: center; justify-content: center; background: conic-gradient(#E5484D, #EAB308, #22C55E, #1D9CD3, #8B5CF6, #EC4899, #E5484D); color: #fff; }
.swc.free.on { background: var(--c); }
.swc.free .ic { width: 14px; height: 14px; filter: drop-shadow(0 0 2px rgba(0,0,0,.6)); }
.swc.free input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; border: 0; padding: 0; }
.btn.swdef { height: 30px; padding: 0 10px; font-size: 12px; gap: 6px; }
.btn.swdef.on { border-color: var(--accent-2); color: var(--accent-2); }
.btn.swdef .dot { width: 12px; height: 12px; border-radius: 50%; border: 1px solid var(--line); }
@media (max-width: 900px) { .swc { width: 32px; height: 32px; } }

/* Histórico de alterações */
.hwrap { position: relative; }
.hmenu { position: absolute; top: calc(100% + 10px); right: 0; width: 360px; max-height: min(70vh, 560px); overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 16px 50px rgba(0, 20, 40, .25); z-index: 40; display: none; overscroll-behavior: contain; }
.hmenu.open { display: block; }
.hmenu .hh { display: flex; align-items: center; gap: 6px; padding: 12px 12px 12px 16px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); z-index: 1; }
.hmenu .hh b { font-size: 15px; }
.hmenu .hh .btn { width: 34px; height: 34px; }
.hl { padding: 6px; display: grid; gap: 2px; }
.hrow { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; border: 0; background: transparent; padding: 10px; border-radius: 10px; cursor: pointer; border-left: 3px solid transparent; }
.hrow:hover { background: var(--surface-2); }
.hrow .ic { width: 18px; height: 18px; color: var(--muted); }
.hrow span { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.hrow b { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hrow small { font-size: 11px; color: var(--muted); }
.hrow em { font-style: normal; font-size: 11px; color: var(--muted); white-space: nowrap; }
.hrow.cur { background: var(--surface-2); border-left-color: var(--accent-2); }
.hrow.cur .ic, .hrow.cur small { color: var(--accent-2); }
.hrow.fut { opacity: .5; }
.hmore { display: block; width: calc(100% - 12px); margin: 0 6px 6px; border: 1px dashed var(--line); background: transparent; border-radius: 10px; padding: 9px; font-weight: 600; color: var(--accent-2); cursor: pointer; }
.hnote { margin: 0; padding: 10px 16px 14px; font-size: 11px; color: var(--muted); border-top: 1px solid var(--line); }
@media (max-width: 900px) {
  .top #bUndo, .top #bRedo { display: none; }
  .hwrap { position: static; }
  .hmenu { position: fixed; left: 8px; right: 8px; width: auto; top: calc(64px + env(safe-area-inset-top)); max-height: 70dvh; }
  .hrow { padding: 12px 10px; }
}
.hmenu .hh .sp { display: block; flex: 1; }
@media (max-width: 900px) {
  /* painel fechado some de verdade (não aparece a pontinha em cima da barra de ferramentas) */
  .panel { visibility: hidden; transition: transform .25s, visibility 0s .25s; }
  .panel.open { visibility: visible; transition: transform .25s; }
}

/* Janela de exportação */
.seg { display: flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 3px; }
.seg button { flex: 1; border: 0; background: transparent; border-radius: 8px; height: 36px; font-weight: 700; cursor: pointer; color: var(--muted); }
.seg button.on { background: var(--navy); color: #fff; }
:root[data-theme="dark"] .seg button.on { background: var(--cyan); color: #04121f; }
.opts { display: grid; gap: 8px; }
.opts button { display: flex; gap: 12px; align-items: flex-start; text-align: left; border: 2px solid var(--line); background: var(--surface); border-radius: 12px; padding: 12px 14px; cursor: pointer; }
.opts button .ic { margin-top: 2px; color: var(--muted); }
.opts button span { display: flex; flex-direction: column; gap: 2px; }
.opts button small { color: var(--muted); font-size: 12px; line-height: 1.35; }
.opts button.on { border-color: var(--accent-2); background: var(--surface-2); }
.opts button.on .ic { color: var(--accent-2); }
#wmBox .seg { margin-top: 6px; }
.sdot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; vertical-align: middle; border: 1px solid var(--line); }
.sum .sdot { margin-right: -3px; border: 2px solid var(--surface); width: 12px; height: 12px; }
.sum .sdot:last-of-type { margin-right: 8px; }

/* Celular: barrinha do item selecionado + painel menor */
.selbar, .grab { display: none; }
@media (max-width: 900px) {
  .stage-wrap.has-sel .selbar { display: flex; }
  .stage-wrap.has-sel .zoom { display: none; }
  .selbar { position: absolute; left: 8px; right: 8px; bottom: 8px; z-index: 4; align-items: center; gap: 6px; padding: 6px 6px 6px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
  .selbar .sb-ic { display: flex; color: var(--accent-2); }
  .selbar b { flex: 1; min-width: 0; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .selbar .btn { height: 36px; flex: none; }
  .selbar .btn.ico { width: 36px; }
  .selbar .sb-cam { padding: 0 8px; font-size: 12px; }
  .selbar .sb-ed { padding: 0 10px; gap: 6px; }
  .panel { max-height: 46vh; max-height: 46dvh; }
  .grab { display: block; width: 100%; height: 22px; border: 0; background: var(--surface); cursor: pointer; position: sticky; top: 0; z-index: 3; padding: 0; }
  .grab::before { content: ""; display: block; width: 44px; height: 5px; border-radius: 3px; background: var(--line); margin: 8px auto 0; }
  .panel .ph { top: 22px; padding-top: 6px; }
}
@media (max-width: 380px) { .selbar .sb-ed span { display: none; } .selbar .sb-ed { width: 36px; padding: 0; justify-content: center; } }
@media (max-width: 900px) {
  .selbar .sb-cam { flex: 1; min-width: 0; justify-content: flex-start; gap: 6px; padding: 0 10px; }
  .selbar .sb-cam b { flex: none; font-size: 14px; }
  .selbar .sb-cam span { color: var(--muted); font-weight: 600; font-size: 12px; white-space: nowrap; }
}
/* histórico: texto comprido corta com "…" em vez de esticar o menu pros lados */
.hmenu { overflow-x: hidden; }
.hl > .hrow { min-width: 0; }
.hrow em { flex: none; }

/* ===== Equipamentos do projeto (passo a passo + editor) ===== */
.eqhint { margin: 0; color: var(--muted); font-size: 13px; }
.eqc { border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: grid; gap: 12px; background: var(--surface-2); }
.eqh { display: flex; align-items: center; gap: 8px; }
.eqh .dot { width: 12px; height: 12px; border-radius: 50%; border: 1px solid var(--line); }
.eqh .btn { height: 32px; width: 32px; }
.eqname { font-weight: 700; color: var(--accent-2); font-size: 13px; margin-top: -6px; }
.eqg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.eqfoot { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.eqfoot small { color: var(--muted); }
.eqseg { flex-wrap: wrap; }
.eqseg button { min-width: 90px; }
.steps { display: flex; gap: 6px; padding: 12px 20px 0; }
.steps span { flex: 1; display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; color: var(--muted); padding: 8px 10px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); white-space: nowrap; overflow: hidden; }
.steps span i { font-style: normal; width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--line); color: var(--text); flex: none; }
.steps span.on { color: var(--accent-2); border-color: var(--accent-2); }
.steps span.on i, .steps span.done i { background: var(--accent-2); color: #fff; }
.miss { margin: 0; padding: 10px 12px; border-radius: 10px; background: rgba(229, 72, 77, .1); color: var(--red); font-size: 13px; font-weight: 600; }
.eqsum { display: grid; gap: 4px; font-size: 13px; }
.eqsum div { display: flex; gap: 8px; align-items: center; }
.eqsum .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; border: 1px solid var(--line); }
@media (max-width: 900px) {
  .eqg { grid-template-columns: 1fr 1fr; }
  .steps { padding: 10px 12px 0; }
  .steps span b { display: none; }
  .steps span { justify-content: center; }
}

[hidden] { display: none !important; }

/* Imagem de satélite */
.or-sep { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; }
.or-sep::before, .or-sep::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.sat-btn { height: auto; padding: 14px; justify-content: flex-start; gap: 14px; text-align: left; white-space: normal; }
.sat-btn .ic { width: 26px; height: 26px; color: var(--accent-2); }
.sat-btn span { display: flex; flex-direction: column; gap: 2px; }
.sat-btn small { color: var(--muted); font-weight: 500; font-size: 12px; }
.sat-box { width: min(1100px, 100%); display: flex; flex-direction: column; }
.sat-search { display: flex; gap: 8px; padding: 14px 20px 10px; }
.sat-search .in { flex: 1; }
.sat-map-wrap { position: relative; margin: 0 20px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); height: 58vh; height: 58dvh; }
#satMap { position: absolute; inset: 0; background: #1a2430; }
.sat-frame { position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 0 3px var(--cyan); border-radius: 12px; z-index: 500; }
.sat-foot { padding: 10px 20px 0; display: grid; gap: 8px; }
.sat-foot small { color: var(--muted); }
#mSat .leaflet-control-attribution { font-size: 10px; }
@media (max-width: 900px) {
  #mSat { padding: 0; }
  #mSat .box { border-radius: 0; max-height: 100dvh; height: 100dvh; }
  .sat-search { padding: 10px 12px 8px; }
  .sat-map-wrap { margin: 0 12px; flex: 1; height: auto; min-height: 0; }
  .sat-foot { padding: 8px 12px 0; }
}
