/* ============================================================
   Lone Star 控台 · macOS 风格
   ============================================================ */

:root {
	--bg: #EDECE9;
	--win: #FFFFFF;
	--side: rgba(249, 249, 250, 0.72);
	--text: #1D1D1F;
	--text-2: #6E6E73;
	--text-3: #8E8E93;
	--line: rgba(0, 0, 0, 0.085);
	--line-2: rgba(0, 0, 0, 0.045);
	--gold: #B4881F;
	--gold-2: #C9A34A;
	--gold-text: #8A6A18;
	--gold-soft: rgba(180, 136, 31, 0.11);
	--blue: #0A84FF;
	--green: #1E7A46;
	--red: #C0392B;
	--r-win: 13px;
	--r-card: 10px;
	--r-ctl: 7px;
	--shadow-win: 0 28px 80px rgba(0, 0, 0, 0.26), 0 2px 8px rgba(0, 0, 0, 0.1);
	--shadow-card: 0 1px 2px rgba(0, 0, 0, 0.04);
}

* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

html,
body {
	height: 100%;
}

body {
	font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
	font-size: 13px;
	color: var(--text);
	-webkit-font-smoothing: antialiased;
	background: #E4E2DD;
	overflow: hidden;
}

button,
input,
select {
	font-family: inherit;
	font-size: inherit;
	color: inherit;
}

button {
	cursor: pointer;
	border: none;
	background: none;
}

/* ---------- 桌面 ---------- */
.desktop {
	height: 100vh;
	display: grid;
	place-items: center;
	background:
		radial-gradient(900px 600px at 12% 8%, #FBF6E9 0%, rgba(251, 246, 233, 0) 62%),
		radial-gradient(800px 700px at 88% 92%, #E3E7EE 0%, rgba(227, 231, 238, 0) 60%),
		linear-gradient(160deg, #EFEDE8 0%, #E2E0DB 100%);
}

.window {
	width: min(1440px, 96vw);
	height: min(920px, 94vh);
	display: flex;
	background: var(--win);
	border-radius: var(--r-win);
	box-shadow: var(--shadow-win);
	overflow: hidden;
	border: 0.5px solid rgba(0, 0, 0, 0.12);
}

/* ---------- 侧边栏 ---------- */
.sidebar {
	width: 236px;
	flex-shrink: 0;
	display: flex;
	flex-direction: column;
	background: var(--side);
	backdrop-filter: blur(40px) saturate(180%);
	-webkit-backdrop-filter: blur(40px) saturate(180%);
	border-right: 0.5px solid var(--line);
}

.traffic {
	display: flex;
	gap: 8px;
	padding: 15px 0 0 18px;
}

.tl {
	width: 12px;
	height: 12px;
	border-radius: 50%;
	display: block;
}

.tl.red {
	background: #FF5F57;
	box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.12);
}

.tl.yellow {
	background: #FEBC2E;
	box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.12);
}

.tl.green {
	background: #28C840;
	box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.12);
}

.brand {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 22px 18px 16px;
}

.brand-mark {
	width: 32px;
	height: 32px;
	border-radius: 9px;
	display: grid;
	place-items: center;
	background: linear-gradient(150deg, #2B2B2F 0%, #101012 100%);
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.28);
	overflow: hidden;
	flex-shrink: 0;
}

.brand-mark img {
	width: 26px;
	height: 26px;
	display: block;
}

.brand-text {
	display: flex;
	flex-direction: column;
	line-height: 1.25;
}

.brand-text b {
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.2px;
}

.brand-text span {
	font-size: 11px;
	color: var(--text-3);
}

.nav {
	flex: 1;
	overflow-y: auto;
	padding: 4px 10px 10px;
}

.nav-group {
	padding: 14px 8px 5px;
	font-size: 10.5px;
	font-weight: 500;
	letter-spacing: 0.06em;
	color: var(--text-3);
}

.nav-item {
	display: flex;
	align-items: center;
	gap: 9px;
	height: 31px;
	padding: 0 9px;
	border-radius: var(--r-ctl);
	color: var(--text);
	font-size: 13px;
	width: 100%;
	text-align: left;
	transition: background 0.12s ease;
}

.nav-item svg {
	color: var(--text-2);
	flex-shrink: 0;
}

.nav-item:hover {
	background: rgba(0, 0, 0, 0.045);
}

.nav-item.active {
	background: var(--gold-soft);
	color: var(--gold-text);
	font-weight: 500;
}

.nav-item.active svg {
	color: var(--gold);
}

.nav-item .badge {
	margin-left: auto;
	font-size: 10.5px;
	background: rgba(0, 0, 0, 0.07);
	color: var(--text-2);
	padding: 1px 6px;
	border-radius: 20px;
}

.nav-item.active .badge {
	background: rgba(180, 136, 31, 0.18);
	color: var(--gold-text);
}

.sidebar-foot {
	padding: 10px;
	border-top: 0.5px solid var(--line);
}

.store-chip {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 9px;
	border-radius: var(--r-ctl);
	background: rgba(255, 255, 255, 0.62);
	border: 0.5px solid var(--line);
}

.store-dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #34C759;
	flex-shrink: 0;
	box-shadow: 0 0 0 3px rgba(52, 199, 89, 0.16);
}

.store-meta {
	display: flex;
	flex-direction: column;
	line-height: 1.3;
	min-width: 0;
}

.store-meta b {
	font-size: 11.5px;
	font-weight: 500;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.store-meta span {
	font-size: 10.5px;
	color: var(--text-3);
}

/* 左下角登录人 */
.login-row {
	display: flex;
	align-items: center;
	gap: 5px;
	margin-top: 9px;
	padding: 0 9px;
	font-size: 10.5px;
	color: var(--text-3);
}

.login-row svg {
	flex-shrink: 0;
	opacity: 0.65;
}

.login-row b {
	font-weight: 500;
	color: var(--text-2);
	font-variant-numeric: tabular-nums;
	letter-spacing: 0.02em;
}

/* ---------- 主区域 ---------- */
.main {
	flex: 1;
	display: flex;
	flex-direction: column;
	min-width: 0;
	background: #FBFBFC;
}

.toolbar {
	height: 58px;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 22px;
	border-bottom: 0.5px solid var(--line);
	background: rgba(251, 251, 252, 0.82);
	backdrop-filter: blur(20px);
}

.tb-left h1 {
	font-size: 16px;
	font-weight: 600;
	letter-spacing: -0.01em;
}

.tb-left p {
	font-size: 11.5px;
	color: var(--text-3);
	margin-top: 1px;
}

.tb-right {
	display: flex;
	align-items: center;
	gap: 10px;
}

/* 工具栏内的会员积分总量 */
.tb-stat {
	display: flex;
	align-items: baseline;
	gap: 5px;
	height: 30px;
	padding: 0 11px;
	border-radius: var(--r-ctl);
	background: rgba(180, 136, 31, 0.08);
	border: 0.5px solid rgba(180, 136, 31, 0.2);
	box-sizing: border-box;
}

.tb-stat .tbs-label {
	font-size: 11px;
	color: var(--text-2);
}

.tb-stat b {
	font-size: 15px;
	font-weight: 600;
	color: var(--gold-text);
	font-variant-numeric: tabular-nums;
	letter-spacing: -0.01em;
}

.tb-stat .tbs-unit {
	font-size: 10px;
	color: var(--text-3);
}

.content {
	flex: 1;
	overflow-y: auto;
	padding: 20px 22px 26px;
}

.content::-webkit-scrollbar {
	width: 10px;
}

.content::-webkit-scrollbar-thumb {
	background: rgba(0, 0, 0, 0.16);
	border-radius: 10px;
	border: 3px solid transparent;
	background-clip: content-box;
}

.content::-webkit-scrollbar-track {
	background: transparent;
}

/* ---------- 通用控件 ---------- */
.search {
	display: flex;
	align-items: center;
	gap: 6px;
	height: 28px;
	padding: 0 9px;
	border-radius: var(--r-ctl);
	background: rgba(0, 0, 0, 0.05);
	border: 0.5px solid transparent;
	width: 190px;
	flex-shrink: 0;
	color: var(--text-3);
}

.search:focus-within {
	background: #fff;
	border-color: rgba(180, 136, 31, 0.5);
	box-shadow: 0 0 0 3px rgba(180, 136, 31, 0.12);
}

.search input {
	border: none;
	outline: none;
	background: transparent;
	width: 100%;
	font-size: 12.5px;
	color: var(--text);
}

.search input::placeholder {
	color: var(--text-3);
}

.segmented {
	display: flex;
	background: rgba(0, 0, 0, 0.05);
	border-radius: var(--r-ctl);
	padding: 2px;
}

.segmented button {
	height: 24px;
	padding: 0 11px;
	border-radius: 5px;
	font-size: 12px;
	color: var(--text-2);
}

.segmented button.on {
	background: #fff;
	color: var(--text);
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

.segmented.inline {
	display: inline-flex;
}

/* 概览页顶部维度切换 */
.range-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 14px;
}

.range-hint {
	font-size: 11px;
	color: var(--text-3);
}

.btn {
	height: 28px;
	padding: 0 13px;
	border-radius: var(--r-ctl);
	font-size: 12.5px;
	font-weight: 500;
	display: inline-flex;
	align-items: center;
	gap: 5px;
	border: 0.5px solid var(--line);
	background: #fff;
	color: var(--text);
	box-shadow: 0 1px 1px rgba(0, 0, 0, 0.03);
}

.btn:hover {
	background: #F7F7F8;
}

.btn.primary {
	background: linear-gradient(180deg, #C39B3C 0%, #AE8420 100%);
	border-color: #A2791A;
	color: #fff;
	box-shadow: 0 1px 2px rgba(120, 88, 12, 0.35);
}

.btn.primary:hover {
	filter: brightness(1.05);
}

.btn.sm {
	height: 24px;
	padding: 0 9px;
	font-size: 11.5px;
}

.btn.danger {
	color: #C0392B;
}

.btn.danger:hover {
	background: rgba(192, 57, 43, 0.08);
	border-color: rgba(192, 57, 43, 0.35);
}

.btn:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}

/* ---------- 卡片 ---------- */
.card {
	background: #fff;
	border: 0.5px solid var(--line);
	border-radius: var(--r-card);
	box-shadow: var(--shadow-card);
}

.card-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 16px 10px;
}

.card-title {
	font-size: 13px;
	font-weight: 600;
}

.card-sub {
	font-size: 11.5px;
	color: var(--text-3);
}

.card-body {
	padding: 0 16px 16px;
}

/* ---------- KPI ---------- */
.kpis {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 14px;
	margin-bottom: 14px;
}

.kpi {
	background: #fff;
	border: 0.5px solid var(--line);
	border-radius: var(--r-card);
	padding: 15px 16px;
	box-shadow: var(--shadow-card);
}

.kpi-label {
	font-size: 11.5px;
	color: var(--text-2);
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.kpi-value {
	font-size: 26px;
	font-weight: 600;
	letter-spacing: -0.02em;
	margin-top: 7px;
	line-height: 1.1;
	font-variant-numeric: tabular-nums;
}

.kpi-value small {
	font-size: 12px;
	font-weight: 400;
	color: var(--text-3);
	margin-left: 3px;
}

.kpi-foot {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-top: 9px;
	font-size: 11.5px;
	color: var(--text-3);
}

.delta {
	font-size: 11.5px;
	font-weight: 500;
	padding: 1px 6px;
	border-radius: 5px;
}

.delta.up {
	color: var(--green);
	background: rgba(30, 122, 70, 0.1);
}

.delta.down {
	color: var(--red);
	background: rgba(192, 57, 43, 0.1);
}

/* ---------- 布局 ---------- */
.grid-2 {
	display: grid;
	grid-template-columns: 1.62fr 1fr;
	gap: 14px;
	margin-bottom: 14px;
}

.chart-wrap {
	height: 208px;
	position: relative;
}

.chart-wrap svg {
	display: block;
	width: 100%;
	height: 100%;
	overflow: visible;
}

/* 分类条 */
.cat-row {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 7px 0;
}

.cat-name {
	width: 62px;
	font-size: 12px;
	color: var(--text-2);
	flex-shrink: 0;
	white-space: nowrap;
}

.cat-track {
	flex: 1;
	display: block;
	height: 6px;
	border-radius: 3px;
	background: rgba(0, 0, 0, 0.055);
	overflow: hidden;
}

.cat-fill {
	display: block;
	height: 100%;
	border-radius: 3px;
	background: linear-gradient(90deg, #D8B75F 0%, #B4881F 100%);
}

.cat-val {
	width: 42px;
	text-align: right;
	font-size: 11.5px;
	color: var(--text-2);
	font-variant-numeric: tabular-nums;
}

/* ---------- 表格 ---------- */
.table-wrap {
	overflow-x: auto;
}

table {
	width: 100%;
	border-collapse: collapse;
}

thead th {
	font-size: 11px;
	font-weight: 500;
	color: var(--text-3);
	text-align: left;
	padding: 8px 14px;
	border-bottom: 0.5px solid var(--line);
	white-space: nowrap;
	background: rgba(0, 0, 0, 0.012);
}

tbody td {
	padding: 11px 14px;
	border-bottom: 0.5px solid var(--line-2);
	font-size: 12.5px;
	white-space: nowrap;
	vertical-align: middle;
}

tbody tr:last-child td {
	border-bottom: none;
}

tbody tr:hover td {
	background: rgba(0, 0, 0, 0.018);
}

.num {
	font-variant-numeric: tabular-nums;
}

.mono {
	font-family: "SF Mono", "JetBrains Mono", Consolas, monospace;
	font-size: 11.5px;
	color: var(--text-2);
}

.cell-strong {
	font-weight: 500;
}

.cell-sub {
	color: var(--text-3);
	font-size: 11.5px;
}

.cell-user {
	display: flex;
	align-items: center;
	gap: 9px;
}

.avatar-sm {
	width: 24px;
	height: 24px;
	border-radius: 50%;
	display: grid;
	place-items: center;
	font-size: 11px;
	color: #fff;
	flex-shrink: 0;
}

.thumb {
	width: 34px;
	height: 34px;
	border-radius: 7px;
	background: #FAF7EE;
	border: 0.5px solid var(--line);
	object-fit: contain;
	flex-shrink: 0;
}

/* 状态 pill */
.pill {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 11px;
	padding: 2px 8px;
	border-radius: 5px;
	font-weight: 500;
}

.pill::before {
	content: "";
	width: 5px;
	height: 5px;
	border-radius: 50%;
	background: currentColor;
}

.pill.pay {
	color: #96690F;
	background: rgba(201, 163, 74, 0.16);
}

.pill.making {
	color: #1D5FA8;
	background: rgba(29, 95, 168, 0.1);
}

.pill.done {
	color: #1E7A46;
	background: rgba(30, 122, 70, 0.1);
}

.pill.cancel {
	color: #8E8E93;
	background: rgba(0, 0, 0, 0.06);
}

/* 等级 chip */
.chip {
	font-size: 11px;
	padding: 1px 7px;
	border-radius: 4px;
	font-weight: 500;
}

.chip.black {
	color: #fff;
	background: linear-gradient(135deg, #3A3A3C, #1C1C1E);
}

.chip.gold {
	color: #7A5A12;
	background: rgba(201, 163, 74, 0.2);
}

.chip.plain {
	color: #5F6368;
	background: rgba(0, 0, 0, 0.06);
}

.chip.mine {
	margin-left: 6px;
	color: #8A6A18;
	background: rgba(180, 136, 31, 0.12);
	border: 0.5px solid rgba(180, 136, 31, 0.3);
}

.perm-cell {
	max-width: 250px;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.chip.silver {
	color: #5F6368;
	background: rgba(0, 0, 0, 0.07);
}

.chip.normal {
	color: #8E8E93;
	background: rgba(0, 0, 0, 0.05);
}

/* 开关 */
.switch {
	display: inline-block;
	vertical-align: middle;
	width: 34px;
	height: 20px;
	border-radius: 20px;
	background: rgba(0, 0, 0, 0.16);
	position: relative;
	transition: background 0.18s ease;
	flex-shrink: 0;
	cursor: pointer;
}

.switch::after {
	content: "";
	position: absolute;
	left: 2px;
	top: 2px;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
	transition: transform 0.18s ease;
}

.switch.on {
	background: #34C759;
}

.switch.on::after {
	transform: translateX(14px);
}

.switch.sm {
	width: 30px;
	height: 18px;
}

.switch.sm::after {
	width: 14px;
	height: 14px;
}

.switch.sm.on::after {
	transform: translateX(12px);
}

/* ---------- 表单 ---------- */
.form-row {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	padding: 12px 0;
	border-bottom: 0.5px solid var(--line-2);
}

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

.form-label {
	width: 88px;
	flex-shrink: 0;
	font-size: 12.5px;
	color: var(--text-2);
	padding-top: 5px;
}

.form-field {
	flex: 1;
	min-width: 0;
}

.input {
	width: 100%;
	height: 29px;
	padding: 0 10px;
	border-radius: var(--r-ctl);
	border: 0.5px solid rgba(0, 0, 0, 0.14);
	background: #fff;
	font-size: 12.5px;
	outline: none;
	transition: border-color 0.15s, box-shadow 0.15s;
}

.input:focus {
	border-color: rgba(180, 136, 31, 0.7);
	box-shadow: 0 0 0 3px rgba(180, 136, 31, 0.13);
}

/* 去掉数字输入框的上下箭头，保持 macOS 观感 */
.input[type="number"]::-webkit-outer-spin-button,
.input[type="number"]::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.input[type="number"] {
	-moz-appearance: textfield;
	appearance: textfield;
}

.hint {
	font-size: 11px;
	color: var(--text-3);
	margin-top: 5px;
	line-height: 1.6;
}

.upload-row {
	display: flex;
	align-items: center;
	gap: 12px;
}

.upload-thumb {
	width: 46px;
	height: 46px;
	border-radius: 9px;
	background: #12161F;
	display: grid;
	place-items: center;
	border: 0.5px solid var(--line);
	overflow: hidden;
}

.upload-thumb img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.bg-presets {
	display: flex;
	gap: 8px;
}

.bg-preset {
	width: 54px;
	height: 34px;
	border-radius: 7px;
	border: 2px solid transparent;
	background-size: cover;
	background-position: center;
	box-shadow: 0 0 0 0.5px var(--line);
}

.bg-preset.on {
	border-color: var(--gold);
}

/* ---------- 装修页布局 ---------- */
.decorate {
	display: grid;
	grid-template-columns: 1fr 322px;
	gap: 16px;
	align-items: start;
}

.preview-pane {
	position: sticky;
	top: 0;
}

.phone {
	position: relative;
	width: 100%;
	max-width: 300px;
	margin: 0 auto;
	aspect-ratio: 390 / 780;
	border-radius: 34px;
	padding: 7px;
	background: linear-gradient(160deg, #2A2A2E, #141416);
	box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22), 0 0 0 0.5px rgba(0, 0, 0, 0.2);
}

.phone-screen {
	position: absolute;
	inset: 7px;
	border-radius: 28px;
	overflow: hidden;
	background: #05080F;
	display: flex;
	flex-direction: column;
}

.phone-bg {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center;
}

.phone-mask {
	position: absolute;
	inset: 0;
	background: #000;
	opacity: 0.2;
}

.phone-body {
	position: relative;
	z-index: 2;
	flex: 1;
	display: flex;
	flex-direction: column;
	padding: 34px 16px 46px;
}

.phone-logo {
	width: 54px;
	height: 54px;
	margin: 6px auto 0;
	border-radius: 12px;
	display: grid;
	place-items: center;
	overflow: hidden;
}

.phone-logo img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.phone-title {
	margin-top: 10px;
	text-align: center;
	font-family: Georgia, "Songti SC", serif;
	font-size: 17px;
	color: #D4AF37;
	letter-spacing: 1px;
}

.phone-slogan {
	text-align: center;
	font-family: Georgia, serif;
	font-style: italic;
	font-size: 9.5px;
	color: rgba(232, 199, 102, 0.78);
	margin-top: 4px;
}

.phone-status {
	margin: 8px auto 0;
	font-size: 8px;
	color: #C8C2B0;
	border: 0.5px solid rgba(212, 175, 55, 0.4);
	border-radius: 20px;
	padding: 2px 8px;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	align-self: center;
}

.phone-status i {
	width: 4px;
	height: 4px;
	border-radius: 50%;
	background: #34C759;
}

.phone-spacer {
	flex: 1;
}

.phone-notice {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 24px;
	padding: 0 8px;
	border: 0.5px solid rgba(212, 175, 55, 0.3);
	border-radius: 5px;
	font-size: 8px;
	color: #9C9A90;
	background: rgba(0, 0, 0, 0.3);
}

.phone-notice b {
	color: #D4AF37;
	font-weight: 400;
}

.phone-entries {
	display: flex;
	gap: 7px;
	margin-top: 8px;
}

.phone-entry {
	flex: 1;
	height: 58px;
	border: 0.5px solid rgba(212, 175, 55, 0.34);
	border-radius: 7px;
	background: rgba(8, 14, 26, 0.62);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 3px;
}

.phone-entry span {
	font-size: 9px;
	color: #E8E4D8;
}

.phone-entry i {
	width: 14px;
	height: 14px;
	border: 1px solid #D4AF37;
	border-radius: 3px;
	display: block;
}

.phone-tabbar {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	display: flex;
	justify-content: space-around;
	padding: 7px 0 9px;
	border-top: 0.5px solid rgba(255, 255, 255, 0.07);
	background: rgba(7, 12, 24, 0.9);
	font-size: 7px;
	color: #7C8091;
}

.phone-tabbar span.on {
	color: #D4AF37;
}

.preview-tip {
	text-align: center;
	font-size: 11px;
	color: var(--text-3);
	margin-top: 12px;
}

/* ---------- 弹窗 ---------- */
.modal-mask {
	position: fixed;
	inset: 0;
	background: rgba(20, 20, 22, 0.26);
	backdrop-filter: blur(3px);
	z-index: 200;
	display: grid;
	place-items: center;
	animation: fadeIn 0.14s ease;
}

.modal {
	width: 396px;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 30px 70px rgba(0, 0, 0, 0.3), 0 0 0 0.5px rgba(0, 0, 0, 0.1);
	animation: popIn 0.16s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}

@keyframes fadeIn {
	from {
		opacity: 0;
	}
}

@keyframes popIn {
	from {
		opacity: 0;
		transform: scale(0.97) translateY(4px);
	}
}

.modal-head {
	padding: 16px 18px 4px;
	font-size: 14px;
	font-weight: 600;
}

.modal-body {
	padding: 8px 18px 16px;
}

.modal-sub {
	font-size: 11.5px;
	color: var(--text-3);
	margin-bottom: 12px;
}

.modal-kv {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	padding: 10px 12px;
	border-radius: 8px;
	background: rgba(0, 0, 0, 0.035);
	margin-bottom: 14px;
}

.modal-kv span {
	font-size: 12px;
	color: var(--text-2);
}

.modal-kv b {
	font-size: 18px;
	font-weight: 600;
	color: var(--gold-text);
	font-variant-numeric: tabular-nums;
}

/* 积分调整：扣减 / 增加 模式卡片 */
.mode-cards {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 9px;
	margin-bottom: 12px;
}

.mode-card {
	display: flex;
	align-items: center;
	gap: 9px;
	padding: 10px 11px;
	border-radius: 9px;
	border: 1px solid var(--line);
	background: #fff;
	text-align: left;
	transition: border-color 0.14s ease, background 0.14s ease, box-shadow 0.14s ease;
}

.mode-card:hover {
	border-color: rgba(180, 136, 31, 0.42);
}

.mode-card.on {
	border-color: rgba(180, 136, 31, 0.6);
	background: rgba(180, 136, 31, 0.07);
	box-shadow: 0 0 0 3px rgba(180, 136, 31, 0.1);
}

.mode-ico {
	width: 26px;
	height: 26px;
	border-radius: 7px;
	display: grid;
	place-items: center;
	flex-shrink: 0;
	background: rgba(0, 0, 0, 0.05);
	color: var(--text-2);
}

.mode-card.on .mode-ico {
	background: rgba(180, 136, 31, 0.16);
	color: var(--gold-text);
}

.mode-text {
	display: flex;
	flex-direction: column;
	line-height: 1.3;
	min-width: 0;
}

.mode-text b {
	font-size: 12.5px;
	font-weight: 600;
}

.mode-text span {
	font-size: 10.5px;
	color: var(--text-3);
}

/* 调整后余额预览 */
.adjust-preview {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 8px 12px;
	border-radius: 8px;
	background: rgba(0, 0, 0, 0.03);
	margin: -4px 0 12px;
	font-size: 11.5px;
	color: var(--text-3);
}

.adjust-preview b {
	font-size: 14px;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
}

.field {
	display: block;
	margin-bottom: 12px;
}

.field > span {
	display: block;
	font-size: 11.5px;
	color: var(--text-2);
	margin-bottom: 5px;
}

.modal-err {
	font-size: 11.5px;
	color: var(--red);
	min-height: 16px;
}

/* 菜单权限列表 */
.perm-list {
	max-height: 320px;
	overflow-y: auto;
	margin: 0 -6px 6px;
}

.perm-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 9px 6px;
	border-bottom: 0.5px solid var(--line-2);
}

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

.perm-name {
	display: flex;
	align-items: baseline;
	gap: 7px;
	min-width: 0;
}

.perm-name b {
	font-size: 12.5px;
	font-weight: 500;
	color: var(--text);
}

.perm-name span {
	font-size: 10px;
	color: var(--text-3);
}

/* 危险操作提示 */
.warn-box {
	padding: 11px 13px;
	border-radius: 8px;
	background: rgba(192, 57, 43, 0.07);
	border: 0.5px solid rgba(192, 57, 43, 0.22);
	font-size: 11.5px;
	line-height: 1.65;
	color: #A33A2E;
}

.modal-foot {
	display: flex;
	justify-content: flex-end;
	gap: 8px;
	padding: 0 18px 16px;
}

.modal.wide {
	width: 520px;
}

/* 微信支付详情 */
.pay-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 9px 16px;
	margin-bottom: 14px;
	padding: 12px;
	border-radius: 8px;
	background: rgba(0, 0, 0, 0.03);
}

.pay-grid > div {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.pay-grid span {
	font-size: 10.5px;
	color: var(--text-3);
}

.pay-grid b {
	font-size: 12px;
	font-weight: 500;
	color: var(--text);
	word-break: break-all;
}

.pay-grid b.mono {
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 11px;
}

.pay-grid b.ok {
	color: var(--green);
}

.pay-raw-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 6px;
}

.pay-raw-head span {
	font-size: 11.5px;
	color: var(--text-2);
}

.code-block {
	margin: 0;
	max-height: 200px;
	overflow: auto;
	padding: 10px 12px;
	border-radius: 8px;
	background: #F5F5F7;
	border: 0.5px solid var(--line);
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 10.5px;
	line-height: 1.55;
	color: #3A3A3C;
	white-space: pre-wrap;
	word-break: break-all;
}

.btn.xs {
	height: 22px;
	padding: 0 9px;
	font-size: 11px;
}

/* 积分流水弹窗内的明细列表 */
.flow-list {
	max-height: 300px;
	overflow-y: auto;
	margin: 0 -6px;
}

.flow-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 9px 6px;
	border-bottom: 0.5px solid var(--line-2);
}

.flow-item:last-child {
	border-bottom: none;
}

.flow-main {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.flow-main b {
	font-size: 12.5px;
	font-weight: 500;
	color: var(--text);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.flow-main span {
	font-size: 10.5px;
	color: var(--text-3);
	font-variant-numeric: tabular-nums;
}

.flow-num {
	font-size: 13px;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	flex-shrink: 0;
}

.flow-num.up {
	color: var(--gold-text);
}

.flow-num.down {
	color: var(--text-2);
}

/* 积分类型 pill */
.pill.in {
	color: #8A6A18;
	background: rgba(180, 136, 31, 0.13);
}

.pill.out {
	color: #6B6B70;
	background: rgba(0, 0, 0, 0.06);
}

/* 店员手动增减 */
.pill.grant {
	color: #1D5FA8;
	background: rgba(29, 95, 168, 0.1);
}

/* 说明条 */
.tip-bar {
	margin-top: 12px;
	padding: 11px 14px;
	border-radius: var(--r-card);
	background: rgba(180, 136, 31, 0.07);
	border: 0.5px solid rgba(180, 136, 31, 0.18);
	font-size: 11.5px;
	color: var(--text-2);
	line-height: 1.6;
}

.tip-bar b {
	color: var(--gold-text);
	font-weight: 600;
	margin-right: 8px;
}

/* 手机预览 · 积分卡片 */
.phone-points {
	margin: 0 0 10px;
	padding: 9px 11px;
	border-radius: 9px;
	background: rgba(255, 255, 255, 0.07);
	border: 0.5px solid rgba(212, 175, 55, 0.35);
	display: grid;
	grid-template-columns: 1fr auto;
	align-items: center;
	gap: 2px 8px;
}

.pp-label {
	grid-column: 1;
	font-size: 8px;
	color: rgba(255, 255, 255, 0.55);
	letter-spacing: 0.2px;
}

.pp-value {
	grid-column: 1;
	font-size: 15px;
	font-weight: 600;
	color: #D4AF37;
	font-variant-numeric: tabular-nums;
	letter-spacing: 0.3px;
	line-height: 1.2;
}

.pp-btn {
	grid-column: 2;
	grid-row: 1 / span 2;
	font-size: 8.5px;
	color: #16110A;
	background: linear-gradient(135deg, #E4C878, #B4881F);
	padding: 5px 10px;
	border-radius: 5px;
	font-weight: 600;
	white-space: nowrap;
}

.phone-poster {
	margin: 0 0 10px;
	padding: 9px 10px;
	border-radius: 7px;
	border: 0.5px solid rgba(212, 175, 55, 0.28);
	background: rgba(255, 255, 255, 0.05);
	overflow: hidden;
}

/* 手机预览内的富文本，按 0.76 缩放还原真机字号 */
.pv-rt {
	zoom: 0.76;
	line-height: 1.5;
	color: #C8C2B0;
}

/* ---------- 富文本编辑器 ---------- */
.rt {
	border: 1px solid var(--line);
	border-radius: 8px;
	overflow: hidden;
	background: #fff;
}

.rt-bar {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 2px;
	padding: 5px 6px;
	border-bottom: 0.5px solid var(--line);
	background: #FAFAFB;
}

.rt-btn {
	height: 22px;
	min-width: 24px;
	padding: 0 7px;
	border-radius: 5px;
	font-size: 11px;
	color: var(--text-2);
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.rt-btn:hover {
	background: rgba(0, 0, 0, 0.06);
	color: var(--text);
}

.rt-sep {
	width: 1px;
	height: 13px;
	background: var(--line);
	margin: 0 3px;
}

.rt-body {
	padding: 12px 14px;
	min-height: 92px;
	font-size: 13px;
	line-height: 1.6;
	color: #E6E2D8;
	background: #0B1220;
	outline: none;
}

.rt-body:empty::before {
	content: '输入今日特惠内容…';
	color: rgba(255, 255, 255, 0.3);
}

/* ---------- toast ---------- */
.toast {
	position: fixed;
	left: 50%;
	bottom: 46px;
	transform: translate(-50%, 12px);
	background: rgba(28, 28, 30, 0.92);
	color: #fff;
	font-size: 12.5px;
	padding: 8px 16px;
	border-radius: 8px;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.2s ease, transform 0.2s ease;
	backdrop-filter: blur(10px);
	z-index: 99;
}

.toast.show {
	opacity: 1;
	transform: translate(-50%, 0);
}

/* ---------- 其它 ---------- */
.section-gap {
	height: 14px;
}

.empty {
	padding: 40px 0;
	text-align: center;
	color: var(--text-3);
	font-size: 12.5px;
}

.flex-between {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.stat-inline {
	display: flex;
	gap: 22px;
}

.stat-inline div {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.stat-inline b {
	font-size: 17px;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
}

.stat-inline span {
	font-size: 11px;
	color: var(--text-3);
}

/* ============================================================
   响应式布局
   ≥ 1280px      桌面      完整侧边栏 236px
   1024–1279px   小笔记本  侧边栏收窄 208px，KPI 两列
   768–1023px    平板      图标侧边栏 64px，窗口铺满
   < 768px       手机      抽屉侧边栏 + 工具栏换行
   ============================================================ */

/* 移动端菜单按钮，桌面隐藏 */
.tb-menu {
	display: none;
	width: 32px;
	height: 32px;
	flex-shrink: 0;
	place-items: center;
	border-radius: var(--r-ctl);
	color: var(--text-2);
	transition: background 0.12s ease;
}

.tb-menu:hover {
	background: rgba(0, 0, 0, 0.05);
}

.tb-menu:active {
	background: rgba(0, 0, 0, 0.09);
}

/* 抽屉遮罩 */
.sidebar-mask {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(20, 20, 22, 0.32);
	-webkit-backdrop-filter: blur(2px);
	backdrop-filter: blur(2px);
	z-index: 155;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.24s ease, visibility 0.24s ease;
}

/* ---------- 小笔记本 / 平板横屏 ---------- */
@media (max-width: 1279px) {
	.window {
		width: 98vw;
	}

	.sidebar {
		width: 208px;
	}

	.content {
		padding: 18px 18px 22px;
	}

	.kpis {
		grid-template-columns: repeat(2, 1fr);
	}

	.grid-2 {
		grid-template-columns: 1fr;
	}

	.decorate {
		grid-template-columns: 1fr;
	}

	.preview-pane {
		position: static;
	}
}

/* ---------- 平板：图标侧边栏 ---------- */
@media (max-width: 1023px) {
	.desktop {
		padding: 0;
	}

	.window {
		width: 100vw;
		height: 100vh;
		height: 100dvh;
		border-radius: 0;
		border: none;
		box-shadow: none;
	}

	.sidebar {
		width: 64px;
	}

	.traffic {
		padding: 12px 0 0;
		justify-content: center;
		gap: 5px;
	}

	.tl {
		width: 9px;
		height: 9px;
	}

	.brand {
		padding: 16px 0 12px;
		justify-content: center;
	}

	.brand-text {
		display: none;
	}

	.nav {
		padding: 4px 8px 8px;
	}

	.nav-group {
		display: none;
	}

	.nav-item {
		justify-content: center;
		padding: 0;
		height: 38px;
		position: relative;
	}

	.nav-item span {
		display: none;
	}

	/* 角标缩成一个圆点 */
	.nav-item .badge {
		position: absolute;
		top: 6px;
		right: 6px;
		min-width: 6px;
		height: 6px;
		padding: 0;
		font-size: 0;
		line-height: 0;
		border-radius: 50%;
	}

	.sidebar-foot {
		padding: 10px 0;
	}

	.store-chip {
		justify-content: center;
		padding: 8px 0;
		background: none;
		border: none;
	}

	.store-meta,
	.login-row {
		display: none;
	}

	.toolbar {
		padding: 0 18px;
	}
}

/* ---------- 手机：抽屉侧边栏 ---------- */
@media (max-width: 767px) {
	.desktop {
		display: block;
		height: 100vh;
		height: 100dvh;
		background: #FBFBFC;
	}

	.window {
		display: block;
		overflow: visible;
	}

	/* 侧边栏改为滑出抽屉 */
	.sidebar {
		position: fixed;
		top: 0;
		bottom: 0;
		left: 0;
		width: 272px;
		z-index: 160;
		transform: translateX(-100%);
		transition: transform 0.26s cubic-bezier(0.32, 0.72, 0, 1);
		border-right: 0.5px solid var(--line);
		box-shadow: none;
	}

	.sidebar.is-open {
		transform: translateX(0);
		box-shadow: 24px 0 60px rgba(0, 0, 0, 0.24);
	}

	.sidebar-mask {
		display: block;
	}

	.sidebar-mask.is-open {
		opacity: 1;
		visibility: visible;
	}

	/* 抽屉里恢复完整信息 */
	.traffic {
		padding: 15px 0 0 18px;
		justify-content: flex-start;
		gap: 8px;
	}

	.tl {
		width: 12px;
		height: 12px;
	}

	.brand {
		padding: 22px 18px 16px;
		justify-content: flex-start;
	}

	.brand-text {
		display: flex;
	}

	.nav {
		padding: 4px 10px 10px;
	}

	.nav-group {
		display: block;
	}

	.nav-item {
		justify-content: flex-start;
		padding: 0 9px;
		height: 42px;
		font-size: 13.5px;
	}

	.nav-item span {
		display: inline;
	}

	.nav-item .badge {
		position: static;
		min-width: 18px;
		height: auto;
		padding: 1px 5px;
		font-size: 10px;
		line-height: 1.5;
		border-radius: 9px;
	}

	.sidebar-foot {
		padding: 10px;
	}

	.store-chip {
		justify-content: flex-start;
		padding: 8px 9px;
		background: rgba(255, 255, 255, 0.62);
		border: 0.5px solid var(--line);
	}

	.store-meta {
		display: flex;
	}

	.login-row {
		display: flex;
	}

	/* 主区域铺满 */
	.main {
		height: 100vh;
		height: 100dvh;
	}

	.tb-menu {
		display: grid;
	}

	.toolbar {
		height: auto;
		min-height: 54px;
		flex-wrap: wrap;
		gap: 10px;
		padding: 9px 14px;
	}

	.tb-left {
		display: flex;
		align-items: center;
		gap: 10px;
		flex: 1;
		min-width: 0;
	}

	.tb-titles {
		min-width: 0;
	}

	.tb-titles h1 {
		font-size: 15px;
	}

	.tb-right {
		width: 100%;
		flex-wrap: wrap;
		gap: 8px;
	}

	.tb-right .search {
		flex: 1 1 130px;
		width: auto;
		min-width: 100px;
	}

	/* 导出按钮收成纯图标，省一行高度 */
	.tb-right .btn[data-act="export"] {
		width: 34px;
		padding: 0;
		gap: 0;
		justify-content: center;
		font-size: 0;
		line-height: 0;
		flex-shrink: 0;
	}

	.tb-stat {
		flex: 1;
		justify-content: center;
	}

	.content {
		padding: 14px 14px 24px;
	}

	/* 内容自适应 */
	.kpis {
		gap: 10px;
		margin-bottom: 12px;
	}

	.kpi {
		padding: 13px;
	}

	.kpi-value {
		font-size: 21px;
	}

	.grid-2 {
		gap: 12px;
		margin-bottom: 12px;
	}

	.chart-wrap {
		height: 180px;
	}

	.range-bar {
		flex-direction: column;
		align-items: stretch;
		gap: 8px;
	}

	.range-hint {
		font-size: 10.5px;
	}

	.segmented {
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
	}

	.segmented::-webkit-scrollbar {
		display: none;
	}

	.segmented button {
		flex-shrink: 0;
		padding: 0 9px;
		font-size: 11.5px;
	}

	/* 表格横向滑动，保证列不被压扁 */
	.table-wrap {
		-webkit-overflow-scrolling: touch;
	}

	table {
		min-width: max-content;
	}

	/* 首列吸附，横滑时仍能看清是哪一行 */
	.table-wrap th:first-child,
	.table-wrap td:first-child {
		position: sticky;
		left: 0;
		z-index: 2;
		background: #fff;
		box-shadow: 1px 0 0 var(--line-2), 7px 0 8px -7px rgba(0, 0, 0, 0.18);
	}

	.table-wrap thead th:first-child {
		background: #FCFCFC;
	}

	.table-wrap tbody tr:hover td:first-child {
		background: #FAFAFA;
	}

	/* 弹窗铺满可用宽度，内容区内部滚动 */
	.modal {
		display: flex;
		flex-direction: column;
		width: calc(100vw - 28px);
		max-height: 88vh;
		max-height: 88dvh;
	}

	.modal.wide {
		width: calc(100vw - 28px);
	}

	.modal-body {
		flex: 1;
		min-height: 0;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
	}

	.modal-foot {
		flex-shrink: 0;
	}

	.pay-grid {
		grid-template-columns: 1fr;
	}

	.form-row {
		flex-direction: column;
		gap: 6px;
	}

	.form-label {
		width: auto;
		padding-top: 0;
	}

	.perm-list {
		max-height: 46vh;
	}
}

/* 触摸设备上略放大点击热区 */
@media (hover: none) and (pointer: coarse) {
	.nav-item {
		height: 44px;
	}

	.btn {
		height: 32px;
	}

	.segmented button {
		height: 28px;
	}

	.input,
	select.input {
		height: 36px;
	}
}
