/* Login page - all colours come from CSS variables set inline from authenticate/login_theme.php */
.ljx-login, .ljx-login * { box-sizing: border-box; }
html, body.ljx-login { height: 100%; margin: 0; }
body.ljx-login {
	background: var(--ljx-page); padding: 24px; min-height: 100vh;
	color: var(--ljx-black);
	font-family: Inter, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}
.ljx-shell {
	display: flex; min-height: calc(100vh - 48px); border-radius: 22px; overflow: hidden;
	background: var(--ljx-surface); box-shadow: 0 24px 60px rgba(var(--ljx-overlay-rgb), .28);
}

/* ---- Branding panel ---- */
.ljx-brand {
	position: relative; flex: 0 0 var(--ljx-split); max-width: var(--ljx-split);
	display: flex; flex-direction: column; justify-content: center;
	padding: 48px 5% 48px 6%; color: #fff; overflow: hidden;
	background: linear-gradient(135deg, var(--ljx-charcoal), var(--ljx-black) 60%, var(--ljx-navy));
}
.ljx-brand::after {   /* photo layer */
	content: ""; position: absolute; inset: 0 -9% 0 9%; z-index: 0; filter: var(--ljx-bg-filter, none); /* offset + fade keeps the jewellery in the right half, clear of the text */
	-webkit-mask-image: linear-gradient(90deg, transparent 0, #000 35%); mask-image: linear-gradient(90deg, transparent 0, #000 35%);
	background: var(--ljx-bg-img, none) var(--ljx-bg-pos) / var(--ljx-bg-size) no-repeat;
}
.ljx-brand::before {   /* tint: solid on the text side, easing off so the jewellery stays visible */
	content: ""; position: absolute; inset: 0; z-index: 1;
	background: linear-gradient(90deg, rgba(var(--ljx-overlay-rgb), var(--ljx-overlay)) 0%, rgba(var(--ljx-overlay-rgb), calc(var(--ljx-overlay) * .5)) 42%, rgba(var(--ljx-overlay-rgb), 0) 78%);
}
.ljx-brand > * { position: relative; z-index: 2; }
.ljx-brand-body, .ljx-brand-msg { text-shadow: 0 1px 10px rgba(var(--ljx-overlay-rgb), .9), 0 0 3px rgba(var(--ljx-overlay-rgb), .8); }
.ljx-brand-top { position: absolute; top: 40px; left: 6%; margin: 0; }
.ljx-brand-logo { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ljx-brand-logo svg { flex: 0 0 auto; width: 42px; height: 38px; color: #fff; }
.ljx-brand-logo .ljx-logo-img { flex: 0 0 auto; height: 46px; width: auto; max-width: 150px; }
.ljx-logo-img--invert { filter: brightness(0) invert(1); } /* dark client logo -> white on the navy hero */
.ljx-brand-name { font-size: 22px; font-weight: 600; line-height: 1.1; overflow-wrap: anywhere; }
.ljx-brand-name em { font-style: normal; }
.ljx-tagline { color: rgba(255,255,255,.8); font-size: 11.5px; margin-top: 3px; letter-spacing: .3px; }
.ljx-brand-body { margin-top: 70px; }
.ljx-headline, .ljx-desc { max-width: 68%; }
.ljx-headline { font-family: Georgia, "Times New Roman", serif; font-size: clamp(28px, 3vw, 44px); line-height: 1.18; font-weight: 400; margin: 0 0 18px; overflow-wrap: anywhere; }
.ljx-headline em { display: block; font-style: normal; color: var(--ljx-accent-light); }
.ljx-desc { color: rgba(255,255,255,.82); font-size: 15px; line-height: 1.6; margin-bottom: 34px; }
.ljx-features { list-style: none; padding: 0; margin: 0; max-width: 56%; }
.ljx-features li { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; min-width: 0; }
.ljx-feat-icon { flex: 0 0 34px; text-align: center; color: var(--ljx-accent-light); font-size: 26px; }
.ljx-feat-title { font-weight: 500; font-size: 14px; overflow-wrap: anywhere; }
.ljx-feat-desc { color: rgba(255,255,255,.65); font-size: 12px; margin-top: 2px; overflow-wrap: anywhere; }
/* row layout: four compact items across the bottom of the panel, titles only */
.ljx-features--row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; max-width: none; margin-top: 150px; }
.ljx-features--row li { margin: 0; gap: 10px; }
.ljx-features--row .ljx-feat-icon { flex-basis: 28px; font-size: 22px; }
.ljx-features--row .ljx-feat-title { font-size: 13px; line-height: 1.3; }
.ljx-features--row .ljx-feat-desc { display: none; }
.ljx-brand-msg { position: absolute; left: 6%; right: 5%; bottom: 34px; color: rgba(255,255,255,.7); font-size: 12px; letter-spacing: 2px; text-transform: uppercase; }

/* Artwork mode: the image carries the branding text, so no tint; HTML text stays for screen readers / mobile */
.ljx-brand--art::before { display: none; }
@media (min-width: 768px) {
	.ljx-brand--art .ljx-brand-top, .ljx-brand--art .ljx-brand-body, .ljx-brand--art .ljx-brand-msg {
		position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
	}
}

/* ---- Form panel ---- */
.ljx-formpane {
	position: relative; flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
	padding: 40px clamp(24px, 4vw, 70px); background-color: var(--ljx-surface); overflow: hidden;
}
.ljx-formpane::before {   /* optional art behind the form */
	content: ""; position: absolute; inset: 0; background: var(--ljx-form-bg) right bottom / cover no-repeat; opacity: .35; pointer-events: none;
}
.ljx-formpane > * { position: relative; }
.ljx-corner { position: absolute; top: 40px; right: -26px; width: 130px; opacity: .6; pointer-events: none; }
.ljx-corner polygon, .ljx-corner path { fill: none; stroke: var(--ljx-border); stroke-width: 1.6; }
.ljx-curves { position: absolute; right: 0; bottom: 0; width: 55%; opacity: .6; pointer-events: none; }
.ljx-curves path { fill: none; stroke: var(--ljx-border); stroke-width: 1; }
.ljx-card { width: 100%; max-width: 460px; }
.ljx-card-logo { text-align: center; margin-bottom: 18px; }
.ljx-card-logo { margin-bottom: 14px; }
/* client logo pinned to the top of the white panel (own block, so the centred form below is unaffected) */
.ljx-top-logo { position: absolute; top: 36px; left: 0; right: 0; text-align: center; }
.ljx-top-logo .ljx-logo-img { display: inline-block; height: auto; width: 224px; max-width: 80%; }   /* explicit width: the logo file is only 180px wide, this scales it up ~25% */
.ljx-top-logo svg { width: 74px; height: 66px; color: var(--ljx-accent); }
.ljx-formname { margin-top: 8px; font-size: 30px; font-weight: 700; color: var(--ljx-navy); overflow-wrap: anywhere; }
.ljx-formname em { font-style: normal; color: inherit; font-weight: inherit; } /* whole name in one colour */
.ljx-card h1 { font-size: 18px; font-weight: 500; letter-spacing: .4px; color: var(--ljx-navy); margin: 0 0 28px; text-align: center; }
.ljx-card .ljx-sub { text-align: center; color: var(--ljx-muted); margin: -16px 0 22px; font-size: 13px; }
.ljx-field { margin-bottom: 16px; }
.ljx-field label { display: block; font-size: 13px; font-weight: 600; color: var(--ljx-navy); margin-bottom: 6px; }
.ljx-input { position: relative; }
.ljx-input > .ljx-ico { position: absolute; left: 16px; top: 50%; width: 20px; height: 20px; margin-top: -10px; fill: none; stroke: var(--ljx-accent); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.ljx-toggle svg, .ljx-security svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ljx-input input {
	width: 100%; height: 52px; padding: 0 48px 0 50px; font-size: 15px; color: var(--ljx-black);
	background: #fff; border: 1px solid var(--ljx-border); border-radius: 9px; outline: 0;
	transition: border-color .15s, box-shadow .15s;
}
.ljx-input input::placeholder { color: var(--ljx-muted); }
.ljx-input input:focus { border-color: var(--ljx-accent-2); box-shadow: 0 0 0 2px var(--ljx-accent-2); }
.ljx-field.has-error .ljx-input input { border-color: #c0392b; }
.ljx-field .ljx-fielderr { display: none; color: #c0392b; font-size: 12px; margin-top: 4px; }
.ljx-field.has-error .ljx-fielderr { display: block; }
.ljx-toggle { position: absolute; right: 8px; top: 8px; width: 36px; height: 36px; border: 0; background: transparent; color: var(--ljx-accent); cursor: pointer; border-radius: 6px; }
.ljx-toggle:hover { color: var(--ljx-accent-2); }
.ljx-toggle:focus-visible, .ljx-btn:focus-visible, .ljx-row a:focus-visible { outline: 2px solid var(--ljx-accent-2); outline-offset: 2px; }
.ljx-field .select2-container { width: 100% !important; }
.ljx-field select.form-control { height: 44px; border-radius: 9px; border-color: var(--ljx-border); box-shadow: none; }
.ljx-field select.form-control:focus { border-color: var(--ljx-accent-2); box-shadow: 0 0 0 2px var(--ljx-accent-2); }
.ljx-alert { display: none; padding: 10px 14px; margin-bottom: 16px; border-radius: 8px; font-size: 13.5px; background: #fdecea; color: #922b21; border: 1px solid #f5c6cb; }
.ljx-alert.show { display: block; }
.ljx-row { display: flex; justify-content: space-between; align-items: center; margin: 4px 0 22px; font-size: 14px; }
.ljx-row label { margin: 0; font-weight: 400; color: var(--ljx-black); cursor: pointer; display: flex; align-items: center; gap: 8px; }
.ljx-row input[type=checkbox] { margin: 0; width: 17px; height: 17px; accent-color: var(--ljx-accent-2); }
.ljx-row a { color: var(--ljx-accent-2); }
.ljx-row a:hover { color: var(--ljx-accent); }
.ljx-btn {
	width: 100%; height: 54px; border: 0; border-radius: 9px; cursor: pointer; font-size: 16px; font-weight: 600;
	color: #fff; background: var(--ljx-accent);
	transition: filter .15s, transform .05s, background .15s;
}
.ljx-btn:hover { background: var(--ljx-accent-2); }
.ljx-btn:active { transform: translateY(1px); filter: brightness(.95); }
.ljx-btn[disabled] { opacity: .65; cursor: not-allowed; }
.ljx-btn .fa { margin-left: 10px; }
.ljx-divider { display: flex; align-items: center; gap: 12px; margin: 24px 0 16px; color: var(--ljx-muted); font-size: 12px; }
.ljx-divider::before, .ljx-divider::after { content: ""; flex: 1; height: 1px; background: var(--ljx-border); }
.ljx-security { display: flex; justify-content: center; align-items: center; gap: 10px; margin-top: 26px; color: var(--ljx-navy); font-size: 14px; text-align: left; }
.ljx-security svg { width: 22px; height: 22px; flex: 0 0 22px; color: var(--ljx-accent); }
.ljx-security small { display: block; color: var(--ljx-muted); font-size: 12px; }
.ljx-footer { margin-top: 30px; text-align: center; color: var(--ljx-muted); font-size: 11.5px; line-height: 1.6; }

/* ---- Responsive ---- */
@media (max-width: 1199px) {
	.ljx-features--row { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 80px; }
	.ljx-headline, .ljx-desc, .ljx-features { max-width: 80%; }
}
@media (max-width: 991px) {
	body.ljx-login { padding: 12px; }
	.ljx-shell { min-height: calc(100vh - 24px); }
	.ljx-brand { flex-basis: 48%; max-width: 48%; padding: 40px 4%; }
	.ljx-brand-top { left: 4%; }
	.ljx-brand { justify-content: flex-start; }
	.ljx-brand-body { margin-top: 110px; }
	.ljx-headline, .ljx-desc, .ljx-features { max-width: 100%; }
	.ljx-features--row { margin-top: 28px; }
	.ljx-brand-msg { display: none; }
	/* narrow portrait panel: text on top, jewellery clear at the bottom */
	.ljx-brand::before { background: linear-gradient(180deg, rgba(var(--ljx-overlay-rgb), .86) 0%, rgba(var(--ljx-overlay-rgb), .78) 55%, rgba(var(--ljx-overlay-rgb), .05) 100%); }
	.ljx-brand::after { inset: 0; background-position: 78% bottom; -webkit-mask-image: none; mask-image: none; }
}
@media (max-width: 767px) {
	body.ljx-login { padding: 0; }
	.ljx-shell { flex-direction: column; border-radius: 0; min-height: 100vh; box-shadow: none; }
	/* mobile: login form first, branding collapses to a compact header */
	.ljx-formpane { order: 1; padding: 28px 20px 40px; justify-content: flex-start; }
	.ljx-card { max-width: 440px; margin-top: 12px; }
	.ljx-brand { order: 0; flex: none; max-width: none; padding: 20px; }
	.ljx-brand-top { position: static; }
	.ljx-brand-body, .ljx-brand-msg, .ljx-corner, .ljx-curves { display: none; }
	.ljx-top-logo { display: none; }
	.ljx-brand::after { display: none; }   /* image text would duplicate the compact header */
}

/* the reference design has no page footer inside the frame (the support bubble stays) */
body.ljx-login .footer-login, body.ljx-login .loginfooter { display: none; }

/* ---- Page-load animation (CSS only). fill-mode "backwards" so normal :hover/:active styles still apply afterwards ---- */
@keyframes ljx-rise  { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes ljx-drop  { from { opacity: 0; transform: translateY(-14px); } to { opacity: 1; transform: none; } }
@keyframes ljx-slide { from { opacity: 0; transform: translateX(-26px); } to { opacity: 1; transform: none; } }
@keyframes ljx-pop   { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }
@keyframes ljx-photo { from { opacity: 0; transform: scale(1.09); } to { opacity: 1; transform: none; } }
@keyframes ljx-shell { from { opacity: 0; transform: translateY(22px) scale(.985); } to { opacity: 1; transform: none; } }

.ljx-shell { animation: ljx-shell .7s cubic-bezier(.2,.7,.2,1) backwards; }
.ljx-brand::after { animation: ljx-photo 1.8s cubic-bezier(.2,.7,.2,1) .1s backwards; }
.ljx-brand-top { animation: ljx-drop .7s ease-out .35s backwards; }
.ljx-headline { animation: ljx-slide .8s cubic-bezier(.2,.7,.2,1) .5s backwards; }
.ljx-desc { animation: ljx-slide .8s cubic-bezier(.2,.7,.2,1) .7s backwards; }
.ljx-features li { animation: ljx-rise .6s ease-out backwards; }
.ljx-features li:nth-child(1) { animation-delay: .95s; }
.ljx-features li:nth-child(2) { animation-delay: 1.07s; }
.ljx-features li:nth-child(3) { animation-delay: 1.19s; }
.ljx-features li:nth-child(4) { animation-delay: 1.31s; }
.ljx-brand-msg { animation: ljx-rise .8s ease-out 1.5s backwards; }

.ljx-top-logo { animation: ljx-pop .7s cubic-bezier(.2,.7,.2,1) .45s backwards; }
.ljx-formname { animation: ljx-rise .6s ease-out .6s backwards; }
.ljx-card h1 { animation: ljx-rise .6s ease-out .7s backwards; }
.ljx-alert, .ljx-card form .ljx-field { animation: ljx-rise .6s ease-out backwards; }
.ljx-card form .ljx-field:nth-child(1) { animation-delay: .8s; }
.ljx-card form .ljx-field:nth-child(2) { animation-delay: .9s; }
.ljx-card form .ljx-field:nth-child(3) { animation-delay: 1s; }
.ljx-row { animation: ljx-rise .6s ease-out 1.05s backwards; }
.ljx-btn { animation: ljx-rise .6s ease-out 1.15s backwards; position: relative; overflow: hidden; }
/* silver shine that keeps sweeping across the button while it is hovered / focused */
.ljx-btn::after {
	content: ""; position: absolute; top: 0; bottom: 0; left: -70%; width: 45%; pointer-events: none;
	background: linear-gradient(100deg, transparent, rgba(255,255,255,.42), transparent); transform: skewX(-20deg);
}
.ljx-btn:hover::after, .ljx-btn:focus-visible::after { animation: ljx-sweep 1.25s ease-in-out infinite; }
@keyframes ljx-sweep { from { left: -70%; } to { left: 130%; } }
.ljx-btn[disabled]::after { display: none; }
.ljx-btn .ljx-btn-spin { display: none; width: 16px; height: 16px; margin-left: 10px; border: 2px solid rgba(255,255,255,.45); border-top-color: #fff; border-radius: 50%; animation: ljx-spin .7s linear infinite; vertical-align: -3px; }
.ljx-btn.is-loading .ljx-btn-spin { display: inline-block; }
.ljx-btn.is-loading > .fa { display: none; }
@keyframes ljx-spin { to { transform: rotate(360deg); } }

/* ---- Successful sign-in transition: Minimal Light (only shown after the server confirms the login) ---- */
.ljx-leave {
	position: fixed; inset: 0; z-index: 9999; overflow: hidden; display: flex; align-items: center; justify-content: center; padding: 24px;
	background: linear-gradient(180deg, #fff 0%, #F7FBFF 55%, var(--ljx-page) 100%); color: var(--ljx-navy);
	opacity: 0; visibility: hidden; transition: opacity .5s ease, visibility 0s linear .5s;
}
.ljx-leave-waves { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 62%; pointer-events: none; }
.ljx-leave-waves path { fill: rgba(33,102,194,.06); stroke: rgba(33,102,194,.12); stroke-width: 1.2; }
.ljx-leave-waves path:nth-child(2) { fill: rgba(33,102,194,.04); }
.ljx-leave-inner { position: relative; width: 100%; max-width: 420px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.ljx-leave-brand { max-width: 100%; }
.ljx-leave-brand .ljx-logo-img { max-width: 220px; max-height: 80px; width: auto; height: auto; }
.ljx-leave-brand svg { width: 56px; height: 50px; color: var(--ljx-navy); fill: none; stroke: currentColor; stroke-width: 4; stroke-linejoin: round; }
.ljx-leave-name { margin-top: 10px; font-size: clamp(22px, 5vw, 30px); font-weight: 700; color: var(--ljx-navy); overflow-wrap: anywhere; line-height: 1.2; }
.ljx-leave-tag { margin-top: 6px; font-size: 12px; letter-spacing: 1px; color: var(--ljx-muted); }
/* diamond loader: thin facets that brighten and dim in a staggered loop (replaces the circular spinner) */
.ljx-diamond { width: 58px; height: 52px; margin: 34px 0 22px; fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.ljx-diamond * { stroke: #CFE3F8; animation: ljx-glow 2.2s ease-in-out infinite; }
.ljx-diamond .f2 { animation-delay: .15s; } .ljx-diamond .f3 { animation-delay: .3s; } .ljx-diamond .f4 { animation-delay: .45s; } .ljx-diamond .f5 { animation-delay: .6s; }
@keyframes ljx-glow {
	0%, 100% { stroke: #CFE3F8; opacity: .55; filter: none; }
	50%      { stroke: var(--ljx-accent-2); opacity: 1; filter: drop-shadow(0 0 3px rgba(33,102,194,.35)); }
}
.ljx-leave-title { margin: 0; font-size: 18px; font-weight: 600; color: var(--ljx-navy); }
.ljx-leave-text { margin: 6px 0 0; font-size: 13px; color: var(--ljx-muted); }
body.ljx-leaving { overflow: hidden; }   /* no scrollbars from the zooming page */
html:has(body.ljx-leaving) { overflow: hidden; }   /* separate rule: older browsers without :has() must not drop the line above */
body.ljx-leaving .ljx-shell { transition: transform .5s ease, opacity .5s ease; transform: scale(1.03); opacity: 0; }
body.ljx-leaving .ljx-leave { opacity: 1; visibility: visible; transition: opacity .5s ease; }
.ljx-security { animation: ljx-rise .6s ease-out 1.3s backwards; }

@media (prefers-reduced-motion: reduce) {
	.ljx-shell, .ljx-shell *, .ljx-brand::after, .ljx-btn::after { animation: none !important; }
	.ljx-leave, body.ljx-leaving .ljx-shell { transition: none !important; }
	/* steady, fully lit diamond instead of the looping glow */
	.ljx-diamond * { animation: none !important; stroke: var(--ljx-accent-2); opacity: 1; }
}

/* ---- Short windows (small laptops, zoomed browsers): tighten spacing so the page still fits without a scrollbar ---- */
@media (min-width: 768px) and (max-height: 700px) {
	body.ljx-login { padding: 12px; }
	.ljx-shell { min-height: calc(100vh - 24px); }
	.ljx-formpane { padding-top: 16px; padding-bottom: 16px; }
	.ljx-card-logo { margin-bottom: 6px; }
	.ljx-top-logo { top: 28px; }
	.ljx-top-logo .ljx-logo-img { width: 190px; }
	.ljx-top-logo svg { width: 52px; height: 47px; }
	.ljx-formname { font-size: 24px; margin-top: 2px; }
	.ljx-card h1 { font-size: 16px; margin-bottom: 14px; }
	.ljx-field { margin-bottom: 10px; }
	.ljx-input input { height: 46px; }
	.ljx-field select.form-control { height: 40px; }
	.ljx-row { margin: 0 0 14px; }
	.ljx-btn { height: 48px; }
	.ljx-security { margin-top: 14px; }
	.ljx-brand-top { top: 28px; }
	.ljx-brand-body { margin-top: 60px; }
	.ljx-features--row { margin-top: 70px; }
	.ljx-brand-msg { bottom: 22px; }
}
@media (min-width: 768px) and (max-height: 620px) {
	.ljx-formpane { padding-top: 8px; padding-bottom: 8px; }
	.ljx-card-logo { margin-bottom: 2px; }
	.ljx-top-logo { top: 28px; }
	.ljx-top-logo .ljx-logo-img { width: 172px; }   /* smaller, not hidden */
	.ljx-top-logo svg { width: 38px; height: 34px; }
	.ljx-formname { font-size: 22px; margin-top: 0; }
	.ljx-card h1 { font-size: 15px; margin-bottom: 8px; }
	.ljx-field { margin-bottom: 7px; }
	.ljx-input input { height: 40px; }
	.ljx-field select.form-control { height: 36px; }
	.ljx-row { margin-bottom: 10px; }
	.ljx-btn { height: 44px; }
	.ljx-security { margin-top: 8px; }
}
@media (min-width: 768px) and (max-height: 535px) {
	.ljx-top-logo { display: none; }   /* last resort: the text name below still identifies the company */
}
