@charset "UTF-8";

:root {
	--bg-0: #f5f7fb;
	--bg-1: #eef3ff;
	--surface: rgba(255, 255, 255, 0.94);
	--text: #0f172a;
	--muted: #64748b;
	--border: #e2e8f0;
	--primary: #2563eb;
	--primary-soft: #eff6ff;
	--primary-border: #bfdbfe;
	--danger: #be123c;
	--danger-bg: #fff1f2;
	--success: #047857;
	--success-bg: #ecfdf5;
	--shadow: 0 14px 40px rgba(15, 23, 42, 0.08);
	--radius: 8px;
	--font: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", system-ui, -apple-system, sans-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(59, 130, 246, 0.12), transparent 28%),
		radial-gradient(circle at bottom right, rgba(14, 165, 233, 0.1), transparent 26%),
		linear-gradient(135deg, 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: 1240px;
	margin: 0 auto;
	padding: 14px 0px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}

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

.site-brand:hover {
	opacity: 1;
}

.site-brand-logo {
	width: 36px;
	height: 36px;
	border-radius: 9px;
	flex-shrink: 0;
	display: block;
	box-shadow: 0 2px 8px rgba(37, 99, 235, 0.22);
}

.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-header-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	font-size: 14px;
	color: #475569;
}

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

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

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

.site-user strong {
	color: var(--text);
}

.site-main {
	flex: 1;
	width: 100%;
	padding: 28px 16px;
	display: flex;
	flex-direction: column;
}

.auth-page {
	flex: 1;
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
}

.auth-card {
	width: 100%;
	max-width: 480px;
	background: var(--surface);
	border: 1px solid rgba(255, 255, 255, 0.8);
	border-radius: var(--radius);
	padding: 30px 28px;
	box-shadow: 0 20px 60px rgba(15, 23, 42, 0.12);
	backdrop-filter: blur(18px);
	-webkit-backdrop-filter: blur(18px);
}

.auth-card-wide {
	max-width: 560px;
}

.auth-body,
.auth-footer-link,
.secondary-form {
	margin-top: 12px;
}

.auth-body p,
.page-lead {
	line-height: 1.7;
	color: #334155;
	margin-bottom: 12px;
}

.auth-footer-link {
	text-align: center;
}

.login-tab {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 22px;
}

.login-tab .active {
	font-size: 26px;
	font-weight: 800;
	color: var(--text);
	letter-spacing: 0.3px;
}

.login-con {
	position: relative;
	width: 100%;
	min-height: 56px;
	margin-bottom: 18px;
}

.login-con .input,
.login-con textarea,
.login-con select,
.field .input,
.field textarea,
.admin-form .input,
.filter-form .input {
	display: block;
	width: 100%;
	min-height: 52px;
	padding: 0 16px 0 48px;
	border-radius: var(--radius);
	border: 1px solid #dbe4f0;
	background: #f8fafc;
	color: var(--text);
	font-size: 15px;
	transition: all 0.2s ease;
	outline: none;
}

.login-con.has-no-icon .input,
.field .input,
.field textarea,
.admin-form .input,
.filter-form .input {
	padding-left: 16px;
}

.login-con textarea,
.field textarea,
.admin-form textarea.input {
	padding-top: 14px;
	padding-bottom: 14px;
	min-height: 108px;
	resize: vertical;
}

.filter-form .input {
	min-height: 42px;
	font-size: 14px;
}

.login-con .input:focus,
.login-con textarea:focus,
.field .input:focus,
.field textarea:focus,
.admin-form .input:focus,
.filter-form .input:focus {
	border-color: #60a5fa;
	background: #fff;
	box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.14);
}

.login_icon {
	width: 18px;
	height: 18px;
	position: absolute;
	top: 17px;
	left: 18px;
	display: inline-block;
	opacity: 0.6;
}

.icon_username {
	background: url(../img/icon_yonhuming.png) center no-repeat;
	background-size: contain;
}

.icon_password {
	background: url(../img/icon_mima.png) center no-repeat;
	background-size: contain;
}

.login-btn {
	width: 100%;
	margin-bottom: 12px;
}

.login-btn button,
.page-actions button,
.btn-secondary,
.btn-danger {
	width: 100%;
	min-height: 48px;
	border: none;
	border-radius: var(--radius);
	background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
	color: #fff;
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
	box-shadow: 0 12px 28px rgba(37, 99, 235, 0.22);
	transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.login-btn button:hover,
.page-actions button:hover {
	transform: translateY(-1px);
	box-shadow: 0 14px 32px rgba(37, 99, 235, 0.26);
}

.btn-secondary,
button.btn-secondary {
	background: #fff;
	color: #1d4ed8;
	border: 1px solid var(--primary-border);
	box-shadow: none;
}

.btn-danger,
button.btn-danger {
	background: linear-gradient(135deg, #e11d48 0%, #f43f5e 100%);
	box-shadow: 0 12px 28px rgba(225, 29, 72, 0.18);
}

.error-tip,
.success-tip {
	border-radius: var(--radius);
	margin-bottom: 14px;
	padding: 12px 14px;
	font-size: 13px;
	line-height: 1.5;
}

.error-tip {
	background: var(--danger-bg);
	border: 1px solid #fecdd3;
	color: var(--danger);
}

.success-tip {
	background: var(--success-bg);
	border: 1px solid #a7f3d0;
	color: var(--success);
}

.custom-checkbox {
	position: relative;
	margin: 6px 4px 14px 4px;
	user-select: none;
}

.custom-checkbox input[type="checkbox"] {
	position: absolute;
	left: 0;
	top: 1px;
	width: 20px;
	height: 20px;
	opacity: 0;
	margin: 0;
	cursor: pointer;
}

.custom-checkbox label {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding-left: 32px;
	font-size: 14px;
	color: #475569;
	cursor: pointer;
}

.custom-checkbox label::before {
	content: "";
	position: absolute;
	left: 0;
	top: 1px;
	width: 20px;
	height: 20px;
	border-radius: 5px;
	border: 1px solid #cbd5e1;
	background: #fff;
	transition: all 0.2s ease;
}

.custom-checkbox input[type="checkbox"]:checked ~ label::before {
	background: var(--primary);
	border-color: var(--primary);
	box-shadow: 0 6px 14px rgba(37, 99, 235, 0.18);
}

.custom-checkbox input[type="checkbox"]:checked ~ label::after {
	content: "✓";
	position: absolute;
	left: 5px;
	top: 1px;
	font-size: 13px;
	color: #fff;
}

.checkbox-group {
	display: grid;
	gap: 4px;
	margin: 8px 0 18px;
}

.page-shell {
	width: 100%;
	max-width: 1240px;
	margin: 0 auto;
}

/* 新建/编辑表单：整页内容居中 */
.page-shell-form {
	max-width: 760px;
}

.page-card {
	background: var(--surface);
	border-radius: var(--radius);
	padding: 24px;
	box-shadow: var(--shadow);
	border: 1px solid rgba(255, 255, 255, 0.75);
}

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

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

.page-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 16px;
}

.page-actions a,
.page-actions button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 0 18px;
	width: auto;
	border-radius: var(--radius);
	background: var(--primary-soft);
	color: #1d4ed8;
	border: 1px solid var(--primary-border);
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	box-shadow: none;
}

.page-actions a:hover,
.page-actions button:hover {
	background: #dbeafe;
	text-decoration: none;
	transform: none;
}

.page-actions button[type="submit"]:not(.btn-secondary):not(.btn-danger) {
	background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
	color: #fff;
	border: none;
}

.form-card {
	width: 100%;
}

.admin-form .field {
	display: block;
	margin-bottom: 16px;
}

.field-label {
	display: block;
	margin-bottom: 8px;
	font-size: 13px;
	font-weight: 600;
	color: #475569;
}

.form-danger-zone {
	margin-top: 28px;
	padding-top: 20px;
	border-top: 1px dashed #fecdd3;
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.form-danger-zone form {
	flex: 1 1 220px;
}

.form-danger-zone button {
	width: 100%;
}

.table-wrap {
	overflow-x: auto;
}

table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	overflow: hidden;
	border-radius: var(--radius);
	background: #fff;
	box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

thead th {
	background: #f8fafc;
	color: #334155;
	font-weight: 700;
	font-size: 14px;
}

th, td {
	padding: 14px 12px;
	border-bottom: 1px solid var(--border);
	text-align: left;
	font-size: 14px;
	vertical-align: middle;
}

tbody tr:hover {
	background: #f8fbff;
}

tbody tr:last-child td {
	border-bottom: none;
}

.table-empty {
	text-align: center;
	color: var(--muted);
}

.filter-form {
	margin-bottom: 20px;
	padding-bottom: 18px;
	border-bottom: 1px solid var(--border);
}

.filter-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 14px 16px;
}

.filter-field {
	display: block;
	min-width: 0;
}

.filter-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	margin-top: 16px;
}

.filter-actions button,
.filter-actions .btn-secondary {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	min-width: 96px;
	min-height: 40px;
	padding: 0 18px;
	border-radius: var(--radius);
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
	cursor: pointer;
	text-decoration: none;
}

.filter-actions button {
	border: none;
	color: #fff;
	background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
}

.filter-actions .btn-secondary {
	border: 1px solid var(--border);
	background: #fff;
	color: #334155;
}

.badge-success,
.badge-danger {
	display: inline-flex;
	align-items: center;
	padding: 2px 8px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 700;
}

.badge-success {
	color: var(--success);
	background: var(--success-bg);
}

.badge-danger {
	color: var(--danger);
	background: var(--danger-bg);
}

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

.pager-links {
	display: flex;
	align-items: center;
	gap: 10px;
}

.pager-links a,
.pager-disabled {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 36px;
	padding: 0 14px;
	border-radius: var(--radius);
	border: 1px solid var(--border);
	font-size: 13px;
	font-weight: 600;
}

.pager-links a {
	background: var(--primary-soft);
	color: #1d4ed8;
	border-color: var(--primary-border);
}

.pager-disabled {
	color: #94a3b8;
	background: #f8fafc;
}

.table-actions {
	display: flex;
	align-items: center;
	gap: 12px;
}

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

.link-btn {
	background: none;
	border: none;
	color: var(--primary);
	font: inherit;
	cursor: pointer;
	padding: 0;
}

code {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 13px;
	background: #f1f5f9;
	padding: 2px 6px;
	border-radius: 4px;
}

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

.status-pill.is-on {
	background: #ecfdf5;
	color: #047857;
}

.status-pill.is-off {
	background: #fff1f2;
	color: #be123c;
}

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

.info-row {
	display: grid;
	grid-template-columns: 140px 1fr;
	gap: 12px;
	padding: 12px 0;
	border-bottom: 1px solid #f1f5f9;
}

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

.info-row dd {
	color: var(--text);
	font-weight: 600;
}

.home-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 16px;
	margin-top: 8px;
}

.home-tile {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 20px;
	border-radius: var(--radius);
	background: #f8fbff;
	border: 1px solid #e2e8f0;
	color: inherit;
	transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.home-tile:hover {
	border-color: #93c5fd;
	transform: translateY(-2px);
	box-shadow: 0 10px 24px rgba(37, 99, 235, 0.08);
	opacity: 1;
}

.home-tile strong {
	font-size: 16px;
	color: var(--text);
}

.home-tile span {
	font-size: 13px;
	color: var(--muted);
	line-height: 1.5;
}

.social-login {
	margin-top: 8px;
}

.divider {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 18px 0 14px;
	color: var(--muted);
	font-size: 12px;
}

.divider::before,
.divider::after {
	content: "";
	flex: 1;
	height: 1px;
	background: var(--border);
}

.social-login-list {
	display: grid;
	gap: 10px;
}

.social-login-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	border-radius: var(--radius);
	border: 1px solid var(--border);
	background: #fff;
	color: #1e293b;
	font-weight: 600;
}

.scope-list {
	margin: 10px 0 16px 18px;
	line-height: 1.8;
}

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

.consent-section {
	margin-bottom: 12px;
}

/* flatpickr 主题对齐站点主色 */
.flatpickr-calendar {
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	border: 1px solid var(--border);
	font-family: var(--font);
}

.flatpickr-months .flatpickr-month,
.flatpickr-current-month .flatpickr-monthDropdown-months,
span.flatpickr-weekday {
	color: var(--text);
	fill: var(--text);
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange,
.flatpickr-day.selected:hover,
.flatpickr-day.startRange:hover,
.flatpickr-day.endRange:hover {
	background: var(--primary);
	border-color: var(--primary);
}

.flatpickr-day.today {
	border-color: var(--primary);
}

.flatpickr-day:hover,
.flatpickr-day.prevMonthDay:hover,
.flatpickr-day.nextMonthDay:hover {
	background: var(--primary-soft);
	border-color: var(--primary-border);
}

.flatpickr-time input:hover,
.flatpickr-time .flatpickr-am-pm:hover,
.flatpickr-time input:focus,
.flatpickr-time .flatpickr-am-pm:focus {
	background: var(--primary-soft);
}

input.flatpickr-input[readonly],
input.input[data-flatpickr] {
	cursor: pointer;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	background-size: 16px;
	padding-right: 36px;
}

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

@media screen and (max-width: 640px) {
	.login-tab .active,
	.page-title {
		font-size: 22px;
	}

	.auth-card,
	.page-card {
		padding: 22px 18px;
	}

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

	.info-row {
		grid-template-columns: 1fr;
		gap: 4px;
	}

	.site-header-inner {
		align-items: flex-start;
		flex-direction: column;
	}
}
