/* Frontier Church brand: Lato Black Italic caps headings, gold #DBA510, black & white.
   Body face stands in for the site's Proxima Nova (Typekit) with Montserrat (OFL). */
@font-face { font-family: "Lato"; font-style: italic; font-weight: 900; font-display: swap;
  src: url("fonts/lato-900i.woff2") format("woff2"); }
@font-face { font-family: "Lato"; font-style: normal; font-weight: 900; font-display: swap;
  src: url("fonts/lato-900.woff2") format("woff2"); }
@font-face { font-family: "Lato"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("fonts/lato-700.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("fonts/montserrat.woff2") format("woff2"); }

:root {
  --head: "Lato", "Segoe UI", system-ui, sans-serif;
  --body: "Montserrat", "Segoe UI", system-ui, sans-serif;
  --gold: #dba510; --gold-ink: #8a6400;          /* gold-ink = gold dark enough for text on white */
  --bg: #f4f3f0; --panel: #ffffff; --ink: #111111; --muted: #6a6a6a; --line: #e4e2dd;
  --side: #0b0b0b; --side-ink: #b9b9b9; --side-on: #ffffff;
  --accent: var(--gold); --link: var(--gold-ink); --on-accent: #111111;
  --hero: #0b0b0b; --hero-ink: #ffffff;
  --c1: #dba510; --c2: #111111; --c3: #9a9a9a;   /* chart: QuickBooks gold, budget black, card grey */
  --ok: #1d8a5e; --watch: #c8630f; --over: #c62f2f;
  --ok-bg: #e3f3ea; --watch-bg: #fbeadb; --over-bg: #fbe4e4; --none-bg: #ebe9e4;
  --radius: 4px; --shadow: 0 1px 2px rgba(0,0,0,.04);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f0f0f; --panel: #181818; --ink: #f1f1f1; --muted: #9a9a9a; --line: #2a2a2a;
    --side: #000000; --hero: #000000; --link: var(--gold);
    --c1: #e3b22d; --c2: #f1f1f1; --c3: #6f6f6f;
    --ok: #41c08b; --watch: #f0933f; --over: #f06464;
    --ok-bg: #12301f; --watch-bg: #3a2512; --over-bg: #3b1717; --none-bg: #262626;
    --shadow: none;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 500 14px/1.55 var(--body); color: var(--ink); background: var(--bg);
  display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
a { color: var(--link); text-decoration: none; font-weight: 600; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, .kpi .label, .t tr.group td, .navlabel {
  font-family: var(--head); font-style: italic; font-weight: 900; text-transform: uppercase; }
h1 { font-size: 40px; line-height: 1.05; margin: 0 0 6px; letter-spacing: .05em; }
h2 { font-size: 16px; margin: 0; letter-spacing: .05em; }
.muted { color: var(--muted); } .tiny { font-size: 12px; } .b { font-weight: 700; }
.neg { color: var(--over); } .warn { color: var(--watch); } .nowrap { white-space: nowrap; }

/* sidebar */
.side { background: var(--side); color: var(--side-ink); padding: 26px 16px 18px; position: sticky; top: 0;
  height: 100vh; display: flex; flex-direction: column; gap: 26px; }
.brand { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; color: inherit; }
.brand:hover { text-decoration: none; }
.brand img { width: 108px; height: auto; filter: invert(1); }
.brand b { color: var(--side-on); display: block; font: italic 900 15px/1.2 var(--head); text-transform: uppercase;
  letter-spacing: .12em; }
.brand small { display: block; margin-top: 3px; font-size: 11px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--gold); font-weight: 600; }
nav { display: flex; flex-direction: column; gap: 2px; }
nav a { color: var(--side-ink); padding: 9px 12px 9px 14px; font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .14em; border-left: 3px solid transparent; }
nav a:hover { color: var(--side-on); text-decoration: none; background: rgba(255,255,255,.04); }
nav a.on { color: var(--side-on); border-left-color: var(--gold); background: rgba(219,165,16,.1); }
.navlabel { font-size: 11px; letter-spacing: .14em; margin: 16px 14px 4px; color: var(--gold); }
.sync { margin-top: auto; font-size: 12px; padding: 14px; border: 1px solid rgba(255,255,255,.1);
  display: flex; flex-direction: column; gap: 6px; }
.sync b { color: var(--side-on); }
.sync .muted { color: #8a8a8a; }

main { min-width: 0; display: flex; flex-direction: column; gap: 20px; padding: 0 34px 60px; }

/* page header: black band like the church site's page banners */
.top { background: var(--hero); color: var(--hero-ink); margin: 0 -34px 6px; padding: 38px 34px 30px;
  display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; flex-wrap: wrap;
  border-bottom: 4px solid var(--gold); }
.top p { margin: 0; color: #c9c9c9; font-weight: 600; }
.top .muted { color: #c9c9c9; }
.top .back { color: var(--gold); font-size: 12px; text-transform: uppercase; letter-spacing: .14em; display: inline-block; margin-bottom: 8px; }
.top .picker label { color: #c9c9c9; }
.top select { background: #1b1b1b; color: #fff; border-color: #3a3a3a; }

/* controls */
.btn { background: var(--accent); color: var(--on-accent); border: 0; border-radius: 2px; padding: 10px 16px; font: inherit;
  font-weight: 700; text-transform: uppercase; letter-spacing: .1em; font-size: 12px; cursor: pointer; display: inline-block; }
.btn:hover { filter: brightness(1.08); text-decoration: none; }
.btn.small { padding: 7px 12px; font-size: 11px; } .btn:disabled { opacity: .55; cursor: default; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
select, input[type=search] { font: inherit; color: var(--ink); background: var(--panel); border: 1px solid var(--line);
  border-radius: 2px; padding: 8px 10px; }
select:focus, input:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.picker label { font-size: 12px; color: var(--muted); display: flex; gap: 8px; align-items: center;
  text-transform: uppercase; letter-spacing: .12em; font-weight: 600; }
.toolbar { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.toolbar input[type=search] { min-width: 260px; }
.chk { display: flex; gap: 6px; align-items: center; color: var(--muted); font-size: 13px; }
.chk input { accent-color: var(--gold); }
.notice { background: var(--ok-bg); color: var(--ok); padding: 10px 14px; border-left: 4px solid var(--ok); font-weight: 600; }
.actions { display: flex; gap: 14px; align-items: center; margin-top: 14px; }

/* cards & KPIs */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px;
  box-shadow: var(--shadow); min-width: 0; overflow-x: auto; }
.card-h { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px;
  flex-wrap: wrap; padding-bottom: 10px; border-bottom: 2px solid var(--ink); }
.card-h .muted { font-size: 12px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-top: 4px solid var(--gold); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 4px; }
.kpi .label { font-size: 13px; letter-spacing: .08em; }
.kpi .value { font: 800 30px/1.15 var(--body); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi .sub { font-size: 13px; color: var(--muted); } .kpi .sub.over { color: var(--over); } .kpi .sub.watch { color: var(--watch); }
.link { color: var(--link); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid2.wide-left { grid-template-columns: 2fr 1fr; }
.chart { position: relative; height: 300px; } .chart.short { height: 230px; }

/* bars */
.bar, .mini { background: var(--none-bg); border-radius: 0; overflow: hidden; }
.bar { height: 8px; margin: 6px 0 2px; } .mini { height: 6px; width: 90px; display: inline-block; vertical-align: middle; margin-right: 6px; }
.bar span, .mini span { display: block; height: 100%; background: var(--ok); }
.watch > span { background: var(--watch); } .over > span { background: var(--over); } .none > span { background: var(--muted); }

/* tables */
.t { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 13px; }
.t th { text-align: left; font-size: 11px; color: var(--muted); font-weight: 700; padding: 8px 8px; text-transform: uppercase;
  letter-spacing: .05em; border-bottom: 1px solid var(--line); white-space: nowrap; position: sticky; top: 0; background: var(--panel); }
.t td { padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.t .r { text-align: right; }
.t tr.click { cursor: pointer; } .t tr.click:hover td { background: rgba(219,165,16,.09); }
.t tr.sel td { background: rgba(219,165,16,.14); }
.t tr.group td { font-size: 14px; letter-spacing: .08em; color: var(--ink); padding-top: 22px; border-bottom: 2px solid var(--gold); }
.t tr.total td { font-weight: 800; border-top: 2px solid var(--ink); border-bottom: 0; }
.t tr.over td:first-child { box-shadow: inset 3px 0 var(--over); }
.t tr.parent td { font-weight: 700; background: rgba(127,127,127,.05); }
.t th.w { width: 130px; }
.t .mini { width: 70px; }
.t .memo { color: var(--muted); max-width: 380px; }
.only-over tbody tr.row:not(.over) { display: none; }
.hidden { display: none; }
.empty { color: var(--muted); padding: 10px 0; }
.pill { display: inline-block; font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 2px; background: var(--none-bg); color: var(--muted); }
.pill.ok { background: var(--ok-bg); color: var(--ok); } .pill.watch { background: var(--watch-bg); color: var(--watch); }
.pill.over { background: var(--over-bg); color: var(--over); margin-left: 6px; }
.src { font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 2px; text-transform: uppercase; letter-spacing: .08em; }
.src.qbo { background: rgba(219,165,16,.18); color: var(--link); } .src.se { background: var(--none-bg); color: var(--ink); }

/* S&E budget tiles */
.budgets { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.sebudget { border: 1px solid var(--line); border-left: 3px solid var(--gold); padding: 12px 14px; }
.sebudget .row1, .sebudget .row2 { display: flex; justify-content: space-between; gap: 8px; }
.sebudget .row2 { font-variant-numeric: tabular-nums; margin-top: 4px; }

/* data checks */
.checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.checks li { display: flex; gap: 14px; padding: 12px 4px; border-bottom: 1px solid var(--line); }
.checks li:last-child { border-bottom: 0; }
.dot { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; flex: none; }
.checks .ok .dot { background: var(--ok-bg); color: var(--ok); } .checks .bad .dot { background: var(--watch-bg); color: var(--watch); }

@media (max-width: 1000px) {
  body { grid-template-columns: 1fr; }
  .side { position: static; height: auto; padding: 18px 16px; gap: 16px; }
  .brand { flex-direction: row; text-align: left; } .brand img { width: 56px; }
  nav { flex-direction: row; flex-wrap: wrap; } .navlabel { display: none; }
  .grid2, .grid2.wide-left { grid-template-columns: 1fr; }
  main { padding: 0 16px 40px; }
  .top { margin: 0 -16px 4px; padding: 26px 16px 22px; }
  h1 { font-size: 30px; }
  .card { overflow-x: auto; }
}

/* ---- overview: status tiles, insights, attention cards ---- */
.status { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-top: 4px solid var(--muted); padding: 16px 18px;
  border-radius: var(--radius); display: flex; flex-direction: column; gap: 6px; }
.stat.ok { border-top-color: var(--ok); } .stat.watch { border-top-color: var(--watch); } .stat.over { border-top-color: var(--over); }
.stat .label { font: italic 900 13px var(--head); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.stat .word { font: italic 900 26px/1.1 var(--head); text-transform: uppercase; letter-spacing: .03em; }
.stat.ok .word { color: var(--ok); } .stat.watch .word { color: var(--watch); } .stat.over .word { color: var(--over); }
.stat .sub { font-size: 13px; color: var(--muted); }
.pace { height: 8px; background: var(--none-bg); position: relative; }
.pace span { display: block; height: 100%; background: currentColor; }
.stat.ok .pace { color: var(--ok); } .stat.watch .pace { color: var(--watch); } .stat.over .pace { color: var(--over); }
.lead { margin: -6px 0 12px; }
.key { display: inline-block; width: 10px; height: 10px; margin: 0 4px 0 8px; vertical-align: -1px; }
.key.ok { background: var(--ok); } .key.watch { background: var(--watch); } .key.over { background: var(--over); }
.chart.sankey { height: 440px; }

.insights { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 24px; }
.insights li { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 10px 0 10px 14px;
  border-left: 4px solid var(--c3); }
.insights li.good { border-left-color: var(--ok); } .insights li.watch { border-left-color: var(--watch); }
.insights li.bad { border-left-color: var(--over); } .insights li.info { border-left-color: var(--gold); }
.insights b { font-weight: 700; } .insights p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.insights .go { white-space: nowrap; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }

.attention { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.att { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border: 1px solid var(--line);
  border-left: 4px solid var(--over); color: var(--ink); font-weight: 500; }
.att:hover { text-decoration: none; background: rgba(219,165,16,.07); }
.att-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.att .pill.over { margin-left: 0; }
.vs { position: relative; height: 10px; background: var(--none-bg); margin: 6px 0 2px; }
.vs-b { position: absolute; left: 0; top: 0; bottom: 0; width: 50%; border-right: 2px solid var(--ink); }
.vs-a { position: absolute; left: 0; top: 2px; bottom: 2px; background: var(--over); opacity: .85; }

@media (max-width: 1000px) {
  .status, .insights { grid-template-columns: 1fr; }
}
.sub-h { font: 700 13px var(--body); margin: 4px 0 8px; text-transform: none; }

/* combined QuickBooks card entries, broken down into their card charges */
details.parts { margin-top: 4px; }
details.parts summary { cursor: pointer; color: var(--link); font-size: 12px; font-weight: 600; list-style: none; }
details.parts summary::-webkit-details-marker { display: none; }
details.parts summary::before { content: "▸ "; }
details.parts[open] summary::before { content: "▾ "; }
details.parts table { width: 100%; margin-top: 4px; border-collapse: collapse; font-size: 12px; }
details.parts td { padding: 2px 8px 2px 0; border: 0; }
details.parts td.r { text-align: right; padding-right: 0; }
.t tr.part td { border-top: 0; padding-top: 2px; padding-bottom: 2px; font-size: 12px; }
.t tr.combo td { padding-top: 12px; }

/* chart details strip used on phones instead of a tooltip over the bars */
.readout { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 14px; min-height: 54px; align-content: flex-start;
  margin: 0 0 8px; padding: 6px 10px; border-left: 3px solid var(--gold); background: var(--bg, transparent);
  font-size: 13px; line-height: 1.5; }
.readout b { width: 100%; font-weight: 700; }
.readout .hint { color: var(--muted); font-weight: 400; }
.readout .sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: baseline; }

/* account page: "Where it went" summary block */
.seg { display: inline-flex; border: 1px solid var(--line); }
.seg button { font: inherit; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  padding: 6px 10px; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.on { background: var(--gold); color: var(--on-accent); }
.sum-t .bar { max-width: 320px; margin: 4px 0 0; height: 6px; }
.sum-t .bar span { background: var(--gold); }
.sum-t tr.pick { cursor: pointer; }
.sum-t tr.pick:hover td { background: var(--none-bg); }
@media (max-width: 700px) { .card-h:has(.seg) { flex-wrap: wrap; gap: 8px; } }

/* "Where it went" drill-down */
.sum-t tr.drill { cursor: pointer; }
.sum-t tr.drill:hover td, .sum-t tr.drill.open td { background: var(--none-bg); }
.sum-t .caret { display: inline-block; width: 1.1em; color: var(--muted); transition: transform .15s; }
.sum-t tr.open .caret { transform: rotate(90deg); }
.sum-t tr.kids > td { background: var(--none-bg); padding: 10px 12px 14px 26px; }
.kidgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px 24px; margin-bottom: 10px; }
.kidgrid h4 { margin: 0 0 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.kidgrid table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.kidgrid td { padding: 4px 6px 4px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.kidgrid td.r { text-align: right; white-space: nowrap; }
.kidgrid tr.kid { cursor: pointer; }
.kidgrid tr.kid:hover td { color: var(--link); }
.kidgrid .bar { max-width: none; height: 4px; }
.drillnote { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; padding: 6px 10px;
  border-left: 3px solid var(--gold); font-size: 13px; }
tr.dhide { display: none; }
a.bill { margin-left: 6px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }

/* finance committee lights */
.lights { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.light .word { font-size: 21px; margin: 4px 0 6px; }
.light .sub { line-height: 1.45; }
.light .lamp { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin-right: 7px; vertical-align: -1px;
  background: var(--muted); box-shadow: 0 0 0 2px var(--panel), 0 0 0 3px var(--line); }
.light.ok .lamp { background: var(--ok); } .light.watch .lamp { background: var(--watch); } .light.over .lamp { background: var(--over); }
.light .tone-word { margin-top: 8px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.light.ok .tone-word { color: var(--ok); } .light.watch .tone-word { color: var(--watch); } .light.over .tone-word { color: var(--over); }
.lights-note { margin: -4px 0 10px; }
.att .pill.watch { margin-left: 0; }
.att.watch .vs-a { background: var(--watch); }

/* signed-in user and sign-in page */
.who { font-size: 12px; padding: 0 14px; display: flex; flex-direction: column; gap: 4px; }
.who b { color: var(--side-on); } .who .muted { color: #8a8a8a; word-break: break-all; }
.who .btn.ghost { color: var(--side-ink); border-color: rgba(255,255,255,.2); align-self: flex-start; margin-top: 4px; }
body.signin { display: grid; place-items: center; min-height: 100vh; padding: 24px 16px; box-sizing: border-box; grid-template-columns: 1fr; }
.signin-card { background: var(--panel); border: 1px solid var(--line); max-width: 380px; width: 100%; padding: 32px 28px;
  display: flex; flex-direction: column; gap: 14px; text-align: center; }
.signin-card img { width: 96px; margin: 0 auto 4px; }
.signin-card h1 { font-size: 26px; }
.signin-card .btn { display: block; width: 100%; box-sizing: border-box; text-align: center; }
.signin-card .note { padding: 10px 12px; border-left: 4px solid var(--watch); background: var(--watch-bg); color: var(--ink); text-align: left; font-size: 13px; }
@media (prefers-color-scheme: dark) { .signin-card img { filter: invert(1); } }

/* users page */
.notice.bad { background: var(--over-bg); color: var(--over); border-left-color: var(--over); }
.userform input[type=email], .userform input[type=text] { font: inherit; color: var(--ink); background: var(--panel);
  border: 1px solid var(--line); border-radius: 2px; padding: 9px 10px; min-width: 0; flex: 1 1 200px; }
.levels { margin: 4px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 2px; }
form.inline { display: inline-flex; gap: 6px; align-items: center; margin: 0 4px 0 0; }
form.inline select { padding: 5px 6px; font-size: 12px; }
.scroll { overflow-x: auto; }
