/* ============================================
   EntroPlataforma - Cronograma de Aulas
   ============================================ */

/* Container principal */
.cronograma-container {
  min-height: 100vh;
  padding-top: 80px;
  background: var(--bg-page);
}

.cronograma-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 30px 20px;
}

/* Header */
.cronograma-header {
  margin-bottom: 30px;
  text-align: center;
}

.cronograma-header h1 {
  font-size: 28px;
  color: var(--text-dark);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.cronograma-header h1 i {
  color: var(--primary);
}

.cronograma-header p {
  color: #64748b;
  font-size: 15px;
}

/* Toggle de Unidades */
.unidade-toggle-container {
  display: flex;
  justify-content: center;
  margin-bottom: 30px;
}

.unidade-toggle {
  display: inline-flex;
  background: white;
  border-radius: 16px;
  padding: 6px;
  box-shadow: var(--shadow-card);
  border: 2px solid #e2e8f0;
}

.unidade-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border: none;
  background: transparent;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: all 0.3s ease;
}

.unidade-btn i {
  font-size: 20px;
}

.unidade-btn:hover {
  color: var(--primary);
  background: rgba(126, 34, 206, 0.05);
}

.unidade-btn.active {
  background: linear-gradient(135deg, var(--primary), #ec4899);
  color: white;
  box-shadow: 0 4px 15px rgba(126, 34, 206, 0.3);
}

/* Badge da unidade */
.unidade-info {
  margin-bottom: 25px;
}

.unidade-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 14px;
}

.unidade-badge.plaza {
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  color: white;
}

.unidade-badge.cidade-nova {
  background: linear-gradient(135deg, #0891b2, #06b6d4);
  color: white;
}

/* Seção de cada turma */
.turma-section {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  margin-bottom: 30px;
  border: 2px solid #e2e8f0;
}

.turma-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 24px;
  color: white;
}

.turma-header.matutino {
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
}

.turma-header.vespertino {
  background: linear-gradient(135deg, #3b82f6, #60a5fa);
}

.turma-header.noturno {
  background: linear-gradient(135deg, #6366f1, #818cf8);
}

.turma-header.sis-psc {
  background: linear-gradient(135deg, #10b981, #34d399);
}

.turma-header i {
  font-size: 28px;
}

.turma-header h2 {
  font-size: 20px;
  font-weight: 700;
  margin: 0;
  flex: 1;
}

.turma-horario {
  font-size: 14px;
  opacity: 0.9;
  background: rgba(255,255,255,0.2);
  padding: 6px 14px;
  border-radius: 20px;
}

/* Tabela de horários */
.horarios-grid {
  overflow-x: auto;
  padding: 20px;
}

.horarios-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.horarios-table th,
.horarios-table td {
  padding: 12px 10px;
  text-align: center;
  border: 1px solid #e2e8f0;
}

.horarios-table th {
  background: #f8fafc;
  color: #475569;
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
}

.tempo-col {
  width: 100px;
}

.tempo-cell {
  background: #f1f5f9;
  font-weight: 700;
  color: #334155;
  vertical-align: middle;
}

.tempo-horario {
  display: block;
  font-size: 10px;
  font-weight: 500;
  color: #64748b;
  margin-top: 2px;
}

/* Células especiais */
.intervalo-row {
  background: #fef3c7;
}

.intervalo-cell {
  background: linear-gradient(135deg, #fef3c7, #fde68a) !important;
  color: #92400e;
  font-weight: 600;
  text-align: center;
  border: none !important;
}

.intervalo-cell i {
  margin-right: 8px;
}

.plantao-cell {
  background: linear-gradient(135deg, #dbeafe, #bfdbfe) !important;
  color: #1e40af;
  font-weight: 600;
  text-align: center;
}

.plantao-cell i {
  margin-right: 8px;
}

.simulado-cell {
  background: linear-gradient(135deg, #f3e8ff, #e9d5ff) !important;
  color: #6b21a8;
  font-weight: 600;
  text-align: center;
}

.simulado-cell i {
  margin-right: 8px;
}

/* Badge de matéria */
.materia {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 12px;
  color: white;
  min-width: 80px;
}

/* Cores das matérias */
.materia.bio { background: linear-gradient(135deg, #84cc16, #65a30d); }
.materia.qui { background: linear-gradient(135deg, #06b6d4, #0891b2); }
.materia.fis { background: linear-gradient(135deg, #f59e0b, #d97706); }
.materia.mat { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.materia.port { background: linear-gradient(135deg, #ef4444, #dc2626); }
.materia.his { background: linear-gradient(135deg, #f97316, #ea580c); }
.materia.geo { background: linear-gradient(135deg, #10b981, #059669); }
.materia.fil { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
.materia.soc { background: linear-gradient(135deg, #14b8a6, #0d9488); }
.materia.red { background: linear-gradient(135deg, #ec4899, #db2777); }
.materia.ing { background: linear-gradient(135deg, #6366f1, #4f46e5); }
.materia.lit { background: linear-gradient(135deg, #a855f7, #9333ea); }
.materia.art { background: linear-gradient(135deg, #f472b6, #ec4899); }

/* Badge de professor */
.prof {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 11px;
  color: #1a1a1a;
  min-width: 70px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Cores dos professores - Verde (Exatas) */
.prof.danilo { background: linear-gradient(135deg, #86efac, #4ade80); }
.prof.luiz { background: linear-gradient(135deg, #86efac, #4ade80); }
.prof.lana { background: linear-gradient(135deg, #86efac, #4ade80); }
.prof.yvens { background: linear-gradient(135deg, #86efac, #4ade80); }
.prof.raul { background: linear-gradient(135deg, #86efac, #4ade80); }
.prof.walter { background: linear-gradient(135deg, #86efac, #4ade80); }

/* Cores dos professores - Laranja/Amarelo (Natureza) */
.prof.butel { background: linear-gradient(135deg, #fcd34d, #fbbf24); }
.prof.daniel { background: linear-gradient(135deg, #fdba74, #fb923c); }

/* Cores dos professores - Azul (Humanas) */
.prof.ollavo { background: linear-gradient(135deg, #93c5fd, #60a5fa); }
.prof.hudson { background: linear-gradient(135deg, #93c5fd, #60a5fa); }
.prof.lucas { background: linear-gradient(135deg, #93c5fd, #60a5fa); }

/* Cores dos professores - Rosa/Roxo (Linguagens) */
.prof.flavia { background: linear-gradient(135deg, #f9a8d4, #f472b6); }
.prof.thiago { background: linear-gradient(135deg, #c4b5fd, #a78bfa); }

/* Linha GERAL */
.geral-row {
  background: #fef3c7;
}

.geral-row .tempo-cell {
  background: linear-gradient(135deg, #fbbf24, #f59e0b) !important;
  color: white;
  font-weight: 700;
}

/* Legenda */
.legenda-container {
  background: white;
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow-card);
  margin-top: 30px;
}

.legenda-container h3 {
  font-size: 16px;
  color: var(--text-dark);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.legenda-container h3 i {
  color: var(--primary);
}

.legenda-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.legenda-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #475569;
}

.legenda-cor {
  width: 16px;
  height: 16px;
  border-radius: 4px;
}

.legenda-cor.bio { background: linear-gradient(135deg, #84cc16, #65a30d); }
.legenda-cor.qui { background: linear-gradient(135deg, #06b6d4, #0891b2); }
.legenda-cor.fis { background: linear-gradient(135deg, #f59e0b, #d97706); }
.legenda-cor.mat { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.legenda-cor.port { background: linear-gradient(135deg, #ef4444, #dc2626); }
.legenda-cor.his { background: linear-gradient(135deg, #f97316, #ea580c); }
.legenda-cor.geo { background: linear-gradient(135deg, #10b981, #059669); }
.legenda-cor.fil { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
.legenda-cor.soc { background: linear-gradient(135deg, #14b8a6, #0d9488); }
.legenda-cor.red { background: linear-gradient(135deg, #ec4899, #db2777); }
.legenda-cor.ing { background: linear-gradient(135deg, #6366f1, #4f46e5); }
.legenda-cor.lit { background: linear-gradient(135deg, #a855f7, #9333ea); }
.legenda-cor.art { background: linear-gradient(135deg, #f472b6, #ec4899); }

/* Animação de entrada */
.unidade-content {
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive */
@media (max-width: 900px) {
  .horarios-table {
    font-size: 12px;
  }

  .materia {
    padding: 4px 8px;
    font-size: 11px;
    min-width: 60px;
  }

  .tempo-horario {
    font-size: 9px;
  }

  .turma-header {
    flex-wrap: wrap;
  }

  .turma-horario {
    margin-top: 8px;
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 768px) {
  .cronograma-content {
    padding: 20px 15px;
  }

  .cronograma-header h1 {
    font-size: 22px;
  }

  .unidade-toggle {
    flex-direction: column;
    width: 100%;
    max-width: 300px;
  }

  .unidade-btn {
    justify-content: center;
    width: 100%;
  }

  .turma-header h2 {
    font-size: 16px;
  }

  .turma-header i {
    font-size: 22px;
  }

  .horarios-grid {
    padding: 10px;
  }

  .horarios-table th,
  .horarios-table td {
    padding: 8px 4px;
  }

  .materia {
    padding: 4px 6px;
    font-size: 10px;
    min-width: auto;
  }

  .legenda-grid {
    gap: 8px;
  }

  .legenda-item {
    font-size: 12px;
  }
}

@media (max-width: 500px) {
  .horarios-table {
    font-size: 10px;
  }

  .materia {
    padding: 3px 5px;
    font-size: 9px;
    border-radius: 4px;
  }

  .tempo-cell {
    font-size: 11px;
  }

  .tempo-horario {
    display: none;
  }

  .intervalo-cell,
  .plantao-cell,
  .simulado-cell {
    font-size: 11px;
  }

  .intervalo-cell i,
  .plantao-cell i,
  .simulado-cell i {
    display: none;
  }
}
