/* Estilos Oficiais - Inventário de Burnout de Maslach (MBI) */
:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --primary-border: #bfdbfe;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --border-color: #e2e8f0;
  
  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --danger-border: #fecaca;
  
  --warning: #d97706;
  --warning-bg: #fffbeb;
  --warning-border: #fde68a;
  
  --success: #16a34a;
  --success-bg: #f0fdf4;
  --success-border: #bbf7d0;

  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --radius: 12px;
}

* { 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-page);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.container { width: 100%; max-width: 900px; margin: 0 auto; padding: 0 20px; }

.app-header {
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  padding: 24px 0 20px;
  box-shadow: var(--shadow-sm);
}

.header-inner { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }

.brand-badge {
  display: inline-flex;
  align-items: center;
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid var(--primary-border);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.app-title { font-size: 1.65rem; font-weight: 800; color: var(--text-main); letter-spacing: -0.02em; }
.app-subtitle { font-size: 0.95rem; color: var(--text-muted); margin-top: 4px; }
.header-actions { display: flex; gap: 10px; align-items: center; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  text-decoration: none;
}
.btn-primary { background: var(--primary); color: #ffffff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-outline { background: #ffffff; border-color: var(--border-color); color: var(--text-main); }
.btn-outline:hover { background: #f1f5f9; border-color: #cbd5e1; }
.btn-whatsapp { background: #25d366; color: #ffffff; }
.btn-whatsapp:hover { background: #1ebe5d; }
.btn-sm { padding: 6px 12px; font-size: 0.8rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.config-bar {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 20px 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: var(--shadow-sm);
}

.user-inputs { display: flex; gap: 12px; flex-wrap: wrap; flex: 1; }
.input-group { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 180px; }
.input-group label { font-size: 0.75rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; }
.input-control {
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 0.88rem;
  outline: none;
  background: #f8fafc;
}
.input-control:focus {
  border-color: var(--primary);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.mode-toggle { display: flex; background: #f1f5f9; padding: 4px; border-radius: 8px; gap: 4px; }
.mode-btn {
  padding: 6px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 6px;
}
.mode-btn.active { background: #ffffff; color: var(--primary); box-shadow: var(--shadow-sm); }

.progress-card {
  position: sticky;
  top: 10px;
  z-index: 30;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-md);
}

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 8px;
}
.progress-bar-bg { width: 100%; height: 8px; background: #e2e8f0; border-radius: 999px; overflow: hidden; }
.progress-bar-fill { height: 100%; background: linear-gradient(90deg, #3b82f6, #2563eb); width: 0%; border-radius: 999px; transition: width 0.3s; }

.jump-matrix { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--border-color); }
.jump-chip {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background: #ffffff;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.jump-chip.answered { background: #eff6ff; border-color: #3b82f6; color: #1d4ed8; font-weight: 700; }
.jump-chip.active { background: var(--primary); border-color: var(--primary); color: #ffffff; }

.intro-box { background: #ffffff; border: 1px solid var(--border-color); border-radius: var(--radius); padding: 18px 22px; margin-bottom: 24px; }
.intro-box h2 { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; }
.intro-box p { font-size: 0.92rem; color: var(--text-muted); line-height: 1.6; }
.scale-legend { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; margin-top: 14px; }
.scale-legend-item { background: #f8fafc; border: 1px solid var(--border-color); border-radius: 6px; padding: 8px; text-align: center; }
.scale-legend-val { display: inline-block; background: #e2e8f0; width: 22px; height: 22px; line-height: 22px; border-radius: 50%; font-size: 0.75rem; font-weight: 700; margin-bottom: 4px; }
.scale-legend-text { font-size: 0.75rem; color: var(--text-muted); }

.questions-list { display: flex; flex-direction: column; gap: 16px; margin-bottom: 30px; }
.question-card { background: #ffffff; border: 1px solid var(--border-color); border-radius: var(--radius); padding: 20px 24px; box-shadow: var(--shadow-sm); }
.question-card.answered { border-left: 4px solid var(--primary); }
.question-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.question-number { font-size: 0.78rem; font-weight: 700; color: var(--primary); background: var(--primary-light); padding: 2px 8px; border-radius: 4px; }
.dimension-badge { font-size: 0.72rem; color: var(--text-light); }
.question-text { font-size: 1.05rem; font-weight: 600; line-height: 1.45; margin-bottom: 18px; }

.options-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
@media (max-width: 680px) { .options-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 480px) { .options-grid { grid-template-columns: repeat(2, 1fr); } }

.option-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 4px;
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  min-height: 72px;
  text-align: center;
}
.option-btn:hover { background: #f1f5f9; border-color: #94a3b8; }
.option-val { font-size: 1rem; font-weight: 700; margin-bottom: 4px; }
.option-lbl { font-size: 0.68rem; color: var(--text-muted); line-height: 1.15; }
.option-btn.selected { background: var(--primary); border-color: var(--primary); color: #ffffff; }
.option-btn.selected .option-val, .option-btn.selected .option-lbl { color: #ffffff; }

.step-navigation { display: flex; justify-content: space-between; align-items: center; margin-top: 24px; gap: 12px; }

.submit-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px 20px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  text-align: center;
  margin-bottom: 40px;
}

.results-section { display: none; margin-bottom: 50px; }
.results-section.visible { display: block; }
.result-card-main { background: #ffffff; border: 1px solid var(--border-color); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-md); margin-bottom: 24px; }
.result-header { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 16px; border-bottom: 1px solid var(--border-color); padding-bottom: 20px; margin-bottom: 24px; }

.overall-status { padding: 16px 20px; border-radius: 10px; display: flex; align-items: flex-start; gap: 14px; margin-bottom: 28px; }
.overall-status.risk-high { background: var(--danger-bg); border: 1px solid var(--danger-border); color: #991b1b; }
.overall-status.risk-moderate { background: var(--warning-bg); border: 1px solid var(--warning-border); color: #92400e; }
.overall-status.risk-low { background: var(--success-bg); border: 1px solid var(--success-border); color: #166534; }
.status-icon { font-size: 1.8rem; line-height: 1; }
.status-content h3 { font-size: 1.25rem; font-weight: 800; margin-bottom: 4px; }
.status-content p { font-size: 0.95rem; line-height: 1.5; }

.dimensions-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; margin-bottom: 28px; }
.dimension-card { background: #f8fafc; border: 1px solid var(--border-color); border-radius: 10px; padding: 20px; display: flex; flex-direction: column; }
.dimension-card-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.dimension-card-title h4 { font-size: 1rem; font-weight: 700; }
.dimension-score-val { font-size: 1.5rem; font-weight: 800; }
.dimension-score-max { font-size: 0.85rem; color: var(--text-muted); }
.dimension-badge-level { display: inline-block; padding: 3px 8px; border-radius: 6px; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; margin: 6px 0 12px; width: fit-content; }
.badge-low { background: var(--success-bg); color: var(--success); border: 1px solid var(--success-border); }
.badge-moderate { background: var(--warning-bg); color: var(--warning); border: 1px solid var(--warning-border); }
.badge-high { background: var(--danger-bg); color: var(--danger); border: 1px solid var(--danger-border); }
.dimension-meter-bg { height: 8px; background: #e2e8f0; border-radius: 999px; overflow: hidden; margin-bottom: 12px; }
.dimension-meter-fill { height: 100%; border-radius: 999px; }
.meter-green { background: var(--success); }
.meter-yellow { background: var(--warning); }
.meter-red { background: var(--danger); }
.dimension-desc { font-size: 0.82rem; color: var(--text-muted); line-height: 1.5; margin-top: auto; }

.analysis-box { background: #ffffff; border: 1px solid var(--border-color); border-radius: 10px; padding: 22px; margin-bottom: 24px; }
.analysis-box h4 { font-size: 1.05rem; font-weight: 700; margin-bottom: 12px; }
.recommendations-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.recommendations-list li { font-size: 0.9rem; padding-left: 24px; position: relative; line-height: 1.5; }
.recommendations-list li::before { content: "✔"; position: absolute; left: 0; top: 0; color: var(--primary); font-weight: 700; }

.results-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border-color); }

.toast-msg {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #1e293b;
  color: #ffffff;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 0.88rem;
  box-shadow: var(--shadow-lg);
  display: none;
  z-index: 200;
}
.toast-msg.show { display: block; }

.app-footer { border-top: 1px solid var(--border-color); padding: 24px 0 40px; color: var(--text-muted); font-size: 0.82rem; line-height: 1.6; text-align: center; }
.disclaimer-badge { display: inline-block; background: #f1f5f9; border: 1px solid var(--border-color); padding: 4px 10px; border-radius: 6px; font-size: 0.75rem; font-weight: 600; color: #475569; margin-bottom: 8px; }

.print-header { display: none; }

@media print {
  body { background: #ffffff !important; color: #000000 !important; font-size: 11pt; }
  .no-print, .app-header, .config-bar, .progress-card, .intro-box, .questions-list, .step-navigation, .submit-container, .results-actions, .toast-msg, .mode-toggle, .btn { display: none !important; }
  .container { max-width: 100% !important; padding: 0 !important; margin: 0 !important; }
  .results-section { display: block !important; margin: 0 !important; }
  .result-card-main { box-shadow: none !important; border: none !important; padding: 0 !important; }
  .print-header { display: block !important; border-bottom: 2px solid #000000; padding-bottom: 12px; margin-bottom: 20px; }
  .print-header h1 { font-size: 16pt; font-weight: bold; }
  .overall-status { border: 1px solid #444444 !important; }
  .dimension-card { border: 1px solid #888888 !important; background: #ffffff !important; }
  .analysis-box { border: 1px solid #cccccc !important; }
}
