:root{--ink:#0f172a;--muted:#64748b;--line:#e7ecf3;--surface:#fff;--bg:#f4f7fb;--brand:#2563eb;--brand-dark:#1d4ed8;--mint:#0f9f75;--shadow:0 12px 30px rgba(15,23,42,.07)}
*{box-sizing:border-box}
html{background:var(--bg);color:var(--ink);font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;-webkit-text-size-adjust:100%}
body{margin:0;min-height:100vh;background:var(--bg)}
button,input{font:inherit}
a{color:inherit;text-decoration:none}
.member-shell{width:100%;max-width:520px;min-height:100vh;margin:auto;background:var(--bg);box-shadow:0 0 45px rgba(15,23,42,.06)}
.member-topbar{position:sticky;top:0;z-index:10;display:flex;align-items:center;justify-content:space-between;padding:calc(14px + env(safe-area-inset-top)) 20px 14px;background:rgba(244,247,251,.95);backdrop-filter:blur(14px)}
.member-topbar>div{display:grid;gap:2px}.member-topbar strong{font-size:20px}.eyebrow,.section-kicker{color:var(--brand);font-size:10px;font-weight:800;letter-spacing:.13em}
.member-avatar,.person-avatar,.profile-avatar{display:grid;place-items:center;border-radius:50%;background:linear-gradient(135deg,#dbeafe,#bfdbfe);color:var(--brand-dark);font-weight:800}
.member-avatar{width:40px;height:40px}
.member-content{padding:6px 16px calc(94px + env(safe-area-inset-bottom))}
.member-bottom-nav{position:fixed;z-index:20;left:50%;bottom:0;transform:translateX(-50%);display:grid;grid-template-columns:repeat(5,1fr);width:min(520px,100%);padding:9px 8px calc(8px + env(safe-area-inset-bottom));border-top:1px solid var(--line);background:rgba(255,255,255,.97);box-shadow:0 -8px 24px rgba(15,23,42,.05);backdrop-filter:blur(16px)}
.member-bottom-nav a{display:grid;justify-items:center;gap:3px;color:#8290a5;font-size:10px;font-weight:700}.member-bottom-nav a span{font-size:22px;line-height:22px}.member-bottom-nav a.active{color:var(--brand)}
.welcome-card{padding:22px;border-radius:24px;background:linear-gradient(135deg,#0f172a,#253655);color:#fff;box-shadow:var(--shadow)}
.welcome-card p{margin:0;color:#aebdd3}.welcome-card h1{margin:5px 0;font-size:25px}.welcome-card span{font-size:12px;color:#cbd5e1}
.balance-card{margin-top:14px;padding:20px;border:1px solid #dbe8ff;border-radius:22px;background:linear-gradient(145deg,#fff,#edf5ff);box-shadow:var(--shadow)}
.balance-card>span{color:var(--muted);font-size:12px;font-weight:700}.balance-card>strong{display:block;margin:7px 0 20px;font-size:31px;letter-spacing:-.04em}.balance-card>div{display:flex;justify-content:space-between;padding-top:14px;border-top:1px solid #dbe8ff;font-size:13px}.balance-card>div span{color:var(--muted)}
.stat-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:14px 0}.stat-card{display:flex;flex-direction:column;gap:8px;padding:18px;border:1px solid var(--line);border-radius:18px;background:#fff}.stat-card span{color:var(--muted);font-size:12px}.stat-card strong{font-size:24px}
.member-section{margin-top:14px;padding:18px;border:1px solid var(--line);border-radius:20px;background:var(--surface);box-shadow:0 5px 18px rgba(15,23,42,.035)}
.section-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.section-heading h2{margin:0;font-size:16px}.section-heading a{color:var(--brand);font-size:12px;font-weight:750}.count-pill{min-width:28px;padding:5px 9px;border-radius:99px;background:#eef4ff;color:var(--brand);font-size:12px;text-align:center}
.activity-list article,.people-list article{display:flex;align-items:center;gap:11px;padding:14px 0;border-bottom:1px solid var(--line)}.activity-list article:last-child,.people-list article:last-child{border:0;padding-bottom:0}.activity-list article>div,.people-list article>div{min-width:0;flex:1}.activity-list strong,.activity-list span,.people-list strong,.people-list small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.activity-list span,.people-list small{margin-top:3px;color:var(--muted);font-size:11px}.activity-list b{color:var(--mint);font-size:13px}
.intro-section{padding:21px;background:linear-gradient(145deg,#fff,#f8fbff)}.intro-section h1{margin:7px 0;font-size:23px}.intro-section p{margin:0;color:var(--muted);font-size:13px;line-height:1.55}
.level-card{padding:17px}.person-avatar{width:38px;height:38px;flex:0 0 auto;font-size:13px}.status-dot{width:9px;height:9px;border-radius:50%;background:#94a3b8}.status-dot.active{background:#22c55e}.status-dot.suspended{background:#ef4444}
.quiet{text-align:center;color:var(--muted);font-size:13px}
.empty-state{display:grid;justify-items:center;padding:24px 8px;text-align:center}.empty-state>span{font-size:32px;color:#94a3b8}.empty-state strong{margin:10px 0 4px}.empty-state p{margin:0;color:var(--muted);font-size:12px}
.ledger-list article{padding:15px 0;border-bottom:1px solid var(--line)}.ledger-list article:first-child{padding-top:0}.ledger-list article:last-child{border:0;padding-bottom:0}.row-main,.row-meta{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.row-main>div{min-width:0}.row-main strong,.row-main span{display:block}.row-main span{margin-top:4px;color:var(--muted);font-size:11px}.row-main b{font-size:14px;white-space:nowrap}.row-meta{margin-top:10px;align-items:center;color:var(--muted);font-size:10px}.status-badge{padding:4px 8px;border-radius:99px;background:#eef2f7;color:#475569;font-weight:800}.status-badge.approved,.status-badge.completed,.status-badge.paid{background:#dcfce7;color:#15803d}.status-badge.pending{background:#fef3c7;color:#a16207}.status-badge.reversed,.status-badge.refunded,.status-badge.cancelled{background:#fee2e2;color:#b91c1c}
.profile-hero{display:grid;justify-items:center;padding:24px}.profile-avatar{width:78px;height:78px;font-size:28px}.profile-hero h1{margin:14px 0 2px;font-size:23px}.profile-hero p{margin:0;color:var(--muted);font-size:12px}.profile-list{padding:5px 18px}.profile-list div{display:flex;justify-content:space-between;gap:18px;padding:15px 0;border-bottom:1px solid var(--line);font-size:13px}.profile-list div:last-child{border:0}.profile-list span{color:var(--muted)}.profile-list strong{text-align:right;overflow-wrap:anywhere}
.logout-form{padding:14px 0}.member-secondary,.member-primary{width:100%;min-height:48px;border-radius:14px;font-weight:800;cursor:pointer}.member-secondary{border:1px solid #fecaca;background:#fff;color:#dc2626}.member-primary{border:0;background:var(--brand);color:#fff;box-shadow:0 10px 20px rgba(37,99,235,.22)}
.member-auth-body{background:linear-gradient(150deg,#eef5ff,#f8fafc 50%,#eef2ff)}.member-login{display:flex;flex-direction:column;justify-content:center;width:min(430px,100%);min-height:100vh;margin:auto;padding:calc(26px + env(safe-area-inset-top)) 22px calc(26px + env(safe-area-inset-bottom))}.login-brand{display:flex;align-items:center;gap:14px;margin-bottom:27px}.brand-mark{display:grid;place-items:center;width:52px;height:52px;border-radius:16px;background:var(--ink);color:#fff;font-size:23px;font-weight:900}.login-brand strong{font-size:25px}.login-brand p{margin:5px 0 0;color:var(--muted);font-size:13px}.login-card{display:grid;gap:16px;padding:22px;border:1px solid rgba(255,255,255,.8);border-radius:24px;background:rgba(255,255,255,.9);box-shadow:0 24px 60px rgba(15,23,42,.09)}.login-card label{display:grid;gap:7px;color:#334155;font-size:12px;font-weight:750}.login-card input{width:100%;height:49px;padding:0 14px;border:1px solid #d8e0eb;border-radius:13px;background:#fff;color:var(--ink);outline:0}.login-card input:focus{border-color:var(--brand);box-shadow:0 0 0 3px rgba(37,99,235,.12)}.member-alert{padding:12px;border-radius:12px;background:#fef2f2;color:#b91c1c;font-size:12px;line-height:1.45}.login-help{color:var(--muted);font-size:11px;text-align:center}
.member-register{justify-content:flex-start;max-width:500px}.member-register .login-brand{margin-top:12px}.registration-card{grid-template-columns:1fr 1fr}.registration-card label:nth-of-type(-n+5),.registration-card button{grid-column:1/-1}.registration-card label small{color:var(--muted);font-weight:500}.optional{float:right;color:var(--muted);font-weight:500}.member-alert-success{background:#ecfdf5;color:#047857}.member-alert-local{display:grid;gap:6px;margin-bottom:14px;background:#eff6ff;color:#1d4ed8}.member-alert-local a{text-decoration:underline;font-weight:800;overflow-wrap:anywhere}.resend-card{margin-top:16px;padding:16px;border:1px solid var(--line);border-radius:16px;background:rgba(255,255,255,.75);font-size:12px}.resend-card summary{cursor:pointer;font-weight:800}.resend-card form{display:grid;gap:11px;margin-top:14px}.resend-card label{display:grid;gap:7px;color:#334155;font-weight:700}.resend-card input{height:46px;padding:0 13px;border:1px solid #d8e0eb;border-radius:12px}.neutral-button{border-color:#d8e0eb;color:var(--brand)}.member-action-link{display:grid;place-items:center}.verification-result .brand-mark{background:var(--brand)}
.registration-card .terms-consent{grid-column:1/-1;display:flex;align-items:flex-start;gap:12px;margin-top:2px;padding:15px;border:2px solid #93b4f8;border-radius:15px;background:#eff6ff;line-height:1.5;cursor:pointer}.registration-card .terms-consent:focus-within{border-color:var(--brand);box-shadow:0 0 0 3px rgba(37,99,235,.12)}.registration-card .terms-consent input{flex:0 0 auto;width:20px;height:20px;margin:4px 0 0;accent-color:var(--brand);cursor:pointer}.registration-card .terms-consent>span{display:grid;gap:7px}.registration-card .terms-consent small{display:block;color:#475569;font-size:11px;font-weight:600}.terms-link{display:inline-flex;width:max-content;padding:7px 11px;border-radius:9px;background:var(--brand);color:#fff!important;text-decoration:none!important;font-size:12px;font-weight:850;box-shadow:0 5px 12px rgba(37,99,235,.22)}.terms-link:hover{background:#1d4ed8}.terms-card a{color:var(--brand);text-decoration:underline;font-weight:800}
.terms-page{width:min(760px,100%)}.terms-page .login-brand{margin-top:12px}.terms-card{display:block;color:#334155;font-size:13px;line-height:1.65}.terms-card h1{margin:0 0 5px;color:var(--ink);font-size:25px}.terms-card h2{margin:24px 0 6px;color:var(--ink);font-size:16px}.terms-card p{margin:7px 0}.terms-card ul{margin:7px 0;padding-left:20px}.terms-meta{color:var(--muted);font-size:11px}.terms-callout{margin:18px 0;padding:14px;border-left:4px solid #f59e0b;border-radius:8px;background:#fffbeb}.terms-actions{margin-top:22px;text-align:center}
.sponsor-lookup-status{display:none;padding:10px 12px;border-radius:11px;font-size:12px;font-weight:750;line-height:1.4}.sponsor-lookup-status.is-checking,.sponsor-lookup-status.is-found,.sponsor-lookup-status.is-missing{display:block}.sponsor-lookup-status.is-checking{background:#f8fafc;color:#64748b}.sponsor-lookup-status.is-found{background:#ecfdf5;color:#047857}.sponsor-lookup-status.is-missing{background:#fff7ed;color:#c2410c}.sponsor-lookup-field input.is-valid{border-color:#10b981;box-shadow:0 0 0 3px rgba(16,185,129,.12)}.sponsor-lookup-field input.is-invalid{border-color:#f97316;box-shadow:0 0 0 3px rgba(249,115,22,.1)}
.portal-role-switch{display:grid;grid-template-columns:1fr 1fr;gap:5px;padding:5px;border:1px solid #dce3ed;border-radius:14px;background:#eef2f7}.portal-role-switch a{padding:10px;border-radius:10px;color:#64748b;font-size:11px;font-weight:800;text-align:center}.portal-role-switch a.active{background:#fff;color:#3157d5;box-shadow:0 3px 10px rgba(15,23,42,.08)}.member-role-switch{margin:-12px 0 14px}.dev-quick-login{margin-top:16px;padding:14px;border:1px dashed #bdc9ec;border-radius:14px;background:#f5f7ff}.dev-quick-login>span{color:#3157d5;font-size:9px;font-weight:900;letter-spacing:.12em}.dev-quick-login p{margin:5px 0 10px;color:#64748b;font-size:11px}.dev-quick-login button{padding:8px 11px;border:1px solid #d3dcf7;border-radius:9px;background:#fff;color:#3157d5;font-size:10px;font-weight:800;cursor:pointer}.member-dev-login>div{display:flex;flex-wrap:wrap;gap:6px}
.member-notice{margin:14px 0;padding:12px 14px;border-radius:13px;font-size:12px}.member-notice.success{background:#ecfdf5;color:#047857}.member-notice.error{background:#fef2f2;color:#b91c1c}.member-hint{color:var(--muted);font-size:11px;line-height:1.5}.member-form,.withdrawal-form{display:grid;gap:14px;margin-top:14px}.member-form label,.withdrawal-form label{display:grid;gap:7px;color:#334155;font-size:12px;font-weight:750}.member-form input,.withdrawal-form input{width:100%;height:47px;padding:0 13px;border:1px solid #d8e0eb;border-radius:12px;background:#fff}.withdrawal-balance{margin-top:14px;padding:20px;border-radius:22px;background:linear-gradient(135deg,#17213d,#253a67);color:#fff;box-shadow:var(--shadow)}.withdrawal-balance>span,.withdrawal-balance>small{color:#cbd5e1;font-size:10px}.withdrawal-balance>strong{display:block;margin:8px 0 17px;font-size:27px}.withdrawal-balance>div{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;padding-top:14px;border-top:1px solid #ffffff24;font-size:10px}.withdrawal-balance>div b{font-size:11px}.withdrawal-balance>small{display:block;margin-top:12px}.claim-list article{padding:14px 0;border-bottom:1px solid var(--line)}.claim-list article:last-child{border-bottom:0}
@media(min-width:700px){.member-shell{min-height:calc(100vh - 32px);margin:16px auto;border-radius:28px;overflow:hidden}.member-bottom-nav{bottom:16px;border-radius:0 0 28px 28px}}
@media(max-width:350px){.member-content{padding-left:11px;padding-right:11px}.member-bottom-nav{padding-left:2px;padding-right:2px}.member-bottom-nav a{font-size:9px}}
@media(max-width:430px){.registration-card{grid-template-columns:1fr}.registration-card label,.registration-card label:nth-of-type(-n+5),.registration-card button{grid-column:1}}
