/* ===================================================================
   AcolheMente Trabalho — Área do produto (MVP 2)
   Estilos da área logada / pública do produto. Reutiliza as variáveis
   de css/style.css (--navy, --gold, --low/mid/high, etc.).
   =================================================================== */

.app-body { background: var(--bg); }

:root {
  --sidebar-w: 244px;
  --crit: #a83232;          /* crítico (mais forte que --high) */
  --crit-bg: #f7e0e0;
}

/* ── App shell / layout ─────────────────────────────────────────── */
.app-shell { display: flex; min-height: 100vh; }
.app-sidebar {
  width: var(--sidebar-w); flex-shrink: 0;
  background: var(--navy-deep); color: #fff;
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.app-sidebar .app-brand {
  display: flex; align-items: center; gap: 10px; padding: 18px 18px 14px;
  border-bottom: 1px solid rgba(255,255,255,.12); text-decoration: none; color: #fff;
}
.app-sidebar .app-brand img { height: 34px; width: auto; filter: brightness(0) invert(1); }
.app-sidebar .app-brand .abt { font-weight: 800; font-size: .95rem; line-height: 1.1; }
.app-sidebar .app-brand .abt small { display: block; font-weight: 500; font-size: .68rem; color: var(--gold); }

.app-nav { padding: 10px 10px; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.app-nav .navgrp { font-size: .68rem; text-transform: uppercase; letter-spacing: .06em;
  color: rgba(255,255,255,.45); padding: 14px 12px 5px; font-weight: 700; }
.app-nav a {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 10px;
  color: rgba(255,255,255,.82); text-decoration: none; font-weight: 600; font-size: .88rem;
  transition: background .15s, color .15s;
}
.app-nav a i { width: 18px; text-align: center; font-size: .95rem; }
.app-nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.app-nav a.active { background: var(--navy); color: #fff; box-shadow: inset 3px 0 0 var(--gold); }
.app-sidebar .app-side-foot { padding: 14px; border-top: 1px solid rgba(255,255,255,.12); font-size: .75rem; color: rgba(255,255,255,.55); }

.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.app-topbar {
  display: flex; align-items: center; gap: 14px; padding: 14px 26px;
  background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20;
}
.app-topbar .app-menu-btn { display: none; background: none; border: none; font-size: 1.4rem; color: var(--navy-deep); cursor: pointer; }
.app-topbar .topbar-title { font-weight: 800; color: var(--navy-deep); font-size: 1.05rem; }
.app-topbar .topbar-sub { color: var(--muted); font-size: .82rem; }
.app-topbar .topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.app-user { display: flex; align-items: center; gap: 9px; }
.app-user .avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--navy-tint); color: var(--navy-deep);
  display: grid; place-items: center; font-weight: 800; font-size: .9rem; }
.app-user .uinfo b { display: block; font-size: .85rem; color: var(--navy-deep); line-height: 1.1; }
.app-user .uinfo span { font-size: .72rem; color: var(--muted); }

.app-content { padding: 26px; max-width: 1180px; width: 100%; margin: 0 auto; }
.page-head { display: flex; align-items: flex-start; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h1 { font-size: 1.5rem; margin: 0 0 3px; }
.page-head p { margin: 0; color: var(--muted); font-size: .9rem; }
.page-head .ph-actions { margin-left: auto; display: flex; gap: 10px; flex-wrap: wrap; }

/* mode badge (demo/supabase) */
.mode-badge { font-size: .68rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; text-transform: uppercase; letter-spacing: .04em; }
.mode-badge.demo { background: var(--gold-soft); color: #8a6300; border: 1px solid #f4dca0; }
.mode-badge.supabase { background: var(--low-bg); color: #1c6b45; border: 1px solid #bfe6d1; }

/* ── Breadcrumb ─────────────────────────────────────────────────── */
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: .8rem; color: var(--muted); margin-bottom: 12px; }
.crumbs a { color: var(--navy-soft); text-decoration: none; font-weight: 600; }
.crumbs a:hover { text-decoration: underline; }
.crumbs span.sep { color: var(--line); }

/* ── Stat cards ─────────────────────────────────────────────────── */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.stat-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 18px 20px; }
.stat-card .sc-label { font-size: .78rem; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 7px; }
.stat-card .sc-value { font-size: 1.9rem; font-weight: 800; color: var(--navy-deep); line-height: 1.1; margin-top: 6px; }
.stat-card .sc-sub { font-size: .76rem; color: var(--muted); margin-top: 3px; }
.stat-card.accent { border-left: 4px solid var(--gold); }

/* ── Risk badges ────────────────────────────────────────────────── */
.risk-badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 11px; border-radius: 999px;
  font-weight: 700; font-size: .78rem; white-space: nowrap; }
.risk-badge::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.risk-baixo    { background: var(--low-bg);  color: #1c6b45; }
.risk-moderado { background: var(--mid-bg);  color: #8a5a10; }
.risk-alto     { background: var(--high-bg); color: #a33; }
.risk-critico  { background: var(--crit-bg); color: var(--crit); }
.risk-na       { background: #eef2f6; color: #7b8a99; }

/* ── Tables ─────────────────────────────────────────────────────── */
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; }
table.data { width: 100%; border-collapse: collapse; font-size: .86rem; min-width: 640px; }
table.data th, table.data td { padding: 11px 13px; text-align: left; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
table.data thead th { background: var(--navy-tint); color: var(--navy-deep); font-weight: 700; font-size: .8rem; white-space: nowrap; }
table.data tbody tr:hover { background: #fafcff; }
table.data td input, table.data td select, table.data td textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; font: inherit; font-size: .82rem; background: #fff;
}
table.data td textarea { resize: vertical; min-height: 34px; }

/* ── Forms ──────────────────────────────────────────────────────── */
.form-grid { display: grid; gap: 16px; }
.form-grid.cols-2 { grid-template-columns: 1fr 1fr; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 600; font-size: .85rem; color: var(--navy-deep); }
.field label .req { color: var(--high); }
.field input, .field select, .field textarea {
  border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; font: inherit; font-size: .92rem;
  background: #fff; color: var(--ink); transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--navy-soft); box-shadow: 0 0 0 3px rgba(13,79,134,.12);
}
.field .hint { font-size: .76rem; color: var(--muted); }
.field .err { font-size: .78rem; color: var(--high); font-weight: 600; }
.field.invalid input, .field.invalid select { border-color: var(--high); }
.check-row { display: flex; align-items: flex-start; gap: 9px; font-size: .86rem; color: var(--ink); }
.check-row input { margin-top: 3px; }

/* ── Auth (login) ──────────────────────────────────────────────── */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-hero { background: linear-gradient(150deg, var(--navy-deep), var(--navy-soft)); color: #fff; padding: 54px 48px; display: flex; flex-direction: column; justify-content: center; }
.auth-hero .ah-logo img { height: 40px; filter: brightness(0) invert(1); margin-bottom: 30px; }
.auth-hero h2 { color: #fff; font-size: 1.9rem; max-width: 16ch; }
.auth-hero p { color: rgba(255,255,255,.85); max-width: 40ch; }
.auth-hero ul { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 12px; }
.auth-hero ul li { display: flex; gap: 11px; align-items: flex-start; font-size: .92rem; color: rgba(255,255,255,.92); }
.auth-hero ul li i { color: var(--gold); margin-top: 3px; }
.auth-panel { display: flex; align-items: center; justify-content: center; padding: 40px 26px; background: var(--bg); }
.auth-card { width: 100%; max-width: 420px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 34px 30px; }
.auth-card h1 { font-size: 1.5rem; }
.auth-tabs { display: flex; gap: 6px; background: var(--navy-tint); padding: 4px; border-radius: 12px; margin-bottom: 22px; }
.auth-tabs button { flex: 1; border: none; background: none; padding: 9px; border-radius: 9px; font-weight: 700; font-size: .88rem; color: var(--muted); cursor: pointer; }
.auth-tabs button.active { background: #fff; color: var(--navy-deep); box-shadow: var(--shadow); }
.role-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.role-pick label { border: 1px solid var(--line); border-radius: 12px; padding: 12px; cursor: pointer; display: flex; gap: 10px; align-items: center; font-size: .85rem; font-weight: 600; }
.role-pick label i { font-size: 1.2rem; color: var(--navy-soft); }
.role-pick input { display: none; }
.role-pick input:checked + label, .role-pick label.sel { border-color: var(--navy-soft); background: var(--navy-tint); box-shadow: 0 0 0 2px rgba(13,79,134,.1); }

/* ── Public responder ───────────────────────────────────────────── */
.resp-wrap { max-width: 760px; margin: 0 auto; padding: 30px 20px 60px; }
.resp-top { text-align: center; margin-bottom: 22px; }
.resp-top img { height: 40px; margin-bottom: 8px; }
.resp-progress { position: sticky; top: 0; background: var(--bg); padding: 12px 0; z-index: 5; }
.resp-progress .bar { height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; }
.resp-progress .bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--navy-soft), var(--gold)); transition: width .3s; }
.resp-progress .ptxt { font-size: .78rem; color: var(--muted); margin-top: 6px; text-align: center; }
.q-dim-title { font-size: 1.05rem; color: var(--navy-deep); margin: 22px 0 4px; }
.q-item { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px 18px; margin-bottom: 12px; }
.q-item .q-text { font-weight: 600; margin-bottom: 12px; color: var(--ink); }
.likert { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.likert label { border: 1px solid var(--line); border-radius: 10px; padding: 8px 4px; text-align: center; cursor: pointer;
  font-size: .72rem; font-weight: 600; color: var(--muted); transition: all .12s; }
.likert label .lv { display: block; font-size: 1.1rem; font-weight: 800; color: var(--navy-deep); margin-bottom: 2px; }
.likert input { display: none; }
.likert input:checked + label { border-color: var(--navy-soft); background: var(--navy); color: #fff; }
.likert input:checked + label .lv { color: var(--gold); }

/* ── Kanban (plano de ação) — redesenhado com drag & drop ───────── */
.kanban { display: grid; grid-template-columns: repeat(5, minmax(220px, 1fr)); gap: 14px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.kan-col { background: var(--navy-tint); border-radius: var(--radius-sm); padding: 12px; min-width: 220px; box-sizing: border-box; transition: background .15s, box-shadow .15s; }
.kan-col.drag-over { background: #dce9f6; box-shadow: inset 0 0 0 2px var(--navy-soft); }
.kan-col h4 { font-size: .82rem; margin: 0 0 10px; display: flex; justify-content: space-between; align-items: center; color: var(--navy-deep); gap: 8px; }
.kan-col h4 .col-name { display: inline-flex; align-items: center; gap: 7px; min-width: 0; }
.kan-col h4 .col-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.kan-col h4 .cnt { background: #fff; border-radius: 999px; padding: 1px 9px; font-size: .72rem; flex-shrink: 0; }
.kan-col .kan-empty { border: 1px dashed var(--line); border-radius: 10px; padding: 14px 8px; text-align: center; color: var(--muted); font-size: .74rem; }

.kan-card {
  background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; margin-bottom: 9px;
  box-shadow: 0 2px 6px rgba(7,59,102,.05); position: relative; cursor: grab; box-sizing: border-box; max-width: 100%;
}
.kan-card:active { cursor: grabbing; }
.kan-card.dragging { opacity: .5; box-shadow: 0 10px 26px rgba(7,59,102,.22); }
.kan-card .kc-top { display: flex; align-items: flex-start; gap: 8px; }
.kan-card .kc-grip { color: var(--line); font-size: .82rem; margin-top: 2px; flex-shrink: 0; }
.kan-card .kc-action { font-size: .84rem; font-weight: 600; color: var(--ink); margin: 0 0 6px; flex: 1; min-width: 0; overflow-wrap: break-word; }
.kan-card .kc-action.clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.kan-card .kc-more-link { background: none; border: none; color: var(--navy-soft); font-size: .74rem; font-weight: 700; cursor: pointer; padding: 0; margin-bottom: 6px; }
.kan-card .kc-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 7px; }
.kan-card .kc-factor { font-size: .68rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--navy-tint); color: var(--navy-deep); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kan-card .kc-meta { font-size: .72rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 8px; }
.kan-card .kc-meta span { display: inline-flex; align-items: center; gap: 4px; }
.kan-card .kc-meta .overdue { color: #c0392b; font-weight: 700; }

/* menu de três pontos (não estoura o card) */
.kc-menu-btn { position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border-radius: 8px; border: none; background: transparent; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.kc-menu-btn:hover { background: var(--navy-tint); color: var(--navy-deep); }
.kc-menu { position: absolute; top: 34px; right: 8px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-lg); z-index: 30; min-width: 150px; overflow: hidden; }
.kc-menu button { display: flex; width: 100%; align-items: center; gap: 9px; padding: 9px 12px; border: none; background: none; text-align: left; font-size: .82rem; color: var(--ink); cursor: pointer; }
.kc-menu button:hover { background: var(--navy-tint); }
.kc-menu button.danger { color: #c0392b; }
.kc-menu .kc-menu-sep { font-size: .64rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 8px 12px 3px; font-weight: 700; }

.prio-badge { font-size: .68rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.prio-alta { background: #fdecec; color: #b23; }
.prio-media { background: #fdf1de; color: #8a5a10; }
.prio-baixa { background: #e7f6ee; color: #1c6b45; }

/* Filtros do plano de ação */
.plan-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 18px; }
.plan-filters .pf-item { display: flex; flex-direction: column; gap: 4px; min-width: 140px; flex: 1 1 140px; }
.plan-filters .pf-item label { font-size: .72rem; font-weight: 700; color: var(--muted); }
.plan-filters .pf-item select { border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; font: inherit; font-size: .84rem; background: #fff; }
.plan-filters .pf-clear { align-self: center; }

/* Indicadores / gráficos do plano de ação */
.plan-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 18px; }
.plan-kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px 18px; }
.plan-kpi .pk-label { font-size: .76rem; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 7px; }
.plan-kpi .pk-value { font-size: 1.8rem; font-weight: 800; color: var(--navy-deep); line-height: 1.1; margin-top: 6px; }
.plan-kpi .pk-sub { font-size: .74rem; color: var(--muted); margin-top: 3px; }
.plan-kpi.warn { border-left: 4px solid var(--mid); }
.plan-kpi.ok { border-left: 4px solid var(--low); }
.plan-progress { height: 10px; background: var(--line); border-radius: 999px; overflow: hidden; margin-top: 10px; }
.plan-progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--low), #2fb377); }
.plan-charts { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }
@media (max-width: 720px) { .plan-charts { grid-template-columns: 1fr; } }

/* ── Heatmap (redesenhado) ─────────────────────────────────────── */
.heat-toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 4px 0 14px; }
.heat-toolbar .seg { display: inline-flex; background: var(--navy-tint); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.heat-toolbar .seg button {
  border: none; background: none; padding: 7px 14px; border-radius: 999px; cursor: pointer;
  font-weight: 700; font-size: .82rem; color: var(--muted);
}
.heat-toolbar .seg button.active { background: #fff; color: var(--navy-deep); box-shadow: var(--shadow); }
.heat-toolbar .spacer { margin-left: auto; }

.heatmap { overflow: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); max-height: 68vh; position: relative; }
table.heat { border-collapse: separate; border-spacing: 0; font-size: .9rem; width: 100%; }
table.heat th, table.heat td { border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); padding: 10px 8px; text-align: center; }
/* cabeçalho superior fixo ao rolar verticalmente */
table.heat thead th {
  background: var(--navy); color: #fff; font-weight: 700; font-size: .8rem; vertical-align: middle;
  position: sticky; top: 0; z-index: 3; min-width: 78px;
}
table.heat thead th .hcol { display: block; line-height: 1.2; }
table.heat thead th abbr { text-decoration: none; border-bottom: 1px dotted rgba(255,255,255,.5); cursor: help; color: #fff; }
/* primeira coluna (Setor) fixa ao rolar horizontalmente */
table.heat th.rowh, table.heat td.rowh {
  text-align: left; background: var(--navy-tint); font-weight: 700; color: var(--navy-deep);
  white-space: normal; overflow-wrap: break-word; position: sticky; left: 0; z-index: 2;
  min-width: 150px; max-width: 200px; box-shadow: 2px 0 0 var(--line);
}
/* canto superior-esquerdo fixo nos dois eixos */
table.heat thead th.rowh { background: var(--navy); color: #fff; z-index: 4; }
.heat-cell {
  font-weight: 800; color: #fff; border-radius: 6px; padding: 8px 4px;
  font-size: 1rem; display: flex; flex-direction: column; align-items: center; gap: 1px; min-height: 40px; justify-content: center;
}
.heat-cell .hc-lvl { font-size: .62rem; font-weight: 700; opacity: .92; text-transform: uppercase; letter-spacing: .02em; }
table.heat.compact .heat-cell { min-height: 30px; padding: 5px 3px; font-size: .92rem; }
table.heat.compact .heat-cell .hc-lvl { display: none; }
/* cores de risco com bom contraste (texto branco sobre tons saturados) */
.heat-baixo    { background: #1f7d4d; }
.heat-moderado { background: #c77d10; }
.heat-alto     { background: #c0392b; }
.heat-critico  { background: #7d1f1f; }
.heat-na       { background: #e6ecf2; color: #7b8a99; font-weight: 600; }
.heat-legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 14px; font-size: .82rem; align-items: center; }
.heat-legend span { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); font-weight: 600; }
.heat-legend i { width: 16px; height: 16px; border-radius: 4px; display: inline-block; }

/* Mapa de calor em cards por setor (mobile) */
.heat-cards { display: none; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.heat-sector-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.heat-sector-card .hsc-head {
  background: var(--navy); color: #fff; padding: 11px 14px; font-weight: 700; font-size: .92rem;
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
}
.heat-sector-card .hsc-head .pill { background: rgba(255,255,255,.16); color: #fff; }
.heat-sector-card .hsc-row {
  display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-bottom: 1px solid var(--line-soft);
}
.heat-sector-card .hsc-row:last-child { border-bottom: none; }
.heat-sector-card .hsc-factor { flex: 1; min-width: 0; font-size: .84rem; color: var(--ink); overflow-wrap: break-word; }
.heat-sector-card .hsc-val { font-weight: 800; font-size: 1rem; min-width: 34px; text-align: right; }
.heat-sector-card .hsc-chip { font-size: .66rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; color: #fff; white-space: nowrap; }
.hsc-chip.heat-baixo, .hsc-chip.heat-moderado, .hsc-chip.heat-alto, .hsc-chip.heat-critico { color: #fff; }

/* ── Factor cards ──────────────────────────────────────────────── */
.factor-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.factor-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 18px; }
.factor-card h4 { font-size: .96rem; margin: 0 0 8px; }
.factor-card .fc-score { display: flex; align-items: baseline; gap: 8px; margin: 6px 0 10px; }
.factor-card .fc-score b { font-size: 1.8rem; color: var(--navy-deep); }
.factor-card .fc-desc { font-size: .82rem; color: var(--muted); line-height: 1.45; }
.factor-card h4 .rank-num { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--navy); color: #fff; font-size: .78rem; font-weight: 800; margin-right: 4px; vertical-align: middle; }

/* ── Suppression / anonymity notice ─────────────────────────────── */
.anon-note { background: var(--gold-soft); border: 1px solid #f4dca0; border-radius: var(--radius-sm); padding: 14px 16px; display: flex; gap: 11px; font-size: .86rem; color: #6b4e08; }
.anon-note i { color: var(--gold); font-size: 1.15rem; margin-top: 1px; }
.suppressed-box { background: #f4f7fa; border: 1px dashed var(--line); border-radius: var(--radius-sm); padding: 22px; text-align: center; color: var(--muted); font-size: .88rem; }

/* ── Link box (token) ──────────────────────────────────────────── */
.link-box { display: flex; gap: 8px; align-items: center; background: var(--navy-tint); border: 1px solid var(--line); border-radius: 10px; padding: 8px 8px 8px 14px; }
.link-box code { flex: 1; font-size: .8rem; color: var(--navy-deep); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Toast ──────────────────────────────────────────────────────── */
#toast-host { position: fixed; bottom: 22px; right: 22px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; }
.toast { background: var(--navy-deep); color: #fff; padding: 12px 18px; border-radius: 12px; box-shadow: var(--shadow-lg);
  font-size: .88rem; font-weight: 600; display: flex; align-items: center; gap: 10px; animation: toastin .25s ease; max-width: 340px; }
.toast.ok { background: #1c6b45; } .toast.err { background: #a33; } .toast.warn { background: #8a5a10; }
@keyframes toastin { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ── Modal ──────────────────────────────────────────────────────── */
.modal-backdrop { position: fixed; inset: 0; background: rgba(4,42,74,.5); display: grid; place-items: center; z-index: 9000; padding: 20px; }
.modal { background: #fff; border-radius: var(--radius); max-width: 520px; width: 100%; box-shadow: var(--shadow-lg); max-height: 90vh; overflow-y: auto; }
.modal .modal-head { padding: 20px 24px 0; display: flex; justify-content: space-between; align-items: center; }
.modal .modal-head h3 { margin: 0; }
.modal .modal-head button { background: none; border: none; font-size: 1.2rem; color: var(--muted); cursor: pointer; }
.modal .modal-body { padding: 18px 24px; }
.modal .modal-foot { padding: 0 24px 22px; display: flex; gap: 10px; justify-content: flex-end; }

/* ── Misc utilities ─────────────────────────────────────────────── */
.app-flex { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.app-flex.between { justify-content: space-between; }
.muted { color: var(--muted); }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .74rem; font-weight: 700; background: var(--navy-tint); color: var(--navy-deep); }
.pill.status-rascunho { background: #eef2f6; color: #7b8a99; }
.pill.status-coleta   { background: var(--low-bg); color: #1c6b45; }
.pill.status-analise  { background: var(--mid-bg); color: #8a5a10; }
.pill.status-concluido{ background: var(--navy-tint); color: var(--navy-deep); }
.pill.status-encerrado{ background: #eef2f6; color: #7b8a99; }
.empty-state { text-align: center; padding: 46px 20px; color: var(--muted); }
.empty-state i { font-size: 2.4rem; color: var(--line); margin-bottom: 12px; }
.empty-state h3 { color: var(--navy-deep); }
.spinner { width: 34px; height: 34px; border: 3px solid var(--line); border-top-color: var(--navy-soft); border-radius: 50%; animation: spin 1s linear infinite; margin: 40px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.section-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin-bottom: 20px; }
.section-card > h3 { margin-top: 0; display: flex; align-items: center; gap: 9px; }
.tabbar { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; flex-wrap: wrap; }
.tabbar a { padding: 10px 14px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: .88rem; border-bottom: 2px solid transparent; }
.tabbar a.active { color: var(--navy-deep); border-bottom-color: var(--gold); }
.disclaimer { background: #f4f7fa; border-left: 4px solid var(--navy-soft); border-radius: 8px; padding: 12px 15px; font-size: .8rem; color: var(--muted); margin: 16px 0; }

/* ===================================================================
   MELHORIAS DE FLUXO — componentes novos (MVP produto)
   =================================================================== */

/* ── Grid helpers ───────────────────────────────────────────────── */
.grid   { display: grid; gap: 16px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

/* ── Card genérico ──────────────────────────────────────────────── */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 18px 20px; }
.card.soft { background: var(--navy-tint); border-color: var(--line-soft); }
.card > h4 { margin: 0 0 8px; color: var(--navy-deep); font-size: .98rem; }

/* ── Botões extra ───────────────────────────────────────────────── */
.btn-gold {
  background: var(--gold); color: var(--navy-deep); border: 1px solid var(--gold);
  font-weight: 800;
}
.btn-gold:hover { background: #d9ab3a; border-color: #d9ab3a; }
.btn-wa {
  background: #25d366; color: #fff; border: 1px solid #25d366; font-weight: 700;
}
.btn-wa:hover { background: #1eb457; border-color: #1eb457; }

/* ── Tooltip / termo do glossário ───────────────────────────────── */
.term { border-bottom: 1px dotted var(--navy-soft); cursor: help; white-space: nowrap; }
.term i { font-size: .68em; color: var(--navy-soft); margin-left: 2px; vertical-align: super; }
.term:hover { color: var(--navy-deep); }

/* ── Botão "Próximo passo" ──────────────────────────────────────── */
.next-step-btn { font-weight: 800; }
.nextstep-bar {
  display: flex; justify-content: flex-end; align-items: center; gap: 12px;
  background: var(--navy-tint); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 14px 18px; margin: 20px 0 0; flex-wrap: wrap;
}
.nextstep-bar .ns-hint { margin-right: auto; color: var(--muted); font-size: .85rem; }

/* ── Onboarding / checklist (MELHORIA 1) ────────────────────────── */
.onboarding-card {
  background: linear-gradient(135deg, var(--navy-deep), var(--navy-soft));
  color: #fff; border: none; border-radius: var(--radius);
  padding: 26px 28px; margin-bottom: 22px; box-shadow: var(--shadow-lg);
}
.onboarding-card h2 { color: #fff; font-size: 1.35rem; margin: 0 0 4px; }
.onboarding-card > p { color: rgba(255,255,255,.85); font-size: .9rem; margin: 0 0 18px; max-width: 60ch; }
.onboarding-card .ob-head { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.onboarding-card .ob-head > div:first-child { flex: 1; min-width: 220px; }

.onboard-progress { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.onboard-progress .op-label { font-size: .74rem; color: rgba(255,255,255,.8); font-weight: 600; }
.op-ring {
  --pct: 0;
  width: 84px; height: 84px; border-radius: 50%;
  background: conic-gradient(var(--gold) calc(var(--pct) * 1%), rgba(255,255,255,.18) 0);
  display: grid; place-items: center; position: relative;
}
.op-ring::before { content: ''; position: absolute; inset: 8px; border-radius: 50%; background: var(--navy-deep); }
.op-ring span { position: relative; font-weight: 800; font-size: 1.1rem; color: #fff; }

.checklist { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-direction: column; gap: 8px; }
.check-item {
  display: flex; gap: 13px; align-items: flex-start;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px; padding: 12px 14px;
}
.check-item .ci-num {
  flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 800; font-size: .9rem;
  background: rgba(255,255,255,.14); color: #fff;
}
.check-item .ci-body { flex: 1; min-width: 0; }
.check-item .ci-body b { color: #fff; font-size: .92rem; display: block; }
.check-item .ci-body .ci-desc { color: rgba(255,255,255,.72); font-size: .8rem; margin-top: 3px; }
.check-item .ci-body .btn { margin-top: 8px; }
.check-item.ci-concluido { background: rgba(37,140,90,.22); border-color: rgba(90,210,150,.4); }
.check-item.ci-concluido .ci-num { background: #1c7d52; }
.check-item.ci-andamento .ci-num { background: var(--gold); color: var(--navy-deep); }
.check-item.ci-pendente { opacity: .92; }

/* onboarding em fundo claro (Empresa) — variação */
.onboarding-card.light {
  background: #fff; color: var(--ink); border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.onboarding-card.light h2 { color: var(--navy-deep); }
.onboarding-card.light > p { color: var(--muted); }
.onboarding-card.light .op-ring::before { background: #fff; }
.onboarding-card.light .op-ring span { color: var(--navy-deep); }
.onboarding-card.light .onboard-progress .op-label { color: var(--muted); }
.onboarding-card.light .check-item { background: var(--navy-tint); border-color: var(--line-soft); }
.onboarding-card.light .check-item .ci-num { background: var(--navy-soft); }
.onboarding-card.light .check-item .ci-body b { color: var(--navy-deep); }
.onboarding-card.light .check-item .ci-body .ci-desc { color: var(--muted); }
.onboarding-card.light .check-item.ci-concluido { background: var(--low-bg); border-color: #bfe6d1; }
.onboarding-card.light .check-item.ci-concluido .ci-num { background: #1c7d52; }
.onboarding-card.light .check-item.ci-andamento .ci-num { background: var(--gold); color: var(--navy-deep); }

/* ── Badge de status de etapa ───────────────────────────────────── */
.step-status { display: inline-flex; align-items: center; gap: 6px; font-size: .74rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.step-status.ok   { background: var(--low-bg);  color: #1c6b45; }
.step-status.wip  { background: var(--mid-bg);  color: #8a5a10; }
.step-status.pend { background: #eef2f6;         color: #7b8a99; }

/* ── Dashboard comercial (MELHORIA 6) ───────────────────────────── */
.empty-dash { text-align: center; padding: 40px 22px; }
.empty-dash i.big { font-size: 2.6rem; color: var(--navy-tint); }
.empty-dash h3 { color: var(--navy-deep); margin: 12px 0 6px; }
.empty-dash p { color: var(--muted); max-width: 52ch; margin: 0 auto 18px; }
.empty-dash .ed-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

.exec-summary p { font-size: .9rem; color: var(--ink); line-height: 1.6; }
.exec-summary ul { margin: 10px 0 0; padding-left: 20px; font-size: .88rem; color: var(--ink); }
.exec-summary ul li { margin-bottom: 6px; }
.exec-summary .es-metrics { display: flex; gap: 22px; flex-wrap: wrap; margin: 4px 0 14px; }
.exec-summary .es-metrics div b { font-size: 1.5rem; color: var(--navy-deep); display: block; }
.exec-summary .es-metrics div span { font-size: .78rem; color: var(--muted); }

/* ── Por que é útil (MELHORIA 10) ───────────────────────────────── */
.why-useful .why-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: 6px; }
.why-item { display: flex; gap: 12px; align-items: flex-start; }
.why-item i { color: var(--gold); font-size: 1.3rem; margin-top: 2px; width: 24px; text-align: center; }
.why-item b { display: block; color: var(--navy-deep); font-size: .92rem; }
.why-item span { display: block; color: var(--muted); font-size: .84rem; margin-top: 2px; }

/* ── Coleta anônima (MELHORIA 3) ────────────────────────────────── */
.collect-card { border-top: 4px solid var(--gold); }
.collect-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 14px 0; }
.collect-btn { padding: 13px 20px; font-size: .95rem; font-weight: 700; }
.collect-sim {
  background: var(--gold-soft); border: 1px dashed #e6c86a;
  border-radius: var(--radius-sm); padding: 12px 15px; font-size: .86rem; color: #6b4e08;
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 10px;
}
.collect-sim i { color: var(--gold); }
.collect-sim .btn { margin-left: 4px; }

.link-card { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 15px 16px; margin-top: 14px; background: #fff; }
.link-card > .lc-head { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--navy-deep); font-size: .9rem; margin-bottom: 10px; }
.link-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.link-actions .btn { font-size: .82rem; }

/* ── Entrega do diagnóstico (MELHORIA 7) ────────────────────────── */
.delivery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.delivery-card { display: flex; gap: 14px; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 18px; position: relative; }
.delivery-card .dc-icon { flex-shrink: 0; width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-size: 1.3rem; }
.delivery-card .dc-body { flex: 1; min-width: 0; }
.delivery-card .dc-body h4 { margin: 0 0 4px; color: var(--navy-deep); font-size: .96rem; }
.delivery-card .dc-body p { margin: 0 0 10px; color: var(--muted); font-size: .82rem; }
.delivery-card.avail { border-left: 4px solid var(--low); }
.delivery-card.avail .dc-icon { background: var(--low-bg); color: #1c6b45; }
.delivery-card.pend { border-left: 4px solid var(--line); opacity: .9; }
.delivery-card.pend .dc-icon { background: #eef2f6; color: #9aa8b5; }

/* ── Metodologia (MELHORIA 9) ───────────────────────────────────── */
/* Colunas mais largas: mínimo 280px evita colunas estreitas e texto ilegível.
   Em telas estreitas colapsa para uma única coluna. */
.meth-list { list-style: none; padding: 0; margin: 10px 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px 22px; }
.meth-list li { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; color: var(--ink); line-height: 1.45; overflow-wrap: break-word; }
.meth-list li i { color: var(--low); margin-top: 4px; flex-shrink: 0; }
.meth-list.nope { display: block; }
.meth-list.nope li { margin-bottom: 9px; }
.meth-list.nope li i { color: var(--high); }
@media (max-width: 620px) { .meth-list { grid-template-columns: 1fr; } }

/* Texto corrido da metodologia com boa medida de leitura */
.section-card p { line-height: 1.6; }

/* Ficha da camada de metodologia (instrumento-base) */
.meth-spec { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 0; }
.meth-spec li { display: grid; grid-template-columns: 220px 1fr; gap: 8px 18px; padding: 11px 0; border-bottom: 1px solid var(--line-soft); font-size: .9rem; line-height: 1.55; }
.meth-spec li:last-child { border-bottom: none; }
.meth-spec li .ms-key { font-weight: 700; color: var(--navy-deep); }
.meth-spec li .ms-val { color: var(--ink); overflow-wrap: break-word; }
@media (max-width: 620px) { .meth-spec li { grid-template-columns: 1fr; gap: 2px; } }

/* Mapeamento de domínios (dimensão → COPSOQ) */
.meth-map { width: 100%; }
.meth-map .mm-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 20px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); font-size: .88rem; }
.meth-map .mm-row .mm-dim { font-weight: 600; color: var(--navy-deep); }
.meth-map .mm-row .mm-copsoq { color: var(--muted); }
.meth-map .mm-head { font-weight: 700; color: var(--navy-deep); border-bottom: 2px solid var(--line); }
.meth-map .mm-head .mm-copsoq { color: var(--navy-deep); }
@media (max-width: 620px) { .meth-map .mm-row { grid-template-columns: 1fr; gap: 2px; } .meth-map .mm-head { display: none; } }

.meth-refs { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 8px; }
.meth-refs li { display: flex; gap: 10px; align-items: flex-start; font-size: .88rem; line-height: 1.5; overflow-wrap: break-word; }
.meth-refs li i { color: var(--gold); margin-top: 4px; flex-shrink: 0; }
.meth-refs li a { color: var(--navy-soft); font-weight: 600; overflow-wrap: anywhere; }

.level-legend { display: flex; flex-direction: column; gap: 8px; margin: 6px 0; }
.lvl-row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; padding: 11px 14px; border: 1px solid var(--line-soft); border-radius: 10px; }
.lvl-row .lvl-range { font-weight: 700; color: var(--navy-deep); font-size: .86rem; min-width: 120px; }
.lvl-row .lvl-desc { color: var(--ink); font-size: .86rem; flex: 1; min-width: 220px; line-height: 1.45; }

/* ── Conectar Supabase (MELHORIA 11) ────────────────────────────── */
.conn-status { display: flex; gap: 13px; align-items: flex-start; border-radius: var(--radius-sm); padding: 16px 18px; margin-bottom: 18px; }
.conn-status i { font-size: 1.6rem; margin-top: 2px; }
.conn-status b { display: block; font-size: 1rem; }
.conn-status span { font-size: .86rem; }
.conn-status.demo { background: var(--gold-soft); border: 1px solid #f4dca0; color: #6b4e08; }
.conn-status.demo i { color: var(--gold); }
.conn-status.prod { background: var(--low-bg); border: 1px solid #bfe6d1; color: #1c6b45; }
.conn-status.prod i { color: #1c7d52; }
.setup-steps { padding-left: 22px; margin: 10px 0; }
.setup-steps li { margin-bottom: 10px; font-size: .88rem; color: var(--ink); line-height: 1.5; }
.setup-steps li code { background: var(--navy-tint); padding: 1px 6px; border-radius: 6px; font-size: .82rem; }

/* ── Questionário: detalhes de dimensão ─────────────────────────── */
.q-dim-details { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 4px 16px; margin-top: 12px; background: #fff; }
.q-dim-details summary { cursor: pointer; font-weight: 700; color: var(--navy-deep); padding: 10px 0; font-size: .9rem; }
.q-dim-details summary:hover { color: var(--navy-soft); }
.q-dim-details ul { margin: 4px 0 12px; padding-left: 20px; font-size: .84rem; color: var(--ink); }
.q-dim-details ul li { margin-bottom: 5px; }

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-hero { display: none; }
  .form-grid.cols-2 { grid-template-columns: 1fr; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .app-sidebar { position: fixed; left: 0; top: 0; z-index: 100; transform: translateX(-100%); transition: transform .25s; box-shadow: var(--shadow-lg); }
  .app-sidebar.open { transform: none; }
  .app-topbar .app-menu-btn { display: block; }
  .app-content { padding: 18px; }
  .sidebar-scrim { position: fixed; inset: 0; background: rgba(4,42,74,.45); z-index: 99; }
  .likert { grid-template-columns: repeat(5, 1fr); gap: 4px; }
  .likert label { font-size: .62rem; padding: 6px 2px; }
  /* Mapa de calor: em telas estreitas mostra cards por setor no lugar da tabela */
  .heatmap { display: none; }
  .heat-cards { display: grid; }
  .heat-toolbar .seg { display: none; }
  /* Kanban: colunas roláveis horizontalmente, largura confortável para toque */
  .kanban { grid-template-columns: repeat(5, 80vw); }
}

/* ===================================================================
   CORREÇÕES DE LAYOUT / CONTRASTE / RESPONSIVIDADE
   (fix/layout-metodologia-acolhemente-trabalho)
   Objetivos:
   - eliminar overflow horizontal indesejado;
   - impedir botões de estourar containers/cards;
   - garantir contraste suficiente em fundos escuros;
   - evitar quebra de palavra por palavra;
   - padronizar margens e responsividade (desktop/tablet/mobile).
   =================================================================== */

/* 1) Sem overflow horizontal global na área do produto */
.app-body { overflow-x: hidden; }
.app-shell, .app-main, .app-content { max-width: 100%; }
.app-content { box-sizing: border-box; }

/* 2) Botões nunca ultrapassam o container e quebram texto com elegância */
.btn {
  max-width: 100%;
  white-space: normal;              /* permite quebrar em telas estreitas */
  overflow-wrap: break-word;
  text-align: center;
  line-height: 1.25;
}
.btn i { flex-shrink: 0; }
/* ícone + label não devem ser separados de forma estranha */
.ph-actions .btn, .app-flex .btn, .link-actions .btn, .collect-actions .btn { min-width: 0; }

/* 3) Tipografia: títulos com line-height adequado, sem quebra de palavra por palavra */
h1, h2, h3, h4 { line-height: 1.25; overflow-wrap: break-word; }
.app-content p, .section-card p, .card p, .factor-card p { overflow-wrap: break-word; }
/* overflow-wrap: anywhere só quando realmente necessário (códigos/tokens/urls longas) */
.link-box code, code, .break-anywhere { overflow-wrap: anywhere; word-break: break-word; }

/* 4) Cards e grids não estouram a largura */
.section-card, .card, .factor-card, .stat-card, .delivery-card { max-width: 100%; box-sizing: border-box; }
.stat-grid, .factor-grid, .why-grid, .delivery-grid, .grid, .grid-2, .grid-3 { min-width: 0; }
.stat-grid > *, .factor-grid > *, .grid > *, .grid-2 > *, .grid-3 > * { min-width: 0; }

/* 5) Contraste em fundos escuros (cards navy) — texto branco/azul-claro legível */
.onboarding-card:not(.light),
.onboarding-card:not(.light) p,
.onboarding-card:not(.light) small,
.onboarding-card:not(.light) .muted { color: rgba(255,255,255,.92); }
.onboarding-card:not(.light) .muted { color: rgba(255,255,255,.8); }
.onboarding-card:not(.light) h1,
.onboarding-card:not(.light) h2,
.onboarding-card:not(.light) h3 { color: #fff; }
.onboarding-card:not(.light) .check-item .ci-body .muted { color: rgba(255,255,255,.78); }
/* onboarding: descrição secundária usava .muted (cinza) em fundo escuro -> clarear */
.onboarding-card:not(.light) .ci-body p.muted { color: rgba(255,255,255,.78); }
.onboarding-card:not(.light) small { color: rgba(255,255,255,.85); }
/* botão fantasma dentro do card escuro precisa de contraste */
.onboarding-card:not(.light) .btn-ghost {
  background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.35);
}
.onboarding-card:not(.light) .btn-ghost:hover { background: rgba(255,255,255,.24); }

/* 6) Sidebar (navy) — reforço de contraste de textos secundários */
.app-side-foot { color: rgba(255,255,255,.7); }
.app-side-foot b { color: #fff; }

/* 7) Badges/pills não estouram e mantêm boa legibilidade */
.risk-badge, .prio-badge, .pill, .mode-badge, .step-status { max-width: 100%; }

/* 8) page-head: em telas pequenas, ações vão para baixo sem estourar */
@media (max-width: 640px) {
  .page-head { flex-direction: column; }
  .page-head .ph-actions { margin-left: 0; width: 100%; }
  .page-head .ph-actions .btn { flex: 1 1 auto; justify-content: center; }
  .btn { padding: 11px 16px; font-size: .92rem; }
}

/* 9) Modais nunca estouram a viewport */
.modal { box-sizing: border-box; }
.modal .modal-body, .modal .form-grid { min-width: 0; }
.modal .form-grid.cols-2 { grid-template-columns: 1fr; }
@media (min-width: 560px) {
  .modal .form-grid.cols-2 { grid-template-columns: 1fr 1fr; }
}

/* 10) Tooltips do glossário não devem cobrir conteúdo (usar título nativo) */
.term { white-space: normal; }

/* 11) Tabelas: rolagem confinada ao wrapper, nunca à página inteira */
.tbl-wrap, .heatmap { max-width: 100%; -webkit-overflow-scrolling: touch; }
