:root {
	color-scheme: light;
	--page: #f1f5fa;
	--ink: #19293f;
	--muted: #506179;
	--blue: #205ca7;
	--blue-hover: #194987;
	--border: #dbe4f0;
	font-family: "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

.login-page {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 24px;
	width: min(100% - 80px, 1120px);
	min-height: 100vh;
	min-height: 100svh;
	margin: 0 auto;
	padding: 28px 0;
	background: var(--page);
	color: var(--ink);
	line-height: 1.6;
}

.login-brand {
	display: flex;
	align-items: center;
	gap: 16px;
	font-size: .875rem;
	font-weight: 700;
}

.login-brand__logo {
	display: block;
	max-width: min(170px, 45vw);
	max-height: 48px;
	padding: 5px 9px;
	border-radius: 7px;
	background: white;
	object-fit: contain;
}

.login-brand__logo + span {
	padding-inline-start: 16px;
	border-inline-start: 1px solid #cbd8e7;
}

.login-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	min-height: 575px;
	overflow: hidden;
	border: 1px solid #dde6f1;
	border-radius: 24px;
	background: #fff;
	box-shadow: 0 18px 45px #1e3f6d12;
}

.login-intro {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	gap: 32px;
	padding: clamp(32px, 5vw, 64px);
	background:
		radial-gradient(ellipse at 95% 95%, #2e6099, transparent 72%),
		#142e53;
	color: #f5f9ff;
}

.login-intro::before {
	position: absolute;
	z-index: -1;
	inset: 0;
	background-image: radial-gradient(circle, #b5d3fd48 1px, transparent 1px);
	background-size: 22px 22px;
	mask-image: linear-gradient(140deg, transparent 45%, black);
	content: "";
}

.login-intro__university {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 22px;
	color: #dceaff;
	font-size: .875rem;
	font-weight: 700;
	letter-spacing: .13em;
}

.login-intro__university::before {
	width: 22px;
	height: 2px;
	background: #a5c9ff;
	content: "";
}

.login-intro__title {
	margin: 0;
	font-size: clamp(2.5rem, 4.7vw, 4.3rem);
	font-weight: 800;
	letter-spacing: -.04em;
	line-height: 1.13;
}

.login-intro__description {
	margin: 20px 0 0;
	color: #dce8f8;
	font-size: .95rem;
}

.login-art {
	position: relative;
	align-self: flex-end;
	width: 235px;
	height: 175px;
	margin-top: auto;
	margin-right: 14px;
}

.login-art__sheet {
	position: absolute;
	width: 152px;
	height: 164px;
	border: 1px solid #b4d3fb80;
	border-radius: 14px;
}

.login-art__sheet--back {
	top: 2px;
	right: 14px;
	transform: rotate(13deg);
	background: #4b7eb9;
}

.login-art__sheet--front {
	bottom: 0;
	left: 22px;
	transform: rotate(-10deg);
	padding: 22px 17px;
	background: #e2eeff;
	box-shadow: 0 14px 24px #10274840;
}

.login-art__heading,
.login-art__field,
.login-art__option {
	display: block;
	border-radius: 5px;
}

.login-art__heading {
	width: 52%;
	height: 8px;
	margin-bottom: 14px;
	background: #4c79ae;
}

.login-art__field {
	height: 21px;
	margin-bottom: 9px;
	border: 1px solid #98b4d9;
	background: #f2f7ff;
}

.login-art__option {
	width: 45%;
	height: 12px;
	background: #abc4e4;
}

.login-art__check {
	position: absolute;
	right: 6px;
	bottom: 14px;
	display: grid;
	width: 51px;
	height: 51px;
	place-items: center;
	border-radius: 50%;
	background: #bcd8ff;
	box-shadow: 0 6px 22px #10274866;
}

.login-art__check::before {
	width: 17px;
	height: 9px;
	transform: translateY(-2px) rotate(-45deg);
	border-bottom: 3px solid #214a84;
	border-left: 3px solid #214a84;
	content: "";
}

.login-panel {
	display: grid;
	align-items: center;
	padding: clamp(32px, 6vw, 80px);
}

.login-panel__content {
	width: 100%;
	max-width: 390px;
	margin: 0 auto;
}

.login-panel h1 {
	margin: 0;
	font-size: clamp(1.9rem, 3.1vw, 2.65rem);
	font-weight: 800;
	letter-spacing: -.04em;
	line-height: 1.2;
}

.login-panel__description {
	margin: 12px 0 0;
	color: var(--muted);
}

.login-notice {
	margin: 18px 0 0;
	padding: 12px 14px;
	border: 1px solid;
	border-radius: 9px;
	font-size: .9rem;
	overflow-wrap: anywhere;
}

.login-notice--error {
	border-color: #efc8be;
	background: #fff2ef;
	color: #8e3629;
}

.login-notice--success {
	border-color: #c7d9f1;
	background: #edf5ff;
	color: #214a84;
}

.login-sso,
.login-panel__content > .login-form { margin-top: 28px; }

.login-sso p {
	margin: 10px 0 0;
	color: var(--muted);
	font-size: .875rem;
	text-align: center;
}

.login-button {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 50px;
	padding: 10px 16px;
	border: 1px solid transparent;
	border-radius: 9px;
	font: inherit;
	font-weight: 700;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
}

.login-button--primary {
	background: var(--blue);
	color: white;
}

.login-button--primary:hover { background: var(--blue-hover); }

.login-button--secondary {
	border-color: #9cb3d0;
	background: #fff;
	color: var(--blue-hover);
}

.login-button--secondary:hover { background: #edf4ff; }

.login-sso .login-button { padding-inline: 44px; }

.login-button__arrow {
	position: absolute;
	right: 17px;
	font-size: 1.35rem;
	line-height: 1;
}

.login-button:disabled,
.login-text-button:disabled {
	opacity: .65;
	cursor: wait;
}

.login-account {
	margin-top: 24px;
	border-top: 1px solid var(--border);
}

.login-account summary {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	min-height: 44px;
	margin-top: 6px;
	color: var(--ink);
	font-size: .9rem;
	font-weight: 700;
	list-style: none;
	cursor: pointer;
}

.login-account summary::-webkit-details-marker { display: none; }

.login-account summary::after {
	width: 8px;
	height: 8px;
	margin-right: 4px;
	transform: translateY(-2px) rotate(45deg);
	border-right: 2px solid var(--blue);
	border-bottom: 2px solid var(--blue);
	content: "";
}

.login-account[open] summary::after { transform: translateY(2px) rotate(225deg); }
.login-account .login-form { margin-top: 8px; }

.login-form label {
	display: block;
	margin-bottom: 6px;
	font-size: .9rem;
	font-weight: 700;
}

.login-form input[type="text"],
.login-form input[type="password"] {
	width: 100%;
	min-height: 46px;
	padding: 8px 12px;
	border: 1px solid #9eafc6;
	border-radius: 8px;
	background: #fff;
	color: var(--ink);
	font: inherit;
}

#login_password_field { margin-top: 14px; }

.login-form__options {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px 16px;
	flex-wrap: wrap;
	margin: 8px 0 10px;
}

.login-form .login-remember {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	margin: 0;
	font-weight: 500;
	cursor: pointer;
}

.login-remember input {
	width: 16px;
	height: 16px;
	margin: 0;
	accent-color: var(--blue);
}

.login-text-button {
	min-height: 44px;
	padding: 0;
	border: 0;
	background: none;
	color: var(--blue-hover);
	font: inherit;
	font-size: .875rem;
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}

.login-reset-status {
	margin: 10px 0 0;
	color: var(--blue-hover);
	font-size: .875rem;
}

.login-reset-status:empty { margin: 0; }
.login-reset-status.is-error { color: #8e3629; }

.login-footer {
	text-align: center;
	font-size: .8125rem;
}

.login-footer a {
	color: var(--muted);
	text-decoration: none;
}

.login-footer a:hover { text-decoration: underline; }

.login-page :focus-visible {
	outline: 3px solid #306bb1;
	outline-offset: 3px;
}

@media (max-width: 800px) {
	.login-page {
		width: min(100% - 36px, 520px);
		gap: 16px;
		padding: 20px 0;
	}

	.login-layout {
		grid-template-columns: minmax(0, 1fr);
		min-height: 0;
		border-radius: 18px;
	}

	.login-intro,
	.login-panel { padding: 28px 24px; }

	.login-intro__university { margin-bottom: 12px; }
	.login-intro__title { font-size: clamp(1.7rem, 6.2vw, 2.5rem); }
	.login-intro__description { margin-top: 10px; }
	.login-intro__break,
	.login-art { display: none; }
}

@media (max-width: 360px) {
	.login-intro,
	.login-panel { padding-inline: 18px; }
}
