:root {
  --green: #00b152;
  --green-d: #007c39;
  --green-l: #e6f7ee;
  --blue: #1e4d8f;
  --border: #e5e7eb;
  --bg: #f3f5f8;
  --surface: #fff;
  --text: #1c2733;
  --muted: #6b7280;
  --sidebar: 248px;
  --top: 58px;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(0, 0, 0, .06), 0 8px 24px rgba(30, 77, 143, .06);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: Inter, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

.ms {
  font-family: "Material Symbols Rounded";
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  vertical-align: middle;
  line-height: 1;
  font-size: 1.15em;
}

.shell {
  display: flex;
  height: 100dvh;
  overflow: hidden;
}

/* ── Sidebar painel ── */
.panel-side {
  width: var(--sidebar);
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 40;
  transition: transform .3s ease;
}

.panel-brand {
  padding: 1rem 1.1rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: .65rem;
}

.panel-brand__logos {
  display: flex;
  align-items: center;
  gap: .5rem;
}

.panel-brand__logos img {
  height: 36px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px 6px;
}

.panel-brand__title {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
}

.panel-brand__sub {
  font-size: .8rem;
  font-weight: 600;
  color: var(--blue);
}

.panel-nav {
  flex: 1;
  overflow-y: auto;
  padding: .65rem .5rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: .55rem;
  width: 100%;
  border: none;
  background: transparent;
  font: inherit;
  font-size: .8rem;
  font-weight: 500;
  color: var(--muted);
  text-align: left;
  padding: .55rem .7rem;
  border-radius: 10px;
  cursor: pointer;
  transition: background .15s, color .15s;
  margin-bottom: 2px;
}

.nav-item:hover {
  background: #f3f4f6;
  color: var(--text);
}

.nav-item.active {
  background: var(--green-l);
  color: var(--green-d);
  font-weight: 600;
}

.nav-item .ms {
  font-size: 1.1rem;
  opacity: .85;
}

.nav-item.active .ms {
  color: var(--green);
}

.panel-foot {
  padding: .75rem 1rem;
  border-top: 1px solid var(--border);
  font-size: .7rem;
  color: var(--muted);
}

.panel-progress {
  height: 4px;
  background: #e5e7eb;
  border-radius: 999px;
  margin-top: .4rem;
  overflow: hidden;
}

.panel-progress__bar {
  height: 100%;
  background: var(--green);
  border-radius: 999px;
  transition: width .35s ease;
}

/* ── Main ── */
.panel-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  position: relative;
}

.panel-top {
  height: var(--top);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 1rem;
  gap: .75rem;
  flex-shrink: 0;
}

.menu-btn {
  display: none;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}

.panel-top__title {
  font-size: .95rem;
  font-weight: 700;
  color: var(--text);
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.panel-top__badge {
  font-size: .68rem;
  font-weight: 600;
  padding: .25rem .55rem;
  border-radius: 6px;
  background: var(--green-l);
  color: var(--green-d);
}

.panel-top__actions {
  display: flex;
  gap: .4rem;
}

.btn-icon {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  transition: border-color .15s, color .15s;
}

.btn-icon:hover {
  border-color: var(--green);
  color: var(--green-d);
}

.btn-icon:disabled {
  opacity: .35;
  cursor: not-allowed;
}

.slides-wrap {
  flex: 1;
  position: relative;
  overflow: hidden;
  padding: clamp(.75rem, 2vw, 1.25rem);
}

.slides-track {
  position: relative;
  height: 100%;
  width: 100%;
}

.slide {
  position: absolute;
  inset: clamp(.75rem, 2vw, 1.25rem);
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity .35s ease, transform .35s ease, visibility .35s;
}

.slide.active {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.slide-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(1.1rem, 3vw, 1.75rem);
  min-height: 100%;
}

h1 {
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.1;
  color: var(--blue);
}

h2 {
  font-size: clamp(1.15rem, 3vw, 1.5rem);
  font-weight: 700;
  color: var(--text);
  margin-bottom: .35rem;
}

.lead {
  font-size: .92rem;
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 1.25rem;
  max-width: 62ch;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: .3rem .6rem;
  border-radius: 6px;
  margin-bottom: .75rem;
}

.tag--green {
  background: var(--green-l);
  color: var(--green-d);
}

.tag--red {
  background: #fef2f2;
  color: #b91c1c;
}

.tag--amber {
  background: #fffbeb;
  color: #b45309;
}

.tag--blue {
  background: #eff6ff;
  color: #1d4ed8;
}

/* Capa */
.cover {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: min(70vh, 520px);
  gap: 1.25rem;
}

.cover-logos {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1rem 1.5rem;
  background: #f9fafb;
  border: 1px solid var(--border);
  border-radius: 16px;
}

.cover-logos img {
  height: 56px;
  padding: 6px 10px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--border);
}

.cover-icons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.cover-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .35rem;
  padding: .75rem 1rem;
  background: #f9fafb;
  border-radius: 12px;
  border: 1px solid var(--border);
  min-width: 88px;
}

.cover-chip .ms {
  font-size: 1.5rem;
  color: var(--green);
}

.cover-chip span {
  font-size: .72rem;
  font-weight: 600;
  color: var(--muted);
}

/* KPI grid */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.1rem 1.2rem;
  background: #fafbfc;
}

.card--white {
  background: var(--surface);
}

.card__head {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: .85rem;
  padding-bottom: .65rem;
  border-bottom: 1px solid var(--border);
}

.card__icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card__icon--g1 {
  background: var(--green-l);
  color: var(--green-d);
}

.card__icon--g2 {
  background: #eff6ff;
  color: #1d4ed8;
}

.card__title {
  font-weight: 700;
  font-size: .95rem;
}

.card__sub {
  font-size: .72rem;
  color: var(--muted);
}

.metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .6rem;
  margin-bottom: .75rem;
}

.metric {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: .65rem .75rem;
}

.metric__lbl {
  font-size: .65rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
}

.metric__val {
  font-size: 1.25rem;
  font-weight: 800;
  margin-top: .1rem;
  color: var(--blue);
}

.metric__val small {
  font-size: .55em;
  font-weight: 600;
  color: var(--muted);
}

.bar {
  margin-top: .5rem;
}

.bar__lbl {
  display: flex;
  justify-content: space-between;
  font-size: .7rem;
  color: var(--muted);
  margin-bottom: .3rem;
}

.bar__track {
  height: 8px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
}

.bar__fill {
  height: 100%;
  border-radius: 999px;
  transition: width .8s ease;
}

.bar__fill--g1 {
  background: linear-gradient(90deg, var(--green-d), var(--green));
}

.bar__fill--g2 {
  background: linear-gradient(90deg, #1d4ed8, #60a5fa);
}

.highlight-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: .4rem;
  margin-top: .65rem;
  padding: .6rem .75rem;
  background: var(--green-l);
  border-radius: 10px;
  border: 1px solid rgba(0, 177, 82, .15);
}

.highlight-row--blue {
  background: #eff6ff;
  border-color: rgba(29, 78, 216, .12);
}

.highlight-row__val {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--green-d);
}

.highlight-row--blue .highlight-row__val {
  color: #1d4ed8;
}

.highlight-row__lbl {
  font-size: .75rem;
  color: var(--muted);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: .85rem;
}

.info-card {
  padding: 1rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
}

.info-card .ms {
  font-size: 1.4rem;
  margin-bottom: .5rem;
  display: block;
}

.info-card--red .ms {
  color: #dc2626;
}

.info-card--green .ms {
  color: var(--green);
}

.info-card--amber .ms {
  color: #d97706;
}

.info-card--blue .ms {
  color: #2563eb;
}

.info-card h3 {
  font-size: .88rem;
  font-weight: 700;
  margin-bottom: .4rem;
}

.info-card p,
.info-card li {
  font-size: .82rem;
  color: var(--muted);
  line-height: 1.5;
}

.info-card ul {
  padding-left: 1rem;
  margin-top: .35rem;
}

.stat-pills {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: .75rem 0;
}

.stat-pill {
  flex: 1;
  min-width: 100px;
  text-align: center;
  padding: .75rem .5rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
}

.stat-pill__v {
  font-size: 1.2rem;
  font-weight: 800;
}

.stat-pill__v.red {
  color: #dc2626;
}

.stat-pill__v.green {
  color: var(--green-d);
}

.stat-pill__v.gold {
  color: #b45309;
}

.stat-pill__l {
  font-size: .65rem;
  color: var(--muted);
  text-transform: uppercase;
  margin-top: .15rem;
}

.timeline {
  margin-top: .75rem;
  border-left: 2px solid var(--border);
  padding-left: 1.1rem;
}

.tl {
  position: relative;
  margin-bottom: .85rem;
}

.tl::before {
  content: "";
  position: absolute;
  left: -1.35rem;
  top: .35rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  border: 2px solid var(--surface);
  box-shadow: 0 0 0 1px var(--border);
}

.tl--bad::before {
  background: #dc2626;
}

.tl--good::before {
  background: var(--green);
  box-shadow: 0 0 0 2px var(--green-l);
}

.tl strong {
  font-size: .85rem;
  display: block;
}

.tl p {
  font-size: .8rem;
  color: var(--muted);
  margin-top: .15rem;
}

.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .35);
  z-index: 35;
}

/* Tabelas de dados */
.data-table-wrap {
  overflow-x: auto;
  margin: .75rem 0 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .72rem;
}

.data-table th,
.data-table td {
  padding: .5rem .6rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.data-table th {
  background: #f9fafb;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  font-size: .65rem;
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table td.num {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.data-table .hl {
  background: var(--green-l);
  font-weight: 700;
}

.data-table .warn {
  background: #fffbeb;
}

.data-note {
  font-size: .72rem;
  color: var(--muted);
  line-height: 1.5;
  margin-top: .5rem;
  padding: .55rem .7rem;
  background: #f9fafb;
  border-radius: 8px;
  border-left: 3px solid var(--green);
}

/* Comparativo maio × junho */
.compare-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: .75rem;
  align-items: center;
  margin: .75rem 0;
}

.compare-box {
  text-align: center;
  padding: 1rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fafbfc;
}

.compare-box--now {
  background: var(--green-l);
  border-color: rgba(0, 177, 82, .2);
}

.compare-box__lbl {
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
  margin-bottom: .25rem;
}

.compare-box__val {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--blue);
}

.compare-box--now .compare-box__val {
  color: var(--green-d);
}

.compare-arrow {
  font-size: 1.5rem;
  color: var(--green);
}

/* Fluxo / arquitetura */
.flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  margin: 1rem 0;
}

.flow__node {
  padding: .65rem .85rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: .75rem;
  font-weight: 600;
  text-align: center;
  min-width: 100px;
}

.flow__node--main {
  background: var(--green-l);
  border-color: rgba(0, 177, 82, .25);
  color: var(--green-d);
}

.flow__node--alt {
  background: #eff6ff;
  border-color: rgba(29, 78, 216, .2);
  color: #1d4ed8;
}

.flow__node--risk {
  background: #fef2f2;
  border-color: rgba(220, 38, 38, .2);
  color: #b91c1c;
}

.flow__arrow {
  color: var(--muted);
  font-size: 1.1rem;
}

.exec-list {
  list-style: none;
  margin: .5rem 0;
}

.exec-list li {
  display: flex;
  gap: .5rem;
  align-items: flex-start;
  font-size: .82rem;
  color: var(--text);
  padding: .45rem 0;
  border-bottom: 1px solid #f3f4f6;
  line-height: 1.45;
}

.exec-list li .ms {
  color: var(--green);
  flex-shrink: 0;
  font-size: 1rem;
}

@media (max-width: 860px) {
  .panel-side {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    transform: translateX(-100%);
    box-shadow: var(--shadow);
  }

  .panel-side.open {
    transform: translateX(0);
  }

  .overlay.open {
    display: block;
  }

  .menu-btn {
    display: flex;
  }

  .compare-row {
    grid-template-columns: 1fr;
  }

  .compare-arrow {
    transform: rotate(90deg);
    text-align: center;
  }
}
