/* Thelma's Desk - the sandeman.co.za look (tokens copied from sandeman/site/src/styles/site.css, 2026-10-23).
   Built for a phone first, large type, big tap targets. Mockups: Downloads\Thelma desk mockups (B chosen). */
@font-face { font-family: "Archivo"; src: url(/static/fonts/archivo.woff2) format("woff2"); font-weight: 400 800; font-stretch: 62% 125%; font-display: swap; }
@font-face { font-family: "Geist"; src: url(/static/fonts/geist.woff2) format("woff2"); font-weight: 400 600; font-display: swap; }

:root {
  --paper: #F6F5F2; --card: #fff; --ink: #29292A; --muted: #5B5955; --line: rgba(41, 41, 42, .12); --line-strong: rgba(41, 41, 42, .24);
  --red: #D90000; --red-dark: #B30000; --charcoal: #404040; --good: #1F7A3E; --good-dark: #18632F; --warn: #8A5A00;
  --accent: var(--red); --bg: var(--paper);
  --display: "Archivo", system-ui, sans-serif; --text: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r: 10px; --tabbar: 76px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 18px/1.55 var(--text); -webkit-font-smoothing: antialiased; overflow-x: clip; }
a { color: var(--ink); text-decoration-color: var(--red); text-underline-offset: 3px; }
a:hover { color: var(--red-dark); }
:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }

/* ---------- top bar ---------- */
.bar { position: sticky; top: 0; z-index: 20; background: rgba(246, 245, 242, .96); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.bar__in { max-width: 1100px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 18px; min-height: 64px; }
.bar__logo img { display: block; height: 34px; width: auto; }
.bar nav { display: none; gap: 4px; flex-wrap: wrap; }
.bar nav a { text-decoration: none; font-weight: 500; font-size: 16px; padding: 8px 12px; border-radius: 8px; color: var(--charcoal); }
.bar nav a:hover { background: rgba(41, 41, 42, .06); color: var(--ink); }
.bar nav a.on { color: var(--red); font-weight: 600; }
.avatar { margin-left: auto; width: 46px; height: 46px; border-radius: 50%; border: 1.5px solid var(--line-strong); display: grid; place-items: center;
  font: 700 21px/1 var(--display); text-decoration: none; color: var(--ink); background: var(--card); flex: none; }
@media (min-width: 900px) { .bar nav { display: flex; } }

main { max-width: 1100px; margin: 0 auto; padding: 18px 16px calc(var(--tabbar) + 28px); }
@media (min-width: 900px) { main { padding-bottom: 48px; } }

/* ---------- bottom tab bar (phone) ---------- */
.tabbar { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; background: var(--card); border-top: 1px solid var(--line-strong);
  display: grid; grid-template-columns: repeat(5, 1fr); padding-bottom: env(safe-area-inset-bottom); }
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: var(--tabbar);
  text-decoration: none; color: var(--charcoal); font-size: 15px; font-weight: 500; }
.tabbar svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tabbar a.on { color: var(--red); font-weight: 600; }
@media (min-width: 900px) { .tabbar { display: none; } }

/* ---------- type ---------- */
h1, .h1 { font-family: var(--display); font-variation-settings: "wdth" 70; font-weight: 780; text-transform: uppercase; font-size: clamp(34px, 8vw, 52px);
  line-height: .98; letter-spacing: -.005em; margin: 10px 0 10px; text-wrap: balance; }
h2 { font-family: var(--display); font-variation-settings: "wdth" 78; font-weight: 750; text-transform: uppercase; font-size: 23px; letter-spacing: .01em; margin: 30px 0 12px; line-height: 1.1; }
h3 { font-size: 19px; margin: 18px 0 8px; }
.eyebrow { font-family: var(--display); font-variation-settings: "wdth" 85; font-weight: 700; font-size: 14px; letter-spacing: .14em; text-transform: uppercase; color: var(--red); margin: 0 0 6px; }
.muted, .small { color: var(--muted); font-size: 16px; }
.lede { font-size: 19px; color: var(--muted); margin: 0 0 20px; }

/* ---------- cards, tables, forms (the class names every older template already uses) ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.card, .tile { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; color: inherit; text-decoration: none; display: block; }
a.card:hover, a.card:focus { border-color: var(--line-strong); box-shadow: 0 2px 10px rgba(0, 0, 0, .05); }
.card .big, .big { font-family: var(--display); font-variation-settings: "wdth" 75; font-weight: 800; font-size: 38px; line-height: 1.05; margin: 6px 0; }
table { width: 100%; border-collapse: collapse; background: var(--card); font-size: 16px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: #EFEDE8; font-weight: 600; }
td.num, th.num { text-align: right; white-space: nowrap; }
.scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); }
.totals { display: flex; flex-wrap: wrap; gap: 12px; }
.totals div { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 16px; min-width: 170px; }
.totals b { display: block; font-size: 22px; }
input, select, textarea { font: inherit; font-size: 18px; color: var(--ink); }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=date], input[type=number], input[type=tel], select, textarea {
  padding: 13px 14px; border: 1.5px solid var(--line-strong); border-radius: 8px; background: #fff; max-width: 100%; }
input:focus, select:focus, textarea:focus { border-color: var(--ink); outline: none; }
form.search { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
input[type=search] { flex: 1 1 260px; }
button, .btn { font: inherit; font-weight: 600; font-size: 18px; min-height: 52px; padding: 12px 22px; border: 0; border-radius: 8px; background: var(--red);
  color: #fff; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
button:hover, .btn:hover { background: var(--red-dark); color: #fff; }
.btn--quiet { background: #fff; color: var(--ink); border: 1.5px solid var(--line-strong); }
.btn--quiet:hover { background: #EFEDE8; color: var(--ink); }
.years a { margin-right: 10px; } .years a.on { font-weight: 700; text-decoration: none; color: var(--ink); }
pre.body { white-space: pre-wrap; word-wrap: break-word; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; font: 17px/1.55 var(--text); }
.paid { color: var(--good); } .unpaid { color: var(--warn); }
details > summary { cursor: pointer; }

/* ---------- sign-in pages ---------- */
.signin { max-width: 460px; margin: 0 auto; padding: 28px 16px 40px; min-height: 100vh; display: flex; flex-direction: column; }
.signin__logo img { height: 40px; width: auto; display: block; }
.signin h1 { font-size: clamp(48px, 15vw, 66px); margin: 56px 0 14px; }
.signin .lede { margin-bottom: 26px; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 22px 20px; }
.field { display: block; margin-bottom: 18px; }
.field > span, .field > label > span { display: block; font-weight: 500; margin-bottom: 7px; }
.pw { display: block; }
.field input { width: 100%; min-height: 56px; }
.pw { position: relative; }
.pw input { padding-right: 84px; }
.pw button { position: absolute; right: 6px; top: 6px; min-height: 44px; padding: 6px 12px; background: transparent; color: var(--ink); font-weight: 500; font-size: 17px; }
.pw button:hover { background: #EFEDE8; color: var(--ink); }
.check { display: flex; gap: 12px; align-items: center; margin: 4px 0 20px; font-size: 18px; }
.check input { width: 26px; height: 26px; accent-color: var(--red); flex: none; }
.full { width: 100%; min-height: 58px; font-size: 20px; }
.note-err { background: #FDECEC; border: 1px solid #F3C2C2; color: #8F0000; border-radius: 8px; padding: 12px 14px; margin: 0 0 16px; }
.note-ok { background: #E9F5EC; border: 1px solid #BFE0C8; color: #145226; border-radius: 8px; padding: 12px 14px; margin: 0 0 16px; }
.signin__foot { margin-top: auto; padding-top: 34px; text-align: center; color: var(--muted); }
.signin__foot a { color: var(--muted); }

/* ---------- More page ---------- */
.list { background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.list a, .list button { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 12px; min-height: 62px; padding: 14px 18px;
  font-size: 19px; font-weight: 500; text-decoration: none; color: var(--ink); background: #fff; border: 0; border-top: 1px solid var(--line); border-radius: 0; text-align: left; }
.list > :first-child, .list form:first-child button { border-top: 0; }
.list a:hover, .list button:hover { background: #F3F1EC; color: var(--ink); }
.list a::after { content: "\203A"; font-size: 28px; color: var(--muted); line-height: 1; }

/* fields inside the older pages' <label>Text <input></label> pattern: stack, never wider than the screen */
main label > input[type=text], main label > input[type=email], main label > input[type=search], main label > select { display: block; width: 100%; margin-top: 6px; }
input[type=file] { max-width: 100%; font-size: 16px; }
main td input[type=text], main td input[type=email] { width: 100%; min-width: 0; }

/* radio groups and file pickers (Lettings, Upload) */
fieldset.choice { border: 0; padding: 0; margin: 0 0 18px; display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; }
fieldset.choice legend { font-weight: 500; padding: 0; margin-bottom: 8px; width: 100%; }
fieldset.choice label { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; }
input[type=radio], input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--red); flex: none; }
.files { display: grid; gap: 12px; margin-bottom: 20px; }
.files label { display: grid; gap: 6px; font-weight: 500; }
input[type=file] { padding: 8px; border: 1.5px dashed var(--line-strong); border-radius: 8px; background: #FBFAF8; width: 100%; color: var(--muted); }
input[type=file]::file-selector-button { font: inherit; font-weight: 600; font-size: 16px; margin-right: 12px; padding: 10px 16px; border: 1.5px solid var(--line-strong); border-radius: 8px; background: #fff; color: var(--ink); cursor: pointer; }
input[type=file]::file-selector-button:hover { background: #EFEDE8; }
.card > p:last-child, .card > button:last-child { margin-bottom: 0; }
