/* ============================================================
   Painel Formação Método Antiqueda Capilar — identidade fig studio (v2, núcleo da Ignite/Mentoria)
   Base visual: keek-site/painel-conceito (preto, branco, cinzas neutros, acento laranja, Archivo).
   Regras:
   - Destaque azul Metrix #3D7BF7 só em fundo, borda, ícone e texto grande. Texto pequeno em azul = --accent-text (#1F55C9).
   - Navegação ativa = preto. Seleção dentro do conteúdo = borda escura + fundo --surface-2.
   - Piso tipográfico de 12px (eyebrow decorativo em 11px é a exceção).
   - Todas as classes antigas do painel continuam existindo: o admin.js depende delas.
   ============================================================ */

@font-face { font-family: 'Archivo'; src: url('fonts/archivo-400.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Archivo'; src: url('fonts/archivo-500.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Archivo'; src: url('fonts/archivo-600.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Archivo'; src: url('fonts/archivo-700.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  /* marca fig */
  --ink:#0a0a0a; --ink-2:#262626; --muted:#666666; --subtle:#737373; --faint:#a3a3a3;
  --line:#e5e5e5; --line-strong:#d4d4d4; --line-input:#949494;
  --canvas:#fafafa; --paper:#ffffff; --surface-2:#f5f5f5; --surface-3:#efefef;
  --accent:#3D7BF7; --accent-hover:#2C66DD; --accent-text:#1F55C9; --accent-soft:#EEF4FF; --accent-line:#C7D9FF; /* azul Metrix Performance */

  /* aliases usados pelo restante do arquivo */
  --bg:var(--canvas); --surface:var(--paper); --surface-muted:var(--surface-2); --surface-accent:var(--accent-soft);
  --border:var(--line); --border-strong:var(--line-strong); --border-input:var(--line-input);
  --text:var(--ink); --text-muted:var(--muted); --text-subtle:var(--subtle);
  --focus:var(--accent); --focus-halo:rgba(61,123,247,.24);

  --success:#18794e; --success-bg:#edf8f1; --success-border:rgba(24,121,78,.25);
  --warning-text:#8a5300; --warning-bg:#fff7e8; --warning-border:rgba(176,112,0,.28);
  --danger:#c0262d; --danger-bg:#fdeeee; --danger-border:rgba(192,38,45,.25);
  --info:#1f5fa8; --info-bg:#eef4fb; --info-border:rgba(31,95,168,.22);

  --radius-sm:6px; --radius-md:8px; --radius:12px; --radius-lg:16px; --radius-full:999px;
  --shadow-xs:0 1px 2px rgba(10,10,10,.04); --shadow-sm:0 2px 8px rgba(10,10,10,.06);
  --shadow-md:0 8px 28px rgba(10,10,10,.10); --shadow-lg:0 30px 100px rgba(10,10,10,.18);
  --dur-fast:120ms; --dur:200ms; --ease:cubic-bezier(.4,0,.2,1);
  --sidebar-w:248px; --topbar-h:64px;
  --font-ui:'Archivo','Segoe UI',system-ui,-apple-system,Roboto,sans-serif;
  --font-display:'Archivo','Segoe UI',system-ui,sans-serif;
  --font-mono:ui-monospace,'SFMono-Regular',Consolas,monospace;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--topbar-h) + 16px); scroll-padding-bottom: 88px; }
body { font-family: var(--font-ui); font-size: 15px; line-height: 1.5; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; accent-color: var(--ink); }
img, svg { display: block; max-width: 100%; }
a { color: var(--text); }
button, input, select, textarea { font: inherit; color: inherit; }
.tnum { font-variant-numeric: tabular-nums; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -48px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: var(--radius-md); text-decoration: none; }
.skip-link:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; box-shadow: 0 0 0 4px var(--focus-halo); border-radius: 4px; }

/* ============================================================ Casca ============================================================ */
.admin-container { min-height: 100vh; margin-left: var(--sidebar-w); display: flex; flex-direction: column; }
.main-content { flex: 1; min-width: 0; padding: 40px 48px 64px; }
.main-inner { max-width: 1180px; margin: 0 auto; }

/* ---------- Sidebar ---------- */
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); background: var(--paper); border-right: 1px solid var(--line); display: flex; flex-direction: column; z-index: 60; }
.sidebar-logo { display: flex; align-items: flex-start; gap: 8px; padding: 22px 22px 14px; }
.sidebar-brand { display: grid; gap: 8px; text-decoration: none; color: var(--ink); }
.sidebar-brand img { width: 150px; height: auto; }
.sidebar-tag { font-size: 12px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.sidebar-close { display: none; margin-left: auto; width: 44px; height: 44px; align-items: center; justify-content: center; background: transparent; border: 0; color: var(--ink); border-radius: var(--radius-md); cursor: pointer; }
.sidebar-close svg { width: 20px; height: 20px; }

.workspace { display: flex; align-items: center; gap: 12px; margin: 0 16px 4px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); text-decoration: none; color: var(--ink); }
.workspace-icon { width: 38px; height: 38px; flex: none; border-radius: var(--radius-md); background: #fff; color: #0a5e63; border: 1px solid var(--border); display: grid; place-items: center; }
.workspace-icon .logo-svg { height: auto; width: 30px; }
.workspace b { display: block; font-size: 15px; font-weight: 600; line-height: 1.2; }
.workspace small { display: block; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 130px; }
.workspace-status { margin-left: auto; width: 8px; height: 8px; border-radius: 50%; background: #22a060; box-shadow: 0 0 0 3px #e3f5ea; flex: none; }
.workspace-status.is-alerta { background: #d98a00; box-shadow: 0 0 0 3px #fff1d6; }

.sidebar-nav { flex: 1; overflow-y: auto; padding: 8px 16px 16px; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.nav-label { font-size: 12px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); padding: 14px 12px 6px; }
.nav-divider { display: none; }
.nav-item { display: flex; align-items: center; gap: 12px; min-height: 36px; padding: 6px 12px; border-radius: var(--radius-md); color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: 15px; transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease); }
.nav-item svg { width: 18px; height: 18px; flex: none; color: var(--accent); transition: color var(--dur-fast) var(--ease); }
.nav-item:hover { background: var(--accent-soft); color: var(--accent-text); }
.nav-item[aria-current="page"] { background: var(--ink); color: #fff; }
.nav-item[aria-current="page"] svg { color: #fff; }
.nav-item:focus-visible { outline-offset: -2px; }
.nav-badge { margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: var(--radius-sm); background: var(--surface-2); color: var(--ink); font-weight: 600; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; font-variant-numeric: tabular-nums; }
.nav-item[aria-current="page"] .nav-badge { background: #fff; color: var(--ink); }
.nav-item--breve { color: var(--muted); }

.sidebar-bottom { display: grid; gap: 8px; padding: 10px 16px 14px; border-top: 1px solid var(--line); }
.sidebar-help { display: block; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); }
.sidebar-help b { display: block; font-size: 14px; font-weight: 600; }
.sidebar-help small { display: block; margin-top: 2px; font-size: 13px; color: var(--muted); }
.sidebar-help:hover { border-color: var(--accent); }
.sidebar-help:hover small { color: var(--accent-text); }
.sidebar-profile { display: flex; align-items: center; gap: 10px; padding: 4px; }
.sidebar-profile a.perfil { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; text-decoration: none; color: var(--ink); border-radius: var(--radius-md); padding: 4px; }
.sidebar-profile a.perfil:hover { background: var(--surface-2); }
.sidebar-profile b { display: block; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-profile small { display: block; font-size: 13px; color: var(--muted); }
.sidebar-sair { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: var(--radius-md); color: var(--muted); text-decoration: none; }
.sidebar-sair:hover { background: var(--accent-soft); color: var(--accent-text); }
.sidebar-sair svg { width: 18px; height: 18px; }
.avatar { width: 36px; height: 36px; flex: none; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink); display: grid; place-items: center; font-size: 13px; font-weight: 600; letter-spacing: .02em; }

/* ---------- Topbar ---------- */
.topbar { position: sticky; top: 0; z-index: 50; height: var(--topbar-h); display: flex; align-items: center; gap: 12px; padding: 0 48px; background: rgba(255,255,255,.92); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.topbar-btn { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; background: transparent; border: 1px solid transparent; color: var(--ink); border-radius: var(--radius-md); cursor: pointer; text-decoration: none; position: relative; }
.topbar-btn svg { width: 20px; height: 20px; }
.topbar-btn:hover { background: var(--surface-2); }
#mobileMenuToggle { display: none; margin-left: -8px; }
.crumb { display: flex; align-items: center; gap: 10px; min-width: 0; font-size: 14px; color: var(--muted); }
.crumb a { color: var(--muted); text-decoration: none; }
.crumb a:hover { color: var(--accent-text); }
.crumb .slash { color: var(--line-strong); }
.crumb b { font-weight: 500; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.top-dot { position: absolute; top: 6px; right: 6px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; line-height: 16px; text-align: center; border: 2px solid #fff; box-sizing: content-box; }
.topbar .avatar { width: 38px; height: 38px; text-decoration: none; }
.topbar .avatar:hover { border-color: var(--ink); }

/* ---------- Rodapé do painel ---------- */
.shell-footer { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 18px 48px 22px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.shell-footer .feito { display: inline-flex; align-items: center; gap: 6px; }
.shell-footer img { width: 64px; height: auto; }
.shell-footer a { color: var(--muted); }
.shell-footer a:hover { color: var(--accent-text); }

/* ============================================================ Cabeçalho de página ============================================================ */
.page-header { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 16px 24px; margin-bottom: 32px; }
.page-kicker { font-size: 12px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.page-kicker a { color: var(--muted); text-decoration: none; }
.page-kicker a:hover { color: var(--accent-text); }
.page-title { font-family: var(--font-display); font-weight: 600; font-size: 34px; line-height: 1.1; letter-spacing: -.045em; color: var(--ink); }
.page-subtitle { margin-top: 10px; font-size: 15px; line-height: 1.6; color: var(--muted); max-width: 68ch; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ============================================================ Botões ============================================================ */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 9px 18px; border-radius: var(--radius-md); border: 1px solid transparent; font-weight: 600; font-size: 15px; line-height: 1.2; letter-spacing: -.01em; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease); }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn-primary, .btn-dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn-primary:hover, .btn-dark:hover { background: var(--accent); border-color: var(--accent); }
.btn-gold { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-gold:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-ghost, .btn-outline { background: var(--paper); color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover, .btn-outline:hover { border-color: var(--accent); color: var(--accent-text); }
.btn-danger { background: var(--paper); color: var(--danger); border-color: var(--danger-border); }
.btn-danger:hover { background: var(--danger-bg); }
.btn-danger-solid { background: var(--danger); color: #fff; }
.btn-danger-solid:hover { background: #a11f25; }
.btn-link { background: none; border: 0; padding: 0; min-height: auto; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; font-weight: 600; }
.btn-link:hover { color: var(--accent-text); }
.btn-sm { min-height: 34px; padding: 6px 12px; font-size: 14px; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 16px; }
.text-link { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; color: var(--ink); text-decoration: none; }
.text-link svg { width: 14px; height: 14px; }
.text-link:hover { color: var(--accent-text); }

/* ============================================================ Cards e grades ============================================================ */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px 26px; margin-bottom: 24px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.card-title { font-family: var(--font-display); font-weight: 600; font-size: 17px; line-height: 1.3; letter-spacing: -.02em; margin-bottom: 12px; }
.card-head .card-title { margin-bottom: 0; }
.card-sub { font-size: 14px; color: var(--text-muted); margin: -4px 0 16px; }
.card-eyebrow { font-size: 12px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.card hr, .sep { border: 0; border-top: 1px solid var(--border); margin: 24px 0; }
.note { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; font-size: 14px; color: var(--text); }
.note .muted, .muted { color: var(--text-muted); }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 22px 22px 20px; }
.stat-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.stat-top svg { width: 18px; height: 18px; color: var(--accent); flex: none; }
.stat-label { font-size: 14px; font-weight: 500; color: var(--muted); margin-bottom: 14px; }
.stat-value { font-family: var(--font-display); font-weight: 600; font-size: 34px; line-height: 1; letter-spacing: -.05em; font-variant-numeric: tabular-nums; color: var(--text); }
.stat-hint { margin-top: 12px; font-size: 13px; color: var(--text-muted); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.stat-link { display: inline-block; margin-top: 10px; font-size: 14px; font-weight: 600; color: var(--text); }
.stat-link:hover { color: var(--accent-text); }
.trend { display: inline-flex; align-items: center; gap: 3px; padding: 2px 7px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 600; background: var(--surface-2); color: var(--muted); }
.trend.is-up { background: var(--accent-soft); color: var(--accent-text); }
.trend.is-down { background: var(--surface-2); color: var(--ink-2); }
.stat-card--accent { background: var(--ink); border-color: var(--ink); }
.stat-card--accent .stat-label, .stat-card--accent .stat-hint { color: #bdbdbd; }
.stat-card--accent .stat-value { color: #fff; }
.stat-card--accent .stat-link { color: #fff; }

.shortcut-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.shortcut { display: flex; align-items: center; gap: 12px; min-height: 68px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); text-decoration: none; color: var(--text); transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease); }
.shortcut__icon { width: 36px; height: 36px; flex: none; border-radius: var(--radius-md); background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; }
.shortcut__icon svg { width: 18px; height: 18px; }
.shortcut strong { display: block; font-weight: 600; font-size: 15px; }
.shortcut span.sub { display: block; font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.shortcut__chev { margin-left: auto; width: 16px; height: 16px; color: var(--faint); transition: transform var(--dur) var(--ease), color var(--dur) var(--ease); }
.shortcut:hover { border-color: var(--accent); background: #f5f8ff; }
.shortcut:hover .shortcut__chev { transform: translateX(2px); color: var(--accent); }

/* ---------- Hero (Visão geral) ---------- */
.hero { position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; min-height: 220px; padding: 34px 34px 32px; margin-bottom: 24px; border-radius: var(--radius-lg); background: #080808; color: #fff; }
.hero::before { content: ""; position: absolute; inset: -42%; z-index: -2; background: radial-gradient(circle at 72% 42%, rgba(61,123,247,.95) 0%, rgba(61,123,247,.58) 18%, rgba(61,123,247,.16) 38%, transparent 62%), radial-gradient(circle at 92% 110%, rgba(123,184,255,.42), transparent 42%), linear-gradient(115deg, #050505 18%, #07102a 54%, #0f2263 100%); opacity: .9; transform: scale(1.02) translate3d(-3%,-1%,0); }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(5,5,5,.94) 0%, rgba(8,8,8,.76) 43%, rgba(8,8,8,.18) 100%); }
@media (prefers-reduced-motion: no-preference) {
  .hero::before { animation: heroDrift 18s ease-in-out infinite alternate; }
  @keyframes heroDrift { 0% { transform: scale(1.02) translate3d(-3%,-1%,0); } 100% { transform: scale(1.1) translate3d(4%,3%,0); } }
}
.hero-eyebrow { font-size: 12px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: rgba(255,255,255,.72); margin-bottom: 14px; }
.hero h2 { font-weight: 600; font-size: 30px; line-height: 1.12; letter-spacing: -.045em; max-width: 18ch; }
.hero p { margin-top: 12px; font-size: 15px; color: rgba(255,255,255,.75); max-width: 52ch; }
.hero .btn { background: #fff; color: var(--ink); border-color: #fff; }
.hero .btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.hero .btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }
.hero .btn-ghost:hover { background: rgba(255,255,255,.1); border-color: #fff; color: #fff; }
.hero-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Próximos passos ---------- */
.pending-panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px 24px; margin-bottom: 24px; }
.pending-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.pending-head h2 { font-size: 17px; font-weight: 600; letter-spacing: -.02em; }
.pending-count { font-size: 13px; font-weight: 600; color: var(--accent-text); background: var(--accent-soft); padding: 5px 9px; border-radius: var(--radius-sm); white-space: nowrap; }
.pending-count.is-ok { color: var(--success); background: var(--success-bg); }
.pending-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.pending-item { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); text-decoration: none; color: var(--ink); transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease); }
.pending-item:hover { border-color: var(--accent); background: #f5f8ff; }
.pending-item > span:nth-child(2) { flex: 1; min-width: 0; }
.pending-item b { display: block; font-size: 14px; font-weight: 600; }
.pending-item small { display: block; margin-top: 3px; font-size: 13px; line-height: 1.4; color: var(--muted); }
.pending-item > svg { width: 14px; height: 14px; color: var(--accent); flex: none; }
.pending-icon { width: 34px; height: 34px; flex: none; border-radius: var(--radius-md); background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.pending-icon svg { width: 17px; height: 17px; }
.pending-item.is-alerta .pending-icon { background: var(--warning-bg); color: var(--warning-text); }
.pending-vazio { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: var(--radius); background: var(--surface-2); font-size: 14px; color: var(--muted); }
.pending-vazio svg { width: 18px; height: 18px; color: var(--success); flex: none; }

/* ---------- Seções e linhas de lista ---------- */
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 8px 0 16px; }
.section-head h2 { font-size: 17px; font-weight: 600; letter-spacing: -.02em; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.list-rows { display: grid; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-top: 1px solid var(--line); text-decoration: none; color: var(--ink); min-width: 0; }
.list-row > span { min-width: 0; overflow-wrap: anywhere; }
.list-row:first-child { border-top: 0; }
a.list-row:hover b { color: var(--accent-text); }
.list-row b { display: block; font-size: 15px; font-weight: 600; }
.list-row small { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
.list-row > span:nth-child(2) { flex: 1; min-width: 0; }
.row-end { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.row-icon { width: 36px; height: 36px; flex: none; border-radius: var(--radius-md); background: var(--surface-2); color: var(--accent); display: grid; place-items: center; }
.row-icon svg { width: 17px; height: 17px; }

/* ---------- Gráfico ---------- */
.chart { width: 100%; height: auto; overflow: visible; }
.chart .grade { stroke: var(--line); stroke-width: 1; }
.chart .eixo { fill: var(--muted); font-size: 12px; font-family: var(--font-ui); }
.chart .area { fill: url(#chartFill); }
.chart .linha { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .linha-ant { fill: none; stroke: var(--faint); stroke-width: 1.5; stroke-dasharray: 4 4; }
.chart .ponto { fill: #fff; stroke: var(--accent); stroke-width: 2; }
.chart-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin-top: 8px; }
.chart-legend i { display: inline-block; width: 14px; height: 2px; margin-right: 6px; vertical-align: middle; background: var(--accent); }
.chart-legend i.ant { background: none; border-top: 2px dashed var(--faint); height: 0; }

/* ---------- Barras (origem/perfil) ---------- */
.bars { display: grid; gap: 14px; }
.bar-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; font-size: 14px; }
.bar-row span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-row b { font-weight: 600; font-variant-numeric: tabular-nums; }
.bar-track { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.bar-fill { height: 100%; border-radius: 3px; background: var(--accent); }
.bar-fill.is-dim { background: var(--ink-2); }

/* ---------- Abas (links) ---------- */
.tabs { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: var(--radius); background: var(--surface-2); }
.tab { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 14px; border-radius: var(--radius-md); font-size: 14px; font-weight: 500; color: var(--muted); text-decoration: none; white-space: nowrap; }
.tab:hover { color: var(--accent-text); }
.tab[aria-current="page"], .tab[aria-selected="true"] { background: var(--paper); color: var(--ink); box-shadow: var(--shadow-sm); }
.tab .n { font-variant-numeric: tabular-nums; color: var(--muted); }

/* ---------- Cards de página (grade Páginas) ---------- */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }
.content-card { display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; text-decoration: none; color: var(--ink); transition: border-color var(--dur) var(--ease); }
.content-card:hover { border-color: var(--accent); }
.card-preview { position: relative; aspect-ratio: 16 / 10; background: var(--surface-2); padding: 16px 18px 0; overflow: hidden; transition: background var(--dur) var(--ease); }
.content-card:hover .card-preview { background: var(--accent-soft); }
.card-preview iframe { position: absolute; top: 16px; left: 18px; width: 1280px; height: 900px; border: 0; border-radius: 8px 8px 0 0; transform-origin: 0 0; pointer-events: none; background: #fff; box-shadow: var(--shadow-sm); }
.card-preview .mock { height: 100%; border-radius: 8px 8px 0 0; background: #fff; box-shadow: var(--shadow-sm); display: grid; place-items: center; color: var(--accent); }
.card-preview .mock svg { width: 34px; height: 34px; }
.card-info { display: grid; gap: 4px; padding: 16px 18px 18px; border-top: 1px solid var(--line); }
.card-info-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.card-info h3 { font-size: 15px; font-weight: 600; letter-spacing: -.02em; }
.card-info small { font-size: 13px; color: var(--muted); }
.card-bottom { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 10px; font-size: 13px; color: var(--muted); }
.card-bottom .text-link { font-weight: 600; }
.content-card__link:hover ~ .card-info .card-links > span.text-link { color: var(--accent-text); }

/* ============================================================ Alertas ============================================================ */
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border-radius: var(--radius); border: 1px solid; font-weight: 500; font-size: 15px; line-height: 1.5; margin-bottom: 24px; }
.alert svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.alert__text { flex: 1; }
.alert-success { background: var(--success-bg); color: var(--success); border-color: var(--success-border); }
.alert-error { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-border); }
.alert-warning { background: var(--warning-bg); color: var(--warning-text); border-color: var(--warning-border); }
.alert-info { background: var(--info-bg); color: var(--info); border-color: var(--info-border); }
.alert-close { width: 32px; height: 32px; margin: -6px -8px -6px 0; border: 0; background: transparent; color: inherit; border-radius: var(--radius-md); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.alert-close:hover { background: rgba(10,10,10,.06); }
.alert.is-saindo { opacity: 0; transition: opacity var(--dur) var(--ease); }

/* ============================================================ Badges e chips ============================================================ */
.badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: var(--radius-sm); font-weight: 600; font-size: 13px; white-space: nowrap; vertical-align: middle; background: var(--surface-2); color: var(--ink-2); }
.badge-novo { background: var(--accent-soft); color: var(--accent-text); }
.badge-andamento, .badge-draft { background: var(--info-bg); color: var(--info); }
.badge-ganho, .badge-published, .badge-tem, .badge-ok { background: var(--success-bg); color: var(--success); }
.badge-perdido, .badge-fora, .badge-neutro { background: var(--surface-2); color: var(--muted); }
.badge-breve, .badge-soon, .badge-aviso { background: var(--warning-bg); color: var(--warning-text); }
.badge-suspeito { background: var(--danger-bg); color: var(--danger); }
.tag-tema { display: inline-block; background: var(--surface-2); color: var(--ink-2); border-radius: var(--radius-sm); padding: 2px 8px; font-size: 13px; font-weight: 500; }

.chips { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: var(--radius); background: var(--surface-2); }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 14px; border-radius: var(--radius-md); border: 0; background: transparent; color: var(--muted); font-weight: 500; font-size: 14px; text-decoration: none; white-space: nowrap; }
.chip .n { color: var(--muted); font-variant-numeric: tabular-nums; }
.chip:hover { color: var(--accent-text); }
.chip[aria-current="page"] { background: var(--paper); color: var(--ink); box-shadow: var(--shadow-sm); }
.chip[aria-current="page"] .n { color: var(--accent-text); }

/* ============================================================ Tabela ============================================================ */
.table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.admin-table th { text-align: left; font-weight: 500; font-size: 13px; color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.admin-table td { padding: 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.admin-table tbody tr:last-child td { border-bottom: 0; }
.admin-table tbody tr:hover td { background: #fcfcfc; }
.admin-table tr.is-selecionado td { background: var(--surface-2); }
.admin-table tr.is-selecionado td:first-child { box-shadow: inset 3px 0 0 var(--ink); }
.cell-main { font-weight: 600; font-size: 15px; color: var(--text); text-decoration: none; }
a.cell-main:hover { color: var(--accent-text); }
.cell-sub { display: block; font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.row-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.row-actions form { display: inline; }

/* ============================================================ Empty state ============================================================ */
.empty-state { text-align: center; padding: 48px 24px; max-width: 520px; margin: 0 auto; }
.empty-state svg { width: 40px; height: 40px; color: var(--accent); margin: 0 auto 14px; }
.empty-state__title { font-family: var(--font-display); font-weight: 600; font-size: 17px; letter-spacing: -.02em; margin-bottom: 6px; }
.empty-state__text, .empty-state p { font-size: 15px; line-height: 1.6; color: var(--text-muted); }
.empty-state__actions { margin-top: 16px; }
.empty-state .btn svg { width: 16px; height: 16px; margin: 0; color: currentColor; }

/* ============================================================ Formulários ============================================================ */
.form-row, .form-group { margin-bottom: 18px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0 16px; }
.field-label, .form-label { display: block; font-weight: 500; font-size: 14px; line-height: 1.4; color: var(--muted); margin-bottom: 8px; }
.field-hint, .form-help { font-size: 13px; color: var(--text-muted); margin-top: 6px; }
.field-hint a { color: var(--accent-text); }
.field-error { font-size: 14px; font-weight: 500; color: var(--danger); margin-top: 6px; }
.form-legend { font-size: 14px; color: var(--text-muted); margin-bottom: 16px; }
.main-content input[type="text"], .main-content input[type="email"], .main-content input[type="url"], .main-content input[type="password"], .main-content input[type="datetime-local"], .main-content input[type="number"],
.main-content input[type="date"], .main-content input[type="search"], .main-content input[type="tel"], .main-content input[type="number"], .main-content select, .main-content textarea,
.login-box input[type="email"], .login-box input[type="password"], .login-box input[type="text"] {
  width: 100%; min-height: 46px; padding: 11px 14px; font-size: 15px; background: #fff; color: var(--text);
  border: 1px solid var(--line-strong); border-radius: var(--radius-md); transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.main-content textarea { min-height: 112px; line-height: 1.6; resize: vertical; }
.main-content select { appearance: none; padding-right: 38px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%230a0a0a' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }
.main-content input:hover, .main-content select:hover, .main-content textarea:hover { border-color: var(--line-input); }
.main-content input:focus, .main-content select:focus, .main-content textarea:focus, .login-box input:focus { outline: 2px solid transparent; border-color: var(--ink); box-shadow: 0 0 0 3px var(--focus-halo); }
.main-content input::placeholder, .main-content textarea::placeholder { color: var(--faint); }
.main-content input[disabled], .main-content input[readonly], .main-content textarea[disabled] { background: var(--surface-2); border-color: var(--line); color: var(--text-muted); cursor: not-allowed; }
[aria-invalid="true"] { border-color: var(--danger) !important; }
.is-alterado { box-shadow: inset 3px 0 0 var(--accent); padding-left: 12px; margin-left: -12px; border-radius: 2px; }
.is-alterado > .field-label::after { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-left: 8px; vertical-align: middle; }

.segmented { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border-radius: var(--radius-md); background: var(--surface-2); }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented label { display: inline-flex; align-items: center; min-height: 34px; padding: 0 12px; border-radius: 6px; font-weight: 500; font-size: 14px; color: var(--muted); cursor: pointer; }
.segmented input:checked + label { background: var(--paper); color: var(--ink); box-shadow: var(--shadow-sm); }
.segmented input:focus-visible + label { outline: 2px solid var(--focus); outline-offset: 2px; box-shadow: 0 0 0 4px var(--focus-halo); }

.save-bar { position: sticky; bottom: 0; z-index: 30; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 16px; padding: 12px 20px; background: rgba(255,255,255,.96); backdrop-filter: blur(8px); border: 1px solid var(--line); border-bottom: 0; border-radius: var(--radius-lg) var(--radius-lg) 0 0; box-shadow: 0 -10px 30px rgba(10,10,10,.07); }
.save-bar__status { font-weight: 500; font-size: 14px; color: var(--ink-2); }
.save-bar__dica { margin-left: auto; font-size: 13px; color: var(--text-muted); }
.card-status { font-size: 14px; font-weight: 500; color: var(--ink-2); }

.editor-wrap { border: 1px solid var(--line-strong); border-radius: var(--radius-md); overflow: hidden; background: #fff; }
.editor-toolbar { display: flex; flex-wrap: wrap; gap: 4px; padding: 8px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.editor-toolbar button { font-size: 14px; font-weight: 600; border: 1px solid var(--line-strong); background: #fff; border-radius: var(--radius-sm); padding: 6px 10px; cursor: pointer; min-height: 32px; }
.editor-toolbar button:hover { border-color: var(--accent); color: var(--accent-text); }
.main-content .editor-wrap textarea { border: 0; border-radius: 0; min-height: 320px; font-family: var(--font-mono); font-size: 14px; box-shadow: none; }

/* ============================================================ Dialog ============================================================ */
dialog.pn-dialog { margin: auto; border: 0; border-radius: var(--radius-lg); padding: 26px; width: min(460px, calc(100vw - 32px)); box-shadow: var(--shadow-lg); color: var(--text); }
dialog.pn-dialog::backdrop { background: rgba(10,10,10,.5); backdrop-filter: blur(2px); }
.pn-dialog__title { font-family: var(--font-display); font-weight: 600; font-size: 19px; letter-spacing: -.03em; margin-bottom: 8px; }
.pn-dialog__text { color: var(--text-muted); margin-bottom: 20px; }
.pn-dialog__acoes { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }

/* ============================================================ Leads ============================================================ */
.leads-barra { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.leads-filtros { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 16px; }
.leads-filtros input[type="search"] { width: 280px; }
.leads-filtros select { width: auto; min-width: 160px; }
.leads-layout { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 24px; align-items: start; }
.leads-layout--sem-detalhe { grid-template-columns: minmax(0, 1fr); }
.lead-detalhe { position: sticky; top: calc(var(--topbar-h) + 24px); }
.lead-detalhe__nome { font-family: var(--font-display); font-weight: 600; font-size: 22px; line-height: 1.2; letter-spacing: -.035em; }
.lead-detalhe__badges { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0 16px; }
.lead-acoes { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.lead-grupo { font-size: 12px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin: 18px 0 8px; }
.lead-dl { display: grid; grid-template-columns: minmax(120px, 42%) 1fr; gap: 6px 16px; margin: 0; }
.lead-dl dt { color: var(--text-muted); font-size: 14px; }
.lead-dl dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.lead-dl a { color: var(--text); }
.lead-dl a:hover { color: var(--accent-text); }
.paginacao { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 16px; font-size: 14px; color: var(--text-muted); }
.rodape-nota { margin-top: 8px; font-size: 13px; color: var(--text-muted); }

/* ============================================================ Login ============================================================ */
.login-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); min-height: 100vh; background: var(--canvas); }
.login-form-side { display: flex; align-items: center; justify-content: center; padding: 48px 32px; }
.login-box { width: 100%; max-width: 380px; }
.login-fig { width: 150px; height: auto; margin-bottom: 36px; }
.login-box h1 { font-size: 30px; font-weight: 600; letter-spacing: -.045em; line-height: 1.1; }
.login-sub { color: var(--text-muted); margin: 8px 0 30px; }
.login-cliente { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 18px; padding: 6px 12px 6px 6px; border: 1px solid var(--line); border-radius: var(--radius-full); background: #fff; font-size: 14px; font-weight: 500; }
.login-cliente .workspace-icon { width: 28px; height: 28px; border-radius: 50%; }
.login-cliente .workspace-icon .logo-svg { width: 20px; }
.login-box .form-row { margin-bottom: 16px; }
.senha-wrap { position: relative; }
.senha-wrap input { padding-right: 88px !important; }
.senha-toggle { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); min-height: 36px; padding: 0 10px; background: transparent; border: 0; font-weight: 600; font-size: 14px; color: var(--ink-2); cursor: pointer; border-radius: var(--radius-sm); }
.senha-toggle:hover { color: var(--accent-text); }
.caps-aviso { font-size: 14px; font-weight: 500; color: var(--warning-text); margin-top: 6px; }
.login-full { width: 100%; min-height: 48px; margin-top: 8px; }
.login-rodape { margin-top: 32px; font-size: 14px; color: var(--text-muted); }
.login-rodape a { color: var(--ink); }
.login-visual { position: relative; overflow: hidden; margin: 16px; border-radius: 24px; background: #080808; color: #fff; isolation: isolate; }
.login-visual::before { content: ""; position: absolute; inset: -40%; z-index: 0; background: radial-gradient(circle at 70% 38%, rgba(61,123,247,.95) 0%, rgba(61,123,247,.55) 20%, rgba(61,123,247,.14) 40%, transparent 62%), radial-gradient(circle at 90% 105%, rgba(123,184,255,.4), transparent 42%), linear-gradient(115deg, #050505 18%, #07102a 54%, #0f2263 100%); }
@media (prefers-reduced-motion: no-preference) { .login-visual::before { animation: heroDrift 18s ease-in-out infinite alternate; } }
.login-slide { position: absolute; inset: 0; z-index: 1; opacity: 0; transition: opacity 900ms var(--ease); }
.login-slide.is-ativo { opacity: 1; }
.login-slide img { display: none; }
.login-legenda { position: absolute; left: 48px; right: 48px; bottom: 64px; z-index: 2; }
.login-legenda .page-kicker { color: rgba(255,255,255,.72); }
.login-legenda p { font-family: var(--font-display); font-weight: 600; font-size: 34px; line-height: 1.12; letter-spacing: -.045em; max-width: 18ch; }
.login-legenda span { display: block; margin-top: 12px; color: rgba(255,255,255,.72); font-size: 15px; max-width: 44ch; }
.login-pontos { position: absolute; left: 48px; bottom: 36px; z-index: 2; display: flex; gap: 6px; }
.login-pontos i { width: 24px; height: 3px; border-radius: 2px; background: rgba(255,255,255,.3); }
.login-pontos i.is-ativo { background: #fff; }

/* ============================================================ F6: listas, imagens, SEO, integrações, cópias ============================================================ */
.mono { font-family: var(--font-mono) !important; font-size: 14px !important; }
.check-linha { display: inline-flex; align-items: flex-start; gap: 10px; min-height: 44px; padding: 10px 0; cursor: pointer; font-weight: 500; }
.check-linha input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--ink); flex: none; }
.copiavel { display: flex; gap: 8px; }
.copiavel input { flex: 1; }
details.adv { border: 1px solid var(--border); border-radius: var(--radius); padding: 0 16px; margin-top: 8px; }
details.adv summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; }
.lista-simples { list-style: none; display: grid; gap: 6px; font-size: 15px; color: var(--text-muted); }
.json-previa { max-height: 240px; overflow: auto; background: var(--surface-2); border-radius: var(--radius-sm); padding: 8px; font-size: 13px; white-space: pre-wrap; word-break: break-word; margin-top: 8px; }

.rep-lista { list-style: none; display: grid; gap: 12px; counter-reset: rep; }
.rep-item { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px 4px; background: #fff; }
.rep-item__cab { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.rep-item__num { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; height: 28px; border-radius: var(--radius-sm); background: var(--accent-soft); color: var(--accent-text); font-weight: 600; font-size: 14px; }
.rep-item__acoes { display: flex; gap: 6px; flex-wrap: wrap; }
.rep-item__campos .form-row { margin-bottom: 12px; }

.img-campo { display: flex; gap: 12px; align-items: flex-start; }
.img-campo__preview { width: 96px; height: 72px; object-fit: cover; border-radius: var(--radius-md); background: var(--surface-2); border: 1px solid var(--border); flex: none; }
.img-campo__dados { flex: 1; min-width: 0; display: grid; gap: 8px; justify-items: start; }
.img-campo__dados input { width: 100%; }

.upload-linha { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.upload-linha input[type="file"] { flex: 1; min-width: 220px; }
.midia-grid { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.midia-item { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: #fff; display: flex; flex-direction: column; transition: border-color var(--dur) var(--ease); }
.midia-item:hover { border-color: var(--accent); }
.midia-thumb { display: block; aspect-ratio: 4 / 3; background: var(--surface-2); }
.midia-thumb img { width: 100%; height: 100%; object-fit: cover; }
.midia-info { padding: 10px 12px 0; display: grid; gap: 2px; font-size: 13px; color: var(--text-muted); }
.midia-info strong { font-size: 14px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.midia-acoes { padding: 10px 12px 12px; display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; }
.midia-acoes form { display: inline; }

dialog.pn-dialog--largo { width: min(920px, calc(100vw - 32px)); max-height: calc(100vh - 48px); }
.seletor-cab { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.seletor-envio { display: flex; align-items: center; gap: 12px; margin: 8px 0 12px; flex-wrap: wrap; }
.seletor-corpo { max-height: 60vh; overflow: auto; }
.seletor-grade { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.seletor-item { width: 100%; border: 1px solid var(--border); border-radius: var(--radius-md); background: #fff; padding: 0; cursor: pointer; overflow: hidden; text-align: left; }
.seletor-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--surface-2); }
.seletor-item span { display: block; padding: 6px 8px; font-size: 13px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seletor-item:hover, .seletor-item:focus-visible { border-color: var(--accent); }

.seo-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 24px; }
.prev-google { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; background: #fff; font-family: Arial, sans-serif; }
.prev-google__url { display: block; font-size: 13px; color: #4d5156; }
.prev-google__titulo { display: block; font-size: 18px; color: #1a0dab; line-height: 1.3; margin: 2px 0; }
.prev-google__desc { display: block; font-size: 14px; color: #4d5156; line-height: 1.5; }
.prev-wa { display: flex; gap: 10px; border-radius: var(--radius); background: #E7F7E4; padding: 8px; font-family: Arial, sans-serif; }
.prev-wa img { width: 84px; height: 84px; object-fit: cover; border-radius: 6px; flex: none; background: #fff; }
.prev-wa strong { display: block; font-size: 14px; color: #111; }
.prev-wa span { display: block; font-size: 13px; color: #444; margin-top: 2px; }
.prev-wa em { display: block; font-style: normal; font-size: 12px; color: #667; margin-top: 4px; }

/* ---------- Integrações (cards) ---------- */
.int-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin-bottom: 24px; }
.int-card { display: flex; flex-direction: column; gap: 12px; padding: 20px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.int-card-top { display: flex; align-items: center; gap: 12px; }
.int-icon { width: 42px; height: 42px; flex: none; border-radius: var(--radius-md); background: var(--surface-2); display: grid; place-items: center; font-size: 14px; font-weight: 700; color: var(--ink); letter-spacing: -.02em; }
.int-icon svg { width: 22px; height: 22px; }
.int-card h3 { font-size: 15px; font-weight: 600; letter-spacing: -.02em; }
.int-card p { font-size: 14px; color: var(--muted); line-height: 1.5; flex: 1; }
.int-card-bottom { display: flex; justify-content: space-between; align-items: center; gap: 8px; }

/* ============================================================ Textos das páginas: editor (F7) ============================================================ */
.ed-paginas { margin-bottom: 14px; }
.ed-nota { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; color: var(--text-muted); margin-bottom: 22px; max-width: 820px; }
.ed-nota svg { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--accent); }
.ed-nota a { color: var(--accent-text); font-weight: 600; }
.ed-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 24px; align-items: start; }
.ed-toc { position: sticky; top: calc(var(--topbar-h) + 20px); max-height: calc(100vh - var(--topbar-h) - 40px); overflow: auto; display: grid; gap: 6px; padding: 16px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.ed-toc__tit { font-size: 15px; font-weight: 600; letter-spacing: -.02em; color: var(--ink); padding: 0 4px 8px; }
.ed-toc__link { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius-md); font-size: 14px; color: var(--ink-2); text-decoration: none; background: #fff; }
.ed-toc__link:hover { border-color: var(--accent); color: var(--accent-text); }
.ed-toc__link[aria-current="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--ink); font-weight: 600; }
.ed-toc__link.is-dim { opacity: .45; }
.ed-toc__link--lista { margin-top: 6px; border-style: dashed; }
.ed-toc__label { flex: 1; min-width: 0; line-height: 1.35; }
.ed-toc__count { font-size: 13px; color: var(--subtle); flex: none; }
.ed-toc__dirty { flex: none; min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--radius-sm); background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.ed-ferramentas { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.main-content .ed-ferramentas input[type="search"] { flex: 1 1 260px; max-width: 420px; min-height: 42px; }
.ed-ferramentas__status { font-size: 14px; }
.ed-acc { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); margin-bottom: 12px; scroll-margin-top: calc(var(--topbar-h) + 20px); }
.ed-acc[hidden], .ed-campo[hidden], .ed-toc__dirty[hidden], .ed-acc__badge[hidden] { display: none !important; }
.ed-acc__h { margin: 0; font-size: inherit; }
.ed-acc__btn { width: 100%; display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 12px 20px; background: transparent; border: 0; border-radius: var(--radius-lg); cursor: pointer; text-align: left; }
.ed-acc__btn:hover { background: #fcfcfc; }
.ed-acc.is-open { border-color: var(--line-strong); }
.ed-acc.is-open > .ed-acc__h .ed-acc__btn { border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.ed-acc__titulo { font-family: var(--font-display); font-size: 15px; font-weight: 600; letter-spacing: -.02em; color: var(--text); }
.ed-acc__meta { font-size: 13px; color: var(--subtle); margin-left: auto; white-space: nowrap; }
.ed-acc__badge { flex: none; font-size: 13px; font-weight: 600; color: var(--accent-text); background: var(--accent-soft); border-radius: var(--radius-sm); padding: 2px 8px; }
.ed-acc__chev { width: 18px; height: 18px; flex: none; color: var(--subtle); transition: transform var(--dur) var(--ease); transform: rotate(90deg); }
.js-ed .ed-acc:not(.is-open) .ed-acc__chev { transform: rotate(0deg); }
.js-ed .ed-acc:not(.is-open) .ed-acc__painel { display: none; }
.ed-acc__painel { padding: 4px 20px 10px; border-top: 1px solid var(--border); }
.ed-acc__topo { display: flex; justify-content: flex-end; padding: 12px 0 2px; }
.ed-campo { padding: 16px 0 14px; margin: 0; border-bottom: 1px solid var(--line); }
.ed-campo:last-child { border-bottom: 0; }
.ed-campo__cab { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.ed-campo__cab .field-label { margin-bottom: 0; }
.ed-selo { display: none; font-size: 12px; font-weight: 600; color: var(--accent-text); background: var(--accent-soft); border-radius: var(--radius-sm); padding: 2px 8px; }
.ed-campo.is-personalizado .ed-selo { display: inline-block; }
.ed-campo.is-alterado .ed-campo__cab .field-label::after { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-left: 8px; vertical-align: middle; }
.main-content .ed-campo textarea { min-height: 0; }
.ed-campo__rodape { display: flex; align-items: center; gap: 6px 14px; flex-wrap: wrap; margin-top: 6px; }
.ed-campo__rodape .field-hint { margin-top: 0; }
.ed-original { font-size: 14px; color: var(--text-muted); }
.ed-original summary { cursor: pointer; min-height: 32px; display: inline-flex; align-items: center; color: var(--ink-2); font-weight: 500; }
.ed-original summary:hover { color: var(--accent-text); }
.ed-original[open] { flex-basis: 100%; order: 5; }
.ed-original__txt { background: var(--surface-2); border-radius: var(--radius-sm); padding: 8px 12px; color: var(--text); white-space: normal; }
.ed-original__img { display: flex; align-items: center; gap: 12px; background: var(--surface-2); border-radius: var(--radius-sm); padding: 8px; }
.ed-original__img img { width: 96px; height: 64px; object-fit: cover; border-radius: var(--radius-sm); }
.ed-original__img code { font-size: 13px; word-break: break-all; }
.ed-restaurar { margin-left: auto; min-height: 32px; padding: 4px 10px; font-size: 14px; font-weight: 500; color: var(--ink-2); background: transparent; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); cursor: pointer; }
.ed-restaurar:hover:not(:disabled) { border-color: var(--accent); color: var(--accent-text); background: #fff; }
.ed-restaurar:disabled { opacity: .45; cursor: default; }
.ed-aviso { font-size: 14px; color: var(--warning-text); background: var(--warning-bg); border: 1px solid var(--warning-border); border-radius: var(--radius-sm); padding: 6px 10px; margin-top: 8px; }
.ed-main > .card { margin-top: 24px; }

/* ============================================================ Editor visual de texto (F7b) ============================================================ */
.main-content textarea.rt-oculto, .rt-oculto { position: absolute !important; width: 1px !important; height: 1px !important; min-height: 0 !important; margin: -1px; padding: 0 !important; overflow: hidden; clip: rect(0 0 0 0); border: 0 !important; }
.rt-editor { width: 100%; min-height: 80px; padding: 11px 14px; font-size: 15px; line-height: 1.6; background: #fff; color: var(--text); border: 1px solid var(--line-strong); border-radius: var(--radius-md); white-space: normal; overflow-wrap: anywhere; cursor: text; transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.rt-editor--linha { min-height: 46px; }
.rt-editor:hover { border-color: var(--line-input); }
.rt-editor:focus { outline: 2px solid transparent; border-color: var(--ink); box-shadow: 0 0 0 3px var(--focus-halo); }
.rt-editor:empty::before { content: attr(data-placeholder); color: var(--faint); pointer-events: none; }
.rt-editor strong { font-weight: 700; }
.rt-editor em { font-style: italic; }
.rt-editor mark { background: #fbf3dc; color: #55472E; padding: 0 .15em; border-radius: 2px; box-shadow: inset 0 -2px 0 #DFCFAD; }
.rt-editor a { color: var(--info); text-decoration: underline; text-underline-offset: 2px; }
.ed-original__txt mark { background: #fbf3dc; }
.rt-barra { position: absolute; z-index: 80; display: flex; align-items: center; gap: 2px; padding: 4px; background: var(--ink); border-radius: var(--radius-md); box-shadow: var(--shadow-md); }
.rt-barra[hidden], .rt-barra__btn[hidden] { display: none !important; }
.rt-barra__btn { min-width: 34px; height: 32px; padding: 0 9px; border: 0; border-radius: var(--radius-sm); background: transparent; color: #fff; font-size: 14px; font-weight: 600; cursor: pointer; }
.rt-barra__btn:hover { background: rgba(255,255,255,.14); }
.rt-barra__btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; box-shadow: none; }
.rt-barra__btn[aria-pressed="true"] { background: var(--accent); color: #fff; }
.rt-barra__btn--n { font-weight: 700; font-size: 15px; }
.rt-barra__btn--i { font-family: Georgia, 'Times New Roman', serif; font-style: italic; font-size: 15px; }
.rt-barra__msg:empty { display: none; }
.rt-barra__msg { color: #ffc9bb; font-size: 13px; padding: 0 8px; white-space: nowrap; }
.rt-link { display: grid; gap: 6px; width: 100%; }
.rt-link input { width: 100%; min-height: 46px; padding: 11px 14px; font-size: 15px; border: 1px solid var(--line-strong); border-radius: var(--radius-md); }
.rt-link input:focus { outline: 2px solid transparent; border-color: var(--ink); box-shadow: 0 0 0 3px var(--focus-halo); }
.rt-link .pn-dialog__acoes { margin-top: 10px; }
.rt-editor--lista { min-height: 120px; }

/* ============================================================ Vídeos (F7d) ============================================================ */
video.img-campo__preview { background: var(--ink); }
.seletor-item video { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; background: var(--ink); }
.midia-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; background: var(--ink); }
.ed-original__img video { width: 96px; height: 64px; object-fit: cover; border-radius: var(--radius-sm); background: var(--ink); }

/* ============================================================ Responsivo ============================================================ */
@media (max-width: 1180px) {
  .leads-layout { grid-template-columns: minmax(0, 1fr); }
  .leads-layout.tem-detalhe .leads-lista { display: none; }
  .lead-detalhe { position: static; }
  .seo-grid, .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .ed-layout { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .ed-toc { position: static; max-height: none; display: flex; overflow-x: auto; gap: 6px; padding: 8px; }
  .ed-toc__tit { display: none; }
  .ed-toc__link { flex: none; white-space: nowrap; }
  .ed-toc__link--lista { margin-top: 0; }
  .ed-toc__count { display: none; }
}
@media (max-width: 1024px) {
  .admin-container { margin-left: 0; }
  #mobileMenuToggle { display: inline-flex; }
  .topbar { padding: 0 20px; }
  .main-content { padding: 28px 24px 48px; }
  .shell-footer { padding: 16px 24px 20px; }
  .sidebar { width: min(300px, 86vw); transform: translateX(-100%); visibility: hidden; transition: transform var(--dur) var(--ease), visibility 0s linear var(--dur); box-shadow: none; }
  body.sidebar-open .sidebar { transform: translateX(0); visibility: visible; transition-delay: 0s; box-shadow: var(--shadow-lg); }
  .sidebar-close { display: inline-flex; }
  .sidebar-overlay { display: block; position: fixed; inset: 0; background: rgba(10,10,10,.45); z-index: 55; opacity: 0; pointer-events: none; transition: opacity var(--dur) var(--ease); }
  body.sidebar-open .sidebar-overlay { opacity: 1; pointer-events: auto; }
  body.sidebar-open { overflow: hidden; }
  .ed-acc { scroll-margin-top: calc(var(--topbar-h) + 16px); }
}
@media (min-width: 1025px) { .sidebar-overlay { display: none; } }
@media (max-width: 768px) {
  .nav-item { min-height: 44px; }
  .page-title { font-size: 28px; }
  .hero { padding: 26px 22px; min-height: 0; }
  .hero h2 { font-size: 24px; }
  .main-content input, .main-content select, .main-content textarea, .login-box input, .rt-editor { font-size: 16px !important; }
  .chips, .tabs { display: flex; flex-wrap: nowrap; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
  .chips::-webkit-scrollbar, .tabs::-webkit-scrollbar { display: none; }
  .chip, .tab { min-height: 44px; }
  .segmented label { min-height: 44px; }
  .save-bar__dica { display: none; }
  .login-wrap { grid-template-columns: 1fr; }
  .login-visual { display: none; }
  .ed-acc__meta { display: none; }
  .ed-acc__painel { padding: 4px 14px 8px; }
  .ed-restaurar { min-height: 44px; }
  .ed-original summary { min-height: 44px; }
  .rt-barra__btn { min-width: 44px; height: 44px; }
  .rt-barra__msg { display: none; }
  .crumb .crumb-raiz, .crumb .slash { display: none; }
  .top-ver-site span { display: none; }
}
@media (max-width: 720px) {
  .admin-table thead { display: none; }
  .admin-table, .admin-table tbody, .admin-table tr, .admin-table td { display: block; width: 100%; }
  .admin-table tr { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 8px 0; margin-bottom: 12px; }
  .admin-table td { border: 0; padding: 6px 16px; }
  .admin-table td[data-label]::before { content: attr(data-label); display: block; font-weight: 500; font-size: 13px; color: var(--text-muted); }
  .admin-table tbody tr:hover td { background: transparent; }
  .admin-table td.td-acoes { border-top: 1px solid var(--border); margin-top: 6px; padding-top: 10px; }
  .row-actions { justify-content: stretch; }
  .row-actions .btn, .row-actions form { flex: 1; }
  .row-actions form .btn { width: 100%; min-height: 44px; }
  .card.card--tabela { padding: 0; border: 0; background: transparent; }
  .leads-filtros input[type="search"], .leads-filtros select { width: 100%; }
}
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } .lead-dl { grid-template-columns: 1fr; gap: 0; } .lead-dl dd { margin-bottom: 10px; } }
@media (max-width: 480px) {
  .main-content { padding: 22px 16px 40px; }
  .topbar { padding: 0 12px; }
  .card { padding: 18px 16px; }
  .pending-panel { padding: 18px 16px; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .stat-card--accent { grid-column: 1 / -1; }
  .stat-card { padding: 16px; }
  .stat-value { font-size: 28px; }
  .shortcut-grid, .pending-grid { grid-template-columns: 1fr; }
  .page-actions { width: 100%; }
  .page-actions .btn { flex: 1; }
  .img-campo { flex-direction: column; } .img-campo__preview { width: 100%; height: 140px; } .copiavel { flex-direction: column; }
  .list-row { flex-wrap: wrap; }
  .list-row .row-end { flex-basis: 100%; margin-left: 48px; white-space: normal; flex-wrap: wrap; }
  .list-row .row-end:has(> .shortcut__chev:only-child) { flex-basis: auto; margin-left: auto; }
}
@media (pointer: coarse) { .alert-close { width: 44px; height: 44px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; } .shortcut:hover { transform: none; } }
@media (forced-colors: active) { .btn, .chip, .tab, .badge { border: 1px solid ButtonText; } .nav-item[aria-current="page"] { outline: 2px solid Highlight; } }

/* ============================================================ Organizar seções (biblioteca) ============================================================ */
.sec-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.sec-lado { position: sticky; top: calc(var(--topbar-h) + 20px); display: grid; gap: 16px; }
.sec-lado .card { margin: 0; }
.sec-dicas { list-style: none; display: grid; gap: 12px; font-size: 14px; color: var(--muted); }
.sec-dicas li { display: flex; gap: 10px; align-items: flex-start; }
.sec-dicas svg { width: 16px; height: 16px; flex: none; color: var(--accent); margin-top: 2px; }
.sec-dicas b { color: var(--ink); font-weight: 600; }
.sec-lista { list-style: none; display: grid; gap: 0; }
.sec-item { display: grid; grid-template-columns: auto 128px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 12px 14px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); transition: border-color var(--dur) var(--ease), opacity var(--dur) var(--ease); }
.sec-item:hover { border-color: var(--line-strong); }
.sec-item.is-oculta { background: var(--surface-2); }
.sec-item.is-oculta .sec-thumb, .sec-item.is-oculta .sec-info b { opacity: .5; }
.sec-item.is-nova { border-color: var(--accent); border-style: dashed; }
.sec-item.is-trava { background: var(--canvas); }
.sec-ordem { display: grid; justify-items: center; gap: 2px; }
.sec-num { font-size: 13px; font-weight: 600; color: var(--muted); }
.sec-btn { width: 36px; height: 36px; display: inline-grid; place-items: center; border: 1px solid transparent; border-radius: var(--radius-md); background: transparent; color: var(--ink-2); cursor: pointer; }
.sec-btn svg { width: 18px; height: 18px; }
.sec-btn:hover:not([disabled]) { background: var(--accent-soft); color: var(--accent-text); }
.sec-btn[disabled] { opacity: .25; cursor: default; }
.sec-btn[aria-pressed="true"] { color: var(--warning-text); }
.sec-btn--perigo:hover:not([disabled]) { background: var(--danger-bg); color: var(--danger); }
.sec-thumb { width: 128px; aspect-ratio: 16 / 10; border-radius: var(--radius-md); overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); display: grid; place-items: center; color: var(--faint); }
.sec-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.sec-thumb svg { width: 22px; height: 22px; }
.sec-info { min-width: 0; }
.sec-titulo { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sec-titulo b { font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.sec-titulo .badge svg { width: 12px; height: 12px; }
.sec-info small { display: block; margin-top: 4px; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sec-acoes { display: flex; align-items: center; gap: 4px; }
.sec-dica { font-size: 13px; color: var(--muted); padding: 0 8px; }
.sec-inserir { display: flex; justify-content: center; position: relative; height: 34px; }
.sec-inserir::before { content: ""; position: absolute; left: 24px; right: 24px; top: 50%; border-top: 1px dashed transparent; transition: border-color var(--dur) var(--ease); }
.sec-inserir button { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 28px; margin-top: 3px; padding: 0 12px; border: 1px solid transparent; border-radius: var(--radius-full); background: var(--canvas); color: var(--muted); font-size: 13px; font-weight: 500; cursor: pointer; transition: all var(--dur) var(--ease); }
.sec-inserir button svg { width: 14px; height: 14px; }
.sec-inserir:hover::before, .sec-inserir:focus-within::before { border-top-color: var(--accent); }
.sec-inserir button:hover, .sec-inserir button:focus-visible { opacity: 1; border-color: var(--accent); color: var(--accent-text); background: #fff; }
.sec-removida { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; padding: 10px 14px; border: 1px dashed var(--danger-border); border-radius: var(--radius); background: var(--danger-bg); font-size: 14px; color: var(--danger); }
.sec-removida span { display: inline-flex; align-items: center; gap: 8px; }
.sec-removida svg { width: 16px; height: 16px; }
.save-bar__status.is-pendente { color: var(--accent-text); }
.sec-bib-grupo { font-size: 12px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin: 16px 0 8px; }
.sec-bib { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.sec-bib-item { width: 100%; display: flex; flex-direction: column; text-align: left; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; padding: 0; overflow: hidden; cursor: pointer; transition: border-color var(--dur) var(--ease); }
.sec-bib-item img, .sec-bib-sem { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; background: var(--surface-2); display: grid; place-items: center; color: var(--faint); }
.sec-bib-sem svg { width: 26px; height: 26px; }
.sec-bib-txt { display: grid; gap: 3px; padding: 10px 12px 12px; }
.sec-bib-txt b { font-size: 14px; font-weight: 600; }
.sec-bib-txt small { font-size: 13px; color: var(--muted); line-height: 1.4; }
.sec-bib-item:hover:not([disabled]), .sec-bib-item:focus-visible { border-color: var(--accent); }
.sec-bib-item[disabled] { opacity: .5; cursor: not-allowed; }
@media (max-width: 1180px) { .sec-layout { grid-template-columns: minmax(0, 1fr); } .sec-lado { position: static; } }
@media (max-width: 720px) {
  .sec-item { grid-template-columns: auto minmax(0, 1fr); gap: 10px 12px; }
  .sec-thumb { display: none; }
  .sec-acoes { grid-column: 1 / -1; flex-wrap: wrap; justify-content: flex-end; border-top: 1px solid var(--line); padding-top: 8px; }
  .sec-btn { width: 44px; height: 44px; }
  .sec-inserir button { opacity: 1; height: 36px; }
}
/* Cartão de página com dois destinos: o cartão todo abre o editor; "Seções" abre a organização. */
.content-card { position: relative; }
.content-card__link { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.content-card__link:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; box-shadow: inset 0 0 0 5px var(--focus-halo); }
.card-links { display: inline-flex; align-items: center; gap: 14px; }
.card-links a.text-link { position: relative; z-index: 2; }
.card-links a.text-link:hover { color: var(--accent-text); }
.pub-pendente { align-items: center; } .pub-pendente .btn { flex: none; }

/* Logo e ícones aparecem inteiros, sobre fundo escuro (logo com transparência) */
.img-campo__preview.ed-img--marca, .ed-original__img img.ed-img--marca { object-fit: contain; padding: 6px; background: #141414; border-color: #2a2a2a; }

/* Resposta longa (herdado da Mentoria) */
.lead-texto { margin: 0 0 16px; font-size: 15px; line-height: 1.55; color: var(--text, #222); white-space: normal; }

/* Blocos das dobras (ITI): prévia do ícone ao lado do rótulo */
.icone-prev { display: inline-grid; place-items: center; width: 28px; height: 28px; margin-left: 6px; vertical-align: middle;
  border: 1px solid var(--border); border-radius: 8px; color: #0a5e63; background: #fff; }
.icone-prev:empty { display: none; }

/* Editor de textos (ITI): atalho para os blocos da dobra no topo de cada seção */
.ed-acc__listas { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-right: auto; font-size: 14px; color: var(--text-muted, #5b6470); }
.ed-acc__listas svg { width: 16px; height: 16px; }
.ed-acc__listas a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.ed-acc__listas a:hover { color: var(--text, #111); }
.ed-acc__topo { flex-wrap: wrap; gap: 8px; align-items: center; }

/* ============================================================ Revisão de interface 06/10 (painel Finesse) ============================================================
   Texto base 15 px (rótulos 14, ajudas 13, piso de 12 em tudo); contraste; tabelas; formulários; ordem do pedido no celular. */
::placeholder { color: #737373; opacity: 1; }                                   /* M14: 4,7:1 (antes #a3a3a3, 2,5:1) */
.top-dot { top: 2px; right: 2px; min-width: 18px; height: 18px; line-height: 18px; padding: 0 4px; font-size: 12px; background: var(--accent-text); border-width: 1.5px; }
.main-content .editor-wrap textarea { font-family: var(--font-ui); font-size: 15px; line-height: 1.6; } /* M16: descrição sem fonte de código */

/* Botão travado durante o envio (admin.js: "Salvando…") */
.btn.is-enviando, button.is-enviando { opacity: .72; cursor: progress; pointer-events: none; }

/* M3: célula de ações continua célula de tabela (a borda da linha não "quebra" no meio) */
@media (min-width: 721px) {
  td.row-actions { display: table-cell; text-align: right; white-space: normal; }
  td.row-actions > .btn, td.row-actions > a, td.row-actions > form, td.row-actions > span { display: inline-flex; vertical-align: middle; margin: 3px 0 3px 8px; }
  td.row-actions > form { display: inline-block; }
}

/* A2 (lição 48): repetidores (FAQ, home, regras, páginas) não empurram a página para o lado */
.rep-lista { grid-template-columns: minmax(0, 1fr); }
.rep-item, .rep-item__cab, .rep-item__campos { min-width: 0; }

/* M4: caixas de marcar/escolher com área de toque e fieldset sem borda nativa (antes só existia em pedidos.css) */
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
fieldset > legend.field-label { padding: 0; margin-bottom: 8px; }
.check-row { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; line-height: 1.45; cursor: pointer; margin: 4px 0 12px; min-height: 44px; padding: 10px 0; }
.check-row input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--ink); flex: none; }
.papel-opcoes { display: grid; gap: 8px; margin-bottom: 18px; }
.papel-opcao { margin: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--paper); }
.papel-opcao:has(input:checked) { border-color: var(--ink); background: var(--surface-2); }
.papel-opcao b { display: block; }
.papel-opcao__txt { display: block; font-size: 14px; margin-top: 2px; }

/* Erro de campo na linha (Produtos) */
.field-error { color: var(--danger); font-size: 13px; font-weight: 500; margin-top: 6px; }
.is-invalido { border-color: var(--danger) !important; box-shadow: 0 0 0 3px var(--danger-bg) !important; }

/* M12: links soltos e resumos com área de toque de 44 px no toque */
@media (pointer: coarse) {
  .text-link, .ven-tabela summary, .ped-detalhes summary, .ped-notas-mais summary { min-height: 44px; }
  .ped-chk input, .col-chk input { width: 24px; height: 24px; }
}

/* B3: abas roláveis no celular mostram que há mais para o lado */
@media (max-width: 768px) {
  .tabs { -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); padding-right: 24px; }
}

/* Marca dupla Metrix Performance | fig studio */
.marca-dupla { display: inline-flex; align-items: center; gap: 10px; line-height: 0; }
.marca-dupla img { height: var(--marca-h, 20px); width: auto; display: block; }
.marca-sep { width: 1px; align-self: stretch; min-height: var(--marca-h, 20px); background: var(--line-strong); }
.sidebar-brand .marca-dupla { margin-bottom: 2px; }
.login-fig.marca-dupla { margin-bottom: 36px; width: auto; }
.shell-footer .marca-dupla { gap: 6px; vertical-align: middle; }
.marca-dupla img.marca-metrix { height: calc(var(--marca-h, 20px) * 1.35); margin: calc(var(--marca-h, 20px) * -.175) 0; }
