.auth-loading {
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	color: var(--muted);
}

.auth-page {
	min-height: 100vh;
	display: grid;
	place-items: center;
	padding: 28px 16px;
	background:
		linear-gradient(var(--line) 1px, transparent 1px),
		linear-gradient(90deg, var(--line) 1px, transparent 1px),
		var(--page);
	background-size: 36px 36px;
}

.auth-card {
	width: min(420px, 100%);
	display: grid;
	gap: 22px;
	padding: 28px;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: 8px;
	box-shadow: 0 18px 48px rgba(20, 24, 28, 0.08);
}

.auth-brand {
	display: flex;
	align-items: center;
	gap: 10px;
}

.auth-card h1,
.auth-card p {
	margin: 0;
}

.auth-card h1 {
	font-size: 24px;
	line-height: 1.25;
}

.auth-card p {
	margin-top: 7px;
	color: var(--muted);
	font-size: 13px;
}

.auth-submit {
	width: 100%;
}

.auth-tabs .el-tabs__header {
	margin-bottom: 18px;
}

.topbar {
	height: 58px;
	background: var(--surface);
	border-bottom: 1px solid var(--line);
}

.topbar-inner {
	max-width: 1440px;
	height: 100%;
	margin: 0 auto;
	padding: 0 24px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}

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

.brand-mark {
	display: inline-grid;
	place-items: center;
	width: 40px;
	height: 27px;
	border-radius: 5px;
	background: var(--ink);
	color: #fff;
	font-size: 10px;
	font-weight: 800;
	letter-spacing: 0;
}

.topbar-meta {
	display: flex;
	align-items: center;
	gap: 12px;
	color: var(--muted);
	min-width: 0;
}

.account-select {
	width: 225px;
}

.topbar-user {
	max-width: 140px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.shell {
	max-width: 1440px;
	margin: 0 auto;
	padding: 22px 24px 48px;
}

.metrics {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: 8px;
	overflow: hidden;
}

.metric {
	padding: 16px 18px;
	border-right: 1px solid var(--line);
	display: grid;
	gap: 7px;
}

.metric:last-child {
	border-right: 0;
}

.metric span {
	color: var(--muted);
	font-size: 12px;
}

.metric strong {
	font-size: 24px;
	line-height: 1.1;
}

.metric strong.ok {
	color: var(--accent);
	font-size: 16px;
	padding-top: 4px;
}

.metric strong.warn {
	color: var(--warn);
	font-size: 16px;
	padding-top: 4px;
}

.main-tabs {
	margin-top: 16px;
}

.section-head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 18px;
	margin-bottom: 13px;
}

.section-head h2,
.section-head p {
	margin: 0;
}

.section-head h2 {
	font-size: 18px;
	line-height: 1.25;
}

.section-head p {
	color: var(--muted);
	margin-top: 4px;
	font-size: 12px;
}

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

.scope-select {
	width: 140px;
}

.bid-switch {
	margin-bottom: 14px;
}

.plan-table {
	width: 100%;
	border: 1px solid var(--line);
	border-radius: 8px;
	overflow: hidden;
}

.plan-name {
	font-weight: 650;
	overflow-wrap: anywhere;
}

.subtle {
	color: var(--muted);
	font-size: 12px;
	margin-top: 3px;
}

.mono {
	font-family: Consolas, "SFMono-Regular", monospace;
}

.loading-panel {
	display: flex;
	align-items: center;
	gap: 8px;
	min-height: 42px;
	margin-top: 8px;
	padding: 8px 12px;
	border: 1px solid var(--line);
	border-radius: 7px;
	background: var(--surface);
	color: var(--muted);
	font-size: 13px;
}

.settings-form {
	max-width: 820px;
	padding: 20px;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: 8px;
}

.settings-form + .settings-form {
	margin-top: 16px;
}

.auth-account-list {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.user-admin-head h3 {
	margin: 0;
}

.user-admin-head h3 {
	font-size: 16px;
}

.user-create-row {
	display: grid;
	grid-template-columns: minmax(130px, 1fr) minmax(150px, 1fr) minmax(210px, 1.3fr) auto;
	gap: 8px;
	margin: 16px 0;
}

.schedule-plan-list {
	width: 100%;
	max-height: 290px;
	overflow: auto;
	border: 1px solid var(--line);
	border-radius: 6px;
}

.schedule-plan-list .el-checkbox-group {
	display: grid;
}

.schedule-plan-option {
	display: flex;
	align-items: center;
	gap: 9px;
	padding: 11px 12px;
	border-bottom: 1px solid var(--line);
	cursor: pointer;
}

.schedule-plan-option:last-child {
	border-bottom: 0;
}

.schedule-plan-option:hover {
	background: var(--soft);
}

.schedule-plan-copy {
	display: grid;
	gap: 3px;
	min-width: 0;
	flex: 1;
}

.schedule-plan-copy strong {
	overflow-wrap: anywhere;
}

.schedule-plan-copy span {
	color: var(--muted);
	font-size: 12px;
}

.schedule-plan-status {
	display: flex;
	gap: 5px;
	justify-content: flex-end;
	flex-wrap: wrap;
	margin-left: auto;
}

.time-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}

.form-help {
	margin: -6px 0 12px;
	color: var(--muted);
	font-size: 12px;
}

.el-table th.el-table__cell {
	background: var(--soft);
}

.el-dialog {
	border-radius: 8px;
}

@media (max-width: 820px) {
	.topbar-inner,
	.shell {
		padding-left: 14px;
		padding-right: 14px;
	}

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

	.metric:nth-child(2) {
		border-right: 0;
	}

	.metric:nth-child(-n+2) {
		border-bottom: 1px solid var(--line);
	}

	.section-head {
		align-items: flex-start;
		flex-direction: column;
	}

	.toolbar {
		width: 100%;
	}

	.toolbar .el-select {
		flex: 1;
		min-width: 120px;
	}

	.account-select {
		width: 180px;
	}

	.user-create-row {
		grid-template-columns: 1fr 1fr;
	}
}

@media (max-width: 560px) {
	.topbar-meta > span:last-child,
	.brand strong {
		display: none;
	}

	.topbar-meta {
		gap: 7px;
	}

	.topbar-meta > .el-tag,
	.topbar-user {
		display: none;
	}

	.account-select {
		width: 142px;
	}

	.scope-select {
		width: 100%;
	}

	.bid-switch {
		width: 100%;
	}

	.schedule-plan-option {
		align-items: flex-start;
		flex-wrap: wrap;
	}

	.schedule-plan-status {
		width: 100%;
		justify-content: flex-start;
		padding-left: 24px;
	}

	.auth-card {
		padding: 22px;
	}

	.user-create-row {
		grid-template-columns: 1fr;
	}

	.time-row {
		grid-template-columns: 1fr;
	}

}
