/* Shared look for the account pages (family, signup, report, admin). Colour tokens come from app.css. */
body { min-height: 100vh; }
a { color: var(--saffron-ink); text-underline-offset: 2px; }
a.btn, .btn { text-decoration: none; }
.page { max-width: 1040px; margin: 0 auto; padding: 0 20px 72px; }
.page.narrow { max-width: 520px; }

/* top bar */
.top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 22px 0 18px; margin-bottom: 30px; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.brand-mark { width: 36px; height: 36px; flex: none; display: block; }
.brand b { font-family: var(--head); font-size: 22px; font-weight: 800; letter-spacing: -.01em; }
.topnav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; font-size: 14px; }
.topnav a { color: var(--muted); text-decoration: none; font-weight: 700; padding: 7px 10px; border-radius: 8px; }
.topnav a:hover { color: var(--ink); background: var(--panel-2); }
.topnav .who { color: var(--muted); padding: 0 6px; }

/* type */
.page-head { margin-bottom: 26px; }
.page-head h1 { font-size: clamp(28px, 3.4vw, 36px); font-weight: 800; letter-spacing: -.015em; }
.page-head p { color: var(--muted); margin: 6px 0 0; font-size: 16px; }
.section { margin-top: 40px; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 12px; }
.section-head h2 { font-size: 20px; font-weight: 800; }
.section-head p { color: var(--muted); margin: 3px 0 0; font-size: 14px; max-width: 620px; }
.muted { color: var(--muted); }
.small-text { font-size: 14px; }
.eyebrow { font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 800; }

/* surfaces */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 22px; margin-bottom: 16px; }
.panel h2 { font-size: 22px; margin-bottom: 6px; }
.panel h3 { font-size: 16px; margin: 18px 0 6px; }
.panel.flush { padding: 0; overflow: hidden; }

/* buttons (refines app.css) */
.btn { border-radius: 10px; font-weight: 800; padding: 11px 18px; font-size: 15px; }
.btn.small { padding: 7px 12px; font-size: 13.5px; border-radius: 8px; }
.btn.big { padding: 14px 24px; font-size: 17px; border-radius: 12px; }
.btn.ghost { background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); }
.btn.ghost:hover { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 30%, var(--line)); }
.btn.quiet { background: none; color: var(--muted); padding-left: 8px; padding-right: 8px; }
.btn.quiet:hover { color: var(--ink); background: var(--panel-2); }
.btn.danger { background: color-mix(in srgb, #b3261e 10%, transparent); color: #b3261e; }
.btn.block { width: 100%; }

/* forms */
input, select, textarea { font: inherit; padding: 10px 12px; border-radius: 10px; border: 1px solid color-mix(in srgb, var(--ink) 18%, var(--line)); background: var(--panel); color: var(--ink); max-width: 100%; }
input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--muted) 70%, transparent); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--saffron); box-shadow: 0 0 0 3px color-mix(in srgb, var(--saffron) 22%, transparent); }
input:disabled { background: var(--panel-2); color: var(--muted); }
input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--saffron-ink); padding: 0; }
label.field { display: block; margin-top: 14px; font-weight: 700; font-size: 13.5px; }
label.field input, label.field select, label.field textarea { display: block; width: 100%; margin-top: 5px; font-weight: 400; }
label.field .hint { font-weight: 600; color: var(--muted); }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 14px; }
.grow { flex: 1; min-width: 0; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; margin-top: 12px; line-height: 1.5; cursor: pointer; }
.consent input { margin-top: 2px; flex: none; }
.err { color: #b3261e; font-weight: 700; margin-top: 10px; font-size: 14px; }
.err:empty { display: none; }
.ok { color: var(--done); font-weight: 700; font-size: 14px; }
.note { background: var(--panel-2); border-radius: 10px; padding: 12px 14px; margin-top: 14px; font-size: 14px; }
.danger { color: #b3261e; }
details > summary { cursor: pointer; font-weight: 700; list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details > summary::before { content: "+"; display: inline-block; width: 18px; color: var(--muted); font-weight: 800; }
details[open] > summary::before { content: "−"; }

/* pills */
.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 800; background: color-mix(in srgb, var(--done) 14%, transparent); color: var(--done); }
.pill.warn { background: color-mix(in srgb, var(--saffron) 20%, transparent); color: var(--saffron-ink); }
.pill.bad { background: color-mix(in srgb, #b3261e 12%, transparent); color: #b3261e; }
.pill.grey { background: var(--panel-2); color: var(--muted); }

/* children */
.kids { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.kid { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.kid-head { display: flex; align-items: center; gap: 12px; }
.avatar { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-family: var(--head); font-weight: 800; font-size: 20px; flex: none; color: #fff; }
.kid-head h3 { font-size: 19px; margin: 0; }
.kid-head .muted { font-size: 13.5px; }
.kid-stats { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.kid-stats div { padding: 10px 8px; text-align: center; border-left: 1px solid var(--line); }
.kid-stats div:first-child { border-left: 0; }
.kid-stats b { display: block; font-family: var(--head); font-size: 21px; line-height: 1.1; }
.kid-stats span { font-size: 11.5px; color: var(--muted); font-weight: 700; }
.kid-note { font-size: 13.5px; background: var(--panel-2); border-radius: 10px; padding: 10px 12px; }
.kid-note b { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 2px; }
.kid-note.alert { background: color-mix(in srgb, #b3261e 9%, var(--panel)); }
.kid-note.alert b { color: #b3261e; }
.kid-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: auto; }
.kid-actions .spacer { flex: 1; }
.add-kid { align-self: start; border: 1.5px dashed color-mix(in srgb, var(--ink) 18%, var(--line)); border-radius: 14px; padding: 18px; background: transparent; }

/* plans */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.plan { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 22px 20px 20px; display: flex; flex-direction: column; gap: 6px; }
.plan.best { border: 2px solid var(--saffron); }
.plan .flag { position: absolute; top: -11px; left: 18px; background: var(--saffron); color: #231404; font-size: 11.5px; font-weight: 800; padding: 3px 10px; border-radius: 999px; letter-spacing: .02em; }
.plan-name { font-weight: 800; font-size: 15px; }
.price { font-family: var(--head); font-size: 34px; font-weight: 800; line-height: 1.1; margin-top: 4px; }
.price small { font-family: var(--body); font-size: 14px; color: var(--muted); font-weight: 700; }
.per { font-size: 13px; color: var(--done); font-weight: 800; min-height: 18px; }
.plan .blurb { font-size: 14px; color: var(--muted); flex: 1; margin: 6px 0 10px; }
.plan select { width: 100%; margin-bottom: 8px; }
.current-plan { display: flex; align-items: center; gap: 12px; }

/* lists */
.steps { display: flex; gap: 6px; margin: 0 0 22px; }
.steps span { flex: 1; height: 4px; border-radius: 2px; background: var(--line); }
.steps span.on { background: var(--saffron); }
.linkbox { display: flex; gap: 8px; margin-top: 12px; }
.linkbox input { flex: 1; min-width: 0; font-size: 13.5px; background: var(--panel-2); }
table.list { width: 100%; border-collapse: collapse; font-size: 14px; }
table.list th { text-align: left; color: var(--muted); font-weight: 800; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; padding: 10px 14px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--panel-2) 50%, var(--panel)); }
table.list td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.list tr:last-child td { border-bottom: 0; }
table.list td .muted { font-size: 12.5px; }
.table-wrap { overflow-x: auto; }
.empty { padding: 22px; color: var(--muted); font-size: 14px; text-align: center; }

.split { display: grid; grid-template-columns: 1.2fr 1fr; gap: 16px; align-items: start; }
.share-box { border-top: 1px solid var(--line); padding-top: 14px; }
.share-box select { padding: 6px 8px; }
ul.tight { margin: 4px 0 0; padding-left: 18px; }

@media (max-width: 720px) {
  .top { padding-top: 16px; }
  .topnav a { padding: 6px 8px; }
  .split { grid-template-columns: 1fr; }
  .panel { padding: 16px; }
  .top { margin-bottom: 22px; }
  .kids { grid-template-columns: 1fr; }
}
