/* 我的报告 — 1:1 参考 Kimi_Agent_这个报告界面帮我优化下 ui */
html.bg-ref-page,
html.bg-ref-page body {
	min-height: 100dvh;
	margin: 0;
	font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
	-webkit-font-smoothing: antialiased;
	background: linear-gradient(180deg, #fdf4ff 0%, #eff6ff 35%, #f3f4f6 100%);
}

.bg-ref-page .page {
	min-height: 100dvh;
	display: flex;
	flex-direction: column;
	padding-bottom: calc(24px + env(safe-area-inset-bottom, 0));
}

.bg-ref-head {
	position: sticky;
	top: 0;
	z-index: 50;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: calc(56px + env(safe-area-inset-top, 0));
	padding: env(safe-area-inset-top, 0) 12px 0 12px;
	background: rgba(255, 255, 255, 0.75);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border-bottom: 1px solid #e5e7eb;
}

.bg-ref-close {
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #1f2937;
	text-decoration: none;
	flex-shrink: 0;
	-webkit-tap-highlight-color: transparent;
}

.bg-ref-close [data-lucide] svg {
	width: 24px;
	height: 24px;
	stroke-width: 1.5;
}

.bg-ref-title-wrap {
	flex: 1;
	text-align: center;
	min-width: 0;
}

.bg-ref-title-wrap h1 {
	font-size: 18px;
	font-weight: 600;
	color: #1f2937;
	line-height: 1.25;
}

.bg-ref-head-spacer {
	width: 36px;
	flex-shrink: 0;
}

.bg-ref-tabs-wrap {
	flex-shrink: 0;
	padding: 16px 0 8px;
}

.bg-ref-tabs {
	display: flex;
	gap: 8px;
	padding: 0 16px;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
	scroll-snap-type: x mandatory;
}

.bg-ref-tabs::-webkit-scrollbar {
	display: none;
}

.bg-ref-tab {
	position: relative;
	flex: 0 0 auto;
	border: none;
	background: transparent;
	padding: 8px 16px;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 500;
	font-family: inherit;
	color: #6b7280;
	cursor: pointer;
	white-space: nowrap;
	scroll-snap-align: start;
	-webkit-tap-highlight-color: transparent;
}

.bg-ref-tab.active {
	color: #1f2937;
}

.bg-ref-tab.active::before {
	content: "";
	position: absolute;
	inset: 0;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 1px 8px rgba(0, 0, 0, 0.06);
	z-index: 0;
}

.bg-ref-tab span {
	position: relative;
	z-index: 1;
}

.bg-ref-main {
	flex: 1;
	overflow-y: auto;
	padding: 16px 16px 24px;
	-webkit-overflow-scrolling: touch;
}

.bg-ref-card {
	background: linear-gradient(135deg, #fdf4ff 0%, #eff6ff 100%);
	border-radius: 8px;
	padding: 16px;
	margin-bottom: 12px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04), 0 1px 4px rgba(0, 0, 0, 0.02);
	-webkit-tap-highlight-color: transparent;
}

.bg-ref-card:active {
	transform: scale(0.98);
	opacity: 0.95;
}

.bg-ref-card-inner {
	display: flex;
	align-items: flex-start;
	gap: 12px;
}

.bg-ref-card-ico {
	width: 40px;
	height: 40px;
	border-radius: 8px;
	background: #fff;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.bg-ref-card-ico [data-lucide] svg {
	width: 20px;
	height: 20px;
	stroke: #6b7280;
	stroke-width: 1.5;
}

.bg-ref-card-body {
	flex: 1;
	min-width: 0;
}

.bg-ref-card-top {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 8px;
}

.bg-ref-card-name {
	font-size: 15px;
	font-weight: 500;
	color: #1f2937;
	line-height: 1.35;
	overflow: hidden;
	text-overflow: ellipsis;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.bg-ref-status {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 2px 8px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 500;
	flex-shrink: 0;
	white-space: nowrap;
}

.bg-ref-status.ready {
	background: #e0f2fe;
	color: #0369a1;
}

.bg-ref-status.pending {
	background: #ffedd5;
	color: #c2410c;
}

.bg-ref-status.failed {
	background: #ffe4e6;
	color: #e11d48;
}

.bg-ref-status .spin svg {
	animation: bg-ref-spin 1s linear infinite;
}

@keyframes bg-ref-spin {
	to { transform: rotate(360deg); }
}

.bg-ref-status .spin [data-lucide] {
	display: inline-flex;
}

.bg-ref-status .spin [data-lucide] svg {
	width: 10px;
	height: 10px;
}

.bg-ref-card-foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: 6px;
	gap: 8px;
}

.bg-ref-card-time {
	font-size: 13px;
	color: #6b7280;
}

.bg-ref-card-action {
	font-size: 13px;
	font-weight: 500;
	text-decoration: none;
	border: none;
	background: none;
	font-family: inherit;
	padding: 0;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}

.bg-ref-card-action.link {
	color: #2563eb;
}

.bg-ref-card-action.link:active {
	color: #1d4ed8;
}

.bg-ref-card-action.muted {
	color: #9ca3af;
	cursor: default;
}

.bg-ref-empty {
	padding: 48px 24px;
	text-align: center;
	color: #9ca3af;
	font-size: 14px;
	line-height: 1.6;
}

.bg-ref-empty a {
	display: inline-block;
	margin-top: 12px;
	color: #2563eb;
	font-weight: 600;
	text-decoration: none;
}

.bg-ref-loading {
	padding: 32px;
	text-align: center;
	color: #9ca3af;
	font-size: 14px;
}