/* Painel — visual simples e claro, pensado para quem não é da área técnica */
:root {
  --bg: #f4f4f1;
  --surface: #ffffff;
  --ink: #17191c;
  --ink-soft: #5b6068;
  --line: #e2e1dc;
  --line-strong: #cfcdc6;
  --primary: #17191c;
  --primary-ink: #ffffff;
  --accent: #d4880f;
  --ok: #1f7a4d;
  --ok-bg: #e8f5ee;
  --warn: #9a5b00;
  --warn-bg: #fff4e0;
  --error: #b42318;
  --error-bg: #fdecea;
  --radius: 10px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.5; color: var(--ink); background: var(--bg); }
h1, h2, p { margin: 0; }
a { color: inherit; }
small { color: var(--ink-soft); font-weight: 400; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--ink-soft); }
.center { text-align: center; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Botões ---------- */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 9px 18px;
  font: inherit; font-weight: 600; text-decoration: none; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 8px; cursor: pointer;
  transition: background-color .15s, border-color .15s;
}
.button:hover { border-color: var(--ink); }
.button-primary { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.button-primary:hover { background: #33373d; }
.button-ghost { background: transparent; border-color: transparent; }
.button-ghost:hover { background: rgba(0, 0, 0, .05); border-color: transparent; }
.button-small { min-height: 34px; padding: 6px 12px; font-size: 14px; }
.button-block { width: 100%; }
.button[disabled] { opacity: .5; pointer-events: none; }

/* ---------- Formulários ---------- */
input[type=text], input[type=password], input[type=url], input[type=email], input[type=tel], input[type=date], textarea, select {
  width: 100%; min-height: 44px; padding: 10px 12px;
  font: inherit; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: 8px;
  transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; min-height: 0; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(23, 25, 28, .08); }
.form-stack { display: grid; gap: 16px; }
.form-stack label { display: grid; gap: 6px; font-weight: 600; }
.narrow { max-width: 420px; }

.notice { padding: 12px 16px; border-radius: 8px; margin-bottom: 20px; background: var(--ok-bg); color: var(--ok); font-weight: 500; }
.notice a { font-weight: 700; }
.notice ul { margin: 8px 0 0; padding-left: 20px; font-weight: 400; }
.notice-error { background: var(--error-bg); color: var(--error); }

/* ---------- Login / instalador ---------- */
.auth-page { display: grid; place-items: center; min-height: 100vh; padding: 24px 16px; }
.auth-card { width: 100%; max-width: 400px; padding: 32px; background: var(--surface); border-radius: 14px; box-shadow: 0 1px 2px rgba(0, 0, 0, .05), 0 20px 50px -30px rgba(0, 0, 0, .3); }
.auth-card-wide { max-width: 520px; }
.auth-card h1 { font-size: 24px; margin-bottom: 4px; }
.auth-card h2 { font-size: 16px; margin: 28px 0 12px; }
.auth-card > p { margin-bottom: 20px; }
.auth-card .actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.checks li { position: relative; padding-left: 26px; }
.checks li::before { position: absolute; left: 0; top: 0; font-weight: 700; }
.checks .ok::before { content: "✓"; color: var(--ok); }
.checks .fail { color: var(--error); font-weight: 600; }
.checks .fail::before { content: "✕"; }
.checks .warn { color: var(--warn); }
.checks .warn::before { content: "!"; left: 4px; }
.hint { margin-top: 6px; font-size: 13px; color: var(--ink-soft); font-weight: 400; }
/* Orientações dos campos: em destaque, para não passarem despercebidas */
.panel .hint {
  position: relative; margin-top: 4px; padding: 8px 12px 8px 34px; border-radius: 8px;
  background: #e8f1ff; color: #17458f; border-left: 3px solid #2f6fed;
  font-size: 13px; font-weight: 500; line-height: 1.45;
}
.panel .hint::before {
  content: "i"; position: absolute; left: 10px; top: 9px;
  width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center;
  background: #2f6fed; color: #fff; font: 700 11px/1 Georgia, serif;
}
.panel .hint strong { color: #0f3470; }
.panel .hint + .hint { margin-top: -2px; }

/* ---------- Instalador ---------- */
.install-page { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(900px 500px at 50% -10%, #e9dcc3, transparent 70%), #f1f0ec; }
.install { width: 100%; max-width: 520px; }
.install-card { background: var(--surface); border-radius: 18px; overflow: hidden; box-shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 30px 60px -30px rgba(0, 0, 0, .35); }
.install-brand { display: flex; align-items: center; gap: 14px; padding: 20px 28px; background: #111418; color: #fff; }
.install-brand div { display: grid; line-height: 1.25; }
.install-brand strong { font-size: 17px; letter-spacing: .02em; }
.install-brand span { font-size: 13px; color: rgba(255, 255, 255, .65); }
.install-mark { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: #f5a524; flex: none; }
.install-mark svg { width: 22px; height: 22px; fill: none; stroke: #111418; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.install-body { padding: 28px 28px 30px; }
.install-body h1 { font-size: 24px; }
.install-body > .muted { margin-top: 4px; }
.install-body h2 { display: flex; align-items: center; gap: 10px; font-size: 16px; margin: 28px 0 12px; }
.install-body form h2 { margin-top: 12px; }
.step { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 13px; }
.install-ok { padding: 12px 14px; border-radius: 10px; background: var(--ok-bg); color: var(--ok); font-weight: 700; }
.install-ok small { color: var(--ok); font-weight: 500; }
.install-checks { margin-top: 10px; font-size: 14px; }
.install-checks summary { cursor: pointer; color: var(--ink-soft); font-weight: 600; }
.install-checks .checks { margin-top: 10px; }
.form-stack label small { font-weight: 400; font-size: 13px; }
.password-field { position: relative; display: block; }
.password-field input { padding-right: 88px; }
.password-toggle { position: absolute; right: 6px; top: 50%; translate: 0 -50%; padding: 6px 10px; border: 0; border-radius: 6px; background: var(--bg); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.pw-meter { display: grid; gap: 4px; }
.pw-meter[hidden] { display: none; }
.pw-bar { height: 6px; border-radius: 99px; background: var(--bg); overflow: hidden; }
.pw-bar i { display: block; height: 100%; width: 0; transition: width .2s, background-color .2s; }
.pw-label, .pw-match { font-weight: 600 !important; }
.install-access { margin-top: 20px; padding: 16px 18px; border-radius: 12px; background: #fff8e8; border: 1px solid #f3dca8; }
.install-access-title { font-weight: 700; margin-bottom: 10px; }
.install-access dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; font-size: 14px; }
.install-access dt { color: var(--ink-soft); }
.install-access dd { margin: 0; font-weight: 600; word-break: break-all; }
.install-next-title { margin-top: 22px; font-weight: 700; }
.install-next { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 4px; }
.install-body .actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.license-input { font-family: ui-monospace, Consolas, monospace; letter-spacing: .04em; }
.terms-check { display: flex !important; grid-template-columns: none; align-items: flex-start; gap: 10px; font-weight: 400 !important; font-size: 14px; }
.terms-check input { width: 18px; height: 18px; min-height: 0; margin-top: 2px; flex: none; }
.install-foot { margin-top: 16px; text-align: center; font-size: 13px; color: var(--ink-soft); }

/* ---------- Tela de login ---------- */
.login-page {
  min-height: 100vh; display: grid; place-items: center; padding: 24px 16px;
  background:
    radial-gradient(900px 500px at 50% -10%, color-mix(in srgb, var(--brand) 22%, transparent), transparent 70%),
    #f1f0ec;
}
.login { width: 100%; max-width: 400px; }
.login-card { background: var(--surface); border-radius: 18px; overflow: hidden; box-shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 30px 60px -30px rgba(0, 0, 0, .35); }
.login-brand {
  display: grid; justify-items: center; gap: 10px; padding: 34px 24px 28px; text-align: center;
  background: radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--brand) 30%, #111418), #111418 70%);
  color: #fff;
}
.login-logo { max-width: 200px; max-height: 96px; width: auto; height: auto; }
.login-name { font-size: 14px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: rgba(255, 255, 255, .85); }
.login-name-big { font-size: 22px; letter-spacing: .06em; color: #fff; }
.login-mark { width: 44px; height: 44px; border-radius: 50%; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .5); background: conic-gradient(from 200deg, var(--brand), transparent 70%); }
.login-body { padding: 28px 28px 26px; }
.login-body h1 { font-size: 20px; margin-bottom: 18px; }
.login-body .muted { margin: -12px 0 16px; font-size: 14px; }
.button-brand { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); min-height: 46px; }
.button-brand:hover { filter: brightness(1.08); border-color: var(--brand); }
.login-page input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent); }
.login-help { margin-top: 18px; font-size: 13px; color: var(--ink-soft); }
.login-help summary { cursor: pointer; font-weight: 600; text-align: center; list-style: none; }
.login-help summary::-webkit-details-marker { display: none; }
.login-help summary:hover { color: var(--ink); }
.login-help p { margin-top: 10px; padding: 10px 12px; border-radius: 8px; background: var(--bg); }
.login-foot { margin-top: 16px; text-align: center; font-size: 12px; color: var(--ink-soft); }

/* ---------- Estrutura do editor ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px 24px; background: var(--surface); border-bottom: 1px solid var(--line);
}
.topbar-brand { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; min-width: 0; }
.topbar-brand strong { font-size: 16px; }
.topbar-logo { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; background: #111418; overflow: hidden; flex: none; }
.topbar-logo img { max-width: 30px; max-height: 30px; }
.topbar-actions { display: flex; gap: 4px; }
.topbar-actions form { margin: 0; }
.status { font-size: 13px; padding: 3px 10px; border-radius: 999px; font-weight: 600; }
.status-ok { background: var(--ok-bg); color: var(--ok); }
.status-pending { background: var(--warn-bg); color: var(--warn); }

.layout {
  display: grid; grid-template-columns: 230px minmax(0, 1fr) 340px;
  grid-template-areas: "nav main map";
  max-width: 1500px; margin: 0 auto;
}
.sidebar { grid-area: nav; }
.content { grid-area: main; }
.minimap { grid-area: map; }
.sidebar { position: sticky; top: 61px; align-self: start; height: calc(100vh - 61px); overflow-y: auto; padding: 24px 12px 24px 20px; }
.section-picker { display: none; }
.section-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.section-list a {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 9px 12px; border-radius: 8px; text-decoration: none; font-weight: 500; color: var(--ink-soft);
}
.section-list a:hover { background: rgba(0, 0, 0, .04); color: var(--ink); }
.section-list a.is-active { background: var(--surface); color: var(--ink); font-weight: 700; box-shadow: 0 1px 2px rgba(0, 0, 0, .06); }
.section-list .pill { font-size: 11px; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: var(--ok-bg); color: var(--ok); }
.section-list a.is-off .pill { background: #ecebe7; color: var(--ink-soft); }
.section-list .sep { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.support-link {
  display: grid; gap: 2px; margin-top: 18px; padding: 12px 14px; border-radius: 10px;
  background: #e7f7ee; color: #146c43; text-decoration: none; font-size: 13px; line-height: 1.35;
}
.support-link strong { font-size: 14px; }
.support-link:hover { background: #d5f1e1; }
.login-foot a { color: inherit; font-weight: 600; }
@media (max-width: 860px) { .support-link { display: none; } }

.content { padding: 24px 24px 120px; min-width: 0; }
.panel { background: var(--surface); border-radius: 14px; box-shadow: 0 1px 2px rgba(0, 0, 0, .05); }
.panel-head { padding: 24px 28px 20px; border-bottom: 1px solid var(--line); }
.panel-head h1 { font-size: 22px; }
.panel-head p { margin-top: 4px; color: var(--ink-soft); }
.panel-body { padding: 24px 28px 28px; display: grid; gap: 22px; }

.savebar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; align-items: center; justify-content: flex-end; gap: 10px;
  padding: 12px max(24px, calc((100vw - 1500px) / 2 + 24px));
  background: rgba(255, 255, 255, .95); backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
}
[hidden] { display: none !important; }
.dirty-note { margin-right: auto; font-size: 14px; font-weight: 600; color: var(--warn); }
.dirty-note::before { content: "● "; }

/* ---------- Campos ---------- */
.field { display: grid; gap: 6px; }
.field > label, .field > .label, .field-top label { font-weight: 600; }
.field-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.counter { font-size: 12px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.counter.is-near { color: var(--warn); font-weight: 600; }
.req { color: var(--error); }
.field-notice {
  display: flex; gap: 8px; padding: 8px 10px; border-radius: 8px;
  background: var(--warn-bg); color: var(--warn); font-size: 13px; font-weight: 600; line-height: 1.4;
}
.field-notice::before { content: "💡"; }

.toggle { display: inline-flex; align-items: center; gap: 10px; margin-top: 16px; font-weight: 600; cursor: pointer; }
.toggle input { position: absolute; opacity: 0; }
.toggle-track { position: relative; width: 44px; height: 26px; border-radius: 999px; background: var(--line-strong); transition: background-color .2s; flex: none; }
.toggle-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: transform .2s; }
.toggle input:checked + .toggle-track { background: var(--ok); }
.toggle input:checked + .toggle-track::after { transform: translateX(18px); }
.toggle input:focus-visible + .toggle-track { outline: 2px solid var(--accent); outline-offset: 2px; }
.panel.is-hidden-section .panel-body { opacity: .45; }

.color-field { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.color-field input[type=color] { width: 56px; height: 44px; padding: 3px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); cursor: pointer; }
.color-field .color-hex { width: 110px; font-family: ui-monospace, Consolas, monospace; text-transform: uppercase; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch { width: 30px; height: 30px; border-radius: 50%; border: 2px solid rgba(0, 0, 0, .12); cursor: pointer; padding: 0; }
.swatch:hover { transform: scale(1.1); }

.icon-select { display: flex; align-items: center; gap: 10px; }
.icon-preview { width: 24px; height: 24px; flex: none; fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.image-field { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.image-preview {
  position: relative; display: grid; place-items: center;
  width: 200px; aspect-ratio: 16 / 10; border-radius: 8px; overflow: hidden;
  background: repeating-conic-gradient(#eeede9 0 25%, #f7f7f4 0 50%) 0 0 / 16px 16px;
  border: 1px dashed var(--line-strong);
}
.image-preview img { width: 100%; height: 100%; object-fit: cover; }
.image-field[data-alpha] .image-preview img { object-fit: contain; padding: 10px; background: #1b1e22; }
.image-empty { font-size: 13px; color: var(--ink-soft); }
.image-field.has-image .image-empty { display: none; }
.image-field:not(.has-image) [data-remove] { display: none; }
.image-progress, .gallery-thumb.is-loading::after {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(255, 255, 255, .85); font-size: 13px; font-weight: 600;
}
.image-progress[hidden] { display: none; }
.image-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.image-actions label.button { cursor: pointer; }

.gallery-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.gallery-thumb { position: relative; aspect-ratio: 4 / 3; border-radius: 8px; overflow: hidden; background: #eeede9; }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumb.is-loading::after { content: "Enviando…"; }
.thumb-actions { position: absolute; left: 6px; right: 6px; bottom: 6px; display: flex; justify-content: space-between; gap: 4px; }
.thumb-actions button {
  width: 30px; height: 30px; border: 0; border-radius: 6px; cursor: pointer;
  background: rgba(0, 0, 0, .65); color: #fff; font-size: 18px; line-height: 1;
}
.thumb-actions button:hover { background: #000; }
.thumb-actions [data-remove]:hover { background: var(--error); }
.gallery-thumb:first-child [data-move="-1"], .gallery-thumb:last-child [data-move="1"] { visibility: hidden; }
.gallery-add {
  display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 2px;
  margin-top: 10px; padding: 18px; border: 1.5px dashed var(--line-strong); border-radius: 8px;
  font-weight: 600; cursor: pointer; color: var(--ink-soft);
}
.gallery-add:hover { border-color: var(--ink); color: var(--ink); }
.gallery-add.is-full { opacity: .5; pointer-events: none; }

.field-items > .label { font-size: 16px; }
.items { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.items-compact { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.item { margin: 0; padding: 14px 16px 16px; border: 1px solid var(--line); border-radius: 10px; min-width: 0; }
.item > legend { padding: 0 6px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); }
.item-fields { display: grid; gap: 12px; }
.items-compact .item { padding: 10px 12px 12px; }
.items-compact .item .field > label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.items-compact .field-top { display: block; }
.items-compact .counter { display: none; }

/* ---------- Miniatura do site ---------- */
.minimap { position: sticky; top: 61px; align-self: start; padding: 24px 20px 24px 0; }
.minimap-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; font-size: 14px; }
.minimap-head a { font-size: 13px; color: var(--ink-soft); }
.minimap-frame {
  position: relative; height: 480px; overflow: hidden; border-radius: 10px;
  background: #111418; box-shadow: 0 0 0 1px var(--line), 0 10px 30px -18px rgba(0, 0, 0, .4);
}
.minimap-frame iframe {
  position: absolute; top: 0; left: 0; width: 1280px; height: 2000px; border: 0;
  transform-origin: 0 0; pointer-events: none; opacity: 0; transition: opacity .3s;
}
.minimap-frame.is-ready iframe { opacity: 1; }
.minimap-msg {
  position: absolute; inset: auto 12px 12px; padding: 10px 12px; border-radius: 8px;
  background: rgba(255, 255, 255, .95); font-size: 13px; font-weight: 600; text-align: center;
}
.minimap .hint { margin-top: 10px; }
.minimap.is-seo .minimap-frame { display: none; }
.seo-label { font-size: 13px; color: var(--ink-soft); margin-bottom: 8px; }
.seo-card { display: grid; gap: 2px; padding: 16px; background: var(--surface); border-radius: 10px; box-shadow: 0 0 0 1px var(--line); font-family: Arial, sans-serif; }
.seo-url { font-size: 12px; color: #4d5156; }
.seo-title { font-size: 18px; line-height: 1.3; color: #1a0dab; }
.seo-desc { font-size: 13px; color: #4d5156; line-height: 1.45; }

/* ---------- Ícones (menu suspenso) ---------- */
.icon-picker { position: relative; }
.icon-picker-btn {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 8px 12px;
  font: inherit; color: var(--ink); text-align: left; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 8px;
}
.icon-picker-btn:hover, .icon-picker-btn[aria-expanded="true"] { border-color: var(--ink); }
.icon-picker-btn span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon-picker-current { width: 24px; height: 24px; flex: none; fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-picker-arrow { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--ink-soft); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s; }
.icon-picker-btn[aria-expanded="true"] .icon-picker-arrow { transform: rotate(180deg); }
.icon-picker-pop {
  position: absolute; left: 0; top: calc(100% + 6px); z-index: 30; width: max(100%, 244px);
  padding: 10px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 10px;
  box-shadow: 0 16px 40px -12px rgba(0, 0, 0, .3);
}
.icon-picker-pop p { font-size: 12px; font-weight: 600; color: var(--ink-soft); margin-bottom: 8px; }
.icon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); gap: 6px; }
.icon-option { position: relative; display: grid; place-items: center; aspect-ratio: 1; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; background: var(--surface); transition: border-color .15s, background-color .15s; }
.icon-option:hover { border-color: var(--ink); }
.icon-option input { position: absolute; opacity: 0; pointer-events: none; }
.icon-option svg { width: 22px; height: 22px; fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-option:has(input:checked) { background: var(--ink); border-color: var(--ink); }
.icon-option:has(input:checked) svg { stroke: #fff; }
.icon-option:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Listas de itens ---------- */
.item { position: relative; }
/* ✕ vermelho no canto do cartão */
.item:has(.item-remove) { padding-right: 16px; }
.item-remove {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  display: grid; place-items: center; width: 30px; height: 30px; padding: 0;
  border: 1.5px solid #f3c3bf; border-radius: 50%; background: var(--surface); color: var(--error); cursor: pointer;
  transition: background-color .15s, border-color .15s, transform .15s;
}
.item-remove svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; }
.item-remove:hover { background: var(--error-bg); border-color: var(--error); transform: scale(1.08); }
.item-remove:focus-visible { outline: 2px solid var(--error); outline-offset: 2px; }
.items-add { margin-top: 14px; border-style: dashed; }
.item-plain { padding-top: 16px; }
.date-error { font-size: 13px; font-weight: 600; color: var(--error); }
.date-past { font-size: 13px; font-weight: 600; color: var(--warn); background: var(--warn-bg); padding: 6px 10px; border-radius: 6px; }
input.is-invalid { border-color: var(--error); box-shadow: 0 0 0 3px rgba(180, 35, 24, .12); }
.items-add small { margin-left: 4px; }
.items-info { margin: 2px 0 6px; padding: 10px 14px; border-radius: 8px; background: #e8f1ff; color: #17458f; border-left: 3px solid #2f6fed; font-size: 14px; }

/* ---------- Reenquadrar ---------- */
.image-field:not(.can-reframe) [data-reframe] { display: none; }
.image-field[data-alpha] .image-preview { background: #1b1e22; }
.item .image-field[data-alpha] .image-preview { background: #111418; border-style: solid; }  /* mesmo fundo da seção no site */
.image-field[data-alpha] .image-preview img { object-fit: contain; padding: 8px; }
.image-field[data-alpha] .image-empty { color: rgba(255, 255, 255, .6); }
.item .image-preview { width: 100%; max-width: 220px; }
.item .image-field { gap: 10px; }

/* ---------- Licença ---------- */
.license-alert { margin-bottom: 20px; padding: 14px 16px; border-radius: 10px; background: var(--error-bg); color: var(--error); border-left: 4px solid var(--error); }
.license-alert p { margin: 4px 0 10px; font-size: 14px; }
.update-pill { align-self: center; padding: 6px 12px; border-radius: 999px; background: #e8f1ff; color: #17458f; font-size: 13px; font-weight: 700; text-decoration: none; }
.update-pill:hover { background: #d6e6ff; }
.account-license { border-top: 1px solid var(--line); }
.account-license h2 { font-size: 18px; }
.license-info { display: grid; grid-template-columns: 160px 1fr; gap: 8px 16px; margin: 0; font-size: 14px; }
.license-info dt { color: var(--ink-soft); }
.license-info dd { margin: 0; font-weight: 600; }
.license-info code { font-size: 13px; }
.lic-tag { display: inline-block; padding: 1px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.lic-ok { background: var(--ok-bg); color: var(--ok); }
.lic-off { background: var(--error-bg); color: var(--error); }
.update-box { display: grid; gap: 8px; padding: 16px; border-radius: 12px; background: #f4f8ff; border: 1px solid #cfe0ff; }
.update-box p { font-size: 14px; }
.license-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.license-actions form { margin: 0; }
@media (max-width: 860px) { .license-info { grid-template-columns: 1fr; } .update-pill { display: none; } }

/* ---------- Campo de vídeo ---------- */
.video-field { display: grid; gap: 10px; }
.video-tabs { display: inline-flex; padding: 3px; gap: 3px; border-radius: 9px; background: var(--bg); justify-self: start; }
.video-tabs button { padding: 6px 12px; border: 0; border-radius: 7px; background: transparent; font: inherit; font-size: 13px; font-weight: 600; color: var(--ink-soft); cursor: pointer; }
.video-field[data-mode="link"] [data-mode-btn="link"], .video-field[data-mode="file"] [data-mode-btn="file"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .1); }
.video-field[data-mode="link"] .video-file, .video-field[data-mode="file"] .video-link { display: none; }
.video-field.has-video .video-link input, .video-field.has-video .video-file > label { display: none; }
.video-field.has-video .video-tabs { display: none; }
.video-status { font-size: 13px; margin-top: 6px; }
.video-status:empty { display: none; }
.video-status.is-error { color: var(--error); font-weight: 600; background: var(--error-bg); padding: 8px 12px; border-radius: 8px; }
.video-progress { display: grid; gap: 6px; margin-top: 10px; max-width: 360px; padding: 12px 14px; border-radius: 10px; background: #e8f1ff; }
.video-progress small { color: #17458f; }
.video-progress-name { font-size: 13px; font-weight: 700; color: #0f3470; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.video-progress-name::before { content: "🎬 "; }
.video-progress-bar { background: #fff !important; }
.video-progress-bar span { background: #2f6fed !important; }
.video-progress.is-indeterminate .video-progress-bar span { width: 35% !important; animation: vp-slide 1.1s ease-in-out infinite; }
@keyframes vp-slide { from { transform: translateX(-100%); } to { transform: translateX(290%); } }
.video-field.is-uploading .video-file > label { display: none; }
.video-tabs button { white-space: nowrap; }
/* Foto sendo preparada/enviada: aviso bem visível */
.image-field.is-preparing .image-progress { display: grid !important; }
.gallery-add.is-busy { pointer-events: none; border-color: #2f6fed; color: #17458f; background: #e8f1ff; }
.video-progress-bar { height: 8px; border-radius: 99px; background: var(--bg); overflow: hidden; }
.video-progress-bar span { display: block; height: 100%; width: 0; background: var(--ink); transition: width .2s; }
.video-preview { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.video-thumb { position: relative; width: 200px; aspect-ratio: 16 / 9; padding: 0; border: 0; border-radius: 8px; overflow: hidden; background: #111418; cursor: pointer; }
.video-thumb img { width: 100%; height: 100%; object-fit: cover; }
.video-thumb-play { position: absolute; inset: 0; margin: auto; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: rgba(0, 0, 0, .65); color: #fff; font-size: 16px; padding-left: 3px; }
.video-thumb:hover .video-thumb-play { background: #000; }
.video-info { display: grid; gap: 6px; justify-items: start; font-size: 14px; }
.item .video-thumb { width: 100%; max-width: 220px; }
.video-dialog { width: min(900px, 94vw); padding: 12px; border: 0; border-radius: 12px; background: #111418; }
.video-dialog::backdrop { background: rgba(0, 0, 0, .75); }
.video-dialog [data-video-close] { margin: 0 0 10px auto; display: flex; }
.video-dialog-body iframe, .video-dialog-body video { display: block; width: 100%; aspect-ratio: 16 / 9; max-height: 75vh; border: 0; background: #000; border-radius: 8px; }

/* ---------- Enquadrador ---------- */
.cropper { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: rgba(12, 13, 15, .82); }
.cropper-box { width: min(900px, 100%); max-height: 100%; overflow: auto; background: var(--surface); border-radius: 14px; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .6); }
.cropper-head { padding: 18px 22px 12px; }
.cropper-head h2 { font-size: 19px; }
.cropper-head p { margin-top: 2px; font-size: 14px; color: var(--ink-soft); }
.cropper-stage { display: grid; place-items: center; padding: 14px 22px; background: #1b1e22; overflow: hidden; }
.cropper-frame {
  position: relative; overflow: hidden; touch-action: none; cursor: grab; user-select: none;
  box-shadow: 0 0 0 2px #fff, 0 0 0 9999px rgba(0, 0, 0, .35);
}
.cropper-frame.is-alpha { background: repeating-conic-gradient(#3a3d42 0 25%, #2c2f33 0 50%) 0 0 / 16px 16px; }
.cropper-frame.is-dragging { cursor: grabbing; }
.cropper-frame img { position: absolute; top: 0; left: 0; max-width: none; transform-origin: 0 0; pointer-events: none; }
.cropper-grid {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, transparent calc(33.33% - .5px), rgba(255, 255, 255, .35) calc(33.33% - .5px) calc(33.33% + .5px), transparent calc(33.33% + .5px) calc(66.66% - .5px), rgba(255, 255, 255, .35) calc(66.66% - .5px) calc(66.66% + .5px), transparent calc(66.66% + .5px)),
    linear-gradient(0deg, transparent calc(33.33% - .5px), rgba(255, 255, 255, .35) calc(33.33% - .5px) calc(33.33% + .5px), transparent calc(33.33% + .5px) calc(66.66% - .5px), rgba(255, 255, 255, .35) calc(66.66% - .5px) calc(66.66% + .5px), transparent calc(66.66% + .5px));
}
.cropper-guides { position: absolute; inset: 0; pointer-events: none; }
.cropper-guide { position: absolute; border: 1.5px solid rgba(255, 255, 255, .85); border-radius: 4px; background: rgba(0, 0, 0, .18); }
.cropper-guide.is-dashed { border-style: dashed; background: transparent; }
.cropper-guide span { position: absolute; left: 6px; top: 6px; padding: 2px 6px; border-radius: 4px; font-size: 11px; font-weight: 700; background: rgba(0, 0, 0, .7); color: #fff; }
.cropper-controls { display: flex; align-items: center; gap: 12px; padding: 14px 22px 4px; font-size: 20px; font-weight: 700; color: var(--ink-soft); }
.cropper-controls input { flex: 1; accent-color: var(--ink); }
.cropper-quality { min-height: 20px; padding: 0 22px; font-size: 13px; }
.cropper-quality.is-ok { color: var(--ok); }
.cropper-quality.is-low { color: var(--warn); font-weight: 600; }
.cropper-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 12px 22px 18px; }

/* ---------- Telas médias ---------- */
@media (max-width: 1240px) {
  .layout { grid-template-columns: 220px minmax(0, 1fr); grid-template-areas: "nav map" "nav main"; }
  .minimap { position: static; padding: 24px 24px 0; display: grid; grid-template-columns: 1fr; }
  .minimap-frame { height: 240px; }
}

/* ---------- Celular ---------- */
@media (max-width: 860px) {
  .topbar { padding: 10px 16px; }
  .topbar-actions .button { padding: 6px 10px; white-space: nowrap; }
  .status { font-size: 12px; }
  .layout { grid-template-columns: 1fr; grid-template-areas: "nav" "map" "main"; }
  .minimap { padding: 12px 12px 0; }
  .minimap-frame { height: 170px; }
  .minimap > .hint { display: none; }
  .cropper { padding: 0; }
  .cropper-box { border-radius: 0; height: 100%; display: flex; flex-direction: column; }
  .cropper-stage { flex: 1; padding: 12px; }
  .sidebar { position: sticky; top: 57px; z-index: 10; height: auto; padding: 10px 16px; background: var(--bg); border-bottom: 1px solid var(--line); }
  .section-list { display: none; }
  .section-picker { display: block; }
  .section-picker select { font-weight: 700; }
  .content { padding: 16px 12px 110px; }
  .panel-head, .panel-body { padding-left: 18px; padding-right: 18px; }
  .savebar { padding: 10px 12px; gap: 6px; }
  .savebar .button { flex: 1; padding: 8px 10px; font-size: 14px; }
  .dirty-note { display: none !important; }
  .image-preview { width: 100%; max-width: 320px; }
}
/* p:d7d952b1a0aa */
