/* Portalul de chestionare: aceleasi culori ca rapoartele clinicii (banda albastra, text subtire). */
:root {
  --blue: #8aaced;
  --blue-dark: #4f73c4;
  --blue-soft: #eef3fd;
  --ink: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --bg: #f7f8fb;
  --error: #b91c1c;
  --ok: #047857;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
.band { background: var(--blue); }
.band-inner { max-width: 760px; margin: 0 auto; padding: 18px 16px; }
.logo { height: 56px; width: auto; display: block; }
.wrap { max-width: 760px; margin: 0 auto; padding: 16px; }
.card { background: #fff; border: 1px solid var(--line); border-left: 6px solid var(--blue); border-radius: 6px; padding: 20px; margin: 12px 0; }
.card.success { border-left-color: var(--ok); }
h1 { font-weight: 300; font-size: 1.7rem; margin: 0 0 .5rem; }
h2 { font-weight: 400; font-size: 1.35rem; margin: 0 0 .5rem; color: var(--blue-dark); }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.note { background: var(--blue-soft); padding: 10px 12px; border-radius: 4px; }
.info { background: var(--blue-soft); padding: 10px 12px; border-radius: 4px; margin: 12px 0; }
.notice { color: var(--error); }

.q { border: 0; margin: 0; padding: 14px 0; border-top: 1px solid var(--line); min-width: 0; }
.q legend { padding: 0; font-weight: 500; margin-bottom: 6px; }
.req { color: var(--error); }
.help { margin: 0 0 8px; color: var(--muted); font-size: .9rem; }
.has-error legend { color: var(--error); }
.error { color: var(--error); margin: 6px 0 0; font-size: .9rem; }

input[type=text], input[type=date], textarea {
  width: 100%; font: inherit; color: inherit; padding: 10px 12px; border: 1px solid #cbd5e1; border-radius: 6px; background: #fff;
}
input:focus, textarea:focus { outline: 2px solid var(--blue); outline-offset: 1px; border-color: var(--blue-dark); }
textarea { resize: vertical; min-height: 3.2em; }
.with-unit { display: flex; gap: 8px; align-items: center; }
.with-unit input { max-width: 220px; }
.unit { color: var(--muted); }

.choices { display: flex; flex-direction: column; gap: 6px; }
.choices.inline { flex-direction: row; gap: 8px; }
.choice { display: flex; align-items: flex-start; gap: 10px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 6px; cursor: pointer; background: #fff; }
.choice:has(input:checked) { border-color: var(--blue-dark); background: var(--blue-soft); }
.choice input { margin-top: .3em; width: 18px; height: 18px; accent-color: var(--blue-dark); flex: none; }
.choices.inline .choice { min-width: 76px; justify-content: center; }
.consent { border: 0; padding: 0; background: none; }
.details { margin-top: 8px; display: grid; gap: 4px; }

.grid { display: grid; gap: 0; }
.grid-head { display: none; }
.grid-row { padding: 10px 0; border-top: 1px dashed var(--line); display: grid; gap: 6px; }
.grid-row:first-of-type { border-top: 0; }
.grid-label { font-size: .95rem; }
/* In tabele, optiunile stau una langa alta, pe mai multe randuri daca nu incap. */
.grid .choices { flex-direction: row; flex-wrap: wrap; gap: 6px; }
.grid .choice { padding: 6px 10px; font-size: .92rem; }

@media (min-width: 700px) {
  .grid-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; gap: 16px; }
  .yesno-grid .grid-row { grid-template-columns: minmax(0, 1fr) auto; }
  .yesno-grid .details { grid-column: 1 / -1; }
  .grid-head { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; font-weight: 600; font-size: .85rem; color: var(--muted); padding-bottom: 4px; }
}

.step-head { margin-top: 8px; }
.progress { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; }
.progress .bar { height: 100%; background: var(--blue-dark); transition: width .2s; }
.nav { display: flex; justify-content: space-between; gap: 12px; margin: 16px 0 8px; }
.btn { font: inherit; font-weight: 500; border: 0; border-radius: 6px; padding: 12px 22px; background: var(--blue-dark); color: #fff; cursor: pointer; min-height: 44px; }
.btn:hover { filter: brightness(1.05); }
.btn:disabled { opacity: .6; cursor: wait; }
.btn.secondary { background: #fff; color: var(--ink); border: 1px solid #cbd5e1; }
footer { padding-bottom: 32px; }
