:root {
	--bg: #f4f6fa;
	--surface: #ffffff;
	--surface-2: #f7f9fc;
	--text: #111827;
	--muted: #6b7280;
	--border: #e5e7eb;
	--primary: #007aff;
	--primary-soft: #e8f2ff;
	--danger: #ff3b30;
	--danger-soft: #ffecec;
	--success: #1f9d55;
	--warning: #ff9500;
	--shadow: 0 10px 30px rgba(17, 24, 39, 0.06);
	--radius: 16px;
}

@media (prefers-color-scheme: dark) {
	:root {
		--bg: #0b0f14;
		--surface: #151b23;
		--surface-2: #1b232d;
		--text: #f3f4f6;
		--muted: #98a2b3;
		--border: #2a3440;
		--primary: #0a84ff;
		--primary-soft: rgba(10, 132, 255, 0.16);
		--danger: #ff453a;
		--danger-soft: rgba(255, 69, 58, 0.14);
		--success: #30d158;
		--warning: #ffa94d;
		--shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
	}
}

* {
	box-sizing: border-box;
}

html,
body {
	margin: 0;
	padding: 0;
}

body {
	min-height: 100vh;
	background: var(--bg);
	color: var(--text);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
	-webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
	font: inherit;
	color: inherit;
}

.hidden {
	display: none !important;
}

.app {
	max-width: 1120px;
	margin: 0 auto;
	padding: 20px 24px 64px;
}

.login-view {
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background: linear-gradient(160deg, rgba(0, 122, 255, 0.1), transparent 45%), var(--bg);
}

.login-card {
	width: 100%;
	max-width: 420px;
	padding: 32px;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 22px;
	box-shadow: var(--shadow);
}

.login-brand {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 28px;
}

.login-card h1 {
	margin: 0 0 8px;
	font-size: 26px;
}

.login-sub {
	margin: 0 0 24px;
	font-size: 14px;
	line-height: 1.6;
	color: var(--muted);
}

.btn-block {
	width: 100%;
	padding: 12px 16px;
	font-size: 15px;
}

.session-user {
	max-width: 220px;
	overflow: hidden;
	font-size: 13px;
	color: var(--muted);
	text-overflow: ellipsis;
	white-space: nowrap;
}

.app-header {
	position: sticky;
	top: 12px;
	z-index: 20;
	display: flex;
	align-items: center;
	gap: 20px;
	padding: 14px 18px;
	margin-bottom: 26px;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 18px;
	box-shadow: var(--shadow);
}

.brand {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-shrink: 0;
}

.brand-mark {
	width: 40px;
	height: 40px;
	border-radius: 12px;
	background: linear-gradient(135deg, #007aff 0%, #0056d1 100%);
	color: #ffffff;
	font-size: 20px;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
}

.brand-text {
	display: flex;
	flex-direction: column;
	line-height: 1.2;
}

.brand-text strong {
	font-size: 16px;
}

.brand-text span {
	font-size: 10px;
	letter-spacing: 0.12em;
	color: var(--muted);
}

.nav {
	display: flex;
	gap: 6px;
	padding: 5px;
	background: var(--surface-2);
	border-radius: 12px;
}

.nav-btn {
	border: none;
	background: transparent;
	border-radius: 9px;
	padding: 8px 18px;
	font-size: 14px;
	color: var(--muted);
	cursor: pointer;
	transition: all 0.18s ease;
	white-space: nowrap;
}

.nav-btn:hover {
	color: var(--text);
}

.nav-btn.active {
	background: var(--surface);
	color: var(--primary);
	font-weight: 600;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.header-actions {
	margin-left: auto;
	display: flex;
	gap: 8px;
}

.main {
	display: block;
}

.page-head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 16px;
	padding: 0 4px 18px;
}

.page-head h1 {
	margin: 0;
	font-size: 26px;
	letter-spacing: -0.01em;
}

.page-sub {
	margin: 6px 0 0;
	font-size: 14px;
	color: var(--muted);
}

.page-stat {
	font-size: 13px;
	color: var(--muted);
	padding-bottom: 4px;
}

.list {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.card {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 20px;
	box-shadow: var(--shadow);
}

.news-card .card-head {
	display: flex;
	gap: 18px;
}

.card-main {
	flex: 1;
	min-width: 0;
}

.card-title {
	margin: 0;
	font-size: 17px;
	line-height: 1.45;
	font-weight: 600;
	word-break: break-word;
}

.card-desc {
	margin: 8px 0 0;
	font-size: 14px;
	line-height: 1.6;
	color: var(--muted);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.card-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-top: 12px;
	font-size: 12.5px;
	color: var(--muted);
}

.meta-text {
	max-width: 220px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.dot {
	opacity: 0.5;
}

.tag {
	font-size: 12px;
	line-height: 1.6;
	padding: 2px 8px;
	border-radius: 6px;
	color: var(--primary);
	background: var(--primary-soft);
}

.id-tag {
	font-size: 12px;
	line-height: 1.6;
	padding: 2px 8px;
	border-radius: 6px;
	color: var(--muted);
	background: var(--surface-2);
}

.thumb {
	width: 150px;
	height: 96px;
	object-fit: cover;
	border-radius: 12px;
	background: var(--surface-2);
	flex-shrink: 0;
}

.card-actions {
	display: flex;
	justify-content: flex-end;
	gap: 10px;
	margin-top: 16px;
	padding-top: 14px;
	border-top: 1px solid var(--border);
}

.btn {
	border: 1px solid transparent;
	border-radius: 10px;
	padding: 8px 16px;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	background: transparent;
	transition: all 0.18s ease;
	white-space: nowrap;
}

.btn:hover {
	transform: translateY(-1px);
}

.btn:disabled {
	opacity: 0.45;
	cursor: not-allowed;
	transform: none;
}

.btn-primary {
	background: var(--primary);
	color: #ffffff;
}

.btn-primary:hover {
	background: #0069d9;
}

.btn-ghost {
	background: var(--surface);
	border-color: var(--border);
	color: var(--text);
}

.btn-ghost:hover {
	border-color: var(--primary);
	color: var(--primary);
}

.btn-soft {
	background: var(--primary-soft);
	color: var(--primary);
}

.btn-danger {
	background: var(--danger);
	color: #ffffff;
}

.btn-danger-soft {
	background: var(--danger-soft);
	color: var(--danger);
}

.icon-btn {
	border: none;
	background: transparent;
	color: var(--muted);
	font-size: 24px;
	line-height: 1;
	padding: 4px 10px;
	border-radius: 8px;
	cursor: pointer;
	transition: all 0.18s ease;
}

.icon-btn:hover {
	background: var(--surface-2);
	color: var(--text);
}

.user-card {
	display: flex;
	gap: 16px;
	align-items: flex-start;
}

.avatar {
	width: 46px;
	height: 46px;
	border-radius: 50%;
	background: linear-gradient(135deg, #007aff 0%, #0056d1 100%);
	color: #ffffff;
	font-size: 18px;
	font-weight: 600;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.user-main {
	flex: 1;
	min-width: 0;
}

.user-line {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
}

.user-email {
	font-size: 15px;
	font-weight: 600;
	word-break: break-all;
}

.tag-vip {
	color: var(--warning);
	background: rgba(255, 149, 0, 0.14);
}

.user-meta {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 8px;
	font-size: 13px;
	color: var(--muted);
}

.verify {
	color: var(--muted);
}

.verify.ok {
	color: var(--success);
}

.skeleton .sk-line {
	height: 14px;
	border-radius: 7px;
	margin-bottom: 12px;
	background: linear-gradient(90deg, var(--surface-2) 25%, var(--border) 37%, var(--surface-2) 63%);
	background-size: 400% 100%;
	animation: shimmer 1.4s ease infinite;
}

.skeleton .sk-line:last-child {
	margin-bottom: 0;
}

.w60 {
	width: 60%;
}

.w90 {
	width: 90%;
}

.w40 {
	width: 40%;
}

@keyframes shimmer {
	0% {
		background-position: 100% 0;
	}
	100% {
		background-position: 0 0;
	}
}

.state-card {
	text-align: center;
	padding: 56px 24px;
}

.state-title {
	margin: 0 0 8px;
	font-size: 16px;
	font-weight: 600;
}

.state-desc {
	margin: 0 0 18px;
	font-size: 14px;
	color: var(--muted);
}

.pager {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 14px;
	padding: 24px 0 0;
}

.pager-info {
	font-size: 13px;
	color: var(--muted);
}

.toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 16px;
	flex-wrap: wrap;
}

.search-box {
	display: flex;
	gap: 8px;
	flex: 1;
	min-width: 240px;
}

.search-box input {
	flex: 1;
	min-width: 0;
	padding: 10px 12px;
	border: 1px solid var(--border);
	border-radius: 10px;
	background: var(--surface);
	outline: none;
	transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.search-box input:focus {
	border-color: var(--primary);
	box-shadow: 0 0 0 3px var(--primary-soft);
}

.filter-select {
	padding: 10px 12px;
	border: 1px solid var(--border);
	border-radius: 10px;
	background: var(--surface);
	outline: none;
	min-width: 160px;
}

.toolbar-actions {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-shrink: 0;
}

.tag-self {
	color: var(--success);
	background: rgba(31, 157, 85, 0.14);
}

.tag-danger {
	color: var(--danger);
	background: var(--danger-soft);
}

.user-actions {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-shrink: 0;
}

.overlay {
	position: fixed;
	inset: 0;
	z-index: 100;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background: rgba(10, 15, 22, 0.55);
	backdrop-filter: blur(4px);
}

.modal {
	width: 100%;
	max-width: 680px;
	max-height: 90vh;
	display: flex;
	flex-direction: column;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 18px;
	box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
	overflow: hidden;
	animation: modalIn 0.18s ease-out;
}

.modal-sm {
	max-width: 420px;
}

@keyframes modalIn {
	from {
		opacity: 0;
		transform: translateY(10px) scale(0.98);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

.modal-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 18px 22px;
	border-bottom: 1px solid var(--border);
}

.modal-head h2 {
	margin: 0;
	font-size: 18px;
}

.modal-body {
	padding: 20px 22px;
	overflow-y: auto;
}

.modal-foot {
	display: flex;
	justify-content: flex-end;
	gap: 10px;
	padding: 16px 22px;
	border-top: 1px solid var(--border);
	background: var(--surface-2);
}

.field {
	margin-bottom: 16px;
}

.field:last-child {
	margin-bottom: 0;
}

.field label {
	display: block;
	margin-bottom: 6px;
	font-size: 13px;
	color: var(--muted);
}

.field input,
.field select,
.field textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid var(--border);
	border-radius: 10px;
	background: var(--surface-2);
	outline: none;
	transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.field textarea {
	resize: vertical;
	line-height: 1.6;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
	border-color: var(--primary);
	box-shadow: 0 0 0 3px var(--primary-soft);
}

.grid-2 {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
}

.form-error {
	min-height: 18px;
	margin: 0;
	padding-top: 8px;
	font-size: 13px;
	color: var(--danger);
}

.muted {
	margin: 0 0 16px;
	font-size: 14px;
	color: var(--muted);
}

.confirm-text {
	margin: 0;
	font-size: 15px;
	line-height: 1.7;
	word-break: break-word;
}

.toast {
	position: fixed;
	left: 50%;
	bottom: 32px;
	z-index: 200;
	max-width: min(90vw, 560px);
	padding: 11px 20px;
	border-radius: 12px;
	background: rgba(17, 24, 39, 0.92);
	color: #ffffff;
	font-size: 14px;
	text-align: center;
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
	opacity: 0;
	pointer-events: none;
	transform: translate(-50%, 20px);
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.show {
	opacity: 1;
	transform: translate(-50%, 0);
}

.toast.success {
	background: #1f9d55;
}

.toast.error {
	background: #d9363e;
}

@media (max-width: 760px) {
	.app {
		padding: 12px 14px 48px;
	}

	.login-view {
		padding: 16px;
	}

	.login-card {
		padding: 24px;
	}

	.app-header {
		flex-wrap: wrap;
		gap: 12px;
		padding: 14px;
		top: 6px;
	}

	.brand {
		flex: 1;
	}

	.nav {
		order: 3;
		width: 100%;
	}

	.nav-btn {
		flex: 1;
	}

	.header-actions {
		margin-left: 0;
	}

	.page-head {
		flex-direction: column;
		align-items: flex-start;
		gap: 6px;
	}

	.card {
		padding: 16px;
	}

	.thumb {
		width: 96px;
		height: 72px;
	}

	.grid-2 {
		grid-template-columns: 1fr;
	}

	.user-card {
		flex-wrap: wrap;
	}

	.user-actions {
		width: 100%;
		justify-content: flex-end;
		margin-top: 4px;
		padding-top: 12px;
		border-top: 1px solid var(--border);
	}

	.toolbar {
		align-items: stretch;
	}

	.search-box {
		min-width: 100%;
	}

	.filter-select {
		width: 100%;
	}

	.toolbar-actions {
		width: 100%;
	}

	.toolbar-actions .filter-select {
		flex: 1;
	}

	.overlay {
		padding: 12px;
	}

	.modal {
		max-height: 94vh;
	}
}
