/* Sign-in, in Flow's own identity (/login).
 *
 * Frappe's login page extends templates/web.html, so this file reaches it through
 * the web_include_css hook — the form, its validation, two-factor, «forgot
 * password» and the e-mail link all stay Frappe's and keep working after an
 * upgrade. We change the skin only, and flow_login.js adds the brand panel beside
 * the card.
 *
 * Every rule is scoped to body[data-path="login"]: the hook loads this file on
 * every website page, and nothing here may touch the Flow screens.
 */
@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Arabic:wght@300;400;500;600;700&family=Genos:wght@400;600&display=swap");

body[data-path="login"] {
	background: linear-gradient(168deg, #FAFDFF 0%, #EEF7FF 52%, #E6EFFC 100%);
	font-family: "IBM Plex Sans Arabic", system-ui, -apple-system, sans-serif;
	color: #001433;
	min-height: 100vh;
}
/* Frappe's own page chrome has nothing to say here */
body[data-path="login"] .web-footer,
body[data-path="login"] .navbar,
body[data-path="login"] .page-card .app-logo,
body[data-path="login"] .sign-up-message,
body[data-path="login"] section.for-signup { display: none; }

/* ---- the shell flow_login.js builds: form on the reading side, brand on the far one -- */
body[data-path="login"] .sf-login-shell {
	display: grid;
	grid-template-columns: 1fr 1.02fr;
	align-items: stretch;
	max-width: 940px;
	margin: 6vh auto;
	border-radius: 18px;
	overflow: hidden;
	background: #FFFFFF;
	box-shadow: 0 1px 2px rgba(0, 20, 51, .05), 0 28px 64px -28px rgba(2, 6, 23, .38);
}
body[data-path="login"] .sf-login-column {
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 34px 30px;
	min-width: 0;
}
/* the navy with the electric bloom in the panel's outer corner, as on the sidebar */
body[data-path="login"] .sf-login-brand {
	position: relative;
	overflow: hidden;
	color: #EAF2FF;
	padding: 34px 30px;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: 26px;
	background: radial-gradient(125% 95% at 0% 100%, #1030E8 0%, #0504AA 26%, #0A1240 58%, #020617 100%);
}
body[data-path="login"] .sf-login-motif {
	position: absolute;
	inset-inline-end: -18%;
	top: 50%;
	translate: 0 -50%;
	width: 78%;
	opacity: .14;
	pointer-events: none;
}
body[data-path="login"] .sf-login-lock { position: relative; display: flex; align-items: center; gap: 11px; }
body[data-path="login"] .sf-login-lock img { width: 44px; height: 44px; border-radius: 12px; flex: none; }
body[data-path="login"] .sf-login-wm {
	font-family: "Genos", "IBM Plex Sans Arabic", sans-serif;
	font-size: 29px; line-height: 1; direction: ltr;
	display: inline-flex; align-items: center; gap: .27em;
}
body[data-path="login"] .sf-login-wm .a { font-weight: 600; letter-spacing: .05em; color: #FFFFFF; }
body[data-path="login"] .sf-login-wm .rule { width: 1.5px; height: .78em; background: currentColor; border-radius: 1px; opacity: .85; }
body[data-path="login"] .sf-login-wm .b { font-weight: 400; letter-spacing: .02em; color: #34D399; }
body[data-path="login"] .sf-login-say { position: relative; display: flex; flex-direction: column; gap: 14px; }
body[data-path="login"] .sf-login-say p { margin: 0; font-size: 17px; font-weight: 500; line-height: 1.8; max-width: 22ch; }
body[data-path="login"] .sf-login-facts { display: flex; flex-wrap: wrap; gap: 7px; }
body[data-path="login"] .sf-login-facts span {
	font-size: 12px; font-weight: 600; padding: 4px 11px; border-radius: 999px;
	background: rgba(255, 255, 255, .11); border: 1px solid rgba(255, 255, 255, .18);
}

/* ---- Frappe's card, undressed: the shell is the card now ---------------------- */
body[data-path="login"] .page-card,
body[data-path="login"] .login-content {
	background: transparent;
	box-shadow: none;
	border: 0;
	padding: 0;
	max-width: 340px;
	width: 100%;
	margin-inline: auto;
}
body[data-path="login"] .page-card-head h4 { font-size: 20px; font-weight: 700; color: #001433; }
body[data-path="login"] .page-card-subtitle { color: #3D5873; font-size: 13px; }
body[data-path="login"] .form-group label,
body[data-path="login"] .page-card-body label { font-size: 12.5px; font-weight: 600; color: #3D5873; }
body[data-path="login"] .form-control {
	height: 44px;
	border: 1px solid #BFD6E8;
	border-radius: 10px;
	background: #FFFFFF;
	color: #001433;
	font-size: 13.5px;
	box-shadow: none;
}
body[data-path="login"] .form-control:focus {
	border-color: #0504AA;
	box-shadow: 0 0 0 4px rgba(5, 4, 170, .16);
}
body[data-path="login"] .btn-primary,
body[data-path="login"] .btn-login {
	height: 44px;
	border: 0;
	border-radius: 10px;
	font-weight: 600;
	font-size: 14px;
	background: linear-gradient(135deg, #0504AA 0%, #1030E8 100%);
	box-shadow: 0 10px 22px -12px rgba(5, 4, 170, .95);
}
body[data-path="login"] .btn-primary:hover,
body[data-path="login"] .btn-login:hover { background: linear-gradient(135deg, #0504AA 0%, #2F5BFF 100%); }
body[data-path="login"] a { color: #006C94; font-weight: 600; }
body[data-path="login"] .sf-login-foot { margin: 18px 0 0; font-size: 11.5px; color: #3D5873; text-align: center; }

@media (max-width: 880px) {
	body[data-path="login"] .sf-login-shell {
		grid-template-columns: 1fr;
		margin: 0;
		border-radius: 0;
		min-height: 100vh;
		box-shadow: none;
	}
	/* the panel becomes the band at the top, whatever the DOM order is */
	body[data-path="login"] .sf-login-brand { order: -1; padding: 24px 20px 26px; gap: 16px; }
	body[data-path="login"] .sf-login-brand .sf-login-say p { font-size: 15px; max-width: none; }
	body[data-path="login"] .sf-login-wm { font-size: 25px; }
	body[data-path="login"] .sf-login-motif { display: none; }
	body[data-path="login"] .sf-login-column { padding: 22px 18px 30px; }
}
