﻿:root {
  --font-family-main: 'Inter', 'Geist', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --accent-color: #023f5f;
  --bg-light: #f8fafc;
  --border-color: #e2e8f0;
  --text-dark: #334155;
}

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

body {
  font-family: var(--font-family-main);
  background-color: #ffffff;
  color: var(--text-dark);
  line-height: 1.6;
  padding: 0;
}

#examDate {
  max-width: 300px;
}

.scale-container {
  max-width: 900px;
  margin: 32px auto 60px;
  background: white;
  padding: 36px;
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
  .scale-container {
    margin: 24px 16px 48px;
    padding: 28px;
  }
}

@media (max-width: 560px) {
  .scale-container {
    margin: 20px 12px 40px;
    padding: 24px;
  }
}

.scale-header {
  text-align: center;
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 2px solid var(--border-color);
  box-shadow: none;
  position: static;
  top: auto;
  z-index: auto;
  background: transparent;
}

.scale-header .logo {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}

.scale-header .logo img {
  max-height: 140px;
  height: auto;
  width: auto;
  margin: 0;
}

.scale-header h1 {
  font-size: 1.8em;
  color: var(--accent-color);
  font-weight: 700;
  margin: 0 auto 10px;
  line-height: 1.2;
  max-width: 760px;
}

.scale-header .subtitle {
  font-size: 0.9em;
  color: #64748b;
  margin-top: 10px;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.patient-info {
  background: var(--bg-light);
  padding: 25px;
  border-radius: 12px;
  margin-bottom: 30px;
  border: 1px solid var(--border-color);
}

.form-row {
  display: flex;
  gap: 20px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.form-group {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 200px;
}

.form-group.flex-3 {
  flex: 3;
}

.form-group.flex-1 {
  flex: 1;
  min-width: 100px;
}

.form-group.full-width {
  flex: 1 1 100%;
}

label {
  font-weight: 600;
  color: var(--accent-color);
  margin-bottom: 8px;
  font-size: 0.9em;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

input[type="text"],
input[type="number"],
input[type="date"] {
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-family: var(--font-family-main);
  font-size: 1em;
  transition: all 0.2s ease;
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="date"]:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(2, 63, 95, 0.1);
}

.instructions {
  background: #fef3c7;
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 30px;
  border-left: 4px solid #f59e0b;
}

.instructions h3 {
  color: #92400e;
  margin-bottom: 10px;
  font-size: 1.1em;
}

.instructions p {
  color: #78350f;
  text-align: justify;
  hyphens: auto;
}

.question-block {
  background: white;
  padding: 25px;
  margin-bottom: 20px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
}

.question-block:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.question-title {
  font-weight: 600;
  color: var(--accent-color);
  margin-bottom: 15px;
  font-size: 1.05em;
  text-align: justify;
  hyphens: auto;
}

.options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.option-item {
  display: flex;
  align-items: center;
  padding: 12px;
  border-radius: 8px;
  transition: background 0.2s ease;
  cursor: pointer;
}

.option-item:hover {
  background: var(--bg-light);
}

input[type="radio"] {
  width: 20px;
  height: 20px;
  margin-right: 12px;
  accent-color: var(--accent-color);
  cursor: pointer;
}

.option-item label {
  margin: 0;
  cursor: pointer;
  font-weight: 400;
  text-transform: none;
  letter-spacing: normal;
  color: var(--text-dark);
}

.result-section {
  background: #ffffff;
  padding: 30px;
  border-radius: 12px;
  margin-top: 30px;
  border: 1px solid var(--border-color);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  display: none;
}

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

.score-display {
  text-align: center;
  margin-bottom: 20px;
}

.score-number {
  font-size: 3em;
  font-weight: 800;
  color: var(--accent-color);
}

.score-label {
  font-size: 1.2em;
  color: #64748b;
  margin-top: 10px;
}

.severity-badge {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 700;
  margin-top: 15px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.9em;
}

.severity-leve {
  background: #dcfce7;
  color: #166534;
}

.severity-moderada {
  background: #fef3c7;
  color: #92400e;
}

.severity-grave {
  background: #fed7aa;
  color: #9a3412;
}

.severity-muito-grave {
  background: #fecaca;
  color: #991b1b;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: 25px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  overflow: hidden;
}

th {
  background-color: var(--accent-color);
  color: white;
  padding: 15px;
  text-align: center;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.85em;
}

td {
  padding: 15px;
  border-bottom: 1px solid var(--border-color);
  text-align: center;
  color: var(--text-dark);
}

tr:last-child td {
  border-bottom: none;
}

button {
  background: var(--accent-color);
  color: white;
  padding: 15px 30px;
  border: none;
  border-radius: 8px;
  font-family: var(--font-family-main);
  font-size: 1em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 20px;
  width: 100%;
}

button:hover {
  background: #034d75;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(2, 63, 95, 0.2);
}

button:active {
  transform: translateY(0);
}

.btn-print {
  background: #64748b;
  margin-top: 15px;
}

.btn-print:hover {
  background: #475569;
}

.footer {
  text-align: center;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
  color: #ffffff;
  font-size: 0.9em;
}

.footer p {
  margin-bottom: 8px;
}

.footer-social {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.social-item {
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: #ffffff;
}

.social-item img {
  width: 18px;
  height: 18px;
  opacity: 0.7;
}

.social-item svg {
  width: 18px;
  height: 18px;
  fill: #ffffff;
}

.disclaimer {
  margin-top: 30px;
  padding: 20px;
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: 5px solid var(--accent-color);
  border-radius: 8px;
  font-size: 0.9em;
  color: #475569;
  line-height: 1.6;
  display: flex;
  gap: 15px;
  align-items: flex-start;
  text-align: justify;
}

.disclaimer-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  fill: var(--accent-color);
}

@media print {
  @page {
    size: A4;
    margin: 15mm 15mm 15mm 15mm;
  }

  body {
    padding: 0;
    background-color: white !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .scale-container {
    max-width: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
    box-shadow: none;
    border: none;
  }

  .scale-header {
    margin-bottom: 20px;
    padding-bottom: 10px;
  }

  .patient-info,
  .instructions,
  .question-block,
  .result-section {
    break-inside: avoid;
    page-break-inside: avoid;
    margin-bottom: 15px;
  }

  button,
  .btn-print {
    display: none !important;
  }

  .question-title {
    color: var(--accent-color) !important;
  }

  .footer {
    margin-top: 20px;
    page-break-before: auto;
  }
}
