:root {
    --rrc-red: #C30020;
    --ink: #1a1a1a;
}

body {
    font-family: system-ui, sans-serif;
    margin: 0;
    background: #f4f4f4;
    color: var(--ink);
}

.auth-card {
    max-width: 380px;
    margin: 8vh auto;
    background: #fff;
    padding: 28px;
    border-radius: 14px;
    box-shadow: 0 4px 24px rgba(0,0,0,.08);
}

    .auth-card h1 {
        color: var(--rrc-red);
        margin: 0 0 4px;
        font-size: 1.4rem;
    }

.sub {
    color: #6b6b6b;
    margin: 0 0 20px;
}

.btn-provider {
    display: block;
    text-align: center;
    padding: 11px;
    border-radius: 8px;
    text-decoration: none;
    border: 1px solid #d9d9d9;
    color: var(--ink);
    margin-bottom: 10px;
    font-weight: 600;
}

    .btn-provider.google:hover, .btn-provider.microsoft:hover {
        background: #fafafa;
    }

.divider {
    text-align: center;
    color: #9b9b9b;
    margin: 16px 0;
    position: relative;
}

    .divider span {
        background: #fff;
        padding: 0 10px;
    }

    .divider:before {
        content: "";
        position: absolute;
        top: 50%;
        left: 0;
        right: 0;
        height: 1px;
        background: #e3e3e3;
        z-index: -1;
    }

label {
    display: block;
    font-size: .85rem;
    margin: 8px 0 4px;
}

input {
    width: 100%;
    box-sizing: border-box;
    padding: 10px;
    border: 1px solid #d9d9d9;
    border-radius: 8px;
}

.btn-primary {
    width: 100%;
    margin-top: 16px;
    padding: 11px;
    background: var(--rrc-red);
    color: #fff;
    border: 0;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
}

.foot {
    font-size: .85rem;
    margin-top: 18px;
}

    .foot .muted {
        color: #9b9b9b;
    }

.err {
    color: var(--rrc-red);
    font-size: .85rem;
    margin-top: 12px;
}

/* ---------- Phase 1: member screens ---------- */
.app-shell {
    max-width: 480px;
    margin: 0 auto;
    padding: 16px 16px 84px;
}

.app-head {
    padding: 8px 4px 16px;
}

.greeting {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--ink);
}

.level-line {
    color: var(--rrc-red);
    font-weight: 600;
    margin-top: 2px;
}

.muted {
    color: #9b9b9b;
}

.card {
    background: #fff;
    border-radius: 14px;
    padding: 18px;
    margin-bottom: 14px;
    box-shadow: 0 2px 14px rgba(0,0,0,.06);
}

.card-label {
    font-size: .75rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #9b9b9b;
    margin-bottom: 8px;
}

.card.notice {
    border-left: 4px solid var(--rrc-red);
}

.card.lapsed {
    background: #fdecec;
    color: #8a1420;
    font-weight: 600;
}

.renew-ask {
    font-size: 1.05rem;
    margin: .2rem 0 .8rem;
}

.bar {
    height: 10px;
    background: #eee;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 14px;
}

.bar-fill {
    height: 100%;
    background: var(--rrc-red);
}

.tiles {
    display: flex;
    gap: 12px;
}

.tile {
    flex: 1;
    background: #fff;
    border-radius: 14px;
    padding: 16px;
    text-align: center;
    box-shadow: 0 2px 14px rgba(0,0,0,.06);
}

.tile-num {
    font-size: 1.6rem;
    font-weight: 800;
}

.tile-cap {
    font-size: .75rem;
    color: #9b9b9b;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.levels {
    list-style: none;
    margin: 0;
    padding: 0;
}

.level-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 0;
    border-bottom: 1px solid #f0f0f0;
}

    .level-row:last-child {
        border-bottom: 0;
    }

    .level-row .lv-name {
        font-weight: 700;
        flex: 1;
    }

    .level-row .lv-thr {
        color: #6b6b6b;
    }

    .level-row .lv-flag {
        font-size: .8rem;
        width: 76px;
        text-align: right;
    }

    .level-row.off {
        opacity: .5;
    }

    .level-row.on .lv-flag {
        color: #0a7d28;
        font-weight: 700;
    }

.giving {
    width: 100%;
    border-collapse: collapse;
}

    .giving th, .giving td {
        padding: 8px 6px;
        border-bottom: 1px solid #f0f0f0;
        text-align: left;
        font-size: .9rem;
    }

        .giving th.r, .giving td.r {
            text-align: right;
        }

.member-card {
    background: linear-gradient(135deg,#C30020,#8a0016);
    color: #fff;
    border-radius: 18px;
    padding: 22px;
    text-align: center;
    box-shadow: 0 6px 24px rgba(195,0,32,.3);
    margin-bottom: 14px;
}

.mc-top {
    font-size: .8rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    opacity: .85;
}

.mc-name {
    font-size: 1.4rem;
    font-weight: 800;
    margin-top: 6px;
}

.mc-level {
    opacity: .9;
    margin-bottom: 16px;
}

.mc-qr {
    background: #fff;
    width: 200px;
    height: 200px;
    margin: 0 auto 14px;
    padding: 10px;
    border-radius: 10px;
}

    .mc-qr img {
        display: block;
        margin: 0 auto;
    }

.mc-foot {
    display: flex;
    justify-content: space-between;
    font-size: .8rem;
    opacity: .9;
}

.mc-note {
    font-size: .72rem;
    opacity: .75;
    margin-top: 10px;
}

.tabbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    background: #fff;
    border-top: 1px solid #e3e3e3;
    padding-bottom: env(safe-area-inset-bottom,0);
    max-width: 480px;
    margin: 0 auto;
}

    .tabbar a {
        flex: 1;
        text-align: center;
        padding: 12px 0;
        text-decoration: none;
        color: #9b9b9b;
        font-size: .8rem;
        font-weight: 600;
    }

        .tabbar a.active {
            color: var(--rrc-red);
        }

/* recent gift block + small muted */
.recent-gift {
    text-align: center;
    padding: 8px 0 4px;
}

.rg-amt {
    font-size: 2rem;
    font-weight: 800;
    color: var(--rrc-red);
}

.rg-fund {
    font-weight: 600;
    margin-top: 2px;
}

.rg-meta {
    color: #6b6b6b;
    font-size: .85rem;
    margin-top: 4px;
}

.muted.sm {
    font-size: .78rem;
    margin-top: 14px;
}

/* ---------- Events ---------- */
.sub-line {
    color: #6b6b6b;
    font-size: .9rem;
    margin-top: 2px;
}

.ev {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 16px;
    box-shadow: 0 2px 14px rgba(0,0,0,.07);
}

.ev-strip {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    background: var(--rrc-red);
    color: #fff;
    padding: 9px 16px;
}

.ev-cat {
    color: #fff;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.ev-req {
    background: rgba(255,255,255,.18);
    padding: 3px 10px;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 600;
    white-space: nowrap;
}

.ev-body {
    display: flex;
    gap: 14px;
    padding: 16px 16px 4px;
}

.ev-date {
    flex: 0 0 56px;
    height: 60px;
    border: 2px solid var(--rrc-red);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.ev-mon {
    font-size: .68rem;
    font-weight: 800;
    color: var(--rrc-red);
    text-transform: uppercase;
    letter-spacing: .08em;
}

.ev-day {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--ink);
    margin-top: 3px;
}

.ev-info {
    min-width: 0;
}

.ev-title {
    font-size: 1.15rem;
    font-weight: 800;
    margin: 0 0 6px;
    line-height: 1.25;
    color: var(--ink);
}

.ev-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #6b6b6b;
    font-size: .88rem;
    margin-top: 4px;
}

    .ev-meta svg {
        flex: 0 0 15px;
        width: 15px;
        height: 15px;
        fill: none;
        stroke: currentColor;
        stroke-width: 2;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

.ev-desc {
    color: #444;
    font-size: .9rem;
    line-height: 1.45;
    margin: 10px 16px 0;
}

.ev-foot {
    padding: 14px 16px 16px;
}

.ev-btn {
    display: block;
    box-sizing: border-box;
    width: 100%;
    margin: 0;
    text-align: center;
    text-decoration: none;
}

.ev-note {
    color: #9b9b9b;
    font-size: .85rem;
}

.ev-lockmsg {
    background: #f4f4f4;
    color: #6b6b6b;
    border-radius: 10px;
    padding: 11px 14px;
    font-size: .85rem;
    font-weight: 600;
    text-align: center;
}

/* Locked: same layout, muted */
.ev-locked .ev-strip {
    background: #a8a8a8;
}

.ev-locked .ev-date {
    border-color: #cfcfcf;
}

.ev-locked .ev-mon {
    color: #a8a8a8;
}

.ev-locked .ev-day,
.ev-locked .ev-title {
    color: #7a7a7a;
}