:root {
	--bg: #f2f3f5;
	--surface: #ffffff;
	--text: #1f2329;
	--text-secondary: #646a73;
	--text-muted: #8f959e;
	--border: #dee0e3;
	--accent: #3370ff;
	--accent-hover: #2860e0;
	--success: #00b42a;
	--success-bg: #e8f7e9;
	--danger: #f53f3f;
	--danger-bg: #fde9e9;
	--radius: 8px;
	--radius-sm: 4px;
	--shadow: 0 1px 4px rgba(31, 35, 41, 0.08);
	--shadow-lg: 0 8px 24px rgba(31, 35, 41, 0.14);
	--elev-ring: 0 0 0 1px var(--border);
	--elev-raised: 0 1px 4px rgba(31, 35, 41, 0.08);
	--font:
		"Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
		"Helvetica Neue", Arial, "Noto Sans SC", "PingFang SC", "Microsoft YaHei",
		sans-serif;
	--font-display: "Inter", -apple-system, system-ui, sans-serif;
	--font-body: "Inter", -apple-system, system-ui, sans-serif;
}

* {
	box-sizing: border-box;
}

html,
body {
	margin: 0;
	padding: 0;
	font-family: var(--font);
	background: var(--bg);
	color: var(--text);
	line-height: 1.5;
}

a {
	color: var(--accent);
	text-decoration: none;
}

a:hover {
	text-decoration: underline;
}

/* Layout */
.page {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

.page-center {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
}

.container {
	width: 100%;
	max-width: 1100px;
	margin: 0 auto;
	padding: 0 24px;
}

/* Nav */
.nav {
	background: var(--surface);
	border-bottom: 1px solid var(--border);
	padding: 14px 0;
	position: sticky;
	top: 0;
	z-index: 10;
}

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

.nav-brand {
	font-weight: 700;
	font-size: 1.1rem;
	color: var(--text);
}

.nav-links {
	display: flex;
	align-items: center;
	gap: 16px;
}

/* Cards */
.card {
	background: var(--surface);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	padding: 32px;
	width: 100%;
	max-width: 420px;
}

.card-lg {
	max-width: 520px;
}

.card-header {
	margin-bottom: 24px;
	text-align: center;
}

.card-title {
	font-size: 1.5rem;
	font-weight: 700;
	margin: 0 0 8px;
}

.card-subtitle {
	color: var(--text-secondary);
	font-size: 0.95rem;
	margin: 0;
}

/* Buttons */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 8px 16px;
	border-radius: var(--radius-sm);
	border: none;
	font-size: 0.9rem;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.15s ease;
}

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

.btn-primary:hover {
	background: var(--accent-hover);
	text-decoration: none;
}

.btn-danger {
	background: var(--danger);
	color: #fff;
}

.btn-danger:hover {
	background: color-mix(in oklab, var(--danger), black 12%);
	text-decoration: none;
}

.btn:focus-visible {
	outline: 2px solid color-mix(in oklab, var(--accent), transparent 25%);
	outline-offset: 2px;
}

.btn-outline {
	background: transparent;
	color: var(--text);
	border: 1px solid var(--border);
}

.btn-outline:hover {
	background: var(--bg);
	text-decoration: none;
}

.btn-sm {
	padding: 5px 10px;
	font-size: 0.8rem;
	border-radius: var(--radius-sm);
}

/* Forms */
.form-group {
	margin-bottom: 18px;
}

label {
	display: block;
	font-size: 0.9rem;
	font-weight: 500;
	margin-bottom: 6px;
	color: var(--text);
}

input[type="text"],
input[type="password"],
select {
	width: 100%;
	padding: 10px 14px;
	border: 1px solid var(--border);
	border-radius: 10px;
	font-size: 0.95rem;
	font-family: inherit;
	background: #fff;
	color: var(--text);
	outline: none;
	transition: border 0.15s ease;
}

input[type="text"]:focus,
input[type="password"]:focus,
select:focus {
	border-color: var(--accent);
}

select {
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	padding-right: 36px;
	cursor: pointer;
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
	background-repeat: no-repeat;
	background-position: right 12px center;
	background-size: 14px;
}

select:hover {
	border-color: color-mix(in oklab, var(--accent), transparent 60%);
}

select:focus {
	border-color: var(--accent);
}

.input-row {
	display: flex;
	gap: 8px;
	align-items: stretch;
}

.input-row input {
	flex: 1;
}

/* QR */
.qr-wrap {
	text-align: center;
	margin: 24px 0;
}

.qr-img {
	max-width: 260px;
	width: 100%;
	border-radius: 14px;
	border: 1px solid var(--border);
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.qr-img-sm {
	max-width: 130px;
}

/* Steps */
.steps {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin: 24px 0;
}

.step {
	display: flex;
	align-items: center;
	gap: 12px;
	font-size: 0.95rem;
	color: var(--text-secondary);
}

.step-num {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: var(--accent);
	color: #fff;
	font-size: 0.8rem;
	font-weight: 600;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

/* Badges */
.badge {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 999px;
	font-size: 0.75rem;
	font-weight: 600;
}

.badge-success {
	background: var(--success-bg);
	color: #065f46;
}

.badge-danger {
	background: var(--danger-bg);
	color: #991b1b;
}

/* Tables */
.table-wrap {
	overflow-x: auto;
	border: 1px solid var(--border);
	border-radius: 12px;
	margin-top: 12px;
}

table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.9rem;
	background: var(--surface);
}

th,
td {
	padding: 12px 14px;
	text-align: left;
	border-bottom: 1px solid var(--border);
	white-space: nowrap;
}

th {
	background: #f9fafb;
	font-weight: 600;
	color: var(--text-secondary);
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

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

tr:hover td {
	background: #f9fafb;
}

.url-cell {
	max-width: 220px;
	overflow: hidden;
	text-overflow: ellipsis;
}

.ua-cell {
	max-width: 260px;
	overflow: hidden;
	text-overflow: ellipsis;
	font-size: 0.8rem;
	color: var(--text-secondary);
}

/* Stats */
.stats-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: 16px;
	margin-bottom: 28px;
}

.stat-card {
	background: var(--surface);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	padding: 20px;
	text-align: center;
}

.stat-value {
	font-size: 1.75rem;
	font-weight: 700;
	color: var(--accent);
	margin: 0;
}

.stat-label {
	font-size: 0.85rem;
	color: var(--text-secondary);
	margin: 4px 0 0;
}

/* Campaign cards */
.campaign-card {
	background: var(--surface);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	padding: 24px;
	margin-bottom: 24px;
}

.campaign-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 18px;
	flex-wrap: wrap;
}

.campaign-title {
	font-size: 1.15rem;
	font-weight: 700;
	margin: 0;
}

.campaign-meta {
	font-size: 0.85rem;
	color: var(--text-secondary);
	margin-top: 4px;
}

.campaign-body {
	display: flex;
	gap: 24px;
	align-items: flex-start;
	flex-wrap: wrap;
}

.campaign-qr {
	flex-shrink: 0;
}

.campaign-content {
	flex: 1;
	min-width: 280px;
}

.section-title {
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--text-secondary);
	margin: 18px 0 10px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

/* Messages */
.message {
	padding: 12px 16px;
	border-radius: 10px;
	margin-bottom: 18px;
	font-size: 0.9rem;
}

.message-error {
	background: var(--danger-bg);
	color: #991b1b;
}

/* Empty state */
.empty {
	color: var(--text-muted);
	text-align: center;
	padding: 24px;
}

/* Footer link/url */
.muted-url {
	font-size: 0.8rem;
	color: var(--text-muted);
	word-break: break-all;
	margin-top: 16px;
}

/* Toolbar & search */
.toolbar {
	display: flex;
	gap: 12px;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	margin-bottom: 24px;
}

.search-form {
	display: flex;
	gap: 8px;
	flex: 1;
	max-width: 420px;
}

.search-form input {
	flex: 1;
}

/* Pagination */
.pagination {
	display: flex;
	gap: 4px;
	justify-content: flex-end;
	margin-top: 12px;
}

.pagination a,
.pagination span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 26px;
	height: 26px;
	padding: 0 7px;
	border-radius: 6px;
	border: 1px solid var(--border);
	background: var(--surface);
	color: var(--text);
	font-size: 0.75rem;
	text-decoration: none;
}

.pagination span {
	border-color: transparent;
	background: transparent;
	color: var(--text-muted);
}

.pagination a:hover {
	background: var(--bg);
}

.pagination a.active {
	background: var(--accent);
	color: #fff;
	border-color: var(--accent);
}

/* Campaign table */
.campaign-table th,
.campaign-table td {
	vertical-align: middle;
}

.qr-thumb {
	width: 48px;
	height: 48px;
	object-fit: contain;
	border-radius: 6px;
	border: 1px solid var(--border);
	background: #fff;
}

/* Hidden edit row */
.hidden {
	display: none;
}

.edit-row {
	background: #f9fafb;
}

.edit-row td {
	padding: 18px 14px;
}

.edit-form {
	display: grid;
	grid-template-columns: 1fr 2fr auto;
	gap: 12px;
	align-items: flex-end;
}

.edit-form .form-group {
	margin-bottom: 0;
}

/* File input normalization */
input[type="file"] {
	padding: 8px;
	border: 1px solid var(--border);
	border-radius: 10px;
	font-size: 0.9rem;
	background: #fff;
	color: var(--text);
	cursor: pointer;
}

/* Responsive table */
@media (max-width: 768px) {
	.toolbar {
		flex-direction: column;
		align-items: stretch;
	}

	.search-form {
		max-width: none;
	}

	.edit-form {
		grid-template-columns: 1fr;
	}
}

/* ─── Admin redesign (Neutral Modern) ─── */

.section-card {
	background: var(--surface);
	border-radius: var(--radius);
	box-shadow: var(--elev-ring, 0 0 0 1px var(--border));
	padding: 24px;
}

.section-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 20px;
	flex-wrap: wrap;
}

.section-head .toolbar {
	margin-bottom: 0;
	flex: 1;
}

.create-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
	gap: 24px;
}

.create-form {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.create-label {
	font-size: 0.8rem;
	font-weight: 600;
	color: var(--text-secondary);
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.campaign-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
	gap: 16px;
}

.campaign-card {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 20px;
	display: flex;
	flex-direction: column;
	gap: 16px;
	transition: box-shadow 0.15s ease;
}

.campaign-card:hover {
	box-shadow: var(--shadow);
}

.campaign-card[data-active="false"] {
	opacity: 0.72;
	background: color-mix(in oklab, var(--surface), var(--bg) 40%);
}

.campaign-main {
	display: flex;
	gap: 16px;
	align-items: flex-start;
}

.qr-thumb-lg {
	width: 88px;
	height: 88px;
	object-fit: contain;
	border-radius: var(--radius-sm);
	border: 1px solid var(--border);
	background: #fff;
	flex-shrink: 0;
}

.campaign-info {
	flex: 1;
	min-width: 0;
}

.campaign-title-row {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.campaign-title {
	font-size: 1rem;
	font-weight: 600;
	margin: 0;
	color: var(--text);
}

.campaign-id {
	font-size: 0.8rem;
	color: var(--text-muted);
	margin: 4px 0 0;
}

.campaign-url {
	font-size: 0.85rem;
	color: var(--text-secondary);
	margin: 8px 0 0;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.campaign-meta {
	font-size: 0.8rem;
	color: var(--text-muted);
	margin: 8px 0 0;
}

.campaign-actions {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	align-items: center;
}

.btn-danger-ghost {
	background: transparent;
	color: var(--danger);
	border: 1px solid color-mix(in oklab, var(--danger), transparent 80%);
}

.btn-danger-ghost:hover {
	background: var(--danger-bg);
	text-decoration: none;
}

.empty-state {
	text-align: center;
	padding: 48px 24px;
	color: var(--text-secondary);
}

.empty-state p:first-child {
	font-weight: 500;
	color: var(--text);
	margin: 0 0 8px;
}

/* Modal */
.modal {
	position: fixed;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 100;
	padding: 24px;
}

.modal.hidden {
	display: none;
}

.modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.35);
}

.modal-card {
	position: relative;
	background: var(--surface);
	border-radius: var(--radius);
	box-shadow: var(--shadow-lg);
	width: 100%;
	max-width: 480px;
	padding: 24px;
	z-index: 1;
}

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

.modal-title {
	font-size: 1.15rem;
	font-weight: 600;
	margin: 0;
}

.modal-close {
	background: transparent;
	border: none;
	font-size: 1.5rem;
	color: var(--text-muted);
	cursor: pointer;
	line-height: 1;
	padding: 0;
	width: 32px;
	height: 32px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: var(--radius-sm);
}

.modal-close:hover {
	background: var(--bg);
	color: var(--text);
}

.modal-actions {
	display: flex;
	justify-content: flex-end;
	gap: 8px;
	margin-top: 8px;
}

.system-dialog-card {
	max-width: 420px;
	padding: 24px;
}

.system-dialog-close {
	position: absolute;
	top: 16px;
	right: 16px;
}

.system-dialog-heading {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	padding-right: 36px;
}

.system-dialog-copy {
	min-width: 0;
}

.system-dialog-icon {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	font-size: 1rem;
	font-weight: 700;
	background: color-mix(in oklab, var(--accent), transparent 90%);
	color: var(--accent);
}

.system-dialog-icon.danger {
	background: var(--danger-bg);
	color: var(--danger);
}

.system-dialog-message {
	margin: 8px 0 0;
	color: var(--text-secondary);
	font-size: 0.9rem;
	line-height: 1.65;
	overflow-wrap: anywhere;
}

.system-dialog-input-wrap {
	margin-top: 20px;
}

.system-dialog-input-wrap.hidden {
	display: none;
}

.system-dialog-input-wrap label {
	display: block;
	margin-bottom: 7px;
	font-size: 0.82rem;
	font-weight: 500;
	color: var(--text-secondary);
}

.system-dialog-input-wrap input {
	width: 100%;
}

.system-dialog-input-wrap input:focus-visible {
	outline: 2px solid color-mix(in oklab, var(--accent), transparent 60%);
	outline-offset: 1px;
	border-color: var(--accent);
}

.system-dialog-input-wrap input.input-error {
	border-color: var(--danger);
}

.system-dialog-error {
	min-height: 18px;
	margin: 5px 0 0;
	color: var(--danger);
	font-size: 0.76rem;
}

.system-dialog-actions {
	margin-top: 22px;
}

/* Toast */
.toast {
	position: fixed;
	bottom: 24px;
	left: 50%;
	transform: translateX(-50%) translateY(12px);
	display: inline-flex;
	align-items: center;
	gap: 9px;
	max-width: min(420px, calc(100vw - 32px));
	background: var(--text);
	color: #fff;
	padding: 10px 16px;
	border-radius: var(--radius);
	font-size: 0.88rem;
	line-height: 1.4;
	opacity: 0;
	pointer-events: none;
	transition:
		opacity 0.2s ease,
		transform 0.2s ease;
	z-index: 110;
}

.toast-indicator {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #8f959e;
	flex-shrink: 0;
}

.toast.success .toast-indicator {
	background: #61d67a;
}

.toast.error .toast-indicator {
	background: #ff7b7b;
}

.toast.info .toast-indicator {
	background: #7da5ff;
}

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

/* Events table */
.events-table {
	font-size: 0.85rem;
}

.events-table th,
.events-table td {
	padding: 10px 12px;
}

/* Responsive admin */
@media (max-width: 768px) {
	.section-card {
		padding: 16px;
	}

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

	.campaign-main {
		flex-direction: column;
	}

	.qr-thumb-lg {
		width: 72px;
		height: 72px;
	}

	.section-head.toolbar {
		flex-direction: column;
		align-items: stretch;
	}

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

/* ─── Feishu-style admin layout ─── */

.admin-layout {
	display: flex;
	min-height: 100vh;
}

.sidebar {
	width: 220px;
	background: var(--surface);
	border-right: 1px solid var(--border);
	display: flex;
	flex-direction: column;
	flex-shrink: 0;
}

.sidebar-brand {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 18px 20px;
	font-weight: 600;
	font-size: 1.05rem;
	color: var(--text);
	border-bottom: 1px solid var(--border);
}

.brand-icon {
	width: 32px;
	height: 32px;
	background: var(--accent);
	color: #fff;
	border-radius: var(--radius-sm);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.04em;
}

.sidebar-nav {
	padding: 12px 10px;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.nav-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 12px;
	border-radius: var(--radius-sm);
	color: var(--text-secondary);
	font-size: 0.9rem;
	text-decoration: none;
	transition:
		background 0.15s ease,
		color 0.15s ease;
}

.nav-item:hover {
	background: var(--bg);
	color: var(--text);
	text-decoration: none;
}

.nav-item.active {
	background: color-mix(in oklab, var(--accent), transparent 92%);
	color: var(--accent);
	font-weight: 500;
}

.nav-icon {
	width: 18px;
	height: 18px;
	flex-shrink: 0;
}

.main {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
}

.main-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 20px 28px;
	background: var(--surface);
	border-bottom: 1px solid var(--border);
	flex-wrap: wrap;
}

.main-title {
	font-size: 1.35rem;
	font-weight: 600;
	margin: 0;
	color: var(--text);
}

.main-subtitle {
	font-size: 0.85rem;
	color: var(--text-secondary);
	margin: 4px 0 0;
}

.header-actions {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}

.header-search input {
	width: 240px;
	max-width: 40vw;
	padding: 8px 12px;
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	font-size: 0.9rem;
	background: var(--bg);
	color: var(--text);
	outline: none;
}

.header-search input:focus {
	background: var(--surface);
	border-color: var(--accent);
}

.main-body {
	padding: 24px 28px;
	flex: 1;
}

.filter-bar {
	display: flex;
	gap: 8px;
	margin-bottom: 16px;
	align-items: center;
	flex-wrap: wrap;
}

.filter-chip {
	display: inline-flex;
	align-items: center;
	padding: 5px 12px;
	border-radius: var(--radius-sm);
	font-size: 0.85rem;
	color: var(--text-secondary);
	background: transparent;
	border: 1px solid transparent;
	text-decoration: none;
	transition: all 0.15s ease;
}

.filter-chip:hover {
	background: var(--surface);
	color: var(--text);
	text-decoration: none;
}

.filter-chip.active {
	background: color-mix(in oklab, var(--accent), transparent 92%);
	color: var(--accent);
	border-color: color-mix(in oklab, var(--accent), transparent 80%);
	font-weight: 500;
}

.filter-spacer {
	flex: 1;
}

.filter-meta {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-left: auto;
	flex-wrap: wrap;
	flex: 1 1 auto;
	justify-content: flex-end;
}

.btn-batch {
	font-size: 0.85rem;
	padding: 5px 12px;
	flex-shrink: 0;
	white-space: nowrap;
}

.header-search {
	position: relative;
	display: inline-flex;
	align-items: center;
}

.header-search input {
	width: 240px;
	padding: 8px 28px 8px 12px;
}

.search-clear {
	position: absolute;
	right: 6px;
	top: 50%;
	transform: translateY(-50%);
	width: 20px;
	height: 20px;
	border: none;
	background: var(--border);
	color: var(--text-secondary);
	border-radius: 50%;
	cursor: pointer;
	font-size: 0.8rem;
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
}

.search-clear:hover {
	background: var(--accent);
	color: #fff;
}

.search-result-count {
	font-size: 0.82rem;
	color: var(--text-secondary);
	white-space: nowrap;
}

.loading-row {
	text-align: center;
	padding: 32px 0;
	color: var(--text-secondary);
	font-size: 0.9rem;
}

/* Spinner 加载动画 */
.loading-state {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 48px 20px;
	color: var(--text-secondary);
	font-size: 0.9rem;
}

.spinner {
	width: 24px;
	height: 24px;
	border: 3px solid var(--border);
	border-top-color: var(--accent);
	border-radius: 50%;
	animation: spin 0.8s linear infinite;
	margin-bottom: 12px;
}

@keyframes spin {
	to {
		transform: rotate(360deg);
	}
}

/* 空状态优化 */
.empty-state {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 64px 20px;
	color: var(--text-secondary);
}

.empty-state-icon {
	font-size: 48px;
	margin-bottom: 16px;
	opacity: 0.5;
}

.empty-state-title {
	font-size: 1rem;
	font-weight: 500;
	color: var(--text);
	margin-bottom: 8px;
}

.empty-state-desc {
	font-size: 0.875rem;
	color: var(--text-muted);
}

.table-card {
	background: var(--surface);
	border-radius: var(--radius);
	box-shadow: var(--elev-ring);
	overflow: auto;
	max-height: calc(100vh - 220px);
}

.data-table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	font-size: 0.9rem;
}

.data-table th,
.data-table td {
	padding: 14px 20px;
	text-align: left;
	border-bottom: 1px solid var(--border);
	white-space: nowrap;
}

.data-table th {
	background: var(--bg);
	font-weight: 500;
	color: var(--text-secondary);
	font-size: 0.8rem;
	position: sticky;
	top: 0;
	z-index: 2;
}

.data-table thead th {
	border-bottom: 2px solid var(--border);
}

/* 排序下拉框 */
.sort-select {
	font-size: 0.85rem;
	padding: 5px 10px;
	border-radius: var(--radius-sm);
	border: 1px solid var(--border);
	background: var(--surface);
	color: var(--text);
	cursor: pointer;
	flex-shrink: 0;
	white-space: nowrap;
	flex: none;
	width: auto;
}

.sort-select:hover,
.sort-select:focus {
	border-color: var(--accent);
	outline: none;
}

.data-table tbody tr:hover {
	background: color-mix(in oklab, var(--accent), transparent 97%);
}

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

.url-cell {
	max-width: 280px;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* URL 单元格：点击展开/收起长链接 */
.url-cell.is-expanded {
	white-space: normal;
	word-break: break-all;
	max-width: none;
}

.url-cell-toggle {
	display: inline-flex;
	align-items: center;
	gap: 2px;
	margin-left: 6px;
	color: var(--accent);
	cursor: pointer;
	font-size: 0.75rem;
	vertical-align: middle;
	flex-shrink: 0;
}

.url-cell-toggle:hover {
	opacity: 0.8;
}

.campaign-cell {
	display: flex;
	align-items: center;
	gap: 12px;
	white-space: normal;
}

.qr-thumb-sm {
	width: 44px;
	height: 44px;
	object-fit: contain;
	border-radius: var(--radius-sm);
	border: 1px solid var(--border);
	background: #fff;
	flex-shrink: 0;
	cursor: pointer;
}

.qr-lightbox-img {
	width: 100%;
	max-width: 400px;
	height: auto;
	display: block;
	margin: 0 auto;
	border-radius: var(--radius-sm);
	border: 1px solid var(--border);
	background: #fff;
}

.qr-lightbox-url {
	text-align: center;
	margin-top: 16px;
	color: var(--text-secondary);
	font-size: 0.9rem;
	word-break: break-all;
}

.qr-modal-tabs {
	display: flex;
	gap: 8px;
	margin-bottom: 20px;
	border-bottom: 1px solid var(--border);
	padding-bottom: 4px;
}

.qr-modal-tab {
	flex: 1;
	background: transparent;
	border: none;
	padding: 10px 8px;
	font-size: 0.9rem;
	font-weight: 500;
	color: var(--text-secondary);
	cursor: pointer;
	border-radius: var(--radius-sm);
	transition:
		background 0.15s,
		color 0.15s;
}

.qr-modal-tab:hover {
	background: var(--bg);
	color: var(--text);
}

.qr-modal-tab.active {
	color: var(--accent);
	background: rgba(51, 112, 255, 0.08);
}

.qr-tab-panel.hidden {
	display: none;
}

.phone-mockup {
	--phone-preview-width: 390px;
	--phone-preview-height: 844px;
	--phone-preview-scale: 0.64;
	box-sizing: content-box;
	width: calc(var(--phone-preview-width) * var(--phone-preview-scale));
	height: calc(var(--phone-preview-height) * var(--phone-preview-scale));
	margin: 0 auto;
	border: 10px solid #1f2329;
	border-radius: 32px;
	overflow: hidden;
	background: #1f2329;
	box-shadow: 0 12px 32px rgba(31, 35, 41, 0.22);
	position: relative;
}

.phone-mockup iframe {
	width: var(--phone-preview-width);
	height: var(--phone-preview-height);
	border: none;
	background: #fff;
	transform: scale(var(--phone-preview-scale));
	transform-origin: top left;
}

.campaign-cell-text {
	min-width: 0;
}

.campaign-cell-name {
	font-weight: 500;
	color: var(--text);
	margin: 0;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	word-break: break-all;
}

.campaign-cell-id {
	font-size: 0.8rem;
	color: var(--text-muted);
	margin: 2px 0 0;
}

.row-actions {
	display: flex;
	gap: 2px;
	align-items: center;
	white-space: nowrap;
	flex-wrap: nowrap;
}

.btn-text {
	background: transparent;
	border: none;
	color: var(--accent);
	padding: 6px 8px;
	font-size: 0.85rem;
	cursor: pointer;
	border-radius: var(--radius-sm);
}

.btn-text:hover {
	background: color-mix(in oklab, var(--accent), transparent 92%);
	text-decoration: none;
}

.btn-text-danger {
	background: transparent;
	border: none;
	color: var(--danger);
	padding: 6px 8px;
	font-size: 0.85rem;
	cursor: pointer;
	border-radius: var(--radius-sm);
}

.btn-text-danger:hover {
	background: var(--danger-bg);
	text-decoration: none;
}

.table-footer {
	display: flex;
	justify-content: center;
	padding: 16px;
	border-top: 1px solid var(--border);
}

/* Toggle switch */
.switch {
	position: relative;
	display: inline-block;
	width: 40px;
	height: 22px;
}

.switch input {
	opacity: 0;
	width: 0;
	height: 0;
}

.slider {
	position: absolute;
	cursor: pointer;
	inset: 0;
	background: var(--border);
	border-radius: 999px;
	transition: background 0.2s ease;
}

.slider::before {
	content: "";
	position: absolute;
	height: 18px;
	width: 18px;
	left: 2px;
	bottom: 2px;
	background: #fff;
	border-radius: 50%;
	transition: transform 0.2s ease;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.switch input:checked + .slider {
	background: var(--success);
}

.switch input:checked + .slider::before {
	transform: translateX(18px);
}

.toggle-form {
	display: inline-block;
	margin: 0;
}

/* Drawer */
.drawer {
	position: fixed;
	inset: 0;
	z-index: 100;
	display: flex;
	justify-content: flex-end;
	pointer-events: none;
}

.drawer.open {
	pointer-events: auto;
}

.drawer-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.35);
	opacity: 0;
	transition: opacity 0.2s ease;
}

.drawer.open .drawer-backdrop {
	opacity: 1;
}

.drawer-panel {
	position: relative;
	width: 100%;
	max-width: 440px;
	height: 100%;
	background: var(--surface);
	box-shadow: var(--shadow-lg);
	transform: translateX(100%);
	transition: transform 0.25s cubic-bezier(0.2, 0, 0, 1);
	display: flex;
	flex-direction: column;
}

.drawer.open .drawer-panel {
	transform: translateX(0);
}

.drawer-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 18px 24px;
	border-bottom: 1px solid var(--border);
}

.drawer-title {
	font-size: 1.15rem;
	font-weight: 600;
	margin: 0;
}

.drawer-close {
	background: transparent;
	border: none;
	font-size: 1.5rem;
	color: var(--text-muted);
	cursor: pointer;
	width: 32px;
	height: 32px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: var(--radius-sm);
}

.drawer-close:hover {
	background: var(--bg);
	color: var(--text);
}

.drawer-body {
	flex: 1;
	padding: 24px;
	overflow-y: auto;
}

.drawer-tabs {
	display: flex;
	gap: 8px;
	margin-bottom: 20px;
	border-bottom: 1px solid var(--border);
}

.drawer-tab {
	background: transparent;
	border: none;
	padding: 8px 4px;
	margin-bottom: -1px;
	color: var(--text-secondary);
	font-size: 0.9rem;
	cursor: pointer;
	border-bottom: 2px solid transparent;
}

.drawer-tab.active {
	color: var(--accent);
	border-bottom-color: var(--accent);
	font-weight: 500;
}

.drawer-form {
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.drawer-form.hidden {
	display: none;
}

.drawer-footer {
	display: flex;
	justify-content: flex-end;
	gap: 10px;
	margin-top: 8px;
}

/* Empty state */
.empty-state {
	text-align: center;
	padding: 64px 24px;
	color: var(--text-secondary);
}

.empty-state p:first-child {
	font-weight: 500;
	color: var(--text);
	margin: 0 0 8px;
}

.empty-cell {
	padding: 0 !important;
}

.empty-cell .empty-state {
	padding: 48px 24px;
}

/* Responsive admin layout */
@media (max-width: 520px) {
	.modal {
		padding: 16px;
	}

	.system-dialog-card {
		padding: 20px;
	}

	.system-dialog-heading {
		gap: 12px;
	}

	.system-dialog-actions {
		flex-direction: column-reverse;
	}

	.system-dialog-actions .btn {
		width: 100%;
	}

	.toast {
		bottom: 16px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.modal-card,
	.toast {
		transition: none;
	}
}

@media (max-width: 768px) {
	.admin-layout {
		flex-direction: column;
	}

	.sidebar {
		width: 100%;
		border-right: none;
		border-bottom: 1px solid var(--border);
	}

	.sidebar-brand {
		padding: 14px 16px;
		font-size: 0.98rem;
	}

	.sidebar-nav {
		flex-direction: row;
		overflow-x: auto;
		padding: 8px 12px;
		gap: 6px;
		-webkit-overflow-scrolling: touch;
	}

	.nav-item {
		white-space: nowrap;
		padding: 8px 10px;
		font-size: 0.85rem;
	}

	.main-header {
		padding: 14px 16px;
		gap: 10px;
	}

	.main-title {
		font-size: 1.15rem;
	}

	.header-actions {
		gap: 8px;
		width: 100%;
	}

	.header-search {
		flex: 1;
	}

	.header-search input {
		width: 100%;
		max-width: none;
	}

	.main-body {
		padding: 12px 16px;
	}

	.filter-bar {
		gap: 6px;
	}

	.filter-chip {
		padding: 5px 10px;
		font-size: 0.8rem;
	}

	.data-table th,
	.data-table td {
		padding: 10px 12px;
		font-size: 0.85rem;
	}

	.data-table th {
		/* 移动端取消粘性，避免横向滚动时表头错位 */
		position: static;
	}

	.url-cell {
		max-width: 160px;
	}

	.note-cell {
		max-width: 120px;
	}

	.table-card {
		max-height: none;
	}

	.drawer-panel {
		max-width: 100%;
	}
}

@media (max-width: 480px) {
	.main-header {
		flex-direction: column;
		align-items: stretch;
	}

	.header-actions .btn-primary {
		width: 100%;
	}

	.filter-bar {
		justify-content: flex-start;
	}

	.filter-meta {
		margin-left: 0;
		width: 100%;
		justify-content: space-between;
	}

	.btn-text,
	.btn-text-danger {
		padding: 6px 6px;
		font-size: 0.8rem;
	}
}

/* ---------- 京东喜庆扫码落地页 ---------- */

.jd-festive {
	min-height: 100vh;
	min-height: 100dvh;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding:
		max(16px, env(safe-area-inset-top))
		max(16px, env(safe-area-inset-right))
		max(16px, env(safe-area-inset-bottom))
		max(16px, env(safe-area-inset-left));
	background: linear-gradient(180deg, #d5000f 0%, #ff4d00 60%, #ff7a00 100%);
	font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
	overflow-x: hidden;
}

.jd-card {
	width: min(100%, 420px);
	min-width: 0;
	background: linear-gradient(
		180deg,
		rgba(255, 255, 255, 0.14) 0%,
		rgba(255, 255, 255, 0.06) 100%
	);
	border-radius: 16px;
	padding: 28px 22px 22px;
	box-shadow: 0 12px 40px rgba(139, 0, 0, 0.35);
	text-align: center;
	color: #fff;
	position: relative;
	overflow: hidden;
}

.jd-card::before {
	content: "";
	position: absolute;
	inset: 0;
	background: radial-gradient(
		circle at 50% -20%,
		rgba(255, 215, 0, 0.25),
		transparent 60%
	);
	pointer-events: none;
}

.jd-header {
	position: relative;
	z-index: 1;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: rgba(255, 255, 255, 0.18);
	border-radius: 999px;
	padding: 6px 14px;
	margin-bottom: 18px;
	backdrop-filter: blur(4px);
}

.jd-logo {
	display: flex;
	align-items: center;
}

.jd-brand {
	font-size: 1.15rem;
	font-weight: 800;
	letter-spacing: 1px;
}

.jd-slogan {
	font-size: 0.75rem;
	opacity: 0.9;
	border-left: 1px solid rgba(255, 255, 255, 0.35);
	padding-left: 10px;
}

.jd-titles {
	position: relative;
	z-index: 1;
	margin-bottom: 18px;
}

.jd-title {
	font-size: 2.8rem;
	font-weight: 900;
	margin: 0;
	line-height: 1.1;
	text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.jd-subtitle {
	font-size: 1.25rem;
	font-weight: 700;
	margin: 6px 0 0;
	opacity: 0.95;
	letter-spacing: 2px;
}

.jd-showcase,
.jd-scan-action {
	position: relative;
	z-index: 1;
	min-width: 0;
}

.jd-showcase {
	width: min(100%, 360px);
	margin: 0 auto 20px;
	background: #fff;
	border-radius: 16px;
	padding: 8px;
	box-shadow: 0 6px 22px rgba(0, 0, 0, 0.22);
	aspect-ratio: 1280 / 853;
}

.jd-showcase-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	border-radius: 10px;
}

.jd-cta-text {
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.6;
	margin: 0 0 18px;
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.jd-qr-section {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: clamp(6px, 3vw, 12px);
	min-width: 0;
	margin-bottom: 16px;
}

.jd-qr-side {
	flex: 0 1 60px;
	min-width: 0;
	font-size: 1.4rem;
	font-weight: 900;
	color: #ffe082;
	line-height: 1.3;
	text-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.jd-qr-wrap {
	flex: 0 1 170px;
	width: min(44vw, 170px);
	aspect-ratio: 1;
	min-width: 128px;
	background: #fff;
	border-radius: 16px;
	padding: 10px;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22);
}

.jd-qr-img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
}

.jd-hint {
	font-size: 0.85rem;
	opacity: 0.9;
	margin: 0;
	letter-spacing: 1px;
}

@media (min-height: 900px) and (min-width: 481px) {
	.jd-festive {
		align-items: center;
	}
}

@media (max-width: 480px) {
	.jd-festive {
		padding:
		max(10px, env(safe-area-inset-top))
		max(10px, env(safe-area-inset-right))
		max(12px, env(safe-area-inset-bottom))
		max(10px, env(safe-area-inset-left));
	}

	.jd-card {
		display: flex;
		flex-direction: column;
		padding: 20px 14px 18px;
	}

	.jd-header {
		align-self: center;
		margin-bottom: 12px;
	}

	.jd-titles {
		margin-bottom: 14px;
	}

	.jd-title {
		font-size: clamp(2rem, 12vw, 2.4rem);
	}

	.jd-subtitle {
		font-size: 1.05rem;
	}

	.jd-showcase {
		width: min(100%, 320px);
		margin-bottom: 18px;
		padding: 6px;
	}

	.jd-cta-text {
		margin-bottom: 12px;
	}

	.jd-qr-side {
		flex-basis: 44px;
		font-size: clamp(0.95rem, 5vw, 1.15rem);
	}

	.jd-qr-wrap {
		flex-basis: 150px;
		width: min(45vw, 150px);
		min-width: 124px;
		padding: 8px;
	}
}

@media (max-width: 340px) {
	.jd-card {
		padding-inline: 10px;
	}

	.jd-qr-side {
		flex-basis: 38px;
		font-size: 0.9rem;
	}

	.jd-qr-wrap {
		width: 132px;
		min-width: 120px;
	}

	.jd-hint {
		max-width: 210px;
		margin-inline: auto;
		font-size: 0.76rem;
		line-height: 1.5;
		letter-spacing: 0;
		text-wrap: balance;
	}
}

/* ─── 分组管理 ─── */
.sidebar-sub {
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 2px 10px 6px 22px;
}

.nav-sub-item {
	display: block;
	padding: 7px 12px;
	border-radius: var(--radius-sm);
	color: var(--text-secondary);
	font-size: 0.85rem;
	text-decoration: none;
	transition:
		background 0.15s ease,
		color 0.15s ease;
}

.nav-sub-item:hover {
	background: var(--bg);
	color: var(--text);
	text-decoration: none;
}

.nav-sub-item.active {
	background: color-mix(in oklab, var(--accent), transparent 88%);
	color: var(--accent);
	font-weight: 500;
}

.nav-sub-action {
	color: var(--text-muted);
	font-size: 0.8rem;
	margin-top: 4px;
}

.nav-sub-action:hover {
	color: var(--accent);
}

.modal-body {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.group-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
	max-height: 360px;
	overflow-y: auto;
}

.group-row {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 12px;
	border-radius: var(--radius-sm);
	background: var(--bg);
}

.group-row-name {
	flex: 1;
	font-size: 0.9rem;
	font-weight: 500;
	color: var(--text);
}

.group-row-count {
	font-size: 0.78rem;
	color: var(--text-muted);
	white-space: nowrap;
}

.group-row-actions {
	display: flex;
	gap: 4px;
}

.group-create-form {
	display: flex;
	gap: 8px;
	padding-top: 8px;
	border-top: 1px solid var(--border);
}

.group-create-form input {
	flex: 1;
	padding: 8px 12px;
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	font-size: 0.9rem;
	background: var(--surface);
	color: var(--text);
}

.group-create-form input:focus {
	outline: none;
	border-color: var(--accent);
}

.note-cell {
	max-width: 180px;
	overflow: hidden;
	text-overflow: ellipsis;
	color: var(--text-secondary);
}

.avatar-editor {
	display: flex;
	flex-direction: column;
	gap: 8px;
	align-items: flex-start;
}

.avatar-preview {
	width: 72px;
	height: 72px;
	object-fit: cover;
	border-radius: 12px;
	border: 1px solid var(--border);
	background: #fff;
}

.avatar-empty {
	width: 72px;
	height: 72px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 12px;
	border: 1px dashed var(--border);
	background: var(--bg);
	color: var(--text-muted);
	font-size: 0.78rem;
	text-align: center;
}

.avatar-actions {
	display: flex;
	gap: 8px;
	align-items: center;
}

.field-help {
	font-size: 0.8rem;
	color: var(--text-muted);
	margin: 2px 0 0;
}

@media (max-width: 768px) {
	.sidebar-sub {
		display: none;
	}
}

/* ─── 编辑活码表单美化 ─── */

.edit-section {
	padding: 18px 0;
	border-bottom: 1px solid var(--border);
}

.edit-section:first-child {
	padding-top: 0;
}

.edit-section:last-of-type {
	border-bottom: none;
}

.edit-section-title {
	font-size: 0.78rem;
	font-weight: 600;
	color: var(--text-muted);
	text-transform: uppercase;
	letter-spacing: 0.06em;
	margin-bottom: 16px;
}

.avatar-editor {
	width: 100%;
}

.avatar-editor-main {
	display: flex;
	gap: 18px;
	align-items: flex-start;
}

.avatar-preview-box {
	width: 96px;
	height: 96px;
	border-radius: 14px;
	border: 1px solid var(--border);
	background: var(--surface);
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	position: relative;
	transition:
		border-color 0.15s ease,
		box-shadow 0.15s ease;
}

.avatar-preview-box:hover {
	border-color: color-mix(in oklab, var(--accent), transparent 60%);
}

.avatar-preview {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border: 0;
	border-radius: 0;
}

.avatar-empty {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 4px;
	width: 100%;
	height: 100%;
	border: 0;
	border-radius: 0;
	color: var(--text-muted);
	font-size: 0.7rem;
	text-align: center;
	cursor: pointer;
	background: color-mix(in oklab, var(--bg), white 35%);
	transition:
		color 0.15s ease,
		background 0.15s ease;
}

.avatar-empty strong {
	color: var(--text-secondary);
	font-size: 0.74rem;
	font-weight: 600;
}

.avatar-empty:hover {
	color: var(--accent);
	background: color-mix(in oklab, var(--accent), transparent 94%);
}

.avatar-empty:hover strong {
	color: var(--accent);
}

.avatar-empty svg {
	opacity: 0.55;
	transition: opacity 0.15s ease;
}

.avatar-empty:hover svg {
	opacity: 0.9;
}

.avatar-preview-qr {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #fff;
}

.avatar-preview-qr img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.avatar-editor-side {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding-top: 4px;
}

.avatar-actions {
	display: flex;
	gap: 8px;
	align-items: center;
	flex-wrap: wrap;
}

.avatar-toggle-preview {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 0.82rem;
	color: var(--text-secondary);
	cursor: pointer;
	user-select: none;
}

.avatar-toggle-preview input {
	margin: 0;
	cursor: pointer;
}

.avatar-toggle-preview:has(input:checked) {
	color: var(--accent);
}

.edit-link-box {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 14px;
	background: var(--bg);
	border-radius: var(--radius-sm);
	border: 1px solid var(--border);
}

.edit-link-url {
	flex: 1;
	min-width: 0;
	font-size: 0.85rem;
	color: var(--text-secondary);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	font-family: ui-monospace, "SF Mono", Menlo, monospace;
}

.drawer-footer {
	padding-top: 8px;
}

@media (max-width: 480px) {
	.avatar-editor-main {
		flex-direction: column;
		align-items: center;
	}

	.avatar-editor-side {
		align-items: center;
		text-align: center;
	}
}

/* ---- 数据看板 & 可疑扫码行（Arco 风格） ---- */
.stat-cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 16px;
	margin-bottom: 20px;
}
.stat-card {
	display: flex;
	align-items: center;
	gap: 16px;
	background: var(--surface);
	border-radius: var(--radius);
	box-shadow: var(--elev-ring);
	padding: 20px;
}
.stat-icon {
	width: 44px;
	height: 44px;
	border-radius: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}
.stat-icon svg {
	width: 22px;
	height: 22px;
}
.tint-blue {
	background: #e8f0ff;
	color: #3370ff;
}
.tint-cyan {
	background: #e3f7f5;
	color: #0e9f9a;
}
.tint-green {
	background: var(--success-bg);
	color: var(--success);
}
.tint-red {
	background: var(--danger-bg);
	color: var(--danger);
}
.stat-meta {
	min-width: 0;
}
.stat-label {
	font-size: 0.75rem;
	color: var(--text-muted);
	margin-bottom: 2px;
}
.stat-value {
	font-size: 1.625rem;
	font-weight: 600;
	color: var(--text);
	letter-spacing: -0.02em;
	font-variant-numeric: tabular-nums;
	line-height: 1.25;
}
.stat-sub {
	font-size: 0.75rem;
	color: var(--text-secondary);
	margin-top: 2px;
}
.stat-panel {
	--bar: var(--accent);
	background: var(--surface);
	border-radius: var(--radius);
	box-shadow: var(--elev-ring);
	padding: 20px 24px;
	margin-bottom: 20px;
}
.panel-client {
	--bar: #14c9c9;
}
.panel-campaign {
	--bar: #722ed1;
}
.stat-panel h2 {
	display: flex;
	align-items: center;
	font-size: 0.9375rem;
	font-weight: 600;
	margin: 0 0 18px;
	color: var(--text);
}
.stat-panel h2::before {
	content: "";
	width: 3px;
	height: 14px;
	border-radius: 2px;
	background: var(--bar);
	margin-right: 8px;
}
.bar-row {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 12px;
}
.bar-row:last-child {
	margin-bottom: 0;
}
.bar-label {
	width: 110px;
	flex-shrink: 0;
	font-size: 0.8125rem;
	color: var(--text-secondary);
	text-align: right;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	transition: color 0.15s ease;
}
.bar-track {
	flex: 1;
	height: 10px;
	background: var(--bg);
	border-radius: 999px;
	overflow: hidden;
}
.bar-fill {
	height: 100%;
	background: var(--bar);
	border-radius: 999px;
	min-width: 2px;
	transition: filter 0.15s ease;
}
.bar-row:hover .bar-fill {
	filter: brightness(1.12);
}
.bar-row:hover .bar-label {
	color: var(--text);
}
.bar-value {
	width: 92px;
	flex-shrink: 0;
	display: flex;
	justify-content: flex-end;
	gap: 6px;
	font-size: 0.8125rem;
	font-variant-numeric: tabular-nums;
	color: var(--text);
}
.bar-value b {
	font-weight: 600;
}
.bar-pct {
	color: var(--text-muted);
}
.daily-chart {
	display: flex;
	align-items: flex-end;
	gap: 3px;
	height: 150px;
	border-bottom: 1px solid var(--border);
}
.daily-col {
	flex: 1;
	min-width: 0;
	height: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-end;
}
.daily-num {
	font-size: 0.625rem;
	color: var(--text-muted);
	font-variant-numeric: tabular-nums;
	line-height: 1;
	margin-bottom: 3px;
}
.daily-col:hover .daily-num {
	color: var(--text);
	font-weight: 600;
}
.daily-bar {
	width: 100%;
	background: var(--bar);
	border-radius: 3px 3px 0 0;
	min-height: 2px;
	opacity: 0.9;
	transition:
		opacity 0.15s ease,
		background-color 0.15s ease;
}
.daily-col:hover .daily-bar {
	opacity: 1;
	background: var(--accent-hover);
}
.daily-axis {
	display: flex;
	justify-content: space-between;
	font-size: 0.75rem;
	color: var(--text-muted);
	margin-top: 8px;
}
.row-sus td {
	opacity: 0.55;
}
.sus-dot {
	display: inline-block;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--danger);
	margin-left: 6px;
	vertical-align: middle;
}

/* 扫码记录：活码名单行截断 */
.scans-name-cell {
	max-width: 260px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
