:root {
  color-scheme: light;
  --ink: #18202f;
  --muted: #647084;
  --line: #dbe2ef;
  --paper: #fffdf8;
  --soft: #f4f7fb;
  --accent: #2563eb;
  --accent-2: #f97316;
  --good: #0f9f6e;
  --bad: #dc2626;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--soft);
  color: var(--ink);
}

button, input, textarea, select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.splash {
  min-height: 100svh;
  display: grid;
  align-items: end;
  padding: 24px;
  background:
    linear-gradient(180deg, rgba(24,32,47,.08), rgba(24,32,47,.72)),
    url("/static/splash-boy.png") center/cover;
}

.splash__content {
  max-width: 720px;
  color: white;
  padding-bottom: 10svh;
}

.eyebrow {
  margin: 0 0 8px;
  color: inherit;
  opacity: .82;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1, h2, h3, p {
  margin-top: 0;
}

h1 {
  font-size: clamp(36px, 8vw, 72px);
  line-height: .95;
  max-width: 720px;
  margin-bottom: 16px;
}

.lead {
  max-width: 560px;
  font-size: 18px;
  line-height: 1.45;
}

.panel {
  background: rgba(255,255,255,.96);
  color: var(--ink);
  border: 1px solid rgba(255,255,255,.5);
  border-radius: 8px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .18);
}

.login {
  display: grid;
  gap: 14px;
  max-width: 440px;
  padding: 18px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input, textarea, select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
}

textarea {
  min-height: 92px;
  resize: vertical;
}

.primary, .secondary, .ghost {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 8px;
  font-weight: 800;
}

.primary {
  background: var(--accent);
  color: white;
}

.secondary {
  background: var(--ink);
  color: white;
}

.ghost {
  background: white;
  color: var(--ink);
  border: 1px solid var(--line);
}

.hint {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.error {
  margin: 0;
  color: var(--bad);
  font-weight: 700;
}

.dashboard {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 16px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin-bottom: 14px;
}

.topbar h2 {
  margin: 0;
  font-size: 24px;
}

.tabs {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 8px 0 14px;
  background: var(--soft);
}

.tabs button {
  min-height: 42px;
  border-radius: 8px;
  background: white;
  border: 1px solid var(--line);
  color: var(--muted);
  font-weight: 800;
}

.tabs button.active {
  background: var(--ink);
  color: white;
}

.tab {
  display: none;
}

.tab.active {
  display: block;
}

.section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin: 20px 0 12px;
}

.section-title h3 {
  margin: 0;
}

.grid {
  display: grid;
  gap: 12px;
}

.card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.task-card {
  display: grid;
  gap: 12px;
}

.task-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.badge {
  display: grid;
  place-items: center;
  min-width: 72px;
  height: 72px;
  border-radius: 50%;
  color: white;
  font-size: 30px;
  box-shadow: inset 0 -8px 0 rgba(0,0,0,.1), 0 8px 20px rgba(15,23,42,.12);
}

.badge-card {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 12px;
  align-items: center;
}

.meta {
  color: var(--muted);
  font-size: 13px;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pill {
  border-radius: 999px;
  padding: 5px 9px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 12px;
  font-weight: 800;
}

.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.form-grid {
  display: grid;
  gap: 14px;
  padding: 16px;
  margin-bottom: 16px;
}

.check {
  grid-template-columns: auto 1fr;
  align-items: center;
}

.check input {
  width: 18px;
  min-height: 18px;
}

fieldset {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.balance {
  display: grid;
  gap: 6px;
}

.balance strong {
  font-size: 28px;
}

.balance .negative {
  color: var(--bad);
}

.balance .positive {
  color: var(--good);
}

.ledger {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.ledger-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
}

@media (min-width: 720px) {
  .dashboard {
    padding: 28px;
  }

  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .form-grid h3,
  .form-grid textarea,
  .form-grid fieldset,
  .form-grid button {
    grid-column: 1 / -1;
  }
}

@media (min-width: 1040px) {
  .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}


.children-admin-list {
  display: grid;
  gap: 10px;
  grid-column: 1 / -1;
}

.child-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.child-row.is-muted {
  opacity: .62;
}

.child-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

@media (min-width: 720px) {
  .child-row {
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .child-actions {
    grid-template-columns: auto auto;
  }
}

.proof-input {
  display: grid;
  place-items: center;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--accent);
  font-weight: 800;
}

.proof-input input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}

.proof-link {
  color: var(--accent);
  font-weight: 800;
}

.task-group + .task-group {
  margin-top: 18px;
}

.proof-meta {
  display: grid;
  gap: 3px;
  padding: 10px;
  border-radius: 8px;
  background: #f8fafc;
}

.proof-meta p {
  margin: 0;
}

.install-prompt {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 30;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 18px 40px rgba(15, 23, 42, .22);
}

.install-prompt p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 560px) {
  .install-prompt {
    grid-template-columns: 1fr;
  }
}

.upload-progress {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #dbeafe;
}

.upload-progress span {
  display: block;
  width: 45%;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  animation: upload-slide 1s ease-in-out infinite;
}

button:disabled {
  cursor: wait;
  opacity: .72;
}

@keyframes upload-slide {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(230%); }
}

.task-proof-summary {
  display: grid;
  gap: 3px;
  padding: 10px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.task-proof-summary strong {
  color: var(--ink);
}

.task-proof-summary.has-proof {
  border-color: #86efac;
  background: #f0fdf4;
}

.task-proof-summary.no-proof {
  border-color: #fed7aa;
  background: #fff7ed;
}
