/* Painel Focus Flooring — ferramenta, não vitrine: Figtree em escala fixa, areia e branco,
   terracota só em ações principais e seleção. Cores da marca (walnut, terracota, areia). */
@font-face { font-family: "Figtree"; src: url("../fonts/figtree-latin-var.woff2") format("woff2"); font-weight: 300 800; font-display: swap; }

:root {
  --ink: #24100f; --ink-soft: #5a4642; --muted: #7d6a64;
  --paper: #fbf8f5; --stone: #f3ece6; --stone-deep: #e8ddd3; --white: #fff;
  --line: #e0d3c8; --line-soft: #ece3db;
  --bronze: #b8472a; --bronze-deep: #752c1c; --bronze-press: #5a2114; --bronze-light: #ecc9bb;
  --ok: #2e6a43; --ok-bg: #e9f3ec; --err: #a3352a; --err-bg: #fbecea; --warn: #8a5a12; --warn-bg: #fbf1df;
  --r: 6px; --r-sm: 4px;
  --shadow: 0 1px 2px rgb(36 16 15 / 0.06), 0 8px 24px -12px rgb(36 16 15 / 0.25);
  --side: 15rem;
  --font: "Figtree", "Helvetica Neue", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body.adm { font-family: var(--font); font-size: 0.9375rem; line-height: 1.5; color: var(--ink); background: var(--stone); font-variant-numeric: lining-nums; -webkit-font-smoothing: antialiased; accent-color: var(--bronze-deep); }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: var(--bronze-deep); text-underline-offset: 0.2em; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
:focus-visible { outline: 2px solid var(--bronze-deep); outline-offset: 2px; border-radius: 3px; }
::selection { background: var(--bronze-light); }
h1 { font-size: 1.5rem; font-weight: 650; letter-spacing: -0.01em; line-height: 1.2; }
h2 { font-size: 1.0625rem; font-weight: 650; }
code, .key { font-family: ui-monospace, Menlo, monospace; font-size: 0.875em; background: var(--stone); padding: 0.1em 0.35em; border-radius: 3px; }
.key { display: inline-block; font-size: 1rem; letter-spacing: 0.06em; padding: 0.3rem 0.6rem; margin-top: 0.3rem; user-select: all; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 1rem; top: -4rem; z-index: 100; background: var(--ink); color: #fff; padding: 0.5rem 1rem; }
.skip:focus { top: 1rem; }
.icon { width: 1.15rem; height: 1.15rem; flex: none; }
.rot90 { transform: rotate(90deg); }
[hidden] { display: none !important; }

/* ---------------------------------------------------------------- estrutura */
.side { position: fixed; inset: 0 auto 0 0; width: var(--side); background: #24100f; color: rgb(255 255 255 / 0.85); display: flex; flex-direction: column; z-index: 40; overflow-y: auto; }
.side__brand { display: flex; align-items: center; gap: 0.75rem; padding: 1rem 1.25rem; color: #fff; text-decoration: none; border-bottom: 1px solid rgb(255 255 255 / 0.1); }
.side__brand .logo { height: 1.25rem; width: auto; }
.side__brand span { font-size: 0.75rem; font-weight: 650; letter-spacing: 0.14em; text-transform: uppercase; color: var(--bronze-light); }
.side nav { flex: 1; padding: 0.75rem 0.5rem; }
.side nav a { display: flex; align-items: center; gap: 0.7rem; padding: 0.6rem 0.75rem; border-radius: var(--r-sm); color: inherit; text-decoration: none; font-weight: 500; }
.side nav a:hover { background: rgb(255 255 255 / 0.07); color: #fff; }
.side nav a[aria-current="page"] { background: rgb(227 201 159 / 0.14); color: #fff; box-shadow: inset 3px 0 0 var(--bronze-light); }
.side nav a .icon { color: var(--bronze-light); }
.badge { margin-left: auto; min-width: 1.4rem; padding: 0 0.4rem; border-radius: 999px; background: var(--bronze-deep); color: #fff; font-size: 0.75rem; font-weight: 700; line-height: 1.4rem; text-align: center; }
.side__foot { display: grid; gap: 0.2rem; padding: 0.75rem 1rem 1.25rem; border-top: 1px solid rgb(255 255 255 / 0.1); }
.side__foot a { display: flex; gap: 0.5rem; align-items: center; color: rgb(255 255 255 / 0.7); font-size: 0.875rem; text-decoration: none; padding: 0.3rem 0; }
.side__foot a:hover { color: #fff; }
.side__version { padding-top: 0.4rem; font-size: 0.75rem; color: rgb(255 255 255 / 0.45); }
.pkg { display: grid; gap: 0.75rem; }
.pkg__ver { display: flex; align-items: baseline; gap: 0.75rem; flex-wrap: wrap; }
.pkg__ver strong { font-size: 1.5rem; }
.pkg ul { margin: 0; padding-left: 1.2rem; }
.shell { margin-left: var(--side); min-height: 100vh; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 1rem; padding: 0.6rem 1.5rem; background: rgb(246 242 234 / 0.94); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.top__menu { display: none; }
.search-btn { display: flex; align-items: center; gap: 0.6rem; flex: 1; max-width: 30rem; padding: 0.5rem 0.8rem; border: 1px solid var(--line); border-radius: var(--r); background: var(--white); color: var(--muted); text-align: left; }
.search-btn span { flex: 1; }
kbd { font: 600 0.7rem var(--font); padding: 0.15rem 0.4rem; border: 1px solid var(--line); border-radius: 3px; color: var(--muted); }
.top__user { margin-left: auto; display: flex; align-items: center; gap: 1rem; }
.top__user a { display: flex; align-items: center; gap: 0.4rem; color: var(--ink); text-decoration: none; font-weight: 600; }
.main { flex: 1; width: 100%; max-width: 78rem; padding: 1.5rem 1.5rem 7rem; }
@media (max-width: 960px) {
  .side { transform: translateX(-100%); visibility: hidden; transition: transform 200ms ease, visibility 0s 200ms; }
  .side-open .side { transform: none; visibility: visible; box-shadow: 0 0 40px rgb(0 0 0 / 0.3); transition: transform 200ms ease; }
  .shell { margin-left: 0; }
  .top__menu { display: grid; }
  .top { padding: 0.5rem 1rem; }
  .search-btn kbd, .top__user a span { display: none; }
  .main { padding: 1rem 1rem 7rem; }
  .hide-sm { display: none !important; }
}

/* ---------------------------------------------------------------- cabeçalhos e blocos */
.crumbs-adm { font-size: 0.8125rem; color: var(--muted); margin-bottom: 0.4rem; }
.crumbs-adm a { color: var(--ink-soft); text-decoration: none; }
.crumbs-adm a:hover { text-decoration: underline; }
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 1rem; margin-bottom: 1rem; }
.page-head__tools { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.lead-adm { max-width: 46rem; color: var(--ink-soft); margin-bottom: 1.25rem; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 1.25rem; }
.card h2 { margin-bottom: 0.75rem; display: flex; align-items: center; gap: 0.5rem; }
.narrow { max-width: 34rem; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr)); gap: 1rem; align-items: start; }
.cols .card { display: grid; gap: 0.25rem; }
.note { padding: 0.65rem 0.9rem; border-radius: var(--r-sm); margin-bottom: 1rem; font-weight: 500; }
.note--ok { background: var(--ok-bg); color: var(--ok); }
.note--err { background: var(--err-bg); color: var(--err); }
.note--draft { background: var(--warn-bg); color: var(--warn); }
.empty { color: var(--ink-soft); display: flex; gap: 0.5rem; align-items: center; }
.empty .icon { color: var(--ok); }
.empty-state { text-align: center; padding: 2.5rem 1rem; display: grid; justify-items: center; gap: 0.75rem; color: var(--ink-soft); }
.help { font-size: 0.8125rem; color: var(--muted); }
.link { color: var(--bronze-deep); text-decoration: underline; text-underline-offset: 0.2em; font-weight: 600; }
.link--danger { color: var(--err); font-size: 0.8125rem; }

/* ---------------------------------------------------------------- botões */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem; min-height: 2.5rem; padding: 0.5rem 1rem; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--white); color: var(--ink); font-weight: 650; font-size: 0.875rem; text-decoration: none; white-space: nowrap; transition: background-color 150ms, border-color 150ms; }
.btn:hover { border-color: var(--ink-soft); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: progress; }
.btn--primary { background: var(--bronze-deep); border-color: var(--bronze-deep); color: #fff; }
.btn--primary:hover { background: var(--bronze-press); border-color: var(--bronze-press); }
.btn--quiet { background: transparent; border-color: transparent; color: var(--ink-soft); }
.btn--quiet:hover { background: var(--white); border-color: var(--line); }
.btn--danger { color: var(--err); border-color: #e6c4bf; }
.btn--danger:hover { background: var(--err-bg); border-color: var(--err); }
.btn--sm { min-height: 2.1rem; padding: 0.3rem 0.75rem; font-size: 0.8125rem; }
.btn--block { width: 100%; }
.btn .icon { width: 1rem; height: 1rem; }
.icon-btn { display: inline-grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: var(--r-sm); color: var(--ink-soft); }
.icon-btn:hover { background: var(--stone); color: var(--ink); }
.chip-adm { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.35rem 0.8rem; border: 1px solid var(--line); border-radius: 999px; background: var(--white); color: var(--ink); font-size: 0.8125rem; font-weight: 600; text-decoration: none; }
.chip-adm[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip-adm b { font-size: 0.75rem; opacity: 0.8; }

/* ---------------------------------------------------------------- campos */
.ed { display: grid; gap: 1rem; align-content: start; min-width: 0; }
.grp { border: 1px solid var(--line); border-radius: var(--r); background: var(--white); padding: 1.25rem; display: grid; gap: 1.1rem; min-width: 0; scroll-margin-top: 5rem; }
.grp legend { font-weight: 700; font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--bronze-deep); padding: 0 0.4rem; }
.toc { display: flex; flex-wrap: wrap; gap: 0.4rem; position: sticky; top: 3.6rem; z-index: 5; padding: 0.5rem 0; background: var(--stone); }
.toc a { padding: 0.3rem 0.7rem; border-radius: 999px; background: var(--white); border: 1px solid var(--line); font-size: 0.8125rem; font-weight: 600; text-decoration: none; color: var(--ink); }
.fld { display: grid; gap: 0.35rem; min-width: 0; scroll-margin-top: 6rem; }
.fld--short { max-width: 20rem; }
.fld__label { font-weight: 650; font-size: 0.875rem; }
.req { color: var(--err); font-weight: 700; }
.inp { width: 100%; min-height: 2.6rem; padding: 0.55rem 0.75rem; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--white); transition: border-color 150ms, box-shadow 150ms; }
.inp:hover { border-color: #c9bca7; }
.inp:focus { outline: none; border-color: var(--bronze-deep); box-shadow: 0 0 0 3px rgb(138 103 56 / 0.18); }
textarea.inp { resize: vertical; line-height: 1.55; }
.inp--sm { min-height: 2.1rem; padding: 0.35rem 0.6rem; font-size: 0.875rem; }
.inp--code { font-size: 1.4rem; letter-spacing: 0.3em; text-align: center; max-width: 12rem; }
select.inp { appearance: none; padding-right: 2.2rem; background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235c5750' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 0.6rem center / 1rem; }
.has-error .inp, .has-error .rich__area { border-color: var(--err); }
.fld__error { color: var(--err); font-size: 0.8125rem; font-weight: 600; }
.count { justify-self: end; font-size: 0.75rem; color: var(--muted); margin-top: -0.2rem; }
.count[data-state="warn"] { color: var(--warn); }
.count[data-state="over"] { color: var(--err); font-weight: 700; }
.fld--status { padding: 0.9rem 1.1rem; border: 1px solid var(--line); border-radius: var(--r); background: var(--white); }

/* interruptor */
.switch { display: inline-flex; align-items: center; gap: 0.6rem; cursor: pointer; font-weight: 500; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch__ui { position: relative; flex: none; width: 2.5rem; height: 1.4rem; border-radius: 999px; background: #cfc6b8; transition: background-color 150ms; }
.switch__ui::after { content: ""; position: absolute; top: 0.2rem; left: 0.2rem; width: 1rem; height: 1rem; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgb(0 0 0 / 0.25); transition: transform 150ms; }
.switch input:checked + .switch__ui { background: var(--bronze-deep); }
.switch input:checked + .switch__ui::after { transform: translateX(1.1rem); }
.switch input:focus-visible + .switch__ui { outline: 2px solid var(--bronze-deep); outline-offset: 2px; }
.switch--sm .switch__ui { width: 2.1rem; height: 1.2rem; }
.switch--sm .switch__ui::after { width: 0.8rem; height: 0.8rem; }
.switch--sm input:checked + .switch__ui::after { transform: translateX(0.9rem); }

/* foto, vídeo e galeria */
.pick { display: grid; gap: 0.6rem; padding: 0.75rem; border: 1px dashed var(--line); border-radius: var(--r); background: var(--paper); }
.pick.is-over, .gal.is-over { border-color: var(--bronze-deep); background: #fbf5e9; }
.pick__card { display: grid; grid-template-columns: 9rem 1fr; gap: 0.9rem; align-items: start; }
.pick__card.is-empty { display: grid; place-items: center; grid-template-columns: 1fr; min-height: 5rem; color: var(--muted); }
.pick__img { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--r-sm); background: var(--stone-deep); cursor: crosshair; }
.pick__img img { width: 100%; height: 100%; object-fit: cover; }
.focus-dot { position: absolute; width: 1rem; height: 1rem; margin: -0.5rem 0 0 -0.5rem; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 0 0 2px var(--bronze-deep), 0 1px 4px rgb(0 0 0 / 0.4); pointer-events: none; }
.pick__alt { display: grid; gap: 0.3rem; font-size: 0.8125rem; font-weight: 600; }
.pick__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.pick__drop { font-size: 0.75rem; color: var(--muted); }
.pick__info { display: flex; align-items: center; gap: 0.5rem; font-weight: 600; }
.pick__status:empty { display: none; }
.gal { display: grid; grid-template-columns: repeat(auto-fill, minmax(6.5rem, 1fr)); gap: 0.5rem; padding: 0.6rem; border: 1px dashed var(--line); border-radius: var(--r); background: var(--paper); min-height: 4rem; list-style: none; }
.gal__item { position: relative; aspect-ratio: 1; border-radius: var(--r-sm); overflow: hidden; background: var(--stone-deep); cursor: grab; }
.gal__item img { width: 100%; height: 100%; object-fit: cover; }
.gal__item:first-child { box-shadow: 0 0 0 2px var(--bronze-deep); }
.gal__x { position: absolute; top: 0.25rem; right: 0.25rem; display: grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: rgb(36 16 15 / 0.75); color: #fff; font-weight: 700; }
.gal__x .icon { width: 0.9rem; height: 0.9rem; }
.gal__warn { position: absolute; left: 0.25rem; top: 0.25rem; width: 1.3rem; height: 1.3rem; border-radius: 50%; background: var(--warn); color: #fff; font-weight: 800; font-size: 0.8rem; text-align: center; line-height: 1.3rem; }
.is-dragging { opacity: 0.45; }
@media (max-width: 600px) { .pick__card { grid-template-columns: 1fr; } }

/* listas repetíveis */
.rows { display: grid; gap: 0.6rem; list-style: none; padding: 0; }
.row { border: 1px solid var(--line); border-radius: var(--r); background: var(--paper); }
.row__head { display: flex; align-items: center; gap: 0.5rem; padding: 0.4rem 0.5rem 0.4rem 0.75rem; border-bottom: 1px solid var(--line-soft); }
.row__title { flex: 1; font-weight: 650; font-size: 0.875rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row__tools { display: flex; }
.row__body { display: grid; gap: 0.9rem; padding: 0.9rem; }
.handle { cursor: grab; color: var(--muted); letter-spacing: -0.15em; font-weight: 800; user-select: none; padding: 0 0.2rem; }

/* ícones e referências */
.ico-pick summary { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.45rem 0.8rem; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--white); cursor: pointer; font-weight: 600; list-style: none; }
.ico-pick summary::-webkit-details-marker { display: none; }
.ico-pick summary .icon { color: var(--bronze-deep); }
.ico-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr)); gap: 0.35rem; margin-top: 0.5rem; padding: 0.5rem; border: 1px solid var(--line); border-radius: var(--r); background: var(--white); max-height: 18rem; overflow: auto; }
.ico-opt { display: flex; align-items: center; gap: 0.45rem; padding: 0.4rem 0.5rem; border-radius: var(--r-sm); font-size: 0.8125rem; cursor: pointer; }
.ico-opt:hover { background: var(--stone); }
.ico-opt input { position: absolute; opacity: 0; }
.ico-opt:has(input:checked) { background: var(--ink); color: #fff; }
.ico-opt:has(input:focus-visible) { outline: 2px solid var(--bronze-deep); }
.refs { display: grid; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); gap: 0.35rem; }
.ref { display: flex; align-items: center; gap: 0.5rem; padding: 0.45rem 0.6rem; border: 1px solid var(--line-soft); border-radius: var(--r-sm); background: var(--white); cursor: pointer; font-size: 0.875rem; }
.ref:has(input:checked) { border-color: var(--bronze-deep); background: #fbf5e9; }
.ref .icon { color: var(--bronze-deep); }

/* texto formatado */
.rich { display: grid; gap: 0; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; }
.rich__bar { display: flex; flex-wrap: wrap; gap: 0.2rem; padding: 0.35rem; background: var(--stone); border-bottom: 1px solid var(--line); }
.rich__bar button { padding: 0.25rem 0.6rem; border-radius: 3px; font-size: 0.8125rem; font-weight: 600; }
.rich__bar button:hover { background: var(--white); }
.rich__area { min-height: 18rem; max-height: 60vh; overflow: auto; border: 0; border-radius: 0; padding: 0.9rem 1rem; line-height: 1.6; }
.rich__area h2 { font-size: 1.15rem; margin: 1rem 0 0.4rem; }
.rich__area p, .rich__area ul { margin: 0 0 0.6rem; }

/* ---------------------------------------------------------------- editor + prévia */
.editor { display: grid; gap: 1.25rem; align-items: start; }
.editor--preview { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); }
.pv { position: sticky; top: 4.2rem; display: grid; gap: 0.5rem; }
.pv__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.75rem; }
.pv__modes { margin-left: auto; display: flex; gap: 0.3rem; }
.pv__frame { height: calc(100vh - 12rem); min-height: 26rem; border: 1px solid var(--line); border-radius: var(--r); background: var(--white); overflow: hidden; }
.pv__frame iframe { display: block; border: 0; transform-origin: 0 0; background: #fff; }
@media (max-width: 1180px) { .editor--preview { grid-template-columns: 1fr; } .pv { position: static; } .pv__frame { height: 70vh; } }

.actionbar { position: fixed; z-index: 35; left: var(--side); right: 0; bottom: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; padding: 0.65rem 1.5rem calc(0.65rem + env(safe-area-inset-bottom)); background: rgb(255 255 255 / 0.96); backdrop-filter: blur(6px); border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgb(36 16 15 / 0.06); }
.actionbar__status { margin-left: auto; font-size: 0.8125rem; color: var(--muted); }
.actionbar__status[data-state="dirty"] { color: var(--warn); font-weight: 600; }
.actionbar__status[data-state="ok"] { color: var(--ok); font-weight: 600; }
.actionbar__status[data-state="err"] { color: var(--err); font-weight: 600; }
.actionbar form { display: contents; }
@media (max-width: 960px) { .actionbar { left: 0; padding: 0.5rem 1rem calc(0.5rem + env(safe-area-inset-bottom)); } .actionbar__status { order: -1; width: 100%; margin: 0; } }

/* ---------------------------------------------------------------- listas, cards e tabelas */
.items { display: grid; gap: 0.5rem; margin: 0 0 0.75rem; padding: 0; list-style: none; }
.item { display: flex; align-items: center; gap: 0.75rem; padding: 0.55rem 0.75rem; background: var(--white); border: 1px solid var(--line); border-radius: var(--r); }
.item.is-off { opacity: 0.6; }
.item__thumb { width: 4rem; height: 3rem; object-fit: cover; border-radius: var(--r-sm); background: var(--stone-deep); }
.item__ico { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: var(--r-sm); background: var(--stone); color: var(--bronze-deep); }
.item__main { flex: 1; min-width: 0; display: grid; text-decoration: none; color: var(--ink); }
.item__main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item__main span { font-size: 0.8125rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item__main:hover strong { text-decoration: underline; }
.item__tools { display: flex; align-items: center; gap: 0.25rem; }
.tiles-adm { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: 0.75rem; }
.tile-adm { display: grid; gap: 0.3rem; text-decoration: none; color: var(--ink); height: 100%; transition: border-color 150ms, box-shadow 150ms; }
.tile-adm:hover { border-color: var(--bronze); box-shadow: var(--shadow); }
.tile-adm .icon { width: 1.5rem; height: 1.5rem; color: var(--bronze-deep); margin-bottom: 0.3rem; }
.tile-adm span { font-size: 0.8125rem; color: var(--muted); }
.sections { display: grid; gap: 0.5rem; }
.sec { display: grid; grid-template-columns: auto 5.5rem 1fr auto; align-items: center; gap: 1rem; padding: 0.6rem 1rem 0.6rem 0.75rem; text-decoration: none; color: var(--ink); }
.sec:hover { border-color: var(--bronze); box-shadow: var(--shadow); }
.sec__n { width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--stone); display: grid; place-items: center; font-weight: 700; font-size: 0.8125rem; color: var(--ink-soft); }
.sec__thumb { width: 5.5rem; height: 3.6rem; border-radius: var(--r-sm); overflow: hidden; background: var(--stone); display: grid; place-items: center; color: var(--muted); }
.sec__thumb img { width: 100%; height: 100%; object-fit: cover; }
.sec__body { display: grid; min-width: 0; }
.sec__body span { font-size: 0.8125rem; color: var(--muted); }
.sec__body em { font-style: normal; font-size: 0.8125rem; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sec__go { display: flex; align-items: center; gap: 0.3rem; color: var(--bronze-deep); font-weight: 650; font-size: 0.875rem; }
@media (max-width: 600px) { .sec { grid-template-columns: 4rem 1fr; } .sec__n, .sec__go { display: none; } .sec__thumb { width: 4rem; height: 3rem; } }

.table { width: 100%; border-collapse: collapse; background: var(--white); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.table th, .table td { padding: 0.65rem 0.9rem; text-align: left; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.table th { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); background: var(--paper); }
.table tr.is-new td:first-child a { font-weight: 700; }
.table tr.is-new td:first-child a::before { content: ""; display: inline-block; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--bronze-deep); margin-right: 0.45rem; vertical-align: middle; }
.table tr.is-off { opacity: 0.6; }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; margin-bottom: 1rem; }
.filters__q { margin-left: auto; min-width: 14rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr auto auto; gap: 0.75rem; align-items: end; margin-bottom: 1rem; }
@media (max-width: 800px) { .form-row { grid-template-columns: 1fr; } }

/* início */
.dash { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; align-items: start; }
@media (max-width: 900px) { .dash { grid-template-columns: 1fr; } }
.dash__todo { border-color: var(--bronze-light); background: #fffaf0; }
.todo { display: grid; gap: 0.3rem; }
.todo a { display: flex; align-items: center; gap: 0.6rem; padding: 0.5rem 0.6rem; border-radius: var(--r-sm); color: var(--ink); text-decoration: none; }
.todo a:hover { background: var(--white); }
.todo a .icon { margin-left: auto; color: var(--bronze-deep); }
.todo__dot { width: 0.55rem; height: 0.55rem; flex: none; border-radius: 50%; background: var(--warn); }
.mini { display: grid; }
.mini a { display: grid; grid-template-columns: 1fr auto; gap: 0 0.75rem; padding: 0.5rem 0; border-bottom: 1px solid var(--line-soft); text-decoration: none; color: var(--ink); }
.mini a:hover strong { text-decoration: underline; }
.mini strong { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini span { grid-column: 1; font-size: 0.8125rem; color: var(--muted); }
.mini time { grid-row: 1; grid-column: 2; font-size: 0.8125rem; color: var(--muted); }
.more { display: inline-flex; align-items: center; gap: 0.3rem; margin-top: 0.6rem; font-weight: 650; text-decoration: none; }
.shortcuts { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: 0.4rem; }
.shortcuts a { display: flex; align-items: center; gap: 0.6rem; padding: 0.6rem 0.7rem; border: 1px solid var(--line-soft); border-radius: var(--r-sm); color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.875rem; }
.shortcuts a:hover { border-color: var(--bronze); background: var(--paper); }
.shortcuts .icon { color: var(--bronze-deep); }

/* mídia */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 0.75rem; list-style: none; padding: 0; }
.mcard { display: grid; gap: 0.5rem; padding: 0.6rem; background: var(--white); border: 1px solid var(--line); border-radius: var(--r); }
.mcard.is-warn { border-color: #e9cf9e; box-shadow: inset 0 0 0 1px #e9cf9e; }
.mcard__img { position: relative; display: block; aspect-ratio: 3 / 2; overflow: hidden; border-radius: var(--r-sm); background: var(--stone-deep); cursor: crosshair; }
.mcard__img img { width: 100%; height: 100%; object-fit: cover; }
.mcard__video { display: grid; gap: 0.2rem; place-items: center; text-align: center; aspect-ratio: 3 / 2; border-radius: var(--r-sm); background: #24100f; color: #fff; padding: 1rem; }
.mcard__video small { color: rgb(255 255 255 / 0.7); }
.mcard__row { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; justify-content: space-between; font-size: 0.8125rem; }
.mcard__row select { width: auto; flex: 1; min-width: 8rem; }
.upload-progress { margin-bottom: 1rem; font-weight: 600; color: var(--bronze-deep); }

/* mensagens */
.dl { display: grid; gap: 0.4rem; margin-bottom: 1rem; }
.dl div { display: grid; grid-template-columns: 9rem 1fr; gap: 1rem; }
.dl dt { color: var(--muted); font-size: 0.8125rem; font-weight: 600; }
.dl dd { margin: 0; }
.msg { margin: 0 0 1rem; padding: 1rem 1.1rem; border-left: 3px solid var(--bronze-light); background: var(--paper); border-radius: 0 var(--r-sm) var(--r-sm) 0; white-space: normal; }
.lead-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.lead-actions form { margin-left: auto; }
.danger-zone { margin-top: 1rem; }
.danger-zone summary { cursor: pointer; font-weight: 650; color: var(--err); }
.danger-zone[open] { display: grid; gap: 0.6rem; }
@media (max-width: 600px) { .dl div { grid-template-columns: 1fr; gap: 0; } }

/* histórico */
.hist { display: grid; gap: 0.5rem; }
.hist__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.8rem 1rem; }
.hist__row div { display: grid; }
.hist__row span { font-size: 0.8125rem; color: var(--muted); }
.steps-adm { display: grid; gap: 0.6rem; padding-left: 1.2rem; margin-bottom: 0.9rem; }

/* busca, biblioteca e aviso */
dialog { border: 0; padding: 0; color: var(--ink); }
dialog::backdrop { background: rgb(30 28 26 / 0.45); }
.search { width: min(40rem, calc(100% - 2rem)); margin: 12vh auto auto; border-radius: var(--r); box-shadow: var(--shadow); padding: 0.75rem; }
.search .inp { font-size: 1.05rem; min-height: 3rem; }
.search__results { list-style: none; padding: 0; margin: 0.5rem 0; max-height: 55vh; overflow: auto; }
.search__results a { display: grid; padding: 0.55rem 0.75rem; border-radius: var(--r-sm); text-decoration: none; color: var(--ink); }
.search__results a span { font-size: 0.8125rem; color: var(--muted); }
.search__results [aria-selected="true"] a, .search__results a:hover { background: var(--stone); }
.search__none { padding: 0.75rem; color: var(--muted); }
.lib { width: min(60rem, calc(100% - 2rem)); height: min(44rem, calc(100% - 4rem)); border-radius: var(--r); box-shadow: var(--shadow); }
.lib[open] { display: grid; grid-template-rows: auto 1fr auto; }
.lib__head, .lib__foot { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1rem; border-bottom: 1px solid var(--line); }
.lib__head .inp { max-width: 18rem; margin-left: auto; }
.lib__foot { border-bottom: 0; border-top: 1px solid var(--line); justify-content: space-between; }
.lib__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr)); gap: 0.5rem; padding: 1rem; overflow: auto; list-style: none; margin: 0; align-content: start; }
.lib__item { display: block; width: 100%; aspect-ratio: 1; border-radius: var(--r-sm); overflow: hidden; background: var(--stone-deep); outline-offset: 2px; }
.lib__item img { width: 100%; height: 100%; object-fit: cover; }
.lib__item[aria-pressed="true"] { outline: 3px solid var(--bronze-deep); }
.toast { position: fixed; z-index: 90; left: 50%; bottom: 5.25rem; translate: -50% 0; display: flex; align-items: center; gap: 1rem; max-width: min(36rem, calc(100% - 2rem)); padding: 0.75rem 1rem; border-radius: var(--r); background: var(--ink); color: #fff; box-shadow: var(--shadow); font-weight: 500; }
.toast--err { background: var(--err); }
.toast__action { padding: 0.3rem 0.75rem; border-radius: var(--r-sm); background: rgb(255 255 255 / 0.14); color: var(--bronze-light); font-weight: 700; white-space: nowrap; }
.toast__action:hover { background: rgb(255 255 255 / 0.24); }

/* ---------------------------------------------------------------- telas de acesso */
.adm--bare { background: var(--stone); }
.gate { min-height: 100vh; display: grid; place-items: center; align-content: center; gap: 1.5rem; padding: 2rem 1rem; }
.gate__brand .logo { height: 3.2rem; width: auto; }
.gate__card { width: min(26rem, 100%); display: grid; gap: 1rem; padding: 1.75rem; }
.gate__card h1 { font-size: 1.35rem; }
.gate__alt { text-align: center; font-size: 0.875rem; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: 1ms !important; animation-duration: 1ms !important; } }
.h-adm { margin: 2rem 0 0.75rem; font-size: 1.1rem; }

/* ---------------------------------------------------------------- Focus: ícones Phosphor no painel */
.ph-light { line-height: 1; }
.nav-ico { font-size: 1.2rem; width: 1.2rem; flex: none; }
.tile-ico { font-size: 1.7rem; color: var(--bronze-deep); margin-bottom: 0.3rem; }
.shortcuts .ph-light, .item__ico .ph-light { font-size: 1.25rem; color: var(--bronze-deep); }
.ico-opt .ph-light, .ico-pick summary .ph-light, .ref .ph-light { font-size: 1.4rem; }

/* ---------- orçamentos ---------- */
.muted { color: var(--muted); }
.stage { display: inline-block; padding: 0.15rem 0.6rem; border-radius: 999px; font-size: 0.75rem; font-weight: 700; background: var(--stone); color: var(--ink); white-space: nowrap; }
.stage--novo { background: var(--bronze-deep); color: #fff; }
.stage--visita, .stage--proposta { background: var(--warn-bg); color: var(--warn); }
.stage--fechado { background: var(--ok-bg); color: var(--ok); }
.stage--perdido { background: var(--stone); color: var(--muted); }
.stages { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 1rem; }
.stage-btn { border: 1px solid var(--line); background: var(--white); border-radius: 999px; padding: 0.45rem 0.9rem; font-size: 0.8125rem; font-weight: 600; cursor: pointer; color: var(--ink); }
.stage-btn:hover { border-color: var(--bronze-deep); }
.stage-btn[aria-pressed="true"] { background: var(--bronze-deep); border-color: var(--bronze-deep); color: #fff; }
.stage-btn.stage--fechado[aria-pressed="true"] { background: var(--ok); border-color: var(--ok); }
.stage-btn.stage--perdido[aria-pressed="true"] { background: var(--muted); border-color: var(--muted); }
.lead-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
.lead-notes { display: grid; gap: 0.8rem; }
.lead-notes .field-adm { display: grid; gap: 0.35rem; font-size: 0.875rem; font-weight: 600; }
.lead-notes .btn { justify-self: start; }
.lead-photos, .lead-sent { margin-top: 1rem; }
.lead-photos h2, .lead-sent h2 { font-size: 1rem; margin-bottom: 0.8rem; }
.lead-photos__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: 0.6rem; }
.lead-photos__grid a { display: block; border-radius: var(--r-sm); overflow: hidden; aspect-ratio: 1; background: var(--stone); }
.lead-photos__grid img { width: 100%; height: 100%; object-fit: cover; transition: transform 300ms; }
.lead-photos__grid a:hover img { transform: scale(1.04); }
@media (max-width: 860px) { .lead-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Nexoora (plano, ajustes, backlog) ---------- */
.nx-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.nx-stat { display: grid; gap: 0.2rem; }
.nx-stat span { color: var(--muted); font-size: 0.8125rem; }
.nx-stat b { font-size: 1.5rem; font-weight: 650; line-height: 1.15; }
.nx-stat b small { font-size: 0.9rem; color: var(--muted); font-weight: 500; }
.nx-stat > small { color: var(--muted); }
.nx-updates { margin-bottom: 1rem; border-color: var(--bronze-light); }
.nx-update { display: flex; justify-content: space-between; gap: 1rem; align-items: start; padding: 0.8rem 0; border-top: 1px solid var(--line-soft); }
.nx-update ul { margin: 0.3rem 0 0 1.1rem; color: var(--ink-soft); font-size: 0.875rem; }
.nx-pill { display: inline-block; padding: 0.12rem 0.55rem; border-radius: 999px; font-size: 0.75rem; font-weight: 700; background: var(--stone); white-space: nowrap; }
.nx-pill--paid, .nx-pill--concluido { background: var(--ok-bg); color: var(--ok); }
.nx-pill--open, .nx-pill--uncollectible { background: var(--err-bg); color: var(--err); }
.nx-pill--andamento, .nx-pill--cliente, .nx-pill--aberto { background: var(--warn-bg); color: var(--warn); }
.nx-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
.nx-form { display: grid; gap: 0.8rem; }
.nx-form .btn { justify-self: start; }
.nx-thread { display: grid; gap: 0.8rem; margin-bottom: 1rem; }
.nx-msg { padding: 0.8rem 1rem; border-radius: var(--r); background: var(--white); border: 1px solid var(--line); max-width: 46rem; }
.nx-msg--agencia { background: #f6f4ff; border-color: #ddd8ff; margin-left: auto; }
.nx-msg header { display: flex; gap: 0.6rem; font-size: 0.8125rem; color: var(--muted); margin-bottom: 0.35rem; }
.nx-msg header b { color: var(--ink); }
.nx-msg p + p { margin-top: 0.5rem; }
.nx-files { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.6rem; }
.nx-files a { display: block; width: 7rem; height: 5.5rem; border-radius: var(--r-sm); overflow: hidden; background: var(--stone); border: 1px solid var(--line); font-size: 0.75rem; }
.nx-files img { width: 100%; height: 100%; object-fit: cover; }
.nx-files span { display: grid; place-items: center; height: 100%; padding: 0.4rem; text-align: center; }
.nx-board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; align-items: start; }
.nx-list { display: grid; gap: 0.8rem; }
.nx-list li { display: grid; gap: 0.15rem; }
@media (max-width: 900px) { .nx-grid, .nx-board { grid-template-columns: minmax(0, 1fr); } }

/* QR code da verificação em duas etapas */
.qr { width: 13rem; max-width: 100%; margin: 0.6rem 0; padding: 0.4rem; background: #fff; border: 1px solid var(--line); border-radius: var(--r); }
.qr svg { display: block; width: 100%; height: auto; }

/* assinatura: lista do que acontece ao cancelar */
.nx-list { display: grid; gap: 0.4rem; margin: 0.5rem 0 1.25rem; padding-left: 1.2rem; color: var(--ink-soft); }
.narrow-card { max-width: 46rem; }
.nx-list { list-style: disc; }

/* aberto dentro do site, na gaveta de "Editar no site": só o formulário */
.adm--drawer .side, .adm--drawer .top, .adm--drawer .crumbs-adm, .adm--drawer .page-head__tools { display: none; }
.adm--drawer .shell { margin-left: 0; }
.adm--drawer .main { max-width: none; padding: 1rem 1rem 6rem; }
.adm--drawer .page-head h1 { font-size: 1.25rem; }

/* MU Tronic: campo de cor (seletor + texto) */
.colorpick { display: flex; gap: .5rem; align-items: center; }
.colorpick input[type="color"] { inline-size: 2.75rem; block-size: 2.5rem; padding: 2px; border: 1px solid currentColor; border-radius: .5rem; background: none; cursor: pointer; flex: none; opacity: .9; }
.colorpick .inp { max-inline-size: 12rem; font-family: ui-monospace, monospace; }
