/* ============================================================
   style.css — Concursos Radar
   Paleta: Warm Dark + Gold Editorial
   Inspiração: data dashboards editoriais (The Economist, Linear.app)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&family=DM+Mono:wght@400;500&family=Playfair+Display:wght@600;700&display=swap');

/* ── Tokens ── */
:root {
  --sidebar-w: 248px;

  /* Paleta warm-dark — foge do azul genérico */
  --bg: #080804;
  /* quase preto com tom quente */
  --bg-sb: #0c0b07;
  /* sidebar mais escura, como couro */
  --bg-card: #1a1813;
  /* card bege-escuro */
  --bg-card-2: #201e17;
  /* hover do card */
  --bg-input: #1f1d16;

  --border: rgba(255, 240, 200, .055);
  --border-md: rgba(255, 240, 200, .09);
  --border-act: rgba(212, 168, 56, .3);

  /* Dourado como acento principal — inconfundível */
  --gold: #d4a838;
  --gold-dim: rgba(212, 168, 56, .1);
  --gold-mid: rgba(212, 168, 56, .2);
  --gold-lit: #e8c86a;

  /* Status — tons naturais, não os tailwind defaults */
  --emerald: #3dba7a;
  /* verde mais saturado, não o #10b981 genérico */
  --emerald-bg: rgba(61, 186, 122, .1);
  --sienna: #e07b3a;
  /* laranja queimado, não amber padrão */
  --sienna-bg: rgba(224, 123, 58, .1);
  --slate: #8a8070;
  /* cinza quente, não o gray frio */
  --slate-bg: rgba(138, 128, 112, .1);

  --txt: #f0ead8;
  /* creme, não branco puro */
  --txt-2: #a09880;
  /* bege médio */
  --txt-3: #5a5244;
  /* bege escuro */
  --txt-inv: #0c0b07;

  --r-xs: 4px;
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;

  --ease: .2s cubic-bezier(.4, 0, .2, 1);
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  /* evita scroll horizontal causado por componentes wide */
}

body {
  font-family: 'DM Sans', system-ui, sans-serif;
  background: var(--bg);
  color: var(--txt);
  min-height: 100vh;
  display: flex;
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

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

::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #2d2920;
  border-radius: 99px;
}

/* =====================================================
   SIDEBAR
   ===================================================== */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-sb);
  border-right: 1px solid var(--border);
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  transition: transform var(--ease);
}

/* ── Logo ── */
.sb-logo {
  padding: 1.3rem 1.1rem 1rem;
  display: flex;
  align-items: center;
  gap: .65rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.sb-logo-mark {
  width: 34px;
  height: 34px;
  border-radius: var(--r-xs);
  background: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Monogram em vez de emoji */
.sb-logo-mark span {
  font-family: 'Playfair Display', serif;
  font-size: .95rem;
  font-weight: 700;
  color: var(--txt-inv);
  letter-spacing: -.02em;
}

.sb-logo-info {
  flex: 1;
}

.sb-logo-name {
  font-size: .92rem;
  font-weight: 600;
  color: var(--txt);
  letter-spacing: -.01em;
}

.sb-logo-sub {
  font-size: .63rem;
  color: var(--txt-3);
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-top: 1px;
}

/* ── Search ── */
.sb-search {
  padding: .85rem .9rem .65rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.sb-search-inner {
  position: relative;
}

.sb-search-inner svg {
  position: absolute;
  left: .65rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--txt-3);
  pointer-events: none;
}

.sb-search-inner input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: .48rem .75rem .48rem 2rem;
  font-size: .8rem;
  font-family: inherit;
  color: var(--txt);
  outline: none;
  transition: border-color var(--ease);
}

.sb-search-inner input::placeholder {
  color: var(--txt-3);
}

.sb-search-inner input:focus {
  border-color: var(--gold);
}

/* ── Nav sections ── */
.sb-group {
  padding: .85rem .7rem .4rem;
  flex-shrink: 0;
}

/* ── Collapsible Sidebar Sections ── */
.sb-group.collapsible {
  padding-bottom: .2rem;
}

.sb-group-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: none;
  border: none;
  padding: .45rem .45rem;
  margin-bottom: .2rem;
  cursor: pointer;
  color: var(--txt-3);
  transition: color var(--ease);
  text-align: left;
}

.sb-group-toggle:hover {
  color: var(--txt-2);
}

.sb-group-label {
  font-size: .6rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-weight: 600;
  pointer-events: none;
}

.sb-group-chevron {
  width: 12px;
  height: 12px;
  opacity: .5;
  transition: transform var(--ease), opacity var(--ease);
}

.sb-group.open .sb-group-chevron {
  transform: rotate(180deg);
  opacity: .8;
}

.sb-group-content {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--ease), padding var(--ease);
  overflow: hidden;
}

.sb-group.open .sb-group-content {
  grid-template-rows: 1fr;
}

.sb-group-content>div {
  min-height: 0;
}

.sb-menu {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.sb-item {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .48rem .7rem;
  border-radius: var(--r-sm);
  font-size: .83rem;
  font-weight: 500;
  color: var(--txt-2);
  cursor: pointer;
  transition: background var(--ease), color var(--ease);
  position: relative;
  white-space: nowrap;
}

.sb-item svg {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  opacity: .6;
  transition: opacity var(--ease);
}

.sb-item:hover {
  background: rgba(255, 240, 200, .04);
  color: var(--txt);
}

.sb-item:hover svg {
  opacity: .9;
}

.sb-item.active {
  background: var(--gold-dim);
  color: var(--gold-lit);
  font-weight: 600;
}

.sb-item.active svg {
  opacity: 1;
  color: var(--gold);
}

.sb-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 22%;
  bottom: 22%;
  width: 2px;
  border-radius: 0 2px 2px 0;
  background: var(--gold);
}

.sb-chip {
  margin-left: auto;
  font-size: .65rem;
  font-weight: 700;
  font-family: 'DM Mono', monospace;
  padding: .1rem .4rem;
  border-radius: 3px;
  background: rgba(255, 240, 200, .06);
  color: var(--txt-2);
}

.sb-chip.em {
  background: var(--emerald-bg);
  color: var(--emerald);
}

.sb-chip.si {
  background: var(--sienna-bg);
  color: var(--sienna);
}

/* Divisor */
.sb-hr {
  height: 1px;
  background: var(--border);
  margin: .35rem .7rem;
}

/* Footer */
.sb-foot {
  margin-top: auto;
  padding: .8rem .9rem;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.sb-foot-label {
  font-size: .62rem;
  color: var(--txt-3);
  font-family: 'DM Mono', monospace;
}

/* =====================================================
   MAIN
   ===================================================== */
.main {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* ── Strip topo ── */
.strip {
  height: 48px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 1.6rem;
  gap: .9rem;
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(17, 16, 9, .88);
  backdrop-filter: blur(14px);
  flex-shrink: 0;
}

.strip-crumb {
  display: flex;
  align-items: center;
  gap: .35rem;
  font-size: .76rem;
  color: var(--txt-3);
}

.strip-crumb span {
  color: var(--txt-2);
}

.strip-crumb svg {
  opacity: .35;
}

.strip-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: .8rem;
  flex-direction: row;
}

.strip-live {
  display: flex;
  align-items: center;
  gap: .35rem;
  font-size: .71rem;
  font-weight: 600;
  color: var(--emerald);
  font-family: 'DM Mono', monospace;
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--emerald);
  animation: blink 1.8s ease-in-out infinite;
}

@keyframes blink {

  0%,
  100% {
    opacity: 1
  }

  50% {
    opacity: .2
  }
}

.strip-btn {
  padding: .3rem .7rem;
  border-radius: var(--r-xs);
  font-size: .74rem;
  font-weight: 500;
  border: 1px solid var(--border-md);
  background: transparent;
  color: var(--txt-2);
  cursor: pointer;
  transition: all var(--ease);
  display: flex;
  align-items: center;
  gap: .3rem;
  font-family: inherit;
}

.strip-btn:hover {
  background: rgba(255, 240, 200, .05);
  color: var(--txt);
}

.hamburger {
  display: none;
  padding: .35rem;
  border: 1px solid var(--border-md);
  border-radius: var(--r-xs);
  background: transparent;
  color: var(--txt-2);
  cursor: pointer;
}

/* ── Page header ── */
.ph {
  padding: 1.75rem 1.6rem 1rem;
}

.ph-top {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
}

.ph-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--txt);
  letter-spacing: -.02em;
}

.ph-sub {
  font-size: .78rem;
  color: var(--txt-3);
  margin-top: .3rem;
}

/* ── KPI strip ── */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  margin: 0 1.6rem 1.4rem;
}

.kpi {
  background: var(--bg-card);
  padding: .9rem 1rem;
  display: flex;
  flex-direction: column;
  gap: .2rem;
  transition: background var(--ease);
}

.kpi:hover {
  background: var(--bg-card-2);
}

.kpi-val {
  font-family: 'DM Mono', monospace;
  font-size: 1.55rem;
  font-weight: 500;
  line-height: 1;
  color: var(--txt);
}

.kpi-label {
  font-size: .65rem;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--txt-3);
  font-weight: 600;
}

@media (max-width: 480px) {
  .kpi-val {
    font-size: 1.2rem;
  }
}

.kpi-val.em {
  color: var(--emerald);
}

.kpi-val.si {
  color: var(--sienna);
}

.kpi-val.sl {
  color: var(--slate);
}

.kpi-val.gd {
  color: var(--gold);
}

/* ── Toolbar ── */
.toolbar {
  padding: 0 1.6rem .85rem;
  display: flex;
  align-items: center;
  gap: .6rem;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.25rem;
}

.toolbar-label {
  font-size: .75rem;
  color: var(--txt-3);
  font-weight: 500;
}

.t-select {
  background: var(--bg-input);
  border: 1px solid var(--border-md);
  border-radius: var(--r-xs);
  padding: .38rem 1.9rem .38rem .65rem;
  font-size: .78rem;
  font-family: inherit;
  color: var(--txt-2);
  cursor: pointer;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%235a5244' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .55rem center;
  transition: border-color var(--ease);
}

.t-select:focus {
  border-color: var(--gold);
}

.t-select option {
  background: #1a1813;
}

.t-clear {
  font-size: .76rem;
  color: var(--sienna);
  display: flex;
  align-items: center;
  gap: .25rem;
  transition: opacity var(--ease);
}

.t-clear:hover {
  opacity: .75;
}

.t-count {
  margin-left: auto;
  font-size: .72rem;
  color: var(--txt-3);
  font-family: 'DM Mono', monospace;
}

/* ── List / Cards ── */
.list-wrap {
  padding: 0 1.6rem 3rem;
}

/* === TABLE-STYLE LIST (mais editorial, menos "card IA") === */
.concurso-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
}

.concurso-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto auto;
  align-items: center;
  gap: 0 1.25rem;
  padding: .85rem 1.1rem;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  transition: background var(--ease);
  cursor: default;
  animation: rowIn .3s ease both;
}

.concurso-row:last-child {
  border-bottom: none;
}

.concurso-row:hover {
  background: var(--bg-card-2);
}

@keyframes rowIn {
  from {
    opacity: 0;
    transform: translateX(-6px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.concurso-row:nth-child(1) {
  animation-delay: .03s;
}

.concurso-row:nth-child(2) {
  animation-delay: .06s;
}

.concurso-row:nth-child(3) {
  animation-delay: .09s;
}

.concurso-row:nth-child(4) {
  animation-delay: .12s;
}

.concurso-row:nth-child(5) {
  animation-delay: .15s;
}

.concurso-row:nth-child(6) {
  animation-delay: .18s;
}

.concurso-row:nth-child(7) {
  animation-delay: .21s;
}

.concurso-row:nth-child(8) {
  animation-delay: .24s;
}

/* Coluna: Ícone/Sigla */
.row-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--r-xs);
  background: var(--gold-dim);
  border: 1px solid var(--gold-mid);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.row-icon span {
  font-family: 'DM Mono', monospace;
  font-size: .65rem;
  font-weight: 500;
  color: var(--gold-lit);
  letter-spacing: -.01em;
  text-align: center;
  line-height: 1.1;
}

/* Coluna: Info principal */
.row-info {
  min-width: 0;
}

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

.row-meta {
  font-size: .72rem;
  color: var(--txt-3);
  margin-top: .1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Coluna: Nível + Vagas */
.row-detail {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: .2rem;
  flex-shrink: 0;
  min-width: 80px;
}

.row-nivel {
  font-size: .72rem;
  color: var(--txt-2);
  font-weight: 500;
}

.row-vagas {
  font-size: .69rem;
  font-family: 'DM Mono', monospace;
  color: var(--txt-3);
}

/* Coluna: Salário */
.row-sal {
  flex-shrink: 0;
  width: 200px;
  text-align: right;
}

.row-sal-val {
  font-family: 'DM Mono', monospace;
  font-size: .85rem;
  font-weight: 500;
  color: var(--emerald);
}

.row-sal-label {
  font-size: .62rem;
  color: var(--txt-3);
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-top: .1rem;
}

/* Coluna: Ações */
.row-actions {
  display: flex;
  align-items: center;
  gap: .4rem;
  flex-shrink: 0;
}

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: .2rem .55rem;
  border-radius: var(--r-xs);
  font-size: .67rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  font-family: 'DM Mono', monospace;
}

.badge-aberto {
  background: var(--emerald-bg);
  color: var(--emerald);
}

.badge-previsto {
  background: var(--sienna-bg);
  color: var(--sienna);
}

.badge-encerrado {
  background: var(--slate-bg);
  color: var(--slate);
}

.badge-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}

.badge-aberto .badge-dot {
  animation: blink 1.6s infinite;
}

/* Botão primário */
.btn-ver {
  padding: .38rem .75rem;
  border-radius: var(--r-xs);
  background: var(--gold);
  color: var(--txt-inv);
  font-size: .76rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: .01em;
  transition: background var(--ease), transform var(--ease);
  white-space: nowrap;
}

.btn-ver:hover {
  background: var(--gold-lit);
  transform: translateY(-1px);
}

.btn-ext {
  width: 30px;
  height: 30px;
  border-radius: var(--r-xs);
  border: 1px solid var(--border-md);
  background: transparent;
  color: var(--txt-3);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--ease);
  flex-shrink: 0;
  text-decoration: none;
}

.btn-ext:hover {
  border-color: var(--border-act);
  color: var(--gold-lit);
  background: var(--gold-dim);
}

/* ── Empty state ── */
.empty {
  padding: 4rem 2rem;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .6rem;
}

.empty svg {
  color: var(--txt-3);
}

.empty h3 {
  font-size: .95rem;
  color: var(--txt-2);
}

.empty p {
  font-size: .8rem;
  color: var(--txt-3);
  max-width: 280px;
}

.empty a {
  color: var(--gold-lit);
  font-size: .8rem;
  margin-top: .2rem;
}

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: 1.3rem;
  right: 1.3rem;
  background: var(--bg-card);
  border: 1px solid var(--border-act);
  border-radius: var(--r-sm);
  padding: .75rem 1rem;
  font-size: .82rem;
  color: var(--txt);
  box-shadow: 0 8px 32px rgba(0, 0, 0, .6);
  z-index: 9999;
  opacity: 0;
  transform: translateY(8px);
  transition: all .22s ease;
  pointer-events: none;
  max-width: 300px;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* ── Overlay ── */
.sb-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .65);
  z-index: 199;
}

.sb-overlay.on {
  display: block;
}

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 1100px) {
  .concurso-row {
    grid-template-columns: auto 1fr auto auto;
  }

  .row-sal {
    display: none;
  }
}

@media (max-width: 900px) {
  :root {
    --sidebar-w: 290px;
  }

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

  .kpi:nth-child(4),
  .kpi:nth-child(5) {
    display: none;
  }
}

@media (max-width: 500px) {
  .kpi-row {
    display: flex;
    flex-direction: row;
    gap: .5rem;
    margin: 0 1rem 1.2rem;
  }

  .kpi {
    flex: 1;
    min-width: 0;
    padding: .5rem .35rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .kpi-val {
    font-size: 1.1rem !important;
    line-height: 1.2;
  }

  .kpi-label {
    font-size: .52rem;
    letter-spacing: .02em;
    margin-top: .1rem;
  }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: 6px 0 30px rgba(0, 0, 0, .6);
  }

  .main {
    margin-left: 0;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
  }

  .hamburger {
    display: flex;
  }

  .ph,
  .list-wrap,
  .toolbar {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .ep-region {
    display: none;
    /* Oculta palavra escolaridade/região no mobile */
  }

  /* Estilos específicos do estado-picker movidos para o index.php para maior controle */

  .t-select {
    padding: .4rem .6rem;
    font-size: .82rem;
    max-width: 80%;
  }

  .kpi-row {
    margin: 0 1rem 1.2rem;
    max-width: calc(100% - 2rem);
    box-sizing: border-box;
  }

  .strip {
    padding: 0 1rem;
  }

  .concurso-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0;
    padding: .85rem .9rem;
  }

  .row-icon {
    flex: 0 0 auto;
    margin-right: .7rem;
    align-self: flex-start;
    margin-top: .05rem;
  }

  .row-info {
    flex: 1 1 0;
    min-width: 0;
  }

  .row-info .row-name {
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    font-size: .88rem;
    line-height: 1.35;
    margin-bottom: .18rem;
  }

  .row-info .row-meta {
    font-size: .72rem;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
  }

  .row-actions {
    flex: 0 0 100%;
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-top: .6rem;
    padding-top: .6rem;
    border-top: 1px solid var(--border);
    padding-left: calc(38px + .7rem);
  }

  .row-detail {
    display: none;
  }

  .row-sal {
    display: flex;
    flex: 0 0 100%;
    align-items: center;
    padding-left: calc(38px + .7rem);
    margin-top: .4rem;
    text-align: left;
    width: auto;
  }

  .row-sal-val {
    font-size: .88rem;
    background: rgba(61, 186, 122, 0.1);
    padding: .15rem .45rem;
    border-radius: var(--r-xs);
    border: 1px solid rgba(61, 186, 122, 0.25);
  }

  .row-sal-label {
    display: none;
  }
}

/* end @media 768px */

@media (max-width: 480px) {
  .concurso-row {
    /* 2 linhas no mobile pequeno:
       linha 1: [icon] [info]     (flow normal)
       linha 2:        [actions]  (empurrado para a direita)
    */
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    align-items: flex-start;
    padding: .85rem .9rem;
  }

  /* Sigla: fica na col esquerda, 2 linhas de altura */
  .row-icon {
    flex: 0 0 auto;
    margin-right: .7rem;
    align-self: flex-start;
    margin-top: .05rem;
  }

  /* Nome + meta: ocupa o resto da largura na linha 1 */
  .row-info {
    flex: 1 1 0;
    min-width: 0;
  }

  /* Nome completo — sem truncar */
  .row-info .row-name {
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    font-size: .88rem;
    line-height: 1.35;
    margin-bottom: .18rem;
  }

  /* Área e banca abaixo do nome */
  .row-info .row-meta {
    font-size: .72rem;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
  }

  /* Detalhes e nível/estado: linha 2, cheia */
  .row-actions {
    flex: 0 0 100%;
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-top: .6rem;
    padding-top: .6rem;
    border-top: 1px solid var(--border);
    padding-left: calc(38px + .7rem);
    /* alinha com o início do texto */
  }

  .row-detail {
    display: none;
  }

  .row-sal {
    display: flex;
    flex: 0 0 100%;
    align-items: center;
    padding-left: calc(38px + .7rem);
    margin-top: .4rem;
    text-align: left;
    width: auto;
  }

  .row-sal-val {
    font-size: .88rem;
    background: rgba(61, 186, 122, 0.1);
    padding: .15rem .45rem;
    border-radius: var(--r-xs);
    border: 1px solid rgba(61, 186, 122, 0.25);
  }

  .row-sal-label {
    display: none;
  }

  .btn-ext {
    display: none;
  }
}

/* =====================================================
   ÁREA — badges e ícones
   ===================================================== */
.area-tag {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: .67rem;
  font-weight: 600;
  font-family: 'DM Mono', monospace;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: .18rem .5rem;
  border-radius: var(--r-xs);
}

.area-policial {
  background: rgba(239, 68, 68, .1);
  color: #f87171;
}

.area-fiscal {
  background: rgba(212, 168, 56, .1);
  color: var(--gold-lit);
}

.area-judicial {
  background: rgba(139, 92, 246, .1);
  color: #c4b5fd;
}

.area-controle {
  background: rgba(14, 165, 233, .1);
  color: #38bdf8;
}

.area-ti {
  background: rgba(20, 184, 166, .1);
  color: #2dd4bf;
}

.area-adm {
  background: rgba(160, 152, 128, .1);
  color: var(--txt-2);
}

.area-bancaria,
[class*="area-banc"] {
  background: rgba(234, 179, 8, .1);
  color: #fbbf24;
}

/* =====================================================
   ESTADO — badges
   ===================================================== */
.badge-nacional {
  font-family: 'DM Mono', monospace;
  font-size: .62rem;
  font-weight: 700;
  padding: .15rem .45rem;
  border-radius: var(--r-xs);
  background: var(--gold-dim);
  color: var(--gold-lit);
  text-transform: uppercase;
  letter-spacing: .05em;
}

.badge-uf {
  font-family: 'DM Mono', monospace;
  font-size: .62rem;
  font-weight: 700;
  padding: .15rem .45rem;
  border-radius: var(--r-xs);
  background: rgba(138, 128, 112, .1);
  color: var(--txt-2);
  text-transform: uppercase;
  letter-spacing: .05em;
}

/* =====================================================
   ROW — campos extras (área, data, estado)
   ===================================================== */
.row-extra {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  align-items: flex-end;
  flex-shrink: 0;
  min-width: 90px;
}

.row-data {
  font-size: .7rem;
  font-family: 'DM Mono', monospace;
  color: var(--txt-3);
}

/* =====================================================
   PÁGINA DE DETALHE — concurso.php
   ===================================================== */

/* Hero do detalhe */
.detail-hero {
  padding: 2rem 1.6rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.detail-eyebrow {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: .85rem;
  flex-wrap: wrap;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: .76rem;
  color: var(--txt-3);
  transition: color var(--ease);
}

.back-link:hover {
  color: var(--txt-2);
}

.eyebrow-sep {
  color: var(--txt-3);
  font-size: .7rem;
}

.detail-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.4rem, 3vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -.025em;
  line-height: 1.15;
  color: var(--txt);
  margin-bottom: .6rem;
}

.detail-subtitle {
  font-family: 'DM Mono', monospace;
  font-size: .78rem;
  color: var(--txt-3);
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.detail-badges {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
}

/* KPI row específico do detalhe */
.detail-kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  margin: 1.5rem 1.6rem;
}

.detail-kpi {
  background: var(--bg-card);
  padding: 1.1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .3rem;
  transition: background var(--ease);
}

.detail-kpi:hover {
  background: var(--bg-card-2);
}

.dkpi-label {
  font-size: .62rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--txt-3);
  font-weight: 600;
}

.dkpi-val {
  font-family: 'DM Mono', monospace;
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--txt);
  line-height: 1;
}

.dkpi-val.em {
  color: var(--emerald);
}

.dkpi-val.gd {
  color: var(--gold);
}

.dkpi-val.si {
  color: var(--sienna);
}

.dkpi-sub {
  font-size: .68rem;
  color: var(--txt-3);
  margin-top: .1rem;
}

/* Info grid abaixo do KPI */
.detail-body {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 1.5rem;
  padding: 0 1.6rem 3rem;
}

/* Bloco de descrição */
.detail-desc-block {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.block-title {
  font-size: .65rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--txt-3);
  font-weight: 700;
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--border);
}

.detail-desc {
  font-size: .9rem;
  line-height: 1.75;
  color: var(--txt-2);
}

/* Sidebar de info no detalhe */
.detail-info-block {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: sticky;
  top: 64px;
  align-self: start;
}

.info-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 1.1rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.info-card-title {
  font-size: .62rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--txt-3);
  font-weight: 700;
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: .5rem;
  font-size: .83rem;
  padding-bottom: .6rem;
  border-bottom: 1px solid var(--border);
}

.info-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.info-row-key {
  color: var(--txt-3);
  font-size: .76rem;
  flex-shrink: 0;
}

.info-row-val {
  color: var(--txt);
  font-weight: 500;
  text-align: right;
}

/* Botão de edital na página detalhe */
.btn-edital-full {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .75rem 1rem;
  border-radius: var(--r-sm);
  background: var(--gold);
  color: var(--txt-inv);
  font-size: .85rem;
  font-weight: 700;
  font-family: inherit;
  border: none;
  cursor: pointer;
  text-align: center;
  transition: background var(--ease), transform var(--ease);
  width: 100%;
}

.btn-edital-full:hover {
  background: var(--gold-lit);
  transform: translateY(-1px);
}

.btn-edital-full-outline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .65rem 1rem;
  border-radius: var(--r-sm);
  background: transparent;
  border: 1px solid var(--border-md);
  color: var(--txt-2);
  font-size: .82rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--ease);
  width: 100%;
}

.btn-edital-full-outline:hover {
  border-color: var(--border-act);
  color: var(--gold-lit);
  background: var(--gold-dim);
}

/* Error page 404 / concurso não encontrado */
.not-found {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1rem;
  text-align: center;
  padding: 4rem 2rem;
}

.not-found-code {
  font-family: 'DM Mono', monospace;
  font-size: 4rem;
  font-weight: 500;
  color: var(--txt-3);
  line-height: 1;
}

.not-found h2 {
  font-size: 1.1rem;
  color: var(--txt-2);
  font-weight: 600;
}

.not-found p {
  font-size: .85rem;
  color: var(--txt-3);
  max-width: 320px;
}

/* =====================================================
   RESPONSIVE — detalhe
   ===================================================== */
@media (max-width: 1050px) {
  .detail-kpi-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .detail-body {
    grid-template-columns: 1fr;
  }

  .detail-info-block {
    position: static;
  }
}

@media (max-width: 768px) {
  .detail-hero {
    padding: 1.25rem 1rem 1rem;
  }

  .detail-kpi-row {
    margin: 1rem 1rem;
  }

  .detail-body {
    padding: 0 1rem 2rem;
  }
}

@charset " UTF-8\;


.editorial-p {
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 1.2rem;
  color: var(--txt);
  text-align: justify;
}