/* 移动端代理中心 — 风格接近示意图 */
:root {
	--bg: #f4f5f7;
	--card: #fff;
	--border: #e8e8e8;
	--text: #222;
	--muted: #8a8a8a;
	--accent: #07c160;
	--radius: 12px;
	--shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

* {
	box-sizing: border-box;
}

html,
body {
	margin: 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	background: var(--bg);
	color: var(--text);
	font-size: 15px;
	line-height: 1.45;
	min-height: 100%;
}

a {
	color: inherit;
	text-decoration: none;
}

.page {
	max-width: 480px;
	margin: 0 auto;
	min-height: 100vh;
	padding: 16px 14px 32px;
}

.page.page-wide {
	max-width: 960px;
}

.period-sum-card {
	text-align: center;
	padding: 18px 14px 8px;
}

.period-sum-card .sum-label {
	font-size: 13px;
	color: var(--muted);
	margin-bottom: 6px;
}

.period-sum-card .sum-val {
	font-size: 26px;
	font-weight: 700;
	color: var(--accent);
	line-height: 1.2;
}

@media (min-width: 768px) {
	.period-sum-card .sum-val {
		font-size: 34px;
	}
}

.header-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 18px;
}

.user-block {
	display: flex;
	align-items: center;
	gap: 12px;
}

.avatar {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: #ddd center/cover no-repeat;
	border: 1px solid var(--border);
	flex-shrink: 0;
}

.user-meta .nick {
	font-weight: 600;
	font-size: 16px;
}

.user-meta .uid {
	font-size: 13px;
	color: var(--muted);
	margin-top: 2px;
}

.btn-pill {
	border: 1px solid var(--border);
	background: var(--card);
	border-radius: 999px;
	padding: 8px 14px;
	font-size: 13px;
	cursor: pointer;
	box-shadow: var(--shadow);
}

.btn-pill.primary {
	background: var(--accent);
	color: #fff;
	border-color: var(--accent);
}

.grid-menu {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}

@media (min-width: 600px) {
	.grid-menu {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (min-width: 900px) {
	.grid-menu {
		grid-template-columns: repeat(4, 1fr);
	}
}

.menu-card {
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 20px 14px;
	text-align: center;
	box-shadow: var(--shadow);
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	min-height: 108px;
	justify-content: center;
}

.menu-card:active {
	opacity: 0.92;
}

/* 首页宫格图标：圆角色块 + 示意一致 */
.menu-icon {
	width: 44px;
	height: 44px;
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 22px;
	line-height: 1;
	color: #fff;
	flex-shrink: 0;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.menu-icon--gear {
	background: linear-gradient(145deg, #6b7cff, #4b56d0);
}

.menu-icon--user {
	background: linear-gradient(145deg, #4da3ff, #1e6fd9);
}

.menu-icon--gift {
	background: linear-gradient(145deg, #ff8a65, #f4511e);
}

.menu-icon--gem {
	background: linear-gradient(145deg, #26c6da, #0097a7);
}

.menu-icon--chart {
	background: linear-gradient(145deg, #66bb6a, #2e7d32);
}

.menu-icon--pie {
	background: linear-gradient(145deg, #ab47bc, #6a1b9a);
}

.menu-icon--team {
	background: linear-gradient(145deg, #26a69a, #00695c);
}

.menu-icon--clock {
	background: linear-gradient(145deg, #ffb74d, #f57c00);
}

.menu-icon--check {
	background: linear-gradient(145deg, #07c160, #059a4c);
}

.menu-icon--shield {
	background: linear-gradient(145deg, #90a4ae, #546e7a);
}

.menu-card .label {
	font-size: 14px;
	color: #333;
}

.user-meta .uid-stack {
	font-size: 13px;
	line-height: 1.55;
	margin-top: 4px;
}

.user-meta .uid-stack .line {
	color: var(--muted);
}

.menu-card.menu-card--wide {
	grid-column: 1 / -1;
	flex-direction: row;
	justify-content: flex-start;
	gap: 14px;
	min-height: auto;
	padding: 16px 18px;
	text-align: left;
}

.menu-card.menu-card--wide .label {
	text-align: left;
}

.subhead {
	font-size: 14px;
	color: var(--muted);
	margin: 20px 0 10px;
}

.card-panel {
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 14px;
	margin-bottom: 12px;
	box-shadow: var(--shadow);
}

.card-panel h2 {
	margin: 0 0 10px;
	font-size: 16px;
	font-weight: 600;
}

.row-line {
	display: flex;
	justify-content: space-between;
	padding: 8px 0;
	border-bottom: 1px solid #f0f0f0;
	font-size: 14px;
}

.row-line:last-child {
	border-bottom: none;
}

.tag-lv {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 6px;
	font-size: 12px;
	background: #e8f8ef;
	color: var(--accent);
	margin-right: 8px;
}

.tag-lv--2 {
	background: #e7f5ff;
	color: #1864ab;
}

.tag-lv--3 {
	background: #f3f0ff;
	color: #5f3dc4;
}

.table-like {
	width: 100%;
	font-size: 13px;
	border-collapse: collapse;
}

.table-like th,
.table-like td {
	padding: 8px 6px;
	text-align: left;
	border-bottom: 1px solid #f0f0f0;
}

.table-like th {
	color: var(--muted);
	font-weight: 500;
}

.muted {
	color: var(--muted);
	font-size: 13px;
}

.back-row {
	margin-bottom: 14px;
}

.back-row a {
	color: var(--accent);
	font-size: 14px;
}

.login-box {
	max-width: 440px;
	margin-left: auto;
	margin-right: auto;
	background: var(--card);
	border-radius: var(--radius);
	border: 1px solid var(--border);
	padding: 22px 18px;
	box-shadow: var(--shadow);
	margin-top: 24px;
}

.login-box h1 {
	margin: 0 0 18px;
	font-size: 20px;
	text-align: center;
	font-weight: 600;
}

.field {
	margin-bottom: 14px;
}

.field label {
	display: block;
	font-size: 13px;
	color: var(--muted);
	margin-bottom: 6px;
}

.field input {
	width: 100%;
	padding: 12px 12px;
	border: 1px solid var(--border);
	border-radius: 8px;
	font-size: 15px;
}

.err {
	color: #e54545;
	font-size: 13px;
	margin-top: 8px;
}

.empty {
	text-align: center;
	color: var(--muted);
	padding: 24px;
	font-size: 14px;
}

.date-filter {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 10px;
	margin-bottom: 14px;
	font-size: 13px;
}

.date-filter label {
	color: var(--muted);
	white-space: nowrap;
}

.date-filter input[type="month"],
.date-filter input[type="date"] {
	padding: 8px 10px;
	border: 1px solid var(--border);
	border-radius: 8px;
	font-size: 14px;
	background: #fff;
}

.date-filter .btn-pill {
	margin: 0;
}

.daily-table {
	width: 100%;
	font-size: 12px;
	border-collapse: collapse;
	margin-top: 8px;
}

.daily-table th,
.daily-table td {
	padding: 6px 8px;
	text-align: left;
	border-bottom: 1px solid #f0f0f0;
}

.daily-table th {
	color: var(--muted);
	font-weight: 500;
}

/* 三级代理体系 */
.nick-row {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.level-badge {
	display: inline-block;
	font-size: 11px;
	font-weight: 600;
	padding: 2px 8px;
	border-radius: 999px;
	color: #fff;
	vertical-align: middle;
}

.level-badge--l1 {
	background: linear-gradient(145deg, #ff6b6b, #c92a2a);
}

.level-badge--l2 {
	background: linear-gradient(145deg, #4dabf7, #1864ab);
}

.level-badge--l3 {
	background: linear-gradient(145deg, #51cf66, #2b8a3e);
}

.stats-strip {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 8px;
	margin-bottom: 16px;
}

.stat-item {
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 12px 8px;
	text-align: center;
	box-shadow: var(--shadow);
}

.stat-val {
	display: block;
	font-size: 18px;
	font-weight: 700;
	color: var(--accent);
	line-height: 1.2;
}

.stat-label {
	display: block;
	font-size: 11px;
	color: var(--muted);
	margin-top: 4px;
}

.recharge-today-card {
	margin-bottom: 16px;
	padding: 16px 14px;
}

.recharge-today-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 10px;
}

.recharge-today-head .recharge-today-label {
	margin-bottom: 0;
}

.recharge-today-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}

.recharge-today-col {
	min-width: 0;
}

.recharge-today-col--total {
	padding-left: 12px;
	border-left: 1px solid var(--border);
}

.recharge-today-label {
	font-size: 13px;
	font-weight: 600;
	color: var(--text);
	margin-bottom: 8px;
	line-height: 1.35;
}

.recharge-today-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	padding: 6px 12px;
	font-size: 12px;
	font-weight: 600;
	color: #fff;
	background: #e03131;
	border: 1px solid #c92a2a;
	border-radius: 8px;
	box-shadow: 0 2px 6px rgba(224, 49, 49, 0.25);
	white-space: nowrap;
}

.recharge-today-val {
	font-size: 26px;
	font-weight: 700;
	color: var(--accent);
	line-height: 1.2;
}

.recharge-today-col--total .recharge-today-val {
	color: #1864ab;
}

.recharge-today-meta {
	font-size: 12px;
	margin-top: 6px;
}

.role-hint {
	font-size: 12px;
	line-height: 1.55;
	margin-top: 16px;
	padding: 12px 14px;
	background: #fff;
	border-radius: var(--radius);
	border: 1px dashed var(--border);
}

.rate-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 10px;
	font-size: 13px;
}

.rate-row input {
	width: 72px;
	padding: 8px 10px;
	border: 1px solid var(--border);
	border-radius: 8px;
	font-size: 14px;
}

.tree-view {
	font-size: 14px;
}

.tree-root {
	margin-bottom: 12px;
	padding: 10px 12px;
	background: #fafafa;
	border-radius: 8px;
}

.tree-level {
	list-style: none;
	margin: 0;
	padding-left: 0;
}

.tree-level[data-depth="0"] > li { padding-left: 0; }
.tree-level[data-depth="1"] { padding-left: 16px; border-left: 2px solid #e8f4fd; }
.tree-level[data-depth="2"] { padding-left: 16px; border-left: 2px solid #e8f8ef; }

.tree-node {
	padding: 8px 0;
	border-bottom: 1px solid #f5f5f5;
}

.menu-icon.menu-icon--gear::before { content: '⚙'; font-size: 20px; }
.menu-icon.menu-icon--user::before { content: '👤'; }
.menu-icon.menu-icon--chart::before { content: '📈'; }
.menu-icon.menu-icon--pie::before { content: '◔'; }
.menu-icon.menu-icon--team::before { content: '👥'; }
.menu-icon.menu-icon--clock::before { content: '◷'; }
.menu-icon.menu-icon--check::before { content: '✓'; }
.menu-icon.menu-icon--shield::before { content: '🛡'; }
.menu-icon.menu-icon--gem::before { content: '◆'; }

/* 四类业务卡片 */
.biz-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
	margin-bottom: 14px;
}
.biz-card {
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 12px;
	box-shadow: var(--shadow);
}
.biz-card-title { font-weight: 600; font-size: 13px; margin-bottom: 8px; }
.biz-card-row { display: flex; justify-content: space-between; font-size: 12px; padding: 3px 0; }
.biz-card--video { border-top: 3px solid #4da3ff; }
.biz-card--voice { border-top: 3px solid #66bb6a; }
.biz-card--text { border-top: 3px solid #ab47bc; }
.biz-card--gift { border-top: 3px solid #ffb74d; }

.modal-mask {
	position: fixed; inset: 0; background: rgba(0,0,0,.45);
	display: flex; align-items: center; justify-content: center;
	padding: 16px; z-index: 100;
}
.modal-box {
	background: #fff; border-radius: 14px; padding: 18px;
	max-width: 420px; width: 100%; max-height: 90vh; overflow-y: auto;
}
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 14px; }
.biz-rate-field .cap-hint { display: block; font-size: 11px; margin-top: 4px; }
