/* ============================================================
   TREINAMENTO IA — ANALISTAS DE NEGÓCIO
   Global Stylesheet v1.0
   ============================================================ */

/* ── TOKENS (alinhados ao css/style.css do site) ── */
:root {
  --navy:        #0F2D6B;  /* = --primary-hover do site */
  --navy-mid:    #184194;  /* = --primary do site */
  --blue:        #184194;  /* = --primary do site */
  --blue-hover:  #0F2D6B;
  --blue-light:  #E3EFFF;
  --blue-pale:   #F5F8FF;
  --teal:        #0891b2;
  --teal-light:  #e0f7fa;
  --amber:       #c47f17;
  --amber-light: #fef3c7;
  --amber-pale:  #fffbeb;
  --rose:        #c0122b;
  --rose-light:  #ffe4e6;
  --green:       #166534;
  --green-light: #dcfce7;
  --purple:      #6d28d9;
  --purple-light:#ede9fe;
  --bg-page:     #F8F9FA;  /* = --bg-alt do site — fundo frio de leitura (era --sand, tom quente, baixo contraste) */
  --white:       #ffffff;
  --ink:         #0f172a;
  --ink-mid:     #334155;
  --ink-soft:    #64748b;
  --ink-faint:   #94a3b8;
  --line:        #e2e8f0;
  --line-light:  #f1f5f9;

  --radius-sm:   6px;
  --radius-md:   10px;
  --radius-lg:   16px;
  --radius-xl:   24px;

  --shadow-sm:   0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md:   0 4px 16px rgba(0,0,0,.07), 0 1px 4px rgba(0,0,0,.04);
  --shadow-lg:   0 12px 40px rgba(0,0,0,.10), 0 2px 8px rgba(0,0,0,.05);

  --font-head:   'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-body:   'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  background: var(--bg-page);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── SITE BRAND HEADER ── */
.site-brand-header {
  background: rgba(255,255,255,0.97);
  border-bottom: 1px solid #E9ECEF;
  padding: 0.55rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: 'Segoe UI', system-ui, sans-serif;
}
.site-brand-header__logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}
.site-brand-header__logo img {
  height: 34px;
  width: auto;
}
.site-brand-header__logo span {
  font-size: 1.05rem;
  font-weight: 700;
  color: #184194;
  letter-spacing: -0.4px;
}
.site-brand-header__back {
  margin-left: auto;
  font-size: 0.82rem;
  color: #6C757D;
  font-weight: 500;
  text-decoration: none;
}
.site-brand-header__back:hover {
  color: #184194;
  text-decoration: none;
}

/* ── TOPBAR ── */
.topbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  padding: 0 40px;
  display: flex; align-items: center; gap: 6px;
  height: 52px;
  overflow-x: auto;
}
.topbar-logo {
  font-family: var(--font-head);
  font-size: 14px; font-weight: 700;
  color: var(--navy);
  margin-right: 12px;
  white-space: nowrap;
  letter-spacing: -.01em;
}
.topbar a {
  font-size: 12.5px; color: var(--ink-soft);
  padding: 5px 10px; border-radius: var(--radius-sm);
  transition: all .15s; white-space: nowrap;
  font-weight: 500;
}
.topbar a:hover { background: var(--blue-light); color: var(--blue); text-decoration: none; }
.topbar a.active { background: var(--blue-light); color: var(--blue); }

/* ── HERO ── */
.hero {
  background: var(--navy);
  padding: 64px 60px 52px;
  position: relative; overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 80% at 80% 50%, rgba(29,111,205,.18) 0%, transparent 70%),
    repeating-linear-gradient(135deg, transparent, transparent 48px, rgba(255,255,255,.018) 48px, rgba(255,255,255,.018) 49px);
}
.hero-inner { position: relative; max-width: 700px; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: #60a5fa; margin-bottom: 18px;
}
.hero-eyebrow::before {
  content: ''; width: 20px; height: 1.5px; background: #60a5fa;
}
.hero h1 {
  font-family: var(--font-head);
  font-size: clamp(30px, 4.5vw, 48px);
  color: #fff; line-height: 1.1; font-weight: 800;
  letter-spacing: -.02em;
  margin-bottom: 16px;
}
.hero h1 em { font-style: normal; color: #93c5fd; }
.hero-sub {
  font-size: 15px; color: #94a3b8; line-height: 1.7;
  margin-bottom: 28px; max-width: 560px;
}
.hero-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 4px 12px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 20px;
  font-size: 12px; color: #cbd5e1; font-weight: 500;
}

/* ── PAGE LAYOUT ── */
.page-wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 52px 40px 80px;
}

/* ── SECTION LABEL ── */
.section-label {
  font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-faint); margin-bottom: 20px;
  display: flex; align-items: center; gap: 10px;
}
.section-label::after {
  content: ''; flex: 1; height: 1px; background: var(--line);
}

/* ── PROSE (module content) ── */
.prose { max-width: 820px; }
.prose h2 {
  font-family: var(--font-head);
  font-size: 22px; font-weight: 700; letter-spacing: -.01em;
  color: var(--ink); margin: 44px 0 14px;
  padding-bottom: 10px; border-bottom: 1px solid var(--line);
}
.prose h2:first-child { margin-top: 0; }
.prose h3 {
  font-family: var(--font-head);
  font-size: 16px; font-weight: 600;
  color: var(--ink); margin: 28px 0 10px;
}
.prose h4 {
  font-size: 14px; font-weight: 600;
  color: var(--ink-mid); margin: 20px 0 8px; text-transform: uppercase;
  letter-spacing: .06em; font-family: var(--font-body);
}
.prose p { font-size: 15px; color: var(--ink-mid); line-height: 1.75; margin-bottom: 14px; }
.prose ul, .prose ol { margin: 0 0 16px 0; padding-left: 20px; }
.prose li { font-size: 15px; color: var(--ink-mid); line-height: 1.7; margin-bottom: 5px; }
.prose strong { font-weight: 600; color: var(--ink); }
.prose em { font-style: italic; color: var(--ink-soft); }
.prose a { color: var(--blue); font-weight: 500; }
.prose hr { border: none; border-top: 1px solid var(--line); margin: 36px 0; }

/* ── TABLES ── */
.table-wrap { overflow-x: auto; margin: 16px 0 24px; border-radius: var(--radius-md); border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
thead { background: var(--line-light); }
th {
  text-align: left; padding: 10px 14px;
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .07em; color: var(--ink-soft);
}
td { padding: 10px 14px; color: var(--ink-mid); border-top: 1px solid var(--line); vertical-align: top; }
tr:hover td { background: var(--line-light); }

/* ── CODE BLOCKS ── */
.code-block {
  background: #0f172a;
  border-radius: var(--radius-md);
  padding: 20px 22px;
  margin: 14px 0 20px;
  overflow-x: auto;
  position: relative;
}
.code-block pre {
  font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
  font-size: 13px; line-height: 1.65;
  color: #e2e8f0; white-space: pre;
}
.code-label {
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em;
  color: var(--ink-faint); margin-bottom: 6px;
}
.copy-btn {
  position: absolute; top: 12px; right: 12px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12);
  color: #94a3b8; font-size: 11px; font-weight: 600;
  padding: 4px 10px; border-radius: var(--radius-sm);
  cursor: pointer; font-family: var(--font-body);
  transition: all .15s;
}
.copy-btn:hover { background: rgba(255,255,255,.15); color: #fff; }

/* ── CALLOUT BOXES ── */
.callout {
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin: 16px 0 20px;
  display: flex; gap: 12px; align-items: flex-start;
  font-size: 14px; line-height: 1.65;
}
.callout-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.callout-body { color: var(--ink-mid); }
.callout-body strong { display: block; font-weight: 600; margin-bottom: 3px; color: var(--ink); }
.callout.info    { background: var(--blue-pale);   border-left: 3px solid var(--blue); }
.callout.warn    { background: var(--amber-pale);  border-left: 3px solid var(--amber); }
.callout.good    { background: var(--green-light); border-left: 3px solid var(--green); }
.callout.danger  { background: var(--rose-light);  border-left: 3px solid var(--rose); }
.callout.tip     { background: var(--purple-light);border-left: 3px solid var(--purple); }

/* ── BADGES ── */
.badge {
  display: inline-flex; align-items: center;
  font-size: 11px; font-weight: 600; padding: 3px 9px;
  border-radius: 20px; letter-spacing: .03em;
}
.badge-blue   { background: var(--blue-light);   color: #1e40af; }
.badge-teal   { background: var(--teal-light);   color: #0e7490; }
.badge-amber  { background: var(--amber-light);  color: #92400e; }
.badge-green  { background: var(--green-light);  color: var(--green); }
.badge-rose   { background: var(--rose-light);   color: var(--rose); }
.badge-purple { background: var(--purple-light); color: var(--purple); }
.badge-gray   { background: var(--line-light);   color: var(--ink-soft); }

/* ── STEP LIST ── */
.step-list { display: flex; flex-direction: column; gap: 0; margin: 16px 0 24px; }
.step {
  display: flex; gap: 16px;
}
.step-left { display: flex; flex-direction: column; align-items: center; }
.step-dot {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; font-family: var(--font-head);
}
.step-dot.ai     { background: var(--blue-light);   color: var(--blue); border: 1.5px solid #bfdbfe; }
.step-dot.human  { background: var(--line-light);   color: var(--ink-soft); border: 1.5px solid var(--line); }
.step-dot.system { background: var(--teal-light);   color: var(--teal); border: 1.5px solid #a5f3fc; }
.step-line { width: 1.5px; flex: 1; min-height: 20px; background: var(--line); margin: 3px 0; }
.step-body { padding-bottom: 24px; flex: 1; }
.step-title { font-size: 14px; font-weight: 600; color: var(--ink); margin-top: 5px; margin-bottom: 4px; }
.step-desc  { font-size: 13.5px; color: var(--ink-soft); line-height: 1.6; }

/* ── CARD GRID ── */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin: 16px 0 28px; }
.card {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 20px 22px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s, transform .2s;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card-icon { font-size: 22px; margin-bottom: 10px; }
.card-title { font-family: var(--font-head); font-size: 15px; font-weight: 700; color: var(--ink); margin-bottom: 7px; }
.card-desc  { font-size: 13.5px; color: var(--ink-soft); line-height: 1.6; }

/* ── PROMPT BLOCK ── */
.prompt-block {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  margin: 16px 0 24px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.prompt-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 18px;
  background: var(--line-light);
  border-bottom: 1px solid var(--line);
}
.prompt-meta { display: flex; align-items: center; gap: 8px; }
.prompt-name { font-size: 13px; font-weight: 600; color: var(--ink); }
.prompt-when { font-size: 12px; color: var(--ink-soft); padding: 10px 18px; border-bottom: 1px solid var(--line); background: #fffef9; }
.prompt-when strong { color: var(--amber); font-weight: 600; }
.prompt-body {
  padding: 16px 18px;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 12.5px; line-height: 1.7;
  color: #334155;
  background: #0f172a;
  color: #e2e8f0;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ── CHECKLIST ── */
.checklist { list-style: none; padding: 0; margin: 12px 0 20px; display: flex; flex-direction: column; gap: 6px; }
.checklist li {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 9px 12px;
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 14px; color: var(--ink-mid); line-height: 1.5;
}
.checklist li::before {
  content: '☐';
  font-size: 15px; color: var(--blue);
  flex-shrink: 0; margin-top: 1px;
}
.checklist li.done::before { content: '☑'; color: var(--green); }

/* ── COMPARE TABLE ── */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 14px 0 24px; }
.compare-col { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 16px 18px; }
.compare-col.good { border-top: 3px solid var(--green); }
.compare-col.bad  { border-top: 3px solid var(--rose); }
.compare-col-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
  margin-bottom: 10px;
}
.compare-col.good .compare-col-label { color: var(--green); }
.compare-col.bad  .compare-col-label { color: var(--rose); }
.compare-col p { font-size: 13.5px; color: var(--ink-mid); line-height: 1.6; margin-bottom: 8px; }
.compare-col p:last-child { margin-bottom: 0; }

/* ── TOC (table of contents) ── */
.toc {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 20px 24px;
  margin-bottom: 36px;
  box-shadow: var(--shadow-sm);
}
.toc-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-faint); margin-bottom: 12px; }
.toc ol { padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
.toc li { font-size: 14px; }
.toc a { color: var(--ink-mid); font-weight: 500; transition: color .15s; }
.toc a:hover { color: var(--blue); text-decoration: none; }

/* ── FOOTER ── */
.footer {
  background: var(--navy);
  color: #64748b;
  text-align: center;
  padding: 28px 40px;
  font-size: 13px;
}
.footer strong { color: #94a3b8; }
.footer-nav { display: flex; justify-content: center; gap: 20px; margin-top: 12px; flex-wrap: wrap; }
.footer-nav a { font-size: 12px; color: #475569; font-weight: 500; transition: color .15s; }
.footer-nav a:hover { color: #94a3b8; text-decoration: none; }

/* ── MODULE NAV (prev/next) ── */
.mod-nav {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line);
  gap: 16px;
}
.mod-nav a {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 18px; border: 1px solid var(--line);
  border-radius: var(--radius-md); background: var(--white);
  font-size: 13px; font-weight: 600; color: var(--ink-mid);
  transition: all .15s; box-shadow: var(--shadow-sm);
}
.mod-nav a:hover { border-color: var(--blue); color: var(--blue); text-decoration: none; box-shadow: var(--shadow-md); }
.mod-nav a.disabled { opacity: .35; pointer-events: none; }
.mod-nav-label { font-size: 11px; font-weight: 400; color: var(--ink-faint); display: block; }

/* ── TABS ── */
.tabs-nav {
  display: flex; gap: 2px; border-bottom: 1.5px solid var(--line);
  margin-bottom: 24px; flex-wrap: wrap;
}
.tab-btn {
  padding: 9px 16px; font-size: 13px; font-weight: 500;
  color: var(--ink-soft); background: none; border: none;
  border-bottom: 2px solid transparent; margin-bottom: -1.5px;
  cursor: pointer; font-family: var(--font-body);
  transition: all .15s;
}
.tab-btn:hover { color: var(--ink); }
.tab-btn.active { color: var(--blue); border-bottom-color: var(--blue); font-weight: 600; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── PILL TAGS ── */
.tag { display: inline-flex; align-items: center; font-size: 11px; font-weight: 600; padding: 2px 9px; border-radius: 20px; }
.tag-concept { background: var(--blue-light);   color: #1e40af; }
.tag-practice{ background: var(--green-light);  color: var(--green); }
.tag-demo    { background: var(--amber-light);  color: #92400e; }
.tag-prompt  { background: var(--purple-light); color: var(--purple); }
.tag-example { background: var(--teal-light);   color: var(--teal); }

/* ── UTILITY ── */
.mt-0  { margin-top: 0; }
.mb-0  { margin-bottom: 0; }
.mt-8  { margin-top: 8px; }
.mb-8  { margin-bottom: 8px; }
.mt-16 { margin-top: 16px; }
.mb-16 { margin-bottom: 16px; }
.mt-24 { margin-top: 24px; }
.mb-24 { margin-bottom: 24px; }
.text-sm   { font-size: 13px; }
.text-muted{ color: var(--ink-soft); }
.flex      { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.gap-8     { gap: 8px; }
.gap-12    { gap: 12px; }
.items-center { align-items: center; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .topbar { padding: 0 16px; }
  .hero   { padding: 44px 20px 36px; }
  .page-wrap { padding: 32px 20px 60px; }
  .compare { grid-template-columns: 1fr; }
  .mod-nav { flex-direction: column; }
  .mod-nav a { width: 100%; justify-content: center; }
}

/* ── PRINT ── */
@media print {
  .topbar, .mod-nav, .footer { display: none; }
  .page-wrap { padding: 20px; }
  .code-block, .prompt-body { background: #f8f8f8 !important; color: #333 !important; }
}

/* ── JS HELPERS ── */
.hidden { display: none !important; }
