/**
 * PLATAFORMA INTERATIVA DE AVALIAÇÃO DE TIC — 10.º ANO PROFISSIONAL
 * style.css — Folha de Estilos Completa e Responsiva
 *
 * Inclui:
 * 1. Variáveis de design e reset tipográfico
 * 2. Layout principal (barra superior, menu lateral e área de trabalho)
 * 3. Componentes educativos (cartões, badges, formulários, botões)
 * 4. Componentes dos exercícios (A, B, C, E)
 * 5. Interface completa do Simulador de Word (Ribbon, Régua, Folha A4, Barra de Estado)
 * 6. Relatório final de classificação e grelha de avaliação
 * 7. Estilos de impressão otimizados (@media print)
 */

:root {
  --primary: #1e3a8a;
  --primary-hover: #172554;
  --primary-light: #eff6ff;
  --word-blue: #2b579a;
  --word-blue-dark: #1f3f72;
  --word-ribbon-bg: #f3f6f9;
  --word-toolbar-border: #d2d8e0;
  --accent: #0284c7;
  --success: #16a34a;
  --warning: #d97706;
  --danger: #dc2626;
  --neutral-dark: #0f172a;
  --neutral-body: #334155;
  --neutral-muted: #64748b;
  --bg-app: #f8fafc;
  --surface: #ffffff;
  --border-light: #e2e8f0;
  --border-medium: #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 -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
}

/* ==========================================
   RESET & TIPOGRAFIA
   ========================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-app);
  color: var(--neutral-body);
  line-height: 1.5;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

/* ==========================================
   BARRA SUPERIOR (HEADER)
   ========================================== */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--surface);
  border-bottom: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.header-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.header-titles h1 {
  font-size: 17px;
  font-weight: 700;
  color: var(--neutral-dark);
  line-height: 1.2;
}

.header-titles p {
  font-size: 12px;
  color: var(--neutral-muted);
}

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

.header-timer-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: #f1f5f9;
  border: 1px solid var(--border-medium);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 700;
  color: var(--neutral-dark);
}

.header-progress-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 140px;
}

.progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 600;
  color: var(--neutral-muted);
}

.progress-track {
  width: 100%;
  height: 8px;
  background-color: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--success));
  width: 0%;
  transition: width 0.3s ease;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.student-badge-pill {
  font-size: 13px;
  font-weight: 600;
  background-color: var(--primary-light);
  color: var(--primary);
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid #bfdbfe;
}

/* ==========================================
   ESTRUTURA GERAL (LAYOUT)
   ========================================== */
.app-container {
  display: flex;
  min-height: calc(100vh - 65px);
}

.app-sidebar {
  width: 290px;
  flex-shrink: 0;
  background-color: var(--surface);
  border-right: 1px solid var(--border-light);
  padding: 16px 12px;
  overflow-y: auto;
  max-height: calc(100vh - 65px);
  position: sticky;
  top: 65px;
}

.app-main-content {
  flex: 1;
  padding: 24px 32px;
  overflow-x: hidden;
}

/* ==========================================
   MENU LATERAL (SIDEBAR)
   ========================================== */
.nav-fixed-section {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: var(--neutral-body);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.nav-item:hover {
  background-color: #f1f5f9;
  color: var(--primary);
}

.nav-item.active {
  background-color: var(--primary-light);
  color: var(--primary);
  font-weight: 700;
}

.sidebar-group-block {
  margin-bottom: 16px;
}

.sidebar-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--neutral-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.group-badge {
  background-color: #e2e8f0;
  color: var(--neutral-dark);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
}

.group-pts {
  color: var(--accent);
}

.sidebar-exercise-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-exercise-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.sidebar-exercise-item:hover {
  background-color: #f8fafc;
}

.sidebar-exercise-item.active {
  background-color: var(--primary-light);
  color: var(--primary);
  font-weight: 700;
}

.ex-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #cbd5e1;
  flex-shrink: 0;
  transition: background-color 0.2s ease;
}

.sidebar-exercise-item.answered .ex-status-dot {
  background-color: var(--success);
}

.sidebar-exercise-item.active .ex-status-dot {
  background-color: var(--primary);
}

.ex-name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ex-pts {
  font-size: 11px;
  color: var(--neutral-muted);
  font-weight: 600;
}

/* ==========================================
   ECRÃS (SCREENS)
   ========================================== */
.app-screen {
  display: none;
}

.app-screen.active {
  display: block;
}

/* ==========================================
   ECRÃ DE APRESENTAÇÃO (INÍCIO)
   ========================================== */
.welcome-hero {
  background: linear-gradient(135deg, #1e3a8a, #0369a1);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 36px 40px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-md);
}

.welcome-hero h2 {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 8px;
}

.welcome-hero p {
  font-size: 16px;
  color: #e0f2fe;
  max-width: 800px;
}

.welcome-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.info-card {
  background-color: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.info-card h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--neutral-dark);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.groups-overview-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.groups-overview-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px dashed var(--border-light);
  font-size: 14px;
}

.student-form-box {
  background-color: var(--surface);
  border: 2px solid #bfdbfe;
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-md);
}

.student-form-box h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 16px;
}

.form-row-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--neutral-dark);
}

.styled-input {
  padding: 10px 14px;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s ease;
}

.styled-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.15);
}

/* ==========================================
   ECRÃ NORMAL DE EXERCÍCIO
   ========================================== */
.exercise-container-card {
  background-color: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}

.ex-meta-tags {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.badge-group {
  background-color: var(--primary-light);
  color: var(--primary);
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
}

.badge-pts {
  background-color: #fef3c7;
  color: #92400e;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
}

.ex-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--neutral-dark);
  margin-bottom: 8px;
}

.ex-objective {
  font-size: 14px;
  color: var(--neutral-muted);
  margin-bottom: 16px;
}

.scenario-box {
  background-color: #f1f5f9;
  border-left: 4px solid var(--accent);
  padding: 14px 18px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 24px;
  font-size: 14px;
  line-height: 1.6;
}

.task-instructions-card {
  background-color: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 24px;
}

.task-instructions-card h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 6px;
}

.task-instructions-card ul {
  padding-left: 20px;
  font-size: 14px;
  color: var(--neutral-body);
}

.task-instructions-card li {
  margin-bottom: 4px;
}

/* Área de Navegação Inferior */
.exercise-nav-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
}

/* ==========================================
   ELEMENTOS DE FORMULÁRIO DOS EXERCÍCIOS
   ========================================== */
.form-group-search {
  margin-bottom: 20px;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 14px;
  color: var(--neutral-muted);
}

.styled-search-input {
  width: 100%;
  padding: 12px 14px 12px 44px;
  font-size: 16px;
  border: 2px solid var(--border-medium);
  border-radius: var(--radius-md);
  outline: none;
  font-family: monospace;
}

.styled-search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.15);
}

.search-hint {
  font-size: 12px;
  color: var(--neutral-muted);
  margin-top: 6px;
}

.radio-cards-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.radio-card-label {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 18px;
  background-color: var(--surface);
  border: 2px solid var(--border-light);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
}

.radio-card-label:hover {
  border-color: #93c5fd;
  background-color: #f8fafc;
}

.radio-card-label.selected {
  border-color: var(--primary);
  background-color: var(--primary-light);
}

.radio-card-label input[type="radio"] {
  margin-top: 4px;
}

.query-code-badge code {
  font-size: 15px;
  font-family: "Courier New", Courier, monospace;
  font-weight: 700;
  color: var(--primary);
}

.checkbox-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 12px;
}

.checkbox-card-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  background-color: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.checkbox-card-label:hover {
  background-color: #f8fafc;
  border-color: var(--border-medium);
}

.checkbox-card-label.selected {
  border-color: var(--accent);
  background-color: #f0f9ff;
}

.checkbox-card-label input[type="checkbox"] {
  margin-top: 3px;
}

/* Cartões de Fontes (Grupo B) */
.sources-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.source-card {
  background-color: var(--surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.source-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.source-id-badge {
  background-color: #0284c7;
  color: #fff;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
}

.source-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--neutral-dark);
}

.source-meta {
  font-size: 12px;
  color: var(--neutral-muted);
  margin-bottom: 12px;
}

.source-excerpt {
  background-color: #f8fafc;
  font-style: italic;
  padding: 10px 14px;
  border-left: 3px solid #cbd5e1;
  margin-bottom: 10px;
  font-size: 14px;
}

.source-refs {
  font-size: 13px;
  margin-bottom: 14px;
}

.source-evaluation-box {
  background-color: #f1f5f9;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
}

.credibility-selector {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
  font-size: 14px;
}

.credibility-selector label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

/* Drag and Drop (Grupo C1) */
.drag-columns-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 20px;
}

.drag-column {
  background-color: #f8fafc;
  border: 2px dashed var(--border-medium);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  min-height: 280px;
}

.drag-column-header {
  padding: 12px;
  border-bottom: 1px solid var(--border-light);
  background-color: #f1f5f9;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.drag-column-header h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--neutral-dark);
}

.drag-column-header p {
  font-size: 11px;
  color: var(--neutral-muted);
}

.drag-dropzone {
  flex: 1;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.drag-dropzone.drag-over {
  background-color: #e0f2fe;
  border-color: var(--accent);
}

.drag-unassigned-pool {
  background-color: #f1f5f9;
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 16px;
}

.drag-unassigned-pool h4 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 10px;
}

.pool-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 80px;
}

.draggable-fragment-card {
  background-color: var(--surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  padding: 12px;
  box-shadow: var(--shadow-sm);
  cursor: grab;
  position: relative;
}

.draggable-fragment-card.dragging {
  opacity: 0.5;
}

.frag-text {
  font-size: 13px;
  line-height: 1.4;
  margin-bottom: 8px;
}

.frag-accessible-controls {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.btn-micro {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid var(--border-medium);
  background-color: #fff;
  cursor: pointer;
}

.btn-micro:hover {
  background-color: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

.btn-micro-clear {
  color: var(--danger);
}

/* Hierarquia C2 */
.hierarchy-items-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hierarchy-item-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background-color: var(--surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
}

.hierarchy-reorder-btns {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.styled-select-level {
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-medium);
  font-size: 13px;
}

.hierarchy-text-preview {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hierarchy-text-preview.level-1 {
  font-weight: 800;
  font-size: 16px;
}

.hierarchy-text-preview.level-2 {
  font-weight: 700;
  font-size: 14px;
  padding-left: 20px;
}

.hierarchy-text-preview.level-3 {
  font-size: 13px;
  padding-left: 40px;
  color: #475569;
}

.level-indicator-badge {
  font-size: 10px;
  background-color: #e2e8f0;
  padding: 2px 6px;
  border-radius: 4px;
}

/* Resumo C3 */
.source-base-text-box {
  background-color: #f8fafc;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 20px;
}

.source-base-text-box h4 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--neutral-muted);
  margin-bottom: 8px;
}

.source-base-text-box p {
  font-size: 14px;
  line-height: 1.7;
}

.styled-textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: inherit;
  resize: vertical;
  line-height: 1.6;
}

.styled-textarea:focus {
  border-color: var(--primary);
  outline: none;
}

.word-count-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  font-size: 13px;
}

.status-badge {
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
}

.badge-success { background-color: #dcfce7; color: #15803d; }
.badge-warning { background-color: #fef9c3; color: #a16207; }
.badge-danger { background-color: #fee2e2; color: #b91c1c; }

/* Grupo E */
.question-header-card {
  margin-bottom: 20px;
}

.question-prompt {
  font-size: 17px;
  font-weight: 700;
  color: var(--neutral-dark);
  line-height: 1.5;
}

.option-letter-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  background-color: #e2e8f0;
  border-radius: 50%;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}

.radio-card-label.selected .option-letter-badge {
  background-color: var(--primary);
  color: #fff;
}

/* ==========================================
   SIMULADOR DE MICROSOFT WORD (GRUPO D)
   ========================================== */
.word-simulator-wrapper {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.word-app-window {
  flex: 1;
  background-color: #f3f6f9;
  border: 1px solid #c2c9d2;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  min-height: 800px;
}

/* Barra Superior do Word */
.sim-titlebar {
  background-color: var(--word-blue);
  color: #fff;
  padding: 6px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.sim-doc-info {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
}

.sim-doc-icon {
  display: inline-block;
  background-color: #fff;
  color: var(--word-blue);
  font-weight: 900;
  padding: 0 4px;
  border-radius: 2px;
  font-size: 11px;
}

.sim-quick-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.sim-btn-quick {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #fff;
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}

.sim-btn-quick:hover:not(:disabled) {
  background-color: rgba(255, 255, 255, 0.2);
}

.sim-btn-quick:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Ribbon Separadores */
.sim-ribbon-tabs {
  background-color: #e5ebf1;
  display: flex;
  border-bottom: 1px solid var(--word-toolbar-border);
  padding-left: 10px;
}

.sim-ribbon-tab-btn {
  background: transparent;
  border: none;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.15s ease;
}

.sim-ribbon-tab-btn:hover {
  color: var(--word-blue);
}

.sim-ribbon-tab-btn.active {
  background-color: var(--word-ribbon-bg);
  color: var(--word-blue);
  border-bottom: 2px solid var(--word-blue);
}

/* Ribbon Conteúdo das Barras */
.sim-ribbon-body {
  background-color: var(--word-ribbon-bg);
  border-bottom: 1px solid var(--word-toolbar-border);
  padding: 8px 14px;
  min-height: 80px;
}

.sim-ribbon-panel {
  display: none;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.sim-ribbon-panel.active {
  display: flex;
}

.sim-toolgroup {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-right: 14px;
  border-right: 1px solid var(--word-toolbar-border);
}

.sim-toolgroup-label {
  font-size: 10px;
  color: var(--neutral-muted);
  text-align: center;
  text-transform: uppercase;
  margin-top: 2px;
}

.sim-tool-row {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Botões da barra de ferramentas do simulador */
.sim-btn-tool {
  background-color: transparent;
  border: 1px solid transparent;
  border-radius: 3px;
  padding: 4px 6px;
  cursor: pointer;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  color: var(--neutral-dark);
}

.sim-btn-tool:hover {
  background-color: #e2e8f0;
  border-color: #cbd5e1;
}

.sim-btn-tool.active {
  background-color: #c7d2fe;
  border-color: #818cf8;
  color: var(--primary);
}

.sim-btn-style-pill {
  border: 1px solid var(--word-toolbar-border);
  background-color: #fff;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
}

.sim-btn-style-pill:hover {
  background-color: #f1f5f9;
}

/* Régua Horizontal */
.sim-ruler-bar {
  background-color: #e2e8f0;
  height: 20px;
  border-bottom: 1px solid #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  user-select: none;
}

.sim-ruler-scale {
  width: 760px;
  height: 100%;
  background: repeating-linear-gradient(
    90deg,
    #94a3b8 0,
    #94a3b8 1px,
    transparent 1px,
    transparent 10mm
  );
  position: relative;
  border-left: 2px solid var(--neutral-muted);
  border-right: 2px solid var(--neutral-muted);
}

.sim-ruler-margin-left,
.sim-ruler-margin-right {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 25mm;
  background-color: rgba(148, 163, 184, 0.35);
}

.sim-ruler-margin-left { left: 0; }
.sim-ruler-margin-right { right: 0; }

/* Secretária e Página A4 */
.sim-desk-area {
  background-color: #e4e7eb;
  padding: 30px 20px;
  display: flex;
  justify-content: center;
  overflow-x: auto;
  flex: 1;
}

.sim-page-sheet {
  background-color: #ffffff;
  width: 794px; /* Proporcional a 210mm A4 a 96dpi */
  min-height: 1123px; /* 297mm A4 */
  padding: 25mm 25mm 25mm 25mm;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  transition: padding 0.2s ease;
  outline: none;
  position: relative;
}

/* Áreas de Cabeçalho, Corpo e Rodapé */
.sim-doc-header,
.sim-doc-footer {
  font-size: 11pt;
  color: #64748b;
  border: 1px dashed transparent;
  padding: 6px;
  outline: none;
  min-height: 32px;
  transition: border-color 0.2s ease;
}

.sim-doc-header:empty::before {
  content: "[Área de Cabeçalho — Clica para editar]";
  font-style: italic;
  color: #94a3b8;
}

.sim-doc-footer:empty::before {
  content: "[Área de Rodapé — Clica para editar]";
  font-style: italic;
  color: #94a3b8;
}

.sim-doc-header:hover,
.sim-doc-footer:hover,
.sim-doc-header.focused,
.sim-doc-footer.focused {
  border-color: #93c5fd;
}

.sim-doc-header {
  border-bottom: 1px dashed #cbd5e1;
  margin-bottom: 16px;
}

.sim-doc-footer {
  border-top: 1px dashed #cbd5e1;
  margin-top: auto;
  padding-top: 10px;
}

.sim-doc-body {
  flex: 1;
  outline: none;
  min-height: 600px;
  font-size: 12pt;
  line-height: 1.5;
  color: #1e293b;
  font-family: Calibri, Arial, sans-serif;
}

.sim-doc-body p {
  margin-bottom: 8px;
}

.sim-doc-body h1 {
  font-size: 18pt;
  font-weight: bold;
  margin-bottom: 10px;
}

.sim-doc-body h2 {
  font-size: 14pt;
  font-weight: bold;
  margin-bottom: 8px;
}

.sim-doc-body ul,
.sim-doc-body ol {
  padding-left: 30px;
  margin-bottom: 12px;
}

.sim-doc-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
}

.sim-doc-body table th,
.sim-doc-body table td {
  border: 1px solid #94a3b8;
  padding: 8px 10px;
  text-align: left;
}

.sim-doc-body table th {
  background-color: #f1f5f9;
  font-weight: bold;
}

/* Barra de Estado do Word */
.sim-statusbar {
  background-color: var(--word-blue);
  color: #fff;
  padding: 4px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
}

.sim-status-left,
.sim-status-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Painel Lateral de Instruções do Simulador */
.sim-instructions-panel {
  width: 320px;
  flex-shrink: 0;
  background-color: var(--surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  max-height: 850px;
  overflow-y: auto;
}

.sim-inst-header h3 {
  font-size: 16px;
  font-weight: 800;
  color: var(--word-blue);
  margin-bottom: 12px;
}

.sim-inst-block {
  margin-bottom: 18px;
}

.sim-inst-block h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--neutral-dark);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sim-inst-block p {
  font-size: 13px;
  color: var(--neutral-body);
}

.sim-steps-list {
  padding-left: 18px;
  font-size: 13px;
  color: var(--neutral-body);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sim-crits-box {
  background-color: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sim-crit-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  border-bottom: 1px dashed var(--border-light);
  padding-bottom: 4px;
}

.crit-pts {
  font-weight: 700;
  color: var(--word-blue);
}

.sim-validation-action-box {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sim-status-badge.saved {
  font-size: 11px;
  color: var(--success);
  font-weight: 600;
  text-align: center;
}

/* ==========================================
   ECRÃ DO RELATÓRIO FINAL
   ========================================== */
.report-final-wrapper {
  max-width: 960px;
  margin: 0 auto;
}

.report-id-card {
  background-color: var(--surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin-bottom: 24px;
}

.report-student-meta h3 {
  font-size: 18px;
  font-weight: 800;
  color: var(--neutral-dark);
  margin-bottom: 10px;
}

.report-student-meta p {
  font-size: 14px;
  color: var(--neutral-body);
  margin-bottom: 4px;
}

.report-grade-box {
  background: linear-gradient(135deg, #1e3a8a, #0284c7);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 20px 28px;
  text-align: center;
  min-width: 240px;
  box-shadow: var(--shadow-md);
}

.grade-main-score {
  font-size: 42px;
  font-weight: 900;
  line-height: 1;
}

.grade-main-scale {
  font-size: 13px;
  color: #e0f2fe;
  font-weight: 600;
  margin-bottom: 8px;
}

.grade-mention-badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 8px;
}

.mencao-mb { background-color: #10b981; color: #fff; }
.mencao-b { background-color: #3b82f6; color: #fff; }
.mencao-suf { background-color: #f59e0b; color: #fff; }
.mencao-insuf { background-color: #ef4444; color: #fff; }

.grade-subtext {
  font-size: 12px;
  color: #f1f5f9;
}

.grade-provisional-note {
  font-size: 10px;
  color: #fef08a;
  margin-top: 6px;
}

/* Grelhas de métricas por grupo */
.report-groups-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.group-metric-card {
  background-color: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px;
  box-shadow: var(--shadow-sm);
}

.metric-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--neutral-muted);
  margin-bottom: 4px;
}

.metric-val {
  font-size: 18px;
  font-weight: 800;
  color: var(--neutral-dark);
  margin-bottom: 8px;
}

.metric-bar {
  width: 100%;
  height: 6px;
  background-color: #e2e8f0;
  border-radius: 3px;
  overflow: hidden;
}

.metric-bar-fill {
  height: 100%;
  background-color: var(--accent);
}

/* Tabela detalhada */
.report-section-table {
  background-color: var(--surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}

.report-section-table h3 {
  font-size: 17px;
  font-weight: 800;
  color: var(--neutral-dark);
  margin-bottom: 16px;
}

.styled-report-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.styled-report-table th,
.styled-report-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
}

.styled-report-table th {
  background-color: #f8fafc;
  font-weight: 700;
  color: var(--neutral-dark);
}

.table-group-header-row td {
  background-color: #eff6ff;
  color: var(--primary);
  font-weight: 700;
}

.pts-full { color: var(--success); }
.pts-partial { color: var(--warning); }
.pts-zero { color: var(--danger); }

.badge-pending {
  display: inline-block;
  background-color: #fef3c7;
  color: #92400e;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  margin-top: 4px;
}

/* Caixa de Apreciação do Professor */
.teacher-evaluation-box {
  background-color: var(--surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 28px;
}

.teacher-evaluation-box h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--neutral-dark);
  margin-bottom: 14px;
}

.teacher-comment-lines {
  font-size: 13px;
  line-height: 2;
  margin-bottom: 20px;
}

.teacher-signature-block {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
}

.report-actions-bar {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-bottom: 40px;
}

/* ==========================================
   BOTÕES E COMPONENTES GERAIS
   ========================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  user-select: none;
}

.btn-primary {
  background-color: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
}

.btn-secondary {
  background-color: #f1f5f9;
  border-color: var(--border-medium);
  color: var(--neutral-dark);
}

.btn-secondary:hover {
  background-color: #e2e8f0;
}

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

.btn-success:hover {
  background-color: #15803d;
}

.btn-danger {
  background-color: #fee2e2;
  border-color: #fca5a5;
  color: var(--danger);
}

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

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

.action-feedback-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 20px;
}

.save-status-text {
  font-size: 13px;
  font-weight: 600;
}

.save-status-text.saved { color: var(--success); }
.save-status-text.unsaved { color: var(--warning); }

/* Toast */
.app-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background-color: #1e293b;
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
  pointer-events: none;
  z-index: 1000;
}

.app-toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================
   RESPONSIVIDADE
   ========================================== */
@media (max-width: 1024px) {
  .word-simulator-wrapper {
    flex-direction: column;
  }
  .sim-instructions-panel {
    width: 100%;
    max-height: none;
  }
  .drag-columns-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .app-container {
    flex-direction: column;
  }
  .app-sidebar {
    width: 100%;
    position: static;
    max-height: none;
    border-right: none;
    border-bottom: 1px solid var(--border-light);
  }
  .app-main-content {
    padding: 16px;
  }
  .app-header {
    flex-direction: column;
    align-items: flex-start;
    padding: 12px 16px;
  }
  .header-right {
    width: 100%;
    justify-content: space-between;
  }
  .report-id-card {
    flex-direction: column;
    align-items: stretch;
  }
}

/* ==========================================
   MODAIS E BLOQUEIO DE SEGURANÇA DOCENTE
   ========================================== */
.lock-warning-banner {
  display: none;
  background-color: #fef2f2;
  border: 2px solid #ef4444;
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 20px;
  color: #991b1b;
  font-size: 14px;
  line-height: 1.5;
  box-shadow: var(--shadow-sm);
  animation: fadeIn 0.3s ease;
}

.lock-warning-banner.show {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.lock-warning-banner .lock-icon {
  flex-shrink: 0;
  color: #dc2626;
  margin-top: 2px;
}

.lock-warning-banner strong {
  color: #7f1d1d;
  font-size: 15px;
  display: block;
  margin-bottom: 4px;
}

.lock-warning-actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.app-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.app-modal-overlay.active {
  display: flex;
  animation: fadeIn 0.2s ease;
}

.app-modal-dialog {
  background-color: var(--surface);
  border-radius: var(--radius-lg);
  max-width: 520px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-medium);
  overflow: hidden;
  animation: slideUp 0.25s ease;
}

.modal-header-danger {
  background: linear-gradient(135deg, #b91c1c, #dc2626);
  color: #fff;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-header-warning {
  background: linear-gradient(135deg, #d97706, #ea580c);
  color: #fff;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-header-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-header-danger h3,
.modal-header-warning h3,
.modal-header-primary h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
}

.modal-body {
  padding: 24px;
  font-size: 14px;
  color: var(--neutral-body);
  line-height: 1.6;
}

.modal-footer {
  background-color: #f8fafc;
  border-top: 1px solid var(--border-light);
  padding: 14px 24px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.locked-student-details-card {
  background-color: #f1f5f9;
  border-left: 4px solid #dc2626;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin: 14px 0;
  font-size: 13px;
}

.locked-student-details-card p {
  margin-bottom: 4px;
}

.locked-student-details-card p:last-child {
  margin-bottom: 0;
}

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

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

@keyframes pulseWarning {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.85; transform: scale(0.98); }
}

/* ==========================================
   SEGURANÇA: ECRÃ COMPLETO E ANTI-CÓPIA
   ========================================== */

/* Bloqueio de seleção de texto estrutural para evitar cópia */
body,
.app-header,
.app-sidebar,
.question-card,
.exercise-header,
.enunciado-box,
.opcoes-container,
.table-header,
.nav-item,
.info-card,
.welcome-hero,
.styled-report-table th,
.teacher-evaluation-box {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* Permitir seleção/digitação estritamente nos campos de resposta e editor do simulador */
input,
textarea,
[contenteditable="true"],
[contenteditable="true"] *,
#sim-doc-body,
#sim-doc-body *,
#sim-doc-header,
#sim-doc-header *,
#sim-doc-footer,
#sim-doc-footer *,
.sim-page-sheet,
.sim-page-sheet *,
.sim-desk-area {
  -webkit-user-select: text !important;
  -moz-user-select: text !important;
  -ms-user-select: text !important;
  user-select: text !important;
}

#sim-doc-body,
#sim-doc-body *,
#sim-doc-header,
#sim-doc-header *,
#sim-doc-footer,
#sim-doc-footer * {
  cursor: text !important;
}

/* Destaque visual da seleção no Simulador de Word (estilo Microsoft Word) */
#sim-doc-body ::selection,
#sim-doc-body *::selection,
#sim-doc-header ::selection,
#sim-doc-header *::selection,
#sim-doc-footer ::selection,
#sim-doc-footer *::selection,
.sim-page-sheet ::selection {
  background-color: #b4d5fe !important;
  color: #0f172a !important;
}

/* Botão de Ecrã Completo no Cabeçalho */
.btn-security {
  background: #0f172a;
  color: #f8fafc;
  border: 1px solid #334155;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-security:hover {
  background: #1e293b;
  border-color: #475569;
  color: #fff;
}

.btn-security.fullscreen-active {
  background: #064e3b;
  border-color: #059669;
  color: #a7f3d0;
}

.btn-security.fullscreen-active:hover {
  background: #065f46;
  color: #ffffff;
}

.btn-security.fullscreen-inactive {
  background: #991b1b;
  border-color: #dc2626;
  color: #fef2f2;
  animation: pulseWarning 2s infinite;
}

/* Alerta de Segurança na Página Inicial */
.security-banner-info {
  background: linear-gradient(135deg, #eff6ff, #f0fdf4);
  border: 1px solid #bfdbfe;
  border-left: 5px solid var(--primary);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.security-banner-icon {
  color: var(--primary);
  flex-shrink: 0;
  margin-top: 2px;
}

.security-banner-text {
  font-size: 13.5px;
  color: var(--neutral-body);
  line-height: 1.6;
}

.security-banner-text strong {
  color: var(--neutral-dark);
}

/* Cortina de Bloqueio se Fullscreen for Interrompido */
.lockdown-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(15, 23, 42, 0.96);
  backdrop-filter: blur(12px);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeIn 0.25s ease;
}

.lockdown-dialog {
  background-color: #ffffff;
  border-radius: var(--radius-lg);
  max-width: 580px;
  width: 100%;
  padding: 36px 32px;
  text-align: center;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  border: 2px solid #ef4444;
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.lockdown-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background-color: #fee2e2;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.lockdown-dialog h2 {
  font-size: 22px;
  color: #991b1b;
  margin-bottom: 12px;
  font-weight: 800;
}

.lockdown-lead {
  font-size: 16px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 10px;
}

.lockdown-desc {
  font-size: 14px;
  color: #475569;
  line-height: 1.6;
  margin-bottom: 24px;
}

.lockdown-actions {
  margin-bottom: 24px;
}

.lockdown-actions .btn-lg {
  padding: 14px 28px;
  font-size: 16px;
  font-weight: 700;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.3);
}

.lockdown-teacher-box {
  background-color: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: var(--radius-md);
  padding: 16px 20px;
  text-align: left;
}

.lockdown-teacher-box h4 {
  font-size: 13px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.lockdown-pin-group {
  display: flex;
  gap: 10px;
}

.lockdown-pin-group input {
  flex: 1;
  font-size: 16px;
  letter-spacing: 2px;
  text-align: center;
}

/* Alerta Toast Anti-Cópia */
.security-toast {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(-80px);
  z-index: 1000000;
  background: linear-gradient(135deg, #b91c1c, #dc2626);
  color: #ffffff;
  padding: 12px 24px;
  border-radius: 9999px;
  font-weight: 700;
  font-size: 13.5px;
  letter-spacing: 0.2px;
  box-shadow: 0 10px 25px -3px rgba(220, 38, 38, 0.5), 0 4px 6px -4px rgba(220, 38, 38, 0.3);
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: none;
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

.security-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* ==========================================
   AUDITORIA DE SEGURANÇA E OCORRÊNCIAS NO RELATÓRIO
   ========================================== */
.report-security-audit-card {
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin: 24px 0;
  box-shadow: var(--shadow-sm);
  background-color: var(--surface);
}

.report-security-audit-card.audit-clean {
  border: 1px solid #bbf7d0;
  border-left: 5px solid #16a34a;
  background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
}

.report-security-audit-card.audit-warning {
  border: 1px solid #fecaca;
  border-left: 5px solid #dc2626;
  background: linear-gradient(135deg, #fef2f2 0%, #ffffff 100%);
}

.audit-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 14px;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
}

.audit-status-badge.badge-clean {
  background-color: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
}

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

.report-security-audit-card p {
  font-size: 13.5px;
  color: var(--neutral-body);
  line-height: 1.6;
  margin-bottom: 14px;
}

.audit-table {
  width: 100%;
  margin-top: 10px;
  font-size: 12.5px;
  border-collapse: collapse;
}

.audit-table th {
  background-color: #f8fafc;
  font-weight: 700;
  color: var(--neutral-dark);
  padding: 10px 12px;
  border: 1px solid var(--border-medium);
  text-align: left;
}

.audit-table td {
  padding: 8px 12px;
  border: 1px solid var(--border-light);
  color: var(--neutral-body);
  font-size: 12px;
}

.audit-badge-action {
  display: inline-block;
  padding: 2px 8px;
  background-color: #fee2e2;
  color: #991b1b;
  border-radius: 4px;
  font-weight: 600;
  font-size: 11px;
}

/* ==========================================
   ESTILOS DE IMPRESSÃO (@MEDIA PRINT)
   ========================================== */
@media print {
  body {
    background-color: #fff;
    color: #000;
    font-size: 11pt;
  }

  .app-header,
  .app-sidebar,
  .exercise-nav-footer,
  .report-actions-bar,
  #app-toast,
  #security-alert-toast,
  .app-modal-overlay,
  .lockdown-overlay,
  .lock-warning-banner {
    display: none !important;
  }

  .app-container {
    display: block;
    min-height: auto;
  }

  .app-main-content {
    padding: 0;
  }

  .app-screen {
    display: none !important;
  }

  #screen-relatorio {
    display: block !important;
  }

  .report-id-card,
  .report-section-table,
  .report-security-audit-card,
  .teacher-evaluation-box {
    box-shadow: none;
    border: 1px solid #94a3b8;
    page-break-inside: avoid;
    background: #fff !important;
  }

  .report-grade-box {
    background: #f1f5f9 !important;
    color: #000 !important;
    border: 2px solid #000;
  }

  .grade-main-score {
    color: #000;
  }

  .grade-mention-badge {
    border: 1px solid #000;
    color: #000;
    background: #fff !important;
  }
}
