/* Owner login and owner portal. Colours, nav and footer match membership.html. */
:root {
  --lake-deep: #173f57;
  --lake: #1d5a74;
  --sun: #e9b44c;
  --accent: #bc4636;
  --bg: #fdfcf9;
  --surface: #ffffff;
  --tint: #f2eee2;
  --ink: #22303a;
  --ink-soft: #4d5d68;
  --line: #ddd5c0;
  --ok: #2f6b3a;
  --shadow: 0 10px 30px rgba(23, 63, 87, 0.14);
}
@media (prefers-color-scheme: dark) {
  :root {
    --lake-deep: #0f2c3f;
    --lake: #7fb3c8;
    --accent: #e08a7a;
    --bg: #131a1f;
    --surface: #1c262e;
    --tint: #1a232a;
    --ink: #e9eef1;
    --ink-soft: #b6c3cb;
    --line: #33424d;
    --ok: #8fd19e;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  }
}
* { box-sizing: border-box; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  font-family: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg); color: var(--ink); line-height: 1.6; font-size: 1.05rem;
}
h1, h2, h3 { font-family: "Bitter", Georgia, serif; line-height: 1.2; margin: 0; }
a { color: var(--lake); }
[hidden] { display: none !important; }

/* Nav (same as the other pages) */
.nav { position: sticky; top: 0; z-index: 40; background: var(--lake-deep); color: #fff; }
.nav-inner { max-width: 1100px; margin: 0 auto; padding: 0 1.25rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 3.5rem; }
.brand { font-family: "Bitter", Georgia, serif; font-weight: 800; font-size: 1.15rem; color: #fff; text-decoration: none; padding: 0.5rem 0; }
.brand span { color: var(--sun); }
.nav-links { display: flex; gap: 0.25rem; flex-wrap: wrap; }
.nav-links a { color: #eaf3f7; text-decoration: none; font-weight: 600; font-size: 0.98rem; padding: 0.6rem 0.8rem; min-height: 2.75rem; display: inline-flex; align-items: center; border-radius: 0.4rem; }
.nav-links a:hover, .nav-links a:focus-visible, .nav-links a[aria-current="page"] { background: rgba(255,255,255,0.14); }
@media (max-width: 560px) {
  .nav-inner { flex-direction: column; align-items: flex-start; gap: 0; padding-bottom: 0.4rem; }
  .nav-links { gap: 0; }
  .nav-links a { font-size: 0.92rem; padding: 0.55rem 0.5rem; white-space: nowrap; }
}

main { flex: 1; width: 100%; max-width: 1000px; margin: 0 auto; padding: 2.25rem 1.25rem 3rem; }
.kicker { color: var(--accent); font-weight: 700; font-size: 0.9rem; letter-spacing: 0.08em; text-transform: uppercase; margin: 0 0 0.4rem; }
h1 { color: var(--lake-deep); font-size: clamp(1.7rem, 4vw, 2.3rem); margin-bottom: 0.5rem; }
h2 { color: var(--lake-deep); font-size: 1.35rem; margin: 2.25rem 0 0.9rem; }
@media (prefers-color-scheme: dark) { h1, h2 { color: var(--lake); } }
p { margin: 0 0 1rem; }
.muted { color: var(--ink-soft); }

/* Cards and forms */
.card { background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--sun); border-radius: 0.8rem; padding: 1.75rem 1.6rem; box-shadow: var(--shadow); }
.login-card { max-width: 27rem; margin: 0 auto; }
form { display: grid; gap: 1rem; }
label { display: grid; gap: 0.3rem; font-weight: 600; }
label small { font-weight: 400; color: var(--ink-soft); }
input, select, textarea {
  font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line);
  border-radius: 0.5rem; padding: 0.65rem 0.8rem; min-height: 2.75rem; width: 100%;
}
textarea { resize: vertical; }
input[readonly] { background: var(--tint); color: var(--ink-soft); }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }
button {
  font: inherit; font-weight: 700; cursor: pointer; border: 0; border-radius: 0.55rem;
  padding: 0.7rem 1.2rem; min-height: 2.75rem; background: var(--lake-deep); color: #fff;
}
button:hover { background: var(--lake); }
@media (prefers-color-scheme: dark) { button { background: var(--sun); color: #131a1f; } button:hover { background: #f3cd7d; } }
button.secondary { background: transparent; color: var(--lake); border: 1px solid var(--line); }
button.danger { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
button.link { background: none; color: var(--lake); padding: 0.25rem 0; min-height: 0; font-weight: 600; text-decoration: underline; }
button[disabled] { opacity: 0.6; cursor: wait; }
.links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem; margin-top: 1rem; }
/* Google's sign-in button: white with the G mark, per Google's branding guidance. */
button.google { display: flex; align-items: center; justify-content: center; gap: 0.6rem; width: 100%; background: #fff; color: #1f1f1f; border: 1px solid #747775; font-weight: 600; }
button.google:hover { background: #f2f2f2; }
@media (prefers-color-scheme: dark) { button.google { background: #131314; color: #e3e3e3; border-color: #8e918f; } button.google:hover { background: #1f1f20; } }
.prose { max-width: 46rem; margin: 0 auto; line-height: 1.6; }
.prose h2 { color: var(--lake-deep); font-size: 1.3rem; margin: 1.6rem 0 0.4rem; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin: 0.45rem 0; }
button.facebook { display: flex; align-items: center; justify-content: center; gap: 0.6rem; width: 100%; margin-top: 0.6rem; background: #1877f2; color: #fff; border: 1px solid #1877f2; font-weight: 600; }
button.facebook:hover { background: #166fe5; }
.or { display: flex; align-items: center; gap: 0.75rem; margin: 1.1rem 0 0.4rem; color: var(--muted, #667); font-size: 0.9rem; }
.or::before, .or::after { content: ''; flex: 1; border-top: 1px solid var(--line); }
.message { border-radius: 0.5rem; padding: 0.7rem 0.9rem; margin: 0 0 1rem; }
.message.error { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--ink); border-left: 4px solid var(--accent); }
.message.info { background: var(--tint); border-left: 4px solid var(--lake); }

/* Portal */
.tabs { display: flex; gap: 0.25rem; margin-top: 1.5rem; border-bottom: 2px solid var(--line); }
.tabs [role="tab"] { background: none; color: var(--lake); border: 0; border-bottom: 3px solid transparent; border-radius: 0; margin-bottom: -2px; padding: 0.6rem 1.1rem; }
.tabs [role="tab"]:hover { background: none; color: var(--lake-deep); }
.tabs [role="tab"][aria-selected="true"] { color: var(--lake-deep); border-bottom-color: var(--sun); }
.tabs .count { display: inline-block; min-width: 1.4em; margin-left: 0.35rem; padding: 0 0.4em; border-radius: 999px; background: var(--accent); color: #fff; font-size: 0.8rem; line-height: 1.4; text-align: center; }
.tabs .count[hidden] { display: none; }
.top { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1rem; margin-top: 1.5rem; }
.stat { background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--sun); border-radius: 0.7rem; padding: 1rem 1.2rem; box-shadow: var(--shadow); }
.stat .label { color: var(--ink-soft); font-weight: 600; font-size: 0.95rem; }
.stat .value { font-family: "Bitter", Georgia, serif; font-size: 2.1rem; font-weight: 800; letter-spacing: 0.02em; }
.stat .value.ok { color: var(--ok); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 0.7rem; background: var(--surface); }
/* "Message the board" */
.board-form { display: grid; gap: 1rem; max-width: 46rem; }
.board-form p { margin: 0; }
.board-form .sent { color: var(--ok); font-weight: 600; }
.board-form .failed { color: var(--accent); font-weight: 600; }
/* "Where your lots are": aerial photo with traced lot lines; the owner's lots in sun yellow */
.lot-map { margin: 0; }
.lot-map-canvas { width: 100%; height: min(72vh, 40rem); background: #24402c; border-radius: 0.7rem; box-shadow: var(--shadow); z-index: 0; }
.lot-map .lot { fill: rgba(255, 255, 255, 0.06); stroke: rgba(255, 255, 255, 0.85); stroke-width: 2; }
.lot-map .lot.mine { fill: rgba(233, 180, 76, 0.42); stroke: var(--sun); stroke-width: 4; }
.lot-map .leaflet-tooltip.lot-label { background: none; border: 0; box-shadow: none; padding: 0; color: #fff; font: 700 15px "Source Sans 3", system-ui, sans-serif; text-shadow: 0 0 3px rgba(0, 0, 0, 0.9), 0 0 1px #000; }
.lot-map .leaflet-tooltip.lot-label.mine { font-size: 22px; }
.lot-map .leaflet-tooltip.lot-label::before { display: none; }
.lot-map .far .leaflet-tooltip.lot-label:not(.mine) { display: none; }
.lot-map button { margin-top: 0.75rem; }
.lot-map figcaption { margin-top: 0.5rem; font-size: 0.92rem; }
table { border-collapse: collapse; width: 100%; font-size: 0.98rem; }
th, td { text-align: left; padding: 0.6rem 0.8rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--tint); font-weight: 700; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; white-space: nowrap; }
.filter { max-width: 22rem; margin-bottom: 0.75rem; }
.requests { display: grid; gap: 1rem; }
.request dl { display: grid; grid-template-columns: max-content 1fr; gap: 0.2rem 1rem; margin: 0 0 1rem; }
.request dt { font-weight: 700; color: var(--ink-soft); }
.request dd { margin: 0; overflow-wrap: anywhere; }
.request .actions { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: end; }
.request .actions label { flex: 1 1 16rem; }
td button.link { display: block; text-align: left; font-size: inherit; }

/* Owner contact window */
.owner-dialog { width: min(32rem, calc(100vw - 2rem)); color: var(--ink); }
.owner-dialog::backdrop { background: rgba(15, 30, 40, 0.55); }
.owner-dialog h2 { margin: 0 0 0.3rem; }
.owner-dialog dl { display: grid; grid-template-columns: max-content 1fr; gap: 0.4rem 1rem; margin: 0 0 1.25rem; }
.owner-dialog dt { font-weight: 700; color: var(--ink-soft); }
.owner-dialog dd { margin: 0; overflow-wrap: anywhere; white-space: pre-line; }
.owner-dialog .actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.owner-dialog .message { margin-top: 0.5rem; }

footer { background: var(--lake-deep); color: #cfe0e9; }
.footer-inner { max-width: 1100px; margin: 0 auto; padding: 2rem 1.25rem 2.4rem; text-align: center; }
.footer-inner .name { font-family: "Bitter", Georgia, serif; font-weight: 700; color: #fff; font-size: 1.15rem; margin: 0; }
.footer-inner p { margin: 0.35rem 0 0; font-size: 0.97rem; }
.footer-inner a { color: #fff; }
.footer-sun { width: 54px; height: 4px; border-radius: 2px; background: var(--sun); margin: 0 auto 1rem; }
