/* Same visual language as the live app: soft sage ground (no white glare),
   white reserved for what a hand touches, firm edges, one green brand. */
:root {
  --bg: #d9dfd3; --panel: #e9eee4; --raised: #f4f7f0; --ink: #1b2420; --muted: #4c594f;
  --line: #c3cfc2; --edge: #a9bfae; --brand: #14532d; --brand-mid: #1f7a45; --brand-soft: #d6ecde;
  --warn: #b45309; --warn-soft: #fdf3d8; --danger: #b91c1c; --danger-soft: #fdecec;
  --shadow: 0 1px 2px rgba(18,28,22,.05), 0 6px 22px rgba(18,28,22,.06);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font: 14px/1.5 -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
a { color: var(--brand-mid); }
button { font: inherit; cursor: pointer; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
.small { font-size: 12.5px; } .muted { color: var(--muted); } .num { text-align: right; font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }

/* gate */
.gate { position: fixed; inset: 0; display: grid; place-items: center; background: #0b2015; padding: 16px; }
.gatecard { background: var(--panel); border-radius: 16px; padding: 28px; width: min(400px, 100%); box-shadow: 0 20px 60px rgba(0,0,0,.4); }
.gatecard h1 { font-size: 22px; margin: 10px 0 4px; }
.sandbox { display: inline-block; background: var(--warn-soft); color: var(--warn); font-weight: 800; font-size: 11px;
  letter-spacing: .06em; padding: 3px 8px; border-radius: 6px; }
.sub { color: var(--muted); margin: 0 0 16px; } .err { color: var(--danger); min-height: 20px; font-size: 13px; }

/* shell */
.shell { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.side { background: #0b2015; color: #dcefe2; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; gap: 10px; align-items: center; padding: 18px 16px 12px; }
.mark { width: 38px; height: 38px; border-radius: 11px; background: #1f7a45; color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 12px; }
.bname { font-weight: 700; color: #fff; font-size: 13.5px; } .bsub { font-size: 11px; color: #e7cb65; font-weight: 700; }
#nav { display: flex; flex-direction: column; padding: 6px 10px; gap: 1px; flex: 1; overflow-y: auto; }
.navgroup-t { color: #b2dcc2; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 9px 12px; }
#nav a { color: #dcefe2; text-decoration: none; padding: 8px 12px 8px 18px; border-radius: 8px; font-weight: 600; }
#nav a:hover { background: rgba(255,255,255,.12); color: #fff; }
#nav a.on { background: #1f7a45; color: #fff; }
.side-foot { padding: 12px 18px 18px; border-top: 1px solid rgba(255,255,255,.14); }
.link { background: none; border: 0; color: #a7d3b9; padding: 0; text-decoration: underline; margin-top: 6px; }
.main { min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 12px 24px; background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.topbar h2 { font-size: 17px; } .topbar-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.topnav { display: flex; gap: 6px; align-items: center; }
.nav-btn { border: 1.5px solid #8fbfa0; background: #f2f8f3; color: var(--brand); font-weight: 700;
  border-radius: 10px; font-size: 16px; line-height: 1; padding: 8px 11px; }
.nav-btn:hover { background: var(--brand-soft); border-color: var(--brand-mid); }
.titlewrap { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
/* hub-style launcher tiles on the dashboard */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 18px; }
.tile { min-height: 96px; border-radius: 14px; border: 1.5px solid #93ab99; background: #f6f9f3; color: #16241b;
  text-decoration: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  font-weight: 700; box-shadow: var(--shadow); transition: transform .12s, border-color .12s; }
.tile:hover { border-color: var(--brand-mid); transform: translateY(-2px); }
.tile .ico { width: 42px; height: 42px; border-radius: 12px; background: var(--brand-mid); color: #fff;
  display: grid; place-items: center; font-size: 20px; }
.view { padding: 20px 24px 60px; }

/* pieces */
.panel { background: var(--panel); border: 1.5px solid #b7c6b6; border-radius: 12px; box-shadow: var(--shadow); margin-bottom: 16px; }
.panel-head { padding: 12px 16px; border-bottom: 1.5px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.panel-head h3 { font-size: 15px; } .panel-body { padding: 14px 16px; } .flush { padding: 0; overflow-x: auto; }
.btn { border: 1.5px solid #b7c6b6; background: #fff; color: var(--ink); padding: 8px 14px; border-radius: 9px; font-weight: 600; }
.btn:hover { border-color: var(--brand-mid); background: #f4f7f3; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: #1a6b3a; }
.btn.sm { padding: 4px 10px; font-size: 12.5px; border-radius: 8px; }
.btn.danger { color: var(--danger); border-color: #e0a8a8; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
input, select, textarea { border: 1.5px solid var(--edge); border-radius: 9px; padding: 8px 11px; font: inherit; background: #fff; color: var(--ink); max-width: 100%; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand-mid); box-shadow: 0 0 0 3px rgba(31,122,69,.15); }
textarea { width: 100%; min-height: 80px; resize: vertical; }
label.fld { display: block; margin-bottom: 12px; }
label.fld > span { display: block; font-size: 12px; font-weight: 700; color: #39473c; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px; }
label.fld > input, label.fld > select, label.fld > textarea { width: 100%; }
.row { display: flex; gap: 10px; flex-wrap: wrap; } .row > * { flex: 1; min-width: 140px; }
.checks { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.checks label { display: flex; gap: 6px; align-items: center; border: 1.5px solid var(--edge); background: var(--raised);
  border-radius: 9px; padding: 7px 11px; font-weight: 600; cursor: pointer; }
.checks label:has(input:checked) { background: var(--brand-soft); border-color: var(--brand-mid); color: var(--brand); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid #ccd6ca; vertical-align: top; }
th { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: #39473c; background: #dfe7dc; font-weight: 700; }
tbody tr.click { cursor: pointer; } tbody tr:hover { background: #dce4d6; }
.empty { padding: 30px; text-align: center; color: var(--muted); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.card { background: var(--panel); border: 1.5px solid #b7c6b6; border-radius: 12px; padding: 14px 16px; box-shadow: var(--shadow); }
.card .n { font-size: 28px; font-weight: 800; color: var(--brand); line-height: 1.1; }
.card .k { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: #39473c; font-weight: 700; margin-top: 3px; }
.card .s { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* the four labels - each its own color, always with words */
.tag { display: inline-block; font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 20px; margin: 0 4px 3px 0; white-space: nowrap; }
.tag.fin { background: #dbeafe; color: #1e3a8a; } .tag.ink { background: #fef3c7; color: #78350f; }
.tag.vol { background: #d1fae5; color: #065f46; } .tag.par { background: #ede9fe; color: #4c1d95; }
.tag.site { background: #e4e9e1; color: #2c3a30; border: 1px solid #b7c6b6; }
.pill { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 20px; background: #e4eae4; color: #3c4a41; }
.pill.ok { background: #d1fae5; color: #065f46; } .pill.warn { background: var(--warn-soft); color: var(--warn); }
.chips { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 12px; }
.chip { padding: 7px 12px; border: 1.5px solid #9fbfa7; border-radius: 20px; background: #f2f8f3; font-weight: 600; color: #1d3a28; }
.chip.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.understood { font-size: 13px; color: var(--brand); font-weight: 700; margin: -4px 0 10px; }
.searchbig { width: 100%; font-size: 15px; padding: 11px 14px; }
.profile-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: flex-start; }
.profile-head h2 { font-size: 22px; margin-bottom: 6px; }
.section-title { font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em; color: #39473c; font-weight: 700;
  margin: 20px 0 8px; padding-bottom: 5px; border-bottom: 2px solid #c8d8cb; }
.dl { display: grid; grid-template-columns: 140px 1fr; gap: 6px 12px; font-size: 13.5px; }
.dl dt { color: #39473c; font-weight: 700; font-size: 12.5px; } .dl dd { margin: 0; }
.bar { height: 10px; border-radius: 6px; background: #ccd6ca; overflow: hidden; margin-top: 6px; }
.bar > i { display: block; height: 100%; background: var(--brand-mid); }
.bar.high > i { background: var(--warn); }

/* An accountant reads and exports; the buttons for everything else step aside. */
body[data-role="accountant"] .acc-hide { display: none !important; }
tr.void td { color: #8a8f83; text-decoration: line-through; }
tr.void td.keep { text-decoration: none; }
.voidtag { display: inline-block; font-size: 11px; font-weight: 800; color: #b91c1c; border: 1.5px solid #e0a8a8;
  border-radius: 6px; padding: 1px 6px; text-decoration: none; }
.rangebar { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; margin-bottom: 14px; }
.rangebar label.fld { margin: 0; }
.twocol { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
td.total, tr.total td { font-weight: 800; border-top: 2px solid #39473c; }

/* documents */
.doclist { list-style: none; margin: 0 0 12px; padding: 0; }
.doclist li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 10px; margin-bottom: 6px;
  background: var(--raised); border: 1.5px solid var(--edge); border-radius: 10px; }
.doclist li a { font-weight: 700; word-break: break-word; }
.docadd { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.docadd .fld { flex: 1; min-width: 180px; } .docpick { flex: none; }
.docbtn { white-space: nowrap; } .docbtn.has { border-color: var(--brand-mid); color: var(--brand); background: var(--brand-soft); }

/* vehicles, property & estates - the IRS reminders are loud on purpose */
.pill.bad { background: var(--danger); color: #fff; }
.irsbox { background: var(--warn-soft); border: 2px solid var(--warn); border-radius: 12px; padding: 12px 16px; margin-bottom: 16px; color: #5a2d05; }
.irsbox.bad { background: var(--danger-soft); border-color: var(--danger); color: #6b1010; }
.irsbox h3 { font-size: 15px; margin-bottom: 8px; }
.irsrow { display: grid; grid-template-columns: auto 1fr auto auto; gap: 10px; align-items: center; padding: 6px 0; border-top: 1px solid rgba(0,0,0,.08); }
.card.warnc { border-color: var(--warn); background: var(--warn-soft); } .card.warnc .n { color: var(--warn); }
.card.alarm { border: 2px solid var(--danger); background: var(--danger-soft); } .card.alarm .n { color: var(--danger); }
.ptype { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: #39473c; }
.ptypes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 12px; }
.ptypebtn { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px; border-radius: 12px;
  border: 1.5px solid #93ab99; background: #f6f9f3; font-size: 22px; color: var(--ink); }
.ptypebtn span { font-size: 12px; font-weight: 700; }
.ptypebtn.on { background: var(--brand); border-color: var(--brand); color: #fff; }
/* pledges */
.pill.pl { background: #dbeafe; color: #1e3a8a; }
.planline { background: var(--brand-soft); border: 1.5px solid #8fbfa0; border-radius: 10px; padding: 8px 12px; margin: -2px 0 12px; font-size: 13px; }
.planline:empty { display: none; }
.plan { display: grid; gap: 4px; margin-bottom: 6px; }
.plan > div { display: grid; grid-template-columns: 1fr auto 90px; gap: 10px; padding: 6px 10px; border-radius: 8px;
  background: var(--raised); border: 1.5px solid var(--edge); }
.plan > div.paid { background: #e3f4e8; border-color: #8fbfa0; color: #1b4d2c; }
.plan > div.late { background: var(--danger-soft); border-color: var(--danger); color: #6b1010; font-weight: 700; }
.plan > div > span:last-child { text-align: right; font-size: 12px; font-weight: 700; }
/* appeals, households, gift details, thank-yous, loyalty */
.pill.ap { background: #fde7d3; color: #7c2d12; font-family: ui-monospace, Consolas, monospace; letter-spacing: .02em; }
tr.dim td { opacity: .62; }
.supno { font-size: 13px; font-weight: 700; color: var(--muted); font-family: ui-monospace, Consolas, monospace; }
details.more { border: 1.5px solid var(--edge); border-radius: 10px; padding: 8px 12px; margin-bottom: 12px; background: var(--raised); }
details.more > summary { cursor: pointer; font-weight: 700; color: #2c3a30; }
details.more[open] > summary { margin-bottom: 10px; }
.hhname { margin-bottom: 8px; }
.hhlist > div { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 7px 10px; margin-bottom: 6px;
  background: var(--raised); border: 1.5px solid var(--edge); border-radius: 10px; }
.hhlist > div > button { margin-left: auto; }
.thankrow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.checks label.danger:has(input:checked) { background: var(--danger-soft); border-color: var(--danger); color: var(--danger); }
button.card.pick { text-align: left; font: inherit; cursor: pointer; }
button.card.pick:hover { border-color: var(--brand-mid); }
button.card.pick.on { outline: 3px solid var(--brand-mid); outline-offset: -1px; }
/* sign-in steps, merge, import, letters */
.gate .gatecard + .gatecard { margin-top: 0; }
ol.steps { padding-left: 20px; margin: 0 0 14px; } ol.steps li { margin-bottom: 8px; }
.secret { font: 700 17px/1.4 ui-monospace, Consolas, monospace; letter-spacing: .06em; background: #fff; border: 1.5px solid var(--edge);
  border-radius: 9px; padding: 8px 10px; margin-top: 6px; word-break: break-all; user-select: all; }
.spares { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin-bottom: 14px; }
.spares code { font: 700 15px ui-monospace, Consolas, monospace; background: #fff; border: 1.5px solid var(--edge); border-radius: 8px; padding: 6px 10px; text-align: center; }
table.compare th { width: 110px; } table.compare td { width: 45%; }
.dupgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dupcard { background: var(--raised); border: 1.5px solid var(--edge); border-radius: 10px; padding: 10px 12px; }
table.maptable td { padding: 5px 10px 5px 0; border-bottom: 1px solid #d5ddd2; } table.maptable td:first-child { width: 230px; }
table.maptable select { width: 100%; max-width: 460px; }
code.fillin { display: inline-block; cursor: pointer; background: var(--brand-soft); color: var(--brand); border-radius: 6px; padding: 1px 6px; margin: 2px 0; font-size: 12px; }
code.fillin:hover { background: var(--brand-mid); color: #fff; }
.side-foot a.link { color: #a7d3b9; }
@media (max-width: 560px) { .dupgrid { grid-template-columns: 1fr; } }
fieldset.bare { border: 0; padding: 0; margin: 0; min-width: 0; }
@media (max-width: 560px) { .ptypes { grid-template-columns: repeat(2, 1fr); } .irsrow { grid-template-columns: 1fr; } }

/* drawer + toast */
.drawer { position: fixed; inset: 0; z-index: 40; } .drawer-back { position: absolute; inset: 0; background: rgba(14,22,17,.48); }
.drawer-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(560px, 100%); background: var(--panel);
  border-radius: 16px 0 0 16px; overflow-y: auto; padding: 22px 24px 50px; box-shadow: -12px 0 40px rgba(0,0,0,.22); }
.drawer-x { position: absolute; top: 14px; right: 16px; border: 1.5px solid #8fbfa0; background: #f2f8f3; color: var(--brand);
  width: 34px; height: 34px; border-radius: 10px; font-size: 20px; line-height: 1; }
.drawer h3 { font-size: 18px; margin-bottom: 4px; } .drawer .sub { margin-bottom: 14px; }
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: #16211b; color: #f2f6f2; padding: 12px 20px;
  border-radius: 12px; z-index: 60; border-left: 3px solid var(--brand-mid); max-width: 90vw; }
.toast.err { background: #2b1413; border-left-color: #ef6b61; }

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; }
  #nav { flex-direction: row; flex-wrap: wrap; }
  .view { padding: 14px 14px 50px; } .topbar { padding: 10px 14px; }
  .dl { grid-template-columns: 1fr; }
  input, select, textarea { font-size: 16px; }
}
