/* =========================================================
   KENEWA members system (sign in, members area, committee area)
   Same colours as the website (css/style.css :root): green on white,
   light green tints for backgrounds, red only for urgent things.
   ========================================================= */
body.app, .login-page { background: var(--stone); }

/* ---------- Top bar ---------- */
.app-top { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 1030; }
.app-top-inner { max-width: 1320px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .6rem 1rem; }
.app-top-actions { display: flex; align-items: center; gap: .6rem; }
.brand-name { display: block; font-weight: 800; font-size: 1.1rem; line-height: 1.1; color: var(--green); }
.brand-sub { display: block; font-size: .76rem; font-weight: 500; color: var(--muted); }
.top-icon { position: relative; display: inline-flex; align-items: center; gap: .4rem; height: 40px; min-width: 40px; padding: 0 .55rem; justify-content: center;
    border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--ink); text-decoration: none; font-weight: 600; font-size: .9rem; }
.top-icon:hover { background: var(--tint); color: var(--green-deep); }
.top-whatsapp { color: #075E54; border-color: rgba(7, 94, 84, .3); background: rgba(37, 211, 102, .1); }
.top-icon .count { position: absolute; top: -6px; right: -6px; }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--green); color: #fff; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .9rem; }
.app-top .btn { white-space: nowrap; display: inline-flex; align-items: center; gap: .35rem; }
@media (max-width: 575px) {
    .app-top .brand > span { display: none; }
    .app-top-actions { gap: .4rem; }
    .app-top #logout { padding-inline: .6rem; }
    .app-top .avatar { display: none; }               /* keeps the top bar inside narrow phone screens */
    .app-top #committee-link { padding-inline: .55rem; }
}
/* Phones: the top bar must never be wider than the screen, or the whole
   page slides sideways. Sign out shows as an icon (its name is still read
   out), and on the narrowest screens Committee does too. */
.app-top-actions { min-width: 0; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 767px) {
    .app-top-inner { gap: .5rem; padding-inline: .75rem; }
    .app-top-actions { gap: .35rem; }
    .app-top .top-icon { min-width: 40px; padding: 0 .45rem; }
    .app-top #logout { width: 40px; height: 40px; padding: 0; justify-content: center; }
    .app-top #committee-link svg { display: none; }
    .app-top #logout .top-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
@media (max-width: 400px) {
    .app-top #committee-link { width: 40px; height: 40px; padding: 0; justify-content: center; }
    .app-top #committee-link svg { display: inline; }
    .app-top #committee-link .top-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
body.app { overflow-x: clip; }

/* ---------- Layout: side menu + main ---------- */
.app-shell { max-width: 1320px; margin: 0 auto; display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 1.5rem; padding: 1.5rem 1rem 4rem; }
.side { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: .8rem; align-self: start; position: sticky; top: 76px; }
.side-label { font-size: .75rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: .9rem .7rem .35rem; }
.side-label:first-child { margin-top: .2rem; }
.side button { display: flex; width: 100%; align-items: center; gap: .7rem; background: none; border: 0; text-align: left;
    padding: .62rem .75rem; font-weight: 500; color: var(--ink); border-radius: 10px; margin-bottom: 2px; }
.side button svg { color: var(--muted); flex-shrink: 0; }
.side button:hover { background: var(--tint); }
.side button.on { background: var(--tint-2); color: var(--green-deep); font-weight: 700; }
.side button.on svg { color: var(--green); }
.side button .count { margin-left: auto; }
.count { background: var(--red); color: #fff; font-size: .72rem; font-weight: 700; border-radius: 999px; padding: .05rem .45rem; min-width: 1.3rem; text-align: center; line-height: 1.4; }
.side-help { margin-top: 1rem; padding: .9rem; border-radius: 12px; background: rgba(178, 59, 53, .06); font-size: .9rem; }
.side-help .btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; }
.app-main { min-width: 0; }
.view h1 { font-size: clamp(1.6rem, 3vw, 2rem); font-weight: 800; margin-bottom: 1.1rem; color: var(--ink); }

/* phone: bottom tab bar instead of the side menu */
.tabbar { display: none; }
@media (max-width: 991px) {
    .app-shell { grid-template-columns: 1fr; padding: 1rem .75rem 6.5rem; }
    .side { display: none; }
    .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030;
        background: #fff; border-top: 1px solid var(--line); padding: .3rem .3rem calc(.3rem + env(safe-area-inset-bottom)); box-shadow: 0 -6px 20px rgba(16,24,40,.06); }
    .tabbar button { background: none; border: 0; display: flex; flex-direction: column; align-items: center; gap: .1rem; padding: .35rem 0;
        color: var(--muted); font-size: .72rem; font-weight: 600; border-radius: 10px; }
    .tabbar button.on { color: var(--green-deep); background: var(--tint-2); }
}

/* ---------- Cards ---------- */
.panel { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 1.4rem; margin-bottom: 1.2rem; box-shadow: 0 1px 2px rgba(16,24,40,.04); }
.panel h2 { font-size: 1.15rem; font-weight: 700; margin-bottom: 1rem; }
.login { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 2rem; width: 100%; max-width: 440px; box-shadow: var(--shadow); }

/* ---------- Dashboard: welcome card ---------- */
.welcome { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.2rem; color: #fff; border-radius: 16px;
    padding: 1.6rem 1.8rem; margin-bottom: 1.2rem; position: relative; overflow: hidden;
    background: radial-gradient(circle at 92% 10%, rgba(240,207,138,.28), transparent 40%), linear-gradient(120deg, var(--green-night), var(--green)); }
.welcome::after { content: ""; position: absolute; right: -40px; bottom: -60px; width: 220px; height: 220px; border-radius: 50%; background: rgba(255,255,255,.06); }
.welcome-hi { font-size: clamp(1.6rem, 3.4vw, 2.2rem); font-weight: 800; margin: 0; }
.welcome-sub { margin: .2rem 0 .8rem; opacity: .9; }
.welcome-meta { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; font-weight: 600; font-size: .9rem; }
.welcome-meta > span:first-child { background: rgba(255,255,255,.14); padding: .2rem .7rem; border-radius: 999px; }
.welcome-progress { display: flex; align-items: center; gap: 1rem; position: relative; z-index: 1; }
.progress-ring { --p: 0; width: 84px; height: 84px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center;
    background: conic-gradient(var(--mint) calc(var(--p) * 1%), rgba(255,255,255,.18) 0); transition: background .6s; }
.progress-ring span { width: 64px; height: 64px; border-radius: 50%; background: var(--green-night); display: grid; place-items: center; font-weight: 800; }

/* summary tiles: tap to open that section */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1.2rem; }
.stat { display: grid; grid-template-columns: 46px minmax(0, 1fr); column-gap: .85rem; align-items: center; text-align: left;
    background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 1rem; transition: transform .15s, box-shadow .15s, border-color .15s; }
.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: rgba(var(--green-rgb), .35); }
.stat-icon { grid-row: 1 / span 2; width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--tint-2); color: var(--green); }
.stat .k { font-size: .82rem; color: var(--muted); font-weight: 600; align-self: end; }
.stat .v { font-size: 1.2rem; font-weight: 800; color: var(--ink); align-self: start; overflow-wrap: anywhere; }
@media (max-width: 1199px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 420px) {
    .stat { grid-template-columns: 1fr; row-gap: .4rem; }
    .stat-icon { grid-row: auto; width: 38px; height: 38px; }
    .stat .v { font-size: 1.05rem; }
}

/* WhatsApp card */
.wa-card { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; border-radius: 14px; padding: 1.1rem 1.3rem; margin-bottom: 1.2rem;
    background: rgba(37, 211, 102, .1); border: 1px solid rgba(7, 94, 84, .2); }
.wa-icon { width: 54px; height: 54px; border-radius: 14px; background: #075E54; color: #fff; display: grid; place-items: center; flex-shrink: 0; }
.wa-text { flex: 1; min-width: 200px; }
.wa-text h2 { font-size: 1.1rem; font-weight: 700; margin: 0 0 .15rem; color: #1E3324; }
.wa-text p { margin: 0; color: var(--muted); }
.btn-whatsapp { background: #075E54; color: #fff; border: 0; }
.btn-whatsapp:hover { background: #1E3324; color: #fff; }
.wa-locked { background: #fff; border-style: dashed; border-color: var(--line); }
.wa-locked .wa-icon { background: var(--line); color: var(--muted); }

/* quick actions */
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: .8rem; margin-bottom: 1.2rem; }
.quick-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .45rem; padding: 1rem .5rem; text-align: center;
    background: #fff; border: 1px solid var(--line); border-radius: 14px; color: var(--ink); font-weight: 600; text-decoration: none; transition: background .15s, border-color .15s; }
.quick-btn svg { color: var(--green); }
.quick-btn:hover { background: var(--tint); border-color: rgba(var(--green-rgb), .35); color: var(--green-deep); }
@media (max-width: 575px) { .quick { grid-template-columns: repeat(2, 1fr); } }

/* checklist */
.steps-check { list-style: none; padding: 0; margin: 0; }
.steps-check li { display: flex; gap: .8rem; align-items: flex-start; padding: .7rem 0; border-bottom: 1px solid var(--line-soft); }
.steps-check li:last-child { border-bottom: 0; }
.steps-check .tick { width: 1.6rem; height: 1.6rem; border-radius: 50%; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
    border: 2px solid var(--line); font-weight: 700; font-size: .85rem; color: #fff; }
.steps-check li.done .tick { background: var(--green); border-color: var(--green); }
.steps-check li.now .tick { border-color: var(--green); box-shadow: 0 0 0 4px var(--tint-2); }
.steps-check li.done .what { color: var(--muted); }
.steps-check .what { font-weight: 600; }
.steps-check .hint { color: var(--muted); font-size: .9rem; }

/* notifications */
.notes { list-style: none; padding: 0; margin: 0; }
.notes li { display: grid; grid-template-columns: 12px 1fr auto; gap: .9rem; padding: .9rem 0; border-bottom: 1px solid var(--line-soft); cursor: pointer; }
.notes li:last-child { border-bottom: 0; }
.dot { width: 10px; height: 10px; border-radius: 50%; margin-top: .45rem; background: transparent; }
.notes li.unread .dot { background: var(--red); }
.notes li.unread .t { font-weight: 700; }
.notes .meta { color: var(--muted); font-size: .85rem; white-space: nowrap; }
.notes p { margin: .2rem 0 0; color: var(--muted); }
@media (max-width: 575px) { .notes li { grid-template-columns: 12px 1fr; } .notes .meta { grid-column: 2; } }

/* ---------- Pills, messages ---------- */
.pill { display: inline-block; font-size: .78rem; font-weight: 600; padding: .15rem .6rem; border-radius: 999px; }
.pill.green { background: #DFEFE1; color: #2A4A2F; }
.pill.amber { background: #FEF0C7; color: #7A4B00; }
.pill.grey { background: #EFF0EA; color: #3E4136; }
.pill.red { background: #F6E1DF; color: #8F2E29; }
.welcome .pill { background: rgba(255,255,255,.92); }
.msg { padding: .8rem 1rem; margin: 0 0 1rem; border-left: 4px solid var(--green); background: var(--tint); border-radius: 0 10px 10px 0; }
.msg.error { border-color: var(--red); background: #F8E6E4; color: #7A0C12; }
.msg.warn { border-color: #B7791F; background: #FEF6E4; }
.setup-note { background: var(--red); color: #fff; padding: .8rem 1rem; text-align: center; font-weight: 600; }
.setup-note code { color: #fff; background: rgba(0,0,0,.25); padding: .1rem .35rem; }
.empty { color: var(--muted); font-style: italic; }
.ok { color: var(--green); }
.warn { color: #7A4B00; }
.toast-box { position: fixed; left: 50%; bottom: 1.5rem; transform: translateX(-50%); z-index: 2000; background: var(--green-night); color: #fff;
    padding: .7rem 1.1rem; border-radius: 10px; box-shadow: var(--shadow); font-weight: 500; max-width: calc(100% - 2rem); }
@media (max-width: 991px) { .toast-box { bottom: 5.5rem; } }

/* ---------- Forms ---------- */
.form-section-title { font-size: 1.02rem; font-weight: 700; color: var(--green-deep); margin: 1.6rem 0 .8rem; padding-top: 1rem; border-top: 1px solid var(--line-soft); }
.form-section-title:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.choice-cards { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.choice-cards .form-check { margin: 0; background: #fff; }
.choice-cards .form-check:has(input:checked) { border-color: var(--green); background: var(--tint); }
@media (max-width: 575px) { .choice-cards { grid-template-columns: 1fr; } }

/* support type tiles */
.type-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; }
.type-tiles label { position: relative; }
.type-tiles input { position: absolute; opacity: 0; inset: 0; }
.type-tiles span { display: flex; align-items: center; justify-content: center; text-align: center; min-height: 58px; padding: .5rem; border: 1px solid var(--line);
    border-radius: 10px; font-weight: 600; font-size: .88rem; cursor: pointer; background: #fff; transition: background .15s, border-color .15s; }
.type-tiles span:hover { background: var(--tint); }
.type-tiles input:checked + span { border-color: var(--green); background: var(--tint-2); color: var(--green-deep); box-shadow: inset 0 0 0 1px var(--green); }
.type-tiles input:focus-visible + span { outline: 3px solid rgba(var(--green-rgb), .45); outline-offset: 2px; }
@media (max-width: 767px) { .type-tiles { grid-template-columns: repeat(2, 1fr); } }

/* attach documents */
.dropzone { display: flex; align-items: center; gap: .9rem; padding: 1rem 1.1rem; border: 2px dashed rgba(var(--green-rgb), .35); border-radius: 12px;
    background: var(--tint); cursor: pointer; margin: 0; transition: background .15s, border-color .15s; }
.dropzone svg { color: var(--green); flex-shrink: 0; }
.dropzone:hover, .dropzone.over { background: var(--tint-2); border-color: var(--green); }
.dropzone .note { margin: 0; font-size: .85rem; }
#s-files:focus-visible + .file-list, .dropzone:focus-within { outline: 3px solid rgba(var(--green-rgb), .45); }
.file-list, .attach-list { list-style: none; padding: 0; margin: .6rem 0 0; }
.file-list li { display: flex; align-items: center; gap: .6rem; padding: .45rem .7rem; border: 1px solid var(--line); border-radius: 8px; margin-bottom: .35rem; background: #fff; }
.file-list .fname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.attach-list li { margin-bottom: .2rem; }
.attach-box { background: var(--stone); border-radius: 10px; padding: .7rem .9rem; margin-bottom: 1rem; }

/* ---------- Family ---------- */
.family-state .msg { margin-top: 0; }
.count-of { font-weight: 700; font-size: .85rem; color: var(--green-deep); background: var(--tint-2); padding: .15rem .65rem; border-radius: 999px; white-space: nowrap; }
.count-of.full { color: #8F2E29; background: #F6E1DF; }
.fill-bar { height: 6px; border-radius: 999px; background: var(--line-soft); margin: -.4rem 0 .8rem; overflow: hidden; }
.fill-bar span { display: block; height: 100%; background: var(--green); border-radius: 999px; transition: width .4s; }
.change-to { margin-top: .35rem; padding: .35rem .6rem; background: #FEF6E4; border-radius: 8px; font-size: .92rem; }
.change-to span { font-weight: 700; color: #7A4B00; margin-right: .2rem; }
.form-mode { font-size: .92rem; color: var(--green-deep); }

/* ---------- Payments ---------- */
.paynow-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1.2rem; }
.amount-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.amount-chips .chip { border: 1px solid var(--line); background: #fff; color: var(--ink); font-weight: 600; padding: .4rem .9rem; border-radius: 999px; font-size: .88rem; }
.amount-chips .chip[aria-pressed="true"] { background: var(--green); border-color: var(--green); color: #fff; }
.pay-options { display: grid; grid-template-columns: 1.15fr 1fr 1fr; gap: 1rem; align-items: start; }
@media (max-width: 1199px) { .pay-options { grid-template-columns: 1fr 1fr; } .pay-option-card { grid-column: 1 / -1; } }
@media (max-width: 575px) { .pay-options { grid-template-columns: 1fr; } }
.pay-option { position: relative; border: 1px solid var(--line); border-radius: 12px; padding: 1.1rem; background: #fff; }
.pay-option h3 { font-size: 1.02rem; font-weight: 700; margin: .2rem 0 .4rem; }
.pay-option-card { border-color: rgba(var(--green-rgb), .35); background: var(--tint); }
.pay-badge { display: inline-block; font-size: .72rem; font-weight: 700; padding: .1rem .55rem; border-radius: 999px; background: var(--green); color: #fff; }
.pay-badge-free { background: var(--tint-2); color: var(--green-deep); }
.copy-row { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; background: var(--stone); border-radius: 8px; padding: .5rem .6rem; margin-bottom: .5rem; }
.copy-val { font-weight: 700; flex: 1; min-width: 0; word-break: break-all; }
.copy-btn { display: inline-flex; align-items: center; gap: .3rem; }
.copy-list { margin: 0; }
.copy-list div { display: grid; grid-template-columns: 6.5rem 1fr; gap: .4rem; padding: .3rem 0; border-bottom: 1px solid var(--line-soft); }
.copy-list dt { font-size: .82rem; color: var(--muted); font-weight: 600; }
.copy-list dd { margin: 0; font-weight: 600; word-break: break-word; }
#pay-ref { white-space: nowrap; font-weight: 700; letter-spacing: .02em; }
.pay-ref { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem; margin: 1.1rem 0 .6rem; }
.pay-summary { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.pay-summary div { display: flex; justify-content: space-between; padding: .65rem 1rem; border-bottom: 1px solid var(--line); }
.pay-summary div:last-child { border-bottom: 0; }
.pay-total { background: var(--tint); font-weight: 700; color: var(--green-deep); font-size: 1.05rem; }

/* ---------- Tables, requests ---------- */
table.list { width: 100%; border-collapse: collapse; }
table.list th { font-size: .8rem; color: var(--muted); text-align: left; padding: .5rem .4rem; border-bottom: 1px solid var(--line); text-transform: uppercase; letter-spacing: .04em; }
table.list td { padding: .7rem .4rem; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.table-wrap { overflow-x: auto; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: var(--tint); }
.req { padding: .8rem 0; border-bottom: 1px solid var(--line-soft); }
.req:last-child { border-bottom: 0; }
.req-note { background: var(--tint); padding: .5rem .7rem; margin: .4rem 0 0; font-size: .92rem; border-radius: 8px; }
.detail-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .3rem 1.5rem; }
.detail-grid div { padding: .45rem 0; border-bottom: 1px solid var(--line-soft); }
.detail-grid span { display: block; font-size: .8rem; color: var(--muted); font-weight: 600; }
@media (max-width: 575px) { .detail-grid { grid-template-columns: 1fr; } }
.admin-detail { border-top: 4px solid var(--green); }
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.filters .form-select { width: auto; }
.card-id { background: linear-gradient(120deg, var(--green-night), var(--green)); color: #fff; padding: 1.6rem; max-width: 460px; border-radius: 14px; }

/* ---------- Sign-in page ---------- */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 2rem 1rem;
    background: linear-gradient(180deg, var(--green-night) 0 36%, var(--stone) 36%); }
.login h1 { font-size: 1.7rem; font-weight: 800; }
.login .brand-name { color: var(--green); }
.auth-tabs { display: flex; gap: .3rem; margin-bottom: 1.2rem; background: var(--stone); padding: .25rem; border-radius: 10px; }
.auth-tabs button { flex: 1; background: none; border: 0; padding: .55rem .9rem; font-weight: 600; color: var(--muted); border-radius: 8px; }
.auth-tabs button.on { background: #fff; color: var(--green-deep); box-shadow: 0 1px 3px rgba(16,24,40,.12); }
.signed-in h1 { margin-bottom: .6rem; }

/* committee area on phones: the menu becomes a scrolling row */
@media (max-width: 991px) {
    .side.side-scroll { display: flex; overflow-x: auto; gap: .3rem; padding: .4rem; position: static; }
    .side.side-scroll button { white-space: nowrap; width: auto; margin: 0; }
}

/* =========================================================
   First step: choose membership type
   ========================================================= */
body.choosing .side, body.choosing .tabbar, body.choosing #top-whatsapp,
body.choosing [data-go="notifications"], body.choosing #committee-link { display: none !important; }
body.choosing .app-shell { grid-template-columns: 1fr; max-width: 980px; }
.choose-head { text-align: center; margin: .5rem auto 1.6rem; max-width: 40rem; }
.choose-head .welcome-hi { color: var(--green); font-size: 1.1rem; font-weight: 700; margin-bottom: .2rem; }
.choose-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; align-items: stretch; }
@media (max-width: 767px) { .choose-grid { grid-template-columns: 1fr; } }
.choose-card { position: relative; display: flex; flex-direction: column; gap: .6rem; text-align: left; background: #fff; color: var(--ink);
    border: 1.5px solid var(--line); border-radius: 16px; padding: 1.6rem 1.4rem 1.4rem; box-shadow: var(--shadow);
    transition: border-color .15s, transform .15s; }
.choose-card:hover, .choose-card:focus-visible { border-color: var(--green); transform: translateY(-2px); }
.choose-featured { border-color: rgba(var(--green-rgb), .5); border-top: 5px solid var(--green); }
.choose-badge { position: absolute; top: -.8rem; right: 1.2rem; background: var(--green-deep); color: #fff; font-size: .76rem; font-weight: 700;
    padding: .2rem .7rem; border-radius: 999px; }
.choose-price { font-size: 2.1rem; font-weight: 800; color: var(--green); line-height: 1; }
.choose-price small { font-size: .95rem; font-weight: 600; color: var(--muted); }
.choose-title { font-size: 1.2rem; font-weight: 700; }
.choose-card ul { list-style: none; padding: 0; margin: 0 0 .2rem; flex: 1; }
.choose-card li { position: relative; padding: .35rem 0 .35rem 1.6rem; border-bottom: 1px solid var(--line-soft); font-size: .95rem; }
.choose-card li::before { content: ""; position: absolute; left: .15rem; top: .7rem; width: .45rem; height: .8rem; border: solid var(--green);
    border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.choose-note { font-size: .86rem; color: var(--muted); }
.choose-card .btn { pointer-events: none; }

/* =========================================================
   Member services
   ========================================================= */
.side-lock { margin-left: auto; color: var(--muted); }
.svc-banner { display: flex; flex-wrap: wrap; align-items: center; gap: .9rem; border-radius: 14px; padding: 1rem 1.2rem; margin-bottom: 1.2rem; }
.svc-banner > div { flex: 1; min-width: 220px; }
.svc-banner.open { background: var(--tint-2); color: var(--green-deep); }
.svc-banner.locked { background: #fff; border: 1.5px dashed rgba(var(--green-rgb), .45); }
.svc-banner.locked > svg { color: var(--green); }
.svc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 991px) { .svc-grid { grid-template-columns: minmax(0, 1fr); } }
.svc { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 1.2rem 1.3rem; box-shadow: 0 1px 2px rgba(16,24,40,.04); }
.svc.live.svc-voting, .svc.live.svc-docs { grid-column: 1 / -1; }
.svc-head { display: flex; align-items: center; gap: .7rem; margin-bottom: .6rem; }
.svc-head h2 { font-size: 1.08rem; font-weight: 700; margin: 0; flex: 1; }
.svc-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--tint-2); color: var(--green); flex-shrink: 0; }
.svc-desc { color: var(--muted); margin: 0; font-size: .95rem; }
.svc-tag { font-size: .74rem; font-weight: 700; padding: .15rem .6rem; border-radius: 999px; white-space: nowrap; display: inline-flex; align-items: center; gap: .25rem; }
.svc-tag.lock { background: #EFF0EA; color: #545849; }
.svc-tag.soon { background: #FEF0C7; color: #7A4B00; }
/* locked placeholders: greyed out, not usable */
.svc.locked { background: #F7F8F8; box-shadow: none; filter: grayscale(1); opacity: .6; user-select: none; }
.svc.locked .svc-icon { background: #E4E5DC; color: #686C5E; }
.svc.soon .svc-icon { background: var(--line-soft); }
.svc-sub { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 1rem 0 .4rem; }
.svc-teaser { display: flex; align-items: center; gap: .9rem; width: 100%; text-align: left; border-radius: 14px; padding: 1rem 1.2rem; margin-bottom: 1.2rem;
    border: 1px solid var(--line); background: #fff; color: var(--ink); }
.svc-teaser > svg { color: var(--green); flex-shrink: 0; }
.svc-teaser > span:nth-child(2) { flex: 1; }
.svc-teaser.open { background: var(--tint); border-color: rgba(var(--green-rgb), .3); }
.svc-teaser.locked { border-style: dashed; }
.svc-teaser.locked > svg { color: var(--muted); }

/* voting */
.poll { border: 1px solid var(--line); border-radius: 12px; padding: 1rem 1.1rem; margin-bottom: .8rem; }
.poll h3 { font-size: 1.05rem; font-weight: 700; margin: .5rem 0 .3rem; }
.poll-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .4rem; align-items: center; }
.poll-options { display: grid; gap: .45rem; margin: .6rem 0; }
.poll-options label { position: relative; display: block; }
.poll-options input { position: absolute; opacity: 0; inset: 0; }
.poll-options span { display: block; padding: .7rem .9rem; border: 1.5px solid var(--line); border-radius: 10px; font-weight: 600; cursor: pointer; background: #fff; }
.poll-options span:hover { background: var(--tint); }
.poll-options input:checked + span { border-color: var(--green); background: var(--tint-2); color: var(--green-deep); }
.poll-options input:focus-visible + span { outline: 3px solid rgba(var(--green-rgb), .45); outline-offset: 2px; }
.voted { color: var(--green-deep); font-weight: 600; margin: 0; }
.poll.closed { background: var(--stone); border-color: transparent; }
.result { display: grid; grid-template-columns: minmax(0, 9rem) 1fr 5.6rem; gap: .6rem; align-items: center; margin: .35rem 0; font-size: .93rem; }
.r-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.r-bar { height: 10px; border-radius: 999px; background: #E4E5DC; overflow: hidden; }
.r-bar span { display: block; height: 100%; background: #9CA3AF; border-radius: 999px; }
.result.win .r-bar span { background: var(--green); }
.result.win .r-label { font-weight: 700; }
.r-num { color: var(--muted); font-size: .85rem; white-space: nowrap; text-align: right; }

/* membership card */
.member-card { max-width: 380px; aspect-ratio: 1.586; color: #fff; border-radius: 16px; padding: 1.1rem 1.3rem; display: flex; flex-direction: column;
    background: radial-gradient(circle at 90% 0%, rgba(240,207,138,.3), transparent 45%), linear-gradient(130deg, var(--green-night), var(--green));
    box-shadow: 0 10px 30px -10px rgba(30,51,36,.6); -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.mc-top { display: flex; align-items: center; gap: .6rem; }
.mc-top img { background: #fff; border-radius: 50%; padding: 2px; }
.mc-top strong { display: block; font-size: 1.1rem; letter-spacing: .03em; }
.mc-top span { display: block; font-size: .68rem; opacity: .85; }
.mc-name { font-size: 1.25rem; font-weight: 700; margin: auto 0 .4rem; }
.mc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .3rem .8rem; font-size: .85rem; font-weight: 600; }
.mc-grid span { display: block; font-size: .66rem; font-weight: 500; opacity: .8; text-transform: uppercase; letter-spacing: .05em; }
.mc-motto { margin: .5rem 0 0; font-size: .72rem; opacity: .8; font-style: italic; }


/* welfare cover and documents */
.cover-list, .doc-list { list-style: none; padding: 0; margin: 0; }
.cover-list li { padding: .3rem 0 .3rem 1.4rem; position: relative; }
.cover-list li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 700; }
.doc-list li { display: flex; justify-content: space-between; gap: .8rem; padding: .55rem 0; border-bottom: 1px solid var(--line-soft); }
.doc-list a { font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: .4rem; }

/* committee area: votes */
.option-rows input { margin-bottom: .4rem; }

/* ---------- Practice account ---------- */
.practice-box { margin-top: 1.4rem; padding: 1rem; border: 1px dashed var(--green, #346040); border-radius: 12px; background: rgba(52,96,64,.05); }
.practice-login { display: grid; grid-template-columns: auto 1fr; gap: .2rem .8rem; margin: .7rem 0; }
.practice-login div { display: contents; }
.practice-login dt { font-weight: 600; }
.practice-login dd { margin: 0; font-family: ui-monospace, Menlo, Consolas, monospace; }
.demo-bar { position: relative; z-index: 1031; display: flex; align-items: center; gap: .2rem .6rem;
    background: #FEF3C7; color: #78350F; border-bottom: 1px solid #F59E0B; padding: 0 .6rem; font-size: .85rem; min-height: 44px; }
.demo-bar a, .demo-bar button { color: #78350F; font-weight: 600; background: none; border: 0; padding: 0 .35rem; text-decoration: underline;
    min-height: 44px; display: inline-flex; align-items: center; white-space: nowrap; }
.demo-bar span { flex: 1 1 auto; }
@media (max-width: 575px) { .demo-bar .demo-long { display: none; } }
/* phones: hide the Method column in payment history so the status fits */
@media (max-width: 575px) {
    #view-payments table.list th:nth-child(4), #view-payments table.list td:nth-child(4) { display: none; }
}

/* ---------- Bigger tap targets (at least 44px) ---------- */
.steps-check .btn-link, .notes + .btn-link, .svc .btn-link, .panel > .btn-link { min-height: 44px; display: inline-flex; align-items: center; padding-left: .5rem !important; padding-right: .5rem !important; }
.copy-btn, .amount-chips .chip, .btn-sm { min-height: 40px; }
.tabbar button { position: relative; min-height: 48px; }
.tabbar .tab-count { position: absolute; top: 2px; right: 22%; font-size: .65rem; }

/* ---------- Community hub ---------- */
.hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .8rem; }
.hub { display: flex; flex-direction: column; align-items: flex-start; gap: .35rem; text-align: left; background: #fff; border: 1px solid var(--line);
    border-radius: 14px; padding: 1rem; color: var(--ink); min-height: 120px; }
.hub:hover { border-color: var(--green); }
.hub strong { font-size: 1.05rem; }

/* dashboard strip */
.dash-community { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .8rem; margin-bottom: 1.2rem; }
.dash-community:empty { display: none; }
.dash-card { display: flex; gap: .8rem; align-items: flex-start; text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: .9rem 1rem; color: var(--ink); }
.dash-card .k { display: block; font-size: .78rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.dash-card strong { display: block; line-height: 1.3; }
.dash-card.appeal-card { border-color: rgba(178, 59, 53, .35); background: rgba(178, 59, 53, .03); }
.install-card { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem; background: #fff; border: 1px dashed var(--green); border-radius: 14px; padding: .9rem 1rem; margin-bottom: 1.2rem; }
.install-card > div { flex: 1 1 12rem; }

/* renewal */
.renew-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .8rem; border-radius: 14px; padding: 1rem 1.1rem; margin-bottom: 1rem; }
.renew-banner.soon { background: #FEF3C7; color: #78350F; border: 1px solid #F59E0B; }
.renew-banner.late { background: rgba(178, 59, 53, .07); color: #7F1D1D; border: 1px solid rgba(178, 59, 53, .4); }
.paid-until { background: var(--tint); border-radius: 10px; padding: .6rem .9rem; display: inline-block; }

/* appeals */
.appeal h2, .ev-rsvp h2, .meeting h2 { font-size: 1.3rem; font-weight: 700; margin-bottom: .3rem; }
.appeal-progress { background: var(--stone); border-radius: 12px; padding: .8rem 1rem; margin: .6rem 0; }
.appeal-progress .fill-bar { height: 10px; margin: .5rem 0; }
.appeal-mine { background: #FEF3C7; color: #78350F; border-radius: 10px; padding: .6rem .9rem; }
.appeal-mine.ok { background: var(--tint-2); color: var(--green-deep); }
.appeal-pay { border: 1px solid var(--line); border-radius: 12px; padding: .9rem 1rem; }
.appeal-pay .copy-row { margin-bottom: .4rem; }

/* RSVP and meetings: segmented buttons */
.seg { display: flex; gap: .4rem; flex-wrap: wrap; }
.seg-btn { flex: 1 1 5rem; min-height: 44px; border: 1px solid var(--line); background: #fff; border-radius: 10px; font-weight: 600; color: var(--ink); }
.seg-btn[aria-pressed="true"] { background: var(--green); border-color: var(--green); color: #fff; }
.bring-list { list-style: none; padding: 0; margin: 0; }
.bring-list li { display: flex; justify-content: space-between; align-items: center; gap: .6rem; padding: .45rem 0; border-bottom: 1px solid var(--line-soft); }
.meeting-docs { display: flex; flex-wrap: wrap; gap: .4rem; }

/* directory */
.dir-list { list-style: none; padding: 0; margin: 1rem 0 0; }
.dir-list li { display: flex; align-items: center; gap: .8rem; padding: .7rem 0; border-bottom: 1px solid var(--line-soft); }
.dir-list .avatar { flex: none; }
.dir-text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.dir-actions { display: flex; gap: .4rem; }
.dir-actions .btn { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }

/* receipts and statements: printed on their own */
#print-area { display: none; }
@media print {
    body.print-doc > *:not(#print-area) { display: none !important; }
    body.print-doc #print-area { display: block !important; color: #000; font-size: 11pt; padding: 0 .5cm; }
}
.doc-head { display: flex; gap: 12px; align-items: center; border-bottom: 3px solid #346040; padding-bottom: 10px; margin-bottom: 16px; }
#print-area h1 { font-size: 18pt; margin: 0 0 8px; }
.doc-table { width: 100%; border-collapse: collapse; margin: 12px 0; }
.doc-table th, .doc-table td { border-bottom: 1px solid #ccc; padding: 6px 4px; text-align: left; vertical-align: top; }
.doc-table th { width: 40%; }
.doc-list-table th { width: auto; }
.doc-note { color: #444; font-size: 10pt; }
.msg-list { list-style: none; padding: 0; margin: .6rem 0; }
.msg-list li { border-left: 3px solid var(--green); background: var(--stone); padding: .6rem .8rem; margin-bottom: .5rem; }

/* ---------- Text size in the members, committee and sign-in areas (October 2026) ----------
   These areas use Lexend, a wide font: 15px of Lexend reads like 16-17px of Arial.
   Normal = 15px, Large = 17px, Extra large = 19px, chosen with the A A A buttons (saved on the device).
   (Was 18px / 20px / 22px, sized for the narrower Inter font, which made Normal look too big.) */
html { font-size: 93.75%; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }   /* 15px */
html[data-text="large"] { font-size: 106.25%; }      /* 17px */
html[data-text="xlarge"] { font-size: 118.75%; }     /* 19px */
body.app, body.auth-body { font-size: 1rem; line-height: 1.55; }
/* iPhones zoom into form boxes with text under 16px, so form boxes never go below 16px */
body.app :is(input, select, textarea, .form-control, .form-select), body.auth-body :is(input, select, textarea, .form-control, .form-select) { font-size: max(16px, 1rem); }
.brand-sub, .side-label, .svc-sub, .dash-card .k { font-size: .8rem; }
.count, .pay-badge, .svc-tag, .choose-badge { font-size: .8rem; }
.pill { font-size: .85rem; }
.stat .k, .copy-list dt { font-size: .88rem; }
.note, .notes .meta, .dropzone .note { font-size: .95rem; }
.tabbar button { font-size: .8rem; }
.tabbar .tab-count { font-size: .72rem; }
.notes li.empty { display: block; cursor: default; }       /* "No notifications yet." on one line */
.text-size-btn { font-weight: 800; letter-spacing: -.02em; min-width: 44px; min-height: 44px; }
.text-size-btn .ts-big { font-size: 1.15em; }
/* larger text: keep the top bar on one row */
html[data-text] .app-top .top-whatsapp span, html[data-text] #user-name { display: none !important; }
@media (max-width: 575px) { .app-top #logout { font-size: .85rem; } }
html[data-text] .demo-bar { flex-wrap: wrap; padding-top: .2rem; padding-bottom: .2rem; }
html[data-text] .welcome-hi { font-size: 1.7rem; }
@media (max-width: 575px) {
    html[data-text] .brand > span { display: none; }            /* logo only, so the buttons fit */
    html[data-text] .app-top #logout { padding-left: .5rem; padding-right: .5rem; }
}

/* ---------- Chama, mentoring, business directory ---------- */
.chama h2 { font-size: 1.3rem; font-weight: 700; margin-bottom: .3rem; }
.chama-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .6rem; }
.chama-stats > div { background: var(--stone); border-radius: 12px; padding: .7rem .9rem; display: flex; flex-direction: column; }
.chama-stats .k { font-size: .85rem; color: var(--muted); font-weight: 600; }
.chama-stats strong { font-size: 1.2rem; }
.chama-roster { list-style: none; padding: 0; margin: 0; }
.chama-roster li { display: grid; grid-template-columns: 2.2rem 1fr auto; gap: .6rem; align-items: center; padding: .45rem 0; border-bottom: 1px solid var(--line-soft); }
.chama-roster li.me { font-weight: 700; }
.chama-roster .pos { width: 2rem; height: 2rem; border-radius: 50%; background: var(--tint-2); color: var(--green-deep); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }
.m-about { display: block; margin-top: .2rem; }
.mentor { align-items: flex-start !important; }
.biz-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .8rem; margin-bottom: 1.2rem; }
.biz { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 1rem; display: flex; flex-direction: column; }
.biz h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: .3rem; }
.biz-cat { font-size: .85rem; color: var(--muted); font-weight: 600; margin-bottom: .2rem; }
.biz-offer { background: var(--tint-2); color: var(--green-deep); border-radius: 8px; padding: .4rem .6rem; }
.biz-actions { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: auto; }
.back-to-services { font-weight: 600; min-height: 44px; }
.chama .copy-val { overflow-wrap: break-word; word-break: normal; font-weight: 600; }

/* ---------- Reset and fresh start ---------- */
.rs-danger { border: 2px solid rgba(178, 59, 53, .35); }
.rs-items { columns: 2; margin: 0 0 .4rem; padding-left: 1.1rem; }
@media (max-width: 575px) { .rs-items { columns: 1; } }
.rs-req { border-left: 4px solid #F59E0B; padding-left: .9rem; }
.start-again { border-style: dashed; }

/* ---------- KENEWA identity in the members area ---------- */
.welcome { background: var(--msitu); position: relative; overflow: hidden; }
.welcome-hi { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.03em; }
.view h1 { font-family: var(--font-display); letter-spacing: -0.025em; color: var(--msitu-2); }
.panel h2, .hub strong, .dash-card strong, .appeal h2, .ev-rsvp h2, .meeting h2, .chama h2, .biz h3 { font-family: var(--font-display); }
.pay-badge { background: var(--msitu); }
.btn-gold { border-radius: 6px; }

/* =========================================================
   MEMBERS AREA REDESIGN (October 2026, after eCitizen)
   One account, one profile, one list of services.
   Deep forest green (msitu) for the header and the profile band,
   green for actions, maize only for focus and the current menu item,
   red (damu) only for urgent things.
   ========================================================= */
:root { --paper: #F3F6F4; --line-2: #DDE4DE; --leaf: #EBF2EC; --damu-tint: #FBEDEE; }
body.app { background: var(--paper); }

/* ---------- Header ---------- */
.pt-head { position: sticky; top: 0; z-index: 1030; background: var(--msitu); color: #fff; }
.pt-head-inner { max-width: 1320px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: .75rem; min-height: 68px; padding: .5rem 1rem; }
.pt-brand { display: flex; align-items: center; gap: .7rem; color: #fff; text-decoration: none; min-width: 0; }
.pt-brand:hover { color: #fff; }
.pt-brand img { background: #fff; border-radius: 50%; padding: 2px; flex: none; }
.pt-brand strong { display: block; font-family: var(--font-display); font-size: 1.2rem; font-weight: 800; letter-spacing: -.01em; line-height: 1.1; }
.pt-brand span span { display: block; font-size: .85rem; color: #C2D0C4; }
.pt-head-actions { display: flex; align-items: center; gap: .5rem; }
.pt-help { display: inline-flex; align-items: center; gap: .45rem; color: #DEE9E0; text-decoration: none; font-size: .95rem; margin-right: .5rem; min-height: 44px; }
.pt-help strong { color: #fff; }
.pt-help:hover { color: #fff; }
.pt-icon { position: relative; width: 44px; height: 44px; border: 0; border-radius: 10px; background: rgba(255, 255, 255, .08); color: #fff; display: inline-grid; place-items: center; }
.pt-icon:hover { background: rgba(255, 255, 255, .16); }
.pt-icon .count { position: absolute; top: -4px; right: -4px; box-shadow: 0 0 0 2px var(--msitu); }
.pt-account { position: relative; }
.pt-account-btn { display: inline-flex; align-items: center; gap: .55rem; min-height: 44px; padding: .2rem .7rem .2rem .25rem; border: 0; border-radius: 999px;
    background: rgba(255, 255, 255, .08); color: #fff; font-weight: 700; }
.pt-account-btn:hover, .pt-account-btn[aria-expanded="true"] { background: rgba(255, 255, 255, .16); }
.pt-account-btn .avatar { width: 36px; height: 36px; background: var(--mahindi); color: var(--msitu); font-size: .9rem; }
.pt-account-btn[aria-expanded="true"] > svg { transform: rotate(180deg); }
.pt-menu { position: absolute; right: 0; top: calc(100% + .5rem); width: 300px; max-width: calc(100vw - 1.5rem); z-index: 1040;
    background: #fff; color: var(--ink); border: 1px solid var(--line-2); border-radius: 12px; padding: .4rem; box-shadow: 0 18px 40px -12px rgba(26, 44, 31, .35); }
.pt-menu-head { margin: 0; padding: .7rem .8rem .8rem; border-bottom: 1px solid var(--line-2); margin-bottom: .3rem; }
.pt-menu-head strong { display: block; font-family: var(--font-display); font-size: 1.05rem; line-height: 1.25; overflow-wrap: anywhere; }
.pt-menu-head span { display: block; color: var(--muted); font-size: .9rem; }
.pt-menu-item { display: flex; align-items: center; gap: .75rem; width: 100%; min-height: 46px; padding: .5rem .8rem; border: 0; border-radius: 8px;
    background: none; color: var(--ink); font-weight: 600; text-align: left; text-decoration: none; }
.pt-menu-item:hover, .pt-menu-item:focus-visible { background: var(--leaf); color: var(--msitu); }
.pt-menu-item svg { color: var(--green); flex: none; }
.pt-menu-item[hidden] { display: none; }
.pt-menu-ts { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .6rem .8rem; margin: .3rem 0; border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); font-weight: 600; }
.pt-signout { color: var(--damu); }
.pt-signout svg { color: var(--damu); }
.pt-signout:hover { background: var(--damu-tint); color: var(--damu); }
@media (max-width: 991px) { .pt-help { display: none; } }
@media (max-width: 575px) {
    .pt-head-inner { min-height: 60px; padding-inline: .75rem; }
    .pt-brand span span { display: none; }
    .pt-account-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    .pt-account-btn { padding-right: .45rem; gap: .3rem; }
}

/* ---------- Text size: three buttons ---------- */
.ts-group { display: inline-flex; border: 1px solid var(--line-2); border-radius: 8px; overflow: hidden; background: #fff; }
.ts-group button { min-width: 44px; height: 42px; border: 0; background: #fff; color: var(--msitu); font-family: var(--font-display); font-weight: 800; line-height: 1; }
.ts-group button + button { border-left: 1px solid var(--line-2); }
.ts-group [data-textsize-set=""] { font-size: .9rem; }
.ts-group [data-textsize-set="large"] { font-size: 1.1rem; }
.ts-group [data-textsize-set="xlarge"] { font-size: 1.32rem; }
.ts-group button:hover { background: var(--leaf); }
.ts-group button[aria-pressed="true"] { background: var(--msitu); color: #fff; }
.ts-group .ts-label { align-self: center; padding: 0 .6rem; color: var(--muted); font-size: .9rem; font-weight: 600; }
.auth-util .ts-group { border: 0; background: none; }
.auth-util .ts-group button { border: 1px solid var(--line-2); border-radius: 8px; margin-left: .25rem; }
.auth-util .ts-group button + button { border-left: 1px solid var(--line-2); }

/* ---------- Layout and side menu ---------- */
@media (min-width: 992px) { .app-shell { grid-template-columns: 264px minmax(0, 1fr); gap: 2rem; padding-top: 1.75rem; } }
.side { border-color: var(--line-2); border-radius: 12px; padding: .6rem; top: 88px; box-shadow: none; }
.side-label { text-transform: none; letter-spacing: 0; font-size: .88rem; color: var(--muted); font-weight: 700; margin: 1rem .75rem .3rem; }
.side button { position: relative; min-height: 46px; border-radius: 8px; font-weight: 600; }
.side button svg { color: var(--green); }
.side button:hover { background: var(--leaf); }
.side button.on { background: var(--leaf); color: var(--msitu); font-weight: 700; }
.side button.on::before { content: ""; position: absolute; left: -.6rem; top: .5rem; bottom: .5rem; width: 4px; border-radius: 0 4px 4px 0; background: var(--mahindi); }
.side-help { background: var(--damu-tint); border-left: 4px solid var(--damu); border-radius: 0 10px 10px 0; }
.side-help .btn-help { background: var(--damu); border-color: var(--damu); color: #fff; }
.view h1 { font-size: clamp(1.7rem, 3vw, 2.1rem); color: var(--msitu-2); margin-bottom: 1.2rem; }

/* ---------- Profile band (the member's "ID") ---------- */
.welcome.profile-band { display: block; padding: 0; border-radius: 14px; background: var(--msitu); color: #fff; margin-bottom: 1.75rem; }
.welcome.profile-band::after { content: none; }
.pb-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.2rem 2rem; padding: 1.5rem 1.75rem; }
.profile-band .welcome-hi { font-size: clamp(1.7rem, 3.6vw, 2.4rem); line-height: 1.1; }
.profile-band .welcome-sub { color: #D2DDD3; opacity: 1; margin: .35rem 0 .9rem; }
.profile-band .welcome-meta > span:first-child { background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18); font-family: var(--font-display); letter-spacing: .02em; padding: .25rem .8rem; }
.profile-band .progress-ring { background: conic-gradient(var(--mahindi) calc(var(--p) * 1%), rgba(255, 255, 255, .16) 0); }
.profile-band .progress-ring span { background: var(--msitu); font-family: var(--font-display); }
.profile-band .stat-grid { margin: 0; gap: 0; background: var(--msitu-2); border-top: 1px solid rgba(255, 255, 255, .1); }
.profile-band .stat { display: flex; flex-direction: column; gap: .15rem; background: transparent; border: 0; border-radius: 0; padding: 1rem 1.4rem; color: #fff; min-height: 76px; }
.profile-band .stat + .stat { border-left: 1px solid rgba(255, 255, 255, .1); }
.profile-band .stat:hover { transform: none; box-shadow: none; background: rgba(255, 255, 255, .05); }
.profile-band .stat:focus-visible { outline-offset: -4px; }
.profile-band .stat .k { color: #C2D0C4; font-size: .88rem; align-self: auto; }
.profile-band .stat .v { color: #fff; font-family: var(--font-display); font-size: 1.15rem; align-self: auto; }
@media (max-width: 1199px) {
    .profile-band .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .profile-band .stat:nth-child(3) { border-left: 0; }
    .profile-band .stat:nth-child(n+3) { border-top: 1px solid rgba(255, 255, 255, .1); }
}
@media (max-width: 575px) {
    .pb-top { padding: 1.2rem 1.1rem; }
    .profile-band .stat { padding: .85rem 1.1rem; }
}

/* ---------- Services directory ---------- */
.svc-dir { margin-bottom: 1.75rem; }
.svc-dir-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: .8rem 1.5rem; margin-bottom: .9rem; }
.svc-dir-head h2 { font-family: var(--font-display); font-size: 1.45rem; font-weight: 800; color: var(--msitu-2); margin: 0; }
.svc-search { position: relative; flex: 0 1 24rem; }
.svc-search svg { position: absolute; left: .85rem; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.svc-search .form-control { padding-left: 2.7rem; min-height: 48px; border-color: var(--line-2); border-radius: 10px; }
.svc-dir-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line-2); border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden; }
.sd { display: flex; align-items: flex-start; gap: .9rem; min-height: 96px; padding: 1.1rem 1.2rem; border: 0; background: #fff; color: var(--ink); text-align: left; }
.sd:hover { background: #F8FAF8; }
.sd:hover strong { color: var(--green); }
.sd:focus-visible { outline-offset: -4px; position: relative; z-index: 1; }
.sd > span:last-child { color: var(--muted); font-size: .95rem; line-height: 1.4; min-width: 0; }
.sd strong { display: block; font-family: var(--font-display); font-size: 1.07rem; color: var(--msitu-2); margin-bottom: .15rem; }
.sd-ic { width: 46px; height: 46px; border-radius: 10px; background: var(--leaf); color: var(--green); display: grid; place-items: center; flex: none; }
.sd-ic-urgent { background: var(--damu-tint); color: var(--damu); }
.sd[hidden] { display: none; }
.svc-dir-grid:has(.sd[hidden]) { background: transparent; border: 0; gap: .6rem; overflow: visible; }
.svc-dir-grid:has(.sd[hidden]) .sd { border: 1px solid var(--line-2); border-radius: 10px; }
.svc-none { margin: .8rem 0 0; color: var(--muted); }
@media (max-width: 1199px) { .svc-dir-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .sd:last-child:nth-child(odd) { grid-column: 1 / -1; } }
@media (max-width: 575px) {
    .svc-dir-head h2 { font-size: 1.3rem; }
    .svc-search { flex-basis: 100%; }
    .sd { flex-direction: column; gap: .55rem; min-height: 0; padding: .95rem .9rem; }
    .sd > span:last-child { font-size: .9rem; }
    .sd-ic { width: 40px; height: 40px; }
}

/* ---------- Cards, buttons, small parts ---------- */
.panel, .svc, .hub, .dash-card, .biz, .install-card, .svc-teaser, .stat { border-color: var(--line-2); }
.panel { border-radius: 12px; box-shadow: none; }
.panel h2 { color: var(--msitu-2); }
.app .btn-gold, .auth .btn-gold { border-radius: 8px; }
.app .btn-outline-ink, .auth .btn-outline-ink { border-radius: 8px; }
.wa-card { border-radius: 12px; }
.svc-teaser, .dash-card, .install-card, .hub { border-radius: 12px; }
.hub:hover, .dash-card:hover { border-color: var(--green); }
.steps-check li.done .tick { background: var(--msitu); border-color: var(--msitu); }
.steps-check li.now .tick { border-color: var(--mahindi); box-shadow: 0 0 0 4px rgba(240, 179, 35, .25); }

/* ---------- Phone tab bar ---------- */
@media (max-width: 991px) {
    .app-shell { padding-top: 1.1rem; }
    .tabbar { border-top-color: var(--line-2); }
    .tabbar button { color: var(--muted); }
    .tabbar button.on { background: none; color: var(--msitu); font-weight: 700; }
    .tabbar button.on::before { content: ""; position: absolute; top: -.3rem; left: 22%; right: 22%; height: 3px; border-radius: 0 0 3px 3px; background: var(--mahindi); }
    .tabbar button.on svg { color: var(--green); }
}

/* ---------- Sign-in page ---------- */
body.auth-body { background: #fff; }
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
.auth-intro { position: relative; display: flex; flex-direction: column; gap: 2rem; padding: clamp(1.5rem, 3.5vw, 3rem) clamp(1.5rem, 4vw, 3.5rem);
    background: var(--msitu); color: #fff; }
.auth-brand { display: flex; align-items: center; gap: .8rem; color: #fff; text-decoration: none; }
.auth-brand:hover { color: #fff; }
.auth-brand img { background: #fff; border-radius: 50%; padding: 2px; flex: none; }
.auth-brand strong { display: block; font-family: var(--font-display); font-size: 1.35rem; font-weight: 800; line-height: 1.1; }
.auth-brand span span { display: block; color: #C2D0C4; font-size: .9rem; line-height: 1.3; }
.auth-intro-main { margin-block: auto; max-width: 31rem; }
.auth-headline { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.9rem, 3.3vw, 2.9rem); line-height: 1.06; letter-spacing: -.03em; color: #fff; text-wrap: balance; margin-bottom: 2rem; }
.auth-points { list-style: none; padding: 0; margin: 0; }
.auth-points li { display: flex; gap: 1rem; padding: 1rem 0; border-top: 1px solid rgba(255, 255, 255, .14); max-width: none; }
.auth-points svg { width: 26px; height: 26px; color: var(--mahindi); flex: none; margin-top: .1rem; }
.auth-points strong { display: block; font-family: var(--font-display); font-size: 1.12rem; color: #fff; }
.auth-points span { color: #D2DDD3; }
.auth-urgent { display: flex; align-items: center; gap: .75rem; margin: 0; padding: .85rem 1rem; background: rgba(255, 255, 255, .06); border-left: 4px solid var(--damu); border-radius: 0 8px 8px 0; color: #E8EEE8; }
.auth-urgent svg { width: 22px; height: 22px; color: #F4A6A9; flex: none; }
.auth-urgent a { color: #fff; font-weight: 700; white-space: nowrap; }
.auth-main { display: flex; flex-direction: column; align-items: center; padding: 1rem clamp(1rem, 4vw, 3rem) 1.5rem; }
.auth-util { width: 100%; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; }
.auth-back { display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; color: var(--green); font-weight: 600; text-decoration: none; }
.auth-back svg { width: 18px; height: 18px; }
.auth-back:hover { text-decoration: underline; }
.auth-card { width: 100%; max-width: 27rem; margin: auto 0; padding: 2rem 0; }
.auth-kicker { color: var(--green); font-weight: 700; margin-bottom: .25rem; }
.auth-card h1 { font-family: var(--font-display); font-size: clamp(1.9rem, 4vw, 2.3rem); font-weight: 800; letter-spacing: -.025em; color: var(--msitu-2); margin-bottom: 1.4rem; }
.auth-card .form-control { border-color: #CBD4CC; }
.auth-card .form-control-lg { min-height: 52px; font-size: 1.05rem; }
.auth-link { padding: 0; min-height: 44px; font-weight: 600; color: var(--green); }
.pw-wrap { position: relative; }
.pw-wrap .form-control { padding-right: 3.3rem; }
.pw-toggle { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border: 0; background: none; color: var(--muted); border-radius: 8px; display: grid; place-items: center; }
.pw-toggle svg { width: 22px; height: 22px; }
.pw-toggle[aria-pressed="true"] { color: var(--green); }
.pw-toggle:hover { background: var(--leaf); }
.auth-switch { margin-top: 1.6rem; padding-top: 1.4rem; border-top: 1px solid var(--line-2); text-align: center; }
.auth-switch span { display: block; color: var(--muted); margin-bottom: .6rem; }
.auth-foot { max-width: 27rem; text-align: center; color: var(--muted); font-size: .92rem; margin: 0; }
@media (max-width: 991px) {
    .auth { grid-template-columns: 1fr; min-height: 0; }
    .auth-intro { gap: 1.1rem; padding: 1.1rem 1rem 1.2rem; }
        .auth-headline { font-size: clamp(1.45rem, 5.5vw, 2rem); margin: 0; }
    .auth-points { display: none; }
    .auth-main { padding-inline: 1rem; }
    .auth-card { padding: 1.5rem 0 1.75rem; }
}
@media (max-width: 575px) {
    .auth-brand span span { font-size: .82rem; }
    .auth-util .ts-label { display: none; }
}

.profile-band .stat { text-align: left; align-items: flex-start; }
.profile-band .stat .v .pill { font-size: .85rem; white-space: normal; border-radius: 6px; display: inline; padding: .1rem .45rem; -webkit-box-decoration-break: clone; box-decoration-break: clone; line-height: 1.7; }
.profile-band #welcome-status { display: none; }
.dash-card .k { text-transform: none; letter-spacing: 0; font-size: .88rem; }
.auth .btn.w-100 { justify-content: center; text-align: center; }
.auth .btn-gold::after { content: none; }
.pay-badge { border-radius: 6px; }
.pay-badge.pay-badge-free { background: var(--leaf); color: var(--msitu); }

/* ---------- Committee area header: same dark bar as the members area ---------- */
.app-top { background: var(--msitu); border-bottom: 0; }
.app-top .brand { color: #fff; text-decoration: none; }
.app-top .brand-logo { background: #fff; border-radius: 50%; padding: 2px; }
.app-top .brand-name { color: #fff; font-family: var(--font-display); }
.app-top .brand-sub { color: #C2D0C4; }
.app-top .btn-outline-ink { color: #fff; border-color: rgba(255, 255, 255, .45); background: transparent; }
.app-top .btn-outline-ink:hover { background: rgba(255, 255, 255, .12); color: #fff; border-color: #fff; }
.app-top .top-icon { background: rgba(255, 255, 255, .08); border-color: transparent; color: #fff; }
.app-top .ts-group { border-color: rgba(255, 255, 255, .25); }
.ts-narrow { display: none !important; }
@media (max-width: 575px) { .ts-wide { display: none !important; } .ts-narrow { display: inline-flex !important; } }
.app .form-control, .app .form-select, .auth .form-control, .svc-search .form-control, .auth-card .form-control { border-color: #728074; }

/* ---------- Sign-in page: fit one screen on phones and computers (October 2026) ---------- */
.auth { min-height: 100vh; min-height: 100dvh; }
.auth-main { min-height: 0; }
/* computers with short screens (laptops, browser toolbars) */
@media (min-width: 992px) and (max-height: 820px) {
    .auth-intro { gap: 1.2rem; padding-top: 1.6rem; padding-bottom: 1.6rem; }
    .auth-headline { font-size: clamp(1.7rem, 4.6vh, 2.5rem); margin-bottom: 1.1rem; }
    .auth-points li { padding: .65rem 0; }
    .auth-card { padding: .75rem 0; }
    .auth-card h1 { margin-bottom: .9rem; }
    .auth-card .mb-3 { margin-bottom: .75rem !important; }
    .auth-switch { margin-top: 1rem; padding-top: 1rem; }
    .auth-foot { font-size: .85rem; }
    .auth-main { padding-top: .5rem; padding-bottom: .75rem; }
}
@media (min-width: 992px) and (max-height: 660px) {
    .auth-points { display: none; }                      /* very short screens: headline and help line only */
    .auth-card .form-control-lg { min-height: 46px; }
    .auth-kicker { display: none; }
}
/* phones and tablets: a slim green band, then the form straight away */
@media (max-width: 991px) {
    .auth-intro { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; padding: .7rem 1rem; }
    .auth-intro-main { display: none; }
    .auth-brand img { width: 40px; height: 40px; }
    .auth-brand strong { font-size: 1.15rem; }
    .auth-urgent { padding: .45rem .75rem; font-size: .92rem; flex: 1 1 15rem; }
    .auth-urgent svg { width: 18px; height: 18px; }
    .auth-util { padding-top: .1rem; }
    .auth-card { padding: .6rem 0 1rem; margin: 0; }
    .auth-kicker { display: none; }
    .auth-card h1 { font-size: 1.75rem; margin-bottom: .8rem; }
    .auth-card .mb-3 { margin-bottom: .75rem !important; }
    .auth-card .form-control-lg { min-height: 48px; }
    .auth-switch { margin-top: 1rem; padding-top: 1rem; }
    .auth-switch span { display: inline; margin: 0 .4rem 0 0; }
    .auth-foot { margin-top: .5rem; }
}
@media (max-width: 575px) {
    .auth-brand span span { display: none; }
    .auth-urgent { flex-basis: 100%; }
    .auth-util { flex-wrap: nowrap; }
    .auth-back .auth-back-long { display: none; }
    .auth-util .ts-group button { min-width: 42px; margin-left: .2rem; }
}
@media (max-width: 991px) and (max-height: 700px) {
    .auth-intro { padding-top: .5rem; padding-bottom: .55rem; }
    .auth-card { padding-top: .35rem; }
    .auth-card h1 { font-size: 1.6rem; margin-bottom: .6rem; }
    .auth-switch { margin-top: .75rem; padding-top: .75rem; }
    .auth-switch span { display: block; margin: 0 0 .35rem; }
}

/* ---------- Membership card: printed on its own A4 page (js/portal.js cardPrintHtml) ----------
   Real bank-card size (85.6 x 54 mm). Only mm and pt units, so the member's text size
   setting and the phone's screen size can't change the printed card. */
@media print {
    @page { size: A4 portrait; margin: 12mm; }
    html, body { background: #fff !important; }
    body.print-card-doc #print-area { padding: 0; font-size: 10pt; }
    .pc-sheet { font-family: Arial, Helvetica, sans-serif; color: #2B2D26; }
    .pc-title { font-size: 14pt; font-weight: 700; margin: 0 0 1.5mm; color: #1E3324; }
    .pc-help, .pc-printed { font-size: 8.5pt; color: #545849; margin: 0 0 5mm; }
    .pc-printed { margin-top: 5mm; }
    .pc-pair { display: flex; gap: 0; break-inside: avoid; page-break-inside: avoid; }
    .pc-card { box-sizing: border-box; width: 85.6mm; height: 54mm; flex: none; overflow: hidden; position: relative;
        outline: .3mm dashed #686C5E; outline-offset: 0; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .pc-card + .pc-card { border-left: .3mm dashed #686C5E; }
    .pc-front { background: #1E3324 !important; color: #fff; padding: 4mm 4.5mm; display: flex; flex-direction: column; }
    .pc-top { display: flex; align-items: center; gap: 2.5mm; }
    .pc-top img { width: 9mm; height: 9mm; background: #fff; border-radius: 50%; padding: .4mm; }
    .pc-top strong { display: block; font-size: 11pt; letter-spacing: .04em; line-height: 1.1; }
    .pc-top span { display: block; font-size: 5.6pt; color: #DEE9E0; line-height: 1.25; }
    .pc-name { font-size: 11pt; font-weight: 700; margin: auto 0 1.5mm; line-height: 1.15; overflow-wrap: anywhere; }
    .pc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1mm 3mm; font-size: 7.4pt; font-weight: 700; line-height: 1.2; }
    .pc-grid span { display: block; font-size: 5.4pt; font-weight: 400; text-transform: uppercase; letter-spacing: .05em; color: #C2D0C4; }
    .pc-motto { margin: 1.6mm 0 0; font-size: 5.8pt; font-style: italic; color: #F0CF8A; }
    .pc-back { background: #fff; color: #2B2D26; padding: 4mm 4.5mm; font-size: 7pt; line-height: 1.3; }
    .pc-back p { margin: 0 0 1.4mm; }
    .pc-back-head { font-size: 9.5pt; font-weight: 700; color: #1E3324; }
    .pc-back strong { color: #B23B35; }
    .pc-small { font-size: 5.6pt; color: #545849; position: absolute; left: 4.5mm; right: 4.5mm; bottom: 3mm; margin: 0 !important; }
}
/* on screen, the card grows if the member uses large text instead of cutting words off */
.member-card { height: auto; min-height: 0; }
.mc-name { overflow-wrap: anywhere; }

/* =========================================================
   MEMBERS AREA, ROUND 2 (October 2026, ideas from the University of Eldoret student portal)
   ========================================================= */
.pt-menu-btn { display: none; }
@media (max-width: 991px) { .pt-menu-btn { display: inline-grid; margin-right: .1rem; } .pt-head-inner { justify-content: flex-start; } .pt-head-actions { margin-left: auto; } }

.drawer-scrim { position: fixed; inset: 0; z-index: 1060; background: rgba(26, 44, 31, .55); }
.drawer { position: fixed; top: 0; bottom: 0; left: 0; z-index: 1070; width: min(320px, 86vw); display: flex; flex-direction: column;
    background: #fff; box-shadow: 12px 0 40px -10px rgba(26, 44, 31, .45); overflow-y: auto; overscroll-behavior: contain; }
.drawer[hidden], .drawer-scrim[hidden] { display: none; }
body.drawer-open { overflow: hidden; }
@media (prefers-reduced-motion: no-preference) {
    .drawer:not([hidden]) { animation: drawer-in .22s cubic-bezier(.2, .7, .2, 1); }
    @keyframes drawer-in { from { transform: translateX(-100%); } to { transform: none; } }
}
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .6rem .6rem .6rem 1rem; background: var(--msitu); color: #fff; min-height: 60px; }
.drawer-title { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 1.1rem; }
.drawer-close { width: 44px; height: 44px; border: 0; border-radius: 10px; background: rgba(255, 255, 255, .1); color: #fff; display: grid; place-items: center; }
.drawer-nav { padding: .5rem; flex: 1; }
.drawer-nav > button, .drawer-group summary { display: flex; align-items: center; gap: .75rem; width: 100%; min-height: 48px; padding: .5rem .75rem; border: 0; border-radius: 8px;
    background: none; color: var(--ink); font-weight: 700; text-align: left; cursor: pointer; list-style: none; }
.drawer-group summary::-webkit-details-marker { display: none; }
.drawer-nav > button svg, .drawer-group summary > svg:first-child { color: var(--green); flex: none; }
.drawer-group summary .chev { margin-left: auto; color: var(--muted); transition: transform .15s; }
.drawer-group[open] summary .chev { transform: rotate(90deg); }
.drawer-group > button, .drawer-group > a { display: flex; align-items: center; width: 100%; min-height: 44px; padding: .45rem .75rem .45rem 2.75rem; border: 0; border-radius: 8px;
    background: none; color: var(--ink); font-weight: 500; text-align: left; text-decoration: none; }
.drawer-nav button:hover, .drawer-group summary:hover, .drawer-group > a:hover { background: var(--leaf); }
.drawer-nav button.on { background: var(--leaf); color: var(--msitu); font-weight: 700; box-shadow: inset 4px 0 0 var(--mahindi); }
.drawer-foot { padding: .75rem 1rem 1rem; border-top: 1px solid var(--line-2); }
.drawer-foot .btn-help { background: var(--damu); border-color: var(--damu); color: #fff; display: inline-flex; align-items: center; justify-content: center; gap: .4rem; }
.drawer-foot .note { font-size: .8rem; }

.crumbs { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .25rem 1rem; margin: -.4rem 0 1rem; }
.crumbs p { margin: 0; display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; }
.crumbs-path { font-weight: 700; color: var(--msitu-2); }
.crumbs-path svg { color: var(--muted); }
.crumbs button { border: 0; background: none; padding: 0 .1rem; min-height: 40px; font-weight: 700; color: var(--green); text-decoration: underline; text-underline-offset: 3px; }
.crumbs-links { gap: 1rem !important; }
.crumbs-links button { text-decoration: none; }
.crumbs-links button:hover { text-decoration: underline; }
body.choosing .crumbs { display: none; }
@media (max-width: 575px) { .crumbs-links { display: none !important; } .crumbs { margin-bottom: .6rem; } }

.pb-help { margin: -.3rem 0 .9rem; color: #D2DDD3; font-size: .95rem; }
.pb-help a, .pb-help button { color: #fff; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.pb-help button { border: 0; background: none; padding: 0; }

.glance { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 1rem; margin-bottom: 1.75rem; }
.glance.one { grid-template-columns: minmax(0, 1fr); }
.glance-card { border-radius: 12px; padding: 1.25rem 1.4rem; display: flex; flex-direction: column; gap: .2rem; min-height: 168px; }
.glance-card h2.glance-k { margin: 0; font-size: 1rem; font-weight: 700; font-family: var(--font-display); }
.glance-v { margin: 0; font-family: var(--font-display); font-size: clamp(1.9rem, 4vw, 2.4rem); font-weight: 800; line-height: 1.1; letter-spacing: -.02em; }
.glance-note { margin: .15rem 0 0; font-size: .97rem; }
.glance-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: auto; padding-top: .75rem; }
.fee-card { background: var(--green); color: #fff; }
.fee-card h2.glance-k, .fee-card .glance-note { color: #E5F0E7; }
.fee-card.is-due { background: var(--msitu); }
.fee-card.is-due .glance-v { color: var(--mahindi); }
.fee-card.is-waiting { background: #fff; color: var(--ink); border: 2px solid var(--mahindi); }
.fee-card.is-waiting h2.glance-k, .fee-card.is-waiting .glance-note { color: var(--muted); }
.fee-card .btn-light { background: #fff; color: var(--msitu); border: 0; font-weight: 700; }
.fee-card.is-waiting .btn-light { background: var(--leaf); }
.fee-card .btn-outline-light { color: #fff; border-color: rgba(255, 255, 255, .6); }
.fee-card .btn-maize { font-weight: 700; }
.year-card { background: #fff; border: 1px solid var(--line-2); color: var(--ink); }
.year-card h2.glance-k, .year-card .glance-note { color: var(--muted); }
.year-card .glance-v { color: var(--msitu-2); }
.year-bar { position: relative; height: 14px; border-radius: 999px; background: var(--leaf); overflow: hidden; margin: .8rem 0 .3rem; }
.year-bar span { display: block; height: 100%; width: 0; border-radius: 999px; background: var(--mahindi); transition: width .6s; }
@media (max-width: 767px) { .glance { grid-template-columns: minmax(0, 1fr); } .glance-card { min-height: 0; } }

.notes li.empty, #req-list .empty { text-align: center; color: var(--muted); font-style: normal; padding: 1.4rem .5rem 1rem; }
.notes li.empty::before, #req-list .empty::before {
    content: ""; display: block; width: 64px; height: 64px; margin: 0 auto .6rem; border-radius: 50%; background-color: var(--leaf);
    background-repeat: no-repeat; background-position: center; background-size: 34px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23346040' stroke-width='1.8' stroke-linejoin='round' stroke-linecap='round'%3E%3Cpath d='M3 13h5l1.5 2.5h5L16 13h5'/%3E%3Cpath d='M5.5 5h13L21 13v6H3v-6z'/%3E%3C/svg%3E");
}
.side-link { display: flex; align-items: center; gap: .7rem; min-height: 46px; padding: .62rem .75rem; border-radius: 8px; color: var(--ink); font-weight: 600; text-decoration: none; }
.side-link svg { color: var(--green); }
.side-link:hover { background: var(--leaf); color: var(--msitu); }

/* payment option 3: online (coming soon until Stripe links are added) */
.pay-badge.pay-badge-soon { background: #FEF0C7; color: #7A4B00; }
.pay-option-online.is-soon { background: #F7F8F3; border-style: dashed; }
.pay-option-online.is-soon h3 { color: var(--muted); }

/* =========================================================
   eCitizen-STYLE COLOURS (October 2026): see the same block in css/style.css
   ========================================================= */
:root { --damu-tint: #F9ECEB; }
.side button.on::before, .tabbar button.on::before { background: var(--green); }
.drawer-nav button.on { box-shadow: inset 4px 0 0 var(--green); }
.steps-check li.now .tick { border-color: var(--green); box-shadow: 0 0 0 4px var(--tint-2); }
.year-bar span { background: var(--green); }
.fee-card.is-waiting { border-color: var(--green); }
.profile-band .stat-grid { background: rgba(255, 255, 255, .06); }
.pt-account-btn .avatar { background: var(--mint); color: var(--msitu); }
/* urgent things stay red */
.side-help { background: var(--damu-tint); border-left-color: var(--urgent); }
.side-help .btn-help, .drawer-foot .btn-help { background: var(--urgent); border-color: var(--urgent); }
.sd-ic-urgent { background: var(--damu-tint); color: var(--urgent); }
.auth-urgent { border-left-color: var(--urgent); }
.pt-signout, .pt-signout svg { color: var(--urgent); }
.pt-signout:hover { background: var(--damu-tint); color: var(--urgent); }
.count { background: var(--urgent); }

/* =========================================================
   PHONE NOTIFICATIONS AND NEWSLETTER (js/push.js)
   ========================================================= */
.alert-settings { display: grid; gap: .8rem; margin-bottom: 1.2rem; }
@media (min-width: 900px) { .alert-settings { grid-template-columns: 1fr 1fr; } }
.as-card, .push-card { display: flex; gap: .9rem; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 1.1rem 1.2rem; }
.as-ic { flex-shrink: 0; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--tint-2); color: var(--green); }
.as-body { flex: 1; min-width: 0; }
.as-body h2 { font-size: 1.05rem; font-weight: 700; margin: 0; }
.as-body p { margin: .35rem 0 0; color: var(--muted); font-size: .94rem; }
.as-head { display: flex; justify-content: space-between; align-items: center; gap: .8rem; flex-wrap: wrap; }
.as-head .form-switch { display: flex; align-items: center; gap: .5rem; padding-left: 0; }
.as-head .form-switch .form-check-input { width: 3em; height: 1.6em; margin: 0; float: none; cursor: pointer; }
.as-head .form-check-input:checked { background-color: var(--green); border-color: var(--green); }
.as-head .form-check-label { font-weight: 700; min-width: 2em; cursor: pointer; }
.as-note { background: #F7F8F3; border-left: 3px solid var(--green); border-radius: 6px; padding: .55rem .7rem; color: var(--ink) !important; }
.push-card { border-color: rgba(var(--green-rgb), .35); background: linear-gradient(0deg, var(--tint), #fff); margin-bottom: 1.2rem; flex-wrap: wrap; }
.push-card .as-body { min-width: 220px; }
.pp-actions { display: flex; gap: .4rem; align-items: center; margin-left: auto; }
@media (max-width: 575px) { .pp-actions { margin-left: 58px; } }

/* committee: newsletter and public appeals (js/admin-engage.js, js/admin-community.js) */
.nl-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .8rem; margin-bottom: 1.2rem; }
.nl-stat { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: .9rem 1.1rem; }
.nl-stat strong { display: block; font-size: 1.7rem; line-height: 1.1; color: var(--green-deep); }
.nl-stat span { color: var(--muted); font-size: .92rem; }
.nl-body { font-family: inherit; line-height: 1.55; }
.nl-preview-box { background: #F3F4F6; border-radius: 10px; padding: 1.2rem .8rem; }
.ap-public { background: var(--tint); border: 1px dashed rgba(var(--green-rgb), .45); border-radius: 10px; padding: .8rem 1rem; }
.ap-outside { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .7rem; background: var(--tint); border-radius: 8px; padding: .6rem .8rem; margin-bottom: .8rem; }
.ap-outside .form-control { width: 7rem; }

/* ===================== TWO-STEP SIGN-IN (js/admin-mfa.js) ===================== */
.mfa-card { max-width: 34rem; margin: 1rem auto; }
.mfa-offer { border-left: 4px solid var(--green, #346040); }
.mfa-steps { padding-left: 1.2rem; }
.mfa-steps li { margin-bottom: .75rem; }
.mfa-qr { background: #fff; display: inline-block; padding: .75rem; border-radius: .5rem; border: 1px solid #E4E5DC; margin: .5rem 0; }
.mfa-qr img { display: block; width: 200px; height: 200px; }
.mfa-secret { word-break: break-all; }
.mfa-code { letter-spacing: .4em; font-variant-numeric: tabular-nums; text-align: center; font-size: 1.6rem; }
.mfa-only .app-shell { display: block; }
.mfa-only .app-main { max-width: 40rem; margin: 0 auto; }

/* service colours */
/* each service keeps its own colour so it's easy to spot */
.sd-ic, .stat-icon { box-shadow: inset 0 0 0 1px rgba(0,0,0,.04); }
.sd-ic.sd-green, .stat-icon.sd-green { background: #E6F2E7; color: #2F6B34; }
.sd-ic.sd-teal,  .stat-icon.sd-teal  { background: #E0EEEF; color: #1B454B; }
.sd-ic.sd-red,   .stat-icon.sd-red   { background: #FBE7E7; color: #B71C1C; }
.sd-ic.sd-blue,  .stat-icon.sd-blue  { background: #E5EDFD; color: #1D4ED8; }
.sd-ic.sd-amber, .stat-icon.sd-amber { background: #FDF0DC; color: #A0520B; }
.sd-ic.sd-rose,  .stat-icon.sd-rose  { background: #FCE7F0; color: #BE185D; }
.sd:hover .sd-ic, .hub:hover .stat-icon { transform: scale(1.06); }
.sd-ic, .stat-icon { transition: transform .15s ease; }
@media (prefers-reduced-motion: reduce) { .sd-ic, .stat-icon { transition: none; } }
/* the card keeps its shape but grows when the text needs more room (phones, large text) */
.member-card { min-height: auto; aspect-ratio: 1.586; }
@media (max-width: 420px) { .member-card { aspect-ratio: auto; } }


/* ---------- October 2026: committee access ---------- */
/* Committee area button in the members area top bar (committee members only, js/portal.js) */
.pt-committee { display: inline-flex; align-items: center; gap: .45rem; min-height: 44px; padding: .45rem .9rem; border-radius: 999px;
  background: #fff; color: var(--teal, #1B454B); font-weight: 600; font-size: .92rem; text-decoration: none; white-space: nowrap; }
.pt-committee svg { color: var(--green, #3F8344); flex: none; }
.pt-committee:hover, .pt-committee:focus-visible { background: #EEF4F2; }
.pt-committee:focus-visible { outline: 3px solid #F0CF8A; outline-offset: 2px; }
.pt-committee[hidden] { display: none; }
body.choosing .pt-committee { display: none !important; }
@media (max-width: 575.98px) {
  .pt-committee { width: 44px; padding: 0; justify-content: center; }
  .pt-committee span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
/* Sign-in page: message after the committee area timed out (shown by login.html#timed-out) */
.timeout-note { display: none; margin: 0 0 1rem; padding: .85rem 1rem; border-radius: 10px; background: #FBF3E2; color: #6A4C14;
  border-left: 4px solid #CC9E4E; font-size: .95rem; }
.timeout-note:target { display: block; }
/* Committee area: "still there?" warning before the idle sign-out (js/admin-idle.js) */
.idle-warn { position: fixed; left: 50%; bottom: 1.25rem; transform: translateX(-50%); z-index: 2000; width: min(560px, calc(100% - 2rem));
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; padding: 1rem 1.15rem; border-radius: 14px;
  background: #12343A; color: #fff; box-shadow: 0 12px 30px rgba(0,0,0,.25); }
.idle-warn[hidden] { display: none; }
.idle-warn p { margin: 0; flex: 1 1 260px; }
.idle-warn button { min-height: 44px; border: 0; border-radius: 999px; padding: .5rem 1.1rem; font: inherit; font-weight: 600;
  background: #F0CF8A; color: #12343A; cursor: pointer; }

/* =========================================================
   Members area home (October 2026 redesign)
   Membership card hero, steps, quick actions with "Ask for support" in red,
   welfare cover by family group, then appeals/events, fees, news and WhatsApp.
   ========================================================= */
body.on-home .crumbs { display: none; }
.home-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: .8rem 1.2rem; margin-bottom: 1.2rem; }
.home-head .welcome-hi { color: var(--ink); font-size: clamp(1.7rem, 3.2vw, 2.2rem); line-height: 1.15; }
.home-head .welcome-sub { margin: .3rem 0 .2rem; color: var(--muted); opacity: 1; font-size: 1.02rem; }
.home-head .pb-help { margin: 0; font-size: .9rem; color: var(--muted); }
.home-head .pb-help button { background: none; border: 0; padding: 0; color: var(--green); text-decoration: underline; font-weight: 600; }
.home-head-acts { display: flex; flex-wrap: wrap; gap: .5rem; }
.home-head-acts .btn { min-height: 46px; border-radius: 999px; padding-inline: 1.2rem; font-weight: 700; }

.home-hero { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 1.2rem; margin-bottom: 1.2rem; align-items: stretch; }
.home-card { position: relative; overflow: hidden; border-radius: 18px; color: #fff; display: flex; flex-direction: column;
    padding: 2rem 1.8rem 0; min-height: 330px;
    background: radial-gradient(circle at 88% 0%, rgba(92, 123, 74, .55), transparent 45%), linear-gradient(140deg, #1B454B 0%, #163A3F 55%, #10292D 100%); }
.home-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 10px;   /* kanga stripe from the logo colours */
    background: repeating-linear-gradient(90deg, #393B32 0 14px, #BD4A44 14px 28px, #00753A 28px 42px, #CC9E4E 42px 56px); }
.home-card::after { content: ""; position: absolute; right: -70px; top: 40px; width: 260px; height: 260px; border-radius: 50%; border: 40px solid rgba(255, 255, 255, .04); pointer-events: none; }
.hc-top { display: flex; align-items: center; gap: .8rem; }
.hc-top img { background: #fff; border-radius: 50%; padding: 3px; }
.hc-top strong { display: block; font-family: var(--font-display); letter-spacing: .08em; font-size: 1.05rem; }
.hc-top span { display: block; font-size: .85rem; color: #CFE0DC; }
.hc-name { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.6rem, 3vw, 2.1rem); margin: 1.4rem 0 1rem; color: #fff; overflow-wrap: anywhere; }
.hc-meta { display: flex; flex-wrap: wrap; gap: .6rem 2.2rem; margin: 0; }
.hc-meta dt { font-weight: 500; font-size: .82rem; color: #CFE0DC; }
.hc-meta dd { margin: 0; font-weight: 700; font-size: 1.08rem; font-family: var(--font-display); }
.hc-motto { color: var(--mahindi); margin: 1rem 0 1.4rem; font-size: .95rem; }
.hc-foot { margin: auto -1.8rem 0; padding: .9rem 1.8rem; background: rgba(0, 0, 0, .22); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1rem; }
.hc-status { display: flex; align-items: center; gap: .55rem; font-size: .92rem; }
.hc-foot .btn { border-radius: 999px; font-weight: 700; min-height: 40px; padding-inline: 1rem; background: #CC9E4E; border-color: #CC9E4E; color: #1E1B1B; }
.hc-foot .btn:hover { background: var(--mahindi); border-color: var(--mahindi); }

.home-steps { margin: 0; border-radius: 18px; display: flex; flex-direction: column; }
.hs-head { display: flex; align-items: center; gap: 1rem; margin-bottom: .6rem; }
.hs-head h2 { margin: 0 0 .15rem; font-size: 1.2rem; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.home-steps .progress-ring { width: 72px; height: 72px; background: conic-gradient(var(--green) calc(var(--p) * 1%), var(--leaf) 0); }
.home-steps .progress-ring span { width: 56px; height: 56px; background: #fff; color: var(--ink); font-family: var(--font-display); font-size: 1.05rem; }
.home .steps-check li { padding: .55rem 0; }
.home .steps-check li:not(.done) .tick { color: var(--muted); background: #fff; }
.home .steps-check li.now .tick { color: #1E1B1B; background: #F0CF8A; border-color: #CC9E4E; }
.home .steps-check li.done .tick { background: #E6F2E7; border-color: #E6F2E7; color: #2F6B34; }
.home .steps-check .hint { display: none; }
.home .steps-check li.now .hint { display: block; }
.home .steps-check.all-done li:not(:last-child) { display: none; }
.home .steps-check.all-done li:last-child .hint { display: block; }
.home-steps #next-step { align-self: flex-start; margin-top: .8rem; border-radius: 999px; min-height: 42px; padding-inline: 1.1rem; font-weight: 700; }

.home-tiles { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .8rem; margin-bottom: 1.2rem; }
.ht { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: .25rem; text-align: left; min-height: 140px;
    background: #fff; border: 1px solid var(--line-2); border-radius: 16px; padding: 1rem; color: var(--ink); transition: transform .15s, box-shadow .15s, border-color .15s; }
.ht:hover { border-color: var(--green); transform: translateY(-2px); box-shadow: 0 10px 22px -14px rgba(16, 40, 30, .45); }
.ht strong { font-family: var(--font-display); font-size: 1rem; margin-top: .5rem; line-height: 1.25; }
.ht > span:last-child { font-size: .86rem; color: var(--muted); line-height: 1.35; }
.ht-ic { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; }
.ht-help { background: #B23B35; border-color: #B23B35; color: #fff; }
.ht-help:hover { background: #9C312C; border-color: #9C312C; }
.ht-help > span:last-child { color: #FBE3E1; }
.ht-help .ht-ic { background: rgba(255, 255, 255, .16); color: #fff; }
.ht.has-news::after { content: ""; position: absolute; top: .9rem; right: .9rem; width: 10px; height: 10px; border-radius: 50%; background: #B23B35; box-shadow: 0 0 0 3px #fff; }

.home-row { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 1.2rem; margin-bottom: 1.2rem; align-items: start; }
.home-row > .panel { margin: 0; border-radius: 18px; }
.hp-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.hp-head h2 { margin: 0; display: flex; align-items: center; gap: .5rem; font-size: 1.15rem; }
.hp-head h2 svg { color: var(--green); }
.hp-head .btn-link { font-weight: 700; text-decoration: none; min-height: 40px; }
.cover-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .7rem; }
.cv-box { display: flex; flex-direction: column; align-items: flex-start; gap: .3rem; text-align: left; border: 0; border-radius: 14px; background: #F4F6EF; padding: .9rem; color: var(--ink); min-height: 140px; }
.cv-box:hover { background: #EBF2EC; }
.cv-k { font-size: .85rem; color: var(--muted); line-height: 1.25; min-height: 2.1em; }
.cv-n { color: var(--muted); font-size: .9rem; }
.cv-n strong { font-family: var(--font-display); font-size: 1.4rem; color: var(--ink); margin-right: .15rem; }
.cv-chips { display: flex; margin-top: .2rem; }
.cv-chip { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: .72rem; font-weight: 700; margin-right: -8px;
    background: #E6F2E7; color: #2F6B34; border: 2px solid #F4F6EF; }
.cv-chip:nth-child(2) { background: #FDF0DC; color: #8A4A0B; }
.cv-chip:nth-child(3) { background: #E0EEEF; color: #1B454B; }
.cv-chip:nth-child(4) { background: #FCE7F0; color: #9D174D; }
.cv-chip.more { background: #fff; color: var(--muted); }
.cv-chip.empty { background: transparent; border: 2px dashed #C5CEC4; }
.cv-chip.pending { outline: 2px dashed #CC9E4E; outline-offset: 1px; }
.cv-wait { font-size: .78rem; color: #8A5A10; font-weight: 600; }
.cover-note { display: flex; gap: .6rem; align-items: flex-start; margin: 1rem 0 0; padding: .8rem 1rem; border-radius: 12px; font-size: .92rem; }
.cover-note:empty { display: none; }
.cover-note.ok { background: #E6F2E7; color: #1F4A26; }
.cover-note.ok svg { flex: none; margin-top: .1rem; color: #2F6B34; }
.cover-note.warn { background: #FDF3E1; color: #6B4508; }
.cover-note.info { background: #F4F6EF; }
.cover-note a { color: inherit; font-weight: 600; }

.home-happening .dash-community { grid-template-columns: 1fr; margin: 0; gap: .8rem; }
.home-happening .dash-card { border-radius: 16px; padding: 1.1rem 1.2rem; }
.home-happening .dash-card.appeal-card { background: #FFFBF3; border-color: #EBD3A2; }
.home-happening .dash-card.appeal-card .stat-icon { background: #FDF0DC; color: #A0520B; }
.home .glance { margin-bottom: 1.2rem; }
.home-side .wa-card { margin-bottom: 1rem; border-radius: 18px; }
.home #dash-notes { margin-bottom: 0; }

/* phone tab bar: "Get help" sits in the middle, in red */
.tabbar .tab-help { color: #B23B35 !important; font-weight: 700; }
.tab-help-ic { width: 44px; height: 44px; margin-top: -1.15rem; border-radius: 50%; display: grid; place-items: center; background: #B23B35; color: #fff;
    box-shadow: 0 0 0 4px #fff, 0 6px 14px -4px rgba(178, 59, 53, .6); }
.tabbar .tab-help.on::before { display: none; }
.tabbar .tab-help.on .tab-help-ic { background: #9C312C; }
.tabbar .tab-help svg { color: #fff !important; }

@media (max-width: 1279px) {
    .home-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1099px) {
    .home-hero, .home-row { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .home-head-acts { display: none; }            /* Pay and Help are in the tab bar on phones */
    .home-card { padding: 1.5rem 1.2rem 0; min-height: 0; }
    .hc-foot { margin-inline: -1.2rem; padding-inline: 1.2rem; }
    .hc-name { margin: 1rem 0 .8rem; }
    .hc-meta { gap: .5rem 1.4rem; }
    .home-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
    .ht { min-height: 118px; padding: .85rem; }
    .cover-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cv-box { min-height: 0; }
}
.home-head .pb-help a { color: var(--green); font-weight: 600; }
.home .steps-check li.folded .hint { display: none; }
@media (max-width: 640px) {
    .hc-top span, .hc-motto { display: none; }
    .home-head .pb-help { display: none; }
    .hc-name { margin: .9rem 0 .7rem; }
    .hc-meta dd { font-size: 1rem; }
    .hc-foot { margin-top: 1.1rem; }
    .home-card::after { display: none; }
}

/* While the page checks who is signed in (js/auth-early.js, js/db.js, js/login.js):
   hide the members area / sign-in box and show a small spinner, so a signed-out
   visitor never sees the members area flash up before going to the sign-in page. */
html.auth-checking body.app { visibility: hidden; }
html.auth-checking .auth-card { visibility: hidden; position: relative; min-height: 12rem; }
html.auth-checking body.app::after,
html.auth-checking .auth-card::after {
    content: ""; visibility: visible; position: fixed; top: 50%; left: 50%;
    width: 2.75rem; height: 2.75rem; margin: -1.375rem 0 0 -1.375rem; border-radius: 50%;
    border: 4px solid rgba(27, 69, 75, .15); border-top-color: #1B454B;
    animation: auth-spin .8s linear infinite;
}
html.auth-checking .auth-card::after { position: absolute; }
@keyframes auth-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
    html.auth-checking body.app::after, html.auth-checking .auth-card::after { animation-duration: 2.4s; }
}

/* Profile photo (js/portal-photo.js, js/admin-people.js) */
.avatar.has-photo { padding: 0; overflow: hidden; background: #fff; }
.avatar .avatar-img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.photo-panel { display: flex; gap: 1.25rem; align-items: flex-start; }
.photo-panel .photo-preview { width: 96px; height: 96px; flex: none; font-size: 2rem; display: grid; place-items: center; border-radius: 50%; }
.photo-panel .photo-text { min-width: 0; flex: 1; }
@media (max-width: 480px) { .photo-panel { flex-direction: column; align-items: center; text-align: center; } .photo-panel .photo-actions { justify-content: center; } }
.m-photo { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; flex: none; border: 3px solid #fff; box-shadow: 0 1px 4px rgba(23, 34, 27, .2); }
.photo-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.photo-actions[hidden] { display: none; }

/* =========================================================
   Membership card (js/portal-services.js): two sides, tap to turn over,
   "Show at an event" full screen, QR code on the back for the committee.
   ========================================================= */
.mcard-wrap { max-width: 420px; }
.mcard { perspective: 1200px; cursor: pointer; border-radius: 16px; outline-offset: 4px; -webkit-tap-highlight-color: transparent; }
.mcard-inner { display: grid; transition: transform .6s cubic-bezier(.3, .7, .2, 1); transform-style: preserve-3d; }
.mcard.flipped .mcard-inner { transform: rotateY(180deg); }
.mcard-face { grid-area: 1 / 1; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 16px; overflow: hidden; position: relative; }
.mcard-face.member-card { max-width: none; width: 100%; }
.mcard-back { transform: rotateY(180deg); background: #fff; color: #17221B; padding: 1rem 1.2rem .8rem; display: flex; flex-direction: column;
    border: 1px solid #E4DCC9; box-shadow: 0 10px 30px -10px rgba(30, 51, 36, .45); }
@media (prefers-reduced-motion: reduce) {
    .mcard-inner { transition: none; transform: none !important; }
    .mcard-face { backface-visibility: visible; -webkit-backface-visibility: visible; }
    .mcard-back { transform: none; visibility: hidden; }
    .mcard.flipped .mcard-back { visibility: visible; }
    .mcard.flipped .mcard-front { visibility: hidden; }
}
/* front */
.mcard-front { padding-top: 1.35rem !important; }
.mc-stripe { position: absolute; left: 0; right: 0; top: 0; height: 8px;
    background: repeating-linear-gradient(90deg, #393B32 0 14px, #BD4A44 14px 28px, #00753A 28px 42px, #CC9E4E 42px 56px); }
.mc-top { position: relative; }
.mc-state { margin-left: auto; align-self: flex-start; font-size: .68rem; font-weight: 700; letter-spacing: .02em; padding: .22rem .6rem;
    border-radius: 999px; white-space: nowrap; display: inline-flex; align-items: center; gap: .35rem; }
.mc-state::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.mc-valid { background: #E3F0E4; color: #22562E; }
.mc-due { background: #FBEBD2; color: #7A4E12; }
.mc-wait { background: rgba(255, 255, 255, .18); color: #fff; }
.mcard-front .mc-motto { color: #EBCB86; font-style: italic; }
/* back */
.mc-back-grid { display: grid; grid-template-columns: 42% 1fr; gap: .9rem; align-items: center; flex: 1; }
.mc-qr svg { width: 100%; height: auto; display: block; border-radius: 6px; }
.mc-noqr { display: grid; place-items: center; aspect-ratio: 1; border: 1.5px dashed #C9CFC6; border-radius: 8px; padding: .5rem;
    font-size: .7rem; color: #4A5347; text-align: center; line-height: 1.3; }
.mc-back-text p { margin: 0 0 .45rem; font-size: .78rem; line-height: 1.35; }
.mc-back-text strong { color: #A3403A; }
.mc-back-head { font-weight: 800; color: #1D4632; font-size: .95rem !important; }
.mc-small { font-size: .62rem; color: #4A5347; margin: .5rem 0 0; line-height: 1.35; }
.mcard-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
/* "Show at an event": full screen, white, card as big as the screen allows */
.card-show { border: 0; padding: 0; width: 100vw; height: 100vh; max-width: none; max-height: none; background: #fff; }
.card-show::backdrop { background: #fff; }
.card-show-inner { min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; padding: 1.2rem; }
.mcard-big { width: min(94vw, 150vh, 640px); }
.mcard-big .mc-name { font-size: clamp(1.3rem, 5.5vw, 2.2rem); }
.mcard-big .mc-grid { font-size: clamp(.85rem, 3.2vw, 1.15rem); }
.card-show-help { margin: 0; color: #4A5347; }
@media (max-width: 420px) {
    .mc-back-grid { grid-template-columns: 40% 1fr; gap: .6rem; }
    .mc-back-text p { font-size: .72rem; }
}

/* printed card: same look as the screen (eucalypt green, kanga stripe, QR on the back) */
@media print {
    .pc-front { background: #1D4632 !important; padding-top: 5.2mm !important; }
    .pc-stripe { position: absolute; left: 0; right: 0; top: 0; height: 2mm; -webkit-print-color-adjust: exact; print-color-adjust: exact;
        background: repeating-linear-gradient(90deg, #393B32 0 3.5mm, #BD4A44 3.5mm 7mm, #00753A 7mm 10.5mm, #CC9E4E 10.5mm 14mm) !important; }
    .pc-motto { color: #EBCB86; }
    .pc-back-grid { display: flex; gap: 3mm; align-items: flex-start; }
    .pc-qr { width: 21mm; flex: none; }
    .pc-qr svg { width: 21mm; height: 21mm; display: block; }
    .pc-back strong { color: #A3403A; }
    .pc-back-head { color: #1D4632; }
}
