/* Central de ajuda do Unifica ERP. Autocontida: não depende do app.css nem do landing.css. */
:root {
  --hc-bg: #F6F8FB;
  --hc-card: #FFFFFF;
  --hc-ink: #0F172A;
  --hc-muted: #52637A;
  --hc-line: #E2E8F0;
  --hc-brand: #1D6FB8;
  --hc-brand-strong: #17609F;
  --hc-brand-soft: #EBF3FA;
  --hc-teal: #087D6C;
  --hc-warn-bg: #FFF7E6;
  --hc-warn-line: #F5BC27;
  --hc-tip-bg: #E6F7F4;
  --hc-header: #FFFFFF;
  --hc-font: Inter, "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  color-scheme: light;
}
html[data-theme="dark"] {
  --hc-bg: #070B14;
  --hc-card: #0F1829;
  --hc-ink: #E8EEFB;
  --hc-muted: #9FB0C8;
  --hc-line: #1E2D44;
  --hc-brand: #6EA0FF;
  --hc-brand-strong: #8FB6FF;
  --hc-brand-soft: #15263D;
  --hc-teal: #34D3B7;
  --hc-warn-bg: #2A2110;
  --hc-warn-line: #B88A1B;
  --hc-tip-bg: #0E2A26;
  --hc-header: #0B1220;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body.hc-body { margin: 0; background: var(--hc-bg); color: var(--hc-ink); font: 16px/1.65 var(--hc-font); }
body.hc-menu-open { overflow: hidden; }
a { color: var(--hc-brand); }
.hc-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Topo */
.hc-top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 14px; padding: 12px clamp(16px, 3vw, 32px); background: var(--hc-header); border-bottom: 1px solid var(--hc-line); }
.hc-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--hc-ink); text-decoration: none; font-weight: 700; white-space: nowrap; }
.hc-brand img { display: block; height: 44px; width: auto; }
.hc-brand .hc-logo-dark { display: none; }
html[data-theme="dark"] .hc-brand .hc-logo-light { display: none; }
html[data-theme="dark"] .hc-brand .hc-logo-dark { display: block; }
.hc-brand span { padding-left: 12px; border-left: 1px solid var(--hc-line); color: var(--hc-brand); font-size: 20px; line-height: 28px; }
.hc-search { position: relative; flex: 1; max-width: 520px; margin-left: auto; }
.hc-search input { width: 100%; height: 44px; padding: 0 46px 0 14px; border: 1px solid var(--hc-line); border-radius: 10px; background: var(--hc-bg); color: var(--hc-ink); font: inherit; }
.hc-search input:focus { outline: 2px solid var(--hc-brand); outline-offset: 1px; }
.hc-search button { position: absolute; top: 2px; right: 2px; width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: var(--hc-muted); cursor: pointer; }
.hc-top__actions { display: flex; align-items: center; gap: 10px; }
.hc-theme, .hc-burger { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--hc-line); border-radius: 10px; background: var(--hc-card); color: var(--hc-ink); cursor: pointer; }
.hc-theme .i-sun { display: none; }
html[data-theme="dark"] .hc-theme .i-sun { display: block; }
html[data-theme="dark"] .hc-theme .i-moon { display: none; }
.hc-burger { display: none; align-content: center; gap: 4px; }
.hc-burger i { display: block; width: 18px; height: 2px; border-radius: 2px; background: currentColor; }
.hc-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 16px; border-radius: 10px; background: var(--hc-brand); color: #FFFFFF; font-weight: 700; text-decoration: none; white-space: nowrap; }
html[data-theme="dark"] .hc-btn { color: #071729; }
.hc-btn:hover { background: var(--hc-brand-strong); }

/* Estrutura */
.hc-shell { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 32px; max-width: 1240px; margin: 0 auto; padding: 28px clamp(16px, 3vw, 32px) 48px; }
.hc-side { position: sticky; top: 86px; align-self: start; max-height: calc(100vh - 110px); overflow-y: auto; padding: 8px 4px 8px 0; }
.hc-side__home { display: block; padding: 8px 12px; margin-bottom: 6px; border-radius: 8px; color: var(--hc-ink); font-weight: 700; text-decoration: none; }
.hc-side__group { margin: 2px 0; }
.hc-side__group summary { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px 12px; border-radius: 8px; font-weight: 700; cursor: pointer; list-style: none; }
.hc-side__group summary::-webkit-details-marker { display: none; }
.hc-side__group summary::before { content: "›"; display: inline-block; width: 12px; color: var(--hc-muted); transition: transform .15s; }
.hc-side__group[open] summary::before { transform: rotate(90deg); }
.hc-side__group ul { margin: 2px 0 8px; padding: 0 0 0 20px; list-style: none; }
.hc-side__group a { display: block; padding: 6px 12px; border-radius: 8px; color: var(--hc-muted); font-size: 14.5px; line-height: 1.4; text-decoration: none; }
.hc-side a:hover, .hc-side__group summary:hover { background: var(--hc-brand-soft); color: var(--hc-ink); }
.hc-side a.is-active { background: var(--hc-brand-soft); color: var(--hc-brand); font-weight: 700; }
.hc-backdrop { position: fixed; inset: 0; z-index: 35; background: rgba(7, 11, 20, .45); }
.hc-main { min-width: 0; }

/* Início */
.hc-hero { margin-bottom: 24px; }
.hc-hero h1 { margin: 4px 0 8px; font-size: clamp(26px, 4vw, 38px); line-height: 1.2; }
.hc-hero p { margin: 0; max-width: 680px; color: var(--hc-muted); }
.hc-hero--compact h1 { font-size: clamp(22px, 3vw, 28px); overflow-wrap: anywhere; }
.hc-eyebrow { font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--hc-teal); }
.hc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.hc-card { padding: 22px 24px; border: 1px solid var(--hc-line); border-radius: 14px; background: var(--hc-card); }
.hc-card h2 { margin: 0 0 4px; font-size: 19px; }
.hc-card__summary { margin: 0 0 10px; color: var(--hc-muted); font-size: 14.5px; }
.hc-card ul { margin: 0; padding-left: 20px; }
.hc-card li { margin: 6px 0; }

/* Busca */
.hc-results { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.hc-results a { display: grid; gap: 2px; padding: 16px 18px; border: 1px solid var(--hc-line); border-radius: 12px; background: var(--hc-card); color: var(--hc-ink); text-decoration: none; }
.hc-results a:hover { border-color: var(--hc-brand); }
.hc-results small { color: var(--hc-teal); font-weight: 700; font-size: 12.5px; }
.hc-results strong { color: var(--hc-brand); font-size: 17px; }
.hc-results span { color: var(--hc-muted); font-size: 14.5px; }
.hc-empty { display: grid; gap: 14px; justify-items: start; padding: 22px 24px; border: 1px dashed var(--hc-line); border-radius: 14px; background: var(--hc-card); }
.hc-empty p { margin: 0; }

/* Artigo */
.hc-article { max-width: 780px; padding: clamp(22px, 4vw, 40px); border: 1px solid var(--hc-line); border-radius: 16px; background: var(--hc-card); }
.hc-crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 14px; color: var(--hc-muted); }
.hc-crumbs a { text-decoration: none; }
.hc-article h1 { margin: 8px 0 6px; font-size: clamp(24px, 3.5vw, 32px); line-height: 1.25; }
.hc-article__lead { margin: 0 0 22px; color: var(--hc-muted); font-size: 17px; }
.hc-article__body h2 { margin: 28px 0 8px; font-size: 20px; }
.hc-article__body p, .hc-article__body li { overflow-wrap: break-word; }
.hc-table-wrap { overflow-x: auto; margin: 12px 0 18px; }
.hc-article__body table { width: 100%; border-collapse: collapse; font-size: 14px; }
.hc-article__body th, .hc-article__body td { text-align: left; vertical-align: top; padding: 9px 10px; border-bottom: 1px solid var(--hc-line); }
.hc-article__body th { color: var(--hc-muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.hc-article__body ol, .hc-article__body ul { padding-left: 22px; }
.hc-article__body li { margin: 6px 0; }
.hc-path { font-weight: 700; color: var(--hc-ink); }
kbd { display: inline-block; min-width: 26px; padding: 1px 6px; border: 1px solid var(--hc-line); border-bottom-width: 2px; border-radius: 6px; background: var(--hc-bg); font: 700 13px/1.5 var(--hc-font); text-align: center; }
.hc-keys { display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 0 !important; list-style: none; }
.hc-note { margin: 18px 0; padding: 12px 16px; border-left: 4px solid var(--hc-teal); border-radius: 0 10px 10px 0; background: var(--hc-tip-bg); }
.hc-note--warn { border-left-color: var(--hc-warn-line); background: var(--hc-warn-bg); }
.hc-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--hc-line); }
.hc-pager a { display: grid; gap: 2px; padding: 12px 16px; border: 1px solid var(--hc-line); border-radius: 10px; text-decoration: none; font-weight: 700; }
.hc-pager small { color: var(--hc-muted); font-weight: 600; }
.hc-pager__next { grid-column: 2; text-align: right; }

/* Rodapé */
.hc-footer { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; padding: 24px 16px 32px; border-top: 1px solid var(--hc-line); font-size: 14px; }

/* Celular e tablet: menu vira gaveta */
@media (max-width: 960px) {
  .hc-shell { grid-template-columns: minmax(0, 1fr); padding-top: 20px; }
  .hc-burger { display: grid; }
  .hc-side { position: fixed; top: 0; bottom: 0; left: 0; z-index: 40; width: min(320px, 86vw); max-height: none; padding: 16px; background: var(--hc-card); border-right: 1px solid var(--hc-line); transform: translateX(-100%); transition: transform .2s ease; }
  .hc-side.is-open { transform: translateX(0); }
}
@media (max-width: 640px) {
  .hc-top { flex-wrap: wrap; gap: 10px; }
  .hc-brand img { height: 36px; }
  .hc-brand span { padding-left: 10px; font-size: 17px; }
  .hc-search { order: 3; flex-basis: 100%; max-width: none; margin-left: 0; }
  .hc-top__actions { margin-left: auto; }
  .hc-pager { grid-template-columns: 1fr; }
  .hc-pager__next { grid-column: auto; text-align: left; }
}
@media (prefers-reduced-motion: reduce) { .hc-side, .hc-side__group summary::before { transition: none; } }
