* { box-sizing: border-box; }

body {
	margin: 0;
	font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
	color: #24324a;
	background: #f4f7fb;
	font-size: 14px;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

/* ---------- 登录页 ---------- */
.login-body {
	min-height: 100vh;
	background: radial-gradient(circle at 12% 12%, #dbeafe 0, transparent 34%), radial-gradient(circle at 88% 4%, #dcfce7 0, transparent 30%), #f3f6fb;
}

.login-wrap {
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
}

.login-card {
	width: 400px;
	max-width: 100%;
	background: #fff;
	border-radius: 18px;
	padding: 38px 36px 26px;
	box-shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
}

.login-brand {
	text-align: center;
	margin-bottom: 26px;
}

.brand-mark {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	border-radius: 15px;
	background: linear-gradient(135deg, #2563eb, #0ea5e9);
	color: #fff;
	font-size: 25px;
	font-weight: 700;
	box-shadow: 0 10px 24px rgba(37, 99, 235, 0.3);
}

.login-brand h1 {
	margin: 14px 0 4px;
	font-size: 20px;
}

.login-brand p {
	margin: 0;
	font-size: 13px;
	color: #8a97ad;
}

.login-field { margin-bottom: 18px; }

.login-field label {
	display: block;
	font-size: 13px;
	color: #4b5a73;
	margin-bottom: 7px;
}

.login-field input {
	width: 100%;
	height: 44px;
	padding: 0 14px;
	border: 1px solid #dfe5ef;
	border-radius: 10px;
	background: #fbfcfe;
	font-size: 14px;
	outline: none;
	transition: border-color 0.2s, box-shadow 0.2s;
}

.login-field input:focus {
	border-color: #2563eb;
	background: #fff;
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.login-btn {
	width: 100%;
	height: 44px;
	margin-top: 6px;
	border: 0;
	border-radius: 10px;
	background: linear-gradient(135deg, #2563eb, #0ea5e9);
	color: #fff;
	font-size: 15px;
	letter-spacing: 4px;
	cursor: pointer;
	box-shadow: 0 10px 22px rgba(37, 99, 235, 0.28);
	transition: all 0.2s;
}

.login-btn:hover { transform: translateY(-1px); box-shadow: 0 12px 26px rgba(37, 99, 235, 0.34); }
.login-btn:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }

.login-foot {
	margin-top: 22px;
	text-align: center;
	font-size: 12px;
	color: #a3aec1;
}

/* ---------- 后台布局 ---------- */
.admin-layout {
	display: flex;
	min-height: 100vh;
}

.sidebar {
	width: 220px;
	flex: 0 0 220px;
	background: #fff;
	border-right: 1px solid #eaeef6;
	display: flex;
	flex-direction: column;
	position: sticky;
	top: 0;
	height: 100vh;
}

.sidebar-brand {
	display: flex;
	align-items: center;
	gap: 11px;
	padding: 20px 18px;
	border-bottom: 1px solid #f1f4fa;
}

.sidebar-brand .brand-mark {
	width: 38px;
	height: 38px;
	border-radius: 11px;
	font-size: 19px;
	box-shadow: 0 6px 14px rgba(37, 99, 235, 0.25);
}

.sidebar-brand strong {
	display: block;
	font-size: 14px;
	line-height: 1.3;
}

.sidebar-brand small {
	display: block;
	margin-top: 3px;
	font-size: 11px;
	color: #98a5bb;
}

.sidebar-nav {
	flex: 1;
	padding: 14px 12px;
	overflow: auto;
}

.menu-group {
	padding: 12px 10px 8px;
	font-size: 11px;
	color: #a3aec1;
	letter-spacing: 1px;
}

.menu-item {
	display: block;
	padding: 10px 12px;
	margin-bottom: 4px;
	border-radius: 9px;
	color: #46546c;
	font-size: 14px;
	transition: all 0.18s;
}

.menu-item:hover { background: #f3f6fc; color: #2563eb; }
.menu-item.active { background: #eaf1ff; color: #2563eb; font-weight: 600; }

.sidebar-foot {
	padding: 14px 18px;
	font-size: 11px;
	color: #adb7c8;
	border-top: 1px solid #f1f4fa;
}

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

.topbar {
	height: 60px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 26px;
	background: #fff;
	border-bottom: 1px solid #eaeef6;
	position: sticky;
	top: 0;
	z-index: 10;
}

.topbar-title { font-size: 16px; font-weight: 600; }

.topbar-user {
	display: flex;
	align-items: center;
	gap: 16px;
	font-size: 13px;
	color: #5b6b85;
}

.btn-link {
	border: 0;
	background: none;
	color: #8a97ad;
	font-size: 13px;
	cursor: pointer;
	padding: 4px;
}

.btn-link:hover { color: #2563eb; }

.content {
	padding: 24px 26px 40px;
}

/* ---------- 卡片与统计 ---------- */
.stat-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 18px;
	margin-bottom: 20px;
}

.stat-card {
	background: #fff;
	border-radius: 14px;
	padding: 20px 22px;
	box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
}

.stat-label { font-size: 13px; color: #8a97ad; }

.stat-value {
	margin: 10px 0 8px;
	font-size: 30px;
	font-weight: 700;
	color: #1f2a3d;
}

.stat-value.success { color: #16a34a; }
.stat-value.warning { color: #d97706; }

.stat-hint { font-size: 12px; color: #a3aec1; }

.card {
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
	margin-bottom: 20px;
	overflow: hidden;
}

.card-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 17px 22px;
	border-bottom: 1px solid #f1f4fa;
}

.card-head h3 {
	margin: 0;
	font-size: 15px;
}

.card-body { padding: 18px 22px; }
.card-body.no-pad { padding: 0; }

.info-list { display: grid; gap: 2px; }

.info-row {
	display: flex;
	justify-content: space-between;
	gap: 20px;
	padding: 10px 0;
	border-bottom: 1px dashed #f0f3f9;
	font-size: 13px;
}

.info-row:last-child { border-bottom: 0; }
.info-row span { color: #8a97ad; }
.info-row strong { color: #33415c; font-weight: 600; word-break: break-all; text-align: right; }

.quick-links {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px;
}

.quick-link {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 16px 18px;
	border: 1px solid #edf1f8;
	border-radius: 12px;
	transition: all 0.2s;
}

.quick-link:hover { border-color: #c9dbff; background: #f8fbff; }

.quick-icon {
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 10px;
	background: #eaf1ff;
	color: #2563eb;
	font-size: 20px;
	font-weight: 600;
}

.quick-link strong { display: block; font-size: 14px; }
.quick-link small { display: block; margin-top: 3px; font-size: 12px; color: #98a5bb; }

/* ---------- 表格 ---------- */
.table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
}

.table th {
	text-align: left;
	padding: 13px 18px;
	background: #f8fafd;
	color: #7b8aa3;
	font-size: 12px;
	font-weight: 600;
	white-space: nowrap;
}

.table td {
	padding: 14px 18px;
	border-bottom: 1px solid #f2f5fa;
	vertical-align: middle;
}

.table tbody tr:hover { background: #fbfcff; }
.table tbody tr:last-child td { border-bottom: 0; }

.addon-title { font-weight: 600; color: #2b3a52; }
.addon-desc { margin-top: 4px; font-size: 12px; color: #98a5bb; max-width: 380px; }

.muted { color: #98a5bb; }
.text-right { text-align: right; }
.empty { text-align: center; color: #a3aec1; padding: 40px 0 !important; }

.tag {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 20px;
	background: #eef1f6;
	color: #7b8aa3;
	font-size: 12px;
	line-height: 1.5;
}

.tag.success { background: #dcfce7; color: #15803d; }
.tag.warning { background: #fef3c7; color: #b45309; }

/* ---------- 按钮 ---------- */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 38px;
	padding: 0 20px;
	border: 0;
	border-radius: 9px;
	font-size: 13px;
	cursor: pointer;
	transition: all 0.18s;
	background: #f2f5fa;
	color: #46546c;
}

.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: 0.65; cursor: not-allowed; transform: none; }

.btn-sm { height: 30px; padding: 0 13px; font-size: 12px; border-radius: 8px; }

.btn-primary {
	background: linear-gradient(135deg, #2563eb, #0ea5e9);
	color: #fff;
	box-shadow: 0 5px 12px rgba(37, 99, 235, 0.22);
}

.btn-danger { background: #fee2e2; color: #b91c1c; }
.btn-warning { background: #fef3c7; color: #b45309; }
.btn-ghost { background: #f2f5fa; color: #46546c; }

.detail-box { padding: 18px 22px; }
.detail-box .info-row { border-bottom: 1px dashed #f0f3f9; }

/* ---------- 系统设置 ---------- */
.tab-nav {
	display: flex;
	gap: 6px;
	padding-bottom: 16px;
	border-bottom: 1px solid #f1f4fa;
	margin-bottom: 22px;
	flex-wrap: wrap;
}

.tab-item {
	height: 36px;
	padding: 0 18px;
	border: 0;
	border-radius: 9px;
	background: transparent;
	color: #5b6b85;
	font-size: 13px;
	cursor: pointer;
	transition: all 0.18s;
}

.tab-item:hover { background: #f3f6fc; color: #2563eb; }
.tab-item.active { background: #eaf1ff; color: #2563eb; font-weight: 600; }

.tab-panel { display: none; }
.tab-panel.active { display: block; animation: settingsFade 0.2s ease; }

@keyframes settingsFade {
	from { opacity: 0; transform: translateY(4px); }
	to { opacity: 1; transform: translateY(0); }
}

.form-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 20px 24px;
	max-width: 900px;
}

.form-item-full { grid-column: 1 / -1; }

.form-item label {
	display: block;
	margin-bottom: 8px;
	font-size: 13px;
	color: #4b5a73;
}

.form-item label em {
	color: #dc2626;
	font-style: normal;
	margin-left: 2px;
}

.form-item input[type="text"],
.form-item input[type="password"],
.form-item select,
.form-item textarea {
	width: 100%;
	padding: 0 13px;
	border: 1px solid #dfe5ef;
	border-radius: 10px;
	background: #fbfcfe;
	font-size: 14px;
	color: #24324a;
	outline: none;
	transition: border-color 0.2s, box-shadow 0.2s;
	font-family: inherit;
}

.form-item input[type="text"],
.form-item input[type="password"],
.form-item select { height: 42px; }

.form-item textarea {
	padding: 11px 13px;
	line-height: 1.7;
	resize: vertical;
}

.form-item input:focus,
.form-item select:focus,
.form-item textarea:focus {
	border-color: #2563eb;
	background: #fff;
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.logo-upload {
	display: flex;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
}

.logo-preview {
	width: 150px;
	height: 64px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px dashed #dfe5ef;
	border-radius: 10px;
	background: #fbfcfe;
	overflow: hidden;
}

.logo-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.logo-empty { font-size: 12px; color: #a3aec1; }
.logo-btns { display: flex; gap: 8px; }

.settings-actions {
	margin-top: 28px;
	padding-top: 20px;
	border-top: 1px solid #f1f4fa;
}

.secret-row {
	display: flex;
	gap: 8px;
	align-items: center;
}

.secret-row input { flex: 1; }

.form-tip {
	margin: 0;
	font-size: 12px;
	line-height: 1.8;
	color: #98a5bb;
}

.maintain-box {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	margin-top: 26px;
	padding: 18px 20px;
	border: 1px solid #f1f4fa;
	border-radius: 12px;
	background: #fbfcfe;
}

.maintain-box strong { display: block; margin-bottom: 6px; font-size: 14px; }

/* ---------- 应用中心 ---------- */
.market-core {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	padding: 20px 22px;
	margin-bottom: 22px;
	border-radius: 12px;
	background: linear-gradient(135deg, #eef4ff, #f5fbff);
	border: 1px solid #e2ecff;
}

.market-core .stat-value { margin: 8px 0 6px; }
.market-core-actions { display: flex; gap: 10px; }

.market-subtitle {
	margin: 22px 0 12px;
	font-size: 14px;
	font-weight: 600;
	color: #33415c;
}

.market-empty {
	padding: 40px 20px;
	text-align: center;
	color: #7b8aa3;
}

.market-empty p { margin: 0 0 16px; }
.version-row td { background: #fbfcfe; }

@media (max-width: 820px) {
	.form-grid { grid-template-columns: 1fr; }
}


@media (max-width: 1100px) {
	.stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
	.sidebar { width: 180px; flex-basis: 180px; }
	.content { padding: 18px 16px 30px; }
	.topbar { padding: 0 16px; }
	.quick-links { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
	.sidebar { display: none; }
	.stat-grid { grid-template-columns: 1fr; }
	.table th:nth-child(3), .table td:nth-child(3), .table th:nth-child(5), .table td:nth-child(5) { display: none; }
}
