/* ============================================================
   Central de Conhecimento Sollução — Design System (beta)
   Paleta e tipografia oficiais da marca
   ============================================================ */
:root {
  --navy: #061F35;
  --navy-2: #0C1F33;
  --navy-3: #203D5A;
  --gold: #DBA958;
  --gold-light: #ECC98A;
  --gold-dark: #C9923D;
  --blue: #4268C1;
  --blue-light: #6E8FD8;
  --ice: #E1E5EB;
  --bg: #FFFFFF;
  --bg-soft: #F6F8FB;
  --text: #20232B;
  --text-soft: #5A6372;
  --radius: 12px;
  --shadow: 0 8px 28px rgba(6, 31, 53, .10);
  --header-h: 64px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
.ico-svg { vertical-align: -2px; flex-shrink: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  font-family: 'Montserrat', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--bg);
  font-size: 15px;
  line-height: 1.7;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Header ---------- */
.dk-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--header-h);
  background: var(--navy);
  display: flex; align-items: center; gap: 20px;
  padding: 0 24px;
  box-shadow: 0 2px 12px rgba(6, 31, 53, .25);
}
.dk-header .logo { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.dk-header .logo img { height: 34px; display: block; }
.dk-header .logo .portal-tag {
  color: var(--gold);
  font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  border-left: 1px solid rgba(255,255,255,.25);
  padding-left: 12px;
}
.dk-header nav.top-nav { display: flex; gap: 4px; margin-left: auto; }
.dk-header nav.top-nav a {
  color: #cfd8e3; font-size: 13px; font-weight: 600;
  padding: 8px 12px; border-radius: 8px; white-space: nowrap;
}
.dk-header nav.top-nav a:hover { color: #fff; background: rgba(255,255,255,.08); text-decoration: none; }
.dk-header nav.top-nav a.active { color: var(--gold); }

/* ---------- Busca ---------- */
.search-wrap { position: relative; flex: 1; max-width: 460px; }
.search-wrap input {
  width: 100%; height: 38px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.10);
  border-radius: 10px;
  color: #fff; font-family: inherit; font-size: 13.5px;
  padding: 0 14px 0 38px;
  outline: none;
  transition: background .2s, border-color .2s;
}
.search-wrap input::placeholder { color: #9fb0c2; }
.search-wrap input:focus { background: #fff; color: var(--text); border-color: var(--gold); }
.search-wrap input:focus::placeholder { color: #9aa3b0; }
.search-wrap .icon {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; pointer-events: none; opacity: .75;
}
.search-results {
  position: absolute; top: 46px; left: 0; right: 0;
  background: #fff; border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--ice);
  max-height: 380px; overflow-y: auto;
  display: none;
  z-index: 200;
}
.search-results.open { display: block; }
.search-results a {
  display: block; padding: 10px 16px; color: var(--text);
  border-bottom: 1px solid var(--bg-soft);
}
.search-results a:last-child { border-bottom: none; }
.search-results a:hover, .search-results a.sel { background: var(--bg-soft); text-decoration: none; }
.search-results .r-title { font-weight: 700; font-size: 13.5px; color: var(--navy); }
.search-results .r-title .badge { margin-left: 6px; }
.search-results .r-path { font-size: 11.5px; color: var(--text-soft); }
.search-results .empty { padding: 16px; font-size: 13px; color: var(--text-soft); text-align: center; }

/* ---------- Layout ----------
   Fluido: sidebar ancorada à esquerda, conteúdo centralizado na coluna
   flexível, TOC à direita — adapta a qualquer largura de tela. */
.dk-shell {
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr) 240px;
  gap: 0;
  width: 100%;
  padding-top: var(--header-h);
  min-height: 100vh;
  transition: grid-template-columns .28s ease;
}

/* menu retraído (botão ☰ no cabeçalho) */
body.nav-collapsed .dk-shell { grid-template-columns: 0 minmax(0, 1fr) 240px; }
body.nav-collapsed .home-shell { grid-template-columns: 0 minmax(0, 1fr); }
body.nav-collapsed .dk-sidebar { opacity: 0; pointer-events: none; padding-left: 0; padding-right: 0; border-right: none; overflow: hidden; }

/* ---------- Sidebar ---------- */
.dk-sidebar {
  border-right: 1px solid var(--ice);
  padding: 20px 14px 40px 18px;
  position: sticky; top: var(--header-h);
  height: calc(100vh - var(--header-h));
  overflow-y: auto;
  background: linear-gradient(180deg, #F8FAFD 0%, #F1F5FA 100%);
  transition: opacity .2s ease;
}
.dk-sidebar::-webkit-scrollbar { width: 6px; }
.dk-sidebar::-webkit-scrollbar-thumb { background: var(--ice); border-radius: 3px; }

.dk-sidebar .module-label {
  display: flex; align-items: center; gap: 8px;
  font-size: 10.5px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase;
  color: var(--navy-3); margin: 22px 4px 8px;
}
.dk-sidebar .module-label:first-child { margin-top: 4px; }
.dk-sidebar .module-label .mi {
  display: flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 7px;
  background: linear-gradient(135deg, var(--navy), var(--navy-3));
  box-shadow: 0 2px 6px rgba(6,31,53,.22);
  color: var(--gold);
}
.dk-sidebar .module-label::after {
  content: ""; flex: 1; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--gold-light), transparent);
}
.dk-sidebar details { margin-bottom: 2px; }
.dk-sidebar summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 700; color: var(--navy);
  padding: 7px 10px; border-radius: 9px;
  transition: background .15s, transform .15s;
}
.dk-sidebar summary::-webkit-details-marker { display: none; }
.dk-sidebar summary:hover { background: rgba(66,104,193,.10); transform: translateX(2px); }
.dk-sidebar summary .chev {
  margin-left: auto; transition: transform .18s, color .18s;
  font-size: 9px; color: var(--gold-dark);
}
.dk-sidebar details[open] > summary { color: var(--blue); }
.dk-sidebar details[open] > summary .chev { transform: rotate(90deg); color: var(--blue); }
.dk-sidebar .grp { padding-left: 10px; border-left: 2px solid rgba(66,104,193,.18); margin-left: 14px; }
.dk-sidebar a.page {
  display: block; font-size: 12.8px; font-weight: 500; color: var(--text-soft);
  padding: 5px 10px; border-radius: 7px; line-height: 1.45;
  transition: background .15s, color .15s, transform .15s;
}
.dk-sidebar a.page:hover {
  color: var(--blue); background: rgba(66,104,193,.10);
  text-decoration: none; transform: translateX(2px);
}
.dk-sidebar a.page.active {
  color: var(--navy); font-weight: 700;
  background: #fff;
  border-left: 4px solid var(--gold); margin-left: -4px;
  box-shadow: 0 3px 10px rgba(6,31,53,.10);
}

/* ---------- Conteúdo ---------- */
.dk-content {
  padding: 32px 48px 80px;
  width: 100%; /* ocupa toda a coluna entre o menu e o sumário */
}
.dk-content a { font-weight: 600; }
.dk-content strong { color: var(--navy); }
.breadcrumbs { font-size: 12px; color: var(--text-soft); margin-bottom: 20px; }
.breadcrumbs a { color: var(--blue); font-weight: 600; }
.breadcrumbs .sep { margin: 0 6px; color: var(--gold); font-weight: 700; }
.breadcrumbs strong {
  color: var(--navy); background: linear-gradient(135deg, rgba(219,169,88,.22), rgba(219,169,88,.10));
  border: 1px solid var(--gold-light);
  padding: 2px 10px; border-radius: 999px;
}

#content h1 {
  font-size: 31px; font-weight: 800; color: var(--navy);
  line-height: 1.25; margin-bottom: 10px;
  position: relative; padding-left: 20px;
}
#content h1::before {
  content: ""; position: absolute; left: 0; top: 7px; bottom: 7px; width: 7px;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--gold-light), var(--gold-dark));
  box-shadow: 0 2px 8px rgba(219,169,88,.45);
}
.dk-content .page-desc { font-size: 15px; color: var(--text-soft); margin-bottom: 24px; }
#content h2 {
  font-size: 18px; font-weight: 800; color: #fff;
  margin: 44px 0 16px; padding: 11px 18px;
  background: linear-gradient(94deg, var(--navy) 0%, var(--navy-3) 70%, #2C5178 100%);
  border-left: 5px solid var(--gold);
  border-radius: 11px;
  box-shadow: 0 6px 16px rgba(6,31,53,.18);
}
#content h3 {
  font-size: 16.5px; font-weight: 800; color: var(--navy);
  margin: 30px 0 10px; padding: 2px 0 2px 12px;
  border-left: 4px solid var(--blue);
}
#content h4 {
  display: inline-block;
  font-size: 12.5px; font-weight: 800; color: var(--gold-dark);
  letter-spacing: .05em; text-transform: uppercase;
  margin: 24px 0 8px; padding: 5px 14px;
  background: linear-gradient(135deg, #FBF2E0, #F6E5C4);
  border: 1px solid var(--gold-light);
  border-radius: 999px;
}
.dk-content p { margin: 0 0 14px; }
.dk-content ul, .dk-content ol { margin: 0 0 16px 22px; }
.dk-content li { margin-bottom: 5px; }
.dk-content li > ul { margin-top: 5px; margin-bottom: 5px; }
.dk-content code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: .88em; background: var(--bg-soft);
  border: 1px solid var(--ice);
  padding: 1px 6px; border-radius: 5px; color: var(--navy-3);
}
.dk-content img { max-width: 100%; border-radius: var(--radius); }
.dk-content hr { border: none; border-top: 1px solid var(--ice); margin: 32px 0; }

/* Badge de transação (EXP009, REC019...) */
.badge {
  display: inline-block; vertical-align: middle;
  font-size: 11px; font-weight: 800; letter-spacing: .05em;
  color: var(--navy); background: linear-gradient(135deg, var(--gold-light), var(--gold));
  border-radius: 6px; padding: 2px 8px;
}

/* Callouts */
.callout {
  display: flex; gap: 12px;
  border-radius: var(--radius);
  padding: 14px 16px; margin: 18px 0;
  font-size: 14px;
  border: 1px solid;
}
.callout .co-ico { font-size: 18px; line-height: 1.4; }
.callout .co-body p:last-child { margin-bottom: 0; }
.callout .co-title { font-weight: 800; font-size: 13px; letter-spacing: .02em; margin-bottom: 2px; }
.callout.dica { background: #FBF4E7; border-color: var(--gold-light); }
.callout.dica .co-title { color: var(--gold-dark); }
.callout.info { background: #EEF2FB; border-color: #C9D6F2; }
.callout.info .co-title { color: var(--blue); }
.callout.atencao { background: #FDF0EE; border-color: #F2CDC7; }
.callout.atencao .co-title { color: #B4483A; }

/* Tabelas */
.tbl-wrap { overflow-x: auto; margin: 18px 0; border-radius: var(--radius); border: 1px solid var(--ice); }
.dk-content table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
.dk-content th {
  background: var(--navy); color: #fff; text-align: left;
  font-size: 12px; font-weight: 700; letter-spacing: .04em;
  padding: 10px 14px; white-space: nowrap;
}
.dk-content td { padding: 9px 14px; border-top: 1px solid var(--bg-soft); vertical-align: top; }
.dk-content tr:nth-child(even) td { background: #FAFBFD; }

/* Figuras / prints */
figure.shot {
  margin: 20px 0; border: 1px solid var(--ice); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
}
figure.shot figcaption {
  font-size: 12px; color: var(--text-soft); padding: 8px 14px;
  background: var(--bg-soft); border-top: 1px solid var(--ice);
}
.shot-placeholder {
  background: repeating-linear-gradient(45deg, var(--bg-soft), var(--bg-soft) 12px, #EFF3F8 12px, #EFF3F8 24px);
  min-height: 180px; display: flex; align-items: center; justify-content: center;
  color: var(--text-soft); font-size: 13px; font-weight: 600; gap: 8px;
}

/* Passo a passo numerado */
.steps { counter-reset: step; margin: 18px 0; padding: 0; list-style: none; }
.steps > li {
  counter-increment: step; position: relative;
  padding: 0 0 18px 46px; margin: 0;
}
.steps > li::before {
  content: counter(step);
  position: absolute; left: 0; top: -1px;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--navy); color: var(--gold);
  font-weight: 800; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}
.steps > li:not(:last-child)::after {
  content: ""; position: absolute; left: 14.5px; top: 32px; bottom: 2px;
  width: 1px; background: var(--ice);
}

/* Prev / Next */
.pager { display: flex; gap: 16px; margin-top: 56px; }
.pager a {
  flex: 1; border: 1px solid var(--ice); border-radius: var(--radius);
  padding: 14px 18px; color: var(--text);
  transition: border-color .2s, box-shadow .2s;
}
.pager a:hover { text-decoration: none; border-color: var(--gold); box-shadow: var(--shadow); }
.pager .dir { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-soft); }
.pager .t { font-size: 14px; font-weight: 700; color: var(--navy); margin-top: 2px; }
.pager a.next { text-align: right; }

/* Feedback */
.feedback {
  margin-top: 40px; padding: 20px 24px;
  background: var(--bg-soft); border-radius: var(--radius);
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.feedback .q { font-weight: 700; font-size: 14px; color: var(--navy); }
.feedback button {
  font-family: inherit; font-size: 13px; font-weight: 700;
  border: 1px solid var(--ice); background: #fff; color: var(--navy);
  border-radius: 8px; padding: 8px 16px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
}
.feedback button .ico-svg { color: var(--gold-dark); }
.feedback button:hover { border-color: var(--gold); }
.feedback .thanks { font-size: 13px; color: var(--gold-dark); font-weight: 700; }
.feedback .edit-link { margin-left: auto; font-size: 12.5px; color: var(--text-soft); }
.feedback .edit-link:hover { color: var(--gold-dark); }

/* Página em migração */
.migrating {
  text-align: center; padding: 60px 20px;
  border: 2px dashed var(--ice); border-radius: var(--radius); margin-top: 20px;
}
.migrating .emoji { color: var(--gold-dark); }
#content .migrating h2 {
  background: none; color: var(--navy); padding: 0;
  border: none; box-shadow: none; margin: 12px 0 0; font-size: 20px;
}
.migrating p { color: var(--text-soft); max-width: 420px; margin: 8px auto 0; }

/* ---------- TOC (nesta página) ---------- */
.dk-toc {
  padding: 32px 20px 40px 8px;
  position: sticky; top: var(--header-h);
  height: calc(100vh - var(--header-h));
  overflow-y: auto;
  font-size: 12.5px;
}
.dk-toc .toc-label {
  font-size: 10.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
  color: var(--text-soft); margin-bottom: 10px;
}
.dk-toc a {
  display: block; color: var(--text-soft); padding: 4px 0 4px 12px;
  border-left: 2px solid var(--ice); line-height: 1.45;
}
.dk-toc a.h3 { padding-left: 24px; font-size: 12px; }
.dk-toc a:hover { color: var(--navy); text-decoration: none; }
.dk-toc a.active { color: var(--navy); font-weight: 700; border-left-color: var(--gold); }

/* ============================================================
   HOME (dentro do shell, com sidebar)
   ============================================================ */
.home-shell { grid-template-columns: 292px minmax(0, 1fr); }
.home-banner {
  background: linear-gradient(140deg, var(--navy) 0%, var(--navy-3) 100%);
  border-radius: 18px;
  padding: 36px 40px;
  color: #fff;
  margin-bottom: 32px;
  position: relative; overflow: hidden;
}
.home-banner::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(420px 200px at 88% 10%, rgba(219,169,88,.16), transparent 65%),
    radial-gradient(360px 190px at 6% 95%, rgba(66,104,193,.25), transparent 65%);
}
.home-banner > * { position: relative; }
.home-banner .kicker {
  font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 10px;
}
.home-banner h1 {
  font-size: 27px; font-weight: 800; line-height: 1.25; margin-bottom: 10px; color: #fff;
  position: relative; padding-left: 18px;
}
.home-banner h1::before {
  content: ""; position: absolute; left: 0; top: 5px; bottom: 5px; width: 6px;
  border-radius: 4px; background: linear-gradient(180deg, var(--gold-light), var(--gold-dark));
}
.home-banner p { color: #B9C6D4; font-size: 14px; max-width: 620px; margin: 0; }
.dk-content.home .sec-title { font-size: 19px; font-weight: 800; color: var(--navy); margin-bottom: 14px; }
.home-foot { margin-top: 48px; font-size: 12px; color: var(--text-soft); }

/* ============================================================
   HOME (hero antigo — mantido para referência)
   ============================================================ */
.home-hero {
  background: linear-gradient(140deg, var(--navy) 0%, var(--navy-3) 100%);
  padding: calc(var(--header-h) + 64px) 24px 72px;
  text-align: center; color: #fff;
  position: relative; overflow: hidden;
}
.home-hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(600px 300px at 85% 20%, rgba(219,169,88,.14), transparent 65%),
    radial-gradient(500px 260px at 10% 90%, rgba(66,104,193,.22), transparent 65%);
}
.home-hero > * { position: relative; }
.home-hero .kicker {
  font-size: 12px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 14px;
}
.home-hero h1 { font-size: 38px; font-weight: 800; line-height: 1.2; max-width: 720px; margin: 0 auto 12px; }
.home-hero p.sub { color: #B9C6D4; max-width: 560px; margin: 0 auto 32px; font-size: 15.5px; }
.home-hero .search-wrap { margin: 0 auto; max-width: 560px; }
.home-hero .search-wrap input { height: 52px; font-size: 15px; border-radius: 14px; background: #fff; color: var(--text); padding-left: 46px; }
.home-hero .search-wrap input::placeholder { color: #9aa3b0; }
.home-hero .search-wrap .icon { left: 16px; opacity: .55; }
.home-hero .search-results { top: 60px; text-align: left; }
.home-hero .hints { margin-top: 14px; font-size: 12.5px; color: #9fb0c2; }
.home-hero .hints a { color: var(--gold-light); font-weight: 600; }

.home-main { max-width: 1120px; margin: 0 auto; padding: 56px 24px 80px; }
.home-main .sec-title { font-size: 22px; font-weight: 800; color: var(--navy); margin-bottom: 6px; }
.home-main .sec-sub { color: var(--text-soft); font-size: 14px; margin-bottom: 28px; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.card {
  border: 1px solid var(--ice); border-radius: 16px;
  padding: 24px; background: #fff;
  transition: transform .18s, box-shadow .18s, border-color .18s;
  display: block; color: var(--text);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--gold); text-decoration: none; }
.card .ico {
  width: 46px; height: 46px; border-radius: 12px;
  background: linear-gradient(135deg, var(--navy), var(--navy-3));
  color: var(--gold); font-size: 21px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.card h3 { font-size: 15.5px; font-weight: 800; color: var(--navy); margin-bottom: 6px; }
.card p { font-size: 13px; color: var(--text-soft); line-height: 1.55; }
.card .count { display: inline-block; margin-top: 12px; font-size: 11.5px; font-weight: 700; color: var(--gold-dark); }

.quick { margin-top: 56px; }
.quick-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 10px; }
.quick-links a {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-radius: 10px;
  border: 1px solid var(--bg-soft); background: var(--bg-soft);
  color: var(--navy); font-size: 13.5px; font-weight: 600;
}
.quick-links a:hover { text-decoration: none; border-color: var(--gold); background: #fff; }
.quick-links .arrow { margin-left: auto; color: var(--gold-dark); }
.quick-links .ql-ico { display: inline-flex; color: var(--gold-dark); }

.home-footer {
  background: var(--navy); color: #9fb0c2;
  text-align: center; padding: 28px 24px; font-size: 12.5px;
}
.home-footer img { height: 26px; opacity: .9; display: block; margin: 0 auto 10px; }
.home-footer a { color: var(--gold-light); }

/* ---------- Botão expandir/retrair o menu ---------- */
.menu-btn {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; flex-shrink: 0;
  background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.18);
  border-radius: 10px; color: var(--gold-light); cursor: pointer; font-size: 16px;
  transition: background .15s, border-color .15s;
}
.menu-btn:hover { background: rgba(219,169,88,.18); border-color: var(--gold); }
body.nav-collapsed .menu-btn { background: linear-gradient(135deg, var(--gold-light), var(--gold)); color: var(--navy); border-color: var(--gold); }

/* ---------- Responsivo ---------- */
@media (max-width: 1120px) {
  .dk-shell { grid-template-columns: 260px minmax(0, 1fr); }
  body.nav-collapsed .dk-shell { grid-template-columns: 0 minmax(0, 1fr); }
  .dk-toc { display: none; }
}
@media (max-width: 860px) {
  .dk-header nav.top-nav { display: none; }
  .dk-shell, body.nav-collapsed .dk-shell { grid-template-columns: 1fr; }
  .dk-sidebar {
    position: fixed; left: 0; top: var(--header-h); bottom: 0; width: 290px;
    transform: translateX(-100%); transition: transform .22s;
    z-index: 90; box-shadow: var(--shadow); height: auto;
  }
  .dk-sidebar.open { transform: translateX(0); opacity: 1; pointer-events: auto; }
  .dk-content { padding: 24px 20px 60px; }
  .dk-header { gap: 12px; padding: 0 14px; }
  .dk-header .logo .portal-tag { display: none; } /* prioriza a busca no mobile */
  .dk-header .logo img { height: 28px; }
  #content h1 { font-size: 23px; padding-left: 15px; }
  #content h2 { font-size: 16px; }
  .home-banner { padding: 26px 22px; }
  .home-banner h1 { font-size: 21px; }
  .home-hero h1 { font-size: 28px; }
}
