* { margin: 0; padding: 0; box-sizing: border-box; }
body {
	font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
	background: #f5f7fb; color: #1c2434; font-size: 14px;
}
input, textarea, select, button { font-family: inherit; outline: none; }

/* ---------- 登录页 ---------- */
.lg-wrap {
	min-height: 100vh; display: flex; align-items: center; justify-content: center;
	background: linear-gradient(150deg, #6BA8FF 0%, #3D7BFF 40%, #2F5BEA 75%, #2744C8 100%);
	padding: 24px;
}
.lg-card {
	width: 420px; max-width: 100%; background: #fff; border-radius: 24px;
	padding: 44px 40px 36px; box-shadow: 0 30px 80px rgba(16, 36, 96, 0.35);
	text-align: center;
}
.lg-logo {
	width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 20px;
	background: linear-gradient(135deg, #4c8dff, #7a5cf0); color: #fff;
	font-size: 32px; font-weight: 800; line-height: 64px;
}
.lg-title { font-size: 24px; font-weight: 800; }
.lg-sub { color: #98a1b3; margin: 8px 0 28px; font-size: 13px; }
.lg-field { text-align: left; margin-bottom: 18px; }
.lg-field label { display: block; font-size: 13px; color: #5f6c84; margin-bottom: 8px; font-weight: 600; }
.lg-field input {
	width: 100%; height: 46px; border-radius: 12px; border: 1px solid #dbe3f2;
	padding: 0 16px; font-size: 15px; background: #f7f9fd;
}
.lg-field input:focus { border-color: #3e7bff; background: #fff; }
.lg-btn {
	width: 100%; height: 48px; border: none; border-radius: 24px; margin-top: 8px;
	background: linear-gradient(135deg, #4c8dff, #2f63f2); color: #fff; font-size: 16px;
	font-weight: 700; cursor: pointer; box-shadow: 0 12px 24px rgba(62, 123, 255, 0.35);
}
.lg-btn:disabled { opacity: .6; cursor: not-allowed; }
.lg-tip { margin-top: 14px; color: #e5484d; min-height: 20px; font-size: 13px; }

/* ---------- 后台布局 ---------- */
.ad-root { display: flex; min-height: 100vh; }
.ad-side {
	width: 220px; background: linear-gradient(180deg, #2744C8 0%, #2F5BEA 100%);
	color: #fff; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.ad-brand { display: flex; align-items: center; gap: 12px; padding: 24px 20px 20px; }
.ad-brand-logo {
	width: 40px; height: 40px; border-radius: 14px; background: rgba(255,255,255,.18);
	font-size: 20px; font-weight: 800; display: flex; align-items: center; justify-content: center;
}
.ad-brand-name { font-size: 16px; font-weight: 700; }
.ad-brand-domain { font-size: 11px; opacity: .7; margin-top: 2px; }
.ad-nav { padding: 12px; flex: 1; }
.ad-nav-item {
	display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-radius: 12px;
	margin-bottom: 6px; cursor: pointer; color: rgba(255,255,255,.85); transition: all .2s;
}
.ad-nav-item:hover { background: rgba(255,255,255,.08); }
.ad-nav-item.on { background: rgba(255,255,255,.2); color: #fff; font-weight: 700; }
.ad-nav-ico { width: 18px; height: 18px; text-align: center; }
.ad-foot { padding: 16px 20px; border-top: 1px solid rgba(255,255,255,.15); }
.ad-exit { color: rgba(255,255,255,.85); cursor: pointer; font-size: 13px; }
.ad-main { flex: 1; padding: 26px 30px; min-width: 0; }
.ad-topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.ad-topbar h2 { font-size: 22px; font-weight: 800; }
.ad-topbar .ad-count { color: #98a1b3; font-size: 13px; margin-left: 10px; }
.ad-card {
	background: #fff; border-radius: 18px; padding: 20px; box-shadow: 0 8px 26px rgba(23,43,99,.06);
}
.ad-toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.ad-search {
	height: 38px; width: 240px; border: 1px solid #dbe3f2; border-radius: 10px; padding: 0 14px; font-size: 13px;
}
.ad-btn {
	height: 38px; padding: 0 18px; border: none; border-radius: 10px; cursor: pointer;
	background: linear-gradient(135deg, #4c8dff, #2f63f2); color: #fff; font-weight: 600; font-size: 13px;
}
.ad-btn.ghost { background: #eef1f7; color: #5f6c84; }
.ad-btn.danger { background: #fdecec; color: #e5484d; }
.ad-btn.sm { height: 30px; padding: 0 12px; font-size: 12px; border-radius: 8px; }

/* 表格 */
.ad-table { width: 100%; border-collapse: collapse; }
.ad-table th, .ad-table td {
	text-align: left; padding: 12px 14px; font-size: 13px; border-bottom: 1px solid #eef1f7;
}
.ad-table th { color: #98a1b3; font-weight: 600; font-size: 12px; background: #fafbfe; }
.ad-table tr:hover td { background: #f7faff; }
.ad-uid { color: #3e7bff; font-weight: 700; }
.ad-empty { text-align: center; color: #b3bccd; padding: 50px 0; font-size: 14px; }

/* 弹层 */
.ad-mask { position: fixed; inset: 0; background: rgba(20,28,48,.5); z-index: 50; }
.ad-modal {
	position: fixed; left: 50%; top: 50%; transform: translate(-50%,-50%); background: #fff;
	border-radius: 20px; width: 560px; max-width: calc(100vw - 40px); max-height: 84vh;
	display: flex; flex-direction: column; z-index: 51; box-shadow: 0 30px 80px rgba(23,43,99,.3);
}
.ad-modal-head {
	display: flex; align-items: center; justify-content: space-between; padding: 20px 24px;
	border-bottom: 1px solid #eef1f7;
}
.ad-modal-title { font-size: 17px; font-weight: 800; }
.ad-modal-x { cursor: pointer; color: #98a1b3; font-size: 20px; }
.ad-modal-body { padding: 20px 24px; overflow: auto; }
.ad-modal-foot { padding: 16px 24px 22px; border-top: 1px solid #eef1f7; display: flex; justify-content: flex-end; gap: 10px; }

/* 详情 */
.ad-detail-avatar { width: 90px; height: 90px; border-radius: 50%; overflow: hidden; background: #eef3ff; }
.ad-detail-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ad-detail-rows { display: flex; flex-direction: column; gap: 12px; margin-top: 18px; }
.ad-detail-row { display: flex; gap: 14px; }
.ad-detail-row .k { width: 90px; color: #98a1b3; flex-shrink: 0; }
.ad-detail-row .v { color: #2a3346; word-break: break-all; }

/* AI 供应商卡片 */
.ad-prov { border: 1px solid #eef1f7; border-radius: 14px; padding: 16px 18px; margin-bottom: 14px; background: #fafbfe; }
.ad-prov-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.ad-prov-name { font-weight: 700; }
.ad-prov-tag { font-size: 11px; color: #3e7bff; background: #e7efff; padding: 3px 10px; border-radius: 8px; }
.ad-prov-row { display: flex; flex-direction: column; margin-bottom: 10px; }
.ad-prov-row label { font-size: 12px; color: #98a1b3; margin-bottom: 5px; }
.ad-prov-row input {
	height: 38px; border: 1px solid #dbe3f2; border-radius: 10px; padding: 0 12px; font-size: 13px; width: 100%;
}
.ad-prov-row input:focus { border-color: #3e7bff; }

/* 对话记录 */
.ad-chat-item {
	border: 1px solid #eef1f7; border-radius: 14px; padding: 14px 16px; margin-bottom: 12px; background: #fff;
}
.ad-chat-meta { display: flex; gap: 16px; color: #98a1b3; font-size: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.ad-chat-meta b { color: #3e7bff; }
.ad-chat-q { color: #1c2434; white-space: pre-wrap; }
.ad-chat-a { color: #5f6c84; white-space: pre-wrap; margin-top: 6px; border-top: 1px dashed #eef1f7; padding-top: 8px; }
.ad-chat-snippet { max-height: 130px; overflow: hidden; position: relative; }
.ad-chat-expand { color: #3e7bff; cursor: pointer; margin-top: 4px; font-size: 12px; }
.hide { display: none !important; }
.toast {
	position: fixed; top: 30px; left: 50%; transform: translateX(-50%);
	background: rgba(28,36,52,.9); color: #fff; padding: 10px 22px; border-radius: 12px; z-index: 99; font-size: 13px;
}
