/* Hayatt forms: extends ../styles.css (same tokens, grouped lists, segmented controls, sheets) */

.nav-back { color: var(--blue); text-decoration: none; font-size: 17px; display: inline-flex; align-items: center; gap: 2px; min-height: 28px }
.nav-back::before { content: "‹"; font-size: 28px; line-height: 1; margin-top: -3px }
.nav-title { opacity: 1 }
.nav .nav-title { position: absolute; left: 50%; transform: translateX(-50%); font-weight: 600; max-width: 55%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0 }
.nav.scrolled .nav-title { opacity: 1 }
.nav-in { position: relative }

.callout { background: var(--card); border-radius: 12px; padding: 14px 16px; font-size: 15px; color: var(--label2); line-height: 1.45 }
.callout strong { color: var(--label) }
.callout p { margin: 0 }
.callout p + p { margin-top: 6px }

/* Stacked field rows: label on top, control below */
.frow { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 11px 16px; background: var(--card); scroll-margin-top: 80px }
.frow + .frow::before, .frow + .frow-pair::before, .frow-pair + .frow::before, .frow-pair + .frow-pair::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; border-top: .5px solid var(--sep) }
.frow-pair { position: relative; display: grid; grid-template-columns: 1fr 1fr; background: var(--card) }
.frow-pair > .frow::before { display: none }
.frow-pair > .frow + .frow { padding-left: 8px }
@media (max-width: 420px) { .frow-pair { grid-template-columns: 1fr } .frow-pair > .frow + .frow { padding-left: 16px } .frow-pair > .frow + .frow::before { display: block } }
.flabel { font-size: 13px; color: var(--label2); font-weight: 500 }
.flabel .req { color: var(--red); margin-left: 2px }
.fhint { font-size: 12px; color: var(--label2) }
.finput { width: 100%; border: 0; border-radius: 10px; background: var(--fill); padding: 11px 12px; min-height: 44px; color: var(--label); outline: none; font-size: 17px; -webkit-appearance: none; appearance: none }
.finput::placeholder { color: var(--label3) }
textarea.finput { resize: vertical; min-height: 84px; line-height: 1.4 }
select.finput { background-image: linear-gradient(45deg, transparent 50%, var(--label2) 50%), linear-gradient(135deg, var(--label2) 50%, transparent 50%); background-position: right 17px center, right 12px center; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px }
.finline { display: flex; gap: 8px; align-items: center }
.finline .finput { flex: 1; min-width: 0 }
.btn-now { flex: none; border: 0; background: var(--fill); color: var(--blue); border-radius: 10px; min-height: 44px; padding: 0 14px; font-size: 15px; font-weight: 600; cursor: pointer }
.frow.invalid .flabel, .frow.invalid .flabel .req { color: var(--red) }
.frow.invalid .finput, .frow.invalid .sig-pad { box-shadow: inset 0 0 0 1.5px var(--red) }

/* Check list rows (multi-select and acknowledgments) */
.checks { display: flex; flex-direction: column; border-radius: 10px; overflow: hidden; background: var(--fill) }
.check { display: flex; align-items: flex-start; gap: 12px; padding: 11px 12px; border: 0; background: none; text-align: left; font-size: 16px; line-height: 1.35; color: var(--label); cursor: pointer; width: 100% }
.check + .check { border-top: .5px solid var(--sep) }
.check .box { flex: none; width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--label3); display: grid; place-items: center; margin-top: -1px }
.check[aria-checked="true"] .box { background: var(--blue); border-color: var(--blue) }
.check[aria-checked="true"] .box::after { content: ""; width: 10px; height: 6px; border-left: 2.2px solid #fff; border-bottom: 2.2px solid #fff; transform: rotate(-45deg) translate(1px, -1px) }

/* Signature */
.sig-pad { position: relative; border-radius: 10px; background: #fff; border: 1px solid var(--sep); height: 150px; touch-action: none } /* white in dark mode too, so the ink shows */
.sig-pad canvas { width: 100%; height: 100%; display: block; border-radius: 10px }
.sig-pad .sig-ph { position: absolute; left: 14px; bottom: 12px; right: 14px; border-top: 1px solid rgba(60,60,67,.3); padding-top: 4px; color: rgba(60,60,67,.45); font-size: 13px; pointer-events: none }
.sig-actions { display: flex; justify-content: flex-end }
.text-btn.danger { color: var(--red) }

/* Repeating groups (vital signs, treatments) */
.rep { display: flex; flex-direction: column; gap: 10px }
.rep-item { background: var(--fill); border-radius: 12px; padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 8px }
.rep-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 600; color: var(--label2); text-transform: uppercase; letter-spacing: .03em }
.rep-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px }
.rep-grid .sub { display: flex; flex-direction: column; gap: 4px; min-width: 0 }
.rep-grid .sub.wide { grid-column: 1 / -1 }
.rep-grid .finput { background: var(--card); min-height: 40px; padding: 8px 10px; font-size: 16px }
.rep-grid .seg { background: var(--card) }
.btn-add { align-self: flex-start; border: 0; background: none; color: var(--blue); font-size: 16px; font-weight: 600; padding: 6px 2px; cursor: pointer }
.btn-add::before { content: "+ " }

/* Photos */
.fphotos { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px }
.fphoto { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--fill); border: 0; padding: 0; cursor: pointer; color: var(--blue); font-size: 13px; font-weight: 600 }
.fphoto img { width: 100%; height: 100%; object-fit: cover; display: block }
.fphoto .x { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; display: grid; place-items: center; font-size: 15px; line-height: 1 }

/* Inspection items */
.insp-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 0 16px }
.insp-head .group-meta { white-space: nowrap }
.iitem { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 12px 16px; background: var(--card); scroll-margin-top: 80px }
.iitem + .iitem::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; border-top: .5px solid var(--sep) }
.iitem .itext { font-size: 16px; line-height: 1.35 }
.iitem .iqty { font-size: 13px; color: var(--label2); margin-top: 2px }
.iitem .ipri { display: inline-block; margin-left: 6px; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--red); vertical-align: 1px }
.istat { display: flex; gap: 6px; flex-wrap: wrap }
.istat button { border: 0; background: var(--fill); color: var(--label); border-radius: 999px; padding: 7px 13px; min-height: 36px; font-size: 14px; font-weight: 500; cursor: pointer }
.istat button[aria-pressed="true"][data-s="ok"] { background: var(--green); color: #fff; font-weight: 600 }
.istat button[aria-pressed="true"][data-s="missing"],
.istat button[aria-pressed="true"][data-s="broken"] { background: var(--red); color: #fff; font-weight: 600 }
.istat button[aria-pressed="true"][data-s="expired"],
.istat button[aria-pressed="true"][data-s="low"] { background: var(--orange); color: #fff; font-weight: 600 }
.istat button[aria-pressed="true"][data-s="na"] { background: var(--label2); color: var(--card); font-weight: 600 }
.iitem.bad { background: var(--red-bg) }
.iitem.warn { background: var(--orange-bg) }
.ixtra { display: grid; grid-template-columns: 1fr; gap: 6px }
.ixtra .finput { background: var(--card); min-height: 40px; padding: 8px 10px; font-size: 16px }
.ixtra.two { grid-template-columns: 2fr 1fr }
@media (max-width: 420px) { .ixtra.two { grid-template-columns: 1fr } }
.iexp { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--label2) }
.iexp .finput { flex: 0 1 180px; min-height: 36px; padding: 6px 10px; font-size: 16px } /* 16px or iPhones zoom in */

.pill-wrap { display: flex; gap: 8px; align-items: center }

/* Done screen extras */
.done-actions { width: 100%; display: flex; flex-direction: column; gap: 10px }
.steps { width: 100%; text-align: left; background: var(--card); border-radius: 12px; padding: 14px 16px; margin: 0; font-size: 15px; line-height: 1.5; color: var(--label) }
.steps h3 { margin: 0 0 6px; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; color: var(--label2) }
.steps ol { margin: 0; padding-left: 20px }
.link-btn { background: none; border: 0; color: var(--blue); font-size: 16px; padding: 8px; cursor: pointer }

/* Hub */
.hub-row { position: relative; display: flex; align-items: center; gap: 14px; padding: 12px 16px; background: var(--card); text-decoration: none; color: var(--label); min-height: 64px }
.hub-row + .hub-row::before { content: ""; position: absolute; top: 0; left: 66px; right: 0; border-top: .5px solid var(--sep) }
.hub-ic { flex: none; width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; color: #fff; font-size: 18px }
.hub-ic svg { width: 20px; height: 20px }
.hub-t { flex: 1; min-width: 0 }
.hub-t b { display: block; font-weight: 600; font-size: 17px }
.hub-t span { display: block; font-size: 14px; color: var(--label2); line-height: 1.3 }
.hub-row::after { content: "›"; color: var(--label3); font-size: 24px; line-height: 1 }
.hub-tag { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--label2); background: var(--fill); padding: 3px 7px; border-radius: 6px; margin-left: 6px; vertical-align: 2px }
