* { box-sizing: border-box; }

/* ===== ADMIN STYLES ===== */
.admin-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  border-bottom: 1px solid #e2e8f0;
}

.tab-button {
  padding: 12px 20px;
  background: none;
  border: none;
  border-radius: 8px 8px 0 0;
  color: #64748b;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-button:hover {
  background: #f1f5f9;
  color: #334155;
}

.tab-button.active {
  background: #ffffff;
  color: #0ea5e9;
  border-bottom: 2px solid #0ea5e9;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.admin-header h2 {
  color: #1e293b;
  font-size: 24px;
  font-weight: 600;
  margin: 0;
}

.users-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.user-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  transition: all 0.2s ease;
}

.user-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.user-info h3 {
  color: #1e293b;
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 4px 0;
}

.user-info p {
  color: #64748b;
  font-size: 14px;
  margin: 0;
}

.user-actions {
  display: flex;
  gap: 8px;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.setting-card {
  padding: 24px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.setting-card h3 {
  color: #1e293b;
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 4px 0;
}

.setting-card p {
  color: #64748b;
  font-size: 14px;
  margin: 0;
}

.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e1;
  transition: 0.4s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #0ea5e9;
}

input:checked + .slider:before {
  transform: translateX(26px);
}

.logs-container {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
}

.log-entry {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid #f1f5f9;
}

.log-entry:last-child {
  border-bottom: none;
}

.log-time {
  color: #64748b;
  font-size: 14px;
  font-family: 'Courier New', monospace;
  min-width: 150px;
}

.log-level {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  min-width: 60px;
  text-align: center;
}

.log-level.info {
  background: #dbeafe;
  color: #1e40af;
}

.log-level.warning {
  background: #fef3c7;
  color: #92400e;
}

.log-level.error {
  background: #fee2e2;
  color: #dc2626;
}

.log-message {
  color: #374151;
  font-size: 14px;
  flex: 1;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
  background-color: var(--card);
  border: 1px solid var(--border);
  margin: 5% auto;
  padding: 0;
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

.modal-header h3 {
  color: var(--text);
  font-size: 18px;
  font-weight: 600;
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #64748b;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  color: #374151;
}

.modal-body {
  padding: 24px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  color: #374151;
  font-weight: 500;
  margin-bottom: 6px;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  color: #374151;
  transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #0ea5e9;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.modal-footer {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding: 20px 24px;
  border-top: 1px solid #e2e8f0;
}

@media (max-width: 768px) {
  .admin-tabs {
    flex-wrap: wrap;
  }
  
  .tab-button {
    flex: 1;
    min-width: 120px;
  }
  
  .admin-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  
  .user-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  
  .user-actions {
    width: 100%;
    justify-content: flex-end;
  }
  
  .settings-grid {
    grid-template-columns: 1fr;
  }
  
  .setting-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .modal-content {
    margin: 10% auto;
    width: 95%;
  }
  
  .modal-footer {
    flex-direction: column;
  }
}
:root {
  --bg: #0b0f14;
  --card: #131a22;
  --muted: #9fb3c8;
  --text: #e6edf3;
  --brand: #4cc9f0;
  --accent: #b8c5d6;
  --exam: #ff6b6b;
  --task: #f59e0b;
  --event: #6bcB77;
  --border: #243041;
}
html, body { height: 100%; }
body {
  margin: 0; font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  background: linear-gradient(180deg, #0b0f14, #0e1420 20%, #0b0f14);
  color: var(--text);
}
.container { max-width: 1100px; margin: 0 auto; padding: 16px; }

@media (min-width: 1024px){
  .container { max-width: 1100px; margin: 0 auto; padding: 16px; }
}

/* Seções e headers */
.header {
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  backdrop-filter: blur(6px);
  background: rgba(11,15,20,0.8);
  z-index: 2;
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
}

@media (min-width: 1024px){
  .header { position: sticky; top: 0; z-index: 2; }
  .header .container { justify-content: flex-start; gap: 16px; }
  /* Sidebar header com logo e nome do curso visível no desktop */
  .mobile-nav-header .logo { display: block; color: var(--brand); font-weight: 800; letter-spacing: 0.2px; }
  /* Ocultar informações redundantes do usuário no header em desktop */
  .header .container .header-user-info { display: none !important; }
}

/* Destaque do item ativo na sidebar */
.mobile-nav-links .nav-link.active {
  background: var(--brand);
  color: #001219;
  border-color: transparent;
}
.mobile-nav-links .nav-link.active:hover { filter: brightness(0.95); color: #001219; }

/* Indicador lateral do item ativo */
@media (min-width: 1024px){
  .mobile-nav-links .nav-link { position: relative; }
  .mobile-nav-links .nav-link.active::before {
    content: '';
    position: absolute;
    left: -12px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 60%;
    border-radius: 4px;
    background: linear-gradient(180deg, var(--brand), var(--accent));
    box-shadow: 0 0 8px rgba(128,255,219,0.4);
  }
}

/* Hover mais legível para itens não-ativos */
.mobile-nav-links .nav-link:not(.active):hover {
  background: rgba(255,255,255,0.06);
  border-color: var(--border);
}

.logo {
  font-size: 18px;
  color: var(--brand);
  margin: 0;
  font-weight: 700;
}

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

.nav-link {
  color: var(--muted);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.2s;
}

.nav-link.active,
.nav-link:hover {
  color: var(--text);
  background: #0f1722;
}

/* Mobile Navigation */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 24px;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: background 0.2s;
  position: relative; /* para badge */
}

.mobile-menu-toggle:hover {
  background: rgba(255,255,255,0.1);
}

.mobile-nav-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.8);
  z-index: 1000;
  backdrop-filter: blur(2px);
}

.mobile-nav-overlay.show {
  display: block;
}

.mobile-nav {
  position: fixed;
  top: 0;
  left: -300px;
  width: 280px;
  height: 100%;
  background: var(--card);
  border-left: 1px solid var(--border);
  z-index: 1001;
  transition: left 0.3s ease;
  overflow-y: auto;
}

.mobile-nav.show {
  left: 0;
}

.mobile-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.mobile-nav-header .logo {
  font-size: 16px;
}

.mobile-nav-close {
  background: none;
  border: none;
  color: var(--text);
  font-size: 24px;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
}

.mobile-nav-links {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mobile-nav-links .nav-link {
  padding: 16px 12px;
  border-radius: 8px;
  display: block;
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  border: 1px solid transparent;
  transition: all 0.2s;
}

/* Padronizar ícones e texto em colunas alinhadas */
.mobile-nav-links .nav-link { display: flex; align-items: center; gap: 10px; }
.mobile-nav-links .nav-link .nav-icon { display: inline-flex; width: 22px; justify-content: center; }
.mobile-nav-links .nav-link .nav-text { flex: 1 1 auto; }

.mobile-nav-links .nav-link.active {
  background: var(--brand);
  color: #001219;
}

.mobile-nav-links .nav-link:hover {
  background: #0f1722;
  border-color: var(--border);
}

/* Desktop: sidebar fixa própria (separada do menu mobile) */
.desktop-nav { display: none; }
@media (min-width: 1024px){
  /* Ocultar menu horizontal do header e o botão hamburguer */
  .header .nav { display: none !important; }
  .mobile-menu-toggle { display: none !important; }

  /* Esconder componentes mobile no desktop */
  .mobile-nav-overlay { display: none !important; }
  .mobile-nav { display: none !important; }

  /* Sidebar dedicada do desktop */
  .desktop-nav {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 260px;
    height: 100vh;
    background: var(--card);
    border-right: 1px solid var(--border);
    z-index: 100;
    overflow-y: auto;
  }
  .desktop-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: var(--card);
    z-index: 1;
  }
  .desktop-nav-header .logo { font-size: 16px; }
  .desktop-nav-links { padding: 20px; display: flex; flex-direction: column; gap: 8px; }
  .desktop-nav .nav-link {
    padding: 16px 12px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    border: 1px solid transparent;
    transition: all 0.2s;
    cursor: pointer;
  }
  .desktop-nav .nav-link .nav-icon { display: inline-flex; width: 22px; justify-content: center; }
  .desktop-nav .nav-link .nav-text { flex: 1 1 auto; }
  .desktop-nav .nav-link:hover { background: #0f1722; border-color: var(--border); }
  .desktop-nav .nav-link.active { background: var(--brand); color: #001219; border-color: rgba(128,255,219,0.35); box-shadow: inset 0 0 0 1px rgba(0,0,0,0.15); }

  /* Indicador lateral do item ativo no desktop */
  .desktop-nav .nav-link { position: relative; }
  .desktop-nav .nav-link.active::before {
    content: '';
    position: absolute;
    left: -12px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 60%;
    border-radius: 4px;
    background: linear-gradient(180deg, var(--brand), var(--accent));
    box-shadow: 0 0 8px rgba(128,255,219,0.4);
  }

  /* Desktop user info inside sidebar */
  .desktop-user-info {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    background: rgba(15, 23, 34, 0.6);
    opacity: 1;
    transition: opacity 0.3s ease;
    min-height: 70px; /* Prevent layout shift */
  }
  .desktop-user-info .desktop-user-name {
    color: var(--text);
    font-weight: 600;
    font-size: 14px;
    line-height: 1.3;
  }
  .desktop-user-info .desktop-user-role {
    color: var(--muted);
    font-size: 12px;
  }

  /* Deslocar conteúdo para não ficar sob a sidebar */
  body { padding-left: 260px; }
  
  /* Reduzir padding do container no desktop para compensar o espaçamento da sidebar */
  .container { 
    padding-left: 0 !important; 
    padding-right: 16px !important;
    padding-top: 16px !important;
    padding-bottom: 16px !important;
  }
}


/* Filtros gerais (Dashboard/Calendário) - versão desktop */
.filters-container {
  margin-bottom: 20px;
}

.filters-wrapper {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.filters-heading { 
  font-size: 12px; 
  text-transform: uppercase; 
  letter-spacing: 0.4px; 
  color: var(--muted);
  margin-bottom: 8px;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-label {
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 4px;
}

/* Legend específica para filtros */
.filters-container .legend {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.filters-container .legend .pill {
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 20px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 2px solid transparent;
}

.filters-container .legend .pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.filters-container .legend .pill.clickable {
  opacity: 0.6;
  border-color: transparent;
}

.filters-container .legend .pill.clickable[aria-pressed="true"] {
  opacity: 1;
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

@media (min-width: 769px) {
  .filters-wrapper { 
    flex-direction: row; 
    align-items: flex-start; 
    justify-content: space-between; 
    gap: 24px;
  }
  .filter-group:first-child { 
    flex: 1; 
    min-width: 0;
  }
  .filter-group:last-child { 
    min-width: 200px; 
    flex-shrink: 0;
  }
}

/* Filtros mobile - layout vertical centralizado */
@media (max-width: 768px) {
  .filters-container .card {
    margin: 0;
    padding: 16px;
  }
  
  .filters-wrapper {
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
  }
  
  .filter-group {
    width: 100%;
    align-items: stretch;
    gap: 12px;
  }
  
  .filter-label {
    text-align: left;
    margin-bottom: 8px;
  }
  
  .filters-container .legend {
    justify-content: flex-start;
    gap: 8px;
    flex-wrap: wrap;
  }
  
  .filters-container .legend .pill {
    font-size: 11px;
    padding: 6px 10px;
    min-width: 70px;
    text-align: center;
    flex: 1;
    max-width: 80px;
  }
  
  .filter-group select {
    font-size: 14px;
    padding: 10px 12px;
    width: 100%;
    border-radius: 8px;
  }
}

/* Bibliografia: refinamentos do card de filtros (mobile/desktop) */
.biblio-filters .filters-heading { display:flex; align-items:center; gap:8px; color: var(--muted); margin-bottom:8px; }
.biblio-filters .filters-wrapper { gap: 16px; }
@media (min-width: 768px){
  .biblio-filters .filters-wrapper { flex-direction: row; align-items: flex-end; }
  .biblio-filters .filter-group { flex: 1 1 0; }
  .biblio-filters .filter-group:last-child { flex: 0 0 auto; min-width: 180px; display: flex; }
}
@media (max-width: 767px){
  .biblio-filters .card { padding: 12px; }
  .biblio-filters .filters-heading { margin-bottom: 6px; }
  .biblio-filters .filter-group { gap: 6px; }
  .biblio-filters .filter-group button { width: 100%; }
  .biblio-filters .filter-label { font-size: 13px; }
  .biblio-filters .form-input { padding: 10px; }
}

/* Mobile general adjustments */
@media (max-width: 768px) {
  .mobile-menu-toggle { display: block; order: 0; }
  .logo { order: 1; }
  .header .container > .nav { display: none; }
  .mobile-bulletin-btn { order: 2; }
  
  /* Esconder informações de usuário do auth.js em mobile */
  .header .container > div[style*="margin-left: auto"] {
    display: none !important;
  }
  
  /* Ajustes gerais para mobile */
  .container {
    padding: 12px;
  }
  
  /* Cards mais compactos */
  .card {
    padding: 12px;
  }
  
  /* Títulos menores */
  .section-title {
    font-size: 24px;
  }
  
  .card-title {
    font-size: 16px;
  }
  
  /* Melhor espaçamento em mobile */
  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  /* Otimizações para o card de mensagens (Mural) */
  #bulletin-board .card-header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
  }
  
  .bulletin-title-section {
    display: flex;
    align-items: center;
    gap: 12px;
  }
  
  .bulletin-header-controls {
    display: flex;
    flex-direction: row;
    gap: 8px;
    align-items: center;
  }
  
  .bulletin-unread {
    font-size: 12px;
    color: var(--muted);
    white-space: nowrap;
  }
  
  /* Botões do mural compactos em mobile */
  .bulletin-header-controls .btn-text {
    padding: 6px 12px;
    font-size: 14px;
    white-space: nowrap;
  }
}

/* Badge no botão hambúrguer (mobile) */
.hamburger-badge {
  position: absolute;
  top: 0;
  right: 0;
  transform: translate(35%, -35%);
  background: #ef4444; /* vermelho suave */
  color: #fff;
  border-radius: 999px;
  min-width: 14px;
  height: 14px;
  display: none; /* controlado via JS */
  align-items: center;
  justify-content: center;
  font-size: 10px;
  line-height: 1;
  padding: 0 3px;
  box-shadow: 0 0 0 2px rgba(0,0,0,0.3);
}
@media (min-width: 1024px){ .hamburger-badge { display: none !important; } }

/* Badge no item 'Mural' dentro do menu mobile */
.mobile-nav-links .nav-badge {
  margin-left: auto;
  background: #ef4444;
  color: #fff;
  border-radius: 999px;
  padding: 2px 6px;
  font-size: 12px;
  font-weight: 700;
  display: none; /* controlado via JS */
}

/* Responsividade extra para telas muito pequenas */
@media (max-width: 480px) {
  #bulletin-board .card-header {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  
  
  .bulletin-title-section {
    justify-content: space-between;
    width: 100%;
  }
  
  .bulletin-header-controls {
    justify-content: space-between;
    width: 100%;
  }
  
  .bulletin-header-controls .btn-text {
    flex: 1;
    text-align: center;
  }
}

/* Carrossel do Calendário - só mobile */
.calendar-carousel-container {
  display: none; /* Escondido por padrão (desktop) */
  width: 100%;
}

/* Grade do calendário - só desktop */
.calendar-grid {
  display: grid; /* Visível por padrão (desktop) */
  grid-template-columns: repeat(7, 1fr); 
  gap: 8px; 
  margin-top: 12px;
}

.calendar-grid .day-name, .calendar-grid .cell { 
  padding: 8px; 
  text-align: center; 
  background: #0f1722; 
  border: 1px solid var(--border); 
  border-radius: 8px; 
  min-height: 80px; 
  position: relative; 
}

.calendar-grid .day-name { 
  background: transparent; 
  border: none; 
  color: var(--muted); 
  min-height: auto; 
}

.calendar-grid .cell .date { 
  position: absolute; 
  top: 6px; 
  left: 8px; 
  font-size: 12px; 
  color: var(--muted); 
}

.calendar-grid .cell .badges { 
  display: flex; 
  gap: 4px; 
  flex-wrap: wrap; 
  position: absolute; 
  bottom: 4px; 
  left: 4px; 
  right: 4px;
  max-height: 50px;
  overflow: hidden;
}

.calendar-grid .cell .badges .pill {
  font-size: 10px;
  padding: 2px 6px;
  min-width: 28px;
  text-align: center;
}

.calendar-grid .cell .badges .pill.compact {
  font-size: 9px;
  padding: 1px 4px;
  min-width: 24px;
  margin: 0 1px;
}

.calendar-grid .cell.today { 
  outline: 2px solid var(--brand); 
}

.calendar-grid .cell.selected { 
  box-shadow: 0 0 0 2px var(--accent) inset; 
}

@media (max-width: 768px) {
  .calendar-carousel-container {
    display: flex;
    flex-direction: column;
    align-items: stretch; /* ocupar toda a largura do card */
    gap: 8px;
    margin: 16px 0;
    width: 100%;
  }
  
  .calendar-grid {
    display: none !important; /* Escondido no mobile - important para sobrescrever outras regras */
  }
  
  .carousel-nav-row {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 8px;
  }
}

.calendar-carousel {
  display: flex;
  overflow-x: auto;
  scroll-behavior: smooth;
  width: 100%;
  scroll-snap-type: x mandatory; /* snap para rolagem mais suave */
  gap: 8px;
  padding: 8px 0;
  flex: 1;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x; /* melhorar gesto horizontal no iOS */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

.calendar-carousel::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

.carousel-day {
  flex: 0 0 auto;
  min-width: 120px;
  max-width: 180px;
  background: var(--card, #0f1722);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  scroll-snap-align: start;
  box-sizing: border-box;
}

.carousel-day:hover {
  border-color: var(--brand);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.carousel-day.today {
  outline: 2px solid var(--brand);
}

.carousel-day.selected {
  border-color: var(--brand);
  background: rgba(76, 201, 240, 0.15);
  color: var(--text);
  box-shadow: 0 0 0 2px var(--brand);
}

.carousel-day-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.carousel-day-number {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.carousel-day.selected .carousel-day-number { 
  color: var(--brand); 
  font-weight: 800;
}

.carousel-day-weekday {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.carousel-day.selected .carousel-day-weekday { 
  color: var(--brand); 
  font-weight: 600;
}

.carousel-day-events {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 120px;
  overflow-y: auto;
}

.carousel-event {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  line-height: 1.3;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Aplicar cores dos pills aos eventos do carrossel */
.carousel-event.exam {
  background-color: var(--exam);
  color: white;
}

.carousel-event.task {
  background-color: var(--task);
  color: black;
}

.carousel-event.event {
  background-color: var(--event);
  color: white;
}

.carousel-event.class {
  background-color: var(--brand);
  color: #001219;
}

/* Eventos cancelados no carrossel */
.carousel-event.cancelled {
  text-decoration: line-through;
  opacity: 0.65;
  border: 1px solid var(--exam);
}

.carousel-nav {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 18px;
  color: #495057;
}

.carousel-nav:hover {
  border-color: #4f46e5;
  background: #4f46e5;
  color: white;
}

.carousel-nav:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Mobile optimizations for carousel */
@media (max-width: 768px) {
  .carousel-day {
    min-width: 100px;
    max-width: 140px;
    padding: 8px;
  }
  
  .carousel-day-number {
    font-size: 16px;
  }
  
  .carousel-day-events {
    max-height: 80px;
  }
  
  .carousel-nav {
    width: 32px;
    height: 32px;
    font-size: 16px;
  }
}

.main {
  min-height: calc(100vh - 120px);
  padding: 24px 0;
}

.section {
  margin-bottom: 32px;
}

.section-title {
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 8px 0;
  color: var(--text);
}

.section-subtitle {
  color: var(--muted);
  margin: 0 0 24px 0;
  font-size: 16px;
}

.footer {
  border-top: 1px solid var(--border);
  margin-top: 32px;
  padding: 20px 0;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}



.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: repeat(1, 1fr); }
@media (min-width: 800px){ .grid.two { grid-template-columns: repeat(2, 1fr); } }

/* Form específico de disciplinas */
.form-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.form-grid .full {
  grid-column: 1 / -1;
}

/* Bibliografia: garantir que os campos não "estourem" o card em mobile */
#formSection .form-grid { min-width: 0; }
#formSection .form-grid label { min-width: 0; }
#formSection .form-grid input,
#formSection .form-grid select,
#formSection .form-grid textarea { min-width: 0; width: 100%; max-width: 100%; }
#formSection .form-grid .full { min-width: 0; }
#formSection .form-grid .full > * { min-width: 0; }
#formSection .form-grid .full[style*="flex;"] { flex-wrap: wrap; }
#formSection .form-grid .full .muted { white-space: normal; overflow-wrap: anywhere; }
#formSection .form-grid .progress { max-width: 100%; }
#formSection .form-grid .progress #uploadBar { width: 0%; }

/* Evitar que selects/botões forcem largura indevida dentro de cards */
.filters-container select.form-input { min-width: 0; width: 100%; }
.filters-container .filters-wrapper { align-items: flex-end; }
@media (min-width: 768px){
  .filters-container .filters-wrapper { align-items: flex-start; }
  .filters-container .filter-group:last-child { align-items: flex-end; }
}

/* Ajuste do input file + botão no formulário de bibliografia */
#formSection input[type="file"] { max-width: 100%; }
#formSection .full[style*="flex;"] > * { flex: 0 1 auto; }
#formSection .full[style*="flex;"] button { white-space: nowrap; }
#formSection .full[style*="flex;"] span.muted { flex: 1 1 200px; }

.card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 16px; box-shadow: 0 4px 16px rgba(0,0,0,0.3); }
.container .card + .card { margin-top: 16px; }
.card h2, .card h3 { margin-top: 0; }
.card-actions { margin-top: 12px; }

.list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.list li { padding: 12px 16px; background: #0f1722; border: 1px solid var(--border); border-radius: 10px; display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; }
/* PRIMEIRO - Estilo base para .list li */
.list .meta { color: var(--muted); font-size: 12px; }

/* Lista básica */
.list { 
  list-style: none; 
  padding: 0; 
  margin: 0; 
  display: grid; 
  gap: 12px; 
}

.list li { 
  padding: 10px 14px; 
  background: #0f1722; 
  border: 1px solid var(--border); 
  border-radius: 10px; 
  display: flex; 
  gap: 12px; 
  align-items: flex-start; 
  justify-content: space-between; 
  font-size: 14px;
}

/* No mural, cada grupo (Hoje/Ontem/etc.) deve ocupar a linha inteira */

.list .meta { 
  color: var(--muted); 
  font-size: 10px; /* Reduzido de 12px para 10px (20% menor) */
  line-height: 1.4;
}
.list .meta .meta-disc { color: var(--muted); }

.list .meta a {
  color: var(--brand);
  text-decoration: none;
  transition: color 0.2s ease;
}

.list .meta a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.list .empty {
  text-align: center;
  color: var(--muted);
  padding: 24px;
  font-style: italic;
}

/* Itens clicáveis e links de ação */
.clickable { cursor: pointer; }
.list li.clickable:hover { background: rgba(255,255,255,0.05); border-color: var(--border); }
/* SEGUNDO - Hover para .list li.clickable */
.activity-row.clickable:hover { background: rgba(255,255,255,0.05); border-left-color: var(--brand); }
.link-action {
  color: var(--brand);
  text-decoration: none;
  font-size: 12px;
  cursor: pointer;
  margin-left: 12px;
}
.link-action:hover { 
  color: var(--accent); 
  text-decoration: underline;
}

/* Layout específico do resumo da semana */
.week-day-item {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 8px !important;
  padding: 16px !important;
}

.day-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}

.day-header strong {
  font-size: 15px;
  color: var(--text);
}

.day-date {
  color: var(--muted);
  font-size: 12px;
  font-weight: normal;
}

.discipline-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 8px;
}

.activity-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  border-radius: 4px;
}
.activity-actions { display: flex; align-items: center; gap: 8px; }

.class-row {
  background: rgba(76, 201, 240, 0.08);
  border-left: 3px solid var(--brand);
  margin-left: 0;
}

.event-row {
  background: rgba(19, 26, 34, 0.4);
  border-left: 3px solid var(--muted);
  margin-left: 16px;
  opacity: 0.9;
}

.activity-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.activity-title {
  font-weight: 500;
  color: var(--text);
  font-size: 14px;
}

/* Slightly reduce strong titles inside list items for harmony */
.list li strong { font-size: 15px; }

.activity-time {
  color: var(--brand);
  font-size: 12px;
  font-weight: 700;
  background: rgba(76, 201, 240, 0.15);
  padding: 2px 6px;
  border-radius: 3px;
  min-width: 42px;
  text-align: center;
}

.activity-discipline {
  color: var(--muted);
  font-size: 12px;
  font-style: italic;
}

.activity-bibliography {
  color: var(--accent);
  font-size: 11px;
  font-weight: 500;
}

/* Data de adição na bibliografia */
.added-date {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
  opacity: 0.8;
}

/* Agrupamento na lista de compromissos */
.section-header {
  background: var(--border) !important;
  color: var(--text) !important;
  font-weight: 600 !important;
  padding: 8px 12px !important;
  border-radius: 6px !important;
  margin: 12px 0 4px 0 !important;
  border: none !important;
}

.section-header:first-child {
  margin-top: 0 !important;
}

.discipline-summary {
  background: rgba(76, 201, 240, 0.08) !important;
  border-left: 3px solid var(--brand) !important;
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(2px);
}

/* Modal específico para disciplinas */
.modal-overlay.show {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 6vh 16px 6vh 16px;
}

#disciplineModalContent {
  max-width: 700px;
  width: 95%;
  max-height: 85vh;
  overflow-y: auto;
}

@media (max-width: 768px) {
  #disciplineModalContent {
    width: 98%;
    max-height: 90vh;
    margin: 10px;
  }
  
  .modal-overlay.show {
    padding: 2vh 8px 2vh 8px;
  }
  
  .info-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .modal-footer {
    flex-direction: column;
    gap: 8px;
  }
  
  .modal-footer .btn {
    width: 100%;
  }
  
  /* Correção para modal de adicionar compromisso no mobile */
  .modal-content {
    width: 95%;
    max-width: none;
    max-height: 95vh;
    margin: 10px;
    display: flex;
    flex-direction: column;
  }
  
  .modal-content .form-grid {
    padding: 16px;
    flex: 1;
    overflow-y: auto;
    min-height: 0; /* Permite que o flex funcione corretamente */
  }
  
  .modal-actions {
    flex-shrink: 0; /* Impede que os botões sejam comprimidos */
    padding: 16px;
    border-top: 1px solid var(--border);
    background: var(--card);
    position: sticky;
    bottom: 0;
    z-index: 10;
  }
  
  .modal-actions .btn {
    width: 100%;
    margin-bottom: 8px;
  }
  
  .modal-actions .btn:last-child {
    margin-bottom: 0;
  }
}

.modal-content {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  padding-bottom: 8px;
}
/* spacing handled by overlay padding */
.bulletin-header-controls { display:flex; gap:10px; align-items:center; }
.bulletin-header-controls .btn-text.secondary { opacity: 0.9; }

/* Collapsible helpers */
.discipline-summary.hidden { display: none; }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: #0f1722;
}

.modal-header h3 {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  letter-spacing: 0.2px;
}

/* Estilos específicos para o modal de disciplinas */
.modal-body {
  padding: 20px;
  max-height: 60vh;
  overflow-y: auto;
}

.discipline-info-section {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.info-item.full-width {
  grid-column: 1 / -1;
}

.info-item label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.info-item span {
  font-size: 14px;
  color: var(--text);
  font-weight: 500;
}

.discipline-sections {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.discipline-section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.bibliography-list,
.history-list {
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.history-filters {
  display: flex;
  gap: 6px;
  padding: 12px 16px;
  border-bottom: none;
  flex-wrap: wrap;
  justify-content: center;
}

@media (max-width: 768px) {
  .history-filters {
    padding: 8px 12px;
    gap: 4px;
  }
  
  .filter-btn {
    padding: 4px 8px;
    font-size: 11px;
    flex: 1;
    min-width: 0;
  }
}

.filter-btn {
  padding: 6px 12px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--brand);
}

.filter-btn.active {
  background: var(--brand);
  color: #001219;
  border-color: var(--brand);
}

.modal-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.btn.danger {
  background: var(--exam);
  color: white;
  border: 1px solid var(--exam);
}

.btn.danger:hover {
  background: #ff5252;
  border-color: #ff5252;
}

/* Tema claro para modal de disciplinas */
@media (prefers-color-scheme: light) {
  .info-item label {
    color: #6c757d !important;
  }
  
  .info-item span {
    color: #212529 !important;
  }
  
  .filter-btn {
    background: #ffffff !important;
    color: #495057 !important;
    border-color: #dee2e6 !important;
  }
  
  .filter-btn:hover {
    background: #f8f9fa !important;
    border-color: #4cc9f0 !important;
  }
  
  .filter-btn.active {
    background: #4cc9f0 !important;
    color: #001219 !important;
    border-color: #4cc9f0 !important;
  }
  
  .btn.danger {
    background: #dc3545 !important;
    border-color: #dc3545 !important;
  }
  
  .btn.danger:hover {
    background: #c82333 !important;
    border-color: #bd2130 !important;
  }
}

/* Estilos para modal de informações de eventos */
.detail-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.detail-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

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

.detail-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  min-width: 80px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.detail-value {
  font-size: 14px;
  color: var(--text);
  flex: 1;
  line-height: 1.4;
}

/* Tema claro para modal de informações */
@media (prefers-color-scheme: light) {
  .detail-label {
    color: #6c757d !important;
  }
  
  .detail-value {
    color: #212529 !important;
  }
  
  .detail-row {
    border-bottom-color: #dee2e6 !important;
  }
}

.btn-close {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s;
}

.btn-close:hover {
  background: var(--border);
  color: var(--text);
}

.modal-content .form-grid {
  padding: 20px;
}

.modal-body {
  padding: 16px 20px;
}

.detail-list { display: grid; gap: 8px; }
.detail-row { display: grid; grid-template-columns: 120px 1fr; gap: 12px; align-items: start; padding: 6px 0; border-bottom: 1px dashed rgba(159,179,200,0.15); }
.detail-label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; }
.detail-value { color: var(--text); font-size: 14px; line-height: 1.5; }

@media (max-width: 520px){
  .detail-row { grid-template-columns: 1fr; }
}

.modal-body a { color: var(--brand); text-decoration: none; }
.modal-body a:hover { color: var(--accent); text-decoration: underline; }

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  grid-column: 1 / -1;
  padding: 12px 20px;          /* spacing inside footer */
  border-top: 1px solid var(--border); /* visual separation from content */
}

.btn { background: var(--card); color: var(--text); border: 1px solid var(--border); padding: 8px 12px; border-radius: 10px; cursor: pointer; font-weight: 600; }
.btn.secondary { background: #0f1722; color: var(--text); border: 1px solid var(--border); }
.btn.small { padding: 4px 8px; font-size: 12px; }

/* Generic form styles */
.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-label { color: var(--text) !important; font-weight: 600; }
.form-input { background: #0f1722; color: var(--text) !important; border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; font: inherit; }
.form-input::placeholder { color: rgba(159,179,200,0.6); }
.form-input:focus { outline: 2px solid var(--accent); outline-offset: 2px; border-color: var(--accent); }

.pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; color: #001219; font-weight: 700; line-height: 1; }
.pill.exam { background: var(--exam); }
.pill.task { background: var(--task); }
.pill.event { background: var(--event); }
.pill.class { background: var(--brand); color: #001219; }
.pill.today { background: var(--accent); color: #001219; }
.pill.clickable { cursor: pointer; }
.pill.clickable:hover { filter: brightness(1.1); }
.pill.muted { opacity: 0.5; filter: grayscale(0.2); }

/* Redesigned schedule chips for disciplines list */
.schedule-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.slot-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 10px; background: #0f1722; border: 1px solid var(--border); color: var(--text); font-size: 12px; line-height: 1; }
.slot-chip .day { font-weight: 700; letter-spacing: 0.2px; }
.slot-chip .dot { opacity: 0.6; }
.slot-chip .time { font-variant-numeric: tabular-nums; opacity: 0.9; }
.slot-chip:hover { background: rgba(255,255,255,0.1); border-color: var(--brand); }

/* Aulas canceladas */
.pill.cancelled {
  position: relative;
  opacity: 0.6;
}

.pill.cancelled::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--exam);
  transform: translateY(-50%);
}

/* Itens de lista cancelados - MAIOR ESPECIFICIDADE */
.list li.upcoming-item.cancelled,
.upcoming-section-content .list li.upcoming-item.cancelled,
.upcoming-section-content .list li.cancelled {
  opacity: 0.7 !important;
  background: rgba(255, 107, 107, 0.05) !important;
  border-left: 3px solid var(--exam) !important;
  border-left-width: 3px !important;
  border-left-style: solid !important;
  border-left-color: var(--exam) !important;
}
/* QUARTO - Estilo para aulas canceladas (tema escuro) */

.list li.upcoming-item.cancelled .pill,
.upcoming-section-content .list li.upcoming-item.cancelled .pill,
.upcoming-section-content .list li.cancelled .pill {
  opacity: 0.6 !important;
}

/* Garantir que aulas canceladas sejam visíveis */
.list li.upcoming-item.cancelled strong,
.upcoming-section-content .list li.upcoming-item.cancelled strong,
.upcoming-section-content .list li.cancelled strong {
  color: var(--text) !important;
}

.list li.upcoming-item.cancelled .meta,
.upcoming-section-content .list li.upcoming-item.cancelled .meta,
.upcoming-section-content .list li.cancelled .meta {
  color: var(--muted) !important;
}

/* Sobrescrever hover para aulas canceladas */
.list li.upcoming-item.cancelled:hover,
.upcoming-section-content .list li.upcoming-item.cancelled:hover,
.upcoming-section-content .list li.cancelled:hover {
  background: rgba(255, 107, 107, 0.08) !important;
  border-color: var(--exam) !important;
}

/* Chips for selected materials */
.chip-list { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; background: #0f1722; border: 1px solid var(--border); color: var(--text); padding: 4px 8px; border-radius: 999px; font-size: 12px; }
.chip-remove { background: transparent; border: none; color: var(--muted); cursor: pointer; font-size: 14px; line-height: 1; padding: 0 2px; }
.chip-remove:hover { color: var(--text); }

/* Acessibilidade: foco visível */
.btn:focus-visible,
.btn-icon:focus-visible,
.btn-text:focus-visible,
.btn-close:focus-visible,
.link-action:focus-visible,
.pill:focus-visible,
.nav-link:focus-visible,
.icon-btn:focus-visible,
select:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Estado de carregando no botão */
.btn.loading { opacity: 0.7; pointer-events: none; position: relative; }
.btn.loading::after {
  content: '…';
  position: absolute;
  right: 10px;
}

/* Mensagens inline de validação */
.form-errors { color: var(--exam); font-size: 12px; margin-top: 4px; }
.field-error { color: var(--exam); font-size: 12px; margin-top: 4px; display: block; }

/* Dashboard específico */
.dashboard-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  /* Ensure cards in the same row stretch to equal height */
  align-items: stretch;
}

.dashboard-grid .full-width {
  grid-column: 1 / -1;
}

/* Make dashboard cards use a column flex layout so headers stay at top and content fills */
.dashboard-grid > .card {
  display: flex;
  flex-direction: column;
}

/* card-header remains natural height by default */

.dashboard-grid > .card .card-content {
  flex: 1 1 auto;
  min-height: 0; /* prevents overflow issues when stretching */
  display: block;
}

/* On wider screens, give cards a consistent baseline min-height (except full-width summary) */
@media (min-width: 900px) {
  .dashboard-grid > .card:not(.full-width) {
    min-height: 320px;
  }
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.card-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.card-content {
  flex: 1;
}


.week-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.week-range {
  font-size: 14px;
  color: var(--text);
  font-weight: 500;
}

.btn-icon {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  color: #495057;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
}

.btn-icon:hover {
  background: #e9ecef;
  border-color: #4f46e5;
  color: #4f46e5;
}

.btn-text {
  background: linear-gradient(90deg, var(--brand), var(--accent));
  color: #001219;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  transition: all 0.2s;
}

.btn-text:hover {
  filter: brightness(0.95);
}

.muted { color: var(--muted); }
.mt { margin-top: 16px; }
.full { grid-column: 1 / -1; }

.form-grid { display: grid; gap: 12px; grid-template-columns: repeat(1, 1fr); }
.form-grid label { color: var(--muted); font-size: 14px; display: grid; gap: 6px; }

/* Estilos básicos para inputs, selects e textareas */
input, textarea, select {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.2s ease, background 0.2s ease;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--brand);
  background: var(--card);
}

input:disabled, textarea:disabled, select:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

textarea {
  resize: vertical;
  min-height: 80px;
}

select {
  cursor: pointer;
}
.form-grid input, .form-grid select, .form-grid textarea {
  background: #0f1722; border: 1px solid var(--border); color: var(--text); padding: 10px; border-radius: 10px;
}
@media (min-width: 700px){ .form-grid { grid-template-columns: repeat(2, 1fr); } }

.calendar-controls { display: flex; align-items: center; justify-content: center; gap: 12px; }
#monthLabel { margin: 8px 0; }

/* Regras do calendário consolidadas acima - removida duplicação */

/* .legend { display: flex; gap: 8px; margin-top: 12px; } - movido para filtros específicos */

.empty { color: var(--muted); text-align: center; }
.icon-btn { background: transparent; border: none; color: var(--muted); cursor: pointer; }
.icon-btn:hover { color: var(--text); }

/* Disciplinas - grade de semana */
.week-grid { display: grid; gap: 8px; }
.week-row { display: grid; grid-template-columns: 40px repeat(2, max-content); align-items: center; gap: 12px; background: #0f1722; border: 1px solid var(--border); padding: 8px 10px; border-radius: 10px; }
.week-label { color: var(--muted); font-weight: 600; }

/* Checkboxes desabilitados */
.week-row label[title*="ocupado"] {
  cursor: not-allowed;
}

.week-row input[type="checkbox"]:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.week-row input[type="checkbox"]:disabled + label {
  color: var(--muted);
  cursor: not-allowed;
}

/* Form toggle animations and styles */
#formSection {
  transition: opacity 0.3s ease, transform 0.3s ease;
  transform-origin: top;
}

#formSection[style*="display: none"] {
  opacity: 0;
  transform: scaleY(0.95);
}

#formSection[style*="display: block"] {
  opacity: 1;
  transform: scaleY(1);
}

.card-header .btn {
  white-space: nowrap;
}

.card-header h2, .card-header h3 {
  margin: 0;
  flex: 1;
}

/* Tema claro via prefers-color-scheme */
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f8f9fa;
    --card: #ffffff;
    --muted: #6c757d;
    --text: #212529;
    --brand: #4f46e5;
    --accent: #4f46e5;
    --exam: #dc3545;
    --task: #6c757d;
    --event: #198754;
    --border: #dee2e6;
    /* Linha de hierarquia (apenas tema claro): preto forte para teste */
    --hierarchy-line: #111111;
  }
  
  body { background: linear-gradient(180deg, #ffffff, #f8f9fa 20%, #ffffff); }
  
  /* Navegação */
  .nav-link.active { 
    background: #4f46e5 !important; 
    color: #ffffff !important; 
  }
  /* Hovers dos nav-links no tema claro */
  .nav-link:hover { 
    background: #f8f9fa !important; 
    color: #495057 !important;
  }
  
  .mobile-nav-links .nav-link:hover { 
    background: #f8f9fa !important; 
    border-color: #dee2e6 !important;
    color: #495057 !important;
  }
  
  .desktop-nav .nav-link:hover { 
    background: #f8f9fa !important; 
    border-color: #dee2e6 !important;
    color: #495057 !important;
  }
  
  /* Desktop nav específico para tema claro */
  .desktop-nav .nav-link.active { 
    background: #4f46e5 !important; 
    color: #ffffff !important; 
    border-color: #4f46e5 !important;
  }
  
  .mobile-nav-links .nav-link.active { 
    background: #4f46e5 !important; 
    color: #ffffff !important; 
  }
  
  /* Header no tema claro */
  .header {
    background: rgba(255, 255, 255, 0.95) !important;
    border-bottom: 1px solid #dee2e6 !important;
  }
  
  /* Nome do usuário no menu no tema claro */
  .desktop-user-info {
    background: #f8f9fa !important;
    border-bottom: 1px solid #dee2e6 !important;
  }
  
  .desktop-user-info .desktop-user-name {
    color: #495057 !important;
  }
  
  .desktop-user-info .desktop-user-role {
    color: #6c757d !important;
  }
  
  /* Cards e listas no tema claro */
  .card {
    background: #ffffff !important;
    border: 1px solid #dee2e6 !important;
  }
  
  .list li {
    background: #ffffff !important;
    border: 1px solid #dee2e6;
    color: #495057 !important;
  }
  /* TERCEIRO - Estilo do tema claro para .list li */
  
  /* Aulas canceladas no tema claro */
  .list li.upcoming-item.cancelled,
  .upcoming-section-content .list li.upcoming-item.cancelled,
  .upcoming-section-content .list li.cancelled {
    background: rgba(220, 53, 69, 0.05) !important;
    border-left: 3px solid #dc3545 !important;
    border-left-width: 3px !important;
    border-left-style: solid !important;
    border-left-color: #dc3545 !important;
    opacity: 0.7 !important;
  }
  /* QUINTO - Estilo para aulas canceladas (tema claro) */
  
  .list li.upcoming-item.cancelled:hover,
  .upcoming-section-content .list li.upcoming-item.cancelled:hover,
  .upcoming-section-content .list li.cancelled:hover {
    background: rgba(220, 53, 69, 0.08) !important;
    border-color: #dc3545 !important;
  }
  
  .modal-header {
    background: #f8f9fa !important;
    border-bottom: 1px solid #dee2e6 !important;
  }
  
  .modal-header h3 {
    color: #495057 !important;
  }
  
  /* Formulários - melhor contraste */
  input, textarea, select {
    background: #ffffff !important;
    color: #1a2b3c !important;
    border: 2px solid #dbe3ea !important;
  }
  
  input:focus, textarea:focus, select:focus {
    border-color: #2a9d8f !important;
    background: #ffffff !important;
    color: #1a2b3c !important;
  }
  
  /* Labels com melhor contraste */
  .form-grid label {
    color: #1a2b3c !important;
    font-weight: 600 !important;
  }
  
  /* Formulários e inputs no tema claro */
  .form-input {
    background: #ffffff !important;
    color: #495057 !important;
    border: 1px solid #dee2e6 !important;
  }
  
  .form-input:focus {
    border-color: #4f46e5 !important;
    background: #ffffff !important;
    color: #495057 !important;
  }
  
  .form-label {
    color: #495057 !important;
  }
  
  /* Chips e pills no tema claro */
  .chip {
    background: #f8f9fa !important;
    color: #495057 !important;
    border: 1px solid #dee2e6 !important;
  }
  
  .chip:hover {
    background: #e9ecef !important;
    border-color: #adb5bd !important;
  }
  /* Slot-chips no tema claro */
  .slot-chip {
    background: #f8f9fa !important;
    color: #495057 !important;
    border: 1px solid #dee2e6 !important;
  }
  
  .slot-chip:hover {
    background: #e9ecef !important;
    border-color: #adb5bd !important;
  }
  
  /* Hovers corretos para o tema claro - INVERTIDOS */
  .list li.clickable { 
    background: #f8f9fa !important; 
  }
  
  .list li.clickable:hover { 
    background: #e9ecef !important; 
    border-color: #adb5bd !important; 
  }
  
  .activity-row.clickable { 
    background: #f8f9fa !important; 
    border-left-color: #4f46e5 !important; 
  }
  
  .activity-row.clickable:hover { 
    background: #e9ecef !important; 
    border-left-color: #0b5ed7 !important; 
  }
  
  /* Estilos específicos para linhas de atividade no tema claro */
  .class-row {
    background: rgba(13, 110, 253, 0.08) !important;
    border-left: 3px solid #4f46e5 !important;
  }
  
  .event-row {
    background: rgba(25, 135, 84, 0.08) !important;
    border-left: 3px solid #198754 !important;
    opacity: 1 !important;
  }
  
  .task-row {
    background: rgba(245, 158, 11, 0.08) !important;
    border-left: 3px solid #f59e0b !important;
  }
  
  .slot-chip .dot { opacity: 0.5 !important; }
  .slot-chip .time { opacity: 0.85 !important; }
  
  /* FAQ items no tema claro */
  .faq-item {
    background: #ffffff !important;
    border: 1px solid #dee2e6 !important;
  }
  
  .faq-question {
    background: #f8f9fa !important;
    color: #495057 !important;
  }
  
  .faq-question:hover {
    background: #e9ecef !important;
  }
  
  .faq-answer {
    color: #495057 !important;
  }
  
  /* Calendário no tema claro */
  .calendar-grid .cell {
    background: #ffffff !important;
    color: #495057 !important;
    border: 1px solid #dee2e6 !important;
  }
  
  .calendar-grid .cell:hover {
    background: #f8f9fa !important;
  }
  
  .calendar-grid .cell .date {
    color: #6c757d !important;
  }
  
  /* Week grid checkboxes labels no tema claro */
  .week-row label {
    color: #495057 !important;
  }
  /* Week rows background no tema claro */
  .week-row {
    background: #ffffff !important;
    border: 1px solid #dee2e6 !important;
  }
  
  /* Filtros no tema claro */
  .filter-label {
    color: #495057 !important;
  }
  
  /* Pills com cores profissionais no tema claro */
  .pill.class {
    background: #4f46e5 !important; /* Azul para aulas */
    color: #ffffff !important;
  }
  
  .pill.event {
    background: #198754 !important; /* Verde para eventos */
    color: #ffffff !important;
  }
  
  .pill.exam {
    background: #dc3545 !important; /* Vermelho para provas */
    color: #ffffff !important;
  }
  
  .pill.task { background: #f59e0b !important; color: #ffffff !important; }
  
  .pill.today { 
    background: #dc3545 !important; /* Vermelho para hoje - melhor contraste */
    color: #ffffff !important; 
    font-weight: 700 !important;
  }
  
  /* Botões padronizados */
  .btn {
    background: var(--card) !important;
    color: var(--text) !important;
    border: 1px solid var(--border) !important;
  }
  
  .btn:hover {
    background: var(--hover-bg) !important;
    border-color: var(--accent) !important;
  }
  
  /* Botões secundários no tema claro */
  .btn.secondary {
    background: #f8f9fa !important;
    color: #495057 !important;
    border: 1px solid #dee2e6 !important;
  }
  
  .btn.secondary:hover {
    background: #e9ecef !important;
    border-color: #adb5bd !important;
    color: #495057 !important;
  }
  
  .btn[style*="background:#ff6b6b"] {
    background: #dc3545 !important;
    border-color: #dc3545 !important;
  }
  
  .btn[style*="background:#ff6b6b"]:hover {
    background: #b02a37 !important;
    border-color: #b02a37 !important;
  }
  
  /* Botão Admin específico - contraste melhorado */
  .dropdown button.btn.small.secondary {
    background: #495057 !important;
    border-color: #495057 !important;
    color: #ffffff !important;
  }
  
  .dropdown button.btn.small.secondary:hover {
    background: #343a40 !important;
    border-color: #343a40 !important;
    color: #ffffff !important;
  }
  
  /* Botões de texto no tema claro - fundo cinza claro */
  .btn-text {
    background: #4f46e5 !important;
    color: #ffffff !important;
    border-color: #4f46e5 !important;
  }
  
  .btn-text:hover {
    background: #0b5ed7 !important;
    border-color: #0b5ed7 !important;
    color: #ffffff !important;
  }
  
  .btn-text.secondary {
    background: #f8f9fa !important;
    color: #495057 !important;
    border-color: #dee2e6 !important;
  }
  
  .btn-text.secondary:hover {
    background: #e9ecef !important;
    border-color: #adb5bd !important;
    color: #495057 !important;
  }
  
  /* Botões do mural no tema claro */
  .bulletin-header-controls .btn {
    background: #4f46e5 !important;
    color: #ffffff !important;
    border-color: #4f46e5 !important;
  }
  
  .bulletin-header-controls .btn:hover {
    background: #0b5ed7 !important;
    border-color: #0b5ed7 !important;
    color: #ffffff !important;
  }
  
  .bulletin-header-controls .btn.secondary {
    background: #f8f9fa !important;
    color: #495057 !important;
    border-color: #dee2e6 !important;
  }
  
  .bulletin-header-controls .btn.secondary:hover {
    background: #e9ecef !important;
    border-color: #adb5bd !important;
    color: #495057 !important;
  }
  
  /* Contador de reações no tema claro - Reduzidos em 20% */
  .reaction-counter,
  #bulletin-board .reaction-counter,
  .bulletin-message .reaction-counter,
  .modal .reaction-counter,
  .unread-popup .reaction-counter {
    background: #f8f9fa !important;
    border-color: #dee2e6 !important;
    color: #495057 !important;
    font-weight: 500 !important;
    font-size: 10px !important; /* Reduzido de 12px para 10px (20% menor) */
    padding: 3px 6px !important; /* Reduzido de 4px 8px para 3px 6px (20% menor) */
    min-height: 19px !important; /* Reduzido de 24px para 19px (20% menor) */
  }
  
  .reaction-counter:hover,
  .modal .reaction-counter:hover,
  .unread-popup .reaction-counter:hover {
    background: #4f46e5 !important;
    border-color: #4f46e5 !important;
    color: #ffffff !important;
  }
  
  .reaction-counter.active,
  .modal .reaction-counter.active,
  .unread-popup .reaction-counter.active,
  #bulletin-board .reaction-counter.active,
  .bulletin-message .reaction-counter.active {
    background: #f8f9fa !important;
    border-color: #dee2e6 !important;
    color: #495057 !important;
    font-weight: 700 !important;
  }
  
  /* Botões de ação do mural no tema claro */
  #bulletin-board .action-btn {
    background: #f8f9fa !important;
    border-color: #dee2e6 !important;
    color: #495057 !important;
    font-size: 10px !important;
    padding: 4px 8px !important;
    height: 28px !important;
    min-width: 60px !important;
    border-radius: 6px !important;
    gap: 2px !important;
  }
  
  #bulletin-board .action-btn:hover {
    background: #4f46e5 !important;
    border-color: #4f46e5 !important;
    color: #ffffff !important;
  }
  
  .action-btn-minimal {
    background: #f8f9fa !important;
    border-color: #dee2e6 !important;
    color: #212529 !important;
    font-size: 11px !important; /* Reduzido de 14px para 11px (25% menor) */
    font-weight: 500 !important;
  }
  
  .action-btn-minimal:hover {
    background: #4f46e5 !important;
    border-color: #4f46e5 !important;
    color: #ffffff !important;
    transform: scale(1.05) !important;
  }
}

/* Melhorias nos filtros - removido duplicação, mantido acima */

/* FAQ melhorado */
.faq-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #0f1722;
  overflow: hidden;
}

.faq-question {
  padding: 16px;
  cursor: pointer;
  background: var(--card);
  border: none;
  color: var(--text);
  font-size: 15px;
  transition: background 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.faq-question:hover {
  background: #1a2332;
}

.faq-question::after {
  content: "▼";
  font-size: 12px;
  color: var(--muted);
  transition: transform 0.2s ease;
}

.faq-item[open] .faq-question::after {
  transform: rotate(180deg);
}

.faq-answer {
  padding: 0 16px 16px 16px;
  color: var(--text);
  line-height: 1.6;
}

.faq-answer ol, .faq-answer ul {
  margin: 0;
  padding-left: 20px;
}

.faq-answer li {
  margin-bottom: 8px;
}

.faq-answer p {
  margin: 0;
}

/* Card subtitle */
.card-subtitle {
  color: var(--muted);
  font-size: 14px;
  margin: 4px 0 0 0;
}

/* Dashboard week summary controls */
.week-day-item .day-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background-color 0.2s ease;
}

/* Upcoming commitments collapsible sections */
.upcoming-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background-color 0.2s ease;
  user-select: none;
}

.upcoming-section-header.expanded,
.list li.upcoming-section-header.expanded {
  background: rgba(76, 201, 240, 0.05) !important;
}

.upcoming-section-header:hover {
  background: rgba(255, 255, 255, 0.05);
}

.upcoming-section-header.expanded:hover,
.list li.upcoming-section-header.expanded:hover {
  background: rgba(76, 201, 240, 0.08) !important;
}

.upcoming-section-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.upcoming-count {
  font-size: 12px;
  color: var(--muted);
  font-weight: normal;
}

.upcoming-toggle-icon {
  font-size: 14px;
  color: var(--muted);
  transition: transform 0.2s ease;
  user-select: none;
}

.upcoming-section-content {
  transition: all 0.3s ease;
}

.upcoming-section-content .list {
  margin: 0;
  padding: 0;
  width: 100%;
  display: grid;
  gap: 12px;
}

/* Garantir que listas aninhadas dentro de upcoming-section-content ocupem toda a largura */
.upcoming-section-content .upcoming-section-content .list {
  width: 100%;
  margin: 0;
  padding: 0;
}

/* Garantir que itens de listas aninhadas ocupem toda a largura disponível */
.upcoming-section-content .upcoming-section-content .list li {
  width: 100%;
  box-sizing: border-box;
}
/* SEXTO - Estilo para itens de listas aninhadas */

/* Garantir que seções colapsáveis aninhadas ocupem toda a largura */
.upcoming-section-content .upcoming-section-header {
  width: 100%;
  box-sizing: border-box;
}

.upcoming-section-content .upcoming-section-content {
  width: 100%;
  box-sizing: border-box;
}


.week-day-item .day-header:hover {
  background: rgba(255, 255, 255, 0.1);
}

.week-day-item .day-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.week-day-item .day-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
}

.week-day-item .activity-count {
  font-weight: 500;
}

.week-day-item .toggle-icon {
  font-size: 14px;
  transition: transform 0.2s ease;
  user-select: none;
}

.week-day-item .day-content {
  transition: all 0.3s ease;
}

.week-day-item .day-header.collapsed {
  opacity: 0.7;
}

@media (prefers-color-scheme: light) {
  .week-day-item .day-header:hover {
    background: rgba(0, 0, 0, 0.05);
  }
  
  /* Melhorar contraste das informações do resumo da semana */
  .week-day-item .day-header strong {
    color: #212529 !important; /* Mesmo padrão das tarefas da semana */
    font-weight: 600 !important;
  }
  
  .week-day-item .day-date {
    color: #6c757d !important; /* Padronizar com tarefas da semana */
  }
  
  .week-day-item .day-controls {
    color: #6c757d !important; /* Padronizar com tarefas da semana */
  }
  
  .week-day-item .activity-count {
    color: #212529 !important; /* Mesmo padrão das tarefas da semana */
    font-weight: 600 !important;
  }
  
  /* Upcoming sections no tema claro */
  .upcoming-section-header:hover {
    background: rgba(0, 0, 0, 0.05) !important;
  }
  
  .upcoming-section-header.expanded,
  .list li.upcoming-section-header.expanded {
    background: rgba(13, 110, 253, 0.08) !important;
  }
  
  .upcoming-count {
    color: #6c757d !important;
  }
  
  /* Garantir que listas aninhadas ocupem toda a largura no tema claro */
  .upcoming-section-content .list {
    width: 100%;
    margin: 0;
    padding: 0;
  }
  
  .upcoming-section-content .upcoming-section-content .list {
    width: 100%;
    margin: 0;
    padding: 0;
  }
  
  .upcoming-section-content .upcoming-section-content .list li {
    width: 100%;
    box-sizing: border-box;
  }

  
  .upcoming-section-content .upcoming-section-header {
    width: 100%;
    box-sizing: border-box;
  }
  
  .upcoming-section-content .upcoming-section-content {
    width: 100%;
    box-sizing: border-box;
  }
  
  .upcoming-toggle-icon {
    color: #6c757d !important;
  }
  
  /* Data de adição na bibliografia - tema claro */
  .added-date {
    color: #6c757d !important;
    opacity: 0.9 !important;
  }
  
  /* Seções colapsíveis no tema claro */
  .section-header.collapsible:hover {
    background: rgba(0, 0, 0, 0.05) !important;
  }
  
  .toggle-icon {
    color: #6c757d !important;
  }
  
  /* Eventos concluídos no tema claro */
  .completed-event .pill.completed {
    background: #6c757d !important;
    color: #ffffff !important;
  }
  
  /* Pills para indicadores no tema claro */
  .pill.graded {
    background: #ffc107 !important;
    color: #000 !important;
  }
  
  .pill.work-type {
    background: #17a2b8 !important;
    color: #fff !important;
  }
}

/* ========== FAQ NAVIGATION ========== */
.faq-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  padding: 16px;
  background: var(--card);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.faq-nav-btn {
  padding: 8px 16px;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.faq-nav-btn:hover {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
  transform: translateY(-1px);
}

.faq-nav-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  font-weight: 600;
}

/* Light theme - use dark text for better contrast */
@media (prefers-color-scheme: light) {
  .faq-nav-btn.active {
    background: var(--primary);
    color: #000000;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary);
  }
}

/* Dark theme - use white text */
@media (prefers-color-scheme: dark) {
  .faq-nav-btn.active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
  }
}

.faq-section-title {
  color: var(--text);
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border);
}

.faq-section details {
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.2s ease;
}

.faq-section details:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(76, 201, 240, 0.1);
}

.faq-section details summary {
  padding: 16px;
  background: var(--card);
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
  transition: background 0.2s ease;
  position: relative;
}

.faq-section details summary:hover {
  background: rgba(76, 201, 240, 0.05);
}

.faq-section details summary::marker {
  color: var(--accent);
  font-size: 16px;
}

.faq-section details[open] summary {
  background: rgba(76, 201, 240, 0.1);
  border-bottom: 1px solid var(--border);
}

.faq-section details[open] summary::marker {
  color: var(--primary);
}

.faq-section details > *:not(summary) {
  padding: 16px;
  background: var(--background);
  color: var(--text);
  line-height: 1.6;
}

.faq-section details ol,
.faq-section details ul {
  margin: 0;
  padding-left: 20px;
}

.faq-section details li {
  margin-bottom: 8px;
}

.faq-section details strong {
  color: var(--accent);
  font-weight: 600;
}

/* Responsive FAQ */
@media (max-width: 768px) {
  .faq-nav {
    flex-direction: column;
    gap: 6px;
  }
  
  .faq-nav-btn {
    width: 100%;
    text-align: center;
    padding: 12px 16px;
  }
  
  .faq-section details summary {
    padding: 12px;
    font-size: 14px;
  }
  
  .faq-section details > *:not(summary) {
    padding: 12px;
    font-size: 14px;
  }
}

/* ========== SISTEMA DE MURAL COMPLETO ========== */

/* Layout Desktop com Painel Lateral Responsivo */
@media (min-width: 1024px) {
  .dashboard-layout {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    max-width: 100%;
  }
  
  .dashboard-main {
    flex: 0 0 450px;
    min-width: 400px;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    gap: 16px;
  }
  
  .dashboard-main .card {
    width: 100%;
  }
  
  .bulletin-sidebar {
    flex: 0 0 450px;
    min-width: 400px;
    max-width: 600px;
    position: sticky;
    top: 80px;
    height: calc(100vh - 100px);
  }
  
  /* Ajuste responsivo baseado no tamanho da tela */
  @media (min-width: 1200px) {
    .dashboard-main {
      flex: 0 0 500px;
    }
    .bulletin-sidebar {
      flex: 0 0 500px;
    }
  }
  
  @media (min-width: 1400px) {
    .dashboard-main {
      flex: 0 0 550px;
    }
    .bulletin-sidebar {
      flex: 0 0 550px;
    }
  }
  
  @media (min-width: 1600px) {
    .dashboard-main {
      flex: 0 0 600px;
    }
    .bulletin-sidebar {
      flex: 0 0 600px;
    }
  }
  
  #bulletin-board {
    height: 100%;
    display: flex;
    flex-direction: column;
    margin: 0;
  }
  
  #bulletin-board .card-content {
    flex: 1;
    overflow-y: auto;
    max-height: calc(100vh - 250px);
  }
  
  /* Estilos específicos para botões do mural no dashboard */
  #bulletin-board .action-btn {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 10px;
    padding: 4px 8px;
    height: 28px;
    min-width: 60px;
    border-radius: 6px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
  }
  
  #bulletin-board .action-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
  }
  
  #bulletin-board .bulletin-message-actions {
    gap: 4px;
    margin-top: 6px;
  }
}

/* Classe para ocultar elementos no mobile */
.desktop-only {
  display: block;
}

@media (max-width: 1023px) {
  .desktop-only {
    display: none !important;
  }
}

/* Badge no menu hamburger (mobile) */
/* Sistema Híbrido V2.0 - Badge do Menu */
.mobile-menu-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 8px;
  height: 8px;
  background: #ef4444;
  border-radius: 50%;
  border: 1px solid var(--background);
  transition: all 0.3s ease;
  opacity: 0;
  transform: scale(0);
}

.mobile-menu-badge.active {
  opacity: 1;
  transform: scale(1);
  animation: pulse-badge 2s infinite;
}

/* Sistema Híbrido V2.0 - Badge Inline no Link Mural */
.mobile-bulletin-badge-inline {
  background: #ef4444;
  color: white;
  border-radius: 10px;
  padding: 2px 6px;
  font-size: 10px;
  font-weight: 600;
  margin-left: auto;
  min-width: 16px;
  text-align: center;
  transition: all 0.3s ease;
  opacity: 0;
  transform: scale(0);
}

.mobile-bulletin-badge-inline.active {
  opacity: 1;
  transform: scale(1);
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* REMOVIDO - Botão antigo do mural mobile 
.mobile-bulletin-btn {
  position: relative;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text);
  padding: 8px;
  border-radius: 6px;
  transition: all 0.2s ease;
  display: none;
}

.mobile-bulletin-btn:hover {
  background: rgba(76, 201, 240, 0.1);
}

.mobile-bulletin-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  background: #ef4444;
  color: white;
  border-radius: 10px;
  min-width: 18px;
  height: 18px;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
*/

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: .7;
  }
}

@keyframes pulse-badge {
  0%, 100% { 
    transform: scale(1); 
    opacity: 1; 
  }
  50% { 
    transform: scale(1.1); 
    opacity: 0.8; 
  }
}

/* Ocultar badges e link do mural mobile em desktop */
@media (min-width: 1024px) {
  .mobile-menu-badge {
    display: none !important;
  }
  
  #bulletinLinkMobile {
    display: none !important;
  }
}

/* REMOVIDO - Estilos antigos
@media (min-width: 1024px) {
  .mobile-bulletin-btn {
    display: none !important;
  }
}

@media (max-width: 1023px) {
  .mobile-bulletin-btn {
    display: block;
    margin-left: 8px;
  }
}
*/

@media (max-width: 1023px) {
  /* Mobile: Link do Mural visível */
  #bulletinLinkMobile {
    display: flex !important;
  }
  
  .bulletin-sidebar {
    display: none !important;
  }
  
  .dashboard-layout {
    display: block;
  }
  
  .dashboard-main {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
  }
  
  .dashboard-main .full-width {
    grid-column: 1 / -1;
  }
}

/* Bulletin Board / Mural */
.bulletin-header-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Botões do header do mural reduzidos em 30% */
.bulletin-header-controls .btn {
  padding: 4px 8px; /* Reduzido de ~6px 12px para 4px 8px (30% menor) */
  font-size: 11px; /* Reduzido de ~14px para 11px (30% menor) */
  min-height: 24px; /* Reduzido proporcionalmente */
  border-radius: 4px; /* Reduzido de 6px para 4px */
}

.bulletin-unread {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

.bulletin-unread.has-unread {
  color: var(--accent);
  font-weight: 600;
  animation: pulse 2s ease-in-out infinite;
}

/* Estilos específicos do Mural (herda de .upcoming-item do Design System) */
/* Os estilos base vêm de .upcoming-item - não são necessários estilos adicionais aqui */

/* Removido efeito de hover das mensagens do mural para evitar interferência com dropdowns */

.bulletin-message.unread {
  border-left: 2px solid var(--accent); /* Reduzido de 4px para 2px (mais fina) */
  border-top: none; /* Garantir que não há borda superior */
  background: rgba(128, 255, 219, 0.08);
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.bulletin-message-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  font-size: 11px;
  color: var(--muted);
  width: 100%;
  gap: 8px;
}

.bulletin-message-author {
  font-weight: 600;
  color: var(--text);
  text-transform: capitalize;
}

.bulletin-message-date {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}

/* Melhorar alinhamento vertical do badge pontual no cabeçalho da mensagem */
.bulletin-message-header .priority-badge,
.bulletin-message-header .priority-icon {
  position: relative;
  top: -1px;
}

.bulletin-message-content {
  line-height: 1.4;
  white-space: pre-wrap;
  word-wrap: break-word;
  margin-bottom: 6px;
  text-align: left;
  font-size: 13px;
}

.bulletin-message-actions {
  display: flex; /* Sempre visível */
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-start;
  margin-top: 8px;
}

/* Hierarquia visual para tarefas ligadas às aulas */
.hierarchical-task {
  position: relative;
  margin-left: 20px;
  border-left: 3px solid var(--brand) !important;
  padding-left: 12px;
  background: rgba(76, 201, 240, 0.05);
  width: 100%;
  box-sizing: border-box;
}

/* Layout específico para disciplinas no popup de professores */
.hierarchical-task .upcoming-item {
  width: 100%;
  box-sizing: border-box;
}


.task-hierarchy-indicator {
  position: absolute;
  left: -8px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--accent);
  font-weight: bold;
  font-size: 14px;
  line-height: 1;
}

.task-content {
  flex: 1;
}

/* Botões minimalistas para o Mural - Reduzidos em 25% */
.action-btn-minimal {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 4px 6px; /* Reduzido de 6px 8px para 4px 6px (25% menor) */
  font-size: 11px; /* Reduzido de 14px para 11px (25% menor) */
  border-radius: 4px; /* Reduzido de 6px para 4px */
  cursor: pointer;
  transition: all 0.2s ease;
  margin: 1px;
  min-width: 30px; /* Reduzido de 40px para 30px (25% menor) */
  white-space: nowrap;
  min-height: 24px; /* Reduzido de 32px para 24px (25% menor) */
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px; /* Reduzido de 4px para 3px */
}

.action-btn-minimal:hover {
  background: var(--bg-elevated);
  border-color: var(--text);
}

.action-btn-minimal.read-btn:hover {
  background: #10b981;
  color: white;
  border-color: #10b981;
}

.action-btn-minimal.unread-btn:hover {
  background: #f59e0b;
  color: white;
  border-color: #f59e0b;
}

.action-btn-minimal.delete-btn:hover {
  background: #ef4444;
  color: white;
  border-color: #ef4444;
}

.action-btn-minimal.admin-btn:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.action-btn-minimal.reply-btn:hover {
  background: #3b82f6;
  color: white;
  border-color: #3b82f6;
}

.action-btn-minimal.reaction-btn:hover {
  background: #f59e0b;
  color: white;
  border-color: #f59e0b;
}

.action-btn-minimal.favorite-btn:hover {
  background: #eab308;
  color: white;
  border-color: #eab308;
}

.action-btn-minimal.like-btn:hover {
  background: #ef4444;
  color: white;
  border-color: #ef4444;
}

.action-btn-minimal.ok-btn:hover {
  background: #10b981;
  color: white;
  border-color: #10b981;
}

.action-btn-minimal.dislike-btn:hover {
  background: #6b7280;
  color: white;
  border-color: #6b7280;
}

.reaction-btn.active {
  background: var(--primary);
  color: white;
  transform: scale(1.05);
}

.favorite-btn.active {
  background: #f9c846 !important;
  color: #ffffff !important;
  transform: scale(1.05);
}

/* Contadores de reação - Reduzidos em 20% */
.reaction-counter,
#bulletin-board .reaction-counter,
.bulletin-message .reaction-counter,
.modal .reaction-counter,
.unread-popup .reaction-counter {
  display: inline-flex;
  align-items: center;
  gap: 3px; /* Reduzido de 4px para 3px (20% menor) */
  padding: 3px 6px; /* Reduzido de 4px 8px para 3px 6px (20% menor) */
  border-radius: 10px; /* Reduzido de 12px para 10px */
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  font-size: 10px; /* Reduzido de 12px para 10px (20% menor) */
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 19px; /* Reduzido de 24px para 19px (20% menor) */
}

.reaction-counter.active,
.modal .reaction-counter.active,
.unread-popup .reaction-counter.active,
#bulletin-board .reaction-counter.active,
.bulletin-message .reaction-counter.active {
  background: var(--bg-elevated);
  color: var(--text);
  border-color: var(--border);
  font-weight: 700;
  transform: scale(1.02);
}

.reaction-counter:hover,
.modal .reaction-counter:hover,
.unread-popup .reaction-counter:hover {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
  transform: scale(1.01);
}

.reaction-counter.active:hover,
.modal .reaction-counter.active:hover,
.unread-popup .reaction-counter.active:hover {
  background: var(--accent);
  border-color: var(--accent);
  transform: scale(1.03);
}

.reaction-menu {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.menu-item {
  display: block;
  width: 100%;
  padding: 8px 12px;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  font-size: 12px;
  color: var(--text);
  transition: background-color 0.2s ease;
}

.menu-item:hover {
  background: var(--hover);
}

/* Garantir que dropdown admin sempre fique no topo */
.dropdown .menu {
  z-index: 99999 !important;
}

/* Seções colapsáveis padronizadas - usando o mesmo padrão do calendário */
.semester-section {
  margin-bottom: 16px;
}

.section-header.collapsible,
.collapsible-header {
  background: var(--border) !important;
  color: var(--text) !important;
  font-weight: 600 !important;
  padding: 8px 12px !important;
  border-radius: 6px !important;
  margin: 12px 0 4px 0 !important;
  border: none !important;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background-color 0.2s ease;
  user-select: none;
}

.section-header:first-child {
  margin-top: 0 !important;
}

.section-header.collapsible:hover,
.collapsible-header:hover {
  background: rgba(255, 255, 255, 0.05) !important;
}

.toggle-icon,
.expand-icon {
  font-size: 12px;
  opacity: 0.8;
  transition: transform 0.2s ease;
  color: var(--muted);
}

.header-content {
  display: flex;
  align-items: center;
  gap: 8px;
}

.collapsible-content {
  list-style: none;
  padding: 0;
  margin: 0;
}


.section-content li {
  margin-bottom: 8px;
  padding: 12px 16px;
  background: #0f1722;
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
}

/* Seções de disciplina dentro dos semestres */
.discipline-section {
  margin: 8px 0;
}

.discipline-section .section-header.collapsible {
  background: var(--border) !important;
  color: var(--text) !important;
  font-weight: 600 !important;
  padding: 8px 12px !important;
  border-radius: 6px !important;
  margin: 8px 0 4px 0 !important;
  border: none !important;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
}



.discipline-section .section-content li {
  margin-bottom: 6px;
  padding: 12px 16px;
  background: #0f1722;
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
}

@media (prefers-color-scheme: light) {
  .section-header.collapsible,
  .collapsible-header {
    background: #e2e8f0 !important;
    color: #1e293b !important;
  }
  
  .section-header.collapsible:hover,
  .collapsible-header:hover {
    background: #d1d9e6 !important;
  }
  
  .section-content li {
    background: #ffffff;
  }
  
  .discipline-section .section-header.collapsible {
    background: #e2e8f0 !important;
    color: #1e293b !important;
  }
  
  .discipline-section .section-header.collapsible:hover {
    background: rgba(0, 0, 0, 0.05) !important;
  }
  
  .discipline-section .section-content li {
    background: #ffffff;
  }
}

.char-count {
  text-align: right;
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

.char-count.warning {
  color: #ffd166;
}

.char-count.error {
  color: #ff6b6b;
}

.form-help {
  margin-top: 8px;
}

.form-help small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

/* Modal spacing improvements */
#bulletinModalOverlay {
  z-index: 1002;
}

/* Priority badges - cores mais vibrantes e específicas */
.priority-badge {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
  /* Debug: garantir que o elemento seja visível */
  min-width: 8px;
  min-height: 8px;
}

.priority-badge.badge-normal {
  background-color: #9ca3af !important;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.2);
}

.priority-badge.badge-high {
  background-color: #f97316 !important;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.2);
}

.priority-badge.badge-urgent {
  background-color: #ef4444 !important;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.2);
}

/* Ícone textual para prioridade (ex.: 🚧, 🛑) */
.priority-icon {
  margin-right: 6px;
  font-size: 12px;
  line-height: 1;
  vertical-align: middle;
  opacity: 0.95;
}

/* Bulletin pinned and priority styles */
.bulletin-message.pinned {
  border-left: 2px solid #f9c846; /* Reduzido de 4px para 2px */
  background: linear-gradient(90deg, #2a2319 0%, #1f1a0f 100%);
  position: relative;
  color: #ffffff;
}
.bulletin-message .bulletin-message-author .pinned-icon {
  color: #f9c846;
  margin-right: 2px;
}
.bulletin-message.pinned .bulletin-message-author {
  color: #ffffff;
}
.bulletin-message.pinned .bulletin-message-date {
  color: #cccccc;
}
.bulletin-message.pinned .bulletin-message-content {
  color: #ffffff;
}
/* priority-normal uses default styles */
.bulletin-message.priority-high { border-left: 2px solid #ff9800; } /* Reduzido de 4px para 2px */
.bulletin-message.priority-urgent { border-left: 2px solid #e53935; } /* Reduzido de 4px para 2px */
@media (prefers-color-scheme: light) {
  .bulletin-message.priority-high { border-left-color: #ff9800; }
  .bulletin-message.priority-urgent { border-left-color: #e53935; }
}

/* Grupos Colapsáveis do Mural - Agora usa padrão do Design System (upcoming-section-header) */
/* Os estilos base vêm de .upcoming-section-header e .upcoming-section-content */

/* Seção de Mensagens Novas */
.bulletin-section {
  padding: 12px;
  margin: 8px 0;
  border-radius: 6px;
}

.bulletin-section.title {
  background: rgba(249, 200, 70, 0.1);
  font-weight: 600;
  color: #f9c846;
  border: 1px solid rgba(249, 200, 70, 0.2);
}

.bulletin-section.unread-bar {
  background: rgba(76, 201, 240, 0.1);
  border: 1px solid rgba(76, 201, 240, 0.3);
  color: var(--accent);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.bulletin-section.unread-bar .btn {
  flex-shrink: 0;
}

/* Dropdown admin menu for bulletin - tema escuro padrão */
.dropdown .menu {
  display: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.7);
  animation: fadeIn 0.2s ease-out;
  background: #1a2332;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 0;
  min-width: 160px;
  z-index: 1000;
}

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

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

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

.dropdown .menu.open {
  display: block !important;
}

.dropdown .menu .menu-item {
  padding: 12px 16px;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  color: #e6edf3;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
  font-weight: 500;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.dropdown .menu .menu-item:last-child {
  border-bottom: none;
}

.dropdown .menu .menu-item:hover {
  background: #243041;
  color: #ffffff;
  transform: translateX(2px);
}
  
/* Botão Admin com melhor contraste no tema escuro */
.dropdown button.btn.small.secondary {
  background: #495057 !important;
  border: 1px solid #495057 !important;
  color: #ffffff !important;
  font-weight: 600;
  font-size: 12px;
  padding: 6px 10px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.dropdown button.btn.small.secondary:hover {
  background: #343a40 !important;
  border-color: #343a40 !important;
  color: #ffffff !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.modal-content {
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

@media (prefers-color-scheme: light) {
  .bulletin-message {
    background: #f8f9fa;
    border-color: #dee2e6;
  }
  
  /* Removido efeito de hover das mensagens do mural no tema claro */
  
  .bulletin-message.unread {
    background: linear-gradient(90deg, #e8f5e8 0%, #f0fdf4 100%);
    border-left: 4px solid #22c55e;
    border: 1px solid #86efac;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.15);
    position: relative;
  }
  
  /* Removido estilo de borda superior verde para mensagens não lidas */
  
  .bulletin-message.pinned {
    background: linear-gradient(90deg, #fff9db 0%, #fffef0 100%);
    border-left-color: #f9c846;
    color: #212529;
  }
  .bulletin-message.pinned .bulletin-message-author {
    color: #212529;
  }
  .bulletin-message.pinned .bulletin-message-date {
    color: #6c757d;
  }
  .bulletin-message.pinned .bulletin-message-content {
    color: #212529;
  }
  
  /* Botão "Marcar como lida" destacado no tema claro */
  .bulletin-message.unread .read-btn {
    background: #22c55e !important;
    color: #ffffff !important;
    border-color: #22c55e !important;
    font-weight: 600 !important;
    box-shadow: 0 2px 4px rgba(34, 197, 94, 0.3) !important;
  }
  
  .bulletin-message.unread .read-btn:hover {
    background: #16a34a !important;
    border-color: #16a34a !important;
    transform: translateY(-1px) !important;
  }
  
  .bulletin-message.priority-high {
    background: linear-gradient(90deg, #fff3e0 0%, #fffef0 100%);
    border-left: 4px solid #ff9800 !important;
  }
  
  .bulletin-message.priority-urgent {
    background: linear-gradient(90deg, #ffeaea 0%, #fffef0 100%);
    border-left: 4px solid #e53935 !important;
  }
  
  .bulletin-message-author {
    color: #212529;
  }
  
  .bulletin-section.title {
    background: rgba(249, 200, 70, 0.15);
  }
  
  .bulletin-section.unread-bar {
    background: rgba(76, 201, 240, 0.15);
  }
  
  .dropdown .menu {
    background: #0a0a0a;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.7);
    border-color: #777;
  }
  
  .dropdown .menu .menu-item {
    color: #ffffff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 600;
  }
  
  .dropdown .menu .menu-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    transform: translateX(2px);
  }
  
  /* Botão Admin com melhor contraste */
  .dropdown button.btn.small.secondary {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #495057;
    font-weight: 500;
    font-size: 12px;
    padding: 6px 10px;
  }
  
  .dropdown button.btn.small.secondary:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    color: #212529;
  }
  
  /* Priority badges no tema claro */
  .priority-badge.badge-normal {
    background-color: #6c757d !important;
  }
  
  .priority-badge.badge-high {
    background-color: #fd7e14 !important;
  }
  
  .priority-badge.badge-urgent {
    background-color: #dc3545 !important;
  }
  
  /* Dropdown admin para tema claro */
  .dropdown .menu {
    background: #ffffff !important;
    border: 1px solid #dee2e6 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
  }
  
  .dropdown .menu .menu-item {
    color: #495057 !important;
    border-bottom: 1px solid #f1f3f4 !important;
    padding: 12px 16px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
  }
  
  .dropdown .menu .menu-item:hover {
    background: #f8f9fa !important;
    color: #495057 !important;
    transform: translateX(2px);
  }
  
  /* Botões de navegação do carrossel no tema claro */
  .carousel-nav {
    background: #f8f9fa !important;
    border: 1px solid #dee2e6 !important;
    color: #495057 !important;
  }
  
  .carousel-nav:hover {
    background: #4f46e5 !important;
    border-color: #4f46e5 !important;
    color: #ffffff !important;
  }
  
  /* Controles da semana no tema claro */
  .week-range {
    color: #495057 !important;
  }
  
  .btn-icon {
    background: #f8f9fa !important;
    border: 1px solid #dee2e6 !important;
    color: #495057 !important;
  }
  
  .btn-icon:hover {
    background: #e9ecef !important;
    border-color: #4f46e5 !important;
    color: #4f46e5 !important;
  }
  
  /* Bordas hierárquicas no tema claro - sobrescrever estilos inline */
  .hierarchical-task,
  .upcoming-item.hierarchical-task,
  .list li.hierarchical-task {
    border-left: 3px solid var(--brand) !important;
  }

  
  /* Linha horizontal de conexão hierárquica no tema claro */
  [style*="background: #7CFC00"] {
    background: #212529 !important;
  }
}

/* Responsividade extra para filtros em telas muito pequenas */
@media (max-width: 480px) {
  .filters-container .card {
    padding: 12px;
  }
  
  .filters-wrapper {
    gap: 12px;
  }
  
  /* .legend styles moved to filters-container specific rules above */
  
  .filter-group select {
    font-size: 13px;
    padding: 6px;
    max-width: 200px;
  }
}

/* Estilos para compromissos concluídos */
.completed-event {
  opacity: 0.7;
}

.completed-event .pill.completed {
  background: var(--muted) !important;
  color: var(--background) !important;
}

.hidden {
  display: none !important;
}

/* Pills para indicadores de compromissos */
.pill.graded {
  background: #ffc107 !important;
  color: #000 !important;
  font-size: 10px;
}

.pill.work-type {
  background: #17a2b8 !important;
  color: #fff !important;
  font-size: 10px;
}

.pill.holiday {
  background: linear-gradient(135deg, #e2e8f0, #cbd5e1) !important;
  color: #1e293b !important;
  font-size: 12px;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.7; }
  100% { opacity: 1; }
}

/* ===== HOLIDAYS STYLES ===== */
.holiday-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.holiday-actions .btn.small {
  padding: 4px 8px;
  font-size: 11px;
  min-width: auto;
}

.holiday-description {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.4;
}

.holiday-affects {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.affects-label {
  color: var(--text-secondary);
  font-weight: 500;
}

.affects-list {
  color: var(--text);
  font-weight: 500;
}

.holiday-actions {
  display: flex;
  gap: 8px;
  margin-left: 16px;
}

.holiday-actions .btn {
  white-space: nowrap;
}

/* Formulário de feriados */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-weight: 500;
  color: var(--text) !important;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.checkbox-label .checkmark {
  display: none; /* Usar checkbox nativo por simplicidade */
}

/* Resumo de Feriado */
.holiday-summary {
  background: linear-gradient(135deg, rgba(100, 116, 139, 0.08), rgba(71, 85, 105, 0.08));
  border: 2px solid #64748b;
  border-radius: 12px;
  padding: 20px;
  margin: 16px 0;
}

.holiday-info h3 {
  color: #ffffff;
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 8px 0;
}

.holiday-type {
  color: #ffffff;
  font-size: 14px;
  font-weight: 500;
  margin: 0 0 12px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.holiday-description {
  color: #ffffff;
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 12px 0;
}

.holiday-period {
  color: #e2e8f0;
  font-size: 13px;
  margin: 0 0 16px 0;
}

.holiday-message {
  background: rgba(100, 116, 139, 0.05);
  border-radius: 8px;
  padding: 16px;
  border-left: 4px solid #64748b;
}

.holiday-message p {
  margin: 0 0 8px 0;
  color: #ffffff;
  font-size: 14px;
  line-height: 1.4;
}

.holiday-message p:last-child {
  margin-bottom: 0;
}

.holiday-message strong {
  color: #ffffff;
}

/* Tema claro para resumo de feriado */
@media (prefers-color-scheme: light) {
  .holiday-summary {
    background: linear-gradient(135deg, rgba(100, 116, 139, 0.06), rgba(71, 85, 105, 0.06));
    border-color: #94a3b8;
  }
  
  .holiday-info h3 {
    color: #1e293b;
  }
  
  .holiday-type {
    color: #475569;
  }
  
  .holiday-description {
    color: #1e293b;
  }
  
  .holiday-period {
    color: #64748b;
  }
  
  .holiday-message {
    background: rgba(100, 116, 139, 0.04);
    border-left-color: #94a3b8;
  }
  
  .holiday-message p {
    color: #1e293b;
  }
  
  .holiday-message strong {
    color: #1e293b;
  }
}

/* Dia de feriado - destaque visual sóbrio */
.calendar-grid .cell.holiday-day {
  background: linear-gradient(135deg, rgba(100, 116, 139, 0.1), rgba(71, 85, 105, 0.1));
  border: 2px solid #64748b;
  position: relative;
}

.calendar-grid .cell.holiday-day::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, transparent 30%, rgba(100, 116, 139, 0.05) 50%, transparent 70%);
  pointer-events: none;
}

.calendar-grid .cell.holiday-day .date {
  color: #475569;
  font-weight: 600;
}

.calendar-grid .cell.holiday-day .pill.holiday {
  background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
  color: #1e293b;
  font-weight: 600;
  font-size: 10px;
  padding: 4px 8px;
  box-shadow: 0 2px 4px rgba(100, 116, 139, 0.2);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  min-width: fit-content;
}

/* Tema claro para dias de feriado */
@media (prefers-color-scheme: light) {
  .calendar-grid .cell.holiday-day {
    background: linear-gradient(135deg, rgba(100, 116, 139, 0.08), rgba(71, 85, 105, 0.08));
    border-color: #94a3b8;
  }
  
  .calendar-grid .cell.holiday-day .date {
    color: #475569;
  }
  
  .calendar-grid .cell.holiday-day .pill.holiday {
    background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
    color: #1e293b;
  }
}

/* Seção de Feriados */
.holidays-section {
  margin: 16px 0;
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

#holidaysList {
  margin-top: 16px;
}

.holidays-section .btn {
  font-size: 14px;
  padding: 8px 16px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.holidays-section .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Modal de feriados - usando a regra .modal-overlay existente */

.modal-content {
  background: var(--card);
  border-radius: 12px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  max-width: 800px;
  width: 90%;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--background);
}

.modal-header h3 {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  font-weight: 600;
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: var(--border);
  color: var(--text);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.holidays-actions {
  margin-bottom: 20px;
}

/* Responsividade para feriados */
@media (max-width: 768px) {
  .modal-content {
    width: 95%;
    margin: 20px;
  }
  
  .modal-header {
    padding: 16px 20px;
  }
  
  .modal-body {
    padding: 20px;
  }
  
  .holiday-item {
    flex-direction: column;
    gap: 12px;
  }
  
  .holiday-actions {
    margin-left: 0;
    width: 100%;
    justify-content: flex-end;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .holiday-dates {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}