/* =========================================================
   SWC PMO · quality.css — área de Qualidade (SGQ)

   Usa os tokens do ecossistema (assets/css/swm-design-tokens.css),
   nunca cor literal para superfície ou texto — assim o modo dia sai
   de graça. Cor de destaque vem sempre de --c, definido inline pelo
   JS a partir do enum da tela.

   Regra de acessibilidade do §24.3 do plano: status carrega TEXTO
   além de cor. Por isso todo badge aqui tem rótulo escrito, e os
   estados de lacuna ganham borda/fundo além do tom.

   As quatro primeiras regras (.sched-kpi*, .sched-badge, .sched-bar)
   estavam sendo usadas por vários módulos do PMO — risks, costs,
   budget, inspections — e nunca haviam sido definidas em lugar
   nenhum. Ficam aqui, no arquivo que as introduz de verdade.
========================================================= */

/* ── Blocos compartilhados que faltavam ─────────────── */
.sched-kpi {
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 3px solid var(--c, #60a5fa);
  border-radius: var(--radius, 12px);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.sched-kpi__label {
  font-size: 10px; font-weight: 800; color: var(--muted-2, #546073);
  text-transform: uppercase; letter-spacing: .1em;
}
.sched-kpi__big { font-size: 25px; font-weight: 900; line-height: 1.1; color: var(--text); }
.sched-kpi__sub { font-size: 10.5px; color: var(--muted); }

.sched-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: 999px;
  font-size: 11px; font-weight: 700; line-height: 1.5;
  color: var(--c, #8892a4);
  background: color-mix(in srgb, var(--c, #8892a4) 14%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c, #8892a4) 40%, transparent);
  white-space: nowrap;
}
.sched-badge + .sched-badge { margin-left: 4px; }

.sched-bar {
  width: 100%; height: 6px; border-radius: 999px;
  background: var(--line-soft); overflow: hidden; margin-top: 4px;
}
.sched-bar > i { display: block; height: 100%; border-radius: 999px; transition: width .3s ease; }

.swm-input {
  background: var(--line-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm, 8px);
  padding: 7px 11px;
  color: var(--text);
  font: inherit; font-size: 12.5px;
}
.swm-input:focus { outline: none; border-color: var(--gold); }

/* `hidden` em elemento com `display` de autor não esconde nada: a regra do
   navegador perde para qualquer folha. Reforço para o cabeçalho global, que
   o layout.js esconde quando a tela traz o próprio. */
.swm-topbar[hidden] { display: none !important; }

/* Aviso de versão nova (version-check.js) */
.swm-newver {
  position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 9000;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px 10px 16px; border-radius: 12px;
  background: var(--panel-2, #1c2333); color: var(--text, #e8eaf0);
  border: 1px solid var(--gold-line, rgba(245, 158, 11, .3));
  box-shadow: 0 10px 30px rgba(0, 0, 0, .45);
  font-size: 12.5px;
}
.swm-newver strong { color: var(--gold-2, #facc15); }
.swm-newver button {
  font: inherit; font-size: 12px; font-weight: 800; cursor: pointer;
  padding: 6px 12px; border-radius: 8px; border: 0;
  background: var(--gold, #f59e0b); color: #111;
}
.swm-newver button.ghost { background: transparent; color: var(--muted, #8892a4); border: 1px solid var(--line, #252d3d); }

/* ── Topbar e avisos ────────────────────────────────── */
.sgq-topbar h2 { letter-spacing: -.01em; }

.sgq-note {
  margin: 0 0 14px;
  padding: 11px 14px;
  border-radius: var(--radius-sm, 8px);
  background: color-mix(in srgb, var(--blue) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--blue) 26%, transparent);
  color: var(--muted);
  font-size: 12.5px; line-height: 1.6;
}
.sgq-note strong { color: var(--text); }
.sgq-note--modal { margin-bottom: 14px; }

.sgq-alerts {
  margin: 0 0 14px;
  padding: 10px 14px;
  border-radius: var(--radius-sm, 8px);
  background: color-mix(in srgb, var(--red) 9%, transparent);
  border: 1px solid color-mix(in srgb, var(--red) 30%, transparent);
}
.sgq-alerts p { margin: 4px 0; font-size: 12.5px; color: var(--st-erro-fg, #fca5a5); line-height: 1.55; }
.sgq-alerts p strong { color: #fecaca; }

.sgq-p { font-size: 12.5px; line-height: 1.65; margin: 12px 2px 0; }
.sgq-p.muted { color: var(--muted); }
.sgq-h4 { font-size: 13px; font-weight: 800; color: var(--text); margin: 18px 0 8px; }

.sgq-warn { color: var(--st-alerta-fg, #fbbf24); font-weight: 700; }
.sgq-gap {
  margin: 0; padding: 10px 12px;
  font-size: 12px; color: var(--muted);
  border-left: 2px dashed color-mix(in srgb, var(--muted) 45%, transparent);
  background: var(--line-soft);
  border-radius: 0 6px 6px 0;
}
.sgq-empty { padding: 40px 20px; }
.sgq-req { color: var(--st-alerta-fg, #fbbf24); font-style: normal; }
.sgq-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }

/* ── Filtros ────────────────────────────────────────── */
.sgq-filterbar { justify-content: space-between; }
.sgq-filterbar__r { display: flex; gap: 8px; align-items: center; margin-left: auto; }
.sgq-search { min-width: 210px; }

/* ── Tabelas ────────────────────────────────────────── */
.sgq-table th {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .07em;
  color: var(--muted-2, #546073); font-weight: 800;
}
.sgq-table td { font-size: 12.5px; vertical-align: top; }
.sgq-table tr.is-gap  { background: color-mix(in srgb, #fbbf24 6%, transparent); }
.sgq-table tr.is-vital { background: color-mix(in srgb, var(--red) 6%, transparent); }
.sgq-table code {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--muted); background: var(--line-soft);
  padding: 1px 5px; border-radius: 4px;
}
.sgq-acts { white-space: nowrap; }
.sgq-acts .swm-btn + .swm-btn { margin-left: 4px; }

/* PIT: linhas de grupo */
.sgq-grouprow td { background: var(--panel-2); padding-top: 9px; padding-bottom: 9px; }
.sgq-grouprow strong { font-size: 11.5px; letter-spacing: .06em; color: var(--gold-2); }
.sgq-grouprow.is-orphan strong { color: var(--st-erro-fg, #f87171); }
.sgq-grouprow.is-orphan small { color: var(--muted); font-weight: 400; margin-left: 8px; }
.sgq-itp td { font-size: 11.5px; }
.sgq-ivcell { text-align: center; }
.sgq-iv {
  display: inline-block; min-width: 26px; padding: 2px 6px;
  border-radius: 6px; font-size: 11px; font-weight: 900;
  color: var(--c); background: color-mix(in srgb, var(--c) 16%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 45%, transparent);
}

.sgq-legend {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 8px; margin-bottom: 14px;
}
.sgq-legend > div {
  padding: 8px 12px; border-radius: var(--radius-sm, 8px);
  background: var(--panel); border: 1px solid var(--line);
  border-left: 3px solid var(--c);
}
.sgq-legend strong { display: block; font-size: 12px; color: var(--c); }
.sgq-legend span { font-size: 11px; color: var(--muted); line-height: 1.45; }

/* ── Formulário do modal ────────────────────────────── */
.sgq-modal { width: min(880px, 95vw); }
.sgq-modal--wide { width: min(1080px, 96vw); }
.sgq-form { display: block; }
.sgq-grid {
  display: grid; grid-template-columns: repeat(12, 1fr);
  gap: 10px 12px; margin-bottom: 4px;
}
.sgq-field { grid-column: span 12; display: flex; flex-direction: column; gap: 4px; margin: 0 0 6px; }
.sgq-field.col-2  { grid-column: span 2; }
.sgq-field.col-3  { grid-column: span 3; }
.sgq-field.col-4  { grid-column: span 4; }
.sgq-field.col-5  { grid-column: span 5; }
.sgq-field.col-6  { grid-column: span 6; }
.sgq-field.col-7  { grid-column: span 7; }
.sgq-field.col-8  { grid-column: span 8; }
.sgq-field.col-9  { grid-column: span 9; }
.sgq-field.col-12 { grid-column: span 12; }
@media (max-width: 720px) { .sgq-field[class*="col-"] { grid-column: span 12; } }

.sgq-lbl {
  font-size: 11px; font-weight: 800; color: var(--muted);
  letter-spacing: .03em; text-transform: none;
}
.sgq-help { font-size: 10.5px; color: var(--muted-2, #546073); line-height: 1.45; }
.sgq-form input, .sgq-form select, .sgq-form textarea {
  background: var(--line-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm, 8px);
  padding: 8px 10px;
  color: var(--text); font-family: inherit; font-size: 13px;
  width: 100%; box-sizing: border-box;
}
.sgq-form textarea { resize: vertical; line-height: 1.55; }
.sgq-form input:focus, .sgq-form select:focus, .sgq-form textarea:focus {
  outline: none; border-color: var(--gold);
}
.sgq-form input:disabled { opacity: .6; }
.sgq-check { flex-direction: row !important; align-items: center; gap: 7px !important; }
.sgq-check input { width: auto; }
.sgq-check span { font-size: 12.5px; color: var(--text); font-weight: 600; }

.sgq-section {
  grid-column: span 12;
  margin: 14px 0 2px; padding-bottom: 5px;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
}
.sgq-section__t {
  font-size: 11px; font-weight: 900; letter-spacing: .1em;
  text-transform: uppercase; color: var(--gold-2);
}
.sgq-section__h { font-size: 11px; color: var(--muted); }

.sgq-formerr {
  margin-top: 10px; padding: 10px 12px; border-radius: var(--radius-sm, 8px);
  background: color-mix(in srgb, var(--red) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--red) 32%, transparent);
  color: var(--st-erro-fg, #fca5a5); font-size: 12.5px; line-height: 1.55;
}

.sgq-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.sgq-chip {
  padding: 5px 11px; border-radius: 999px; cursor: pointer;
  background: var(--line-soft); border: 1px solid var(--line);
  color: var(--muted); font: inherit; font-size: 11.5px; font-weight: 700;
}
.sgq-chip:hover { color: var(--text); }
.sgq-chip.on { background: var(--gold-soft); border-color: var(--gold-line); color: var(--gold-2); }
.sgq-chipslist { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px; }

/* ── Manual do SGQ ──────────────────────────────────── */
.sgq-modebar {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-bottom: 14px; padding: 8px 12px;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius, 12px);
}
.sgq-modebar.is-baseline { border-color: color-mix(in srgb, var(--purple) 45%, transparent); }
.sgq-modebar__tabs { display: inline-flex; background: var(--line-soft); border-radius: 10px; padding: 3px; gap: 2px; }
.sgq-modebtn {
  background: none; border: 0; padding: 7px 14px; border-radius: 8px;
  font: inherit; font-size: 12.5px; font-weight: 700; color: var(--muted); cursor: pointer;
}
.sgq-modebtn:disabled { opacity: .4; cursor: not-allowed; }
.sgq-modebtn.on { background: var(--line-soft); color: var(--gold-2); box-shadow: inset 0 0 0 1px var(--gold-line); }
.sgq-modebar__hint { color: var(--muted); font-size: 11.5px; }

.sgq-manual { display: grid; grid-template-columns: minmax(230px, 290px) 1fr; gap: 14px; align-items: start; }
@media (max-width: 900px) { .sgq-manual { grid-template-columns: 1fr; } }
.sgq-manual__nav {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius, 12px); padding: 6px; display: flex; flex-direction: column; gap: 2px;
  position: sticky; top: 10px;
}
.sgq-manual__navitem {
  display: grid; grid-template-columns: 9px 20px 1fr; align-items: center;
  gap: 7px; padding: 8px 9px; border: 0; border-radius: 8px; cursor: pointer;
  background: none; text-align: left; font: inherit; color: var(--muted);
}
.sgq-manual__navitem:hover { background: var(--line-soft); color: var(--text); }
.sgq-manual__navitem.on { background: var(--gold-soft); color: var(--gold-2); }
.sgq-manual__ord { font-size: 11px; font-weight: 900; color: var(--muted-2, #546073); }
.sgq-manual__tt { font-size: 12px; font-weight: 600; line-height: 1.3; }
.sgq-manual__navitem small { grid-column: 3; font-size: 10px; color: var(--muted-2, #546073); }

.sgq-manual__body { display: flex; flex-direction: column; gap: 12px; }
.sgq-sec {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius, 12px); padding: 14px 16px;
}
.sgq-sec__hd { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.sgq-sec h3 { font-size: 14px; margin: 0 0 6px; color: var(--text); }
.sgq-sec__hdr { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.sgq-sec__txt { font-size: 13px; line-height: 1.7; color: var(--text); margin: 6px 0 10px; }
.sgq-sec__ft {
  display: flex; gap: 16px; flex-wrap: wrap; padding-top: 9px;
  border-top: 1px solid var(--line); font-size: 11px; color: var(--muted);
}
.sgq-clause {
  font-size: 10.5px; color: var(--muted); padding: 2px 8px; border-radius: 6px;
  background: var(--line-soft); border: 1px solid var(--line);
}
.sgq-clause i { color: var(--st-alerta-fg, #fbbf24); font-style: normal; font-weight: 700; }

.sgq-baseline-hd {
  padding: 12px 14px; border-radius: var(--radius, 12px);
  background: color-mix(in srgb, var(--purple) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--purple) 30%, transparent);
}
.sgq-baseline-hd strong { display: block; font-size: 14px; color: var(--text); }
.sgq-baseline-hd span { font-size: 11.5px; color: var(--muted); }
.sgq-baseline-hd p { margin: 6px 0 4px; font-size: 12.5px; color: var(--text); }

/* ── Mapa de processos ──────────────────────────────── */
.sgq-mapa { display: flex; flex-direction: column; gap: 12px; }
.sgq-mapa__faixa {
  background: var(--panel); border: 1px solid var(--line);
  border-left: 3px solid var(--c); border-radius: var(--radius, 12px); overflow: hidden;
}
.sgq-mapa__faixa > header {
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
  padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--line-soft);
}
.sgq-mapa__faixa > header strong { font-size: 13px; color: var(--c); }
.sgq-mapa__faixa > header small { font-size: 11px; color: var(--muted); }
.sgq-mapa__n { margin-left: auto; font-size: 12px; font-weight: 900; color: var(--muted); }
.sgq-mapa__cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; padding: 12px 14px; }

.sgq-pcard {
  background: var(--panel-2); border: 1px solid var(--line);
  border-radius: var(--radius-sm, 8px); padding: 11px 12px; cursor: pointer;
  display: flex; flex-direction: column; gap: 7px; text-align: left;
}
.sgq-pcard:hover { border-color: var(--gold-line); }
.sgq-pcard.is-alert { border-color: color-mix(in srgb, var(--red) 40%, transparent); }
.sgq-pcard__hd { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.sgq-pcard__hd strong { font-size: 12.5px; color: var(--text); }
.sgq-pcard__hd code { font-size: 10px; color: var(--muted); }
.sgq-pcard p { margin: 0; font-size: 11.5px; color: var(--muted); line-height: 1.45; }
.sgq-pcard__ft { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 11px; color: var(--muted); }

/* ── Lista Mestra: três dimensões e revisões ────────── */
.sgq-dims { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; margin-bottom: 14px; }
.sgq-dim {
  padding: 10px 12px; border-radius: var(--radius-sm, 8px);
  background: var(--panel-2); border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 6px; align-items: flex-start;
}
.sgq-dim__r { font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-2, #546073); }
.sgq-dim small { font-size: 10.5px; color: var(--muted); line-height: 1.4; }

.sgq-metagrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 9px; margin-bottom: 6px; }
.sgq-metagrid--wide { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.sgq-metagrid > div {
  padding: 8px 10px; border-radius: 7px; background: var(--line-soft);
  display: flex; flex-direction: column; gap: 2px; min-width: 0;
}
.sgq-metagrid span { font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted-2, #546073); }
.sgq-metagrid strong { font-size: 12.5px; color: var(--text); word-break: break-word; }

.sgq-revs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.sgq-rev {
  padding: 11px 13px; border-radius: var(--radius-sm, 8px);
  background: var(--panel-2); border: 1px solid var(--line);
}
.sgq-rev.is-vigente { border-color: color-mix(in srgb, var(--green) 45%, transparent); }
.sgq-rev__hd { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.sgq-rev__hd strong { font-size: 14px; color: var(--text); font-family: var(--font-mono); }
.sgq-tag-vig {
  font-size: 10px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase;
  color: var(--st-ok-fg, #34d399); background: color-mix(in srgb, var(--green) 16%, transparent);
  padding: 2px 8px; border-radius: 999px;
}
.sgq-rev__why { margin: 7px 0; font-size: 12.5px; color: var(--text); line-height: 1.55; }
.sgq-rev__meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: 11px; color: var(--muted); }
.sgq-rev__acts { margin-top: 9px; display: flex; gap: 6px; flex-wrap: wrap; }

/* ── Trilha de auditoria ────────────────────────────── */
.sgq-trail { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.sgq-trail li {
  display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: baseline;
  padding: 8px 11px; border-radius: 7px; background: var(--line-soft);
}
.sgq-trail__ev { font-size: 12px; font-weight: 700; color: var(--text); }
.sgq-trail__who { font-size: 11px; color: var(--muted); }
.sgq-trail__when { font-size: 11px; color: var(--muted-2, #546073); }
.sgq-trail__why { grid-column: 1 / -1; margin: 3px 0 0; font-size: 11.5px; color: var(--muted); }

/* ── PQP: completude e blocos ───────────────────────── */
.sgq-cover { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 10px; padding: 14px; }
.sgq-cover__i {
  padding: 10px 12px; border-radius: var(--radius-sm, 8px);
  background: var(--panel-2); border: 1px solid var(--line);
  border-left: 3px solid var(--muted-2, #546073);
  display: flex; flex-direction: column; gap: 3px;
}
.sgq-cover__i.ok  { border-left-color: #34d399; }
.sgq-cover__i.gap { border-left-color: #fbbf24; background: color-mix(in srgb, #fbbf24 6%, transparent); }
.sgq-cover__i.err { border-left-color: #f87171; background: color-mix(in srgb, var(--red) 7%, transparent); }
.sgq-cover__i strong { font-size: 12.5px; color: var(--text); }
.sgq-cover__i span { font-size: 12px; color: var(--muted); font-weight: 700; }
.sgq-cover__i small { font-size: 10.5px; color: var(--muted-2, #546073); }

.sgq-blocos { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 10px; padding: 14px; }
.sgq-bloco { background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius-sm, 8px); padding: 11px 13px; }
.sgq-bloco.is-gap { border-style: dashed; }
.sgq-bloco h4 { margin: 0 0 6px; font-size: 12px; color: var(--gold-2); }
.sgq-bloco p { margin: 0; font-size: 12px; line-height: 1.6; color: var(--text); }

/* ── 5 Porquês ──────────────────────────────────────── */
.sgq-whys { padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.sgq-why {
  margin-left: calc(var(--n, 0) * 22px);
  padding: 11px 13px; border-radius: var(--radius-sm, 8px);
  background: var(--panel-2); border: 1px solid var(--line);
  border-left: 3px solid var(--c, #fbbf24);
}
.sgq-why__q { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sgq-why__n {
  width: 19px; height: 19px; border-radius: 50%; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--line-soft); color: var(--muted);
  font-size: 10.5px; font-weight: 900;
}
.sgq-why__q strong { font-size: 12.5px; color: var(--text); }
.sgq-why__a { margin: 7px 0 4px; font-size: 12.5px; line-height: 1.6; color: var(--text); }
.sgq-why__e { margin: 0; font-size: 11px; color: var(--muted); }
.sgq-why__acts { margin-top: 7px; }
.sgq-why__add { margin-left: calc(var(--n, 0) * 22px); }

/* ── Ishikawa ───────────────────────────────────────── */
.sgq-fish { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; padding: 14px; }
.sgq-fish__c { background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius-sm, 8px); overflow: hidden; }
.sgq-fish__c > header {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 11px; background: var(--line-soft); border-bottom: 1px solid var(--line);
}
.sgq-fish__c > header strong { font-size: 12px; color: var(--gold-2); }
.sgq-fish__c > p { margin: 10px 12px; }
.sgq-fish__h {
  padding: 8px 11px; border-left: 3px solid var(--c); cursor: pointer;
  border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px;
}
.sgq-fish__h:last-child { border-bottom: 0; }
.sgq-fish__h:hover { background: var(--line-soft); }
.sgq-fish__h strong { font-size: 12px; color: var(--text); }
.sgq-fish__h small { font-size: 10.5px; color: var(--muted); }

/* ── Data book ──────────────────────────────────────── */
.sgq-db { display: flex; flex-direction: column; gap: 9px; padding: 14px; }
.sgq-db__s { background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius-sm, 8px); overflow: hidden; }
.sgq-db__s.ok  { border-left: 3px solid #34d399; }
.sgq-db__s.gap { border-left: 3px solid #fbbf24; }
.sgq-db__s.is-na { border-left: 3px solid var(--muted-2, #546073); opacity: .7; }
.sgq-db__s > header {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; background: var(--line-soft); border-bottom: 1px solid var(--line);
}
.sgq-db__s > header strong { font-size: 12.5px; color: var(--text); flex: 1; }
.sgq-db__n { font-size: 11px; font-weight: 900; color: var(--muted-2, #546073); min-width: 18px; }
.sgq-db__acts { display: flex; gap: 5px; }
.sgq-db__s > p { margin: 10px 12px; }
.sgq-db__t { width: 100%; border-collapse: collapse; }
.sgq-db__t td { padding: 7px 12px; font-size: 11.5px; border-bottom: 1px solid var(--line); color: var(--text); }
.sgq-db__t tr:last-child td { border-bottom: 0; }

/* ── Visão geral ────────────────────────────────────── */
.sgq-blocks { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin-bottom: 14px; }
.sgq-block {
  text-align: left; cursor: pointer; font: inherit;
  padding: 12px 14px; border-radius: var(--radius, 12px);
  background: color-mix(in srgb, var(--c) 9%, var(--panel));
  border: 1px solid color-mix(in srgb, var(--c) 34%, transparent);
  display: flex; flex-direction: column; gap: 2px;
}
.sgq-block:hover { border-color: var(--c); }
.sgq-block strong { font-size: 24px; font-weight: 900; color: var(--c); line-height: 1.1; }
.sgq-block span { font-size: 12px; font-weight: 700; color: var(--text); }
.sgq-block small { font-size: 10.5px; color: var(--muted); }

.sgq-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 10px; padding: 14px; }
.sgq-card {
  text-align: left; cursor: pointer; font: inherit;
  padding: 11px 13px; border-radius: var(--radius-sm, 8px);
  background: var(--panel-2); border: 1px solid var(--line);
  border-top: 2px solid var(--c, #60a5fa);
  display: flex; flex-direction: column; gap: 2px;
}
.sgq-card:hover { border-color: var(--c); }
.sgq-card.is-empty { opacity: .62; }
.sgq-card.is-err { border-color: color-mix(in srgb, var(--red) 45%, transparent); }
.sgq-card__r { font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-2, #546073); }
.sgq-card__n { font-size: 22px; font-weight: 900; color: var(--c, var(--text)); line-height: 1.15; }
.sgq-card__s { font-size: 10.5px; color: var(--muted); }

.sgq-roadmap { padding: 14px; }
.sgq-roadmap__hd { margin-bottom: 12px; }
.sgq-roadmap__hd strong { font-size: 17px; color: var(--text); }
.sgq-roadmap__hd span { font-size: 12px; color: var(--muted); margin-left: 6px; }
.sgq-roadmap__l { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 8px; }
.sgq-step {
  text-align: left; cursor: pointer; font: inherit;
  padding: 9px 11px; border-radius: var(--radius-sm, 8px);
  background: var(--panel-2); border: 1px solid var(--line);
  border-left: 3px solid var(--muted-2, #546073);
  display: grid; grid-template-columns: auto auto 1fr; gap: 4px 7px; align-items: center;
}
.sgq-step.ok { border-left-color: #34d399; }
.sgq-step:hover { border-color: var(--gold-line); }
.sgq-step code { font-size: 10px; color: var(--muted); font-family: var(--font-mono); }
.sgq-step__p {
  font-size: 9.5px; font-weight: 900; padding: 1px 5px; border-radius: 4px;
  background: var(--line-soft); color: var(--muted);
}
.sgq-step__t { grid-column: 1 / -1; font-size: 12px; font-weight: 600; color: var(--text); }
.sgq-step small { grid-column: 1 / -1; font-size: 10px; color: var(--muted-2, #546073); }
.sgq-step.ok small { color: var(--st-ok-fg, #34d399); }

/* ── Alertas dos indicadores ────────────────────────── */
.sgq-alertlist { list-style: none; margin: 0; padding: 14px; display: flex; flex-direction: column; gap: 7px; }
.sgq-alertlist li {
  display: grid; grid-template-columns: 62px 1fr auto; gap: 11px; align-items: center;
  padding: 9px 12px; border-radius: var(--radius-sm, 8px);
  background: var(--panel-2); border: 1px solid var(--line); border-left: 3px solid var(--c);
}
.sgq-alertlist__s {
  font-size: 10px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase;
  color: var(--c); text-align: center;
}
.sgq-alertlist p { margin: 0; font-size: 12.5px; color: var(--text); line-height: 1.5; }

/* ── Documentação ao cliente (os sete itens) ────────── */
.sgq-cli { display: flex; flex-direction: column; gap: 9px; padding: 14px; }
.sgq-cli__i {
  background: var(--panel-2); border: 1px solid var(--line);
  border-left: 3px solid #34d399; border-radius: var(--radius-sm, 8px); padding: 11px 13px;
}
.sgq-cli__i.is-gap { border-left-color: #fbbf24; }
.sgq-cli__i > header { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.sgq-cli__i > header code {
  font-family: var(--font-mono); font-size: 11px; font-weight: 800;
  color: var(--gold-2); background: var(--line-soft); padding: 2px 7px; border-radius: 5px;
}
.sgq-cli__i > header strong { font-size: 12.5px; color: var(--text); flex: 1; min-width: 200px; }
.sgq-cli__en { margin: 5px 0 0; font-size: 10.5px; color: var(--muted-2, #546073); font-style: italic; }
.sgq-cli__doc { margin: 6px 0 0; font-size: 11.5px; color: var(--muted); }
.sgq-cli__doc strong { color: var(--text); }
.sgq-cli__obs { margin: 7px 0 0; font-size: 12px; line-height: 1.6; color: var(--text); }

/* ── Emitente e base documental ─────────────────────── */
.sgq-logoprev {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 11px 14px; border-radius: var(--radius-sm, 8px);
  background: #fff; border: 1px solid var(--line);
}
.sgq-logoprev span {
  font-size: 10px; font-weight: 800; letter-spacing: .07em;
  text-transform: uppercase; color: #64748b;
}
.sgq-logoprev img { max-height: 42px; max-width: 220px; object-fit: contain; }

.sgq-ul { margin: 0 0 4px; padding-left: 18px; }
.sgq-ul li { font-size: 12.5px; line-height: 1.65; color: var(--muted); margin-bottom: 5px; }
.sgq-ul li strong { color: var(--text); }

.sgq-seedlog {
  margin-top: 12px; padding: 10px 13px; border-radius: var(--radius-sm, 8px);
  background: var(--line-soft); border: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); line-height: 1.7;
}
.sgq-seedlog div + div { border-top: 1px dashed var(--line); padding-top: 4px; margin-top: 4px; }

/* ── Filtro de projetos no padrão da tela de Projetos ─ */
.sgq-projfilter { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.sgq-projfilter .pmo-projects__filters { flex: 1 1 auto; }
.sgq-projfilter .swm-select { max-width: 210px; }
.sgq-projfilter .pmo-projects__search { flex: 1 1 240px; }
.sgq-projfilter .pmo-chip i {
  font-style: normal; font-size: 10.5px; font-weight: 800; opacity: .75;
  margin-left: 4px; padding: 0 5px; border-radius: 99px; background: rgba(255, 255, 255, .07);
}
.sgq-filterinfo { margin: 0 2px 14px; font-size: 11.5px; color: var(--muted); }
.sgq-filterinfo strong { color: var(--text); }
.sgq-linkbtn {
  background: none; border: 0; padding: 0; cursor: pointer; font: inherit;
  color: var(--gold-2); text-decoration: underline; text-underline-offset: 2px;
}
html[data-theme="light"] .sgq-linkbtn { color: #b45309; }
html[data-theme="light"] .sgq-projfilter .pmo-chip { border-color: var(--line); background: var(--panel); }
html[data-theme="light"] .sgq-projfilter .pmo-chip i { background: var(--line-soft); }
html[data-theme="light"] .sgq-projfilter .pmo-projects__search { background: var(--panel); border-color: var(--line); color: var(--text); }

/* ── Chips de projeto no PQP (unidade e status) ─────── */
.sgq-chip--proj span { color: var(--muted); font-weight: 600; }
.sgq-chip--proj { display: inline-flex; align-items: center; gap: 7px; text-align: left; }
.sgq-chip--proj b { color: var(--text); font-weight: 800; }
.sgq-chip--proj i {
  font-style: normal; font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  color: var(--c, var(--muted)); background: color-mix(in srgb, var(--c, var(--muted)) 14%, transparent);
  padding: 1px 6px; border-radius: 4px;
}

/* ── Organograma ────────────────────────────────────── */
.sgq-org { padding: 16px; overflow-x: auto; }
.sgq-org__l { list-style: none; margin: 0; padding: 0 0 0 22px; border-left: 1px dashed var(--line); }
.sgq-org > .sgq-org__l { padding-left: 0; border-left: 0; }
.sgq-org__l li { margin: 6px 0; position: relative; }
.sgq-org__l .sgq-org__l li:before {
  content: ""; position: absolute; left: -22px; top: 18px; width: 16px; border-top: 1px dashed var(--line);
}
.sgq-org__n {
  display: inline-grid; grid-template-columns: auto 1fr; gap: 1px 10px; align-items: baseline;
  padding: 8px 12px; border-radius: var(--radius-sm, 8px); cursor: pointer; min-width: 260px;
  background: var(--panel-2); border: 1px solid var(--line); border-left: 3px solid var(--c);
}
.sgq-org__n:hover { border-color: var(--gold-line); }
.sgq-org__n.is-gap { border-style: dashed; }
.sgq-org__a { font-size: 9.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--c); grid-column: 1 / -1; }
.sgq-org__n strong { font-size: 12.5px; color: var(--text); }
.sgq-org__nome { font-size: 12px; color: var(--muted); }
.sgq-org__n small { grid-column: 1 / -1; font-size: 10.5px; color: var(--muted-2, #546073); }

/* ── Mapa da qualidade: fluxo de fases ──────────────── */
.sgq-flow { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-bottom: 14px; }
.sgq-flow__i {
  text-align: left; cursor: pointer; font: inherit; position: relative;
  padding: 10px 12px 10px 14px; border-radius: var(--radius-sm, 8px);
  background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--c);
  display: flex; flex-direction: column; gap: 3px; min-height: 74px;
}
.sgq-flow__i:hover { border-color: var(--c); }
.sgq-flow__i.on { background: color-mix(in srgb, var(--c) 10%, var(--panel)); border-color: var(--c); }
.sgq-flow__n { font-size: 10px; font-weight: 900; color: var(--c); letter-spacing: .06em; }
.sgq-flow__i strong { font-size: 12px; color: var(--text); line-height: 1.3; }
.sgq-flow__i small { font-size: 10px; color: var(--muted-2, #546073); }

/* ── Modelos ────────────────────────────────────────── */
.sgq-tpl { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; padding: 14px; }
.sgq-tpl__c {
  background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius-sm, 8px);
  padding: 12px 13px; display: flex; flex-direction: column; gap: 6px;
}
.sgq-tpl__c > header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sgq-tpl__c > header code {
  font-family: var(--font-mono); font-size: 11px; font-weight: 800; color: var(--gold-2);
  background: var(--line-soft); padding: 2px 7px; border-radius: 5px;
}
.sgq-tpl__c > strong { font-size: 13px; color: var(--text); line-height: 1.3; }
.sgq-tpl__c > p { margin: 0; font-size: 11.5px; color: var(--muted); line-height: 1.5; flex: 1; }
.sgq-tpl__c > small { font-size: 10.5px; color: var(--muted-2, #546073); }
.sgq-tpl__acts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }

/* ── Editor do documento gerado ─────────────────────── */
.sgq-docform { display: flex; flex-direction: column; gap: 12px; margin-bottom: 70px; }
.sgq-docform__s .sgq-grid { margin: 0; }
.sgq-docform input, .sgq-docform select, .sgq-docform textarea {
  background: var(--line-soft); border: 1px solid var(--line); border-radius: var(--radius-sm, 8px);
  padding: 8px 10px; color: var(--text); font: inherit; font-size: 13px; width: 100%; box-sizing: border-box;
}
.sgq-docform textarea { resize: vertical; line-height: 1.55; }
.sgq-docform textarea.sgq-mono { font-family: var(--font-mono); font-size: 12px; }
.sgq-docform input:focus, .sgq-docform select:focus, .sgq-docform textarea:focus { outline: none; border-color: var(--gold); }
.sgq-field.is-missing input, .sgq-field.is-missing textarea, .sgq-field.is-missing select {
  border-color: color-mix(in srgb, #fbbf24 60%, transparent); background: color-mix(in srgb, #fbbf24 7%, transparent);
}
.sgq-savebar {
  position: sticky; bottom: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 16px; margin: 0 -4px;
  background: color-mix(in srgb, var(--panel) 92%, transparent); backdrop-filter: blur(6px);
  border-top: 1px solid var(--line); border-radius: var(--radius-sm, 8px) var(--radius-sm, 8px) 0 0;
  font-size: 12px;
}
html[data-theme="light"] .sgq-docform input, html[data-theme="light"] .sgq-docform select,
html[data-theme="light"] .sgq-docform textarea { background: var(--panel); }
html[data-theme="light"] .sgq-org__n strong { color: var(--text); }

/* ── Políticas ──────────────────────────────────────── */
.sgq-pols { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; padding: 14px; }
.sgq-pol {
  padding: 11px 13px; border-radius: var(--radius-sm, 8px);
  background: var(--panel-2); border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 3px;
}
.sgq-pol > span { font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted-2, #546073); }
.sgq-pol > strong { font-size: 13px; color: var(--text); }
.sgq-pol > small { font-size: 10.5px; color: var(--muted); line-height: 1.45; }

/* ═════════════════════════════════════════════════════
   MODO DIA

   Os blocos que o SGQ reaproveita — .eap-panel, .eap-table,
   .hist-filterbar, o formulário do modal — foram escritos só para
   o tema escuro, com cor literal e linhas em rgba(255,255,255,…).
   No modo dia isso vira branco sobre branco: o título do painel
   (#f3f4f6) e o texto das células (#cbd5e1) somem, e as bordas
   desaparecem.

   Corrigido aqui, no arquivo que carrega por último, com os tokens
   do tema. Os seletores são os globais de propósito: a mesma falha
   atinge EAP, custos e cronograma, e não faria sentido consertar
   só quando a tela é de Qualidade.
   ═════════════════════════════════════════════════════ */
html[data-theme="light"] .eap-panel { border-color: var(--line); box-shadow: var(--shadow, none); }
html[data-theme="light"] .eap-panel__hd {
  background: var(--panel-2);
  border-bottom-color: var(--line);
}
html[data-theme="light"] .eap-panel__hd strong { color: var(--text); }
html[data-theme="light"] .eap-panel__hd small  { color: var(--muted); }

html[data-theme="light"] .eap-table thead th {
  background: var(--panel-2);
  color: var(--muted);
  border-bottom-color: var(--line);
}
html[data-theme="light"] .eap-table tbody td {
  color: var(--text);
  border-bottom-color: var(--line-soft);
}
html[data-theme="light"] .eap-table tbody tr:hover td { background: var(--bg-hover, var(--panel-2)); }
html[data-theme="light"] .eap-empty { color: var(--muted); }
html[data-theme="light"] .eap-col-code,
html[data-theme="light"] .eap-col-un { color: var(--muted); }

html[data-theme="light"] .hist-filterbar { border-color: var(--line); }
html[data-theme="light"] .hist-tab { color: var(--muted); }
html[data-theme="light"] .hist-tab--on { background: var(--gold-soft); }

html[data-theme="light"] .swm-select,
html[data-theme="light"] .swm-input { color: var(--text); background: var(--panel); border-color: var(--line); }
html[data-theme="light"] .swm-select option { background: var(--panel); color: var(--text); }

html[data-theme="light"] .eap-modal .pmo-form input,
html[data-theme="light"] .eap-modal .pmo-form select,
html[data-theme="light"] .eap-modal .pmo-form textarea,
html[data-theme="light"] .sgq-form input,
html[data-theme="light"] .sgq-form select,
html[data-theme="light"] .sgq-form textarea { background: var(--panel); color: var(--text); border-color: var(--line); }
html[data-theme="light"] .sgq-lbl { color: var(--muted); }

html[data-theme="light"] .pmo-loading { color: var(--muted); border-color: var(--line); }
html[data-theme="light"] .sched-kpi__big { color: var(--text); }

/* ── Modo dia: reforços onde o contraste cai ────────── */
html[data-theme="light"] .sgq-note { background: rgba(59, 130, 246, .07); }
html[data-theme="light"] .sgq-alerts p { color: #b91c1c; }
html[data-theme="light"] .sgq-alerts p strong { color: #7f1d1d; }
html[data-theme="light"] .sgq-formerr { color: #b91c1c; }
html[data-theme="light"] .sgq-warn { color: #b45309; }
html[data-theme="light"] .sgq-section__t,
html[data-theme="light"] .sgq-bloco h4,
html[data-theme="light"] .sgq-fish__c > header strong,
html[data-theme="light"] .sgq-grouprow strong { color: #b45309; }
html[data-theme="light"] .sgq-manual__navitem.on { color: #b45309; }
html[data-theme="light"] .sgq-modebtn.on { color: #b45309; }
html[data-theme="light"] .sgq-mapa__faixa > header strong { color: inherit; filter: brightness(.72); }

/* ── Impressão do manifesto e listas ────────────────── */
@media print {
  .swm-sidebar, .swm-topbar-actions, .sgq-filterbar, .sgq-acts, .eap-col-acts { display: none !important; }
  .sgq-table, .eap-panel { break-inside: auto; }
  body { background: #fff; color: #000; }
}

/* ═════════════════════════════════════════════════════
   POP-UP CENTRALIZADO — vale para o PMO inteiro
   [2026-09-20] Marcio: "todos os popup do PMO está assim, precisa abrir
   no centro da página". As classes .swm-modal-overlay / .swm-modal /
   __hd / __bd / __ft são usadas por todos os módulos (atividades, BM,
   budget, riscos, qualidade…) e NUNCA tiveram CSS: o pop-up saía como
   texto solto no fim da página. Preferência dele: centralizado, nunca gaveta.
   ═════════════════════════════════════════════════════ */
.swm-modal-overlay, .swm-overlay {
  position: fixed; inset: 0; z-index: 8000;
  display: flex; align-items: center; justify-content: center;
  padding: 24px; box-sizing: border-box;
  background: color-mix(in srgb, var(--bg, rgb(4,7,14)) 72%, transparent); backdrop-filter: blur(3px);
}
.swm-modal {
  display: flex; flex-direction: column;
  width: min(640px, 94vw); max-height: calc(100vh - 48px);
  background: var(--panel, #161b27); color: var(--text, #e8eaf0);
  border: 1px solid var(--line, #252d3d); border-radius: 16px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .55); overflow: hidden;
}
.swm-modal.sgq-modal { width: min(880px, 95vw); }
.swm-modal.sgq-modal--wide { width: min(1080px, 96vw); }
.swm-modal.swm-modal-lg { width: min(960px, 94vw); }
.swm-modal__hd, .swm-modal > .modal-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 20px; border-bottom: 1px solid var(--line, #252d3d); flex-shrink: 0;
}
.swm-modal__hd h3, .swm-modal > .modal-head h2 { margin: 0; font-size: 16px; font-weight: 800; }
.swm-modal__close, .swm-modal .modal-close {
  width: 30px; height: 30px; flex-shrink: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; color: var(--muted, #8892a4);
  border: 1px solid var(--line, #252d3d); border-radius: 8px; font-size: 16px;
}
.swm-modal__close:hover, .swm-modal .modal-close:hover { color: var(--text); border-color: var(--gold-line); }
.swm-modal__bd { padding: 18px 20px; overflow-y: auto; flex: 1 1 auto; }
.swm-modal__ft {
  display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap;
  padding: 14px 20px; border-top: 1px solid var(--line, #252d3d); flex-shrink: 0;
  background: var(--panel-2, #1c2333);
}
html[data-theme="light"] :is(.swm-modal-overlay, .swm-overlay) { background: color-mix(in srgb, var(--bg, rgb(15,23,42)) 45%, transparent); }

/* [2026-10-02] auditoria de componentes: .swm-overlay (timesheets, agenda, cdc, materials)
   usa a mesma moldura; o formulário que vem direto dentro do .swm-modal rola por dentro. */
.swm-overlay > .swm-modal > form { flex: 1 1 auto; min-height: 0; overflow-y: auto; }

/* ── Caixa de confirmação dos comandos (toast.js) — PMO inteiro ── */
.swm-toasts { position: fixed; right: 20px; bottom: 20px; z-index: 9500; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; pointer-events: none; }
.swm-toast {
  pointer-events: auto; display: flex; align-items: flex-start; gap: 10px; max-width: 420px;
  padding: 11px 12px 11px 14px; border-radius: 12px; font-size: 13px; line-height: 1.45;
  background: var(--panel-2, #1c2333); color: var(--text, #e8eaf0);
  border: 1px solid var(--line, #252d3d); border-left: 3px solid var(--c, #60a5fa);
  box-shadow: 0 12px 34px rgba(0, 0, 0, .5); animation: swmToastIn .22s ease;
}
.swm-toast svg { color: var(--c); flex-shrink: 0; margin-top: 2px; }
.swm-toast span { flex: 1; white-space: pre-line; }
.swm-toast button { background: none; border: 0; color: var(--muted, #8892a4); cursor: pointer; font-size: 17px; line-height: 1; padding: 0 2px; }
.swm-toast--ok { --c: #34d399; } .swm-toast--erro { --c: #f87171; } .swm-toast--info { --c: #60a5fa; }
.swm-toast.saindo { opacity: 0; transform: translateX(16px); transition: all .2s; }
@keyframes swmToastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ── Dia/noite: acertos de 20/09 (prints do Marcio) ───────────────────
   · faixa dos KPIs tinha fundo #0a0f1c fixo → tarja preta no modo dia;
   · botão fechar do pop-up sumia (ícone sem cor no claro, fundo no escuro);
   · campo de motivo saía branco no modo noite (sem estilo próprio).     */
.sched-kpis { background: transparent !important; border-bottom: 0 !important; padding: 0 0 14px !important; }
.swm-modal__close { color: var(--text) !important; background: var(--line-soft) !important; }
.swm-modal__close svg { stroke: currentColor; }
/* [2026-09-21] O X "sumia" de novo: o botão tem 30 px fixos e herda o
   padding dos botões globais; com box-sizing border-box sobra 0 px de
   conteúdo e o flex encolhe o SVG até largura ZERO (medido no Chrome:
   svgW=0). Sem padding e sem encolher, o ícone volta nos 25 pop-ups. */
.swm-modal__close, .swm-modal .modal-close, .pmo-modal__close { padding: 0 !important; }
.swm-modal__close svg, .swm-modal .modal-close svg, .pmo-modal__close svg { flex-shrink: 0; width: 14px; height: 14px; }
.swm-modal textarea, .swm-modal input, .swm-modal select {
  background: var(--line-soft); color: var(--text); border: 1px solid var(--line);
  border-radius: 8px; padding: 8px 10px; font: inherit; font-size: 13px; width: 100%; box-sizing: border-box;
}
.swm-modal input[type="checkbox"] { width: auto; }
html[data-theme="light"] .swm-modal { background: #fff; border-color: var(--line); box-shadow: 0 24px 70px rgba(15,23,42,.25); }
html[data-theme="light"] .swm-modal__ft { background: var(--panel-2); }
html[data-theme="light"] .swm-modal textarea, html[data-theme="light"] .swm-modal input, html[data-theme="light"] .swm-modal select { background: #fff; }
html[data-theme="light"] .sched-kpi { background: #fff; box-shadow: 0 1px 3px rgba(15,23,42,.06); }
html[data-theme="light"] .sched-kpi__label { color: var(--muted); }
html[data-theme="light"] .swm-toast { background: #fff; color: var(--text); box-shadow: 0 12px 34px rgba(15,23,42,.18); }
html[data-theme="light"] .sgq-sec, html[data-theme="light"] .sgq-manual__nav, html[data-theme="light"] .sgq-modebar { background: #fff; }
html[data-theme="light"] .sgq-gap { background: var(--panel-2); }

/* ── Editor de documento técnico (docbody.js) ── */
.sgq-doced { display: grid; grid-template-columns: 240px 1fr; gap: 14px; align-items: start; margin-bottom: 70px; }
@media (max-width: 900px) { .sgq-doced { grid-template-columns: 1fr; } }
.sgq-doced__toc { position: sticky; top: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 4px; max-height: 80vh; overflow: auto; }
.sgq-doced__toc strong { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.sgq-doced__toc a { font-size: 12px; color: var(--text); text-decoration: none; padding: 3px 4px; border-radius: 5px; }
.sgq-doced__toc a:hover { background: var(--line-soft); }
.sgq-doced__body { display: flex; flex-direction: column; gap: 8px; }
.sgq-doced__b { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 7px; }
.sgq-doced__b > header { display: flex; justify-content: space-between; align-items: center; font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.sgq-doced__b > header button { background: none; border: 1px solid var(--line); color: var(--muted); border-radius: 6px; width: 24px; height: 24px; cursor: pointer; margin-left: 3px; }
.sgq-doced__b > header button:hover { color: var(--text); border-color: var(--gold-line); }
.sgq-doced__b > header button.danger:hover { color: var(--st-erro-fg, #f87171); }
.sgq-doced__b input, .sgq-doced__b textarea, .sgq-doced__b select { background: var(--line-soft); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; color: var(--text); font: inherit; font-size: 13px; width: 100%; box-sizing: border-box; }
.sgq-doced__b textarea { resize: vertical; line-height: 1.6; }
.sgq-doced__h { display: grid; grid-template-columns: auto 110px 1fr; gap: 8px; align-items: center; }
.sgq-doced__h span { font-weight: 900; color: var(--gold-2); font-size: 14px; min-width: 34px; }
.sgq-doced__h input { font-weight: 700; font-size: 14px; }
.sgq-doced__img { max-width: 100%; max-height: 320px; object-fit: contain; border-radius: 8px; background: #fff; align-self: center; }
.sgq-doced__imgrow { display: grid; grid-template-columns: 1fr 160px; gap: 8px; }
.sgq-doced__add { display: flex; gap: 6px; flex-wrap: wrap; padding: 8px; border: 1px dashed var(--line); border-radius: 10px; }
html[data-theme="light"] .sgq-doced__b, html[data-theme="light"] .sgq-doced__toc { background: #fff; }
html[data-theme="light"] .sgq-doced__b input, html[data-theme="light"] .sgq-doced__b textarea, html[data-theme="light"] .sgq-doced__b select { background: #fff; }
html[data-theme="light"] .sgq-doced__h span { color: #b45309; }

/* [2026-09-21] Pop-up de Projetos/Handover (projects.css) não tinha modo dia:
   fundo #0f172a fixo e título escuro sobre escuro. Medido no Chrome. */
html[data-theme="light"] .pmo-modal { background: color-mix(in srgb, var(--bg, rgb(15,23,42)) 45%, transparent); }
html[data-theme="light"] .pmo-modal__box {
  background: #ffffff; color: #0f172a;
  border-color: rgba(15, 23, 42, .12); box-shadow: 0 24px 60px rgba(15, 23, 42, .25);
}
html[data-theme="light"] .pmo-modal__box header { border-bottom-color: rgba(15, 23, 42, .10); }
html[data-theme="light"] .pmo-modal__box header h3 { color: #0f172a; }
html[data-theme="light"] .pmo-modal__close { background: color-mix(in srgb, var(--bg, rgb(15,23,42)) 6%, transparent); color: #334155; }
html[data-theme="light"] .pmo-modal__lockbanner strong { color: #0f172a; }
html[data-theme="light"] .pmo-modal__lockbanner small { color: var(--muted, #475569); }

/* [2026-09-22] Anexos do pacote ao cliente */
.sgq-anexos { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; padding: 14px; }
.sgq-anexos .swm-btn { justify-content: flex-start; text-align: left; white-space: normal; line-height: 1.3; }
.sgq-anexos code { font-size: 11px; opacity: .75; margin-right: 6px; }
