/* 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; }

/* ------------------------------------------------------------------ aplicatia pacientului */
.band-inner { display: flex; align-items: center; justify-content: space-between; }
.logout { margin: 0; }
.link-light { background: none; border: 0; color: #fff; font: inherit; cursor: pointer; text-decoration: underline; padding: 8px; }
.nav-main { max-width: 760px; margin: 0 auto; padding: 0 8px; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.nav-main a { color: #fff; text-decoration: none; padding: 10px 12px; white-space: nowrap; border-bottom: 3px solid transparent; font-size: .95rem; }
.nav-main a.active { border-bottom-color: #fff; font-weight: 600; }
.narrow { max-width: 440px; margin-left: auto; margin-right: auto; }
label { display: block; font-weight: 500; margin: 10px 0 4px; }
input[type=email], select { width: 100%; font: inherit; padding: 10px 12px; border: 1px solid #cbd5e1; border-radius: 6px; background: #fff; }
input.code { font-size: 1.6rem; letter-spacing: .4em; text-align: center; }
.btn { display: inline-block; text-decoration: none; text-align: center; margin-top: 12px; }
.btn.inline { margin-top: 0; }
.btn.small { padding: 8px 14px; min-height: 0; margin-top: 0; font-size: .9rem; }
form > .btn { width: 100%; }
.head-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 8px; }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 12px 0; }
.tile { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 14px; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; }
.tile .num { font-size: 1.8rem; font-weight: 300; color: var(--blue-dark); }
.tile.attention { border-color: #f59e0b; background: #fffbeb; }
.item { display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; }
.item.link { text-decoration: none; color: var(--ink); }
.item-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 260px; }
.item-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.item-actions form { margin: 0; }
.dim { opacity: .6; }
.chev { font-size: 1.6rem; color: var(--muted); }
.badge { display: inline-block; align-self: flex-start; padding: 2px 8px; border-radius: 999px; font-size: .8rem; background: var(--line); }
.s-confirmed, .s-submitted, .s-done { background: #d1fae5; color: #065f46; }
.s-scheduled, .s-pending, .s-opened { background: var(--blue-soft); color: var(--blue-dark); }
.s-pending_payment { background: #fef3c7; color: #92400e; }
.s-cancelled, .s-expired, .s-revoked, .s-no_show { background: #f3f4f6; color: #6b7280; }
.warn { color: #b45309; }
.switcher { display: flex; gap: 8px; align-items: center; margin: 8px 0; }
.switcher select { flex: 1; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.week-nav { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 8px 0; }
.slots { display: flex; flex-wrap: wrap; gap: 8px; }
.slot { display: flex; flex-direction: column; align-items: center; padding: 8px 12px; border: 1px solid var(--blue); border-radius: 6px; text-decoration: none; color: var(--ink); min-width: 84px; }
.slot:hover, .slot:focus { background: var(--blue-soft); }
details.result summary { cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 12px; list-style: none; }
details.result summary::-webkit-details-marker { display: none; }
h3 { font-weight: 500; font-size: 1.05rem; margin: 16px 0 4px; color: var(--blue-dark); }
table.results { width: 100%; border-collapse: collapse; }
table.results td { padding: 6px 4px; border-top: 1px solid var(--line); vertical-align: top; }
table.results td.val { font-weight: 600; white-space: nowrap; }
table.results tr.out td.val { color: #b91c1c; }
.interp { white-space: normal; background: var(--blue-soft); padding: 10px 12px; border-radius: 4px; }
@media (min-width: 700px) { .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
