/* ═══════════════════════════════════════════════════════════════════
   ANÁLISE DE OM · COMANDO 2028 — Premium Dark Dashboard
   ═══════════════════════════════════════════════════════════════════ */

/* ─── Variables ─────────────────────────────────────────────────── */
:root {
  --bg:     #0B1020;
  --panel:  #121826;
  --panel2: #182235;
  --brd:    #1E2D45;
  --brd2:   #253652;
  --txt:    #E6EDF7;
  --muted:  #94A3B8;
  --dim:    #475569;
  --blue:   #3B82F6;
  --cyan:   #22D3EE;
  --green:  #22C55E;
  --amber:  #F59E0B;
  --red:    #EF4444;
  --header-h: 64px;
  --modal-w: 520px;
}

/* ─── Reset & Base ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 15px; }

body {
  background: var(--bg);
  color: var(--txt);
  font-family: 'Inter', system-ui, sans-serif;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ─── Scrollbar ──────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--brd2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--dim); }

/* ─── Container ──────────────────────────────────────────────────── */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.75rem;
}

/* ════════════════════════════════════════════════════════════════════
   LOADING SCREEN
   ════════════════════════════════════════════════════════════════════ */
#loading-screen {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity .4s ease;
}

.loading-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .75rem;
}

.loading-logo {
  animation: pulse-scale 2s ease-in-out infinite;
  margin-bottom: .5rem;
}
.loading-logo svg { filter: drop-shadow(0 0 20px rgba(59,130,246,.5)); }

.loading-title {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: .15em;
  color: var(--txt);
}

.loading-sub {
  font-size: .8rem;
  color: var(--muted);
  letter-spacing: .04em;
}

.loading-progress {
  width: 220px;
  height: 3px;
  background: var(--brd);
  border-radius: 2px;
  overflow: hidden;
  margin-top: .75rem;
}

.loading-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  border-radius: 2px;
  width: 0;
  animation: loading-fill 1.6s ease-out forwards;
}

.loading-status {
  font-size: .75rem;
  color: var(--dim);
  margin-top: .25rem;
}

@keyframes loading-fill {
  0%   { width: 0 }
  40%  { width: 55% }
  80%  { width: 82% }
  100% { width: 92% }
}
@keyframes pulse-scale {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.08); }
}

/* ════════════════════════════════════════════════════════════════════
   HEADER
   ════════════════════════════════════════════════════════════════════ */
#site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(11, 16, 32, .88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--brd);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.75rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: .875rem;
  flex-shrink: 0;
}

.brand-star {
  width: 36px;
  height: 36px;
  background: rgba(59,130,246,.12);
  border: 1px solid rgba(59,130,246,.25);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand-name {
  font-size: .875rem;
  font-weight: 800;
  letter-spacing: .1em;
  color: var(--txt);
}

.brand-sub {
  font-size: .7rem;
  color: var(--dim);
  letter-spacing: .02em;
  margin-top: 1px;
}

.header-search {
  position: relative;
  flex: 1;
  max-width: 380px;
}

.search-icon {
  position: absolute;
  left: .875rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

#global-search {
  width: 100%;
  height: 38px;
  background: var(--panel2);
  border: 1px solid var(--brd);
  border-radius: 10px;
  padding: 0 1rem 0 2.5rem;
  font-family: inherit;
  font-size: .82rem;
  color: var(--txt);
  outline: none;
  transition: border-color .2s, background .2s;
}
#global-search::placeholder { color: var(--dim); }
#global-search:focus {
  border-color: rgba(59,130,246,.5);
  background: rgba(24,34,53,.8);
  box-shadow: 0 0 0 3px rgba(59,130,246,.08);
}

/* ════════════════════════════════════════════════════════════════════
   BANNER BAR
   ════════════════════════════════════════════════════════════════════ */
.banner-bar {
  display: flex;
  align-items: center;
  gap: .875rem;
  padding: .55rem 1.75rem;
  background: rgba(18,24,38,.7);
  border-bottom: 1px solid var(--brd);
  font-size: .72rem;
  letter-spacing: .03em;
  overflow-x: auto;
  white-space: nowrap;
}

.banner-status {
  display: flex;
  align-items: center;
  gap: .4rem;
  color: var(--green);
  font-weight: 600;
  font-size: .68rem;
  letter-spacing: .08em;
}

.status-dot {
  width: 6px;
  height: 6px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--green);
  animation: blink 2.4s ease-in-out infinite;
}

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

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: .35; }
}

/* ════════════════════════════════════════════════════════════════════
   SECTIONS COMMON
   ════════════════════════════════════════════════════════════════════ */
main { padding-bottom: 4rem; }

.s-kpi     { padding: 2.5rem 0 0; }
.s-ranking { padding: 2.75rem 0 0; }
.s-table   { padding: 2.75rem 0 0; }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.section-eyebrow {
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .14em;
  color: var(--blue);
  margin-bottom: .35rem;
}

.section-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--txt);
  line-height: 1.2;
}

.section-desc {
  font-size: .75rem;
  color: var(--dim);
  margin-top: .35rem;
  max-width: 560px;
  line-height: 1.5;
}

.btn-outline {
  flex-shrink: 0;
  height: 36px;
  padding: 0 1rem;
  background: transparent;
  border: 1px solid var(--brd2);
  border-radius: 8px;
  color: var(--muted);
  font-family: inherit;
  font-size: .78rem;
  cursor: pointer;
  transition: border-color .2s, color .2s, background .2s;
  white-space: nowrap;
  display: flex;
  align-items: center;
}
.btn-outline:hover {
  border-color: var(--blue);
  color: var(--blue);
  background: rgba(59,130,246,.06);
}

/* ════════════════════════════════════════════════════════════════════
   KPI CARDS
   ════════════════════════════════════════════════════════════════════ */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.kpi-card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--brd);
  border-radius: 14px;
  padding: 1.375rem 1.375rem 1.25rem;
  cursor: pointer;
  overflow: hidden;
  transition: border-color .25s, transform .25s, box-shadow .25s;
  animation: fadeInUp .5s ease both;
  animation-delay: var(--delay, 0ms);
}
.kpi-card:hover {
  border-color: var(--brd2);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,0,0,.4);
}
.kpi-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(59,130,246,.04), transparent 60%);
  pointer-events: none;
}

.kpi-top {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: .875rem;
}

.kpi-icon {
  font-size: 1rem;
  line-height: 1;
}

.kpi-label {
  font-size: .7rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: .04em;
  text-transform: uppercase;
}

.kpi-name {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--txt);
  line-height: 1.2;
  margin-bottom: .3rem;
}

.kpi-val {
  font-size: .9rem;
  font-weight: 600;
  margin-bottom: .2rem;
}

.kpi-sub {
  font-size: .72rem;
  color: var(--dim);
}

.kpi-bar {
  position: absolute;
  left: 0; bottom: 0; right: 0;
  height: 2px;
  opacity: .6;
}

/* ════════════════════════════════════════════════════════════════════
   RANKING LIST
   ════════════════════════════════════════════════════════════════════ */
#ranking-list {
  display: flex;
  flex-direction: column;
  gap: .625rem;
}

.ranking-item {
  display: grid;
  grid-template-columns: 44px 1fr auto auto 40px;
  align-items: center;
  gap: 1rem;
  background: var(--panel);
  border: 1px solid var(--brd);
  border-radius: 12px;
  padding: .875rem 1.125rem;
  cursor: pointer;
  transition: border-color .2s, background .2s, transform .2s, box-shadow .2s;
  animation: fadeInUp .45s ease both;
  animation-delay: var(--delay, 0ms);
}
.ranking-item:hover {
  border-color: var(--brd2);
  background: var(--panel2);
  transform: translateX(3px);
  box-shadow: 0 4px 24px rgba(0,0,0,.35);
}

.rank-num {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--brd2);
  text-align: center;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  transition: color .2s;
}
.ranking-item:hover .rank-num { color: var(--dim); }

.rank-info { min-width: 0; }

.rank-name {
  font-size: .925rem;
  font-weight: 600;
  color: var(--txt);
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: .2rem;
}

.rank-state {
  font-size: .7rem;
  font-weight: 600;
  background: rgba(255,255,255,.06);
  color: var(--muted);
  padding: 1px 6px;
  border-radius: 4px;
  letter-spacing: .04em;
}

.rank-meta {
  font-size: .72rem;
  color: var(--dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rank-meta strong { color: var(--muted); font-weight: 500; }

/* Score bar in ranking */
.rank-score-wrap {
  display: flex;
  align-items: center;
  gap: .625rem;
  min-width: 160px;
}

.rank-bar-bg {
  flex: 1;
  height: 4px;
  background: var(--brd);
  border-radius: 2px;
  overflow: hidden;
}

.rank-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width .6s cubic-bezier(.23,1,.32,1);
}

.rank-score-val {
  font-size: .9rem;
  font-weight: 700;
  min-width: 28px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Badges in ranking */
.rank-badges {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  justify-content: flex-end;
}

.rbadge {
  font-size: .65rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 5px;
  border: 1px solid;
  white-space: nowrap;
  letter-spacing: .02em;
}

/* Arrow button in ranking */
.rank-btn {
  width: 32px;
  height: 32px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--brd);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--dim);
  transition: background .2s, border-color .2s, color .2s;
  flex-shrink: 0;
}
.rank-btn:hover {
  background: rgba(59,130,246,.12);
  border-color: rgba(59,130,246,.4);
  color: var(--blue);
}

/* ════════════════════════════════════════════════════════════════════
   FILTERS
   ════════════════════════════════════════════════════════════════════ */
.filters-bar {
  background: var(--panel);
  border: 1px solid var(--brd);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: .875rem;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
}

.filter-label {
  font-size: .68rem;
  font-weight: 600;
  color: var(--dim);
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}

.pill {
  height: 26px;
  padding: 0 .7rem;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--brd);
  border-radius: 6px;
  font-family: inherit;
  font-size: .72rem;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  transition: all .18s;
  white-space: nowrap;
}
.pill:hover {
  border-color: var(--brd2);
  color: var(--txt);
  background: rgba(255,255,255,.07);
}
.pill.active {
  background: rgba(59,130,246,.15);
  border-color: rgba(59,130,246,.45);
  color: var(--blue);
  font-weight: 600;
}

.pill-clear {
  height: 26px;
  padding: 0 .875rem;
  background: rgba(239,68,68,.1);
  border: 1px solid rgba(239,68,68,.3);
  border-radius: 6px;
  font-family: inherit;
  font-size: .72rem;
  font-weight: 500;
  color: var(--red);
  cursor: pointer;
  transition: all .18s;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  margin-left: auto;
}
.pill-clear:hover {
  background: rgba(239,68,68,.18);
  border-color: rgba(239,68,68,.5);
}

/* ════════════════════════════════════════════════════════════════════
   TABLE
   ════════════════════════════════════════════════════════════════════ */
.table-wrap {
  background: var(--panel);
  border: 1px solid var(--brd);
  border-radius: 12px;
  overflow: hidden;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .82rem;
}

.data-table thead tr {
  background: rgba(24,34,53,.6);
  border-bottom: 1px solid var(--brd);
}

.data-table th {
  padding: .875rem 1rem;
  text-align: left;
  font-size: .68rem;
  font-weight: 600;
  color: var(--dim);
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
  user-select: none;
}

.th-sort {
  cursor: pointer;
  transition: color .15s;
}
.th-sort:hover { color: var(--txt); }
.th-active { color: var(--blue) !important; }
.th-rank { width: 48px; text-align: center; }

.data-table tbody tr {
  border-bottom: 1px solid rgba(30,45,69,.5);
  cursor: pointer;
  transition: background .15s;
}
.data-table tbody tr:last-child { border-bottom: none; }
.data-table tbody tr:hover { background: rgba(24,34,53,.6); }

.data-table td {
  padding: .825rem 1rem;
  color: var(--txt);
  vertical-align: middle;
}

.td-rank {
  text-align: center;
  font-size: .75rem;
  font-weight: 700;
  color: var(--dim);
  font-variant-numeric: tabular-nums;
}

.td-city-name {
  font-weight: 600;
  color: var(--txt);
}

.td-unit {
  font-size: .68rem;
  color: var(--dim);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

.td-state {
  display: inline-block;
  font-size: .7rem;
  font-weight: 600;
  background: rgba(255,255,255,.06);
  color: var(--muted);
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: .04em;
}

.td-tipo {
  display: inline-block;
  font-size: .7rem;
  font-weight: 500;
  color: var(--muted);
  background: rgba(255,255,255,.04);
  border: 1px solid var(--brd);
  padding: 2px 7px;
  border-radius: 5px;
}

.td-score-wrap {
  display: flex;
  align-items: center;
  gap: .625rem;
}

.td-score-bar {
  width: 60px;
  height: 4px;
  background: var(--brd);
  border-radius: 2px;
  overflow: hidden;
  flex-shrink: 0;
}

.td-center { text-align: center; }

.seg-badge {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  width: 22px;
  height: 22px;
  border-radius: 5px;
  text-align: center;
  line-height: 22px;
}

.table-btn {
  background: rgba(255,255,255,.04);
  border: 1px solid var(--brd);
  border-radius: 7px;
  padding: .3rem .7rem;
  font-family: inherit;
  font-size: .72rem;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all .18s;
}
.table-btn:hover {
  background: rgba(59,130,246,.1);
  border-color: rgba(59,130,246,.35);
  color: var(--blue);
}

.no-results {
  text-align: center;
  padding: 3.5rem 1rem;
  color: var(--dim);
  font-size: .85rem;
}

/* ════════════════════════════════════════════════════════════════════
   FOOTER
   ════════════════════════════════════════════════════════════════════ */
.app-footer {
  margin-top: 4rem;
  padding: 1.75rem 0;
  border-top: 1px solid var(--brd);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .75rem;
  font-weight: 600;
  color: var(--dim);
  letter-spacing: .06em;
}

.footer-meta {
  font-size: .72rem;
  color: var(--brd2);
}

/* ════════════════════════════════════════════════════════════════════
   MODAL OVERLAY
   ════════════════════════════════════════════════════════════════════ */
#modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(7,11,22,0);
  backdrop-filter: blur(0px);
  z-index: 200;
  pointer-events: none;
  transition: background .35s, backdrop-filter .35s;
}
#modal-overlay.active {
  background: rgba(7,11,22,.65);
  backdrop-filter: blur(4px);
  pointer-events: all;
}

/* ════════════════════════════════════════════════════════════════════
   CITY MODAL (centered card)
   ════════════════════════════════════════════════════════════════════ */
#city-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  width: min(900px, calc(100vw - 2rem));
  max-height: calc(100vh - 3rem);
  background: var(--panel);
  border: 1px solid var(--brd);
  border-radius: 16px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  transform: translate(-50%, -46%) scale(.97);
  opacity: 0;
  pointer-events: none;
  transition: transform .32s cubic-bezier(.23,1,.32,1), opacity .25s ease;
  overflow: hidden;
}
#city-modal.active {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  pointer-events: all;
}

/* Voltar (back) button */
.modal-back {
  position: absolute;
  top: 1rem; left: 1rem;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .3rem .7rem;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--brd);
  border-radius: 8px;
  color: var(--muted);
  font-size: .73rem;
  font-weight: 500;
  cursor: pointer;
  z-index: 10;
  transition: all .18s;
  white-space: nowrap;
}
.modal-back:hover {
  color: var(--txt);
  border-color: var(--blue);
  background: rgba(59,130,246,.08);
}

/* Pontos Fortes / Fracos */
.pontos-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .875rem;
}
@media (max-width: 600px) { .pontos-grid { grid-template-columns: 1fr; } }

.pontos-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .45rem;
}

.ponto-item {
  display: flex;
  align-items: flex-start;
  gap: .5rem;
  font-size: .78rem;
  line-height: 1.5;
  color: #CBD5E1;
}

.ponto-icon {
  flex-shrink: 0;
  font-size: .75rem;
  font-weight: 700;
  margin-top: .1rem;
}
.ponto-forte .ponto-icon { color: #22C55E; }
.ponto-fraco  .ponto-icon { color: #EF4444; }

/* Mobilidade sub-items */
.mob-text { display: flex; flex-direction: column; gap: .5rem; }

.mob-row {
  display: flex;
  gap: .6rem;
  align-items: flex-start;
  font-size: .74rem;
  line-height: 1.6;
  color: #94A3B8;
}

.mob-icon {
  flex-shrink: 0;
  font-size: .9rem;
  margin-top: .05rem;
}

/* Modal city header */
.modal-city-hdr {
  padding: 1.25rem 1.5rem 1.125rem 3.5rem;
  border-bottom: 1px solid var(--brd);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--panel2);
  flex-shrink: 0;
}

.mh-name {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--txt);
  line-height: 1.15;
}

.mh-meta {
  display: flex;
  align-items: center;
  gap: .375rem;
  font-size: .75rem;
  color: var(--muted);
  margin-top: .3rem;
  flex-wrap: wrap;
}

.mh-state {
  font-weight: 700;
  background: rgba(59,130,246,.15);
  color: var(--blue);
  padding: 1px 7px;
  border-radius: 4px;
  font-size: .7rem;
  letter-spacing: .04em;
}

.mh-sep { color: var(--brd2); }

.mh-unit {
  font-size: .72rem;
  color: var(--dim);
  margin-top: .35rem;
  font-style: italic;
}

/* Modal tabs */
.modal-tabs {
  display: flex;
  border-bottom: 1px solid var(--brd);
  background: var(--panel);
  flex-shrink: 0;
  overflow-x: auto;
}

.modal-tab {
  flex: 1;
  padding: .7rem .5rem;
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: .75rem;
  font-weight: 500;
  color: var(--dim);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color .18s, border-color .18s;
  white-space: nowrap;
}
.modal-tab:hover { color: var(--muted); }
.modal-tab.active {
  color: var(--blue);
  border-bottom-color: var(--blue);
  font-weight: 600;
}

/* Modal body */
.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* ─── Modal content sections ─── */
.m-section { display: flex; flex-direction: column; gap: .625rem; }

.m-label {
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--blue);
  text-transform: uppercase;
}

/* Indicator bars (overview tab) */
.indicators-grid { display: flex; flex-direction: column; gap: .5rem; }

/* Each indicator is a flex column: [row] + [expandable just-text] */
.ind-wrapper { display: flex; flex-direction: column; }

.indicator-row {
  display: grid;
  grid-template-columns: 140px 1fr 42px 22px;
  align-items: center;
  gap: .5rem;
}

.ind-label {
  font-size: .72rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ind-bar-bg {
  height: 6px;
  background: var(--brd);
  border-radius: 3px;
  overflow: hidden;
}

.ind-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width .7s cubic-bezier(.23,1,.32,1);
}

.ind-val {
  font-size: .78rem;
  font-weight: 600;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ⓘ info button on indicator rows */
.ind-info-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: #334155;
  font-size: .78rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  transition: color .15s, background .15s;
  justify-self: center;
}
.ind-info-btn:hover {
  color: #94A3B8;
  background: rgba(255,255,255,.05);
}
.ind-wrapper.just-open .ind-info-btn {
  color: #3B82F6;
  background: rgba(59,130,246,.12);
}
.ind-info-placeholder {
  display: block;
  width: 20px;
}

/* Justificativa expand text — sibling of .indicator-row, not a grid item */
.just-text {
  display: none;
  font-size: .74rem;
  line-height: 1.65;
  color: #94A3B8;
  background: rgba(18,24,38,.7);
  border: 1px solid var(--brd);
  border-radius: 7px;
  padding: .55rem .75rem;
  margin-top: .3rem;
}
@keyframes justReveal {
  from { opacity: 0; transform: translateY(-5px); }
  to   { opacity: 1; transform: translateY(0); }
}
.ind-wrapper.just-open .just-text {
  display: block;
  animation: justReveal .2s ease;
}

/* Info chips grid */
.chips-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .5rem;
}

.info-chip {
  background: var(--panel2);
  border: 1px solid var(--brd);
  border-radius: 9px;
  padding: .7rem .875rem;
}

.chip-label {
  display: block;
  font-size: .63rem;
  font-weight: 600;
  color: var(--dim);
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: .3rem;
}

.chip-val {
  font-size: .82rem;
  font-weight: 600;
  color: var(--txt);
  line-height: 1.3;
}

/* Tags */
.tags-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}

.tag {
  font-size: .68rem;
  padding: 3px 9px;
  background: rgba(59,130,246,.08);
  border: 1px solid rgba(59,130,246,.2);
  border-radius: 5px;
  color: var(--muted);
}

/* Analysis text */
.analysis-text {
  font-size: .82rem;
  color: var(--muted);
  line-height: 1.7;
  background: var(--panel2);
  border-left: 3px solid var(--blue);
  border-radius: 0 8px 8px 0;
  padding: .875rem 1rem;
}

/* OMS block */
.oms-block {
  display: flex;
  align-items: center;
  gap: .75rem;
  background: var(--panel2);
  border: 1px solid;
  border-radius: 10px;
  padding: .875rem 1rem;
}

.oms-badge {
  flex-shrink: 0;
  font-size: .72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  letter-spacing: .04em;
}

.oms-tipo {
  font-size: .78rem;
  color: var(--muted);
  line-height: 1.45;
}

/* Lists */
.m-list {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  padding-left: 1rem;
  list-style: none;
}

.m-list li {
  font-size: .78rem;
  color: var(--muted);
  line-height: 1.5;
  position: relative;
}
.m-list li::before {
  content: '—';
  position: absolute;
  left: -1rem;
  color: var(--brd2);
}

.m-empty {
  font-size: .78rem;
  color: var(--brd2);
  font-style: italic;
}

/* Logistics grid */
.logistics-grid {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.log-item {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  background: var(--panel2);
  border: 1px solid var(--brd);
  border-radius: 9px;
  padding: .75rem .875rem;
}

.log-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.log-label {
  font-size: .68rem;
  font-weight: 600;
  color: var(--dim);
  letter-spacing: .05em;
  text-transform: uppercase;
  margin-bottom: .2rem;
}

.log-val {
  font-size: .8rem;
  color: var(--muted);
}

/* Info grid (military) */
.info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .5rem;
}

.ig-item {
  background: var(--panel2);
  border: 1px solid var(--brd);
  border-radius: 9px;
  padding: .7rem .875rem;
}

.ig-label {
  display: block;
  font-size: .63rem;
  font-weight: 600;
  color: var(--dim);
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: .3rem;
}

.ig-val {
  font-size: .8rem;
  font-weight: 600;
  color: var(--txt);
  line-height: 1.3;
}

/* Mil block */
.mil-block {
  background: var(--panel2);
  border: 1px solid var(--brd);
  border-radius: 10px;
  padding: .875rem 1rem;
}

.mil-name {
  font-size: .925rem;
  font-weight: 700;
  color: var(--txt);
  margin-bottom: .25rem;
}

.mil-tipo {
  font-size: .75rem;
  color: var(--dim);
}

.mil-material {
  font-size: .8rem;
  color: var(--muted);
  line-height: 1.5;
  padding: .75rem .875rem;
  background: var(--panel2);
  border: 1px solid var(--brd);
  border-radius: 9px;
}

/* Radar chart container */
.radar-wrap {
  background: var(--panel2);
  border: 1px solid var(--brd);
  border-radius: 12px;
  padding: 1rem;
  height: 280px;
  position: relative;
}

/* ════════════════════════════════════════════════════════════════════
   YEAR SELECTOR BAR
   ════════════════════════════════════════════════════════════════════ */
.year-bar {
  background: rgba(18,24,38,.6);
  border-bottom: 1px solid var(--brd);
  padding: .65rem 0;
}

.year-inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.year-label-group {
  display: flex;
  align-items: center;
  gap: .45rem;
  font-size: .7rem;
  font-weight: 600;
  color: var(--dim);
  letter-spacing: .07em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Segmented control */
.year-tabs {
  display: flex;
  gap: 3px;
  background: var(--panel);
  border: 1px solid var(--brd);
  border-radius: 10px;
  padding: 3px;
}

.year-tab {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  height: 30px;
  padding: 0 1.1rem;
  border: 1px solid transparent;
  border-radius: 7px;
  font-family: inherit;
  font-size: .78rem;
  font-weight: 600;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  transition: all .18s ease;
  white-space: nowrap;
  letter-spacing: .02em;
}
.year-tab:hover { color: var(--txt); background: rgba(255,255,255,.05); }

/* Active states – one per year */
.year-tab.active[data-ano="todos"] {
  background: var(--brd2);
  color: var(--txt);
  border-color: transparent;
}
.year-tab.active[data-ano="2028"] {
  background: rgba(59,130,246,.18);
  color: var(--blue);
  border-color: rgba(59,130,246,.35);
}
.year-tab.active[data-ano="2029"] {
  background: rgba(34,211,238,.15);
  color: var(--cyan);
  border-color: rgba(34,211,238,.3);
}

/* Colored dot inside tab buttons */
.ytab-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.ytab-2028 { background: var(--blue); }
.ytab-2029 { background: var(--cyan); }

.year-tally {
  font-size: .72rem;
  color: var(--dim);
  margin-left: auto;
  white-space: nowrap;
}

/* ─── Year badges (on ranking cards, table rows) ─── */
.ybadge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: .62rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid;
  letter-spacing: .04em;
  white-space: nowrap;
  flex-shrink: 0;
}
.ybadge::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
}
.ybadge-2028 {
  color: var(--blue);
  background: rgba(59,130,246,.12);
  border-color: rgba(59,130,246,.28);
}
.ybadge-2028::before { background: var(--blue); }

.ybadge-2029 {
  color: var(--cyan);
  background: rgba(34,211,238,.1);
  border-color: rgba(34,211,238,.25);
}
.ybadge-2029::before { background: var(--cyan); }

.ybadge-both {
  color: var(--green);
  background: rgba(34,197,94,.1);
  border-color: rgba(34,197,94,.25);
}
.ybadge-both::before { background: var(--green); }

/* ─── Ciclo grid in military modal tab ─── */
.ciclo-grid {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.ciclo-block {
  background: var(--panel2);
  border: 1px solid var(--brd);
  border-radius: 10px;
  overflow: hidden;
}

.ciclo-header {
  display: flex;
  align-items: center;
  gap: .625rem;
  padding: .6rem .875rem;
  border-bottom: 1px solid var(--brd);
  background: rgba(255,255,255,.02);
}

.ciclo-oms {
  padding: .5rem .875rem;
  display: flex;
  flex-direction: column;
  gap: .375rem;
}

.ciclo-om-row {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  padding: .35rem 0;
  border-bottom: 1px solid rgba(30,45,69,.4);
}
.ciclo-om-row:last-child { border-bottom: none; }

.ciclo-om-name {
  font-size: .82rem;
  font-weight: 600;
  color: var(--txt);
}
.ciclo-om-sub {
  font-size: .72rem;
  color: var(--dim);
}

/* ════════════════════════════════════════════════════════════════════
   PRIORITY CARD — Priorização de OMs
   ════════════════════════════════════════════════════════════════════ */
.s-priority { padding: 2.75rem 0 0; }

/* Tabs inside card header */
.prio-tabs {
  display: flex;
  gap: 3px;
  background: var(--panel);
  border: 1px solid var(--brd);
  border-radius: 10px;
  padding: 3px;
}

.prio-tab {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  height: 30px;
  padding: 0 1rem;
  border: 1px solid transparent;
  border-radius: 7px;
  font-family: inherit;
  font-size: .78rem;
  font-weight: 600;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  transition: all .18s ease;
  white-space: nowrap;
}
.prio-tab:hover { color: var(--txt); background: rgba(255,255,255,.05); }
.prio-tab.active[data-pano="2028"] {
  background: rgba(59,130,246,.18);
  color: var(--blue);
  border-color: rgba(59,130,246,.35);
}
.prio-tab.active[data-pano="2029"] {
  background: rgba(34,211,238,.15);
  color: var(--cyan);
  border-color: rgba(34,211,238,.3);
}

/* Panels */
.prio-panel { display: none; }
.prio-panel.active { display: block; }

/* List container */
.prio-list {
  display: flex;
  flex-direction: column;
  gap: .4rem;
}

/* Each OM row */
.prio-item {
  display: grid;
  grid-template-columns: 28px 36px 1fr auto 32px;
  align-items: center;
  gap: .75rem;
  background: var(--panel);
  border: 1px solid var(--brd);
  border-radius: 10px;
  padding: .7rem 1rem .7rem .875rem;
  cursor: grab;
  user-select: none;
  transition: border-color .15s, background .15s, box-shadow .15s, opacity .15s;
}
.prio-item:hover {
  border-color: var(--brd2);
  background: var(--panel2);
}
.prio-item.prio-dragging {
  opacity: .45;
  cursor: grabbing;
}
.prio-item.prio-drag-over {
  border-color: var(--blue);
  background: rgba(59,130,246,.07);
  box-shadow: 0 0 0 1px rgba(59,130,246,.25);
}

/* Drag handle */
.prio-drag-handle {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: .35;
  transition: opacity .15s;
  cursor: grab;
}
.prio-item:hover .prio-drag-handle { opacity: .75; }

/* Rank number */
.prio-rank {
  font-size: .85rem;
  font-weight: 800;
  color: var(--brd2);
  text-align: center;
  font-variant-numeric: tabular-nums;
  min-width: 22px;
  transition: color .15s;
}
.prio-item:hover .prio-rank { color: var(--dim); }

/* OM info */
.prio-info { min-width: 0; }

.prio-om-name {
  font-size: .875rem;
  font-weight: 600;
  color: var(--txt);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.prio-sub {
  font-size: .68rem;
  color: var(--dim);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Pros/cons tags */
.prio-pontos {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
  margin-top: .45rem;
}

.prio-ponto {
  font-size: .62rem;
  font-weight: 500;
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid;
  line-height: 1.4;
  white-space: nowrap;
}

.prio-pos {
  color: #22C55E;
  background: rgba(34,197,94,.08);
  border-color: rgba(34,197,94,.25);
}

.prio-neg {
  color: #F87171;
  background: rgba(239,68,68,.08);
  border-color: rgba(239,68,68,.22);
}

/* Personal observations section */
.prio-item-known {
  border-color: rgba(59,130,246,.28);
}

.obs-section {
  margin-top: .6rem;
  padding: .5rem .7rem;
  background: rgba(59,130,246,.06);
  border: 1px solid rgba(59,130,246,.2);
  border-radius: 7px;
}

.obs-header {
  display: flex;
  align-items: center;
  gap: .625rem;
  margin-bottom: .4rem;
  flex-wrap: wrap;
}

.obs-badge {
  font-size: .65rem;
  font-weight: 700;
  color: var(--blue);
  letter-spacing: .03em;
}

.obs-nota {
  font-size: .65rem;
  font-weight: 600;
  color: var(--muted);
  background: rgba(255,255,255,.05);
  border: 1px solid var(--brd);
  border-radius: 4px;
  padding: 1px 6px;
}

.obs-pontos {
  margin-top: 0 !important;
}

.prio-obs {
  opacity: .95;
}

/* Score + tier */
.prio-score {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .8rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  flex-shrink: 0;
}

.prio-tier {
  font-size: .62rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 5px;
  border: 1px solid;
  letter-spacing: .04em;
}

/* City link button */
.prio-city-btn {
  width: 28px;
  height: 28px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--brd);
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--dim);
  flex-shrink: 0;
  transition: background .15s, border-color .15s, color .15s;
}
.prio-city-btn:hover {
  background: rgba(59,130,246,.12);
  border-color: rgba(59,130,246,.4);
  color: var(--blue);
}

@media (max-width: 600px) {
  .prio-item { grid-template-columns: 24px 30px 1fr 28px; }
  .prio-score { display: none; }
}

/* ════════════════════════════════════════════════════════════════════
   ANIMATIONS
   ════════════════════════════════════════════════════════════════════ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.fade-in {
  animation: fadeInUp .45s ease both;
  animation-delay: var(--delay, 0ms);
}

/* ════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  :root { --modal-w: 90vw; }
}

@media (max-width: 768px) {
  .container { padding: 0 1rem; }
  .header-inner { gap: .75rem; }
  .brand-sub { display: none; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); gap: .625rem; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .btn-outline { display: none; }
  .ranking-item { grid-template-columns: 36px 1fr auto 32px; }
  .rank-badges { display: none; }
  :root { --modal-w: 100vw; }
  #city-modal { width: calc(100vw - 1rem); max-height: calc(100vh - 1rem); border-radius: 12px; }
  .modal-city-hdr { padding-left: 1.25rem; padding-right: 1rem; }
}

@media (max-width: 520px) {
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .kpi-name { font-size: 1rem; }
  .banner-bar { font-size: .65rem; }
}
