:root{--navy:#111c2f;--green:#168a57;--bg:#f3f5f7;--line:#e2e8f0;--text:#253044;--muted:#748093}
*{box-sizing:border-box}html,body{margin:0;min-height:100%;font-family:-apple-system,BlinkMacSystemFont,"Noto Sans KR","Malgun Gothic",sans-serif;background:var(--bg);color:var(--text)}button,input,select{font:inherit}.hidden{display:none!important}
.sponsor-header{min-height:330px;display:grid;place-items:center;background:var(--navy);color:#fff;text-align:center}.sponsor-header>div{padding:25px}.sponsor-header h1{margin:16px 0 7px;font-size:28px}.sponsor-header p{margin:0;color:#cbd5e1;font-size:13px}
.sponsor-page{width:min(1100px,calc(100% - 24px));margin:auto;padding:20px 0 50px}.filter-card,.list-card,.summary div{border:1px solid var(--line);border-radius:16px;background:#fff;box-shadow:0 7px 22px #2734490d}.filter-card{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:15px;margin-bottom:15px}.filter-card input,.filter-card select,.filter-card>button{min-height:44px;border:1px solid #cbd5e1;border-radius:9px;background:#fff;padding:8px 13px}.filter-card>button{font-weight:800;cursor:pointer}.view-tabs{display:flex;padding:3px;border-radius:10px;background:#edf2f5}.view-tabs button{border:0;border-radius:8px;background:none;padding:9px 13px;font-weight:800}.view-tabs button.active{background:var(--green);color:#fff}.filter-card .admin-button{margin-left:auto;border-color:var(--green);background:var(--green);color:#fff}.filter-card .logout{color:#475569}
.summary{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:15px}.summary div{padding:18px}.summary small{display:block;color:var(--muted);font-size:11px}.summary b{display:block;margin-top:7px;color:var(--green);font-size:22px}.list-card{padding:20px}.list-head{display:flex;align-items:center;justify-content:space-between;gap:10px}.list-head h2{margin:0;font-size:20px}.list-head p{margin:5px 0 0;color:var(--muted);font-size:11px}.list-head span{color:var(--green);font-weight:800}.table-wrap{margin-top:16px;overflow:auto}table{width:100%;min-width:760px;border-collapse:collapse}th,td{padding:14px 11px;border-bottom:1px solid #edf1f4;text-align:center;font-size:13px}th{background:#f8fafc;color:#64748b;font-size:11px}td:nth-child(2){font-weight:800}.type{display:inline-block;padding:6px 9px;border-radius:20px;background:#eaf7f0;color:#168a57;font-size:11px;font-weight:800}.detail{line-height:1.6}.detail small{display:block;color:var(--muted)}.amount{color:var(--green);font-weight:900}.pagination{display:flex;justify-content:center;gap:6px;flex-wrap:wrap;margin-top:18px}.pagination:empty{display:none}.pagination button{min-width:38px;height:38px;border:1px solid #dbe3ea;border-radius:9px;background:#fff;color:#475569;font-weight:800}.pagination button.active{border-color:var(--green);background:var(--green);color:#fff}.pagination button:disabled{opacity:.4}
.modal{position:fixed;z-index:150;inset:0;display:none;align-items:center;justify-content:center;padding:12px;background:#07101dc4}.modal.open{display:flex}.modal-box{width:100%;max-height:94dvh;overflow:hidden;border-radius:18px;background:#fff;box-shadow:0 24px 70px #0006}.modal-box.small{max-width:440px}.modal-box header{display:flex;justify-content:space-between;padding:20px;border-bottom:1px solid var(--line)}.modal-box header b,.modal-box header small{display:block}.modal-box header small{margin-top:5px;color:var(--muted)}.modal-box header button{border:0;background:none;font-size:27px}.form{padding:20px;max-height:calc(94dvh - 80px);overflow:auto}.form label{display:block;margin:12px 0 6px;font-size:13px;font-weight:800}.form input,.form select{width:100%;min-height:50px;margin-top:6px;padding:10px 12px;border:1px solid #cbd5e1;border-radius:10px;background:#fff;font-size:16px}.submit{width:100%;min-height:51px;border:0;border-radius:10px;background:var(--green);color:#fff;font-weight:800}.error{min-height:20px;color:#dc2626;font-size:12px;text-align:center}.calculation{margin-top:12px;padding:12px;border-radius:10px;background:#eef8f2;color:#167449;font-size:12px;font-weight:800;line-height:1.6}.alert{max-width:360px;padding:26px;text-align:center}.alert p{white-space:pre-line;color:#64748b}.alert button{margin-top:15px}
@media(max-width:700px){.sponsor-header{min-height:300px}.sponsor-header h1{font-size:21px}.summary{grid-template-columns:repeat(2,1fr)}.summary div{padding:14px}.summary b{font-size:18px}.filter-card>*{flex:1}.filter-card .view-tabs{flex-basis:100%}.view-tabs button{flex:1}.filter-card .admin-button{margin-left:0}.list-card{padding:14px}.modal{align-items:flex-start;padding-top:max(8px,env(safe-area-inset-top))}.modal-box{max-height:calc(100dvh - 16px)}}
.member-suggest-wrap{position:relative}.member-suggestions{position:absolute;z-index:9;left:0;right:0;top:100%;max-height:210px;overflow:auto;border:1px solid #cbd5e1;border-radius:10px;background:#fff;box-shadow:0 12px 25px #0002}.member-suggestions:empty{display:none}.member-suggestions button{display:block;width:100%;padding:12px;border:0;border-bottom:1px solid #edf1f4;background:#fff;text-align:left;font-weight:800;cursor:pointer}.member-suggestions button:hover{background:#eef8f2}.manage-actions{display:flex;justify-content:center;gap:5px;white-space:nowrap}.manage-actions button{min-height:32px;padding:5px 9px;border-radius:7px;font-size:11px;font-weight:800;cursor:pointer}.edit-sponsor{border:1px solid #60a5fa;background:#eff6ff;color:#1d4ed8}.delete-sponsor{border:1px solid #fca5a5;background:#fef2f2;color:#dc2626}.confirm-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:18px}.confirm-actions button{min-height:46px;border:0;border-radius:9px;font-weight:800;cursor:pointer}.cancel-button{background:#eef1f4;color:#475569}.delete-button{background:#dc2626;color:#fff}
.sponsor-member-link{border:0;background:none;padding:2px;color:#1e293b;font-weight:900;text-decoration:underline;text-decoration-color:#86c9a9;text-underline-offset:4px;cursor:pointer}.sponsor-member-link:hover{color:var(--green)}.member-history-box{max-width:720px}.member-history-body{padding:18px;max-height:calc(94dvh - 82px);overflow:auto}.member-history-toolbar{display:flex;align-items:end;justify-content:space-between;gap:12px}.member-history-toolbar label{color:#64748b;font-size:12px;font-weight:800}.member-history-toolbar select{display:block;min-width:130px;height:43px;margin-top:6px;border:1px solid #cbd5e1;border-radius:9px;padding:0 11px;background:#fff}.member-history-toolbar>span{color:var(--green);font-weight:900}.member-history-summary{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin:15px 0}.member-history-summary div{padding:12px;border:1px solid #dcebe3;border-radius:11px;background:#f3faf6}.member-history-summary small,.member-history-summary b{display:block}.member-history-summary small{color:#64748b;font-size:10px}.member-history-summary b{margin-top:5px;color:var(--green);font-size:15px}.member-history-item{display:grid;grid-template-columns:95px 105px minmax(0,1fr) 110px;align-items:center;gap:10px;padding:14px 5px;border-bottom:1px solid #e7edf1}.member-history-item .history-date{color:#64748b;font-size:12px}.member-history-item .history-type{width:max-content;padding:5px 8px;border-radius:999px;background:#eaf7f0;color:#168a57;font-size:10px;font-weight:900}.member-history-item .history-detail{line-height:1.5}.member-history-item .history-detail small{display:block;color:#748093}.member-history-item .history-amount{text-align:right;color:var(--green);font-weight:900}.member-history-empty{padding:45px 10px;text-align:center;color:#748093}
@media(max-width:700px){.member-history-summary{grid-template-columns:repeat(2,1fr)}.member-history-item{grid-template-columns:1fr auto;gap:6px 10px}.member-history-item .history-date{grid-column:1}.member-history-item .history-type{grid-column:2;grid-row:1}.member-history-item .history-detail{grid-column:1}.member-history-item .history-amount{grid-column:2;grid-row:2}.member-history-box{max-height:calc(100dvh - 16px)}}
