:root {
  --blue:    #0001fc;
  --purple:  #5c14f0;
  --cyan:    #08eff7;
  --magenta: #e425f5;
  --green:   #22aa44;
  --black:   #000000;
  --cream:   #fef0ef;
  --white:   #ffffff;
  --gray:    #888;
  --urgente-bg:    #fff0f0; --urgente-bar:    #e00;
  --atencao-bg:    #fffbe0; --atencao-bar:    #d4a000;
  --pular-bg:      #f9f9f9;
  --futuras-bg:    #f0fff4; --futuras-bar:    var(--cyan);
  --indefinido-bg: #f4f0ff; --indefinido-bar: var(--purple);
  --encerrado-bg:  #f0f0f0; --encerrado-bar:  #ccc; --encerrado-text: #aaa;
  font-family: 'Funnel Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; margin:0; padding:0; }
body { background: var(--blue); color: var(--black); min-height: 100vh; }

/* STICKY WRAPPER — header + stats-bar */
.sticky-top {
  position: sticky; top: 0; z-index: 100;
  background: var(--blue);
}

/* HEADER */
header {
  background: var(--blue); padding: 16px 32px;
  display: flex; align-items: center; gap: 20px;
}
.header-logo {
  height: 48px; width: auto; display: block; flex-shrink: 0;
}
.wordmark-sub {
  font-size: 11px; letter-spacing: 0.2em; color: var(--cream);
  text-transform: lowercase; opacity: 0.75; white-space: nowrap;
}
.header-nav {
  margin-left: auto; display: flex; align-items: center; gap: 20px;
}
.header-nav a {
  color: var(--cream); text-decoration: none; font-size: 12px;
  letter-spacing: 0.1em; text-transform: uppercase;
  transition: opacity 0.15s;
}
.header-nav a:hover { opacity: 0.75; }
.city-select {
  background: transparent; border: 1px solid var(--cream);
  color: var(--cream); padding: 6px 24px 6px 10px; border-radius: 4px;
  font-size: 11px; letter-spacing: 0.08em; cursor: pointer;
  text-transform: uppercase; width: auto;
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23fef0ef'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
}
.city-select option { background: var(--blue); color: var(--white); }
.header-date {
  font-size: 10px; color: rgba(255,255,255,0.55);
  letter-spacing: 0.08em; white-space: nowrap;
}
.header-beta {
  font-size: 9px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--cyan); border: 1px solid rgba(8,239,247,0.5);
  padding: 3px 9px; border-radius: 20px;
  background: rgba(8,239,247,0.08); white-space: nowrap;
}

/* STATS BAR — minimal style with underline */
.stats-bar {
  background: var(--blue);
  padding: 16px 32px; display: flex; flex-wrap: wrap; gap: 8px 32px;
  align-items: center;
  box-shadow: 0 2px 12px rgba(0,0,252,0.3);
  border-top: none;
}
.stats-bar-break { flex-basis: 100%; height: 0; }
/* Ordem DESKTOP dos filtros: Linha 1 = Arte no seu tempo | Em cartaz | Futuras — Linha 2 = Favoritas | Perto daqui */
.stats-bar .imperd          { order: 1; }
.stats-bar .em-cartaz       { order: 2; }
.stats-bar .futuras         { order: 3; }
.stats-bar .stats-bar-break { order: 4; }   /* quebra após Futuras */
.stats-bar .minha-lista     { order: 5; }
.stats-bar .perto-de-mim    { order: 6; }
.stats-bar .stats-suggest   { order: 7; }   /* mantém o box no canto inferior direito */
.stat-pill {
  display: flex; align-items: center; gap: 8px;
  background: transparent; border: none; border-radius: 0;
  padding: 8px 0; cursor: pointer; transition: all .15s;
  font-size: 17px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; position: relative;
  color: var(--cream);
}
.stat-pill::after {
  content: ''; position: absolute; bottom: 0; left: 0;
  width: 100%; height: 3px; background: transparent;
  transition: background 0.15s;
}
.stat-pill:hover { color: rgba(255,255,255,0.7); }
.stat-pill.active::after { background: currentColor; }
.stat-pill .dot { display: none; }
.stat-pill .count { display: none; }

/* Filter colors — ativo sempre em creme */
.stat-pill.imperd        { color: var(--cream); }
.stat-pill.imperd.active { color: var(--cream); }
.stat-pill.em-cartaz        { color: var(--cream); }
.stat-pill.em-cartaz.active { color: var(--cream); }
.stat-pill.futuras        { color: var(--cream); }
.stat-pill.futuras.active { color: var(--cream); }
.stat-pill.perto-de-mim        { color: var(--cream); }
.stat-pill.perto-de-mim.active { color: var(--cream); }
.stat-pill.perto-de-mim .geo-icon { display: inline-block; width: 18px; height: 18px; vertical-align: middle; margin-right: 2px; }

/* Geo permission overlay */
.geo-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,252,0.92); display: flex;
  flex-direction: column; align-items: center; justify-content: center;
  color: var(--cream); text-align: center; padding: 32px;
}
.geo-overlay h2 { font-size: 28px; font-weight: 700; margin-bottom: 12px; }
.geo-overlay p { font-size: 16px; opacity: 0.8; max-width: 400px; line-height: 1.5; }
.geo-overlay .geo-spinner { width: 40px; height: 40px; border: 3px solid rgba(255,255,255,0.2);
  border-top-color: var(--cyan); border-radius: 50%; animation: geospin 0.8s linear infinite; margin-bottom: 20px; }
@keyframes geospin { to { transform: rotate(360deg); } }
.geo-overlay .geo-error { color: #ff6b6b; }
.geo-overlay button { margin-top: 16px; background: var(--cyan); color: var(--blue);
  border: none; padding: 10px 28px; border-radius: 6px; font-size: 14px;
  font-weight: 700; cursor: pointer; text-transform: uppercase; letter-spacing: 0.08em; }


/* CONTROLS */
.controls {
  background: var(--blue); padding: 14px 32px;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
/* No filtro "Arte no seu tempo" (imperd), esconde busca, toggles e limpar filtros */
body.filter-imperd .controls { display: none; }
#search {
  flex: 1; min-width: 200px; max-width: 360px;
  padding: 7px 12px; border: 1px solid var(--cream); border-radius: 4px;
  font-size: 13px; outline: none; transition: border-color .2s;
  background: transparent; color: var(--cream);
  letter-spacing: 0.05em;
}
#search:focus { border-color: var(--cream); }
#search::placeholder { color: var(--cream); }
.controls-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.result-count { font-size: 12px; color: rgba(255,255,255,0.55); letter-spacing: 0.05em; white-space: nowrap; }
.btn {
  padding: 7px 13px; border-radius: 4px; font-size: 11px;
  cursor: pointer; letter-spacing: 0.08em; transition: all .15s; white-space: nowrap; text-transform: uppercase;
}
.btn-ghost  { background: transparent; border: 1px solid rgba(254,240,239,0.55); color: rgba(255,255,255,0.55); }
.btn-ghost:hover { border-color: var(--cream); color: var(--cream); }
#month-select {
  padding: 7px 28px 7px 12px; border: 1px solid var(--cream); border-radius: 4px;
  font-size: 13px; outline: none; transition: border-color .2s;
  cursor: pointer; background: transparent; color: var(--white);
  letter-spacing: 0.08em; text-transform: uppercase; min-width: 120px;
  color: var(--cream);
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23fef0ef'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
}
#month-select:focus { border-color: var(--cream); }
#month-select option { background: var(--blue); color: var(--white); }
#bairro-select, #cidade-select {
  padding: 7px 28px 7px 12px; border: 1px solid var(--cream); border-radius: 4px;
  font-size: 13px; outline: none; transition: border-color .2s;
  cursor: pointer; background: transparent; color: var(--cream);
  letter-spacing: 0.08em; text-transform: uppercase; min-width: 140px;
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23fef0ef'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
}
#bairro-select:focus, #cidade-select:focus { border-color: var(--cream); }
#bairro-select option, #cidade-select option { background: var(--blue); color: var(--white); }
.stats-suggest {
  font-size: 13px; letter-spacing: 0.02em; white-space: nowrap;
  background: var(--cream); color: var(--blue);
  padding: 6px 14px; border-radius: 20px; font-weight: 600;
  margin-left: auto;
}
.stats-suggest a { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; }
.stats-suggest a:hover { opacity: 0.75; }
/* TABLE */
.table-wrap { padding: 20px 32px 60px; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th {
  background: var(--blue); color: var(--white);
  padding: 10px 14px; text-align: left;
  font-size: 9px; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 600;
  cursor: pointer; user-select: none; white-space: nowrap;
  transition: background .15s; border-right: 1px solid rgba(255,255,255,0.15);
}
thead th:last-child { border-right: none; }
thead th:hover { background: #1a1bff; }
thead th.sorted-asc::after  { content: ' ↑'; color: var(--cyan); }
thead th.sorted-desc::after { content: ' ↓'; color: var(--cyan); }
tbody tr {
  border-bottom: 1px solid var(--blue); transition: background .1s;
  border-left: 3px solid transparent;
}
tbody tr.encerrado {
  border-bottom: 1px solid #e8e8e8;
}
tbody tr:hover { background: var(--blue) !important; }
tbody tr:hover td { color: var(--cream) !important; }
tbody tr:hover td a { color: var(--cream) !important; }
tbody tr.urgente    { background: var(--cream); border-left-color: transparent; }
tbody tr.atencao    { background: var(--cream); border-left-color: transparent; }
tbody tr.pular      { background: var(--cream); }
tbody tr.futuras    { background: var(--cream); border-left-color: transparent; }
tbody tr.indefinido { background: var(--cream); border-left-color: transparent; }
tbody tr.encerrado  { background: var(--cream); border-left-color: transparent; opacity: .45; }
tbody tr.encerrado td { color: var(--encerrado-text); }
td { padding: 10px 14px; vertical-align: top; line-height: 1.5; }

/* DAY BADGES */
.day-badge {
  display: inline-block; background: var(--blue); color: var(--white);
  padding: 4px 10px; border-radius: 4px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.04em; white-space: nowrap;
}
.icard .day-badge {
  background: var(--blue); color: var(--cream);
  font-size: 23px; padding: 8px 16px; border-radius: 6px;
  text-transform: lowercase;
}
.day-hoje {
  display: inline-block; background: var(--blue); color: var(--white);
  padding: 4px 10px; border-radius: 4px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.04em; white-space: nowrap;
}
.icard .day-hoje {
  background: var(--blue); color: var(--cream);
  font-size: 23px; padding: 8px 16px; border-radius: 6px;
  text-transform: lowercase;
}
.day-unk { font-size: 12px; color: #999; font-style: italic; }
.icard .day-unk { text-transform: lowercase; }
.day-enc { font-size: 12px; color: #999; }
.icard .day-enc { text-transform: lowercase; }

.td-local    { font-weight: 600; min-width: 150px; max-width: 210px; }
.td-titulo   { font-style: italic; min-width: 200px; }
.td-artistas { color: #555; min-width: 120px; }
.td-date     { white-space: nowrap; color: #888; font-size: 12px; }
.td-enc      { white-space: nowrap; font-size: 12px; font-weight: 700; }
.urgente .td-enc { color: var(--black); }
.atencao .td-enc { color: var(--black); }
/* Futuras: negrito na abertura, normal no encerramento */
tbody tr.futuras .td-enc  { font-weight: normal; color: #888; }
tbody tr.futuras .td-date { font-weight: 700; color: var(--black); }
.td-fonte    { white-space: nowrap; font-size: 12px; }
.fonte-link  { color: var(--blue); text-decoration: none; }
.fonte-link:hover { text-decoration: underline; }
.no-link     { color: #ccc; font-style: italic; font-size: 11px; }
.empty-state {
  text-align: center; padding: 60px 20px;
  color: var(--gray); font-size: 13px; letter-spacing: 0.08em;
}

/* QUERO IR — botão de lista pessoal */
.btn-quero-ir {
  background: var(--cream);
  border: 1.5px solid var(--blue);
  color: var(--blue);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  text-transform: uppercase;
  transition: all .15s;
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1.4;
}
.btn-quero-ir:hover {
  background: var(--blue);
  color: var(--cream);
}
.btn-quero-ir.ativo {
  background: var(--blue);
  color: var(--cream);
  border-color: var(--blue);
}
.btn-quero-ir.ativo:hover {
  background: #cc0000;
  border-color: #cc0000;
  color: var(--white);
}
.stat-pill.minha-lista        { color: var(--cream); }
.stat-pill.minha-lista.active { color: var(--cream); }
.minha-lista-heart path { fill: none; stroke: var(--cream); stroke-width: 2; }
.minha-lista-empty-state {
  display: none;
  text-align: center;
  padding: 80px 20px;
  color: var(--cream);
  font-size: 15px;
  letter-spacing: 0.06em;
  line-height: 2;
}
.minha-lista-empty-state span {
  font-size: 12px;
  opacity: 0.65;
  letter-spacing: 0.04em;
  display: block;
  margin-top: 8px;
}

/* IMPERDÍVEIS — card grid */
.imperd-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding: 32px;
  background: var(--blue);
  grid-auto-flow: dense;
}
.icard-with-img { grid-row: span 2; }
@media (max-width: 1100px) { .imperd-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 800px)  { .imperd-grid { grid-template-columns: 1fr; padding: 20px; } }


.imperd-section-title {
  color: #fef0ef;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 28px 32px 8px;
  opacity: 1;
}
@media (max-width: 800px) { .imperd-section-title { padding: 20px 20px 6px; } }


.icard {
  background: var(--cream);
  border: none;
  border-radius: 8px;
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: box-shadow .15s, transform .15s;
}
.icard:hover { box-shadow: 0 8px 32px rgba(0,0,0,0.25); transform: translateY(-3px); }
.icard-more {
  background: var(--blue);
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 6px;
  cursor: pointer; text-decoration: none;
  min-height: 220px;
  border-radius: 8px;
  grid-row: span 2;
}
.icard-more:hover { box-shadow: 0 8px 32px rgba(0,0,0,0.35); transform: translateY(-3px); }
.icard-more-sign {
  color: var(--cream);
  font-size: 80px;
  font-weight: 200;
  line-height: 1;
  transition: opacity 0.15s;
}
.icard-more-count {
  color: var(--cream);
  font-size: 19px; font-weight: 400;
  line-height: 1.45; text-transform: uppercase;
  text-align: center; padding: 0 12px;
}
.icard-img {
  width: 100%; aspect-ratio: 4/3;
  object-fit: cover; display: block;
  background: var(--black);
}
.icard-placeholder {
  width: 100%; aspect-ratio: 4/3;
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
  display: flex; align-items: center; justify-content: center;
}
.icard-placeholder-label {
  color: #444; font-size: 11px; letter-spacing: 0.2em;
  text-transform: uppercase;
}
.icard-body { padding: 20px 22px 24px; flex: 1; display: flex; flex-direction: column; gap: 10px; text-transform: uppercase; }
.icard-titulo-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.icard-titulo { font-style: normal; font-size: 25px; font-weight: 700; line-height: 1.25; color: var(--black); flex: 1; }
.btn-quero-ir-heart {
  background: none; border: none; cursor: pointer; padding: 2px;
  flex-shrink: 0; line-height: 1; transition: transform .15s;
}
.btn-quero-ir-heart:hover { transform: scale(1.15); }
.btn-quero-ir-heart svg { width: 22px; height: 22px; }
.btn-quero-ir-heart .heart-outline { fill: none; stroke: var(--blue); stroke-width: 2; }
.btn-quero-ir-heart.ativo .heart-outline { fill: var(--blue); stroke: var(--blue); }
.td-titulo::first-letter { text-transform: uppercase; }
.icard-artistas { font-size: 19px; color: var(--black); font-weight: 500; line-height: 1.45; }
.icard-local { font-size: 19px; color: var(--blue); letter-spacing: 0.06em; font-weight: 500; padding-top: 8px; line-height: 1.45; }
.local-link { color: var(--blue); text-decoration: none; border-bottom: 1.5px solid transparent; transition: border-color .15s; }
.local-link:hover { border-bottom-color: var(--blue); }
.icard-datas { font-size: 19px; color: #888; padding: 8px 0; font-weight: 200; line-height: 1.45; }
/* Box da cidade (só interior): mesmo azul do badge de dias, porém na fonte dos demais textos do card */
.icard-cidade { align-self: flex-start; display: inline-block; background: var(--cream); color: var(--blue); border: 1px solid var(--blue); font-size: 19px; padding: 4px 12px; border-radius: 4px; line-height: 1.25; }
.icard-footer { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.icard-fonte { font-size: 19px; color: var(--blue); text-decoration: none; font-weight: 600; border-bottom: 1.5px solid transparent; transition: border-color .15s; line-height: 1.45; }
.icard-fonte:hover { border-bottom-color: var(--blue); }
footer {
  background: var(--blue); padding: 30px 32px;
  font-size: 11px; letter-spacing: 0.1em;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 36px;
}
.footer-visits {
  color: var(--cream); letter-spacing: 0.1em; text-transform: uppercase;
}
.footer-meta { color: var(--cream); letter-spacing: 0.1em; text-transform: uppercase; }
body.filter-minha-lista .footer-meta { display: none; }
.footer-beta {
  font-size: 13px; letter-spacing: 0.02em; text-transform: uppercase;
  background: var(--cream); color: var(--blue);
  padding: 3px 11px; border-radius: 20px; font-weight: 600;
  margin: 60px 0;
}
.footer-links { display: flex; align-items: center; gap: 6px; }
.footer-sep { color: var(--cream); }
footer a { color: var(--cream); text-decoration: none; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 600; }
footer a:hover { opacity: 0.75; }
@media (max-width: 768px) {
  header { padding: 10px 20px 6px; flex-wrap: wrap; }   /* margens laterais = card (20px) */
  .header-logo { height: 36px; }
  .wordmark-text { font-size: 22px; }
  .wordmark-sub { font-size: 10px; }
  .header-nav { width: 100%; justify-content: flex-start; gap: 12px; margin-top: 4px; margin-left: 0; }
  .header-meta { display: none; }
  .stats-bar { padding: 3px 20px 6px; gap: 4px 10px; flex-wrap: wrap; }  /* margens laterais = card (20px) */
  .stat-pill { font-size: 15px; padding: 3px 0; letter-spacing: 0.05em; }
  .stat-pill::after { height: 1.5px; }   /* sublinhado do filtro ativo mais fino no mobile */
  .stats-suggest { display: none; }
  /* Reordenação MOBILE dos filtros (não afeta o desktop):
     Linha 1 = Arte no seu tempo + Em cartaz + Futuras | Linha 2 = Favoritas + Perto daqui */
  .stats-bar .imperd          { order: 1; }
  .stats-bar .em-cartaz       { order: 2; }
  .stats-bar .futuras         { order: 3; }
  .stats-bar .stats-bar-break { order: 4; }          /* quebra antes de Favoritas */
  .stats-bar::before          { content: none; }
  .stats-bar .minha-lista     { order: 5; }
  .stats-bar .perto-de-mim    { order: 6; }
  .controls { padding: 12px 20px; }
  .table-wrap { padding: 12px 0 40px; }
  td, th { padding: 8px 10px; }
  footer { padding: 24px 20px; }
  .city-select,
  #month-select,
  #bairro-select,
  #cidade-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23fef0ef'/%3E%3C/svg%3E") !important;
  }
}

/* ── MOBILE TABLE → CARD LAYOUT (Em Cartaz / Futuras / Encerradas) ── */
@media (max-width: 768px) {
  .table-wrap { overflow-x: visible; padding: 12px 20px 40px; }
  .table-wrap table,
  .table-wrap thead,
  .table-wrap tbody,
  .table-wrap tr,
  .table-wrap th,
  .table-wrap td { display: block; width: 100%; }

  .table-wrap thead { display: none; }

  .table-wrap tbody tr {
    background: var(--cream);
    border: none;
    border-left: none;
    border-radius: 8px;
    margin-bottom: 12px;
    padding: 16px 18px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    border-bottom: none;
  }
  .table-wrap tbody tr.urgente,
  .table-wrap tbody tr.atencao,
  .table-wrap tbody tr.pular,
  .table-wrap tbody tr.futuras,
  .table-wrap tbody tr.indefinido,
  .table-wrap tbody tr.encerrado {
    border-left: none;
  }

  .table-wrap tbody tr:hover {
    background: var(--cream) !important;
    transform: none;
  }
  .table-wrap tbody tr:hover td { color: inherit !important; }
  .table-wrap tbody tr:hover td a { color: inherit !important; }

  .table-wrap tbody td {
    padding: 3px 0;
    min-width: 0 !important;
    max-width: none !important;
    white-space: normal;
    border: none;
  }

  /* ─ Layout: title and local prominent, rest compact ─ */
  .table-wrap tbody td.td-titulo {
    font-size: 16px;
    font-weight: 600;
    font-style: italic;
    padding-bottom: 2px;
    order: 1;
  }
  .table-wrap tbody td.td-artistas {
    font-size: 13px;
    color: #555;
    padding-bottom: 4px;
    order: 2;
  }
  .table-wrap tbody td.td-local {
    font-size: 12px;
    color: var(--blue);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-weight: 700;
    padding-bottom: 8px;
    order: 3;
  }

  /* Badge / dates row */
  .table-wrap tbody td[data-label="Encerra em"],
  .table-wrap tbody td[data-label="Abre em"],
  .table-wrap tbody td[data-label="Encerramento"] {
    order: 4;
    padding-top: 6px;
  }
  .table-wrap tbody td.td-date {
    order: 5;
    font-size: 12px;
    color: #888;
  }
  .table-wrap tbody td.td-date::before {
    content: attr(data-label) ": ";
    font-weight: 600;
    color: #666;
    font-size: 10px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }
  .table-wrap tbody td.td-enc {
    order: 6;
    font-size: 12px;
  }
  .table-wrap tbody td.td-enc::before {
    content: attr(data-label) ": ";
    font-weight: 600;
    color: #666;
    font-size: 10px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }
  .table-wrap tbody td.td-fonte {
    order: 7;
    padding-top: 8px;
  }

  /* Use flexbox on tr for ordering */
  .table-wrap tbody tr {
    display: flex;
    flex-direction: column;
  }
}

/* FUTURAS — imagem inline no card mobile para imperdíveis */
.td-futuras-img { display: none; }
@media (max-width: 768px) {
  .table-wrap tbody tr.futuras-has-img { padding: 0; overflow: hidden; }
  .table-wrap tbody tr.futuras-has-img td:not(.td-futuras-img) { padding-left: 16px; padding-right: 16px; }
  .table-wrap tbody tr.futuras-has-img td.td-titulo { padding-top: 14px; }
  .table-wrap tbody tr.futuras-has-img td.td-fonte  { padding-bottom: 14px; }
  .td-futuras-img { display: block; order: 0; padding: 0 !important; width: 100%; }
  .td-futuras-img img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; border-radius: 8px 8px 0 0; }
}
/* ── LOCAL DETAIL OVERLAY ── */
.local-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 40px 20px; overflow-y: auto;
  opacity: 0; pointer-events: none; transition: opacity .25s;
}
.local-overlay.open { opacity: 1; pointer-events: auto; }
.local-panel {
  background: var(--cream); border-radius: 12px;
  width: 100%; max-width: 720px;
  box-shadow: 0 16px 60px rgba(0,0,0,0.4);
  transform: translateY(20px); transition: transform .25s;
  overflow: hidden;
}
.local-overlay.open .local-panel { transform: translateY(0); }
.local-panel-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 24px 28px 0; gap: 16px;
}
.local-panel-nome {
  font-size: 26px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--black); line-height: 1.2;
}
.local-panel-close {
  background: none; border: none; cursor: pointer;
  font-size: 40px; color: var(--blue);
  transition: transform .25s ease, opacity .15s; flex-shrink: 0; line-height: 1;
}
.local-panel-close:hover { opacity: 0.6; transform: rotate(90deg); }
.local-panel-info {
  padding: 6px 28px 20px; display: flex; flex-direction: column; gap: 10px;
}
.local-panel-address, .local-panel-hours {
  font-size: 14px; color: var(--black); letter-spacing: 0.02em; line-height: 1.4;
}
.local-panel-links {
  display: flex; gap: 20px;
}
.local-panel-links a {
  font-size: 13px; font-weight: 600; color: var(--blue); text-decoration: none;
  letter-spacing: 0.04em; text-transform: uppercase;
  border-bottom: 1.5px solid transparent; transition: border-color .15s;
}
.local-panel-links a:hover { border-bottom-color: var(--blue); }
.local-panel-map-wrap {
  position: relative; width: 100%; height: 280px; overflow: hidden;
}
.local-panel-map-wrap::after {
  content: ''; position: absolute; inset: 0;
  background: var(--blue); mix-blend-mode: color;
  pointer-events: none; z-index: 1;
}
.local-panel-map {
  width: 100%; height: 100%; border: none; display: block;
  background: var(--cream);
  filter: grayscale(1) brightness(1.1) contrast(1.05);
}
.local-panel-expos {
  padding: 20px 28px 32px;
}
.local-panel-expos-title {
  font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
  font-weight: 700; color: var(--blue); margin-bottom: 16px;
}
.local-expo-item {
  padding: 12px 0; border-bottom: 1px solid #e0e0e0;
  display: flex; flex-direction: column; gap: 4px;
}
.local-expo-item { border-bottom-color: var(--blue); }
.local-expo-item:last-child { border-bottom: none; }
.local-expo-titulo { font-weight: 600; font-style: italic; font-size: 15px; color: var(--black); text-transform: uppercase; }
.local-expo-artista { font-size: 14px; color: #555; text-transform: uppercase; }
.local-expo-datas { font-size: 13px; color: #888; }
.local-expo-badge {
  display: inline-block; font-size: 11px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 2px 8px; border-radius: 3px; margin-top: 2px; width: fit-content;
}
.local-expo-footer {
  display: flex; align-items: center; gap: 12px; margin-top: 2px;
}
.local-expo-link {
  font-size: 11px; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--blue); text-decoration: none;
  border-bottom: 1.5px solid transparent; transition: border-color .15s;
}
.local-expo-link:hover { border-bottom-color: var(--blue); }
.local-expo-badge.em-cartaz { background: var(--blue); color: var(--white); }
.local-expo-badge.futuras   { background: var(--cyan); color: var(--black); }
.local-expo-badge.encerrada { background: #e0e0e0; color: #888; }
a.local-expo-badge { text-decoration: none; cursor: pointer; transition: opacity .15s; }
a.local-expo-badge:hover { opacity: 0.7; }
@media (max-width: 768px) {
  .local-overlay { padding: 20px 12px; }
  .local-panel-nome { font-size: 20px; }
  .local-panel-header { padding: 20px 20px 0; }
  .local-panel-info { padding: 10px 20px 16px; }
  .local-panel-expos { padding: 20px 20px 28px; }
  .local-panel-map-wrap { height: 220px; }
  .icard-titulo { font-size: 26px; line-height: 1.1; }
  .icard-body { padding: 14px 20px 16px; gap: 8px; }
  .icard-artistas { line-height: 1.15; }
  .icard-local { padding-top: 0; line-height: 1.15; }
  .icard-datas { padding: 0; line-height: 1.15; }
  .icard .day-badge, .icard .day-hoje { font-size: 21px; padding: 5px 12px; }
  .icard-cidade { padding: 3px 10px; }
}
