:root {
  --bg: #f3f5f8; --panel: #ffffff; --ink: #0f172a; --muted: #64748b; --line: #e2e8f0;
  --brand: #2563eb; --brand2: #7c3aed; --soft: #eef2ff; --danger: #dc2626; --ok: #16a34a;
  --radius: 12px; --shadow: 0 1px 2px rgba(15,23,42,.06), 0 6px 24px rgba(15,23,42,.06);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
#app { min-height: 100%; }
button, input, select { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -.01em; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.center { text-align: center; }
.row { display: flex; align-items: center; }
.wrap { flex-wrap: wrap; }
.gap6 { gap: 6px; } .gap8 { gap: 8px; }
.mt { margin-top: 12px; }
.grow { flex: 1; }
.mobile-only { display: none !important; }

/* Botões */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 38px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-weight: 600; font-size: 14px; white-space: nowrap; transition: background .15s, border-color .15s, transform .05s; }
.btn:hover { background: #f8fafc; border-color: #cbd5e1; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: linear-gradient(135deg, var(--brand), #4f46e5); color: #fff; border-color: transparent; box-shadow: 0 4px 14px rgba(37,99,235,.28); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: rgba(148,163,184,.15); }
.btn.sm { height: 32px; padding: 0 10px; font-size: 13px; border-radius: 8px; }
.btn.icon { width: 38px; padding: 0; font-size: 18px; }
.btn.danger { color: var(--danger); }
.btn.block { width: 100%; height: 46px; font-size: 15px; }
.linklike { background: none; border: 0; padding: 0; cursor: pointer; text-align: left; flex: 1; }

/* Campos */
.fld { display: flex; flex-direction: column; gap: 5px; margin-bottom: 11px; }
.fld > span { font-size: 12px; font-weight: 600; color: #475569; }
.fld input, .fld select, .search input, select.lang { height: 38px; border: 1px solid var(--line); border-radius: 9px; padding: 0 10px; background: #fff; outline: none; width: 100%; }
.fld input:focus, .fld select:focus, .search input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(37,99,235,.15); }
select.lang { width: auto; height: 36px; font-size: 13px; cursor: pointer; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.check { display: flex; gap: 8px; align-items: center; font-size: 13.5px; margin: 6px 0; }

/* Marca */
.brand { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 17px; letter-spacing: -.02em; }
.brand .logo { width: 30px; height: 30px; }
.brand.big { font-size: 24px; } .brand.big .logo { width: 42px; height: 42px; }

/* Login */
.login { display: grid; grid-template-columns: 1.15fr 1fr; min-height: 100vh; }
.login-hero { background: radial-gradient(1200px 600px at 0% 0%, #1e3a8a 0%, #0f172a 55%), #0f172a; color: #fff; padding: 48px 56px; display: flex; flex-direction: column; gap: 22px; overflow: hidden; position: relative; }
.login-hero h1 { font-size: clamp(28px, 3.4vw, 44px); line-height: 1.08; font-weight: 800; max-width: 560px; background: linear-gradient(90deg, #fff, #c7d2fe); -webkit-background-clip: text; background-clip: text; color: transparent; }
.feats { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-size: 15.5px; color: #dbeafe; }
.hero-board { margin-top: auto; max-width: 520px; filter: drop-shadow(0 30px 40px rgba(0,0,0,.45)); transform: perspective(1200px) rotateY(-8deg) rotateX(4deg); }
.hero-board svg { width: 100%; height: auto; display: block; }
.hero-board svg text { fill-opacity: 1; }
.login-form-wrap { display: flex; flex-direction: column; padding: 24px; background: #fff; }
.login-top { display: flex; justify-content: flex-end; }
.login-card { margin: auto; width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 6px; }
.login-card h2 { font-size: 28px; font-weight: 800; }
.login-card p { margin: 0 0 14px; }
.login-card .fld input { height: 46px; font-size: 15px; }
.err { color: var(--danger); font-size: 13px; min-height: 18px; }
.note { font-size: 12.5px; color: var(--muted); text-align: center; margin-top: 12px !important; }
.login-help { margin-top: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--soft); display: flex; flex-direction: column; gap: 8px; }
.login-help[hidden] { display: none; }
.login-card .login-help p { margin: 0; font-size: 13.5px; line-height: 1.45; color: var(--ink); }
.login-help .help-btn { text-decoration: none; color: var(--brand); border-color: #c7d2fe; background: #fff; }
.help-mail { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--muted); }
.help-mail span { overflow-wrap: anywhere; user-select: all; }

/* Topbar */
.topbar { height: 60px; display: flex; align-items: center; gap: 8px; padding: 0 14px; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.tool-group { display: flex; align-items: center; gap: 2px; padding: 0 4px; border-left: 1px solid var(--line); }
.pname { border: 1px solid transparent; border-radius: 8px; height: 36px; padding: 0 10px; font-weight: 700; font-size: 15px; min-width: 120px; max-width: 280px; width: 30vw; background: transparent; outline: none; }
.pname:hover { border-color: var(--line); }
.pname:focus { border-color: var(--brand); background: #fff; }
#savestate { transition: color .3s; }
#savestate.flash { color: var(--ok); }

/* Projetos */
.projects { max-width: 1200px; margin: 0 auto; padding: 32px 20px 60px; }
.phead { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.phead h1 { font-size: 30px; font-weight: 800; }
.phead p { margin: 4px 0 0; }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.pcard { background: #fff; border-radius: 16px; border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; }
.pthumb { background: linear-gradient(180deg, #f8fafc, #eef2f7); padding: 16px; cursor: pointer; height: 230px; display: flex; align-items: center; justify-content: center; }
.pthumb svg { max-width: 100%; max-height: 100%; }
.pinfo { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; }
.pinfo h3 { font-size: 16px; cursor: pointer; }
.pinfo p { margin: 0; }
.empty { text-align: center; padding: 70px 20px; color: var(--muted); background: #fff; border: 2px dashed var(--line); border-radius: 18px; }
.empty .logo { width: 56px; height: 56px; }

/* Editor */
.ed { display: grid; grid-template-columns: 300px 1fr 300px; height: calc(100vh - 60px); }
.side, .insp { background: #fff; overflow: hidden; display: flex; flex-direction: column; }
.side { border-right: 1px solid var(--line); }
.insp { border-left: 1px solid var(--line); overflow-y: auto; }
.tabs { display: flex; border-bottom: 1px solid var(--line); padding: 0 6px; }
.tabs button { flex: 1; background: none; border: 0; padding: 14px 4px 12px; font-weight: 600; font-size: 13.5px; color: var(--muted); cursor: pointer; border-bottom: 2.5px solid transparent; }
.tabs button.on { color: var(--brand); border-color: var(--brand); }
.side-body { padding: 14px; overflow-y: auto; flex: 1; }
.side-body h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 14px 0 10px; }
.side-body h4:first-child { margin-top: 0; }
.search { position: relative; margin-bottom: 8px; }
.search input { padding-left: 32px; height: 40px; }
.search span { position: absolute; left: 11px; top: 9px; color: var(--muted); font-size: 16px; }
.hint { font-size: 12.5px; color: #475569; background: var(--soft); border-radius: 9px; padding: 8px 10px; margin: 0 0 12px; line-height: 1.4; }
.libcat { display: flex; justify-content: space-between; font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: #64748b; margin: 14px 0 8px; }
.libcat em { font-style: normal; background: #f1f5f9; border-radius: 10px; padding: 1px 7px; }
.libgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.libitem { border: 1px solid var(--line); background: linear-gradient(180deg, #fff, #f8fafc); border-radius: 11px; padding: 8px 4px 6px; display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: grab; user-select: none; touch-action: pan-y; transition: border-color .15s, box-shadow .15s; }
.libitem:hover { border-color: #93c5fd; box-shadow: 0 4px 14px rgba(37,99,235,.12); }
.libitem .thumb { height: 64px; width: auto !important; pointer-events: none; }
.libitem span { font-size: 10.5px; text-align: center; line-height: 1.2; font-weight: 600; color: #334155; }
.libitem small { font-size: 9.5px; color: var(--muted); }
.pagerow { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; font-size: 14px; }
.pagerow.on { border-color: var(--brand); background: var(--soft); }
.switch { position: relative; width: 40px; height: 23px; flex: none; cursor: pointer; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch i { position: absolute; inset: 0; background: #cbd5e1; border-radius: 20px; transition: .2s; }
.switch i::after { content: ''; position: absolute; width: 17px; height: 17px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked + i { background: var(--brand); }
.switch input:checked + i::after { transform: translateX(17px); }
.logo-prev { height: 36px; max-width: 90px; object-fit: contain; border: 1px solid var(--line); border-radius: 6px; padding: 2px; }

.stage { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: #e9edf2; background-image: radial-gradient(#cfd6df 1px, transparent 1px); background-size: 18px 18px; }
.canvas { flex: 1; overflow: auto; padding: 16px; display: flex; }
.board-holder { margin: auto; }
.board-svg { display: block; user-select: none; touch-action: none; }
#board .dev { cursor: grab; }
#board .dev:hover { filter: drop-shadow(0 0 1.4px rgba(37,99,235,.95)); }
.board-svg text { user-select: none; -webkit-user-select: none; }
body.dragging, body.dragging * { cursor: grabbing !important; }
.sheet-mode .sheet-scale { margin: 0 auto; flex: none; }
.sheet-mode .sheet-inner { transform-origin: 0 0; width: 297mm; }
.sheet-mode .sheet { box-shadow: 0 10px 40px rgba(15,23,42,.18); }
.pagetabs { display: flex; gap: 4px; padding: 6px 10px; background: #fff; border-top: 1px solid var(--line); overflow-x: auto; }
.pagetabs button { border: 0; background: none; padding: 7px 12px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; white-space: nowrap; }
.pagetabs button b { display: inline-grid; place-items: center; width: 19px; height: 19px; border-radius: 6px; background: #f1f5f9; font-size: 11px; margin-right: 4px; }
.pagetabs button.on { background: var(--soft); color: var(--brand); }
.pagetabs button.on b { background: var(--brand); color: #fff; }

.insp-empty { padding: 40px 22px; text-align: center; color: #475569; font-size: 14px; }
.insp-empty .ico { font-size: 36px; opacity: .6; }
.insp-head { display: flex; gap: 12px; align-items: center; padding: 14px; border-bottom: 1px solid var(--line); }
.insp-head h3 { font-size: 15px; line-height: 1.2; margin: 2px 0; }
.insp-thumb { background: #f1f5f9; border-radius: 10px; padding: 6px; display: flex; }
.insp-body { padding: 14px; }
.close-insp { margin-left: auto; }
.warn, .ok, .info { font-size: 12.5px; padding: 8px 10px; border-radius: 9px; margin-bottom: 8px; line-height: 1.35; }
.warn { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.ok { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.info { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }

.drag-ghost { position: fixed; left: 0; top: 0; z-index: 100; pointer-events: none; opacity: .85; filter: drop-shadow(0 8px 16px rgba(0,0,0,.25)); }
.drag-ghost .thumb { height: 80px; width: auto !important; }

.mobnav { display: none; }

/* Folha A4 */
.sheet { width: 297mm; height: 210mm; background: #fff; padding: 8mm; color: #111; font-family: Inter, Arial, sans-serif; }
.frame { border: 1.4px solid #111; height: 100%; display: flex; flex-direction: column; padding: 5mm; }
.sh-head { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #111; padding-bottom: 3mm; margin-bottom: 3mm; }
.sh-head h2 { font-size: 17px; font-weight: 800; }
.sh-head h2 span { color: #2563eb; }
.sh-brand { display: flex; align-items: center; gap: 6px; font-weight: 800; font-size: 13px; }
.sh-brand img { max-height: 11mm; max-width: 45mm; object-fit: contain; }
.sh-brand .logo { width: 22px; height: 22px; }
.sh-body { flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; }
.sh-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 6mm; margin-top: 3mm; }
.legend { font-size: 10px; color: #333; line-height: 1.5; }
.tblock { border-collapse: collapse; font-size: 10px; min-width: 125mm; }
.tblock td { border: 1px solid #111; padding: 1.2mm 2mm; vertical-align: top; }
.tblock small { display: block; font-size: 7px; text-transform: uppercase; letter-spacing: .05em; color: #555; }
.tb-sheet { text-align: center; width: 18mm; }
.tb-sheet b { font-size: 14px; }
.front { flex: 1; min-height: 0; display: flex; justify-content: center; }
.front svg { height: 100%; width: auto; max-width: 100%; }
.uni { display: flex; flex-direction: column; gap: 3mm; height: 100%; }
.uni-d { flex: 1; min-height: 0; display: flex; justify-content: center; }
.uni-d svg { height: 100%; max-width: 100%; }
.tbl { width: 100%; border-collapse: collapse; font-size: 11px; }
.tbl.small { font-size: 9.5px; }
.tbl th { background: #111; color: #fff; text-align: left; padding: 1.6mm 2mm; font-weight: 600; }
.tbl td { border-bottom: 1px solid #ddd; padding: 1.3mm 2mm; }
.tbl tbody tr:nth-child(even) td { background: #f7f8fa; }
.tbl tfoot td { border-top: 2px solid #111; padding: 2mm; font-weight: 600; }
.tbl .r { text-align: right; }
.tbl.mat { font-size: 9.5px; }
.tbl.mat td { padding: .55mm 2mm; }
.tbl.mat th { padding: 1.2mm 2mm; }
.tbl.mat input.price { padding: 1px 5px; font-size: 9.5px; }
.sh-body .hint { margin-bottom: 2mm; padding: 4px 8px; }
.tbl input.price { width: 90px; text-align: right; border: 1px solid #cbd5e1; border-radius: 6px; padding: 3px 6px; font-size: 11px; background: #fffef5; }
.empty-sheet { margin: auto; color: #666; font-size: 15px; max-width: 420px; text-align: center; }
.cover { display: grid; grid-template-columns: 1.1fr 1fr; gap: 10mm; height: 100%; }
.cover-l { display: flex; flex-direction: column; gap: 4mm; padding: 4mm 2mm; }
.cover-logo { max-height: 22mm; max-width: 70mm; object-fit: contain; align-self: flex-start; }
.cover-brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 18px; }
.cover-brand .logo { width: 34px; height: 34px; }
.eyebrow { margin: 6mm 0 0; text-transform: uppercase; letter-spacing: .12em; font-size: 11px; color: #2563eb; font-weight: 700; }
.cover h1 { font-size: 34px; font-weight: 800; line-height: 1.05; }
.lead { margin: 0; color: #444; font-size: 15px; }
.cover-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 4mm; margin-top: 4mm; }
.cover-meta small, .toc small { display: block; text-transform: uppercase; font-size: 8.5px; letter-spacing: .08em; color: #666; margin-bottom: 1mm; }
.cover-meta b { font-size: 13px; }
.toc { margin-top: auto; border-top: 1px solid #ddd; padding-top: 3mm; font-size: 12px; }
.toc div { display: flex; gap: 8px; padding: 1mm 0; }
.toc span { color: #2563eb; font-weight: 700; width: 14px; }
.cover-r { display: flex; align-items: center; justify-content: center; background: linear-gradient(180deg, #f8fafc, #eef2f7); border-radius: 4mm; padding: 6mm; min-height: 0; }
.cover-r svg { max-height: 100%; max-width: 100%; }

/* Modal prontuário */
#modal { position: fixed; inset: 0; background: rgba(15,23,42,.5); z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px; backdrop-filter: blur(3px); }
.modal { background: #fff; border-radius: 18px; width: 100%; max-width: 720px; max-height: 92vh; display: flex; flex-direction: column; box-shadow: 0 30px 80px rgba(0,0,0,.3); }
.mhead { display: flex; justify-content: space-between; align-items: flex-start; padding: 18px 20px 6px; }
.mhead h2 { font-size: 22px; font-weight: 800; }
.mhead p { margin: 4px 0 0; }
.mbody { padding: 6px 20px 20px; overflow-y: auto; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0; }
.tabs2 { padding: 0 20px; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 20px; padding: 7px 14px; font-weight: 600; font-size: 13px; cursor: pointer; }
.chip.sm { padding: 5px 11px; font-size: 12px; }
.chip.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.hbitem { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.tags span { font-size: 11.5px; background: #f1f5f9; border-radius: 6px; padding: 2px 7px; color: #334155; }
.calcout { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin: 6px 0 14px; }
.calcout div { background: var(--soft); border-radius: 12px; padding: 12px; }
.calcout small { display: block; font-size: 11.5px; color: #475569; font-weight: 600; }
.calcout b { font-size: 22px; font-weight: 800; color: #1e3a8a; }
.calcout em { display: block; font-style: normal; font-size: 11.5px; }
.calcout .good { background: #f0fdf4; } .calcout .good b { color: #166534; }
.calcout .bad { background: #fef2f2; } .calcout .bad b { color: #991b1b; }
.cklist { display: grid; gap: 6px; margin-bottom: 14px; }
.ck { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 14px; cursor: pointer; }
.ck input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--brand); }
.ck input:checked + span { text-decoration: line-through; color: var(--muted); }

#toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 30px); background: #0f172a; color: #fff; padding: 11px 18px; border-radius: 12px; font-size: 14px; opacity: 0; pointer-events: none; transition: .25s; z-index: 200; max-width: 90vw; text-align: center; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#print-root { display: none; }

/* Responsivo */
@media (max-width: 1200px) { .ed { grid-template-columns: 270px 1fr 270px; } }
@media (max-width: 900px) {
  .hide-sm { display: none !important; }
  .mobile-only { display: flex !important; }
  .login { grid-template-columns: 1fr; }
  .login-hero { display: none; }
  .login-card .brand { margin-bottom: 18px; }
  .topbar { padding: 0 8px; gap: 4px; }
  .pname { width: 100%; min-width: 0; flex: 1; max-width: none; }
  .ed-top .grow { display: none; }
  .ed { grid-template-columns: 1fr; height: calc(100vh - 60px - 62px); height: calc(100dvh - 60px - 62px); }
  .side { position: fixed; left: 0; right: 0; bottom: 62px; height: 62vh; z-index: 30; border-radius: 18px 18px 0 0; box-shadow: 0 -10px 40px rgba(15,23,42,.2); transform: translateY(110%); transition: transform .25s; border: 0; }
  .side.open { transform: none; }
  .grab { height: 18px; justify-content: center; align-items: center; cursor: pointer; }
  .grab::before { content: ''; width: 42px; height: 5px; border-radius: 3px; background: #cbd5e1; }
  .libgrid { grid-template-columns: repeat(4, 1fr); }
  .insp { position: fixed; left: 0; right: 0; bottom: 62px; max-height: 58vh; z-index: 31; border-radius: 18px 18px 0 0; box-shadow: 0 -10px 40px rgba(15,23,42,.2); transform: translateY(110%); transition: transform .25s; border: 0; }
  .insp.open { transform: none; }
  .mobnav { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; height: 62px; background: #fff; border-top: 1px solid var(--line); z-index: 40; padding-bottom: env(safe-area-inset-bottom); }
  .mobnav button { background: none; border: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 18px; color: var(--muted); cursor: pointer; }
  .mobnav button span { font-size: 11px; font-weight: 600; }
  .mobnav button.on { color: var(--brand); }
  .canvas { padding: 8px; }
  .phead h1 { font-size: 24px; }
}
@media (max-width: 480px) { .hide-xs { display: none; } .libgrid { grid-template-columns: repeat(3, 1fr); } }

/* Impressão / PDF */
@page { size: A4 landscape; margin: 0; }
@media print {
  html, body { background: #fff; height: auto; }
  #app, #toast, #modal { display: none !important; }
  #print-root { display: block; }
  .sheet { page-break-after: always; break-after: page; box-shadow: none; overflow: hidden; }
  .sheet:last-child { page-break-after: auto; break-after: auto; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .no-print { display: none; }
}

/* Tutorial em vídeo */
.tutcard { width: 100%; display: flex; align-items: center; gap: 16px; text-align: left; background: linear-gradient(135deg, #eef2ff, #fff); border: 1px solid #c7d2fe;
  border-radius: 16px; padding: 12px 16px 12px 12px; margin: 0 0 22px; cursor: pointer; font: inherit; color: inherit; box-shadow: var(--shadow); }
.tutcard:hover { border-color: var(--brand); }
.tut-thumb { position: relative; flex: none; width: 150px; aspect-ratio: 16/9; border-radius: 10px; overflow: hidden; background: #0f172a; }
.tut-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tut-thumb i { position: absolute; inset: 0; margin: auto; width: 42px; height: 42px; border-radius: 50%; background: rgba(37,99,235,.92); color: #fff;
  display: grid; place-items: center; font-style: normal; font-size: 16px; padding-left: 3px; box-shadow: 0 6px 16px rgba(0,0,0,.35); }
.tut-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.tut-text b { font-size: 16px; }
.tut-text small { color: var(--muted); font-size: 13px; line-height: 1.35; }
.tutmodal { max-width: 960px; }
.tutmodal video { width: 100%; aspect-ratio: 16/9; border-radius: 12px; background: #000; display: block; }
@media (max-width: 600px) {
  .tutcard { flex-wrap: wrap; }
  .tut-thumb { width: 100%; }
  .tutcard .btn { width: 100%; }
}

/* ---------- Oferta interna (Coleção 38 Quadros) ---------- */
.offercard { width: 100%; display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 22px; text-align: left; font: inherit; color: #fff; cursor: pointer;
  padding: 12px 22px 12px 14px; margin: 0 0 24px; border: 1px solid #2f5fd0; border-radius: 16px; background: linear-gradient(115deg, #061338, #0a2a6e 58%, #0e4fc0); box-shadow: 0 10px 28px -12px rgba(10,42,110,.7); transition: transform .15s, box-shadow .15s; }
.offercard + .offercard { margin-top: -12px; }
.offercard:hover { transform: translateY(-1px); box-shadow: 0 14px 32px -12px rgba(10,42,110,.85); }
.offercard:focus-visible, .of-buy:focus-visible, .of-close:focus-visible { outline: 3px solid #7dd3fc; outline-offset: 2px; }
.of-box { width: 80px; height: auto; flex: none; }
.of-text { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.of-tag { font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #7dd3fc; }
.of-text b { font-size: 19px; line-height: 1.22; font-weight: 800; }
.of-text small { font-size: 13.5px; line-height: 1.35; color: #cbd5e1; }
.of-price { display: grid; grid-template-columns: auto auto; align-items: center; justify-content: end; gap: 0 8px; white-space: nowrap; }
.of-price s { font-size: 13px; color: #a5b4cf; }
.of-price em { font-style: normal; font-size: 11px; font-weight: 800; padding: 2px 7px; border-radius: 20px; background: #facc15; color: #111827; justify-self: end; }
.of-price strong { grid-column: 1 / -1; grid-row: 2; font-size: 27px; line-height: 1.1; font-weight: 800; letter-spacing: -.02em; text-align: right; }
.of-more { display: inline-flex; align-items: center; height: 42px; padding: 0 16px; border-radius: 10px; background: #fff; color: #0a2a6e; font-size: 14.5px; font-weight: 800; white-space: nowrap; }

#modal[data-kind="offer"] { padding: 10px; }
.offermodal { position: relative; max-width: 940px; max-height: calc(100vh - 20px); max-height: calc(100dvh - 20px); overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; }
.of-body { display: contents; }
.of-media { grid-column: 1; grid-row: 1 / 3; min-height: 0; background: #04102e; display: flex; align-items: center; justify-content: center; }
.of-media img { display: block; width: 100%; height: 100%; object-fit: contain; }
.of-info { grid-column: 2; grid-row: 1; min-height: 0; overflow-y: auto; padding: 28px 28px 14px; }
.of-info .of-tag { color: var(--brand); }
.of-info h2 { font-size: 25px; line-height: 1.18; font-weight: 800; letter-spacing: -.02em; margin: 6px 34px 10px 0; }
.of-info p { color: #475569; font-size: 15px; line-height: 1.5; margin: 0 0 14px; }
.of-info ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.of-info li { position: relative; padding-left: 26px; font-size: 14.5px; line-height: 1.4; font-weight: 500; }
.of-info li::before { content: ""; position: absolute; left: 0; top: 2px; width: 18px; height: 18px; border-radius: 50%; background: #15803d; }
.of-info li::after { content: ""; position: absolute; left: 6.5px; top: 5.5px; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.of-foot { grid-column: 2; grid-row: 2; padding: 14px 28px 16px; border-top: 1px solid var(--line); background: #fff; }
.of-foot .of-price { grid-template-columns: auto auto 1fr; justify-content: start; gap: 0 10px; margin-bottom: 10px; }
.of-foot .of-price s { color: #64748b; font-size: 15px; }
.of-foot .of-price strong { grid-column: auto; grid-row: auto; font-size: 30px; color: var(--ink); }
.of-foot .of-price em { justify-self: start; font-size: 12px; }
.of-buy { display: flex; align-items: center; justify-content: center; min-height: 52px; padding: 8px 14px; border-radius: 12px; background: #15803d; color: #fff; font-size: 16.5px; font-weight: 800; text-align: center; text-decoration: none; box-shadow: 0 8px 20px -8px rgba(21,128,61,.8); }
.of-buy:hover { background: #166534; }
.of-note { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.of-note button { border: 0; background: none; padding: 4px 0; font: inherit; color: var(--muted); text-decoration: underline; cursor: pointer; white-space: nowrap; }
.of-close { position: absolute; top: 10px; right: 10px; z-index: 2; width: 38px; height: 38px; border: 0; border-radius: 50%; background: #f1f5f9; color: var(--ink); font-size: 16px; cursor: pointer; }
.of-close:hover { background: #e2e8f0; }
@media (max-width: 600px) {
  .topbar { gap: 2px; padding-left: 10px; padding-right: 10px; }
  .topbar .brand span { display: none; }
  .topbar .lang { width: 118px; min-width: 0; flex: 0 1 auto; }
}
@media (max-width: 820px) {
  .offercard { grid-template-columns: auto 1fr auto; gap: 10px 14px; padding: 12px 14px; }
  .of-box { width: 64px; grid-row: 1; }
  .of-text { grid-column: 2 / -1; }
  .of-text b { font-size: 17px; }
  .of-text small { font-size: 13px; }
  .offercard > .of-price { grid-column: 1 / 3; justify-content: start; }
  .offercard > .of-price strong { font-size: 24px; text-align: left; }
  .offermodal { display: flex; flex-direction: column; max-width: 480px; }
  .of-body { display: block; flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; }
  .of-media img { height: auto; }
  .of-info { overflow: visible; padding: 18px 18px 16px; }
  .of-info h2 { font-size: 22px; margin-right: 0; }
  .of-foot { padding: 10px 16px 12px; box-shadow: 0 -8px 20px -14px rgba(15,23,42,.5); }
  .of-foot .of-price { margin-bottom: 8px; }
  .of-foot .of-price strong { font-size: 26px; }
  .of-note { margin-top: 6px; }
  .of-close { background: rgba(15,23,42,.72); color: #fff; }
  .of-close:hover { background: rgba(15,23,42,.9); }
}

/* ---------- Projeto completo: folhas novas ---------- */
.sheet-stack { display: flex; flex-direction: column; gap: 18px; margin: 0 auto; }
.sh-head h2 em { font-style: normal; color: #64748b; font-size: 13px; font-weight: 600; }
.tblock { font-size: 9px; min-width: 150mm; }
.mdwrap { columns: 2; column-gap: 9mm; font-size: 10.6px; line-height: 1.5; color: #1f2937; }
.md { break-inside: avoid; margin: 0 0 3.5mm; }
.md h3, .h3 { font-size: 12px; font-weight: 800; margin: 0 0 1.5mm; color: #0f172a; border-bottom: 1px solid #e2e8f0; padding-bottom: 1mm; }
.md p { margin: 0 0 1.5mm; text-align: justify; }
.md ul, .checks, .insplist { margin: 0; padding-left: 4.5mm; }
.md li { margin-bottom: .8mm; }
.kv { border-collapse: collapse; width: 100%; font-size: 10px; }
.kv td { border-bottom: 1px solid #edf0f3; padding: .9mm 1.5mm; vertical-align: top; }
.kv td:first-child { color: #475569; width: 42%; }
.params { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2mm 4mm; font-size: 9.5px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 2mm; padding: 2mm 3mm; margin-bottom: 1.5mm; }
.note { font-size: 9px; color: #475569; margin: 1.5mm 0; line-height: 1.4; }
.tbl tr.bad td { background: #fff1f2 !important; }
.okc { color: #15803d; font-weight: 800; }
.badc { color: #dc2626; font-weight: 800; }
.phbox { display: flex; flex-wrap: wrap; gap: 6mm; font-size: 10.5px; margin-top: 2.5mm; padding: 2mm 3mm; background: #f8fafc; border-radius: 2mm; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 8mm; font-size: 10.5px; }
.checks { list-style: none; padding: 0; }
.checks li { padding: 1.2mm 0; border-bottom: 1px solid #f1f5f9; }
.checks li.ok { color: #166534; } .checks li.bad { color: #b91c1c; font-weight: 600; }
.insplist { list-style: none; padding: 0; font-size: 10.5px; }
.insplist li { display: flex; gap: 2mm; align-items: center; padding: 1mm 0; border-bottom: 1px solid #f1f5f9; }
.insplist .box { display: inline-grid; place-items: center; width: 4mm; height: 4mm; border: 1px solid #334155; font-size: 9px; flex: none; }
.insplist input { width: 15px; height: 15px; accent-color: #2563eb; flex: none; }
.tbl input.cell, .kv input.cell { border: 1px solid #cbd5e1; border-radius: 4px; padding: 1px 4px; font-size: 9.5px; background: #fffef5; text-align: right; }
.fillv { display: inline-block; min-width: 14mm; border-bottom: 1px dotted #94a3b8; min-height: 3.5mm; }
.tests td { height: 6mm; }
.planbox { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; }
.planbox img { max-width: 100%; max-height: 100%; object-fit: contain; }
.uni-d.full { height: 100%; }
.termo { font-size: 11.5px; line-height: 1.6; max-width: 235mm; }
.termo p { margin: 0 0 2.5mm; }
.termo ul { margin: 0 0 3mm; }
.termo ul.cols { columns: 2; }
.signs { display: grid; grid-template-columns: 1fr 1fr; gap: 20mm; margin: 12mm 0 6mm; }
.signs div { display: flex; flex-direction: column; align-items: center; text-align: center; }
.signs .line { width: 100%; border-top: 1px solid #111; margin-bottom: 1.5mm; }
.signs small { color: #475569; }
.place { text-align: right; }
.cover-meta em { display: block; font-style: normal; font-size: 10px; color: #475569; margin-top: .5mm; }
.calcbox { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; background: #f1f5f9; border-radius: 9px; padding: 8px; margin: 2px 0 10px; font-size: 11.5px; color: #475569; }
.calcbox b { display: block; color: #0f172a; font-size: 13px; }
textarea { width: 100%; border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; font: inherit; resize: vertical; }

/* ---------- Bônus ---------- */
.bonuscard { width: 100%; display: flex; align-items: center; gap: 16px; text-align: left; border-radius: 16px; padding: 14px 16px; margin: 0 0 12px; cursor: pointer; font: inherit; color: inherit;
  background: linear-gradient(135deg, #fff7ed, #fffbeb); border: 1px solid #fcd34d; box-shadow: var(--shadow); }
.bonuscard:hover { border-color: #f59e0b; }
.bonuscard.open { background: linear-gradient(135deg, #f0fdf4, #ecfeff); border-color: #86efac; }
.bn-ico { font-size: 34px; width: 56px; height: 56px; display: grid; place-items: center; background: #fff; border-radius: 14px; box-shadow: 0 4px 12px rgba(0,0,0,.08); flex: none; }
.bn-badge { flex: none; font-size: 12.5px; font-weight: 700; padding: 6px 10px; border-radius: 20px; background: #fef3c7; color: #92400e; white-space: nowrap; }
.bonuscard.open .bn-badge { background: #dcfce7; color: #166534; }
.bnmodal { max-width: 560px; }
.bnlock { text-align: center; padding: 10px 6px 4px; }
.bnlock .lock { font-size: 54px; }
.bnlock h3 { font-size: 21px; margin: 6px 0 8px; }
.bnlock p { color: #475569; margin: 0 0 14px; line-height: 1.5; }
.bnbar { height: 10px; background: #f1f5f9; border-radius: 10px; overflow: hidden; margin: 0 auto 6px; max-width: 360px; }
.bnbar i { display: block; height: 100%; background: linear-gradient(90deg, #f59e0b, #22c55e); border-radius: 10px; }
.bnlist { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 10px; }
.bnlist li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
.bnlist li span { display: flex; flex-direction: column; gap: 3px; }
.bnlist small { color: var(--muted); font-size: 12.5px; }
@media (max-width: 600px) { .bonuscard { flex-wrap: wrap; } .bn-badge { margin-left: auto; } .bnlist li { flex-direction: column; align-items: flex-start; } .calcbox { grid-template-columns: repeat(2, 1fr); } }
.toc { columns: 2; column-gap: 6mm; }
.toc small { column-span: all; }
.toc div { padding: .6mm 0; break-inside: avoid; }
.cover h1 { font-size: 30px; }
.cover-l { gap: 3mm; }
.modal { overflow-x: hidden; }
.bnlist li span { min-width: 0; }

/* ===================== v6 — toque, ícones e celular ===================== */
.ic { width: 20px; height: 20px; flex: none; display: block; }
.btn .ic { width: 19px; height: 19px; }
.btn.sm .ic { width: 16px; height: 16px; }
button, .btn, [role=button], label, select, input { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.tsep { width: 1px; height: 24px; background: var(--line); margin: 0 4px; }
.pdfbtn { gap: 8px; }
.stage { position: relative; }
.canvas { -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.canvas.board-mode, .board-svg { touch-action: pan-x pan-y; }
.board-holder { margin: auto; padding: 4px; }
#board .dev { cursor: pointer; }
#board .dev.sel { cursor: grab; }

/* zoom flutuante */
.zoomctl { position: absolute; right: 14px; bottom: 60px; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; z-index: 4; }
.zoomctl button { width: 42px; height: 40px; display: grid; place-items: center; border: 0; background: none; cursor: pointer; color: #334155; }
.zoomctl button + button { border-top: 1px solid var(--line); }
.zoomctl button:hover { background: #f1f5f9; }
.sheet-mode ~ .zoomctl { bottom: 60px; }

/* menu "mais" (celular) */
.moremenu { position: absolute; right: 8px; top: 54px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 16px 40px rgba(15,23,42,.18); padding: 6px; z-index: 60; min-width: 230px; display: flex; flex-direction: column; }
.moremenu[hidden] { display: none !important; }
.moremenu button, .moremenu .mm-lang { display: flex; align-items: center; gap: 12px; padding: 12px; border: 0; background: none; border-radius: 10px; font-size: 15px; font-weight: 600; color: var(--ink); cursor: pointer; text-align: left; }
.moremenu button:hover { background: #f1f5f9; }
.moremenu .mm-lang select { flex: 1; height: 40px; }
.topbar { position: sticky; }

/* chip de folha (celular) */
.pagechip { position: absolute; left: 10px; top: 10px; z-index: 4; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 22px; border: 1px solid var(--line); background: rgba(255,255,255,.96); box-shadow: var(--shadow); font: inherit; font-size: 13.5px; font-weight: 700; color: #1e293b; cursor: pointer; }
.pagechip .ic { width: 16px; height: 16px; }

/* lista de circuitos */
.crail { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 14px 0 6px; padding: 8px 10px; border-radius: 10px; background: #f8fafc; border: 1px solid var(--line); }
.crail:first-of-type { margin-top: 4px; }
.crail.on { border-color: var(--brand); background: var(--soft); }
.crail .linklike { display: flex; align-items: baseline; gap: 8px; font-size: 14px; }
.crail small { color: var(--muted); font-weight: 600; }
.clist { display: flex; flex-direction: column; gap: 6px; }
.citem { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 8px; border: 1px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; min-height: 56px; }
.citem:hover { border-color: #93c5fd; }
.citem.on { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(37,99,235,.15); }
.cthumb { flex: none; width: 34px; display: flex; justify-content: center; }
.cthumb .thumb { height: 44px !important; width: auto !important; }
.ctxt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ctxt b { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ctxt small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cwarn { color: #dc2626; flex: none; }
.cmoves { display: flex; flex-direction: column; flex: none; }
.cmoves .btn.icon.sm { width: 34px; height: 26px; }
.cmoves .btn[disabled] { opacity: .3; }
.cempty { padding: 8px 4px; }

/* inspetor: ações */
.insp-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.insp-actions .btn { width: 100%; height: 40px; }

/* campos maiores e sem zoom automático no iPhone */
@media (pointer: coarse) {
  input, select, textarea { font-size: 16px !important; }
  .fld input, .fld select { height: 44px; }
  .btn { min-height: 40px; }
  .tbl input.cell, .tbl input.price, .kv input.cell { font-size: 16px !important; }
}

@media (max-width: 900px) {
  .topbar { height: 56px; padding-top: env(safe-area-inset-top, 0px); }
  .ed-top { gap: 2px; }
  .ed-top .btn.icon { width: 40px; height: 40px; }
  .ed-top .pdfbtn { height: 40px; padding: 0 12px; }
  .ed { height: calc(100vh - 56px - 64px); height: calc(100dvh - 56px - 64px - env(safe-area-inset-bottom, 0px)); }
  .pagetabs { display: none; }
  .zoomctl { right: 10px; bottom: 12px; }
  .mobnav { height: calc(64px + env(safe-area-inset-bottom, 0px)); padding-bottom: env(safe-area-inset-bottom, 0px); }
  .mobnav button { gap: 3px; min-height: 56px; }
  .mobnav button .ic { width: 22px; height: 22px; }
  .mobnav button.on { color: var(--brand); }
  .mobnav button.on .ic { stroke-width: 2.4; }
  .side { bottom: calc(64px + env(safe-area-inset-bottom, 0px)); height: 66vh; height: 66dvh; }
  .insp { bottom: calc(64px + env(safe-area-inset-bottom, 0px)); max-height: 56vh; max-height: 56dvh; }
  .ed.insp-open .canvas.board-mode { padding-bottom: 58vh; }
  .grab { display: flex !important; width: 100%; height: 22px; border: 0; background: none; padding: 0; }
  .tabs button { padding: 13px 2px 11px; font-size: 13px; }
  .side-body { padding: 12px 14px 24px; }
  #toast { bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }
  .libgrid { grid-template-columns: repeat(3, 1fr); }
  .libitem { min-height: 118px; }
  .insp-head { position: sticky; top: 0; background: #fff; z-index: 2; }
}
@media (min-width: 901px) {
  .side .tabs button { font-size: 13px; padding: 14px 2px 12px; }
}
.pagetabs { scrollbar-width: none; }
.pagetabs::-webkit-scrollbar { display: none; }
.pagetabs button { padding: 7px 10px; font-size: 12.5px; }
.board-holder { padding: 0; }

/* Mãozinha (arrastar o quadro, como no Photoshop) */
.zoomctl button.on { background: var(--brand, #2563eb); color: #fff; }
.zoomctl button.on:hover { background: var(--brand, #2563eb); }
.canvas.hand { cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
.canvas.hand .dev, .canvas.hand svg * { cursor: grab !important; }
.canvas.panning, .canvas.panning .dev, .canvas.panning svg * { cursor: grabbing !important; }
.insp-actions .btn{min-width:0;white-space:normal;height:auto;min-height:40px;line-height:1.2}

/* ===== Simulador eletrico ===== */
#simui { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); z-index: 5; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; width: max-content; max-width: calc(100% - 24px); }
#simui > * { pointer-events: auto; }
.simbtn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #f59e0b; background: #fffbeb; color: #92400e; font: 700 13px Inter, sans-serif; padding: 8px 14px; border-radius: 11px; cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,.08); white-space: nowrap; }
.simbtn:hover { background: #fef3c7; }
.simbtn.on { background: linear-gradient(135deg, #f59e0b, #ea580c); color: #fff; border-color: transparent; box-shadow: 0 0 0 3px rgba(245,158,11,.25), 0 6px 18px rgba(234,88,12,.35); }
.simbtn .bolt { font-size: 15px; }
.simbar { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; justify-content: center; background: rgba(17,24,39,.9); color: #e5e7eb; border: 1px solid rgba(250,204,21,.4); padding: 8px 14px; border-radius: 12px; font-size: 12.5px; max-width: 560px; }
.simbar b { color: #fde047; }
.simbar small { color: #9ca3af; width: 100%; text-align: center; }
.simbar .dot { width: 9px; height: 9px; border-radius: 50%; background: #22c55e; animation: simpulse 1.4s infinite; }
.simbar .dot.off { background: #ef4444; animation: none; }
.simbtns { display: flex; gap: 6px; }
.simbtns .btn { height: 28px; padding: 0 10px; font-size: 12px; }
@keyframes simpulse { 0% { box-shadow: 0 0 0 0 rgba(34,197,94,.7); } 70% { box-shadow: 0 0 0 8px rgba(34,197,94,0); } 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); } }
.board-svg.is-live .flow line { animation: simflow .55s linear infinite; }
@keyframes simflow { to { stroke-dashoffset: -6.6; } }
.board-svg.is-live .dev.tog { cursor: pointer; }
.board-svg.is-live .dev:not(.tog) { cursor: default; }
.board-svg.is-live .led-on { filter: drop-shadow(0 0 2px #facc15); }
@media (max-width: 600px) { .simbtn { padding: 7px 10px; font-size: 12px; } .simbar { font-size: 11.5px; padding: 6px 10px; } .simbar small { display: none; } }
@media (prefers-reduced-motion: reduce) { .board-svg.is-live .flow line { animation: none; } }
.canvas.board-mode { padding-top: 58px; } .canvas.board-mode.simon { padding-top: 128px; }
.simbtns .btn { background: #fff; color: #111827; border: 1px solid #d1d5db; opacity: 1; } .simbtns .btn:hover { background: #fef3c7; }
@media (max-width: 899px) { #simui { top: 58px; } .canvas.board-mode { padding-top: 112px; } .canvas.board-mode.simon { padding-top: 180px; } }

/* ---------- Voltis Voz ---------- */
.vozcard { width: 100%; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px; text-align: left; font: inherit; color: #fff; cursor: pointer;
  padding: 14px 20px 14px 14px; margin: 0 0 24px; border: 1px solid #f59e0b; border-radius: 16px; background: radial-gradient(120% 140% at 0% 0%, #3b2a05 0%, #111827 45%, #0b1220 100%);
  box-shadow: 0 10px 28px -12px rgba(245,158,11,.55); transition: transform .15s, box-shadow .15s; }
.vozcard:hover { transform: translateY(-1px); box-shadow: 0 14px 32px -12px rgba(245,158,11,.75); }
.vozcard:focus-visible { outline: 3px solid #fde68a; outline-offset: 2px; }
.vz-ic { position: relative; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; color: #111827; background: linear-gradient(135deg, #fde047, #f59e0b); flex: none; }
.vz-ic::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid rgba(250,204,21,.55); animation: vzring 1.8s ease-out infinite; }
@keyframes vzring { from { transform: scale(.9); opacity: 1; } to { transform: scale(1.25); opacity: 0; } }
.vz-tx { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.vz-tag { font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #fcd34d; }
.vz-tx b { font-size: 19px; line-height: 1.22; font-weight: 800; }
.vz-tx small { font-size: 13.5px; line-height: 1.35; color: #cbd5e1; }
.vz-go { display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 18px; border-radius: 11px; background: #facc15; color: #111827; font-size: 15px; font-weight: 800; white-space: nowrap; }
.vozcard.on .vz-go { background: #fff; }
@media (max-width: 820px) {
  .vozcard { grid-template-columns: auto 1fr; gap: 12px 14px; padding: 14px; }
  .vz-ic { width: 54px; height: 54px; }
  .vz-tx b { font-size: 17px; }
  .vz-go { grid-column: 1 / -1; justify-content: center; }
}

#modal[data-kind="voz"] { padding: 10px; }
.vozmodal { max-width: 560px; overflow: hidden; background: #0b1220; color: #e5e7eb; }
#vz-root { display: flex; flex-direction: column; min-height: 0; max-height: calc(100dvh - 20px); }
.vz-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 6px; flex: none; }
.vz-brand { display: flex; align-items: center; gap: 7px; color: #facc15; }
.vz-brand b { color: #fff; font-size: 16px; font-weight: 800; }
.vz-brand span { font-size: 12px; font-weight: 700; color: #86efac; background: rgba(34,197,94,.14); padding: 3px 8px; border-radius: 20px; }
.vz-x { width: 36px; height: 36px; border: 0; border-radius: 50%; background: rgba(255,255,255,.08); color: #fff; cursor: pointer; font-size: 15px; }
.vz-body { padding: 4px 18px 20px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.vz-h { font-size: 26px; line-height: 1.15; font-weight: 800; text-align: center; color: #fff; margin: 6px 0 18px; }
.vz-h em { font-style: normal; color: #facc15; }
.vz-mic { position: relative; display: grid; place-items: center; width: 108px; height: 108px; margin: 0 auto; border: 0; border-radius: 50%; cursor: pointer; color: #111827;
  background: linear-gradient(135deg, #fde047, #f59e0b); box-shadow: 0 14px 40px -10px rgba(245,158,11,.8); transition: transform .1s; }
.vz-mic:active { transform: scale(.96); }
.vz-mic i { position: absolute; inset: -10px; border-radius: 50%; border: 3px solid rgba(250,204,21,.5); opacity: 0; }
.vz-mic.on { background: linear-gradient(135deg, #f87171, #dc2626); color: #fff; box-shadow: 0 14px 40px -10px rgba(220,38,38,.9); }
.vz-mic.on i { animation: vzring 1.2s ease-out infinite; border-color: rgba(248,113,113,.7); }
.vz-micl { text-align: center; font-size: 14px; font-weight: 600; color: #cbd5e1; margin: 12px 0 14px; }
#vz-text { width: 100%; resize: vertical; min-height: 84px; padding: 12px 14px; border-radius: 12px; border: 1px solid #334155; background: #111a2e; color: #fff; font-size: 15.5px; line-height: 1.45; }
#vz-text:focus { outline: 2px solid #facc15; border-color: transparent; }
.vz-ex { display: block; width: 100%; text-align: left; margin: 8px 0 14px; padding: 8px 10px; border: 1px dashed #334155; border-radius: 10px; background: none; color: #94a3b8; font-size: 12.5px; cursor: pointer; }
.vz-ex span { color: #cbd5e1; }
.vz-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.vz-fld { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.vz-fld.full { margin-bottom: 14px; }
.vz-fld span { font-size: 12px; font-weight: 700; color: #94a3b8; text-transform: uppercase; letter-spacing: .05em; }
.vz-fld select, .vz-fld input { height: 42px; width: 100%; padding: 0 10px; border-radius: 10px; border: 1px solid #334155; background: #111a2e; color: #fff; font-size: 14.5px; }
.vz-build { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 54px; border: 0; border-radius: 13px; cursor: pointer;
  background: #facc15; color: #111827; font-size: 17px; font-weight: 800; box-shadow: 0 10px 26px -10px rgba(250,204,21,.8); }
.vz-build:hover { background: #fde047; }
.vz-build svg { width: 20px; height: 20px; }
.vz-note { text-align: center; font-size: 12.5px; color: #64748b; margin: 10px 0 0; }
.vz-load { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 340px; gap: 16px; }
.vz-spin { width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; color: #facc15; border: 4px solid #1e293b; border-top-color: #facc15; animation: vzspin .8s linear infinite; }
.vz-spin svg { width: 34px; height: 34px; animation: vzspin .8s linear infinite reverse; }
@keyframes vzspin { to { transform: rotate(360deg); } }
#vz-step { font-size: 16px; font-weight: 700; color: #fff; }
.vz-ok { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: rgba(34,197,94,.12); border: 1px solid rgba(34,197,94,.35); color: #86efac; margin-bottom: 14px; }
.vz-ok svg { flex: none; width: 22px; height: 22px; }
.vz-ok b { display: block; color: #fff; font-size: 15px; }
.vz-ok small { color: #a7f3d0; font-size: 12.5px; }
.vz-lbl { display: flex; justify-content: space-between; align-items: center; font-size: 12px; font-weight: 700; color: #94a3b8; text-transform: uppercase; letter-spacing: .05em; margin: 0 0 8px; }
.vz-link { border: 0; background: none; padding: 4px 0; cursor: pointer; color: #facc15; text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 700; text-decoration: underline; }
.vz-fld.wide { grid-column: 1 / -1; }
.vz-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.vz-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 4px 4px 10px; border-radius: 20px; background: #1e293b; border: 1px solid #334155; font-size: 13px; color: #e2e8f0; }
.vz-chip b { font-weight: 600; }
.vz-chip select { height: 26px; border: 0; border-radius: 14px; background: #0f172a; color: #facc15; font-size: 12.5px; font-weight: 700; padding: 0 4px; }
.vz-q { display: inline-flex; align-items: center; background: #0f172a; border-radius: 16px; }
.vz-q button { width: 28px; height: 26px; border: 0; background: none; color: #facc15; font-size: 16px; font-weight: 800; cursor: pointer; }
.vz-q i { font-style: normal; font-weight: 800; min-width: 14px; text-align: center; color: #fff; }
.vz-chip.tog { cursor: pointer; padding: 6px 10px; font: inherit; font-size: 13px; color: #94a3b8; border-style: dashed; }
.vz-chip.tog.on { color: #fde68a; border-style: solid; border-color: #a16207; }
.vz-add select { height: 34px; border-radius: 20px; border: 1px dashed #475569; background: none; color: #facc15; font-size: 13px; font-weight: 700; padding: 0 10px; }
.vz-add select option, .vz-chip select option { color: #111; }
.vz-board { position: relative; display: block; width: 100%; padding: 10px; border: 0; border-radius: 14px; background: #fff; cursor: pointer; margin-bottom: 12px; }
.vz-board svg { display: block; width: 100%; height: auto; max-height: 300px; }
.vz-board span { position: absolute; right: 10px; bottom: 10px; font-size: 11.5px; font-weight: 700; color: #fff; background: rgba(15,23,42,.8); padding: 4px 9px; border-radius: 20px; }
.vz-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 12px; }
.vz-stats div { background: #111a2e; border: 1px solid #1e293b; border-radius: 10px; padding: 8px 6px; text-align: center; }
.vz-stats b { display: block; font-size: 19px; color: #fff; font-weight: 800; }
.vz-stats small { font-size: 11px; color: #94a3b8; }
.vz-res .vz-row { grid-template-columns: 1fr 1fr; }
.vz-mini { font-size: 12px; color: #94a3b8; margin: 0 0 12px; line-height: 1.4; }
.vz-quote { border-radius: 14px; background: #fff; color: #0f172a; padding: 14px; margin: 6px 0 14px; }
.vz-qh { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.vz-qh b { font-size: 17px; font-weight: 800; }
.vz-qh span { font-size: 12.5px; color: #64748b; font-weight: 600; }
.vz-ql, .vz-lab summary, .vz-qt { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid #e2e8f0; font-size: 15px; }
.vz-lab summary { cursor: pointer; list-style: none; }
.vz-lab summary::-webkit-details-marker { display: none; }
.vz-lab summary span::after { content: " \25BE"; color: #2563eb; font-size: 12px; }
.vz-lab[open] summary span::after { content: " \25B4"; }
.vz-lab table { width: 100%; border-collapse: collapse; margin: 6px 0; }
.vz-lab td { padding: 5px 0; font-size: 13px; vertical-align: middle; border-bottom: 1px dashed #e2e8f0; }
.vz-lab td em { font-style: normal; color: #64748b; }
.vz-lab td:last-child { width: 96px; text-align: right; }
.vz-lab input { width: 90px; height: 32px; text-align: right; border: 1px solid #cbd5e1; border-radius: 8px; padding: 0 8px; font-size: 13.5px; }
.vz-sw { display: flex; align-items: center; gap: 8px; font-size: 13px; margin: 6px 0; cursor: pointer; }
.vz-sw input { width: 18px; height: 18px; accent-color: #2563eb; }
.vz-lab .vz-mini { color: #64748b; margin: 6px 0 4px; }
.vz-qt { border-bottom: 0; font-size: 16px; font-weight: 800; }
.vz-qt b { font-size: 26px; color: #15803d; letter-spacing: -.02em; }
.vz-quote > .vz-mini { color: #64748b; margin: 2px 0 0; }
.vz-acts { display: grid; gap: 8px; }
.vz-acts svg { width: 20px; height: 20px; }
.vz-wa { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; border: 0; border-radius: 13px; background: #16a34a; color: #fff; font-size: 15.5px; font-weight: 800; cursor: pointer; }
.vz-wa:hover { background: #15803d; }
.vz-again { min-height: 42px; border: 1px solid #334155; border-radius: 12px; background: none; color: #cbd5e1; font-size: 14px; font-weight: 700; cursor: pointer; }
@media (max-width: 600px) {
  #modal[data-kind="voz"] { padding: 0; align-items: stretch; }
  .vozmodal { max-width: none; max-height: none; height: 100%; border-radius: 0; }
  #vz-root { max-height: 100dvh; height: 100%; }
  .vz-stats b { font-size: 17px; }
}
.vzo-media { background: #0b1220; }
.vzo-media video { display: block; width: 100%; height: 100%; object-fit: contain; }

/* Folha de orçamento */
.quote { font-size: 11px; display: flex; flex-direction: column; gap: 2.5mm; }
.quote h3 { font-size: 12.5px; margin: 2mm 0 0; }
.q-top { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3mm; padding: 3mm; border: 1px solid #cbd5e1; border-radius: 2mm; }
.q-top small { display: block; color: #64748b; font-size: 9px; text-transform: uppercase; letter-spacing: .04em; }
.q-top b { font-size: 11.5px; }
.q-total { display: flex; justify-content: space-between; align-items: center; padding: 3mm 4mm; border-radius: 2mm; background: #0f172a; color: #fff; font-size: 13px; font-weight: 700; }
.q-total b { font-size: 18px; color: #facc15; }
.q-cond { margin: 0; padding-left: 5mm; line-height: 1.6; color: #334155; }
.q-cols { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 6mm; align-items: start; }
.q-l, .q-r { display: flex; flex-direction: column; gap: 2.5mm; min-width: 0; }
.q-r { padding-top: 6mm; }
.q-sum { display: grid; gap: 1.5mm; padding: 3mm 4mm; border: 1px solid #cbd5e1; border-radius: 2mm; }
.q-sum div { display: flex; justify-content: space-between; font-size: 11.5px; }
.quote .signs { grid-template-columns: 1fr; gap: 10mm; margin: 8mm 0 0; }
.quote tfoot small { font-weight: 400; color: #64748b; }
