/* style.css - Plataforma de Avaliação Neurocognitiva AH/SD */

:root {
  --bg-primary: #0b1120;
  --bg-surface: #1e293b;
  --bg-surface-elevated: #334155;
  --bg-input: #0f172a;
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --accent-cyan: #06b6d4;
  --accent-blue: #3b82f6;
  --accent-indigo: #6366f1;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  
  --border-subtle: #334155;
  --border-focus: #0ea5e9;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

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

/* Header & Navbar */
.navbar {
  background-color: rgba(30, 41, 59, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 50;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-primary);
}

.brand-icon {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-indigo));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.1rem;
}

.brand h1 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand span {
  font-size: 0.75rem;
  color: var(--accent-cyan);
  display: block;
  font-weight: 500;
}

/* Botões */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, #0284c7, #2563eb);
  color: #fff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #0369a1, #1d4ed8);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: var(--bg-surface-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
}

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

.btn-danger {
  background-color: rgba(244, 63, 94, 0.2);
  color: #fda4af;
  border: 1px solid rgba(244, 63, 94, 0.3);
}

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

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

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

/* Dashboard Cards */
.hero-banner {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.7), rgba(15, 23, 42, 0.9));
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.hero-text h2 {
  font-size: 1.7rem;
  margin-bottom: 0.5rem;
}

.hero-text p {
  color: var(--text-secondary);
  max-width: 700px;
  font-size: 0.95rem;
}

/* Projetos Grid */
.projects-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.project-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  transition: border-color 0.2s;
}

.project-card:hover {
  border-color: #475569;
}

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

.project-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
}

.project-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

.project-meta {
  display: flex;
  gap: 1rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 0.5rem;
}

.participants-list {
  margin-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.participant-item {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.participant-info h4 {
  font-size: 1.05rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  text-transform: uppercase;
}

.badge-completed {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-in_progress {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-not_started {
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.participant-actions {
  display: flex;
  gap: 0.6rem;
}

/* Modais */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(5px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 100;
}

.modal-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

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

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

.form-input, .form-textarea {
  width: 100%;
  background-color: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 0.7rem 0.9rem;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}

.form-input:focus, .form-textarea:focus {
  border-color: var(--border-focus);
}

/* Test Runner UI */
.test-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 1rem;
}

.test-top-bar {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.progress-track {
  flex: 1;
  max-width: 300px;
  height: 8px;
  background-color: var(--bg-input);
  border-radius: 999px;
  overflow: hidden;
  margin: 0 1rem;
}

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

.test-box {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  min-height: 520px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.focus-alert {
  background-color: rgba(244, 63, 94, 0.15);
  border: 1px solid var(--accent-rose);
  color: #fda4af;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  font-size: 0.85rem;
  display: none;
}

/* Escala Likert */
.likert-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.likert-option {
  background-color: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all 0.2s ease;
}

.likert-option:hover {
  background-color: #1e293b;
  border-color: var(--accent-cyan);
}

.likert-option.selected {
  background-color: rgba(6, 182, 212, 0.15);
  border-color: var(--accent-cyan);
  color: #fff;
}

/* Matrizes Raven Visual Grid */
.matrix-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  margin: 1.5rem 0;
}

.matrix-grid-3x3 {
  display: grid;
  grid-template-columns: repeat(3, 90px);
  grid-template-rows: repeat(3, 90px);
  gap: 10px;
  background-color: var(--bg-input);
  padding: 12px;
  border-radius: var(--radius-md);
  border: 2px solid var(--border-subtle);
}

.matrix-cell {
  background-color: #1e293b;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 90px;
  height: 90px;
}

.matrix-cell.missing {
  border: 2px dashed var(--accent-amber);
  color: var(--accent-amber);
  font-size: 2rem;
  font-weight: bold;
}

.matrix-options-grid {
  display: grid;
  grid-template-columns: repeat(4, 90px);
  gap: 12px;
}

.matrix-opt-btn {
  background-color: #1e293b;
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  cursor: pointer;
  width: 90px;
  height: 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  padding: 4px;
}

.matrix-opt-btn:hover {
  border-color: var(--accent-cyan);
  transform: scale(1.05);
}

.matrix-opt-btn.selected {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.5);
}

/* Corsi Blocks */
.corsi-board {
  position: relative;
  width: 380px;
  height: 380px;
  margin: 1.5rem auto;
  background-color: var(--bg-input);
  border-radius: var(--radius-lg);
  border: 2px solid var(--border-subtle);
}

.corsi-block {
  position: absolute;
  width: 60px;
  height: 60px;
  background-color: #334155;
  border: 2px solid #64748b;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.2rem;
  transition: background-color 0.15s ease, transform 0.1s;
}

.corsi-block.lit {
  background-color: #38bdf8 !important;
  border-color: #ffffff !important;
  box-shadow: 0 0 20px #38bdf8;
  transform: scale(1.1);
}

.corsi-block:active {
  transform: scale(0.95);
}

/* WCST Interface */
.wcst-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.wcst-anchors {
  display: flex;
  gap: 1rem;
}

.wcst-card {
  width: 110px;
  height: 140px;
  background-color: #f8fafc;
  color: #0f172a;
  border-radius: var(--radius-md);
  border: 3px solid #cbd5e1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s;
}

.wcst-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-cyan);
}

.wcst-target-card {
  width: 120px;
  height: 150px;
  background-color: #ffffff;
  border: 4px solid var(--accent-indigo);
  border-radius: var(--radius-md);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.3);
}

.wcst-feedback {
  font-size: 1.25rem;
  font-weight: 700;
  height: 30px;
}

.feedback-correct {
  color: var(--accent-emerald);
}

.feedback-wrong {
  color: var(--accent-rose);
}

/* Velocidade de Processamento */
.speed-pair-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  font-size: 4rem;
  margin: 3rem 0;
  background-color: var(--bg-input);
  padding: 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
}

/* Report Styles */
.report-header {
  border-bottom: 2px solid var(--border-subtle);
  padding-bottom: 1.5rem;
  margin-bottom: 2rem;
}

.report-grid-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.summary-stat-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  text-align: center;
}

.stat-value {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--accent-cyan);
  line-height: 1.1;
  margin: 0.5rem 0;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.report-section {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  margin-bottom: 1.75rem;
}

.report-section h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
  border-left: 4px solid var(--accent-cyan);
  padding-left: 0.75rem;
}

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

.score-table th, .score-table td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}

.score-table th {
  background-color: var(--bg-input);
  color: var(--text-secondary);
  font-size: 0.8rem;
  text-transform: uppercase;
}

.radar-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
}

.disclaimer-box {
  background-color: rgba(15, 23, 42, 0.8);
  border-left: 4px solid var(--accent-amber);
  padding: 1.25rem;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.6;
  margin-top: 2rem;
}

/* Impressão / Print Friendly */
@media print {
  body {
    background-color: #fff !important;
    color: #000 !important;
  }
  .navbar, .btn, .no-print {
    display: none !important;
  }
  .report-section, .summary-stat-card {
    background-color: #fff !important;
    border: 1px solid #ccc !important;
    color: #000 !important;
    page-break-inside: avoid;
  }
  .score-table th {
    background-color: #eee !important;
    color: #000 !important;
  }
  .stat-value {
    color: #000 !important;
  }
  .disclaimer-box {
    border-color: #000 !important;
    background-color: #fafafa !important;
    color: #333 !important;
  }
}
