/* ===== Base do projeto existente ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  /* Gradiente de fundo mais suave e moderno */
  background: linear-gradient(135deg, #f8f4f0 0%, #e8d5c4 30%, #d9b596 70%, #c4a373 100%);
  min-height: 100vh;
  color: var(--text-dark);
  position: relative;
}

/* Padrão sutil de fundo para dar textura */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(circle at 25% 25%, rgba(120, 79, 67, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 75% 75%, rgba(166, 124, 82, 0.05) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
}

/* Header redesenhado com mascote e layout flexível */
.header {
  text-align: center;
  margin-bottom: 40px;
  color: var(--primary-dark);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
}

.mascot-container {
  flex-shrink: 0;
}

.mascot {
  width: 80px;
  height: 80px;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(120, 79, 67, 0.3));
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

.header-text {
  text-align: left;
}

.header h1 {
  font-size: 3rem;
  margin-bottom: 10px;
  text-shadow: 2px 2px 4px rgba(120, 79, 67, 0.3);
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header .subtitle {
  font-size: 1.2rem;
  opacity: 0.9;
  margin-bottom: 10px;
  color: var(--text-dark);
}

.header .version {
  font-size: 0.9rem;
  background: linear-gradient(135deg, var(--accent) 0%, var(--light) 100%);
  color: var(--primary-dark);
  padding: 8px 20px;
  border-radius: 25px;
  display: inline-block;
  border: 2px solid var(--secondary);
  font-weight: 500;
}

/* Navegação com visual mais moderno e intuitivo */
.tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 30px;
  background: rgba(255, 255, 255, 0.9);
  padding: 10px;
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(120, 79, 67, 0.15);
  backdrop-filter: blur(10px);
}

.tab-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border: none;
  background: transparent;
  color: var(--text-dark);
  cursor: pointer;
  border-radius: 15px;
  transition: all 0.3s ease;
  font-weight: 500;
  position: relative;
  overflow: hidden;
}

.tab-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  transition: left 0.3s ease;
  z-index: -1;
}

.tab-btn:hover::before,
.tab-btn.active::before {
  left: 0;
}

.tab-btn:hover,
.tab-btn.active {
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(120, 79, 67, 0.3);
}

.tab-btn .icon {
  font-size: 1.2rem;
}

.tab-text {
  font-size: 0.95rem;
}

.auto-save-indicator {
  position: fixed;
  top: 20px;
  right: 20px;
  background: rgba(40, 167, 69, 0.9);
  color: white;
  padding: 8px 15px;
  border-radius: 20px;
  font-size: 12px;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.auto-save-indicator.show {
  opacity: 1;
}
.auto-save-indicator.error {
  background: rgba(220, 53, 69, 0.9);
}

.tab-content {
  /* Fundo com tom claro da paleta */
  background: var(--light);
  border-radius: 0 0 10px 10px;
  box-shadow: 0 2px 10px rgba(120, 79, 67, 0.15);
}
.tab-panel {
  display: none;
  padding: 30px;
}
.tab-panel.active {
  display: block;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}
.dashboard-card {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  padding: 25px;
  border-radius: 15px;
  box-shadow: 0 8px 25px rgba(120, 79, 67, 0.3);
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease;
}

.dashboard-card:hover {
  transform: translateY(-5px);
}

.dashboard-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.1);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.dashboard-card:hover::before {
  opacity: 1;
}

.dashboard-card .icon {
  font-size: 2.5rem;
  margin-bottom: 15px;
  display: block;
}

.dashboard-card .value {
  font-size: 2.5rem;
  font-weight: bold;
  margin-bottom: 10px;
}

.dashboard-card .label {
  font-size: 1rem;
  opacity: 0.9;
}

.dashboard-card.success {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}
.dashboard-card.warning {
  /* Warning com tons mais quentes da paleta */
  background: linear-gradient(135deg, var(--secondary) 0%, #d4a574 100%);
}
.dashboard-card.danger {
  background: linear-gradient(135deg, #dc3545 0%, #e83e8c 100%);
}
.dashboard-card.info {
  /* Info com tom médio da paleta */
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--accent) 100%);
}

.conflicts-panel {
  /* Painel de conflitos com tons suaves da paleta */
  background: #fbf8f5;
  border: 2px solid var(--accent);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
}
.conflicts-panel.has-conflicts {
  background: #f8d7da;
  border-color: #f5c6cb;
}
.conflicts-panel h4 {
  /* Título com cor primária */
  color: var(--primary-dark);
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.conflict-item {
  background: white;
  border: 1px solid #ffeaa7;
  border-radius: 6px;
  padding: 15px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 15px;
}
.conflict-item.error {
  border-color: #f5c6cb;
  background: #fff5f5;
}
.conflict-item.warning {
  border-color: #ffeaa7;
  background: #fffdf3;
}
.conflict-icon {
  font-size: 1.5rem;
  min-width: 30px;
}
.conflict-details {
  flex: 1;
}
.conflict-title {
  font-weight: bold;
  margin-bottom: 5px;
}
.conflict-description {
  font-size: 14px;
  color: #666;
}
.conflict-actions {
  display: flex;
  gap: 10px;
}

.workload-report {
  /* Relatório com tons azulados suaves combinando com a paleta */
  background: #f5f8fb;
  border: 2px solid #c8d6e5;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
}
.workload-report h4 {
  color: var(--primary);
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.workload-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 15px;
}
.workload-section {
  background: white;
  border-radius: 6px;
  padding: 15px;
}
.workload-section h5 {
  color: #1565c0;
  margin-bottom: 10px;
  font-size: 1rem;
}
.workload-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #e9ecef;
}
.workload-item:last-child {
  border-bottom: none;
}
.workload-name {
  flex: 1;
  font-weight: 500;
}
.workload-hours {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}
.workload-status {
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: bold;
}
.workload-status.complete {
  background: #d4edda;
  color: #155724;
}
.workload-status.incomplete {
  background: #f8d7da;
  color: #721c24;
}
.workload-status.over {
  background: #fff3cd;
  color: #856404;
}

.schedule-slot.conflict {
  background: #f8d7da !important;
  border: 2px solid #dc3545 !important;
  animation: pulse-error 2s infinite;
}
@keyframes pulse-error {
  0% {
    box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(220, 53, 69, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(220, 53, 69, 0);
  }
}
.schedule-slot.warning {
  background: #fff3cd !important;
  border: 2px solid #ffc107 !important;
}

/* Cards com visual mais elegante */
.card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 10px 40px rgba(120, 79, 67, 0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(217, 181, 150, 0.3);
}

.card h2 {
  color: var(--primary-dark);
  margin-bottom: 10px;
  font-size: 1.8rem;
}
.card > p {
  color: var(--primary);
  margin-bottom: 30px;
}

/* Sub-tabs com ícones e visual melhorado */
.sub-tabs {
  display: flex;
  gap: 5px;
  margin-bottom: 30px;
  background: var(--light);
  padding: 8px;
  border-radius: 15px;
  overflow-x: auto;
  justify-content: center;
}

.sub-tab-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border: none;
  background: transparent;
  color: var(--text-dark);
  cursor: pointer;
  border-radius: 10px;
  transition: all 0.3s ease;
  font-weight: 500;
  white-space: nowrap;
  min-width: fit-content;
}

.sub-tab-btn:hover,
.sub-tab-btn.active {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(120, 79, 67, 0.3);
}

.sub-tab-icon {
  font-size: 1.1rem;
}

.sub-panel {
  display: none;
}
.sub-panel.active {
  display: block;
}

.form-group {
  margin-bottom: 20px;
}
.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  color: #495057;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px;
  border: 2px solid #e9ecef;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.3s ease;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none; /* Focus com cor primária */
  border-color: var(--primary);
}

/* Botões com ícones e visual aprimorado */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 0.95rem;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.btn:hover::before {
  left: 100%;
}

.btn-icon {
  font-size: 1.1rem;
}

.btn-primary {
  /* Botão primário com cor da paleta */
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(120, 79, 67, 0.3);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(120, 79, 67, 0.4);
}
.btn-success {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}
.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}
.btn-danger {
  background: #dc3545;
  color: white;
}
.btn-danger:hover {
  background: #c82333;
}
.btn-secondary {
  /* Botão secundário com tom da paleta */
  background: linear-gradient(135deg, var(--accent) 0%, var(--light) 100%);
  color: var(--primary-dark);
  border: 2px solid var(--secondary);
}
.btn-secondary:hover {
  background: linear-gradient(135deg, var(--secondary) 0%, var(--accent) 100%);
  color: white;
  transform: translateY(-2px);
}
.btn-warning {
  /* Warning com tom dourado da paleta */
  background: #d4a574;
  color: white;
}
.btn-warning:hover {
  background: var(--secondary);
}
.btn-large {
  padding: 15px 30px;
  font-size: 1.1rem;
}
.btn-small {
  padding: 6px 12px;
  font-size: 12px;
}
.btn-mini {
  padding: 4px 8px;
  font-size: 11px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.section-header h3 {
  color: #2c3e50;
  font-size: 1.4rem;
}

/* Estilo para cada disciplina/turma/professor adicionada */
.item-card {
  background: #ffffff;
  border: 2px solid var(--accent);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

/* Cabeçalho do card */
.item-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}
.item-card-header h4 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary-dark);
}
.item-card-header .btn-remove {
  background: #dc3545;
  color: white;
  border: none;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.85rem;
  cursor: pointer;
}
.item-card-header .btn-remove:hover {
  background: #c82333;
}

/* Layout dos campos */
.item-card .form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 15px;
}

.item-card label {
  font-weight: 500;
  color: #495057;
}

.item-card input:not([type="checkbox"]):not([type="radio"]),
.item-card select {
  padding: 8px 10px;
  border: 1px solid #ced4da;
  border-radius: 6px;
  font-size: 0.9rem;
  transition: border-color 0.3s ease;
  /* se tiver width:100% aqui, mantém – é para campos de texto */
}

.item-card input:not([type="checkbox"]):not([type="radio"]):focus,
.item-card select:focus {
  border-color: var(--primary);
  outline: none;
}

/* opcional, deixa o checkbox e o texto alinhados bonitos */
.item-card .form-group.checkbox > label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-weight: 500;
}
.item-card .form-group.checkbox input[type="checkbox"] {
  margin: 0;
}



.subject-suggestions {
  /* Sugestões com tom verde suave combinando com a paleta */
  background: #f8fbf8;
  border: 2px solid #c8e6c9;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 20px;
}
.suggestions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
  margin-bottom: 15px;
}
.suggestion-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: white;
  border: 1px solid #c3e6cb;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 13px;
}
.suggestion-item:hover {
  background: #d4edda;
  border-color: #28a745;
}
.suggestion-item input[type="checkbox"] {
  width: auto;
  margin: 0;
}
.suggestion-item label {
  cursor: pointer;
  margin: 0;
  font-size: 13px;
  color: #495057;
}
.suggestions-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.blocos-vagos-config {
  /* Config de blocos com tom amarelado suave */
  background: #fffdf7;
  border: 2px solid var(--accent);
  border-radius: 8px;
  padding: 15px;
  margin-top: 15px;
}
.blocos-vagos-config h4 {
  color: var(--primary-dark);
  margin-bottom: 15px;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.blocos-info {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  padding: 10px;
  margin-bottom: 15px;
  font-size: 12px;
  color: #6c757d;
}
.blocos-distribution-config {
  background: white;
  border: 1px solid #ffeaa7;
  border-radius: 6px;
  padding: 15px;
  margin-top: 15px;
}
.blocos-distribution-config h5 {
  color: #856404;
  margin-bottom: 10px;
  font-size: 14px;
}
.distribution-options {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
}
.distribution-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
}
.distribution-option:hover {
  background: #f8f9fa;
}
.distribution-option.selected {
  background: #e3f2fd;
  border-color: #2196f3;
}
.distribution-option input[type="radio"] {
  width: auto;
  margin: 0;
}
.distribution-option label {
  cursor: pointer;
  margin: 0;
  font-size: 13px;
}

.availability-section {
  margin-top: 20px;
  /* Seção de disponibilidade com tons da paleta */
  border: 2px solid var(--accent);
  border-radius: 8px;
  background: #fdfcfa;
  transition: all 0.3s ease;
}
.availability-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  /* Header com tom claro da paleta */
  background: var(--accent);
  border-radius: 6px 6px 0 0;
  cursor: pointer;
  transition: all 0.3s ease;
  user-select: none;
}
.availability-header:hover {
  background: var(--secondary);
}
.availability-header h4 {
  margin: 0;
  color: var(--primary-dark);
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.collapse-icon {
  font-size: 18px;
  transition: transform 0.3s ease;
  color: var(--primary-dark);
}
.availability-section.collapsed .collapse-icon {
  transform: rotate(-90deg);
}
.availability-content {
  padding: 20px;
  display: block;
  transition: all 0.3s ease;
  max-height: 2000px;
  overflow: hidden;
}
.availability-section.collapsed .availability-content {
  max-height: 0;
  padding: 0 20px;
  opacity: 0;
}

.quick-controls {
  /* Controles rápidos com tom da paleta */
  background: #fffdf7;
  border: 1px solid var(--accent);
  border-radius: 6px;
  padding: 15px;
  margin-bottom: 20px;
}
.quick-controls h5 {
  color: var(--primary-dark);
  margin-bottom: 15px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.quick-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 15px;
}
.quick-btn {
  padding: 6px 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  transition: all 0.3s ease;
}
.quick-btn-period {
  background: #17a2b8;
  color: white;
}
.quick-btn-period:hover {
  background: #138496;
}
.quick-btn-day {
  background: #28a745;
  color: white;
}
.quick-btn-day:hover {
  background: #1e7e34;
}
.quick-btn-clear {
  background: #dc3545;
  color: white;
}
.quick-btn-clear:hover {
  background: #c82333;
}

.availability-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 15px;
  margin-top: 15px;
  user-select: none;
}
.day-column {
  text-align: center;
  background: white;
  border-radius: 6px;
  padding: 10px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.day-column h4 {
  margin-bottom: 15px;
  color: #495057;
  font-size: 14px;
  font-weight: 600;
  padding: 8px;
  background: #f8f9fa;
  border-radius: 4px;
  position: relative;
}
.day-select-all {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #28a745;
  color: white;
  border: none;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}
.day-select-all:hover {
  background: #1e7e34;
  transform: scale(1.1);
}
.time-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  padding: 6px 8px;
  border-radius: 4px;
  transition: all 0.3s ease;
  cursor: pointer;
  font-size: 12px;
}
.time-checkbox:hover {
  background: #e3f2fd;
}
.time-checkbox.selected {
  background: #c8e6c9;
  border: 1px solid #4caf50;
}
.time-checkbox input[type="checkbox"] {
  width: auto;
  cursor: pointer;
}
.time-checkbox label {
  cursor: pointer;
  margin: 0;
  font-size: 11px;
  color: #495057;
}
.time-checkbox.drag-selecting {
  background: #bbdefb !important;
  border: 1px solid #2196f3 !important;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  margin-top: 10px;
}
.checkbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
}
.checkbox-item input[type="checkbox"] {
  width: auto;
}

.progress-container {
  margin: 30px 0;
  text-align: center;
}
.progress-bar {
  width: 100%;
  height: 20px;
  background: #e9ecef;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 10px;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #28a745, #20c997);
  width: 0%;
  transition: width 0.3s ease;
}

.status-container {
  margin: 20px 0;
}
.alert {
  padding: 15px;
  border-radius: 6px;
  margin-bottom: 15px;
}
.alert-success {
  background: #d4edda;
  border: 1px solid #c3e6cb;
  color: #155724;
}
.alert-danger {
  background: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
}
.alert-info {
  background: #d1ecf1;
  border: 1px solid #bee5eb;
  color: #0c5460;
}
.alert-warning {
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  color: #856404;
}

.schedule-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
.schedule-table th,
.schedule-table td {
  border: 1px solid #dee2e6;
  padding: 12px;
  text-align: center;
  vertical-align: middle;
}
.schedule-table th {
  background: #f8f9fa;
  font-weight: 600;
  color: #495057;
}
.schedule-table .time-slot {
  background: #f8f9fa;
  font-weight: 500;
  min-width: 100px;
}
.schedule-slot {
  cursor: pointer;
  transition: background-color 0.3s ease;
  min-height: 60px;
  padding: 8px;
}
.schedule-slot:hover {
  background: #f8f9fa;
}
.slot-subject {
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 4px;
}
.slot-teacher {
  font-size: 12px;
  color: #6c757d;
  margin-bottom: 2px;
}
.slot-classroom {
  font-size: 11px;
  color: #adb5bd;
}
.empty-slot {
  color: #adb5bd;
  font-style: italic;
}

.bloco-vago-slot {
  background: #f8f9fa !important;
  border: 2px dashed #6c757d !important;
  color: #6c757d;
  font-style: italic;
  font-weight: 500;
}
.bloco-vago-slot:hover {
  background: #e9ecef !important;
}

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(38, 26, 26, 0.7);
  backdrop-filter: blur(5px);
}

.modal-content {
  /* Modal com fundo da paleta e scroll interno */
  background-color: white;
  margin: 3% auto;
  padding: 0;
  border-radius: 20px;
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  box-shadow: 0 20px 60px rgba(120, 79, 67, 0.3);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--accent);
}

.modal-content h3 {
  /* Header fixo do modal */
  margin: 0;
  padding: 25px 30px;
  color: white;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  border-radius: 20px 20px 0 0;
  flex-shrink: 0;
  font-size: 1.3rem;
}

/* Container scrollável para o conteúdo do modal */
.modal-body {
  padding: 25px 30px;
  overflow-y: auto; /* Scroll interno apenas no conteúdo */
  flex: 1;
  max-height: calc(90vh - 160px); /* Altura considerando header e footer */
}

.modal-actions {
  /* Footer fixo do modal */
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding: 20px 30px;
  background: var(--light);
  border-top: 1px solid var(--accent);
  border-radius: 0 0 20px 20px;
  flex-shrink: 0; /* Impede que o footer encolha */
}

.form-actions {
  text-align: center;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--accent);
}

.info-box {
  /* Info box com tons da paleta */
  background: #f5f8fb;
  border: 1px solid var(--accent);
  border-radius: 8px;
  padding: 20px;
  margin-top: 30px;
}
.info-box h4 {
  color: var(--primary);
  margin-bottom: 15px;
  font-size: 1.1rem;
}
.info-box ul {
  list-style: none;
  padding-left: 0;
}
.info-box li {
  margin-bottom: 8px;
  padding-left: 20px;
  position: relative;
}
.info-box li:before {
  content: "•";
  color: #1565c0;
  font-weight: bold;
  position: absolute;
  left: 0;
}

.export-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 30px;
}
.export-preview {
  border: 2px solid #e9ecef;
  border-radius: 8px;
  padding: 20px;
  margin: 20px 0;
  background: white;
}
.export-header {
  text-align: center;
  margin-bottom: 20px;
}
.export-header h2 {
  font-size: 1.5rem;
  color: #2c3e50;
  margin-bottom: 5px;
}
.export-header p {
  color: #6c757d;
}

.editor-controls {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
}
.editor-controls label {
  font-weight: 500;
  color: #495057;
}
.editor-controls select {
  min-width: 200px;
  padding: 8px 12px;
  border: 2px solid #e9ecef;
  border-radius: 6px;
  font-size: 14px;
}

.turno-config {
  background: #f0f8ff;
  border: 2px solid #e3f2fd;
  border-radius: 8px;
  padding: 15px;
  margin-top: 15px;
}
.turno-config h4 {
  color: #1565c0;
  margin-bottom: 15px;
  font-size: 1.1rem;
}
.turno-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-bottom: 15px;
}
.intervalo-item {
  background: white;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 10px;
  margin-bottom: 10px;
}
.intervalo-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.intervalo-header h5 {
  margin: 0;
  color: #495057;
  font-size: 14px;
}
.time-input {
  width: 80px;
  padding: 5px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 12px;
}
.turno-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}
.turno-matutino {
  background: #e3f2fd;
  color: #1565c0;
}
.turno-vespertino {
  background: #fff3e0;
  color: #ef6c00;
}
.turno-noturno {
  background: #f3e5f5;
  color: #7b1fa2;
}


.pontuacao-alta {
  background: linear-gradient(135deg, #28a745, #20c997);
  color: white;
}
.pontuacao-media {
  /* Pontuação média com tons da paleta */
  background: linear-gradient(135deg, var(--secondary), #d4a574);
  color: white;
}
.pontuacao-baixa {
  background: linear-gradient(135deg, #dc3545, #e83e8c);
  color: white;
}
.pontuacao-input {
  width: 100px !important;
  text-align: center;
  font-weight: bold;
  font-size: 16px;
}
.pontuacao-info {
  /* Info de pontuação com tons da paleta */
  background: #fffdf7;
  border: 1px solid var(--accent);
  border-radius: 8px;
  padding: 15px;
  margin-top: 20px;
}
.pontuacao-info h4 {
  color: var(--primary-dark);
  margin-bottom: 10px;
  font-size: 1rem;
}
.pontuacao-ranking {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 15px;
  margin-top: 20px;
}
.ranking-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #e9ecef;
}
.ranking-item:last-child {
  border-bottom: none;
}
.ranking-position {
  font-weight: bold;
  color: #495057;
  min-width: 30px;
}
.ranking-name {
  flex: 1;
  margin-left: 15px;
  color: #2c3e50;
}
.ranking-score {
  font-weight: bold;
  padding: 4px 8px;
  border-radius: 12px;
  min-width: 60px;
  text-align: center;
}

.availability-stats {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 15px;
  background: #f8f9fa;
  border-radius: 6px;
  margin-bottom: 15px;
  font-size: 12px;
  color: #6c757d;
}
.stat-item {
  display: flex;
  align-items: center;
  gap: 5px;
}
.stat-value {
  font-weight: bold;
  color: #495057;
}

/* Importação */
.import-box {
  /* Box de importação com tons da paleta */
  background: linear-gradient(135deg, var(--light) 0%, rgba(217, 181, 150, 0.3) 100%);
  border: 2px solid var(--accent);
  border-radius: 15px;
  padding: 25px;
  margin: 20px 0;
}

.import-header {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 20px;
}

.import-icon {
  font-size: 2rem;
  color: var(--primary);
}

.import-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--primary-dark);
  margin-bottom: 5px;
}

.import-hint {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.4;
}

.import-actions {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.feature-pill {
  display: inline-block;
  background: rgba(120, 79, 67, 0.1);
  color: var(--primary-dark);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  margin: 3px;
  border: 1px solid var(--accent);
}

.mapping-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}
.mapping-field {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  padding: 10px;
}
.mapping-field label {
  font-size: 12px;
  color: #495057;
}
.preview-wrap {
  max-height: 300px;
  overflow: auto;
  border: 1px solid #e9ecef;
  border-radius: 6px;
}
.preview-table {
  width: 100%;
  border-collapse: collapse;
}
.preview-table th,
.preview-table td {
  border: 1px solid #e9ecef;
  padding: 6px 8px;
  font-size: 12px;
}
.error-list {
  background: #fff5f5;
  border: 1px solid #f5c6cb;
  color: #721c24;
  border-radius: 6px;
  padding: 10px;
  font-size: 12px;
  max-height: 140px;
  overflow: auto;
}
.ok-list {
  background: #e8f5e9;
  border: 1px solid #c3e6cb;
  color: #155724;
  border-radius: 6px;
  padding: 10px;
  font-size: 12px;
  max-height: 140px;
  overflow: auto;
}

/* Aulas por turma – Disciplinas */
.per-class-hours {
  /* Horas por turma com tom verde suave */
  background: #f8fbf8;
  border: 1px solid #c8e6c9;
  border-radius: 8px;
  padding: 12px;
  margin-top: 12px;
}
.per-class-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
}
.per-class-item {
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  padding: 10px;
}
.per-class-item-header {
  display: grid;
  grid-template-columns: 1fr 110px;
  gap: 8px;
  align-items: center;
}
.per-class-item label {
  font-size: 13px;
  color: #495057;
}
.per-class-item input[type="number"] {
  width: 100%;
  text-align: center;
}

.assignment-list {
  margin-top: 8px;
  border-top: 1px dashed #e9ecef;
  padding-top: 8px;
}
.assignment-row {
  display: grid;
  grid-template-columns: 1fr 90px 32px;
  gap: 8px;
  align-items: center;
  margin-bottom: 6px;
}
.assignment-row select,
.assignment-row input[type="number"] {
  padding: 8px;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  font-size: 13px;
}
.assignment-row .remove-btn {
  background: #dc3545;
  color: #fff;
  border: none;
  border-radius: 6px;
  height: 32px;
  width: 32px;
  cursor: pointer;
}
.add-assignment-btn {
  margin-top: 6px;
  background: #17a2b8;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 12px;
}
.assignment-hint {
  font-size: 11px;
  color: #6c757d;
  margin-top: 6px;
}

/* Responsivo */
@media (max-width: 768px) {
  .container {
    padding: 10px;
  }
  .tabs {
    flex-direction: column;
  }
  .tab-btn {
    padding: 12px;
  }
  .sub-tabs {
    flex-direction: column;
  }
  .item-card .form-row {
    grid-template-columns: 1fr;
  }
  .availability-grid {
    grid-template-columns: 1fr;
  }
  .export-controls {
    grid-template-columns: 1fr;
  }
  .schedule-table {
    font-size: 12px;
  }
  .schedule-table th,
  .schedule-table td {
    padding: 8px 4px;
  }
  .editor-controls {
    flex-direction: column;
    align-items: flex-start;
  }
 
  .quick-buttons {
    justify-content: center;
  }
  .quick-btn {
    flex: 1;
    min-width: 80px;
  }
  .suggestions-grid {
    grid-template-columns: 1fr;
  }
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .workload-grid {
    grid-template-columns: 1fr;
  }

  /* Modal responsivo com scroll otimizado */
  .modal-content {
    margin: 2% auto;
    width: 95%;
    max-height: 95vh;
  }

  .modal-body {
    max-height: calc(95vh - 120px);
  }
}

@media (max-width: 480px) {
  .header h1 {
    font-size: 2rem;
  }
  .header .subtitle {
    font-size: 1rem;
  }
  .tab-panel {
    padding: 15px;
  }

  /* Modal mobile otimizado */
  .modal-content {
    margin: 1% auto;
    padding: 0;
    width: 98%;
    max-height: 98vh;
  }

  .modal-content h3 {
    padding: 15px 20px;
  }

  .modal-body {
    padding: 15px 20px;
    max-height: calc(98vh - 100px);
  }

  .modal-actions {
    padding: 15px 20px;
  }
}

/* ===== VARIÁVEIS ATUALIZADAS COM PALETA MARROM/BEGE ===== */
:root {
  /* Cores principais - Paleta marrom/bege do index */
  --primary: #784f43;
  --primary-light: #8d6355;
  --primary-dark: #5e3d34;
  --secondary: #a67c52;
  --accent: #d9b596;
  --light: #f2e2ce;
  --dark: #261a1a;

  /* Cores de texto */
  --text-light: #f5f5f5;
  --text-dark: #333333;
  --text-muted: #6c757d;

  /* Cores de estado */
  --success: #4caf50;
  --warning: #ffc107;
  --danger: #f44336;
  --info: #2196f3;

  /* Espaçamento */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1rem;
  --spacing-xl: 2rem;
  --spacing-xxl: 3rem;
}

