:root {
  --blue-600: #2f6fd6;
  --blue-500: #4a86e8;
  --blue-400: #6ea3ef;
  --blue-700: #2557ad;
  --text-dark: #2b2f36;
  --text-muted: #6b7280;
  --border: #e5e8ec;
  --bg: #f4f6f9;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text-dark);
  background: #ffffff;
}

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

/* ---------- Top bar ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  border-bottom: 1px solid var(--border);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.hamburger {
  padding: 4px;
  display: flex;
  align-items: center;
}

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

.brand-logo {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  background: linear-gradient(135deg, #3fae4c, #2d8a3e);
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-logo.small { width: 22px; height: 22px; font-size: 12px; }

.brand-title {
  font-size: 13.5px;
  color: #444;
  font-weight: 500;
}

.topbar-links {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 13px;
  color: #3a3a3a;
}

.topbar-links a:hover { color: var(--blue-600); }

.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 14px;
  border-left: 1px solid var(--border);
  font-weight: 500;
}

.user-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #dbe6f7;
  display: inline-block;
}

.notif-bell-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  color: #333;
}

.notif-badge {
  position: absolute;
  top: -3px;
  right: -4px;
  background: #d9534f;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  line-height: 1;
}

.user-chip-wrap {
  position: relative;
}

.user-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 170px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  flex-direction: column;
  padding: 6px;
  z-index: 50;
}

.user-menu.show { display: flex; }

.user-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  font-size: 13px;
  color: #333;
  border-radius: 6px;
}

.user-menu-item svg { flex: 0 0 auto; color: #8a94a3; }

.user-menu-item:hover svg { color: var(--blue-600); }

.user-menu-divider {
  height: 1px;
  background: var(--border);
  margin: 6px 4px;
}

.user-menu-item:hover {
  background: var(--bg);
  color: var(--blue-600);
}

/* ---------- Subheader ---------- */
.subheader {
  padding: 10px 24px 6px;
}

.subheader h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
}

.subheader p {
  margin: 2px 0 0;
  font-size: 12.5px;
  color: var(--text-muted);
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(120deg, var(--blue-700), var(--blue-500) 60%, var(--blue-400));
  min-height: 160px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 20px 24px;
  margin-top: 10px;
  text-align: center;
}

.hero h2 {
  color: #fff;
  font-size: 26px;
  font-weight: 700;
  margin: 0;
}

.hero p {
  color: #eaf1fc;
  font-size: 13.5px;
  line-height: 1.55;
  max-width: 640px;
  margin: 0;
}

/* ---------- Quick access ---------- */
.quick-access {
  padding: 22px 24px 10px;
}

.quick-access h3 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 600;
}

.quick-access-lead {
  margin: 0 0 14px;
  font-size: 12.5px;
  color: var(--text-muted);
}

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

.carousel-arrow {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-arrow:hover { background: var(--bg); }

.carousel-track {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-behavior: smooth;
  flex: 1;
  padding: 2px;
  scrollbar-width: none;
}

.carousel-track::-webkit-scrollbar { display: none; }

.card {
  flex: 0 0 auto;
  min-width: 190px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: box-shadow .15s ease, border-color .15s ease;
}

.card:hover {
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  border-color: #d3dbe6;
}

.card-icon {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.card-icon.blue { background: var(--blue-500); }

.card-title {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-dark);
  white-space: nowrap;
}

.card-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
}

.dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 14px;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #cfd6de;
}

.dot.active { background: var(--blue-600); }

/* ---------- Reform section ---------- */
.reform {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 60px;
  padding: 40px 24px 60px;
  flex-wrap: wrap;
}

.reform-text {
  max-width: 460px;
}

.reform-text h2 {
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 12px;
  color: var(--text-dark);
}

.reform-text p {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0 0 10px;
}

.reform-text p.bold {
  font-weight: 700;
  color: var(--text-dark);
}

/* ---------- Sidebar overlay ---------- */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 24, 30, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
  z-index: 40;
}

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

/* ---------- Sidebar ---------- */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 300px;
  background: #fff;
  box-shadow: 2px 0 18px rgba(0,0,0,0.12);
  transform: translateX(-100%);
  transition: transform .25s ease;
  z-index: 50;
  display: flex;
  flex-direction: column;
  padding: 18px 0 0;
}

.sidebar.open { transform: translateX(0); }

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px 16px;
  border-bottom: 1px solid var(--border);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 16px;
}

.sidebar-close { padding: 4px; }

.sidebar-nav {
  display: flex;
  flex-direction: column;
  padding: 8px 0;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 11px 18px;
  font-size: 13.5px;
  color: #333;
  text-align: left;
}

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

.nav-item.active {
  background: #eaf1fc;
  color: var(--blue-600);
  font-weight: 600;
}

.nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blue-500);
  flex: 0 0 auto;
}

.nav-item.active .nav-icon { color: var(--blue-600); }

.nav-item.dropdown { position: relative; }

.chevron {
  margin-left: auto;
  color: #9aa3af;
  flex: 0 0 auto;
  transition: transform 0.2s ease;
}

.nav-submenu {
  display: flex;
  flex-direction: column;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.2s ease;
}

.nav-item.dropdown.expanded + .nav-submenu {
  max-height: 200px;
}

.nav-subitem {
  padding: 9px 18px 9px 46px;
  font-size: 13px;
  color: #555;
}

.nav-subitem:hover {
  background: var(--bg);
  color: var(--blue-600);
}

.nav-subitem.active {
  background: #eaf1fc;
  color: var(--blue-600);
  font-weight: 600;
}

/* ---------- Static content pages ---------- */
.page-main {
  padding: 20px 24px 60px;
  max-width: 780px;
  margin: 0 auto;
}

.breadcrumb {
  font-size: 12.5px;
  color: #888;
  margin-bottom: 10px;
}

.breadcrumb a { color: var(--blue-600); }

.page-main h1 {
  font-size: 24px;
  margin: 0 0 6px;
}

.page-main .page-lead {
  font-size: 14px;
  color: #555;
  margin: 0 0 28px;
}

.page-main section {
  margin-bottom: 28px;
}

.page-main h2 {
  font-size: 17px;
  margin: 0 0 10px;
  color: #1c2b3a;
}

.page-main h3 {
  font-size: 14.5px;
  margin: 16px 0 6px;
  color: #2a3947;
}

.page-main p {
  font-size: 13.5px;
  line-height: 1.65;
  color: #3a3a3a;
  margin: 0 0 10px;
}

.page-main ol,
.page-main ul {
  margin: 0 0 10px;
  padding-left: 20px;
}

.page-main li {
  font-size: 13.5px;
  line-height: 1.65;
  color: #3a3a3a;
  margin-bottom: 6px;
}

.info-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 24px;
  font-size: 13px;
  color: #444;
}

.info-box strong { color: #1c2b3a; }

.page-quicknav {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 0 0 28px;
  padding: 14px 18px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.page-quicknav li {
  font-size: 13px;
  position: relative;
  padding-left: 14px;
}

.page-quicknav li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: #9aa3af;
}

.page-quicknav a { color: var(--blue-600); }

.page-quicknav a:hover { text-decoration: underline; }

.page-quicknav .current {
  color: #3a3a3a;
  font-weight: 600;
}

.source-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--blue-600);
  margin-top: 6px;
}

.sidebar-footer {
  padding: 14px 18px;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.footer-link {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--blue-600);
  padding: 6px 0;
}

.social { margin-top: 10px; }

.social-title {
  font-size: 12px;
  color: var(--text-muted);
  display: block;
  margin-bottom: 8px;
}

.social-icons {
  display: flex;
  gap: 14px;
  color: #444;
}

.sidebar-version {
  font-size: 10.5px;
  color: #b0b6bd;
  text-align: center;
  padding: 8px 0 14px;
}

/* ---------- Dashboard 1 (replica) ---------- */
.dashboard-page-main {
  padding: 20px 24px;
  min-height: calc(100vh - 60px);
  display: flex;
  flex-direction: column;
}

.dashboard-replica {
  --td-blue-900: #1f3c6e;
  --td-blue-700: #2f6fed;
  --td-blue-100: #e8f0fd;
  --td-text-h: #1b2733;
  --td-text: #52606d;
  --td-border: #dfe6f0;
  --td-card-bg: #ffffff;
  --td-success: #1f9d55;
  --td3-accent: #e0662b;
  display: flex;
  flex: 1;
  width: 100%;
  border: 1px solid var(--td-border);
  border-radius: 12px;
  overflow: hidden;
  background: #f2f5fa;
}

.td-content {
  flex: 1;
  width: 100%;
  padding: 20px;
  overflow: auto;
  display: flex;
  flex-direction: column;
}

.td-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto 1fr 1fr;
  gap: 16px;
  flex: 1;
}

.td-shortcuts {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.td-shortcut-card {
  background: var(--td-card-bg);
  border: 1px solid var(--td-border);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.td-shortcut-icon { font-size: 20px; margin-bottom: 2px; }

.td-shortcut-card h3 { font-size: 13.5px; margin: 0; color: var(--td-text-h); }

.td-shortcut-card p { font-size: 12px; color: var(--td-text); margin: 0 0 8px; }

.td-btn {
  align-self: flex-start;
  background: var(--td-blue-700);
  color: #fff;
  border-radius: 8px;
  padding: 7px 13px;
  font-size: 12.5px;
  font-weight: 600;
}

.td-btn:hover { background: var(--td-blue-900); }

.td-btn-block { width: 100%; text-align: center; }

.td-panel {
  background: var(--td-card-bg);
  border: 1px solid var(--td-border);
  border-radius: 12px;
  padding: 16px;
}

.td-panel h4 { font-size: 13.5px; margin: 0 0 14px; color: var(--td-text-h); }

.td-indicadores-panel { grid-column: span 2; }

.td-indicadores-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.td-indicador { display: flex; flex-direction: column; gap: 6px; }

.td-indicador-label { font-size: 12px; color: var(--td-text); }

.td-indicador-value-row { display: flex; align-items: baseline; gap: 8px; }

.td-indicador-value { font-size: 20px; font-weight: 700; color: var(--td-text-h); }

.td-indicador-change { font-size: 12px; font-weight: 600; color: #d9822b; }

.td-progress-track {
  height: 6px;
  border-radius: 4px;
  background: #e7edf5;
  overflow: hidden;
}

.td-progress-fill { height: 100%; background: var(--td-blue-700); border-radius: 4px; }

.td-tempo-resposta {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
  color: var(--td-text-h);
  border-top: 1px solid var(--td-border);
  padding-top: 12px;
}

.td-analises-panel { display: flex; flex-direction: column; }

.td-analises-list {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.td-analises-list li { display: flex; align-items: center; gap: 10px; font-size: 13px; }

.td-analises-list .td-check { color: var(--td-success); }

.td-analise-titulo { font-weight: 600; color: var(--td-text-h); }

.td-analise-data { font-size: 11px; color: var(--td-text); }

.td-analises-list .td-chevron { margin-left: auto; color: var(--td-text); }

.td-mapa-panel { grid-column: span 2; }

.td-mapa-mock {
  position: relative;
  height: 190px;
  border-radius: 10px;
  background:
    repeating-linear-gradient(0deg, #eef2f8, #eef2f8 18px, #e4eaf3 19px),
    repeating-linear-gradient(90deg, #eef2f8, #eef2f8 18px, #e4eaf3 19px);
  overflow: hidden;
}

.td-mapa-pin { position: absolute; transform: translate(-50%, -100%); font-size: 18px; }

.td-tendencia-panel { grid-column: span 1; }

@media (max-width: 900px) {
  .td-grid, .td-shortcuts, .td-indicadores-row { grid-template-columns: 1fr; }
  .td-indicadores-panel, .td-mapa-panel, .td-tendencia-panel { grid-column: 1; }
}

/* ---------- Dashboard 2 (vigilância de causas externas) ---------- */
.td3-layout {
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
}

.td3-note {
  font-size: 12.5px;
  color: var(--td-text);
}

.td3-kpi-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}

.td3-kpi-card {
  position: relative;
  background: var(--td-card-bg);
  border: 1px solid var(--td-border);
  border-top: 3px solid var(--td3-accent);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.td3-kpi-value { font-size: 22px; font-weight: 700; color: var(--td-text-h); }

.td3-kpi-label { font-size: 11.5px; color: var(--td-text); line-height: 1.35; }

.td3-kpi-source {
  position: absolute;
  top: 8px;
  right: 10px;
  font-size: 9px;
  font-weight: 700;
  color: var(--td3-accent);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.td3-trend-panel {
  background: var(--td-card-bg);
  border: 1px solid var(--td-border);
  border-radius: 12px;
  padding: 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.td3-trend-panel h4 { font-size: 13.5px; margin: 0 0 4px; color: var(--td-text-h); }

.td3-panel-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.td3-panel {
  background: var(--td-card-bg);
  border: 1px solid var(--td-border);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.td3-panel h4 { font-size: 13.5px; margin: 0; color: var(--td-text-h); }

.td3-hbar-row { display: flex; align-items: center; gap: 8px; font-size: 12px; }

.td3-hbar-label { flex: 0 0 84px; color: var(--td-text); }

.td3-hbar-track {
  flex: 1;
  height: 8px;
  border-radius: 4px;
  background: #eef1f6;
  overflow: hidden;
}

.td3-hbar-fill { height: 100%; border-radius: 4px; }

.td3-hbar-fill.orange { background: var(--td3-accent); }

.td3-hbar-fill.blue { background: var(--td-blue-700); }

.td3-hbar-value { flex: 0 0 32px; text-align: right; font-weight: 600; color: var(--td-text-h); }

@media (max-width: 900px) {
  .td3-kpi-strip { grid-template-columns: repeat(2, 1fr); }
  .td3-panel-row { grid-template-columns: 1fr; }
}

/* ---------- Monitoramento (Consulta / Reprocessamento / Infraestrutura) ---------- */
.mon-page-header { margin-bottom: 4px; }

.mon-page-header h1 { font-size: 22px; margin: 0 0 4px; color: var(--text-dark); }

.mon-page-header p { font-size: 13px; color: var(--text-muted); margin: 0; }

.mon-shell {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.mon-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: flex-end;
  justify-content: space-between;
}

.mon-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }

.mon-filter { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--text-muted); }

.mon-filter select,
.mon-filter input {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 13px;
  color: var(--text-dark);
  background: #fff;
  min-width: 140px;
}

.mon-actions { display: flex; gap: 8px; }

.mon-btn {
  background: var(--blue-600);
  color: #fff;
  border-radius: 8px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 600;
}

.mon-btn:hover { background: var(--blue-700); }

.mon-btn-ghost {
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text-dark);
  border-radius: 8px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 600;
}

.mon-btn-ghost:hover { background: var(--bg); }

.mon-section-title { font-size: 14px; font-weight: 600; margin: 0 0 12px; color: var(--text-dark); }

.mon-table-wrap { overflow-x: auto; }

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

.mon-table th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.mon-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text-dark);
  white-space: nowrap;
}

.mon-table tr:hover td { background: var(--bg); }

.mon-table a { color: var(--blue-600); font-weight: 600; }

.mon-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
}

.mon-status .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: 0 0 auto; }

.mon-status.ok { background: #e5f6ea; color: #1f9d55; }

.mon-status.warn { background: #fff3e0; color: #c9740b; }

.mon-status.error { background: #fde8e8; color: #c93b3b; }

.mon-status.pending { background: #eef1f6; color: #5b6470; }

.mon-infra-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
}

.mon-infra-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mon-infra-name { font-size: 13px; font-weight: 600; color: var(--text-dark); }

.mon-infra-meta { font-size: 11.5px; color: var(--text-muted); }

.mon-log-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }

.mon-log-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 12.5px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--bg);
  color: var(--text-dark);
}

.mon-log-time { flex: 0 0 68px; color: var(--text-muted); font-variant-numeric: tabular-nums; }

/* ---------- Reclassificação ---------- */
.recl-page-header { text-align: center; margin-bottom: 4px; }

.recl-page-header h1 { font-size: 26px; margin: 0 0 4px; color: var(--text-dark); }

.recl-page-header p { font-size: 14px; color: var(--text-muted); margin: 0; }

.recl-shell {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.recl-toolbar {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.recl-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  border-radius: 6px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}

.recl-btn-filter { background: var(--blue-600); }
.recl-btn-filter:hover { background: var(--blue-700); }

.recl-btn-apply { background: #2fa84f; }
.recl-btn-apply:hover { background: #268a41; }

.recl-btn-clear { background: #6b7280; }
.recl-btn-clear:hover { background: #565e69; }

.recl-btn-export { background: #17a2b8; }
.recl-btn-export:hover { background: #148a9c; }

.recl-filters {
  display: none;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.recl-filters.show { display: flex; }

.recl-filter { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--text-muted); }

.recl-filter select,
.recl-filter input {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 13px;
  color: var(--text-dark);
  background: #fff;
  min-width: 150px;
}

.recl-table-wrap { overflow-x: auto; }

.recl-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }

.recl-table th {
  text-align: left;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-dark);
  padding: 10px 12px;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}

.recl-table th:hover { background: var(--bg); }

.recl-table th .sort-arrows {
  display: inline-flex;
  flex-direction: column;
  margin-left: 4px;
  font-size: 8px;
  line-height: 8px;
  color: #b7bdc6;
  vertical-align: middle;
}

.recl-table th.sort-asc .sort-arrows .arrow-up,
.recl-table th.sort-desc .sort-arrows .arrow-down {
  color: var(--blue-600);
}

.recl-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text-dark);
  white-space: nowrap;
}

.recl-table tr:hover td { background: var(--bg); }

.recl-badge {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 4px;
  color: #fff;
}

.recl-badge.status-revisado { background: #e8a33d; }
.recl-badge.status-pendente { background: #8a94a3; }
.recl-badge.sim { background: #2fa84f; }
.recl-badge.nao { background: #d9534f; }

.recl-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: #2fa84f;
  border-radius: 6px;
  color: #fff;
}

.recl-action-btn:hover { background: #268a41; }

.recl-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: var(--text-muted);
}

.recl-pagination .recl-pp-select { display: flex; align-items: center; gap: 6px; }

.recl-pagination select,
.recl-pagination input[type="number"] {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 8px;
  font-size: 13px;
  color: var(--text-dark);
}

.recl-pagination input[type="number"] { width: 56px; }

.recl-page-controls { display: flex; align-items: center; gap: 4px; }

.recl-page-btn {
  min-width: 30px;
  height: 30px;
  padding: 0 6px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--blue-600);
  font-weight: 600;
}

.recl-page-btn:hover { background: var(--bg); }

.recl-page-btn.active { background: var(--blue-600); color: #fff; }

.recl-page-btn:disabled { color: #c3c8ce; cursor: default; }

.recl-page-btn:disabled:hover { background: none; }

/* ---------- Ontologizador SINAN ---------- */
.onto-shell {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.onto-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.onto-stat-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.onto-stat-value { font-size: 24px; font-weight: 700; color: var(--text-dark); }

.onto-stat-value.pending { color: #8a94a3; }
.onto-stat-value.ok { color: #1f9d55; }
.onto-stat-value.error { color: #d9534f; }
.onto-stat-value.model { color: var(--blue-600); }

.onto-stat-label { font-size: 11.5px; color: var(--text-muted); }

.onto-test-panel {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  background: var(--bg);
}

.onto-test-panel h2 { font-size: 14px; margin: 0 0 4px; color: var(--text-dark); }

.onto-test-panel .onto-hint { font-size: 12.5px; color: var(--text-muted); margin: 0 0 12px; }

.onto-test-row { display: flex; gap: 10px; }

.onto-test-row textarea {
  flex: 1;
  resize: vertical;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13.5px;
  font-family: inherit;
  color: var(--text-dark);
  background: #fff;
}

.onto-btn {
  align-self: flex-start;
  background: var(--blue-600);
  color: #fff;
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.onto-btn:hover { background: var(--blue-700); }

.onto-suggestions { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }

.onto-suggestion-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
}

.onto-suggestion-rank {
  flex: 0 0 20px;
  font-weight: 700;
  color: var(--text-muted);
}

.onto-suggestion-main { flex: 0 0 220px; }

.onto-suggestion-term { font-weight: 600; color: var(--text-dark); }

.onto-suggestion-code { font-size: 11.5px; color: var(--text-muted); }

.onto-confidence-track {
  flex: 1;
  height: 8px;
  border-radius: 4px;
  background: #eef1f6;
  overflow: hidden;
}

.onto-confidence-fill { height: 100%; border-radius: 4px; background: var(--blue-600); }

.onto-confidence-value { flex: 0 0 42px; text-align: right; font-weight: 600; color: var(--text-dark); }

.onto-use-btn {
  flex: 0 0 auto;
  background: #fff;
  border: 1px solid var(--blue-600);
  color: var(--blue-600);
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
}

.onto-use-btn:hover { background: var(--blue-100, #eaf1fc); }

.onto-section-title { font-size: 14px; font-weight: 600; margin: 0 0 12px; color: var(--text-dark); }

.onto-table-wrap { overflow-x: auto; }

.onto-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }

.onto-table th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

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

.onto-table tr:hover td { background: var(--bg); }

.onto-term-original { color: var(--text-muted); font-style: italic; }

.onto-term-suggested { font-weight: 600; }

.onto-term-code { font-size: 11px; color: var(--text-muted); }

.onto-conf-cell { display: flex; align-items: center; gap: 8px; min-width: 110px; }

.onto-conf-cell .onto-confidence-track { width: 60px; flex: 0 0 60px; }

.onto-row-actions { display: flex; gap: 6px; }

.onto-icon-btn {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  color: #fff;
}

.onto-icon-btn.accept { background: #2fa84f; }
.onto-icon-btn.accept:hover { background: #268a41; }

.onto-icon-btn.reject { background: #d9534f; }
.onto-icon-btn.reject:hover { background: #c1433f; }

.onto-icon-btn:disabled { background: #d5d9de; cursor: default; }

@media (max-width: 900px) {
  .onto-stats-row { grid-template-columns: repeat(2, 1fr); }
  .onto-suggestion-main { flex-basis: 160px; }
}

/* ---------- Documentação Técnica ---------- */
.tech-text h2 { font-size: 16px; margin: 0 0 8px; color: var(--text-dark); }

.tech-text p { font-size: 13px; line-height: 1.65; color: #3a3a3a; margin: 0 0 14px; }

.tech-text ul,
.tech-text ol { margin: 0 0 14px; padding-left: 20px; }

.tech-text li { font-size: 13px; line-height: 1.65; color: #3a3a3a; margin-bottom: 6px; }

.tech-section + .tech-section { margin-top: 4px; }

/* ---------- Perfil / Configurações ---------- */
.prof-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
}

.prof-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #dbe6f7;
  flex: 0 0 auto;
}

.prof-card-name { font-size: 17px; font-weight: 700; color: var(--text-dark); }

.prof-card-role { font-size: 13px; color: var(--text-muted); margin-top: 2px; }

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.form-group { display: flex; flex-direction: column; gap: 6px; }

.form-group.full { grid-column: 1 / -1; }

.form-group label { font-size: 12.5px; font-weight: 600; color: var(--text-muted); }

.form-group input,
.form-group select {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13.5px;
  color: var(--text-dark);
  background: #fff;
}

.form-group input:disabled { background: var(--bg); color: var(--text-muted); }

.form-actions { display: flex; gap: 10px; margin-top: 4px; }

.settings-section {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
}

.settings-section h2 { font-size: 15px; margin: 0 0 4px; color: var(--text-dark); }

.settings-section .settings-desc { font-size: 12.5px; color: var(--text-muted); margin: 0 0 16px; }

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
}

.settings-row:first-of-type { border-top: none; padding-top: 0; }

.settings-row-label { font-size: 13.5px; font-weight: 600; color: var(--text-dark); }

.settings-row-desc { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  flex: 0 0 auto;
}

.toggle-switch input { opacity: 0; width: 0; height: 0; }

.toggle-slider {
  position: absolute;
  inset: 0;
  background: #d5d9de;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.toggle-slider::before {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.15s ease;
}

.toggle-switch input:checked + .toggle-slider { background: var(--blue-600); }

.toggle-switch input:checked + .toggle-slider::before { transform: translateX(18px); }

@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; }
}

/* ---------- Notificações ---------- */
.notif-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.notif-toolbar-desc { font-size: 12.5px; color: var(--text-muted); }

.notif-list { display: flex; flex-direction: column; gap: 2px; }

.notif-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 12px;
  border-radius: 8px;
  border-bottom: 1px solid var(--border);
}

.notif-item:last-child { border-bottom: none; }

.notif-item.unread { background: var(--bg); }

.notif-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.notif-icon.info { background: #e8f0fd; color: var(--blue-600); }
.notif-icon.warn { background: #fff3e0; color: #c9740b; }
.notif-icon.error { background: #fde8e8; color: #d9534f; }
.notif-icon.ok { background: #e5f6ea; color: #1f9d55; }

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

.notif-title { font-size: 13.5px; font-weight: 600; color: var(--text-dark); }

.notif-desc { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; line-height: 1.5; }

.notif-time { font-size: 11px; color: var(--text-muted); margin-top: 6px; }

.notif-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue-600);
  flex: 0 0 auto;
  margin-top: 6px;
}

.notif-bell-wrap { position: relative; }

.notif-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: -6px;
  width: 320px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  flex-direction: column;
  z-index: 50;
  overflow: hidden;
}

.notif-dropdown.show { display: flex; }

.notif-dd-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-dark);
}

.notif-dd-count { font-size: 11.5px; font-weight: 600; color: var(--text-muted); }

.notif-dd-list { display: flex; flex-direction: column; max-height: 320px; overflow-y: auto; }

.notif-dd-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  color: inherit;
}

.notif-dd-item:last-child { border-bottom: none; }

.notif-dd-item:hover { background: var(--bg); }

.notif-dd-item.unread { background: #f7faff; }

.notif-icon.small { width: 26px; height: 26px; }

.notif-dd-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.notif-dd-title { font-size: 12.5px; font-weight: 600; color: var(--text-dark); }

.notif-dd-time { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

.notif-dd-footer {
  display: block;
  text-align: center;
  padding: 10px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--blue-600);
  border-top: 1px solid var(--border);
}

.notif-dd-footer:hover { background: var(--bg); }

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .topbar-links { display: none; }
  .reform { flex-direction: column; text-align: center; gap: 24px; }
  .sidebar { width: 82vw; }
}
