* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
    background: #f5f6f8; color: #222; font-size: 14px;
}
.hidden { display: none !important; }
.btn {
    padding: 8px 16px; border: 1px solid #d4d4d4; border-radius: 8px; background: #fff;
    color: #333; cursor: pointer; font-size: 14px; transition: all .15s;
}
.btn:hover { border-color: #07c160; color: #07c160; }
.btn.primary { background: #07c160; border-color: #07c160; color: #fff; }
.btn.primary:hover { background: #06ad56; }
.btn.danger { color: #e64340; border-color: #e64340; }
.btn.danger:hover { background: #e64340; color: #fff; }
.btn-block { width: 100%; padding: 11px; font-size: 15px; }

/* 登录 */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.login-card { width: 360px; max-width: 92vw; background: #fff; border-radius: 16px; padding: 36px 32px; box-shadow: 0 10px 40px rgba(0,0,0,.08); }
.login-card h1 { font-size: 20px; text-align: center; }
.login-card .sub { text-align: center; color: #999; margin: 6px 0 24px; }
.login-card input { width: 100%; padding: 11px 12px; margin-bottom: 14px; border: 1px solid #ddd; border-radius: 8px; font-size: 14px; outline: none; }
.login-card input:focus { border-color: #07c160; }
.error { color: #e64340; font-size: 13px; margin-top: 10px; text-align: center; }

/* 顶部栏 */
.topbar { background: #fff; border-bottom: 1px solid #eee; }
.topbar-inner { max-width: 960px; margin: 0 auto; padding: 14px 20px; display: flex; align-items: center; justify-content: space-between; }
.topbar-inner strong { font-size: 16px; }
.actions { display: flex; gap: 10px; }

.container { max-width: 960px; margin: 0 auto; padding: 24px 20px 60px; }
.toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.toolbar h2 { font-size: 18px; }
.toolbar-actions { display: flex; gap: 10px; }
.tips { background: #f0f9f4; border: 1px solid #cdeeda; color: #1f7a44; border-radius: 10px; padding: 12px 14px; line-height: 1.7; margin-bottom: 20px; font-size: 13px; }
.section-title { font-size: 14px; font-weight: 600; color: #333; border-top: 1px solid #eee; margin: 18px 0 14px; padding-top: 14px; }
.section-title:first-of-type { border-top: 0; margin-top: 0; padding-top: 0; }

/* 图标卡片 */
.item-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.item-card { display: flex; flex-direction: column; background: #fff; border: 1px solid #eef0f2; border-radius: 14px; padding: 20px 18px 18px; box-shadow: 0 1px 3px rgba(16, 24, 40, .06); transition: box-shadow .18s ease, transform .18s ease; }
.item-card:hover { box-shadow: 0 10px 28px rgba(16, 24, 40, .10); transform: translateY(-2px); }
.item-card-head { display: flex; align-items: center; gap: 16px; }
.item-card .thumb { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; background: linear-gradient(135deg, #f7f9fc, #eef1f5); border: 1px solid #eef0f2; flex-shrink: 0; }
.item-title { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; color: #1f2329; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-card-foot { display: flex; justify-content: flex-end; gap: 14px; margin-top: 18px; padding-top: 14px; border-top: 1px solid #f0f2f5; }
.btn-edit { background: #f2f7ff; color: #2563eb; border-color: #d6e4ff; padding: 6px 16px; }
.btn-edit:hover { background: #e5efff; border-color: #a9c4ff; color: #1d4ed8; }
.btn-del { background: #fff5f5; color: #e5484d; border-color: #ffd7d8; padding: 6px 16px; }
.btn-del:hover { background: #ffecec; border-color: #ffb3b5; color: #d13438; }
.switch { display: flex; align-items: center; gap: 10px; cursor: pointer; flex-shrink: 0; user-select: none; margin-left: 6px; }
.switch input { display: none; }
.switch-track { width: 34px; height: 19px; border-radius: 999px; background: #d7dbe0; position: relative; transition: background .18s ease; }
.switch-thumb { position: absolute; top: 2px; left: 2px; width: 15px; height: 15px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .18s ease; }
.switch input:checked + .switch-track { background: #07c160; }
.switch input:checked + .switch-track .switch-thumb { transform: translateX(15px); }
.switch-text { font-size: 12px; color: #666; }
.empty { text-align: center; color: #999; padding: 60px 0; }

/* 会员列表 */
.member-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 18px; }
.stat-card { background: #fff; border: 1px solid #eef0f2; border-radius: 14px; padding: 18px 20px; box-shadow: 0 1px 3px rgba(16,24,40,.05); }
.stat-num { font-size: 26px; font-weight: 700; color: #1f2329; }
.stat-label { margin-top: 6px; font-size: 12px; color: #8a919f; }
.search-row { display: flex; gap: 10px; margin-bottom: 16px; }
.search-row input { flex: 1; max-width: 420px; padding: 9px 12px; border: 1px solid #ddd; border-radius: 8px; font-size: 14px; outline: none; }
.search-row input:focus { border-color: #07c160; }
.table-wrap { background: #fff; border: 1px solid #eef0f2; border-radius: 14px; overflow: hidden; box-shadow: 0 1px 3px rgba(16,24,40,.05); }
.member-table { width: 100%; border-collapse: collapse; }
.member-table th, .member-table td { padding: 14px 16px; text-align: left; font-size: 13px; border-bottom: 1px solid #f0f2f5; }
.member-table th { background: #fafbfc; color: #6b7280; font-weight: 600; font-size: 12px; letter-spacing: .02em; }
.member-table tbody tr:last-child td { border-bottom: 0; }
.member-table tbody tr:hover { background: #f7f9fc; }
.member-table .th-actions { text-align: right; }
.member-table td:last-child { text-align: right; }
.user-cell { display: flex; align-items: center; gap: 10px; }
.user-meta { display: flex; flex-direction: column; gap: 2px; }
.user-phone { font-size: 13px; font-weight: 600; color: #1f2329; }
.avatar { width: 34px; height: 34px; border-radius: 50%; color: #fff; font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.count-badge { display: inline-flex; align-items: center; background: #f2f7ff; color: #2563eb; border-radius: 999px; padding: 4px 12px; font-size: 12px; font-weight: 600; }
.spent { color: #e5484d; font-weight: 700; }
.muted { color: #9aa1ad; }
.pager { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 20px; }
.pager .btn:disabled { opacity: .45; cursor: not-allowed; }
.pager-info { color: #666; font-size: 13px; }
.modal-lg { width: 760px; }
.detail-block { margin-bottom: 12px; }
.detail-label { font-size: 12px; color: #999; margin-bottom: 4px; }
.detail-value.mono { font-family: ui-monospace, Menlo, monospace; word-break: break-all; background: #fafafa; border-radius: 8px; padding: 10px 12px; }
.detail-grid { display: flex; gap: 24px; color: #555; font-size: 13px; margin-bottom: 12px; }
.detail-grid span { display: block; color: #999; font-size: 12px; }
.detail-title { font-size: 14px; font-weight: 600; color: #333; margin: 18px 0 10px; padding-top: 12px; border-top: 1px solid #f0f0f0; }
.detail-title:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.detail-empty { color: #bbb; font-size: 13px; }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { background: #e8f6ff; color: #0a7cd6; border-radius: 999px; padding: 4px 12px; font-size: 12px; }
.ok-text { color: #07c160; }
.exp-text { color: #e64340; }
.muted { color: #999; font-size: 12px; }
.detail-table { margin-top: 4px; }
.expiry-row { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.expiry-name { flex: 1; font-size: 14px; color: #333; }
.expiry-input { padding: 8px 10px; border: 1px solid #ddd; border-radius: 8px; font-size: 13px; outline: none; }
.expiry-input:focus { border-color: #07c160; }

/* 弹窗 */
.modal-mask { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px; z-index: 100; overflow-y: auto; }
.modal { width: 520px; max-width: 100%; background: #fff; border-radius: 16px; padding: 24px; box-shadow: 0 20px 60px rgba(0,0,0,.2); }
.modal-sm { width: 400px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.modal-head h3 { font-size: 17px; }
.modal-close { border: 0; background: none; font-size: 24px; color: #999; cursor: pointer; line-height: 1; }
.field { display: block; margin-bottom: 16px; color: #555; font-size: 13px; }
.field input, .field select { width: 100%; margin-top: 6px; padding: 10px 12px; border: 1px solid #ddd; border-radius: 8px; font-size: 14px; outline: none; background: #fff; }
.field input:focus, .field select:focus { border-color: #07c160; }
.field .hint { display: block; color: #999; margin-top: 5px; font-size: 12px; }
.switch-row { display: flex; align-items: center; gap: 8px; color: #555; font-size: 14px; margin-bottom: 20px; cursor: pointer; }
.switch-row input { width: 16px; height: 16px; accent-color: #07c160; }
.switch-row .hint-inline { color: #999; font-size: 12px; }
.icon-picker { display: flex; gap: 16px; align-items: flex-start; margin-top: 6px; }
.icon-preview { width: 80px; height: 80px; border-radius: 14px; border: 1px dashed #ccc; display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 12px; overflow: hidden; background: #fafafa; }
.icon-preview img { width: 100%; height: 100%; object-fit: cover; }
.icon-picker-side { flex: 1; }
.icon-picker-side input[type=file] { font-size: 13px; }
.upload-status { font-size: 12px; color: #07c160; margin-top: 6px; }
.error-text { font-size: 12px; color: #e64340; margin-top: 6px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }
.toast { position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%); background: rgba(0,0,0,.78); color: #fff; padding: 10px 22px; border-radius: 20px; font-size: 14px; z-index: 200; }
