/* ---- Kids4Kids brand ------------------------------------------------------------------------
   Palette and type taken from kids4kidsfoundation.org.au. Bubblegum Sans is deliberately scoped
   to the PUBLIC pages families see; the admin side keeps the K4K colours but sets everything in
   Nunito, because a caseworker reading a grid of 900 applications needs density and legibility,
   not personality. ------------------------------------------------------------------------- */
:root {
    --k4k-purple:      #341C77;
    --k4k-purple-deep: #251352;
    --k4k-coral:       #FE5D37;
    --k4k-coral-dark:  #E04420;
    --k4k-teal:        #02B890;
    --k4k-yellow:      #FDB510;
    --k4k-blue:        #2575FC;
    --k4k-lavender:    #EDF1FC;
    --k4k-ink:         #333333;
    --k4k-muted:       #54595F;
    --k4k-line:        #E2E6F2;

    --k4k-body:    Nunito, 'Segoe UI', Helvetica, Arial, sans-serif;
    --k4k-display: 'Bubblegum Sans', Nunito, 'Segoe UI', sans-serif;
}

html, body, .enquiry, .casework {
    font-family: var(--k4k-body);
    color: var(--k4k-ink);
}

a, .btn-link { color: var(--k4k-purple); }
a:hover      { color: var(--k4k-coral); }

.btn-primary {
    color: #fff;
    background-color: var(--k4k-coral);
    border-color: var(--k4k-coral);
    font-weight: 700;
}
.btn-primary:hover, .btn-primary:focus {
    background-color: var(--k4k-coral-dark);
    border-color: var(--k4k-coral-dark);
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 .1rem #fff, 0 0 0 .25rem rgba(52, 28, 119, .45);
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}
/* ---- public enquiry form -------------------------------------------------------------------
   Used by families on phones, often on poor connections. Plain controls, large targets, one
   column on small screens. No component library on this page by design. */
.enquiry { max-width: 46rem; margin: 0 auto; padding: 1.5rem 1rem 4rem; }
.enquiry.narrow { max-width: 32rem; }
.enquiry h1 { font-size: 1.75rem; line-height: 1.2; margin: 0 0 .5rem; }
.enquiry h2 { font-size: 1.15rem; margin: 0 0 .75rem; }
.enquiry .lede { color: #3c4e5e; margin: 0 0 1.5rem; }
.enquiry section { border-top: 1px solid #d8e0e8; padding: 1.5rem 0 .5rem; }
.enquiry label { display: block; margin: 0 0 1rem; font-weight: 600; }
/* Blazor's <InputText> renders a bare <input> with no type attribute, so selecting on
   [type="text"] silently matched nothing and the whole form rendered unstyled. Select by
   exclusion instead. */
.enquiry label input:not([type="checkbox"]):not([type="radio"]),
.enquiry label select, .enquiry input.code {
    display: block; width: 100%; margin-top: .35rem; padding: .7rem .6rem;
    font: inherit; font-weight: 400; border: 1px solid #9fb0c0; border-radius: 4px;
    background: #fff; min-height: 2.75rem;
}
.enquiry input.code { font-size: 1.5rem; letter-spacing: .4em; text-align: center; }
.enquiry .hint { display: block; font-weight: 400; font-size: .875rem; color: #5a6b7a; margin-top: .35rem; }
.enquiry .row { display: grid; gap: 0 1rem; grid-template-columns: 1fr; }
@media (min-width: 34rem) { .enquiry .row { grid-template-columns: 1fr 1fr; } }
.enquiry label.check { font-weight: 400; display: flex; gap: .6rem; align-items: flex-start;
    margin-bottom: .6rem; line-height: 1.4; }
.enquiry label.check input { margin-top: .25rem; width: 1.15rem; height: 1.15rem; flex: none; }
.enquiry .nested { border-left: 3px solid #d8e0e8; padding-left: 1rem; margin: .5rem 0 1rem; }
.enquiry fieldset.child { border: 1px solid #d8e0e8; border-radius: 6px; padding: 1rem;
    margin: 0 0 1rem; }
.enquiry fieldset.child > legend { font-weight: 600; padding: 0 .4rem; }
.enquiry fieldset.items { border: 0; padding: 0; margin: .5rem 0 0; }
.enquiry fieldset.items > legend { font-weight: 600; font-size: .9rem; padding: 0; margin-bottom: .4rem; }
.enquiry .actions { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1.5rem; }
.enquiry button { font: inherit; padding: .75rem 1.25rem; border-radius: 4px; cursor: pointer;
    min-height: 2.75rem; }
.enquiry button.primary { background: var(--k4k-coral); color: #fff; border: 1px solid var(--k4k-coral); font-weight: 700; }
.enquiry button.primary:hover:not([disabled]) { background: var(--k4k-coral-dark); border-color: var(--k4k-coral-dark); }
.enquiry button.secondary { background: #fff; color: var(--k4k-purple); border: 1px solid var(--k4k-line); font-weight: 600; }
.enquiry button.link { background: none; border: 0; padding: .25rem 0; text-decoration: underline; }
.enquiry button.link.danger { color: #b93a30; }
.enquiry button[disabled] { opacity: .6; cursor: default; }
.enquiry .alert { padding: .8rem 1rem; border-radius: 4px; margin: 0 0 1rem; }
.enquiry .alert.error { background: #f6e3e1; border-left: 3px solid #b93a30; color: #7a2019; }
.enquiry .alert.ok { background: #e0efe7; border-left: 3px solid #2f6e4f; color: #1d4a34; }
.enquiry .validation-message { display: block; font-weight: 400; color: #b93a30; font-size: .875rem;
    margin-top: .25rem; }

/* ---- staff casework screens ---------------------------------------------------------------- */
.casework { max-width: 60rem; margin: 0 auto; padding: 1.25rem 1rem 4rem; }
.casework.wide { max-width: 82rem; }
.casework .page-head { display: flex; justify-content: space-between; align-items: flex-start;
    gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.casework h1 { font-size: 1.5rem; margin: 0 0 .25rem; color: var(--k4k-purple); font-weight: 800; }
.casework h2 { font-size: 1.05rem; margin: 0 0 .6rem; }
.casework h3 { font-size: .95rem; margin: 1.25rem 0 .5rem; }
.casework .lede { color: #5a6b7a; margin: 0; max-width: 46rem; }
.casework .count { color: #5a6b7a; font-size: .875rem; margin: 0 0 .75rem; }
.casework section { border-top: 1px solid #e2e8ee; padding: 1.1rem 0; }
.casework .cols { display: grid; gap: 0 2rem; grid-template-columns: 1fr; }
@media (min-width: 62rem) { .casework .cols { grid-template-columns: 1fr 22rem; } }
.casework .muted { color: #7b8896; }
.casework dl { display: grid; grid-template-columns: auto 1fr; gap: .35rem .75rem; margin: 0; font-size: .9rem; }
.casework dt { color: #5a6b7a; }
.casework dd { margin: 0; }
.casework table.plain { width: 100%; border-collapse: collapse; font-size: .9rem; }
.casework table.plain th { text-align: left; font-size: .75rem; text-transform: uppercase;
    letter-spacing: .06em; color: #5a6b7a; padding: .4rem .5rem; border-bottom: 1px solid #e2e8ee; }
.casework table.plain td { padding: .5rem; border-bottom: 1px solid #eef2f6; vertical-align: top; }
.casework .filters { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.casework .filters label { font-size: .8rem; color: #5a6b7a; }
.casework .filters select, .casework .filters input { display: block; margin-top: .25rem;
    padding: .45rem .5rem; font: inherit; border: 1px solid #9fb0c0; border-radius: 4px; min-width: 14rem; }
.casework button { font: inherit; padding: .5rem 1rem; border-radius: 4px; cursor: pointer; }
.casework button.primary { background: var(--k4k-coral); color: #fff; border: 1px solid var(--k4k-coral); font-weight: 700; }
.casework button.primary:hover:not([disabled]) { background: var(--k4k-coral-dark); border-color: var(--k4k-coral-dark); }
.casework button.secondary { background: #fff; color: var(--k4k-purple); border: 1px solid var(--k4k-line); font-weight: 600; }
.casework button.link { background: none; border: 0; text-decoration: underline; }
.casework button[disabled] { opacity: .6; cursor: default; }
.casework textarea, .casework .decide select { width: 100%; font: inherit; padding: .5rem;
    border: 1px solid #9fb0c0; border-radius: 4px; }
.casework .decide label, .casework .add-note label { display: block; margin-bottom: .75rem;
    font-weight: 600; font-size: .875rem; }
.casework .hint { display: block; font-weight: 400; font-size: .8rem; color: #5a6b7a; margin-top: .25rem; }
.casework .alert { padding: .7rem 1rem; border-radius: 4px; margin-bottom: 1rem; }
.casework .alert.ok { background: #e0efe7; border-left: 3px solid #2f6e4f; }
.casework .alert.error { background: #f6e3e1; border-left: 3px solid #b93a30; }
.casework .warn-box { background: #f7ebd4; border-left: 3px solid #8a6114; padding: .6rem .8rem;
    border-radius: 4px; font-size: .9rem; }
.casework .empty { border: 1px dashed #cbd8e3; border-radius: 6px; padding: 2rem; text-align: center;
    color: #5a6b7a; }
.pill { display: inline-block; padding: .15rem .55rem; border-radius: 999px; font-size: .78rem;
    background: #eef2f6; color: #3c4e5e; white-space: nowrap; }
.pill.approved { background: #e0efe7; color: #1d4a34; }
.pill.declined, .pill.withdrawn { background: #f1e5e3; color: #7a2019; }
.pill.awaitingverification { background: #f7ebd4; color: #6b4a10; }
.flag { display: inline-block; font-size: .72rem; padding: .1rem .4rem; border-radius: 3px;
    margin-right: .25rem; white-space: nowrap; }
.flag.warn { background: #f7ebd4; color: #6b4a10; }
.flag.muted { background: #eef2f6; color: #5a6b7a; }
/* review queue */
.candidate { border: 1px solid #d8e0e8; border-radius: 6px; padding: 1rem; margin-bottom: 1rem; }
.candidate-head { display: flex; align-items: center; gap: .75rem; margin-bottom: .75rem; }
.candidate .score { font-weight: 600; background: #16202b; color: #fff; border-radius: 4px;
    padding: .15rem .5rem; font-size: .85rem; }
.candidate .kind { color: #5a6b7a; font-size: .85rem; }
.candidate .pair { display: grid; gap: 1rem; grid-template-columns: 1fr; margin-bottom: .75rem; }
@media (min-width: 40rem) { .candidate .pair { grid-template-columns: 1fr 1fr; } }
.candidate .side { background: #f6f9fb; border-radius: 4px; padding: .6rem .75rem; }
.candidate .side .who { font-weight: 600; margin-top: .2rem; }
.candidate .when { color: #7b8896; font-size: .8rem; }
.candidate .signals { list-style: none; padding: 0; margin: 0 0 .75rem; font-size: .9rem; }
.candidate .signals li { padding: .2rem 0; }
.candidate .signals li.suppressed { color: #7b8896; }
.candidate .signals .weight { display: inline-block; min-width: 2.5rem; font-weight: 600;
    color: #2f6e4f; font-variant-numeric: tabular-nums; }
.candidate .signals .weight.muted { color: #9fb0c0; font-weight: 400; }
.candidate .outcomes { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.candidate .confirm { border-top: 1px solid #e2e8ee; margin-top: .75rem; padding-top: .75rem; }
.candidate .confirm .what { font-size: .9rem; color: #3c4e5e; margin: 0 0 .5rem; }
.casework .bulk { position: sticky; bottom: 0; background: #fff; border-top: 1px solid #d8e0e8;
    padding: .75rem 0; display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.casework .timeline, .casework .history, .casework .notes { list-style: none; padding: 0; margin: 0;
    font-size: .9rem; }
.casework .timeline li, .casework .notes li { border-left: 2px solid #d8e0e8; padding: .35rem 0 .6rem .75rem;
    margin-bottom: .4rem; }
.casework .timeline li.superseded { opacity: .55; }
.casework .history li { padding: .3rem 0; border-bottom: 1px solid #eef2f6; }
.casework .note-body { margin-top: .25rem; white-space: pre-wrap; }
.casework .note-head { display: flex; gap: .5rem; align-items: center; }
.casework .note-head .cat { font-weight: 600; font-size: .82rem; }
.app-grid { height: 60vh; }

/* ---- reports ------------------------------------------------------------------------------- */
.tiles { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
    margin-bottom: 1.5rem; }
.tile { border: 1px solid #d8e0e8; border-radius: 6px; padding: .9rem 1rem; }
.tile.warn { border-color: #d8b26a; background: #fdf8ee; }
.tile b { display: block; font-size: 1.6rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.tile span { display: block; font-size: .8rem; color: #5a6b7a; margin-top: .2rem; }
.report-cols { display: grid; gap: 0 2rem; grid-template-columns: 1fr; }
@media (min-width: 60rem) { .report-cols { grid-template-columns: repeat(3, 1fr); } }
.casework td.num, .casework th.num { text-align: right; font-variant-numeric: tabular-nums; }
.casework tr.total td { font-weight: 600; border-top: 2px solid #d8e0e8; }
.casework td.bar { width: 6rem; }
.casework td.bar span { display: block; height: .5rem; background: #2f6e4f; border-radius: 2px; min-width: 2px; }

/* ---- collection screen (tablet, in a hall) -------------------------------------------------- */
.collect { max-width: 48rem; margin: 0 auto; padding: 1rem 1rem 5rem; }
.collect h1 { font-size: 1.4rem; margin: 0 0 .25rem; }
.collect .lede { color: #5a6b7a; margin: 0; font-size: .9rem; }
.collect-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem;
    flex-wrap: wrap; margin-bottom: 1rem; }
.collect .unsaved { background: #f7ebd4; color: #6b4a10; border-radius: 4px; padding: .5rem .8rem;
    font-size: .875rem; font-weight: 600; }
.collect .locations { list-style: none; padding: 0; }
.collect .locations li { border-bottom: 1px solid #e2e8ee; }
.collect .locations a { display: block; padding: 1rem .25rem; font-size: 1.05rem; text-decoration: none; }
.collect label { display: block; font-weight: 600; margin-bottom: 1rem; }
.collect input { display: block; width: 100%; margin-top: .3rem; padding: .85rem .7rem; font: inherit;
    border: 1px solid #9fb0c0; border-radius: 4px; min-height: 3rem; }
.collect input.scan { font-size: 1.15rem; letter-spacing: .1em; }
.collect .hint { display: block; font-weight: 400; font-size: .82rem; color: #5a6b7a; margin-top: .3rem; }
.collect .results { list-style: none; padding: 0; margin: .5rem 0 0; }
.collect .results li { border-bottom: 1px solid #e2e8ee; }
.collect .results li.none { padding: 1rem .25rem; color: #5a6b7a; }
.collect button.row { display: flex; width: 100%; gap: .75rem; align-items: baseline; text-align: left;
    background: none; border: 0; padding: .9rem .25rem; font: inherit; cursor: pointer; }
.collect .results .name { font-weight: 600; flex: 1; }
.collect .results .ref, .collect .results .kids { color: #5a6b7a; font-size: .85rem; }
.collect .done { background: #e0efe7; color: #1d4a34; border-radius: 3px; padding: .1rem .4rem;
    font-size: .75rem; }
.collect .family-head { display: flex; justify-content: space-between; align-items: flex-start;
    gap: 1rem; margin-bottom: .75rem; }
.collect .identity { background: #f7ebd4; border-left: 3px solid #8a6114; padding: .6rem .8rem;
    border-radius: 4px; margin-bottom: 1rem; font-size: .92rem; }
.collect .child { border: 1px solid #d8e0e8; border-radius: 6px; padding: .9rem; margin-bottom: .9rem; }
.collect .child-head { display: flex; gap: .6rem; align-items: baseline; margin-bottom: .6rem; }
.collect .child-head h3 { margin: 0; font-size: 1.05rem; }
.collect .child-head .band { color: #5a6b7a; font-size: .85rem; }
.collect .items { list-style: none; padding: 0; margin: 0 0 .75rem; }
.collect .items li { display: flex; align-items: center; gap: .6rem; padding: .35rem 0;
    border-bottom: 1px solid #f1f5f8; font-size: .92rem; }
.collect .items .qty { font-weight: 600; min-width: 1.75rem; font-variant-numeric: tabular-nums; }
.collect .items input { width: 4.5rem; margin: 0 0 0 auto; min-height: 2.5rem; text-align: center; }
.collect button.primary, .collect button.secondary { font: inherit; padding: .8rem 1.2rem;
    border-radius: 4px; cursor: pointer; min-height: 3rem; }
.collect button.primary { background: var(--k4k-coral); color: #fff; border: 1px solid var(--k4k-coral); font-weight: 700; }
.collect button.secondary { background: #fff; border: 1px solid #9fb0c0; }
.collect button.link { background: none; border: 0; text-decoration: underline; cursor: pointer; font: inherit; }
.collect .child-actions { display: flex; gap: .6rem; flex-wrap: wrap; }
.collect .alert { padding: .7rem 1rem; border-radius: 4px; margin-bottom: 1rem; }
.collect .alert.ok { background: #e0efe7; border-left: 3px solid #2f6e4f; }
.collect .alert.error { background: #f6e3e1; border-left: 3px solid #b93a30; }
/* family slot booking */
.enquiry .slots { list-style: none; padding: 0; margin: 1rem 0 0; }
.enquiry .slots li { margin-bottom: .5rem; }
.enquiry button.slot { display: flex; width: 100%; justify-content: space-between; align-items: center;
    padding: .9rem 1rem; font: inherit; background: #fff; border: 1px solid #9fb0c0; border-radius: 4px;
    cursor: pointer; min-height: 3.25rem; }
.enquiry button.slot .when { font-weight: 600; }
.enquiry button.slot .left { color: #5a6b7a; font-size: .85rem; }
.enquiry button.slot.full { opacity: .5; cursor: default; }
.enquiry .booked { background: #e0efe7; border-left: 3px solid #2f6e4f; padding: 1rem;
    border-radius: 4px; margin-bottom: 1.5rem; }
.casework tr.short td { background: #fdf4f3; }
.casework tr.short td.num { font-weight: 600; color: #7a2019; }

/* ---- branded shell -------------------------------------------------------------------------- */
.k4k-sidebar {
    background: linear-gradient(180deg, var(--k4k-purple) 0%, var(--k4k-purple-deep) 100%);
}

.k4k-brand {
    display: block;
    padding: 1rem .9rem .85rem;
    background: #fff;
    border-bottom: 4px solid var(--k4k-yellow);
}
.k4k-brand img { width: 100%; max-width: 190px; height: auto; display: block; margin: 0 auto; }
.k4k-brand .k4k-brand-sub {
    display: block; text-align: center; margin-top: .4rem;
    font-size: .68rem; letter-spacing: .12em; text-transform: uppercase;
    font-weight: 700; color: var(--k4k-purple);
}

.k4k-nav .nav-section {
    padding: 1rem 1.25rem .3rem;
    font-size: .66rem; letter-spacing: .14em; text-transform: uppercase;
    font-weight: 700; color: rgba(255, 255, 255, .45);
}
.k4k-nav .nav-link {
    color: rgba(255, 255, 255, .86);
    border-left: 3px solid transparent;
    border-radius: 0;
    font-weight: 600;
}
.k4k-nav .nav-link:hover { background: rgba(255, 255, 255, .09); color: #fff; }
.k4k-nav .nav-link.active {
    background: rgba(255, 255, 255, .14);
    border-left-color: var(--k4k-yellow);
    color: #fff;
}

.k4k-topbar {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    background: #fff; border-bottom: 1px solid var(--k4k-line);
}
.k4k-topbar .k4k-campaign { font-weight: 700; color: var(--k4k-purple); }
.k4k-topbar .k4k-campaign .muted { color: var(--k4k-muted); font-weight: 400; }

/* ---- dashboard ------------------------------------------------------------------------------ */
.k4k-dash h1 { font-size: 1.6rem; font-weight: 800; color: var(--k4k-purple); margin-bottom: .15rem; }
.k4k-dash .lede { color: var(--k4k-muted); margin-bottom: 1.4rem; }

.k4k-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 1rem; }
.k4k-card {
    background: #fff; border: 1px solid var(--k4k-line); border-radius: .7rem;
    border-top: 4px solid var(--k4k-purple); padding: 1rem 1.1rem;
    text-decoration: none; display: block; color: inherit;
}
a.k4k-card:hover { border-color: var(--k4k-coral); border-top-color: var(--k4k-coral); }
.k4k-card .k4k-figure { font-size: 2rem; font-weight: 800; line-height: 1.1; color: var(--k4k-purple); }
.k4k-card .k4k-label { font-size: .82rem; color: var(--k4k-muted); font-weight: 600; }
.k4k-card .k4k-sub   { font-size: .76rem; color: var(--k4k-muted); margin-top: .35rem; }
.k4k-card.accent-coral  { border-top-color: var(--k4k-coral); }
.k4k-card.accent-coral  .k4k-figure { color: var(--k4k-coral); }
.k4k-card.accent-teal   { border-top-color: var(--k4k-teal); }
.k4k-card.accent-teal   .k4k-figure { color: var(--k4k-teal); }
.k4k-card.accent-yellow { border-top-color: var(--k4k-yellow); }

.k4k-section-title {
    font-size: .72rem; letter-spacing: .14em; text-transform: uppercase;
    font-weight: 700; color: var(--k4k-muted); margin: 2rem 0 .75rem;
}
.k4k-empty {
    background: var(--k4k-lavender); border-radius: .7rem; padding: 1.1rem 1.2rem;
    color: var(--k4k-muted);
}

/* ---- public pages: this is where the brand gets its warmth back ----------------------------- */
.enquiry h1, .enquiry h2 { font-family: var(--k4k-display); color: var(--k4k-purple); letter-spacing: .01em; }
.enquiry h1 { color: var(--k4k-teal); }
.public-header {
    background: #fff; border-bottom: 4px solid var(--k4k-yellow);
    padding: .9rem 1rem; text-align: center;
}
.public-header img { height: 54px; width: auto; }

/* ---- public shell: no staff chrome ---------------------------------------------------------- */
.public-shell { min-height: 100vh; display: flex; flex-direction: column; background: #fff; }
.public-shell > main { flex: 1; }
.public-footer {
    border-top: 1px solid var(--k4k-line); margin-top: 2rem; padding: 1.25rem 1rem;
    text-align: center; font-size: .85rem; color: var(--k4k-muted);
}
.public-footer p { margin: 0; }

/* ---- campaign setup ------------------------------------------------------------------------- */
.casework .cols-form { display: grid; gap: 0 1.5rem; grid-template-columns: 1fr; max-width: 46rem; }
@media (min-width: 48rem) { .casework .cols-form { grid-template-columns: 1fr 1fr; } }
.casework .cols-form label { display: block; margin: 0 0 1rem; font-weight: 600; }
.casework .cols-form input, .casework .cols-form select {
    display: block; width: 100%; margin-top: .35rem; padding: .55rem .6rem;
    font: inherit; font-weight: 400; border: 1px solid var(--k4k-line); border-radius: 4px;
    background: #fff; min-height: 2.5rem;
}
.casework .cols-form .hint { display: block; font-weight: 400; font-size: .82rem;
    color: var(--k4k-muted); margin-top: .3rem; }
.casework .actions { display: flex; gap: .75rem; margin: .5rem 0 0; }
.casework .alert { padding: .7rem 1rem; border-radius: 4px; margin: 0 0 1rem; max-width: 46rem; }
.casework .alert.error { background: #f6e3e1; border-left: 3px solid #b93a30; color: #7a2019; }
.casework .alert.ok { background: #e0efe7; border-left: 3px solid var(--k4k-teal); color: #1d4a34; }

/* ---- the Blazor error banner ----------------------------------------------------------------
   Global on purpose. These rules used to live in MainLayout.razor.css, which Blazor scopes to
   that layout's own markup — so a second copy of the banner in another layout rendered with no
   display:none and was permanently visible. One banner, one unscoped rule. */
#blazor-error-ui {
    display: none;
    position: fixed;
    bottom: 0; left: 0; width: 100%;
    box-sizing: border-box;
    z-index: 1000;
    padding: .7rem 3rem .7rem 1.25rem;
    background: var(--k4k-yellow);
    color: #3a2a00;
    font-weight: 600;
    box-shadow: 0 -1px 4px rgba(0, 0, 0, .2);
    color-scheme: light only;
}
#blazor-error-ui .reload { color: #3a2a00; text-decoration: underline; margin-left: .35rem; }
#blazor-error-ui .dismiss {
    position: absolute; right: .6rem; top: 50%; transform: translateY(-50%);
    background: none; border: 0; cursor: pointer;
    font-size: 1.4rem; line-height: 1; color: #3a2a00; padding: 0 .4rem;
}

/* ---- centre recipients ----------------------------------------------------------------------- */
.casework table.simple { width: 100%; border-collapse: collapse; font-size: .92rem; }
.casework table.simple th {
    text-align: left; font-weight: 700; color: var(--k4k-muted);
    font-size: .74rem; letter-spacing: .08em; text-transform: uppercase;
    border-bottom: 2px solid var(--k4k-line); padding: .5rem .6rem;
}
.casework table.simple td { padding: .55rem .6rem; border-bottom: 1px solid var(--k4k-line); }
.casework table.simple tbody tr:hover { background: var(--k4k-lavender); }
.casework fieldset.child {
    border: 1px solid var(--k4k-line); border-radius: .5rem; padding: 1rem; margin: 0 0 1rem;
}
.casework fieldset.child > legend { font-weight: 700; color: var(--k4k-purple); padding: 0 .4rem; }
.casework fieldset.items { border: 0; padding: 0; margin: .5rem 0 0; }
.casework fieldset.items > legend { font-weight: 600; font-size: .9rem; padding: 0; margin-bottom: .4rem; }
.casework label.check {
    font-weight: 400; display: flex; gap: .6rem; align-items: center; margin-bottom: .45rem;
}
.casework label.check input { width: 1.1rem; height: 1.1rem; flex: none; }
.casework button.link.danger { color: #b93a30; }
.casework h3 { margin-top: 1.5rem; }

/* ---- people ---------------------------------------------------------------------------------- */
.casework .setup-link {
    display: block; margin-top: .5rem; padding: .6rem .7rem;
    background: #fff; border: 1px solid var(--k4k-line); border-radius: 4px;
    font-size: .82rem; word-break: break-all; color: var(--k4k-purple);
}
.casework tr.muted-row td { color: var(--k4k-muted); font-style: italic; }
.casework td.row-actions { white-space: nowrap; }
.casework td.row-actions button { margin-right: .6rem; font-size: .85rem; }
.casework .alert.ok .count { margin: .3rem 0 0; color: inherit; opacity: .85; }

/* ---- eligibility policy gate ----------------------------------------------------------------
   Shown before the form can be filled in. Deliberately readable rather than a scroll-box of fine
   print: most people will not read it, but it should not look designed to be skipped. */
.enquiry section.policy {
    background: var(--k4k-lavender);
    border: 1px solid var(--k4k-line);
    border-left: 4px solid var(--k4k-purple);
    border-radius: .6rem;
    padding: 1.1rem 1.25rem 1rem;
    margin: 0 0 1.75rem;
}
.enquiry section.policy.accepted { border-left-color: var(--k4k-teal); }
.enquiry section.policy h2 { margin-top: 0; }
.enquiry .policy-body { max-height: 20rem; overflow-y: auto; padding-right: .5rem; }
.enquiry .policy-body h3 {
    font-size: .95rem; font-weight: 800; color: var(--k4k-purple);
    margin: 1rem 0 .3rem;
}
.enquiry .policy-body h3:first-child { margin-top: 0; }
.enquiry .policy-body p { margin: 0 0 .7rem; font-size: .92rem; line-height: 1.5; }
.enquiry label.policy-accept {
    margin: 1rem 0 0; padding-top: .9rem; border-top: 1px solid var(--k4k-line);
    font-weight: 700; align-items: center;
}
.enquiry label.policy-accept input { width: 1.35rem; height: 1.35rem; }

/* The form itself, until the policy is accepted. */
.enquiry fieldset.gated { border: 0; padding: 0; margin: 0; }
.enquiry fieldset.gated[disabled] { opacity: .45; }
.enquiry fieldset.gated[disabled] * { cursor: not-allowed; }

/* ---- collection time setup ------------------------------------------------------------------- */
.casework table.simple td.narrow { white-space: nowrap; }
.casework table.simple td.narrow input[type="number"] {
    width: 4.5rem; padding: .3rem .4rem; font: inherit;
    border: 1px solid var(--k4k-line); border-radius: 4px;
}
.casework table.simple td.narrow .unit { color: var(--k4k-muted); font-size: .8rem; margin-left: .3rem; }
.casework table.simple .muted { color: var(--k4k-muted); font-size: .85rem; }
