/* ===== Clean Light Theme (Identical to autenticidade.html) ===== */
:root {
  --bg: #f8fafc;
  --bg-subtle: #ffffff;
  --card: #ffffff;
  --sidebar-bg: #ffffff;
  --viewer-bg: #e2e8f0;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --line-focus: #15803d;
  --txt: #0f172a;
  --txt-dim: #334155;
  --mut: #64748b;
  --acc: #15803d;
  --acc-hover: #166534;
  --acc-soft: rgba(21, 128, 61, 0.08);
  --gold: #b48c1e;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg);
  color: var(--txt);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* ===== Brand Logo ===== */
.brand-logo {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.brand {
  font-weight: 800;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.02em;
  color: #0f172a;
}

/* ===== App Workspace Header & Intro ===== */
.app {
  display: flex;
  flex-direction: column;
}

/* ===== Topbar Design (Modern Segmented Navigation) ===== */
.topbar {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid #e2e8f0;
  position: sticky;
  top: 0;
  z-index: 300;
  padding: 0 20px;
}

.topbar-inner {
  max-width: 1200px;
  height: 62px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.brand {
  font-weight: 800;
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.02em;
  color: #0f172a;
  text-decoration: none;
  flex-shrink: 0;
}

.brand:hover {
  opacity: 0.9;
}

.brand-logo {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

/* Segmented Pill Navigation */
.nav-segment {
  display: inline-flex;
  align-items: center;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 9999px;
  padding: 4px;
  gap: 4px;
}

.nav-segment-btn {
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  padding: 7px 16px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.nav-segment-btn:hover {
  color: #0f172a;
}

.nav-segment-btn.active {
  background: #ffffff;
  color: #0f172a;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
}

.top-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.topbar-btn-random {
  background: #ffffff;
  color: #334155;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.15s ease;
}

.topbar-btn-random:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #0f172a;
}

.topbar-btn-pdf {
  background: #15803d;
  color: #ffffff;
  border: 1px solid #15803d;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(21, 128, 61, 0.25);
  transition: all 0.15s ease;
}

.topbar-btn-pdf:hover {
  background: #166534;
  border-color: #166534;
  box-shadow: 0 3px 8px rgba(21, 128, 61, 0.35);
  transform: translateY(-1px);
}

.intro {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 20px;
  background: #f0fdf4;
  border-bottom: 1px solid #bbf7d0;
  font-size: 12.5px;
  line-height: 1.45;
  color: #166534;
}

.intro p {
  flex: 1;
}

.intro[hidden] {
  display: none;
}

/* ===== Hero / Presentation Section (Light) ===== */
.hero-presentation {
  padding: 44px 20px 32px;
  max-width: 1000px;
  margin: 0 auto;
  text-align: center;
  position: relative;
}

.hero-title {
  font-size: 34px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
  color: #0f172a;
}

.hero-title-grad {
  color: var(--acc);
}

.hero-lead {
  font-size: 15px;
  line-height: 1.6;
  color: #475569;
  max-width: 700px;
  margin: 0 auto 30px;
}

.hero-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  text-align: left;
}

.hero-feature-card {
  background: #ffffff;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 18px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
}

.hero-feature-card:hover {
  border-color: var(--acc);
  box-shadow: 0 4px 12px rgba(21, 128, 61, 0.1);
  transform: translateY(-2px);
}

.feature-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  display: grid;
  place-items: center;
  color: #15803d;
  font-weight: 800;
  font-size: 13px;
  margin-bottom: 12px;
}

.hero-feature-card h3 {
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 5px;
  letter-spacing: -0.01em;
}

.hero-feature-card p {
  font-size: 12px;
  color: #64748b;
  line-height: 1.45;
}

/* ===== Buttons (Clean Light) ===== */
.btn {
  background: #ffffff;
  color: #0f172a;
  border: 1px solid var(--line-strong);
  padding: 8px 15px;
  border-radius: 6px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.btn.primary {
  background: var(--acc);
  color: #ffffff;
  border: 1px solid var(--acc);
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(21, 128, 61, 0.3);
}

.btn.primary:hover {
  background: var(--acc-hover);
  border-color: var(--acc-hover);
}

.btn.ghost {
  background: #ffffff;
  color: #334155;
  border: 1px solid var(--line-strong);
}

.btn.ghost:hover {
  background: #f1f5f9;
}

.btn.small {
  padding: 4px 10px;
  font-size: 12px;
}

.btn.bold {
  font-weight: 800;
}

/* ===== Navigation Tabs ===== */
.tabs {
  display: flex;
  background: #ffffff;
  border-bottom: 1px solid var(--line-strong);
  position: sticky;
  top: 50px;
  z-index: 200;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.tabs button {
  background: none;
  border: 0;
  color: var(--mut);
  padding: 12px 16px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.tabs button:hover {
  color: var(--txt);
}

.tabs button.active {
  color: var(--acc);
  border-bottom-color: var(--acc);
  background: #f0fdf4;
}

.only-mobile {
  display: none;
}

/* ===== Workspace & Sidebar Panels ===== */
.workspace {
  display: flex;
  min-height: 750px;
  border-top: 1px solid var(--line);
}

.sidebar {
  width: 380px;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}

.panel {
  display: none;
  padding: 18px;
  overflow-y: auto;
  flex: 1;
  background: var(--sidebar-bg);
}

.panel.active {
  display: block;
}

.panel h2 {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 14px;
  color: #0f172a;
}

.hint {
  color: var(--mut);
  font-size: 12px;
  line-height: 1.45;
  margin: 6px 0 12px;
}

.field {
  margin-bottom: 12px;
}

.field[hidden] {
  display: none;
}

.field label {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.field.check label {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--txt);
  cursor: pointer;
  text-transform: none;
  font-weight: 600;
}

select,
input[type=text],
input[type=date],
textarea,
.te-v input {
  width: 100%;
  padding: 8px 10px;
  background: #ffffff;
  color: #0f172a;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  font: inherit;
  font-size: 13px;
  transition: border-color 0.15s;
}

select:focus,
input:focus,
textarea:focus {
  outline: none;
  border-color: var(--line-focus);
  box-shadow: 0 0 0 2px rgba(21, 128, 61, 0.15);
}

input[type=range] {
  width: 100%;
  accent-color: var(--acc);
}

/* ===== Category Chips & Layout Grid ===== */
.chips {
  display: flex;
  gap: 5px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.chip {
  background: #f8fafc;
  border: 1px solid var(--line-strong);
  color: #475569;
  padding: 4px 10px;
  border-radius: 4px;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.chip:hover {
  color: #0f172a;
  background: #e2e8f0;
}

.chip.on {
  background: var(--acc);
  color: #ffffff;
  border-color: var(--acc);
}

.layout-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.lay-card {
  text-align: left;
  background: #ffffff;
  color: #0f172a;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 10px;
  cursor: pointer;
  font: inherit;
  display: flex;
  flex-direction: column;
  gap: 3px;
  transition: all 0.15s ease;
}

.lay-card:hover {
  border-color: var(--acc);
  background: #f8fafc;
}

.lay-card.sel {
  border-color: var(--acc);
  background: #f0fdf4;
  box-shadow: 0 0 0 1px var(--acc);
}

.lay-badge {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #15803d;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  padding: 1px 4px;
  border-radius: 3px;
  width: max-content;
}

.lay-card b {
  font-size: 12.5px;
  font-weight: 700;
}

.lay-card small {
  color: var(--mut);
  font-size: 11px;
}

/* ===== Table Editor ===== */
.te-g {
  margin: 12px 0 5px;
  font-size: 11px;
  font-weight: 800;
  color: #15803d;
  letter-spacing: 0.5px;
}

.te-r {
  background: #f8fafc;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 6px 8px;
  margin-bottom: 5px;
}

.te-r.hit {
  border-color: var(--acc);
  background: #f0fdf4;
}

.te-l {
  font-size: 11.5px;
  margin-bottom: 5px;
  color: #0f172a;
  font-weight: 600;
}

.te-v {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}

.te-v input {
  padding: 4px 6px;
  font-size: 12px;
  text-align: right;
  background: #ffffff;
}

/* ===== Export Panel ===== */
.export-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.big-export {
  padding: 12px 14px !important;
  text-align: left !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
  border-radius: 6px !important;
}

.btn-main-txt {
  font-size: 13.5px;
  font-weight: 800;
}

.btn-sub-txt {
  font-size: 11px;
  opacity: 0.85;
  font-weight: 400;
}

/* ===== Viewer & Document Stage (Prancheta Light) ===== */
.viewer {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--viewer-bg);
}

.viewer-bar {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 10px 16px;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  font-size: 12.5px;
  flex-wrap: wrap;
}

.zoom-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

.toggle {
  margin-left: auto;
  display: flex;
  gap: 6px;
  align-items: center;
  cursor: pointer;
  font-size: 12px;
  color: var(--txt-dim);
  font-weight: 600;
}

.stage {
  flex: 1;
  overflow: auto;
  padding: 24px;
  display: flex;
}

.sizer {
  margin: 0 auto;
  position: relative;
}

.paper {
  transform-origin: top left;
  background: #ffffff;
  color: #000000;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
  border: 1px solid #cbd5e1;
}

.paper[contenteditable=true] {
  outline: 2px dashed var(--acc);
}

/* ===== AdSense Placeholders (Light) ===== */
.adsense-banner-top {
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  padding: 8px 16px;
  text-align: center;
}

.adsense-slot {
  text-align: center;
  margin-top: 14px;
}

.ad-tag {
  display: block;
  font-size: 9px;
  letter-spacing: 1px;
  color: #94a3b8;
  margin-bottom: 4px;
  font-weight: 800;
}

.ad-placeholder-banner {
  min-height: 40px;
  display: grid;
  place-items: center;
  color: #94a3b8;
  font-size: 11px;
}

.ad-placeholder {
  min-height: 80px;
  display: grid;
  place-items: center;
  color: #94a3b8;
  font-size: 11px;
}

/* ===== Responsive Mobile Styles ===== */
@media (max-width: 899px) {
  .topbar {
    padding: 10px 14px;
    height: auto;
  }

  .topbar-inner {
    height: auto;
    flex-wrap: wrap;
    gap: 10px 8px;
    justify-content: space-between;
  }

  .brand {
    font-size: 14.5px;
    gap: 7px;
    order: 1;
  }

  .brand-logo {
    width: 22px;
    height: 22px;
  }

  .top-actions {
    order: 2;
    gap: 6px;
  }

  .topbar-btn-random {
    padding: 6px 10px;
    font-size: 11.5px;
    gap: 4px;
  }

  .topbar-btn-pdf {
    padding: 6px 12px;
    font-size: 11.5px;
    gap: 4px;
  }

  .nav-segment {
    order: 3;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 3px;
    background: #f1f5f9;
  }

  .nav-segment-btn {
    flex: 1;
    justify-content: center;
    padding: 7px 8px;
    font-size: 12px;
    gap: 5px;
  }

  .nav-segment-btn svg {
    width: 13px;
    height: 13px;
  }

  .tabs {
    top: 0;
    position: static;
  }

  .hero-presentation {
    padding: 24px 14px 14px;
  }

  .hero-title {
    font-size: 21px;
    line-height: 1.25;
    margin-bottom: 8px;
  }

  .hero-lead {
    font-size: 12.5px;
    line-height: 1.45;
    margin-bottom: 16px;
  }

  .hero-features {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .hero-feature-card {
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .feature-icon {
    width: 28px;
    height: 28px;
    min-width: 28px;
    font-size: 11px;
    margin-bottom: 0;
    border-radius: 6px;
  }

  .hero-feature-card h3 {
    font-size: 12.5px;
    margin-bottom: 1px;
  }

  .hero-feature-card p {
    font-size: 11px;
    line-height: 1.35;
  }

  .workspace {
    flex-direction: column;
    min-height: auto;
  }

  .sidebar {
    width: 100%;
    border-right: none;
  }

  .tabs button {
    padding: 10px 12px;
    font-size: 12px;
  }

  .only-mobile {
    display: inline-flex !important;
  }

  body[data-tab="ver"] .sidebar {
    display: none !important;
  }

  body[data-tab="ver"] .viewer {
    display: flex !important;
    min-height: 80vh;
  }

  body:not([data-tab="ver"]) .sidebar {
    display: block !important;
  }

  body:not([data-tab="ver"]) .viewer {
    display: none !important;
  }

  .live-counter-bar {
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
  }

  .consignado-results {
    grid-template-columns: 1fr;
  }
}

/* ===== Gamification: Live Counter Bar ===== */
.live-counter-bar {
  display: flex;
  justify-content: center;
  gap: 24px;
  background: #ffffff;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 14px 20px;
  margin-top: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.counter-item {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
}

.counter-item b {
  display: block;
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.counter-item small {
  display: block;
  font-size: 11px;
  color: #64748b;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.counter-pulse {
  width: 12px;
  height: 12px;
  background-color: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  animation: pulse-green 1.8s infinite;
  flex-shrink: 0;
}

@keyframes pulse-green {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 8px rgba(34, 197, 94, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
  }
}

.counter-icon {
  font-size: 20px;
  line-height: 1;
}

/* ===== AdSense Optimization Elements ===== */
.adsense-banner-top {
  max-width: 1000px;
  margin: 12px auto;
  padding: 0 20px;
  text-align: center;
}

.ad-tag {
  display: inline-block;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #94a3b8;
  margin-bottom: 4px;
}

.ad-placeholder-banner {
  background: #f1f5f9;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
}

.adsense-slot {
  margin-top: 20px;
  text-align: center;
}

.ad-placeholder {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  min-height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
}

/* ===== Illusion Gauge / Termômetro ===== */
.illusion-gauge-box {
  background: #f8fafc;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 12px;
  margin-top: 14px;
}

.gauge-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 8px;
}

.gauge-level-badge {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 800;
}

.gauge-bar-track {
  width: 100%;
  height: 8px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 6px;
}

.gauge-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #22c55e, #eab308, #ef4444);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.gauge-desc {
  display: block;
  font-size: 11.5px;
  color: #475569;
  line-height: 1.4;
  font-style: italic;
}

/* ===== Consignado Calculator ===== */
.consignado-summary-card {
  background: #ffffff;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cs-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

.cs-row.highlight {
  background: #f0fdf4;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid #bbf7d0;
  margin: 4px 0;
}

.cs-val-big {
  font-size: 16px;
  font-weight: 800;
  color: #15803d;
}

.text-green {
  color: #15803d;
  font-weight: 700;
}

.consignado-results {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.consignado-kpi {
  background: #ffffff;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.consignado-kpi.highlight-kpi {
  background: #f0fdf4;
  border-color: #86efac;
}

.kpi-icon {
  font-size: 24px;
  line-height: 1;
}

.kpi-body small {
  display: block;
  font-size: 10.5px;
  color: #64748b;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 2px;
}

.kpi-body b {
  display: block;
  font-size: 14.5px;
  font-weight: 800;
  color: #0f172a;
}

.consignado-destinos {
  margin-bottom: 16px;
}

.consignado-destinos h3 {
  font-size: 13px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 10px;
}

.destino-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.destino-item {
  background: #ffffff;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  transition: all 0.15s ease;
}

.destino-item:hover {
  border-color: var(--acc);
  background: #f8fafc;
}

.destino-icon {
  font-size: 20px;
  line-height: 1.2;
}

.destino-text b {
  display: block;
  font-size: 12.5px;
  color: #0f172a;
  margin-bottom: 2px;
}

.destino-text p {
  font-size: 11.5px;
  color: #475569;
  line-height: 1.35;
}

.consignado-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}

/* ===== Interstitial Modal (PDF Generation & AdSense) ===== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-overlay[hidden] {
  display: none !important;
}

.modal-card {
  background: #ffffff;
  border-radius: 14px;
  padding: 24px;
  width: 100%;
  max-width: 440px;
  text-align: center;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  animation: modalPop 0.25s ease-out;
}

@keyframes modalPop {
  0% { transform: scale(0.92); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.modal-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #e2e8f0;
  border-top-color: var(--acc);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 14px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.modal-card h3 {
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 4px;
}

.modal-sub {
  font-size: 12.5px;
  color: #64748b;
  margin-bottom: 16px;
}

.modal-progress-track {
  width: 100%;
  height: 6px;
  background: #e2e8f0;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 16px;
}

.modal-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--acc);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.modal-steps-list {
  list-style: none;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
  background: #f8fafc;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.modal-steps-list li {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 6px;
}

.modal-steps-list li.done {
  color: #15803d;
}

.modal-steps-list li.current {
  color: #0f172a;
  font-weight: 700;
}

.modal-adsense {
  background: #f1f5f9;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  padding: 14px;
  margin-top: 10px;
  text-align: center;
}

.ad-placeholder-modal p {
  font-size: 12.5px;
  color: #334155;
  margin-bottom: 4px;
}

.ad-placeholder-modal small {
  font-size: 11px;
  color: #64748b;
}

/* ===== Footer (AdSense Compliance & Sátira) ===== */
.app-footer {
  background: #ffffff;
  border-top: 1px solid var(--line);
  padding: 30px 20px 40px;
  margin-top: 40px;
}

.footer-container {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.footer-brand {
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 10px;
}

.footer-disclaimer {
  font-size: 12px;
  color: #64748b;
  line-height: 1.6;
  margin-bottom: 16px;
}

.footer-links {
  font-size: 12.5px;
  color: #94a3b8;
}

.footer-links a {
  color: var(--acc);
  text-decoration: none;
  font-weight: 600;
}

.footer-links a:hover {
  text-decoration: underline;
}

/* ===== Mural de Especulações & Tabelas Vazadas ===== */
.spec-page-container {
  max-width: 1040px;
  margin: 0 auto;
  padding: 24px 20px 60px;
}

.spec-header {
  text-align: center;
  margin-bottom: 28px;
}

.spec-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.spec-title {
  font-size: 32px;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: #0f172a;
  margin-bottom: 10px;
  line-height: 1.2;
}

.spec-subtitle {
  font-size: 15px;
  color: #475569;
  max-width: 760px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ===== Filter Chips ===== */
.spec-filters-bar {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.spec-filter-btn {
  background: #ffffff;
  border: 1px solid var(--line-strong);
  color: #475569;
  padding: 7px 14px;
  border-radius: 9999px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.spec-filter-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #94a3b8;
}

.spec-filter-btn.active {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}

/* ===== Interactive Random Speculation Box ===== */
.spec-random-box {
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 50%, #f8fafc 100%);
  border: 1px solid #86efac;
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  box-shadow: 0 4px 16px rgba(21, 128, 61, 0.06);
}

.spec-random-text h3 {
  font-size: 16px;
  font-weight: 800;
  color: #14532d;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.spec-random-text p {
  font-size: 13px;
  color: #166534;
  margin: 0;
}

.spec-random-btn {
  background: #15803d;
  color: #ffffff;
  border: none;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 8px rgba(21, 128, 61, 0.25);
}

.spec-random-btn:hover {
  background: #166534;
  transform: translateY(-1px);
}

/* ===== Grid of Speculation Cards ===== */
.spec-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 36px;
}

.spec-card {
  background: #ffffff;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.spec-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
}

.spec-card.full-width {
  grid-column: 1 / -1;
}

.spec-card-meta {
  padding: 14px 18px 10px;
  background: #f8fafc;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.spec-card-tag {
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 8px;
  border-radius: 4px;
}

.spec-card-tag.tag-zap { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.spec-card-tag.tag-excel { background: #e0f2fe; color: #0369a1; border: 1px solid #bae6fd; }
.spec-card-tag.tag-breaking { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; }
.spec-card-tag.tag-oficio { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.spec-card-tag.tag-meme { background: #f3e8ff; color: #6b21a8; border: 1px solid #e9d5ff; }

.spec-card-time {
  font-size: 11.5px;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 4px;
}

.spec-card-body {
  padding: 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.spec-card-title {
  font-size: 17px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.35;
  margin-bottom: 8px;
}

.spec-card-origin {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 14px;
  font-style: italic;
  display: flex;
  align-items: center;
  gap: 6px;
}

.spec-card-origin svg {
  flex-shrink: 0;
}

/* Visual Format: WhatsApp Bubble */
.spec-box-zap {
  background: #efeae2;
  border-radius: 10px;
  padding: 12px;
  border: 1px solid #d1d7db;
  margin-bottom: 16px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.zap-bubble {
  background: #ffffff;
  border-radius: 8px;
  padding: 10px 12px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.12);
  position: relative;
}

.zap-forward-tag {
  font-size: 10.5px;
  color: #667781;
  font-style: italic;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 6px;
}

.zap-msg-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #111b21;
  margin-bottom: 6px;
}

.zap-table-preview {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin: 6px 0;
}

.zap-table-preview th {
  text-align: left;
  background: #f0f2f5;
  padding: 5px 8px;
  font-weight: 700;
  color: #3b4a54;
  border-bottom: 1px solid #e9edef;
}

.zap-table-preview td {
  padding: 5px 8px;
  border-bottom: 1px solid #f0f2f5;
  color: #111b21;
}

.zap-table-preview tr:last-child td {
  border-bottom: none;
}

.zap-highlight-val {
  color: #15803d;
  font-weight: 800;
}

.zap-time-tick {
  text-align: right;
  font-size: 10px;
  color: #8696a0;
  margin-top: 4px;
}

/* Visual Format: Excel Spreadsheet */
.spec-box-excel {
  background: #ffffff;
  border: 1px solid #059669;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 16px;
  font-family: 'Carlito', Calibri, sans-serif;
}

.excel-top-bar {
  background: #107c41;
  color: #ffffff;
  padding: 6px 12px;
  font-size: 11.5px;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.excel-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.excel-table th {
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  padding: 5px 8px;
  font-weight: 700;
  color: #374151;
  text-align: left;
}

.excel-table td {
  border: 1px solid #e5e7eb;
  padding: 5px 8px;
  color: #1f2937;
}

.excel-table tr:nth-child(even) td {
  background: #f9fafb;
}

.excel-bold-new {
  color: #047857;
  font-weight: 800;
}

/* Visual Format: Breaking News TV */
.spec-box-breaking {
  background: #090d16;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 16px;
  color: #ffffff;
}

.breaking-ticker-header {
  background: #b91c1c;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.breaking-pulse {
  width: 8px;
  height: 8px;
  background: #ffffff;
  border-radius: 50%;
  animation: pulse 1s infinite alternate;
}

.breaking-content {
  padding: 12px;
}

.breaking-headline {
  font-size: 14px;
  font-weight: 800;
  color: #f8fafc;
  line-height: 1.35;
  margin-bottom: 10px;
}

.breaking-kpis-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.breaking-kpi-card {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 6px;
  padding: 8px;
  text-align: center;
}

.breaking-kpi-card small {
  display: block;
  font-size: 10px;
  color: #94a3b8;
  margin-bottom: 2px;
}

.breaking-kpi-card b {
  font-size: 13px;
  color: #4ade80;
  font-weight: 800;
}

/* Visual Format: Ofício Memorandum */
.spec-box-oficio {
  background: #fafafa;
  border: 1px solid #d4d4d8;
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 16px;
  position: relative;
  font-family: 'Roboto', serif;
}

.oficio-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-25deg);
  font-size: 26px;
  font-weight: 900;
  color: rgba(220, 38, 38, 0.12);
  pointer-events: none;
  white-space: nowrap;
  border: 3px dashed rgba(220, 38, 38, 0.2);
  padding: 6px 14px;
  border-radius: 6px;
}

.oficio-header {
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: #27272a;
  border-bottom: 1px solid #e4e4e7;
  padding-bottom: 6px;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.oficio-table {
  width: 100%;
  font-size: 11.5px;
  border-collapse: collapse;
}

.oficio-table th {
  border-bottom: 1.5px solid #18181b;
  padding: 4px 6px;
  text-align: left;
  font-size: 10.5px;
}

.oficio-table td {
  padding: 4px 6px;
  border-bottom: 1px solid #f4f4f5;
}

/* Actions Footer */
.spec-card-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
}

.btn-fake-auth {
  background: #0f172a;
  color: #ffffff;
  border: 1px solid #0f172a;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.btn-fake-auth:hover {
  background: #1e293b;
  border-color: #1e293b;
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-spec-wpp {
  background: #25d366;
  color: #ffffff;
  border: none;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}

.btn-spec-wpp:hover {
  background: #1ebd5a;
  color: #ffffff;
}

@media (max-width: 768px) {
  .spec-grid {
    grid-template-columns: 1fr;
  }
  .spec-random-box {
    flex-direction: column;
    text-align: center;
  }
  .spec-title {
    font-size: 25px;
  }
  .breaking-kpis-row {
    grid-template-columns: 1fr;
  }
}

@media print {
  .app-ui, .hero-presentation {
    display: none !important;
  }

  body,
  .app,
  .workspace,
  .viewer,
  .stage {
    background: #ffffff;
    height: auto;
    display: block;
    padding: 0;
    overflow: visible;
  }

  .sizer {
    width: auto !important;
    height: auto !important;
  }

  .paper {
    transform: none !important;
    box-shadow: none;
    border: none;
    width: 100% !important;
  }

  @page {
    margin: 8mm;
  }
}