/* Garden Club PWA shell — consumer mobile frame on the §12 "light-blue modern"
   tokens (set on :root by the built app.css). Served statically (not via Vite)
   so the consumer shell stays decoupled from the admin bundle. */
:root { --club-maxw: 480px; }

* { -webkit-tap-highlight-color: transparent; }
body { background: #f4f7fb; }

.club-shell {
    max-width: var(--club-maxw);
    margin: 0 auto;
    min-height: 100dvh;
    background: #f4f7fb;
    position: relative;
    padding-bottom: 78px; /* room for the tab bar */
}

/* Top app-bar */
.club-appbar {
    position: sticky; top: 0; z-index: 1020;
    display: flex; align-items: center; justify-content: space-between;
    background: #fff; border-bottom: 1px solid #e6ecf3;
    padding: .6rem .9rem;
}
.club-brand { font-weight: 700; color: #2c7be5; letter-spacing: -.01em; }
.club-appbar-actions { display: flex; align-items: center; gap: .4rem; }
.club-iconbtn { border: 0; background: transparent; color: #6b7785; font-size: 1.2rem; line-height: 1; padding: .25rem .35rem; }
.club-points {
    display: inline-flex; align-items: center; gap: .35rem;
    background: var(--d-brand-tint, #f0f6ff); color: #1657b9; font-weight: 600;
    border: 0; border-radius: 999px; padding: .3rem .7rem; font-size: .95rem;
}

main.club-main { padding: .9rem; }
.club-greet { font-size: 1.1rem; font-weight: 600; color: #1d2939; margin: .2rem 0 .8rem; }

/* Stat tiles (§12) */
.stat-tile { background: #fff; border: 1px solid #e6ecf3; border-radius: 8px; padding: .9rem; box-shadow: 0 1px 2px rgba(13, 38, 76, .04); height: 100%; }
.stat-chip { width: 48px; height: 48px; border-radius: 8px; background: #f0f6ff; color: #2c7be5; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; }
.stat-label { text-transform: uppercase; font-size: .8rem; letter-spacing: .03em; color: #6b7785; }
.stat-value { font-size: 1.75rem; font-weight: 600; color: #1d2939; line-height: 1.1; }

.section-label { text-transform: uppercase; font-size: .8rem; letter-spacing: .03em; color: #6b7785; margin: 1.1rem .1rem .5rem; display: flex; justify-content: space-between; }
.card-soft { background: #fff; border: 1px solid #e6ecf3; border-radius: 8px; box-shadow: 0 1px 2px rgba(13, 38, 76, .04); }
.chip-tint { background: var(--d-brand-tint, #f0f6ff); }

/* Bottom tab bar */
.club-tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030;
    max-width: var(--club-maxw); margin: 0 auto;
    display: grid; grid-template-columns: repeat(5, 1fr);
    background: #fff; border-top: 1px solid #e6ecf3;
    padding-bottom: env(safe-area-inset-bottom, 0);
}
.club-tab { border: 0; background: transparent; padding: .5rem 0 .55rem; display: flex; flex-direction: column; align-items: center; gap: .15rem; color: #6b7785; font-size: .7rem; }
.club-tab i { font-size: 1.25rem; }
.club-tab.active { color: #2c7be5; }

/* Tab panes */
.tab-pane { display: none; }
.tab-pane.active { display: block; }
.placeholder-tab { text-align: center; color: #6b7785; padding: 3rem 1rem; }
.placeholder-tab i { font-size: 2.5rem; color: #2c7be5; }

/* Auth overlay (OTP) — §12.4 auth card */
.club-overlay { position: fixed; inset: 0; z-index: 1050; background: rgba(20, 24, 31, .45); display: none; align-items: center; justify-content: center; padding: 1rem; }
.club-overlay.open { display: flex; }
.club-authcard { width: 100%; max-width: 420px; background: #fff; border-radius: 16px; box-shadow: 0 12px 40px rgba(13, 38, 76, .10); padding: 1.5rem; }

/* Nudges — inline cards (Home) + popup modal */
.nudge-card { position: relative; }
.nudge-x { position: absolute; top: .35rem; right: .4rem; border: 0; background: transparent; color: #c2ccd9; font-size: 1rem; line-height: 1; cursor: pointer; padding: .1rem .3rem; }
.nudge-x:hover { color: #98a2b3; }
.nudge-icon { width: 38px; height: 38px; flex: 0 0 auto; border-radius: 9px; background: #eaf2fe; color: #2c7be5; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; }
.nudge-title { font-weight: 700; color: #1d2939; font-size: .94rem; }
.nudge-body { font-size: .82rem; color: #6b7785; margin-top: .1rem; line-height: 1.35; }
.nudge-modal { position: relative; max-width: 340px; }
.nudge-modal-x { position: absolute; top: .6rem; right: .7rem; }
.nudge-modal-icon { width: 56px; height: 56px; margin: .1rem auto .75rem; border-radius: 50%; background: #eaf2fe; color: #2c7be5; display: flex; align-items: center; justify-content: center; font-size: 1.6rem; }
.nudge-modal-title { font-weight: 800; color: #1d2939; font-size: 1.12rem; margin-bottom: .35rem; }
.nudge-modal-body { font-size: .9rem; color: #6b7785; line-height: 1.4; }
.nudge-modal-skip { border: 0; background: transparent; color: #98a2b3; font-size: .82rem; cursor: pointer; padding: .25rem; margin-top: .3rem; }
.nudge-modal-rewards { margin: .2rem 0 1rem; border-top: 1px solid #eef2f7; text-align: left; }
.nudge-modal-reward { display: flex; justify-content: space-between; align-items: center; gap: .6rem; padding: .55rem .1rem; border-bottom: 1px solid #eef2f7; font-size: .88rem; }
.nudge-modal-reward span:first-child { color: #1d2939; font-weight: 600; }
.nudge-modal-reward-cost { color: #6b7785; white-space: nowrap; }

/* Show/hide bits by auth state */
.club-authed .when-guest { display: none; }
body:not(.club-authed) .when-authed { display: none; }

/* Garden plant cards */
.plant-card { display: flex; align-items: center; gap: .75rem; background: #fff; border: 1px solid #e6ecf3; border-radius: 8px; padding: .8rem; margin-bottom: .6rem; box-shadow: 0 1px 2px rgba(13, 38, 76, .04); }
.plant-icon { width: 44px; height: 44px; flex: 0 0 auto; border-radius: 8px; background: #f0f6ff; color: #2c7be5; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; }
.plant-body { flex: 1 1 auto; min-width: 0; }
.plant-name { font-weight: 600; color: #1d2939; }
.plant-meta { font-size: .8rem; color: #6b7785; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.badge-due { background: #fff4e5; color: #b26a00; }
.badge-ok { background: #e9f7ef; color: #1e7e44; }
.streak-chip { color: #b26a00; font-weight: 600; }
.plant-log { flex: 0 0 auto; }
.club-toast { position: fixed; left: 50%; bottom: 92px; transform: translateX(-50%); z-index: 1060; background: #1d2939; color: #fff; border-radius: 999px; padding: .4rem .9rem; font-size: .85rem; opacity: 0; transition: opacity .2s; pointer-events: none; }
.club-toast.show { opacity: 1; }

/* Rewards — ways to earn */
.earn-list { display: grid; gap: .5rem; }
.earn-row { display: flex; align-items: center; gap: .7rem; background: #fff; border: 1px solid #e6ecf3; border-radius: 8px; padding: .65rem .8rem; box-shadow: 0 1px 2px rgba(13, 38, 76, .04); }
.earn-chip { width: 38px; height: 38px; flex: 0 0 auto; border-radius: 8px; background: var(--d-brand-tint, #f0f6ff); color: #2c7be5; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; }
.earn-title { font-weight: 600; color: #1d2939; font-size: .92rem; }
.earn-sub { font-size: .8rem; color: #6b7785; }

/* Rewards — redeemable catalog */
.reward-card { display: flex; align-items: center; gap: .75rem; background: #fff; border: 1px solid #e6ecf3; border-radius: 8px; padding: .8rem; margin-bottom: .6rem; box-shadow: 0 1px 2px rgba(13, 38, 76, .04); }
.reward-icon { width: 44px; height: 44px; flex: 0 0 auto; border-radius: 8px; background: #f0f6ff; color: #2c7be5; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; }
.reward-body { flex: 1 1 auto; min-width: 0; }
.reward-label { font-weight: 600; color: #1d2939; }
.reward-cost { font-size: .8rem; color: #6b7785; }
.reward-cost .bi-star-fill { color: #f5a623; }
.reward-redeem { flex: 0 0 auto; }

/* Redeem result card */
.redeem-result { border-color: #bfe0c4; background: #f3faf5; margin-bottom: .6rem; }
.redeem-result-head { font-size: .85rem; font-weight: 600; color: #1e7e44; }
.redeem-result-head .bi { color: #1e7e44; }
.redeem-code-row { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-top: .5rem; }
.redeem-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 700; font-size: 1.05rem; letter-spacing: .04em; color: #1d2939; background: #fff; border: 1px dashed #bfe0c4; border-radius: 6px; padding: .35rem .6rem; word-break: break-all; }

/* Points history (ledger) */
.ledger-row { display: flex; align-items: center; justify-content: space-between; gap: .6rem; background: #fff; border: 1px solid #e6ecf3; border-radius: 8px; padding: .6rem .8rem; margin-bottom: .45rem; box-shadow: 0 1px 2px rgba(13, 38, 76, .04); }
.ledger-info { min-width: 0; }
.ledger-note { font-weight: 600; color: #1d2939; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ledger-date { font-size: .78rem; color: #6b7785; }
.ledger-delta { flex: 0 0 auto; font-weight: 700; font-size: .95rem; }
.ledger-pos { color: #1e7e44; }
.ledger-neg { color: #c0392b; }

/* Me — profile */
.min-w-0 { min-width: 0; }
.me-avatar { width: 52px; height: 52px; flex: 0 0 auto; border-radius: 999px; background: #f0f6ff; color: #2c7be5; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; }
.me-name { font-weight: 700; color: #1d2939; font-size: 1.05rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.referral-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 700; letter-spacing: .06em; color: #1657b9; }
