/* North Hixson Boat Storage: signup, success and tenant portal pages. */
:root {
  --navy: #0B1F33; --navy-2: #12304d; --water: #1f7fb8; --water-2: #3aa0d8; --water-soft: #e4f1f9;
  --bg: #f3f6f9; --surface: #ffffff; --text: #10202f; --muted: #5a6b7b; --border: #d8e1e9;
  --ok: #1a7f4b; --ok-soft: #e3f4ea; --due: #9a6400; --due-soft: #fff3d6; --late: #b42318; --late-soft: #fdeceA;
  --radius: 12px; --shadow: 0 1px 2px rgba(11,31,51,.06), 0 4px 16px rgba(11,31,51,.06);
  --head: "Archivo", system-ui, sans-serif; --body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 var(--body); }
a { color: var(--water); }
img { max-width: 100%; }
.wrap { max-width: 880px; margin: 0 auto; padding: 0 16px; }
h1, h2, h3 { font-family: var(--head); line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: clamp(26px, 5vw, 36px); margin: 0 0 12px; font-weight: 800; }
h2 { font-size: 20px; margin: 0 0 14px; display: flex; align-items: center; gap: 10px; }
h3 { font-size: 16px; margin: 18px 0 6px; }
.mono, .num { font-family: var(--mono); }
.center { text-align: center; }
.small { font-size: 14px; }
.hint, .note { font-size: 14px; color: var(--muted); margin-top: 4px; }
.hint { display: block; }

/* header and footer */
header.top { background: var(--navy); color: #fff; padding: 14px 0; border-bottom: 3px solid var(--water); }
header.top .wrap { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-family: var(--head); font-weight: 800; letter-spacing: .04em; font-size: 15px; }
.brand svg { flex: none; }
.phone { color: #fff; font-family: var(--mono); font-weight: 600; text-decoration: none; white-space: nowrap; background: rgba(255,255,255,.1); padding: 6px 12px; border-radius: 99px; }
.testbar { background: var(--due-soft); color: #5c3d00; text-align: center; padding: 8px 16px; font-size: 14px; border-bottom: 1px solid #f0d58a; }
main.wrap { padding-top: 24px; padding-bottom: 40px; }
footer { padding: 24px 0 40px; color: var(--muted); font-size: 14px; }

/* hero */
.hero { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 60%, #17507a 100%); color: #fff; border-radius: var(--radius); padding: 28px 24px; margin-bottom: 18px; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 26px; opacity: .35;
  background: repeating-radial-gradient(circle at 20px -8px, transparent 0 14px, var(--water-2) 15px 16px, transparent 17px 40px); background-size: 40px 26px; }
.hero p { margin: 0; max-width: 560px; color: #cfe2f0; }

/* cards and forms */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; box-shadow: var(--shadow); }
.card.narrow { max-width: 420px; margin-left: auto; margin-right: auto; }
.card.errors { background: var(--late-soft); border-color: #f3b8b2; color: var(--late); }
.card.notice { background: var(--due-soft); border-color: #f0d58a; }
.flash, .card.flash { background: var(--water-soft); border: 1px solid #b8daef; border-radius: 10px; padding: 12px 14px; margin-bottom: 14px; }
.err { font-size: 14px; color: var(--late); margin-top: 4px; }
.step { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--navy); color: #fff; font: 700 14px var(--mono); flex: none; }
.field { display: block; margin-bottom: 14px; flex: 1; min-width: 0; }
.field > span { display: block; font-weight: 600; font-size: 14px; margin-bottom: 4px; }
input, textarea, select { width: 100%; font: inherit; color: var(--text); background: #fbfcfd; border: 1px solid #c7d3de; border-radius: 8px; padding: 11px 12px; }
input[type=file] { padding: 8px; background: var(--surface); }
input:focus, textarea:focus, select:focus { outline: 3px solid rgba(31,127,184,.35); border-color: var(--water); }
.has-err input, .has-err textarea, .has-err select { border-color: var(--late); }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.row > * { flex: 1 1 220px; }
.row.three > * { flex: 1 1 140px; }
.row > button { flex: 0 0 auto; margin-bottom: 14px; }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 10px 0; }
.check input { width: 20px; height: 20px; flex: none; margin-top: 2px; accent-color: var(--water); }
details { margin: 8px 0 4px; }
summary { cursor: pointer; color: var(--water); font-weight: 600; }
.esign-consent { border: 1px solid var(--border); border-radius: 8px; padding: 4px 16px; margin: 12px 0 4px; background: #fbfcfd; font-size: 13px; line-height: 1.5; }
.esign-consent h3 { font-size: 14px; margin: 10px 0 4px; }
.esign-consent p { margin: 6px 0; }
.agreement { max-height: 340px; overflow-y: auto; border: 1px solid var(--border); border-radius: 8px; padding: 4px 16px; margin: 12px 0 16px; background: #fbfcfd; font-size: 14px; }
pre, .agreement-text { white-space: pre-wrap; background: #fbfcfd; border: 1px solid var(--border); border-radius: 8px; padding: 12px; font: 13px/1.5 var(--mono); max-height: 420px; overflow: auto; }
table { width: 100%; border-collapse: collapse; }
td, th { text-align: left; padding: 9px 6px; border-bottom: 1px solid var(--border); vertical-align: top; }
td.price, td.num, th.num { text-align: right; white-space: nowrap; }
td.price { font-weight: 700; }
tr.total td { font-size: 18px; border-bottom: 0; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.list { font-size: 14px; }
table.list th { color: var(--muted); font-weight: 600; font-size: 13px; }

/* buttons */
.cta, .btn, button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--water); color: #fff; border: 0; border-radius: 10px;
  font: 600 16px var(--body); padding: 12px 18px; cursor: pointer; text-decoration: none; min-height: 44px; }
.cta:hover, .btn:hover, button:hover { background: #186c9e; }
form.signup > .cta, .signin .cta, form.signup button.cta { width: 100%; font-size: 18px; padding: 16px; }
.btn { padding: 8px 14px; font-size: 14px; min-height: 36px; }
.ghost, button.ghost { background: transparent; color: var(--water); border: 1px solid #b8daef; }
.ghost:hover, button.ghost:hover { background: var(--water-soft); }
.portal .portal-head .ghost { color: var(--water); }

/* space picker */
.count-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.count-toggle.item-toggle { grid-template-columns: 1fr 1fr; }
.pill { position: relative; display: block; border: 2px solid var(--border); border-radius: 12px; padding: 12px 14px; cursor: pointer; background: #fbfcfd; }
.pill input { position: absolute; opacity: 0; pointer-events: none; }
.pill span { font-weight: 700; font-family: var(--head); display: block; }
.pill small { display: block; font: 500 13px var(--mono); color: var(--muted); margin-top: 2px; }
.pill:has(input:checked) { border-color: var(--water); background: var(--water-soft); box-shadow: inset 0 0 0 1px var(--water); }
.pill:has(input:focus-visible) { outline: 3px solid rgba(31,127,184,.35); }
.pill.disabled { opacity: .5; cursor: not-allowed; }
.baymap { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 12px 0; padding: 12px; background: var(--navy); border-radius: var(--radius); }
.bay { background: var(--navy-2); border-radius: 8px; padding: 8px; }
.bay-name { font: 600 11px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: #8fb3cf; margin-bottom: 6px; }
.bay-spaces { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.spot { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; aspect-ratio: 10 / 27; max-height: 120px; width: 100%;
  border-radius: 4px; border: 2px dashed #5f87a8; color: #cfe2f0; cursor: pointer; background: rgba(58,160,216,.08); transition: background .15s, border-color .15s; }
.spot input { position: absolute; opacity: 0; pointer-events: none; }
.spot .num { font: 700 18px var(--mono); }
.spot .tag { font: 600 9px var(--mono); letter-spacing: .08em; text-transform: uppercase; opacity: .8; }
.spot:hover { background: rgba(58,160,216,.22); }
.spot.taken, .spot.off { border-style: solid; border-color: #2a4a66; background: #183a58; color: #6d8ca6; cursor: not-allowed; }
.spot.unavailable { opacity: .35; cursor: not-allowed; }
.spot.unavailable:hover { background: rgba(58,160,216,.08); }
.spot:has(input:checked), .spot.pair-mate { border: 2px solid #fff; background: var(--water); color: #fff; }
.spot:has(input:focus-visible) { outline: 3px solid #fff; outline-offset: 2px; }
.space-detail { margin: 8px 0 4px; }
.detail { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px; align-items: start; border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; background: #fbfcfd; }
.detail-text { display: flex; flex-direction: column; gap: 4px; }
.d-title { font: 800 22px var(--head); }
.gallery { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 4px; }
.gallery figure { margin: 0; flex: 0 0 88%; max-width: 420px; scroll-snap-align: start; }
.gallery img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; background: var(--border); }
.gallery figcaption { font: 500 12px var(--mono); color: var(--muted); margin-top: 4px; }
.nophoto { display: grid; place-items: center; aspect-ratio: 4 / 3; width: 100%; border-radius: 8px; border: 2px dashed var(--border); color: var(--muted); font-size: 14px; text-align: center; padding: 12px; }
.card .gallery figure { flex-basis: 260px; }
.due { margin-top: 14px; }
.due-line { margin: 0; padding: 14px 16px; border-radius: 10px; background: var(--navy); color: #fff; }
.due-line strong { font: 800 20px var(--head); display: block; }
.due-line .hint { color: #b9d2e5; }
@media (max-width: 600px) {
  .detail { grid-template-columns: 1fr; }
  .count-toggle, .count-toggle.item-toggle { grid-template-columns: 1fr; }
  .baymap { grid-template-columns: repeat(2, 1fr); padding: 8px; gap: 6px; }
}

/* success page */
.bigpair { display: flex; gap: 12px; flex-wrap: wrap; margin: 18px 0; }
.bigpair > div { flex: 1 1 160px; background: var(--navy); color: #fff; border-radius: var(--radius); padding: 16px; text-align: center; }
.bigpair span { display: block; color: #8fb3cf; font: 600 12px var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.bigpair strong { display: block; font: 600 44px var(--mono); letter-spacing: 4px; }
.ticks { list-style: none; padding: 0; margin: 12px 0; }
.ticks li { padding-left: 28px; position: relative; margin: 6px 0; }
.ticks li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 20px; height: 20px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); font-weight: 700; font-size: 13px; display: grid; place-items: center; }

/* tenant portal */
.portal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 8px; }
.portal-head h1 { margin-bottom: 2px; }
.sub { margin: 0; color: var(--muted); font-family: var(--mono); font-size: 14px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin: 12px 0 16px; overflow-x: auto; }
.tabs a { padding: 10px 14px; text-decoration: none; color: var(--muted); font-weight: 600; border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a[aria-current] { color: var(--navy); border-bottom-color: var(--water); }
.label { font: 600 12px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.balance { border-left: 6px solid var(--ok); }
.balance.is-due { border-left-color: var(--due); }
.balance.is-late { border-left-color: var(--late); }
.bal-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.amount { font: 600 40px/1.1 var(--mono); }
.is-late .amount { color: var(--late); }
.badge { display: inline-block; font: 600 12px var(--body); padding: 3px 10px; border-radius: 99px; background: var(--bg); border: 1px solid var(--border); white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); border-color: #b5e0c6; }
.badge.due { background: var(--due-soft); color: var(--due); border-color: #f0d58a; }
.badge.late { background: var(--late-soft); color: var(--late); border-color: #f3b8b2; }
.owed { list-style: none; padding: 0; margin: 14px 0 0; }
.owed li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 0; border-top: 1px solid var(--border); }
.owed li > span:first-child { flex: 1 1 180px; }
.owed .num { font-weight: 600; }
.autopay { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.gate { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--navy); color: #fff; border-color: var(--navy); }
.gate .label, .gate .hint { color: #8fb3cf; }
.reveal { margin: 0; text-align: right; }
.reveal summary { color: #fff; list-style: none; background: rgba(255,255,255,.12); padding: 10px 16px; border-radius: 10px; display: inline-block; }
.reveal summary::-webkit-details-marker { display: none; }
.reveal[open] summary { display: none; }
.code-big { font: 600 44px var(--mono); letter-spacing: 8px; }
.help { background: var(--water-soft); border-color: #b8daef; }
.signin { margin-top: 12px; }
.welcome { border-top: 4px solid var(--water); }
