/* Rental application: wizard, signatures, summaries and staff detail (on top of styles.css). */

.req { color: var(--danger); }
.ok { color: var(--ok); }
.ok-notice { background: #ecfdf3; color: #05603a; }
.prop-banner { margin-bottom: 1rem; }
button.link.inline, label.check.inline { display: inline-flex; padding: 0; }
label.check.inline { gap: .3rem; margin-left: .5rem; }
.portal-main.narrow { max-width: 820px; }
a.plain-light { color: #fff; }
a.plain-light:hover { text-decoration: none; }
.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 46rem; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .3rem .8rem; }
button.big { padding: .8rem 1.6rem; font-size: 1.05rem; font-weight: 600; }

/* status badges */
.badge.st-draft { background: #fef0c7; color: var(--warn); }
.badge.st-submitted { background: #e0eaff; color: var(--primary-dark); }
.badge.st-under_review { background: #ede9fe; color: #5b21b6; }
.badge.st-needs_info { background: #fef0c7; color: var(--warn); }
.badge.st-approved { background: #dcfae6; color: var(--ok); }
.badge.st-conditional { background: #d1fadf; color: #05603a; }
.badge.st-denied { background: #fee4e2; color: var(--danger); }
.badge.st-withdrawn { background: #f2f4f7; color: var(--muted); }

/* applicant home */
.app-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.app-card { display: block; color: inherit; }
a.app-card:hover { text-decoration: none; box-shadow: 0 4px 14px rgba(16,24,40,.12); }
.success-card { text-align: center; padding: 2.5rem 1.5rem; }

/* wizard */
.wizard-steps { list-style: none; display: flex; gap: .35rem; padding: 0; margin: 0 0 .25rem; flex-wrap: wrap; }
.wizard-steps a { display: flex; align-items: center; gap: .4rem; padding: .35rem .7rem; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--muted); font-size: .82rem; }
.wizard-steps a:hover { text-decoration: none; border-color: var(--primary); }
.wizard-steps em { font-style: normal; }
.wizard-steps span { display: inline-grid; place-items: center; width: 1.3rem; height: 1.3rem; border-radius: 50%; background: #f2f4f7; font-size: .72rem; font-weight: 700; }
.wizard-steps li.current a { color: var(--primary-dark); border-color: var(--primary); font-weight: 600; }
.wizard-steps li.current span { background: var(--primary); color: #fff; }
.wizard-steps li.done a { color: var(--ok); border-color: #abefc6; }
.wizard-steps li.done span { background: var(--ok); color: #fff; }
.wizard-steps li.todo span { background: var(--warn); color: #fff; }
@media (max-width: 700px) { .wizard-steps li:not(.current) em { display: none; } }
.wizard { padding: 1.5rem; }
.wizard h2 { font-size: 1.3rem; }
.wizard h3 { font-size: 1.05rem; }
.wizard-nav { display: flex; justify-content: space-between; gap: .75rem; margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--line); flex-wrap: wrap; }
.step-errors ul, .error ul, .notice ul { margin: .35rem 0 0; padding-left: 1.2rem; }
.prop-card { border: 1px solid var(--line); border-radius: 10px; padding: .9rem 1rem; margin-bottom: 1rem; background: #fafbfc; }
.person-card { border: 1px solid var(--line); border-left: 4px solid var(--primary); border-radius: 10px; padding: 1rem 1.1rem; margin: 1rem 0; background: #fff; }
.person-head, .sub-head { display: flex; justify-content: space-between; align-items: center; gap: .75rem; flex-wrap: wrap; }
.person-head h3, .person-head h4 { margin: 0 0 .5rem; }
.sub-card { border: 1px dashed #d0d5dd; border-radius: 8px; padding: .75rem .9rem; margin: .75rem 0; background: #fcfcfd; }
.sub-head { margin-bottom: .6rem; }
.minor-row { border-bottom: 1px solid var(--line); padding-bottom: .5rem; margin-bottom: .75rem; }
.form-grid.three { grid-template-columns: repeat(3, 1fr); }
.form-grid.inner { grid-template-columns: 1fr 1fr; gap: 0 .6rem; }
@media (max-width: 600px) { .form-grid.three { grid-template-columns: 1fr 1fr; } }
fieldset.yesno { border: 0; padding: 0; margin: 1rem 0; }
fieldset.yesno legend { font-weight: 600; margin-bottom: .4rem; padding: 0; }
fieldset.yesno.compact { margin: .5rem 0; }
fieldset.yesno.compact legend { font-weight: 400; }
label.choice { display: inline-flex; align-items: center; gap: .4rem; margin-right: .5rem; padding: .45rem .9rem; border: 1px solid #d0d5dd; border-radius: 8px; background: #fff; font-weight: 500; cursor: pointer; }
label.choice:has(input:checked) { border-color: var(--primary); background: #eff4ff; color: var(--primary-dark); }
.bg-q { border-bottom: 1px solid var(--line); padding-bottom: .25rem; }
.bg-q:last-child { border-bottom: 0; }
.ssn-saved { padding: .5rem 0; }
.doc-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.doc-row:last-child { border-bottom: 0; }
.upload-btn { cursor: pointer; flex: none; }
.upload-btn.busy { opacity: .6; pointer-events: none; }
.doc-list { margin: .3rem 0 0; padding-left: 1.1rem; }
.submit-box { margin-top: 1.5rem; padding: 1rem; border-radius: 10px; background: #f8fafc; border: 1px solid var(--line); display: grid; gap: .8rem; justify-items: start; }

/* signing */
.criteria-list { list-style: none; padding: 0; margin: 0 0 .5rem; display: grid; gap: .75rem; }
.criterion { border: 1px solid var(--line); border-radius: 10px; padding: .8rem 1rem; background: #fff; }
.criterion h4 { margin: .15rem 0 .35rem; }
.crit-kind { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.crit-body { font-size: .9rem; line-height: 1.5; margin-bottom: .6rem; max-height: 14rem; overflow: auto; }
.sign-box { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.pad-wrap { position: relative; margin-bottom: .5rem; }
.sig-pad { display: block; width: 100%; height: 170px; border: 2px dashed #98a2b3; border-radius: 10px; background: #fff; touch-action: none; cursor: crosshair; }
.pad-clear { position: absolute; top: .3rem; right: .4rem; }
.sign-table td { vertical-align: middle; }
.sign-table td.right { white-space: normal; }
.sign-table td.right button { margin: .15rem; }

/* summary */
.sum-sec { padding: .25rem 0 1rem; border-bottom: 1px solid var(--line); margin-bottom: 1rem; }
.sum-sec:last-child { border-bottom: 0; margin-bottom: 0; }
.sum-sec h3 { margin-top: .25rem; display: flex; gap: .5rem; align-items: center; }
.sum-sec h4 { margin: .9rem 0 .35rem; font-size: .9rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.sum-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 700px) { .sum-grid { grid-template-columns: 1fr; } }
.sum-item { padding: .35rem 0; }
table.mini { width: 100%; border: 1px solid var(--line); border-radius: 8px; }
table.mini th, table.mini td { padding: .45rem .6rem; }
.bg-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .3rem; font-size: .9rem; }
.bg-list li.yes { background: #fff7ed; border-radius: 6px; padding: .3rem .5rem; }
.bg-ans { display: inline-block; min-width: 2.4rem; font-weight: 700; font-size: .78rem; }
.bg-list li.yes .bg-ans { color: var(--danger); }
.bg-explain { margin: .2rem 0 0 2.6rem; }

/* staff detail */
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1rem; align-items: start; }
@media (max-width: 1100px) { .detail-grid { grid-template-columns: 1fr; } }
.detail-grid aside .card h3 { margin-top: 0; }
.sig-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .75rem; }
.sig-card { border: 1px solid var(--line); border-radius: 8px; padding: .6rem .75rem; }
.sig-card.unsigned { background: #fffaeb; }
.sig-card img { display: block; width: 100%; max-height: 110px; object-fit: contain; margin: .4rem 0; border-bottom: 1px solid #98a2b3; }
.integ { padding: .5rem 0; border-bottom: 1px solid var(--line); }
.note { padding: .5rem 0; border-top: 1px solid var(--line); margin-top: .5rem; font-size: .9rem; }
.activity { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; font-size: .88rem; max-height: 420px; overflow: auto; }

@media print {
  .sidebar, .detail-grid aside, .topbar .row, .portal-head, .wizard-nav, button, .toast { display: none !important; }
  .shell { display: block; }
  .main { padding: 0; max-width: none; }
  .detail-grid { display: block; }
  .card { box-shadow: none; border: 0; padding: 0; }
  body { background: #fff; }
}

.row.between { justify-content: space-between; }
.initials-input { max-width: 8rem; }
