/* ==================== 解析平台管理后台 · 蓝色系主题 ==================== */
:root {
	--blue: #1B84F5;
	--blue-light: #4BA8FD;
	--blue-bg: #EAF3FF;
	--bg: #F5F7FB;
	--card: #FFFFFF;
	--border: #EDF0F5;
	--text: #1D2129;
	--text-2: #5C6470;
	--text-3: #86909C;
	--green: #12A15F;
	--red: #E23B3B;
	--orange: #FF8A3D;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
	font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
	background: var(--bg);
	color: var(--text);
	font-size: 14px;
	-webkit-font-smoothing: antialiased;
}
a { color: var(--blue); }
svg { display: block; }

/* ==================== 布局 ==================== */
.layout { display: flex; min-height: 100vh; }

.sidebar {
	width: 232px;
	background: #fff;
	border-right: 1px solid var(--border);
	display: flex;
	flex-direction: column;
	position: fixed;
	top: 0; left: 0; bottom: 0;
	z-index: 10;
}
.main {
	flex: 1;
	margin-left: 232px;
	min-width: 0;
	display: flex;
	flex-direction: column;
}
.content { padding: 22px 28px 44px; width: 100%; max-width: 1320px; }

/* 品牌 */
.brand { display: flex; align-items: center; gap: 12px; padding: 20px 20px 16px; }
.brand-logo {
	width: 40px; height: 40px; border-radius: 12px;
	background: linear-gradient(135deg, var(--blue-light), var(--blue));
	color: #fff; font-size: 19px; font-weight: 700;
	display: flex; align-items: center; justify-content: center;
	box-shadow: 0 8px 18px rgba(27, 132, 245, .28);
}
.brand-name { font-size: 15px; font-weight: 700; }
.brand-sub { font-size: 11px; color: var(--text-3); }

/* 菜单 */
.menu { padding: 8px 12px; flex: 1; }
.menu-item {
	display: flex; align-items: center; gap: 10px;
	height: 42px; padding: 0 12px; border-radius: 10px;
	color: var(--text-2); text-decoration: none; font-size: 13.5px;
	margin-bottom: 4px; transition: background .15s, color .15s;
}
.menu-item svg { width: 18px; height: 18px; flex-shrink: 0; }
.menu-item:hover { background: #F5F8FD; color: var(--blue); }
.menu-item.active { background: var(--blue-bg); color: var(--blue); font-weight: 600; }

/* 侧边栏底部 */
.sidebar-foot { padding: 14px 16px; border-top: 1px solid var(--border); }
.foot-user { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.foot-avatar {
	width: 34px; height: 34px; border-radius: 50%;
	background: var(--blue-bg); color: var(--blue);
	display: flex; align-items: center; justify-content: center;
	font-weight: 600; text-transform: uppercase;
}
.foot-name { font-size: 13px; font-weight: 600; }
.foot-role { font-size: 11px; color: var(--text-3); }
.foot-logout {
	display: block; text-align: center; font-size: 12.5px;
	color: var(--text-3); text-decoration: none;
	padding: 8px; border-radius: 8px; background: #F7F9FC;
	transition: all .15s;
}
.foot-logout:hover { color: var(--red); background: #FEECEC; }

/* 顶栏 */
.topbar {
	height: 64px; background: #fff; border-bottom: 1px solid var(--border);
	display: flex; align-items: center; justify-content: space-between;
	padding: 0 28px; position: sticky; top: 0; z-index: 5;
}
.page-title { font-size: 17px; font-weight: 700; }
.topbar-date { font-size: 12.5px; color: var(--text-3); }

/* ==================== 统计卡片 ==================== */
.stat-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 16px; margin-bottom: 16px;
}
@media (max-width: 1100px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 700px) { .stat-grid { grid-template-columns: 1fr; } }

.stat-card {
	background: #fff; border-radius: 14px; padding: 20px;
	display: flex; align-items: center; gap: 16px;
	border: 1px solid var(--border);
	transition: box-shadow .18s, transform .18s;
}
.stat-card:hover { box-shadow: 0 10px 26px rgba(27, 60, 120, .07); transform: translateY(-1px); }
.stat-icon {
	width: 46px; height: 46px; border-radius: 12px;
	display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.stat-icon svg { width: 22px; height: 22px; }
.si-blue { background: var(--blue-bg); color: var(--blue); }
.si-green { background: #E6F7EF; color: var(--green); }
.si-orange { background: #FFF3E8; color: var(--orange); }
.si-red { background: #FEECEC; color: var(--red); }
.stat-value { font-size: 24px; font-weight: 700; line-height: 1.2; }
.stat-label { font-size: 12px; color: var(--text-3); margin-top: 3px; }

/* ==================== 面板 ==================== */
.panel {
	background: #fff; border-radius: 14px; border: 1px solid var(--border);
	padding: 18px 20px; margin-bottom: 16px;
}
.panel-head {
	display: flex; align-items: center; justify-content: space-between;
	gap: 12px; flex-wrap: wrap; margin-bottom: 14px;
}
.panel-head h3 { font-size: 15px; font-weight: 600; }
.panel-link { font-size: 13px; text-decoration: none; }
.panel-link:hover { text-decoration: underline; }

/* 趋势图 */
.trend { display: flex; align-items: flex-end; gap: 16px; height: 210px; padding: 8px 4px 0; }
.trend-item { flex: 1; height: 100%; display: flex; flex-direction: column; align-items: center; }
.trend-count { font-size: 12px; color: var(--text-3); margin-bottom: 6px; }
.trend-bar-wrap { flex: 1; width: 100%; max-width: 46px; display: flex; align-items: flex-end; }
.trend-bar {
	width: 100%; min-height: 4px; border-radius: 8px 8px 4px 4px;
	background: linear-gradient(180deg, var(--blue-light), var(--blue));
	transition: height .3s ease;
}
.trend-label { font-size: 12px; color: var(--text-3); margin-top: 8px; }

/* ==================== 表格 ==================== */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th {
	text-align: left; font-size: 12px; color: var(--text-3); font-weight: 600;
	padding: 10px 12px; background: #F8FAFD; border-bottom: 1px solid var(--border);
	white-space: nowrap;
}
.table td {
	padding: 12px; border-bottom: 1px solid var(--border);
	vertical-align: middle; font-size: 13px; color: var(--text);
}
.table tbody tr:hover { background: #FAFCFF; }
.table tbody tr:last-child td { border-bottom: none; }
.table-empty { text-align: center; color: var(--text-3); padding: 40px 0 !important; }
.table-plain th { background: transparent; }
.td-mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; color: var(--text-2); }
.td-url {
	max-width: 340px; overflow: hidden; text-overflow: ellipsis;
	white-space: nowrap; color: var(--text-2);
}
.td-time { color: var(--text-3); font-size: 12px; white-space: nowrap; }
.td-strong { color: var(--blue); font-weight: 700; }
.td-limit { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; color: var(--text-2); }
.day-note {
	background: var(--blue-bg); color: #2B5FA8; font-size: 13px;
	border-radius: 10px; padding: 10px 14px; margin-bottom: 14px;
}
.err-tip {
	display: inline-flex; align-items: center; justify-content: center;
	width: 16px; height: 16px; border-radius: 50%; background: #FEECEC;
	color: var(--red); font-size: 11px; font-weight: 700; cursor: help;
}

/* 徽章 */
.badge { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: 12px; white-space: nowrap; }
.badge-green { background: #E6F7EF; color: var(--green); }
.badge-red { background: #FEECEC; color: var(--red); }
.badge-gray { background: #F0F1F3; color: var(--text-3); }

/* 用户单元格 */
.user-cell { display: flex; align-items: center; gap: 10px; }
.user-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: var(--blue-bg); flex-shrink: 0; }
.user-avatar--text {
	display: flex; align-items: center; justify-content: center;
	color: var(--blue); font-weight: 600; font-size: 15px;
}
.user-name { font-weight: 500; }
.user-time { font-size: 11px; color: var(--text-3); margin-top: 2px; }

/* ==================== 表单 ==================== */
.filter-form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.input {
	height: 34px; border: 1px solid var(--border); border-radius: 9px;
	padding: 0 12px; font-size: 13px; outline: none; background: #fff;
	color: var(--text); transition: border-color .15s, box-shadow .15s;
}
.input:focus { border-color: var(--blue-light); box-shadow: 0 0 0 3px rgba(75, 168, 253, .15); }
.select { padding-right: 8px; }
.input-block { width: 100%; }
.form-label { display: block; font-size: 12px; color: var(--text-3); margin: 12px 0 6px; }
.form-tip { font-size: 12px; color: var(--text-3); margin-top: 10px; line-height: 1.7; }

/* 按钮 */
.btn {
	display: inline-flex; align-items: center; justify-content: center;
	height: 34px; padding: 0 16px; border-radius: 9px; border: none;
	font-size: 13px; cursor: pointer; text-decoration: none;
	transition: filter .15s, border-color .15s, color .15s, background .15s;
	white-space: nowrap;
}
.btn-primary {
	background: linear-gradient(100deg, var(--blue-light), var(--blue));
	color: #fff; box-shadow: 0 6px 16px rgba(27, 132, 245, .25);
}
.btn-primary:hover { filter: brightness(1.06); }
.btn-ghost { background: #fff; border: 1px solid var(--border); color: var(--text-2); }
.btn-ghost:hover { border-color: #C9D8EE; color: var(--blue); }
.btn-danger-ghost { background: #fff; border: 1px solid #F9D5D5; color: var(--red); }
.btn-danger-ghost:hover { background: #FEECEC; }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { filter: brightness(1.08); }
.btn-success-ghost { background: #fff; border: 1px solid #C9EEDB; color: var(--green); }
.btn-success-ghost:hover { background: #E6F7EF; }
.btn-sm { height: 28px; padding: 0 10px; font-size: 12px; border-radius: 7px; }
.btn-block { width: 100%; margin-top: 14px; height: 40px; }

/* ==================== 分页 ==================== */
.pagination { display: flex; align-items: center; gap: 8px; padding: 16px 4px 4px; flex-wrap: wrap; }
.page-info { font-size: 12px; color: var(--text-3); margin-right: auto; }
.page-btn {
	min-width: 32px; height: 32px; display: inline-flex; align-items: center;
	justify-content: center; padding: 0 10px; border-radius: 8px;
	background: #fff; border: 1px solid var(--border);
	color: var(--text-2); text-decoration: none; font-size: 13px;
}
.page-btn:hover { border-color: #C9D8EE; color: var(--blue); }
.page-btn.active { background: var(--blue); border-color: var(--blue); color: #fff; }

/* ==================== 弹窗 ==================== */
.modal { position: fixed; inset: 0; z-index: 100; overflow-y: auto; }
.modal-mask { position: fixed; inset: 0; background: rgba(15, 20, 32, .45); animation: fadeIn .18s ease; }
.modal-card {
	position: relative; background: #fff; border-radius: 16px;
	width: 480px; max-width: calc(100vw - 40px);
	margin: 60px auto 40px; box-shadow: 0 24px 60px rgba(10, 16, 28, .25);
	animation: popIn .24s cubic-bezier(.2, 1.1, .35, 1.15);
	display: flex; flex-direction: column;
}
.modal-card--lg { width: 780px; }
.modal-head {
	display: flex; align-items: center; justify-content: space-between;
	padding: 18px 22px; border-bottom: 1px solid var(--border);
	font-weight: 600; font-size: 16px;
}
.modal-close {
	border: none; background: var(--bg); width: 30px; height: 30px;
	border-radius: 50%; font-size: 18px; line-height: 1;
	color: var(--text-3); cursor: pointer;
}
.modal-close:hover { background: #FEECEC; color: var(--red); }
.modal-body { padding: 20px 22px; overflow-y: auto; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn { from { transform: scale(.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* 用户详情弹窗内容 */
.ud-head { display: flex; align-items: center; gap: 14px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.ud-head .user-avatar { width: 52px; height: 52px; font-size: 20px; }
.ud-name { font-size: 16px; font-weight: 600; }
.ud-sub { font-size: 12px; color: var(--text-3); margin-top: 3px; }
.ud-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 16px 0; }
.ud-stat { background: var(--bg); border-radius: 10px; padding: 12px 8px; text-align: center; }
.ud-stat b { display: block; font-size: 20px; color: var(--blue); }
.ud-stat span { font-size: 12px; color: var(--text-3); }
.ud-limits { background: #F8FAFD; border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; margin-bottom: 16px; }
.ud-limits-title { font-size: 13px; font-weight: 600; margin-bottom: 10px; }
.limit-row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.limit-item { flex: 1; min-width: 110px; }
.limit-item label { display: block; font-size: 12px; color: var(--text-3); margin-bottom: 6px; }
.ud-records-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; gap: 10px; flex-wrap: wrap; }
.ud-records-head .title { font-size: 13px; font-weight: 600; }
.ud-empty { text-align: center; color: var(--text-3); padding: 26px 0; font-size: 13px; }

/* ==================== 提示 / 代码块 / 文档 ==================== */
.notice {
	background: var(--blue-bg); border: 1px solid #D6E8FF; color: #2B5FA8;
	border-radius: 10px; padding: 12px 14px; font-size: 13px;
	margin-bottom: 14px; line-height: 1.7;
}
.notice-warn { background: #FFF7E8; border-color: #FFE7BC; color: #A66A00; }
.code {
	background: #F7F9FC; border: 1px solid var(--border); border-radius: 10px;
	padding: 14px 16px; font-family: ui-monospace, Menlo, Consolas, monospace;
	font-size: 12.5px; line-height: 1.75; overflow-x: auto;
	color: #2B3340; margin: 10px 0; white-space: pre;
}
.doc-body h4 { margin: 22px 0 8px; font-size: 14px; }
.doc-body h4:first-child { margin-top: 0; }
.doc-body p { color: var(--text-2); line-height: 1.8; margin: 6px 0; }
.doc-body code, .notice code {
	background: #F0F4FA; padding: 1px 6px; border-radius: 6px;
	font-size: 12.5px; color: #2B5FA8;
	font-family: ui-monospace, Menlo, Consolas, monospace;
}
.doc-list { padding-left: 20px; color: var(--text-2); line-height: 2; font-size: 13px; }

/* 复制行 */
.copy-row { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }

/* ==================== 全局提示 / 加载 ==================== */
.toast {
	position: fixed; top: 24px; left: 50%; transform: translateX(-50%);
	background: rgba(45, 50, 60, .92); color: #fff;
	padding: 10px 20px; border-radius: 10px; font-size: 13px;
	z-index: 999; box-shadow: 0 12px 30px rgba(10, 16, 28, .25);
	animation: toastIn .22s ease; max-width: 80vw; text-align: center;
}
.toast.toast-error { background: rgba(224, 60, 60, .95); }
@keyframes toastIn {
	from { opacity: 0; transform: translate(-50%, -12px); }
	to { opacity: 1; transform: translate(-50%, 0); }
}
.loading { text-align: center; color: var(--text-3); padding: 36px 0; font-size: 13px; }

/* ==================== 登录页 ==================== */
.login-body {
	display: flex; align-items: center; justify-content: center;
	min-height: 100vh;
	background: linear-gradient(160deg, #EAF3FF 0%, #F5F7FB 55%);
}
.login-card {
	width: 380px; max-width: calc(100vw - 40px);
	background: #fff; border-radius: 20px; padding: 40px 36px 30px;
	box-shadow: 0 24px 60px rgba(27, 60, 120, .12);
}
.login-logo {
	width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 16px;
	background: linear-gradient(135deg, var(--blue-light), var(--blue));
	color: #fff; font-size: 26px; font-weight: 700;
	display: flex; align-items: center; justify-content: center;
	box-shadow: 0 10px 24px rgba(27, 132, 245, .3);
}
.login-title { font-size: 19px; text-align: center; margin-bottom: 6px; }
.login-sub { font-size: 13px; color: var(--text-3); text-align: center; margin-bottom: 20px; }
.login-error {
	background: #FEECEC; color: var(--red); font-size: 13px;
	padding: 10px 12px; border-radius: 9px; margin-bottom: 8px; text-align: center;
}
.login-label { display: block; font-size: 12px; color: var(--text-3); margin: 14px 0 6px; }
.login-input {
	width: 100%; height: 42px; border: 1px solid var(--border); border-radius: 10px;
	padding: 0 14px; font-size: 14px; outline: none; transition: border-color .15s, box-shadow .15s;
}
.login-input:focus { border-color: var(--blue-light); box-shadow: 0 0 0 3px rgba(75, 168, 253, .15); }
.login-btn {
	width: 100%; height: 44px; margin-top: 22px; border: none; border-radius: 11px;
	background: linear-gradient(100deg, var(--blue-light), var(--blue));
	color: #fff; font-size: 15px; font-weight: 600; cursor: pointer;
	box-shadow: 0 10px 24px rgba(27, 132, 245, .28);
}
.login-btn:hover { filter: brightness(1.06); }
.login-tip { font-size: 12px; color: var(--text-3); margin-top: 18px; text-align: center; line-height: 1.7; }
