:root {
  --color-primary: #0B2545;
  --color-secondary: #13315C;
  --color-accent: #8DA9C4;
  --color-success: #2ECC71;
  --color-warning: #F39C12;
  --color-danger: #E74C3C;
  --color-bg: #F7F9FC;
  --color-surface: #FFFFFF;
  --color-border: #E4E9F0;
  --color-text: #0B2545;
  --color-text-muted: #6B7A8F;
  --color-text-soft: #8A97A8;
  --sidebar-width: 280px;
  --topbar-height: 72px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --shadow-sm: 0 2px 8px rgba(11, 37, 69, 0.06);
  --shadow-md: 0 2px 16px rgba(11, 37, 69, 0.08);
  --shadow-lg: 0 8px 32px rgba(11, 37, 69, 0.12);
  --shadow-xl: 0 16px 48px rgba(11, 37, 69, 0.16);
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 40px;
  --space-6: 48px;
  --font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --transition-fast: 150ms ease;
  --transition-base: 200ms ease;
  --transition-slow: 300ms ease;
  --z-sidebar: 40;
  --z-topbar: 50;
  --z-narrator: 45;
  --z-chatbot: 60;
  --z-modal: 70;
  --z-toast: 80;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #0A0F1C;
    --color-surface: #111827;
    --color-border: #1E293B;
    --color-text: #E2E8F0;
    --color-text-muted: #94A3B8;
    --color-text-soft: #64748B;
    --shadow-md: 0 2px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.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;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-family);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.25;
  color: var(--color-text);
  letter-spacing: -0.02em;
}

h1 { font-size: 22px; }
h2 { font-size: 28px; margin-bottom: var(--space-1); }
h3 { font-size: 17px; }

.skip-link {
  position: absolute;
  top: -48px;
  left: var(--space-2);
  background: var(--color-primary);
  color: #fff;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  z-index: 1000;
  transition: top var(--transition-base);
  font-weight: 600;
}

.skip-link:focus {
  top: var(--space-2);
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

:focus-visible {
  outline: 3px solid #4C9AFF;
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.app-shell {
  display: flex;
  min-height: 100vh;
  position: relative;
}

.sidebar {
  width: var(--sidebar-width);
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  background: linear-gradient(180deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  z-index: var(--z-sidebar);
  padding: var(--space-3) var(--space-3) var(--space-2);
  transition: transform var(--transition-slow);
  box-shadow: var(--shadow-md);
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding-bottom: var(--space-3);
  margin-bottom: var(--space-3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.logo-title {
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
}

.logo-subtitle {
  font-size: 12px;
  opacity: 0.7;
  margin-top: 2px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  overflow-y: auto;
  padding-right: 4px;
}

.sidebar-nav::-webkit-scrollbar {
  width: 6px;
}

.sidebar-nav::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 11px var(--space-2);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.75);
  transition: all var(--transition-base);
  position: relative;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  transform: translateX(2px);
}

.nav-link.active {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-weight: 600;
}

.nav-link.active::before {
  content: '';
  position: absolute;
  left: -12px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 24px;
  background: var(--color-accent);
  border-radius: 0 3px 3px 0;
}

.nav-link i {
  width: 20px;
  text-align: center;
  font-size: 15px;
}

.sidebar-footer {
  padding-top: var(--space-2);
  margin-top: var(--space-2);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.version-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px var(--space-2);
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
}

.version-badge i {
  color: var(--color-accent);
}

.main-wrapper {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin-left var(--transition-slow);
}

.topbar {
  height: var(--topbar-height);
  position: sticky;
  top: 0;
  z-index: var(--z-topbar);
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 0 var(--space-4);
  backdrop-filter: blur(12px);
}

.topbar-title {
  flex: 1;
  min-width: 0;
}

.topbar-title h1 {
  font-size: 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-progress {
  margin-top: 2px;
  font-size: 12px;
  color: var(--color-text-muted);
  font-weight: 500;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.field-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.field-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.select {
  padding: 8px 32px 8px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B7A8F' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  transition: all var(--transition-fast);
}

.select:hover {
  border-color: var(--color-accent);
}

.select:focus {
  border-color: #4C9AFF;
  box-shadow: 0 0 0 3px rgba(76, 154, 255, 0.15);
}

.select.small {
  padding: 6px 28px 6px 10px;
  font-size: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  transition: all var(--transition-base);
  white-space: nowrap;
  line-height: 1;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(11, 37, 69, 0.2);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(11, 37, 69, 0.25);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-ghost {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.btn-ghost:hover {
  background: var(--color-bg);
  border-color: var(--color-accent);
}

.btn-lg {
  padding: 14px 24px;
  font-size: 15px;
  border-radius: var(--radius-md);
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  font-size: 16px;
  color: var(--color-text-muted);
  transition: all var(--transition-base);
  flex-shrink: 0;
}

.icon-btn:hover {
  background: var(--color-bg);
  color: var(--color-text);
}

.hidden-sm {
  display: inline;
}

.slides-container {
  flex: 1;
  position: relative;
  padding: var(--space-4) var(--space-5) var(--space-6);
}

.slides-viewport {
  position: relative;
}

.slide {
  opacity: 0;
  transform: translateX(40px);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  pointer-events: none;
  transition: opacity var(--transition-slow), transform var(--transition-slow);
}

.slide.active {
  opacity: 1;
  transform: translateX(0);
  position: relative;
  pointer-events: auto;
}

.slide-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
}

.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-accent);
  margin-bottom: var(--space-1);
}

.slide-tools {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.search-field {
  position: relative;
  display: flex;
  align-items: center;
}

.search-field i {
  position: absolute;
  left: 12px;
  color: var(--color-text-muted);
  font-size: 14px;
  pointer-events: none;
}

.search-field input {
  padding: 9px 14px 9px 38px;
  width: 280px;
  max-width: 100%;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  font-size: 14px;
  transition: all var(--transition-fast);
}

.search-field input::placeholder {
  color: var(--color-text-soft);
}

.search-field input:hover {
  border-color: var(--color-accent);
}

.search-field input:focus {
  border-color: #4C9AFF;
  box-shadow: 0 0 0 3px rgba(76, 154, 255, 0.15);
}

.cover-slide {
  position: relative;
  min-height: calc(100vh - var(--topbar-height) - 140px);
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: var(--space-5);
  align-items: center;
  padding: var(--space-2) 0;
}

.cover-accent {
  position: absolute;
  top: -40px;
  left: -80px;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(141, 169, 196, 0.18) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.cover-content {
  position: relative;
  z-index: 1;
}

.cover-content .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 100px;
  box-shadow: var(--shadow-sm);
}

.cover-content h2 {
  font-size: clamp(36px, 5vw, 52px);
  margin: var(--space-3) 0 var(--space-2);
  font-weight: 800;
}

.gradient-text {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

@media (prefers-color-scheme: dark) {
  .gradient-text {
    background: linear-gradient(135deg, #8DA9C4 0%, #BED1E3 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
  }
}

.cover-lead {
  font-size: 17px;
  color: var(--color-text-muted);
  line-height: 1.7;
  max-width: 580px;
  margin-bottom: var(--space-4);
}

.cover-kpis-inline {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.pill-kpi {
  display: flex;
  flex-direction: column;
  padding: 14px 20px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  min-width: 160px;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.pill-kpi:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.pill-kpi strong {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 2px;
}

@media (prefers-color-scheme: dark) {
  .pill-kpi strong {
    color: var(--color-accent);
  }
}

.pill-kpi span {
  font-size: 12px;
  color: var(--color-text-muted);
}

.cover-cta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.cover-side-card {
  position: relative;
  z-index: 1;
  background: linear-gradient(160deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  color: #fff;
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.cover-side-card h3 {
  font-size: 18px;
  margin-bottom: var(--space-3);
  color: #fff;
}

.cover-side-card ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cover-side-card li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  line-height: 1.5;
  opacity: 0.92;
}

.cover-side-card li i {
  margin-top: 2px;
  color: var(--color-accent);
  flex-shrink: 0;
  width: 18px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.kpi-grid.small-grid {
  grid-template-columns: repeat(4, 1fr);
}

.kpi-card {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
}

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-accent);
}

.kpi-card.compact {
  padding: var(--space-2) var(--space-3);
}

.kpi-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 18px;
}

.kpi-1 .kpi-icon { background: rgba(46, 204, 113, 0.12); color: var(--color-success); }
.kpi-2 .kpi-icon { background: rgba(11, 37, 69, 0.1); color: var(--color-primary); }
.kpi-3 .kpi-icon { background: rgba(243, 156, 18, 0.12); color: var(--color-warning); }
.kpi-4 .kpi-icon { background: rgba(141, 169, 196, 0.2); color: var(--color-secondary); }

@media (prefers-color-scheme: dark) {
  .kpi-2 .kpi-icon { background: rgba(141, 169, 196, 0.15); color: var(--color-accent); }
}

.kpi-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  margin-bottom: 6px;
}

.kpi-value {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.1;
  color: var(--color-text);
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.kpi-card.compact .kpi-value {
  font-size: 22px;
}

.kpi-foot {
  font-size: 12px;
  color: var(--color-text-muted);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.panel {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: all var(--transition-base);
}

.panel:hover {
  box-shadow: var(--shadow-md);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--color-border);
}

.panel-header h3 {
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.panel-header h3 i {
  font-size: 16px;
}

.panel-note {
  padding: var(--space-2) var(--space-3) var(--space-1);
  font-size: 14px;
  color: var(--color-text);
  font-weight: 500;
}

.panel-muted {
  padding: 0 var(--space-3) var(--space-3);
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.6;
}

.alert-panel {
  border-color: rgba(243, 156, 18, 0.25);
  background: linear-gradient(180deg, rgba(243, 156, 18, 0.04) 0%, var(--color-surface) 100%);
}

.alert-panel .panel-header h3 i {
  color: var(--color-warning);
}

.warn-panel {
  border-color: rgba(243, 156, 18, 0.25);
  background: linear-gradient(180deg, rgba(243, 156, 18, 0.04) 0%, var(--color-surface) 100%);
}

.warn-panel .panel-header h3 i {
  color: var(--color-warning);
}

.success-panel {
  border-color: rgba(46, 204, 113, 0.25);
  background: linear-gradient(180deg, rgba(46, 204, 113, 0.04) 0%, var(--color-surface) 100%);
}

.success-panel .panel-header h3 i {
  color: var(--color-success);
}

.info-panel {
  border-color: rgba(141, 169, 196, 0.3);
  background: linear-gradient(180deg, rgba(141, 169, 196, 0.05) 0%, var(--color-surface) 100%);
}

.info-panel .panel-header h3 i {
  color: var(--color-secondary);
}

@media (prefers-color-scheme: dark) {
  .info-panel .panel-header h3 i {
    color: var(--color-accent);
  }
}

.attention-list {
  list-style: none;
  padding: var(--space-2) var(--space-3) var(--space-3);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.attention-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  background: var(--color-bg);
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 1.55;
  border-left: 3px solid var(--color-warning);
}

@media (prefers-color-scheme: dark) {
  .attention-list li {
    background: rgba(255, 255, 255, 0.03);
  }
}

.attention-list li i {
  margin-top: 3px;
  color: var(--color-warning);
  flex-shrink: 0;
}

.action-list {
  padding: var(--space-2) var(--space-3) var(--space-3) var(--space-5);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.action-list li {
  font-size: 14px;
  line-height: 1.6;
  padding-left: 4px;
}

.action-list li strong {
  color: var(--color-primary);
  font-weight: 600;
}

@media (prefers-color-scheme: dark) {
  .action-list li strong {
    color: var(--color-accent);
  }
}

.conclusao-fatos {
  padding: var(--space-2) var(--space-3) var(--space-3);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.conclusao-fatos p {
  font-size: 14px;
  line-height: 1.65;
}

.thanks-panel {
  margin-top: var(--space-5);
  padding: var(--space-5);
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  border-radius: var(--radius-lg);
  color: #fff;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.thanks-panel h3 {
  font-size: 24px;
  color: #fff;
  margin-bottom: var(--space-2);
}

.thanks-panel p {
  font-size: 15px;
  line-height: 1.7;
  opacity: 0.92;
  max-width: 600px;
  margin: 0 auto var(--space-2);
}

.thanks-panel .muted {
  opacity: 0.75;
  font-size: 13px;
}

.muted {
  color: var(--color-text-muted);
}

.small {
  font-size: 12px;
}

.chart-wrap {
  position: relative;
  padding: var(--space-3);
  height: 320px;
}

.chart-wrap.small {
  height: 280px;
}

.chart-wrap canvas {
  width: 100% !important;
  height: 100% !important;
}

.table-wrap {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
  margin-bottom: var(--space-2);
  -webkit-overflow-scrolling: touch;
}

.table-wrap::-webkit-scrollbar {
  height: 8px;
}

.table-wrap::-webkit-scrollbar-track {
  background: var(--color-bg);
}

.table-wrap::-webkit-scrollbar-thumb {
  background: var(--color-accent);
  border-radius: 4px;
  opacity: 0.5;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 100%;
}

.data-table.wide-table {
  min-width: 900px;
}

.data-table thead {
  background: var(--color-bg);
  position: sticky;
  top: 0;
  z-index: 1;
}

@media (prefers-color-scheme: dark) {
  .data-table thead {
    background: rgba(255, 255, 255, 0.03);
  }
}

.data-table th {
  padding: 12px 14px;
  text-align: left;
  font-weight: 600;
  color: var(--color-text-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--color-border);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition: color var(--transition-fast);
}

.data-table th:hover {
  color: var(--color-text);
}

.data-table th i {
  margin-left: 6px;
  font-size: 11px;
  opacity: 0.6;
}

.data-table th.num,
.data-table td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text);
  vertical-align: middle;
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.data-table tbody tr {
  transition: background var(--transition-fast);
}

.data-table tbody tr:hover {
  background: var(--color-bg);
}

@media (prefers-color-scheme: dark) {
  .data-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
  }
}

.data-table tfoot td {
  font-weight: 700;
  background: var(--color-bg);
  border-top: 2px solid var(--color-border);
  border-bottom: none;
  color: var(--color-text);
  padding-top: 14px;
  padding-bottom: 14px;
}

@media (prefers-color-scheme: dark) {
  .data-table tfoot td {
    background: rgba(255, 255, 255, 0.03);
  }
}

.data-table.simple-table {
  border: none;
  box-shadow: none;
  border-radius: 0;
}

.data-table.simple-table thead {
  background: transparent;
}

.data-table.simple-table th {
  background: var(--color-bg);
}

.data-table.compact th,
.data-table.compact td {
  padding: 9px 12px;
  font-size: 12px;
}

.small-table {
  max-height: 320px;
  overflow-y: auto;
}

.table-foot {
  padding: var(--space-1) 4px var(--space-3);
  font-size: 13px;
  color: var(--color-text-muted);
  font-weight: 500;
}

.riscos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-3);
}

.risco-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.risco-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--color-warning);
}

.risco-card[data-level="baixo"]::before { background: var(--color-success); }
.risco-card[data-level="medio"]::before { background: var(--color-warning); }
.risco-card[data-level="alto"]::before { background: var(--color-danger); }
.risco-card[data-level="critico"]::before { background: var(--color-danger); }

.risco-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.risco-card .risco-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-2);
}

.risco-card .risco-titulo {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text);
}

.risco-card .risco-nivel {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: 100px;
}

.risco-card[data-level="baixo"] .risco-nivel { background: rgba(46, 204, 113, 0.12); color: var(--color-success); }
.risco-card[data-level="medio"] .risco-nivel { background: rgba(243, 156, 18, 0.12); color: var(--color-warning); }
.risco-card[data-level="alto"] .risco-nivel { background: rgba(231, 76, 60, 0.1); color: var(--color-danger); }
.risco-card[data-level="critico"] .risco-nivel { background: rgba(231, 76, 60, 0.15); color: var(--color-danger); }

.risco-card .risco-impacto {
  font-size: 13px;
  color: var(--color-text);
  margin-bottom: var(--space-2);
  line-height: 1.6;
}

.risco-card .risco-valor {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: var(--space-2);
}

@media (prefers-color-scheme: dark) {
  .risco-card .risco-valor {
    color: var(--color-accent);
  }
}

.risco-card .risco-mitigacao {
  font-size: 12px;
  color: var(--color-text-muted);
  line-height: 1.6;
  padding-top: var(--space-2);
  border-top: 1px solid var(--color-border);
}

.risco-card .risco-mitigacao strong {
  color: var(--color-text);
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.slide-nav-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-top: var(--space-5);
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-border);
}

.slide-dots {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.slide-dots .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-border);
  transition: all var(--transition-base);
  cursor: pointer;
  border: none;
}

.slide-dots .dot:hover {
  background: var(--color-accent);
  transform: scale(1.2);
}

.slide-dots .dot.active {
  background: var(--color-primary);
  width: 28px;
  border-radius: 4px;
}

@media (prefers-color-scheme: dark) {
  .slide-dots .dot.active {
    background: var(--color-accent);
  }
}

.narrator-panel {
  position: fixed;
  bottom: 24px;
  left: calc(var(--sidebar-width) + 24px);
  z-index: var(--z-narrator);
  display: flex;
  align-items: flex-end;
  gap: var(--space-2);
  max-width: calc(100vw - var(--sidebar-width) - 420px);
  transition: left var(--transition-slow);
}

.avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.avatar-svg {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  background: var(--color-surface);
  border: 3px solid var(--color-surface);
  transition: transform var(--transition-base);
}

.avatar-wrap:hover .avatar-svg {
  transform: scale(1.05);
}

.waves {
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  width: 40px;
  height: 20px;
  pointer-events: none;
}

.waves span {
  display: block;
  width: 3px;
  background: var(--color-accent);
  border-radius: 3px;
  height: 4px;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.speaking .waves span {
  opacity: 1;
  animation: wave 1s ease-in-out infinite;
}

.speaking .waves span:nth-child(1) { animation-delay: 0s; }
.speaking .waves span:nth-child(2) { animation-delay: 0.15s; }
.speaking .waves span:nth-child(3) { animation-delay: 0.3s; }

@keyframes wave {
  0%, 100% { height: 4px; }
  50% { height: 18px; }
}

.speech-area {
  flex: 1;
  min-width: 0;
}

.speech-bubble {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  border-bottom-left-radius: 4px;
  padding: 14px 16px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--color-text);
  box-shadow: var(--shadow-md);
  position: relative;
  margin-bottom: 10px;
  max-height: 120px;
  overflow-y: auto;
}

.speech-bubble::-webkit-scrollbar {
  width: 4px;
}

.speech-bubble::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 2px;
}

.speech-bubble strong {
  color: var(--color-primary);
}

@media (prefers-color-scheme: dark) {
  .speech-bubble strong {
    color: var(--color-accent);
  }
}

.speech-controls {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.rate-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rate-control label {
  font-size: 12px;
  color: var(--color-text-muted);
  font-weight: 500;
}

.speech-status {
  font-size: 12px;
  color: var(--color-text-muted);
  font-weight: 500;
}

.narrator-panel.narrator-minimizado {
  display: none !important;
}

.narrador-fab {
  position: fixed;
  bottom: 28px;
  left: calc(var(--sidebar-width) + 28px);
  z-index: calc(var(--z-narrator) + 2);
  width: 76px;
  height: 76px;
  border-radius: 50%;
  border: none;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: linear-gradient(135deg, #ffffff 0%, #eef2ff 100%);
  box-shadow: 0 10px 28px rgba(12, 37, 73, 0.22), 0 0 0 3px rgba(26, 81, 169, 0.16);
  transform: translate3d(-20px, 24px, 0) scale(0.9);
  opacity: 0;
  pointer-events: none;
  transition: transform 260ms cubic-bezier(0.16, 1, 0.3, 1),
              opacity 220ms ease,
              box-shadow 180ms ease;
}

.narrador-fab.is-visible {
  transform: translate3d(0, 0, 0) scale(1);
  opacity: 1 !important;
  pointer-events: auto;
  animation: fabIn 460ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes fabIn {
  0%   { transform: scale(0.4); opacity: 0; }
  60%  { transform: scale(1.06); opacity: 1; }
  100% { transform: scale(1);    opacity: 1; }
}

.narrador-fab:hover {
  transform: scale(1.06);
  box-shadow: 0 14px 34px rgba(12, 37, 73, 0.28), 0 0 0 4px rgba(26, 81, 169, 0.20);
}
.narrador-fab:active {
  transform: scale(0.96);
}

.narrador-fab-face {
  border-radius: 50%;
  width: 68px !important;
  height: 88px !important;
  max-width: 68px;
  max-height: 88px;
  overflow: hidden;
  background: transparent;
  display: block;
  object-fit: cover;
}

.narrador-fab-badge {
  position: absolute;
  top: 0px;
  right: 0px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #6366f1);
  box-shadow: 0 0 0 3px var(--color-surface);
  animation: fabPulse 2.4s ease-in-out infinite;
}
@keyframes fabPulse {
  0%, 100% { transform: scale(1);   opacity: 1; }
  50%      { transform: scale(1.4); opacity: 0.55; }
}

@media (max-width: 1024px) {
  .narrador-fab { left: 28px; }
}
@media (max-width: 720px) {
  .narrador-fab {
    left: 16px;
    bottom: 92px;
    width: 68px;
    height: 68px;
  }
  .narrador-fab-face {
    width: 60px !important;
    height: 78px !important;
    max-width: 60px;
    max-height: 78px;
  }
}

.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(11, 37, 69, 0.5);
  backdrop-filter: blur(6px);
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-slow);
}

.modal-mask.open {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  width: 100%;
  max-width: 560px;
  max-height: 80vh;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  transform: translateY(20px) scale(0.98);
  transition: transform var(--transition-slow);
  display: flex;
  flex-direction: column;
}

.modal-mask.open .modal {
  transform: translateY(0) scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: var(--space-3);
  border-bottom: 1px solid var(--color-border);
}

.modal-header h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
}

.modal-header h3 i {
  color: var(--color-accent);
}

.modal-body {
  padding: var(--space-3);
  overflow-y: auto;
}

.history-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-2);
  padding: var(--space-2);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-1);
  transition: background var(--transition-fast);
  cursor: pointer;
}

.history-item:hover {
  background: var(--color-bg);
}

@media (prefers-color-scheme: dark) {
  .history-item:hover {
    background: rgba(255, 255, 255, 0.03);
  }
}

.history-item .h-info {
  flex: 1;
}

.history-item .h-version {
  font-weight: 700;
  font-size: 14px;
  color: var(--color-text);
  margin-bottom: 2px;
}

.history-item .h-date {
  font-size: 12px;
  color: var(--color-text-muted);
}

.history-item .h-tag {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 100px;
  background: rgba(46, 204, 113, 0.12);
  color: var(--color-success);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.toast-container {
  position: fixed;
  top: calc(var(--topbar-height) + 16px);
  right: 24px;
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  max-width: 380px;
  pointer-events: none;
}

.toast {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-primary);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  pointer-events: auto;
  animation: toastIn var(--transition-slow) ease;
}

.toast.success { border-left-color: var(--color-success); }
.toast.warning { border-left-color: var(--color-warning); }
.toast.danger { border-left-color: var(--color-danger); }
.toast.info { border-left-color: var(--color-accent); }

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.toast-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.toast.success .toast-icon { background: rgba(46, 204, 113, 0.12); color: var(--color-success); }
.toast.warning .toast-icon { background: rgba(243, 156, 18, 0.12); color: var(--color-warning); }
.toast.danger .toast-icon { background: rgba(231, 76, 60, 0.1); color: var(--color-danger); }
.toast.info .toast-icon { background: rgba(141, 169, 196, 0.2); color: var(--color-secondary); }

@media (prefers-color-scheme: dark) {
  .toast.info .toast-icon { color: var(--color-accent); }
}

.toast-body {
  flex: 1;
  min-width: 0;
}

.toast-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 2px;
}

.toast-msg {
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.5;
}

.app-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-5);
  border-top: 1px solid var(--color-border);
  font-size: 12px;
  color: var(--color-text-muted);
  flex-wrap: wrap;
}

@media (max-width: 1024px) {
  .cover-slide {
    grid-template-columns: 1fr;
    gap: var(--space-4);
    min-height: auto;
  }

  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .kpi-grid.small-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }

  .narrator-panel {
    left: 24px;
    max-width: calc(100vw - 400px);
  }
}

@media (max-width: 768px) {
  :root {
    --topbar-height: 64px;
  }

  .sidebar {
    transform: translateX(-100%);
    width: min(320px, 85vw);
    box-shadow: none;
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow-xl);
  }

  .main-wrapper {
    margin-left: 0;
  }

  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(11, 37, 69, 0.4);
    backdrop-filter: blur(4px);
    z-index: calc(var(--z-sidebar) - 1);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-slow);
  }

  .sidebar-backdrop.show {
    opacity: 1;
    pointer-events: auto;
  }

  .topbar {
    padding: 0 var(--space-2);
    gap: var(--space-2);
    flex-wrap: wrap;
    height: auto;
    min-height: var(--topbar-height);
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .topbar-title h1 {
    font-size: 14px;
  }

  .topbar-actions {
    width: 100%;
    order: 3;
    gap: 8px;
  }

  .field-group {
    flex: 1;
    min-width: 0;
  }

  .field-label {
    display: none;
  }

  .select {
    flex: 1;
    min-width: 0;
    width: 100%;
  }

  .hidden-sm {
    display: none !important;
  }

  .slides-container {
    padding: var(--space-3) var(--space-2) var(--space-5);
  }

  .cover-slide {
    padding: var(--space-1) 0;
  }

  .cover-content h2 {
    font-size: 32px;
  }

  .cover-lead {
    font-size: 15px;
  }

  .pill-kpi {
    min-width: calc(50% - 8px);
    padding: 12px var(--space-2);
  }

  .pill-kpi strong {
    font-size: 17px;
  }

  .cover-side-card {
    padding: var(--space-3);
  }

  .kpi-grid {
    grid-template-columns: 1fr;
    gap: var(--space-2);
  }

  .kpi-grid.small-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-2);
  }

  .kpi-value {
    font-size: 22px;
  }

  .grid-2 {
    gap: var(--space-2);
    margin-bottom: var(--space-3);
  }

  .chart-wrap {
    height: 260px;
    padding: var(--space-2);
  }

  .chart-wrap.small {
    height: 240px;
  }

  .slide-header {
    margin-bottom: var(--space-3);
  }

  .slide-tools {
    width: 100%;
  }

  .search-field {
    width: 100%;
  }

  .search-field input {
    width: 100%;
  }

  .table-wrap {
    margin-bottom: var(--space-1);
  }

  .data-table th,
  .data-table td {
    padding: 10px 12px;
    font-size: 12px;
  }

  .data-table.wide-table {
    min-width: 780px;
  }

  .slide-nav-bottom {
    margin-top: var(--space-4);
    padding-top: var(--space-2);
    gap: var(--space-2);
  }

  .slide-nav-bottom .btn span {
    display: none;
  }

  .slide-nav-bottom .btn {
    padding: 10px 14px;
  }

  .slide-dots .dot.active {
    width: 20px;
  }

  .narrator-panel {
    left: 12px;
    right: 12px;
    bottom: 96px;
    max-width: none;
  }

  .avatar-svg {
    width: 56px;
    height: 56px;
  }

  .avatar-svg svg {
    width: 56px;
    height: 56px;
  }

  .speech-bubble {
    padding: 12px 14px;
    font-size: 13px;
    max-height: 100px;
  }

  .riscos-grid {
    grid-template-columns: 1fr;
  }

  .thanks-panel {
    padding: var(--space-4) var(--space-3);
    margin-top: var(--space-4);
  }

  .thanks-panel h3 {
    font-size: 20px;
  }

  .app-footer {
    padding: var(--space-2);
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .toast-container {
    top: calc(var(--topbar-height) + 40px);
    left: 12px;
    right: 12px;
    max-width: none;
  }

  h2 {
    font-size: 22px;
  }

  h3 {
    font-size: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* AVATAR ULTRARREALISTA HELENA */
:root {
  --blink-delay: 0s;
  --head-tilt: 0deg;
}

@keyframes blink {
  0%, 90%, 100% { transform: scaleY(1); }
  95% { transform: scaleY(0.1); }
}

@keyframes breathe {
  0%, 100% { transform: scale(1.00); }
  50% { transform: scale(1.008); }
}

@keyframes headTilt {
  0%, 100% { transform: rotate(-0.8deg); }
  50% { transform: rotate(0.8deg); }
}

@keyframes mouthA {
  0%, 100% { transform: translateY(0) scaleY(1); }
  50% { transform: translateY(2px) scaleY(1.4); }
}

@keyframes mouthE {
  0%, 100% { transform: translateY(0) scaleY(1) scaleX(1); }
  50% { transform: translateY(1px) scaleY(1.15) scaleX(1.2); }
}

@keyframes mouthI {
  0%, 100% { transform: translateY(0) scaleY(1) scaleX(1); }
  50% { transform: translateY(-1px) scaleY(0.9) scaleX(0.85); }
}

@keyframes mouthO {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(1px) scale(1.25); border-radius: 50%; }
}

@keyframes mouthU {
  0%, 100% { transform: translateY(0) scaleY(1) scaleX(1); }
  50% { transform: translateY(1px) scaleY(1.2) scaleX(0.7); }
}

@keyframes smileGreet {
  0% { transform: scale(1); }
  30% { transform: scale(1.03) translateY(-1px); }
  60% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

@keyframes waveLayer1 {
  0%, 100% { transform: scaleY(0.4); opacity: 0.6; }
  50% { transform: scaleY(1); opacity: 1; }
}

@keyframes waveLayer2 {
  0%, 100% { transform: scaleY(0.3); opacity: 0.5; }
  50% { transform: scaleY(0.85); opacity: 0.9; }
}

@keyframes waveLayer3 {
  0%, 100% { transform: scaleY(0.2); opacity: 0.4; }
  50% { transform: scaleY(0.7); opacity: 0.8; }
}

.avatar-wrap {
  --blink-delay: 0s;
  --head-tilt: 0deg;
}

.avatar-svg {
  animation: breathe 4s ease-in-out infinite, headTilt 6s ease-in-out infinite;
  transform-origin: center bottom;
}

.avatar-svg svg.svg-helena-face {
  transform-origin: center bottom;
  display: block;
}

.avatar-svg .eye-left,
.avatar-svg .eye-right {
  animation: blink 4s ease-in-out infinite;
  animation-delay: var(--blink-delay);
  transform-origin: center;
  transform-box: fill-box;
}

.avatar-svg .mouth {
  transform-origin: center;
  transform-box: fill-box;
}

.avatar-wrap.speaking .avatar-svg svg.svg-helena-face {
  animation: breathe 4s ease-in-out infinite, headTilt 1.5s ease-in-out infinite;
}

.avatar-wrap.speaking.mouth-phase-a .avatar-svg .mouth {
  animation: mouthA 120ms ease-in-out infinite;
}

.avatar-wrap.speaking.mouth-phase-e .avatar-svg .mouth {
  animation: mouthE 120ms ease-in-out infinite;
}

.avatar-wrap.speaking.mouth-phase-i .avatar-svg .mouth {
  animation: mouthI 120ms ease-in-out infinite;
}

.avatar-wrap.speaking.mouth-phase-o .avatar-svg .mouth {
  animation: mouthO 120ms ease-in-out infinite;
}

.avatar-wrap.speaking.mouth-phase-u .avatar-svg .mouth {
  animation: mouthU 120ms ease-in-out infinite;
}

.avatar-wrap.greeting .avatar-svg {
  animation: smileGreet 0.8s ease-out;
}

.waves {
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  width: 44px;
  height: 22px;
  pointer-events: none;
}

.waves span {
  display: block;
  width: 4px;
  background: var(--color-accent);
  border-radius: 4px;
  height: 6px;
  opacity: 0;
  transform-origin: bottom;
  transition: opacity 150ms ease;
}

.speaking .waves span {
  opacity: 1;
}

.speaking .waves span:nth-child(1) {
  animation: waveLayer1 0.9s ease-in-out infinite;
}

.speaking .waves span:nth-child(2) {
  animation: waveLayer2 1.1s ease-in-out infinite;
  animation-delay: 0.15s;
}

.speaking .waves span:nth-child(3) {
  animation: waveLayer3 1.3s ease-in-out infinite;
  animation-delay: 0.3s;
}

.speech-controls .icon-btn {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
}

.rate-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.rate-chip {
  padding: 6px 12px;
  border: 1px solid var(--color-border);
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-muted);
  background: var(--color-surface);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.rate-chip:hover {
  border-color: var(--color-accent);
  color: var(--color-text);
}

.rate-chip.chip-ativo {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(11, 37, 69, 0.2);
}

.rate-chip:focus-visible {
  outline: 3px solid #4C9AFF;
  outline-offset: 2px;
}

.onboarding-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 37, 69, 0.65);
  backdrop-filter: blur(8px);
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3);
  animation: toastIn 0.4s ease;
}

.onboarding-card {
  width: 100%;
  max-width: 420px;
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  padding: var(--space-5);
  text-align: center;
  animation: msgIn 0.5s ease;
}

.onboarding-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  margin: 0 auto var(--space-3);
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  box-shadow: var(--shadow-lg);
}

.onboarding-card h3 {
  font-size: 20px;
  margin-bottom: var(--space-2);
  color: var(--color-text);
}

.onboarding-card p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
}

.onboarding-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: var(--space-4);
}

.onboarding-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-border);
  transition: all var(--transition-base);
}

.onboarding-dot.active {
  width: 24px;
  border-radius: 4px;
  background: var(--color-primary);
}

@media (prefers-color-scheme: dark) {
  .onboarding-dot.active {
    background: var(--color-accent);
  }
}

.onboarding-actions {
  display: flex;
  gap: var(--space-2);
  justify-content: center;
}

.modal-avatar-help .modal {
  max-width: 480px;
}

.modal-avatar-help .modal-body {
  padding: var(--space-4);
}

.modal-avatar-help .help-grid {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: var(--space-3);
  align-items: start;
}

.modal-avatar-help .help-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: rgba(141, 169, 196, 0.15);
  color: var(--color-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

@media (prefers-color-scheme: dark) {
  .modal-avatar-help .help-icon {
    color: var(--color-accent);
  }
}

.modal-avatar-help .help-item h4 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--color-text);
}

.modal-avatar-help .help-item p {
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-text-muted);
}

:focus-visible {
  outline: 3px solid #4C9AFF;
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

button:focus-visible,
.rate-chip:focus-visible,
.onboarding-overlay button:focus-visible,
.modal-avatar-help button:focus-visible {
  outline: 3px solid #4C9AFF;
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

@media (prefers-reduced-motion: reduce) {
  .avatar-svg,
  .avatar-svg .eye-left,
  .avatar-svg .eye-right,
  .speaking .avatar-svg,
  .avatar-wrap.speaking.mouth-phase-a .avatar-svg .mouth,
  .avatar-wrap.speaking.mouth-phase-e .avatar-svg .mouth,
  .avatar-wrap.speaking.mouth-phase-i .avatar-svg .mouth,
  .avatar-wrap.speaking.mouth-phase-o .avatar-svg .mouth,
  .avatar-wrap.speaking.mouth-phase-u .avatar-svg .mouth,
  .avatar-wrap.greeting .avatar-svg,
  .speaking .waves span:nth-child(1),
  .speaking .waves span:nth-child(2),
  .speaking .waves span:nth-child(3) {
    animation: none !important;
  }

  .avatar-svg .eye-left,
  .avatar-svg .eye-right {
    animation: blink 8s ease-in-out 1 !important;
    animation-delay: var(--blink-delay) !important;
    transform-origin: center;
  }
}

/* HOTFIX ZOOM 200%: evita overflow horizontal em telas de baixa visão */
html {
  overflow-x: hidden;
  max-width: 100%;
}

main,
#conteudo-principal,
.slides-container,
.slides-viewport,
.slide,
.narrator-panel,
.sidebar {
  max-width: 100%;
  overflow-x: hidden;
}

.slide-tools,
.kpis-row,
.two-col,
.three-col {
  flex-wrap: wrap !important;
}

.panel,
canvas {
  max-width: 100% !important;
  width: 100% !important;
}
