:root {
  color-scheme: light;
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-2: #f1f5f9;
  --ink: #0f172a;
  --text: var(--ink);
  --muted: #5f6f88;
  --border: #e2e8f0;
  --primary: #1f6fff;
  --primary-dark: #0d4fd6;
  --primary-soft: #e8f1ff;
  --accent: #18a999;
  --nav: #001a6d;
  --nav-2: #002788;
  --success: #15803d;
  --success-bg: #e9f8ee;
  --warning: #b45309;
  --warning-bg: #fff4df;
  --danger: #c93636;
  --danger-bg: #fdecec;
  --info: #1f6fff;
  --info-bg: #e8f1ff;
  --shadow: 0 10px 30px rgba(0, 26, 109, 0.08);
  --radius: 16px;
  --input-bg: #ffffff;
  --input-border: #cbd5e1;
  --table-hover: #f8fafc;
  --table-row-border: #edf0f5;
  --sticky-bg: rgba(248, 250, 252, 0.92);
  --popover-bg: #ffffff;
  --modal-footer-bg: #f8fafc;
  --chart-grid: #edf0f5;
  --mix-base: #ffffff;
  --overlay: rgba(12, 15, 32, 0.62);
}

html.dark {
  color-scheme: dark;
  --bg: #020617;
  --surface: #0f172a;
  --surface-2: #1e293b;
  --ink: #f1f5f9;
  --text: var(--ink);
  --muted: #94a3b8;
  --border: #1e293b;
  --primary: #3b82f6;
  --primary-dark: #60a5fa;
  --primary-soft: rgba(59, 130, 246, 0.16);
  --accent: #2dd4bf;
  --nav: #001a6d;
  --nav-2: #002788;
  --success: #34d399;
  --success-bg: rgba(16, 185, 129, 0.1);
  --warning: #fbbf24;
  --warning-bg: rgba(245, 158, 11, 0.1);
  --danger: #f87171;
  --danger-bg: rgba(239, 68, 68, 0.1);
  --info: #60a5fa;
  --info-bg: rgba(59, 130, 246, 0.12);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  --input-bg: #0f172a;
  --input-border: #334155;
  --table-hover: rgba(30, 41, 59, 0.6);
  --table-row-border: #1e293b;
  --sticky-bg: rgba(2, 6, 23, 0.92);
  --popover-bg: #0f172a;
  --modal-footer-bg: #0f172a;
  --chart-grid: rgba(148, 163, 184, 0.16);
  --mix-base: #0f172a;
  --overlay: rgba(2, 6, 23, 0.72);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: var(--primary); }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 270px minmax(0, 1fr); transition: grid-template-columns .2s ease; }
.app-shell.sidebar-collapsed { grid-template-columns: 84px minmax(0, 1fr); }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 270px;
  background: linear-gradient(180deg, var(--nav), #001040 100%);
  color: #fff;
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  z-index: 40;
  overflow: visible;
  transition: width .2s ease, padding .2s ease;
}
.app-shell.sidebar-collapsed .sidebar {
  width: 84px;
  padding: 18px 10px;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 22px; position: relative; }
.brand-mark {
  width: 46px; height: 46px; border-radius: 14px;
  display: grid; place-items: center;
  font-weight: 800; letter-spacing: .04em;
  background: linear-gradient(145deg, #7eb6ff 0%, #1f6fff 48%, #0d4fd6 100%);
  box-shadow: 0 9px 24px rgba(31,111,255,.38);
  flex: 0 0 auto;
  overflow: hidden;
  padding: 0;
}
.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.brand-text { min-width: 0; flex: 1; }
.brand strong { display: block; font-size: 16px; }
.brand span { display: block; color: #adb4d3; font-size: 11px; margin-top: 3px; }
.sidebar-toggle {
  position: absolute;
  top: 34px;
  right: -12px;
  z-index: 60;
  border: 0;
  background: #fff;
  color: var(--nav);
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  line-height: 1;
  box-shadow: 0 4px 14px rgba(0, 26, 109, .28);
  transition: background .15s ease, color .15s ease, transform .15s ease;
}
.sidebar-toggle svg {
  width: 14px;
  height: 14px;
  display: block;
  transition: transform .2s ease;
}
.sidebar-toggle:hover { background: var(--primary); color: #fff; }
.area-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 6px; background: rgba(255,255,255,.06); border-radius: 12px; margin: 0 4px 18px; }
.app-shell.sidebar-collapsed .brand { justify-content: center; padding: 0 0 16px; gap: 0; }
.app-shell.sidebar-collapsed .brand-mark { width: 42px; height: 42px; }
.app-shell.sidebar-collapsed .sidebar-toggle {
  top: 28px;
  right: -12px;
  width: 24px;
  height: 24px;
}
.app-shell.sidebar-collapsed .sidebar-toggle svg { transform: rotate(180deg); }

.area-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 6px; background: rgba(255,255,255,.06); border-radius: 12px; margin: 0 4px 18px; }
.area-button { border: 0; border-radius: 9px; color: #afb6d4; background: transparent; padding: 9px 6px; font-size: 12px; font-weight: 700; }
.area-button.active { color: #fff; background: var(--primary); box-shadow: 0 5px 14px rgba(31,111,255,.35); }

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 2px;
  margin-right: -2px;
}
.nav-item {
  border: 0; background: transparent; color: #94a3b8; text-align: left;
  padding: 11px 12px; border-radius: 10px; display: flex; gap: 12px; align-items: center;
  font-size: 14px; font-weight: 600; transition: .15s ease;
  text-decoration: none; cursor: pointer; width: 100%; box-sizing: border-box;
  position: relative;
}
.nav-icon {
  width: 1.125rem;
  height: 1.125rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  opacity: .95;
  line-height: 1;
  color: inherit;
}
.nav-icon svg {
  width: 1.125rem;
  height: 1.125rem;
  display: block;
  stroke-width: 2;
}
.nav-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-item .nav-alert-badge {
  margin-left: auto;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #e59a22;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  flex: 0 0 auto;
}
.app-shell.sidebar-collapsed .nav-item .nav-alert-badge {
  position: absolute;
  top: 6px;
  right: 10px;
  min-width: 8px;
  width: 8px;
  height: 8px;
  padding: 0;
  font-size: 0;
  line-height: 0;
  margin: 0;
}
.nav-item:hover { color: #fff; background: rgba(255,255,255,.07); }
.nav-item.active, .nav-item[aria-current="page"] { color: #fff; background: rgba(29, 78, 216, .8); box-shadow: none; }
.app-shell.sidebar-collapsed .nav-item {
  justify-content: center;
  padding: 12px 0;
  gap: 0;
}
.app-shell.sidebar-collapsed .brand-text,
.app-shell.sidebar-collapsed .nav-label,
.app-shell.sidebar-collapsed .area-switch {
  display: none;
}
.app-shell.sidebar-collapsed .nav-item:hover::after,
.app-shell.sidebar-collapsed .nav-item:focus-visible::after {
  content: attr(data-label);
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  background: var(--nav);
  color: #fff;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 8px 20px rgba(0,0,0,.28);
  z-index: 60;
  pointer-events: none;
}

.main-content { grid-column: 2; min-width: 0; }
.cq-sticky-head {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--sticky-bg);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
}
.topbar {
  min-height: 72px; background: transparent; border-bottom: 0;
  padding: 16px 28px 6px; display: flex; align-items: center; justify-content: space-between; gap: 20px;
  position: relative; z-index: 1;
}
.topbar-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.eyebrow { margin: 0 0 4px; color: var(--primary); font-size: 11px; font-weight: 800; letter-spacing: .11em; }
h1 { font-size: 24px; margin: 0; letter-spacing: -.02em; }
.subtitle { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.month-control, .period-type-control { display: flex; flex-direction: column; gap: 5px; color: var(--muted); font-size: 11px; font-weight: 700; }
.month-control input { height: 40px; min-width: 142px; }
.period-type-control select { height: 40px; min-width: 92px; }

/* Barra de ferramentas estilo ADVBOX: ícone + rótulo, navegador de competência */
.cq-tools-bar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 28px;
  flex-wrap: wrap;
  padding: 2px 28px 12px;
  background: transparent;
  border-bottom: 0;
}
.cq-tools-left {
  display: inline-flex;
  align-items: center;
  gap: 4px 18px;
  flex-wrap: wrap;
  min-width: 0;
}
.cq-tools-period {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  min-width: 0;
}
.cq-tools-nav-btn {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.cq-tools-nav-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.cq-tools-nav-btn:hover,
.cq-tools-nav-btn:focus-visible {
  background: var(--surface-2);
  color: var(--ink);
  outline: none;
}
.cq-tools-period-label {
  min-width: 132px;
  height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .01em;
  text-align: center;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s ease, color .15s ease;
}
.cq-tools-period-label:hover,
.cq-tools-period-label:focus-visible,
.cq-tools-period-label.is-active {
  background: var(--primary-soft);
  color: var(--primary);
  outline: none;
}
.cq-tools-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px 18px;
  flex-wrap: wrap;
  min-width: 0;
  margin-left: auto;
}
.cq-tools-item { position: relative; }
.cq-tools-btn {
  height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 6px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: color .15s ease, background .15s ease;
}
.cq-tools-btn svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}
.cq-tools-btn:hover,
.cq-tools-btn:focus-visible {
  color: var(--ink);
  background: var(--surface-2);
  outline: none;
}
.cq-tools-btn.is-filtered,
.cq-tools-btn[aria-expanded="true"] {
  color: var(--primary);
  background: var(--primary-soft);
}
.cq-tools-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 50;
  min-width: 280px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--popover-bg);
  box-shadow: 0 16px 36px rgba(0, 26, 109,.16);
}
.cq-tools-search .cq-tools-popover { min-width: 300px; }
.cq-tools-search-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}
.cq-tools-search-field input {
  height: 40px;
  width: 100%;
}
.cq-sort-menu { min-width: 260px; padding: 8px 0 10px; }
.cq-sort-options {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 8px;
}
.cq-sort-option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 9px 10px;
  border-radius: 9px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .12s ease, color .12s ease;
}
.cq-sort-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.cq-sort-option:hover,
.cq-sort-option:has(input:checked) {
  background: var(--primary-soft);
  color: var(--primary);
}
.cq-sort-option:has(input:focus-visible) {
  outline: 2px solid color-mix(in srgb, var(--primary) 35%, transparent);
  outline-offset: 1px;
}

.inactive-filter { position: relative; }
.filter-button { height: 40px; display: inline-flex; align-items: center; gap: 8px; padding: 0 11px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--muted); font-family: inherit; font-size: 12px; font-weight: 700; cursor: pointer; white-space: nowrap; transition: .15s ease; }
.filter-button:hover, .filter-button:focus-visible, .filter-button.is-filtered { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); outline: none; }
.filter-button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.filter-chevron { margin-left: 1px; font-size: 16px; line-height: 1; transform: translateY(-1px); }
.filter-menu { position: absolute; top: calc(100% + 8px); left: 0; right: auto; z-index: 50; width: 360px; padding: 0; border: 1px solid var(--border); border-radius: 13px; background: var(--popover-bg); box-shadow: 0 16px 36px rgba(0, 26, 109,.16); overflow: hidden; }
.cq-tools-item.inactive-filter .filter-menu { left: 0; right: auto; }
.filter-menu-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px 10px; border-bottom: 1px solid var(--border); }
.filter-menu-header strong { font-size: 15px; color: var(--ink); }
.filter-menu-close { width: 28px; height: 28px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; }
.filter-menu-close:hover { background: var(--surface-2); color: var(--ink); }
.filter-menu-title { margin: 12px 16px 6px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.filter-period-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 0 16px 4px;
}
.filter-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}
.filter-field span { letter-spacing: .02em; }
.filter-field select,
.filter-field input {
  height: 38px;
  width: 100%;
  min-width: 0;
}
.filter-status-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 2px 16px 4px;
}
.filter-closer-control { padding: 2px 16px 4px; }
.filter-closer-control select { height: 38px; width: 100%; min-width: 0; }
.filter-chip {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, color .15s ease, box-shadow .15s ease;
  user-select: none;
}
.filter-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.filter-chip:hover {
  border-color: color-mix(in srgb, var(--primary) 45%, var(--border));
  background: var(--primary-soft);
}
.filter-chip:has(input:checked),
.filter-chip:has(input:focus-visible) {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary) 35%, transparent);
}
.filter-chip:has(input:focus-visible) {
  outline: 2px solid color-mix(in srgb, var(--primary) 35%, transparent);
  outline-offset: 1px;
}
.filter-menu-note { margin: 10px 16px 0; padding-top: 10px; border-top: 1px solid var(--border); color: var(--muted); font-size: 11px; line-height: 1.4; }
.filter-menu-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding: 14px 16px; margin-top: 8px; border-top: 1px solid var(--border); background: var(--surface-2); }
.filter-clear-btn { border: 0; background: transparent; color: var(--primary); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; padding: 0; }
.filter-clear-btn:hover { text-decoration: underline; }
.toggle-control { height: 40px; display: flex; align-items: center; gap: 7px; padding: 0 10px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.toggle-control input { accent-color: var(--primary); }

.page-content { padding: 24px 28px 72px; max-width: 1600px; margin: 0 auto; }
.page-stack { display: flex; flex-direction: column; gap: 18px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 20px;
}
.card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.card-header > div:first-child { min-width: 0; flex: 1 1 auto; }
.card-header h2, .section-heading h2 { margin: 0; font-size: 17px; }
.card-header p, .section-heading p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.section-heading-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.cq-more-actions {
  position: relative;
  display: inline-block;
}
.cq-more-actions > summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
}
.cq-more-actions > summary::-webkit-details-marker,
.cq-more-actions > summary::marker {
  display: none;
  content: '';
}
.cq-more-actions > summary svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  transition: transform .15s ease;
}
.cq-more-actions[open] > summary svg {
  transform: rotate(180deg);
}
.cq-more-actions-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 40;
  min-width: 220px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 16px 36px rgba(0, 26, 109, .16);
}
.cq-more-actions-item {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 9px 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}
.cq-more-actions-item:hover,
.cq-more-actions-item:focus-visible {
  background: var(--primary-soft);
  color: var(--primary);
  outline: none;
}

.training-page .section-heading-actions .button.primary {
  background: #2563eb;
}
.training-page .section-heading-actions .button.primary:hover {
  background: #1d4ed8;
}

.kpi-grid { display: grid; grid-template-columns: repeat(6, minmax(145px, 1fr)); gap: 14px; }
.kpi-grid-coord-week { grid-template-columns: repeat(3, minmax(180px, 1fr)); }
.kpi-grid-3x3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.kpi-grid-4,
.kpi-grid-overview {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.kpi-grid-pair {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.kpi-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.kpi-dashboard {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.kpi-block-title {
  margin: 0 0 8px;
  color: #3d4a5c;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.kpi-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 17px; box-shadow: var(--shadow); min-width: 0; }
.kpi-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  margin-bottom: 2px;
  padding-right: 26px;
}
.kpi-card:not(:has(.kpi-menu-hint)) .kpi-card-head {
  padding-right: 0;
}
.kpi-card .kpi-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0;
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 800;
  font-size: 15px;
  line-height: 1;
  flex-shrink: 0;
  overflow: hidden;
}
.kpi-card .kpi-icon svg {
  width: 17px;
  height: 17px;
  display: block;
}
.kpi-card .kpi-icon,
.kpi-card .kpi-icon * {
  font-variant-emoji: text;
}
.kpi-card-rhythm { display: flex; flex-direction: column; align-items: stretch; text-align: left; }
.kpi-rhythm-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: center; margin-top: 8px; }
.kpi-rhythm-tag { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; }
.kpi-rhythm-tag.up { color: #15803d; }
.kpi-rhythm-tag.down { color: #b45309; }
.kpi-rhythm-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.kpi-rhythm-value { font-weight: 700; color: var(--text); }
.coord-week-filter { display: flex; flex-direction: column; gap: 6px; min-width: 220px; font-size: 13px; color: var(--muted); }
.coord-week-filter select { min-width: 240px; }

/* Comparação entre círculos — topo do workspace de Coordenação. */
.coord-circles-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.coord-circle-card {
  display: flex; flex-direction: column; gap: 14px; width: 100%;
  padding: 16px; text-align: left; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  transition: border-color .15s ease, transform .15s ease;
}
.coord-circle-card:hover { border-color: var(--primary); transform: translateY(-1px); }
.coord-circle-card.is-active { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(31, 111, 255, .18); }
.coord-circle-head { display: flex; align-items: center; gap: 10px; }
.coord-circle-head > div { display: flex; flex-direction: column; min-width: 0; }
.coord-circle-head strong { font-size: 15px; color: var(--text); }
.coord-circle-head span { font-size: 12px; color: var(--muted); }
.coord-circle-head .coord-circle-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; flex: none; border-radius: 10px;
  background: var(--primary); color: #fff; font: 700 12px/1 system-ui;
}
.coord-circle-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.coord-circle-metrics > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.coord-circle-metrics b { font-size: 18px; color: var(--text); }
.coord-circle-metrics span { font-size: 11px; color: var(--muted); }
.coord-circle-empty { margin: 0; font-size: 12px; color: var(--muted); }
.coord-circle-cta { margin-top: auto; font-size: 12px; font-weight: 600; color: var(--primary); }
.coord-circle-card.is-active .coord-circle-cta { color: var(--muted); }
.coord-churn-reasons ul { list-style: none; margin: 0; padding: 0 18px 16px; display: grid; gap: 10px; }
.coord-churn-reasons li { display: grid; grid-template-columns: minmax(110px, 160px) 1fr auto 42px; align-items: center; gap: 10px; font-size: 13px; }
.coord-churn-reasons li small { color: var(--muted); text-align: right; }
.coord-churn-bar { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.coord-churn-bar i { display: block; height: 100%; border-radius: inherit; background: var(--primary); }
/* Papéis essenciais (Coordenação): cartões de líder, treinador e CSQ. */
.er-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.er-chip {
  padding: 7px 14px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text); font-size: 13px; font-weight: 500;
}
.er-chip:hover { border-color: var(--primary); }
.er-chip:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.er-chip.is-active { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.er-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); align-items: start; }
.er-card {
  display: flex; flex-direction: column; gap: 14px; padding: 18px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.er-card.is-empty { box-shadow: none; border-style: dashed; }
.er-card-head { display: flex; align-items: center; gap: 12px; }
.er-card-head > div { display: flex; flex-direction: column; min-width: 0; }
.er-card-head strong { font-size: 15px; color: var(--text); }
.er-card-head .avatar { width: 40px; height: 40px; border-radius: 999px; font-size: 13px; }
.er-role { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--primary); }
.er-scores { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.er-score {
  display: flex; flex-direction: column; gap: 6px; min-width: 0;
  padding: 10px 12px; border-radius: 12px; background: var(--surface-2);
}
.er-score span { font-size: 11px; font-weight: 700; letter-spacing: .02em; color: var(--muted); }
.er-score strong { font-size: 24px; line-height: 1; font-variant-numeric: tabular-nums; color: var(--text); }
.er-score.is-empty strong { color: var(--muted); }
.er-score.is-good { background: var(--success-bg); }
.er-score.is-good strong { color: var(--success); }
.er-score.is-ok { background: var(--warning-bg); }
.er-score.is-ok strong { color: var(--warning); }
.er-score.is-bad { background: var(--danger-bg); }
.er-score.is-bad strong { color: var(--danger); }
.er-scores small { grid-column: 1 / -1; font-size: 12px; color: var(--muted); }
.er-metrics { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.er-metric {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%;
  padding: 8px 10px; border: 0; border-radius: 8px; background: transparent;
  color: var(--text); font: inherit; font-size: 13px; text-align: left;
}
button.er-metric { cursor: pointer; }
button.er-metric:hover { background: var(--table-hover); }
button.er-metric:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.er-metric b { font-size: 16px; font-variant-numeric: tabular-nums; }
button.er-metric b { color: var(--primary); }
.er-metric.is-zero { color: var(--muted); }
.er-note { margin: 0; font-size: 12px; color: var(--muted); }
.er-access { display: grid; gap: 2px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2, rgba(95, 111, 136, .08)); font-size: 12px; }
.er-access-row { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); }
.er-access-row b { color: var(--text); font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.er-access-row.is-stale b, .er-access-stale { color: var(--warning); }
.er-footnote { margin: 0; font-size: 12px; color: var(--muted); }
/* Ações no CQ (29/10/2026): o que a pessoa fez no sistema, pelas atribuições do papel. */
.er-cq { border-top: 1px dashed var(--border); padding-top: 12px; display: grid; gap: 2px; }
.er-cq-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 0 10px; }
.er-cq-head span { font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--primary-dark); }
.er-cq-head b { font-size: 24px; font-variant-numeric: tabular-nums; color: var(--text); }
.er-cq h4 { margin: 8px 10px 2px; font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.er-cq .er-note { padding: 6px 10px 0; }
.kpi-label-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-width: 0;
  flex: 1 1 auto;
}
.kpi-label {
  display: block;
  color: #3d4a5c;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .01em;
  line-height: 1.25;
  min-width: 0;
}
.kpi-value { display: block; font-size: 27px; margin: 10px 0 4px; line-height: 1; font-variant-numeric: tabular-nums; }
.kpi-value.is-na {
  color: var(--muted);
  font-size: 22px;
  font-weight: 650;
  letter-spacing: .02em;
}
.kpi-value .cq-spinner { vertical-align: middle; }
.kpi-card.is-loading { pointer-events: none; opacity: .92; }
.kpi-card.is-loading .kpi-note { font-style: italic; }
.kpi-card.has-alert.alert-warning {
  border-color: color-mix(in srgb, var(--warning) 35%, var(--border));
}
.kpi-card.has-alert.alert-danger {
  background: var(--danger-bg);
  border-color: rgba(239, 68, 68, 0.2);
  box-shadow: 0 1px 0 color-mix(in srgb, var(--danger) 12%, transparent);
}
.kpi-card.has-alert.alert-danger .kpi-icon {
  background: color-mix(in srgb, var(--danger) 14%, var(--mix-base));
  color: var(--danger);
}
.kpi-card.has-alert.alert-danger .kpi-label,
.kpi-card.has-alert.alert-danger .kpi-value {
  color: var(--danger);
}
.kpi-card.has-alert.alert-danger .kpi-note {
  color: color-mix(in srgb, var(--danger) 72%, var(--muted));
}
.kpi-card.has-alert.alert-danger .kpi-alert-badge {
  font-weight: 800;
}
.kpi-alert-badge {
  flex: 0 0 auto;
  font-size: 10px;
  padding: 3px 7px;
  letter-spacing: .02em;
}
.kpi-trend {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0 0 6px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  max-width: 100%;
}
.kpi-trend-arrow { font-size: 10px; line-height: 1; }
.kpi-trend--up {
  color: var(--success);
  background: var(--success-bg);
}
.kpi-trend--down {
  color: var(--danger);
  background: var(--danger-bg);
}
.kpi-trend--flat {
  color: #566174;
  background: #eef1f5;
}

/* Spinner de carregamento (filtro / lazy-load) */
.cq-spinner {
  display: inline-block;
  width: 1.05em;
  height: 1.05em;
  border: 2.5px solid color-mix(in srgb, var(--primary) 25%, transparent);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: cq-spin .7s linear infinite;
  vertical-align: -0.12em;
  flex-shrink: 0;
}
.cq-spinner--lg {
  width: 1.35em;
  height: 1.35em;
  border-width: 3px;
}
.cq-spinner--sm {
  width: 0.9em;
  height: 0.9em;
  border-width: 2px;
}
.cq-loading-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}
@keyframes cq-spin {
  to { transform: rotate(360deg); }
}

.kpi-note {
  color: #4a5a70;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.35;
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
button.kpi-card,
div.kpi-card.is-clickable {
  display: block;
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
  position: relative;
}
button.kpi-card:hover,
button.kpi-card:focus-visible,
div.kpi-card.is-clickable:hover,
div.kpi-card.is-clickable:focus-visible {
  border-color: color-mix(in srgb, var(--primary) 45%, var(--border));
  box-shadow: 0 8px 22px rgba(37, 43, 92, .08);
  outline: none;
}
button.kpi-card:active,
div.kpi-card.is-clickable:active { transform: translateY(1px); }
button.kpi-card.is-empty,
div.kpi-card.is-empty { cursor: default; opacity: .85; }
button.kpi-card.is-empty:hover,
div.kpi-card.is-empty:hover { border-color: var(--border); box-shadow: var(--shadow); transform: none; }
button.kpi-card:not(.is-clickable) { cursor: default; }
button.kpi-card:not(.is-clickable):hover { border-color: var(--border); box-shadow: var(--shadow); transform: none; }
.kpi-eye-btn {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--primary) 28%, var(--border));
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  cursor: pointer;
  flex: 0 0 auto;
  vertical-align: middle;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.kpi-eye-btn:hover,
.kpi-eye-btn:focus-visible {
  background: color-mix(in srgb, var(--primary) 18%, var(--surface));
  border-color: var(--primary);
  outline: none;
  transform: translateY(-1px);
}
.kpi-eye-btn:active { transform: translateY(0); }
.kpi-report-hint,
.kpi-menu-hint {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  color: var(--muted);
  background: color-mix(in srgb, var(--surface-2) 80%, var(--border));
  text-transform: lowercase;
  opacity: .72;
  transition: opacity .15s ease, color .15s ease, background .15s ease;
}
.kpi-menu-hint svg {
  display: block;
}
button.kpi-card:hover .kpi-menu-hint,
button.kpi-card:focus-visible .kpi-menu-hint,
div.kpi-card.is-clickable:hover .kpi-menu-hint,
div.kpi-card.is-clickable:focus-visible .kpi-menu-hint {
  opacity: 1;
  color: var(--primary);
  background: var(--primary-soft);
}
.card-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  flex: 0 0 auto;
  margin-top: 2px;
}
.card-header-actions .button.small {
  min-height: 36px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
}
.occ-bulk-actions {
  align-items: flex-end;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  max-width: min(720px, 100%);
}
.occ-bulk-progress {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  min-width: 220px;
  text-align: right;
  font-size: 12px;
  color: var(--muted);
}
.occ-bulk-progress strong {
  color: var(--text);
  font-size: 12px;
}
.occ-bulk-progress-bar {
  display: block;
  width: 220px;
  max-width: 100%;
  height: 6px;
  border-radius: 99px;
  background: var(--primary-soft, #e8eefc);
  overflow: hidden;
}
.occ-bulk-progress-bar i {
  display: block;
  height: 100%;
  background: var(--primary, #2f6fed);
  border-radius: 99px;
}
.chart-sort-control {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--muted);
  font-weight: 700;
  margin: 0;
  white-space: nowrap;
}
.chart-sort-control span {
  line-height: 1;
}
.chart-sort-control select {
  height: 36px;
  min-width: 168px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font-size: 12px;
  font-weight: 650;
}

.chart-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 14px; align-items: stretch; }
.chart-card { grid-column: span 6; min-height: 0; overflow: visible; display: flex; flex-direction: column; }
.chart-card.wide { grid-column: span 8; }
.chart-card.full { grid-column: span 12; }
.chart-card.narrow { grid-column: span 4; }
.chart-grid > .table-card { grid-column: span 6; min-width: 0; display: flex; flex-direction: column; }
.chart-grid > .table-card.wide { grid-column: span 8; }
.chart-grid > .table-card.narrow { grid-column: span 4; }
.chart-grid > .table-card .empty-state { padding: 28px 16px; }
.card-header-actions .inline-filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}
.card-header-actions .inline-filter select {
  min-width: 140px;
  max-width: 200px;
}
.chart-card > .card-header { margin-bottom: 10px; }
.chart-wrap { position: relative; min-height: 200px; height: 220px; width: 100%; overflow: visible; flex: 1 1 auto; }
.chart-wrap canvas { width: 100% !important; height: 100% !important; max-height: 100%; }
.chart-wrap.is-person-chart { min-height: 240px; height: auto; max-height: none; overflow: visible; }
.chart-wrap.is-hours-chart {
  min-height: 280px;
  height: 340px;
}
.hours-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 10px;
  font-size: 11px;
  font-weight: 650;
  color: var(--muted);
}
.hours-chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.hours-chart-legend i {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 3px;
  flex: 0 0 auto;
}
.hours-chart-legend i.is-journey { background: rgba(31, 111, 255, 0.88); }
.hours-chart-legend i.is-overtime { background: rgba(234, 88, 12, 0.82); }
.hours-chart-legend i.is-start-line,
.hours-chart-legend i.is-end-line {
  width: 16px;
  height: 0;
  border-radius: 0;
  border-top: 2px dashed #64748b;
  background: transparent;
}
.hours-chart-legend i.is-end-line { border-top-color: #c93636; }
.cq-chart-tooltip.is-hours { min-width: 210px; }
.cq-chart-tooltip-kv {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-top: 5px;
  font-size: 12px;
}
.cq-chart-tooltip-kv span { color: rgba(255, 255, 255, 0.72); }
.cq-chart-tooltip-kv strong { font-weight: 700; color: #fff; }
.cq-chart-tooltip-alert {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  color: #fdba74;
  font-weight: 650;
}
.shift-summary {
  margin: 0 0 16px;
  padding: 14px 16px 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  /* Cores do tema (antes #f8fbff fixo: ficava branco no modo escuro). */
  background: linear-gradient(180deg, color-mix(in srgb, #1f6fff 4%, var(--surface)) 0%, var(--surface-2) 100%);
}
.shift-summary-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 18px;
}
.shift-metric {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.shift-metric-kicker {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--muted);
}
.shift-metric strong {
  font-size: 22px;
  line-height: 1.15;
  font-weight: 800;
  color: var(--ink);
}
.shift-metric.is-day strong { color: #1f6fff; }
.shift-metric.is-night strong { color: #c2410c; }
.shift-metric-label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}
.shift-split-bar {
  display: flex;
  height: 12px;
  margin-top: 12px;
  border-radius: 99px;
  overflow: hidden;
  background: color-mix(in srgb, var(--border) 70%, var(--surface-2));
}
.shift-split-bar i {
  display: block;
  height: 100%;
  min-width: 0;
}
.shift-split-bar i.is-day { background: #1f6fff; }
.shift-split-bar i.is-night {
  background: linear-gradient(90deg, #f97316 0%, #7c3aed 100%);
}
.shift-split-bar.is-empty i { display: none; }
html.dark .shift-metric.is-day strong,
html.dark .text-commercial { color: #6ea8ff; }
html.dark .shift-metric.is-night strong,
html.dark .text-afterhours { color: #fb923c; }
.shift-summary-note {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--muted);
}
.shift-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.badge.shift-night {
  color: var(--warning);
  background: var(--warning-bg);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, #7c3aed 22%, transparent);
}
.shift-history-table button.sort-th {
  white-space: normal;
  max-width: 12.5em;
  line-height: 1.25;
}
.text-commercial { color: #1f6fff; }
.text-afterhours { color: #c2410c; }
tr.row-shift-anomaly td {
  background: color-mix(in srgb, var(--danger-bg) 72%, var(--mix-base));
  box-shadow: inset 3px 0 0 color-mix(in srgb, var(--danger) 55%, transparent);
}
.chart-wrap-pie {
  min-height: 180px;
  max-height: 200px;
  height: 190px;
  width: min(100%, 260px);
  margin: 0 auto;
}
.chart-wrap-pie canvas {
  max-height: 190px !important;
}
.chart-card.narrow .chart-wrap-pie {
  min-height: 180px;
  max-height: 200px;
  height: 190px;
  margin: 0 auto;
}
.chart-card.narrow .chart-wrap-pie canvas {
  max-height: 190px !important;
}
.cq-chart-tooltip {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 30;
  min-width: 120px;
  max-width: min(340px, calc(100% - 24px));
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(18, 32, 58, 0.96);
  color: #fff;
  font-size: 12px;
  line-height: 1.35;
  box-shadow: 0 10px 28px rgba(0, 26, 109, 0.22);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity .12s ease;
  white-space: normal;
}
.cq-chart-tooltip.is-visible {
  opacity: 1;
  visibility: visible;
}
.cq-chart-tooltip-title {
  font-weight: 750;
  margin-bottom: 6px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255,255,255,.14);
}
.cq-chart-tooltip-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 4px;
}
.cq-chart-tooltip-swatch {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  border: 1px solid transparent;
  flex: 0 0 auto;
}
.topbar-actions .metrics-sort-control { min-width: 180px; }
.topbar-actions .metrics-sort-control select { width: 100%; }
.page-content.is-tools-filtering [data-tools-row] { transition: opacity .12s ease; }
.page-content.is-tools-filtering [data-tools-row][hidden] { display: none !important; }

.quality-oos-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-align: left;
  max-width: 100%;
}
.quality-oos-chevron {
  display: inline-grid;
  place-items: center;
  width: 16px;
  color: var(--muted);
  font-size: 12px;
}
.quality-oos-detail-row td {
  background: #f7f9fd;
  padding: 0 14px 14px;
  border-bottom: 1px solid var(--border);
}
.quality-oos-detail {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  padding: 12px 14px;
}
.quality-oos-detail-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.quality-oos-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.quality-oos-list li {
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid #e7edf7;
}
.quality-oos-task-main {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 6px 12px;
}
.quality-oos-plan {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.oos-action-buttons {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.oos-seen-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #c5ccd8;
  cursor: pointer;
  line-height: 0;
}
.oos-seen-mark:hover,
.oos-seen-mark:focus-visible {
  color: #16a34a;
  background: transparent;
  outline: none;
}
.oos-seen-mark.is-seen {
  color: #16a34a;
}
.oos-seen-mark.is-seen:hover,
.oos-seen-mark.is-seen:focus-visible {
  color: #15803d;
}
.oos-seen-mark svg {
  width: 16px;
  height: 16px;
  display: block;
}
.quality-oos-task-meta {
  margin-top: 4px;
  font-size: 12px;
}
.quality-oos-empty { margin: 0; }
.quality-ops-table,
.accounts-ops-table {
  width: max-content;
  min-width: 100%;
  font-size: 12px;
}
.quality-ops-table th,
.quality-ops-table td,
.accounts-ops-table th,
.accounts-ops-table td {
  padding: 8px 10px;
  white-space: nowrap;
  vertical-align: middle;
}
.quality-ops-table th:first-child,
.quality-ops-table td:first-child,
.accounts-ops-table th:first-child,
.accounts-ops-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  min-width: 168px;
  max-width: 240px;
  white-space: normal;
  background: var(--surface);
  box-shadow: 1px 0 0 var(--border);
}
.quality-ops-table thead th:first-child,
.accounts-ops-table thead th:first-child {
  z-index: 2;
  background: var(--surface-2);
}
.quality-ops-table tbody tr.row-warning td:first-child,
.accounts-ops-table tbody tr.row-warning td:first-child {
  background: var(--warning-bg);
}
.quality-ops-table tbody tr.is-expanded td:first-child,
.quality-ops-table tbody tr:hover td:first-child,
.accounts-ops-table tbody tr.is-expanded td:first-child,
.accounts-ops-table tbody tr:hover td:first-child {
  background: var(--surface-2);
}
.audit-trainer-suggestion .audit-suggest-list {
  margin: 0;
  padding-left: 18px;
}
.audit-trainer-suggestion .audit-suggest-list li {
  margin-bottom: 8px;
}
.table-scroll { overflow: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th { text-align: left; color: var(--muted); background: var(--surface-2); font-size: 10px; text-transform: uppercase; letter-spacing: .05em; padding: 12px 14px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); white-space: nowrap; }
thead th:not(.col-actions):not(.col-check):not(:empty) {
  cursor: pointer;
  user-select: none;
}
thead th:not(.col-actions):not(.col-check):not(:empty):hover {
  color: var(--primary);
}
thead th.is-sorted {
  color: var(--primary-dark);
}
thead th.is-sorted-asc::after,
thead th.is-sorted-desc::after {
  display: inline-block;
  margin-left: 4px;
  font-size: 9px;
  font-weight: 700;
  opacity: .9;
  text-transform: none;
  letter-spacing: 0;
}
thead th.is-sorted-asc::after { content: '↑'; }
thead th.is-sorted-desc::after { content: '↓'; }
tr.is-page-hidden { display: none !important; }
.table-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 2px 2px;
}
.table-pager-info {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.table-pager-buttons {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.table-pager-ellipsis {
  color: var(--muted);
  font-size: 12px;
  padding: 0 2px;
}
.table-pager .button.is-current {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
@media print {
  tr.is-page-hidden { display: table-row !important; }
  .table-pager { display: none !important; }
}
td { padding: 12px 14px; border-bottom: 1px solid var(--table-row-border); vertical-align: top; }

.quality-finalization-header {
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: flex-start;
}
.quality-finalization-table {
  width: 100%;
  table-layout: auto;
  font-size: 12px;
}
.quality-finalization-table th,
.quality-finalization-table td {
  padding: 10px 10px;
  vertical-align: middle;
}
.quality-finalization-table th.col-flag,
.quality-finalization-table td.col-flag {
  text-align: center;
  white-space: nowrap;
  width: 1%;
  padding-left: 6px;
  padding-right: 6px;
}
.quality-finalization-table th.col-errors,
.quality-finalization-table td.col-errors {
  text-align: center;
  width: 1%;
  white-space: nowrap;
}
.quality-finalization-table th.col-meetings,
.quality-finalization-table td.col-meetings {
  text-align: center;
  width: 1%;
  white-space: nowrap;
}
.finalization-meetings-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.finalization-meetings-btn svg { width: 14px; height: 14px; }
.quality-finalization-table .col-date {
  white-space: nowrap;
  width: 1%;
  color: var(--muted);
}
.quality-finalization-table .col-account {
  min-width: 140px;
  max-width: 240px;
}
.quality-finalization-table .col-account strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.quality-finalization-table .col-sub {
  display: block;
  font-size: 11px;
  margin-top: 2px;
}
.quality-finalization-table .col-person {
  min-width: 110px;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.quality-finalization-table td.col-errors {
  font-weight: 700;
}
.table-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}
.table-pagination-info {
  font-size: 12px;
  color: var(--muted);
}
.table-pagination-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
}
.table-pagination-controls .inline-filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}
.table-pagination-controls .inline-filter select {
  min-width: 72px;
  padding: 4px 8px;
  font-size: 12px;
}
.table-pagination-page {
  font-size: 12px;
  color: var(--text);
  min-width: 7.5rem;
  text-align: center;
}
.table-pagination .button[disabled] {
  opacity: .45;
  cursor: not-allowed;
}
.flag-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}
.flag-badge.success { color: var(--success); background: var(--success-bg); }
.flag-badge.danger { color: var(--danger); background: var(--danger-bg); }
.flag-badge.neutral { color: #566174; background: #eef1f5; }
tbody tr:hover { background: var(--table-hover); }
tbody tr:last-child td { border-bottom: 0; }
.table-actions { display: inline-flex; gap: 6px; white-space: nowrap; flex-wrap: nowrap; align-items: center; }
.table-link-icons { display: inline-flex; align-items: center; gap: 4px; }
.training-score-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-width: 180px;
  max-width: 340px;
}
.training-score-value {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  line-height: 1.2;
}
.training-score-value strong {
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}
.training-score-subs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
}
.training-score-subs strong {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.training-score-chips,
.training-feedback-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
th.training-feedback-col,
td.training-feedback-col {
  text-align: center;
  vertical-align: middle;
}
.training-feedback-chips {
  justify-content: center;
}
.training-score-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.occ-action-group { gap: 4px; justify-content: flex-end; }
.btn-tiny {
  border: 1px solid var(--border, #d8dee8);
  background: var(--surface);
  color: var(--text, #1f2937);
  border-radius: 6px;
  padding: 2px 7px;
  font-size: 11px;
  line-height: 1.5;
  cursor: pointer;
  white-space: nowrap;
}
.btn-tiny:hover { background: var(--surface-2); }
.btn-tiny.is-active { border-color: var(--brand, #1f6fff); color: var(--brand, #1f6fff); font-weight: 600; background: var(--primary-soft); }
.btn-tiny:disabled { opacity: .6; cursor: default; }
th.col-actions,
td.col-actions {
  text-align: right;
  width: 1%;
  white-space: nowrap;
  overflow: visible;
}
.w-full { width: 100%; }
.table-fixed { table-layout: fixed; }
.occ-table-wrap {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.card.table-card:has(.occ-table) {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}
.occ-table {
  width: 100%;
  max-width: 100%;
  table-layout: fixed;
}
.occ-table col.occ-col-date { width: 8%; }
.occ-table col.occ-col-name { width: 12%; }
.occ-table col.occ-col-type { width: 16%; }
.occ-table col.occ-col-summary { width: 40%; }
.occ-table col.occ-col-actions { width: 24%; }
.occ-table th,
.occ-table td {
  overflow: hidden;
  vertical-align: top;
  padding: 16px;
  border-bottom: 1px solid var(--border, #e2e8f0);
}
.occ-table th.col-date,
.occ-table td.col-date {
  width: 8%;
  white-space: nowrap;
}
.occ-table th.col-collaborator,
.occ-table td.col-collaborator {
  width: 12%;
}
.occ-collaborator-cell {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 2px;
}
.occ-collaborator-cell .occ-is-name {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.occ-collaborator-cell .occ-customer {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 11px;
  line-height: 1.3;
  white-space: normal;
  word-break: break-word;
}
.occ-table th.col-type,
.occ-table td.col-type {
  width: 16%;
  max-width: none;
}
.occ-table th.col-summary,
.occ-table td.col-summary {
  width: 40%;
  max-width: none;
  min-width: 0;
  overflow: hidden;
}
.occ-table th.col-actions,
.occ-table td.col-actions {
  width: 24%;
  text-align: right;
  overflow: visible;
  white-space: normal;
  background: var(--surface, #fff);
}
.occ-table .cell-ellipsis {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.occ-table td.col-type .cell-ellipsis {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  white-space: normal;
  word-break: break-word;
}
.occ-table td.col-summary .cell-ellipsis,
.occ-table td.col-summary .occ-crm-mismatch-list {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  white-space: normal;
  word-break: break-word;
  overflow: hidden;
  max-height: none;
}
.occ-crm-mismatch-list {
  font-size: 12px;
  line-height: 1.45;
}
.occ-dup-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-top: 4px;
}
.occ-dup-link {
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary, #1f6fff);
  text-decoration: none;
  white-space: nowrap;
}
.occ-dup-link:hover {
  text-decoration: underline;
}
.occ-table thead th.col-actions {
  background: var(--surface-2);
}
.occ-table tbody tr:hover td.col-actions {
  background: var(--table-hover);
}
.occ-table .occ-action-group {
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: 100%;
  min-width: 0;
  white-space: normal;
}
.occ-crm-status-select {
  appearance: none;
  -webkit-appearance: none;
  max-width: 100%;
  min-width: 0;
  width: min(9.5rem, 100%);
  padding: 6px 28px 6px 8px;
  border: 1px solid var(--input-border, #cbd5e1);
  border-radius: 8px;
  background-color: var(--surface-2, #f1f5f9);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><path d='m6 9 6 6 6-6'/></svg>");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 12px;
  color: var(--text, #1f2937);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.3;
  cursor: pointer;
}
.occ-crm-status-select:hover,
.occ-crm-status-select:focus {
  outline: none;
  border-color: var(--primary, #1f6fff);
}
.occ-crm-status-select:disabled {
  opacity: .6;
  cursor: default;
}
.occ-crm-status-select.crm-organizado {
  border-color: #86efac;
  background-color: var(--success-bg);
  color: var(--success);
}
.occ-crm-status-select.crm-parcial {
  border-color: #fcd34d;
  background-color: var(--warning-bg);
  color: var(--warning);
}
.occ-crm-status-select.crm-desorganizado {
  border-color: #fca5a5;
  background-color: var(--danger-bg);
  color: var(--danger);
}
.line-clamp-1 {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}
.line-clamp-2,
.line-clamp-3 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}
.line-clamp-2 {
  -webkit-line-clamp: 2;
  line-clamp: 2;
}
.line-clamp-3 {
  -webkit-line-clamp: 3;
  line-clamp: 3;
}
.button.icon-action {
  width: 32px;
  min-width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  border-radius: 8px;
  flex: 0 0 auto;
}
.button.icon-action:not(.small) {
  width: 40px;
  min-width: 40px;
  height: 40px;
  min-height: 40px;
}
.button.icon-action svg {
  display: block;
  flex: 0 0 auto;
}
.admin-row-actions .button.icon-action {
  width: 32px;
  min-width: 32px;
  height: 32px;
  min-height: 32px;
}
.col-check { width: 36px; text-align: center; vertical-align: middle; }
.col-check input { width: 16px; height: 16px; cursor: pointer; }
.action-bulk-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0 0 12px;
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--primary) 28%, var(--border));
  border-radius: 12px;
  background: color-mix(in srgb, var(--primary-soft) 70%, var(--surface));
}
.action-bulk-bar[hidden] { display: none !important; }
.action-bulk-bar-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.action-bulk-bar-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.table-tools { display: flex; gap: 8px; flex-wrap: wrap; }
.table-tools input, .table-tools select { min-width: 170px; }

.button {
  min-height: 40px; border-radius: 10px; border: 1px solid transparent; padding: 9px 14px;
  font-size: 12px; font-weight: 750; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  transition: .15s ease;
}
.button.primary { color: #fff; background: var(--primary); }
.button.primary:hover { background: var(--primary-dark); }
.button[data-loading] { position: relative; color: transparent !important; pointer-events: none; }
.button[data-loading]::after {
  content: '';
  position: absolute; top: 50%; left: 50%; width: 15px; height: 15px;
  margin: -8px 0 0 -8px;
  border: 2px solid rgba(255,255,255,.55); border-top-color: #fff; border-radius: 50%;
  animation: button-loading-spin .6s linear infinite;
}
.button.secondary[data-loading]::after,
.button.ghost[data-loading]::after {
  border-color: rgba(15,23,42,.2); border-top-color: var(--ink);
}
@keyframes button-loading-spin { to { transform: rotate(360deg); } }
.button.indigo {
  color: #fff;
  background: #4f46e5;
  border-color: #4338ca;
}
.button.indigo:hover,
.button.indigo:focus-visible {
  background: #4338ca;
  border-color: #3730a3;
}
.button.secondary { color: var(--ink); background: var(--surface); border-color: var(--border); }
.button.secondary:hover { border-color: #b8bfcc; background: var(--surface-2); }
.button.ghost { color: var(--muted); background: transparent; border-color: transparent; }
.button.danger { color: var(--danger); background: var(--danger-bg); border-color: #f6caca; }
.button.seen {
  color: #166534;
  background: #dcfce7;
  border-color: #bbf7d0;
}
.button.seen:hover { background: #bbf7d0; border-color: #86efac; }
.button.icon-action.seen {
  color: #fff;
  background: #16a34a;
  border-color: #15803d;
}
.button.icon-action.seen:hover {
  background: #15803d;
  border-color: #166534;
}
.button.icon-action.advbox-sent,
a.button.icon-action.advbox-sent {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary-dark);
}
.button.icon-action.advbox-sent:hover,
a.button.icon-action.advbox-sent:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}
.button.icon-action.occ-icon {
  position: relative;
  width: 32px;
  min-width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 8px;
  border: 0;
  border-radius: 999px;
  box-shadow: none;
  transition: background .15s ease, color .15s ease, transform .12s ease;
}
.button.icon-action.occ-icon:hover,
.button.icon-action.occ-icon:focus-visible {
  transform: translateY(-1px);
}
.button.icon-action.occ-icon.occ-plan,
.button.icon-action.occ-icon.occ-open-plan,
.button.secondary.icon-action.occ-icon.occ-plan,
.button.secondary.icon-action.occ-icon.occ-open-plan {
  color: var(--warning);
  background: var(--warning-bg);
}
.button.icon-action.occ-icon.occ-plan:hover,
.button.icon-action.occ-icon.occ-plan:focus-visible,
.button.icon-action.occ-icon.occ-open-plan:hover,
.button.icon-action.occ-icon.occ-open-plan:focus-visible,
.button.secondary.icon-action.occ-icon.occ-plan:hover,
.button.secondary.icon-action.occ-icon.occ-open-plan:hover {
  background: #fef3c7;
  color: #b45309;
  border-color: transparent;
}
.button.icon-action.occ-icon.occ-seen,
.button.secondary.icon-action.occ-icon.occ-seen {
  color: #059669;
  background: #ecfdf5;
}
.button.icon-action.occ-icon.occ-seen.is-seen,
.button.secondary.icon-action.occ-icon.occ-seen.is-seen {
  color: #fff;
  background: #059669;
}
.button.icon-action.occ-icon.occ-seen.is-seen:hover,
.button.icon-action.occ-icon.occ-seen.is-seen:focus-visible {
  background: #047857;
  color: #fff;
}
.button.icon-action.occ-icon.occ-external,
.button.secondary.icon-action.occ-icon.occ-external,
.button.icon-action.occ-icon.occ-transcript,
.button.secondary.icon-action.occ-icon.occ-transcript {
  color: #2563eb;
  background: #eff6ff;
}
.button.icon-action.occ-icon.occ-external:hover,
.button.icon-action.occ-icon.occ-external:focus-visible,
.button.secondary.icon-action.occ-icon.occ-external:hover,
.button.icon-action.occ-icon.occ-transcript:hover,
.button.icon-action.occ-icon.occ-transcript:focus-visible,
.button.secondary.icon-action.occ-icon.occ-transcript:hover {
  background: #dbeafe;
  color: #1d4ed8;
  border-color: transparent;
}
.button.icon-action.occ-icon.occ-recording,
.button.secondary.icon-action.occ-icon.occ-recording {
  color: #9333ea;
  background: #f5f3ff;
}
.button.icon-action.occ-icon.occ-recording:hover,
.button.icon-action.occ-icon.occ-recording:focus-visible,
.button.secondary.icon-action.occ-icon.occ-recording:hover {
  background: #ede9fe;
  color: #7e22ce;
  border-color: transparent;
}
.button.icon-action.occ-icon.occ-leadership-task,
.button.secondary.icon-action.occ-icon.occ-leadership-task,
.button.icon-action.occ-icon.occ-trainer-task,
.button.secondary.icon-action.occ-icon.occ-trainer-task,
.button.icon-action.occ-icon.occ-collaborator-info,
.button.secondary.icon-action.occ-icon.occ-collaborator-info {
  color: #7c3aed;
  background: #f5f3ff;
}
.button.icon-action.occ-icon.occ-leadership-task:hover,
.button.icon-action.occ-icon.occ-leadership-task:focus-visible,
.button.secondary.icon-action.occ-icon.occ-leadership-task:hover,
.button.icon-action.occ-icon.occ-trainer-task:hover,
.button.icon-action.occ-icon.occ-trainer-task:focus-visible,
.button.secondary.icon-action.occ-icon.occ-trainer-task:hover,
.button.icon-action.occ-icon.occ-collaborator-info:hover,
.button.icon-action.occ-icon.occ-collaborator-info:focus-visible,
.button.secondary.icon-action.occ-icon.occ-collaborator-info:hover {
  background: #ede9fe;
  color: #6d28d9;
  border-color: transparent;
}
.button.icon-action.occ-icon.occ-resumo,
.button.secondary.icon-action.occ-icon.occ-resumo {
  color: #4b5563;
  background: #f3f4f6;
}
.button.icon-action.occ-icon.occ-resumo:hover,
.button.icon-action.occ-icon.occ-resumo:focus-visible,
.button.secondary.icon-action.occ-icon.occ-resumo:hover {
  background: #e5e7eb;
  color: #374151;
  border-color: transparent;
}
.button.icon-action.occ-icon.occ-view,
.button.secondary.icon-action.occ-icon.occ-view {
  color: #2563eb;
  background: #eff6ff;
}
.button.icon-action.occ-icon.occ-pdf-client,
.button.secondary.icon-action.occ-icon.occ-pdf-client {
  color: #dc2626;
  background: #fef2f2;
}
.button.icon-action.occ-icon.occ-pdf-client:hover,
.button.icon-action.occ-icon.occ-pdf-client:focus-visible,
.button.secondary.icon-action.occ-icon.occ-pdf-client:hover {
  background: #fee2e2;
  color: #b91c1c;
  border-color: transparent;
}
.button.icon-action.occ-icon.occ-pdf-internal,
.button.secondary.icon-action.occ-icon.occ-pdf-internal {
  color: #4b5563;
  background: #f3f4f6;
}
.button.icon-action.occ-icon.occ-pdf-internal:hover,
.button.icon-action.occ-icon.occ-pdf-internal:focus-visible,
.button.secondary.icon-action.occ-icon.occ-pdf-internal:hover {
  background: #e5e7eb;
  color: #374151;
  border-color: transparent;
}
.button.icon-action.occ-icon.occ-view:hover,
.button.icon-action.occ-icon.occ-view:focus-visible,
.button.secondary.icon-action.occ-icon.occ-view:hover {
  background: #dbeafe;
  color: #1d4ed8;
  border-color: transparent;
}
.button.icon-action.occ-icon[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  top: calc(100% + 7px);
  left: 50%;
  transform: translateX(-50%) translateY(-2px);
  background: #0f172a;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .01em;
  line-height: 1.2;
  padding: 5px 8px;
  border-radius: 6px;
  white-space: nowrap;
  z-index: 20;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .22);
  transition: opacity .12s ease, visibility .12s ease, transform .12s ease;
}
.button.icon-action.occ-icon[data-tooltip]:hover::after,
.button.icon-action.occ-icon[data-tooltip]:focus-visible::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.table-link-icons .button.icon-action.occ-icon[data-tooltip]::after,
.table-actions .button.icon-action.occ-icon[data-tooltip]::after {
  top: auto;
  bottom: calc(100% + 7px);
  transform: translateX(-50%) translateY(2px);
}
.table-link-icons .button.icon-action.occ-icon[data-tooltip]:hover::after,
.table-link-icons .button.icon-action.occ-icon[data-tooltip]:focus-visible::after,
.table-actions .button.icon-action.occ-icon[data-tooltip]:hover::after,
.table-actions .button.icon-action.occ-icon[data-tooltip]:focus-visible::after {
  transform: translateX(-50%) translateY(0);
}
.button.plan {
  color: #fff;
  background: #ea7a1c;
  border-color: #d86c12;
}
.button.plan:hover { background: #d86c12; border-color: #c25f0c; }
.button.small { min-height: 30px; padding: 5px 9px; font-size: 11px; border-radius: 8px; }
.icon-button { width: 40px; height: 40px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--ink); }

input, select, textarea {
  width: 100%; border: 1px solid var(--input-border); background: var(--input-bg); color: var(--ink); border-radius: 9px;
  padding: 10px 11px; outline: none; transition: .15s ease; color-scheme: inherit;
}
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(31,111,255,.12); }
textarea { resize: vertical; min-height: 85px; }
label.field { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 700; color: var(--ink); }
.field small { color: var(--muted); font-weight: 400; line-height: 1.4; }
.form-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 14px; }
.field-compact { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--muted); min-width: 88px; }
.field-compact .input-compact { width: 72px; min-width: 72px; text-align: center; padding: 8px 6px; }
.routine-ad-row { display: flex; align-items: end; gap: 12px; flex-wrap: wrap; }
.routine-ad-row .field-grow { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.routine-ad-row .field-grow input { width: 100%; }
.span-12 { grid-column: span 12; }.span-8 { grid-column: span 8; }.span-6 { grid-column: span 6; }.span-4 { grid-column: span 4; }.span-3 { grid-column: span 3; }.span-2 { grid-column: span 2; }
.form-section { grid-column: span 12; padding-top: 6px; }
.form-section h3 { margin: 0 0 4px; font-size: 14px; }
.form-section p { margin: 0; color: var(--muted); font-size: 11px; }
.form-divider { grid-column: span 12; height: 1px; background: var(--border); margin: 4px 0; }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 5px 9px; border-radius: 99px; font-size: 10px; font-weight: 800; white-space: nowrap; border: 1px solid transparent; }
.badge.success { color: var(--success); background: var(--success-bg); border-color: rgba(16, 185, 129, 0.2); }
.badge.warning { color: var(--warning); background: var(--warning-bg); border-color: rgba(245, 158, 11, 0.2); }
.badge.danger { color: var(--danger); background: var(--danger-bg); border-color: rgba(239, 68, 68, 0.2); }
.badge.info { color: var(--primary-dark); background: var(--primary-soft); border-color: rgba(59, 130, 246, 0.2); }
.badge.neutral { color: var(--muted); background: var(--surface-2); border-color: var(--border); }
.badge.purple { color: var(--primary-dark); background: var(--primary-soft); border-color: rgba(59, 130, 246, 0.2); }
/* Em treinamento: selo próprio (verde-azulado), diferente de férias/licença. */
.badge.training { color: #0f766e; background: #ccfbf1; border-color: rgba(13, 148, 136, 0.25); }
html.dark .badge.training { color: #5eead4; background: rgba(20, 184, 166, 0.16); border-color: rgba(45, 212, 191, 0.3); }

.empty-state { text-align: center; padding: 42px 20px; color: var(--muted); }
.empty-state .empty-icon { width: 54px; height: 54px; display: grid; place-items: center; margin: 0 auto 12px; border-radius: 16px; background: var(--primary-soft); color: var(--primary); font-size: 24px; }
.empty-state.is-loading-panel .empty-icon { background: color-mix(in srgb, var(--primary) 12%, transparent); }
.empty-state.is-loading-panel .cq-spinner--lg { width: 1.55em; height: 1.55em; }
.empty-state h3 { color: var(--ink); margin: 0 0 6px; }
.empty-state p { margin: 0 auto 16px; max-width: 480px; line-height: 1.5; }

.account-reviews-toolbar {
  justify-content: flex-end;
}

/* Insights do Expert de CS (IA) — topo da Revisão de contas */
.ai-insights-panel {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 6px; /* + 18px do gap do .page-stack = 24px */
}
.ai-insights-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-bottom: 16px;
}
.ai-insights-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
}
.ai-insights-title svg { color: var(--primary); flex-shrink: 0; }
.ai-insights-meta { font-size: 12px; color: var(--muted); text-align: right; }
.ai-insights-base { display: block; margin-top: 2px; }
.ai-insights-empty { margin: 0; font-size: 14px; line-height: 1.5; color: var(--muted); }

.ai-insights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.insight-col { --insight-tone: var(--primary); min-width: 0; }
.insight-col-success { --insight-tone: var(--success); }
.insight-col-danger { --insight-tone: var(--danger); }
.insight-col-primary { --insight-tone: var(--primary); }
.insight-col-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 700;
  color: var(--insight-tone);
}
.insight-col-title svg { flex-shrink: 0; }
.insight-col-empty { margin: 0; font-size: 14px; color: var(--muted); }

.insight-list { list-style: none; padding: 0; margin: 0; }
.insight-list li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 12px;
  font-size: 14px;
  color: var(--ink);
  line-height: 1.5;
}
.insight-list li:last-child { margin-bottom: 0; }
.insight-list li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: calc(0.75em - 4px); /* centraliza na 1ª linha (line-height 1.5) */
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--insight-tone);
}

.ai-insights-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 20px;
}
.ai-insights-footer .button svg { width: 16px; height: 16px; }

.filters-bar { display: grid; grid-template-columns: minmax(180px, 1.4fr) repeat(2, minmax(140px, .8fr)) auto; gap: 10px; align-items: end; }
.filters-bar.training-filters-bar {
  grid-template-columns: minmax(220px, 320px);
}
.filters-bar.accounts-filters-bar,
.filters-bar.leadership-filters-bar {
  grid-template-columns: minmax(180px, 1.1fr) minmax(200px, 1fr) auto;
  align-items: end;
  gap: 8px;
  padding: 12px 14px;
}
.page-stack.accounts-page {
  gap: 14px;
}
.accounts-page-heading {
  align-items: flex-start;
  gap: 10px;
}
.accounts-page-heading h2 {
  font-size: 16px;
}
.accounts-page-heading p {
  margin-top: 2px;
  max-width: 72ch;
  line-height: 1.35;
}
.filters-bar.accounts-filters-bar label {
  margin: 0;
  gap: 4px;
}
.filters-bar.accounts-filters-bar .accounts-kpi-filter-field,
.filters-bar.leadership-filters-bar .accounts-kpi-filter-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.filters-bar.accounts-filters-bar .accounts-kpi-filter-field > span,
.filters-bar.leadership-filters-bar .accounts-kpi-filter-field > span {
  font-size: 11px;
  color: var(--muted);
  font-weight: 700;
}
.filters-bar.accounts-filters-bar .accounts-kpi-filter,
.filters-bar.leadership-filters-bar .leadership-kpi-filter {
  width: 100%;
}
.filters-bar.accounts-filters-bar .filter-button,
.filters-bar.leadership-filters-bar .filter-button {
  width: 100%;
  justify-content: space-between;
}
.filters-bar.accounts-filters-bar .accounts-kpi-filter .filter-menu,
.filters-bar.leadership-filters-bar .leadership-kpi-filter .filter-menu {
  left: 0;
  right: auto;
  width: min(380px, calc(100vw - 48px));
}
.leadership-alert-list { display: flex; flex-direction: column; gap: 10px; }
.leadership-alert-item {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.leadership-alert-body { flex: 1 1 240px; min-width: 0; }
.leadership-alert-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  justify-content: flex-end;
}
.leadership-alert-actions .badge { margin-left: 8px; }
.filters-bar label { display: flex; flex-direction: column; gap: 5px; font-size: 11px; color: var(--muted); font-weight: 700; }

.rank-period-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  align-items: end;
  padding: 14px 20px;
  margin: 0;
  border-bottom: 1px solid var(--border);
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
}
.table-card .rank-period-bar {
  padding: 14px 20px;
}
.rank-period-bar label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 11px;
  color: var(--muted);
  font-weight: 700;
  min-width: 0;
  flex: 0 1 auto;
}
.rank-period-bar select,
.rank-period-bar input {
  height: 36px;
  min-width: 140px;
  max-width: 100%;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  box-sizing: border-box;
}
.rank-period-bar .rank-period-note {
  flex: 1 1 200px;
  min-width: 0;
  max-width: 100%;
  align-self: center;
  font-size: 12px;
  line-height: 1.35;
  margin: 0;
}

.collaborator-grid,
.pending-collaborator-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  align-items: stretch;
}
@media (min-width: 768px) {
  .collaborator-grid,
  .pending-collaborator-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .collaborator-grid,
  .pending-collaborator-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.person-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0;
  min-height: 100%;
  height: 100%;
  cursor: default;
  transition: box-shadow .15s ease, border-color .15s ease;
}
.person-card.is-clickable { cursor: pointer; }
.person-card.is-clickable:hover {
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
  border-color: color-mix(in srgb, var(--primary) 50%, var(--border));
}
.person-card.is-clickable:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-color: color-mix(in srgb, var(--primary) 50%, var(--border));
}
html.dark .person-card.is-clickable:hover {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}
.person-card.is-pending {
  border-style: dashed;
  background: color-mix(in srgb, var(--warning, #e59a22) 6%, var(--mix-base));
}
.person-card-body { display: flex; flex-direction: column; min-width: 0; }
.person-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.person-identity { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1; }
.person-identity > .person-name,
.person-identity > div:last-child { min-width: 0; flex: 1; }
.avatar { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-dark); font-weight: 850; overflow: hidden; flex: 0 0 auto; }
.avatar.is-round { width: 48px; height: 48px; border-radius: 999px; font-size: 14px; font-weight: 700; }
.avatar.is-md { width: 56px; height: 56px; border-radius: 18px; font-size: 16px; }
.avatar.is-lg { width: 52px; height: 52px; border-radius: 16px; }
.avatar.has-photo { padding: 0; background: var(--surface-2); }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-wrap { position: relative; flex: 0 0 auto; width: fit-content; }
.avatar-edit-btn {
  position: absolute;
  right: -4px;
  bottom: -4px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--primary-dark);
  display: grid;
  place-items: center;
  padding: 0;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
  z-index: 1;
}
.avatar-edit-btn:hover { background: var(--primary-soft); }
.avatar-edit-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.collaborator-status-select {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  cursor: pointer;
  max-width: 148px;
  padding-right: 18px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23566174' d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 10px 6px;
}
.collaborator-status-select:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.collaborator-status-select:disabled { cursor: default; opacity: 1; }
.person-name {
  margin: 0 0 2px;
  font-size: 14px;
  line-height: 1.25;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.person-identity .person-name { margin-top: 0; }
.person-role {
  display: block;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 400;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}
.person-card .badge.is-compact,
.person-card .collaborator-status-select.is-compact {
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  flex-shrink: 0;
}
.person-card .badge.success.is-compact,
.person-card .collaborator-status-select.success.is-compact {
  background: color-mix(in srgb, #10b981 10%, transparent);
  color: #059669;
  border-color: color-mix(in srgb, #10b981 20%, transparent);
}
html.dark .person-card .badge.success.is-compact,
html.dark .person-card .collaborator-status-select.success.is-compact {
  color: #34d399;
}
.person-sector-field { display: flex; flex-direction: column; gap: 5px; color: var(--muted); font-size: 11px; font-weight: 700; }
.person-sector-field.is-compact {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  font-weight: 600;
  font-size: 11px;
}
.person-sector-field.is-compact select { height: 32px; flex: 1; min-width: 0; }
.person-sector-field select { height: 36px; width: 100%; }
.person-sector-missing { margin: 0 0 16px; font-size: 12px; }
.person-kpi-box {
  background: color-mix(in srgb, var(--surface-2) 85%, var(--bg));
  border: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
  border-radius: 12px;
  padding: 12px;
  margin: 0 0 16px;
}
html.dark .person-kpi-box {
  background: color-mix(in srgb, var(--surface-2) 50%, transparent);
  border-color: color-mix(in srgb, var(--border) 80%, transparent);
}
.person-kpi-main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 10px;
}
.person-kpi-main-item { min-width: 0; }
.person-kpi-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 2px;
}
.person-kpi-value {
  display: block;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.15;
  color: var(--ink);
}
.person-kpi-value.is-accent { color: #2563eb; }
html.dark .person-kpi-value.is-accent { color: #60a5fa; }
.person-kpi-sub {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  margin: 0;
  font-size: 11px;
  line-height: 1.4;
  color: var(--muted);
}
.person-kpi-sub span { white-space: nowrap; }
.person-kpi-sep { color: color-mix(in srgb, var(--muted) 70%, transparent); }
.person-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 0; padding-top: 12px; border-top: 1px solid var(--border); }
.person-metrics div { text-align: center; }
.person-metrics strong { display: block; font-size: 15px; }
.person-metrics span { color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .02em; line-height: 1.25; }
.workspace-vendas .person-metrics strong { font-size: 13px; letter-spacing: 0; }
.sales-closer-table-card { margin-top: 4px; }
.vendas-profile .profile-metric-hit { cursor: default; }
.person-actions { margin-top: auto; display: flex; justify-content: flex-end; gap: 6px; flex-wrap: wrap; }
.person-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid color-mix(in srgb, var(--border) 85%, transparent);
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  transition: color .15s ease;
}
.person-card.is-clickable:hover .person-card-footer,
.person-card.is-clickable:focus-visible .person-card-footer {
  color: var(--primary);
}
.person-card-arrow {
  display: inline-flex;
  align-items: center;
  transition: transform .15s ease;
}
.person-card-arrow svg { width: 16px; height: 16px; }
.person-card.is-clickable:hover .person-card-arrow,
.person-card.is-clickable:focus-visible .person-card-arrow {
  transform: translateX(4px);
}
.profile-heading-identity { display: flex; align-items: center; gap: 12px; }
.profile-heading-identity h2 { margin: 0; }

.profile-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  box-shadow: 0 1px 2px rgba(0, 26, 109, .06);
}
.profile-hero-main {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.profile-hero-identity h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
}
.profile-hero-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}
.profile-hero-meta {
  margin: 6px 0 0;
  color: #3d4d66;
  font-size: 12px;
  font-weight: 700;
}
.profile-hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-shrink: 0;
}
.profile-hero-actions .button.indigo {
  white-space: nowrap;
}

/* IS vendo o próprio perfil: os indicadores não abrem detalhe (o CSAT abre). */
.profile-kpi-board.is-readonly button:not([data-kpi="csat"]) {
  pointer-events: none;
  cursor: default;
}
/* Círculo (Visão Geral embutida): o quadro cresce com o conteúdo. */
.impl-circle-frame {
  display: block;
  width: 100%;
  min-height: 60vh;
  border: 0;
  background: transparent;
}
/* IS no Dashboard: painel de duração sem clique nem exportação. */
.page-stack.is-own-scope .implantation-summary-card {
  pointer-events: none;
  cursor: default;
}
.page-stack.is-own-scope [data-action="export-leadership-duration"] {
  display: none;
}
.profile-kpi-board {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 768px) {
  .profile-kpi-board {
    grid-template-columns: 1fr 1fr;
  }
  /* Número ímpar de cards: o último ocupa a linha inteira em vez de ficar sozinho pela metade. */
  .vendas-profile .profile-kpi-board > :last-child:nth-child(odd) {
    grid-column: 1 / -1;
    min-height: 0;
  }
}
.profile-rich-kpi {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 210px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(0, 26, 109, .06);
}
.profile-rich-kpi.is-critical {
  border-color: #fecaca;
  background: #fef2f2;
}
.profile-rich-kpi.is-attention {
  border-color: #fde68a;
  background: rgba(255, 247, 237, .5);
}
.profile-rich-kicker {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #3d4d66;
}
.profile-metric-hit {
  display: block;
  width: 100%;
  margin: 0;
  padding: 8px 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.profile-metric-hit:hover,
.profile-metric-hit:focus-visible {
  background: var(--surface-2);
  outline: none;
}
.profile-metric-hit strong {
  display: block;
  font-size: 28px;
  letter-spacing: -.03em;
  line-height: 1.1;
  color: var(--ink);
}
.profile-metric-label {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  font-weight: 700;
  color: #3d4d66;
}
.profile-metric-hit.is-sub,
.profile-rich-timeline {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
  color: #3d4d66;
}
.profile-rich-timeline {
  margin: 4px 0 2px;
  padding: 0 10px;
}
.profile-rich-journey {
  margin: 0 10px 4px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--ink);
}
.profile-metric-hit.is-foot {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.profile-metric-hit.is-foot .profile-metric-label {
  display: inline;
  margin-top: 0;
}
.profile-alert-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  padding: 4px 8px;
  border-radius: 99px;
  background: #fef2f2;
  color: #dc2626;
  font-size: 11px;
  font-weight: 800;
}
.profile-rich-kpi.is-critical .profile-metric-hit strong,
.profile-rich-kpi.is-critical .profile-alert-badge {
  color: #dc2626;
}
.profile-scorecard-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 4px 0;
}
.profile-scorecard-metrics.has-4 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (max-width: 520px) {
  .profile-scorecard-metrics {
    grid-template-columns: 1fr;
  }
}
.profile-scorecard-metric {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: var(--surface-2);
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.profile-scorecard-metric:hover,
.profile-scorecard-metric:focus-visible {
  filter: brightness(.97);
  outline: none;
}
.profile-scorecard-value {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.1;
  color: var(--ink);
}
.profile-scorecard-label {
  font-size: 11px;
  font-weight: 700;
  color: #3d4d66;
}
.profile-scorecard-sub {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}
.profile-scorecard-metric.is-alert {
  background: var(--danger-bg);
}
.profile-scorecard-metric.is-alert .profile-scorecard-value {
  color: var(--danger);
}
.profile-scorecard-metric.is-good {
  background: var(--success-bg);
}
.profile-scorecard-metric.is-good .profile-scorecard-value {
  color: var(--success);
}
.profile-scorecard-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin-top: 6px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted);
}
.profile-rich-kpi.is-loading {
  pointer-events: none;
  opacity: .88;
}
html.dark .profile-rich-kpi.is-critical {
  border-color: color-mix(in srgb, var(--danger) 40%, var(--surface));
  background: color-mix(in srgb, var(--danger) 8%, var(--surface));
}
html.dark .profile-rich-kpi.is-attention {
  border-color: color-mix(in srgb, var(--warning) 35%, var(--surface));
  background: color-mix(in srgb, var(--warning) 6%, var(--surface));
}
html.dark .profile-hero-meta,
html.dark .profile-rich-kicker,
html.dark .profile-metric-label,
html.dark .profile-metric-hit.is-sub,
html.dark .profile-rich-timeline,
html.dark .profile-scorecard-label {
  color: var(--muted);
}
html.dark .profile-alert-badge {
  background: var(--danger-bg);
}
html.dark .profile-alert-badge,
html.dark .profile-rich-kpi.is-critical .profile-metric-hit strong,
html.dark .profile-rich-kpi.is-critical .profile-alert-badge {
  color: var(--danger);
}
html.dark .profile-scorecard-metric:hover,
html.dark .profile-scorecard-metric:focus-visible {
  filter: brightness(1.15);
}
@media (max-width: 720px) {
  .profile-hero {
    flex-direction: column;
  }
  .profile-hero-actions {
    width: 100%;
    justify-content: flex-start;
  }
}
.profile-xray-intro { margin-bottom: 0; }
.profile-xray-intro .kpi-grid { margin-top: 4px; }
.profile-xray-table td { vertical-align: top; }
.profile-flow-age {
  display: inline-block;
  margin-top: 6px;
  font-size: 11px;
  line-height: 1.35;
}
.profile-flow-age a { color: inherit; }
.profile-flow-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.profile-flow-missing-btn,
.profile-flow-churn-btn {
  min-width: 28px;
  padding: 2px 8px;
  line-height: 1.2;
  font-weight: 800;
}
.profile-flow-churn-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
}
.profile-flow-missing-choice {
  font-size: 13px;
  font-weight: 600;
  color: #3b4558;
}
.profile-flow-missing-options {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}
.profile-flow-missing-options label {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: #3b4558;
  cursor: pointer;
}
.profile-flow-missing-options input[type="radio"] {
  width: auto;
  min-width: 16px;
  height: 16px;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  box-shadow: none;
  flex: 0 0 auto;
  accent-color: var(--primary);
}
.profile-flow-trainer-sent-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.profile-flow-trainer-sent-link {
  display: inline-flex;
  text-decoration: none;
}
.profile-flow-trainer-sent-link:hover .badge {
  filter: brightness(0.96);
}
.profile-flow-steps li.is-trainer-sent {
  box-shadow: inset 0 0 0 1px var(--success);
}
.profile-flow-gestor-alert a { color: inherit; }
.profile-flow-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 420px;
}
.profile-flow-steps li {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 99px;
  background: #eef1f5;
  color: #566174;
  line-height: 1.3;
}
.profile-flow-steps li.is-done { background: var(--success-bg); color: var(--success); }
.profile-flow-steps li.is-skipped { background: var(--danger-bg); color: var(--danger); }
.profile-flow-steps li.is-justified { background: var(--info-bg); color: var(--info); }
.profile-flow-steps li.is-pending { background: var(--warning-bg); color: var(--warning); }
.profile-flow-steps li.is-pending.is-optional {
  background: #eef1f5;
  color: #7c8697;
  box-shadow: inset 0 0 0 1px #d7dde6;
}
.profile-flow-steps li.is-clickable { cursor: pointer; }
.profile-flow-steps li.is-clickable:hover { filter: brightness(0.96); box-shadow: inset 0 0 0 1px currentColor; }
.profile-csi-fields { display: flex; flex-wrap: wrap; gap: 4px; max-width: 520px; }
.profile-csi-chip {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 99px;
  background: #eef1f5;
  color: #566174;
}
.profile-csi-chip.is-ok { background: var(--success-bg); color: var(--success); }
.profile-csi-chip.is-missing { background: var(--danger-bg); color: var(--danger); }
.profile-csi-details { margin-top: 8px; }
.profile-csi-details summary {
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  color: var(--primary-dark);
}
.profile-csi-details .report-list { margin-top: 8px; }
.profile-evidence-facts li { line-height: 1.45; }
@media (max-width: 980px) {
  .profile-flow-steps, .profile-csi-fields { max-width: none; }
}
.collaborator-photo-field { display: grid; grid-template-columns: 88px 1fr; gap: 14px; align-items: center; }
.collaborator-photo-preview { width: 88px; height: 88px; border-radius: 18px; overflow: hidden; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-dark); font-weight: 850; border: 1px solid var(--border); }
.collaborator-photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.collaborator-photo-controls { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.collaborator-photo-controls .muted { margin: 0; font-size: 12px; }

button.sort-th {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 700;
  padding: 0;
  text-align: left;
  white-space: nowrap;
}
button.sort-th:hover { color: var(--primary); }
button.sort-th.active { color: var(--primary-dark); }
button.link-button {
  border: 0;
  background: transparent;
  color: var(--primary);
  font: inherit;
  padding: 0;
  text-align: left;
}
button.link-button:hover { text-decoration: underline; }
button.activity-window-btn {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 100%;
  white-space: normal;
  line-height: 1.3;
}

.routine-day-bar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 20px;
}
.routine-day-bar-main {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 12px 18px;
}
.routine-day-picker-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 11px;
  color: var(--muted);
  font-weight: 700;
  margin: 0;
}
.routine-day-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-height: 36px;
}
.routine-day-sync {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
}
.routine-day-controls { display: flex; align-items: center; gap: 6px; }
.routine-day-controls input[type="date"] { min-width: 150px; height: 36px; }
.routine-day-table.routine-day-nonbusiness tr.routine-row-soft td {
  opacity: 0.62;
}
.routine-day-table.routine-day-nonbusiness tr.routine-row-soft:focus-within td,
.routine-day-table.routine-day-nonbusiness tr.routine-row-soft:hover td {
  opacity: 1;
}
.table-scroll:has(.routine-day-table) {
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}
.routine-day-table {
  table-layout: fixed;
  width: 100%;
  min-width: 920px;
  max-width: none;
}
.routine-day-table th,
.routine-day-table td {
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
  padding-left: 8px;
  padding-right: 8px;
}
.routine-day-table th:nth-child(1),
.routine-day-table td:nth-child(1) { width: 18%; min-width: 140px; }
.routine-day-table th.col-login,
.routine-day-table td.col-login { width: 96px; }
.routine-day-table th.col-login-unico,
.routine-day-table td.col-login-unico { width: 72px; text-align: center; }
.routine-day-table th.col-access,
.routine-day-table td.col-access { width: 148px; }
.routine-day-table th.col-task-time,
.routine-day-table td.col-task-time { width: 78px; }
.routine-day-table th.col-metric,
.routine-day-table td.col-metric { width: 78px; text-align: center; }
.routine-day-table td.col-metric.is-alert {
  color: #8a4307;
  font-weight: 700;
}
.routine-metric-with-alert {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.routine-meeting-alert {
  display: inline-flex;
  align-items: center;
  color: #d97706;
  vertical-align: middle;
  line-height: 0;
}
.routine-meeting-alert svg {
  width: 14px;
  height: 14px;
}
.routine-day-table tr.has-meeting-alert {
  background: color-mix(in srgb, #f59e0b 8%, transparent);
}
.routine-day-table .routine-access-select { width: 100%; min-width: 0; }
.routine-day-table .routine-login-unico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  user-select: none;
}
.routine-day-table .routine-login-unico input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--primary);
  cursor: pointer;
}
.routine-day-table th.col-ad,
.routine-day-table td.col-ad { width: 220px; overflow: visible; }
.routine-day-table th.col-crm,
.routine-day-table td.col-crm { width: 128px; }
.routine-day-table th.col-comment,
.routine-day-table td.col-comment { width: 280px; overflow: visible; }
.routine-day-table .routine-inline-input {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 8px;
  background: var(--surface);
}
.routine-ad-cell {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.routine-ad-cell.is-readonly > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.routine-ad-field {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  min-width: 0;
}
.routine-ad-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .03em;
  white-space: nowrap;
}
.routine-day-table .routine-ad-select {
  font-size: 12px;
  font-weight: 700;
  padding: 6px 8px;
}
.routine-day-table .routine-ad-select.ad-sim {
  color: var(--success);
  background: var(--success-bg);
  border-color: #b7e4c7;
}
.routine-day-table .routine-ad-select.ad-nao {
  color: var(--danger);
  background: var(--danger-bg);
  border-color: #f6caca;
}
.routine-day-table .routine-ad-select.ad-mais_ou_menos {
  color: var(--warning);
  background: var(--warning-bg);
  border-color: #f0d9a8;
}
.routine-comment-cell {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.routine-comment-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}
.routine-comment-icon {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink, #1c2240);
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.routine-comment-icon:hover {
  background: var(--surface-2);
  border-color: #b8c0d0;
}
.routine-comment-icon:focus-visible {
  outline: 2px solid #4b6bfb;
  outline-offset: 1px;
}
.routine-comment-icon.is-danger {
  color: var(--danger);
}
.routine-comment-icon.is-danger:hover {
  background: var(--danger-bg);
  border-color: #f6caca;
}
.routine-day-table td.col-login .routine-inline-input[type="time"] {
  min-width: 0;
  padding: 7px 6px;
  font-variant-numeric: tabular-nums;
}
.routine-day-table .routine-comment-input {
  min-width: 0;
  min-height: 58px;
  resize: vertical;
  line-height: 1.35;
}
.routine-day-table .routine-crm-select { font-size: 12px; font-weight: 700; }
.routine-day-table .routine-crm-select.crm-organizado {
  border-color: #86efac;
  background: var(--success-bg);
  color: var(--success);
}
.routine-day-table .routine-crm-select.crm-parcial {
  border-color: #fcd34d;
  background: var(--warning-bg);
  color: var(--warning);
}
.routine-day-table .routine-crm-select.crm-desorganizado {
  border-color: #fca5a5;
  background: var(--danger-bg);
  color: var(--danger);
}
.routine-save-bar {
  position: sticky;
  bottom: 12px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 4px;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 28px rgba(23, 32, 51, 0.12);
  backdrop-filter: blur(10px);
}
.routine-save-bar strong { display: block; font-size: 13px; }
.routine-save-bar .muted { font-size: 12px; }
.routine-save-bar .button { min-width: 180px; }

.insight-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.insight-card { border: 1px solid var(--border); border-radius: 13px; padding: 16px; background: var(--surface); }
.insight-card h3 { margin: 0 0 8px; font-size: 13px; }
.insight-card p { color: var(--muted); font-size: 12px; line-height: 1.55; margin: 0; }

.report-cover { padding: 26px; border-radius: 16px; background: linear-gradient(135deg, #191c3a, #4b46c7); color: #fff; }
.report-cover p { color: #d6d8f4; margin: 7px 0 0; }
.report-section h3 { margin: 0 0 10px; }
.report-list { margin: 0; padding-left: 20px; color: #3b4558; line-height: 1.65; }
.weekday-morning-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 2px; }

.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.settings-panel { border: 1px solid var(--border); border-radius: 14px; padding: 18px; }
.settings-panel.span-all { grid-column: 1 / -1; }
.settings-panel h3 { margin: 0 0 5px; font-size: 15px; }
.settings-panel > p { color: var(--muted); font-size: 12px; line-height: 1.5; margin: 0 0 15px; }
.access-log-divider { margin: 16px 0 10px; padding-top: 12px; border-top: 1px solid #edf0f5; color: var(--muted); font-size: 11px; letter-spacing: .02em; text-transform: uppercase; }
.button-row { display: flex; gap: 8px; flex-wrap: wrap; }
.notice { border-radius: 12px; padding: 13px 14px; font-size: 12px; line-height: 1.5; border: 1px solid transparent; }
.notice.info { background: var(--info-bg); color: var(--primary-dark); border-color: rgba(59, 130, 246, 0.2); }
.notice.warning { background: var(--warning-bg); color: var(--warning); border-color: rgba(245, 158, 11, 0.2); }
.notice.success { background: var(--success-bg); color: var(--success); border-color: rgba(16, 185, 129, 0.2); }
.notice.danger { background: var(--danger-bg); color: var(--danger); border-color: rgba(239, 68, 68, 0.2); }

.training-alert {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 16px;
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px solid #fde68a;
  border-radius: 12px;
  background: var(--warning-bg);
  color: #78350f;
  font-size: 12px;
  line-height: 1.45;
}
.training-alert-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: #fef3c7;
  color: #b45309;
  flex-shrink: 0;
}
.training-alert-icon svg {
  width: 18px;
  height: 18px;
  display: block;
}
.training-alert-copy {
  flex: 1 1 180px;
  min-width: 0;
}
.training-alert-copy strong {
  display: block;
  font-size: 13px;
  font-weight: 750;
  color: #78350f;
}
.training-alert-copy p {
  margin: 2px 0 0;
  color: #92400e;
  font-size: 12px;
}
.training-alert-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-left: auto;
}
.training-alert-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  background: #fde68a;
  color: #78350f;
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}
.training-alert-badge.is-blocked {
  background: #fecaca;
  color: #7f1d1d;
}

.ooo-suggestions-section .card-header {
  padding-bottom: 4px;
}
.ooo-suggestions {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
  padding: 4px 16px 18px;
  align-items: start;
}
.ooo-suggestions-extra {
  grid-column: 1 / -1;
  margin: 0;
}
.ooo-suggestion-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
  min-width: 0;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.ooo-suggestion-card:hover {
  border-color: color-mix(in srgb, var(--primary) 32%, var(--border));
  box-shadow: 0 10px 26px rgba(18, 32, 58, 0.08);
  transform: translateY(-1px);
}
.ooo-suggestion-card.is-done {
  border-color: #bbf7d0;
  background: linear-gradient(180deg, #f8fffb 0%, #fff 42%);
}
.ooo-suggestion-card[open] {
  grid-column: 1 / -1;
  border-color: color-mix(in srgb, var(--primary) 40%, var(--border));
  box-shadow: 0 12px 32px rgba(18, 32, 58, 0.1);
  transform: none;
}
.ooo-suggestion-card[open] .ooo-suggestion-summary {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  gap: 10px 14px;
  padding: 16px 16px 12px;
}
.ooo-suggestion-card[open] .ooo-suggestion-id {
  flex: 1;
  width: auto;
  min-width: 140px;
}
.ooo-suggestion-card[open] .ooo-suggestion-chips {
  justify-content: flex-start;
  width: 100%;
}
.ooo-suggestion-card[open] .ooo-suggestion-more {
  margin-left: auto;
}
.ooo-suggestion-card[open] .ooo-suggestion-photo .avatar,
.ooo-suggestion-card[open] .ooo-suggestion-photo .avatar-wrap .avatar {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  font-size: 16px;
}
.modal-body .ooo-suggestions {
  padding: 8px 0 0;
}
.ooo-suggestion-summary {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  padding: 18px 14px 14px;
  cursor: pointer;
  list-style: none;
}
.ooo-suggestion-summary::-webkit-details-marker,
.ooo-suggestion-summary::marker {
  display: none;
  content: none;
}
.ooo-suggestion-summary:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}
.ooo-suggestion-photo {
  display: grid;
  place-items: center;
}
.ooo-suggestion-photo .avatar,
.ooo-suggestion-photo .avatar-wrap .avatar {
  width: 64px;
  height: 64px;
  border-radius: 22px;
  font-size: 20px;
  box-shadow: 0 0 0 3px #fff, 0 0 0 5px color-mix(in srgb, var(--primary) 22%, transparent);
}
.ooo-suggestion-card.is-done .ooo-suggestion-photo .avatar {
  box-shadow: 0 0 0 3px #fff, 0 0 0 5px color-mix(in srgb, #16a34a 28%, transparent);
}
.ooo-suggestion-id {
  min-width: 0;
  width: 100%;
}
.ooo-suggestion-id h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.25;
  color: var(--ink);
}
.ooo-suggestion-id .muted {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 3px 0 0;
  font-size: 11px;
  line-height: 1.35;
}
.ooo-suggestion-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}
.ooo-suggestion-teaser {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 100%;
  font-size: 12.5px;
  line-height: 1.45;
  color: #475569;
}
.ooo-suggestion-card[open] .ooo-suggestion-teaser {
  display: none;
}
.ooo-suggestion-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  font-size: 11px;
  font-weight: 750;
  color: var(--primary);
}
.ooo-suggestion-more::after {
  content: '';
  width: 6px;
  height: 6px;
  border-right: 1.8px solid currentColor;
  border-bottom: 1.8px solid currentColor;
  transform: rotate(45deg);
  margin-top: -3px;
  transition: transform .16s ease;
}
.ooo-more-close { display: none; }
.ooo-suggestion-card[open] .ooo-more-open { display: none; }
.ooo-suggestion-card[open] .ooo-more-close { display: inline; }
.ooo-suggestion-card[open] .ooo-suggestion-more::after {
  transform: rotate(-135deg);
  margin-top: 2px;
}
.ooo-suggestion-body {
  padding: 0 16px 16px;
  border-top: 1px solid var(--border);
  margin-top: 2px;
  padding-top: 12px;
  text-align: left;
}
.ooo-suggestion-text {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: #1e293b;
}
.ooo-suggestion-block {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #eef2f7;
}
.ooo-suggestion-block h4 {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #64748b;
}
.ooo-suggestion-block p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: #1e293b;
}
.ooo-suggestion-block.is-praise {
  background: #f0fdf4;
  border-color: #bbf7d0;
}
.ooo-suggestion-block.is-praise h4 {
  color: #166534;
}
.ooo-suggestion-block.is-integration {
  background: #eff6ff;
  border-color: #bfdbfe;
}
.ooo-suggestion-block.is-integration h4 {
  color: #1d4ed8;
}
.ooo-suggestion-block.is-energy {
  background: var(--warning-bg);
  border-color: #fde68a;
}
.ooo-suggestion-block.is-energy h4 {
  color: #92400e;
}
.ooo-suggestion-block.is-next {
  background: #f5f3ff;
  border-color: #ddd6fe;
}
.ooo-suggestion-block.is-next h4 {
  color: #6d28d9;
}

.pointed-errors-team {
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px solid #fde68a;
  border-radius: 14px;
  background: var(--warning-bg);
}
.pointed-errors-team h3 {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 800;
}
.pointed-errors-team-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}
.pointed-errors-team-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 8px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid #fef3c7;
}
.pointed-errors-team-item strong {
  font-size: 13px;
  line-height: 1.35;
}
.pointed-errors-team-item p {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 12px;
}
.pointed-error-themes {
  display: grid;
  gap: 12px;
}
.pointed-error-theme {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #f8fafc;
}
.pointed-error-theme.is-recurring {
  background: var(--warning-bg);
  border-color: #fdba74;
}
.pointed-error-theme-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.pointed-error-theme-head h4 {
  margin: 0;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.35;
}
.pointed-error-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}
.pointed-error-theme .pointed-error-row:first-of-type {
  border-top: 0;
  padding-top: 2px;
}
.pointed-error-row-copy {
  min-width: 0;
  flex: 1;
}
.pointed-error-row-copy p {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: #1e293b;
}
.pointed-error-row-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.pointed-error-analysis-nav {
  margin-bottom: 12px;
}
.pointed-error-analysis-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.pointed-error-analysis-head h3 {
  margin: 0;
  font-size: 18px;
}
.pointed-error-analysis-head p {
  margin: 4px 0 0;
}
.pointed-error-analysis-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}
.pointed-error-recurring-flag {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  font-size: 13px;
}
.pointed-error-block {
  margin: 0 0 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #f8fafc;
}
.pointed-error-block h4 {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #64748b;
}
.pointed-error-block.is-private {
  background: var(--warning-bg);
  border-color: #fde68a;
}
.pointed-error-findings {
  font-size: 14px;
  line-height: 1.55;
  color: #1e293b;
  word-break: break-word;
}
.pointed-error-evidence {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.pointed-error-evidence img {
  width: 120px;
  height: 90px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
}
.pointed-error-siblings .pointed-error-row {
  padding: 10px 0;
}
.pointed-error-analysis-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.modal-backdrop { position: fixed; inset: 0; z-index: 100; background: var(--overlay); display: grid; place-items: center; padding: 18px; backdrop-filter: blur(4px); will-change: backdrop-filter, transform; transform: translateZ(0); }
.modal { width: min(760px, 100%); max-height: calc(100vh - 36px); display: flex; flex-direction: column; background: var(--surface); color: var(--ink); border: 1px solid var(--border); border-radius: 18px; box-shadow: 0 24px 80px rgba(0,0,0,.25); overflow: hidden; }
.modal.large { width: min(1060px, 100%); }
.modal.medium { width: min(800px, 100%); }
.modal.small { width: min(460px, 100%); }
.modal > form { min-height: 0; display: flex; flex: 1 1 auto; flex-direction: column; overflow: hidden; }
.modal-header { padding: 18px 20px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.modal-header h2 { margin: 0; font-size: 18px; }
.modal-header-tools { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.modal-close { border: 0; background: var(--surface-2); color: var(--ink); width: 34px; height: 34px; border-radius: 9px; font-size: 18px; }
.modal-body { min-height: 0; flex: 1 1 auto; padding: 20px; overflow-y: scroll; scrollbar-gutter: stable; }
.modal-footer { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; background: var(--modal-footer-bg); }
@media (max-width: 640px) {
  .modal-backdrop { padding: 10px; align-items: stretch; }
  .modal,
  .modal.large,
  .modal.medium,
  .modal.small {
    width: 100%;
    max-height: calc(100vh - 20px);
    border-radius: 14px;
  }
  .modal-header,
  .modal-body,
  .modal-footer { padding-left: 14px; padding-right: 14px; }
}
.score-preview { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 13px; background: var(--surface-2); border-radius: 12px; }
.score-preview div { text-align: center; }
.score-preview strong { display: block; font-size: 21px; }
.score-preview span { color: var(--muted); font-size: 10px; text-transform: uppercase; }

.toast-root { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast { width: min(360px, calc(100vw - 40px)); padding: 13px 15px; border-radius: 12px; background: var(--nav); color: #fff; box-shadow: 0 14px 34px rgba(0,0,0,.24); font-size: 12px; animation: toast-in .2s ease; }
.toast.success { background: #166534; }.toast.error { background: #991b1b; }.toast.warning { background: #92400e; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

.mobile-only { display: none; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.text-danger { color: var(--danger); }.text-success { color: var(--success); }.text-warning { color: var(--warning); }.text-info { color: var(--info); }
.truncate { max-width: 300px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.implantation-duration-panel { overflow: hidden; }
.implantation-duration-panel > .card-header { margin-bottom: 10px; }
.implantation-queue-wait {
  margin: 4px 16px 12px;
  padding: 4px 12px 8px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-2);
}
.queue-wait-skeleton .skeleton-line,
.queue-wait-skeleton .skeleton-value {
  display: block;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--border) 0%, var(--surface) 50%, var(--border) 100%);
  background-size: 200% 100%;
  animation: queue-wait-shimmer 1.2s ease-in-out infinite;
}
.queue-wait-skeleton .skeleton-line {
  width: 58%;
  height: 11px;
  margin-bottom: 10px;
}
.queue-wait-skeleton .skeleton-value {
  width: 42%;
  height: 22px;
}
.implantation-summary-card.is-loading .implantation-summary-value {
  display: inline-flex;
  align-items: center;
  min-height: 1.2em;
}
.mission-metric-value .cq-spinner {
  vertical-align: middle;
}
@keyframes queue-wait-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}
.implantation-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 0 16px 12px;
}
.implantation-summary-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 0 0 8px;
}
.implantation-summary-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  min-width: 0;
  text-align: left;
}
button.implantation-summary-card.is-clickable,
button.implantation-group-card.is-clickable {
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
  font: inherit;
  color: inherit;
  width: 100%;
}
button.implantation-summary-card.is-clickable:hover,
button.implantation-group-card.is-clickable:hover {
  border-color: color-mix(in srgb, var(--primary) 45%, var(--border));
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}
button.implantation-summary-card.is-clickable:focus-visible,
button.implantation-group-card.is-clickable:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.implantation-summary-label {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.implantation-summary-value {
  display: block;
  margin-top: 4px;
  font-size: 16px;
  line-height: 1.2;
  color: var(--ink);
  font-weight: 700;
}
.implantation-summary-value.is-min,
.implantation-group-minmax .is-min { color: var(--success); }
.implantation-summary-value.is-max,
.implantation-group-minmax .is-max { color: var(--danger); }
.implantation-group-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 0 16px 14px;
  align-items: stretch;
}
.implantation-group-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  background: var(--surface);
  border-top: 3px solid var(--primary);
  min-width: 0;
  text-align: left;
}
.implantation-group-card.tone-elite { border-top-color: #7c5cfc; }
.implantation-group-card.tone-max { border-top-color: #2f7cf6; }
.implantation-group-card.tone-juridica { border-top-color: #12b5c9; }
.implantation-group-card.tone-essencial { border-top-color: #d97706; }
.implantation-group-card header {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .05em;
  color: var(--muted);
}
.implantation-group-avg {
  display: block;
  margin-top: 6px;
  font-size: 18px;
  line-height: 1.15;
  font-weight: 700;
}
.implantation-group-avg-label {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}
.implantation-group-minmax {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  font-size: 11px;
  font-weight: 700;
}
.implantation-group-card footer {
  margin-top: 8px;
  color: var(--muted);
  font-size: 11px;
}
.implantation-summary-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.reschedule-bi-panel {
  margin-bottom: 16px;
}
.reschedule-bi-panel .implantation-summary-grid {
  padding: 0 0 12px;
}
.reschedule-bi-panel .implantation-summary-grid-2 .implantation-summary-value {
  font-size: 20px;
}
.reschedule-bi-panel .implantation-queue-wait {
  margin: 4px 0 12px;
}
.reschedule-bi-panel .implantation-group-grid {
  padding: 0;
}
.reschedule-bi-panel .implantation-group-avg {
  font-size: 20px;
}
.rescue-plan-panel {
  margin-top: 12px;
}
.rescue-plan-metrics {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
}
.rescue-plan-metric {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}
.rescue-plan-metric strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}
.rescue-plan-metric.is-leader-churn,
.rescue-plan-metric.is-leader-churn strong { color: var(--danger); font-weight: 800; }
.rescue-plan-metric.is-leader-rescue,
.rescue-plan-metric.is-leader-rescue strong { color: var(--ink); font-weight: 800; }
.rescue-plan-metric.is-leader-reversed,
.rescue-plan-metric.is-leader-reversed strong { color: var(--success); font-weight: 800; }
.reschedule-bi-panel .implantation-summary-value.is-text {
  font-size: 16px;
  line-height: 1.25;
  word-break: break-word;
}

@media (max-width: 1250px) {
  .kpi-grid { grid-template-columns: repeat(3, 1fr); }
  .kpi-grid.kpi-grid-3x3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kpi-grid.kpi-grid-4,
  .kpi-grid.kpi-grid-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi-grid.kpi-grid-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi-grid.kpi-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .implantation-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .implantation-summary-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .implantation-group-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Em telas médias, mantém rail de ícones — a sidebar não some. */
@media (max-width: 1100px) {
  .app-shell {
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr);
  }
  .app-shell.sidebar-collapsed {
    grid-template-columns: 84px minmax(0, 1fr);
  }
  .sidebar,
  .app-shell.sidebar-collapsed .sidebar {
    transform: none;
    box-shadow: none;
    width: 84px;
    padding: 18px 10px;
  }
  .brand-text,
  .nav-label,
  .area-switch,
  .app-shell.sidebar-collapsed .brand-text,
  .app-shell.sidebar-collapsed .nav-label,
  .app-shell.sidebar-collapsed .area-switch {
    display: none;
  }
  .workspace-select,
  .app-shell.sidebar-collapsed .workspace-select { margin: 0 0 12px; }
  .ws-trigger,
  .app-shell.sidebar-collapsed .ws-trigger {
    justify-content: center;
    padding: 0;
    background: transparent;
    border-color: transparent;
  }
  .ws-trigger-name,
  .ws-chevron,
  .app-shell.sidebar-collapsed .ws-trigger-name,
  .app-shell.sidebar-collapsed .ws-chevron { display: none; }
  .ws-badge,
  .app-shell.sidebar-collapsed .ws-badge { width: 36px; height: 36px; font-size: 12px; }
  .ws-popover,
  .app-shell.sidebar-collapsed .ws-popover {
    top: 0;
    left: calc(100% + 10px);
    width: 220px;
    margin-top: 0;
    animation-name: wsPopoverInSide;
  }
  .brand,
  .app-shell.sidebar-collapsed .brand {
    justify-content: center;
    padding: 0 0 16px;
    gap: 0;
  }
  .brand-mark,
  .app-shell.sidebar-collapsed .brand-mark {
    width: 42px;
    height: 42px;
  }
  .nav-item,
  .app-shell.sidebar-collapsed .nav-item {
    justify-content: center;
    padding: 12px 0;
    gap: 0;
  }
  .nav-item:hover::after,
  .nav-item:focus-visible::after,
  .app-shell.sidebar-collapsed .nav-item:hover::after,
  .app-shell.sidebar-collapsed .nav-item:focus-visible::after {
    content: attr(data-label);
    position: absolute;
    left: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%);
    background: var(--nav);
    color: #fff;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 8px 20px rgba(0,0,0,.28);
    z-index: 60;
    pointer-events: none;
  }
  .sidebar-toggle { display: none; }
}
@media (max-width: 980px) {
  .main-content { grid-column: 2; min-width: 0; }
  .topbar { align-items: flex-start; padding: 15px 18px 6px; }
  .cq-tools-bar { padding: 2px 18px 12px; gap: 10px 16px; }
  .cq-tools-left { gap: 2px 12px; }
  .cq-tools-period-label { min-width: 110px; font-size: 12px; }
  .cq-tools-actions { gap: 2px 12px; }
  .topbar-actions { max-width: 55%; }
  .page-content { padding: 18px; }
  .chart-card, .chart-card.wide, .chart-card.narrow,
  .chart-grid > .table-card, .chart-grid > .table-card.wide, .chart-grid > .table-card.narrow { grid-column: span 12; }
  .chart-wrap.is-hours-chart { height: 280px; min-height: 240px; }
  .ooo-suggestions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .settings-grid, .insight-grid { grid-template-columns: 1fr; }
  .implantation-group-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 0 12px 12px;
  }
  .implantation-group-card { padding: 8px 10px; }
  .implantation-group-avg { font-size: 15px; }
  .implantation-group-minmax { flex-wrap: wrap; gap: 4px; }
}
/* Só no celular a sidebar vira menu off-canvas com hamburger. */
@media (max-width: 700px) {
  .app-shell { display: block; grid-template-columns: none; }
  .app-shell.sidebar-collapsed { grid-template-columns: none; }
  .sidebar,
  .app-shell.sidebar-collapsed .sidebar {
    transform: translateX(-105%);
    transition: transform .2s ease;
    box-shadow: 18px 0 50px rgba(0,0,0,.25);
    width: 270px;
    padding: 24px 18px;
  }
  .brand-text,
  .nav-label,
  .area-switch,
  .app-shell.sidebar-collapsed .brand-text,
  .app-shell.sidebar-collapsed .nav-label,
  .app-shell.sidebar-collapsed .area-switch { display: revert; }
  .workspace-select,
  .app-shell.sidebar-collapsed .workspace-select { margin: 0 4px 12px; }
  .ws-trigger,
  .app-shell.sidebar-collapsed .ws-trigger {
    justify-content: space-between;
    padding: 10px;
    background: rgba(255,255,255,.10);
    border-color: rgba(255,255,255,.10);
  }
  .ws-trigger-name,
  .app-shell.sidebar-collapsed .ws-trigger-name { display: block; }
  .ws-chevron,
  .app-shell.sidebar-collapsed .ws-chevron { display: block; }
  .ws-badge,
  .app-shell.sidebar-collapsed .ws-badge { width: 28px; height: 28px; font-size: 11px; }
  .ws-popover,
  .app-shell.sidebar-collapsed .ws-popover {
    top: 100%;
    left: 0;
    width: 100%;
    margin-top: 4px;
    animation-name: wsPopoverIn;
  }
  .brand,
  .app-shell.sidebar-collapsed .brand {
    justify-content: flex-start;
    padding: 0 8px 22px;
    gap: 12px;
  }
  .brand-mark,
  .app-shell.sidebar-collapsed .brand-mark { width: 46px; height: 46px; }
  .nav-item,
  .app-shell.sidebar-collapsed .nav-item {
    justify-content: flex-start;
    padding: 11px 12px;
    gap: 12px;
  }
  .nav-item .nav-alert-badge,
  .app-shell.sidebar-collapsed .nav-item .nav-alert-badge {
    position: static;
    min-width: 18px;
    width: auto;
    height: 18px;
    padding: 0 5px;
    font-size: 10px;
    line-height: 1;
    margin-left: auto;
  }
  .nav-item:hover::after,
  .nav-item:focus-visible::after,
  .app-shell.sidebar-collapsed .nav-item:hover::after,
  .app-shell.sidebar-collapsed .nav-item:focus-visible::after { content: none; }
  .sidebar.open { transform: translateX(0); }
  .sidebar-toggle { display: none; }
  .main-content { grid-column: auto; }
  .mobile-only { display: inline-grid; place-items: center; }
  .cq-sticky-head { position: relative; }
  .topbar { position: relative; flex-direction: column; }
  .cq-tools-bar { flex-direction: column; align-items: stretch; }
  .cq-tools-left { width: 100%; }
  .cq-tools-actions { width: 100%; justify-content: flex-start; margin-left: 0; }
  .cq-tools-popover,
  .cq-tools-item.inactive-filter .filter-menu { left: 0; right: auto; width: min(320px, calc(100vw - 36px)); }
  .topbar-actions { max-width: none; width: 100%; justify-content: flex-start; }
  .implantation-summary-grid,
  .implantation-summary-grid-2 { grid-template-columns: 1fr; }
  .implantation-summary-grid-3 { grid-template-columns: 1fr; }
  .implantation-group-grid { grid-template-columns: 1fr; }
  .month-control { flex: 1; }
  .month-control input { min-width: 0; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .shift-summary-metrics { grid-template-columns: 1fr; }
  .shift-metric strong { font-size: 20px; }
  .kpi-grid.kpi-grid-3x3 { grid-template-columns: 1fr; }
  .kpi-grid.kpi-grid-4,
  .kpi-grid.kpi-grid-overview { grid-template-columns: 1fr; }
  .kpi-grid.kpi-grid-pair { grid-template-columns: 1fr; }
  .kpi-grid.kpi-grid-3 { grid-template-columns: 1fr; }
  .ooo-suggestions { grid-template-columns: 1fr; }
  .ooo-suggestion-card[open] { grid-column: 1 / -1; }
  .ooo-suggestion-card[open] .ooo-suggestion-summary {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .ooo-suggestion-card[open] .ooo-suggestion-id { width: 100%; }
  .ooo-suggestion-card[open] .ooo-suggestion-chips { justify-content: center; }
  .ooo-suggestion-card[open] .ooo-suggestion-more { margin-left: 0; }
  .collaborator-photo-field { grid-template-columns: 72px 1fr; }
  .filters-bar { grid-template-columns: 1fr; }
  .rank-period-bar {
    padding: 12px 16px;
  }
  .rank-period-bar label { min-width: 100%; flex: 1 1 100%; }
  .rank-period-bar select,
  .rank-period-bar input { width: 100%; min-width: 0; }
  .card-header-actions {
    width: 100%;
    justify-content: flex-start;
  }
  .chart-sort-control {
    width: 100%;
    justify-content: space-between;
  }
  .chart-sort-control select {
    flex: 1 1 auto;
    min-width: 0;
  }
  .span-8, .span-6, .span-4, .span-3, .span-2 { grid-column: span 12; }
  .score-preview { grid-template-columns: 1fr; }
  .toggle-control { width: 100%; }
  .inactive-filter { width: auto; }
  .filter-button { width: 100%; justify-content: flex-start; }
  .filter-menu { left: 0; right: auto; width: min(292px, calc(100vw - 36px)); }
}
@media print {
  .sidebar, .topbar, .cq-sticky-head, .cq-tools-bar, .no-print, .button { display: none !important; }
  .main-content { grid-column: auto; }
  .page-content { padding: 0; }
  .card { box-shadow: none; break-inside: avoid; }
  body { background: #fff; }
}

/* Camada de sessão e autenticação. */
[hidden] { display: none !important; }
.area-switch { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.area-switch:has(.area-button:nth-child(3)) { grid-template-columns: 1fr; max-height: 190px; overflow-y: auto; }
.sector-empty { color: #afb6d4; font-size: 11px; padding: 8px; text-align: center; }

.auth-root {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 15% 15%, rgba(125,119,255,.24), transparent 34%),
    radial-gradient(circle at 85% 80%, rgba(24,169,153,.16), transparent 32%),
    linear-gradient(135deg, #111426, #1c2042);
}
.auth-card {
  width: min(440px, 100%);
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px;
  box-shadow: 0 28px 90px rgba(0,0,0,.34);
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.auth-card-wide { width: min(650px, 100%); }
.auth-card h1 { font-size: 25px; }
.auth-card p { color: var(--muted); line-height: 1.55; margin: 6px 0 0; }
.auth-brand { display: flex; align-items: center; gap: 12px; }
.auth-brand strong, .auth-brand span { display: block; }
.auth-brand span { color: var(--muted); font-size: 11px; margin-top: 3px; }
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-actions { display: flex; justify-content: flex-end; }
.auth-error { padding: 11px 12px; background: var(--danger-bg); color: var(--danger); border-radius: 10px; font-size: 12px; }
.auth-link { align-self: center; }
.auth-card code { background: var(--surface-2); border-radius: 5px; padding: 2px 5px; }

.user-chip { min-height: 40px; display: flex; align-items: center; gap: 9px; border: 1px solid var(--border); border-radius: 11px; padding: 4px 5px 4px 7px; background: var(--surface); }
.user-chip.is-view-as { border-color: color-mix(in srgb, var(--warning) 45%, var(--border)); background: var(--warning-bg); }
.user-chip { cursor: pointer; transition: border-color .15s ease, box-shadow .15s ease; }
.user-chip:hover { border-color: color-mix(in srgb, var(--primary) 40%, var(--border)); box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08); }
.user-chip-avatar { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 999px; background: var(--primary-soft); color: var(--primary-dark); font-size: 10px; font-weight: 850; overflow: hidden; flex: 0 0 auto; }
.user-chip-avatar.has-photo, .account-avatar.has-photo { background: var(--surface-2); }
.user-chip-avatar img, .account-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* "Por que minha nota está assim?" no Detalhe da qualidade (16/10/2026). */
.qas-explain { margin: 0 16px 14px; border: 1px solid color-mix(in srgb, var(--primary) 30%, var(--border)); border-radius: 14px; background: color-mix(in srgb, var(--primary-soft) 55%, var(--surface)); }
.qas-explain > summary { cursor: pointer; list-style: none; padding: 12px 16px; font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.qas-explain > summary::-webkit-details-marker { display: none; }
.qas-explain > summary::after { content: '▾'; margin-left: auto; color: var(--muted); transition: transform .15s ease; }
.qas-explain:not([open]) > summary::after { transform: rotate(-90deg); }
.qas-explain-body { padding: 0 16px 14px; font-size: 13px; line-height: 1.55; }
.qas-explain-body h4 { margin: 14px 0 6px; font-size: 13px; }
.qas-explain-body p { margin: 6px 0; }
.qas-explain-body ul { margin: 6px 0; padding-left: 18px; }
.qas-explain-table { width: 100%; border-collapse: collapse; margin: 6px 0; font-size: 13px; background: var(--surface); }
.qas-explain-table th, .qas-explain-table td { padding: 7px 10px; text-align: left; border-bottom: 1px solid var(--border); }
.qas-explain-table th { color: var(--muted); font-weight: 600; font-size: 12px; }
.qas-explain-table tfoot td { border-bottom: 0; }
.qas-explain-table tr.is-heaviest td { background: var(--warning-bg); }
.level-tip { position: relative; display: inline-block; font-weight: 700; border-bottom: 1px dotted currentColor; cursor: help; outline: none; }
.level-tip::after { content: attr(data-tip); position: absolute; left: 0; bottom: calc(100% + 8px); z-index: 30; width: max-content; max-width: min(320px, 70vw); padding: 9px 11px; border-radius: 10px; background: var(--ink); color: var(--surface); font-size: 12px; font-weight: 500; line-height: 1.45; white-space: normal; box-shadow: 0 10px 24px rgba(15, 23, 42, 0.25); opacity: 0; visibility: hidden; transform: translateY(4px); transition: opacity .12s ease, transform .12s ease; pointer-events: none; }
.level-tip:hover::after, .level-tip:focus::after { opacity: 1; visibility: visible; transform: translateY(0); }

/* Minha conta (16/10/2026): foto, dados e senha. */
.account-panel { display: flex; flex-direction: column; gap: 18px; min-width: min(440px, 100%); }
.account-panel.is-busy { opacity: .6; pointer-events: none; }
.account-hero { display: flex; align-items: center; gap: 18px; }
.account-photo { position: relative; flex: 0 0 auto; }
.account-avatar { width: 88px; height: 88px; border-radius: 999px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-dark); font-size: 26px; font-weight: 850; overflow: hidden; box-shadow: 0 0 0 4px var(--surface), 0 0 0 5px var(--border); }
.account-photo-edit { position: absolute; right: -2px; bottom: -2px; width: 32px; height: 32px; border-radius: 999px; display: grid; place-items: center; background: var(--primary); color: #fff; cursor: pointer; box-shadow: 0 0 0 3px var(--surface); transition: transform .15s ease; }
.account-photo-edit:hover { transform: scale(1.06); }
.account-identity { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.account-identity strong { font-size: 18px; line-height: 1.2; overflow-wrap: anywhere; }
.account-identity > span { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.account-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.account-photo-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); }
.account-photo-row p { margin: 0; color: var(--muted); font-size: 12px; flex: 1 1 220px; }
.account-photo-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.account-details { display: grid; gap: 0; margin: 0; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.account-details > div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 14px; }
.account-details > div + div { border-top: 1px solid var(--border); }
.account-details dt { color: var(--muted); font-size: 12px; }
.account-details dd { margin: 0; font-size: 13px; font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.account-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; padding-top: 4px; }
.account-password-form { display: flex; flex-direction: column; gap: 12px; min-width: min(380px, 100%); }
.account-password-form .muted { margin: 0; font-size: 12px; }
.account-form-error { margin: 0; color: var(--danger); font-size: 13px; }
@media (max-width: 520px) {
  .account-hero { flex-direction: column; text-align: center; }
  .account-tags { justify-content: center; }
  .account-actions { justify-content: stretch; }
  .account-actions .button { flex: 1 1 auto; }
}
.user-chip strong, .user-chip span { display: block; max-width: 155px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-chip strong { font-size: 11px; }
.user-chip span { color: var(--muted); font-size: 9px; margin-top: 1px; }
.user-chip-button { width: 30px; height: 30px; border: 0; background: transparent; color: var(--ink); }
.view-as-banner { margin: 0 0 12px; padding: 0 18px; }
.view-as-banner-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; border: 1px solid rgba(245, 158, 11, 0.35); background: var(--warning-bg); color: var(--warning); border-radius: 12px; padding: 10px 14px; font-size: 13px; }
.view-as-panel { border-color: rgba(245, 158, 11, 0.35); background: var(--warning-bg); }

.settings-grid-subcontents { display: contents; }
.card-header.compact { margin-bottom: 12px; }
.admin-list { display: flex; flex-direction: column; gap: 7px; }
.admin-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.admin-row:last-child { border-bottom: 0; }
.admin-row strong, .admin-row span { display: block; }
.admin-row strong { font-size: 12px; }
.admin-row > div > span { color: var(--muted); font-size: 10px; margin-top: 3px; }
.admin-row-actions { display: flex; align-items: center; gap: 7px; }

.profile-summary { display: flex; align-items: center; gap: 14px; }
.profile-summary .avatar { width: 52px; height: 52px; }
.profile-summary strong, .profile-summary span { display: block; }
.profile-summary span { color: var(--muted); font-size: 11px; margin-top: 3px; }
.kpi-detail-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
/* Blocos de indicadores do Plano essencial: cada um com sua régua. */
.essencial-kpi-block + .essencial-kpi-block {
  margin-top: 18px;
}
.essencial-kpi-block h3 {
  margin: 0 0 4px;
  font-size: 15px;
}
.essencial-kpi-block > .muted {
  margin: 0 0 10px;
  font-size: 12px;
}

/* Duas tabelas na mesma janela de KPI: cada uma com seu título. */
.kpi-detail-table-title,
.kpi-detail-secondary h3 {
  margin: 0 0 8px;
  font-size: 15px;
}
.kpi-detail-secondary {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border, rgba(0, 0, 0, .1));
}
.kpi-detail-secondary .muted {
  margin: 0 0 10px;
}

/* Navegação de mês dentro da janela do Plano essencial. */
.essencial-period-nav {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.essencial-period-nav-label {
  min-width: 108px;
  text-align: center;
  font-size: 13px;
  white-space: nowrap;
}

.kpi-detail-actions-start {
  margin-right: auto;
}
.kpi-detail-actions-start .occ-bulk-progress {
  align-items: flex-start;
  text-align: left;
}
.essencial-kpi-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  margin: 0 0 8px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--primary) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--primary) 30%, transparent);
}
.essencial-kpi-banner[data-empty="1"] {
  background: var(--surface-2);
  border-color: var(--border);
}
.essencial-kpi-banner-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}
.essencial-kpi-banner-copy strong {
  display: block;
  font-size: 14px;
  letter-spacing: -0.02em;
}
.essencial-kpi-banner-copy span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}
.essencial-kpi-banner-btn {
  flex: 0 0 auto;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 8px;
}
.essencial-kpi-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 0 0 auto;
  justify-content: flex-end;
}
.essencial-kpi-banner-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.essencial-kpi-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 24px 0;
}
.essencial-kpi-metric {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  background: var(--surface);
  min-width: 0;
}
html.dark .essencial-kpi-metric {
  background: #020617;
  border-color: #1e293b;
}
.essencial-kpi-metric span,
.essencial-kpi-metric small {
  display: block;
  color: var(--muted);
}
.essencial-kpi-metric span {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
}
.essencial-kpi-metric strong {
  display: block;
  font-size: 22px;
  margin: 8px 0 4px;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.essencial-kpi-metric.is-zero strong {
  color: #94a3b8;
  opacity: 0.85;
}
.essencial-kpi-metric small {
  font-size: 11px;
  line-height: 1.35;
}
.essencial-kpi-lists {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin: 0 0 16px;
}
.essencial-kpi-lists h3 {
  margin: 0 0 10px;
  font-size: 13px;
}
.essencial-kpi-bars {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.essencial-kpi-bar {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  min-height: 42px;
  background: var(--surface);
}
html.dark .essencial-kpi-bar {
  background: #020617;
  border-color: #1e293b;
}
.essencial-kpi-bar-fill {
  position: absolute;
  inset: 0 auto 0 0;
  pointer-events: none;
  border-radius: inherit;
}
.essencial-kpi-bars--doubt .essencial-kpi-bar-fill {
  background: color-mix(in srgb, #6366f1 18%, transparent);
}
.essencial-kpi-bars--reason .essencial-kpi-bar-fill {
  background: color-mix(in srgb, #ef4444 16%, transparent);
}
.essencial-kpi-bar-label,
.essencial-kpi-bar-badge {
  position: relative;
  z-index: 1;
}
.essencial-kpi-bar-label {
  font-size: 13px;
  line-height: 1.35;
  min-width: 0;
}
.essencial-kpi-bar-badge {
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--ink);
}
html.dark .essencial-kpi-bar-badge {
  background: #1e293b;
  color: #e2e8f0;
}
.essencial-kpi-footnote {
  margin: 0 0 12px;
}
@media (max-width: 900px) {
  .essencial-kpi-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .essencial-kpi-banner { flex-direction: column; align-items: stretch; }
  .essencial-kpi-banner-btn { width: 100%; }
  .essencial-kpi-banner-actions { width: 100%; }
  .essencial-kpi-banner-actions .essencial-kpi-banner-btn { flex: 1 1 auto; }
  .essencial-kpi-lists { grid-template-columns: 1fr; }
}
.kpi-reschedule-bulk {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.sector-check-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 9px; }
.check-card { display: flex; align-items: center; gap: 9px; padding: 11px; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; }
.check-card input { width: auto; }
.check-card strong, .check-card small { display: block; }
.check-card strong { font-size: 12px; }
.check-card small { color: var(--muted); margin-top: 2px; }
.check-card:has(input:checked) { border-color: var(--accent, #3b82f6); background: var(--surface-2, #f8fafc); }
.workspace-choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 9px; margin-top: 10px; }
.check-card[hidden], .sector-check-grid .check-card[hidden] { display: none; }

@media (max-width: 980px) {
  .user-chip strong, .user-chip span { max-width: 115px; }
}
@media (max-width: 700px) {
  #userAccessHost { width: 100%; }
  .user-chip { width: 100%; }
  .user-chip strong, .user-chip span { max-width: calc(100vw - 145px); }
  .sector-check-grid { grid-template-columns: 1fr; }
  .admin-row { align-items: flex-start; flex-direction: column; }
}

/* V3 - campos estruturados de auditoria e liderança, preservando o layout original. */
.criterion-box {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  background: var(--surface-2);
  display: grid;
  gap: 10px;
}
.criterion-box textarea { min-height: 48px; }
.textarea-expandable {
  min-height: 48px;
  max-height: none;
  resize: vertical;
  field-sizing: content;
}
.checkbox-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 18px;
  margin-top: 8px;
}
.checkbox-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text);
}
.evidence-preview-wrap {
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 12px;
  background: var(--surface-2);
}
.evidence-links-preview {
  margin-bottom: 10px;
  line-height: 1.6;
}
.evidence-links-preview a { color: var(--primary); word-break: break-all; }
.evidence-attachment {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 6px 10px 6px 0;
  vertical-align: top;
}
.evidence-thumb {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
}
.action-recipients-wrap .field-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 2px;
}
.audit-evidence-row {
  display: grid;
  grid-template-columns: minmax(108px, 132px) minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
}
.audit-ident-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.audit-ident-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
}
.audit-ident-row .field-inline {
  min-width: 132px;
  flex: 0 1 140px;
  margin: 0;
}
.audit-ident-collab {
  max-width: 320px;
  margin: 0;
}
.audit-ident-type {
  display: flex;
  align-items: flex-end;
  padding-bottom: 10px;
}
.audit-meta-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px 16px;
  align-items: start;
  width: 100%;
}
.audit-suggestions .notice {
  margin: 0;
}
.audit-suggestions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.audit-program-suggestion .badge {
  margin-left: 6px;
  font-weight: 600;
}
.audit-suggest-list {
  margin: 10px 0 12px;
  padding-left: 18px;
  line-height: 1.45;
}
.audit-suggest-list .muted {
  margin-top: 4px;
}
.audit-type-picker {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.audit-type-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.audit-type-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-2, #f6f7fb);
  color: inherit;
  cursor: pointer;
  transition: .15s ease;
}
.audit-type-card:hover {
  border-color: var(--primary);
  box-shadow: 0 8px 20px rgba(0, 26, 109, .08);
  background: var(--surface);
}
.audit-type-card strong {
  font-size: 14px;
}
.audit-type-card span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}
.audit-back-row {
  margin-bottom: 4px;
}
.audit-back-row .button.ghost {
  padding-left: 0;
  color: var(--muted);
}
.audit-back-row .button.ghost:hover {
  color: var(--text, #1c2240);
}
@media (max-width: 720px) {
  .audit-type-grid { grid-template-columns: 1fr; }
}
.audit-account-block {
  display: flex;
  align-items: end;
  gap: 8px;
}
.field-account-inline {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.field-account-inline span { white-space: nowrap; }
.field-account-inline input {
  width: 88px;
  text-align: center;
  padding-left: 8px;
  padding-right: 8px;
}
.audit-clip-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--muted);
  cursor: pointer;
  flex-shrink: 0;
  margin-bottom: 1px;
}
.audit-clip-btn:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--surface);
}
.audit-observations-field {
  min-width: 0;
}
.quality-section-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 2px;
  margin: 0 0 4px;
}
.quality-section-tab {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
}
.quality-section-tab:hover {
  border-color: var(--primary);
  color: var(--text);
}
.quality-section-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
#quality-audits-table,
#quality-leadership-audits {
  scroll-margin-top: 108px;
}
.cq-review-ident {
  display: grid;
  grid-template-columns: 9.5rem minmax(10.5rem, 12.5rem) minmax(8.5rem, 1fr) 7.5rem;
  gap: 10px;
  align-items: end;
  min-width: 0;
}
.cq-review-ident-meta,
.cq-review-ident-who {
  display: contents;
}
.cq-review-ident .field {
  margin: 0;
  min-width: 0;
}
.cq-review-ident .field input,
.cq-review-ident .field select {
  width: 100%;
  min-width: 0;
}
.cq-review-findings {
  min-height: 96px;
}
.review-evidence-block {
  margin-top: 2px;
}
.review-evidence-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 8px;
}
.review-evidence-head h3 {
  margin: 0 0 4px;
  font-size: 14px;
}
.review-evidence-head p {
  margin: 0;
}
.review-evidence-add {
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}
.review-evidence-preview {
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-start;
}

/* Modal Nova auditoria — blocos, chips N1–N4 e dropzone */
.cq-audit-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  width: 100%;
  min-width: 0;
}
.cq-audit-form > * {
  min-width: 0;
  max-width: 100%;
  grid-column: 1 / -1;
}
.modal-body:has(.cq-audit-form) {
  overflow-x: hidden;
}
.cq-audit-form-lead {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
}
.cq-form-block {
  margin: 0;
  padding: 14px 16px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  overflow: visible;
  width: 100%;
  box-sizing: border-box;
}
.cq-form-block .field input,
.cq-form-block .field select,
.cq-form-block .field textarea {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
@media (max-width: 720px) {
  .cq-review-ident {
    grid-template-columns: minmax(9.5rem, 11rem) minmax(0, 1fr);
  }
  .cq-review-ident-collab,
  .cq-review-ident-account {
    grid-column: auto;
  }
}
@media (max-width: 560px) {
  .cq-review-ident {
    grid-template-columns: 1fr;
  }
}
.cq-form-block-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.cq-form-block-head h3,
.cq-fail-class-head h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .01em;
  color: var(--ink);
}
.cq-form-block-head p {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}
.cq-form-block .field {
  margin: 0;
}
.cq-trainer-notes {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 12px;
  margin-top: 12px;
}
.cq-followup-linked {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}
.cq-followup-linked small {
  color: var(--muted);
}

.cq-fail-class {
  display: grid;
  gap: 10px;
}
.cq-fail-class-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}
.cq-fail-label {
  margin: 2px 0 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
}
.cq-fail-label .muted {
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
}

.cq-help-tip {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  flex: 0 0 auto;
}
.cq-help-tip:hover,
.cq-help-tip:focus-visible,
.cq-help-tip.is-open {
  color: var(--primary);
  background: var(--primary-soft);
}
.cq-help-tip-panel {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 30;
  width: min(360px, 72vw);
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 12px 32px rgba(18, 32, 58, .16);
  color: var(--ink);
  text-align: left;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}
.cq-help-tip:hover .cq-help-tip-panel,
.cq-help-tip:focus-within .cq-help-tip-panel,
.cq-help-tip.is-open .cq-help-tip-panel {
  display: grid;
  gap: 8px;
}
.cq-help-tip-panel strong {
  font-size: 12px;
}
.cq-help-tip-panel > p {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}
.cq-help-tip-item {
  display: grid;
  gap: 2px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  line-height: 1.4;
}
.cq-help-tip-item em {
  color: var(--primary);
  font-style: normal;
  font-weight: 600;
}
.cq-help-tip-note {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}
.cq-help-tip-rule {
  margin: 0;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
}

.cq-chip-row,
.cq-nlevel-grid {
  display: grid;
  gap: 8px;
}
.cq-chip-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.cq-nlevel-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.cq-fail-class.is-no-error .cq-fail-label-level,
.cq-fail-class.is-no-error .cq-nlevel-grid {
  opacity: 0.42;
  pointer-events: none;
}
.cq-chip,
.cq-ncard {
  position: relative;
  display: flex;
  cursor: pointer;
  user-select: none;
  border: 2px solid var(--border);
  background: var(--surface-2);
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.cq-chip {
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}
.cq-chip.is-severe:not(:has(input:checked)) {
  border-color: #f0c7c7;
}
.cq-ncard {
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-height: 78px;
  padding: 12px 36px 12px 12px;
  border-radius: 12px;
}
.cq-ncard-title {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink);
}
.cq-ncard-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}
.cq-select-check {
  display: none;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  flex: 0 0 auto;
}
.cq-chip .cq-select-check {
  width: 16px;
  height: 16px;
}
.cq-ncard .cq-select-check {
  position: absolute;
  top: 8px;
  right: 8px;
}
.cq-chip:hover,
.cq-ncard:hover {
  border-color: #9dbcf5;
}
.cq-chip:has(input:checked),
.cq-ncard:has(input:checked) {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary-soft) 50%, var(--mix-base));
  box-shadow: 0 1px 2px rgba(18, 32, 58, .08);
}
.cq-chip:has(input:checked) .cq-select-check,
.cq-ncard:has(input:checked) .cq-select-check {
  display: grid;
}
.cq-ncard:has(input:checked) .cq-ncard-badge {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary-dark);
}
/* "Sem processo definido" (Vendas) ocupa a linha inteira abaixo de N1–N4. */
.cq-ncard-sem_processo {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  min-height: 0;
  gap: 10px;
  border-style: dashed;
}
.cq-fail-hint {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
}

.review-dropzone-block {
  margin-top: 10px;
}
.review-dropzone {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 10px 14px;
  border: 1.5px dashed var(--border);
  border-radius: 12px;
  background: var(--surface-2);
  cursor: pointer;
}
.review-dropzone:hover,
.review-dropzone.is-dragover {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary-soft) 55%, var(--mix-base));
}
.review-dropzone-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--surface);
  color: var(--primary);
  flex: 0 0 auto;
}
.review-dropzone-copy {
  display: grid;
  gap: 1px;
  min-width: 0;
  flex: 1;
}
.review-dropzone-copy strong {
  font-size: 13px;
}
.review-dropzone-copy small {
  color: var(--muted);
  font-size: 11px;
}
.review-dropzone-count {
  margin-left: auto;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.evidence-chip-wrap,
.evidence-chip-wrap > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.evidence-chip-wrap {
  margin-top: 8px;
}
.evidence-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 220px;
  padding: 4px 6px 4px 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-size: 12px;
}
.evidence-chip-thumb {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  object-fit: cover;
}
.evidence-chip-icon {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
}
.evidence-chip-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.evidence-chip-remove {
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  line-height: 1;
  font-size: 14px;
}
.evidence-chip-remove:hover {
  background: var(--danger-bg);
  color: var(--danger);
}

@media (max-width: 900px) {
  .cq-nlevel-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .cq-trainer-notes {
    grid-template-columns: 1fr;
  }
  .cq-help-tip-panel {
    left: auto;
    right: 0;
  }
}
@media (max-width: 560px) {
  .cq-chip-row,
  .cq-nlevel-grid {
    grid-template-columns: 1fr;
  }
  .review-dropzone {
    flex-wrap: wrap;
  }
  .review-dropzone-count {
    margin-left: 0;
  }
}
.audit-penalty-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}
.field-penalty-compact {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.penalty-input-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}
.field-penalty-compact .audit-score-input {
  width: 100%;
  min-width: 0;
  padding: 8px 6px;
  text-align: center;
}
.penalty-live {
  font-size: 11px;
  font-weight: 700;
  color: #c93636;
  white-space: nowrap;
  min-width: 28px;
}
.error-classification-guide {
  margin-bottom: 10px;
  grid-column: span 12;
  min-width: 0;
}
.error-classification-ref {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.error-classification-ref li {
  font-size: 11px;
  line-height: 1.4;
  color: var(--muted);
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--surface-2, #f8f9fb);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.error-classification-ref strong {
  color: var(--text);
  font-size: 12px;
  line-height: 1.3;
}
.error-classification-ref-desc {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}
.error-classification-ref-penalty {
  color: #c93636;
  font-weight: 700;
  white-space: nowrap;
  margin-top: auto;
  padding-top: 4px;
}
@media (max-width: 900px) {
  .error-classification-ref {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 560px) {
  .error-classification-ref {
    grid-template-columns: 1fr;
  }
}
.error-classification-compact {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.error-classification-compact .form-section {
  padding-top: 4px;
}
.error-classification-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.error-classification-row {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) auto;
  align-items: start;
  gap: 8px 10px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  background: var(--surface);
  transition: border-color 0.15s, background 0.15s;
}
.error-classification-row:hover {
  border-color: color-mix(in srgb, var(--accent, #2563eb) 40%, var(--border));
  background: var(--surface-2, #f8fafc);
}
.error-classification-row:has(input:checked) {
  border-color: var(--accent, #2563eb);
  background: color-mix(in srgb, var(--accent, #2563eb) 6%, white);
}
.error-classification-row input {
  margin-top: 2px;
}
.error-classification-row-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.error-classification-row-main strong {
  font-size: 12px;
  color: var(--text);
  line-height: 1.3;
}
.error-classification-desc {
  font-size: 11px;
  line-height: 1.35;
  color: var(--muted);
}
.error-classification-badge {
  font-size: 10px;
  font-weight: 700;
  color: #c93636;
  white-space: nowrap;
  padding-top: 1px;
}
.cq-review-error-toggle-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding: 4px 0 2px;
}
.cq-review-error-toggle-row .muted {
  font-size: 11px;
}
.cq-review-error-section {
  margin-top: 4px;
}
.cq-review-error-section[hidden] {
  display: none !important;
}
.score-preview.audit-calculator {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}
@media (max-width: 900px) {
  .audit-meta-row {
    grid-template-columns: 1fr;
  }
  .audit-penalty-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .score-preview.audit-calculator {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 760px) {
  .audit-evidence-row {
    grid-template-columns: 1fr;
  }
}
.audit-period-toggle-wrap {
  display: flex;
  align-items: end;
  padding-bottom: 2px;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.audit-period-block {
  display: grid;
  gap: 10px;
}
.audit-period-line {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
}
.audit-period-line .field-inline {
  min-width: 132px;
  flex: 0 1 140px;
}
.audit-period-end {
  padding-left: 0;
}
.score-preview.audit-calculator {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}
.evidence-preview-wrap.compact {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 10px;
  min-height: 0;
}
.evidence-preview-wrap.compact .evidence-thumb {
  width: 56px;
  height: 56px;
}
@media (max-width: 900px) {
  .score-preview.audit-calculator {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.alert-list { display: grid; gap: 10px; }
.schedule-fault-actions {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  vertical-align: middle;
}
.schedule-pattern-head,
.schedule-alert-li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
}
.schedule-alert-li {
  list-style: disc;
  margin-bottom: 6px;
}
.mission-metrics-card .mission-metric-value {
  font-size: 15px;
  color: var(--ink, #172033);
}
.mission-sheet-table {
  user-select: text;
}
.mission-sheet-table td:last-child {
  white-space: nowrap;
  user-select: all;
}
.mission-metrics-table td:nth-child(2) {
  white-space: nowrap;
}
td .muted { font-size: 10px; }
@media (max-width: 760px) {
  .criterion-box { grid-column: span 12 !important; }
}

/* Página /config — onboarding ADVBOX */
body.config-page { background: linear-gradient(180deg, color-mix(in srgb, var(--primary-soft) 70%, var(--bg)) 0%, var(--bg) 240px); }
.config-shell { min-height: 100vh; }
.config-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 28px;
  background: linear-gradient(180deg, var(--nav), #001040 100%);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 20;
}
.config-topbar .brand { padding: 0; }
.config-topbar .button.secondary { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.18); }
.config-topbar .button.secondary:hover { background: rgba(255,255,255,.14); }
.config-main { padding: 24px 28px 40px; display: grid; gap: 18px; max-width: 1280px; margin: 0 auto; }
.config-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.config-stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
  box-shadow: var(--shadow);
}
.config-stat strong { display: block; font-size: 28px; color: var(--primary); line-height: 1.1; }
.config-stat span { display: block; margin-top: 6px; color: var(--muted); font-size: 12px; }
.config-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}
.config-search { margin-bottom: 12px; }
.checklist {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: min(62vh, 640px);
  overflow: auto;
  padding-right: 4px;
}
.checklist-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 13px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-2);
  cursor: pointer;
}
.checklist-item:has(input:checked) {
  border-color: color-mix(in srgb, var(--primary) 55%, var(--border));
  background: var(--primary-soft);
}
.checklist-item.is-locked { opacity: .62; cursor: not-allowed; background: #f3f5f8; }
.checklist-item.is-locked:hover { border-color: var(--border); background: #f3f5f8; }
html.dark .checklist-item.is-locked,
html.dark .checklist-item.is-locked:hover { background: var(--bg); }
.vendas-config-page .config-summary, .cultivacao-config-page .config-summary { margin-bottom: 4px; }
.checklist-item input { width: auto; margin-top: 3px; accent-color: var(--primary); }
.checklist-item strong, .checklist-item small { display: block; }
.checklist-item strong { font-size: 13px; }
.checklist-item small { color: var(--muted); margin-top: 3px; font-size: 11px; }
.muted { color: var(--muted); font-size: 12px; }
@media (max-width: 980px) {
  .config-topbar { flex-direction: column; align-items: stretch; }
  .config-summary, .config-grid { grid-template-columns: 1fr; }
  .config-main { padding: 18px 16px 32px; }
}
tr.row-warning td { background: var(--warning-bg); }
tr.row-muted td { opacity: .72; }
.equipe-sector-select {
  min-width: 170px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

/* —— Planos de ação: Kanban Board —— */
.avatar.is-sm {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  font-size: 10px;
}
.ap-filters-bar {
  grid-template-columns: minmax(140px, 1fr) minmax(140px, 1fr) auto;
}
.ap-scope-toggle {
  margin: 8px 0 0;
}
.ap-scope-toggle .link-button {
  font-weight: 700;
}
.ap-summary-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.ap-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  border-radius: 999px;
  padding: 7px 12px;
  min-height: 34px;
  box-shadow: 0 1px 2px rgba(18, 32, 58, 0.04);
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.ap-pill:hover {
  border-color: color-mix(in srgb, var(--primary) 35%, var(--border));
  box-shadow: 0 4px 12px rgba(18, 32, 58, 0.08);
}
.ap-pill-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}
.ap-pill strong {
  font-size: 13px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.ap-pill.is-danger {
  background: color-mix(in srgb, var(--danger-bg) 70%, var(--surface));
  border-color: color-mix(in srgb, var(--danger) 28%, var(--border));
}
.ap-pill.is-danger strong { color: var(--danger); }
.ap-pill.is-success {
  background: color-mix(in srgb, var(--success-bg) 70%, var(--surface));
  border-color: color-mix(in srgb, var(--success) 28%, var(--border));
}
.ap-pill.is-success strong { color: var(--success); }
.ap-pill.is-muted {
  background: var(--surface-2);
}
.ap-kanban-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.ap-kanban-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 14px;
  align-items: start;
  width: 100%;
  min-width: 700px;
}
.ap-kanban-col {
  display: flex;
  flex-direction: column;
  min-width: 220px;
  min-height: 280px;
  max-height: min(72vh, 860px);
  border: 1px solid var(--border);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface-2) 82%, var(--surface));
  overflow: hidden;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.ap-kanban-col.is-drop-target {
  border-color: color-mix(in srgb, var(--primary) 55%, var(--border));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-soft) 80%, transparent);
  background: color-mix(in srgb, var(--primary-soft) 35%, var(--surface));
}
.ap-kanban-col-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.ap-kanban-col-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.ap-kanban-col-title h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
}
.ap-kanban-count {
  color: var(--muted);
  font-weight: 700;
}
.ap-kanban-dot {
  width: 8px;
  height: 8px;
  border-radius: 99px;
  flex: 0 0 auto;
  background: var(--muted);
}
.ap-kanban-col.tone-todo .ap-kanban-dot { background: var(--warning); }
.ap-kanban-col.tone-doing .ap-kanban-dot { background: var(--primary); }
.ap-kanban-col.tone-done .ap-kanban-dot { background: var(--success); }
.ap-kanban-col-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  overflow: auto;
  min-height: 0;
  flex: 1;
}
.ap-kanban-empty {
  padding: 28px 12px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  border: 1px dashed color-mix(in srgb, var(--border) 80%, var(--muted));
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 70%, transparent);
}
.ap-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  cursor: grab;
  transition: box-shadow .15s ease, transform .15s ease, border-color .15s ease;
  user-select: none;
}
html.dark .ap-card {
  background: #0f172a;
  border-color: #1e293b;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}
.ap-card:hover {
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}
html.dark .ap-card:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}
.ap-card.is-overdue {
  border-color: color-mix(in srgb, var(--danger) 28%, var(--border));
}
.ap-card.is-dragging {
  opacity: .55;
  cursor: grabbing;
  transform: scale(.98);
}
.ap-kanban-wrap.is-dragging-active .ap-card:not(.is-dragging) {
  opacity: .92;
}
.ap-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 2px;
}
.ap-card-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.ap-card .badge,
.ap-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.3;
  white-space: nowrap;
  border: 1px solid transparent;
}
.ap-chip-late {
  color: #d97706;
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.22);
}
html.dark .ap-chip-late {
  color: #fbbf24;
}
.ap-chip-error {
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  font-family: inherit;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.3;
  cursor: pointer;
  color: #dc2626;
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.2);
}
html.dark .ap-chip-error {
  color: #f87171;
}
.ap-chip-error:hover,
.ap-chip-error:focus-visible {
  background: rgba(239, 68, 68, 0.16);
  border-color: rgba(239, 68, 68, 0.32);
  outline: none;
}
.ap-card-error-icon {
  flex: 0 0 auto;
  display: block;
}
.ap-card-check {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  cursor: pointer;
  opacity: .7;
}
.ap-card-check:hover { opacity: 1; }
.ap-card-check input {
  width: 14px;
  height: 14px;
  accent-color: var(--primary);
  cursor: pointer;
}
.ap-card-id {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: 0 0 2px;
  font-size: 11px;
  font-weight: 500;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  color: #94a3b8;
  text-decoration: none;
  letter-spacing: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
a.ap-card-id:hover {
  color: var(--primary);
}
.ap-card-title {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  color: #1e293b;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
html.dark .ap-card-title {
  color: #f1f5f9;
}
.ap-card-title a {
  color: inherit;
  text-decoration: none;
}
.ap-card-title a:hover { text-decoration: underline; }
.ap-card-desc {
  margin: 0;
  font-size: 11px;
  line-height: 1.4;
  color: #64748b;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
html.dark .ap-card-desc {
  color: #94a3b8;
}
.ap-card-person {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin-top: 4px;
}
.ap-card .avatar.is-sm {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  font-size: 9px;
  flex: 0 0 auto;
}
.ap-card-person-name {
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
html.dark .ap-card-person-name {
  color: #e2e8f0;
}
.ap-card-role {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  padding: 2px 8px;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #64748b;
  font-size: 10px;
  font-weight: 600;
}
html.dark .ap-card-role {
  background: #1e293b;
  border-color: #334155;
  color: #94a3b8;
}
.ap-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #f1f5f9;
}
html.dark .ap-card-meta {
  border-top-color: #1e293b;
}
.ap-card-due {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  font-size: 11px;
  font-weight: 500;
  color: #64748b;
}
html.dark .ap-card-due { color: #94a3b8; }
.ap-card-due.is-late { color: #dc2626; font-weight: 600; }
html.dark .ap-card-due.is-late { color: #f87171; }
.ap-card-cal-icon { flex: 0 0 auto; }
.ap-card-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  justify-content: flex-end;
  position: relative;
  z-index: 3;
  opacity: .45;
  pointer-events: auto;
  transition: opacity .15s ease;
}
.ap-card-actions .button { pointer-events: auto; }
.ap-card:hover .ap-card-actions,
.ap-card:focus-within .ap-card-actions {
  opacity: 1;
}
@media (hover: none) {
  .ap-card-actions { opacity: 1; }
}
.ap-card-actions .button.icon-action {
  width: 26px;
  min-width: 26px;
  height: 26px;
  min-height: 26px;
  padding: 4px;
  border: 0;
  background: transparent;
  border-radius: 8px;
  color: #94a3b8;
  box-shadow: none;
}
.ap-card-actions .button.icon-action:hover,
.ap-card-actions .button.icon-action:focus-visible {
  background: #f1f5f9;
  color: #475569;
  outline: none;
}
html.dark .ap-card-actions .button.icon-action:hover,
html.dark .ap-card-actions .button.icon-action:focus-visible {
  background: #1e293b;
  color: #cbd5e1;
}
.ap-card-actions .button.danger.icon-action:hover,
.ap-card-actions .button.danger.icon-action:focus-visible {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
}
html.dark .ap-card-actions .button.danger.icon-action:hover,
html.dark .ap-card-actions .button.danger.icon-action:focus-visible {
  background: rgba(239, 68, 68, 0.16);
  color: #f87171;
}
.ap-edit-menu {
  position: fixed;
  z-index: 120;
  min-width: 188px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 14px 32px rgba(18, 32, 58, 0.16);
}
.ap-edit-menu-item {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
}
.ap-edit-menu-item:hover { background: var(--surface-2); }
.ap-edit-menu-item.is-danger { color: var(--danger); }
.ap-edit-menu-item.is-danger:hover { background: var(--danger-bg); }
.ap-remove-error-field {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}
tbody tr.is-error-removed td { opacity: .72; }
.ap-canceled-strip {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  padding: 10px 12px;
}
.ap-canceled-strip summary {
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
}
.ap-canceled-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
  margin-top: 10px;
}
.ap-canceled-grid .ap-card { cursor: pointer; }

@media (max-width: 1100px) {
  /* Mantém as 3 colunas lado a lado também em tela dividida;
     o wrap faz scroll horizontal se faltar espaço. */
  .ap-kanban-col {
    max-height: min(68vh, 760px);
  }
}
@media (max-width: 720px) {
  .ap-filters-bar { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .ap-kanban-grid {
    grid-template-columns: 1fr;
    min-width: 0;
  }
  .ap-kanban-col {
    min-width: 0;
    max-height: none;
    min-height: 0;
  }
}

/* Configurações — abas + formulários em 2 colunas */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.settings-page { gap: 0; }
.settings-shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}
.settings-tabs {
  position: sticky;
  top: 92px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.settings-tab {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
}
.settings-tab:hover { background: var(--table-hover); color: var(--ink); }
.settings-tab.is-active {
  background: var(--surface-2);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--border);
}
.settings-tab-icon {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: var(--muted);
}
.settings-tab.is-active .settings-tab-icon { color: var(--primary); }
.settings-tab-icon svg { width: 18px; height: 18px; display: block; }
.settings-content {
  min-width: 0;
  background: transparent;
}
.settings-tab-panel { display: block; }
.settings-tab-panel[hidden] { display: none !important; }
.settings-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
}
.settings-block.is-last,
.settings-block:last-child { border-bottom: 0; }
.settings-block-meta h3 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 750;
  color: var(--ink);
}
.settings-block-meta p {
  margin: 0;
  max-width: 52rem;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}
.settings-block-panel {
  min-width: 0;
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .05);
}
.settings-block-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--table-row-border);
}
.settings-btn-outline {
  background: var(--surface);
  border-color: var(--border);
}
.settings-fields-label {
  margin: 18px 0 10px;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
}
.settings-fields-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.settings-fields-grid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.settings-fields-grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.settings-fields-grid.cols-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) {
  .settings-fields-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .settings-fields-grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .settings-fields-grid.cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
.settings-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
}
.settings-field small { color: var(--muted); font-weight: 400; line-height: 1.4; }
.settings-input-unit {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--input-border);
  border-radius: 9px;
  background: var(--surface);
  overflow: hidden;
}
.settings-input-unit:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(31, 111, 255, .12);
}
.settings-input-unit input {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  min-width: 0;
}
.settings-input-unit input:focus { box-shadow: none; }
.settings-unit {
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  border-left: 1px solid var(--border);
  white-space: nowrap;
}
.settings-panel-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.settings-panel-hint {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}
.settings-search-field { flex: 1; min-width: 180px; max-width: 320px; }
.settings-table-wrap {
  overflow: auto;
  border: 1px solid var(--table-row-border);
  border-radius: 10px;
}
.settings-data-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.settings-users-table { min-width: 760px; }
.settings-data-table th {
  background: var(--surface-2);
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.settings-data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--table-row-border);
  vertical-align: middle;
}
.settings-data-table tbody tr:last-child td { border-bottom: 0; }
.settings-data-table tbody tr:hover { background: var(--table-hover); }
.settings-data-table .col-actions {
  width: 1%;
  text-align: right;
  white-space: nowrap;
}
.settings-user-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 160px;
}
.settings-user-cell strong { font-size: 13px; }
.settings-avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 10px;
  font-weight: 800;
}
.settings-badge-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.settings-email-cell { color: var(--muted); }
.settings-nowrap { white-space: nowrap; }
.settings-slug {
  font-size: 11px;
  background: var(--surface-2);
  padding: 2px 6px;
  border-radius: 6px;
  color: var(--muted);
}
.settings-audit-table td { padding: 8px 12px; }
.settings-view-as {
  margin: 0 0 8px;
}
.settings-view-as-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.settings-view-as-copy { display: grid; gap: 2px; min-width: 0; }
.settings-view-as-copy strong { font-size: 13px; }
.settings-view-as-copy span { color: var(--muted); font-size: 12px; }
.settings-view-as-select {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  min-width: 220px;
}
.settings-sync-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.settings-sync-status {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.settings-sync-status strong { display: block; font-size: 13px; }
.settings-sync-status p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
/* Administração → Bots e agentes */
.bot-card-list { display: grid; gap: 12px; }
.bot-card { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 14px 16px; }
.bot-card.is-off { background: var(--surface-2); }
.bot-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.bot-card-title h4 { margin: 0 0 6px; font-size: 14px; color: var(--ink); }
.bot-card-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.bot-card-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.bot-card-desc { margin: 10px 0 0; font-size: 12px; color: var(--muted); max-width: 72ch; }
.bot-card-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px 20px; margin: 12px 0 0; }
.bot-card-facts dt { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 3px; }
.bot-card-facts dd { margin: 0; font-size: 12px; color: var(--text); }
.bot-card-run { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.bot-card-summary { display: block; margin-top: 4px; }
.bot-card-error { display: block; margin-top: 4px; color: var(--danger); font-size: 12px; overflow-wrap: anywhere; }
.bot-card-error-inline { color: var(--danger); }
.bot-card-warn { color: var(--warning); }
.bot-card-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); font-size: 11px; }
.bot-card-link { background: none; border: 0; padding: 0; color: var(--primary); font-size: 12px; cursor: pointer; }
.bot-card-link:hover { text-decoration: underline; }
.bot-card-history { margin-top: 10px; }
/* Administração → Auditoria & Dados → Saúde do CQ */
.health-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.health-summary.is-error { border-color: color-mix(in srgb, var(--danger) 40%, var(--surface)); background: var(--danger-bg); }
.health-summary.is-warning { border-color: color-mix(in srgb, var(--warning) 40%, var(--surface)); background: var(--warning-bg); }
.health-summary.is-ok { border-color: color-mix(in srgb, var(--success) 35%, var(--surface)); background: var(--success-bg); }
.health-summary-main strong { display: block; font-size: 15px; color: var(--ink); }
.health-summary-main span { font-size: 12px; color: var(--muted); }
.health-summary-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 12px; }
.health-summary-actions label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; color: var(--text); }
.health-groups { display: grid; gap: 14px; margin-top: 14px; }
.health-group h4 { margin: 0 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.health-list { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.health-row { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; gap: 4px 10px; align-items: start; padding: 10px 14px; border-top: 1px solid var(--border); }
.health-row:first-child { border-top: 0; }
.health-dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 4px; background: var(--muted); }
.health-dot.is-ok { background: var(--success); }
.health-dot.is-warning { background: var(--warning); }
.health-dot.is-error { background: var(--danger); }
.health-dot.is-off { background: transparent; border: 2px solid var(--muted); width: 8px; height: 8px; }
.health-dot.is-info { background: var(--primary); }
.health-row-name { font-size: 13px; font-weight: 600; color: var(--ink); }
.health-row-detail { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.health-row.is-error .health-row-detail { color: var(--danger); }
.health-row-where { display: block; margin-top: 2px; font-size: 11px; color: var(--muted); }
.health-row-side { text-align: right; font-size: 11px; color: var(--muted); white-space: nowrap; }
.health-row-side .badge { margin-bottom: 4px; }
.health-empty { padding: 12px 14px; font-size: 12px; color: var(--muted); }
.health-events { margin-top: 18px; }
.health-events-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.health-events-head h4 { margin: 0; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.health-event-msg { font-size: 12px; color: var(--text); overflow-wrap: anywhere; }
.health-event-msg details summary { cursor: pointer; color: var(--primary); font-size: 11px; margin-top: 4px; }
.health-event-msg pre { margin: 6px 0 0; padding: 8px; background: var(--surface-2); border-radius: 8px; font-size: 11px; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 220px; overflow: auto; }
.settings-tab-count { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 6px; border-radius: 9px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; }
@media (max-width: 640px) {
  .health-row { grid-template-columns: 14px minmax(0, 1fr); }
  .health-row-side { grid-column: 2; text-align: left; }
}
.settings-danger-zone .settings-block-meta h3 { color: var(--danger); }
.settings-danger-panel {
  border-color: color-mix(in srgb, var(--danger) 35%, var(--surface));
  background: var(--danger-bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.settings-danger-copy { min-width: 0; }
.settings-danger-copy strong { display: block; font-size: 13px; color: var(--danger); }
.settings-danger-copy p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }

@media (max-width: 980px) {
  .settings-shell {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .settings-tabs {
    position: static;
    flex-direction: row;
    overflow-x: auto;
    gap: 6px;
  }
  .settings-tab { width: auto; flex: 0 0 auto; white-space: nowrap; }
}
@media (max-width: 700px) {
  .settings-fields-grid,
  .settings-fields-grid.cols-3,
  .settings-fields-grid.cols-4,
  .settings-fields-grid.cols-5 { grid-template-columns: 1fr; }
  .settings-block-actions,
  .settings-panel-toolbar,
  .settings-sync-card,
  .settings-danger-panel { justify-content: stretch; }
  .settings-block-actions .button,
  .settings-danger-panel .button { width: 100%; }
}

/* Modal Análise de transcrição — qualidade da condução */
.transcript-review-form { align-items: start; }
.transcript-review-filters {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.transcript-notes-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-2);
}
.transcript-notes-card-header h4 {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
}
.transcript-notes-card-header p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
}
.transcript-notes-field { margin: 0; }
.transcript-notes-textarea {
  width: 100%;
  min-height: 120px;
  line-height: 1.55;
  font-weight: 500;
}
.transcript-actions-row,
.transcript-analyze-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.transcript-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 7px 12px;
}
.transcript-action-btn svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}
.transcript-analysis-result {
  display: grid;
  gap: 16px;
}
.transcript-analysis-empty { margin: 0; }
.transcript-overall-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.transcript-overall-kicker {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.transcript-overall-copy strong {
  font-size: 16px;
  line-height: 1.3;
}
.transcript-overall-score {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}
.transcript-overall-number {
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.transcript-score-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.transcript-score-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 138px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.transcript-score-label {
  display: -webkit-box;
  min-height: 32px;
  color: #3d4a5c;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.transcript-score-value {
  margin-top: auto;
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.transcript-score-meta {
  display: flex;
  align-items: center;
  margin-top: 10px;
  min-height: 22px;
}
.transcript-score-meta .badge {
  text-transform: lowercase;
}
.transcript-analysis-blocks {
  display: grid;
  gap: 12px;
}
.transcript-analysis-block {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  overflow: hidden;
}
.transcript-analysis-block summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.transcript-analysis-block summary::-webkit-details-marker { display: none; }
.transcript-analysis-block-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
}
.transcript-analysis-chevron {
  display: inline-flex;
  color: var(--muted);
  transition: transform .15s ease;
}
.transcript-analysis-block[open] .transcript-analysis-chevron {
  transform: rotate(180deg);
}
.transcript-analysis-block-body {
  padding: 0 16px 16px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.55;
}
.transcript-analysis-block-body p { margin: 0; }
.transcript-analysis-points {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
}
.transcript-analysis-points li { padding-left: 2px; }
.transcript-panel {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}
.transcript-panel h4 {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 800;
}
.transcript-panel-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
  font-size: 13px;
  line-height: 1.45;
}
.transcript-sentiment-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
}
.transcript-quote {
  margin: 8px 0 0;
  padding: 10px 12px;
  border-left: 3px solid var(--primary);
  border-radius: 0 10px 10px 0;
  background: var(--surface-2);
  color: #3b4558;
  font-size: 12px;
  line-height: 1.45;
}
.transcript-excerpt + .transcript-excerpt { margin-top: 8px; }

@media (min-width: 768px) {
  .transcript-review-filters {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .transcript-score-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 767px) {
  .transcript-overall-banner {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Seletor de círculo — trigger da workspace ativa + popover de troca.
   Antes eram 6 botões numa grade: com Farmers, Hunters e Coordenação as
   siglas não cabiam mais e o nome vinha cortado. Agora o nome aparece
   inteiro e a lista completa vive no menu suspenso. */
.workspace-select {
  position: relative;
  margin: 0 4px 12px;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}
.workspace-select[hidden] { display: none !important; }

.ws-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 10px;
  border-radius: 12px;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.10);
  color: #fff;
  cursor: pointer;
  text-align: left;
  box-sizing: border-box;
  transition: background .15s ease, border-color .15s ease;
}
.ws-trigger:hover { background: rgba(255,255,255,.15); }
.ws-trigger:focus-visible { outline: 2px solid #60a5fa; outline-offset: 2px; }
.ws-trigger.is-open { background: rgba(255,255,255,.15); border-color: rgba(255,255,255,.22); }
.ws-trigger-main { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ws-trigger-name {
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  line-height: 1.2;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ws-chevron { width: 16px; height: 16px; flex: none; color: #cbd5e1; transition: transform .15s ease; }
.ws-trigger.is-open .ws-chevron { transform: rotate(180deg); }

/* Chip com a sigla do círculo (IS, CV, VD, FA, HU, CO). */
.ws-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #2563eb;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
  line-height: 1;
}
.ws-option .ws-badge { background: rgba(37,99,235,.22); color: #93c5fd; }
.ws-option.is-active .ws-badge { background: #2563eb; color: #fff; }

.ws-popover {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  margin-top: 4px;
  padding: 6px;
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 12px;
  box-shadow: 0 20px 25px -5px rgba(0,0,0,.45), 0 8px 10px -6px rgba(0,0,0,.35);
  z-index: 50;
  box-sizing: border-box;
  animation: wsPopoverIn .12s ease-out;
}
.ws-popover[hidden] { display: none !important; }
@keyframes wsPopoverIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .ws-popover { animation: none; }
  .ws-chevron { transition: none; }
}

.ws-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 8px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #e2e8f0;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  box-sizing: border-box;
  transition: background .15s ease, color .15s ease;
}
.ws-option + .ws-option { margin-top: 2px; }
.ws-option:hover { background: #1e293b; color: #fff; }
.ws-option:focus-visible { outline: 2px solid #60a5fa; outline-offset: -2px; }
.ws-option.is-active { color: #fff; }
.ws-option-main { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ws-option-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-check { width: 16px; height: 16px; flex: none; color: #60a5fa; }
.area-switch[hidden] { display: none !important; }
.app-shell.workspace-vendas .sidebar { background: linear-gradient(180deg, #001a4d 0%, #001033 100%); }
.app-shell.workspace-vendas .nav-item[data-workspace="cs"],
.app-shell.workspace-cs .nav-item[data-workspace="vendas"] { display: none !important; }
.app-shell.workspace-vendas #quickRoutineBtn,
.app-shell.workspace-vendas #quickAuditBtn,
.app-shell.workspace-vendas .cq-tools-sort { display: none !important; }
.vendas-next-list { margin: 0; padding: 0 0 4px 18px; color: var(--muted); }
.vendas-next-list li { margin: 0 0 8px; }
.vendas-home .section-heading h2 { margin: 0 0 6px; }
.vendas-team-grid { margin-top: 12px; }
.vendas-mission-hero {
  display: grid;
  gap: 14px;
  padding: 20px 22px;
}
.vendas-mission-hero-copy .eyebrow {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}
.vendas-mission-hero-copy strong {
  display: block;
  font-size: 28px;
  letter-spacing: -0.03em;
  margin: 6px 0 4px;
}
.vendas-mission-hero-bar {
  height: 10px;
  border-radius: 99px;
  background: #e8eef8;
  overflow: hidden;
}
.vendas-mission-hero-bar span {
  display: block;
  height: 100%;
  background: #0b3bb8;
  border-radius: inherit;
  min-width: 0;
  transition: width .25s ease;
}
.vendas-mission-hero.is-hit .vendas-mission-hero-bar span { background: #14804a; }
.vendas-mission-hero.is-near .vendas-mission-hero-bar span { background: #c47b16; }
.vendas-mission-levels {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
}
.vendas-mission-levels li {
  padding: 3px 9px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
  background: #e8eef8;
  color: #4a5b78;
}
.vendas-mission-levels li.is-current {
  background: #0b3bb8;
  color: #fff;
}
.vendas-mission-hero.is-hit .vendas-mission-levels li.is-current { background: #14804a; }
.vendas-mission-hero.is-near .vendas-mission-levels li.is-current { background: #c47b16; }
.vendas-leadership .kpi-block-title { margin-top: 4px; }
.sales-funnel-card { overflow: hidden; }
.sales-funnel-card .card-header { align-items: flex-start; gap: 12px; }
.sales-funnel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}
.sales-funnel-kpis { padding: 0 0 8px; }
.sales-funnel-pipeline {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 16px;
  border-radius: 12px;
  box-shadow: 0 1px 2px color-mix(in srgb, var(--ink) 6%, transparent);
  margin: 0 0 16px;
}
.sales-funnel-pipeline .sales-funnel-step {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px 8px;
  text-align: left;
  min-width: 0;
  color: var(--ink);
}
.sales-funnel-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 4px 0 8px;
}
.sales-funnel-step {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 10px 10px;
  text-align: center;
  min-width: 0;
  color: var(--ink);
}
.sales-funnel-step.is-discard { background: var(--danger-bg); border-color: rgba(239, 68, 68, 0.2); }
.sales-funnel-step-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}
.sales-funnel-step strong {
  display: block;
  font-size: 22px;
  letter-spacing: -0.03em;
  margin: 0 0 8px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.sales-funnel-step-hint {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-top: -4px;
}
.sales-funnel-pipeline .sales-funnel-step.is-total strong { margin-bottom: 2px; }
.sales-funnel-step-bar {
  display: block;
  height: 6px;
  border-radius: 99px;
  background: color-mix(in srgb, var(--border) 80%, var(--surface-2));
  overflow: hidden;
}
.sales-funnel-step-bar i {
  display: block;
  height: 100%;
  background: var(--primary);
  border-radius: inherit;
  min-width: 0;
}
.sales-funnel-step.is-reuniao .sales-funnel-step-bar i { background: #3b82f6; }
.sales-funnel-step.is-validando .sales-funnel-step-bar i { background: #06b6d4; }
.sales-funnel-step.is-proposta .sales-funnel-step-bar i { background: #f59e0b; }
.sales-funnel-step.is-negociando .sales-funnel-step-bar i { background: #8b5cf6; }
.sales-funnel-step.is-discard strong { color: var(--danger); }
.sales-funnel-step.is-discard .sales-funnel-step-bar i { background: var(--danger); }
.sales-funnel-footnote { margin: 0 0 12px; font-size: 12px; }
.sales-pace-card { overflow: hidden; }
.sales-pace-card .card-header { align-items: flex-start; gap: 12px; }
.sales-pace-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 0 20px 8px;
}
.sales-pace-grid.is-closed {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.sales-pace-metric {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px 14px;
  min-width: 0;
}
.sales-pace-metric span {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
}
.sales-pace-metric strong {
  display: block;
  font-size: 22px;
  letter-spacing: -0.03em;
  margin: 6px 0 4px;
  color: var(--ink);
}
.sales-pace-metric small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 10px;
}
.sales-pace-bar {
  display: block;
  height: 6px;
  border-radius: 99px;
  background: color-mix(in srgb, var(--border) 80%, var(--surface-2));
  overflow: hidden;
}
.sales-pace-bar i {
  display: block;
  height: 100%;
  background: var(--primary);
  border-radius: inherit;
}
.sales-pace-behind .sales-pace-metric:first-child strong { color: var(--danger); }
.sales-pace-behind .sales-pace-metric:first-child .sales-pace-bar i { background: var(--danger); }
.sales-pace-ahead .sales-pace-metric:first-child strong { color: var(--success); }
.sales-pace-ahead .sales-pace-metric:first-child .sales-pace-bar i { background: var(--success); }
.sales-pace-on_track .sales-pace-metric:first-child .sales-pace-bar i { background: var(--primary); }
.sales-pace-metric.is-expected .sales-pace-bar i { background: color-mix(in srgb, var(--muted) 55%, var(--primary)); }
.sales-pace-volume { margin: 4px 20px 12px; font-size: 12px; }
.sales-funnel-step.is-partial { border-style: dashed; }
@media (max-width: 900px) {
  .sales-pace-grid { grid-template-columns: 1fr; }
}
.sales-funnel-table { width: 100%; background: var(--surface); }
.sales-funnel-table th,
.sales-funnel-table td {
  border-bottom: 1px solid var(--table-row-border);
  vertical-align: middle;
}
.sales-funnel-table tbody tr:hover {
  background: color-mix(in srgb, var(--surface-2) 80%, transparent);
}
html.dark .sales-funnel-table tbody tr:hover {
  background: rgba(30, 41, 59, 0.4);
}
.sales-funnel-closer-name {
  font-weight: 700;
  letter-spacing: -0.01em;
  text-transform: none;
}
.sales-funnel-table th.sales-funnel-num,
.sales-funnel-table td.sales-funnel-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.sales-funnel-table td.sales-funnel-num.is-zero {
  color: #cbd5e1;
}
html.dark .sales-funnel-table td.sales-funnel-num.is-zero {
  color: #475569;
}
.sales-funnel-ops {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
}
.sales-funnel-ops-count {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  white-space: nowrap;
}
.sales-funnel-ops-count.is-green { color: #059669; }
.sales-funnel-ops-count.is-yellow { color: #d97706; }
.sales-funnel-ops-count.is-red { color: #dc2626; }
html.dark .sales-funnel-ops-count.is-green { color: #34d399; }
html.dark .sales-funnel-ops-count.is-yellow { color: #fbbf24; }
html.dark .sales-funnel-ops-count.is-red { color: #f87171; }
.sales-funnel-audit-btn,
.sales-funnel-audit-done {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  flex-shrink: 0;
}
.sales-funnel-audit-btn {
  font: inherit;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.sales-funnel-audit-btn:hover {
  background: var(--primary-soft);
  color: var(--primary);
  border-color: color-mix(in srgb, var(--primary) 28%, var(--border));
}
.sales-funnel-audit-done {
  opacity: .7;
  cursor: default;
}
.sales-funnel-audit-btn svg,
.sales-funnel-audit-done svg {
  width: 14px;
  height: 14px;
}
.sales-funnel-legend { margin: 8px 0 0; font-size: 12px; }
.sales-region-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  max-width: 280px;
}
.sales-region-chip { white-space: nowrap; }
.sales-region-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 8px 20px 16px;
  font-size: 12px;
}
@media (max-width: 900px) {
  .vendas-leadership .kpi-grid-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sales-funnel-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sales-funnel-pipeline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sales-funnel-pipeline .sales-funnel-step.is-total { grid-column: 1 / -1; }
  .sales-funnel-card .card-header { flex-direction: column; }
  .sales-pace-card .card-header { flex-direction: column; }
}

/* Sidebar recolhida: só o chip da workspace ativa; o popover vira um
   flyout à direita, porque a barra tem 84px e o menu não caberia embaixo. */
.app-shell.sidebar-collapsed .workspace-select { margin: 0 0 12px; }
.app-shell.sidebar-collapsed .ws-trigger {
  justify-content: center;
  padding: 0;
  background: transparent;
  border-color: transparent;
}
.app-shell.sidebar-collapsed .ws-trigger:hover { background: rgba(255,255,255,.08); }
.app-shell.sidebar-collapsed .ws-trigger-name,
.app-shell.sidebar-collapsed .ws-chevron { display: none; }
.app-shell.sidebar-collapsed .ws-badge { width: 36px; height: 36px; border-radius: 8px; font-size: 12px; }
.app-shell.sidebar-collapsed .ws-popover {
  top: 0;
  left: calc(100% + 10px);
  width: 220px;
  margin-top: 0;
  animation-name: wsPopoverInSide;
}
@keyframes wsPopoverInSide {
  from { opacity: 0; transform: translateX(-4px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Modal Nova auditoria geral mensal — layout compacto com placar fixo */
.modal-body:has(.audit-monthly-shell) {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
}
.audit-monthly-shell {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
}
.audit-monthly-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.audit-monthly-scroll > * {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}
.audit-monthly-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  width: 100%;
}
.audit-collab-combobox {
  flex: 1 1 280px;
  min-width: 220px;
  margin: 0;
}
.audit-collab-combobox .field { margin: 0; }
.audit-collab-control {
  position: relative;
}
.audit-collab-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  display: grid;
  place-items: center;
  pointer-events: none;
}
.audit-collab-native {
  display: none !important;
}
.audit-collab-control input[type="search"] {
  width: 100%;
  padding-left: 36px;
}
.audit-collab-dropdown {
  position: absolute;
  z-index: 20;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  margin: 0;
  padding: 6px;
  list-style: none;
  max-height: 240px;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(18, 32, 58, .16);
}
.audit-collab-option {
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
}
.audit-collab-option:hover,
.audit-collab-option.is-active { background: var(--primary-soft); }
.audit-collab-option.is-selected { font-weight: 700; color: var(--primary-dark); }
.audit-collab-empty {
  padding: 10px;
  color: var(--muted);
  font-size: 12px;
}
.audit-month-tag {
  align-self: center;
  font-size: 11px;
  padding: 8px 12px;
}
.audit-monthly-meta {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px 16px;
  align-items: start;
}
.audit-monthly-meta .evidence-preview-wrap.compact { grid-column: 1 / -1; }

.audit-suggest-empty {
  margin: 0;
  padding: 10px 12px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  font-size: 12px;
}
.audit-suggest-shell { display: grid; gap: 8px; }
.audit-suggest-toggle {
  justify-content: flex-start;
  flex-wrap: wrap;
  width: 100%;
  text-align: left;
  gap: 8px;
}
.audit-suggest-toggle svg { transition: transform .15s ease; }
.audit-suggest-toggle.is-open svg { transform: rotate(180deg); }
.audit-suggest-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  width: 100%;
}
.audit-suggest-drawer {
  display: grid;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-2);
}
.audit-suggest-drawer[hidden] { display: none !important; }
.audit-suggest-section { display: grid; gap: 8px; }
.audit-suggest-section h4 {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
}
.audit-suggest-items,
.audit-suggest-bullets {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}
.audit-suggest-item {
  display: grid;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
}
.audit-suggest-item-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.audit-suggest-bullets li {
  position: relative;
  padding-left: 14px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}
.audit-suggest-bullets li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .55em;
  width: 6px;
  height: 6px;
  border-radius: 99px;
  background: var(--primary);
}
.audit-ext-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin: 0 2px;
  vertical-align: middle;
  border-radius: 7px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  text-decoration: none;
}
.audit-ext-link:hover { background: var(--primary); color: #fff; }

.audit-criteria-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  width: 100%;
}
.audit-criterion-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-2);
  min-width: 0;
}
.audit-criterion-label {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
}
.audit-criterion-just { display: grid; gap: 6px; }
.audit-just-toggle {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  text-align: left;
}
.audit-just-toggle span { color: var(--muted); font-weight: 500; }
.audit-just-field {
  max-height: 6rem;
  overflow-y: auto;
  resize: none;
  field-sizing: fixed;
  min-height: 48px;
}
.audit-criterion-just.is-expanded .audit-just-field {
  max-height: 16rem;
  resize: vertical;
}

.audit-penalty-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 4px;
  padding: 2px 6px;
  border-radius: 99px;
  background: var(--danger-bg);
  color: var(--danger);
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}
.audit-root-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 12px;
}
.audit-root-cause { grid-column: 1 / -1; }

.audit-monthly-scoreboard {
  position: sticky;
  bottom: 0;
  z-index: 10;
  flex: 0 0 auto;
  padding: 14px 20px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  box-shadow: 0 -10px 28px rgba(18, 32, 58, .1);
}
.audit-scoreboard-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  text-align: center;
}
.audit-scoreboard-grid strong {
  display: block;
  font-size: 20px;
  line-height: 1.2;
}
.audit-scoreboard-grid span {
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.audit-scoreboard-class {
  padding: 4px 8px;
  border-radius: 12px;
  background: var(--surface-2);
}
.audit-scoreboard-class strong {
  font-size: 13px;
}
.audit-scoreboard-class[data-class-key="excelencia"],
.audit-scoreboard-class[data-class-key="excelente"] {
  background: var(--success-bg);
  color: var(--success);
}
.audit-scoreboard-class[data-class-key="muito_bom"],
.audit-scoreboard-class[data-class-key="bom"] {
  background: var(--primary-soft);
  color: var(--primary-dark);
}
.audit-scoreboard-class[data-class-key="ruim"] {
  background: var(--warning-bg);
  color: var(--warning);
}
.audit-scoreboard-class[data-class-key="pessimo"] {
  background: var(--danger-bg);
  color: var(--danger);
}

@media (min-width: 768px) {
  .audit-criteria-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .audit-root-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .audit-monthly-meta { grid-template-columns: 1fr; }
  .audit-scoreboard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .audit-scoreboard-class { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .audit-monthly-header { flex-direction: column; align-items: stretch; }
  .audit-month-tag { align-self: flex-start; }
}

/* ThemeToggle — Lucide Sun/Moon com rotação e fade */
.theme-toggle {
  position: relative;
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  cursor: pointer;
  overflow: hidden;
  flex: 0 0 auto;
  padding: 0;
  transition: background .2s ease, border-color .2s ease, color .2s ease;
}
.theme-toggle:hover,
.theme-toggle:focus-visible {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  outline: none;
}
.theme-toggle-glyph {
  width: 18px;
  height: 18px;
  display: block;
  grid-area: 1 / 1;
  transition: transform .35s ease, opacity .22s ease;
}
.theme-toggle .theme-toggle-sun {
  opacity: 0;
  transform: rotate(-90deg) scale(.45);
}
.theme-toggle .theme-toggle-moon {
  opacity: 1;
  transform: rotate(0) scale(1);
}
.theme-toggle.is-dark .theme-toggle-sun {
  opacity: 1;
  transform: rotate(0) scale(1);
}
.theme-toggle.is-dark .theme-toggle-moon {
  opacity: 0;
  transform: rotate(90deg) scale(.45);
}
.theme-toggle.is-system::after {
  content: '';
  position: absolute;
  right: 5px;
  bottom: 5px;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #38bdf8;
  box-shadow: 0 0 0 2px rgba(2, 6, 23, 0.45);
}
/* Administração do sistema mora no pé da sidebar, acima do botão de tema:
   é configuração do sistema, não uma página do círculo. */
.sidebar-footer-nav {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,.10);
}
.sidebar-footer-nav .nav-item[hidden] { display: none !important; }
.sidebar-footer-nav:not(:has(.nav-item:not([hidden]))) { border-top: 0; padding-top: 0; margin-top: 0; }

.theme-toggle--sidebar {
  margin: 12px 4px 0;
  width: 100%;
  height: 40px;
  border-radius: 10px;
}
.app-shell.sidebar-collapsed .theme-toggle--sidebar {
  width: 40px;
  margin: 12px auto 0;
}
@media (max-width: 1100px) {
  .theme-toggle--sidebar {
    width: 40px;
    margin: 12px auto 0;
  }
}
.theme-toggle--header {
  display: none;
  border-color: var(--border);
  background: var(--surface);
  color: var(--ink);
}
.theme-toggle--header:hover,
.theme-toggle--header:focus-visible {
  background: var(--surface-2);
  color: var(--primary);
}
.theme-toggle--header.is-system::after {
  box-shadow: 0 0 0 2px var(--surface);
}
.theme-toggle--auth {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 80;
  display: none;
}
html:has(#authRoot:not([hidden])) .theme-toggle--auth {
  display: inline-grid;
}
@media (max-width: 700px) {
  .theme-toggle--sidebar { display: none; }
  .theme-toggle--header { display: inline-grid; }
}

html.dark .button.danger { border-color: rgba(239, 68, 68, 0.28); }
html.dark .button.seen {
  color: var(--success);
  background: var(--success-bg);
  border-color: rgba(16, 185, 129, 0.28);
}
html.dark .button.seen:hover {
  background: rgba(16, 185, 129, 0.18);
  border-color: rgba(16, 185, 129, 0.4);
}
html.dark .flag-badge.neutral {
  color: var(--muted);
  background: var(--surface-2);
}
html.dark .access-log-divider { border-color: var(--border); }
html.dark .button.secondary:hover { border-color: var(--input-border); }
html.dark .occ-table tbody tr:hover td.col-actions { background: var(--table-hover); }
html.dark .occ-crm-status-select {
  background-color: var(--surface-2, #1e293b);
  border-color: var(--input-border, #334155);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><path d='m6 9 6 6 6-6'/></svg>");
}

.mission-compare-picker { display: flex; flex-direction: column; gap: 4px; }
.mission-compare-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.mission-compare-fixed { flex: 0 0 auto; }
.mission-compare-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 4px;
}
.mission-compare-preset {
  appearance: none;
  font: inherit;
  font-size: 12px;
  line-height: 1.2;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--muted);
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.mission-compare-preset:hover,
.mission-compare-preset:focus-visible {
  background: color-mix(in srgb, var(--ink) 6%, var(--surface-2));
  color: var(--ink);
  border-color: color-mix(in srgb, var(--ink) 16%, var(--border));
}
html.dark .mission-compare-preset {
  background: #1e293b;
  border-color: #334155;
  color: #cbd5e1;
}
html.dark .mission-compare-preset:hover,
html.dark .mission-compare-preset:focus-visible {
  background: #334155;
  color: #e2e8f0;
}
.mission-month-chip-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0 8px;
}
@media (min-width: 640px) {
  .mission-month-chip-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.mission-month-chip {
  appearance: none;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--muted);
  text-align: left;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  transition: border-color .15s ease, background .15s ease, color .15s ease, opacity .15s ease, box-shadow .15s ease;
}
.mission-month-chip input[name="compareMonths"] {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  pointer-events: none;
}
.mission-month-chip:hover:not(:disabled):not(.is-active) {
  border-color: color-mix(in srgb, var(--ink) 18%, var(--border));
  color: var(--ink);
}
.mission-month-chip.is-active,
.mission-month-chip:has(input:checked) {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--ink);
  font-weight: 650;
  box-shadow: 0 1px 2px color-mix(in srgb, var(--primary) 18%, transparent);
}
html.dark .mission-month-chip {
  background: #0f172a;
  border-color: #1e293b;
  color: #94a3b8;
}
html.dark .mission-month-chip:hover:not(:disabled):not(.is-active) {
  border-color: #334155;
  color: #e2e8f0;
}
html.dark .mission-month-chip.is-active,
html.dark .mission-month-chip:has(input:checked) {
  background: rgba(37, 99, 235, 0.15);
  border-color: #3b82f6;
  color: #fff;
}
.mission-month-chip-check {
  flex: 0 0 auto;
  opacity: 0;
  font-weight: 800;
  color: var(--primary);
}
.mission-month-chip.is-active .mission-month-chip-check,
.mission-month-chip:has(input:checked) .mission-month-chip-check { opacity: 1; }
html.dark .mission-month-chip.is-active .mission-month-chip-check,
html.dark .mission-month-chip:has(input:checked) .mission-month-chip-check { color: #93c5fd; }
.mission-month-chip.is-locked,
.mission-month-chip:disabled {
  opacity: .5;
  cursor: not-allowed;
}

@media print {
  html.dark {
    color-scheme: light;
    --bg: #ffffff;
    --surface: #ffffff;
    --surface-2: #f1f5f9;
    --ink: #0f172a;
    --muted: #5f6f88;
    --border: #e2e8f0;
    --input-bg: #ffffff;
    --sticky-bg: #ffffff;
    --popover-bg: #ffffff;
    --mix-base: #ffffff;
  }
}


/* ==========================================================================
   Gestão Estratégica (public/js/pages/gestao-estrategica.js) — prefixo .ge-
   Cores da sinaleira: tokens próprios, redefinidos no tema escuro.
   ========================================================================== */
.ge-page {
  --ge-green: #16a34a; --ge-green-soft: #e8f7ee;
  --ge-yellow: #d99a06; --ge-yellow-soft: #fdf5dc;
  --ge-orange: #ea6a0c; --ge-orange-soft: #fdeede;
  --ge-red: #dc2f2f; --ge-red-soft: #fdeaea;
  --ge-blue: #2563eb; --ge-blue-soft: #e8f0fe;
  --ge-none: #a3b0c2; --ge-none-soft: var(--surface-2);
  --ge-gray: #64748b;
}
html.dark .ge-page {
  --ge-green: #34d399; --ge-green-soft: rgba(52, 211, 153, .12);
  --ge-yellow: #facc15; --ge-yellow-soft: rgba(250, 204, 21, .12);
  --ge-orange: #fb923c; --ge-orange-soft: rgba(251, 146, 60, .13);
  --ge-red: #f87171; --ge-red-soft: rgba(248, 113, 113, .13);
  --ge-blue: #60a5fa; --ge-blue-soft: rgba(96, 165, 250, .13);
  --ge-none: #52627a; --ge-none-soft: rgba(148, 163, 184, .08);
  --ge-gray: #94a3b8;
}
.ge-page .ge-green { --ge-c: var(--ge-green); --ge-soft: var(--ge-green-soft); }
.ge-page .ge-yellow { --ge-c: var(--ge-yellow); --ge-soft: var(--ge-yellow-soft); }
.ge-page .ge-orange { --ge-c: var(--ge-orange); --ge-soft: var(--ge-orange-soft); }
.ge-page .ge-red { --ge-c: var(--ge-red); --ge-soft: var(--ge-red-soft); }
.ge-page .ge-blue { --ge-c: var(--ge-blue); --ge-soft: var(--ge-blue-soft); }
.ge-page .ge-none { --ge-c: var(--ge-none); --ge-soft: var(--ge-none-soft); }

/* Os modais ficam fora de .ge-page (#modalRoot) — mesmas cores lá dentro. */
#modalRoot .ge-pill, #modalRoot .ge-level, #modalRoot .ge-dot { --ge-c: var(--muted); --ge-soft: var(--surface-2); }
#modalRoot .ge-green { --ge-c: #16a34a; --ge-soft: #e8f7ee; }
#modalRoot .ge-yellow { --ge-c: #b98304; --ge-soft: #fdf5dc; }
#modalRoot .ge-orange { --ge-c: #ea6a0c; --ge-soft: #fdeede; }
#modalRoot .ge-red { --ge-c: #dc2f2f; --ge-soft: #fdeaea; }
#modalRoot .ge-blue { --ge-c: #2563eb; --ge-soft: #e8f0fe; }
html.dark #modalRoot .ge-green { --ge-c: #34d399; --ge-soft: rgba(52, 211, 153, .12); }
html.dark #modalRoot .ge-yellow { --ge-c: #facc15; --ge-soft: rgba(250, 204, 21, .12); }
html.dark #modalRoot .ge-orange { --ge-c: #fb923c; --ge-soft: rgba(251, 146, 60, .13); }
html.dark #modalRoot .ge-red { --ge-c: #f87171; --ge-soft: rgba(248, 113, 113, .13); }
html.dark #modalRoot .ge-blue { --ge-c: #60a5fa; --ge-soft: rgba(96, 165, 250, .13); }

.ge-page { gap: 18px; }

/* Cabeçalho */
.ge-hero {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; flex-wrap: wrap;
  padding: 22px 24px; border-radius: var(--radius); color: #fff;
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(24, 169, 153, .35), transparent 55%),
    linear-gradient(120deg, var(--nav) 0%, var(--nav-2) 55%, #0d3fb8 100%);
  box-shadow: var(--shadow);
}
.ge-hero h2 { margin: 2px 0 6px; font-size: 26px; letter-spacing: -.02em; color: #fff; }
.ge-hero p { margin: 0; max-width: 640px; color: rgba(255, 255, 255, .78); font-size: 13px; line-height: 1.5; }
.ge-eyebrow { font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #7ee3d6; }
.ge-month { display: flex; flex-direction: column; gap: 3px; padding: 10px 14px; border-radius: 12px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .2); }
.ge-month span { font-size: 10px; font-weight: 800; color: #7ee3d6; text-transform: uppercase; letter-spacing: .1em; }
.ge-month strong { font-size: 18px; color: #fff; text-transform: capitalize; }
.ge-month small { font-size: 11px; color: rgba(255, 255, 255, .65); }

.ge-tabs { margin: 0; }
.ge-tab-count { display: inline-flex; min-width: 18px; height: 18px; padding: 0 5px; align-items: center; justify-content: center; border-radius: 99px; font-size: 10px; font-weight: 800; background: var(--ge-c); color: #fff; margin-left: 4px; }

/* Pílulas, pontos e sinaleira */
.ge-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ge-c, var(--ge-none)); flex: none; }
.ge-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 99px; white-space: nowrap;
  font-size: 11px; font-weight: 700; color: var(--ink); background: var(--ge-soft, var(--surface-2));
  border: 1px solid color-mix(in srgb, var(--ge-c, var(--border)) 28%, transparent);
}
.ge-pill .ge-dot { background: var(--ge-c); }
.ge-level { display: inline-flex; padding: 3px 8px; border-radius: 6px; font-size: 11px; font-weight: 800; white-space: nowrap; color: var(--ge-c); background: var(--ge-soft); }
.ge-level.ge-none { color: var(--muted); }

.ge-light { display: flex; align-items: center; gap: 9px; min-width: 0; }
.ge-light-dot {
  width: 16px; height: 16px; border-radius: 50%; flex: none; background: var(--ge-c);
  box-shadow: 0 0 0 4px var(--ge-soft), 0 0 14px color-mix(in srgb, var(--ge-c) 45%, transparent);
}
.ge-light.ge-none .ge-light-dot { box-shadow: 0 0 0 4px var(--ge-soft); background: transparent; border: 2px dashed var(--ge-none); width: 14px; height: 14px; }
.ge-light-text { display: flex; flex-direction: column; line-height: 1.25; }
.ge-light-text strong { font-size: 12px; }
.ge-light-text small { font-size: 11px; color: var(--muted); }
.ge-light.ge-none .ge-light-text strong { color: var(--muted); font-weight: 600; }

.ge-legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 11px; color: var(--muted); }
.ge-legend-item { display: inline-flex; align-items: center; gap: 6px; }
.ge-legend-sm { margin-top: 10px; }

.ge-card { overflow: hidden; }
.ge-card-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.ge-card-header h3 { margin: 0 0 3px; }
.ge-card-header p { margin: 0; font-size: 12px; }
.ge-count-chip { font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: 99px; background: var(--surface-2); color: var(--muted); }
.ge-empty { padding: 26px 12px; text-align: center; color: var(--muted); font-size: 13px; }
.ge-footnote { margin: 10px 2px 0; font-size: 11px; color: var(--muted); }
.ge-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }

/* Resumo: IEO + números */
.ge-summary { display: grid; grid-template-columns: minmax(340px, 1.25fr) 2fr; gap: 18px; }
.ge-ieo {
  display: flex; gap: 22px; align-items: center; padding: 20px 22px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow);
}
.ge-ieo-ring {
  --ge-deg: 0deg; width: 132px; height: 132px; flex: none; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--ge-c) var(--ge-deg), var(--surface-2) 0);
}
.ge-ieo-value { width: 104px; height: 104px; border-radius: 50%; background: var(--surface); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ge-ieo-value strong { font-size: 36px; line-height: 1; letter-spacing: -.03em; color: var(--ge-c); }
.ge-ieo.ge-none .ge-ieo-value strong { color: var(--muted); }
.ge-ieo-value span { font-size: 11px; font-weight: 800; letter-spacing: .14em; color: var(--muted); margin-top: 4px; }
.ge-ieo-body { flex: 1; min-width: 0; }
.ge-ieo-body h3 { margin: 0 0 4px; font-size: 15px; }
.ge-ieo-body > p { margin: 0 0 12px; font-size: 12px; }
.ge-factor-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ge-factor-list li { display: grid; grid-template-columns: minmax(120px, 1.3fr) 1fr 56px; align-items: center; gap: 10px; font-size: 12px; }
.ge-factor-label small { color: var(--muted); font-weight: 600; }
.ge-factor-score { text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; }
.ge-bar { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.ge-bar-fill { display: block; height: 100%; border-radius: inherit; background: var(--ge-c); transition: width .4s ease; }

.ge-summary-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.ge-stat {
  position: relative; display: flex; flex-direction: column; gap: 4px; text-align: left; cursor: pointer; font: inherit; color: var(--ink);
  padding: 16px 18px 16px 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow); overflow: hidden; transition: transform .15s ease, border-color .15s ease;
}
.ge-stat::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--ge-c); }
.ge-stat:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--ge-c) 45%, var(--border)); }
.ge-stat-label { font-size: 12px; font-weight: 700; color: var(--muted); }
.ge-stat-value { font-size: 30px; line-height: 1.1; letter-spacing: -.02em; color: var(--ge-c); }
.ge-stat.ge-none .ge-stat-value { color: var(--ink); }
.ge-stat-note { font-size: 12px; color: var(--muted); }

/* Tabela da sinaleira */
.ge-signal-table { font-size: 12px; table-layout: fixed; min-width: 720px; }
.ge-signal-table th, .ge-signal-table td { padding: 10px 8px; vertical-align: middle; }
.ge-signal-table thead th { white-space: normal; line-height: 1.3; vertical-align: bottom; }
.ge-signal-table thead th:first-child { width: 128px; }
.ge-signal-table thead th:nth-child(5) { width: 84px; }
.ge-signal-table .ge-light { gap: 8px; }
.ge-signal-table .ge-light-dot { width: 13px; height: 13px; box-shadow: 0 0 0 3px var(--ge-soft), 0 0 10px color-mix(in srgb, var(--ge-c) 40%, transparent); }
.ge-signal-table .ge-light.ge-none .ge-light-dot { width: 11px; height: 11px; }
.ge-signal-table .ge-area-name { white-space: normal; font-size: 12px; }
.ge-signal-table .ge-light-text small { overflow-wrap: anywhere; }
.ge-signal-table thead th { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.ge-signal-table tbody tr { transition: background .12s ease; }
.ge-signal-table tbody tr:hover { background: var(--table-hover); }
.ge-area-name { font-size: 13px; font-weight: 800; white-space: nowrap; }

/* Alertas */
.ge-alerts { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; max-height: 520px; overflow: auto; }
.ge-alert-btn {
  width: 100%; display: grid; grid-template-columns: 26px 1fr auto; gap: 10px; align-items: start; text-align: left; cursor: pointer;
  font: inherit; color: var(--ink); padding: 11px 12px; border-radius: 12px; border: 1px solid var(--border);
  background: linear-gradient(90deg, var(--ge-soft), transparent 70%); transition: border-color .15s ease;
}
.ge-alert-btn:hover { border-color: var(--ge-c); }
.ge-alert-icon { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--ge-c); color: #fff; font-size: 13px; font-weight: 900; }
.ge-alert-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ge-alert-body strong { font-size: 12.5px; }
.ge-alert-body small { font-size: 11.5px; color: var(--muted); line-height: 1.4; }
.ge-alert-tag { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); white-space: nowrap; padding-top: 2px; }

/* Mapa de calor da coordenação */
.ge-heat { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ge-heat li { display: grid; grid-template-columns: minmax(120px, 170px) 1fr 50px 70px; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 10px; font-size: 12px; cursor: pointer; }
.ge-heat li:hover { background: var(--table-hover); }
.ge-heat-name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ge-heat-bar { display: flex; height: 12px; border-radius: 99px; overflow: hidden; background: var(--surface-2); gap: 2px; }
.ge-seg { display: block; min-width: 4px; background: var(--ge-c); }
.ge-heat-num { text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--muted); }

/* Como calcula / legenda */
.ge-how summary { cursor: pointer; list-style: none; font-size: 13px; }
.ge-how summary::-webkit-details-marker { display: none; }
.ge-how summary::before { content: '▸'; display: inline-block; margin-right: 8px; transition: transform .15s ease; color: var(--muted); }
.ge-how[open] summary::before { transform: rotate(90deg); }
.ge-how-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px 22px; margin-top: 14px; }
.ge-how-grid h4 { margin: 0 0 4px; font-size: 12px; }
.ge-how-grid p { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.5; }

/* KPIs pequenos (demandas / riscos) */
.ge-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.ge-kpis-8 { grid-template-columns: repeat(8, minmax(0, 1fr)); }
.ge-mini {
  display: flex; flex-direction: column; gap: 3px; text-align: left; font: inherit; color: var(--ink);
  padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border);
  border-top: 3px solid var(--ge-c);
}
button.ge-mini { cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; }
button.ge-mini:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.ge-mini.is-active { background: var(--ge-soft); box-shadow: inset 0 0 0 1px var(--ge-c); }
.ge-mini span { font-size: 11px; font-weight: 700; color: var(--muted); }
.ge-mini strong { font-size: 22px; line-height: 1.15; letter-spacing: -.02em; }
.ge-mini small { font-size: 11px; color: var(--muted); }

/* Barra de filtros */
.ge-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.ge-toolbar select { width: auto; min-width: 150px; padding: 8px 10px; font-size: 12px; }
.ge-search { width: 260px; padding: 8px 11px; font-size: 12px; }
.ge-toolbar-spacer { flex: 1; }
.ge-segmented { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); }
.ge-segmented button { border: 0; background: transparent; font: inherit; font-size: 12px; font-weight: 700; color: var(--muted); padding: 6px 11px; border-radius: 8px; cursor: pointer; white-space: nowrap; }
.ge-segmented button.active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(15, 23, 42, .12); }

/* Tabelas */
.ge-table th { white-space: nowrap; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.ge-table td { vertical-align: top; }
.ge-table tbody tr.is-clickable { cursor: pointer; }
.ge-table tbody tr.is-clickable:hover { background: var(--table-hover); }
.ge-code { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--primary-dark); }
.ge-main-cell { min-width: 260px; max-width: 460px; }
.ge-main-cell strong { display: block; font-size: 12.5px; }
.ge-main-cell small, .ge-sub { display: block; margin-top: 2px; font-size: 11px; color: var(--muted); line-height: 1.4; }
.ge-nowrap { white-space: nowrap; }
.ge-inactive { opacity: .55; }
.ge-trigger-tag { color: var(--ge-orange) !important; font-weight: 700; }
.ge-plan-link { font-weight: 700; white-space: nowrap; color: var(--primary); text-decoration: none; }
.ge-plan-link:hover { text-decoration: underline; }
.ge-icon-btn { padding: 4px 8px; min-width: 0; font-size: 13px; }
.ge-mini-table { width: 100%; font-size: 12px; }
.ge-mini-table th { text-align: left; color: var(--muted); font-size: 11px; }

/* Matrizes de risco */
.ge-matrix { font-size: 12px; }
.ge-matrix th { font-size: 11px; white-space: nowrap; }
.ge-matrix thead th { color: var(--muted); text-transform: uppercase; letter-spacing: .03em; text-align: center; }
.ge-matrix tbody th { text-align: left; }
.ge-heat-cell {
  --ge-alpha: 0; text-align: center; font-weight: 800; font-variant-numeric: tabular-nums; min-width: 64px;
  border-radius: 6px; color: var(--ink);
}
.ge-heat-cell[data-tone="red"] { background: rgba(220, 47, 47, calc(var(--ge-alpha) * .55)); }
.ge-heat-cell[data-tone="orange"] { background: rgba(234, 106, 12, calc(var(--ge-alpha) * .5)); }
.ge-heat-cell[data-tone="yellow"] { background: rgba(217, 154, 6, calc(var(--ge-alpha) * .45)); }
.ge-heat-cell[data-tone="green"] { background: rgba(22, 163, 74, calc(var(--ge-alpha) * .45)); }
.ge-heat-cell[data-tone="blue"] { background: rgba(37, 99, 235, calc(var(--ge-alpha) * .4)); }
.ge-heat-cell[data-tone="gray"] { background: rgba(100, 116, 139, calc(var(--ge-alpha) * .4)); }
.ge-heat-cell.is-clickable { cursor: pointer; }
.ge-heat-cell.is-clickable:hover { outline: 2px solid var(--primary); outline-offset: -2px; }
.ge-total { text-align: center; font-weight: 800; color: var(--muted); }

/* Super Metas */
.ge-goal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.ge-goal {
  display: flex; flex-direction: column; gap: 8px; text-align: left; cursor: pointer; font: inherit; color: var(--ink);
  padding: 14px 16px; border-radius: 14px; border: 1px solid var(--border);
  background: linear-gradient(160deg, var(--ge-soft), var(--surface) 65%); transition: transform .15s ease, border-color .15s ease;
}
.ge-goal:hover { transform: translateY(-2px); border-color: var(--ge-c); }
.ge-goal-area { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ge-goal-text { font-size: 16px; line-height: 1.25; }
.ge-goal-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ge-goal-meta small, .ge-goal-note { font-size: 11px; color: var(--muted); }
.ge-kpi-group + .ge-kpi-group { margin-top: 18px; }
.ge-kpi-group h4 { margin: 0 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }

/* Configuração */
.ge-import { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ge-import input[type="file"] { width: auto; max-width: 100%; }
.ge-inline-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.ge-edit-table input, .ge-edit-table select { padding: 7px 9px; font-size: 12px; }
.ge-settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; }
.ge-settings-grid fieldset { border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px 12px; margin: 0; display: grid; gap: 8px; }
.ge-settings-grid legend { font-size: 12px; font-weight: 800; padding: 0 6px; }
.ge-setting-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12px; }
.ge-num { display: inline-flex; align-items: center; gap: 4px; }
.ge-num input { width: 72px; padding: 6px 8px; text-align: right; font-size: 12px; }
.ge-num span { font-size: 11px; color: var(--muted); }

/* Formulários (modais) */
.ge-form h4.ge-form-section { margin: 6px 0 -4px; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); border-top: 1px solid var(--border); padding-top: 12px; }
.ge-form h4.ge-form-section:first-child { border-top: 0; padding-top: 0; }
.ge-form-hint { font-size: 12px; color: var(--muted); align-self: center; }
.ge-checks { border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px 10px; display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0; }
.ge-checks legend { font-size: 12px; font-weight: 700; padding: 0 4px; }
.ge-check { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; cursor: pointer; }
.ge-check input { width: auto; }
.ge-trigger-box { display: grid; gap: 8px; padding: 12px 14px; border-radius: 12px; border: 1px dashed color-mix(in srgb, #ea6a0c 50%, var(--border)); background: color-mix(in srgb, #ea6a0c 5%, transparent); font-size: 12px; }
.ge-trigger-row { display: grid; grid-template-columns: 1fr 110px 140px; gap: 8px; }
.ge-review-actions { display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; }
.ge-danger-zone { display: flex; justify-content: flex-end; border-top: 1px solid var(--border); padding-top: 12px; }
.ge-danger-btn { color: var(--danger) !important; }
.ge-area-detail h4 { margin: 18px 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.ge-area-detail p { margin: 0 0 4px; font-size: 13px; }
.ge-area-lights { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.ge-area-light { display: flex; flex-direction: column; gap: 6px; padding: 10px; border-radius: 10px; background: var(--surface-2); font-size: 11px; font-weight: 700; color: var(--muted); }
.ge-plain-list { margin: 0; padding-left: 0; list-style: none; display: grid; gap: 6px; font-size: 12.5px; }

@media (max-width: 1280px) {
  .ge-kpis-8 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  .ge-summary, .ge-grid-2 { grid-template-columns: 1fr; }
  .ge-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .ge-hero { padding: 18px; }
  .ge-hero h2 { font-size: 22px; }
  .ge-ieo { flex-direction: column; align-items: stretch; }
  .ge-ieo-ring { margin: 0 auto; }
  .ge-summary-stats, .ge-kpis, .ge-kpis-8 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ge-search { width: 100%; }
  .ge-toolbar select { flex: 1 1 45%; }
  .ge-heat li { grid-template-columns: 1fr 60px; }
  .ge-heat-bar { grid-column: 1 / -1; order: 3; }
  .ge-area-lights { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ge-trigger-row { grid-template-columns: 1fr; }
}

/* Gestão Estratégica — coluna Pessoas (número, sem cor) */
.ge-people { display: flex; flex-direction: column; line-height: 1.2; }
.ge-people strong { font-size: 18px; font-variant-numeric: tabular-nums; }
.ge-people small { font-size: 11px; color: var(--muted); }
.ge-people-empty span { font-size: 16px; color: var(--muted); }
.ge-edit-table .ge-headcount { width: 90px; text-align: right; }

/* Resgates — config do funil (config-circulo.js) */
.rescue-metric-row > span { display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; color: var(--ink); }
.rescue-metric-row small { font-weight: 500; }

/* ===== Central de Bugs e Melhorias — modal de detalhe do cluster =====
   Só tokens do :root/html.dark, então o dark mode vem de graça.
   Raio cheio (--radius) nos cards; metade dele nos elementos pequenos. */
.modal-title-group { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; min-width: 0; }
.modal-title-group h2 { min-width: 0; overflow-wrap: anywhere; }
.modal-title-extra { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }

.bm-detail { display: flex; flex-direction: column; gap: 18px; }

.bm-summary-bar {
  margin: 0; padding: 8px 12px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: calc(var(--radius) / 2);
  color: var(--muted); font-size: 13px; line-height: 1.5;
}
.bm-summary-bar strong { color: var(--ink); }
.bm-summary-sep { margin: 0 4px; opacity: .6; }

.bm-action-card {
  display: flex; flex-direction: column; gap: 12px; padding: 14px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
}
.bm-action-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.bm-action-card textarea.bm-note {
  min-height: 60px; background: var(--surface); color: var(--ink); border: 1px solid var(--border);
}
.bm-action-card textarea.bm-note:focus { border-color: var(--primary); }

.bm-section { display: flex; flex-direction: column; gap: 10px; }
.bm-section-title { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink); }
.bm-section-title span {
  padding: 1px 8px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--border);
  color: var(--muted); font-size: 11px; font-weight: 700;
}

.bm-client-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.bm-client-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 16px;
  color: var(--ink); font-size: 13px; font-weight: 500; transition: border-color .15s ease, background .15s ease;
}
.bm-client-chip:hover,
.bm-client-chip:focus-visible { border-color: var(--primary); background: var(--primary-soft); outline: none; }
.bm-client-chip-count {
  min-width: 18px; padding: 0 5px; border-radius: 99px; background: var(--surface);
  color: var(--muted); font-size: 11px; font-weight: 700; text-align: center;
}

.bm-timeline { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 2px solid var(--border); margin-left: 5px; }
.bm-timeline-item { position: relative; padding: 0 0 14px; }
.bm-timeline-item:last-child { padding-bottom: 0; }
.bm-timeline-item::before {
  content: ""; position: absolute; left: -25px; top: 5px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft);
}
.bm-timeline-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; }
.bm-timeline-line time { font-weight: 700; color: var(--ink); }
.bm-timeline-author { color: var(--muted); font-size: 12px; }
.bm-timeline-note { margin: 4px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }

.bm-meeting-list { display: flex; flex-direction: column; gap: 12px; }
.bm-meeting-card {
  display: flex; flex-direction: column; gap: 8px; padding: 14px 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.bm-meeting-card.is-highlighted { animation: bm-card-flash 1.6s ease; }
@keyframes bm-card-flash {
  0%, 60% { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
  100% { border-color: var(--border); box-shadow: none; }
}
.bm-meeting-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.bm-meeting-who { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; min-width: 0; }
.bm-meeting-who strong { color: var(--ink); font-size: 14px; }
.bm-meeting-who span,
.bm-meeting-date { color: var(--muted); font-size: 12px; }
.bm-meeting-date { flex: 0 0 auto; white-space: nowrap; }
.bm-meeting-title { margin: 0; color: var(--ink); font-size: 14px; font-weight: 750; line-height: 1.4; }
.bm-meeting-desc { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.bm-quote {
  margin: 8px 0; padding: 10px 14px;
  border-left: 3px solid var(--primary); border-radius: 0 calc(var(--radius) / 2) calc(var(--radius) / 2) 0;
  background: var(--surface-2); color: var(--ink); font-style: italic; font-size: 13px; line-height: 1.5;
}
.bm-meeting-facts { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.bm-meeting-facts div {
  display: inline-flex; gap: 6px; max-width: 100%; padding: 4px 9px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: calc(var(--radius) / 2); font-size: 12px;
}
.bm-meeting-facts dt { color: var(--muted); font-weight: 700; }
.bm-meeting-facts dd { margin: 0; color: var(--ink); }
.bm-meeting-foot {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding-top: 10px; margin-top: 2px; border-top: 1px solid var(--border);
}
.bm-meeting-flags { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.bm-meeting-foot .button { flex: 0 0 auto; text-decoration: none; }

@media (max-width: 640px) {
  .bm-action-grid { grid-template-columns: 1fr; }
  .bm-meeting-head,
  .bm-meeting-foot { flex-direction: column; align-items: flex-start; }
}

/* ===== Central de Bugs e Melhorias — Voz do Cliente, Insights, Filtros e página do assunto ===== */
.bm-card-lead { margin: -4px 0 14px; font-size: 13px; }
.bm-count {
  display: inline-flex; align-items: center; justify-content: center; min-width: 20px; padding: 1px 7px;
  border-radius: 99px; background: var(--surface-2); border: 1px solid var(--border);
  color: var(--muted); font-size: 11px; font-weight: 700; vertical-align: middle;
}
.bm-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Barras de proporção (Voz do Cliente, Tipos de relato) */
.bm-metric-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 24px; }
.bm-metric-grid.is-single { grid-template-columns: minmax(0, 1fr); }
.bm-metric {
  display: flex; flex-direction: column; gap: 6px; padding: 8px 10px; margin: 0 -10px;
  border-radius: calc(var(--radius) / 2); color: var(--ink); text-decoration: none;
}
.bm-metric.is-link { transition: background .15s ease; }
.bm-metric.is-link:hover,
.bm-metric.is-link:focus-visible { background: var(--surface-2); outline: none; }
.bm-metric.is-link:hover .bm-metric-label { color: var(--primary); }
.bm-metric-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.bm-metric-label { min-width: 0; font-size: 13px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bm-metric-value { flex: 0 0 auto; display: inline-flex; align-items: baseline; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 600; }
.bm-metric-go { color: var(--muted); font-size: 16px; line-height: 1; transition: transform .15s ease, color .15s ease; }
.bm-metric.is-link:hover .bm-metric-go { color: var(--primary); transform: translateX(2px); }
.bm-metric-track { display: block; height: 8px; background: var(--surface-2); border-radius: var(--radius); overflow: hidden; }
.bm-metric-fill { display: block; height: 100%; background: var(--primary); border-radius: inherit; }

/* Insights da IA */
.bm-insight-list { display: flex; flex-direction: column; gap: 10px; }
.bm-insight {
  display: flex; flex-direction: column; gap: 6px; padding: 12px 14px;
  background: var(--surface-2); border: 1px solid var(--border); border-left: 3px solid var(--accent);
  border-radius: 0 calc(var(--radius) / 2) calc(var(--radius) / 2) 0;
}
.bm-insight.tone-danger { border-left-color: var(--danger); }
.bm-insight.tone-warning { border-left-color: var(--warning); }
.bm-insight.tone-success { border-left-color: var(--success); }
.bm-insight-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.bm-insight-tag { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; }
.bm-insight-head .badge { font-size: 12px; padding: 3px 9px; }
.bm-insight-text { margin: 0; color: var(--ink); font-size: 13px; line-height: 1.5; }
.bm-insight-link {
  align-self: flex-start; padding: 0; border: 0; background: none;
  color: var(--primary); font-size: 12px; font-weight: 700; text-decoration: none; cursor: pointer;
}
.bm-insight-link:hover { text-decoration: underline; }

/* Toolbar de filtros */
.bm-filter-toolbar { display: flex; flex-direction: column; gap: 12px; }
.bm-filter-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.bm-filter-advanced { padding-top: 12px; border-top: 1px dashed var(--border); }
.bm-filter-advanced[hidden] { display: none; }
.bm-filter-search { flex: 1 1 260px; min-width: 200px; }
.bm-filter-field {
  display: flex; flex-direction: column; gap: 4px; flex: 0 1 180px; min-width: 140px;
  color: var(--muted); font-size: 11px; font-weight: 700;
}
.bm-filter-narrow { flex-basis: 110px; min-width: 100px; }
.bm-filter-toolbar input,
.bm-filter-toolbar select { padding: 8px 10px; font-size: 13px; }
.bm-filter-more {
  display: inline-flex; align-items: center; gap: 6px; min-height: 37px; padding: 8px 12px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 9px;
  color: var(--ink); font-size: 12px; font-weight: 700; transition: border-color .15s ease, background .15s ease;
}
.bm-filter-more::after { content: "▾"; color: var(--muted); transition: transform .15s ease; }
.bm-filter-more.is-open::after { transform: rotate(180deg); }
.bm-filter-more:hover,
.bm-filter-more.is-open { border-color: var(--primary); background: var(--primary-soft); }
.bm-filter-bottom { align-items: center; justify-content: space-between; }
.bm-filter-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.bm-filter-chip {
  position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 20px;
  color: var(--muted); font-size: 12px; font-weight: 600; cursor: pointer; user-select: none; transition: all .2s;
}
.bm-filter-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.bm-filter-chip:hover { border-color: var(--primary); color: var(--ink); }
.bm-filter-chip:has(input:checked) { background: var(--primary-soft); border-color: var(--primary); color: var(--ink); }
.bm-filter-chip:has(input:checked)::before { content: "✓"; color: var(--primary); font-weight: 800; }
.bm-filter-chip:has(input:focus-visible) { box-shadow: 0 0 0 3px var(--primary-soft); }
.bm-filter-actions { display: flex; gap: 8px; margin-left: auto; }

/* Página do assunto */
.bm-back-link { align-self: flex-start; color: var(--primary); font-size: 13px; font-weight: 700; text-decoration: none; }
.bm-back-link:hover { text-decoration: underline; }
.bm-client-chip.is-static { cursor: default; }
.bm-client-chip.is-static:hover { border-color: var(--border); background: var(--surface-2); }
.card-header h3 .bm-count { margin-left: 6px; }
.bm-meeting-actions { display: flex; flex-wrap: wrap; gap: 6px; flex: 0 0 auto; }

@media (max-width: 720px) {
  .bm-metric-grid { grid-template-columns: minmax(0, 1fr); }
  .bm-filter-field,
  .bm-filter-search { flex: 1 1 100%; }
  .bm-filter-actions { margin-left: 0; width: 100%; }
  .bm-filter-actions .button { flex: 1 1 0; }
}

/* ── Modo escuro: cores fixas que só tinham versão clara ──────────────
   Fundos claros, textos escuros e bordas pastel escritos direto nas regras
   acima (sem passar pelas variáveis do tema). O modo claro fica como está;
   aqui só entra a versão escura de cada um. */
html.dark .sidebar-toggle { background: var(--surface-2); color: var(--ink); }
html.dark .kpi-block-title,
html.dark .kpi-label,
html.dark .kpi-note,
html.dark .transcript-score-label,
html.dark .transcript-quote,
html.dark .report-list,
html.dark .profile-flow-missing-choice,
html.dark .profile-flow-missing-options label,
html.dark .ooo-suggestion-teaser { color: var(--muted); }
html.dark .ooo-suggestion-text,
html.dark .ooo-suggestion-block p,
html.dark .pointed-error-row-copy p,
html.dark .pointed-error-findings { color: var(--ink); }

/* Chips e selos neutros */
html.dark .kpi-trend--flat,
html.dark .profile-flow-steps li,
html.dark .profile-csi-chip,
html.dark .vendas-mission-levels li { background: var(--surface-2); color: var(--muted); }
html.dark .profile-flow-steps li.is-pending.is-optional {
  background: var(--surface-2);
  color: var(--muted);
  box-shadow: inset 0 0 0 1px var(--input-border);
}
html.dark .vendas-mission-hero-bar,
html.dark .occ-bulk-progress-bar { background: var(--surface-2); }
html.dark .kpi-rhythm-tag.up,
html.dark .oos-seen-mark.is-seen:hover,
html.dark .oos-seen-mark.is-seen:focus-visible { color: var(--success); }
html.dark .kpi-rhythm-tag.down { color: var(--warning); }
html.dark .penalty-live,
html.dark .error-classification-ref-penalty,
html.dark .error-classification-badge { color: var(--danger); }
html.dark .routine-day-table td.col-metric.is-alert { color: var(--warning); }

/* Fundos de linha, bloco e barra */
html.dark .quality-oos-detail-row td { background: var(--bg); }
html.dark .quality-oos-list li { border-color: var(--border); }
html.dark .routine-save-bar {
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .45);
}
html.dark .ooo-suggestion-block,
html.dark .pointed-error-theme,
html.dark .pointed-error-block {
  background: var(--surface-2);
  border-color: var(--border);
}
html.dark .error-classification-row:has(input:checked) {
  background: color-mix(in srgb, var(--accent, #2563eb) 10%, var(--surface));
}
html.dark .ooo-suggestion-card.is-done {
  border-color: color-mix(in srgb, var(--success) 35%, var(--surface));
  background: linear-gradient(180deg, color-mix(in srgb, var(--success) 8%, var(--surface)) 0%, var(--surface) 42%);
}

/* Blocos coloridos da 1:1 (elogio, integração, energia, próximo passo) */
html.dark .ooo-suggestion-block.is-praise {
  background: color-mix(in srgb, var(--success) 10%, var(--surface));
  border-color: color-mix(in srgb, var(--success) 35%, var(--surface));
}
html.dark .ooo-suggestion-block.is-praise h4 { color: var(--success); }
html.dark .ooo-suggestion-block.is-integration {
  background: color-mix(in srgb, var(--info) 10%, var(--surface));
  border-color: color-mix(in srgb, var(--info) 35%, var(--surface));
}
html.dark .ooo-suggestion-block.is-integration h4 { color: var(--info); }
html.dark .ooo-suggestion-block.is-energy,
html.dark .pointed-error-block.is-private,
html.dark .pointed-errors-team { border-color: color-mix(in srgb, var(--warning) 35%, var(--surface)); }
html.dark .ooo-suggestion-block.is-energy h4 { color: var(--warning); }
html.dark .pointed-errors-team-item { border-color: color-mix(in srgb, var(--warning) 22%, var(--surface)); }
html.dark .ooo-suggestion-block.is-next {
  background: color-mix(in srgb, #a78bfa 10%, var(--surface));
  border-color: color-mix(in srgb, #a78bfa 35%, var(--surface));
}
html.dark .ooo-suggestion-block.is-next h4 { color: #c4b5fd; }

/* Aviso de treinamento */
html.dark .training-alert {
  border-color: color-mix(in srgb, var(--warning) 35%, var(--surface));
  color: #fde68a;
}
html.dark .training-alert-copy strong { color: #fde68a; }
html.dark .training-alert-copy p { color: #fcd34d; }
html.dark .training-alert-icon { background: color-mix(in srgb, var(--warning) 16%, var(--surface)); color: var(--warning); }
html.dark .training-alert-badge { background: color-mix(in srgb, var(--warning) 22%, var(--surface)); color: #fde68a; }
html.dark .training-alert-badge.is-blocked { background: color-mix(in srgb, var(--danger) 22%, var(--surface)); color: #fecaca; }

/* Bordas pastel dos selects de status (CRM, adesão) e do chip de erro grave */
html.dark .occ-crm-status-select.crm-organizado,
html.dark .routine-day-table .routine-crm-select.crm-organizado,
html.dark .routine-day-table .routine-ad-select.ad-sim { border-color: color-mix(in srgb, var(--success) 40%, var(--surface)); }
html.dark .occ-crm-status-select.crm-parcial,
html.dark .routine-day-table .routine-crm-select.crm-parcial,
html.dark .routine-day-table .routine-ad-select.ad-mais_ou_menos { border-color: color-mix(in srgb, var(--warning) 40%, var(--surface)); }
html.dark .routine-day-table .routine-ad-select.ad-nao,
html.dark .routine-comment-icon.is-danger:hover,
html.dark .cq-chip.is-severe:not(:has(input:checked)) { border-color: color-mix(in srgb, var(--danger) 40%, var(--surface)); }

/* Botões-ícone das ocorrências (plano, visto, abrir, gravação, tarefa, resumo, PDFs) */
html.dark .button.icon-action.occ-icon.occ-seen { color: var(--success); background: var(--success-bg); }
html.dark .button.icon-action.occ-icon.occ-external,
html.dark .button.icon-action.occ-icon.occ-transcript,
html.dark .button.icon-action.occ-icon.occ-view { color: #93c5fd; background: rgba(59, 130, 246, .14); }
html.dark .button.icon-action.occ-icon.occ-external:hover,
html.dark .button.icon-action.occ-icon.occ-external:focus-visible,
html.dark .button.icon-action.occ-icon.occ-transcript:hover,
html.dark .button.icon-action.occ-icon.occ-transcript:focus-visible,
html.dark .button.icon-action.occ-icon.occ-view:hover,
html.dark .button.icon-action.occ-icon.occ-view:focus-visible { color: #bfdbfe; background: rgba(59, 130, 246, .26); }
html.dark .button.icon-action.occ-icon.occ-recording,
html.dark .button.icon-action.occ-icon.occ-leadership-task,
html.dark .button.icon-action.occ-icon.occ-trainer-task,
html.dark .button.icon-action.occ-icon.occ-collaborator-info { color: #c4b5fd; background: rgba(139, 92, 246, .14); }
html.dark .button.icon-action.occ-icon.occ-recording:hover,
html.dark .button.icon-action.occ-icon.occ-recording:focus-visible,
html.dark .button.icon-action.occ-icon.occ-leadership-task:hover,
html.dark .button.icon-action.occ-icon.occ-leadership-task:focus-visible,
html.dark .button.icon-action.occ-icon.occ-trainer-task:hover,
html.dark .button.icon-action.occ-icon.occ-trainer-task:focus-visible,
html.dark .button.icon-action.occ-icon.occ-collaborator-info:hover,
html.dark .button.icon-action.occ-icon.occ-collaborator-info:focus-visible { color: #ddd6fe; background: rgba(139, 92, 246, .26); }
html.dark .button.icon-action.occ-icon.occ-resumo,
html.dark .button.icon-action.occ-icon.occ-pdf-internal { color: var(--muted); background: var(--surface-2); }
html.dark .button.icon-action.occ-icon.occ-resumo:hover,
html.dark .button.icon-action.occ-icon.occ-resumo:focus-visible,
html.dark .button.icon-action.occ-icon.occ-pdf-internal:hover,
html.dark .button.icon-action.occ-icon.occ-pdf-internal:focus-visible { color: var(--ink); background: #334155; }
html.dark .button.icon-action.occ-icon.occ-pdf-client { color: #fca5a5; background: rgba(239, 68, 68, .14); }
html.dark .button.icon-action.occ-icon.occ-pdf-client:hover,
html.dark .button.icon-action.occ-icon.occ-pdf-client:focus-visible { color: #fecaca; background: rgba(239, 68, 68, .26); }
html.dark .button.icon-action.occ-icon.occ-plan:hover,
html.dark .button.icon-action.occ-icon.occ-plan:focus-visible,
html.dark .button.icon-action.occ-icon.occ-open-plan:hover,
html.dark .button.icon-action.occ-icon.occ-open-plan:focus-visible { color: var(--warning); background: rgba(245, 158, 11, .18); }
/* Pauta de conversa: um cartão por pessoa com os pontos para conversar. */
.pc-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.pc-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); align-items: start; }
.pc-card { min-width: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.insight-board-header { display: flex; justify-content: space-between; align-items: center; gap: 8px 12px; flex-wrap: wrap; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.insight-who { display: flex; align-items: center; gap: 10px 12px; flex-wrap: wrap; min-width: 0; }
.insight-who .avatar { width: 40px; height: 40px; border-radius: 999px; font-size: 13px; }
.insight-who strong { font-size: 15px; min-width: 0; }
.insight-who .link-button { font: inherit; font-weight: 700; color: var(--text); text-align: left; }
.insight-badge { background: var(--primary-soft); color: var(--primary); font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.insight-actions { display: flex; gap: 2px; flex-wrap: wrap; }
.btn-ghost {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 0; border-radius: 8px;
  background: transparent; color: var(--muted); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-ghost:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.btn-ghost:disabled { opacity: .5; cursor: progress; }
.insight-body { padding: 16px 20px; }
.pc-card .insight-card {
  display: flex; gap: 16px; margin-bottom: 12px; padding: 14px 16px;
  background: var(--surface-2); border: 1px solid var(--border); border-left: 4px solid var(--muted); border-radius: 12px;
  transition: background .2s, opacity .25s, transform .25s;
}
.pc-card .insight-card:hover { background: var(--surface); }
.pc-card .insight-card.is-note { border-left-color: var(--primary); }
.pc-card .insight-card.is-danger { border-left-color: var(--danger); }
.pc-card .insight-card.is-attention { border-left-color: var(--warning); }
.pc-card .insight-card.is-info { border-left-color: var(--info); }
.pc-card .insight-card.is-good { border-left-color: var(--success); }
.pc-card .insight-card.is-leaving { opacity: .35; transform: translateX(8px); }
.pc-card .insight-content { flex: 1 1 auto; min-width: 0; display: grid; gap: 4px; justify-items: start; }
.pc-card .insight-content p { margin: 0; }
.pc-card .insight-kind { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.pc-card .insight-title { font-size: 14px; font-weight: 700; color: var(--text); }
.pc-card .insight-text { font-size: 13px; line-height: 1.5; color: var(--muted); overflow-wrap: anywhere; }
.pc-card .insight-meta { font-size: 12px; color: var(--muted); }
.pc-card .insight-link { display: inline-flex; align-items: center; gap: 3px; margin-top: 4px; padding: 0; border: 0; background: none; color: var(--primary); font: inherit; font-size: 13px; font-weight: 500; text-decoration: none; cursor: pointer; }
.pc-card .insight-link:hover { text-decoration: underline; }
.btn-check-insight {
  display: flex; align-items: center; justify-content: center; flex: 0 0 auto; align-self: flex-start;
  width: 32px; height: 32px; padding: 0; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--muted) 45%, transparent);
  background: transparent; color: var(--muted); cursor: pointer; transition: .15s;
}
.btn-check-insight:hover { background: var(--success-bg); color: var(--success); border-color: var(--success); }
.btn-check-insight:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.btn-check-insight:disabled { cursor: progress; }
.insight-seen { opacity: .7; margin-top: 4px; }
.insight-seen:hover, .insight-seen[open] { opacity: .85; }
.insight-seen summary { display: inline-flex; align-items: center; gap: 6px; padding: 4px 0; list-style: none; cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.insight-seen summary::-webkit-details-marker { display: none; }
.insight-seen summary::before { content: '▸'; transition: transform .15s; }
.insight-seen[open] summary::before { transform: rotate(90deg); }
.insight-seen ul { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 6px; }
.insight-seen li { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: 12.5px; line-height: 1.4; color: var(--muted); }
.insight-seen li > span { min-width: 0; overflow-wrap: anywhere; }
.insight-seen li > button { flex: 0 0 auto; white-space: nowrap; }
@media (max-width: 560px) {
  .insight-board-header, .pc-card .insight-body { padding-left: 14px; padding-right: 14px; }
  .pc-card .insight-card { gap: 10px; padding: 12px; }
}
.pc-quiet { padding: 14px 18px; }
.pc-quiet h3 { margin: 0 0 8px; font-size: 13px; color: var(--muted); }
.pc-quiet-list { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.pc-quiet-person { display: inline-flex; align-items: baseline; gap: 6px; font-size: 13px; }
.pc-quiet-person .link-button { font: inherit; font-weight: 600; color: var(--text); }
.pc-note-examples { font-size: 12.5px; color: var(--muted); }
.pc-note-discussion { font-size: 12.5px; color: var(--success); }
.pc-note-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.pc-see { border: 0; background: transparent; padding: 0; cursor: pointer; color: var(--primary); font: inherit; font-size: 12.5px; font-weight: 600; }
.pc-see:hover { text-decoration: underline; }
.pc-numbers > summary { cursor: pointer; list-style: none; }
.pc-numbers > summary::-webkit-details-marker { display: none; }
.pc-dot { display: inline-block; width: 8px; height: 8px; border-radius: 999px; margin-right: 5px; }
.pc-tone-danger { background: var(--danger); }
.pc-tone-info { background: var(--info); }
.pc-tone-warning { background: var(--warning); }
.pc-tone-violet { background: #7c5cfc; }
.pc-tone-muted { background: var(--muted); }
.pc-copy-area { width: 100%; font: 13px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; }
/* Relatório da pauta no modal (quando o pop-up é bloqueado). */
.pc-letter { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 20px 24px; font-size: 14px; line-height: 1.6; }
.pc-letter p { margin: 0 0 12px; white-space: normal; }

/* ==========================================================================
   Resultados do mês (public/js/pages/resultados-mes.js) — prefixo .rm-
   O quadro é sempre escuro (modelo pedido pela COO), nos dois temas.
   ========================================================================== */
.rm-page { gap: 14px; }
.rm-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.rm-actions p { margin: 0; font-size: 12px; }
.rm-actions-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.rm-badge { display: inline-flex; margin-left: 6px; padding: 2px 7px; border-radius: 99px; background: #f97316; color: #fff; font-size: 10px; font-weight: 800; }

.rm-board {
  --rm-bg: #070d1f; --rm-panel: rgba(17, 26, 51, .82); --rm-line: rgba(148, 163, 184, .16);
  --rm-ink: #f1f5f9; --rm-muted: #94a3b8;
  display: grid; gap: 14px; padding: 18px; border-radius: 18px; color: var(--rm-ink);
  background:
    radial-gradient(90% 60% at 85% -10%, rgba(59, 130, 246, .22), transparent 60%),
    radial-gradient(60% 50% at 0% 0%, rgba(20, 184, 166, .12), transparent 60%),
    var(--rm-bg);
  box-shadow: 0 18px 40px rgba(2, 6, 23, .35);
}
.rm-board svg { flex: none; }
.rm-panel { background: var(--rm-panel); border: 1px solid var(--rm-line); border-radius: 14px; padding: 14px 16px; min-width: 0; }
.rm-panel-title { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 13px; font-weight: 800; color: var(--rm-ink); }
.rm-panel-title svg { width: 16px; height: 16px; color: var(--rm-muted); }
.rm-edit-link { margin-left: auto; border: 0; background: transparent; color: #7dd3fc; font: inherit; font-size: 11px; font-weight: 700; cursor: pointer; padding: 2px 4px; }
.rm-edit-link:hover { text-decoration: underline; }
.rm-edit-link.rm-block { display: block; margin: 10px 0 0; }
.rm-empty { width: 100%; padding: 16px; border: 1px dashed var(--rm-line); border-radius: 10px; background: transparent; color: var(--rm-muted); font: inherit; font-size: 12px; cursor: pointer; }
.rm-empty:hover { border-color: #7dd3fc; color: var(--rm-ink); }

/* Cabeçalho */
.rm-head { display: grid; grid-template-columns: auto 1fr auto minmax(240px, 340px); align-items: center; gap: 18px; padding: 4px 4px 2px; }
.rm-brand { font-size: 22px; font-weight: 800; letter-spacing: .04em; padding-right: 18px; border-right: 1px solid var(--rm-line); }
.rm-title span { font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--rm-muted); }
.rm-title h2 { margin: 2px 0; font-size: 30px; letter-spacing: -.02em; color: #fff; }
.rm-title p { margin: 0; font-size: 12px; color: var(--rm-muted); }
.rm-updated { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--rm-muted); }
.rm-updated strong { color: var(--rm-ink); font-size: 12px; }
.rm-updated svg { width: 18px; height: 18px; }
.rm-objective { display: flex; gap: 12px; align-items: flex-start; text-align: left; font: inherit; color: var(--rm-ink); cursor: pointer;
  padding: 12px 14px; border-radius: 12px; background: rgba(15, 23, 42, .9); border: 1px solid var(--rm-line); }
.rm-objective:hover { border-color: #7dd3fc; }
.rm-objective-icon { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(148, 163, 184, .14); flex: none; }
.rm-objective strong { display: block; font-size: 13px; }
.rm-objective small { display: block; font-size: 11.5px; color: var(--rm-muted); line-height: 1.4; margin-top: 2px; }

/* KPIs */
.rm-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.rm-kpi { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 14px; background: var(--rm-panel); border: 1px solid var(--rm-line); color: var(--rm-ink); font: inherit; text-align: left; min-width: 0; }
button.rm-kpi { cursor: pointer; }
button.rm-kpi:hover { border-color: #7dd3fc; }
.rm-kpi-icon svg { width: 30px; height: 30px; }
.rm-kpi-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rm-kpi-label { font-size: 11.5px; color: var(--rm-ink); font-weight: 600; line-height: 1.3; }
.rm-kpi-value { font-size: 32px; line-height: 1.1; letter-spacing: -.02em; color: #fff; }
.rm-kpi-names { font-size: 11px; color: var(--rm-ink); line-height: 1.35; }
.rm-change { font-size: 11px; font-weight: 700; }
.rm-change small { font-weight: 500; color: var(--rm-muted); }
.rm-up { color: #34d399; }
.rm-down { color: #f87171; }
.rm-flat { color: var(--rm-muted); font-weight: 500; }

.rm-row { display: grid; gap: 14px; }
.rm-row-4 { grid-template-columns: 1.15fr 1fr 1.35fr 1.1fr; }
.rm-row-3 { grid-template-columns: 1.4fr 1fr 1fr; }

/* Barras por área */
.rm-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.rm-bars li { display: grid; grid-template-columns: 112px 1fr 26px; align-items: center; gap: 8px; font-size: 11.5px; }
.rm-bar-label { color: var(--rm-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rm-bar-track { height: 12px; border-radius: 3px; background: rgba(148, 163, 184, .1); overflow: hidden; }
.rm-bar-fill { display: block; height: 100%; border-radius: 3px; min-width: 2px; }
.rm-bars strong { text-align: right; font-variant-numeric: tabular-nums; }

/* Evolução */
.rm-legend { display: flex; gap: 12px; font-size: 11px; color: var(--rm-muted); margin: -4px 0 8px; }
.rm-legend span { display: inline-flex; align-items: center; gap: 5px; }
.rm-legend i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.rm-columns { display: flex; align-items: flex-end; justify-content: space-around; gap: 14px; height: 190px; padding-top: 18px; border-bottom: 1px solid var(--rm-line); }
.rm-col { flex: 1; max-width: 70px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; }
.rm-col-total { font-size: 12px; font-weight: 800; margin-bottom: 4px; }
.rm-col-stack { width: 100%; display: flex; flex-direction: column; border-radius: 4px 4px 0 0; overflow: hidden; }
.rm-col-seg { display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; color: #0b1226; min-height: 16px; }
.rm-col-label { position: absolute; bottom: -20px; font-size: 11px; color: var(--rm-muted); }
.rm-row-4 > .rm-panel:nth-child(2) { padding-bottom: 30px; }

/* Rosca */
.rm-donut-wrap { display: grid; grid-template-columns: 150px 1fr; align-items: center; gap: 14px; }
.rm-donut { width: 150px; height: 150px; }
.rm-donut-num { font-size: 22px; font-weight: 800; fill: #fff; }
.rm-donut-sub { font-size: 9px; fill: var(--rm-muted); }
.rm-donut-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; font-size: 11.5px; }
.rm-donut-legend li { display: grid; grid-template-columns: 10px 1fr auto; gap: 7px; align-items: center; }
.rm-donut-legend i { width: 10px; height: 10px; border-radius: 50%; }
.rm-donut-legend small { color: var(--rm-muted); font-weight: 500; }

/* Destaques */
.rm-highlights { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.rm-highlights li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; }
.rm-hl-icon { color: #facc15; }
.rm-hl-icon svg { width: 18px; height: 18px; }
.rm-highlights strong { display: block; font-size: 12.5px; }
.rm-highlights small { display: block; font-size: 11px; color: var(--rm-muted); line-height: 1.35; }

/* Cards por área */
.rm-area-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.rm-area { border-radius: 12px; overflow: hidden; border: 1px solid color-mix(in srgb, var(--rm-c) 45%, transparent);
  background: linear-gradient(180deg, color-mix(in srgb, var(--rm-c) 22%, #0b1226) 0%, #0b1226 70%); min-width: 0; }
.rm-area header { display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: color-mix(in srgb, var(--rm-c) 55%, #0b1226); }
.rm-area h4 { margin: 0; font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #fff; }
.rm-area-icon svg { width: 16px; height: 16px; color: #fff; }
.rm-area ul { list-style: none; margin: 0; padding: 10px 12px 12px; display: grid; gap: 9px; }
.rm-area li { display: grid; grid-template-columns: minmax(30px, auto) 1fr; gap: 8px; align-items: baseline; }
.rm-area li strong { font-size: 18px; line-height: 1; color: #fff; font-variant-numeric: tabular-nums; }
.rm-area li span { font-size: 11px; line-height: 1.35; color: #cbd5e1; overflow-wrap: anywhere; }
.rm-area-empty, .rm-area-more, .rm-area-source { margin: 0; padding: 0 12px 10px; font-size: 10.5px; color: var(--rm-muted); }
.rm-area-empty { padding-top: 12px; }
.rm-area-source { font-style: italic; opacity: .8; }

/* Integrações e impactos */
.rm-integrations { display: grid; grid-template-columns: 110px 1fr; gap: 14px; align-items: center; }
.rm-big strong { display: block; font-size: 40px; line-height: 1; color: #fff; }
.rm-big span { font-size: 11px; color: var(--rm-muted); line-height: 1.3; }
.rm-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.rm-chips li { width: 66px; display: flex; flex-direction: column; align-items: center; gap: 5px; text-align: center; }
.rm-chip-logo { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; background: #f8fafc; color: #1e3a8a; font-weight: 800; font-size: 14px; }
.rm-chip-name { font-size: 10px; color: var(--rm-ink); line-height: 1.2; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.rm-impacts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 12px; }
.rm-impacts strong { display: block; font-size: 24px; line-height: 1.1; color: #fff; }
.rm-impacts span { display: block; font-size: 10.5px; color: var(--rm-muted); line-height: 1.35; margin-top: 3px; }

.rm-classify-table select { min-width: 210px; padding: 6px 8px; font-size: 12px; }

@media (max-width: 1400px) {
  .rm-area-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .rm-row-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rm-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  .rm-head { grid-template-columns: 1fr; }
  .rm-brand { border-right: 0; padding-right: 0; }
  .rm-row-3 { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .rm-board { padding: 12px; }
  .rm-kpis, .rm-row-4, .rm-area-grid { grid-template-columns: 1fr; }
  .rm-donut-wrap, .rm-integrations { grid-template-columns: 1fr; justify-items: center; }
}

/* Círculo Closers (public/js/pages/circulo-vendas.js) — 02/10/2026 */
.sales-circle-page .quality-section-tabs { margin-bottom: 4px; }
.sc-toolbar { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 0 20px 12px; }
.sc-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.sc-chip {
  padding: 6px 13px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text); font-size: 13px; font-weight: 500;
}
.sc-chip:hover { border-color: var(--primary); }
.sc-chip:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.sc-chip.is-active { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.sc-person-filter { min-width: 180px; }
.sc-text { min-width: 180px; max-width: 360px; white-space: normal; }
.sc-late { color: var(--danger, #dc2626); font-weight: 700; }
.sc-num { text-align: right; white-space: nowrap; }
.sc-team-table td:first-child { min-width: 220px; }
.sc-closer-grid {
  display: grid; gap: 12px; padding: 0 20px 20px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
}
/* Sem overflow: hidden — ele deixava o card encolher abaixo do conteúdo e cortava o número. */
.sc-closer-card { min-width: 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.sc-closer-card.is-former { opacity: .75; border-style: dashed; }
.sc-closer-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
  padding: 10px 12px; border-bottom: 1px solid var(--border); font-size: 14px;
}
.sc-closer-head .muted { font-size: 11px; }
.sc-closer-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.sc-closer-table th, .sc-closer-table td { padding: 4px 12px; border-bottom: 1px solid var(--border); }
.sc-closer-table tr:last-child th, .sc-closer-table tr:last-child td { border-bottom: 0; }
/* O th global é caixa-alta, 10px e não quebra linha: aqui o rótulo quebra e o número nunca. */
.sc-closer-table th {
  text-align: left; font-size: 12.5px; font-weight: 500; color: var(--text);
  text-transform: none; letter-spacing: normal; background: transparent;
  border-top: 0; white-space: normal; cursor: default; line-height: 1.3;
}
.sc-closer-table td { width: 1%; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sc-closer-table .sc-metric-cell { min-width: 0; padding: 2px 4px; }
.sc-tag-manual { font-size: 10px; font-weight: 500; color: var(--muted); }
.sc-metric-cell {
  display: inline-flex; align-items: center; justify-content: flex-end; gap: 4px;
  min-width: 64px; padding: 3px 6px; border-radius: 6px;
  border: 1px solid transparent; background: transparent;
  font: inherit; color: inherit; text-align: right;
}
button.sc-metric-cell { cursor: pointer; }
button.sc-metric-cell:hover { border-color: var(--border); background: var(--surface-muted, rgba(0, 26, 109, .04)); }
button.sc-metric-cell:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.sc-metric-cell.is-empty { color: var(--muted); }
.sc-src {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 15px; height: 15px; padding: 0 3px; border-radius: 4px;
  font-size: 10px; font-weight: 700; line-height: 1;
}
.sc-src-manual { background: var(--info-bg); color: var(--primary-dark); }
.sc-src-sheet { background: var(--warning-bg); color: var(--warning); }
.sc-src-diff { background: transparent; color: var(--muted); }
.sc-footnote { margin: 0; font-size: 12px; line-height: 1.6; color: var(--muted); }
.sc-source-list { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.7; }
.sc-check { flex-direction: row; align-items: center; justify-content: space-between; padding-top: 22px; }
.sc-delete-row { display: flex; justify-content: flex-end; }

/* Perfil do closer: auditorias + erros num card só, com contestação (02/10/2026) */
.closer-quality-subhead { margin: 4px 20px 8px; font-size: 13px; font-weight: 700; color: var(--text); }
.closer-quality-card .table-scroll + .closer-quality-subhead,
.closer-quality-card .empty-state + .closer-quality-subhead { margin-top: 20px; }
.closer-quality-actions { white-space: nowrap; text-align: right; }
.closer-quality-actions .button + .button { margin-left: 6px; }

/* Bloco da contestação no plano de ação (engine: salesContestBlockHtml) */
.contest-block {
  display: flex; flex-direction: column; gap: 10px; padding: 14px 16px;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2);
}
.contest-head { display: flex; align-items: center; gap: 10px; }
.contest-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px 16px; margin: 0; font-size: 13px; }
.contest-facts dt { font-size: 11px; color: var(--muted); }
.contest-facts dd { margin: 2px 0 0; }
.contest-text p { margin: 4px 0 0; white-space: pre-wrap; }
.contest-findings { margin: 0; font-size: 13px; }
.contest-files { margin: 4px 0 0; padding-left: 18px; font-size: 13px; }
.contest-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }

/* Erros e contestações no perfil do IS (perfil.js: renderProfileErrorContestSection) */
.error-contest-list { display: flex; flex-direction: column; padding-bottom: 8px; }
.error-contest-item { border-top: 1px solid var(--table-row-border); }
.error-contest-row {
  display: grid; grid-template-columns: 84px 150px minmax(0, 1fr) 96px 160px auto;
  gap: 12px; align-items: center; padding: 12px 20px; cursor: pointer;
}
.error-contest-row:hover { background: var(--table-hover); }
.error-contest-row:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.error-contest-date { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 13px; }
.error-contest-title { min-width: 0; }
.error-contest-item.is-removed .error-contest-title strong { text-decoration: line-through; color: var(--muted); }
.error-contest-actions { display: flex; gap: 6px; justify-content: flex-end; align-items: center; flex-wrap: wrap; }
.error-contest-caret { color: var(--muted); font-size: 18px; line-height: 1; transition: transform .15s; }
.error-contest-item.is-open .error-contest-caret { transform: rotate(90deg); }
.error-origin {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--surface-2); color: var(--text);
}
.error-origin.is-whatsapp { background: var(--success-bg); color: var(--success); }
.error-origin.is-meeting { background: var(--info-bg); color: var(--info); }
.error-origin.is-advbox { background: var(--warning-bg); color: var(--warning); }
.error-origin.is-deadline { background: var(--danger-bg); color: var(--danger); }
.error-origin.is-crm { background: var(--primary-soft); color: var(--primary-dark); }
.error-contest-detail { display: flex; flex-direction: column; gap: 12px; padding: 0 20px 16px 116px; }
.error-contest-seen { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; }
.error-contest-seen p { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.error-contest-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 6px; }
.error-contest-meta { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 13px; }
.error-contest-evidence { display: flex; flex-wrap: wrap; gap: 8px; }
.error-contest-evidence .button, .error-ev { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.error-contest-timeline { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 2px solid var(--border); display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.error-contest-timeline li { position: relative; }
.error-contest-timeline li::before { content: ""; position: absolute; left: -21px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--border); }
.error-contest-timeline li.is-ok::before { background: var(--success); }
.error-contest-timeline li.is-wait::before, .error-contest-timeline li.is-sent::before { background: var(--warning); }
.error-contest-timeline li.is-no::before { background: var(--muted); }
.error-decision { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.error-decision legend { font-weight: 600; margin-bottom: 4px; }
.error-decision label { display: flex; gap: 8px; align-items: center; justify-content: flex-start; font-weight: 500; cursor: pointer; }
.error-decision input[type="radio"] { width: auto; height: auto; margin: 0; flex: none; }
.error-contest-pending { display: flex; flex-direction: column; gap: 6px; margin: 8px 0 0; padding: 0; list-style: none; }
.error-contest-pending li { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
@media (max-width: 900px) {
  .error-contest-row {
    grid-template-columns: 76px minmax(0, 1fr) auto;
    grid-template-areas: "date origin act" "title title title" "level status status";
    row-gap: 6px;
  }
  .error-contest-row > :nth-child(1) { grid-area: date; }
  .error-contest-row > :nth-child(2) { grid-area: origin; }
  .error-contest-row > :nth-child(3) { grid-area: title; }
  .error-contest-row > :nth-child(4) { grid-area: level; }
  .error-contest-row > :nth-child(5) { grid-area: status; }
  .error-contest-row > :nth-child(6) { grid-area: act; }
  .error-contest-detail { padding-left: 20px; }
}

/* Detalhe do KPI do funil de Farmers/Hunters: o que entra na conta. */
.task-metric-parts { margin: 0 0 8px; padding-left: 18px; display: grid; gap: 6px; }
.task-metric-parts code { font-size: 0.82em; white-space: normal; }

/* Logo do CQ (PNG transparente) direto sobre a sidebar, sem o quadrado da ADVBOX. */
.brand-mark.is-cq { background: transparent; box-shadow: none; border-radius: 0; }
.brand-mark.is-cq img { object-fit: contain; filter: drop-shadow(0 4px 10px rgba(31,111,255,.35)); }

/* Contagem ao lado do nome da aba (Time do círculo · 5) nas configs de círculo. */
.settings-tab-count {
  margin-left: auto;
  min-width: 22px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}
.settings-tab.is-active .settings-tab-count { color: var(--primary); border-color: currentColor; }
.settings-page .settings-block-panel > .settings-panel-hint { margin-bottom: 10px; }
/* Carta da quinzena (pauta de conversa): lembrete de 15 dias no botão. */
.pc-due { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: rgba(255, 255, 255, .25); font-size: 11px; font-weight: 700; }
.pc-letter-intro { margin: 0 0 10px; font-size: 12.5px; }

/* Atendimento WhatsApp (13/10/2026) — js/pages/atendimento-whatsapp.js */
.wa-filters input[type="date"] { min-width: 9.5rem; }
.wa-status { margin: -4px 2px 0; font-size: 12px; }
.wa-person { padding: 0; }
.wa-person > summary { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 14px 18px; cursor: pointer; list-style: none; }
.wa-person > summary::-webkit-details-marker { display: none; }
.wa-person > summary::before { content: "▸"; color: var(--muted); }
.wa-person[open] > summary::before { content: "▾"; }
.wa-person-name { font-weight: 800; font-size: 15px; }
.wa-person-counts { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.wa-person .table-scroll { border-top: 1px solid var(--border); }
.wa-table { min-width: 920px; }
.wa-table td { vertical-align: top; font-size: 12.5px; line-height: 1.45; }
.wa-table td.wa-what { min-width: 260px; }
.wa-table td.wa-what strong { display: block; margin-bottom: 2px; }
.wa-table td.wa-do { min-width: 200px; color: var(--muted); }
.wa-table td.wa-client { min-width: 170px; }
.wa-table td.wa-when { white-space: nowrap; }
.wa-table tr.is-seen td { opacity: .62; }
.wa-kind, .wa-seen-by { font-size: 11px; margin-top: 3px; }
.wa-waiting ul { margin: 0; padding: 0 18px 14px 34px; display: grid; gap: 8px; font-size: 12.5px; line-height: 1.45; }
.wa-footnote { font-size: 12px; }

/* Painéis por papel da Implantação (29/10/2026) — js/core/role-panels.js.
   Faixa de abas acima do conteúdo, no mesmo visual das abas do Círculo
   (visao-geral-implantacao.html: .tabs). */
.role-panel-tabs {
  max-width: 1600px;
  margin: 0 auto;
  padding: 24px 28px 0;
}
.role-panel-tabs[hidden] { display: none; }
.role-panel-tabs:not([hidden]) + .page-content { padding-top: 16px; }
.role-panel-tabs-list {
  display: flex;
  gap: 6px;
  width: fit-content;
  max-width: 100%;
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px;
  scrollbar-width: none;
}
.role-panel-tabs-list::-webkit-scrollbar { display: none; }
.role-panel-tab {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 8px 14px;
  color: var(--muted);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s ease, color .15s ease;
}
.role-panel-tab:hover { color: var(--text); background: var(--surface-2); }
.role-panel-tab.active { background: var(--primary-soft); color: var(--primary-dark); }
.role-panel-tab:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
@media (max-width: 980px) {
  .role-panel-tabs { padding: 18px 18px 0; }
}

/* Processos sem tarefa (aba do Painel da Treinadora). */
.notask-filters { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.notask-status { display: flex; gap: 6px; flex-wrap: wrap; }
.notask-count { font-weight: 800; margin-left: 4px; opacity: .8; }
.notask-table td { vertical-align: middle; }
.notask-actions { flex-wrap: nowrap; gap: 8px; }
/* Os botões são os mesmos ícones do modal antigo; aqui ganham o nome ao lado. */
.notask-actions .button.icon-action,
.notask-actions .button.icon-action.occ-icon {
  width: auto;
  min-width: 0;
  padding: 0 12px;
  gap: 6px;
  border-radius: 8px;
}
.notask-actions .button.icon-action::after { content: attr(aria-label); font-size: 12px; font-weight: 600; white-space: nowrap; }
/* "Criar auditoria" usa o ícone com balão de dica (occ-icon): aqui o balão
   vira o rótulo fixo do botão, como no "Marcar como vista". */
.notask-actions.table-actions .button.icon-action.occ-icon[data-tooltip]::after,
.notask-actions.table-actions .button.icon-action.occ-icon[data-tooltip]:hover::after,
.notask-actions.table-actions .button.icon-action.occ-icon[data-tooltip]:focus-visible::after {
  content: attr(aria-label);
  position: static;
  transform: none;
  background: none;
  color: inherit;
  font-size: 12px;
  padding: 0;
  box-shadow: none;
  opacity: 1;
  visibility: visible;
}

/* Renovações dos Hunters: consulta do valor da última renovação (03/11/2026) */
.rn-search { display: flex; flex-direction: column; gap: 8px; padding: 18px 20px; }
.rn-search-label { font-size: 13px; font-weight: 700; color: var(--text); }
.rn-search-input { width: 100%; max-width: 420px; padding: 12px 14px; font-size: 16px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--ink); }
.rn-search-input:focus { outline: 2px solid var(--primary); outline-offset: 1px; }
.rn-results { display: flex; flex-direction: column; gap: 14px; }
.rn-count { margin: 0; font-size: 13px; color: var(--muted); }
.rn-card { padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; }
.rn-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.rn-head h3 { margin: 0; font-size: 16px; color: var(--ink); }
.rn-meta { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.rn-last { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-radius: 10px; background: var(--primary-soft); }
.rn-last-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.rn-last-value { font-size: 28px; line-height: 1.2; color: var(--primary-dark); }
.rn-last-note { font-size: 13px; color: var(--muted); }
.rn-history .rn-num { text-align: right; font-variant-numeric: tabular-nums; }

.rn-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.rn-chip { padding: 8px 14px; font-size: 13px; font-weight: 600; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--ink); cursor: pointer; }
.rn-chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.rn-chip-count { margin-left: 4px; padding: 1px 7px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: 12px; }
.rn-chip.active .rn-chip-count { background: rgba(255,255,255,.22); color: #fff; }
.rn-neg { color: var(--danger); }
.rn-history .rn-num { white-space: nowrap; }

.rn-total { margin: 0; font-size: 15px; font-weight: 700; color: var(--primary-dark); }
.rn-cq { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 10px; border-top: 1px solid var(--border); font-size: 13px; color: var(--muted); }
.rn-cq-title { font-weight: 700; color: var(--text); }
.rn-cq-item { display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); }
.rn-cq-remove { border: 0; background: none; padding: 0; font-size: 12px; font-weight: 700; color: var(--danger); cursor: pointer; text-decoration: underline; }

.rn-outcome-actions { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.rn-row-actions { white-space: nowrap; display: flex; gap: 6px; }

.rn-comp { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0; padding: 12px 16px; border: 1px solid var(--border); border-radius: 10px; }
.rn-comp div { display: flex; flex-direction: column; gap: 1px; }
.rn-comp dt { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.rn-comp dd { margin: 0; font-size: 14px; font-weight: 600; color: var(--ink); }
.rn-comp-cell { font-size: 13px; color: var(--muted); }
.rn-form-section { margin: 6px 0 0; font-size: 13px; font-weight: 700; color: var(--text); }

/* Renovações: abas, painel executivo, quadro mês a mês (03/11/2026) */
.rn-tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--border); }
.rn-tab { padding: 10px 16px; font-size: 14px; font-weight: 600; color: var(--muted); background: none; border: 0; border-bottom: 3px solid transparent; cursor: pointer; }
.rn-tab:hover { color: var(--ink); }
.rn-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.rn-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.rn-toolbar-top { justify-content: space-between; }
.rn-year { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--text); }
.rn-year select { padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--ink); font-size: 14px; }
.rn-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.rn-kpi { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.rn-kpi-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.rn-kpi-value { font-size: 24px; line-height: 1.2; color: var(--ink); }
.rn-kpi.good .rn-kpi-value { color: var(--success); }
.rn-kpi-note { font-size: 12px; color: var(--muted); }
.rn-chart { padding-bottom: 16px; }
.rn-svg { width: 100%; height: auto; display: block; padding: 8px 16px 0; box-sizing: border-box; }
.rn-grid { stroke: var(--border); stroke-width: 1; }
.rn-axis { fill: var(--muted); font-size: 11px; }
.rn-bar-prev { fill: var(--primary); opacity: .4; }
.rn-bar-rec { fill: var(--primary); }
.rn-bar-new { fill: var(--success); }
.rn-legend { display: flex; flex-wrap: wrap; gap: 6px 20px; padding: 4px 20px 0; font-size: 12px; color: var(--muted); }
.rn-legend span { display: inline-flex; align-items: center; gap: 6px; }
.rn-sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }
.rn-wide th, .rn-wide td { white-space: nowrap; }
.rn-history tfoot td { font-weight: 700; background: var(--surface-2); }
.rn-group th { text-align: center; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.rn-highlights { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; padding: 0 20px 20px; }
.rn-highlight { padding: 14px 16px; border: 1px solid var(--border); border-radius: 10px; }
.rn-highlight strong { display: block; margin: 4px 0; font-size: 20px; color: var(--primary-dark); }
.rn-highlight small { font-size: 13px; font-weight: 600; color: var(--muted); }
.rn-highlight p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.5; }
#renewalsBody { display: flex; flex-direction: column; gap: 16px; padding-top: 16px; }
.rn-kpi-value { font-size: 21px; }
.rn-sw.rn-bar-prev { background: var(--primary); opacity: .4; }
.rn-sw.rn-bar-rec { background: var(--primary); }
.rn-sw.rn-bar-new { background: var(--success); }

.rn-kpis.rn-kpis-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .rn-kpis.rn-kpis-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .rn-kpis.rn-kpis-3 { grid-template-columns: minmax(0, 1fr); } }


/* --- Central de ajuda (js/pages/ajuda.js, 03/11/2026) ------------------- */
.help-page { gap: 20px; }
.help-hero { display: grid; gap: 14px; }
.help-hero-text h2 { margin: 0 0 4px; font-size: 1.25rem; }
.help-hero-text p { margin: 0; color: var(--muted); }
.help-search input {
  width: 100%; box-sizing: border-box; padding: 12px 14px; font-size: 1rem;
  border: 1px solid var(--input-border); border-radius: 12px; background: var(--input-bg); color: var(--text);
}
.help-search input:focus { outline: 2px solid var(--primary); outline-offset: 1px; }
.help-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.help-tab {
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
  border-radius: 999px; padding: 7px 14px; font: inherit; font-size: .9rem; cursor: pointer;
}
.help-tab:hover { border-color: var(--primary); }
.help-tab.is-active { background: var(--primary); border-color: var(--primary); color: #fff; }
#helpBody { display: flex; flex-direction: column; gap: 22px; }
.help-section { display: flex; flex-direction: column; gap: 10px; }
.help-h2 { margin: 0; font-size: 1.05rem; }
.help-intro { margin: 0; color: var(--muted); }
.help-here {
  display: flex; flex-wrap: wrap; gap: 14px 20px; align-items: center; justify-content: space-between;
  padding: 18px 20px; border-radius: var(--radius); background: var(--primary-soft); border: 1px solid var(--border);
}
.help-here > div:first-child { flex: 1 1 320px; }
.help-here strong { display: block; font-size: 1.15rem; margin: 2px 0 4px; }
.help-here p { margin: 0; color: var(--text); }
.help-eyebrow { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.help-here-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.help-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.help-tile, .help-row, .help-circle, .help-howto, .help-glossary > div {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
}
.help-tile { padding: 14px 16px; }
.help-tile h3, .help-row h3 { margin: 0 0 4px; font-size: .95rem; }
.help-tile p, .help-row p { margin: 0; color: var(--muted); line-height: 1.45; }
.help-list { display: flex; flex-direction: column; gap: 8px; }
.help-row { display: flex; gap: 14px; align-items: center; justify-content: space-between; padding: 12px 16px; }
.help-row-main { min-width: 0; }
.help-who { display: inline-block; margin-top: 6px; font-size: .8rem; color: var(--muted); }
.help-open { flex: 0 0 auto; }
.help-howtos { display: flex; flex-direction: column; gap: 8px; }
.help-howto summary {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between;
  padding: 13px 16px; cursor: pointer; list-style: none; font-weight: 600;
}
.help-howto summary::-webkit-details-marker { display: none; }
.help-howto summary::before { content: '▸'; color: var(--muted); margin-right: 2px; transition: transform .15s; }
.help-howto[open] summary::before { transform: rotate(90deg); }
.help-howto-title { flex: 1 1 auto; }
.help-howto-body { padding: 0 16px 16px; display: flex; flex-direction: column; gap: 10px; }
.help-steps { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; line-height: 1.45; }
.help-notes { background: var(--surface-2); border-radius: 10px; padding: 10px 14px; }
.help-notes strong { font-size: .85rem; }
.help-notes ul { margin: 6px 0 0; padding-left: 18px; color: var(--muted); line-height: 1.45; }
.help-tags { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.help-tag {
  display: inline-block; font-size: .72rem; font-weight: 600; padding: 2px 8px; border-radius: 999px;
  background: var(--surface-2); color: var(--muted); border: 1px solid var(--border);
}
.help-tag.is-here { background: var(--success-bg); color: var(--success); border-color: transparent; }
.help-circles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 460px), 1fr)); gap: 14px; }
.help-circle { padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; scroll-margin-top: 140px; }
.help-circle.is-here { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.help-circle header { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.help-circle h3 { margin: 0; font-size: 1.05rem; }
.help-circle h4 { margin: 0 0 4px; font-size: .85rem; }
.help-circle-what { margin: 0; line-height: 1.45; }
.help-circle .help-who { margin-top: 0; }
.help-circle-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.help-circle ul { margin: 0; padding-left: 18px; color: var(--muted); line-height: 1.45; font-size: .9rem; }
.help-links { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; border-top: 1px solid var(--border); padding-top: 10px; }
.help-links h4 { width: 100%; }
.help-links a { color: var(--primary); font-size: .88rem; text-decoration: none; }
.help-links a:hover { text-decoration: underline; }
.help-glossary { margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 8px; }
.help-glossary > div { padding: 10px 14px; }
.help-glossary dt { font-weight: 600; }
.help-glossary dd { margin: 2px 0 0; color: var(--muted); line-height: 1.4; }
.help-empty { padding: 24px; text-align: center; color: var(--muted); }
@media (max-width: 720px) {
  .help-circles, .help-circle-cols { grid-template-columns: minmax(0, 1fr); }
  .help-row { flex-direction: column; align-items: stretch; }
}

/* Administração → Envio de tarefas (09/11/2026) */
.send-muted { display: flex; gap: 10px 16px; align-items: flex-start; flex-wrap: wrap; margin-top: 12px; }
.send-muted-label { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding-top: 6px; min-width: 110px; }
.send-muted-list { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; flex: 1; min-width: 0; font-size: 12px; }
.send-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 4px 3px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); font-size: 12px; color: var(--text); }
.send-chip button { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 14px; line-height: 1; padding: 0 4px; border-radius: 999px; }
.send-chip button:hover { color: var(--danger); }
.send-muted-add { max-width: 100%; font-size: 12px; padding: 4px 8px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text); }
.health-group + .health-group, #sendsPanel .health-group { margin-top: 18px; }
