/* GoFund Planner — plain CSS, no dependencies. */
:root {
  --ink: #1f2937; --muted: #6b7280; --line: #e5e7eb; --bg: #f9fafb;
  --card: #ffffff; --accent: #166534; --accent-ink: #ffffff;
  --warn-bg: #fef3c7; --warn-ink: #92400e; --danger: #b91c1c;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink); background: var(--bg); line-height: 1.5; }
h1 { font-size: 1.4rem; margin: 0; }
h2 { font-size: 1.15rem; margin: 0 0 .6rem; }
p { margin: .4rem 0; }
a { color: var(--accent); }

.topbar { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center;
  justify-content: space-between; padding: 1rem 1.25rem; background: var(--card);
  border-bottom: 1px solid var(--line); }
.brand { display: flex; gap: .75rem; align-items: center; }
.logo { font-size: 1.8rem; }
.tagline { margin: 0; color: var(--muted); font-size: .9rem; }
.top-actions { display: flex; gap: .5rem; flex-wrap: wrap; }

main { max-width: 960px; margin: 0 auto; padding: 1rem 1.25rem 3rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  padding: 1rem 1.25rem; margin-bottom: 1rem; }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between;
  align-items: baseline; gap: .5rem; }
.totals { font-weight: 600; font-size: .95rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
@media (max-width: 640px) { .grid-2 { grid-template-columns: 1fr; } }
label { display: block; font-size: .9rem; font-weight: 600; }
label.check { display: inline-flex; align-items: center; gap: .35rem; font-weight: 400; }
input[type=text], input[type=number], input[type=date], select {
  width: 100%; padding: .5rem .6rem; margin-top: .25rem; border: 1px solid var(--line);
  border-radius: 6px; font: inherit; font-size: .95rem; background: #fff; }
input[type=checkbox] { width: auto; }
.hint { color: var(--muted); font-size: .85rem; }

.btn { display: inline-block; padding: .55rem .9rem; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--line); background: #fff; color: var(--ink); font: inherit;
  font-size: .95rem; text-decoration: none; }
.btn:hover { background: #f3f4f6; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: #14532d; }
.btn-ghost { background: transparent; }
.btn-small { padding: .3rem .6rem; font-size: .85rem; }
.btn-danger-ghost { color: var(--danger); border-color: #fecaca; }
.btn-danger-ghost:hover { background: #fef2f2; }
.actions-row { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .75rem; }

.banner { max-width: 960px; margin: 1rem auto 0; padding: .75rem 1.25rem; border-radius: 8px;
  background: #eff6ff; color: #1e40af; font-size: .92rem; }
.banner-warn { background: var(--warn-bg); color: var(--warn-ink); }

.student { border: 1px solid var(--line); border-radius: 8px; padding: .75rem 1rem; margin-bottom: .75rem; }
.student-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; align-items: baseline; }
.student-name { font-weight: 700; font-size: 1.05rem; }
.student-amounts { font-weight: 600; }
.progress { height: 12px; background: #e5e7eb; border-radius: 999px; overflow: hidden; margin: .5rem 0; }
.progress-fill { height: 100%; background: var(--accent); width: 0%; transition: width .3s; }
.progress-fill.over { background: #15803d; }
.donor-list { list-style: none; padding: 0; margin: .5rem 0; font-size: .92rem; }
.donor-list li { display: flex; justify-content: space-between; gap: 1rem; padding: .2rem 0;
  border-bottom: 1px dashed var(--line); }
.donor-list li:last-child { border-bottom: 0; }
.donor-form { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .5rem; }
.donor-form input { width: auto; flex: 1 1 120px; }
.link-btn { background: none; border: 0; color: var(--accent); cursor: pointer;
  font: inherit; font-size: .88rem; padding: 0; text-decoration: underline; }

.budget-table { width: 100%; border-collapse: collapse; font-size: .92rem; margin-bottom: .75rem; }
.budget-table th, .budget-table td { text-align: left; padding: .35rem .4rem; border-bottom: 1px solid var(--line); }
.budget-table td.num, .budget-table th.num { text-align: right; }
.inline-form { display: flex; flex-wrap: wrap; gap: .5rem; align-items: end; }
.inline-form input, .inline-form select { width: auto; flex: 1 1 140px; }
.reconcile { margin-top: .75rem; padding: .6rem .8rem; border-radius: 8px; background: #f0fdf4;
  font-size: .95rem; }
.reconcile.short { background: #fef2f2; }

.share-row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center;
  justify-content: space-between; padding: .5rem 0; border-bottom: 1px dashed var(--line); }
.share-row:last-child { border-bottom: 0; }
.share-link { font-size: .85rem; color: var(--muted); word-break: break-all; }

.how { margin: .4rem 0; padding-left: 1.25rem; }
.eyebrow { color: var(--muted); text-transform: uppercase; letter-spacing: .04em; font-size: .8rem; }
.share-card { text-align: center; }
.big-progress { max-width: 560px; margin: 1rem auto; }
.big-progress .progress { height: 18px; }
.share-amounts { font-size: 1.15rem; font-weight: 700; }
.foot { color: var(--muted); font-size: .85rem; margin-top: 1.5rem; }

.modal { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: flex;
  align-items: center; justify-content: center; padding: 1rem; z-index: 10; }
.modal-box { background: #fff; border-radius: 12px; padding: 1.25rem 1.5rem; max-width: 520px; width: 100%; }
.modal-box input { margin-bottom: .5rem; }
#printReport { display: none; }

@media print {
  body { background: #fff; }
  .topbar, .banner, #appView > section:not(#printCard), .modal, .actions-row { display: none !important; }
  #printReport { display: block; }
  main { max-width: none; padding: 0; }
  .card { border: 0; padding: 0; }
  #appView { display: none; }
  #shareView { display: none; }
}
