/* Sign-in, sign-up and the placeholder home page. */

.auth-page {
	position: relative;
	min-height: 100vh;
	min-height: 100dvh;
}

.auth-corner {
	position: absolute;
	top: 16px;
	right: 16px;
	left: 16px;
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 8px;
}

.auth-switch {
	display: flex;
	align-items: center;
	gap: 6px;
	height: 32px;
}

.auth-switch-icon {
	display: flex;
	color: var(--faint);
}

.auth-main {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-height: 100vh;
	min-height: 100dvh;
	padding: 96px 16px 64px;
}

.auth-brand {
	margin-bottom: 32px;
	font-size: calc(28px * var(--ui-scale));
	letter-spacing: -0.02em;
	color: var(--text-strong);
}

.auth-brand.brand-logo {
	justify-content: center;
	height: 48px;
}

.auth-brand.brand-logo img {
	object-position: center;
}

.auth-card {
	width: 100%;
	max-width: 384px;
	padding: 24px;
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	background: var(--surface);
	box-shadow: var(--shadow);
}

@media (min-width: 640px) {
	.auth-card {
		padding: 32px;
	}
}

.auth-title {
	margin: 0;
	font-size: calc(20px * var(--ui-scale));
	font-weight: 600;
	color: var(--text-strong);
}

.auth-subtitle {
	margin: 4px 0 0;
	color: var(--muted);
}

.auth-body {
	margin-top: 24px;
}

.auth-footer {
	margin: 24px 0 0;
	text-align: center;
	color: var(--muted);
}

.home-placeholder {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	min-height: 100vh;
	min-height: 100dvh;
	padding: 0 16px;
	text-align: center;
}

.home-intro {
	margin: 0;
	font-size: calc(28px * var(--ui-scale));
	font-weight: 600;
	color: var(--text-strong);
}

.home-user {
	margin: 0 0 12px;
	color: var(--muted);
}

/* ---- /me: 我的账户 (pages/me.js) ---- */

.me-heading {
	margin: 20px 0 6px;
	font-size: calc(12px * var(--ui-scale));
	font-weight: 600;
	letter-spacing: 0.04em;
	color: var(--muted);
}

.me-heading:first-child {
	margin-top: 0;
}

.me-list {
	display: flex;
	flex-direction: column;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	overflow: hidden;
}

.me-line {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 44px;
	padding: 0 12px;
	color: var(--text);
	text-decoration: none;
	transition: background-color 120ms var(--ease);
}

.me-line + .me-line {
	border-top: 1px solid var(--border);
}

.me-line:hover {
	background: var(--surface-2);
}

.me-line:active {
	background: var(--border);
}

.me-line-icon,
.me-line-arrow {
	display: inline-flex;
	color: var(--muted);
}

.me-line-text {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.me-line-side {
	color: var(--muted);
	font-size: calc(13px * var(--ui-scale));
}

.me-empty {
	margin: 0;
	padding: 12px;
	color: var(--muted);
	font-size: calc(14px * var(--ui-scale));
}

.me-actions {
	display: flex;
	justify-content: center;
	margin-top: 24px;
}

.me-actions .btn {
	gap: 6px;
}

.me-cards {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.me-back {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	margin-top: 20px;
	color: var(--muted);
	text-decoration: none;
}

.me-back:hover {
	color: var(--text);
}

/* /setup: 建第一个管理员 or 挂到主站 */
.setup-modes {
	display: flex;
	justify-content: center;
}

/* ---- /me/mail: 我的邮箱 (pages/me-mail.js) ---- */

.mym {
	display: flex;
	flex-direction: column;
	gap: 22px;
}

.mym-address {
	display: flex;
	align-items: center;
	gap: 6px;
	letter-spacing: 0;
	font-size: calc(14px * var(--ui-scale));
	color: var(--text-strong);
}

.mym-device {
	cursor: default;
}

.mym-device:hover,
.mym-device:active {
	background: none;
}

.mym-device .me-line-side {
	white-space: nowrap;
}

.mym-new {
	padding: 10px 12px;
	border-top: 1px solid var(--border);
	background: var(--surface-2);
}

.mym-new .form-error {
	margin: 6px 0 0;
}

.mym-add {
	display: flex;
	gap: 8px;
}

.mym-add .input {
	flex: 1;
	min-width: 0;
}

.mym-fresh {
	display: grid;
	gap: 4px;
	margin-top: 10px;
	padding: 10px 12px;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--ok-bg);
}

.mym-help {
	margin-top: 10px;
	font-size: calc(13px * var(--ui-scale));
}

.mym-help summary {
	cursor: pointer;
	color: var(--muted);
}

.mym-help-row {
	display: grid;
	grid-template-columns: 4.5em 1fr;
	gap: 8px;
	margin-top: 6px;
	align-items: baseline;
}

.mym-help-row code {
	overflow-wrap: anywhere;
}

.mym-device .btn {
	flex: none;
	margin: 0;
	align-self: center;
}
