/* PFS Landlord Desk — self-contained styles (works offline). */
@font-face { font-family: "Source Sans Pro"; src: url("/fonts/SourceSansPro-Regular.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Source Sans Pro"; src: url("/fonts/SourceSansPro-Semibold.woff") format("woff"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Source Sans Pro"; src: url("/fonts/SourceSansPro-Bold.woff") format("woff"); font-weight: 700; font-display: swap; }
@font-face { font-family: "DM Serif Display"; src: url("/fonts/DMSerifDisplay-Regular.woff") format("woff"); font-weight: 400; font-display: swap; }
:root {
  --navy: #1b365d; --navy-deep: #12243e; --gold: #b8954e; --gold-light: #d4bc7a; --cream: #f6f1e7; --paper: #fffdf8;
  --ink: #1f2430; --muted: #5a606c; --line: #e4ddd0; --ok: #1f6b45; --bad: #8b2e2e; --bad-bg: #f8ecec;
  --radius: 12px; --serif: "DM Serif Display", Palatino, Georgia, serif;
  --sans: "Source Sans Pro", "Segoe UI", system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.5 var(--sans); color: var(--ink); background: var(--cream); padding-bottom: env(safe-area-inset-bottom); }
a { color: var(--navy); }
.skip { position: absolute; left: -999px; } .skip:focus { left: 8px; top: 8px; background: #fff; padding: 6px 10px; z-index: 99; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.top { background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 10; padding-top: env(safe-area-inset-top); box-shadow: 0 4px 16px rgba(18,36,62,.18); }
.top-inner { max-width: 1040px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; }
.brand { display: flex; gap: 10px; align-items: center; color: #fff; text-decoration: none; }
.brand img { border-radius: 8px; background: #fff; }
.brand strong { font-family: var(--serif); font-weight: 400; font-size: 1.25rem; display: block; line-height: 1.1; }
.brand small { color: var(--gold-light); font-size: .78rem; }
.top-actions { display: flex; gap: 8px; align-items: center; }
.pill { background: var(--gold); color: var(--navy-deep); border-radius: 99px; padding: 2px 10px; font-size: .8rem; font-weight: 700; }
.tabs { max-width: 1040px; margin: 0 auto; display: flex; gap: 2px; overflow-x: auto; padding: 0 8px; scrollbar-width: none; }
.tabs button { background: none; border: 0; color: #d9e0ea; font: 600 .95rem var(--sans); padding: 10px 12px; border-bottom: 3px solid transparent; cursor: pointer; white-space: nowrap; }
.tabs button[aria-current] { color: #fff; border-bottom-color: var(--gold); }
main { max-width: 1040px; margin: 0 auto; padding: 16px; }
h1 { font-family: var(--serif); font-weight: 400; color: var(--navy); font-size: 1.9rem; line-height: 1.15; margin: 8px 0; }
h2 { font-size: 1.15rem; margin: 0 0 10px; color: var(--navy); }
h3 { margin: 0; font-size: 1.05rem; }
.intro p { max-width: 46rem; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 14px 0; box-shadow: 0 6px 18px rgba(18,36,62,.05); }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.card-head h2 { margin: 0; }
.fine { color: var(--muted); font-size: .86rem; }
.kicker { text-transform: uppercase; letter-spacing: .08em; font-size: .75rem; color: var(--gold); font-weight: 700; margin: 0 0 4px; }
.notice { border-radius: var(--radius); padding: 12px 14px; margin: 14px 0; }
.notice.gold { background: #fbf3df; border: 1px solid var(--gold-light); }
.notice.warn { background: var(--bad-bg); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--navy); background: var(--navy); color: #fff; font: 600 .95rem var(--sans); border-radius: 8px; padding: 9px 14px; cursor: pointer; text-decoration: none; min-height: 40px; }
.btn:hover { background: var(--navy-deep); }
.btn:disabled { opacity: .6; cursor: wait; }
.btn-ghost { background: transparent; color: var(--navy); }
.btn-ghost:hover { background: #eef1f6; }
.btn-gold { background: var(--gold); border-color: var(--gold); color: var(--navy-deep); }
.btn-gold:hover { background: var(--gold-light); }
.btn-danger { background: var(--bad); border-color: var(--bad); }
.btn-sm { padding: 6px 11px; min-height: 34px; font-size: .88rem; }
.btn-xs { padding: 3px 8px; min-height: 28px; font-size: .82rem; }
.danger-text { color: var(--bad); border-color: transparent; }
.linkish { background: none; border: 0; padding: 0; color: var(--navy); font: inherit; text-decoration: underline; cursor: pointer; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
input, select { font: inherit; padding: 8px 10px; border: 1px solid #cfc6b5; border-radius: 8px; background: #fff; width: 100%; min-height: 40px; color: var(--ink); }
input:focus, select:focus, button:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(184,149,78,.5); }
input[type=checkbox], input[type=radio] { width: auto; min-height: 0; }
label { display: block; font-size: .88rem; font-weight: 600; color: #3a4150; }
label > input, label > select { margin-top: 4px; font-weight: 400; }
.check { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; margin-top: 10px; }
.check input { margin-top: 4px; }
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 10px; }
.span2 { grid-column: span 2; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.seg label { margin: 0; padding: 8px 14px; cursor: pointer; display: flex; gap: 6px; align-items: center; font-weight: 600; border-right: 1px solid var(--line); }
.seg label:last-child { border-right: 0; }
.seg label:has(input:checked) { background: var(--navy); color: #fff; }
fieldset { border: 0; padding: 0; margin: 10px 0; } legend { font-weight: 700; margin-bottom: 6px; }
.qa-row { display: flex; gap: 8px; }
.qa-row input { flex: 1; font-size: 1.05rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.stat { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.stat span { display: block; color: var(--muted); font-size: .82rem; }
.stat strong { font-size: 1.3rem; color: var(--navy); font-variant-numeric: tabular-nums; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.list li:last-child { border-bottom: 0; }
.list li.overdue strong { color: var(--bad); }
.list li.soon strong { color: #8f6100; }
.empty { color: var(--muted); }
.row-actions { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.steps { margin: 0; padding-left: 20px; } .steps li { margin: 6px 0; }
.filters { display: flex; gap: 6px; flex-wrap: wrap; } .filters select { width: auto; min-height: 34px; padding: 4px 8px; }
.sumline { font-size: .9rem; color: var(--muted); margin-bottom: 8px; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: .92rem; }
.tbl th, .tbl td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl tr.t-income .num { color: var(--ok); }
.tbl tr.total td { font-weight: 700; border-top: 2px solid var(--navy); }
.unit-row { display: grid; grid-template-columns: 1fr 1.3fr 1fr 1fr auto; gap: 8px; align-items: end; margin: 10px 0; padding: 10px; background: #faf6ee; border-radius: 10px; }
.units { margin: 6px 0 0; padding-left: 18px; color: #3a4150; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 5px 11px; font: 600 .82rem var(--sans); color: var(--navy); cursor: pointer; }
.chip:hover { border-color: var(--gold); }
.filebtn { position: relative; overflow: hidden; } .filebtn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.danger { border-color: #e7cccc; }
.pro { border: 2px solid var(--gold-light); background: linear-gradient(180deg, #fffaf0, var(--paper)); }
.pro ul { padding-left: 20px; }
.etsy .etsy-item { display: block; border: 1px solid var(--line); border-radius: 10px; padding: 12px; text-decoration: none; color: var(--ink); background: #fff; }
.etsy .etsy-item:hover { border-color: var(--gold); }
.etsy .etsy-item strong { display: block; color: var(--navy); }
.etsy .etsy-item span { font-size: .85rem; color: var(--muted); }
details summary { cursor: pointer; margin-top: 10px; }
#toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%) translateY(120px); background: var(--navy-deep); color: #fff; padding: 10px 16px; border-radius: 10px; transition: transform .25s; z-index: 50; max-width: 92vw; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
#toast.show { transform: translateX(-50%) translateY(0); }
#toast.bad { background: var(--bad); }
.foot { max-width: 1040px; margin: 10px auto 30px; padding: 0 16px; color: var(--muted); font-size: .82rem; }
[hidden] { display: none !important; }
@media (max-width: 760px) {
  .form-grid { grid-template-columns: 1fr 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .unit-row { grid-template-columns: 1fr 1fr; }
  h1 { font-size: 1.55rem; }
  .tbl td:nth-child(4), .tbl th:nth-child(4) { display: none; }
}
@media (max-width: 420px) { .form-grid { grid-template-columns: 1fr; } .span2 { grid-column: auto; } .qa-row { flex-direction: column; } }
@media print { .top, .tabs, .foot, .actions, #toast { display: none !important; } body { background: #fff; } }
#toast:empty { display: none; }
