/* My Paragon: the client app for Paragon Properties' tenants and landlords. Mobile first, installable, calm. */

:root {
  --paper: #F5F6F3; --card: #FFFFFF; --ink: #111613; --muted: #4E5751; --line: #DCE0DA; --line-strong: #C9CFC7; --wash: #EEF0EC;
  --canopy: #1E3B30; --canopy-dark: #142A21; --canopy-tint: #E5EDE8; --jac: #7A5AC8; --jac-deep: #5B3F9E; --jac-tint: #F1EDFA;
  --velvet: #0B0C0E; --velvet-2: #17191C; --platinum: #E9ECEF; --silver: #AEB8C2;
  --ok: #1C7A4C; --ok-tint: #E6F2EB; --ok-line: #B9DCC7; --warn: #9A5B00; --warn-tint: #FFF6E5; --warn-line: #F0D9A8; --bad: #B42318; --bad-tint: #FDECEA; --bad-line: #F3C3BD;
  --serif: Marcellus, Georgia, 'Times New Roman', serif; --sans: 'Hanken Grotesk', Inter, 'Helvetica Neue', Arial, sans-serif; --mono: 'DM Mono', ui-monospace, Menlo, Consolas, monospace;
  --r: 14px; --tap: 44px; --gutter: 16px;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.5 var(--sans); -webkit-font-smoothing: antialiased; overflow-wrap: break-word; }
body.has-tabs { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
a { color: var(--jac-deep); text-underline-offset: 3px; }
a:hover { color: var(--jac); }
:focus-visible { outline: 2px solid var(--jac); outline-offset: 2px; }
p { margin: 0 0 .75em; }
h1, h2, h3 { margin: 0; font-weight: 400; overflow-wrap: anywhere; }
h1 { font-family: var(--serif); font-size: 29px; line-height: 1.15; margin-bottom: 6px; }
h2 { font-family: var(--serif); font-size: 21px; line-height: 1.2; margin-bottom: 10px; }
h3 { font-size: 16px; font-weight: 600; margin: 14px 0 6px; }
svg { max-width: 100%; }
.ic { width: 20px; height: 20px; flex: 0 0 auto; }
.mono { font-family: var(--mono); font-size: .9em; }
.muted { color: var(--muted); }
.small { font-size: 13.5px; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -80px; z-index: 100; padding: 10px 14px; border-radius: 8px; background: #fff; color: var(--ink); font-weight: 600; }
.skip:focus { top: 10px; }
.eyebrow { margin: 0 0 4px; font-family: var(--mono); font-size: 13px; color: var(--muted); }
.hint { margin: 6px 0 0; font-size: 14px; color: var(--muted); }

/* Bar */
.bar { background: var(--velvet); color: #fff; }
.bar-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 980px; min-height: 60px; margin: 0 auto; padding: 8px var(--gutter); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; min-width: 0; }
.brand .lockup-words { display: none !important; }
.app-tag { font-family: var(--serif); font-size: 19px; letter-spacing: .02em; color: #fff; white-space: nowrap; }
.bar-out { margin: 0; }
.bar-out button { min-height: var(--tap); padding: 0 12px; border: 1px solid #3B4148; border-radius: 8px; background: transparent; color: var(--platinum); font: 600 14px/1 var(--sans); cursor: pointer; }
.bar-out button:hover { border-color: var(--silver); color: #fff; }
@media (min-width: 560px) { .brand .lockup-words { display: flex !important; } }

/* Frame */
.wrap { max-width: 980px; margin: 0 auto; padding: 18px var(--gutter) 40px; }
.page-head { margin: 0 0 16px; }
.grid { display: grid; gap: 14px; }
@media (min-width: 860px) { .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; } }
.card { padding: 18px 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); min-width: 0; }
.card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; margin: 0 0 8px; }
.card-head h2 { margin: 0; }
.card-velvet { border-color: var(--velvet); background: var(--velvet); color: var(--platinum); }
.card-velvet h2, .card-velvet .big { color: #fff; }
.card-velvet .muted, .card-velvet .hint { color: var(--silver); }
.card-velvet a { color: #D9CCF7; }
.card-quiet { border-style: dashed; background: transparent; }
.empty-state { max-width: 600px; }
.big { margin: 2px 0 4px; font: 600 34px/1.1 var(--sans); letter-spacing: -.01em; }
.lede { color: var(--muted); }
.list { margin: 0; padding: 0; list-style: none; }
.list > li { padding: 12px 0; border-top: 1px solid var(--line); }
.list > li:first-child { border-top: 0; padding-top: 2px; }
.row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; }
.row-title { font-weight: 600; color: var(--ink); text-decoration: none; }
.row-title:hover { text-decoration: underline; color: var(--ink); }
.meta { margin: 2px 0 0; color: var(--muted); font-size: 14.5px; }
.dl { margin: 0 0 12px; border-top: 1px solid var(--line); }
.dl > div { display: grid; grid-template-columns: minmax(100px, 42%) minmax(0, 1fr); gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.dl dt { color: var(--muted); font-size: 14.5px; }
.dl dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }

/* Buttons and forms */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--tap); padding: 0 16px; border: 1px solid var(--line-strong);
  border-radius: 10px; background: #fff; color: var(--ink); font: 600 15.5px/1.15 var(--sans); text-decoration: none; cursor: pointer; text-align: center;
}
.btn:hover { background: #F7F8F6; color: var(--ink); }
.btn .ic { width: 18px; height: 18px; }
.btn-primary { border-color: var(--canopy); background: var(--canopy); color: #fff; }
.btn-primary:hover { border-color: var(--canopy-dark); background: var(--canopy-dark); color: #fff; }
.btn-danger { border-color: #E8B4AD; color: var(--bad); }
.btn-call { border-color: var(--bad); background: var(--bad); color: #fff; }
.btn-call:hover { background: #8F1C13; color: #fff; }
.btn-ghost { border-color: transparent; background: transparent; color: var(--jac-deep); }
.btn-block { display: flex; width: 100%; }
.btn-small { min-height: var(--tap); padding: 0 12px; font-size: 14.5px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; }
.btn-row form { margin: 0; }
.card-velvet .btn { border-color: #3B4148; background: transparent; color: var(--platinum); }
.card-velvet .btn-primary { border-color: var(--platinum); background: var(--platinum); color: var(--velvet); }
.field { margin: 0 0 14px; }
label, legend { display: block; margin: 0 0 6px; font-size: 15px; font-weight: 600; }
fieldset { margin: 0 0 14px; padding: 0; border: 0; min-width: 0; }
.optional { color: var(--muted); font-size: 13px; font-weight: 500; }
input[type="text"], input[type="email"], input[type="password"], input[type="tel"], input[type="number"], input[type="date"], select, textarea {
  display: block; width: 100%; min-height: var(--tap); padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: #fff; color: var(--ink); font: 400 16px/1.4 var(--sans);
}
input[type="date"] { -webkit-appearance: none; appearance: none; }
input[type="file"] { display: block; max-width: 100%; min-height: var(--tap); padding: 8px 0; font: 400 15px/1.4 var(--sans); }
textarea { min-height: 96px; resize: vertical; }
select { -webkit-appearance: none; appearance: none; padding-right: 40px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234E5751' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center / 16px 16px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--jac); outline: 2px solid var(--jac); outline-offset: 1px; }
.field-error { margin: 6px 0 0; color: var(--bad); font-size: 14px; font-weight: 600; }
.check { display: flex; align-items: center; gap: 12px; min-height: var(--tap); font-weight: 500; cursor: pointer; }
.check input { flex: 0 0 auto; width: 22px; height: 22px; margin: 0; accent-color: var(--canopy); }
.choice { display: flex; align-items: flex-start; gap: 12px; margin: 0 0 8px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font-weight: 400; cursor: pointer; }
.choice input { flex: 0 0 auto; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--canopy); }
.choice b { display: block; font-weight: 600; }
.choice small { display: block; margin-top: 2px; color: var(--muted); font-size: 14px; line-height: 1.4; }
.choice:has(input:checked) { border-color: var(--canopy); background: var(--canopy-tint); }

/* Tiles (repair categories and issues) */
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 640px) { .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tile { display: flex; flex-direction: column; justify-content: center; min-height: 76px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); font-weight: 600; text-decoration: none; line-height: 1.3; }
.tile:hover { border-color: var(--canopy); color: var(--ink); background: var(--canopy-tint); }
.tile small { display: block; margin-top: 4px; color: var(--muted); font-weight: 500; font-size: 13px; }
.tile-urgent { border-color: var(--bad-line); }
.tips { margin: 0 0 12px; padding: 0 0 0 20px; }
.tips li { margin: 0 0 8px; }

/* Chips, flashes, steps */
.chip { display: inline-flex; align-items: center; min-height: 26px; padding: 2px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--wash); font-size: 13px; font-weight: 600; white-space: nowrap; }
.chip-ok { border-color: var(--ok-line); background: var(--ok-tint); color: var(--ok); }
.chip-warn { border-color: var(--warn-line); background: var(--warn-tint); color: var(--warn); }
.chip-bad { border-color: var(--bad-line); background: var(--bad-tint); color: var(--bad); }
.chip-info { border-color: #DDD3F3; background: var(--jac-tint); color: var(--jac-deep); }
.flash { margin: 0 0 14px; padding: 12px 14px; border: 1px solid; border-radius: 12px; font-size: 15px; font-weight: 500; }
.flash-ok { background: var(--ok-tint); border-color: var(--ok-line); color: #14583A; }
.flash-error { background: var(--bad-tint); border-color: var(--bad-line); color: var(--bad); }
.flash-info { background: var(--jac-tint); border-color: #DDD3F3; color: #47307F; }
.note { margin: 0 0 12px; padding: 12px 14px; border-radius: 12px; background: var(--wash); font-size: 15px; }
.note-bad { background: var(--bad-tint); color: #7A1810; }
.note-warn { background: var(--warn-tint); color: #6B4000; }
.steps { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 12px; padding: 0; list-style: none; }
.steps li { padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 13px; font-weight: 600; }
.steps li.done { border-color: #C6D8CD; background: var(--canopy-tint); color: var(--canopy); }
.steps li.current { border-color: var(--canopy); background: var(--canopy); color: #fff; }
.timeline { margin: 0; padding: 0; list-style: none; }
.timeline li { position: relative; padding: 0 0 14px 20px; }
.timeline li::before { content: ""; position: absolute; left: 0; top: 7px; width: 9px; height: 9px; border-radius: 50%; background: var(--canopy); }
.timeline .t-meta { margin: 0; color: var(--muted); font-size: 13.5px; }
.timeline .t-body { margin: 2px 0 0; }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.thumbs a { display: block; width: 96px; height: 72px; border-radius: 8px; overflow: hidden; background: var(--wash); }
.thumbs img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* Stars */
.stars { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; margin: 0 0 12px; }
.stars input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.stars label { display: grid; place-items: center; width: var(--tap); height: var(--tap); margin: 0; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: #B9BFB8; font-size: 24px; cursor: pointer; }
.stars input:checked ~ label, .stars label:hover, .stars label:hover ~ label { color: #C78A00; border-color: var(--warn-line); background: var(--warn-tint); }
.stars input:focus-visible + label { outline: 2px solid var(--jac); outline-offset: 2px; }

/* Payment block (also used by the printed documents) */
.bank-block { margin: 0 0 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--ink); }
.bank-dl { display: grid; gap: 4px; margin: 0 0 8px; }
.bank-dl div { display: grid; grid-template-columns: minmax(104px, 42%) minmax(0, 1fr); gap: 10px; }
.bank-dl dt { color: var(--muted); font-size: 14px; }
.bank-dl dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.bank-ref dd { color: var(--canopy); }
.fraud-line { margin: 0; color: var(--bad); font-size: 14px; }

/* Bottom tab bar (top row on wide screens) */
.tabbar {
  position: fixed; z-index: 50; left: 0; right: 0; bottom: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr);
  padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: #fff;
}
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 58px; border-radius: 10px; color: var(--muted); font-size: 12px; font-weight: 600; text-decoration: none; }
.tabbar a[aria-current="page"] { color: var(--canopy); background: var(--canopy-tint); }
.tabbar .ic { width: 22px; height: 22px; }
@media (min-width: 900px) {
  body.has-tabs { padding-bottom: 0; }
  .tabbar { position: static; max-width: 980px; margin: 12px auto 0; padding: 4px var(--gutter); border: 0; background: transparent; grid-auto-columns: max-content; justify-content: start; gap: 6px; }
  .tabbar a { flex-direction: row; gap: 8px; min-height: var(--tap); padding: 0 14px; font-size: 15px; border: 1px solid var(--line); background: #fff; }
}

/* Printed documents inside the app */
.doc-wrap { margin: 0 0 16px; }
@media print {
  .bar, .tabbar, .no-print, .flash, .skip { display: none !important; }
  body { background: #fff; padding: 0; }
  .wrap { padding: 0; max-width: none; }
}
@media (min-width: 720px) {
  :root { --gutter: 24px; }
  .wrap { padding-top: 26px; }
  h1 { font-size: 34px; }
  .card { padding: 22px 24px; }
}

/* Ledgers in documents (statements): one stacked entry per row on a phone; print keeps the table. */
@media screen and (max-width: 600px) {
  .doc-body table.doc-ledger, .doc-body table.doc-ledger tbody, .doc-body table.doc-ledger tfoot { display: block; overflow: visible; }
  .doc-body table.doc-ledger thead { display: none; }
  .doc-body table.doc-ledger tr { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 14px; padding: 10px 0; border-bottom: 1px solid var(--doc-line, #E3E5DF); }
  .doc-body table.doc-ledger td { display: block; padding: 0; border: 0; text-align: left; }
  .doc-body table.doc-ledger tbody td:nth-child(2) { flex: 1 1 100%; order: -1; }
  .doc-body table.doc-ledger td.num:empty { display: none; }
  .doc-body table.doc-ledger td[data-label]::before { content: attr(data-label) " "; font-family: var(--doc-sans, sans-serif); font-size: 12px; color: var(--doc-muted, #6B6F68); }
  .doc-body table.doc-ledger tfoot tr { justify-content: space-between; border-top: 1.5px solid var(--doc-ink, #0B0C0E); border-bottom: 0; }
}
