/* Ocean Club Funny Money — club stationery palette: navy primary,
   orange-gold accent, steel-gray bar, white ledger area. The logo PNG has
   a transparent background, so a CSS filter renders it white on dark bands.

   Contrast notes (WCAG AA, 4.5:1 body text):
   - White on navy 13.7:1; white on steel 5.2:1 (the email's #6B7B8D gives
     only 4.3:1, hence the slightly deeper #5E6E80).
   - White on the orange is 3.05:1, so orange buttons carry navy text (4.5:1).
   - Orange on navy is 4.5:1, so it works directly as the active-tab mark. */
:root {
  --navy: #1B2A5B;
  --steel: #5E6E80;
  --orange: #CC8422;
  --orange-hover: #B8761C;
  --orange-ink: #9A5F12;    /* orange dark enough for text on white */
  --on-dark: #FFFFFF;
  --on-dark-muted: #C9D0DE;
  --bg: #FFFFFF;
  --subtle: #F5F6F8;
  --line: #D9DDE3;
  --text: var(--navy);
  --muted: #5A6573;
  --credit: #2E6B3F;
  --debit: #A3342B;
  --serif: "Baskerville", "Libre Baskerville", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}

* { box-sizing: border-box; }
/* The hidden attribute must win over component display rules (e.g. inputs
   are display:block), or "hidden" fields show up. */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--text);
  font: 16px/1.5 var(--sans);
}
main { flex: 1; width: 100%; display: flex; flex-direction: column; }
.wrap { width: 100%; max-width: 720px; margin: 0 auto; padding: 0 16px; }
.content { padding-top: 20px; padding-bottom: 32px; }
h1, h2 { font-family: var(--serif); font-weight: 400; color: var(--text); }
h1 { font-size: 1.5rem; margin: 0 0 4px; letter-spacing: .01em; }
h2 { font-size: 1.15rem; margin: 28px 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
a { color: var(--orange-ink); text-underline-offset: 2px; }
.muted { color: var(--muted); margin: 0; font-size: .9rem; }
.error { color: var(--debit); min-height: 1.2em; margin: 4px 0; font-size: .9rem; }
.status { color: var(--credit); min-height: 1.2em; margin: 0; font-size: .9rem; }
.foot { text-align: center; margin: 24px 0 0; font-size: .9rem; }
.logo-white { filter: brightness(0) invert(1); }

/* ---- bands: the header bar and footer are the suite's, in suite.css */

/* ---- controls: square-cornered, flat */
button.link { background: none; border: 0; color: var(--orange-ink); text-decoration: underline; font: inherit; font-size: .9rem; cursor: pointer; padding: 0; }
label { display: block; margin: 12px 0; font-size: .85rem; color: var(--muted); letter-spacing: .02em; }
label.inline { display: flex; gap: 8px; align-items: center; }
/* font-size is set explicitly, not inherited: inputs sit inside <label>s at
   .85rem, which made them 13.6px, and iOS Safari zooms the page into any
   field under 16px. 1rem here is 16px; keep every field at or above it. */
input:not([type=radio]):not([type=checkbox]), select, textarea {
  display: block; width: 100%; margin-top: 4px;
  font: inherit; font-size: max(1rem, 16px); color: var(--text); background: var(--bg);
  border: 1px solid var(--line); border-radius: 2px; padding: 10px 12px;
}
input:focus { outline: none; border-color: var(--orange); }
input:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
button.primary, a.button {
  display: inline-block; font: inherit; font-weight: 700; letter-spacing: .02em; text-decoration: none; text-align: center;
  background: var(--orange); color: var(--navy); border: 0; border-radius: 2px;
  padding: 11px 18px; cursor: pointer; white-space: nowrap;
}
button.primary:hover, a.button.primary:hover { background: var(--orange-hover); }
a.button.ghost { background: transparent; color: var(--on-dark); border: 1px solid var(--on-dark-muted); font-weight: 600; }
a.button.ghost:hover { background: rgba(255, 255, 255, .08); }
button.primary { width: 100%; margin-top: 8px; }
button:disabled { opacity: .6; cursor: default; }

.card { background: var(--bg); border: 1px solid var(--line); border-top: 3px solid var(--navy); padding: 18px 16px; }
.narrow { max-width: 380px; margin: 0 auto; }

/* ---- sign-in: all navy */
.login { flex: 1; background: var(--navy); color: var(--on-dark); padding: 56px 16px 48px; }
.signin-mark { text-align: center; margin: 8px 0 28px; }
.signin-mark img { width: 220px; max-width: 70%; height: auto; }
.login-form { max-width: 340px; margin: 0 auto; }
.login-form label { color: var(--on-dark-muted); }
.login-form input { border-color: transparent !important; }
.login-form .error { color: #FFD0C8; }
/* Powered by GolfWarez (the light lockup, as the brand guide says for navy): small, below the form. */
.powered-by { display: block; width: 132px; margin: 44px auto 0; }
.powered-by img { display: block; width: 100%; height: auto; }

/* ---- ledger: navy dashboard + search, white list */
.panel { background: var(--navy); color: var(--on-dark); padding: 20px 0 16px; }
.total { display: flex; flex-direction: column; align-items: center; text-align: center; }
.total-label { font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--on-dark-muted); }
.total-value {
  font-family: var(--serif); font-size: 2.75rem; line-height: 1.1; margin: 4px 0 2px;
  font-variant-numeric: tabular-nums; overflow-wrap: anywhere;
}
.total-sub { font-size: .85rem; color: var(--on-dark-muted); }
.toolbar { display: flex; gap: 10px; justify-content: center; margin-top: 16px; }
.toolbar .button { flex: 1; max-width: 200px; }
@media (max-width: 599px) {
  .toolbar { flex-wrap: wrap; }
  .toolbar .button { flex: 1 1 0; min-width: 0; max-width: none; }
  .toolbar .button.primary { flex-basis: 100%; }
}

.searchbar { position: sticky; top: 0; z-index: 2; background: var(--navy); padding: 0 0 2px; }
.combo { position: relative; }
.combo input {
  margin-top: 0 !important; font-size: 1.1rem !important;
  padding: 13px 14px !important; border: 0 !important;
}
.combo input:focus { box-shadow: inset 0 -3px 0 var(--orange); }
.suggest {
  position: absolute; left: 0; right: 0; top: 100%; z-index: 3;
  list-style: none; margin: 0; padding: 0; background: var(--bg);
  border: 1px solid var(--line); border-top: 0; max-height: 60vh; overflow-y: auto;
}
.suggest li { display: flex; justify-content: space-between; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--line); cursor: pointer; }
.suggest li[aria-selected=true], .suggest li:hover { background: var(--subtle); box-shadow: inset 3px 0 0 var(--orange); }
.suggest li.empty { color: var(--muted); cursor: default; box-shadow: none; background: none; }
.suggest mark { background: none; color: inherit; font-weight: 700; }

.tabs { display: flex; overflow-x: auto; scrollbar-width: none; }
.tabs button {
  flex: 0 0 auto; font: inherit; font-family: var(--serif); font-size: .95rem;
  background: none; color: var(--on-dark-muted); border: 0; border-bottom: 3px solid transparent;
  padding: 9px 12px; cursor: pointer;
}
.tabs button[aria-pressed=true] { color: var(--on-dark); border-bottom-color: var(--orange); }

ul.members, ul.entries { list-style: none; margin: 0; padding: 0; }
.members li a {
  display: flex; justify-content: space-between; gap: 12px; align-items: center;
  padding: 13px 4px; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none;
}
.members li a:hover { background: var(--subtle); }
.members .tabhead {
  font-family: var(--serif); font-size: .9rem; color: var(--orange-ink); letter-spacing: .08em;
  margin: 18px 0 0; padding: 4px; background: var(--subtle);
}
.members .tabhead:first-child { margin-top: 0; }
.amt { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.amt.neg { color: var(--debit); }
/* With the ledger link display on: the linked auction balance in its own column. */
.members .auc { margin-left: auto; min-width: 6.5em; text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.members.with-auction .amt { min-width: 6.5em; text-align: right; }
.members .colhead { display: flex; gap: 12px; padding: 6px 4px 0; font-size: .8rem; }
.balance .auction-line { display: block; font-family: var(--sans); font-size: .9rem; color: var(--muted); text-align: right; }

/* ---- member */
.back { display: inline-block; margin-bottom: 12px; font-size: .9rem; }
.member-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.also-on { margin-top: 2px; }
.balance { font-family: var(--serif); font-size: 1.8rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.entry-form { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 4px; }
.wallet-actions { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.wallet-actions .row { display: flex; gap: 10px; flex-wrap: wrap; }
.wallet-url { width: 100%; font-size: .85rem; }
.wallet-btn { font: inherit; font-weight: 700; padding: 9px 16px; border-radius: 2px; cursor: pointer; background: var(--orange); color: var(--navy); border: 0; }
.wallet-btn:hover { background: var(--orange-hover); }
.wallet-btn.plain { background: transparent; color: var(--navy); border: 1px solid var(--line); font-weight: 600; }
.kind { display: flex; gap: 20px; margin-top: 8px; }
.kind label { display: flex; gap: 6px; align-items: center; color: var(--text); font-size: 1rem; margin: 6px 0; }
.kind input { accent-color: var(--orange); }
.spaced { margin-top: 20px; }
.card-title { margin: 0 0 4px; padding: 0; border: 0; font-size: 1.25rem; }
.hint { font-size: .8rem; margin-top: 4px; }

/* Directly under "Post entry" so it never sits below a long history. */
.edit-link { text-align: center; margin: 14px 0 0; font-size: .95rem; }
.edit-link a { display: inline-block; padding: 6px 12px; }  /* comfortable tap target */

.entries li {
  padding: 10px 4px; border-bottom: 1px solid var(--line);
  display: grid; grid-template-columns: 1fr auto; gap: 2px 12px;
}
.entries li:nth-child(even) { background: var(--subtle); }
.entries .credit { color: var(--credit); }
.entries .debit { color: var(--debit); }
.entries .note { grid-column: 1 / -1; overflow-wrap: anywhere; }
.entries .meta { font-size: .8rem; color: var(--muted); }
.entries .after { font-size: .8rem; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.entries li.struck .amt { text-decoration: line-through; opacity: .6; }
.entries button.link { color: var(--muted); grid-column: 1 / -1; justify-self: start; font-size: .8rem; }

/* Handicap index badge on the member list */
.members a .hi {
  font-size: .75rem;
  color: var(--muted);
  background: var(--subtle);
  padding: 1px 6px;
  border-radius: 3px;
  margin-left: 8px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.members a .hi + .hi { margin-left: 4px; }
/* Name and badges wrap as a group on narrow screens; the balance stays right. */
.members a .member-name { display: flex; flex-wrap: wrap; align-items: baseline; row-gap: 4px; min-width: 0; }
