:root {
  color-scheme: dark;
  --bg: #212121;
  --sidebar: #171717;
  --surface: #2f2f2f;
  --hover: #3a3a3a;
  --text: #ececec;
  --text-2: #b4b4b4;
  --border: rgba(255, 255, 255, 0.1);
  --success: #10a37f;
  --warning: #e5a50a;
  --danger: #ef4444;
  --neutral: #8e8ea0;
  --primary-bg: #ececec;
  --primary-fg: #171717;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --fast: 150ms ease;
  --column: 768px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 400 15px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.45; }
a { color: inherit; }
code { font-family: var(--mono); font-size: 0.9em; background: var(--surface); padding: 1px 5px; border-radius: 4px; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
[hidden] { display: none !important; }

.sprite { display: none; }
.icon {
  width: 18px; height: 18px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round;
}
.muted { color: var(--text-2); }
.small { font-size: 13px; }

/* Estrutura */
.app { display: grid; grid-template-columns: 260px minmax(0, 1fr); height: 100dvh; }
.sidebar {
  background: var(--sidebar);
  display: flex; flex-direction: column; gap: 2px;
  padding: 8px; min-height: 0;
}
.sidebar-top { display: flex; align-items: center; justify-content: space-between; height: 44px; padding: 0 4px 0 0; }
.brand {
  border: 0; background: none; padding: 6px 10px; border-radius: 8px;
  font-weight: 600; font-size: 15px; color: var(--text);
  transition: background var(--fast);
}
.brand:hover { background: var(--hover); }
.sidebar-label { font-size: 12px; font-weight: 500; color: var(--text-2); padding: 16px 10px 6px; }
.molduras { display: flex; flex-direction: column; gap: 1px; overflow-y: auto; flex: 1; min-height: 0; margin: 0 -2px; padding: 0 2px; }
.nav-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  border: 0; background: none; text-align: left;
  padding: 8px 10px; border-radius: 8px; font-size: 14px; color: var(--text);
  transition: background var(--fast);
}
.nav-item:hover:not(:disabled) { background: var(--hover); }
.nav-item[aria-current="page"] { background: var(--surface); }
.nav-item span:first-of-type { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-item .count { flex: none; font-size: 12px; color: var(--text-2); }
.sidebar-footer { border-top: 1px solid var(--border); padding-top: 8px; margin-top: 4px; display: flex; flex-direction: column; gap: 1px; }
.queue-status {
  display: flex; align-items: center; gap: 8px;
  margin: 6px 2px 2px; padding: 8px 10px; border-radius: 10px;
  background: var(--surface); font-size: 13px; color: var(--text-2);
}
.queue-status span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--neutral); }
.dot.sincronizado { background: var(--success); }
.dot.divergente { background: var(--warning); }
.dot.erro { background: var(--danger); }
.dot.so-zip { background: var(--neutral); }
.dot.so-fonte { background: transparent; box-shadow: inset 0 0 0 1.5px var(--neutral); }
.dot.carregando { background: var(--hover); }

.main { display: flex; flex-direction: column; min-width: 0; height: 100dvh; }
.topbar { display: flex; align-items: center; gap: 8px; height: 56px; padding: 0 12px 0 16px; flex: none; }
.topbar-title { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; font-size: 17px; font-weight: 500; }
.topbar-title .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-actions { display: flex; gap: 6px; flex: none; }
.scroll { flex: 1; overflow-y: auto; min-height: 0; scroll-behavior: smooth; }
.column { max-width: var(--column); margin: 0 auto; padding: 8px 16px 40px; }

/* Botões */
.icon-button {
  display: inline-grid; place-items: center; width: 36px; height: 36px; flex: none;
  border: 0; border-radius: 8px; background: none; color: var(--text-2); text-decoration: none;
  transition: background var(--fast), color var(--fast);
}
.icon-button:hover { background: var(--hover); color: var(--text); }
.button {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px;
  border: 1px solid var(--border); border-radius: 999px; background: none;
  font-size: 14px; font-weight: 500; text-decoration: none; white-space: nowrap;
  transition: background var(--fast), border-color var(--fast);
}
.button:hover:not(:disabled) { background: var(--hover); }
.button.primary { background: var(--primary-bg); color: var(--primary-fg); border-color: transparent; }
.button.primary:hover:not(:disabled) { background: #d6d6d6; }
.button.small { height: 30px; padding: 0 12px; font-size: 13px; gap: 6px; }
.button.small .icon { width: 16px; height: 16px; }
.button.danger { color: var(--danger); }

.chip-status {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 400; color: var(--text-2);
  padding: 3px 10px; border-radius: 999px; background: var(--surface); white-space: nowrap;
}

/* Barra de ação */
.composer-wrap { flex: none; padding: 0 16px 12px; }
.composer {
  position: relative;
  max-width: var(--column); margin: 0 auto;
  display: flex; align-items: center; gap: 8px;
  padding: 8px 8px 8px 10px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 24px;
  min-height: 56px;
}
.composer-hint { flex: 1; min-width: 0; font-size: 13px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.composer-foot { max-width: var(--column); margin: 8px auto 0; text-align: center; font-size: 12px; color: var(--text-2); }
.segmented { display: inline-flex; padding: 3px; gap: 2px; border-radius: 999px; background: var(--bg); flex: none; }
.segmented button {
  border: 0; background: none; color: var(--text-2);
  height: 32px; padding: 0 14px; border-radius: 999px; font-size: 14px; font-weight: 500;
  transition: background var(--fast), color var(--fast);
}
.segmented button:hover { color: var(--text); }
.segmented button[aria-checked="true"] { background: var(--hover); color: var(--text); }
.chip {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  height: 36px; padding: 0 12px; border: 1px solid var(--border); border-radius: 999px;
  background: none; color: var(--text-2); font-size: 14px;
  transition: background var(--fast), color var(--fast);
}
.chip:hover:not(:disabled), .chip[aria-expanded="true"] { background: var(--hover); color: var(--text); }
.chip-value { font-family: var(--mono); font-size: 12px; color: var(--warning); }
.send {
  display: grid; place-items: center; flex: none;
  width: 36px; height: 36px; border: 0; border-radius: 50%;
  background: var(--primary-bg); color: var(--primary-fg);
  transition: opacity var(--fast), transform var(--fast);
}
.send .icon { stroke-width: 2.25; }
.send:hover:not(:disabled) { opacity: 0.85; }
.send:active:not(:disabled) { transform: scale(0.95); }
.send:disabled { background: var(--hover); color: var(--text-2); opacity: 1; }
.advanced { position: relative; flex: none; }
.popover {
  position: absolute; bottom: calc(100% + 10px); left: 0; z-index: 20; width: 300px;
  padding: 6px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border);
}
.popover-title { font-size: 12px; color: var(--text-2); padding: 6px 10px 4px; }
.option { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: 10px; cursor: pointer; }
.option:hover { background: var(--hover); }
.option input { margin: 4px 0 0; accent-color: var(--text); }
.option span { display: flex; flex-direction: column; }
.option strong { font-family: var(--mono); font-size: 13px; font-weight: 500; }
.option small { color: var(--text-2); font-size: 13px; }

/* Estado vazio */
.empty { min-height: calc(100dvh - 140px); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 24px; padding: 24px 0; }
.empty h1 { margin: 0; font-size: 28px; font-weight: 500; letter-spacing: -0.01em; }
.empty p { margin: -12px 0 0; color: var(--text-2); }
.shortcuts { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 560px; }
.shortcut {
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 16px; border: 1px solid var(--border); border-radius: 999px;
  background: none; font-size: 14px; transition: background var(--fast);
}
.shortcut:hover { background: var(--hover); }

/* Feed */
.feed { display: flex; flex-direction: column; gap: 28px; padding-top: 8px; }
.feed-empty { text-align: center; color: var(--text-2); padding: 64px 0 24px; font-size: 14px; }
.turn { display: flex; flex-direction: column; gap: 14px; }
.bubble {
  align-self: flex-end; max-width: 80%;
  padding: 8px 16px; border-radius: 18px; background: var(--surface); font-size: 15px;
}
.bubble small { color: var(--text-2); font-size: 13px; margin-left: 6px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.result { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.result.single .frame { width: min(540px, 100%); }
/* No par, metadados sempre na segunda linha: as duas imagens ficam alinhadas. */
.pair .result-head > span:last-child { flex-basis: 100%; }
.result-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; color: var(--text-2); }
.frame {
  position: relative; display: block; width: 100%; aspect-ratio: 1; padding: 0;
  border: 1px solid var(--border); border-radius: 12px; overflow: hidden;
  background: var(--surface);
}
button.frame { cursor: zoom-in; }
.frame img { display: block; width: 100%; height: 100%; object-fit: contain; }
.frame .zoom {
  position: absolute; right: 8px; top: 8px; display: grid; place-items: center;
  width: 32px; height: 32px; border-radius: 8px; background: rgba(23, 23, 23, 0.75); color: var(--text);
  opacity: 0; transition: opacity var(--fast);
}
.frame:hover .zoom, .frame:focus-visible .zoom { opacity: 1; }
.frame.placeholder { display: grid; place-items: center; color: var(--text-2); font-size: 14px; text-align: center; padding: 16px; }
.skeleton { display: grid; place-items: center; align-content: center; gap: 12px; color: var(--text-2); font-size: 14px; }
.skeleton::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.04) 50%, transparent 70%);
  background-size: 200% 100%; animation: shimmer 1.6s linear infinite;
}
@keyframes shimmer { from { background-position: 150% 0; } to { background-position: -50% 0; } }
.skeleton > * { position: relative; }
.status-aviso { padding: 8px 0 4px; }
.spinner {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid var(--hover); border-top-color: var(--text);
  animation: spin 0.8s linear infinite;
}
.spinner.small { width: 14px; height: 14px; border-width: 1.5px; }
@keyframes spin { to { transform: rotate(360deg); } }

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; letter-spacing: 0.02em;
  color: var(--neutral); background: rgba(142, 142, 160, 0.14);
}
.badge.sucesso { color: var(--success); background: rgba(16, 163, 127, 0.14); }
.badge.sucesso_com_avisos { color: var(--warning); background: rgba(229, 165, 10, 0.14); }
.badge.falha { color: var(--danger); background: rgba(239, 68, 68, 0.14); }
.badge .icon { width: 13px; height: 13px; stroke-width: 2.25; }

.issues { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.issues li { display: flex; gap: 8px; align-items: flex-start; }
.issues .icon { width: 16px; height: 16px; margin-top: 3px; }
.issues .erro .icon { color: var(--danger); }
.issues .aviso .icon { color: var(--warning); }
.result-actions { display: flex; gap: 8px; flex-wrap: wrap; }
details.json { border: 1px solid var(--border); border-radius: 12px; }
details.json summary {
  display: flex; align-items: center; gap: 8px; padding: 8px 12px; cursor: pointer;
  font-size: 13px; color: var(--text-2); list-style: none; border-radius: 12px;
  transition: background var(--fast);
}
details.json summary::-webkit-details-marker { display: none; }
details.json summary:hover { background: var(--surface); }
details.json[open] summary { border-bottom: 1px solid var(--border); border-radius: 12px 12px 0 0; }
pre {
  margin: 0; padding: 12px; overflow: auto; max-height: 420px;
  font: 12.5px/1.55 var(--mono); color: var(--text-2); white-space: pre; tab-size: 2;
}

.note {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px; border-radius: 12px; background: var(--surface); font-size: 14px;
}
.note .icon { margin-top: 2px; }
.note.sucesso .icon { color: var(--success); }
.note.aviso .icon { color: var(--warning); }
.note.erro .icon { color: var(--danger); }
.note.neutro .icon { color: var(--neutral); }
.note > div { min-width: 0; flex: 1; }
.note strong { font-weight: 600; }
.note ul { margin: 6px 0 0; padding-left: 18px; color: var(--text-2); font-size: 13px; }
.note pre { padding: 6px 0 0; white-space: pre-wrap; max-height: 200px; }

/* Console e histórico */
.page-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 16px 0 20px; }
.page-head h1 { margin: 0; flex: 1; font-size: 22px; font-weight: 500; }
.console {
  border: 1px solid var(--border); border-radius: 12px; background: var(--sidebar); overflow: hidden;
}
.console pre { max-height: calc(100dvh - 260px); min-height: 280px; color: var(--text); white-space: pre-wrap; word-break: break-word; }
.console-foot { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--border); font-size: 13px; color: var(--text-2); }
.console-foot.ok { color: var(--success); }
.console-foot.falhou { color: var(--danger); }
select {
  height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); font-size: 14px;
}
.history { display: flex; flex-direction: column; gap: 2px; }
.history-row {
  display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 14px; align-items: center;
  padding: 8px; border-radius: 12px; transition: background var(--fast);
}
.history-row:hover { background: var(--surface); }
.thumb {
  width: 64px; height: 64px; border-radius: 8px; overflow: hidden; padding: 0; flex: none;
  border: 1px solid var(--border); background: var(--surface); display: grid; place-items: center; color: var(--text-2);
}
button.thumb { cursor: zoom-in; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.history-main { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.history-main .title { display: flex; align-items: center; gap: 8px; font-weight: 500; font-size: 14px; flex-wrap: wrap; }
.history-main .meta { font-size: 13px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-actions { display: flex; gap: 2px; }

/* Modais */
dialog { color: var(--text); padding: 0; border: 0; }
dialog::backdrop { background: rgba(0, 0, 0, 0.6); }
.modal {
  width: min(480px, calc(100vw - 32px)); padding: 20px; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--border);
}
.modal-head { display: flex; align-items: center; justify-content: space-between; margin: -6px -8px 12px 0; }
.modal-head h2 { margin: 0; font-size: 17px; font-weight: 600; }
.photo-preview {
  aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; background: var(--bg);
  display: grid; place-items: center; color: var(--text-2); font-size: 14px;
}
.photo-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.lightbox {
  width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0;
  background: rgba(10, 10, 10, 0.94); display: none; flex-direction: column;
}
.lightbox[open] { display: flex; }
.lightbox::backdrop { background: transparent; }
.lightbox-bar { display: flex; align-items: center; gap: 4px; padding: 10px 12px 10px 20px; font-size: 14px; color: var(--text-2); }
.lightbox-bar span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lightbox-body { flex: 1; overflow: auto; display: grid; place-items: center; padding: 0 16px 16px; }
.lightbox-body img { display: block; width: 1080px; max-width: none; height: auto; }

/* Toasts */
.toasts { position: fixed; top: 64px; right: 16px; z-index: 50; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 10px; max-width: min(380px, calc(100vw - 32px));
  padding: 10px 14px; border-radius: 12px; background: var(--hover); border: 1px solid var(--border);
  font-size: 14px; pointer-events: auto; animation: toast-in 150ms ease;
}
.toast.sucesso .icon { color: var(--success); }
.toast.erro .icon { color: var(--danger); }
.toast.saindo { opacity: 0; transition: opacity var(--fast); }
@keyframes toast-in { from { opacity: 0; transform: translateY(-4px); } }

.backdrop { display: none; }
.only-mobile { display: none; }

@media (max-width: 767px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar {
    position: fixed; inset: 0 auto 0 0; z-index: 30; width: min(280px, 85vw);
    transform: translateX(-100%); transition: transform var(--fast);
  }
  .app.menu-aberto .sidebar { transform: none; }
  .app.menu-aberto .backdrop { display: block; position: fixed; inset: 0; z-index: 25; background: rgba(0, 0, 0, 0.5); }
  .only-mobile { display: inline-grid; }
  .topbar { padding: 0 8px; }
  .topbar-title { font-size: 16px; }
  .composer-wrap { padding: 0 12px 10px; }
  .composer { gap: 6px; padding-left: 6px; }
  .segmented button { padding: 0 11px; }
  .hide-small, .composer-hint, .composer-foot { display: none; }
  .chip { padding: 0 10px; }
  .composer .advanced + .composer-hint { display: block; flex: 1; }
  .pair { grid-template-columns: 1fr; }
  .bubble { max-width: 90%; }
  .empty h1 { font-size: 24px; }
  .history-row { grid-template-columns: 56px minmax(0, 1fr); }
  .thumb { width: 56px; height: 56px; }
  .history-actions { grid-column: 2; }
  .popover { width: min(300px, calc(100vw - 40px)); }
}

/* Personalização de clientes */
.column.wide { max-width: 1080px; }
.sidebar-label:first-child { padding-top: 10px; }
.sidebar-empty { margin: 0; padding: 4px 10px 8px; font-size: 13px; color: var(--text-2); }
.page-intro { margin: 8px 0 20px; font-size: 14px; }
.note-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.note details { margin-top: 6px; color: var(--text-2); }
.note details summary { cursor: pointer; }
.button.ghost { border-color: transparent; color: var(--text-2); }
.button.ghost:hover:not(:disabled) { color: var(--text); }
a.button[download] { cursor: pointer; }

.input {
  height: 40px; width: 100%; padding: 0 14px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--surface); font-size: 15px;
  transition: border-color var(--fast);
}
.input:focus { border-color: rgba(255, 255, 255, 0.35); outline: none; }
.input:focus-visible { outline: 2px solid var(--text); outline-offset: 1px; }
.new-form { display: flex; flex-direction: column; gap: 28px; padding-bottom: 24px; }
.field { display: flex; flex-direction: column; gap: 8px; border: 0; margin: 0; padding: 0; min-width: 0; }
.field-label { font-weight: 500; font-size: 15px; padding: 0; margin-bottom: 4px; }
.field .input { max-width: 480px; }
.field-hint { margin: 0; font-size: 13px; color: var(--text-2); }
.field-hint.erro { color: var(--danger); }
.form-actions { display: flex; justify-content: flex-end; }
.base-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.base-card {
  position: relative; display: flex; flex-direction: column; gap: 8px; padding: 10px;
  border: 1px solid var(--border); border-radius: 16px; cursor: pointer;
  transition: background var(--fast), border-color var(--fast);
}
.base-card:hover { background: var(--surface); }
.base-card:has(.base-radio:checked) { border-color: var(--text); background: var(--surface); }
.base-card:has(.base-radio:focus-visible) { outline: 2px solid var(--text); outline-offset: 2px; }
.base-radio { position: absolute; opacity: 0; pointer-events: none; }
.base-name { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; }
.base-tag { white-space: nowrap; font-weight: 400; font-size: 11px; color: var(--text-2); padding: 1px 8px; border-radius: 999px; background: var(--hover); }
.base-desc { font-size: 13px; color: var(--text-2); }

.preview-box {
  position: relative; width: 100%; aspect-ratio: 1; overflow: hidden;
  border-radius: 12px; border: 1px solid var(--border); background: var(--surface);
}
.preview-box iframe { position: absolute; left: 0; top: 0; width: 1080px; height: 1080px; border: 0; transform-origin: 0 0; pointer-events: none; }
.preview-box.vazio { display: grid; place-items: center; color: var(--text-2); font-size: 13px; }
.preview-box.falhou { border-color: var(--danger); }
.preview-state { margin: 0; font-size: 13px; color: var(--text-2); min-height: 20px; }
.preview-state.erro { color: var(--danger); }

.editor { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: 28px; align-items: start; padding-bottom: 32px; }
.editor-controls { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.editor-controls .page-intro { margin: 8px 0 0; }
.editor-preview { position: sticky; top: 8px; display: flex; flex-direction: column; gap: 10px; padding-top: 8px; }
.panel { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 16px; background: var(--surface); }
.panel h2 { margin: 0; font-size: 15px; font-weight: 600; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 30px; }
.editor-preview .panel-head h2 { margin: 0; font-size: 15px; font-weight: 600; }
.color-list { display: flex; flex-direction: column; gap: 2px; }
.color-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) 104px; gap: 12px; align-items: center; padding: 6px 0; }
.swatch { position: relative; width: 40px; height: 40px; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); cursor: pointer; }
.swatch:focus-within { outline: 2px solid var(--text); outline-offset: 2px; }
.swatch input { position: absolute; inset: -8px; width: calc(100% + 16px); height: calc(100% + 16px); border: 0; padding: 0; cursor: pointer; background: none; }
.color-text { display: flex; flex-direction: column; min-width: 0; }
.color-label { font-size: 14px; font-weight: 500; }
.color-help { margin: 0; font-size: 13px; color: var(--text-2); }
.input.hex { height: 36px; padding: 0 10px; font: 13px var(--mono); background: var(--bg); text-transform: lowercase; }
.asset-row { display: flex; gap: 16px; align-items: center; }
.asset-text { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }
.asset-info { margin: 0; font-size: 14px; }
.asset-thumb {
  flex: none; width: 140px; height: 90px; border-radius: 10px; overflow: hidden; border: 1px solid var(--border);
  display: grid; place-items: center; padding: 8px;
  background: repeating-conic-gradient(#3a3a3a 0 25%, #2a2a2a 0 50%) 0 0 / 16px 16px;
}
.asset-thumb.fundo { width: 90px; padding: 0; }
.asset-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.asset-thumb.fundo img { width: 100%; height: 100%; object-fit: cover; }
.publish-state { font-size: 14px; }
.publish-state.ok { color: var(--success); }
.publish-state.pendente { color: var(--warning); }
.publish-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.segmented.small { background: var(--surface); }
.segmented.small button { height: 28px; padding: 0 12px; font-size: 13px; }

@media (max-width: 960px) {
  .editor { grid-template-columns: minmax(0, 1fr); }
  .editor-preview { position: static; order: -1; max-width: 440px; }
}
@media (max-width: 767px) {
  .color-row { grid-template-columns: 40px minmax(0, 1fr); }
  .color-row .hex { grid-column: 2; max-width: 140px; }
  .asset-thumb { width: 110px; height: 72px; }
  .base-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
