/* ==========================================================================
   SISTEMA PIT/RIT - SECRETARIA VIRTUAL (IAD / UFJF)
   Estilo Institucional Moderno, Responsivo e Acessível
   ========================================================================== */

:root {
  --primary: #990000;        /* Vermelho Oficial UFJF (www.ufjf.br) */
  --primary-dark: #730000;   /* Vermelho Escuro UFJF */
  --primary-light: #C00000;  /* Vermelho Vibrante UFJF */
  --primary-subtle: #FDF2F2; /* Vermelho Suave UFJF */
  
  --secondary: #730000;
  --secondary-light: #F8E6E6;
  
  --accent: #990000;         
  --accent-light: #FDF2F2;
  
  --success: #059669;
  --success-dark: #047857;
  --success-light: #D1FAE5;
  
  --warning: #D97706;
  --warning-dark: #B45309;
  --warning-light: #FEF3C7;
  
  --danger: #990000;
  --danger-dark: #730000;
  --danger-light: #FDF2F2;

  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --bg-muted: #f1f5f9;
  
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;
  
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* ==========================================================================
   Header Institucional (Vermelho UFJF)
   ========================================================================== */
.header-institutional {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: #ffffff;
  padding: 1.25rem 2rem;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 0;
  z-index: 40;
}

.header-container {
  max-width: 1300px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header-logo-badge {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: var(--radius-md);
  padding: 0.6rem 0.9rem;
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

.header-title-group h1 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.2px;
  line-height: 1.2;
}

.header-title-group p {
  font-size: 0.85rem;
  color: #fecaca;
  margin-top: 2px;
}

.header-user-status {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.docente-pill {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-full);
  font-size: 0.825rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.docente-pill strong {
  color: #ffffff;
}

/* ==========================================================================
   Barra de Passos (Stepper - Ajustado sem rolagem horizontal)
   ========================================================================== */
.stepper-nav-wrapper {
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 73px;
  z-index: 30;
  overflow-x: hidden;
}

.stepper-nav {
  max-width: 1300px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1rem;
  gap: 0.35rem;
  list-style: none;
  flex-wrap: wrap;
}

.step-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-muted);
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
  border: 1px solid transparent;
  white-space: nowrap;
}

.step-item:hover:not(.disabled) {
  background: var(--primary-subtle);
  color: var(--primary);
}

.step-item.active {
  background: var(--primary);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}

.step-item.completed {
  background: var(--success-light);
  color: var(--success-dark);
  border-color: rgba(16, 185, 129, 0.3);
}

.step-item.disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.step-badge {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}

.step-item.active .step-badge {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

/* ==========================================================================
   Container Principal
   ========================================================================== */
.main-container {
  max-width: 1300px;
  margin: 2rem auto;
  padding: 0 1.5rem;
  flex: 1;
  width: 100%;
}

.view-section {
  display: none;
  animation: fadeIn 0.3s ease-in-out;
}

.view-section.active-view {
  display: block;
}

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

/* ==========================================================================
   Card de Identificação (Passo 1)
   ========================================================================== */
.card-identification {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  max-width: 760px;
  margin: 1.5rem auto;
  overflow: hidden;
}

.card-header-gradient {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #ffffff;
  padding: 1.75rem 2rem;
}

.card-header-gradient h2 {
  font-size: 1.4rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.card-header-gradient p {
  font-size: 0.9rem;
  color: #e2e8f0;
  margin-top: 0.4rem;
}

.card-body {
  padding: 2rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.form-group-full {
  grid-column: span 2;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.4rem;
}

.form-group label .required {
  color: var(--danger);
  margin-left: 2px;
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  color: var(--text-main);
  background-color: #ffffff;
  transition: var(--transition);
  font-family: inherit;
}

.form-control:focus {
  outline: none;
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.form-helper {
  font-size: 0.775rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

.card-footer-actions {
  padding: 1.25rem 2rem;
  background: var(--bg-muted);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
}

/* ==========================================================================
   Botões
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius-md);
  font-size: 0.925rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
  text-decoration: none;
  font-family: inherit;
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--primary-light);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: #ffffff;
  color: var(--text-main);
  border-color: var(--border-strong);
}

.btn-secondary:hover {
  background: var(--bg-muted);
}

.btn-success {
  background: var(--success);
  color: #ffffff;
}

.btn-success:hover {
  background: var(--success-dark);
}

.btn-danger {
  background: var(--danger-light);
  color: var(--danger-dark);
  border-color: rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
  background: var(--danger);
  color: #ffffff;
}

.btn-sm {
  padding: 0.35rem 0.7rem;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
}

.btn-icon-only {
  padding: 0.35rem;
  border-radius: var(--radius-sm);
}

/* ==========================================================================
   Dashboard do Eixo & Informações de Carga Horária
   ========================================================================== */
.axis-header-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.5rem;
  align-items: center;
}

.axis-info h2 {
  font-size: 1.35rem;
  color: var(--primary);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.axis-info p {
  color: var(--text-muted);
  font-size: 0.925rem;
  margin-top: 0.35rem;
}

.axis-rule-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.6rem;
  background: var(--primary-subtle);
  color: var(--primary-light);
  font-size: 0.825rem;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  font-weight: 600;
}

.axis-workload-summary {
  background: var(--bg-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem 1.5rem;
  display: flex;
  gap: 2rem;
  align-items: center;
}

.summary-metric {
  text-align: center;
}

.summary-metric .metric-val {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1;
  color: var(--primary);
}

.summary-metric .metric-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 700;
  margin-top: 0.35rem;
}

.summary-metric.limit-ok .metric-val {
  color: var(--success-dark);
}

.summary-metric.limit-warn .metric-val {
  color: var(--warning-dark);
}

.summary-metric.limit-exceeded .metric-val {
  color: var(--danger-dark);
}

/* ==========================================================================
   Tabela do Eixo 1
   ========================================================================== */
.table-responsive-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 2rem;
}

.pit-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.pit-table thead {
  background: var(--primary);
  color: #ffffff;
}

.pit-table th {
  padding: 1rem 1.25rem;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--primary-dark);
}

.pit-table td {
  padding: 1.15rem 1.25rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  font-size: 0.925rem;
}

.pit-table tbody tr:hover {
  background-color: #f8fafc;
}

.pit-table tbody tr.has-activities {
  background-color: #fafcff;
}

.pit-table tbody tr.subgroup-row {
  background: var(--primary-subtle);
  border-top: 2px solid var(--primary-light);
  border-bottom: 2px solid var(--primary-light);
}

.pit-table tbody tr.subgroup-row td {
  padding: 0.75rem 1.25rem;
  font-weight: 800;
  color: var(--primary-dark);
  font-size: 0.925rem;
  letter-spacing: 0.2px;
}

.report-subgroup-row td {
  background: #f1f5f9;
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 0.875rem;
  border-top: 1.5px solid var(--border-strong);
  border-bottom: 1.5px solid var(--border-strong);
}

.col-num {
  width: 55px;
  text-align: center;
  font-weight: 800;
  color: var(--primary);
  font-size: 1.05rem;
}

.col-desc {
  width: 42%;
  line-height: 1.45;
  color: var(--text-main);
}

.col-obs {
  width: 22%;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.col-activities {
  width: 24%;
}

.col-actions {
  width: 100px;
  text-align: right;
}

.badge-obs {
  display: inline-block;
  background: #f1f5f9;
  border: 1px solid var(--border);
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  color: #475569;
  font-weight: 500;
}

.badge-obs.badge-limit-special {
  background: var(--accent-light);
  border-color: rgba(245, 158, 11, 0.3);
  color: var(--warning-dark);
}

/* ==========================================================================
   Lista de Atividades Lançadas dentro do Item
   ========================================================================== */
.activities-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.activity-item-chip {
  background: #ffffff;
  border: 1px solid var(--border-strong);
  border-left: 3.5px solid var(--secondary);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.65rem;
  font-size: 0.825rem;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.activity-item-chip.activity-warn {
  border-left-color: var(--warning);
}

.activity-chip-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
}

.activity-title {
  font-weight: 600;
  color: var(--text-main);
  word-break: break-word;
}

.activity-hours-badge {
  background: var(--secondary-light);
  color: var(--secondary);
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.775rem;
  white-space: nowrap;
}

.activity-chip-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.35rem;
  margin-top: 0.2rem;
  border-top: 1px dashed var(--border);
  padding-top: 0.3rem;
}

.activity-chip-actions button {
  background: none;
  border: none;
  font-size: 0.75rem;
  cursor: pointer;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-weight: 600;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.btn-chip-edit {
  color: var(--secondary);
}
.btn-chip-edit:hover {
  background: var(--secondary-light);
}

.btn-chip-delete {
  color: var(--danger);
}
.btn-chip-delete:hover {
  background: var(--danger-light);
}

.item-subtotal-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.775rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-subtle);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  margin-top: 0.4rem;
}

.empty-activity-notice {
  font-size: 0.8rem;
  color: var(--text-light);
  font-style: italic;
}

/* ==========================================================================
   Barra de Ações do Rodapé da Página
   ========================================================================== */
.footer-nav-bar {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.75rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

/* ==========================================================================
   Modais (Adicionar / Editar Atividade & Compilação)
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.modal-backdrop.show {
  opacity: 1;
  visibility: visible;
}

.modal-content,
.modal-dialog {
  background: #ffffff;
  border-radius: var(--radius-xl);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  max-width: 650px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: translateY(16px) scale(0.98);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid rgba(226, 232, 240, 0.8);
}

.modal-backdrop.show .modal-content,
.modal-backdrop.show .modal-dialog {
  transform: translateY(0) scale(1);
}

.modal-header {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: #ffffff;
  padding: 1.25rem 1.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.modal-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #ffffff;
}

.modal-header p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.85rem;
  margin-top: 2px;
}

.modal-close-btn,
.btn-close-modal {
  background: rgba(255, 255, 255, 0.18);
  border: none;
  color: #ffffff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.modal-close-btn:hover,
.btn-close-modal:hover {
  background: rgba(255, 255, 255, 0.35);
  color: #ffffff;
}

.modal-body {
  padding: 1.75rem;
  background: #ffffff;
  overflow-y: auto;
  flex: 1;
}

.item-reference-box {
  background: var(--bg-muted);
  border-left: 4px solid var(--primary);
  padding: 1rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 1.25rem;
}

.item-ref-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.25rem;
}

.item-ref-desc {
  font-size: 0.9rem;
  color: var(--text-main);
  line-height: 1.4;
}

.item-ref-obs {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
  font-weight: 500;
}

.modal-footer {
  padding: 1rem 1.75rem;
  background: #f8fafc;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  align-items: center;
  flex-shrink: 0;
}

/* ==========================================================================
   Relatório Compilado (Visualização Final & Impressão)
   ========================================================================== */
.compilation-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
  margin-bottom: 2rem;
}

.report-header-doc {
  border-bottom: 2px solid var(--primary);
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.report-title-area h2 {
  font-size: 1.4rem;
  color: var(--primary-dark);
  font-weight: 800;
}

.report-title-area p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.docente-info-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  background: var(--bg-muted);
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
}

.info-item .info-lbl {
  font-size: 0.725rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
}

.info-item .info-val {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
  margin-top: 0.15rem;
}

.report-compiled-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.report-compiled-table th,
.report-compiled-table td {
  border: 1px solid var(--border);
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
}

.report-compiled-table th {
  background: var(--bg-muted);
  font-weight: 700;
  text-align: left;
  color: var(--text-main);
}

.report-axis-header-row td {
  background: var(--primary-subtle);
  color: var(--primary);
  font-weight: 800;
  font-size: 0.95rem;
  border-top: 2px solid var(--primary);
}

.report-total-row td {
  background: var(--bg-muted);
  font-weight: 800;
  font-size: 0.95rem;
  border-top: 2px solid var(--text-main);
}

/* ==========================================================================
   Alerta Institucional / Info Box
   ========================================================================== */
.alert-box {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.alert-info {
  background: var(--secondary-light);
  color: #0369a1;
  border: 1px solid rgba(2, 132, 199, 0.25);
}

.alert-warning {
  background: var(--warning-light);
  color: var(--warning-dark);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.alert-danger {
  background: var(--danger-light);
  color: var(--danger-dark);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* ==========================================================================
   Placeholder para Próximos Eixos (2 a 6)
   ========================================================================== */
.eixo-placeholder-card {
  background: #ffffff;
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 4rem 2rem;
  text-align: center;
  max-width: 700px;
  margin: 2rem auto;
}

.placeholder-icon {
  font-size: 3rem;
  color: var(--primary-light);
  margin-bottom: 1rem;
}

/* ==========================================================================
   Rodapé do Sistema
   ========================================================================== */
.system-footer {
  background: #ffffff;
  border-top: 1px solid var(--border);
  padding: 1.25rem 2rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: auto;
}

/* ==========================================================================
   Estilos de Impressão (@media print)
   ========================================================================== */
@media print {
  @page {
    margin: 0; /* Remove cabeçalho e rodapé padrão do navegador (data, url, etc) */
  }

  body {
    background: #ffffff;
    color: #000000;
    padding: 1.5cm 1.5cm; /* Adiciona a margem de segurança na página impressa */
  }
  
  .header-institutional,
  .stepper-nav-wrapper,
  .footer-nav-bar,
  .no-print,
  .system-footer,
  .btn {
    display: none !important;
  }
  
  .main-container {
    max-width: 100%;
    margin: 0;
    padding: 0;
  }
  
  .compilation-card {
    border: none;
    box-shadow: none;
    padding: 0;
  }
  
  .report-compiled-table {
    page-break-inside: auto;
  }
  
  .report-compiled-table tr {
    page-break-inside: avoid;
    page-break-after: auto;
  }
}

/* ==========================================================================
   Responsividade Mobile
   ========================================================================== */
@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  
  .form-grid {
    grid-template-columns: 1fr;
  }
  
  .form-group-full {
    grid-column: span 1;
  }
  
  .axis-header-card {
    grid-template-columns: 1fr;
  }
  
  .docente-info-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .pit-table, .pit-table tbody, .pit-table tr, .pit-table td {
    display: block;
    width: 100%;
  }
  
  .pit-table thead {
    display: none;
  }
  
  .pit-table tr {
    margin-bottom: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.75rem;
  }
  
  .pit-table td {
    border-bottom: none;
    padding: 0.4rem 0;
  }
  
  .col-actions {
    text-align: left;
    margin-top: 0.5rem;
  }
}

/* ==========================================================================
   MÓDULO DE AUTENTICAÇÃO E LOGIN INSTITUCIONAL
   ========================================================================== */
.auth-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.auth-overlay.show {
  opacity: 1;
  visibility: visible;
}

.auth-card {
  background: #ffffff;
  width: 100%;
  max-width: 480px;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  border: 1px solid rgba(226, 232, 240, 0.8);
  overflow: hidden;
  animation: authFadeUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.auth-header {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: #ffffff;
  padding: 1.75rem 2rem;
  text-align: center;
  position: relative;
}

.auth-header .header-logo-badge {
  display: inline-block;
  background: #ffffff;
  color: var(--primary);
  font-weight: 800;
  font-size: 0.9rem;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.75rem;
  letter-spacing: 1px;
}

.auth-header h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.auth-header p {
  font-size: 0.85rem;
  opacity: 0.85;
}

.auth-tabs {
  display: flex;
  background: #f1f5f9;
  border-bottom: 1px solid var(--border);
}

.auth-tab-btn {
  flex: 1;
  padding: 0.85rem;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  border-bottom: 3px solid transparent;
}

.auth-tab-btn.active {
  color: var(--primary);
  background: #ffffff;
  border-bottom-color: var(--primary);
}

.auth-body {
  padding: 2rem;
  max-height: 75vh;
  overflow-y: auto;
}

.auth-form-group {
  margin-bottom: 1.25rem;
}

.auth-form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.4rem;
}

.auth-form-group input,
.auth-form-group select {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  background-color: #ffffff;
  transition: var(--transition);
}

.auth-form-group input:focus,
.auth-form-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(153, 0, 0, 0.15);
}

.auth-alert {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  line-height: 1.4;
}

.auth-alert-warning {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
}

.auth-alert-error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.auth-alert-success {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.auth-alert-info {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

/* Indicador de Nuvem no Cabeçalho */
.cloud-sync-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  transition: var(--transition);
}

.cloud-sync-badge.syncing {
  background: rgba(254, 243, 199, 0.25);
  color: #fef08a;
  border-color: rgba(254, 240, 138, 0.5);
}

.cloud-sync-badge.saved {
  background: rgba(209, 250, 229, 0.2);
  color: #a7f3d0;
  border-color: rgba(167, 243, 208, 0.4);
}

/* Badges de Status de Usuário */
.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-status-pendente {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fcd34d;
}

.badge-status-aprovado {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #6ee7b7;
}

.badge-status-rejeitado {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

/* ==========================================================================
   SISTEMA UNIVERSAL DE MODAIS (Atividades, Moderação e Novo Preenchimento)
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-backdrop.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Container de Conteúdo do Modal */
.modal-dialog,
.modal-content {
  background: #ffffff !important;
  width: 100%;
  max-width: 620px;
  border-radius: var(--radius-xl);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(226, 232, 240, 0.9);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  overflow: hidden;
  position: relative;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-backdrop.show .modal-dialog,
.modal-backdrop.show .modal-content {
  transform: translateY(0) scale(1);
}

/* Modal Administrativo de Moderação */
.modal-admin-dialog {
  max-width: 980px !important;
  width: 95% !important;
}

/* Cabeçalho do Modal */
.modal-header {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: #ffffff;
  padding: 1.25rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(0, 0, 0, 0.12);
  flex-shrink: 0;
}

.modal-header h2,
.modal-header h3 {
  color: #ffffff !important;
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.3;
}

.modal-header p {
  color: #fecaca !important;
  font-size: 0.85rem;
  margin: 0.25rem 0 0 0;
  opacity: 0.95;
}

/* Botões de Fechar no Cabeçalho */
.btn-close-modal,
.modal-close-btn {
  background: rgba(255, 255, 255, 0.18) !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  color: #ffffff !important;
  font-size: 1.35rem !important;
  line-height: 1 !important;
  width: 36px !important;
  height: 36px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  padding: 0 !important;
  margin: 0 !important;
  transition: var(--transition) !important;
  flex-shrink: 0;
}

.btn-close-modal:hover,
.modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.35) !important;
  transform: scale(1.08) !important;
}

/* Corpo do Modal */
.modal-body {
  padding: 1.75rem;
  overflow-y: auto;
  background: #ffffff !important;
  flex: 1 1 auto;
  color: var(--text-main);
}

/* Rodapé do Modal */
.modal-footer {
  padding: 1.1rem 1.75rem;
  background: #f8fafc;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  flex-shrink: 0;
}

.admin-filter-bar {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.admin-stats-pills {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.admin-stat-pill {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-full);
  background: #ffffff;
  color: var(--text-muted);
  cursor: pointer;
  border: 1px solid var(--border-strong);
  transition: var(--transition);
}

.admin-stat-pill:hover {
  background: #f1f5f9;
  color: var(--text-main);
}

.admin-stat-pill.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 2px 4px rgba(153, 0, 0, 0.2);
}

.table-admin-wrapper {
  overflow-x: auto;
  max-height: 420px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #ffffff;
}

.table-admin {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  background: #ffffff;
}

.table-admin th {
  background: #f8fafc;
  color: var(--text-muted);
  font-weight: 700;
  text-align: left;
  padding: 0.85rem 1rem;
  border-bottom: 2px solid var(--border);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: sticky;
  top: 0;
  z-index: 5;
}

.table-admin td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
  background: #ffffff;
}

.table-admin tr:hover td {
  background: #fdf2f2 !important;
}

.admin-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.btn-admin-action {
  border: none;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: var(--transition);
}

.btn-admin-approve {
  background: #d1fae5;
  color: #065f46;
}

.btn-admin-approve:hover {
  background: #a7f3d0;
}

.btn-admin-reject {
  background: #fee2e2;
  color: #991b1b;
}

.btn-admin-reject:hover {
  background: #fecaca;
}

.btn-admin-delete {
  background: #f1f5f9;
  color: #64748b;
}

.btn-admin-delete:hover {
  background: #e2e8f0;
  color: #0f172a;
}

/* ==========================================================================
   PAINEL DE PLANOS DO DOCENTE (NOVA ETAPA 1)
   ========================================================================== */
.dashboard-user-card {
  background: #ffffff;
  border-radius: var(--radius-xl);
  padding: 1.5rem 2rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.dashboard-user-info {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.dashboard-user-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  box-shadow: 0 4px 10px rgba(153, 0, 0, 0.2);
}

.dashboard-user-details h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.25rem;
}

.dashboard-user-meta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.dashboard-user-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.plans-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.plans-header-title h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-main);
}

.plans-header-title p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.plan-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 1.25rem;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-left: 5px solid var(--primary);
  position: relative;
}

.plan-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

.plan-card.plan-pit {
  border-left-color: #2563eb; /* Azul para PIT */
}

.plan-card.plan-rit {
  border-left-color: #059669; /* Verde para RIT */
}

.plan-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.plan-semester-badge {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.5px;
}

.plan-type-pill {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  text-transform: uppercase;
}

.pill-pit {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.pill-rit {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.plan-card-body {
  margin-bottom: 1.25rem;
}

.plan-metric {
  display: flex;
  justify-content: space-between;
  padding: 0.4rem 0;
  font-size: 0.85rem;
  border-bottom: 1px dashed #f1f5f9;
}

.plan-metric-label {
  color: var(--text-muted);
}

.plan-metric-value {
  font-weight: 600;
  color: var(--text-main);
}

.plan-card-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.plan-card-actions .btn {
  flex: 1;
  padding: 0.5rem 0.75rem;
  font-size: 0.82rem;
  justify-content: center;
}

.btn-plan-delete {
  flex: 0 0 auto !important;
  background: transparent;
  color: var(--text-light);
  border: 1px solid transparent;
  padding: 0.5rem !important;
}

.btn-plan-delete:hover {
  background: #fee2e2;
  color: #991b1b;
  border-color: #fecaca;
}

.empty-plans-state {
  background: #ffffff;
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-xl);
  padding: 3.5rem 2rem;
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.empty-plans-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.7;
}

.empty-plans-state h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.empty-plans-state p {
  max-width: 480px;
  margin: 0 auto 1.5rem auto;
  font-size: 0.95rem;
  line-height: 1.5;
}


