/* Active Logo — editor */
:root {
  --bg: #f4f5f8;
  --panel: #ffffff;
  --line: #e5e7ee;
  --line-2: #d6d9e2;
  --text: #171a23;
  --muted: #6b7180;
  --soft: #f1f2f6;
  --brand: #5b4cf0;
  --brand-2: #7a6dff;
  --brand-soft: #eeecff;
  --danger: #e5484d;
  --sel: #5b4cf0;
  --guide: #ff3d8b;
  --radius: 10px;
  --shadow: 0 10px 30px rgba(17, 24, 39, .12), 0 2px 6px rgba(17, 24, 39, .06);
  --ui: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body.app {
  font: 13px/1.4 var(--ui); color: var(--text); background: var(--bg);
  display: grid; overflow: hidden;
  grid-template-columns: 76px 320px 1fr 292px;
  grid-template-rows: 56px 1fr;
  grid-template-areas: "top top top top" "rail drawer stage props";
}
body.app.drawer-closed { grid-template-columns: 76px 0 1fr 292px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { flex: none; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }

/* ---------- barra superior */
.topbar {
  grid-area: top; display: flex; align-items: center; gap: 6px; padding: 0 12px;
  background: linear-gradient(90deg, #1b1740, #2c2472 60%, #3a2f8f); color: #fff; z-index: 5;
}
.brand { display: flex; align-items: center; gap: 9px; color: #fff; text-decoration: none; font-weight: 700; font-size: 15px; margin-right: 10px; letter-spacing: -.01em; }
.tb-btn, .tb-icon, .zoom-val {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px; border: 0; border-radius: 8px;
  background: transparent; color: #fff; font-weight: 500;
}
.tb-icon { width: 34px; padding: 0; justify-content: center; }
.tb-btn:hover, .tb-icon:hover, .zoom-val:hover { background: rgba(255, 255, 255, .12); }
.tb-btn:disabled, .tb-icon:disabled { opacity: .35; cursor: default; background: transparent; }
.topbar svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tb-sep { width: 1px; height: 24px; background: rgba(255, 255, 255, .2); margin: 0 4px; }
.tb-grow { flex: 1; }
.doc-name {
  margin-left: 8px; width: 220px; height: 34px; padding: 0 10px; border-radius: 8px; border: 1px solid transparent;
  background: transparent; color: #fff; font-weight: 600;
}
.doc-name:hover { border-color: rgba(255, 255, 255, .25); }
.doc-name:focus { background: rgba(255, 255, 255, .12); outline: none; border-color: rgba(255, 255, 255, .4); }
.save-state { color: rgba(255, 255, 255, .6); font-size: 12px; white-space: nowrap; }
.zoom { display: flex; align-items: center; background: rgba(255, 255, 255, .08); border-radius: 9px; margin-right: 6px; }
.zoom-val { min-width: 56px; justify-content: center; font-variant-numeric: tabular-nums; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px;
  border-radius: 9px; border: 1px solid var(--line-2); background: #fff; font-weight: 600; white-space: nowrap;
}
.btn:hover { background: var(--soft); }
.btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-2); }
.topbar .btn.primary { background: #fff; color: #2c2472; border-color: #fff; }
.topbar .btn.primary:hover { background: #eeecff; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--soft); }
.btn.danger { color: var(--danger); }
.btn.block { width: 100%; }
.btn.sm { height: 30px; padding: 0 10px; font-size: 12px; }

/* ---------- barra lateral de ferramentas */
.rail { grid-area: rail; background: var(--panel); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 8px 6px; gap: 2px; z-index: 3; }
.rail button {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 2px; border: 0; border-radius: 10px;
  background: transparent; color: var(--muted); font-size: 11px; font-weight: 500;
}
.rail button svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; stroke-linecap: round; }
.rail button:hover { background: var(--soft); color: var(--text); }
.rail button.on { background: var(--brand-soft); color: var(--brand); }

/* ---------- gaveta (conteúdo da ferramenta) */
.drawer { grid-area: drawer; background: var(--panel); border-right: 1px solid var(--line); overflow: hidden; display: flex; flex-direction: column; min-width: 0; z-index: 2; }
.drawer-closed .drawer { border: 0; }
.dw-head { padding: 16px 16px 10px; display: flex; align-items: center; gap: 8px; }
.dw-head h2 { font-size: 16px; margin: 0; flex: 1; letter-spacing: -.01em; }
.dw-body { flex: 1; overflow-y: auto; padding: 4px 16px 24px; }
.dw-body::-webkit-scrollbar, .props::-webkit-scrollbar { width: 8px; }
.dw-body::-webkit-scrollbar-thumb, .props::-webkit-scrollbar-thumb { background: #d9dce4; border-radius: 8px; border: 2px solid #fff; }
.close-drawer { width: 30px; height: 30px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); display: grid; place-items: center; }
.close-drawer:hover { background: var(--soft); }
.close-drawer svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

.section-title { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: 18px 0 8px; }
.section-title:first-child { margin-top: 4px; }
.hint { color: var(--muted); font-size: 12px; margin: 6px 0 0; }

.search { position: relative; }
.search input { width: 100%; height: 38px; border: 1px solid var(--line-2); border-radius: 9px; padding: 0 12px 0 36px; background: var(--soft); }
.search input:focus { background: #fff; outline: 2px solid var(--brand-soft); border-color: var(--brand); }
.search svg { position: absolute; left: 11px; top: 11px; width: 16px; height: 16px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; }

.chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0; }
.chip { height: 28px; padding: 0 10px; border-radius: 99px; border: 1px solid var(--line-2); background: #fff; font-size: 12px; font-weight: 500; color: var(--muted); }
.chip:hover { color: var(--text); border-color: #b8bccb; }
.chip.on { background: var(--text); border-color: var(--text); color: #fff; }

.seg { display: flex; background: var(--soft); border-radius: 9px; padding: 3px; gap: 2px; }
.seg button { flex: 1; height: 30px; border: 0; border-radius: 7px; background: transparent; font-size: 12px; font-weight: 500; color: var(--muted); display: grid; place-items: center; }
.seg button.on { background: #fff; color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }
.seg button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

.icon-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.icon-grid button { aspect-ratio: 1; border: 0; border-radius: 9px; background: transparent; display: grid; place-items: center; padding: 0; }
.icon-grid button:hover { background: var(--brand-soft); }
.icon-grid svg { width: 30px; height: 30px; fill: #2a2f3c; }
.icon-grid button:hover svg { fill: var(--brand); }
.more { margin-top: 12px; }

.shape-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.shape-grid button { aspect-ratio: 1; border: 1px solid var(--line); border-radius: 10px; background: #fff; display: grid; place-items: center; padding: 10px; }
.shape-grid button:hover { border-color: var(--brand); background: var(--brand-soft); }
.shape-grid svg { width: 100%; height: 100%; fill: #3a3f4d; }
.shape-grid button:hover svg { fill: var(--brand); }

.text-add { display: grid; gap: 8px; }
.text-add button { text-align: left; border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 12px 14px; }
.text-add button:hover { border-color: var(--brand); background: var(--brand-soft); }
.combo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.combo-grid button { border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 14px 8px; text-align: center; min-height: 84px; display: flex; flex-direction: column; justify-content: center; gap: 2px; overflow: hidden; }
.combo-grid button:hover { border-color: var(--brand); }
.combo-grid .a { font-size: 20px; line-height: 1.05; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.combo-grid .b { font-size: 10px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.palettes { display: grid; gap: 8px; }
.palette { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 10px; padding: 8px; background: #fff; text-align: left; }
.palette:hover { border-color: var(--brand); }
.palette .sw { display: flex; border-radius: 7px; overflow: hidden; flex: none; }
.palette .sw i { width: 24px; height: 30px; }
.palette span { font-size: 12px; font-weight: 500; }

/* ---------- modelos / assistente */
.gen-form { display: grid; gap: 10px; }
.field { display: grid; gap: 5px; }
.field > span { font-size: 12px; font-weight: 600; }
.input, .select, textarea.input {
  width: 100%; height: 36px; border: 1px solid var(--line-2); border-radius: 8px; padding: 0 10px; background: #fff;
}
textarea.input { height: auto; min-height: 64px; padding: 8px 10px; resize: vertical; line-height: 1.35; }
.input:focus, .select:focus, textarea.input:focus { outline: 2px solid var(--brand-soft); border-color: var(--brand); }
.gen-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.gen-card { position: relative; aspect-ratio: 1; border-radius: 10px; border: 1px solid var(--line); overflow: hidden; padding: 0; background: #fff; display: block; }
.gen-card:hover { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.gen-card svg { width: 100%; height: 100%; display: block; }
.gen-loading { grid-column: 1 / -1; color: var(--muted); text-align: center; padding: 30px 0; }

/* ---------- área de trabalho */
.stage { grid-area: stage; position: relative; overflow: hidden; background: #e9ebf0; background-image: radial-gradient(#d5d8e0 1px, transparent 1px); background-size: 22px 22px; }
.canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; user-select: none; }
.canvas.panning, .canvas.space { cursor: grab; }
.canvas.panning:active { cursor: grabbing; }
#artItems [data-id] { cursor: move; }
#artItems [data-id].locked { cursor: default; }
.marquee { fill: rgba(91, 76, 240, .08); stroke: var(--sel); stroke-width: 1; stroke-dasharray: 4 3; }
.sel-box { fill: none; stroke: var(--sel); vector-effect: non-scaling-stroke; stroke-width: 1.5; pointer-events: none; }
.sel-box.multi { stroke-dasharray: 5 4; }
.hover-box { fill: none; stroke: var(--sel); stroke-width: 1; vector-effect: non-scaling-stroke; pointer-events: none; opacity: .6; }
.handle { fill: #fff; stroke: var(--sel); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.handle.side { fill: #fff; }
.handle.rot { fill: #fff; cursor: grab; }
.rot-line { stroke: var(--sel); stroke-width: 1.2; vector-effect: non-scaling-stroke; pointer-events: none; }
.guide { stroke: var(--guide); stroke-width: 1; vector-effect: non-scaling-stroke; pointer-events: none; }
.empty-hint {
  position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%); background: #fff; border-radius: 12px; box-shadow: var(--shadow);
  padding: 12px 18px; display: flex; flex-direction: column; align-items: center; text-align: center; pointer-events: none; transition: opacity .2s;
}
.empty-hint span { color: var(--muted); font-size: 12px; }
.empty-hint.off { opacity: 0; }

/* barra de contexto flutuante */
.ctx {
  position: absolute; z-index: 4; display: flex; gap: 2px; padding: 4px; background: #fff; border-radius: 10px; box-shadow: var(--shadow); transform: translateX(-50%);
}
.ctx[hidden] { display: none; }
.ctx button { width: 32px; height: 32px; border: 0; border-radius: 7px; background: transparent; display: grid; place-items: center; color: #3a3f4d; }
.ctx button:hover { background: var(--soft); }
.ctx button.danger:hover { background: #fdecec; color: var(--danger); }
.ctx svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- painel de propriedades */
.props { grid-area: props; background: var(--panel); border-left: 1px solid var(--line); overflow-y: auto; padding: 14px 16px 30px; z-index: 2; }
.props h3 { font-size: 14px; margin: 0 0 2px; display: flex; align-items: center; gap: 8px; }
.props h3 small { color: var(--muted); font-weight: 500; font-size: 12px; }
.prop-group { border-top: 1px solid var(--line); padding: 14px 0 6px; margin-top: 12px; }
.prop-group:first-of-type { border-top: 0; margin-top: 4px; padding-top: 8px; }
.prop-group > .lbl { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between; }
.row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.row > * { min-width: 0; }
.row .grow { flex: 1; }
.num { display: flex; align-items: center; border: 1px solid var(--line-2); border-radius: 8px; height: 32px; background: #fff; flex: 1; min-width: 0; }
.num span { padding: 0 0 0 8px; color: var(--muted); font-size: 11px; font-weight: 600; flex: none; }
.num input { width: 100%; border: 0; background: transparent; height: 30px; padding: 0 8px; font-variant-numeric: tabular-nums; min-width: 0; }
.num input:focus { outline: none; }
.num:focus-within { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }
.slider { display: grid; grid-template-columns: 1fr 54px; gap: 8px; align-items: center; margin-bottom: 10px; }
.slider label { grid-column: 1 / -1; font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; margin-bottom: -4px; }
.slider input[type=range] { width: 100%; accent-color: var(--brand); }
.slider .num { height: 28px; }
.slider .num input { height: 26px; padding: 0 6px; text-align: right; }

.color-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.swatch-btn { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line-2); padding: 0; position: relative; overflow: hidden; flex: none; background-image: linear-gradient(45deg, #ddd 25%, transparent 25%, transparent 75%, #ddd 75%), linear-gradient(45deg, #ddd 25%, transparent 25%, transparent 75%, #ddd 75%); background-size: 10px 10px; background-position: 0 0, 5px 5px; }
.swatch-btn i { position: absolute; inset: 0; }
.swatch-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.hex { width: 88px; flex: none; height: 32px; border: 1px solid var(--line-2); border-radius: 8px; padding: 0 8px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; text-transform: uppercase; }
.hex:focus { outline: none; border-color: var(--brand); }
.mini-swatches { display: flex; flex-wrap: wrap; gap: 5px; margin: 4px 0 10px; }
.mini-swatches button { width: 22px; height: 22px; border-radius: 6px; border: 1px solid rgba(0, 0, 0, .1); padding: 0; }
.mini-swatches button:hover { transform: scale(1.12); }

.icon-btns { display: flex; gap: 4px; flex-wrap: wrap; }
.icon-btns button { width: 34px; height: 32px; border: 1px solid var(--line-2); border-radius: 8px; background: #fff; display: grid; place-items: center; color: #3a3f4d; }
.icon-btns button:hover { background: var(--soft); }
.icon-btns button.on { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); }
.icon-btns svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.font-pick { display: flex; align-items: center; justify-content: space-between; width: 100%; height: 38px; border: 1px solid var(--line-2); border-radius: 8px; background: #fff; padding: 0 10px; font-size: 16px; text-align: left; }
.font-pick:hover { border-color: #b8bccb; }
.font-pick::after { content: ''; width: 7px; height: 7px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg) translateY(-2px); flex: none; }
.font-list { display: grid; gap: 2px; }
.font-list button { border: 0; background: transparent; text-align: left; padding: 9px 10px; border-radius: 8px; font-size: 20px; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.font-list button small { display: block; font: 11px var(--ui); color: var(--muted); margin-top: 2px; }
.font-list button:hover { background: var(--soft); }
.font-list button.on { background: var(--brand-soft); }

.layers { display: grid; gap: 4px; }
.layer { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 9px; background: #fff; cursor: pointer; }
.layer:hover { border-color: #c2c6d3; }
.layer.on { border-color: var(--brand); background: var(--brand-soft); }
.layer.dragging { opacity: .4; }
.layer.drop-before { box-shadow: 0 -2px 0 var(--brand); }
.layer.drop-after { box-shadow: 0 2px 0 var(--brand); }
.layer .thumb { width: 36px; height: 36px; border-radius: 6px; background: var(--soft); display: grid; place-items: center; flex: none; overflow: hidden; }
.layer .thumb svg { width: 30px; height: 30px; }
.layer .nm { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.layer button { width: 26px; height: 26px; border: 0; background: transparent; border-radius: 6px; color: var(--muted); display: grid; place-items: center; }
.layer button:hover { background: rgba(0, 0, 0, .06); color: var(--text); }
.layer button svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.layer.hidden-l .nm, .layer.hidden-l .thumb { opacity: .4; }

/* ---------- modais */
.modal-root:empty { display: none; }
.modal-back { position: fixed; inset: 0; background: rgba(15, 18, 30, .5); display: grid; place-items: center; z-index: 50; padding: 20px; animation: fade .15s; }
.modal { background: #fff; border-radius: 16px; box-shadow: 0 30px 80px rgba(0, 0, 0, .3); width: min(560px, 100%); max-height: calc(100vh - 40px); display: flex; flex-direction: column; overflow: hidden; animation: pop .18s; }
.modal.wide { width: min(980px, 100%); }
.modal-head { display: flex; align-items: center; padding: 18px 20px 6px; gap: 10px; }
.modal-head h2 { margin: 0; font-size: 18px; flex: 1; letter-spacing: -.01em; }
.modal-body { padding: 10px 20px 20px; overflow-y: auto; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 14px 20px; border-top: 1px solid var(--line); }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: translateY(8px) scale(.98); opacity: 0; } }

.export-opts { display: grid; gap: 8px; }
.export-opt { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.export-opt:hover { border-color: #c2c6d3; }
.export-opt.on { border-color: var(--brand); background: var(--brand-soft); }
.export-opt input { accent-color: var(--brand); }
.export-opt b { display: block; }
.export-opt small { color: var(--muted); }
.export-opt .tag { margin-left: auto; font-size: 10px; font-weight: 700; padding: 3px 7px; border-radius: 99px; background: #dcfce7; color: #166534; text-transform: uppercase; }
.export-extra { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 14px; }
.check { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; }
.check input { accent-color: var(--brand); width: 16px; height: 16px; }

.proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.proj { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; display: flex; flex-direction: column; }
.proj .pv { aspect-ratio: 1; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3E%3Crect width='8' height='8' fill='%23eef0f4'/%3E%3Crect x='8' y='8' width='8' height='8' fill='%23eef0f4'/%3E%3C/svg%3E"); display: grid; place-items: center; cursor: pointer; border: 0; padding: 0; width: 100%; }
.proj .pv svg { width: 100%; height: 100%; }
.proj .pv:hover { opacity: .85; }
.proj .meta { padding: 8px 10px; display: flex; align-items: center; gap: 6px; border-top: 1px solid var(--line); }
.proj .meta div { flex: 1; min-width: 0; }
.proj .meta b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.proj .meta small { color: var(--muted); }
.empty { text-align: center; color: var(--muted); padding: 40px 10px; }

.mockups { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.mock { border-radius: 14px; aspect-ratio: 4 / 3; position: relative; overflow: hidden; display: grid; place-items: center; }
.mock .lg { display: grid; place-items: center; }
.mock .lg svg { width: 100%; height: 100%; }
.mock-label { position: absolute; left: 12px; bottom: 10px; font-size: 11px; font-weight: 600; background: rgba(255, 255, 255, .85); padding: 3px 8px; border-radius: 99px; color: #333; }
.mock.card { background: #d9dde6; }
.mock.card .paper { width: 72%; aspect-ratio: 1.75; background: #fff; border-radius: 6px; box-shadow: 0 14px 30px rgba(0, 0, 0, .18); display: grid; place-items: center; transform: rotate(-4deg); }
.mock.card .paper .lg { width: 62%; height: 62%; }
.mock.dark { background: #12131a; }
.mock.dark .lg { width: 62%; height: 62%; }
.mock.shirt { background: #eef0f3; }
.mock.shirt .tee { width: 62%; aspect-ratio: 1; position: relative; display: grid; place-items: center; }
.mock.shirt .tee > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.mock.shirt .tee .lg { width: 34%; height: 34%; position: relative; margin-top: -8%; }
.mock.app { background: linear-gradient(135deg, #a1c4fd, #c2e9fb); }
.mock.app .ic { width: 34%; aspect-ratio: 1; border-radius: 22%; background: #fff; box-shadow: 0 12px 30px rgba(0, 0, 0, .2); display: grid; place-items: center; overflow: hidden; }
.mock.app .ic .lg { width: 78%; height: 78%; }
.mock.web { background: #f6f7fb; align-items: start; }
.mock.web .bar { width: 100%; height: 22%; background: #fff; box-shadow: 0 1px 0 #e5e7ee; display: flex; align-items: center; padding: 0 6%; gap: 8%; }
.mock.web .bar .lg { width: 30%; height: 70%; justify-items: start; }
.mock.web .bar i { height: 6px; width: 10%; background: #d9dce4; border-radius: 3px; }
.mock.web .bar i:first-of-type { margin-left: auto; }
.mock.sign { background: linear-gradient(#cfd6df, #aab3bf); }
.mock.sign .board { width: 70%; aspect-ratio: 2.2; border-radius: 10px; background: #fff; box-shadow: 0 18px 30px rgba(0, 0, 0, .25); display: grid; place-items: center; border: 6px solid #2b2f38; }
.mock.sign .board .lg { width: 80%; height: 80%; }

/* ---------- avisos */
.toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); display: grid; gap: 8px; z-index: 100; }
.toast { background: #171a23; color: #fff; padding: 10px 16px; border-radius: 10px; box-shadow: var(--shadow); font-weight: 500; transition: opacity .3s, transform .3s; }
.toast.error { background: var(--danger); }
.toast.out { opacity: 0; transform: translateY(6px); }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- ecrãs pequenos */
.mobile-props-toggle { display: none; }
@media (max-width: 1100px) {
  body.app { grid-template-columns: 68px 290px 1fr 260px; }
  body.app.drawer-closed { grid-template-columns: 68px 0 1fr 260px; }
  .tb-btn span { display: none; }
  .doc-name { width: 150px; }
}
@media (max-width: 820px) {
  body.app, body.app.drawer-closed { grid-template-columns: 1fr; grid-template-rows: 52px 1fr 62px; grid-template-areas: "top" "stage" "rail"; }
  .rail { flex-direction: row; border-right: 0; border-top: 1px solid var(--line); padding: 4px; justify-content: space-around; }
  .rail button { flex: 1; padding: 6px 0; font-size: 10px; }
  .drawer { position: fixed; left: 0; right: 0; bottom: 62px; height: 55vh; border-radius: 16px 16px 0 0; box-shadow: var(--shadow); border: 0; z-index: 10; }
  .drawer-closed .drawer { display: none; }
  .props { position: fixed; left: 0; right: 0; bottom: 62px; max-height: 48vh; border-radius: 16px 16px 0 0; box-shadow: var(--shadow); border: 0; z-index: 9; display: none; }
  body.props-open .props { display: block; }
  .zoom, .save-state, .tb-sep, [data-cmd=preview] { display: none; }
  .doc-name { width: 100px; margin-left: 0; }
  .brand span { display: none; }
  .topbar { gap: 2px; padding: 0 8px; }
}

/* etiqueta do modelo na galeria */
.gen-tag { position: absolute; left: 6px; bottom: 6px; font-size: 10px; font-weight: 600; background: rgba(255, 255, 255, .92); color: #3a3f4d; padding: 2px 7px; border-radius: 99px; opacity: 0; transition: opacity .15s; pointer-events: none; }
.gen-card:hover .gen-tag { opacity: 1; }
.gen-grid-lg { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; margin: 0; }
