/* ═══════════════════════════════════════════════════════
   ORACFY FERRAMENTAS — Design System
   Versão 3.0 · Clean · Editorial · Consistente
═══════════════════════════════════════════════════════ */

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; -webkit-text-size-adjust: 100%; }
img, svg { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }
input, textarea, select { font: inherit; }

/* ── DESIGN TOKENS ── */
:root {
  /* Cores */
  --red:        #FF3131;
  --red-hover:  #e02020;
  --red-dim:    rgba(255,49,49,.08);
  --red-glow:   rgba(255,49,49,.25);

  --ink:        #0d0d0c;
  --ink-2:      #3a3936;
  --ink-3:      #6b6864;
  --ink-4:      #9b9895;

  --surface:    #ffffff;
  --bg:         #f7f6f4;
  --bg-2:       #f0efed;
  --border:     #e8e5e0;
  --border-2:   #d8d5d0;

  --dark:       #0d0d0c;
  --dark-2:     #1a1a18;
  --dark-border: rgba(255,255,255,.08);

  --green:      #16a34a;
  --green-dim:  rgba(22,163,74,.08);

  /* Tipografia */
  --font-display: 'Bebas Neue', sans-serif;
  --font-body:    'Outfit', sans-serif;

  /* Espaçamento (base 8px) */
  --s1:  4px;
  --s2:  8px;
  --s3:  12px;
  --s4:  16px;
  --s5:  24px;
  --s6:  32px;
  --s7:  48px;
  --s8:  64px;
  --s9:  96px;
  --s10: 128px;

  /* Layout */
  --max-w:     1200px;
  --max-w-sm:  780px;
  --nav-h:     52px;
  --radius:    8px;
  --radius-lg: 14px;

  /* Transição */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --fast: 0.15s;
  --med:  0.25s;
}

/* ── BASE ── */
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 2px; }

/* ═══════════════════════════════════════════════════════
   NAVBAR — #ft-nav
   Escopo isolado via ID para máxima especificidade
═══════════════════════════════════════════════════════ */
#ft-nav {
  position: sticky;
  top: 0;
  z-index: 500;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  width: 100%;
}

#ft-nav .ft-nav-wrap {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: space-between !important;
  height: var(--nav-h);
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--s5);
  gap: 0;
  overflow: visible !important;
}

/* Logo */
#ft-nav .ft-nav-logo {
  display: flex !important;
  align-items: center !important;
  gap: var(--s2);
  flex-shrink: 0;
  padding-right: var(--s5);
  border-right: 1px solid var(--border);
  height: 100%;
  text-decoration: none;
}
#ft-nav .ft-nav-logo-icon {
  width: 24px; height: 24px;
  background: var(--ink);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
#ft-nav .ft-nav-logo-text {
  font-family: var(--font-display);
  font-size: 1rem; letter-spacing: 3px;
  color: var(--ink); line-height: 1;
  white-space: nowrap;
}
#ft-nav .ft-nav-dot { color: var(--red); }

/* Links */
#ft-nav .ft-nav-links {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: stretch !important;
  flex: 1;
  height: 100%;
  overflow: visible !important;
}
#ft-nav .ft-nav-links a {
  display: flex !important;
  align-items: center !important;
  height: var(--nav-h);
  padding: 0 var(--s4);
  font-family: var(--font-body);
  font-size: .72rem;
  font-weight: 600;
  color: var(--ink-3);
  letter-spacing: .07em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  border-right: 1px solid var(--border);
  position: relative;
  transition: color var(--fast), background var(--fast);
  box-sizing: border-box;
}
#ft-nav .ft-nav-links a:first-child {
  border-left: 1px solid var(--border);
  margin-left: var(--s5);
}
#ft-nav .ft-nav-links a:hover {
  color: var(--red);
  background: var(--red-dim);
}
#ft-nav .ft-nav-links a.active {
  color: var(--red);
  background: var(--red-dim);
}
#ft-nav .ft-nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: var(--red);
}

/* Badge Oracfy */
#ft-nav .ft-nav-brand {
  display: flex !important;
  align-items: center !important;
  gap: var(--s1);
  flex-shrink: 0;
  font-family: var(--font-body);
  font-size: .68rem;
  font-weight: 500;
  color: var(--ink-4);
  letter-spacing: .04em;
  text-decoration: none;
  padding-left: var(--s5);
  border-left: 1px solid var(--border);
  white-space: nowrap;
  transition: color var(--fast);
}
#ft-nav .ft-nav-brand span { color: var(--border-2); font-weight: 400; }
#ft-nav .ft-nav-brand:hover { color: var(--red); }

/* Hamburger */
#ft-nav .ft-hamburger {
  display: none !important;
  align-items: center !important;
  justify-content: center !important;
  padding: var(--s2);
  border-radius: var(--radius);
  color: var(--ink-2);
  flex-shrink: 0;
  transition: background var(--fast), color var(--fast);
}
#ft-nav .ft-hamburger:hover { background: var(--bg-2); }

/* Menu mobile */
#ft-nav .ft-mobile-nav {
  display: none !important;
  flex-direction: column !important;
  background: var(--surface);
  border-top: 1px solid var(--border);
  overflow: hidden;
  max-height: 0;
  transition: max-height .3s var(--ease);
}
#ft-nav .ft-mobile-nav.open { max-height: 380px; }
#ft-nav .ft-mobile-nav a {
  display: flex !important;
  align-items: center !important;
  gap: var(--s3);
  padding: var(--s4) var(--s5);
  font-size: .85rem;
  font-weight: 600;
  color: var(--ink-2);
  border-bottom: 1px solid var(--border);
  transition: color var(--fast), background var(--fast);
  letter-spacing: .02em;
}
#ft-nav .ft-mobile-nav a:hover { color: var(--red); background: var(--red-dim); }
#ft-nav .ft-mob-icon { font-size: .9rem; flex-shrink: 0; line-height: 1; }
#ft-nav .ft-mob-oracfy {
  justify-content: space-between !important;
  font-size: .72rem !important;
  color: var(--ink-4) !important;
  border-bottom: none !important;
}
#ft-nav .ft-mob-oracfy:hover { color: var(--red) !important; background: transparent !important; }

/* Responsivo nav */
@media (max-width: 768px) {
  #ft-nav .ft-nav-links,
  #ft-nav .ft-nav-brand  { display: none !important; }
  #ft-nav .ft-hamburger  { display: flex !important; }
  #ft-nav .ft-mobile-nav { display: flex !important; }
  #ft-nav .ft-nav-wrap   { padding: 0 var(--s4); }
}

/* ═══════════════════════════════════════════════════════
   FOOTER — #ft-footer
═══════════════════════════════════════════════════════ */
#ft-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
}
#ft-footer .ft-footer-wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: var(--s4) var(--s5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
  flex-wrap: wrap;
}
#ft-footer .ft-footer-left {
  display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap;
}
#ft-footer .ft-footer-logo {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--font-display);
  font-size: .85rem; letter-spacing: 2px;
  color: var(--ink); text-decoration: none;
  transition: opacity var(--fast);
}
#ft-footer .ft-footer-logo:hover { opacity: .6; }
#ft-footer .ft-footer-dot { color: var(--red); }
#ft-footer .ft-footer-sep { color: var(--border-2); font-size: .65rem; }
#ft-footer .ft-footer-links {
  display: flex; align-items: center;
}
#ft-footer .ft-footer-links a {
  font-size: .68rem; font-weight: 600;
  color: var(--ink-4); letter-spacing: .05em;
  text-transform: uppercase; text-decoration: none;
  padding: 0 var(--s3);
  border-right: 1px solid var(--border);
  transition: color var(--fast);
}
#ft-footer .ft-footer-links a:first-child { border-left: 1px solid var(--border); }
#ft-footer .ft-footer-links a:hover { color: var(--red); }
#ft-footer .ft-footer-credit {
  font-size: .68rem; color: var(--ink-4);
  display: flex; align-items: center; gap: var(--s2);
}
#ft-footer .ft-footer-credit a {
  color: var(--ink-2); font-weight: 700;
  text-decoration: none; transition: color var(--fast);
}
#ft-footer .ft-footer-credit a:hover { color: var(--red); }
#ft-footer .ft-footer-year { color: var(--border-2); }

@media (max-width: 600px) {
  #ft-footer .ft-footer-wrap { flex-direction: column; align-items: flex-start; padding: var(--s4); gap: var(--s3); }
  #ft-footer .ft-footer-links { display: none; }
  #ft-footer .ft-footer-sep   { display: none; }
}

/* ═══════════════════════════════════════════════════════
   HOME — index.html
═══════════════════════════════════════════════════════ */

/* Hero */
.idx-hero {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: var(--s8) var(--s5) var(--s7);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s7);
  align-items: center;
}
.idx-hero-left {}
.idx-badge {
  display: inline-flex; align-items: center; gap: var(--s2);
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: 50px; padding: var(--s1) var(--s4);
  font-size: .62rem; font-weight: 800; color: var(--ink-2);
  letter-spacing: .14em; text-transform: uppercase;
  margin-bottom: var(--s5);
}
.idx-badge span {
  width: 6px; height: 6px;
  background: var(--green); border-radius: 50%;
  animation: pulse-green 2s ease infinite;
}
@keyframes pulse-green {
  0%,100% { box-shadow: 0 0 0 0 rgba(22,163,74,.4); }
  50%      { box-shadow: 0 0 0 5px rgba(22,163,74,0); }
}
.idx-hero-title {
  font-family: var(--font-display);
  font-size: clamp(48px, 6.5vw, 82px);
  line-height: .93; letter-spacing: .01em;
  color: var(--ink); margin-bottom: var(--s4);
}
.idx-hero-title em { font-style: normal; color: var(--red); }
.idx-hero-sub {
  font-size: 16px; font-weight: 300;
  color: var(--ink-3); line-height: 1.7;
  margin-bottom: var(--s6); max-width: 400px;
}
.idx-hero-stats {
  display: flex; gap: var(--s5); align-items: center;
}
.idx-stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem; letter-spacing: 1px;
  color: var(--ink); line-height: 1;
}
.idx-stat span {
  font-size: .6rem; font-weight: 700;
  color: var(--ink-4); letter-spacing: .12em;
  text-transform: uppercase;
}
.idx-stat-sep { width: 1px; height: 30px; background: var(--border); }

/* Hero — cards preview */
.idx-hero-right {
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3);
}
.idx-preview-card {
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--radius-lg); padding: var(--s4);
  display: flex; flex-direction: column; gap: var(--s2);
  text-decoration: none; color: inherit; position: relative;
  transition: border-color var(--fast), transform var(--med) var(--ease), box-shadow var(--med);
}
.idx-preview-card:hover {
  border-color: var(--red);
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0,0,0,.08);
}
.idx-preview-card-feat {
  grid-column: span 2; flex-direction: row;
  align-items: center; background: var(--ink); border-color: var(--ink);
}
.idx-preview-card-feat:hover { border-color: var(--red); }
.idx-preview-ico { font-size: 1.4rem; }
.idx-preview-name {
  font-family: var(--font-display); font-size: 1rem;
  letter-spacing: .5px; color: var(--ink);
}
.idx-preview-card-feat .idx-preview-name { color: #fff; font-size: 1.1rem; }
.idx-preview-desc { font-size: .72rem; color: var(--ink-4); line-height: 1.5; }
.idx-preview-card-feat .idx-preview-desc { color: rgba(255,255,255,.45); }
.idx-new {
  background: var(--red); color: #fff;
  font-size: .52rem; font-weight: 800;
  padding: 2px 8px; border-radius: 50px;
  letter-spacing: .08em; display: inline-block;
}

/* Divider */
.idx-divider {
  max-width: var(--max-w); margin: 0 auto;
  padding: 0 var(--s5) var(--s4);
  display: flex; align-items: center; gap: var(--s4);
  font-size: .6rem; font-weight: 800;
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--ink-4);
}
.idx-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

/* Tools grid */
.idx-grid {
  max-width: var(--max-w); margin: 0 auto;
  padding: 0 var(--s5) var(--s9);
  display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--s3);
}
.idx-card {
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--radius-lg); padding: var(--s5);
  display: flex; flex-direction: column; gap: var(--s4);
  text-decoration: none; color: inherit;
  position: relative; overflow: hidden;
  opacity: 0; transform: translateY(20px);
  transition: opacity .4s ease, transform .4s ease,
              border-color var(--fast), box-shadow var(--med) var(--ease);
}
.idx-card.visible { opacity: 1; transform: translateY(0); }
.idx-card:hover {
  border-color: var(--red);
  transform: translateY(-3px) !important;
  box-shadow: 0 12px 36px rgba(0,0,0,.07);
}
.idx-card-xl { grid-column: span 5; }
.idx-card-lg { grid-column: span 4; }
.idx-card-sm { grid-column: span 3; }

.idx-card-ico {
  width: 48px; height: 48px; border-radius: var(--radius);
  background: var(--bg-2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
}
.idx-card-tag {
  font-size: .58rem; font-weight: 800;
  letter-spacing: .15em; text-transform: uppercase;
  color: var(--ink-4);
}
.idx-card-title {
  font-family: var(--font-display);
  font-size: clamp(20px, 2.2vw, 28px);
  letter-spacing: .5px; color: var(--ink); line-height: 1.1;
}
.idx-card-desc {
  font-size: .8rem; font-weight: 300;
  color: var(--ink-3); line-height: 1.65; flex: 1;
}
.idx-card-cta {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: .68rem; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink-4); transition: color var(--fast);
}
.idx-card:hover .idx-card-cta { color: var(--red); }
.idx-card-cta svg { transition: transform var(--fast); }
.idx-card:hover .idx-card-cta svg { transform: translateX(3px); }
.idx-badge-new {
  position: absolute; top: var(--s4); right: var(--s4);
  background: var(--red); color: #fff;
  font-size: .5rem; font-weight: 800;
  letter-spacing: .1em; padding: 3px 9px;
  border-radius: 50px; text-transform: uppercase;
}
.idx-badge-free {
  display: inline-flex; align-items: center;
  background: var(--green-dim); border: 1px solid rgba(22,163,74,.2);
  color: var(--green); border-radius: 50px;
  font-size: .58rem; font-weight: 700;
  padding: 2px 9px; letter-spacing: .08em; text-transform: uppercase;
}

/* CTA final */
.idx-cta {
  background: var(--ink);
  padding: var(--s9) var(--s5);
  text-align: center;
}
.idx-cta-inner { max-width: 500px; margin: 0 auto; }
.idx-cta-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 54px);
  letter-spacing: 1px; color: #fff;
  line-height: .98; margin-bottom: var(--s3);
}
.idx-cta-title em { font-style: normal; color: var(--red); }
.idx-cta-sub {
  font-size: .9rem; font-weight: 300;
  color: rgba(255,255,255,.4);
  line-height: 1.7; margin-bottom: var(--s5);
}
.idx-cta-btn {
  display: inline-flex; align-items: center; gap: var(--s2);
  background: var(--red); color: #fff;
  font-family: var(--font-display); font-size: 1rem; letter-spacing: 2px;
  padding: var(--s4) var(--s6); border-radius: var(--radius);
  text-decoration: none;
  transition: background var(--fast), transform var(--med) var(--ease), box-shadow var(--med);
}
.idx-cta-btn:hover {
  background: var(--red-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px var(--red-glow);
}

/* Home responsive */
@media (max-width: 1024px) {
  .idx-card-xl { grid-column: span 6; }
  .idx-card-lg { grid-column: span 6; }
  .idx-card-sm { grid-column: span 6; }
}
@media (max-width: 768px) {
  .idx-hero { grid-template-columns: 1fr; padding: var(--s7) var(--s4) var(--s6); gap: var(--s6); }
  .idx-hero-right { display: none; }
  .idx-grid { grid-template-columns: 1fr; padding: 0 var(--s4) var(--s8); }
  .idx-card-xl, .idx-card-lg, .idx-card-sm { grid-column: span 1; }
  .idx-divider { padding: 0 var(--s4) var(--s4); }
}

/* ═══════════════════════════════════════════════════════
   PÁGINAS INTERNAS — Design System Compartilhado
   Prefixo: .pg-* (page components)
═══════════════════════════════════════════════════════ */

/* Page wrapper */
.pg-page {
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Topbar escura — título da ferramenta */
.pg-topbar {
  background: var(--ink);
  border-bottom: 1px solid var(--dark-border);
  padding: 0 var(--s5);
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
  flex-shrink: 0;
}
.pg-topbar-title {
  font-family: var(--font-display);
  font-size: 1rem; letter-spacing: 3px;
  color: #fff; line-height: 1;
  white-space: nowrap;
}
.pg-topbar-title span { color: var(--red); }
.pg-pills {
  display: flex; gap: var(--s2); flex-wrap: nowrap;
}
.pg-pill {
  display: inline-flex; align-items: center;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--dark-border);
  border-radius: 50px; padding: 3px var(--s3);
  font-size: .6rem; font-weight: 600;
  color: rgba(255,255,255,.35);
  white-space: nowrap;
}

/* Layout dois painéis */
.pg-layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  flex: 1;
}

/* Sidebar (form) */
.pg-sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: var(--s5) var(--s5);
  overflow-y: auto;
  overflow-x: hidden;
  position: sticky;
  top: calc(var(--nav-h) + 44px);
  height: calc(100vh - var(--nav-h) - 44px - 49px);
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.pg-sidebar::-webkit-scrollbar { width: 3px; }
.pg-sidebar::-webkit-scrollbar-thumb { background: var(--border); }

/* Preview (resultado) */
.pg-preview {
  background: var(--bg);
  padding: var(--s6);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: sticky;
  top: calc(var(--nav-h) + 44px);
  height: calc(100vh - var(--nav-h) - 44px - 49px);
  overflow: auto;
  gap: var(--s5);
}

/* ── Formulário — campos padronizados ── */
.pg-section {
  font-size: .62rem; font-weight: 800;
  letter-spacing: 2px; text-transform: uppercase;
  color: var(--red);
  margin: var(--s5) 0 var(--s3);
  padding-bottom: var(--s3);
  border-bottom: 1px solid var(--border);
}
.pg-section:first-child { margin-top: 0; }

.pg-field { margin-bottom: var(--s4); }
.pg-field:last-child { margin-bottom: 0; }

.pg-label {
  display: block;
  font-size: .7rem; font-weight: 600;
  color: var(--ink-3); margin-bottom: var(--s1);
  letter-spacing: .02em;
}
.pg-label .req { color: var(--red); }

.pg-input,
.pg-select,
.pg-textarea {
  width: 100%;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: var(--s3) var(--s4);
  font-family: var(--font-body);
  font-size: .88rem;
  color: var(--ink);
  outline: none;
  transition: border-color var(--fast), box-shadow var(--fast), background var(--fast);
  box-sizing: border-box;
}
.pg-input::placeholder,
.pg-textarea::placeholder { color: var(--border-2); }
.pg-input:focus,
.pg-select:focus,
.pg-textarea:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px var(--red-dim);
  background: var(--surface);
}
.pg-textarea { resize: vertical; min-height: 80px; }
.pg-select { cursor: pointer; appearance: none; }

.pg-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s3);
}

.pg-hint {
  font-size: .7rem; color: var(--ink-4);
  margin-top: var(--s1); display: block;
}
.pg-hint.ok    { color: var(--green); }
.pg-hint.error { color: var(--red); }

/* Slug row especial */
.pg-slug-row {
  display: flex; align-items: stretch;
  border: 1.5px solid var(--border); border-radius: var(--radius); overflow: hidden;
  transition: border-color var(--fast), box-shadow var(--fast);
}
.pg-slug-row:focus-within {
  border-color: var(--red);
  box-shadow: 0 0 0 3px var(--red-dim);
}
.pg-slug-prefix {
  padding: var(--s3) var(--s4);
  background: var(--bg-2); border-right: 1.5px solid var(--border);
  font-size: .82rem; color: var(--ink-3);
  font-family: var(--font-body); white-space: nowrap; flex-shrink: 0;
}
.pg-slug-input {
  flex: 1; background: var(--bg); border: none; outline: none;
  padding: var(--s3) var(--s4);
  font-family: var(--font-body); font-size: .88rem; color: var(--ink);
}
.pg-slug-input::placeholder { color: var(--border-2); }

/* Botão primário */
.pg-btn {
  width: 100%;
  background: var(--red); color: #fff;
  border: none; border-radius: var(--radius);
  padding: var(--s3) var(--s4);
  font-family: var(--font-display); font-size: 1.1rem; letter-spacing: 2px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: var(--s2);
  transition: background var(--fast), transform var(--fast);
  margin-top: var(--s3);
}
.pg-btn:hover { background: var(--red-hover); }
.pg-btn:active { transform: scale(.98); }
.pg-btn:disabled { opacity: .55; cursor: not-allowed; }

/* Botão secundário */
.pg-btn-sec {
  width: 100%;
  background: transparent;
  border: 1.5px solid var(--border); border-radius: var(--radius);
  padding: var(--s3) var(--s4);
  font-family: var(--font-body); font-size: .85rem; font-weight: 600;
  color: var(--ink-3); cursor: pointer;
  transition: border-color var(--fast), color var(--fast), background var(--fast);
  margin-top: var(--s2);
}
.pg-btn-sec:hover {
  border-color: var(--ink-2); color: var(--ink);
  background: var(--bg);
}

/* Spinner */
.pg-spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,.3); border-top-color: #fff;
  border-radius: 50%; animation: spin .7s linear infinite; display: none;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Resultado / Result card ── */
.pg-result {
  width: 100%; max-width: 460px;
  background: var(--surface);
  border: 1.5px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: 0 4px 24px rgba(0,0,0,.06);
  padding: var(--s5); display: none; flex-direction: column; gap: var(--s4);
}
.pg-result.visible { display: flex; }

.pg-result-badge {
  width: 44px; height: 44px; border-radius: 10px;
  background: var(--green-dim); border: 1px solid rgba(22,163,74,.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; margin: 0 auto;
}
.pg-result-title {
  font-family: var(--font-display); font-size: 1.4rem; letter-spacing: 2px;
  color: var(--ink); text-align: center;
}
.pg-result-sub {
  font-size: .78rem; color: var(--ink-4); text-align: center;
}

/* Link box */
.pg-link-box {
  background: var(--bg); border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: var(--s3) var(--s4);
  display: flex; align-items: center; justify-content: space-between; gap: var(--s4);
}
.pg-link-url {
  font-size: .88rem; color: var(--ink); font-weight: 600; word-break: break-all;
}
.pg-copy-btn {
  background: var(--ink); border: none; border-radius: 6px;
  padding: var(--s1) var(--s3);
  font-family: var(--font-body); font-size: .75rem; font-weight: 600;
  color: #fff; cursor: pointer; white-space: nowrap;
  transition: background var(--fast);
}
.pg-copy-btn:hover { background: var(--ink-2); }
.pg-copy-btn.copied { background: var(--green); }

/* QR */
.pg-qr-wrap {
  text-align: center; padding: var(--s4) 0;
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.pg-qr-label {
  font-size: .58rem; font-weight: 800; letter-spacing: 2px;
  text-transform: uppercase; color: var(--ink-4); margin-bottom: var(--s3);
}
.pg-qr-img {
  width: 120px; height: 120px; border-radius: var(--radius);
  background: var(--bg); display: block; margin: 0 auto var(--s3);
  border: 4px solid var(--bg);
}
.pg-qr-actions { display: flex; gap: var(--s2); justify-content: center; }
.pg-qr-btn {
  background: var(--bg); border: 1.5px solid var(--border);
  border-radius: 6px; padding: var(--s1) var(--s3);
  font-family: var(--font-body); font-size: .72rem; font-weight: 600;
  color: var(--ink-3); cursor: pointer; transition: all var(--fast);
}
.pg-qr-btn:hover { background: var(--border); color: var(--ink); }

/* Stats */
.pg-stats { display: flex; gap: var(--s2); }
.pg-stat {
  flex: 1; background: var(--bg); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: var(--s3); text-align: center;
}
.pg-stat-val {
  font-family: var(--font-display); font-size: 1.6rem; letter-spacing: 1px;
  color: var(--red); display: block;
}
.pg-stat-label {
  font-size: .58rem; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--ink-4);
}

.pg-analytics-btn {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: var(--s3); background: var(--bg); border: 1.5px solid var(--border);
  border-radius: var(--radius); font-family: var(--font-body);
  font-size: .85rem; font-weight: 600; color: var(--ink-3);
  text-decoration: none; transition: all var(--fast);
}
.pg-analytics-btn:hover { border-color: var(--red); color: var(--red); }

/* ── Empty state ── */
.pg-empty {
  display: flex; flex-direction: column;
  align-items: center; gap: var(--s5); text-align: center;
}
.pg-empty.hidden { display: none; }
.pg-empty-title {
  font-family: var(--font-display); font-size: 1rem;
  letter-spacing: 2px; color: var(--ink-4);
}
.pg-strips {
  display: flex; flex-direction: column; gap: var(--s3);
  width: 100%; max-width: 360px;
}
.pg-strip {
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--radius-lg); padding: var(--s4);
  display: flex; align-items: center; gap: var(--s4); text-align: left;
  transition: border-color var(--fast);
}
.pg-strip:hover { border-color: var(--border-2); }
.pg-strip-icon { font-size: 1.4rem; flex-shrink: 0; }
.pg-strip-title {
  font-size: .85rem; font-weight: 700; color: var(--ink); margin-bottom: 2px;
}
.pg-strip-text { font-size: .75rem; color: var(--ink-4); line-height: 1.45; }

/* ── Footer slim (páginas sem ft-footer) ── */
.pg-slim-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: var(--s3) var(--s5);
  font-size: .7rem; color: var(--ink-4);
  text-align: center; flex-shrink: 0;
}
.pg-slim-footer a {
  color: var(--ink-3); text-decoration: none; font-weight: 600;
  transition: color var(--fast);
}
.pg-slim-footer a:hover { color: var(--red); }

/* ── Item rows (recibo/orçamento) ── */
.pg-item-header {
  display: grid; grid-template-columns: 1fr 80px 80px 28px;
  gap: var(--s2); padding: 0 0 var(--s2);
  border-bottom: 1px solid var(--border);
  font-size: .6rem; font-weight: 800; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-4);
  margin-bottom: var(--s2);
}
.pg-item-row {
  display: grid; grid-template-columns: 1fr 80px 80px 28px;
  gap: var(--s2); margin-bottom: var(--s2); align-items: center;
}
.pg-item-row input {
  background: var(--bg); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: var(--s2) var(--s3);
  font-family: var(--font-body); font-size: .82rem; color: var(--ink);
  outline: none; width: 100%;
  transition: border-color var(--fast), box-shadow var(--fast);
}
.pg-item-row input:focus {
  border-color: var(--red); box-shadow: 0 0 0 3px var(--red-dim);
}
.pg-item-remove {
  width: 28px; height: 28px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  background: none; border: 1px solid var(--border);
  color: var(--ink-4); cursor: pointer; font-size: .9rem;
  transition: all var(--fast); flex-shrink: 0;
}
.pg-item-remove:hover { background: #fef2f2; border-color: var(--red); color: var(--red); }
.pg-add-item {
  font-size: .75rem; font-weight: 700; color: var(--ink-4);
  letter-spacing: .04em; background: none; border: none;
  cursor: pointer; padding: 0; margin-top: var(--s2);
  transition: color var(--fast);
}
.pg-add-item:hover { color: var(--red); }

/* Preview doc label */
.pg-preview-label {
  font-size: .6rem; font-weight: 800; letter-spacing: .2em;
  text-transform: uppercase; color: var(--ink-4);
  align-self: flex-start;
}

/* Mobile — páginas internas */
@media (max-width: 900px) {
  .pg-topbar { padding: var(--s2) var(--s4); }
  .pg-pills { display: none; }
  .pg-layout { grid-template-columns: 1fr; }
  .pg-sidebar {
    position: static; height: auto;
    border-right: none; border-bottom: 1px solid var(--border);
    overflow: visible;
  }
  .pg-preview {
    position: static; height: auto;
    padding: var(--s5) var(--s4);
    justify-content: flex-start;
  }
  .pg-empty { display: none; }
}
@media (max-width: 480px) {
  .pg-row { grid-template-columns: 1fr; }
  .pg-sidebar { padding: var(--s4); }
}

/* Tabs mobile (recibo) */
.pg-tabs {
  display: none; border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.pg-tab {
  flex: 1; padding: var(--s3) var(--s4);
  font-size: .8rem; font-weight: 700;
  color: var(--ink-4); text-align: center;
  border: none; background: none; cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color var(--fast), border-color var(--fast);
}
.pg-tab.active { color: var(--red); border-bottom-color: var(--red); }
@media (max-width: 900px) {
  .pg-tabs { display: flex; }
}

/* ═══════════════════════════════════════════════════════
   PRINT
═══════════════════════════════════════════════════════ */
@media print {
  #ft-nav, .pg-topbar, .pg-slim-footer, #ft-footer { display: none !important; }
}
