@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@600;700&family=Carlito:wght@400;700&display=swap");

:root {
  /* Paleta oficial SF (identidade visual SFFinance, 2026-08-28), reaproveitada
     aqui para consistencia de marca entre os softwares internos. */
  --brand-primary: #e10600;
  --brand-primary-dark: #7a171d;
  --brand-secondary: #e10600;
  --neutral-0: #1c1c1f;
  --neutral-50: #1e1e21;
  --neutral-100: #232326;
  --neutral-200: #26262a;
  --neutral-300: #303030;
  --neutral-500: #9a9a9e;
  --neutral-700: #bcc2c2;
  --neutral-900: #ffffff;
  --state-success: #3ba776;
  --state-warning: #e8a33d;
  --state-danger: #c23b3b;

  --bg-page: #141416;
  --bg-card: #1c1c1f;
  --bg-card-alt: #26262a;
  --border-subtle: #242427;
  --border-strong: #303030;
  --text-primary: #ffffff;
  --text-secondary: #bcc2c2;
  --text-muted: #7a7d80;

  --font-primary: "Carlito", "Calibri", "Segoe UI", sans-serif;
  --font-display: "Montserrat", "Segoe UI", sans-serif;
  --font-secondary: "Carlito", "Calibri", "Segoe UI", sans-serif;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;

  --space-4: 4px;
  --space-8: 8px;
  --space-12: 12px;
  --space-16: 16px;
  --space-24: 24px;
  --space-32: 32px;

  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-2: 0 14px 36px rgba(0, 0, 0, 0.55);
}

h1, h2, h3, h4, h5,
.kpi-value, .kpi-status-text, .hero-title, .rh-hero-title,
.logo-title, .logo-mark, .sf-product, .sf-wordmark {
  font-family: var(--font-display);
}

.kpi-value, .kpi-compact .kpi-value {
  font-variant-numeric: tabular-nums;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-primary);
  color: var(--text-primary);
  background: var(--bg-page);
}

a {
  color: inherit;
  text-decoration: none;
}

.page {
  min-height: 100vh;
}

.login-page {
  display: grid;
  place-items: center;
  padding: var(--space-32);
}

.sf-login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.sf-login-card {
  width: 100%;
  max-width: 460px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-top: 4px solid var(--brand-secondary);
  border-radius: 18px;
  box-shadow: var(--shadow-2);
  padding: 28px 20px 16px;
}

.sf-wordmark {
  margin: 0 0 18px;
  color: var(--brand-secondary);
  font-size: 38px;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 0.95;
}

.sf-product {
  color: var(--text-primary);
  font-size: 30px;
  font-weight: 600;
  line-height: 1;
  margin-bottom: 6px;
}

.sf-product-sub {
  font-size: 18px;
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.2;
}

.sf-login-form {
  display: grid;
  gap: 12px;
}

.sf-label {
  display: block;
  margin-bottom: 6px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-secondary);
}

.sf-input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 16px;
  background: var(--bg-card-alt);
  color: var(--text-primary);
}

.sf-entra-note {
  min-height: 44px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: var(--bg-card-alt);
  color: var(--text-secondary);
  font-size: 16px;
  display: flex;
  align-items: center;
  padding: 0 14px;
}

.sf-login-btn {
  width: 100%;
  min-height: 44px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
}

.welcome-page {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 40px;
}

.welcome-shell {
  width: 100%;
  max-width: 1280px;
  min-height: 78vh;
  border-radius: 28px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-2);
  padding: 56px;
  position: relative;
  overflow: hidden;
}

.welcome-shell::before {
  content: "";
  position: absolute;
  right: -160px;
  bottom: -180px;
  width: 620px;
  height: 620px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(225, 6, 0, 0.18) 0%, rgba(225, 6, 0, 0) 70%);
  pointer-events: none;
}

.welcome-content {
  max-width: 760px;
  position: relative;
  z-index: 2;
}

.welcome-content .h1 {
  max-width: 720px;
}

.welcome-content .hero-actions {
  margin: 10px 0 20px;
}

.welcome-kpis .card {
  background: var(--bg-card-alt);
}

.hub-group {
  margin-top: 14px;
}

.hub-group-title {
  margin: 0 0 8px;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.avatar-fixed {
  position: absolute;
  right: -4px;
  bottom: 0;
  width: min(42vw, 470px);
  max-height: 78vh;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  pointer-events: none;
  z-index: 1;
}

.avatar-fixed img {
  width: 100%;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 26px 44px rgba(0, 0, 0, 0.6));
}

.avatar-fixed .avatar-fallback-text {
  display: none;
}

.avatar-fixed.avatar-fallback {
  width: 320px;
  height: 420px;
  border-radius: 24px;
  background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg-card-alt) 100%);
  border: 1px dashed var(--border-strong);
  align-items: center;
  justify-content: center;
}

.avatar-fixed.avatar-fallback .avatar-fallback-text {
  display: block;
  color: var(--text-secondary);
  font-weight: 700;
}

.login-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-top: 4px solid var(--brand-secondary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-2);
  padding: 40px;
}

.auth-card {
  border-top: 5px solid var(--brand-secondary);
  border-radius: 20px;
  padding: 34px 34px 30px;
  box-shadow: var(--shadow-2);
}

.auth-card .logo-block {
  margin-bottom: 14px;
}

.auth-card .logo-mark {
  font-size: 52px;
  line-height: 0.95;
}

.auth-card .logo-title {
  font-size: 42px;
  line-height: 1;
}

.auth-card .logo-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
}

.auth-card .tagline {
  margin-top: 10px;
}

.auth-input {
  min-height: 44px;
  border-color: var(--border-strong);
  border-radius: 12px;
}

.avatar-corner-mini {
  position: fixed;
  right: 16px;
  bottom: 12px;
  width: min(28vw, 320px);
  height: 210px;
  z-index: 5;
  pointer-events: none;
}

.avatar-corner-mini img {
  position: absolute;
  right: 0;
  bottom: 0;
  width: min(16vw, 180px);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.6));
}

.avatar-culture-copy {
  position: absolute;
  left: 18px;
  bottom: 10px;
  color: var(--text-primary);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1;
  white-space: nowrap;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.4);
}

.logo-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-8);
  margin-bottom: var(--space-24);
}

.logo-mark {
  color: #ffffff;
  background: var(--brand-secondary);
  display: inline-block;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 22px;
  letter-spacing: 0.02em;
  font-weight: 700;
  line-height: 1;
}

.logo-text {
  line-height: 1.2;
}

.logo-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
}

.logo-subtitle {
  font-size: 14px;
  color: var(--text-muted);
}

.h1 {
  margin: 0 0 var(--space-12);
  font-size: 44px;
  font-weight: 700;
  color: var(--text-primary);
}

.lead {
  margin: 0 0 var(--space-24);
  color: var(--text-secondary);
  font-size: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  border-radius: var(--radius-sm);
  font-weight: 600;
  padding: 6px 10px;
  min-height: 30px;
  cursor: pointer;
  transition: 0.2s ease;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
}

.btn-primary {
  background: var(--brand-secondary);
  color: white;
}

.btn-primary:hover {
  filter: brightness(1.1);
}

.btn-secondary {
  background: var(--bg-card-alt);
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
}

.btn-secondary:hover {
  background: var(--neutral-200);
}

.btn-warning {
  background: rgba(232, 163, 61, 0.14);
  color: var(--state-warning);
  border: 1px solid rgba(232, 163, 61, 0.35);
}

.app-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
  background: var(--bg-page);
}

.sidebar {
  background: #000000;
  color: var(--text-primary);
  padding: var(--space-24);
  display: flex;
  flex-direction: column;
  gap: var(--space-24);
  border-right: 1px solid var(--border-subtle);
}

.sidebar .logo-title {
  color: #ffffff;
  font-size: 16px;
}

.sidebar .logo-mark {
  color: #ffffff;
  background: var(--brand-secondary);
  font-size: 15px;
  white-space: nowrap;
  letter-spacing: 0.01em;
  line-height: 1.4;
  padding: 5px 10px;
  border-radius: 6px;
}

.sidebar .logo-subtitle {
  color: var(--text-secondary);
}

.menu {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.menu-group-title {
  margin-top: 6px;
  padding: 4px 12px 2px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  font-weight: 700;
}

.menu-group-title:first-child {
  margin-top: 0;
}

.menu-group-divider {
  height: 1px;
  margin: 4px 10px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.14) 18%, rgba(255, 255, 255, 0.14) 82%, rgba(255, 255, 255, 0) 100%);
}

.menu a {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 14px;
  border: 1px solid transparent;
}

.menu a.active,
.menu a:hover {
  background: rgba(225, 6, 0, 0.16);
  border: 1px solid rgba(225, 6, 0, 0.4);
  color: var(--text-primary);
}

.main {
  display: flex;
  flex-direction: column;
}

.topbar {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-subtle);
  padding: 14px var(--space-24);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.topbar-left h2 {
  margin: 0;
  font-size: 36px;
  color: var(--text-primary);
}

.topbar-left p {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: var(--space-12);
}

.context-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card-alt);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 6px 8px;
}

.context-control label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
}

.context-control select {
  min-width: 110px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 13px;
  background: var(--bg-card);
  color: var(--text-primary);
}

.filters-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.filters-row input[type="file"] {
  max-width: 320px;
}

.menu-back-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.menu-home-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  background: transparent;
  border: 1px solid var(--border-strong);
  font-weight: 700;
}

.menu-home-link:hover,
.menu-home-link.active {
  background: var(--bg-card-alt);
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.tagline {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 4px;
}

.content {
  padding: var(--space-24);
  display: grid;
  gap: var(--space-16);
}

.workflow-strip {
  margin: 16px 24px 0;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
}

.workflow-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-weight: 700;
}

.workflow-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.workflow-step {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--bg-card-alt);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
}

.workflow-step.done {
  background: rgba(59, 167, 118, 0.14);
  border-color: rgba(59, 167, 118, 0.35);
  color: var(--state-success);
}

.workflow-step.current {
  background: rgba(225, 6, 0, 0.14);
  border-color: rgba(225, 6, 0, 0.4);
  color: #ff4d47;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-16);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-16);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-16);
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-1);
  padding: var(--space-16);
}

.card h3 {
  margin: 0 0 var(--space-12);
  font-size: 18px;
  color: var(--text-primary);
}

.hero-card {
  padding: 22px;
  border-radius: 22px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
}

.hero-title {
  margin: 0;
  font-size: 52px;
  color: var(--text-primary);
  line-height: 1.05;
}

.hero-subtitle {
  margin: 8px 0 14px;
  font-size: 15px;
  color: var(--text-secondary);
  max-width: 760px;
}

.hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--bg-card-alt);
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 13px;
}

.pill.active {
  background: var(--brand-secondary);
  color: #fff;
  border-color: var(--brand-secondary);
}

.header-controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.kpi-compact .kpi-value {
  font-size: 34px;
  line-height: 1;
}

.kpi-compact .kpi-label {
  font-size: 12px;
}

.kpi-ring {
  width: 64px;
  height: 64px;
  border-radius: 999px;
  border: 6px solid var(--border-subtle);
  border-top-color: var(--brand-secondary);
  display: grid;
  place-items: center;
  font-weight: 700;
  color: var(--text-primary);
  margin: 4px auto 0;
}

.kpi-grid-6 {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.kpi-grid-6 .card {
  padding: 12px;
}

.muted-block {
  background: var(--bg-card-alt);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 12px;
}

.institutional-warning {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(194, 59, 59, 0.1);
  border: 1px solid rgba(194, 59, 59, 0.35);
  color: var(--state-danger);
}

.table.table-tight th,
.table.table-tight td {
  padding: 8px 10px;
}

.kpi-value {
  font-size: 40px;
  font-weight: 700;
  margin-bottom: var(--space-4);
  color: var(--text-primary);
}

.kpi-label {
  font-size: 13px;
  color: var(--text-secondary);
}

.kpi-status-text {
  font-size: 26px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.05;
}

.kpi-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.kpi-inline .chip {
  white-space: nowrap;
}

.rh-dashboard-topbar {
  align-items: flex-start;
  gap: 12px;
}

.rh-dashboard-topbar .topbar-left h2 {
  font-size: 32px;
}

.rh-dashboard-controls {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.rh-campaign-context {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.rh-hero-title {
  margin: 0;
  font-size: 34px;
  color: var(--text-primary);
}

.rh-context-grid .card {
  min-height: 96px;
}

.rh-context-value {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
  margin-bottom: 4px;
  word-break: break-word;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.chip.success { background: rgba(59, 167, 118, 0.14); color: var(--state-success); }
.chip.warning { background: rgba(232, 163, 61, 0.16); color: var(--state-warning); }
.chip.danger { background: rgba(194, 59, 59, 0.14); color: var(--state-danger); }
.chip.neutral { background: var(--bg-card-alt); color: var(--text-secondary); }
.chip.laranja { background: rgba(207, 74, 44, 0.18); color: #f0866b; }
.chip.amarelo { background: rgba(185, 138, 16, 0.2); color: #e2bb4f; }
.chip.azul { background: rgba(61, 130, 220, 0.18); color: #7fb0f0; }
.chip.rosa { background: rgba(207, 95, 166, 0.18); color: #ec93c8; }

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.table th,
.table td {
  text-align: left;
  padding: 10px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
}

.table th {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.progress {
  height: 8px;
  background: var(--bg-card-alt);
  border-radius: 999px;
  overflow: hidden;
}

.progress > span {
  display: block;
  height: 100%;
  width: 65%;
  background: linear-gradient(90deg, var(--brand-secondary), #ff4d47);
}

.competency {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-16);
  background: var(--bg-card);
}

.competency h4 {
  margin: 0 0 var(--space-8);
  font-size: 16px;
  color: var(--text-primary);
}

.competency p {
  margin: 0 0 var(--space-12);
  color: var(--text-secondary);
  font-size: 13px;
}

.scale {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--space-8);
  margin-bottom: var(--space-12);
}

.scale button {
  padding: 10px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-card-alt);
  color: var(--text-primary);
  font-weight: 600;
}

.scale button.active {
  border-color: var(--brand-secondary);
  background: rgba(225, 6, 0, 0.16);
  color: #ff4d47;
}

textarea,
input,
select {
  width: 100%;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 10px;
  font-size: 14px;
  background: var(--bg-card-alt);
  color: var(--text-primary);
}

.actions {
  display: flex;
  gap: var(--space-8);
  justify-content: flex-end;
}

.radar,
.heatmap,
.chart {
  height: 220px;
  border-radius: var(--radius-md);
  border: 1px dashed var(--border-strong);
  background: repeating-linear-gradient(
    45deg,
    var(--bg-card),
    var(--bg-card) 10px,
    var(--bg-card-alt) 10px,
    var(--bg-card-alt) 20px
  );
  display: grid;
  place-items: center;
  color: var(--text-muted);
  font-size: 13px;
}

.split-3 {
  display: grid;
  grid-template-columns: 300px 1fr 420px;
  gap: var(--space-16);
}

.equidade-bars {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.equidade-bar-row {
  display: grid;
  gap: 4px;
}

.equidade-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--text-secondary);
}

.equidade-bar-track {
  height: 10px;
  border-radius: 999px;
  background: var(--bg-card-alt);
  overflow: hidden;
}

.equidade-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--brand-primary);
}

.equidade-bars-empty {
  font-size: 13px;
  color: var(--text-muted);
}

.helper {
  font-size: 12px;
  color: var(--text-muted);
}

.wizard-shell {
  max-width: 980px;
}

.wizard-header {
  margin-bottom: 8px;
}

.wizard-progress {
  display: grid;
  gap: 8px;
  margin: 12px 0 16px;
}

.wizard-progress-text {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

.wizard-steps {
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 14px;
  background: var(--bg-card);
}

.wizard-step-panel h3 {
  margin-top: 0;
  color: var(--text-primary);
}

.wizard-options {
  display: grid;
  gap: 10px;
}

.wizard-choice {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-card-alt);
}

.wizard-choice input {
  width: auto;
}

.wizard-navigation {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 16px;
}

.wizard-model-preview {
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  background: var(--bg-card-alt);
  padding: 12px;
  margin-bottom: 10px;
}

.wizard-model-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.wizard-model-heading h4 {
  margin: 0;
  font-size: 14px;
  color: var(--text-primary);
}

.wizard-model-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.wizard-model-card {
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  background: var(--bg-card);
  padding: 10px;
}

.wizard-model-card h5 {
  margin: 0 0 6px;
  font-size: 12px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.wizard-model-card ul {
  margin: 0;
  padding-left: 16px;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.45;
}

.wizard-model-card-desc li {
  margin-bottom: 8px;
}

.wizard-model-card-desc li strong {
  color: var(--text-primary);
  font-weight: 700;
}

.wizard-model-card-desc li:last-child {
  margin-bottom: 0;
}

.wizard-model-card-sublist {
  margin: 4px 0 0;
  padding-left: 14px;
  list-style: disc;
}

.wizard-model-card-sublist li {
  margin-bottom: 4px;
  font-size: 11px;
  color: var(--text-secondary);
}

.wizard-model-card-sublist li strong {
  color: var(--text-primary);
}

.wizard-load-checklist {
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  background: var(--bg-card);
  padding: 10px;
  margin-bottom: 10px;
}

.wizard-load-checklist h5 {
  margin: 0 0 8px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-secondary);
}

.wizard-load-checklist ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}

.wizard-load-checklist li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
}

.wizard-model-locked {
  opacity: 0.6;
}

.onepager-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.onepager-print-footer .wire {
  background: #fff;
  border-style: solid;
}

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-12);
}

.wire {
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--bg-card-alt);
  min-height: 120px;
  padding: var(--space-16);
}

.wire .label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
}

/* Botao do menu: so aparece no celular (ver @media 860px) */
.menu-toggle {
  display: none;
  min-height: 36px;
  padding: 6px 12px;
  font-size: 13px;
}

.menu-toggle-icon,
.menu-toggle-icon::before,
.menu-toggle-icon::after {
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

.menu-toggle-icon {
  position: relative;
}

.menu-toggle-icon::before,
.menu-toggle-icon::after {
  content: "";
  position: absolute;
  left: 0;
}

.menu-toggle-icon::before { top: -5px; }
.menu-toggle-icon::after { top: 5px; }

.sidebar.menu-open .menu-toggle-icon { background: transparent; }
.sidebar.menu-open .menu-toggle-icon::before { top: 0; transform: rotate(45deg); }
.sidebar.menu-open .menu-toggle-icon::after { top: 0; transform: rotate(-45deg); }

/* Evita que tabelas/linhas largas empurrem a coluna de conteudo para fora da tela */
.main {
  min-width: 0;
}

.content {
  grid-template-columns: minmax(0, 1fr);
}

@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split-3 { grid-template-columns: 1fr; }
  .kpi-grid-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .app-shell {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto 1fr;
  }

  /* Sidebar vira barra fixa no topo; o menu abre como gaveta (app-acessos.js) */
  .sidebar {
    position: sticky;
    top: 0;
    z-index: 50;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: max(10px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) 10px max(14px, env(safe-area-inset-left));
    gap: var(--space-12);
    border-right: 0;
    border-bottom: 1px solid var(--border-subtle);
  }

  .sidebar .logo-block {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    margin-bottom: 0;
    min-width: 0;
  }

  .sidebar .logo-mark {
    font-size: 12px;
    padding: 4px 8px;
  }

  .sidebar .logo-subtitle {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .menu {
    display: none;
    flex-basis: 100%;
    max-height: calc(100dvh - 70px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding-bottom: env(safe-area-inset-bottom);
  }

  .sidebar.menu-open .menu {
    display: flex;
  }

  body.menu-open-lock {
    overflow: hidden;
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .rh-dashboard-topbar .topbar-left h2 {
    font-size: 28px;
  }

  .rh-hero-title {
    font-size: 28px;
  }

  .wizard-model-grid {
    grid-template-columns: 1fr;
  }

  .hero-title {
    font-size: 34px;
  }

  .kpi-grid-6 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .topbar-left h2 {
    font-size: 28px;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .topbar-right {
    width: 100%;
    flex-wrap: wrap;
  }

  .welcome-page {
    padding: 16px;
  }

  .welcome-shell {
    padding: 22px;
    min-height: auto;
  }

  .avatar-fixed {
    position: relative;
    width: 100%;
    max-width: 340px;
    margin: 8px auto 0;
    right: auto;
    bottom: auto;
  }

  .auth-card {
    padding: 24px 20px;
  }

  .auth-card .logo-mark {
    font-size: 40px;
  }

  .auth-card .logo-title {
    font-size: 30px;
  }

  .avatar-corner-mini {
    width: min(54vw, 260px);
    height: 170px;
  }

  .avatar-corner-mini img {
    width: min(24vw, 140px);
  }

  .avatar-culture-copy {
    font-size: 13px;
    left: 12px;
    bottom: 8px;
  }

  .sf-login-card {
    max-width: 96vw;
    padding: 22px 16px 16px;
  }

  .sf-wordmark {
    font-size: clamp(30px, 8vw, 38px);
  }

  .sf-product {
    font-size: clamp(24px, 7vw, 30px);
  }

  .sf-product-sub {
    font-size: clamp(14px, 4.2vw, 18px);
  }

  .sf-label,
  .sf-input,
  .sf-entra-note,
  .sf-login-btn {
    font-size: clamp(14px, 4vw, 16px);
  }
}

/* ---- Fluxo real de avaliação (fluxo.js) ---- */
/* Espaço no fim da página para o balão do assistente não cobrir os botões */
.app-shell .content { padding-bottom: 110px; }
.fx-previa { border-color: rgba(225, 6, 0, 0.35); }
.fx-previa-valor { text-align: right; min-width: 160px; }
.fx-filtros { display: grid; grid-template-columns: minmax(200px, 2fr) repeat(2, minmax(160px, 1fr)) auto; gap: 10px; align-items: end; }
.fx-filtros label { display: grid; gap: 4px; font-size: 12px; font-weight: 700; color: var(--text-secondary); }
.fx-multi-campo { display: grid; gap: 4px; font-size: 12px; font-weight: 700; color: var(--text-secondary); position: relative; }
.fx-multi > summary { list-style: none; cursor: pointer; padding: 10px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--bg-card-alt); color: var(--text-primary); font-weight: 400; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fx-multi > summary::-webkit-details-marker { display: none; }
.fx-multi > summary::after { content: "▾"; float: right; color: var(--text-muted); }
.fx-multi-lista { position: absolute; z-index: 20; left: 0; right: 0; margin-top: 4px; padding: 6px; max-height: 280px; overflow-y: auto; background: var(--bg-card); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); box-shadow: var(--shadow-2); display: grid; gap: 2px; }
.fx-filtros .fx-multi-item, .fx-multi-item { display: flex; grid-template-columns: none; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px; font-weight: 400; font-size: 14px; color: var(--text-primary); cursor: pointer; }
.fx-multi-item:hover { background: var(--bg-card-alt); }
.fx-filtros .fx-multi-item input, .fx-multi-item input { width: 16px; height: 16px; margin: 0; flex: 0 0 auto; }
.fx-multi-limpar { margin-top: 4px; justify-self: start; }
.fx-filtros-info { font-size: 12.5px; color: var(--text-muted); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
@media (max-width: 860px) { .fx-filtros { grid-template-columns: 1fr; } }
.faixa-consulta { border-color: rgba(232, 163, 61, 0.45); color: var(--state-warning); }
.fx-plr-campos { min-width: 220px; }
.fx-plr-campos label { display: grid; gap: 2px; margin-bottom: 6px; }
.fx-distrib .chip { margin: 2px 4px 2px 0; }
.fx-msg { margin: 8px 0 0; min-height: 18px; font-size: 13px; color: var(--text-secondary); }
.fx-msg-ok { color: var(--state-success); }
.fx-msg-erro { color: var(--state-danger); }
.fx-msg-info { color: var(--state-warning); }
.fx-erro { border-color: rgba(194, 59, 59, 0.45); }
.fx-ok { border-color: rgba(59, 167, 118, 0.45); color: var(--state-success); }
.fx-acoes { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.fx-tabela { overflow-x: auto; }
.fx-legenda { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--text-secondary); margin-top: 8px; }
.fx-comp-topo { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.fx-rubrica { font-size: 12.5px; color: var(--text-secondary); border-left: 3px solid var(--brand-primary); padding-left: 10px; }
.fx-auto { margin: 0 0 10px; padding: 8px 10px; border-radius: 8px; background: var(--bg-card-alt); border: 1px solid var(--border-subtle); font-size: 13px; color: var(--text-secondary); }
.fx-scale button { cursor: pointer; }
.fx-scale button:disabled { cursor: default; opacity: 0.75; }
.fx-nao-aplicavel { opacity: 0.6; }
.fx-rodape .actions { flex-wrap: wrap; }
.fx-check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-secondary); margin-top: 10px; }
.fx-check input { width: auto; }
.fx-detalhe td { background: var(--bg-card-alt); }
/* números da tabela de campanhas que abrem o status das avaliações */
.fx-link-num { color: var(--text-primary, inherit); font-weight: 700; text-decoration: underline dotted; text-underline-offset: 3px; cursor: pointer; }
.fx-link-num:hover { color: var(--brand-primary); }
/* linha clicável (status por gestor) e número de atrasos */
.fx-linha-click { cursor: pointer; }
.fx-linha-click:hover td { background: var(--bg-card-alt); }
.fx-atraso { color: var(--brand-primary); }
.fx-detalhe label { display: grid; gap: 4px; margin-top: 10px; }
.fx-cal-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 10px; }
.fx-cal-item { padding: 10px; border: 1px solid var(--border-subtle); border-radius: 10px; background: var(--bg-card); display: grid; gap: 4px; }
.fx-cal-divergente { border-color: rgba(232, 163, 61, 0.7); box-shadow: inset 3px 0 0 var(--state-warning); }
.fx-cal-item select, .fx-detalhe select, .fx-detalhe input[type="number"] { max-width: 260px; }

/* ---- Modo piloto (faixa no topo + tela Acessos de Teste) ---- */
.faixa-piloto {
  padding: 8px max(16px, env(safe-area-inset-right)) 8px max(16px, env(safe-area-inset-left));
  background: rgba(232, 163, 61, 0.16);
  border-bottom: 1px solid rgba(232, 163, 61, 0.45);
  color: var(--state-warning);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.faixa-piloto-teste {
  background: repeating-linear-gradient(135deg, rgba(232, 163, 61, 0.22) 0 14px, rgba(232, 163, 61, 0.12) 14px 28px);
}

.piloto-msg {
  margin: 10px 0 0;
  min-height: 18px;
  font-size: 13px;
  color: var(--state-success);
}

.piloto-msg-erro {
  color: var(--state-danger);
}

.piloto-aviso {
  margin: 10px 0 0;
  padding: 10px 12px;
  border: 1px solid rgba(232, 163, 61, 0.45);
  border-radius: 10px;
  background: rgba(232, 163, 61, 0.12);
  color: var(--state-warning);
  font-size: 13px;
}

.piloto-aviso[hidden] {
  display: none;
}

.piloto-busca {
  position: relative;
  margin: 12px 0 14px;
}

.piloto-resultados {
  display: grid;
  gap: 6px;
  margin-top: 6px;
}

.piloto-resultado {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 12px;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  background: var(--bg-card-alt);
}

.piloto-resultado-acoes {
  display: flex;
  gap: 8px;
  align-items: center;
}

.piloto-resultado-acoes select,
.piloto-tabela select {
  width: auto;
  min-width: 140px;
  padding: 6px 8px;
}

.piloto-tabela {
  overflow-x: auto;
}

.piloto-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
  gap: 10px;
  margin: 12px 0 16px;
}

.piloto-form label {
  display: grid;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
}

.piloto-form-acoes {
  display: flex;
  align-items: flex-end;
}

.piloto-encerrar {
  border-color: rgba(194, 59, 59, 0.45);
}

.piloto-encerrar-acoes {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.piloto-encerrar-acoes input {
  max-width: 260px;
}

/* ---- Assistente / chatbot (app-acessos.js: wireAssistente) ---- */
.assistente-fab {
  position: fixed;
  right: max(22px, env(safe-area-inset-right));
  bottom: max(22px, env(safe-area-inset-bottom));
  z-index: 60;
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #1c1c1f 0%, var(--brand-primary) 100%);
  color: #fff;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.55);
  cursor: pointer;
  transition: transform 0.2s ease;
}

.assistente-fab:hover {
  transform: scale(1.06);
}

.assistente-fab svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

.assistente-fab svg circle {
  fill: var(--brand-primary);
}

.assistente-online,
.assistente-online-mini {
  border-radius: 50%;
  background: var(--state-success);
}

.assistente-online {
  position: absolute;
  right: 3px;
  bottom: 3px;
  width: 13px;
  height: 13px;
  border: 2px solid var(--bg-page);
}

.assistente-online-mini {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  vertical-align: 1px;
}

/* Na tela principal o avatar decorativo ocupa o canto inferior direito */
body:has(.avatar-corner-mini) .assistente-fab {
  bottom: 236px;
}

.assistente-fab[hidden],
.assistente-saudacao[hidden],
.assistente-painel[hidden] {
  display: none;
}

/* Balao "Ola! Posso ajudar?" ao lado do botao */
.assistente-saudacao {
  position: fixed;
  right: calc(max(22px, env(safe-area-inset-right)) + 72px);
  bottom: calc(max(22px, env(safe-area-inset-bottom)) + 8px);
  z-index: 60;
  display: flex;
  align-items: flex-start;
  gap: 4px;
  max-width: 250px;
  padding: 10px 6px 10px 14px;
  background: var(--bg-card-alt);
  border: 1px solid var(--border-strong);
  border-radius: 14px 14px 4px 14px;
  box-shadow: var(--shadow-2);
  animation: assistente-surgir 0.25s ease-out;
}

body:has(.avatar-corner-mini) .assistente-saudacao {
  bottom: 244px;
}

.assistente-saudacao-texto {
  border: 0;
  background: none;
  padding: 0;
  color: var(--text-primary);
  font: inherit;
  font-size: 13.5px;
  line-height: 1.4;
  text-align: left;
  cursor: pointer;
}

.assistente-saudacao-fechar {
  border: 0;
  background: none;
  color: var(--text-muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}

@keyframes assistente-surgir {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

@keyframes assistente-subir {
  from { transform: translateY(100%); }
  to { transform: none; }
}

/* Janela de chat */
.assistente-painel {
  position: fixed;
  right: max(22px, env(safe-area-inset-right));
  bottom: max(22px, env(safe-area-inset-bottom));
  z-index: 60;
  width: min(370px, calc(100vw - 32px));
  height: min(560px, calc(100dvh - 44px));
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  animation: assistente-surgir 0.2s ease-out;
}

.assistente-topo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 10px 12px 14px;
  background: linear-gradient(135deg, #0b0b0c 0%, #3a0f12 100%);
  border-bottom: 1px solid var(--border-subtle);
}

.assistente-avatar {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--brand-primary);
  color: #fff;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
}

.assistente-identidade {
  flex: 1;
  min-width: 0;
}

.assistente-titulo {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

.assistente-status {
  font-size: 11.5px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.assistente-icone-btn {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
}

.assistente-icone-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.assistente-icone-btn svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}

.assistente-fechar {
  font-size: 24px;
  line-height: 1;
}

.assistente-mensagens {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.assistente-msg {
  max-width: 85%;
  padding: 9px 12px;
  font-size: 14px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.assistente-msg p {
  margin: 0 0 6px;
}

.assistente-msg p:last-child {
  margin-bottom: 0;
}

.assistente-msg ul {
  margin: 4px 0 6px;
  padding-left: 18px;
}

.assistente-msg-user {
  align-self: flex-end;
  background: var(--brand-primary);
  color: #fff;
  border-radius: 16px 16px 4px 16px;
  white-space: pre-wrap;
}

.assistente-msg-assistant {
  align-self: flex-start;
  background: var(--bg-card-alt);
  border: 1px solid var(--border-subtle);
  border-radius: 16px 16px 16px 4px;
  color: var(--text-primary);
}

/* "Digitando..." com tres pontinhos */
.assistente-digitando {
  display: inline-flex;
  gap: 4px;
  padding: 12px 14px;
}

.assistente-digitando span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-muted);
  animation: assistente-pulo 1.2s infinite ease-in-out;
}

.assistente-digitando span:nth-child(2) { animation-delay: 0.15s; }
.assistente-digitando span:nth-child(3) { animation-delay: 0.3s; }

@keyframes assistente-pulo {
  0%, 60%, 100% { transform: none; opacity: 0.5; }
  30% { transform: translateY(-4px); opacity: 1; }
}

.assistente-erro {
  border-color: rgba(194, 59, 59, 0.45);
  color: var(--state-danger);
}

.assistente-sugestoes {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding-left: 2px;
}

.assistente-sugestoes .pill {
  padding: 6px 12px;
  border-color: rgba(225, 6, 0, 0.45);
  background: transparent;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.assistente-sugestoes .pill:hover {
  background: rgba(225, 6, 0, 0.16);
}

/* Campo de mensagem estilo app de conversa */
.assistente-form {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin: 0 10px;
  padding: 6px 6px 6px 14px;
  background: var(--bg-card-alt);
  border: 1px solid var(--border-strong);
  border-radius: 22px;
}

.assistente-form:focus-within {
  border-color: rgba(225, 6, 0, 0.6);
}

.assistente-form textarea {
  flex: 1;
  min-height: 32px;
  max-height: 120px;
  padding: 7px 0;
  border: 0;
  background: transparent;
  font-family: var(--font-primary);
  line-height: 1.3;
  resize: none;
  outline: none;
}

.assistente-enviar {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: var(--brand-primary);
  color: #fff;
  cursor: pointer;
}

.assistente-enviar svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.assistente-enviar:disabled {
  opacity: 0.5;
  cursor: wait;
}

.assistente-aviso {
  margin: 0;
  padding: 6px 14px 10px;
  font-size: 10.5px;
  color: var(--text-muted);
  text-align: center;
}

/* ---- Celular (Android / iPhone) ---- */
@media (max-width: 640px) {
  .topbar {
    padding: 12px max(14px, env(safe-area-inset-right)) 12px max(14px, env(safe-area-inset-left));
  }

  .topbar-left h2,
  .rh-dashboard-topbar .topbar-left h2 {
    font-size: 22px;
  }

  .topbar-left p {
    font-size: 11px;
    letter-spacing: 0.04em;
  }

  .topbar-right .btn,
  .onepager-actions .btn {
    flex: 1 1 auto;
  }

  .btn {
    white-space: normal;
    text-align: center;
  }

  .content {
    padding: 12px max(12px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
    gap: 12px;
  }

  .workflow-strip {
    margin: 12px 12px 0;
  }

  .workflow-steps {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
  }

  .workflow-steps::-webkit-scrollbar { display: none; }
  .workflow-step { flex: 0 0 auto; }

  .card { padding: 14px; }
  .hero-card { padding: 16px; border-radius: 16px; }
  .hero-title, .rh-hero-title { font-size: 24px; }
  .hero-subtitle { font-size: 14px; }
  .kpi-value { font-size: 30px; }
  .kpi-compact .kpi-value { font-size: 26px; }
  .kpi-status-text { font-size: 20px; }
  .rh-context-value { font-size: 17px; }
  .kpi-grid-6 { gap: 8px; }

  /* Titulos com fonte fixa inline (34-42px) nas paginas */
  h3[style*="font-size:3"],
  h3[style*="font-size:4"] {
    font-size: 24px !important;
  }

  .section-title,
  .wizard-model-heading,
  .kpi-inline {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .header-controls,
  .actions,
  .wizard-navigation,
  .filters-row {
    flex-wrap: wrap;
  }

  .actions .btn,
  .wizard-navigation .btn {
    flex: 1 1 auto;
  }

  .filters-row > *,
  .filters-row input[type="file"] {
    max-width: 100%;
  }

  .context-control {
    width: 100%;
  }

  .context-control select {
    flex: 1;
    min-width: 0;
  }

  /* Grades inline das paginas (formularios de 2 colunas) viram 1 coluna */
  [style*="grid-column: span 2"] {
    grid-column: auto !important;
  }

  [style*="grid-template-columns: repeat(2"],
  [style*="grid-template-columns: minmax(0,1fr) minmax(150px"] {
    grid-template-columns: 1fr !important;
  }

  [style*="max-width:220px"],
  [style*="max-width:170px"] {
    max-width: 100% !important;
  }

  /* Tabelas: rolagem lateral so dentro da tabela */
  .table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    font-size: 13px;
  }

  .table th {
    white-space: nowrap;
  }

  .table th,
  .table td {
    padding: 8px;
  }

  .wire { min-height: 80px; }

  .welcome-shell { padding: 18px; border-radius: 18px; }
  .welcome-content .h1, .h1 { font-size: 28px; }

  /* Avatar decorativo fixo cobre o conteudo em tela pequena */
  .avatar-corner-mini { display: none; }

  [data-action="voltar-menu-fixo"] {
    top: max(10px, env(safe-area-inset-top)) !important;
    right: max(10px, env(safe-area-inset-right)) !important;
  }

  .sf-login-page,
  .login-page {
    padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
  }

  /* Assistente: balao no canto e conversa como gaveta que sobe de baixo */
  .assistente-fab,
  body:has(.avatar-corner-mini) .assistente-fab {
    right: max(14px, env(safe-area-inset-right));
    bottom: max(14px, env(safe-area-inset-bottom));
    width: 56px;
    height: 56px;
  }

  .assistente-saudacao,
  body:has(.avatar-corner-mini) .assistente-saudacao {
    right: calc(max(14px, env(safe-area-inset-right)) + 66px);
    bottom: calc(max(14px, env(safe-area-inset-bottom)) + 6px);
    max-width: calc(100vw - 100px);
  }

  .assistente-painel {
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 82dvh;
    border-radius: 20px 20px 0 0;
    border-bottom: 0;
    padding-bottom: env(safe-area-inset-bottom);
    animation: assistente-subir 0.25s ease-out;
  }

  .assistente-topo {
    position: relative;
    padding-top: 16px;
  }

  .assistente-topo::before {
    content: "";
    position: absolute;
    top: 6px;
    left: 50%;
    width: 36px;
    height: 4px;
    margin-left: -18px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.25);
  }

  /* Escurece a tela atras da gaveta */
  body.assistente-aberto::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 59;
    background: rgba(0, 0, 0, 0.5);
  }

  body.assistente-aberto {
    overflow: hidden;
  }

  .assistente-msg {
    max-width: 88%;
  }
}

/* Telas de toque: alvos maiores, sem "hover" preso apos o toque */
@media (pointer: coarse) {
  .btn, .pill, .menu-toggle { min-height: 40px; }
  .menu a { padding: 12px; }
  .scale button { min-height: 44px; }
  /* iOS da zoom automatico em campos com fonte < 16px ao focar */
  input, select, textarea { font-size: 16px !important; }
  .btn-primary:hover { filter: none; }
}

@media print {
  .menu-toggle,
  .assistente-fab,
  .assistente-saudacao,
  .assistente-painel { display: none !important; }

  @page {
    size: A4;
    margin: 10mm;
  }

  .onepager-page {
    background: #fff;
    font-size: 12px;
    color: #111;
  }

  .onepager-page .sidebar,
  .onepager-page .onepager-actions,
  .onepager-page .menu-home-link,
  .onepager-page .topbar .btn {
    display: none !important;
  }

  .onepager-page .app-shell {
    display: block;
  }

  .onepager-page .main {
    width: 100%;
  }

  .onepager-page .topbar {
    padding: 0 0 8px;
    margin-bottom: 6px;
    border-bottom: 1px solid #ccc;
  }

  .onepager-page .topbar p {
    margin-bottom: 0;
  }

  .onepager-page .topbar,
  .onepager-page .card,
  .onepager-page .hero-card {
    background: #fff !important;
    box-shadow: none !important;
    border-color: #ddd !important;
  }

  .onepager-page h1,
  .onepager-page h2,
  .onepager-page h3,
  .onepager-page h4,
  .onepager-page p,
  .onepager-page span,
  .onepager-page td,
  .onepager-page th,
  .onepager-page li {
    color: #111 !important;
  }

  .onepager-page .content {
    gap: 8px;
    padding: 8px 0;
  }

  .onepager-page .grid-4,
  .onepager-page .grid-3,
  .onepager-page .grid-2 {
    gap: 6px;
  }

  .onepager-page .kpi-value {
    font-size: 24px;
  }

  .onepager-page .onepager-meta {
    color: #444;
    font-size: 11px;
    margin-top: 6px;
  }

  .onepager-page .onepager-print-footer {
    page-break-inside: avoid;
  }

  .onepager-page .onepager-print-footer .wire {
    min-height: 54px !important;
  }
}

/* ---- Impressão / PDF das telas do fluxo (avaliações e resultado) ---- */
@media print {
  .fx-imprimivel { background: #fff !important; color: #111 !important; }
  .fx-imprimivel .sidebar,
  .fx-imprimivel .topbar-right,
  .fx-imprimivel .faixa-piloto,
  .fx-imprimivel .fx-nao-imprimir,
  .fx-imprimivel .fx-rodape,
  .fx-imprimivel .hero-actions,
  .fx-imprimivel .assistente-fab,
  .fx-imprimivel .assistente-saudacao,
  .fx-imprimivel .assistente-painel { display: none !important; }
  .fx-imprimivel .app-shell { display: block; background: #fff !important; }
  .fx-imprimivel .main, .fx-imprimivel .content, .fx-imprimivel .fx-nao-aplicavel { background: #fff !important; }
  .fx-imprimivel .fx-nao-aplicavel { opacity: 1; }
  .fx-imprimivel .topbar,
  .fx-imprimivel .card,
  .fx-imprimivel .competency,
  .fx-imprimivel .hero-card { background: #fff !important; box-shadow: none !important; border: 1px solid #ccc !important; break-inside: avoid; }
  .fx-imprimivel .content { padding: 8px 0 !important; gap: 10px; }
  .fx-imprimivel h2, .fx-imprimivel h3, .fx-imprimivel h4, .fx-imprimivel p, .fx-imprimivel td, .fx-imprimivel th,
  .fx-imprimivel li, .fx-imprimivel span, .fx-imprimivel strong, .fx-imprimivel div, .fx-imprimivel label { color: #111 !important; }
  .fx-imprimivel .scale button { background: #fff !important; color: #555 !important; border: 1px solid #bbb !important; }
  .fx-imprimivel .scale button.active { background: #111 !important; color: #fff !important; border-color: #111 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .fx-imprimivel textarea { background: #fff !important; color: #111 !important; border: 1px solid #ccc !important; resize: none; overflow: visible; height: auto; }
  .fx-imprimivel .chip { border: 1px solid #999; background: #fff !important; }
}

/* Notificações por e-mail */
.fx-kpis-email { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.fx-lembretes { grid-template-columns: minmax(220px, 2fr) repeat(3, auto); }
.fx-previa-email { width: 100%; height: 560px; border: 1px solid var(--border-strong); border-radius: 8px; background: #f2f2f3; }
.fx-acoes { white-space: nowrap; }
@media (max-width: 860px) {
  .fx-kpis-email { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fx-lembretes { grid-template-columns: 1fr; }
  .fx-previa-email { height: 460px; }
}

/* Validação CE: divisão por área e faixa do múltiplo */
.fx-montante { margin: 4px 0 12px; }
.fx-montante-linha { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.fx-montante-linha input { max-width: 240px; }
.fx-kpis-divisao { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.fx-montante-area { white-space: nowrap; }
.fx-montante-area input { max-width: 150px; display: inline-block; }
.fx-negativo { color: var(--state-danger); font-weight: 700; }
.fx-msg-aviso { color: var(--state-warning); }
.fx-sugestao { margin: 4px 0 0; }
.fx-link { background: none; border: 0; padding: 0; color: var(--brand-primary); text-decoration: underline; cursor: pointer; font: inherit; }
@media (max-width: 860px) { .fx-kpis-divisao { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.fx-kpis-divisao .kpi-value { font-size: clamp(18px, 1.9vw, 28px); white-space: nowrap; }
.fx-filtros.fx-filtros-gestor { grid-template-columns: minmax(200px, 2fr) repeat(3, minmax(150px, 1fr)) auto; }
@media (max-width: 860px) { .fx-filtros.fx-filtros-gestor { grid-template-columns: 1fr; } }

/* Participantes: incluir pessoa e editar campanha */
.fx-painel { margin: 12px 0; }
.fx-painel input[type="search"], .fx-painel #fxEdNome { max-width: 520px; margin-bottom: 10px; }
.fx-datas-edicao { display: grid; grid-template-columns: repeat(2, minmax(200px, 1fr)); gap: 10px 16px; margin: 10px 0; max-width: 620px; }
.fx-datas-edicao label { display: grid; gap: 4px; font-size: 12px; font-weight: 700; color: var(--text-secondary); }
@media (max-width: 860px) { .fx-datas-edicao { grid-template-columns: 1fr; } }

/* Menu "Ações" das campanhas */
.fx-acoes { align-items: center; flex-wrap: nowrap; }
.fx-menu { position: relative; display: inline-block; }
.fx-menu > summary { list-style: none; cursor: pointer; white-space: nowrap; }
.fx-menu > summary::-webkit-details-marker { display: none; }
.fx-menu-lista { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 230px; display: grid; padding: 6px; background: var(--bg-card-alt); border: 1px solid var(--border-strong); border-radius: 10px; box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45); }
.fx-menu-item { display: grid; gap: 2px; padding: 9px 12px; border-radius: 7px; color: var(--text-primary); text-decoration: none; font: inherit; font-size: 14px; font-weight: 600; text-align: left; background: none; border: 0; cursor: pointer; white-space: nowrap; }
.fx-menu-item:hover { background: rgba(255, 255, 255, 0.06); }
.fx-menu-item small { font-size: 12px; font-weight: 400; color: var(--text-muted); }
.fx-menu-off { color: var(--text-muted); cursor: not-allowed; }
.fx-menu-off:hover { background: none; }
.fx-menu-perigo { color: var(--state-danger); }
.fx-menu-sep { height: 1px; margin: 4px 6px; background: var(--border-strong); }

/* Botões logo abaixo de quadros/textos não ficam grudados */
.grid-3 + .hero-actions, .grid-4 + .hero-actions, p + .hero-actions, .fx-tabela + .hero-actions { margin-top: 14px; }
/* Tabelas largas rolam dentro do quadro, não a página inteira */
.fx-tabela-larga { max-width: 100%; }
.fx-tabela-larga td, .fx-tabela-larga th { white-space: nowrap; }

/* Lista de campanhas no celular: cada campanha vira um cartão */
@media (max-width: 860px) {
  .fx-tabela-cartoes thead { display: none; }
  .fx-tabela-cartoes, .fx-tabela-cartoes tbody { display: block; width: 100%; }
  .fx-tabela-cartoes tr { display: block; padding: 12px 0; border-bottom: 1px solid var(--border-strong); }
  .fx-tabela-cartoes td { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 4px 0; border: 0; }
  .fx-tabela-cartoes td[data-rotulo]::before { content: attr(data-rotulo); color: var(--text-muted); font-size: 12px; }
  .fx-tabela-cartoes .fx-cartao-titulo { display: block; padding-bottom: 6px; }
  .fx-tabela-cartoes .fx-cartao-acoes { padding-top: 8px; }
  .fx-tabela-cartoes .fx-cartao-acoes .fx-acoes { width: 100%; justify-content: flex-start; flex-wrap: wrap; }
}

/* Seções recolhíveis (+ / −), como no SFFinance */
.fx-recolhivel-titulo { display: flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.fx-recolher-botao { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 7px; border: 1px solid var(--border-strong); background: var(--bg-card-alt); color: var(--text-primary); font-weight: 700; font-size: 16px; line-height: 1; padding: 0; cursor: pointer; }
.fx-recolher-botao:hover { border-color: var(--brand-primary); }
.card.fx-recolhivel.fx-recolhido > :not(.fx-recolhivel-cab) { display: none !important; }
.card.fx-recolhivel.fx-recolhido { padding-bottom: 14px; }
.card.fx-recolhivel.fx-recolhido .fx-recolhivel-cab, .card.fx-recolhivel.fx-recolhido h3.fx-recolhivel-cab { margin-bottom: 0; }
.card.fx-recolhivel.fx-recolhido .fx-recolhivel-cab .btn { display: none; }

/* Visão geral (painel real) */
.fx-painel-seletor { display: grid; gap: 6px; }
.fx-painel-seletor select { max-width: 560px; }
.fx-etapas { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 16px 0 0; }
.fx-etapa { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; font-size: 13px; font-weight: 600; border: 1px solid var(--border-strong); color: var(--text-muted); }
.fx-etapa-marca { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--bg-card-alt); font-size: 12px; }
.fx-etapa-feita { color: var(--text-secondary); }
.fx-etapa-feita .fx-etapa-marca { background: rgba(59, 167, 118, 0.25); color: var(--state-success); }
.fx-etapa-atual { color: var(--text-primary); border-color: var(--brand-primary); background: rgba(225, 6, 0, 0.12); }
.fx-etapa-atual .fx-etapa-marca { background: var(--brand-primary); color: #fff; }
.fx-tiles .kpi-value small { font-size: 0.5em; color: var(--text-muted); margin-left: 2px; }
.fx-tile-alerta { border-color: rgba(194, 59, 59, 0.55); }
.fx-tile-alerta .kpi-value { color: var(--state-danger); }
.fx-progressos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.fx-progresso-topo { display: flex; justify-content: space-between; font-size: 13px; color: var(--text-secondary); margin-bottom: 6px; }
.fx-progresso-topo strong { color: var(--text-primary); }
.fx-progresso-trilho, .fx-mini-trilho { height: 10px; border-radius: 6px; background: var(--bg-card-alt); overflow: hidden; }
.fx-progresso-barra { height: 100%; border-radius: 6px; background: var(--brand-primary); min-width: 0; }
.fx-progresso-rodape { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.fx-mini { display: flex; align-items: center; gap: 8px; min-width: 120px; }
.fx-mini .fx-mini-trilho { flex: 1; height: 6px; }
.fx-mini span { font-size: 12px; color: var(--text-secondary); min-width: 34px; text-align: right; }
.fx-distrib-barra { display: flex; gap: 2px; height: 22px; border-radius: 6px; overflow: hidden; margin: 10px 0 12px; }
.fx-distrib-seg { min-width: 6px; }
.fx-distrib-legenda { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 0; margin: 0; font-size: 13px; color: var(--text-primary); }
.fx-distrib-legenda li { display: inline-flex; align-items: center; gap: 6px; }
.fx-distrib-cor { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.fx-painel-duas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.fx-painel-duas > .card { margin: 0; }
@media (max-width: 1100px) { .fx-progressos { grid-template-columns: repeat(2, minmax(0, 1fr)); } .fx-painel-duas { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .fx-progressos { grid-template-columns: 1fr; } }
.fx-tiles, .fx-painel-duas { margin-bottom: 16px; }
.fx-tiles { margin-top: 0; }

/* Medidores circulares do painel */
.fx-medidores { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.fx-medidor { display: grid; justify-items: center; gap: 6px; padding: 14px 10px; margin: 0; text-align: center; }
.fx-medidor-rotulo { font-size: 13px; font-weight: 600; color: var(--text-secondary); justify-self: start; }
.fx-medidor-svg { width: 92px; height: 92px; }
.fx-medidor-trilho { fill: none; stroke: var(--bg-card-alt); stroke-width: 9; }
.fx-medidor-arco { fill: none; stroke: var(--brand-primary); stroke-width: 9; stroke-linecap: round; }
.fx-medidor-alerta { stroke: var(--state-warning); }
.fx-medidor-valor { fill: var(--text-primary); font-size: 17px; font-weight: 700; font-family: inherit; }
.fx-medidor-sub { font-size: 12px; color: var(--text-muted); }
.fx-tile-destaque .kpi-value { color: var(--text-primary); }
@media (max-width: 1100px) { .fx-medidores { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 600px) { .fx-medidores { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.fx-medidor-trilho { stroke: rgba(255, 255, 255, 0.09); }

/* Relatórios */
.fx-hbarras { display: grid; gap: 10px; }
.fx-hbarra { display: grid; grid-template-columns: minmax(120px, 1fr) 2fr 52px; gap: 10px; align-items: center; font-size: 13px; }
.fx-hbarra strong { text-align: right; }
.fx-area-dist { margin-bottom: 10px; }
.fx-area-dist-topo { display: flex; justify-content: space-between; font-size: 13px; }
.fx-area-dist .fx-distrib-barra { height: 14px; margin: 4px 0 0; }
.fx-dist-celula { min-width: 160px; }
.fx-dist-celula .fx-distrib-barra { height: 12px; margin: 0; }
.fx-historico { display: flex; gap: 14px; align-items: flex-end; overflow-x: auto; padding-top: 6px; }
.fx-hist-col { display: grid; justify-items: center; gap: 6px; min-width: 110px; text-align: center; font-size: 13px; }
.fx-hist-trilho { width: 36px; height: 140px; border-radius: 6px; background: rgba(255, 255, 255, 0.06); display: flex; align-items: flex-end; overflow: hidden; }
.fx-hist-barra { width: 100%; background: var(--text-muted); border-radius: 6px 6px 0 0; }
.fx-hist-atual .fx-hist-barra { background: var(--brand-primary); }
.fx-hist-rotulo { font-size: 12px; color: var(--text-secondary); max-width: 130px; }
.fx-op-nav { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.fx-op-nav select { max-width: 360px; }
.fx-onepager h4 { margin: 18px 0 8px; }
.fx-op-pront { font-size: 0.55em; line-height: 1.2; display: inline-block; }
.fx-op-alerta { padding: 8px 12px; border-radius: 8px; background: rgba(232, 163, 61, 0.12); color: var(--state-warning); }
.fx-op-rubrica { margin: 0; padding-left: 20px; line-height: 1.6; }
.fx-op-assinaturas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 36px; }
.fx-op-assinaturas div { display: grid; gap: 6px; text-align: center; font-size: 12px; color: var(--text-muted); }
.fx-op-assinaturas span { border-top: 1px solid var(--border-strong); height: 1px; }
.fx-op-rodape { margin-top: 18px; }
@media print {
  .fx-op-controles, .fx-painel-seletor, #fxCampanha { display: none !important; }
  .fx-onepager { border: 0; box-shadow: none; }
}
.fx-kpi-longo { font-size: clamp(22px, 2vw, 32px) !important; white-space: nowrap; }

/* Botão Lembrar (Equipe) */
.fx-equipe-acao { white-space: nowrap; }
.fx-lembrete-info { display: block; margin-top: 4px; font-size: 12px; white-space: normal; max-width: 260px; }
.fx-prazo { display: block; margin-top: 4px; font-size: 12px; }
.fx-prazo-proximo { color: var(--state-warning); }
.fx-prazo-vencido { color: var(--state-danger); }

/* Admin pré-visualizando outro perfil */
.faixa-visualizacao { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 8px 18px; background: rgba(76, 132, 255, 0.16); border-bottom: 1px solid rgba(76, 132, 255, 0.45); color: #cfe0ff; font-size: 13px; }
.faixa-visualizacao .btn { padding: 4px 12px; font-size: 12px; }

/* Meu Painel (jornada) */
.fx-jornada .hero-actions { margin-top: 16px; }
.fx-tile-cab { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.fx-progresso-grande { height: 12px; margin: 8px 0 10px; }
.fx-aviso-ciencia { border-color: rgba(232, 163, 61, 0.5); color: var(--text-primary); }
.fx-aviso-ciencia a { color: var(--state-warning); font-weight: 700; }
.fx-radar { width: 100%; max-width: 520px; display: block; margin: 6px auto 0; }
.fx-radar-grade { fill: none; stroke: rgba(255, 255, 255, 0.08); stroke-width: 1; }
.fx-radar-eixo { stroke: rgba(255, 255, 255, 0.10); stroke-width: 1; }
.fx-radar-rotulo { fill: var(--text-secondary); font-size: 10px; font-family: inherit; }
.fx-radar-auto, .fx-radar-gestor { stroke-width: 2; fill-opacity: 0.16; }
.fx-radar-auto { stroke-dasharray: 5 4; }
.fx-radar circle { stroke: var(--bg-card); stroke-width: 2; }
.fx-radar-legenda { list-style: none; display: flex; justify-content: center; gap: 18px; padding: 0; margin: 6px 0 0; font-size: 13px; color: var(--text-primary); }
.fx-radar-legenda span { display: inline-block; width: 14px; height: 4px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.fx-radar-vazio { height: 220px; border-radius: 10px; display: grid; place-items: center; color: var(--text-muted); font-size: 13px; background: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0 12px, rgba(255, 255, 255, 0.06) 12px 24px); margin: 6px 0 10px; }
.fx-medidores-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 6px 0 16px; }
.fx-secao-titulo { margin: 22px 0 10px; }
@media (max-width: 600px) { .fx-medidores-3 { grid-template-columns: 1fr; } }

/* Sem "piscar" o conteúdo de demonstração antes dos dados reais. Se o
   script falhar, a página aparece sozinha depois de 6 s. */
@keyframes fxRevelar { to { visibility: visible; } }
body.fx-carregando .content > *, body.fx-carregando .topbar-left, body.fx-carregando .topbar-right > :not([data-action="voltar-menu"]) { visibility: hidden; animation: fxRevelar 0s 6s forwards; }
body.fx-carregando .content::before { content: "Carregando..."; display: block; padding: 18px 0; color: var(--text-muted); font-size: 14px; }

/* Campanhas: workflow e sem conteúdo de demonstração antes dos dados */
body:not(.fx-campanhas-prontas) #view-andamento > *, body:not(.fx-campanhas-prontas) #view-encerradas > * { visibility: hidden; animation: fxRevelar 0s 6s forwards; }
.fx-trilha { display: flex; gap: 3px; margin-top: 6px; }
.fx-trilha-passo { width: 14px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, 0.12); }
.fx-trilha-passo.feita { background: var(--state-success); }
.fx-trilha-passo.atual { background: var(--brand-primary); }
.fx-workflow-titulo { margin: 0; font-size: 13px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.06em; }

/* Feedback do gestor */
.fx-rel-extra { margin-top: 12px; }

/* Enquadramento (steps) e impacto na folha */
.fx-steps { margin: 10px 0; display: grid; gap: 4px; }
.fx-steps select { max-width: 520px; }
.fx-plr-campos + td .fx-steps, td .fx-steps { margin-top: 8px; }
#fxFolha h4 { margin: 16px 0 8px; }

/* Tabela salarial */
.fx-ts-filtros { grid-template-columns: repeat(2, minmax(150px, 220px)) auto; }
.fx-ts-salario { max-width: 160px; }
.fx-ts-importar { margin-top: 16px; }

/* Trava TS na Validação CE */
.fx-trava { margin-top: 6px; }
.fx-trava summary { cursor: pointer; list-style: none; }
.fx-trava summary::-webkit-details-marker { display: none; }
.fx-trava ul { margin: 6px 0 0; padding-left: 18px; font-size: 12px; }
.fx-trava li { margin-bottom: 3px; }
.fx-trava-aviso { margin: 0 0 10px; }

/* Performance (SFFinance) na Validação CE */
.fx-perf-filtros { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-end; margin: 8px 0 6px; }
.fx-perf-filtros label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--text-secondary); min-width: 160px; }
.fx-perf-faixa { display: flex; flex-direction: column; gap: 4px; }
.fx-perf-faixa > div { display: flex; gap: 6px; }
.fx-perf-faixa input { width: 64px; }
.fx-perf-acoes { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.fx-perf-tabela .fx-num { text-align: right; white-space: nowrap; }
.fx-perf-ordenar { cursor: pointer; user-select: none; }
.fx-perf-cat { cursor: pointer; background: var(--bg-card-alt); }
.fx-perf-seta { color: var(--brand-primary); display: inline-block; width: 12px; }
.fx-perf-prof { cursor: pointer; }
.fx-perf-prof td:first-child { padding-left: 28px; }
.fx-perf-prof:hover { background: rgba(255, 255, 255, 0.03); }
.fx-perf-total td { border-top: 1px solid var(--border-strong); }
.fx-tag { display: inline-block; font-size: 11px; color: var(--text-muted); border: 1px solid var(--border-strong); border-radius: 4px; padding: 0 5px; margin-left: 4px; }
.fx-perf-ok { color: var(--state-success); }
.fx-perf-abaixo { color: var(--state-warning); }
.fx-perf-sem { margin-top: 8px; }
.fx-ce-nome { background: none; border: 0; padding: 0; color: inherit; font: inherit; text-align: left; cursor: default; }
.fx-ce-nome.fx-perf-link { cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; }
.fx-modal-fundo { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.6); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 20px; }
.fx-modal { position: relative; background: var(--bg-card); border: 1px solid var(--border-strong); border-radius: var(--radius-md); padding: 22px; width: min(620px, 100%); max-height: 90vh; overflow: auto; }
.fx-modal-fechar { position: absolute; top: 10px; right: 12px; background: none; border: 0; color: var(--text-primary); font-size: 22px; cursor: pointer; }
.fx-perf-cab { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.fx-perf-cab h3 { margin: 0; }
.fx-perf-cab p { margin: 2px 0 0; }
.fx-perf-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--brand-primary); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; flex: none; }
.fx-perf-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.fx-perf-tile { border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 10px 12px; }
.fx-perf-tile-rotulo { font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
.fx-perf-tile-valor { font-family: var(--font-display); font-size: 22px; font-weight: 700; margin: 4px 0 2px; }
.fx-perf-tile-valor small { font-size: 12px; margin-left: 2px; font-weight: 600; }
.fx-perf-tile-rodape { font-size: 11px; color: var(--text-muted); }
.fx-perf-tile-rodape.fx-perf-abaixo { color: var(--state-warning); }
.fx-perf-tile-rodape.fx-perf-ok { color: var(--state-success); }
.fx-perf-aval { margin: 0 0 10px; }
.fx-perf-modal h4 { margin: 6px 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em; }
@media (max-width: 640px) { .fx-perf-tiles { grid-template-columns: repeat(2, 1fr); } }
.fx-perf-filtros label.fx-check { flex-direction: row; align-items: center; min-width: 0; gap: 6px; }
.fx-perf-tabela td.fx-perf-ok { color: var(--state-success); }
.fx-perf-tabela td.fx-perf-abaixo { color: var(--state-warning); }

/* Logotipo novo (wordmark vermelho, fundo transparente) */
.logo-mark:has(img), .sidebar .logo-mark:has(img), .auth-card .logo-mark:has(img) { background: none; padding: 0; border-radius: 0; line-height: 0; }
.logo-mark img { display: block; width: 100%; max-width: 230px; height: auto; }
.sidebar .logo-mark img { max-width: 200px; }
.sf-wordmark img { display: block; width: 260px; max-width: 100%; height: auto; }

/* Logotipo só no PDF / impressão, no canto superior esquerdo */
.sf-logo-impressao { display: none; }
@media print {
  .sf-logo-impressao { display: block !important; width: 170px; height: auto; margin: 0 0 10px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Utilização faturável na tabela de pessoas da Validação CE */
.fx-ce-util-filtros { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: flex-end; margin: 0 0 12px; }
.fx-ce-util { white-space: nowrap; }
.fx-ce-util .fx-trava { white-space: normal; min-width: 150px; }
.fx-perf-periodo { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--text-secondary); }
.fx-perf-periodo > div { display: flex; gap: 6px; }
.fx-perf-periodo select { width: 74px; }
td .fx-perf-ok, strong.fx-perf-ok { color: var(--state-success); }
td .fx-perf-abaixo, strong.fx-perf-abaixo { color: var(--state-warning); }

/* Fluxo do bônus por área */
.fx-bonus-coment { color: var(--state-warning); }

.fx-perf-periodo > div { align-items: center; }
.fx-perf-periodo select { width: auto; min-width: 64px; }

/* Fluxo do bônus: montante da área, alertas e histórico */
.fx-montante-area { min-width: 230px; white-space: normal; }
.fx-montante-area-linha { display: flex; gap: 6px; align-items: center; }
.fx-montante-area-linha input { width: 130px; max-width: 130px; }
.fx-bonus-alerta { border: 1px solid rgba(207, 74, 44, 0.6); background: rgba(207, 74, 44, 0.12); border-radius: var(--radius-sm); padding: 10px 14px; margin: 0 0 12px; }
.fx-bonus-alerta ul, .fx-bonus-alt ul, .fx-bonus-hist ul { margin: 6px 0 0; padding-left: 18px; font-size: 12px; }
.fx-bonus-alt { margin-top: 6px; }
.fx-bonus-hist { margin-top: 6px; font-size: 12px; }
.fx-bonus-hist summary { cursor: pointer; color: var(--text-secondary); }
.fx-bonus-hist li { margin-bottom: 4px; }

/* Relatório: bloco do gestor e histórico anual */
.fx-rel-gestor { border-left: 3px solid var(--state-warning); }
.fx-rel-horas { margin: 8px 0; }
.fx-rel-just { margin: 6px 0 0; padding-left: 18px; font-size: 13px; }
@media print { .fx-rel-gestor { border-left: 1px solid #ccc !important; } }

.fx-exp-filtros { grid-template-columns: minmax(220px, 420px) auto auto; align-items: end; }

/* Relatório Executivo: barras horizontais (salário e PPR por área) */
.fx-exec-salppr h4 { margin: 18px 0 8px; font-size: 14px; }
.fx-gb-legenda { display: flex; gap: 16px; font-size: 12px; color: var(--text-secondary); margin-bottom: 8px; }
.fx-gb-legenda i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.fx-gb { display: flex; flex-direction: column; gap: 10px; }
.fx-gb-linha { display: grid; grid-template-columns: minmax(120px, 200px) 1fr; gap: 12px; align-items: center; padding: 2px 0; border-radius: 6px; }
.fx-gb-linha:hover { background: rgba(255, 255, 255, 0.03); }
.fx-gb-rotulo { font-size: 13px; color: var(--text-primary); text-align: right; }
.fx-gb-barras { display: flex; flex-direction: column; gap: 2px; padding-right: 150px; }
.fx-gb-trilho { position: relative; height: 14px; display: flex; align-items: center; }
.fx-gb-barra { height: 14px; border-radius: 0 4px 4px 0; }
.fx-gb-ponta { position: absolute; left: calc(100% + 0px); white-space: nowrap; font-size: 12px; color: var(--text-primary); font-variant-numeric: tabular-nums; }
.fx-gb-trilho .fx-gb-ponta { left: auto; margin-left: 8px; position: static; }
.fx-gb-tabela { margin-top: 14px; }
.fx-gb-tabela summary { cursor: pointer; color: var(--text-secondary); font-size: 13px; }
.fx-dica { position: fixed; z-index: 2000; display: none; pointer-events: none; background: #26262a; border: 1px solid var(--border-strong); border-radius: 8px; padding: 8px 10px; font-size: 12px; color: var(--text-primary); max-width: 320px; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4); }
.fx-dica strong { display: block; margin-bottom: 4px; }
.fx-dica span { display: block; color: var(--text-secondary); }
@media print { .fx-gb-barra { -webkit-print-color-adjust: exact; print-color-adjust: exact; } .fx-gb-tabela { display: none; } }
.fx-gb-barra { flex: none; }

/* Colunas verticais agrupadas (Relatório Executivo) */
.fx-gc { display: grid; grid-template-columns: auto 1fr; gap: 8px; height: 280px; margin: 6px 0 4px; }
.fx-gc-eixo { display: flex; flex-direction: column; justify-content: space-between; padding-bottom: 42px; font-size: 11px; color: var(--text-muted); text-align: right; font-variant-numeric: tabular-nums; }
.fx-gc-eixo span { transform: translateY(50%); }
.fx-gc-eixo span:first-child { transform: translateY(0); }
.fx-gc-area { position: relative; }
.fx-gc-grade { position: absolute; inset: 0 0 42px 0; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; }
.fx-gc-grade i { display: block; height: 1px; background: var(--border-subtle); }
.fx-gc-grade i:last-child { background: var(--border-strong); }
.fx-gc-grupos { position: absolute; inset: 0; display: flex; justify-content: space-around; align-items: stretch; gap: 8px; }
.fx-gc-grupo { flex: 1 1 0; max-width: 160px; display: flex; flex-direction: column; border-radius: 6px; }
.fx-gc-grupo:hover { background: rgba(255, 255, 255, 0.03); }
.fx-gc-colunas { flex: 1; display: flex; align-items: flex-end; justify-content: center; gap: 2px; margin-bottom: 0; height: calc(100% - 42px); }
.fx-gc-col { position: relative; width: 24px; border-radius: 4px 4px 0 0; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.fx-gc-valor { position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%); white-space: nowrap; text-align: center; font-size: 11px; line-height: 1.25; color: var(--text-primary); font-variant-numeric: tabular-nums; }
.fx-gc-rotulo { height: 42px; padding-top: 6px; font-size: 12px; text-align: center; color: var(--text-secondary); line-height: 1.2; overflow-wrap: anywhere; }
.fx-gc { margin-top: 38px; } /* espaço para o valor no topo da coluna mais alta */

/* Colunas com "3D leve": frente com a altura exata do valor; lateral (mais
   escura) e topo (mais claro) em projeção oblíqua de 8px, sem perspectiva. */
.fx-gc-colunas { gap: 12px; padding-right: 8px; }
.fx-gc-col { background: var(--c); border-radius: 0; }
.fx-gc-col::after {
  content: ""; position: absolute; left: 100%; top: 0; width: 8px; height: 100%;
  background: var(--c); filter: brightness(0.62); transform: skewY(-45deg); transform-origin: 0 0;
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
.fx-gc-col::before {
  content: ""; position: absolute; left: 0; bottom: 100%; width: 100%; height: 8px;
  background: var(--c); filter: brightness(1.3); transform: skewX(-45deg); transform-origin: 0 100%;
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
.fx-gc-valor { bottom: calc(100% + 12px); left: calc(50% + 4px); }
.fx-gb-legenda i { box-shadow: 2px -2px 0 rgba(0, 0, 0, 0.25); }

.fx-previa-auto { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border-subtle); }
