/* ===== MestreCorte — estilos ===== */
:root {
  --bg: #f4f2ee;
  --surface: #ffffff;
  --surface-2: #f8f7f4;
  --surface-3: #efece6;
  --border: #e3ded5;
  --border-strong: #cfc7ba;
  --text: #1f1c18;
  --text-2: #5e574d;
  --text-3: #8d857a;
  --accent: #c2611f;
  --accent-hover: #a9521a;
  --accent-soft: #fbeadc;
  --accent-text: #9a4a14;
  --ok: #2f8a4f;
  --ok-soft: #e2f3e7;
  --warn: #b7791f;
  --warn-soft: #fcf1dc;
  --danger: #c23b30;
  --danger-soft: #fbe4e1;
  --info: #2f6db5;
  --info-soft: #e1ecf8;
  --sheet: #efe2cb;
  --sheet-trim: #d9c7a6;
  --waste: #e7dcc8;
  --piece-stroke: #3a3128;
  --shadow-sm: 0 1px 2px rgba(40, 30, 20, .06);
  --shadow: 0 1px 3px rgba(40, 30, 20, .08), 0 6px 18px rgba(40, 30, 20, .06);
  --shadow-lg: 0 20px 50px rgba(30, 20, 10, .22);
  --radius: 12px;
  --radius-sm: 8px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --sidebar: 232px;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #15130f;
  --surface: #1e1b17;
  --surface-2: #24211c;
  --surface-3: #2c2822;
  --border: #36312a;
  --border-strong: #4a4339;
  --text: #f1ece4;
  --text-2: #bcb3a6;
  --text-3: #8a8175;
  --accent: #e07a33;
  --accent-hover: #f08b45;
  --accent-soft: #3a2616;
  --accent-text: #f3a066;
  --ok: #4fbf74;
  --ok-soft: #1c3324;
  --warn: #e0a43d;
  --warn-soft: #3a2d15;
  --danger: #ef6a5f;
  --danger-soft: #3d1f1c;
  --info: #6aa5ec;
  --info-soft: #1a2a3d;
  --sheet: #4a3e2e;
  --sheet-trim: #5c4d38;
  --waste: #3d3327;
  --piece-stroke: #120f0b;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow: 0 1px 3px rgba(0, 0, 0, .35), 0 6px 18px rgba(0, 0, 0, .25);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 14px; color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased; line-height: 1.45;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent-text); }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -.01em; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
[hidden] { display: none !important; }

/* ===== Layout ===== */
.app { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 4px;
  padding: 18px 12px; background: var(--surface); border-right: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), #8a3d0f); color: #fff; box-shadow: var(--shadow-sm);
}
.brand-name { font-weight: 800; font-size: 17px; letter-spacing: -.02em; }
.brand-sub { font-size: 11px; color: var(--text-3); }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--radius-sm);
  color: var(--text-2); text-decoration: none; font-weight: 500; border: 0; background: none; cursor: pointer; text-align: left; width: 100%;
}
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active { background: var(--accent-soft); color: var(--accent-text); font-weight: 600; }
.nav-item svg { width: 18px; height: 18px; flex: none; }
.nav-sep { height: 1px; background: var(--border); margin: 10px 6px; }
.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 4px; }
.storage-note { font-size: 11px; color: var(--text-3); padding: 6px 12px; }

.main { min-width: 0; padding: 26px 32px 60px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-title { font-size: 24px; font-weight: 750; }
.page-sub { color: var(--text-2); margin-top: 4px; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.crumb { font-size: 13px; color: var(--text-3); display: flex; gap: 6px; align-items: center; margin-bottom: 6px; }
.crumb a { color: var(--text-2); text-decoration: none; }
.crumb a:hover { color: var(--accent-text); }

/* ===== Botões ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px;
  border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--surface);
  font-weight: 550; cursor: pointer; white-space: nowrap; transition: background .12s, border-color .12s, transform .06s;
}
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 16px; height: 16px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--surface-3); }
.btn.danger { color: var(--danger); }
.btn.danger:hover { background: var(--danger-soft); border-color: var(--danger); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; }
.btn.icon { width: 32px; height: 32px; padding: 0; }
.btn.icon.sm { width: 28px; height: 28px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ===== Cartões ===== */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-pad { padding: 18px 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.card-title { font-size: 15px; font-weight: 700; }
.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid.cards { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }

/* ===== Projetos ===== */
.proj-card { padding: 18px; display: flex; flex-direction: column; gap: 12px; cursor: pointer; transition: border-color .12s, box-shadow .12s, transform .12s; }
.proj-card:hover { border-color: var(--accent); box-shadow: var(--shadow); transform: translateY(-1px); }
.proj-card h3 { font-size: 16px; }
.proj-meta { display: flex; gap: 14px; color: var(--text-2); font-size: 13px; flex-wrap: wrap; }
.proj-meta b { color: var(--text); font-weight: 650; }
.proj-actions { display: flex; gap: 4px; margin-top: auto; justify-content: flex-end; }
.proj-new { border: 2px dashed var(--border-strong); background: transparent; display: grid; place-items: center; min-height: 160px; color: var(--text-2); font-weight: 600; box-shadow: none; }
.proj-new:hover { color: var(--accent-text); border-color: var(--accent); }
.proj-new svg { width: 30px; height: 30px; margin-bottom: 6px; }
.search { position: relative; }
.search input { padding-left: 34px; width: 260px; }
.search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 16px; color: var(--text-3); }

/* ===== Formulários ===== */
.input, .select, textarea.input {
  height: 36px; padding: 0 10px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong);
  background: var(--surface); outline: none; min-width: 0; transition: border-color .12s, box-shadow .12s;
}
textarea.input { height: auto; padding: 10px; resize: vertical; }
.input:focus, .select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field { display: flex; flex-direction: column; gap: 5px; }
.field label, .label { font-size: 12px; font-weight: 600; color: var(--text-2); }
.field .hint { font-size: 12px; color: var(--text-3); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.check input { width: 16px; height: 16px; accent-color: var(--accent); }
.seg { display: inline-flex; background: var(--surface-3); border-radius: var(--radius-sm); padding: 3px; gap: 2px; }
.seg button { border: 0; background: none; padding: 6px 12px; border-radius: 6px; cursor: pointer; font-weight: 550; color: var(--text-2); }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

/* ===== Abas ===== */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 20px; overflow-x: auto; }
.tab {
  border: 0; background: none; padding: 10px 16px; font-weight: 600; color: var(--text-2); cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px; display: inline-flex; gap: 8px; align-items: center; white-space: nowrap;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--accent-text); border-bottom-color: var(--accent); }
.tab .count { background: var(--surface-3); color: var(--text-2); border-radius: 10px; padding: 0 7px; font-size: 12px; }

/* ===== Tabelas ===== */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; }
.tbl th {
  text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-3);
  font-weight: 650; padding: 10px 8px; border-bottom: 1px solid var(--border); background: var(--surface-2); white-space: nowrap;
}
.tbl td { padding: 5px 8px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover { background: var(--surface-2); }
.tbl .input, .tbl .select { height: 32px; width: 100%; border-color: transparent; background: transparent; }
.tbl .input:hover, .tbl .select:hover { border-color: var(--border); }
.tbl .input:focus, .tbl .select:focus { background: var(--surface); border-color: var(--accent); }
.tbl .input.err { border-color: var(--danger); background: var(--danger-soft); }
.tbl .idx { color: var(--text-3); font-size: 12px; width: 34px; text-align: right; font-variant-numeric: tabular-nums; }
.tbl .w-qty { width: 70px; } .tbl .w-dim { width: 100px; } .tbl .w-mat { min-width: 170px; } .tbl .w-name { min-width: 170px; }
.tbl .r { text-align: right; }
.tbl td.actions { white-space: nowrap; text-align: right; width: 72px; }
.tbl .row-warn td { background: var(--warn-soft); }
.tbl-foot { display: flex; gap: 22px; padding: 12px 18px; border-top: 1px solid var(--border); color: var(--text-2); flex-wrap: wrap; font-size: 13px; }
.tbl-foot b { color: var(--text); }
.empty { padding: 44px 20px; text-align: center; color: var(--text-2); }
.empty svg { width: 46px; height: 46px; color: var(--text-3); margin-bottom: 10px; }
.empty h3 { color: var(--text); font-size: 16px; margin-bottom: 6px; }

/* toolbar das peças */
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.tool-group { display: flex; align-items: center; gap: 8px; padding: 0 4px; }
.tool-group .label { white-space: nowrap; }
.band-dot { width: 12px; height: 12px; border-radius: 3px; display: inline-block; border: 1px solid rgba(0,0,0,.15); vertical-align: -1px; }

/* widget de fita */
.edge-w { cursor: pointer; display: block; }
.edge-w .side { stroke-linecap: round; transition: stroke .1s; }
.edge-w .side:hover { stroke: var(--accent) !important; }
.edge-w .center:hover { fill: var(--accent-soft); }
.grain-btn { border: 1px solid var(--border); background: var(--surface); border-radius: 6px; width: 34px; height: 28px; cursor: pointer; display: grid; place-items: center; color: var(--text-3); }
.grain-btn.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-text); }
.grain-btn:disabled { opacity: .35; cursor: default; }
.grain-btn svg { width: 18px; height: 18px; }

/* ===== Badges / avisos ===== */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 20px; font-size: 12px; font-weight: 600; background: var(--surface-3); color: var(--text-2); }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.danger { background: var(--danger-soft); color: var(--danger); }
.badge.accent { background: var(--accent-soft); color: var(--accent-text); }
.alert { display: flex; gap: 10px; padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid; align-items: flex-start; }
.alert svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.alert.warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 40%, transparent); color: var(--text); }
.alert.danger { background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 40%, transparent); }
.alert.info { background: var(--info-soft); border-color: color-mix(in srgb, var(--info) 35%, transparent); }

/* ===== Estatísticas ===== */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.stat .k { font-size: 12px; color: var(--text-2); font-weight: 600; }
.stat .v { font-size: 24px; font-weight: 750; margin-top: 4px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat .s { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.meter { height: 6px; background: var(--surface-3); border-radius: 4px; overflow: hidden; margin-top: 8px; }
.meter > i { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.meter.ok > i { background: var(--ok); }

/* ===== Plano ===== */
.plan-layout { display: grid; grid-template-columns: 280px 1fr; gap: 20px; align-items: start; }
.plan-side { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 14px; }
.plan-side .card-pad { display: flex; flex-direction: column; gap: 14px; }
.mat-section { display: flex; flex-direction: column; gap: 14px; margin-bottom: 30px; }
.mat-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.mat-head h3 { font-size: 17px; }
.mat-swatch { width: 16px; height: 16px; border-radius: 50%; box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--border-strong); }
.sheet-card { overflow: hidden; }
.sheet-head { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.sheet-head h4 { font-size: 14px; }
.sheet-body { padding: 14px 16px; background: var(--surface-2); }
.sheet-svg { width: 100%; height: auto; max-height: 76vh; display: block; margin: 0 auto; }
.doc .sheet-svg { max-height: none; }
.sheet-svg text { font-family: var(--font); pointer-events: none; }
.sheet-svg .pc { cursor: default; }
.workshop .sheet-svg .pc { cursor: pointer; }
.sheet-svg .pc:hover rect.body { filter: brightness(1.06); stroke-width: 6; }
.sheet-svg .pc.hl rect.body { stroke: var(--accent); stroke-width: 10; }
.sheet-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--text-2); padding: 10px 16px; border-top: 1px solid var(--border); }
.legend-sw { width: 12px; height: 12px; display: inline-block; border-radius: 3px; vertical-align: -2px; margin-right: 4px; border: 1px solid rgba(0,0,0,.15); }
.cut-list { font-size: 12.5px; columns: 3 200px; column-gap: 24px; padding: 12px 16px; border-top: 1px solid var(--border); }
.cut-list div { break-inside: avoid; padding: 2px 0; }
.progress-big { height: 10px; background: var(--surface-3); border-radius: 6px; overflow: hidden; }
.progress-big i { display: block; height: 100%; background: var(--ok); transition: width .25s; }

/* ===== Orçamento ===== */
.quote-table td, .quote-table th { padding: 9px 10px; }
.quote-total { display: flex; justify-content: space-between; align-items: baseline; padding: 18px 20px; border-top: 2px solid var(--text); font-size: 15px; }
.quote-total .v { font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.sum-line { display: flex; justify-content: space-between; padding: 8px 20px; border-bottom: 1px dashed var(--border); }
.sum-line:last-child { border-bottom: 0; }

/* ===== Modal ===== */
.modal-back { position: fixed; inset: 0; background: rgba(20, 14, 8, .45); display: grid; place-items: center; z-index: 50; padding: 20px; animation: fade .15s; backdrop-filter: blur(2px); }
.modal { background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-lg); width: min(640px, 100%); max-height: calc(100vh - 40px); display: flex; flex-direction: column; animation: pop .18s; }
.modal.wide { width: min(900px, 100%); }
.modal-head { padding: 18px 22px 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.modal-head h2 { font-size: 18px; }
.modal-body { padding: 6px 22px 18px; overflow: auto; }
.modal-foot { padding: 14px 22px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }

/* ===== Toast ===== */
.toasts { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 60; }
.toast { background: var(--text); color: var(--bg); padding: 11px 16px; border-radius: 10px; box-shadow: var(--shadow-lg); font-weight: 550; animation: pop .2s; display: flex; gap: 10px; align-items: center; max-width: 380px; }
.toast.ok::before { content: "✓"; color: #7be29a; font-weight: 800; }
.toast.err::before { content: "!"; color: #ff8a80; font-weight: 800; }

/* ===== Módulos ===== */
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin-bottom: 18px; }
.tpl { border: 1.5px solid var(--border); border-radius: var(--radius); padding: 12px; cursor: pointer; background: var(--surface); text-align: left; display: flex; flex-direction: column; gap: 6px; }
.tpl:hover { border-color: var(--border-strong); }
.tpl.on { border-color: var(--accent); background: var(--accent-soft); }
.tpl svg { width: 40px; height: 40px; color: var(--accent-text); }
.tpl b { font-size: 14px; }
.tpl span { font-size: 12px; color: var(--text-2); }
.preview-list { font-size: 13px; border: 1px solid var(--border); border-radius: var(--radius-sm); margin-top: 16px; max-height: 240px; overflow: auto; }

/* ===== Impressão (pré-visualização) ===== */
.print-opts { display: flex; gap: 18px; flex-wrap: wrap; }
.paper { background: #fff; color: #111; width: 100%; max-width: 820px; margin: 0 auto; padding: 32px 36px; box-shadow: var(--shadow); border-radius: 4px; }
.paper + .paper { margin-top: 20px; }
#print-root { display: none; }

.doc { color: #111; font-size: 11.5px; --text: #111; --text-2: #555; --text-3: #777; --sheet: #f1e6d2; --sheet-trim: #dccaa8; --waste: #ebe1cf; --piece-stroke: #2d261e; }
.doc h1 { font-size: 20px; }
.doc h2 { font-size: 14px; margin: 16px 0 8px; }
.doc-head { display: flex; justify-content: space-between; gap: 20px; border-bottom: 2px solid #111; padding-bottom: 10px; margin-bottom: 12px; align-items: flex-end; }
.doc-head img { max-height: 54px; max-width: 160px; }
.doc table { width: 100%; border-collapse: collapse; }
.doc th, .doc td { border-bottom: 1px solid #ddd; padding: 4px 6px; text-align: left; }
.doc th { background: #f3f3f3; font-size: 10px; text-transform: uppercase; }
.doc .r { text-align: right; }
.doc .sheet-svg { border: 1px solid #ccc; }
.doc .sheet-block { break-inside: avoid; page-break-inside: avoid; margin-bottom: 16px; }
.doc .kv { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px 14px; margin-bottom: 10px; }
.doc .kv div span { display: block; color: #666; font-size: 10px; }
.doc .total-box { margin-top: 12px; border: 2px solid #111; padding: 10px 14px; display: flex; justify-content: space-between; font-size: 15px; font-weight: 800; }
.doc .terms { margin-top: 18px; color: #333; white-space: pre-wrap; }
.doc .sign { margin-top: 50px; display: flex; gap: 60px; }
.doc .sign div { flex: 1; border-top: 1px solid #111; padding-top: 4px; text-align: center; }
.labels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }
.label-card { border: 1px dashed #bbb; height: 37mm; padding: 2.5mm 3mm; display: flex; gap: 2.5mm; overflow: hidden; break-inside: avoid; }
.label-card .l-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.label-card .l-name { font-weight: 800; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.label-card .l-dim { font-size: 15px; font-weight: 800; font-family: var(--mono); }
.label-card .l-sm { font-size: 9px; color: #444; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.label-card .l-id { font-size: 9px; font-weight: 700; background: #111; color: #fff; padding: 0 4px; border-radius: 2px; align-self: flex-start; }
.label-card svg { flex: none; }
.page-break { break-after: page; page-break-after: always; }

@media print {
  @page { size: A4; margin: 10mm; }
  body { background: #fff; }
  .app, .modal-back, .toasts { display: none !important; }
  #print-root { display: block !important; }
  .doc { font-size: 10.5px; }
  .doc .sheet-block:not(:first-of-type) { margin-top: 6px; }
}

/* ===== Responsivo ===== */
@media (max-width: 1100px) {
  .plan-layout { grid-template-columns: 1fr; }
  .plan-side { position: static; }
}
.nav-item .ns { display: none; }
.quote-grid { grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); align-items: start; }
.quote-sum { position: sticky; top: 16px; }
.quote-grid > * { min-width: 0; }

@media (max-width: 1000px) {
  .quote-grid { grid-template-columns: minmax(0, 1fr); }
  .quote-sum { position: static; }
}

/* ===== Projeto 3D ===== */
:root { --scene-floor: #ddd6c9; --scene-wall: #efebe4; }
[data-theme="dark"] { --scene-floor: #3a342c; --scene-wall: #2b2722; }
.doc { --scene-floor: #e4ded3; --scene-wall: #f3f0ea; }
.scene3d { width: 100%; height: auto; display: block; }
.scene-wrap { padding: 14px 18px; background: var(--surface-2); cursor: grab; touch-action: pan-y; user-select: none; }
.scene-wrap:active { cursor: grabbing; }
.scene-wrap .scene3d { max-height: 68vh; margin: 0 auto; }
.range { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); font-weight: 600; }
.range input { width: 130px; accent-color: var(--accent); }
.range b { min-width: 34px; font-variant-numeric: tabular-nums; color: var(--text); }
.mod-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.mod-card { display: flex; flex-direction: column; overflow: hidden; }
.mod-card.sel { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.mod-thumb { background: var(--surface-2); padding: 10px; cursor: pointer; height: 170px; display: grid; place-items: center; border-bottom: 1px solid var(--border); }
.mod-thumb svg { max-height: 150px; width: 100%; }
.mod-info { padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.mat-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.mat-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--text-2); background: var(--surface-2); border: 1px solid var(--border); border-radius: 20px; padding: 2px 8px 2px 3px; }
.mat-chip svg { border-radius: 50% !important; }
.mod-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.mod-preview3d { position: sticky; top: 0; display: flex; flex-direction: column; gap: 10px; }
#mod-3d { background: var(--surface-2); border-radius: var(--radius-sm); padding: 10px; min-height: 180px; display: grid; place-items: center; }
#mod-3d svg { max-height: 300px; }
.mod-preview3d .preview-list { margin-top: 0; }
.proj-thumb { margin: -18px -18px 0; padding: 10px 14px; background: var(--surface-2); border-bottom: 1px solid var(--border); border-radius: var(--radius) var(--radius) 0 0; height: 150px; display: grid; place-items: center; }
.proj-thumb svg { max-height: 130px; }
.doc-scene { border: 1px solid #ddd; padding: 8px; margin: 6px 0 12px; break-inside: avoid; }
.doc-scene.small svg { max-height: 300px; }
.doc-scene svg { max-height: 520px; }
.swatch-pick { position: relative; display: inline-block; cursor: pointer; }
.swatch-pick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }

/* ===== Catálogo ===== */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--border-strong); background: var(--surface); border-radius: 20px; padding: 5px 11px; font-size: 12.5px; font-weight: 600; cursor: pointer; color: var(--text-2); }
.chip span { color: var(--text-3); font-weight: 500; }
.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip.on span { color: rgba(255,255,255,.8); }
.chip-check { display: inline-flex; cursor: pointer; }
.chip-check input { display: none; }
.chip-check span { border: 1px solid var(--border-strong); border-radius: 6px; padding: 4px 8px; font-size: 12.5px; font-weight: 650; min-width: 34px; text-align: center; }
.chip-check input:checked + span { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-text); }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; max-height: 52vh; overflow: auto; padding: 2px; }
.cat-fam { grid-column: 1 / -1; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); margin-top: 8px; }
.cat-item { position: relative; border: 1.5px solid var(--border); background: var(--surface); border-radius: 10px; padding: 8px; display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; text-align: center; }
.cat-item:hover { border-color: var(--border-strong); }
.cat-item.on { border-color: var(--accent); background: var(--accent-soft); }
.cat-name { font-size: 12px; font-weight: 600; line-height: 1.25; }
.cat-have { font-size: 10.5px; color: var(--ok); font-weight: 600; }
.cat-check { position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); color: #fff; display: none; place-items: center; }
.cat-check svg { width: 12px; height: 12px; }
.cat-item.on .cat-check { display: grid; }

/* ===== Documentação ===== */
.docs-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 20px; align-items: start; }
.docs-nav { position: sticky; top: 16px; padding: 8px; display: flex; flex-direction: column; gap: 2px; max-height: calc(100vh - 32px); overflow: auto; }
.docs-link { border: 0; background: none; text-align: left; padding: 8px 10px; border-radius: 6px; cursor: pointer; color: var(--text-2); font-weight: 550; }
.docs-link:hover { background: var(--surface-2); color: var(--accent-text); }
.docs-body { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.doc-sec { scroll-margin-top: 16px; line-height: 1.6; }
.doc-sec h2 { font-size: 19px; margin-bottom: 10px; }
.doc-sec h3 { font-size: 15px; margin: 16px 0 6px; }
.doc-sec p, .doc-sec li { color: var(--text-2); }
.doc-sec b { color: var(--text); }
.doc-sec ul, .doc-sec ol { padding-left: 22px; margin: 6px 0; }
.doc-sec pre { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; font-family: var(--mono); font-size: 12.5px; overflow-x: auto; }
.doc-sec code { font-family: var(--mono); font-size: 12.5px; background: var(--surface-3); padding: 1px 5px; border-radius: 4px; }
.doc-sec a { cursor: pointer; text-decoration: underline; }
.doc-table { width: 100%; border-collapse: collapse; margin: 8px 0; font-size: 13.5px; display: block; overflow-x: auto; }
.doc-table th, .doc-table td { border-bottom: 1px solid var(--border); padding: 7px 10px; text-align: left; vertical-align: top; }
.doc-table th { background: var(--surface-2); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-3); }
.doc-tip { margin-top: 12px; padding: 10px 14px; border-radius: 8px; background: var(--info-soft); color: var(--text); font-size: 13.5px; }
.doc-tip.warn { background: var(--warn-soft); }

@media (max-width: 1000px) {
  .mod-layout { grid-template-columns: 1fr; }
  .mod-preview3d { position: static; order: -1; }
  .docs-layout { grid-template-columns: 1fr; }
  .docs-nav { position: static; flex-direction: row; flex-wrap: wrap; max-height: none; }
}

/* ===== Celular / tablet ===== */
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  /* menu vira barra inferior, estilo aplicativo */
  .sidebar {
    position: fixed; top: auto; bottom: 0; left: 0; right: 0; z-index: 40; height: auto;
    flex-direction: row; justify-content: space-around; align-items: stretch; gap: 0;
    padding: 4px 2px calc(4px + env(safe-area-inset-bottom, 0px));
    border-right: 0; border-top: 1px solid var(--border); box-shadow: 0 -4px 16px rgba(0,0,0,.08);
  }
  .brand, .nav-sub, .sidebar-foot, .nav-sep, .storage-note { display: none !important; }
  .nav-item { flex: 1; flex-direction: column; gap: 3px; padding: 7px 2px; font-size: 10.5px; justify-content: center; text-align: center; border-radius: 10px; min-width: 0; }
  .nav-item svg { width: 21px; height: 21px; }
  .nav-item .nl { display: none; }
  .nav-item .ns { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .main { padding: 16px 14px calc(86px + env(safe-area-inset-bottom, 0px)); }
  .toasts { bottom: calc(80px + env(safe-area-inset-bottom, 0px)); left: 14px; right: 14px; }
  .toast { max-width: none; }

  .page-head { margin-bottom: 14px; }
  .page-title { font-size: 21px; }
  .head-actions { width: 100%; }
  .search { flex: 1 1 100%; }
  .search input { width: 100% !important; }
  .page-head .row .input { width: 100% !important; flex: 1 1 140px; }
  .tabs { margin-bottom: 14px; margin-left: -14px; margin-right: -14px; padding: 0 8px; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { padding: 10px 11px; font-size: 13.5px; }
  .toolbar { padding: 10px; }
  .toolbar .spacer { display: none; }
  .tool-group { width: 100%; padding: 0; }
  .tool-group .select { flex: 1; max-width: none !important; }
  .card-head { padding: 12px 14px; }
  .card-pad { padding: 14px; }
  .stat .v { font-size: 20px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .btn { height: 40px; }
  .btn.sm { height: 34px; }
  .btn.icon.sm { width: 34px; height: 34px; }

  /* tabelas comuns rolam para o lado sem espremer */
  .table-wrap .tbl { min-width: 720px; }

  /* peças: cada linha vira um cartão */
  .table-wrap #pieces-tbl { min-width: 0; }
  #pieces-tbl thead { display: none; }
  #pieces-tbl, #pieces-tbl tbody { display: block; }
  #pieces-tbl tr {
    display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px 10px; padding: 12px 14px 14px;
    border-bottom: 1px solid var(--border);
    grid-template-areas: "name name act" "qty len wid" "mat mat mat" "grain edge note" "cut cut cut";
  }
  #pieces-tbl tr:hover { background: transparent; }
  #pieces-tbl td { display: block; padding: 0; border: 0; width: auto !important; min-width: 0 !important; }
  #pieces-tbl td[data-l]::before { content: attr(data-l); display: block; font-size: 11px; font-weight: 650; color: var(--text-3); margin-bottom: 3px; text-transform: uppercase; letter-spacing: .03em; }
  #pieces-tbl .idx { display: none; }
  #pieces-tbl .c-name { grid-area: name; } #pieces-tbl .c-act { grid-area: act; align-self: end; text-align: right; }
  #pieces-tbl .c-qty { grid-area: qty; } #pieces-tbl .c-len { grid-area: len; } #pieces-tbl .c-wid { grid-area: wid; }
  #pieces-tbl .c-mat { grid-area: mat; } #pieces-tbl .c-grain { grid-area: grain; } #pieces-tbl .c-edge { grid-area: edge; }
  #pieces-tbl .c-note { grid-area: note; } #pieces-tbl .c-cut { grid-area: cut; text-align: left; }
  #pieces-tbl .c-cut:empty { display: none; }
  #pieces-tbl .input, #pieces-tbl .select { border-color: var(--border); background: var(--surface); height: 40px; font-size: 15px; }
  #pieces-tbl .c-name .input { font-weight: 600; }
  #pieces-tbl .grain-btn { width: 52px; height: 40px; }
  #pieces-tbl .edge-w { width: 84px; height: 48px; }
  .tbl-foot { gap: 10px 16px; padding: 12px 14px; }

  /* plano */
  .plan-side .card-pad { gap: 12px; }
  .sheet-head { padding: 10px 12px; }
  .sheet-body { padding: 8px; }
  .cut-list { columns: 1; }
  .mat-head .faint { width: 100%; }

  /* 3D */
  .scene-wrap { padding: 8px; }
  .scene-wrap .scene3d { max-height: 55vh; }
  .range { width: 100%; }
  .range input { flex: 1; width: auto; }
  .mod-grid { grid-template-columns: 1fr; }
  .mod-card { flex-direction: row; }
  .mod-thumb { width: 42%; height: auto; min-height: 140px; border-bottom: 0; border-right: 1px solid var(--border); }
  .mod-info { flex: 1; min-width: 0; padding: 10px 12px; }

  /* modais em tela cheia */
  .modal-back { padding: 0; place-items: end stretch; }
  .modal, .modal.wide { width: 100%; max-height: 92vh; border-radius: 16px 16px 0 0; }
  .modal-head { padding: 14px 16px 8px; }
  .modal-body { padding: 4px 16px 14px; }
  .modal-foot { padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); flex-wrap: wrap; }
  .modal-foot .btn { flex: 1 1 auto; }
  .modal-foot .check { flex: 1 1 100%; }
  .form-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .tpl-grid { grid-template-columns: 1fr 1fr; }
  .cat-grid { grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); max-height: 48vh; }
  #mod-3d { min-height: 0; padding: 6px; }
  #mod-3d svg { max-height: 210px; }
  .mod-preview3d .preview-list { max-height: 150px; font-size: 12px; }

  /* impressão (pré-visualização) */
  .paper { padding: 14px; }
  .doc .kv { grid-template-columns: 1fr 1fr; }
  #print-preview { overflow-x: auto; }
  .labels { grid-template-columns: repeat(2, 1fr); }
  .print-opts { gap: 10px 16px; }
  .print-opts .check { width: calc(50% - 8px); }

  .docs-nav { gap: 4px; }
  .docs-link { background: var(--surface-2); padding: 6px 10px; font-size: 13px; }
  .doc-sec h2 { font-size: 17px; }
  .proj-thumb { height: 130px; }
  .proj-card:hover { transform: none; }
}

@media (max-width: 380px) {
  .form-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat .v { font-size: 18px; }
}

@media print { .labels { grid-template-columns: repeat(3, 1fr) !important; } }

/* ===== Ambientes ===== */
.rooms-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.room-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 16px; margin-top: 16px; align-items: start; }
.room-preview { position: sticky; top: 16px; overflow: hidden; }
.room-preview .scene3d { max-height: 56vh; }
.ai-describe { margin-top: 4px; }
.ai-badge { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: none; color: #fff; background: linear-gradient(135deg, #7c4fb5, var(--accent)); }
.ai-badge svg { width: 20px; height: 20px; }

/* ===== Assistente de IA ===== */
.ai-fab { position: fixed; right: 20px; bottom: 20px; z-index: 45; display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0 18px 0 14px; border: 0; border-radius: 24px; color: #fff; font-weight: 700; cursor: pointer; background: linear-gradient(135deg, #7c4fb5, var(--accent)); box-shadow: 0 8px 24px rgba(124, 79, 181, .35); }
.ai-fab svg { width: 22px; height: 22px; }
.ai-fab:hover { filter: brightness(1.08); }
.ai-panel { position: fixed; right: 20px; bottom: 80px; z-index: 46; width: min(430px, calc(100vw - 40px)); height: min(640px, calc(100vh - 110px)); background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; overflow: hidden; animation: pop .18s; }
.ai-head { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 14px; border-bottom: 1px solid var(--border); }
.ai-ctx { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ai-msgs { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: var(--surface-2); }
.ai-msg { max-width: 92%; padding: 10px 13px; border-radius: 14px; font-size: 14px; line-height: 1.5; word-wrap: break-word; }
.ai-msg p { margin: 0 0 6px; } .ai-msg p:last-child { margin-bottom: 0; }
.ai-msg ul { margin: 4px 0 6px; padding-left: 18px; }
.ai-msg pre { white-space: pre-wrap; font-size: 12px; background: var(--surface-3); padding: 8px; border-radius: 8px; }
.ai-msg code { background: var(--surface-3); padding: 0 4px; border-radius: 4px; font-size: 12.5px; }
.ai-msg.user { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 4px; white-space: pre-wrap; }
.ai-msg.bot { align-self: flex-start; background: var(--surface); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.ai-msg.err { border-color: var(--danger); background: var(--danger-soft); }
.ai-meta { font-size: 11px; color: var(--text-3); margin-top: 6px; }
.ai-welcome { color: var(--text-2); font-size: 14px; padding: 6px 4px; }
.ai-welcome p { margin: 6px 0 0; }
.ai-action { margin-top: 8px; border: 1.5px solid var(--accent); background: var(--accent-soft); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.ai-action-t { display: flex; gap: 6px; align-items: center; }
.ai-action-t svg { width: 16px; height: 16px; color: var(--accent-text); }
.ai-action ul { margin: 0; padding-left: 18px; font-size: 12.5px; color: var(--text-2); }
.ai-action .btn { align-self: flex-start; }
.ai-chips { display: flex; gap: 6px; padding: 8px 12px 0; overflow-x: auto; scrollbar-width: none; }
.ai-chips:empty { display: none; }
.ai-chips .chip { white-space: nowrap; font-size: 12px; }
.ai-input { display: flex; gap: 8px; padding: 10px 12px; align-items: flex-end; }
.ai-input textarea { flex: 1; resize: none; border: 1px solid var(--border-strong); border-radius: 12px; padding: 9px 12px; background: var(--surface); outline: none; max-height: 140px; line-height: 1.4; }
.ai-input textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.ai-input .btn { width: 40px; height: 40px; border-radius: 12px; }
.ai-foot { font-size: 11px; padding: 0 14px 10px; }
.ai-dots { display: inline-flex; gap: 4px; padding: 4px 0; }
.ai-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); animation: aiDot 1s infinite ease-in-out; }
.ai-dots i:nth-child(2) { animation-delay: .15s; } .ai-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes aiDot { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
@media print { #ai-root { display: none !important; } }
@media (max-width: 1000px) {
  .room-layout { grid-template-columns: minmax(0, 1fr); }
  .room-preview { position: static; order: -1; }
}
@media (max-width: 860px) {
  .ai-fab { bottom: calc(78px + env(safe-area-inset-bottom, 0px)); right: 14px; height: 46px; padding: 0 14px 0 12px; }
  .ai-fab span { display: none; }
  .ai-panel { right: 0; left: 0; bottom: 0; width: 100%; height: 88vh; border-radius: 18px 18px 0 0; z-index: 50; padding-bottom: env(safe-area-inset-bottom, 0px); }
  .rooms-grid { grid-template-columns: 1fr 1fr; }
}
.ai-auto { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 650; color: var(--text-2); cursor: pointer; padding: 4px 8px; border-radius: 8px; border: 1px solid var(--border); }
.ai-auto input { accent-color: var(--accent); width: 14px; height: 14px; margin: 0; }
.ai-attach:empty { display: none; }
.ai-attach { padding: 8px 12px 0; }
.ai-thumb { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.ai-thumb img { width: 54px; height: 54px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); }
.ai-img { display: block; max-width: 100%; max-height: 220px; border-radius: 10px; margin-bottom: 6px; }
.ai-input > label.btn { width: 40px; height: 40px; flex: none; }

/* ===== Figuras da documentação ===== */
.doc-fig { margin: 14px 0; padding: 14px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; }
.doc-fig svg { max-width: 100%; height: auto; display: block; margin: 0 auto; }
.doc-fig .sheet-svg { max-height: 360px; }
.doc-fig .scene3d { max-height: 300px; }
.doc-fig figcaption { font-size: 12.5px; color: var(--text-2); margin-top: 10px; text-align: center; line-height: 1.45; }
.doc-fig-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; align-items: end; }
.doc-fig-row.four { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.doc-fig-row > div { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.doc-fig-row > div > span { font-size: 12px; font-weight: 650; color: var(--text-2); text-align: center; }
.doc-fig-row .scene3d { max-height: 230px; }
.doc-fig.light .doc-fig-row { justify-items: center; }
.doc-svg { max-height: 260px; }
.doc-cuts { columns: 2 220px; border-top: 1px dashed var(--border); margin-top: 8px; font-size: 12px; }
.doc-cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.doc-cat { display: flex; flex-direction: column; gap: 5px; align-items: flex-start; }
.doc-cat-sw { display: flex; gap: 4px; }
.doc-cat span { font-size: 11.5px; font-weight: 650; color: var(--text-2); }
.doc-chat { display: flex; flex-direction: column; gap: 8px; max-width: 460px; margin: 0 auto; }
.bench { display: flex; flex-direction: column; gap: 8px; }
.bench-row { border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
.bench-row summary { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; padding: 10px 12px; cursor: pointer; font-size: 13px; }
.bench-row summary b { min-width: 150px; }
.bench-body { padding: 4px 14px 12px; font-size: 13.5px; line-height: 1.55; color: var(--text-2); }
.bench-body p { margin: 0 0 6px; }

/* ===== IA trancada (mockup) ===== */
.ai-fab.locked { position: fixed; }
.ai-lock-dot { position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; border-radius: 50%; background: var(--surface); color: var(--text); display: grid; place-items: center; box-shadow: var(--shadow); }
.ai-lock-dot svg { width: 12px; height: 12px; }
.ai-locked { position: relative; flex: 1; overflow: hidden; background: var(--surface-2); }
.ai-locked-bg { position: absolute; inset: 0; padding: 14px; filter: blur(3px); opacity: .55; pointer-events: none; }
.ai-locked-bg .doc-fig { background: transparent; border: 0; padding: 0; margin: 0; }
.ai-locked-bg figcaption { display: none; }
.ai-locked-card { position: absolute; left: 16px; right: 16px; top: 50%; transform: translateY(-50%); background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-lg); padding: 20px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.ai-locked-card b { font-size: 18px; }
.ai-locked-card p { margin: 0; color: var(--text-2); font-size: 14px; }
.ai-locked-card ul { margin: 0; padding-left: 18px; color: var(--text-2); font-size: 13.5px; }
.ai-lock-big { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #7c4fb5, var(--accent)); }
.ai-lock-big svg { width: 22px; height: 22px; }

/* padrão Maquety: selo de cadeado sempre visível */
.ai-fab { overflow: visible !important; }
.ai-fab .ai-lock-dot { display: grid !important; position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; border-radius: 50%; background: var(--text); color: var(--surface); border: 2px solid var(--surface); place-items: center; box-shadow: var(--shadow); z-index: 1; }
.ai-fab .ai-lock-dot svg { width: 11px; height: 11px; }
