/* Fort Lauderdale Guest House: base styles (P1).
   Owners use this on phones, often outdoors: white paper, dark ink, big tap targets (52px+),
   inputs 18px so iPhones don't zoom. One decorative thing: the striped awning at the top.
   P2 and P3 add their own styles in /money/money.css and /texting/texting.css and may use
   every class here. */

:root {
  color-scheme: light;
  --paper: #ffffff;
  --ink: #13302b;          /* text: 13.6:1 on paper */
  --ink-soft: #3e5550;     /* secondary text: 7.9:1 */
  --teal: #0b5d52;         /* actions: 7.6:1, white text on it 7.6:1 */
  --teal-dark: #08443c;
  --awning: #f2c230;       /* the awning stripes only, never text */
  --rule: #c5d3cf;
  --field: #5f7772;        /* input borders: 4.9:1 */
  --wash: #eef4f2;
  --red: #b3261e;          /* overdue: white on it 6.6:1 */
  --red-wash: #fdecea;
  --ok-wash: #e4f1ec;
  --condensed: "Avenir Next Condensed", "Roboto Condensed", sans-serif-condensed, "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --tap: 52px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.125rem;
  line-height: 1.5;
}

h1, h2, h3 {
  font-family: var(--condensed);
  font-weight: 700;
  line-height: 1.1;
  color: var(--teal-dark);
  margin: 0 0 0.75rem;
}
h1 { font-size: 2.25rem; }
h2 { font-size: 1.625rem; margin-top: 2rem; }
h3 { font-size: 1.3rem; margin-top: 1.5rem; }
p { margin: 0 0 1rem; }

a { color: var(--teal); font-weight: 600; text-underline-offset: 0.18em; }
a:hover { color: var(--teal-dark); }

:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 1rem; top: 1rem; z-index: 10; background: var(--paper); padding: 0.75rem 1rem; }

/* ---------- the awning: teal rod, yellow and white stripes, scalloped edge ---------- */
.awning {
  position: relative;
  height: 16px;
  border-top: 4px solid var(--teal);
  background: repeating-linear-gradient(90deg, var(--awning) 0 24px, var(--paper) 24px 48px);
}
.awning::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 12px;
  background: repeating-linear-gradient(90deg, var(--awning) 0 24px, var(--paper) 24px 48px);
  -webkit-mask: radial-gradient(circle 12px at 12px 0, #000 11.5px, transparent 12px) 0 0 / 24px 12px repeat-x;
  mask: radial-gradient(circle 12px at 12px 0, #000 11.5px, transparent 12px) 0 0 / 24px 12px repeat-x;
}
.site .awning { height: 26px; }

/* ---------- public pages ---------- */
.site-bar-row { padding: 1.5rem 1.25rem 0; max-width: 40rem; margin: 0 auto; }
.wordmark {
  font-family: var(--condensed);
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--teal-dark);
  text-decoration: none;
  line-height: 1.1;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.wordmark.small { font-size: 1.3rem; }

.site-main { max-width: 40rem; margin: 0 auto; padding: 1.5rem 1.25rem 2rem; }

.hero { padding: 1.5rem 0 1rem; }
.hero-title {
  font-size: clamp(2.6rem, 13vw, 4.25rem);
  line-height: 0.95;
  letter-spacing: -0.01em;
  margin: 0 0 1.25rem;
  max-width: 11ch;
}
.lede { font-size: 1.25rem; color: var(--ink); max-width: 34rem; }

.prose { max-width: 36rem; }
.prose ul, .prose ol { padding-left: 1.4rem; margin: 0 0 1rem; }
.prose li { margin: 0.5rem 0; }
.callout {
  font-size: 1.375rem;
  font-weight: 700;
  border-left: 6px solid var(--awning);
  padding: 0.5rem 0 0.5rem 1rem;
}

ol.steps { padding-left: 1.75rem; }
ol.steps li { padding-left: 0.25rem; }
ol.steps li::marker { color: var(--teal); font-weight: 800; font-family: var(--condensed); font-size: 1.25rem; }

.panel { max-width: 28rem; }
.aside { margin-top: 1.25rem; }
/* Standalone links under a form ("Forgot your password?", "Back to login"): a 44px tap target (P4). */
.aside a { display: inline-flex; align-items: center; min-height: 44px; }

.site-footer {
  max-width: 40rem;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 2.5rem;
  border-top: 2px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.5rem;
}
.site-footer a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink-soft); }

/* ---------- the app shell ---------- */
.app-bar-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1rem 0.25rem;
  max-width: 48rem;
  margin: 0 auto;
}
.app-bar-row .who { margin-left: auto; color: var(--ink-soft); font-size: 0.95rem; text-align: right; }
.logout { margin: 0; }

.app-main {
  max-width: 48rem;
  margin: 0 auto;
  padding: 0.75rem 1rem calc(96px + env(safe-area-inset-bottom));
}
.page-title { font-size: 2rem; margin-top: 0.5rem; }

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  background: var(--paper);
  border-top: 2px solid var(--rule);
  padding-bottom: env(safe-area-inset-bottom);
}
.nav-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 64px;
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 700;
  border-top: 4px solid transparent;
}
.nav-item svg { fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.nav-label { font-size: 0.875rem; }
/* Six tabs (with Metrics, Jon 2026-12-03): slightly smaller labels so they fit a phone. */
.bottom-nav:has(> .nav-item:nth-child(6)) .nav-label { font-size: 0.78rem; }
/* Seven tabs (the admin, with Cash, 2026-12-03): smaller again so Calendar and Settings fit a phone. */
.bottom-nav:has(> .nav-item:nth-child(7)) .nav-label { font-size: 0.7rem; letter-spacing: -0.01em; }
@media (max-width: 359px) { .bottom-nav:has(> .nav-item:nth-child(7)) .nav-label { font-size: 0.64rem; } }
.nav-item.current { color: var(--teal-dark); border-top-color: var(--teal); }
.nav-item .badge { position: absolute; top: 6px; left: calc(50% + 6px); }

.dev-clock {
  margin: 0;
  padding: 0.5rem 1rem;
  background: #fff3c4;
  border-bottom: 2px solid var(--awning);
  font-size: 0.95rem;
}

/* ---------- shared pieces P2 and P3 can use ---------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  padding: 0 1.25rem;
  border: 2px solid var(--teal);
  border-radius: 10px;
  background: var(--paper);
  color: var(--teal);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.button:hover { background: var(--wash); color: var(--teal-dark); }
.button.primary { background: var(--teal); color: #fff; }
.button.primary:hover { background: var(--teal-dark); border-color: var(--teal-dark); }
.button.danger { border-color: var(--red); color: var(--red); }
.button.danger.primary { background: var(--red); color: #fff; }
.button.big { min-height: 64px; font-size: 1.25rem; }
.button[disabled] { opacity: 0.6; cursor: default; }

.link-button {
  background: none;
  border: 0;
  padding: 0 0.25rem;
  min-height: 44px;
  color: var(--teal);
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.18em;
  cursor: pointer;
}

.stack { display: flex; flex-direction: column; align-items: stretch; }
.stack > label { font-weight: 700; margin-top: 1rem; margin-bottom: 0.35rem; }
.stack > label:first-child { margin-top: 0; }
.stack > .button { margin-top: 1.5rem; }
.stack .check { display: flex; gap: 0.75rem; align-items: center; font-weight: 400; min-height: 44px; }

input:not([type="checkbox"]):not([type="radio"]), select, textarea {
  width: 100%;
  min-height: var(--tap);
  padding: 0.6rem 0.85rem;
  border: 2px solid var(--field);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 1.125rem;
}
textarea { min-height: 8rem; line-height: 1.4; }
input:focus, select:focus, textarea:focus { outline: 3px solid var(--teal); outline-offset: 1px; border-color: var(--teal); }
input[type="checkbox"], input[type="radio"] { width: 26px; height: 26px; accent-color: var(--teal); }

.hint { color: var(--ink-soft); font-size: 0.95rem; margin: 0.35rem 0 0; }

.flash, .form-error {
  padding: 0.85rem 1rem;
  border-left: 6px solid var(--teal);
  background: var(--ok-wash);
  border-radius: 4px;
  margin: 0 0 1.25rem;
}
.flash-error, .form-error { border-left-color: var(--red); background: var(--red-wash); color: #5c1410; font-weight: 600; }

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 11px;
  background: var(--red);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1;
}

.overdue { color: var(--red); }
.amount { font-variant-numeric: tabular-nums; font-weight: 700; }
.placeholder { color: var(--ink-soft); background: var(--wash); padding: 0.85rem 1rem; border-radius: 6px; }

.facts { display: grid; grid-template-columns: 1fr; gap: 0.15rem 1rem; margin: 0 0 1.25rem; }
.facts dt { color: var(--ink-soft); font-size: 0.95rem; }
.facts dd { margin: 0 0 0.6rem; font-weight: 700; overflow-wrap: anywhere; }
/* A link that is the whole value (a guest's cell phone): a 44px tap target (P4). */
.facts dd > a:only-child { display: inline-flex; align-items: center; min-height: 44px; }
@media (min-width: 40rem) {
  .facts { grid-template-columns: max-content 1fr; }
  .facts dd { margin: 0; }
}

.settings-section { border-top: 2px solid var(--rule); margin-top: 1.75rem; padding-top: 0.25rem; }
.settings-section:first-of-type { border-top: 0; margin-top: 0; padding-top: 0; }
.settings-section:first-of-type > h2 { margin-top: 0.5rem; }

.cf-turnstile { margin: 1.25rem 0 0; min-height: 65px; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 0.6rem 0.5rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { font-size: 0.95rem; color: var(--ink-soft); }

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

/* ---------- admin screens (P4): People, the activity log, the Telnyx check ---------- */
.admin-links { list-style: none; margin: 0; padding: 0; }
.admin-links li { margin: 0 0 1.25rem; }

.people-list { list-style: none; margin: 0 0 1rem; padding: 0; }
.person-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--rule);
}
.person-main { display: flex; flex-direction: column; min-width: 0; flex: 1 1 12rem; }
.person-name { font-size: 1.15rem; display: inline-flex; align-items: center; min-height: 44px; overflow-wrap: anywhere; }
.person-meta { color: var(--ink-soft); font-size: 0.95rem; overflow-wrap: anywhere; }

.log-filters { margin: 0 0 1rem; }
.log-filters > summary { list-style: none; }
.log-filters > summary::-webkit-details-marker { display: none; }
.log-filters[open] > summary { margin-bottom: 0.75rem; }
.log-count { color: var(--ink-soft); font-size: 0.95rem; }
.log-list { list-style: none; margin: 0; padding: 0; }
.log-entry { border-bottom: 1px solid var(--rule); padding: 0.75rem 0; overflow-wrap: anywhere; }
.log-entry p { margin: 0 0 0.25rem; }
.log-head time { color: var(--ink-soft); font-size: 0.95rem; }
.log-action { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.95rem; }
.log-who { font-weight: 700; }
.log-entity { font-weight: 400; color: var(--ink-soft); }
.log-detail { white-space: pre-wrap; background: var(--wash); border-radius: 6px; padding: 0.5rem 0.75rem; font-size: 1rem; }
.log-status { font-weight: 700; color: var(--teal-dark); }
.log-status.failed { color: var(--red); }
.log-changes { display: grid; grid-template-columns: minmax(0, max-content) minmax(0, 1fr); gap: 0.15rem 0.75rem; margin: 0.35rem 0 0; font-size: 0.95rem; }
.log-changes dt { color: var(--ink-soft); }
.log-changes dd { margin: 0; }
.log-old { text-decoration: line-through; color: var(--ink-soft); }
.log-pages { display: flex; gap: 0.75rem; margin: 1.25rem 0; }

.setup-checks { list-style: none; margin: 0; padding: 0; }
.setup-check { display: flex; flex-direction: column; padding: 0.75rem 0; border-bottom: 1px solid var(--rule); overflow-wrap: anywhere; }
.setup-label { color: var(--ink-soft); font-size: 0.95rem; }
.setup-check.bad { border-left: 6px solid var(--red); padding-left: 0.75rem; background: var(--red-wash); }
.setup-why { margin-top: 0.25rem; }
.tag-bad { background: var(--red); color: #fff; }
/* P4: the Messages tab while texting is under construction. */
.nav-item.on-hold { opacity: 0.45; }
