@charset "UTF-8";

:root {
	--bg-0: #f3f7f6;
	--bg-1: #e7f1ef;
	--surface: rgba(255, 255, 255, 0.94);
	--text: #14231f;
	--muted: #5b6f69;
	--border: #d7e3df;
	--primary: #0f766e;
	--primary-soft: #ecfdf8;
	--primary-border: #99f6e4;
	--accent: #c2410c;
	--danger: #be123c;
	--danger-bg: #fff1f2;
	--success: #047857;
	--success-bg: #ecfdf5;
	--shadow: 0 14px 40px rgba(15, 35, 30, 0.08);
	--radius: 10px;
	--font: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
	--display: "Songti SC", "Noto Serif SC", "STSong", Georgia, serif;
}

* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
	font-family: var(--font);
}

html, body {
	width: 100%;
	min-height: 100%;
	background:
		radial-gradient(circle at top left, rgba(15, 118, 110, 0.12), transparent 30%),
		radial-gradient(circle at bottom right, rgba(194, 65, 12, 0.08), transparent 28%),
		linear-gradient(160deg, var(--bg-0) 0%, var(--bg-1) 100%);
	color: var(--text);
}

a {
	text-decoration: none;
	color: var(--primary);
}

a:hover:not(.site-brand) {
	opacity: 0.9;
}

body {
	min-height: 100vh;
	min-height: 100dvh;
	display: flex;
	flex-direction: column;
}

.site-header {
	position: sticky;
	top: 0;
	z-index: 10;
	background: rgba(255, 255, 255, 0.86);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	border-bottom: 1px solid var(--border);
}

.site-header-inner {
	width: 100%;
	max-width: 1120px;
	margin: 0 auto;
	padding: 14px 20px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
}

.site-brand {
	display: flex;
	align-items: center;
	gap: 12px;
	color: inherit;
}

.site-brand-logo {
	width: 36px;
	height: 36px;
	border-radius: 9px;
	flex-shrink: 0;
	display: block;
	box-shadow: 0 2px 8px rgba(15, 118, 110, 0.25);
}

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

.site-brand-title {
	font-size: 18px;
	font-weight: 800;
	color: var(--text);
}

.site-brand-subtitle {
	font-size: 12px;
	color: var(--muted);
}

.site-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	flex: 1;
	justify-content: center;
}

.site-nav-link {
	padding: 6px 10px;
	border-radius: 999px;
	color: var(--muted);
	font-size: 13px;
	font-weight: 600;
}

.site-nav-link:hover,
.site-nav-link.is-active {
	background: var(--primary-soft);
	color: var(--primary);
}

.site-header-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	color: var(--muted);
}

.site-header-actions a:not(.btn),
.logout-btn {
	padding: 8px 12px;
	border-radius: var(--radius);
	background: var(--primary-soft);
	border: 1px solid var(--primary-border);
	color: var(--primary);
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
}

.logout-form {
	display: inline;
	margin: 0;
}

.logout-btn {
	font-family: inherit;
}

.site-main {
	flex: 1;
	width: 100%;
	max-width: 1120px;
	margin: 0 auto;
	padding: 28px 20px 48px;
}

.site-footer {
	border-top: 1px solid var(--border);
	background: rgba(255, 255, 255, 0.7);
}

.site-footer-inner {
	max-width: 1120px;
	margin: 0 auto;
	padding: 20px;
	text-align: center;
	color: var(--muted);
	font-size: 13px;
	line-height: 1.7;
}

.site-beian {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px 16px;
	margin-top: 10px;
	padding: 0;
}

.site-beian a.c333.f12,
.f12 {
	font-size: 12px;
}

.site-beian a.c333,
.c333 {
	color: #333;
}

.site-beian a:hover {
	opacity: 0.75;
}

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

.page-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 260px;
	gap: 24px;
	align-items: start;
}

.page-primary {
	min-width: 0;
}

.page-aside {
	position: sticky;
	top: 76px;
}

.friend-links {
	padding: 18px 16px;
	border: 1px solid var(--border);
	border-radius: 14px;
	background: var(--surface);
	box-shadow: var(--shadow);
}

.friend-links-title {
	font-family: var(--display);
	font-size: 18px;
	margin-bottom: 14px;
	padding-bottom: 10px;
	border-bottom: 1px solid var(--border);
}

.friend-links-list {
	list-style: none;
	display: grid;
	gap: 4px;
}

.friend-links-list a {
	display: grid;
	gap: 2px;
	padding: 10px 10px;
	border-radius: 8px;
	color: inherit;
	transition: background 0.15s ease;
}

.friend-links-list a:hover {
	background: rgba(15, 118, 110, 0.06);
	opacity: 1;
}

.friend-link-name {
	font-size: 14px;
	font-weight: 700;
	color: var(--primary);
}

.friend-link-desc {
	font-size: 12px;
	color: var(--muted);
	line-height: 1.4;
}

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

.home-feed-count {
	color: var(--muted);
	font-size: 13px;
}

.home-feed-count strong {
	color: var(--text);
	font-weight: 700;
}

.home-feed {
	display: flex;
	flex-direction: column;
	gap: 0;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 16px;
	overflow: hidden;
	box-shadow: var(--shadow);
}

.feed-item + .feed-item {
	border-top: 1px solid var(--border);
}

.feed-item-link {
	display: grid;
	grid-template-columns: 120px 1fr;
	gap: 16px;
	padding: 16px 18px;
	color: inherit;
	transition: background 0.15s ease;
}

.feed-item-link:hover {
	background: rgba(15, 118, 110, 0.04);
	opacity: 1;
}

.feed-item-link.no-thumb {
	grid-template-columns: 1fr;
}

.home-feed .feed-summary {
	min-height: 0;
	margin-bottom: 10px;
}

.feed-item-thumb {
	aspect-ratio: 4 / 3;
	border-radius: 10px;
	overflow: hidden;
	background: #dbe7e3;
}

.feed-item-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.feed-item-body h2 {
	font-size: 18px;
	line-height: 1.4;
	margin: 6px 0 8px;
}

.feed-item-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
}

.feed-item-time {
	color: var(--muted);
	font-size: 12px;
	white-space: nowrap;
}

.form-actions,
.article-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 10px 16px;
	border-radius: var(--radius);
	border: 1px solid transparent;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
	background: #fff;
	color: var(--text);
}

.btn-sm {
	padding: 7px 12px;
	font-size: 13px;
}

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

.btn-ghost {
	background: rgba(255, 255, 255, 0.8);
	border-color: var(--border);
	color: var(--text);
}

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

.type-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.type-filters a {
	padding: 7px 12px;
	border-radius: 999px;
	border: 1px solid var(--border);
	background: rgba(255, 255, 255, 0.8);
	color: var(--muted);
	font-size: 13px;
	font-weight: 600;
}

.type-filters a.is-active {
	background: var(--primary);
	border-color: var(--primary);
	color: #fff;
}

.article-cover img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.feed-summary {
	color: var(--muted);
	font-size: 14px;
	line-height: 1.6;
	margin-bottom: 12px;
	min-height: 2.8em;
}

.feed-meta,
.article-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	color: var(--muted);
	font-size: 12px;
}

.badge {
	display: inline-flex;
	align-items: center;
	padding: 3px 8px;
	border-radius: 999px;
	background: var(--primary-soft);
	color: var(--primary);
	font-size: 12px;
	font-weight: 700;
}

.badge-soft {
	background: #fff7ed;
	color: var(--accent);
}

.badge-warn {
	background: #fffbeb;
	color: #b45309;
}

.panel {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 16px;
	padding: 24px;
	box-shadow: var(--shadow);
	margin-bottom: 20px;
}

.panel h1,
.panel h2 {
	margin-bottom: 8px;
}

.stack-form {
	display: grid;
	gap: 14px;
	margin-top: 16px;
}

.stack-form label,
.form-grid label {
	display: grid;
	gap: 6px;
	font-size: 13px;
	font-weight: 600;
	color: var(--muted);
}

.stack-form input,
.stack-form textarea,
.stack-form select,
.data-table select {
	width: 100%;
	padding: 10px 12px;
	border-radius: 8px;
	border: 1px solid var(--border);
	background: #fff;
	color: var(--text);
	font-size: 14px;
	font-family: inherit;
}

.form-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 12px;
}

.checkbox {
	align-content: end;
}

.field-hint {
	display: block;
	margin-top: 4px;
	font-size: 12px;
	font-weight: 400;
}

.form-meta-row {
	display: grid;
	grid-template-columns: 1fr 140px;
	gap: 12px;
	align-items: start;
}

.column-code-name-grid {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.column-meta-row {
	grid-template-columns: 140px minmax(0, 1fr);
}

.form-meta-row > label {
	display: grid;
	gap: 6px;
	align-content: start;
}

.form-meta-row > .switch-row {
	align-self: end;
	min-height: 42px;
}

.switch-row {
	display: flex !important;
	align-items: center;
	gap: 10px;
	margin: 0;
	padding: 10px 12px;
	border: 1px solid var(--border);
	border-radius: 10px;
	background: #fff;
	font-size: 14px;
	font-weight: 600;
	color: var(--text);
	cursor: pointer;
}

.switch-row input[type="checkbox"] {
	width: 16px;
	height: 16px;
	margin: 0;
	accent-color: var(--primary);
	flex-shrink: 0;
}

.switch-row-text {
	line-height: 1.2;
}

@media (max-width: 560px) {
	.form-meta-row,
	.column-code-name-grid {
		grid-template-columns: 1fr;
	}
}

.field-error {
	color: var(--danger);
	font-size: 12px;
	font-weight: 600;
	margin-top: 4px;
	display: block;
}

.field-error[hidden] {
	display: none !important;
}

.field-caption {
	display: inline-block;
}

.label-required .field-caption::after {
	content: " *";
	color: var(--danger);
	font-weight: 800;
}

input.is-invalid,
textarea.is-invalid,
select.is-invalid {
	border-color: var(--danger) !important;
	background: #fff8f8;
	box-shadow: 0 0 0 3px rgba(190, 18, 60, 0.08);
}

.visually-hidden {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.heanbian-toast-container.swal2-center {
	align-items: center !important;
	justify-content: center !important;
	padding: 16px !important;
}

.heanbian-toast {
	max-width: min(420px, calc(100vw - 32px)) !important;
	width: 100% !important;
	padding: 14px 16px !important;
	font-size: 14px !important;
	border-radius: 12px !important;
	box-shadow: 0 18px 48px rgba(15, 35, 30, 0.18) !important;
	border: 1px solid var(--border) !important;
	overflow: hidden !important;
}

.heanbian-toast .swal2-html-container,
.heanbian-toast-html,
.heanbian-toast .swal2-title,
.heanbian-toast-title {
	max-width: 100% !important;
	margin: 0 !important;
	padding: 0 !important;
	font-size: 14px !important;
	font-weight: 600 !important;
	line-height: 1.45 !important;
	color: var(--text) !important;
	overflow: hidden !important;
	text-overflow: ellipsis !important;
	white-space: nowrap !important;
}

.heanbian-toast .swal2-icon {
	margin: 0 10px 0 0 !important;
	width: 1.6em !important;
	height: 1.6em !important;
	min-width: 1.6em !important;
	border-width: 0.15em !important;
	flex-shrink: 0 !important;
}

.heanbian-toast .swal2-icon .swal2-icon-content {
	font-size: 0.9em !important;
}

.heanbian-confirm {
	border-radius: 16px !important;
	border: 1px solid var(--border) !important;
}

.heanbian-confirm .swal2-actions {
	gap: 10px;
}

.heanbian-confirm .btn {
	min-width: 88px;
}

.upload-field {
	display: grid;
	gap: 8px;
}

.upload-field .field-caption {
	font-size: 13px;
	font-weight: 600;
	color: var(--muted);
}

.upload-box {
	display: grid;
	gap: 12px;
	padding: 14px;
	border: 1px dashed var(--border);
	border-radius: 12px;
	background: #fbfcfc;
}

.upload-field.is-uploading .upload-box {
	opacity: 0.7;
	pointer-events: none;
}

.upload-trigger {
	display: grid;
	gap: 4px;
	cursor: pointer;
}

.upload-trigger-text {
	color: var(--primary);
	font-weight: 700;
	font-size: 14px;
}

.upload-hint {
	font-size: 12px;
	font-weight: 400;
}

.upload-preview-wrap {
	display: grid;
	gap: 10px;
	justify-items: start;
}

.upload-preview-wrap[hidden] {
	display: none !important;
}

.upload-preview {
	display: block;
	width: min(100%, 360px);
	max-height: 220px;
	object-fit: cover;
	border-radius: 10px;
	border: 1px solid var(--border);
	background: #fff;
}

.upload-preview:not([src]),
.upload-preview[src=""] {
	display: none !important;
}

.upload-status {
	font-size: 12px;
	font-weight: 600;
	color: var(--success);
}

.upload-status.is-error {
	color: var(--danger);
}

.profile-avatar-upload .upload-box {
	max-width: 420px;
}

.profile-avatar-preview {
	width: 96px !important;
	height: 96px !important;
	max-height: none !important;
	border-radius: 50% !important;
	object-fit: cover;
}

.publish-form {
	gap: 18px;
}

.form-section {
	display: grid;
	gap: 14px;
	padding: 16px 18px 18px;
	border: 1px solid var(--border);
	border-radius: 14px;
	background: #fbfcfc;
}

.form-section-head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 6px 16px;
	padding-bottom: 10px;
	border-bottom: 1px solid var(--border);
}

.form-section-head h2 {
	margin: 0;
	font-size: 15px;
	font-weight: 800;
	color: var(--text);
}

.form-section-head .muted {
	font-size: 12px;
}

.publish-meta-grid {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

.publish-media-grid .upload-box {
	min-height: 120px;
	height: 100%;
}

.publish-actions {
	margin-top: 4px;
	padding-top: 4px;
}

@media (max-width: 800px) {
	.publish-meta-grid,
	.publish-media-grid {
		grid-template-columns: 1fr;
	}
}

.article-page {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 16px;
	padding: 28px;
	box-shadow: var(--shadow);
}

.page-layout .article-page {
	width: 100%;
	max-width: none;
	margin: 0;
}

.article-header {
	margin-bottom: 20px;
}

.article-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 12px;
}

.article-header h1 {
	font-family: var(--display);
	font-size: clamp(26px, 4vw, 36px);
	line-height: 1.3;
	margin-bottom: 12px;
}

.article-cover {
	margin: 0 0 20px;
	border-radius: 12px;
	overflow: hidden;
	background: #dbe7e3;
}

.article-content {
	font-size: 17px;
	line-height: 1.9;
	color: #243530;
	margin-bottom: 24px;
	word-break: break-word;
	white-space: pre-wrap;
}

.article-actions {
	padding-top: 16px;
	border-top: 1px solid var(--border);
}

.article-comments {
	margin-top: 28px;
	padding-top: 24px;
	border-top: 1px solid var(--border);
}

.article-comments .comments-header {
	display: flex;
	align-items: baseline;
	gap: 10px;
	margin-bottom: 18px;
}

.article-comments .comments-header h2 {
	font-family: var(--display);
	font-size: 20px;
	margin: 0;
	line-height: 1.2;
}

.article-comments .comments-count {
	color: var(--muted);
	font-size: 13px;
	font-weight: 600;
}

.article-comments .comment-composer {
	display: grid;
	gap: 10px;
	margin-bottom: 22px;
	padding: 14px;
	border: 1px solid var(--border);
	border-radius: 12px;
	background: #fff;
}

.article-comments .comment-composer textarea {
	width: 100%;
	min-height: 88px;
	padding: 12px 14px;
	border: 1px solid var(--border);
	border-radius: 10px;
	background: #f8fbfa;
	color: var(--text);
	font-size: 14px;
	line-height: 1.6;
	font-family: inherit;
	resize: vertical;
}

.article-comments .comment-composer textarea:focus {
	outline: none;
	border-color: var(--primary);
	background: #fff;
	box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.article-comments .comment-composer-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.article-comments .comment-composer-hint {
	color: var(--muted);
	font-size: 12px;
}

.article-comments .comment-login-hint {
	margin: 0 0 22px;
	padding: 14px 16px;
	border-radius: 12px;
	background: #f8fbfa;
	border: 1px dashed var(--border);
	color: var(--muted);
	font-size: 14px;
}

.article-comments .comment-login-hint a {
	color: var(--primary);
	font-weight: 700;
}

.article-comments .comment-list {
	display: flex;
	flex-direction: column;
	margin: 0;
	padding: 0;
	border-top: 1px solid var(--border);
}

.article-comments .comment-item {
	display: grid;
	grid-template-columns: 40px minmax(0, 1fr);
	gap: 12px;
	margin: 0;
	padding: 16px 0;
	border-bottom: 1px solid var(--border);
	list-style: none;
	background: transparent;
}

.article-comments .comment-item:last-child {
	border-bottom: none;
	padding-bottom: 0;
}

.article-comments .comment-avatar {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	overflow: hidden;
	background: var(--primary-soft);
	border: 1px solid var(--primary-border);
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.article-comments .comment-avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.article-comments .comment-avatar.is-fallback span {
	color: var(--primary);
	font-weight: 700;
	font-size: 15px;
	line-height: 1;
	user-select: none;
}

.article-comments .comment-main {
	min-width: 0;
}

.article-comments .comment-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 6px;
}

.article-comments .comment-who {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 8px 10px;
	min-width: 0;
}

.article-comments .comment-name {
	color: var(--text);
	font-size: 14px;
	font-weight: 700;
}

.article-comments .comment-time {
	color: var(--muted);
	font-size: 12px;
}

.article-comments .comment-delete {
	margin: 0;
	flex-shrink: 0;
}

.article-comments .comment-delete-btn {
	appearance: none;
	border: 0;
	background: transparent;
	padding: 0;
	margin: 0;
	color: var(--muted);
	font-size: 12px;
	font-weight: 600;
	font-family: inherit;
	cursor: pointer;
	line-height: 1.4;
}

.article-comments .comment-delete-btn:hover {
	color: var(--danger);
}

.article-comments .comment-content {
	margin: 0;
	font-size: 15px;
	line-height: 1.7;
	color: #243530;
	white-space: pre-wrap;
	word-break: break-word;
}

.article-comments .comment-empty {
	margin: 4px 0 0;
	padding: 18px 16px;
	border-radius: 12px;
	background: #f8fbfa;
	border: 1px dashed var(--border);
	color: var(--muted);
	font-size: 14px;
	text-align: center;
}

.console-layout {
	display: grid;
	grid-template-columns: 220px minmax(0, 1fr);
	gap: 20px;
	align-items: start;
}

.console-aside {
	position: sticky;
	top: 76px;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 16px;
	box-shadow: var(--shadow);
	overflow: hidden;
}

.console-aside-head {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 16px;
	border-bottom: 1px solid var(--border);
	background: linear-gradient(180deg, rgba(15, 118, 110, 0.06), transparent);
}

.console-avatar,
.console-avatar-fallback {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
}

.console-avatar-fallback {
	display: grid;
	place-items: center;
	background: var(--primary);
	color: #fff;
	font-size: 18px;
	font-weight: 700;
}

.console-aside-meta {
	display: grid;
	gap: 2px;
	min-width: 0;
}

.console-aside-meta strong {
	font-size: 14px;
	line-height: 1.3;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.console-aside-meta span {
	font-size: 12px;
	color: var(--muted);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.console-role {
	display: inline-flex;
	align-items: center;
	width: fit-content;
	margin-top: 4px;
	padding: 2px 8px;
	border-radius: 999px;
	background: var(--primary-soft);
	color: var(--primary);
	font-size: 11px;
	font-weight: 700;
}

.console-role-user {
	background: #f1f5f4;
	color: var(--muted);
}

.console-menu {
	display: grid;
	padding: 10px 8px 14px;
	gap: 2px;
}

.console-menu-label {
	margin: 10px 10px 4px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.08em;
	color: var(--muted);
	text-transform: uppercase;
}

.console-menu a {
	display: block;
	padding: 10px 12px;
	border-radius: 8px;
	color: var(--text);
	font-size: 14px;
	font-weight: 600;
}

.console-menu a:hover {
	background: rgba(15, 118, 110, 0.06);
	opacity: 1;
}

.console-menu a.is-active {
	background: var(--primary-soft);
	color: var(--primary);
}

.console-main {
	margin-bottom: 0;
	min-width: 0;
}

.console-main-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
	margin-bottom: 18px;
	padding-bottom: 14px;
	border-bottom: 1px solid var(--border);
}

.console-main-head h1 {
	font-family: var(--display);
	font-size: clamp(22px, 3vw, 28px);
	margin-bottom: 4px;
}

.console-main-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
}

.console-filters {
	margin-bottom: 14px;
}

.console-quick {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 20px;
}

.profile-view {
	width: 100%;
	max-width: none;
}

.profile-fields {
	width: 100%;
	display: grid;
	gap: 0;
	border: 1px solid var(--border);
	border-radius: 12px;
	overflow: hidden;
	background: #fbfcfc;
}

.profile-field {
	display: grid;
	grid-template-columns: 96px 1fr;
	gap: 12px;
	padding: 14px 16px;
	border-top: 1px solid var(--border);
	align-items: center;
}

.profile-field:first-child {
	border-top: none;
}

.profile-field dt {
	color: var(--muted);
	font-size: 13px;
	font-weight: 600;
}

.profile-field dd {
	font-size: 15px;
	font-weight: 600;
	word-break: break-all;
}

.profile-edit-form input:disabled {
	opacity: 0.7;
	cursor: not-allowed;
	background: #f3f6f5;
}

.profile-edit {
	display: grid;
	grid-template-columns: 220px minmax(0, 1fr);
	gap: 20px;
	align-items: start;
}

.avatar,
.avatar-fallback {
	width: 72px;
	height: 72px;
	border-radius: 50%;
	object-fit: cover;
	margin: 0 auto 10px;
}

.avatar-fallback {
	display: grid;
	place-items: center;
	background: var(--primary);
	color: #fff;
	font-size: 28px;
	font-weight: 700;
}

.data-table {
	width: 100%;
	border-collapse: collapse;
	margin-top: 16px;
	font-size: 14px;
}

.data-table th,
.data-table td {
	padding: 10px 8px;
	border-bottom: 1px solid var(--border);
	text-align: left;
	vertical-align: top;
}

.data-table th {
	color: var(--muted);
	font-size: 12px;
}

.my-articles-table {
	table-layout: fixed;
	width: 100%;
}

.my-articles-table .col-title,
.articles-table .col-title {
	width: 36%;
	max-width: 0;
}

.my-articles-table .title-ellipsis,
.articles-table .title-ellipsis {
	display: block;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	max-width: 100%;
}

.my-articles-table .col-type {
	width: 64px;
	white-space: nowrap;
}

.my-articles-table .col-status {
	width: 72px;
	white-space: nowrap;
}

.my-articles-table .col-stats {
	width: 168px;
	white-space: nowrap;
}

.my-articles-table .col-actions {
	width: 160px;
}

.articles-table {
	table-layout: fixed;
	width: 100%;
	margin-top: 0;
}

.articles-table th,
.articles-table td {
	padding: 12px 14px;
	vertical-align: middle;
}

.articles-table thead th {
	background: #f3f7f6;
	font-weight: 700;
	border-bottom: 1px solid var(--border);
}

.articles-table tbody tr:hover {
	background: rgba(15, 118, 110, 0.04);
}

.admin-articles-table .col-author {
	width: 120px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.admin-articles-table .col-type {
	width: 72px;
	white-space: nowrap;
}

.admin-articles-table .col-status {
	width: 88px;
}

.admin-articles-table .col-actions {
	width: 220px;
}

.review-actions {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	width: 100%;
}

.review-actions .review-status {
	flex: 1;
	min-width: 0;
	padding: 8px 10px;
	border-radius: 8px;
	border: 1px solid var(--border);
	background: #fff;
	font-size: 13px;
	font-family: inherit;
	color: var(--text);
}

.review-actions .btn {
	flex-shrink: 0;
}

.status-pill.is-draft {
	background: #fff7ed;
	color: #c2410c;
}

.users-filter {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	margin-bottom: 16px;
}

.users-filter-q {
	flex: 1;
	min-width: 200px;
}

.users-filter input[type="search"],
.users-filter select {
	width: 100%;
	padding: 9px 12px;
	border-radius: 8px;
	border: 1px solid var(--border);
	background: #fff;
	font-size: 14px;
	font-family: inherit;
	color: var(--text);
}

.users-filter select {
	min-width: 120px;
	width: auto;
}

.users-table .col-user {
	width: 18%;
	max-width: 0;
}

.users-table .col-nick {
	width: 16%;
	max-width: 0;
}

.users-table .col-email {
	width: 24%;
	max-width: 0;
}

.users-table .col-role,
.users-table .col-status {
	width: 96px;
	white-space: nowrap;
}

.users-table .col-actions {
	width: 168px;
}

.user-actions {
	flex-wrap: nowrap;
}

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

.row-actions form {
	display: inline;
}

.row-actions button,
.row-actions a {
	border: none;
	background: transparent;
	color: var(--primary);
	cursor: pointer;
	font-size: 13px;
	font-weight: 600;
	padding: 0;
}

.row-actions .danger {
	color: var(--danger);
}

.admin-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 8px;
	font-size: 13px;
}

.admin-table-wrap {
	width: 100%;
	overflow-x: auto;
	border: 1px solid var(--border);
	border-radius: 12px;
	background: #fbfcfc;
}

.columns-table {
	margin-top: 0;
}

.columns-table th,
.columns-table td {
	padding: 12px 14px;
	vertical-align: middle;
}

.columns-table thead th {
	background: #f3f7f6;
	font-weight: 700;
	border-bottom: 1px solid var(--border);
}

.columns-table tbody tr:hover {
	background: rgba(15, 118, 110, 0.04);
}

.columns-table .col-sort {
	width: 64px;
	text-align: center;
	font-variant-numeric: tabular-nums;
	color: var(--muted);
}

.columns-table .col-name {
	font-weight: 700;
	white-space: nowrap;
}

.columns-table .col-desc {
	max-width: 280px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-size: 13px;
}

.columns-table .col-actions {
	width: 120px;
	white-space: nowrap;
}

.code-pill {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 6px;
	background: #eef4f2;
	border: 1px solid var(--border);
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 12px;
	font-weight: 600;
	color: var(--text);
}

.status-pill {
	display: inline-flex;
	align-items: center;
	padding: 3px 10px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 700;
}

.status-pill.is-on {
	background: var(--success-bg);
	color: var(--success);
}

.status-pill.is-off {
	background: #f1f5f4;
	color: var(--muted);
}

.link-btn {
	border: none;
	background: transparent;
	color: var(--primary);
	cursor: pointer;
	font-size: 13px;
	font-weight: 600;
	padding: 0;
	font-family: inherit;
}

.modal-dialog {
	border: none;
	padding: 0;
	background: transparent;
	width: min(560px, calc(100vw - 32px));
	max-width: calc(100vw - 32px);
	margin: auto;
	position: fixed;
	inset: 0;
	height: fit-content;
	max-height: calc(100vh - 32px);
	overflow: auto;
}

.modal-dialog:not([open]) {
	display: none;
}

.modal-dialog[open] {
	display: block;
}

.modal-dialog::backdrop {
	background: rgba(15, 35, 30, 0.45);
	backdrop-filter: blur(2px);
}

.modal-card {
	margin: 0;
	background: #fff;
	border: 1px solid var(--border);
	border-radius: 16px;
	box-shadow: var(--shadow);
	/* visible：避免 flatpickr 日历被 overflow 裁切；滚动交给 .modal-dialog */
	overflow: visible;
}

.modal-dialog .flatpickr-calendar {
	z-index: 50;
}

.modal-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 16px 20px;
	border-bottom: 1px solid var(--border);
	background: #f8fbfa;
}

.modal-head h2 {
	font-family: var(--display);
	font-size: 20px;
	margin: 0;
}

.modal-close {
	width: 32px;
	height: 32px;
	border: none;
	border-radius: 8px;
	background: transparent;
	color: var(--muted);
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
}

.modal-close:hover {
	background: var(--primary-soft);
	color: var(--primary);
}

.modal-body {
	padding: 18px 20px 8px;
	display: grid;
	gap: 14px;
}

.modal-body .stack-form,
.modal-card.stack-form {
	margin-top: 0;
	gap: 0;
}

.modal-card.stack-form > .modal-body {
	display: grid;
	gap: 14px;
}

.checkbox-block {
	align-content: center;
	padding-top: 22px;
}

.modal-foot {
	display: flex;
	justify-content: flex-end;
	gap: 10px;
	padding: 14px 20px 18px;
	border-top: 1px solid var(--border);
	background: #fff;
}

.stat-row {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 12px;
	margin-top: 18px;
}

.stat-row-4 {
	grid-template-columns: repeat(4, 1fr);
}

.friend-links-admin-table .col-sort {
	width: 64px;
	text-align: center;
}

.friend-links-admin-table .col-name {
	width: 22%;
	max-width: 0;
}

.friend-links-admin-table .col-url {
	width: 34%;
	max-width: 0;
}

.friend-links-admin-table .col-expire {
	width: 120px;
	white-space: nowrap;
	font-size: 13px;
}

.friend-links-admin-table .col-status {
	width: 80px;
}

.friend-links-admin-table .col-actions {
	width: 120px;
}

.stat-card {
	padding: 16px;
	border-radius: 12px;
	border: 1px solid var(--border);
	background: #f8fbfa;
	display: grid;
	gap: 4px;
	color: var(--muted);
	font-size: 13px;
}

.stat-num {
	font-size: 28px;
	font-weight: 800;
	color: var(--text);
}

.empty-state {
	text-align: center;
	padding: 48px 20px;
	color: var(--muted);
	border: 1px dashed var(--border);
	border-radius: 12px;
	background: #fbfcfc;
}

.empty-state h2 {
	color: var(--text);
	margin-bottom: 8px;
}

.pager {
	display: flex;
	justify-content: center;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 24px;
	color: var(--muted);
	font-size: 14px;
}

.pager-btn,
.pager-num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 36px;
	height: 36px;
	padding: 0 12px;
	border-radius: 8px;
	border: 1px solid var(--border);
	background: rgba(255, 255, 255, 0.9);
	color: var(--text);
	font-size: 13px;
	font-weight: 600;
}

.pager-btn:hover,
.pager-num:hover {
	border-color: var(--primary-border);
	color: var(--primary);
	opacity: 1;
}

.pager-num.is-current {
	background: var(--primary);
	border-color: var(--primary);
	color: #fff;
}

.pager-btn.is-disabled {
	opacity: 0.45;
	cursor: default;
	pointer-events: none;
}

.pager-ellipsis {
	padding: 0 4px;
	color: var(--muted);
}

@media (max-width: 800px) {
	.site-nav {
		order: 3;
		width: 100%;
		justify-content: flex-start;
	}

	.profile-edit,
	.stat-row,
	.stat-row-4,
	.console-layout {
		grid-template-columns: 1fr;
	}

	.console-aside {
		position: static;
	}

	.article-page,
	.panel {
		padding: 18px;
	}

	.feed-item-link {
		grid-template-columns: 88px 1fr;
		gap: 12px;
		padding: 14px;
	}

	.feed-item-body h2 {
		font-size: 16px;
	}

	.page-layout {
		grid-template-columns: 1fr;
	}

	.page-aside {
		position: static;
		order: 2;
	}
}
