/* ==========================================================================
   BK 小工具卡片（「外观 → 小工具」里可自由配置的功能卡片）
   视觉与站点既有卡片保持一致：白底 / 12px 圆角 / 1px #e8f0ff 描边
   ========================================================================== */

.bk-sidebar-widget,
.bk-widget-card {
	background: #fff;
	border-radius: 12px;
	padding: 16px;
	position: relative;
	overflow: hidden;
	border: 1px solid #e8f0ff;
	box-sizing: border-box;
	transition: box-shadow 0.3s ease;
}

.bk-sidebar-widget:hover,
.bk-widget-card:hover {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* 第三方小工具（最近文章、归档、日历等）的标题沿用主题卡片标题样式 */
.bk-sidebar-widget .tags-title,
.bk-sidebar-widget .widget-title {
	font-size: 1rem;
	font-weight: 600;
	color: #4a6cf7;
	margin: 0 0 10px 0;
	display: flex;
	align-items: center;
	gap: 8px;
}

.bk-sidebar-widget .widget-title::before {
	content: '';
	width: 4px;
	height: 16px;
	background: linear-gradient(180deg, #7BA3FF 0%, #4a6cf7 100%);
	border-radius: 2px;
}

.bk-sidebar-widget ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.bk-sidebar-widget ul li {
	padding: 6px 0;
	font-size: 0.85rem;
	line-height: 1.6;
}

.bk-sidebar-widget ul li a {
	color: #475569;
	text-decoration: none;
}

.bk-sidebar-widget ul li a:hover {
	color: #4a6cf7;
}

.bk-widget-empty {
	font-size: 0.83rem;
	color: #94a3b8;
	margin: 0;
}

/* ========== 站内搜索 ========== */
.bk-widget-search-form {
	display: flex;
	gap: 8px;
}

.bk-widget-search-input {
	flex: 1;
	min-width: 0;
	height: 38px;
	padding: 0 12px;
	border: 1px solid #e8f0ff;
	border-radius: 8px;
	background: #f8faff;
	color: #334155;
	font-size: 0.85rem;
}

.bk-widget-search-input:focus {
	outline: none;
	border-color: #4a6cf7;
	background: #fff;
}

.bk-widget-search-btn {
	flex: 0 0 42px;
	height: 38px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: none;
	border-radius: 8px;
	background: #4a6cf7;
	color: #fff;
	cursor: pointer;
	transition: background 0.2s ease;
}

.bk-widget-search-btn:hover {
	background: #3b5bdb;
}

/* ========== 快捷入口 ========== */
.bk-quick-links {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 6px;
}

.bk-quick-link {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 9px 10px;
	border-radius: 8px;
	background: #f8faff;
	color: #475569;
	text-decoration: none;
	font-size: 0.82rem;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	transition: all 0.2s ease;
}

.bk-quick-link svg {
	flex: 0 0 16px;
}

.bk-quick-link:hover {
	background: #eef3ff;
	color: #4a6cf7;
	transform: translateX(2px);
}

/* ========== 站点统计 ========== */
.bk-site-stats {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 10px;
}

.bk-site-stat {
	text-align: center;
	padding: 10px 4px;
	background: #f8faff;
	border-radius: 8px;
}

.bk-site-stat-value {
	display: block;
	font-size: 1.1rem;
	font-weight: 700;
	color: #4a6cf7;
}

.bk-site-stat-label {
	display: block;
	font-size: 0.72rem;
	color: #94a3b8;
	margin-top: 2px;
}

/* ========== 最新评论 ========== */
.bk-recent-comment + .bk-recent-comment {
	border-top: 1px solid #f1f5f9;
}

.bk-recent-comment-link {
	display: flex;
	gap: 10px;
	padding: 10px 0;
	text-decoration: none;
}

.bk-recent-comment-avatar img {
	border-radius: 50%;
	display: block;
}

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

.bk-recent-comment-name {
	font-size: 0.8rem;
	font-weight: 600;
	color: #334155;
}

.bk-recent-comment-text {
	font-size: 0.78rem;
	color: #64748b;
	line-height: 1.5;
}

.bk-recent-comment-post {
	font-size: 0.72rem;
	color: #94a3b8;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.bk-recent-comment-link:hover .bk-recent-comment-name {
	color: #4a6cf7;
}

/* ========== 登录 / 用户入口 ========== */
.bk-login-desc {
	font-size: 0.83rem;
	color: #64748b;
	margin: 0 0 12px;
	line-height: 1.6;
}

.bk-login-btn {
	width: 100%;
	height: 38px;
	border: none;
	border-radius: 8px;
	background: #4a6cf7;
	color: #fff;
	font-size: 0.88rem;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s ease;
}

.bk-login-btn:hover {
	background: #3b5bdb;
}

.bk-login-user {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 12px;
}

.bk-login-avatar img {
	border-radius: 50%;
	display: block;
}

.bk-login-meta {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.bk-login-name {
	font-size: 0.9rem;
	font-weight: 600;
	color: #334155;
}

.bk-login-sub {
	font-size: 0.72rem;
	color: #94a3b8;
	overflow: hidden;
	text-overflow: ellipsis;
}

.bk-login-actions {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.bk-login-action {
	padding: 8px 12px;
	border-radius: 8px;
	background: #f8faff;
	color: #475569;
	font-size: 0.83rem;
	text-decoration: none;
	transition: all 0.2s ease;
}

.bk-login-action:hover {
	background: #eef3ff;
	color: #4a6cf7;
}

.bk-login-action--out {
	color: #ef4444;
}

.bk-login-action--out:hover {
	background: #fef2f2;
	color: #dc2626;
}

/* ========== 小屏 ========== */
@media (max-width: 1024px) {
	.bk-sidebar-widget,
	.bk-widget-card {
		width: 100%;
	}
}
