:root {
  color-scheme: light;
  --blue: #0b65b1; --blue-dark: #074778; --blue-pale: #eaf5ff;
  --orange: #f39a22; --ink: #18334a; --muted: #687b8b;
  --line: #d9e4ec; --surface: #fff; --background: #f2f7fb;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--background); color: var(--ink); font-size: 16px; line-height: 1.5; }
button, input, select, textarea { font: inherit; }
.app-shell { width: min(1180px, calc(100% - 32px)); margin: 32px auto 60px; }
.brand-header { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; margin-bottom: 18px; padding: 22px 26px; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: 0 10px 30px rgba(18,59,89,.06); text-align: center; }
.brand-logo { display: block; width: min(360px, 70%); height: auto; }
.brand-copy { text-align: center; }
.brand-header h1 { margin: 2px 0 0; color: var(--blue-dark); font-size: clamp(25px, 4vw, 38px); line-height: 1.1; }
.brand-header p { margin: 4px 0 0; color: var(--muted); font-weight: 700; }
.card { margin-top: 18px; padding: 25px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: 0 10px 30px rgba(18,59,89,.06); }
.section-heading { display: flex; align-items: center; gap: 13px; margin-bottom: 22px; }
.section-heading h2 { margin: 0; color: var(--blue-dark); font-size: 21px; }
.section-heading p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.step { flex: 0 0 auto; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--blue-pale); color: var(--blue); font-weight: 800; }
.form-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.form-grid label { display: grid; gap: 7px; color: var(--blue-dark); font-weight: 700; font-size: 14px; }
.form-grid .wide { grid-column: span 2; }
.form-grid .logo-option { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 650; }
.logo-option input { width: 20px; min-height: 20px; height: 20px; margin: 0; accent-color: var(--blue); }
input, select, textarea { width: 100%; border: 1px solid #bdd0dd; border-radius: 10px; background: #fff; color: var(--ink); outline: none; transition: border-color .15s, box-shadow .15s; }
input, select { min-height: 46px; padding: 9px 12px; }
textarea { padding: 15px; resize: vertical; line-height: 1.65; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(11,101,177,.13); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 13px; }
table { width: 100%; border-collapse: collapse; }
.assessment-table th, .assessment-table td { padding: 15px 14px; border-bottom: 1px solid var(--line); text-align: center; }
.assessment-table th:first-child, .assessment-table td:first-child { width: 70%; text-align: left; }
.assessment-table thead { background: var(--blue-pale); color: var(--blue-dark); }
.assessment-table th span { display: block; font-size: 16px; }
.assessment-table th small { display: block; color: var(--muted); font-size: 11px; font-weight: 600; white-space: nowrap; }
.assessment-table tbody tr:last-child td { border-bottom: 0; }
.assessment-table td:first-child { font-weight: 650; }
.grade-option { display: inline-grid; place-items: center; cursor: pointer; }
.grade-option input { position: absolute; opacity: 0; pointer-events: none; }
.grade-option span { display: grid; place-items: center; width: 37px; height: 37px; border: 2px solid #b9cbd8; border-radius: 50%; background: white; color: transparent; font-weight: 900; transition: .15s ease; }
.grade-option input:focus-visible + span { outline: 3px solid rgba(11,101,177,.22); outline-offset: 2px; }
.grade-option input:checked + span { border-color: var(--blue); background: var(--blue); color: #fff; transform: scale(1.04); }
.observation-heading { flex-wrap: wrap; }
.observation-heading .button { margin-left: auto; }
.actions { display: flex; justify-content: flex-end; gap: 11px; margin-top: 20px; }
.button { min-height: 44px; padding: 10px 18px; border: 1px solid transparent; border-radius: 10px; cursor: pointer; font-weight: 800; transition: transform .12s, opacity .12s, background .12s; }
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button:disabled { cursor: not-allowed; opacity: .45; }
.button.primary { background: var(--blue); color: #fff; }
.button.accent { background: var(--orange); color: #3e2500; }
.button.ghost { border-color: #b7cbd9; background: #fff; color: var(--blue-dark); }
.form-message { min-height: 24px; margin: 12px 4px 0; color: #a64019; font-weight: 700; }
.form-message.success { color: #176b3a; }
.print-report { display: none; }
@media (max-width: 820px) {
  .app-shell { width: min(100% - 20px, 700px); margin-top: 18px; }
  .form-grid { grid-template-columns: 1fr 1fr; }
  .form-grid .wide { grid-column: span 2; }
  .assessment-table th:first-child, .assessment-table td:first-child { min-width: 420px; }
}
@media (max-width: 540px) {
  .brand-header { padding: 18px; }
  .brand-logo { width: min(100%, 310px); }
  .card { padding: 18px 14px; border-radius: 14px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .wide { grid-column: auto; }
  .form-grid .logo-option { align-items: flex-start; }
  .actions { flex-direction: column-reverse; }
  .button { width: 100%; }
  .observation-heading .button { width: 100%; margin-left: 0; }
}
@media print {
  @page { size: A4; margin: 17mm; }
  body { background: white; color: #172b3a; font-family: Arial, sans-serif; font-size: 11pt; }
  .app-shell { display: none !important; }
  .print-report { display: block; }
  .print-header { display: flex; align-items: center; justify-content: space-between; padding-bottom: 12mm; border-bottom: 3px solid #0b65b1; }
  .print-brand { color: #0b65b1; font-size: 17pt; font-weight: 800; }
  .print-brand strong { color: #f39a22; }
  .print-header h1 { margin: 0; color: #074778; font-size: 18pt; text-align: right; }
  .print-header p { margin: 2mm 0 0; color: #687b8b; font-size: 11pt; font-weight: 800; text-align: right; }
  .report-data { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 5mm; margin: 8mm 0; }
  .report-data div { padding: 3mm; background: #eef6fc; border-radius: 2mm; }
  .report-data dt { color: #687b8b; font-size: 8.5pt; font-weight: 700; text-transform: uppercase; }
  .report-data dd { margin: 1mm 0 0; color: #18334a; font-weight: 700; }
  .report-table { margin-top: 6mm; }
  .report-table th, .report-table td { padding: 3mm; border: 1px solid #aac3d5; }
  .report-table th { background: #0b65b1; color: #fff; }
  .report-table th:first-child, .report-table td:first-child { width: 76%; text-align: left; }
  .report-table td:not(:first-child) { text-align: center; font-size: 14pt; font-weight: 900; }
  .report-observation { margin-top: 9mm; page-break-inside: avoid; }
  .report-observation h2 { margin: 0 0 3mm; color: #074778; font-size: 13pt; }
  .report-observation p { margin: 0; line-height: 1.65; text-align: justify; white-space: pre-wrap; }
  .report-teacher { margin-top: 10mm; padding-top: 4mm; border-top: 1px solid #aac3d5; }
  .print-report footer { position: fixed; right: 0; bottom: 0; left: 0; color: #687b8b; font-size: 8.5pt; text-align: center; }
}
