/* ===== Step 5a: More hub, files, forms ===== */
.hub { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 700px) { .hub { grid-template-columns: repeat(3, 1fr); } }
.hub-tile { position: relative; padding: 16px; text-align: left; display: flex; flex-direction: column; gap: 6px; min-height: 140px; }
.hub-tile .ico { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; color: var(--olive-dark); margin-bottom: 4px; }
.hub-tile b { font-size: 17px; line-height: 1.2; }
.hub-tile span:not(.count) { font-size: 14px; color: var(--muted); font-weight: 700; }
.hub-tile .count { position: absolute; top: 14px; right: 14px; }
.hub-tile.soon { opacity: .6; }

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 12px; scrollbar-width: none; }
.chip-btn { white-space: nowrap; padding: 8px 14px; border-radius: 999px; background: var(--card); box-shadow: var(--shadow); font-weight: 800; font-size: 14px; color: var(--muted); }
.chip-btn.on { background: var(--olive); color: #fff; }
.upload-btn { cursor: pointer; }

.file-list, .form-list { padding: 6px; }
.file-row, .form-row { width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 16px; text-align: left; }
.file-row:hover, .form-row:not([disabled]):hover { background: var(--cream); }
.form-row[disabled] { cursor: default; color: inherit; }
.file-row + .file-row, .form-row + .form-row { border-top: 1px solid var(--line-soft); border-radius: 0; }
.file-ico { width: 48px; height: 56px; border-radius: 10px 16px 10px 10px; display: grid; place-items: center; font-size: 11px; font-weight: 900; color: var(--olive-dark); letter-spacing: .05em; flex: none; }
.file-row .info, .form-row .info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.file-row .info b, .form-row .info b { font-size: 16px; }
.file-row .info > span, .form-row .info > span { font-size: 13.5px; color: var(--muted); font-weight: 700; }
.form-row .ico { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; color: var(--olive-dark); flex: none; }
.form-row .avatar { border: 0; }
.form-row .chev { color: var(--muted); font-size: 20px; }
.mini-progress { display: block; height: 6px; border-radius: 99px; background: var(--olive-soft); overflow: hidden; margin: 6px 0 2px; max-width: 220px; }
.mini-progress span { display: block; height: 100%; background: var(--olive); }
.form-row small { font-size: 12.5px; font-weight: 800; color: var(--olive-dark); }

.reader { background: var(--cream); border-radius: 16px; padding: 4px 16px 12px; max-height: 50dvh; overflow: auto; font-weight: 600; line-height: 1.55; }
.reader h3 { font-size: 16px; color: var(--olive-dark); margin: 14px 0 4px; }
.reader p { margin: 0; }
.reader-img { max-width: 100%; max-height: 50dvh; border-radius: 14px; align-self: center; }
.reader-pdf { width: 100%; height: 55dvh; border: 0; border-radius: 14px; background: var(--cream); }
.read-line { margin: 0; font-size: 14px; font-weight: 600; color: var(--muted); }
.read-line b { color: var(--olive-dark); }
.check-line { flex-direction: row !important; align-items: center; gap: 10px !important; font-size: 15px !important; color: var(--ink) !important; font-weight: 700 !important; cursor: pointer; }
.check-line input { width: 22px !important; min-height: 22px !important; height: 22px; accent-color: var(--olive); flex: none; }
.check-line.big { font-size: 17px !important; padding: 12px 14px; background: var(--olive-soft); border-radius: 14px; }
.lock-note { margin: 0; padding: 8px 12px; border-radius: 12px; background: var(--chip); font-size: 14px; font-weight: 700; color: var(--olive-dark); }
.sub-line { margin: -2px 0 12px; color: var(--muted); font-weight: 700; }

/* templates */
.tpl-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 600px) { .tpl-grid { grid-template-columns: 1fr 1fr; } }
.tpl { background: var(--card); box-shadow: var(--shadow); border-radius: 18px; padding: 14px 16px; text-align: left; display: flex; flex-direction: column; gap: 3px; border: 2px dashed transparent; }
.tpl:hover { border-color: var(--sage); }
.tpl b { font-size: 16px; color: var(--olive-dark); }
.tpl span { font-size: 14px; color: var(--muted); font-weight: 600; }
.tpl em { font-style: normal; font-size: 12.5px; font-weight: 800; color: var(--olive); margin-top: 4px; }

/* builder */
.builder, .fill-card { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.builder label, .q-card, .fill-card label.q-title { font-size: 14px; font-weight: 800; color: var(--muted); }
.builder label { display: flex; flex-direction: column; gap: 5px; }
.builder input, .builder textarea, .q-card input, .q-card select, .fill-card input:not([type=radio]):not([type=checkbox]), .fill-card textarea {
  font: inherit; font-size: 16px; font-weight: 700; color: var(--ink); min-height: 48px; padding: 8px 14px;
  border-radius: 14px; border: 2px solid var(--line); background: var(--cream); width: 100%;
}
.builder textarea, .fill-card textarea { resize: vertical; line-height: 1.5; }
.builder input:focus, .builder textarea:focus, .q-card input:focus, .q-card select:focus, .fill-card input:focus, .fill-card textarea:focus { outline: none; border-color: var(--olive); background: var(--card); }
.seg { display: inline-flex; background: var(--chip); border-radius: 14px; padding: 4px; gap: 4px; align-self: flex-start; }
.seg button, .seg label span { padding: 9px 16px; border-radius: 11px; font-weight: 800; color: var(--muted); display: block; cursor: pointer; }
.seg button[aria-pressed="true"], .seg input:checked + span { background: var(--card); color: var(--olive-dark); box-shadow: var(--shadow); }
.seg input, .choices input, .rating input { position: absolute; opacity: 0; pointer-events: none; }
.q-card { padding: 12px; margin-bottom: 10px; display: flex; flex-direction: column; gap: 10px; }
.q-top { display: flex; align-items: center; gap: 10px; }
.q-num { width: 30px; height: 30px; border-radius: 50%; background: var(--sage); color: var(--olive-dark); display: grid; place-items: center; font-weight: 900; flex: none; }
.q-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.q-row select { width: auto; flex: 1; min-width: 150px; }
.add-q { width: 100%; border-style: dashed; margin-bottom: 8px; }
.builder-actions { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin: 6px 0 20px; }
.builder-actions .right { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

/* filling in */
.fill-card h2 { margin: 0; font-size: 22px; color: var(--olive-dark); }
.fill-card .sub { margin: -6px 0 0; color: var(--muted); font-weight: 700; }
.q-fill { display: flex; flex-direction: column; gap: 6px; }
.q-title { color: var(--ink) !important; font-size: 16px !important; }
.req { color: var(--danger-ink); }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choices label span, .rating label span { display: block; padding: 10px 16px; border-radius: 14px; background: var(--cream); border: 2px solid var(--line); font-weight: 800; cursor: pointer; }
.choices input:checked + span, .rating input:checked + span { background: var(--olive); border-color: var(--olive); color: #fff; }
.choices input:focus-visible + span, .rating input:focus-visible + span, .seg input:focus-visible + span { outline: 3px solid var(--gold); }
.rating { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.rating label span { width: 50px; text-align: center; padding: 10px 0; font-size: 18px; }
.rating small { width: 100%; color: var(--muted); font-weight: 700; }
.btn.big { min-height: 56px; font-size: 18px; }
.q-fill .form-error { margin: 0; min-height: 0; }
.q-fill .form-error:empty { display: none; }

/* send sheet + answers */
.people-checks { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; max-height: 40dvh; overflow: auto; }
.people-checks label { flex-direction: row !important; align-items: center; gap: 8px !important; padding: 6px 8px; border-radius: 12px; background: var(--cream); color: var(--ink) !important; cursor: pointer; }
.people-checks input { width: 20px !important; min-height: 20px !important; height: 20px; accent-color: var(--olive); }
.people-checks .avatar { width: 30px; height: 30px; font-size: 11px; border: 0; }
.people-checks span { display: flex; flex-direction: column; font-size: 15px; line-height: 1.2; }
.people-checks small { font-size: 12px; color: var(--muted); }
.people-checks label.sent { opacity: .6; }
.answers { display: flex; flex-direction: column; gap: 2px; max-height: 55dvh; overflow: auto; }
.answer { display: flex; flex-direction: column; padding: 8px 0; border-bottom: 1px solid var(--line-soft); }
.answer span { font-size: 13.5px; font-weight: 800; color: var(--muted); }
.answer b { font-size: 16px; white-space: pre-wrap; }
.reader-sheet .btn { align-self: flex-start; }

.reader:focus { outline: none; }
.reader-sheet .btn.big { align-self: stretch; --icon-fill: transparent; }

/* always-available forms */
.report-card {
  width: 100%; display: flex; align-items: center; gap: 12px; text-align: left; margin-bottom: 10px;
  background: var(--peach); color: var(--peach-ink); border-radius: 20px; padding: 14px 16px; box-shadow: var(--shadow);
}
.report-card .ico { width: 48px; height: 48px; border-radius: 16px; background: var(--card); display: grid; place-items: center; color: var(--danger-ink); flex: none; --icon-fill: var(--peach); }
.report-card .info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.report-card .info b { font-size: 17px; }
.report-card .info span { font-size: 14px; font-weight: 700; opacity: .85; }
.report-card .go { font-weight: 900; white-space: nowrap; }
.form-row.is-new { background: var(--peach-soft); border-radius: 14px; }
.form-row .info > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.reset-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; margin-top: 18px; flex-wrap: wrap; }
.reset-card div { flex: 1; min-width: 200px; display: flex; flex-direction: column; }
.reset-card span { font-size: 13.5px; color: var(--muted); font-weight: 700; }
.reset-card .btn.confirm { background: var(--peach); }
