/* TeliCRM bespoke login page — pairs with teli_crm/www/login.html
   Replaces frappe's login.bundle.css on /login only.
   Re-themed to the Fauvist "Painterly wash" design (docs/fauvist/). */

/* ---------------------------------------------------------------- layout */

.teli-login {
	--teli-cobalt: #123786;
	--teli-ember: #cf4c0f;
	--teli-magenta: #a51c52;
	--teli-parchment: #f4efe6;
	--teli-ink: #0a1a2f;
	--teli-line: #ded6c8;
	--teli-input: #fffdf9;
	/* the twelve sampled paint hues */
	--teli-sea: #004f7d;
	--teli-petrol: #006479;
	--teli-teal: #007670;
	--teli-jade: #026d48;
	--teli-olive: #7ea540;
	--teli-sulphur: #d5ad17;
	--teli-coral: #e2373c;
	--teli-plum: #682b6c;
	--teli-lilac: #c6afc0;
	--teli-canopy-dark: #0a2440;
	--teli-trunk: #e8b98f;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

	min-height: 100vh;
	display: grid;
	grid-template-columns: 1.05fr 1fr;
	overflow-x: hidden;
}

/* Pre-hide non-default routes so sections don't flash stacked before
   login.js routes (core relied on login.bundle.css for this). Safe:
   jQuery .toggle() writes inline styles which override these rules. */
.teli-login section.for-forgot,
.teli-login section.for-signup,
.teli-login section.for-email-login,
.teli-login section.for-login-with-email-link {
	display: none;
}

/* brand panel — painterly wash ------------------------------------------ */

.teli-login-brand {
	position: relative;
	overflow: hidden;
	isolation: isolate;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	padding: 56px 60px;
}

/* z0 — blurred colour masses */
.teli-login-paint {
	position: absolute;
	inset: 0;
	z-index: 0;
}

.teli-login-paint span {
	position: absolute;
	display: block;
	filter: blur(26px);
}

/* lilac sky band, top right */
.teli-login-paint .p-sky {
	left: 52%;
	top: -8%;
	width: 70%;
	height: 46%;
	background: var(--teli-lilac);
	opacity: 0.95;
	border-radius: 40% 60% 55% 45%;
}

/* cobalt canopy */
.teli-login-paint .p-canopy {
	left: -10%;
	top: -14%;
	width: 78%;
	height: 58%;
	background: var(--teli-cobalt);
	opacity: 0.94;
	border-radius: 52% 48% 44% 56%;
}

/* dark foliage mass */
.teli-login-paint .p-foliage {
	left: 14%;
	top: 6%;
	width: 62%;
	height: 52%;
	background: var(--teli-canopy-dark);
	opacity: 0.9;
	border-radius: 58% 42% 50% 50%;
}

/* olive/lime foliage highlight */
.teli-login-paint .p-lime {
	left: 34%;
	top: 20%;
	width: 48%;
	height: 34%;
	background: var(--teli-olive);
	opacity: 0.85;
	border-radius: 50% 50% 46% 54%;
}

/* sulphur flash */
.teli-login-paint .p-sulphur {
	left: 44%;
	top: 26%;
	width: 30%;
	height: 22%;
	background: var(--teli-sulphur);
	opacity: 0.7;
	border-radius: 52% 48% 50% 50%;
}

/* plum accent */
.teli-login-paint .p-plum {
	left: 30%;
	top: 40%;
	width: 20%;
	height: 30%;
	background: var(--teli-plum);
	opacity: 0.55;
	border-radius: 50%;
}

/* magenta trunk accent */
.teli-login-paint .p-magenta {
	left: 4%;
	top: 16%;
	width: 16%;
	height: 52%;
	background: var(--teli-magenta);
	opacity: 0.72;
	border-radius: 60% 40% 44% 56%;
}

/* pale warm trunk */
.teli-login-paint .p-trunk {
	left: 40%;
	top: 22%;
	width: 11%;
	height: 62%;
	background: var(--teli-trunk);
	opacity: 0.8;
	border-radius: 46% 54% 48% 52%;
}

/* teal shallow */
.teli-login-paint .p-teal {
	left: 40%;
	top: 50%;
	width: 34%;
	height: 26%;
	background: var(--teli-teal);
	opacity: 0.8;
	border-radius: 52% 48% 48% 52%;
}

/* petrol sea band */
.teli-login-paint .p-sea {
	left: 46%;
	top: 44%;
	width: 66%;
	height: 40%;
	background: var(--teli-petrol);
	opacity: 0.92;
	border-radius: 46% 54% 50% 50%;
}

/* deep sea */
.teli-login-paint .p-seadeep {
	left: 60%;
	top: 56%;
	width: 52%;
	height: 36%;
	background: var(--teli-sea);
	opacity: 0.9;
	border-radius: 50% 50% 46% 54%;
}

/* jade foliage lower-left */
.teli-login-paint .p-jade {
	left: -8%;
	bottom: 6%;
	width: 44%;
	height: 40%;
	background: var(--teli-jade);
	opacity: 0.86;
	border-radius: 52% 48% 46% 54%;
}

/* ember ground strip */
.teli-login-paint .p-ground {
	left: -12%;
	bottom: -16%;
	width: 86%;
	height: 38%;
	background: var(--teli-ember);
	opacity: 0.92;
	border-radius: 48% 52% 44% 56%;
}

/* coral ground highlight */
.teli-login-paint .p-ground2 {
	left: 6%;
	bottom: -8%;
	width: 46%;
	height: 26%;
	background: var(--teli-coral);
	opacity: 0.72;
	border-radius: 50% 50% 48% 52%;
}

/* z1 — legibility scrim (load-bearing layer, do not remove) */
.teli-login-wash {
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	background:
		radial-gradient(120% 80% at 20% 40%, rgba(6, 20, 38, 0.62) 0%, rgba(6, 20, 38, 0.30) 46%, rgba(6, 20, 38, 0.06) 72%),
		linear-gradient(180deg, rgba(6, 20, 38, 0.42) 0%, rgba(6, 20, 38, 0.16) 40%, rgba(6, 20, 38, 0.55) 100%);
}

/* z2 — feTurbulence grain */
.teli-login-grain {
	position: absolute;
	inset: 0;
	z-index: 2;
	opacity: 0.16;
	mix-blend-mode: overlay;
	pointer-events: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* z3 — content above the paint */

.teli-login-mark {
	display: flex;
	align-items: center;
	gap: 12px;
	position: relative;
	z-index: 3;
}

.teli-login-logo-tile {
	width: 42px;
	height: 42px;
	border-radius: 12px;
	background: var(--teli-parchment);
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
}

.teli-login-logo {
	max-width: 30px;
	max-height: 30px;
	object-fit: contain;
	display: block;
}

.teli-login-app-name {
	font-size: 17px;
	font-weight: 800;
	letter-spacing: -0.025em;
	color: #fff;
	text-shadow: 0 1px 14px rgba(4, 14, 28, 0.5);
	margin: 0;
}

.teli-login-app-sub {
	display: block;
	font-weight: 600;
	font-size: 10.5px;
	letter-spacing: 0.15em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.72);
}

.teli-login-copy {
	position: relative;
	z-index: 3;
	max-width: 450px;
}

.teli-login-eyebrow {
	display: inline-block;
	font-size: 11.5px;
	font-weight: 800;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: #ffd9a8;
	border: 1px solid rgba(255, 217, 168, 0.45);
	background: rgba(207, 76, 15, 0.28);
	padding: 6px 13px;
	border-radius: 999px;
	margin-bottom: 22px;
	backdrop-filter: blur(6px);
}

.teli-login-headline {
	font-size: clamp(36px, 4.2vw, 58px);
	line-height: 1.0;
	letter-spacing: -0.04em;
	font-weight: 800;
	color: #fff;
	text-shadow: 0 2px 22px rgba(4, 14, 28, 0.55);
	margin: 0;
}

.teli-login-headline em {
	font-style: italic;
	color: #ffcf6b;
}

.teli-login-tagline {
	margin: 20px 0 0;
	font-size: 16.5px;
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.88);
	max-width: 38ch;
	text-shadow: 0 1px 14px rgba(4, 14, 28, 0.6);
}

.teli-login-stats {
	display: flex;
	gap: 36px;
	position: relative;
	z-index: 3;
	flex-wrap: wrap;
}

.teli-login-stat-v {
	font-size: 26px;
	font-weight: 800;
	letter-spacing: -0.03em;
	color: #fff;
	text-shadow: 0 1px 16px rgba(4, 14, 28, 0.6);
}

.teli-login-stat-k {
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.66);
	margin-top: 3px;
}

/* form column ---------------------------------------------------------- */

.teli-login-form {
	background-color: var(--teli-parchment);
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	padding: 48px 32px;
	min-height: 100vh;
}

/* ---------------------------------------------------------------- cards */

/* Flex column shrink-wraps sections to content width — make them fill the
   column so every card reaches the same 400px cap (Sign In was ~280px). */
.teli-login .teli-login-form section {
	width: 100%;
}

.teli-login .login-content.page-card {
	width: 100%;
	max-width: 400px;
	/* sections are full column width (see above) — centre the capped card */
	margin-inline: auto;
	box-shadow: none;
	border-radius: 8px;
	padding: 0;
	background: transparent;
	border: 0;
}

.teli-login .page-card-head {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 28px;
}

.teli-login .teli-login-card-eyebrow {
	display: block;
	font-size: 11.5px;
	font-weight: 800;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--teli-ember);
	margin-bottom: 8px;
}

.teli-login .page-card-head-text h4 {
	font-size: 30px;
	font-weight: 800;
	letter-spacing: -0.035em;
	color: var(--teli-ink);
	margin: 0 0 4px;
}

.teli-login .page-card-subtitle {
	font-size: 14.5px;
	color: #5c6470;
	margin: 0;
}

.teli-login .page-card-body {
	padding: 0;
}

.teli-login .page-card-actions {
	padding: 0;
}

/* ---------------------------------------------------------------- forms */

.teli-login .form-group {
	margin-bottom: 20px;
}

.teli-login .form-label {
	display: block;
	font-size: 13px;
	font-weight: 700;
	color: var(--teli-ink);
	margin-bottom: 8px;
}

.teli-login .email-field,
.teli-login .password-field {
	position: relative;
}

.teli-login .form-control {
	display: block;
	width: 100%;
	height: 51px;
	padding: 0 16px;
	font-size: 15px;
	color: var(--teli-ink);
	background-color: var(--teli-input);
	border: 1.5px solid var(--teli-line);
	border-radius: 12px;
	box-shadow: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.teli-login .form-control:focus {
	border-color: var(--teli-ember);
	outline: none;
	background-color: #fff;
	box-shadow: 0 0 0 4px rgba(207, 76, 15, 0.13);
}

.teli-login .email-field .form-control,
.teli-login .password-field .form-control {
	padding-right: 40px;
	padding-left: 38px;
}

.teli-login .form-control::placeholder {
	color: #a9a49a;
}

.teli-login .field-icon {
	position: absolute;
	left: 14px;
	top: 50%;
	transform: translateY(-50%);
	width: 16px;
	height: 16px;
	fill: #8d8578;
	pointer-events: none;
}

.teli-login .toggle-password {
	position: absolute;
	right: 10px;
	top: 50%;
	transform: translateY(-50%);
	padding: 4px;
	background: none;
	border: 0;
	line-height: 0;
	cursor: pointer;
}

.teli-login .toggle-password svg {
	display: block;
	fill: #8d8578;
}

.teli-login .toggle-password:hover svg {
	fill: var(--teli-ink);
}

.teli-login .field-error {
	color: #d63333;
	font-size: 13px;
	margin: 6px 0 0;
}

.teli-login .field-error:empty {
	display: none;
}

.teli-login .form-group.invalid input,
.teli-login .page-card-body.invalid input {
	border-color: #d63333;
}

.teli-login .forgot-password-message {
	font-size: 13px;
	margin: 10px 0 0;
}

/* ---------------------------------------------------------------- links */

.teli-login a {
	color: var(--teli-magenta);
	text-decoration: none;
	border-bottom: 1.5px solid var(--teli-ember);
}

.teli-login a:hover {
	color: var(--teli-ember);
	text-decoration: none;
}

/* -------------------------------------------------------------- buttons */

.teli-login .btn-login,
.teli-login .btn-login-option,
.teli-login .btn-forgot,
.teli-login .btn-signup {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 53px;
	padding: 0 16px;
	font-size: 15px;
	font-weight: 700;
	border-radius: 12px;
	border: 1px solid transparent;
	cursor: pointer;
	text-align: center;
	box-shadow: none;
	text-shadow: none;
}

.teli-login .btn-login,
.teli-login .btn-forgot,
.teli-login .btn-signup {
	background-color: var(--teli-cobalt);
	border-color: var(--teli-cobalt);
	color: #fff;
}

.teli-login .btn-login:hover,
.teli-login .btn-forgot:hover:not(:disabled),
.teli-login .btn-signup:hover:not(:disabled) {
	background-color: var(--teli-ember);
	border-color: var(--teli-ember);
	transform: translateY(-1px);
	color: #fff;
	text-decoration: none;
}

.teli-login .btn-login:focus {
	background-color: var(--teli-cobalt);
	border-color: var(--teli-cobalt);
	color: #fff;
	text-decoration: none;
}

.teli-login .btn-login:disabled,
.teli-login .btn-forgot:disabled,
.teli-login .btn-signup:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.teli-login .btn-login-option {
	background-color: var(--teli-input);
	border-color: var(--teli-line);
	color: var(--teli-ink);
}

.teli-login .btn-login-option:hover {
	border-color: var(--teli-ember);
	color: var(--teli-ink);
	text-decoration: none;
}

.teli-login .btn-login-option img {
	max-height: 18px;
	vertical-align: middle;
	margin-right: 6px;
}

/* social logins */
.teli-login .social-logins {
	margin-top: 16px;
}

.teli-login .login-button-wrapper {
	margin-top: 10px;
}

/* -------------------------------------------------------------- banners */

.teli-login .login-error-banner {
	align-items: center;
	gap: 8px;
	background-color: #fdecec;
	border: 1px solid #f5b5b5;
	border-radius: 8px;
	color: #a32222;
	font-size: 13px;
	padding: 10px 12px;
	margin-bottom: 20px;
}

.teli-login .login-error-banner svg {
	flex: 0 0 auto;
	fill: #d63333;
}

.teli-login .login-success-banner {
	align-items: center;
	gap: 8px;
	background-color: #e8f6ec;
	border: 1px solid #b3e0bf;
	border-radius: 8px;
	color: #1e7a37;
	font-size: 13px;
	padding: 10px 12px;
	margin-bottom: 20px;
}

.teli-login .login-success-banner svg {
	flex: 0 0 auto;
	fill: #1e7a37;
}

.teli-login .resend-link {
	font-size: 13px;
	color: #5a6577;
	margin: 14px 0 10px;
}

/* -------------------------------------------------------------- misc UI */

.teli-login .sign-up-message {
	text-align: center;
	font-size: 14px;
	color: #5a6577;
	margin-top: 20px;
}

.teli-login .signup-disabled-message .indicator {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 999px;
	background-color: #eceff3;
	color: #5a6577;
	font-size: 12px;
	font-weight: 600;
}

.teli-login .signup-disabled-message .btn-primary {
	display: inline-block;
	width: auto;
	background-color: var(--teli-cobalt);
	border-color: var(--teli-cobalt);
	color: #fff;
	padding: 8px 20px;
	border-radius: 8px;
}

.teli-login .teli-login-noscript {
	max-width: 420px;
	width: 100%;
	background-color: #fdecec;
	border: 1px solid #f5b5b5;
	border-radius: 8px;
	padding: 16px 20px;
	margin-bottom: 24px;
}

.teli-login .teli-login-noscript h4 {
	color: #a32222;
	margin: 0 0 8px;
}

.teli-login .teli-login-noscript p {
	color: #a32222;
	margin: 0;
}

/* invalid-login shake on the card (login.js adds/removes .invalid-login) */
.teli-login .login-content.page-card.invalid-login {
	animation: teli-login-shake 0.4s ease;
}

@keyframes teli-login-shake {
	0%, 100% { transform: translateX(0); }
	25% { transform: translateX(-4px); }
	75% { transform: translateX(4px); }
}

/* ------------------------------------------------------------ responsive */

@media (max-width: 900px) {
	.teli-login {
		grid-template-columns: 1fr;
	}

	.teli-login-brand {
		padding: 44px 32px;
		min-height: 56vh;
	}

	.teli-login-headline {
		font-size: 38px;
	}

	.teli-login-stats {
		margin-top: 34px;
	}

	.teli-login-form {
		min-height: auto;
		padding: 32px 20px 48px;
	}
}

@media (max-width: 520px) {
	.teli-login-brand {
		padding: 34px 24px;
		min-height: 52vh;
	}

	.teli-login-headline {
		font-size: 31px;
	}

	.teli-login .page-card-head-text h4 {
		font-size: 26px;
	}

	.teli-login-form {
		padding: 36px 20px 52px;
	}
}
