/* Allied Medical login: a brand panel with the product range, beside Frappe's own sign-in form. */

:root {
	--al-blue: #264796;
	--al-blue-dark: #0b1f4d;
	--al-teal: #19b5c4;
	--al-ink: #0f1b3d;
	--al-muted: #5b6785;
}

.al-shell {
	position: fixed;
	inset: 0;
	z-index: 1000;
	display: flex;
	background: #f4f7fc;
	font-family: Poppins, Inter, -apple-system, "Segoe UI", system-ui, sans-serif;
	overflow: auto;
}

/* ---------- brand panel ---------- */

.al-hero {
	position: relative;
	flex: 1 1 56%;
	min-width: 0;
	display: flex;
	flex-direction: column;
	padding: clamp(24px, 4vw, 56px) clamp(24px, 4.5vw, 72px) 0;
	color: #fff;
	overflow: hidden;
	background:
		radial-gradient(70% 55% at 78% 62%, rgba(25, 181, 196, 0.38), transparent 70%),
		radial-gradient(60% 50% at 10% 0%, rgba(120, 160, 255, 0.28), transparent 65%),
		linear-gradient(155deg, var(--al-blue-dark) 0%, #1a3680 46%, var(--al-blue) 100%);
}

/* A faint pattern of medical crosses. */
.al-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	opacity: 0.07;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56'%3E%3Cpath d='M26 18h4v8h8v4h-8v8h-4v-8h-8v-4h8z' fill='white'/%3E%3C/svg%3E");
}

.al-hero > * {
	position: relative;
}

.al-hero-logo {
	width: clamp(150px, 15vw, 220px);
	height: auto;
	align-self: flex-start;
}

.al-hero-copy {
	margin-top: clamp(20px, 5vh, 56px);
	max-width: 34rem;
}

.al-hero-copy h1 {
	margin: 0;
	font-size: clamp(28px, 3.3vw, 50px);
	font-weight: 600;
	line-height: 1.12;
	letter-spacing: -0.02em;
	color: #fff;
}

.al-hero-copy p {
	margin: 14px 0 0;
	font-size: clamp(13px, 1.1vw, 16px);
	color: rgba(255, 255, 255, 0.78);
	letter-spacing: 0.01em;
}

/* Product showcase: one product at a time, a soft crossfade. */
.al-stage {
	position: relative;
	flex: 1 1 auto;
	min-height: 220px;
	margin: clamp(8px, 2vh, 24px) 0 0;
}

.al-slide {
	position: absolute;
	inset: 0;
	margin: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 14px;
	opacity: 0;
	animation: al-slide 20s ease-in-out infinite both;
}

.al-slide:nth-child(2) { animation-delay: 5s; }
.al-slide:nth-child(3) { animation-delay: 10s; }
.al-slide:nth-child(4) { animation-delay: 15s; }

.al-slide img {
	max-width: min(78%, 460px);
	max-height: calc(100% - 44px);
	object-fit: contain;
	filter: drop-shadow(0 24px 28px rgba(3, 12, 40, 0.45));
}

.al-slide figcaption {
	font-size: 14px;
	font-weight: 500;
	letter-spacing: 0.02em;
	color: #fff;
	padding: 6px 16px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.12);
	border: 1px solid rgba(255, 255, 255, 0.22);
	backdrop-filter: blur(6px);
}

@keyframes al-slide {
	0% { opacity: 0; transform: translateY(14px) scale(0.97); }
	5%, 22% { opacity: 1; transform: none; }
	27%, 100% { opacity: 0; transform: translateY(-8px) scale(0.99); }
}

.al-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0 0 clamp(52px, 9vh, 92px);
	list-style: none;
}

.al-chips li {
	padding: 6px 14px;
	border-radius: 999px;
	font-size: 12px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.7);
	border: 1px solid rgba(255, 255, 255, 0.22);
	animation: al-chip 20s linear infinite both;
}

.al-chips li:nth-child(2) { animation-delay: 5s; }
.al-chips li:nth-child(3) { animation-delay: 10s; }
.al-chips li:nth-child(4) { animation-delay: 15s; }

@keyframes al-chip {
	0%, 24% { color: var(--al-blue-dark); background: #fff; border-color: #fff; }
	27%, 100% { color: rgba(255, 255, 255, 0.7); background: transparent; border-color: rgba(255, 255, 255, 0.22); }
}

/* A heartbeat line along the bottom edge. */
.al-ecg {
	position: absolute !important;
	left: 0;
	right: 0;
	bottom: 0;
	width: 100%;
	height: clamp(48px, 9vh, 84px);
	opacity: 0.9;
}

.al-ecg path {
	fill: none;
	stroke: var(--al-teal);
	stroke-width: 2.4;
	stroke-linejoin: round;
	stroke-linecap: round;
	stroke-dasharray: 1800;
	stroke-dashoffset: 1800;
	animation: al-ecg 6s linear infinite;
	filter: drop-shadow(0 0 6px rgba(25, 181, 196, 0.8));
}

@keyframes al-ecg {
	0% { stroke-dashoffset: 1800; }
	70%, 100% { stroke-dashoffset: 0; }
}

/* ---------- sign-in panel ---------- */

.al-panel {
	flex: 1 1 44%;
	min-width: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 32px clamp(20px, 4vw, 64px);
	background: #fff;
}

.al-panel-inner {
	width: 100%;
	max-width: 400px;
}

.al-eyebrow {
	margin-bottom: 18px;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--al-teal);
}

/* The logo is in the brand panel. */
.al-panel .page-card-head .app-logo {
	display: none;
}

.al-shell .al-panel .page-card {
	padding: 0;
	max-width: none;
	background: transparent;
	border: 0;
	box-shadow: none;
	min-height: 0;
}

.al-panel .page-card-head h4 {
	font-size: 32px;
	font-weight: 600;
	letter-spacing: -0.02em;
	color: var(--al-ink);
}

.al-panel .page-card-subtitle {
	font-size: 14px;
	color: var(--al-muted);
}

.al-shell .al-panel .page-card .page-card-body label {
	font-size: 13px;
	font-weight: 500;
	color: var(--al-ink);
}

.al-shell .al-panel .page-card .page-card-body input[type="text"],
.al-shell .al-panel .page-card .page-card-body input[type="email"],
.al-shell .al-panel .page-card .page-card-body input[type="password"] {
	height: 44px;
	padding: 0 14px;
	font-size: 15px;
	border: 1px solid #d5dcec;
	border-radius: 10px;
	background: #f8faff;
	transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.al-shell .al-panel .page-card .page-card-body input:focus {
	outline: 0;
	background: #fff;
	border-color: var(--al-blue);
	box-shadow: 0 0 0 4px rgba(38, 71, 150, 0.14);
}

.al-panel .page-card-body a {
	color: var(--al-blue);
	font-weight: 500;
}

.al-shell .al-panel .page-card .es-button {
	height: 46px;
	border: 0;
	border-radius: 10px;
	font-size: 15px;
	font-weight: 600;
	color: #fff;
	background: linear-gradient(135deg, #2f58b8 0%, var(--al-blue) 55%, #1d3a85 100%);
	box-shadow: 0 8px 20px rgba(38, 71, 150, 0.32);
	transition: transform 0.15s, box-shadow 0.15s, filter 0.15s;
}

.al-shell .al-panel .page-card .es-button:hover {
	transform: translateY(-1px);
	filter: brightness(1.06);
	box-shadow: 0 12px 26px rgba(38, 71, 150, 0.38);
}

.al-shell .al-panel .page-card .es-button.btn-login-option,
.al-shell .al-panel .page-card .es-button.btn-ldap-login {
	color: var(--al-blue);
	background: #fff;
	border: 1px solid #d5dcec;
	box-shadow: none;
}

.al-panel .sign-up-message,
.al-panel .page-card a {
	font-size: 13px;
}

.al-copy {
	margin: 36px 0 0;
	font-size: 12px;
	color: #8a93ab;
	text-align: center;
}

/* ---------- phones and tablets: a compact brand banner above the form ---------- */

@media (max-width: 900px) {
	.al-shell {
		flex-direction: column;
	}

	.al-hero {
		flex: 0 0 auto;
		padding: 22px 24px 40px;
	}

	.al-hero-logo {
		width: 140px;
	}

	.al-hero-copy {
		margin-top: 14px;
	}

	.al-hero-copy h1 {
		font-size: 21px;
		text-wrap: balance;
	}

	.al-hero-copy p {
		margin-top: 6px;
		font-size: 12px;
		text-wrap: balance;
	}

	.al-hero-copy br,
	.al-stage,
	.al-chips,
	.al-ecg {
		display: none;
	}

	.al-panel {
		flex: 1 0 auto;
		align-items: flex-start;
		padding: 28px 22px 32px;
		border-radius: 22px 22px 0 0;
		margin-top: -16px;
		position: relative;
	}

	.al-panel .page-card-head h4 {
		font-size: 26px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.al-slide,
	.al-chips li,
	.al-ecg path {
		animation: none;
	}

	.al-slide:first-child {
		opacity: 1;
	}

	.al-ecg path {
		stroke-dashoffset: 0;
	}
}
