/* ========================================
   CSS CONSOLIDADO - JC BOTELHO.COM
   ======================================== */

/* ========================================
   VARIÁVEIS CSS
   ======================================== */
:root {
  --primary: #000;
  --secondary: #666;
  --accent: #facc15;
  --orange: #FFA500;
  --bg: #f5f5f5;
  --card: #fff;
  --muted: #e0e0e0;
  --link: #3b82f6;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* ========================================
   RESET E BASE
   ======================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font);
  background-color: var(--bg);
  color: var(--primary);
  margin: 0;
  padding: 0;
  line-height: 1.6;
}

/* ========================================
   SITE PRINCIPAL (index.php)
   ======================================== */
body.main-site {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  padding-top: 60px; /* Espaço para o header fixo */
  min-height: 100vh;
}

/* Header Laranja com ícones - FIXO NO TOPO */
header {
  background: linear-gradient(135deg, #FFA500 0%, #FF8C00 100%);
  color: #000;
  padding: 0.8rem 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60px;
}

header .header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1200px;
}

header .menu-icon,
header .info-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.5rem;
  color: #000;
  background: none;
  border: none;
  padding: 0;
}

header .site-title-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: center;
  transition: opacity 0.2s ease;
}

header .site-title-link:hover {
  opacity: 0.8;
}

header .site-title {
  font-size: 1.5rem;
  font-weight: bold;
  margin: 0;
  font-family: 'Georgia', serif;
  font-style: italic;
  cursor: pointer;
}

header img {
  display: none; /* Esconder foto na versão mobile */
}

h1 {
  font-size: 1.5rem;
  margin: 0;
  font-weight: bold;
}

h2 {
  font-size: 1rem;
  color: var(--secondary);
  margin: 0;
  font-weight: normal;
}

p.description {
  margin: 0.5rem auto;
  color: var(--secondary);
  max-width: 500px;
}

nav {
  display: none; /* Esconder links no header */
}

hr {
  display: none; /* Remover linha horizontal */
}

main {
  flex: 1;
  padding: 1.5rem 1rem;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}

.location-info {
  background: #fff;
  padding: 1rem;
  margin: 0 0.5rem 1.5rem 0.5rem;
  border-radius: 8px;
  border-left: 4px solid var(--orange);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.location-info p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--primary);
}

main h2 {
  font-size: 1.1rem;
  text-align: left;
  margin: 0 0 0.5rem 0;
  padding: 0 0.5rem;
  font-weight: bold;
}

main > p {
  text-align: left;
  margin: 0 0 1.5rem 0;
  padding: 0 0.5rem;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--primary);
}

.cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 1rem;
  padding: 0 0.5rem;
}

.card-link {
  text-decoration: none;
  color: inherit;
  width: 100%;
}

.card {
  background: var(--card);
  padding: 1.25rem;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--muted);
  width: 100%;
  box-sizing: border-box;
  text-align: left;
  transition: all 0.2s ease-in-out;
}

.card:hover,
.card:focus {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

/* Se for o último item ímpar, ocupar 100% */
.card-link:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.card h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.card p {
  font-size: 0.9rem;
  color: var(--secondary);
  margin: 0;
  line-height: 1.5;
}

footer {
  margin-top: auto;
  padding: 1.5rem 1rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--secondary);
  background: #fff;
  border-top: 1px solid var(--muted);
}

footer p {
  margin: 0;
}

/* ========================================
   PLAYER DE MÚSICA (cd-uma-so-pj)
   ======================================== */
body.player-page {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  color: #333;
  padding-top: 60px; /* Espaço para o header fixo */
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.player-header {
  text-align: center;
  margin-bottom: 30px;
}

.player-header h1 {
  color: white;
  font-size: 2.5rem;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.player-header h1 i {
  margin-right: 10px;
  color: #ffd700;
}

.player-main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  align-items: start;
}

/* Player Container */
.player-container {
  background: white;
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
  position: sticky;
  top: 20px;
}

.player-info {
  text-align: center;
  margin-bottom: 30px;
}

.album-art {
  margin-bottom: 20px;
}

.album-art img {
  width: 200px;
  height: 200px;
  border-radius: 15px;
  box-shadow: 0 10px 20px rgba(0,0,0,0.2);
  object-fit: cover;
}

.track-info h2 {
  font-size: 1.5rem;
  margin-bottom: 5px;
  color: #333;
}

.track-info p {
  color: #666;
  font-size: 1.1rem;
}

/* Player Controls */
.player-controls {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.progress-container {
  width: 100%;
}

.progress-bar {
  width: 100%;
  height: 6px;
  background: #e0e0e0;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 10px;
  cursor: pointer;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #667eea, #764ba2);
  width: 0%;
  transition: width 0.1s ease;
}

.time-display {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: #666;
}

.control-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
}

.control-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #667eea;
  cursor: pointer;
  padding: 10px;
  border-radius: 50%;
  transition: all 0.3s ease;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.control-btn:hover {
  background: #f0f0f0;
  transform: scale(1.1);
}

.play-btn {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  font-size: 1.8rem;
  width: 60px;
  height: 60px;
}

.play-btn:hover {
  background: linear-gradient(135deg, #5a6fd8, #6a4190);
  transform: scale(1.1);
}

.volume-control {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
}

.volume-control i {
  color: #667eea;
  font-size: 1.2rem;
}

#volumeSlider {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: #e0e0e0;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

#volumeSlider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #667eea;
  cursor: pointer;
}

#volumeSlider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #667eea;
  cursor: pointer;
  border: none;
}

/* Playlist Container */
.playlist-container {
  background: white;
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.playlist-container h3 {
  margin-bottom: 20px;
  color: #333;
  font-size: 1.5rem;
}

.playlist-container h3 i {
  margin-right: 10px;
  color: #667eea;
}

.search-container {
  position: relative;
  margin-bottom: 20px;
}

.search-container input {
  width: 100%;
  padding: 12px 40px 12px 15px;
  border: 2px solid #e0e0e0;
  border-radius: 25px;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.3s ease;
}

.search-container input:focus {
  border-color: #667eea;
}

.search-container i {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #666;
}

.playlist {
  max-height: 500px;
  overflow-y: auto;
}

.playlist-item {
  display: flex;
  align-items: center;
  padding: 15px;
  border-radius: 10px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.playlist-item:hover {
  background: #f8f9fa;
  border-color: #e0e0e0;
}

.playlist-item.active {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border-color: #667eea;
}

.playlist-item.active .song-info h4,
.playlist-item.active .song-info p {
  color: white;
}

.playlist-item img {
  width: 50px;
  height: 50px;
  border-radius: 8px;
  margin-right: 15px;
  object-fit: cover;
}

.song-info {
  flex: 1;
}

.song-info h4 {
  font-size: 1rem;
  margin-bottom: 5px;
  color: #333;
}

.song-info p {
  font-size: 0.9rem;
  color: #666;
}

.song-duration {
  color: #999;
  font-size: 0.9rem;
}

.playlist-item.active .song-duration {
  color: rgba(255,255,255,0.8);
}

/* ========================================
   GERADOR CPF/CNPJ
   ======================================== */
body.gerador-page {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  padding-top: 60px; /* Espaço para o header fixo */
  min-height: 100vh;
}

body.gerador-page main {
  flex: 1;
  padding: 1.5rem 1rem;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}

.gerador-container {
  background: var(--card);
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--muted);
  max-width: 600px;
  width: 100%;
  box-sizing: border-box;
  margin: 0 auto;
}

.gerador-container h1 {
  color: var(--primary);
  margin: 0 0 1.5rem 0;
  font-size: 1.5rem;
  font-weight: bold;
  text-align: left;
}

.aviso-importante {
  background: #fff3cd;
  border-left: 4px solid #ffc107;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  line-height: 1.5;
}

.aviso-legal {
  background: #e3f2fd;
  border-left: 4px solid #2196f3;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  line-height: 1.5;
}

.tipo-selector {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 480px) {
  .tipo-selector {
    grid-template-columns: 1fr;
  }
}

.tipo-btn {
  padding: 1rem;
  border: 2px solid var(--muted);
  background: #fff;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font);
}

.tipo-btn:hover {
  border-color: var(--orange);
  background: #fff3e0;
}

.tipo-btn.active {
  border-color: var(--orange);
  background: var(--orange);
  color: #fff;
}

.opcoes-formatacao {
  margin-bottom: 1.5rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.95rem;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.btn-gerar {
  width: 100%;
  padding: 14px 20px;
  background: var(--orange);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font);
}

.btn-gerar:hover {
  background: #FF8C00;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 165, 0, 0.3);
}

#resultado {
  margin-top: 1.5rem;
}

.documento-gerado {
  background: linear-gradient(135deg, #FFA500 0%, #FF8C00 100%);
  padding: 1.5rem;
  border-radius: 8px;
  text-align: center;
  color: #fff;
}

.tipo-doc {
  margin: 0 0 0.5rem 0;
  font-size: 0.9rem;
  opacity: 0.9;
}

.numero-doc {
  font-size: 1.8rem;
  font-weight: bold;
  margin: 0 0 1rem 0;
  letter-spacing: 2px;
  font-family: 'Courier New', monospace;
}

.btn-copiar {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border: 2px solid #fff;
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font);
}

.btn-copiar:hover {
  background: #fff;
  color: var(--orange);
}

.info-adicional {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--muted);
}

.info-adicional h3 {
  font-size: 1.1rem;
  margin: 0 0 1rem 0;
  color: var(--primary);
}

.info-adicional p {
  margin: 0.5rem 0;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--secondary);
}

/* ========================================
   SORTEADOR
   ======================================== */
body.sorteador-page {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  padding-top: 60px; /* Espaço para o header fixo */
  min-height: 100vh;
}

body.sorteador-page main {
  flex: 1;
  padding: 1.5rem 1rem;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}

.sorteador-container {
  background: var(--card);
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--muted);
  max-width: 600px;
  width: 100%;
  box-sizing: border-box;
  margin: 0 auto;
}

.sorteador-container h1 {
  color: var(--primary);
  margin: 0 0 1.5rem 0;
  font-size: 1.5rem;
  font-weight: bold;
  text-align: left;
}

.sorteador-container label {
  display: block;
  text-align: left;
  margin: 1rem 0 0.5rem 0;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.95rem;
}

.sorteador-container input {
  margin: 0 0 0.5rem 0;
  padding: 12px 14px;
  font-size: 16px;
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--muted);
  border-radius: 8px;
  font-family: var(--font);
  transition: all 0.2s ease;
  background: #fff;
}

.sorteador-container input:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255, 165, 0, 0.1);
}

.sorteador-container button {
  margin: 1rem 0 0.5rem 0;
  padding: 14px 20px;
  font-size: 16px;
  width: 100%;
  box-sizing: border-box;
  border: none;
  border-radius: 8px;
  font-family: var(--font);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sorteador-container button:first-of-type {
  background: var(--orange);
  color: #fff;
}

.sorteador-container button:first-of-type:hover {
  background: #FF8C00;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 165, 0, 0.3);
}

#countdown, #result {
  font-size: 1.1rem;
  margin-top: 1.5rem;
  padding: 1rem;
  background: #f9f9f9;
  border-radius: 8px;
  font-weight: 600;
  color: var(--primary);
  text-align: center;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1.6;
}

#countdown:empty,
#result:empty {
  display: none;
}

#result {
  background: linear-gradient(135deg, #FFA500 0%, #FF8C00 100%);
  color: #fff;
  font-size: 1.2rem;
}

#countdown {
  background: #fff3e0;
  color: #FF8C00;
}

/* ========================================
   RESPONSIVIDADE
   ======================================== */

/* Desktop - 769px e acima */
@media (min-width: 769px) {
  main {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
  }
  
  .cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    padding: 0;
  }
  
  .location-info {
    margin: 0 0 2rem 0;
  }
  
  main h2 {
    padding: 0;
  }
  
  main > p {
    padding: 0;
  }
  
  /* Sorteador Desktop */
  body.sorteador-page main {
    max-width: 700px;
    padding: 2rem;
  }
  
  .sorteador-container {
    padding: 2rem;
  }
  
  .sorteador-container h1 {
    font-size: 1.8rem;
  }
  
  /* Gerador Desktop */
  body.gerador-page main {
    max-width: 700px;
    padding: 2rem;
  }
  
  .gerador-container {
    padding: 2rem;
  }
  
  .gerador-container h1 {
    font-size: 1.8rem;
  }
  
  .numero-doc {
    font-size: 2rem;
  }
}

/* Tablets */
@media (max-width: 768px) {
  .player-main {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .player-container {
    position: static;
    padding: 20px;
  }
  
  .album-art img {
    width: 150px;
    height: 150px;
  }
  
  .control-buttons {
    gap: 15px;
  }
  
  .control-btn {
    width: 45px;
    height: 45px;
    font-size: 1.3rem;
  }
  
  .play-btn {
    width: 55px;
    height: 55px;
    font-size: 1.6rem;
  }
  
  .player-header h1 {
    font-size: 2rem;
  }
  
  .container {
    padding: 15px;
  }
  
  /* Sorteador - tablets */
  .sorteador-container {
    max-width: 600px;
    padding: 1.5rem;
  }
  
  .sorteador-container h1 {
    font-size: 1.5rem;
  }
}

@media (max-width: 600px) {
  .cards {
    grid-template-columns: 1fr;
  }
  
  /* Remover regra do último item em mobile */
  .card-link:last-child:nth-child(odd) {
    grid-column: auto;
  }
  
  .sorteador-container {
    padding: 1.25rem;
  }
  
  .sorteador-container h1 {
    font-size: 1.3rem;
  }
  
  .sorteador-container label {
    font-size: 0.9rem;
  }
  
  .sorteador-container input, 
  .sorteador-container button {
    font-size: 16px; /* Previne zoom no iOS */
  }
  
  #countdown, #result {
    font-size: 1rem;
    padding: 0.875rem;
  }
}

@media (max-width: 480px) {
  .player-container,
  .playlist-container {
    padding: 15px;
  }
  
  .album-art img {
    width: 120px;
    height: 120px;
  }
  
  .track-info h2 {
    font-size: 1.3rem;
  }
  
  .control-buttons {
    gap: 10px;
  }
  
  .control-btn {
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
  }
  
  .play-btn {
    width: 50px;
    height: 50px;
    font-size: 1.4rem;
  }
  
  /* Sorteador - telas muito pequenas */
  .sorteador-container {
    padding: 1rem;
  }
  
  .sorteador-container h1 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
  }
  
  .sorteador-container label {
    font-size: 0.875rem;
    margin: 0.875rem 0 0.4rem 0;
  }
  
  .sorteador-container input, 
  .sorteador-container button {
    padding: 12px;
    font-size: 16px;
  }
  
  #countdown, #result {
    font-size: 0.95rem;
    margin-top: 1rem;
    padding: 0.75rem;
  }
}

/* ========================================
   TRENS DE SP
   ======================================== */
body.trens-page {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  padding-top: 60px; /* Espaço para o header fixo */
  min-height: 100vh;
}

body.trens-page main {
  flex: 1;
  padding: 1.5rem 1rem;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}

.trens-container {
  max-width: 900px;
  width: 100%;
  box-sizing: border-box;
  margin: 0 auto;
}

.trens-container h1 {
  color: var(--primary);
  margin: 0 0 1rem 0;
  font-size: 1.8rem;
  font-weight: bold;
  text-align: center;
}

.trens-info {
  background: #e3f2fd;
  border-left: 4px solid #2196f3;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  text-align: center;
}

.trens-info p {
  margin: 0.5rem 0;
  font-size: 0.95rem;
}

.ultima-atualizacao {
  font-weight: 600;
  color: #2196f3;
}

.filtros {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.filtro-btn {
  padding: 0.625rem 1rem;
  border: 2px solid var(--muted);
  background: #fff;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font);
}

.filtro-btn:hover {
  border-color: var(--orange);
  background: #fff3e0;
}

.filtro-btn.active {
  border-color: var(--orange);
  background: var(--orange);
  color: #fff;
}

.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
  gap: 1rem;
}

.spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid var(--orange);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.erro {
  background: #ffebee;
  border-left: 4px solid #f44336;
  padding: 2rem;
  border-radius: 8px;
  text-align: center;
}

.btn-recarregar {
  margin-top: 1rem;
  padding: 0.75rem 1.5rem;
  background: var(--orange);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-recarregar:hover {
  background: #FF8C00;
  transform: translateY(-2px);
}

.linhas-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.linha-card {
  background: var(--card);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: all 0.2s ease;
}

.linha-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.linha-card.problema {
  border: 2px solid #ff9800;
}

.linha-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: #f9f9f9;
}

.linha-info h3 {
  margin: 0 0 0.25rem 0;
  font-size: 1rem;
  font-weight: 700;
}

.linha-tipo {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  background: #e0e0e0;
  color: #666;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 4px;
}

.linha-status-icon {
  font-size: 1.5rem;
}

.linha-status {
  padding: 1rem;
}

.situacao {
  font-weight: 700;
  margin: 0 0 0.5rem 0;
}

.situacao.normal {
  color: #4caf50;
}

.situacao.problema {
  color: #f44336;
}

.descricao {
  margin: 0;
  font-size: 0.9rem;
  color: var(--secondary);
  line-height: 1.5;
}

.creditos {
  text-align: center;
  padding: 1.5rem;
  border-top: 1px solid var(--muted);
  margin-top: 2rem;
}

.creditos p {
  margin: 0.5rem 0;
  font-size: 0.9rem;
  color: var(--secondary);
}

.creditos a {
  color: var(--link);
  text-decoration: none;
  font-weight: 600;
}

.creditos a:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .trens-container h1 {
    font-size: 1.5rem;
  }
  
  .linhas-container {
    grid-template-columns: 1fr;
  }
  
  .filtros {
    gap: 0.5rem;
  }
  
  .filtro-btn {
    font-size: 0.85rem;
    padding: 0.5rem 0.875rem;
  }
}

@media (min-width: 769px) {
  body.trens-page main {
    padding: 2rem;
  }
  
  .trens-container h1 {
    font-size: 2rem;
  }
}

/* ========================================
   MENU DRAWER (LATERAL)
   ======================================== */
.menu-drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9998;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.menu-drawer-overlay.open {
  opacity: 1;
}

.menu-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 280px;
  max-width: 85vw;
  background: #fff;
  z-index: 9999;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  box-shadow: 2px 0 12px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
}

.menu-drawer.open {
  transform: translateX(0);
}

.menu-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  background: linear-gradient(135deg, #FFA500 0%, #FF8C00 100%);
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.menu-drawer-header h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
}

.menu-drawer-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  padding: 0;
  line-height: 1;
}

.menu-drawer-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

.menu-drawer-content {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 1rem;
  background: #fff;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.menu-drawer-item {
  display: flex !important;
  align-items: center;
  padding: 1rem 1.25rem;
  margin: 0.25rem 0;
  color: #000 !important;
  text-decoration: none;
  font-size: 1.05rem;
  font-weight: 500;
  border-radius: 8px;
  transition: all 0.2s ease;
  background: #fff;
  border: 1px solid #e0e0e0;
  min-height: 48px;
  box-sizing: border-box;
  flex-shrink: 0;
}

.menu-drawer-item:hover {
  background: #f5f5f5;
  border-color: var(--orange);
  padding-left: 1.5rem;
}

.menu-drawer-item:active {
  background: #fff3e0;
}

/* ========================================
   SCROLLBAR PERSONALIZADA
   ======================================== */
.playlist::-webkit-scrollbar {
  width: 6px;
}

.playlist::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.playlist::-webkit-scrollbar-thumb {
  background: #667eea;
  border-radius: 3px;
}

.playlist::-webkit-scrollbar-thumb:hover {
  background: #5a6fd8;
}

/* ========================================
   PWA STYLES
   ======================================== */
.pwa-install-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 1rem;
}

.pwa-install-content {
  background: white;
  border-radius: 12px;
  max-width: 400px;
  width: 100%;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  animation: pwaModalSlideIn 0.3s ease-out;
}

@keyframes pwaModalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.pwa-install-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 1.5rem 0 1.5rem;
  border-bottom: 1px solid #e0e0e0;
}

.pwa-install-header h3 {
  margin: 0;
  color: #333;
  font-size: 1.2rem;
}

.pwa-close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #666;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.2s;
}

.pwa-close-btn:hover {
  background: #f0f0f0;
}

.pwa-install-body {
  padding: 1.5rem;
}

.pwa-install-body p {
  margin: 0 0 1rem 0;
  color: #333;
  line-height: 1.5;
}

.pwa-install-body ul {
  margin: 0;
  padding-left: 1.2rem;
  color: #555;
}

.pwa-install-body li {
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.pwa-install-footer {
  padding: 0 1.5rem 1.5rem 1.5rem;
  display: flex;
  gap: 0.75rem;
}

.pwa-install-btn-modal {
  flex: 1;
  background: #FFA500;
  color: #000;
  border: none;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.2s;
}

.pwa-install-btn-modal:hover {
  background: #FF8C00;
}

.pwa-cancel-btn {
  flex: 1;
  background: #f8f9fa;
  color: #666;
  border: 1px solid #dee2e6;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.2s;
}

.pwa-cancel-btn:hover {
  background: #e9ecef;
}

.pwa-success-toast,
.pwa-error-toast {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10001;
  animation: pwaToastSlideIn 0.3s ease-out;
}

@keyframes pwaToastSlideIn {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.pwa-success-content,
.pwa-error-content {
  background: white;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 250px;
}

.pwa-success-content {
  border-left: 4px solid #28a745;
}

.pwa-error-content {
  border-left: 4px solid #dc3545;
}

.pwa-success-content button,
.pwa-error-content button {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: #666;
  padding: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pwa-status {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 500;
}

.pwa-status.installed {
  background: #d4edda;
  color: #155724;
}

.pwa-status.available {
  background: #d1ecf1;
  color: #0c5460;
}

.pwa-status.unavailable {
  background: #f8d7da;
  color: #721c24;
}

.pwa-install-btn {
  background: #FFA500;
  color: #000;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background-color 0.2s;
}

.pwa-install-btn:hover:not(:disabled) {
  background: #FF8C00;
}

.pwa-install-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.pwa-install-btn.installed {
  background: #28a745;
  color: white;
}

/* Estilos específicos para PWA standalone */
body.pwa-standalone header {
  /* Header pode ter altura diferente em PWA */
  padding-top: env(safe-area-inset-top);
}
