/* Agriventure - the login page, dressed to match the app.
 *
 * Only inside the app: the class comes from agriventure-login.js, which looks for
 * the shell's user agent. A browser never gets it, so the standard Frappe login is
 * untouched there.
 *
 * This is paint, not plumbing. Frappe's own form, its own fields and its own submit
 * are all still underneath - if every rule here failed to load, the page would still
 * log people in.
 */
html.agri-app body[data-path="login"] {
	--rv-green: #2F9E44;
	--rv-green-deep: #1F7A34;
	--rv-ink: #16231a;
	--rv-ink-2: #4b5a50;
	--rv-field: #f3f7f3;
	--rv-border: #e2e9e3;

	background:
		radial-gradient(1100px 520px at 12% -8%, rgba(64, 192, 87, .18), transparent 60%),
		radial-gradient(900px 520px at 100% 4%, rgba(47, 158, 68, .13), transparent 55%),
		#eef2ee !important;
	font-family: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
	min-height: 100dvh;
}

/* ---- the logo and the strapline above the card ---- */
html.agri-app body[data-path="login"] .page-card-head img.app-logo {
	width: 230px; max-width: 74%; height: auto; margin: 0 auto 6px;
}
html.agri-app body[data-path="login"] .page-card-head h4 {
	font-size: 13.5px; font-weight: 600; color: var(--rv-ink-2); text-align: center;
}

/* ---- the card ---- */
html.agri-app body[data-path="login"] .login-content.page-card {
	background: #fff; border: 0; border-radius: 22px;
	box-shadow: 0 20px 50px rgba(20, 60, 32, .14);
	padding: 22px 20px 20px; max-width: 460px; margin: 0 auto;
	position: relative; overflow: hidden;
}
/* the green edge along the top of the card */
html.agri-app body[data-path="login"] .login-content.page-card::before {
	content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px;
	background: linear-gradient(135deg, #48B85E 0%, #2E8B46 100%);
}

/* ---- the two lines the app opens with ---- */
html.agri-app body[data-path="login"] .form-login .page-card-body::before {
	content: "Welcome back"; display: block;
	font-size: 25px; font-weight: 700; color: var(--rv-ink); line-height: 1.2;
}
html.agri-app body[data-path="login"] .form-login .page-card-body::after {
	content: ""; display: block; height: 0;
}
html.agri-app body[data-path="login"] .form-login .page-card-body {
	padding-top: 4px;
}
html.agri-app body[data-path="login"] .form-login .page-card-body > .form-group:first-of-type {
	margin-top: 16px;
}

/* ---- the fields ---- */
html.agri-app body[data-path="login"] .form-label.sr-only {
	position: static !important; width: auto !important; height: auto !important;
	clip: auto !important; overflow: visible !important; white-space: normal !important;
	display: block; margin: 0 0 7px 2px;
	font-size: 14px; font-weight: 600; color: var(--rv-ink);
}
html.agri-app body[data-path="login"] .form-control,
html.agri-app body[data-path="login"] input[type="text"],
html.agri-app body[data-path="login"] input[type="email"],
html.agri-app body[data-path="login"] input[type="password"] {
	background: var(--rv-field) !important;
	border: 1px solid transparent !important; border-radius: 14px !important;
	min-height: 54px; padding: 0 15px !important;
	font-size: 16px; color: var(--rv-ink);
	box-shadow: none !important;
}
html.agri-app body[data-path="login"] .form-control:focus {
	border-color: var(--rv-green) !important;
	box-shadow: 0 0 0 3px rgba(47, 158, 68, .12) !important;
}
html.agri-app body[data-path="login"] .form-group { margin-bottom: 15px; }

/* ---- Sign in ---- */
html.agri-app body[data-path="login"] .btn-login {
	background: linear-gradient(135deg, #48B85E 0%, #2E8B46 100%) !important;
	border: 0 !important; border-radius: 14px !important;
	min-height: 56px; width: 100%;
	font-size: 17px; font-weight: 700; color: #fff !important;
	box-shadow: 0 10px 24px rgba(47, 158, 68, .28);
}
html.agri-app body[data-path="login"] .btn-login:active { transform: scale(.995); }

html.agri-app body[data-path="login"] .forgot-password-message {
	text-align: right; font-size: 13px; margin: -4px 0 14px;
}
html.agri-app body[data-path="login"] .forgot-password-message a { color: var(--rv-ink-2); }

/* the app signs in with a password; the email-link route and the divider that
   introduces it are noise on a phone that is about to open a till */
html.agri-app body[data-path="login"] .social-logins,
html.agri-app body[data-path="login"] .login-divider,
html.agri-app body[data-path="login"] .login-with-email-link { display: none !important; }

/* ---- the line the app closes the card with ---- */
html.agri-app body[data-path="login"] .form-login .page-card-actions::after {
	content: "Secure sign-in \00b7 powered by DUX Digitech";
	display: block; margin-top: 16px; text-align: center;
	font-size: 12px; color: #8a988e;
}
