/* ==========================================================================
   Modern auth screens (login, register, forgot/reset password, 2FA, verify)
   Theme colours come from System Settings -> Login Page as --p / --s.
   ========================================================================== */
:root {
	--ink: #0f172a;
	--muted: #64748b;
	--line: #e2e8f0;
	--field: #f8fafc;
	--danger: #dc2626;
	--ok: #059669;
	--radius: 20px;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body.lp-body {
	font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
	color: var(--ink);
	background: #0f172a;
	-webkit-font-smoothing: antialiased;
	overflow: hidden;                     /* one screen, no page scrolling */
	height: 100vh; height: 100dvh;
}

/* ---------- background ---------- */
.lp-bg { position: fixed; inset: 0; z-index: 0; }
.lp-bg--theme { background: linear-gradient(135deg, var(--p) 0%, var(--s) 100%); }
.lp-bg--theme::before, .lp-bg--light::before {
	content: ''; position: absolute; inset: 0;
	background:
		radial-gradient(circle at 12% 18%, rgba(255,255,255,.18) 0, transparent 38%),
		radial-gradient(circle at 88% 82%, rgba(255,255,255,.12) 0, transparent 42%);
}
.lp-bg--light { background: #eef2f7; }
.lp-bg--light::before {
	background:
		radial-gradient(circle at 10% 15%, color-mix(in srgb, var(--p) 22%, transparent) 0, transparent 40%),
		radial-gradient(circle at 90% 85%, color-mix(in srgb, var(--s) 20%, transparent) 0, transparent 45%);
}
.lp-bg--image { background-size: cover; background-position: center; }
.lp-bg--image::after {
	content: ''; position: absolute; inset: 0;
	background: rgba(15,23,42,.55);
	background: linear-gradient(135deg, color-mix(in srgb, var(--p) 55%, rgba(15,23,42,.55)), rgba(15,23,42,.55));
}

/* ---------- shell & card ---------- */
.lp-shell {
	position: relative; z-index: 1;
	height: 100%;
	display: flex; align-items: center; justify-content: center;
	padding: clamp(12px, 3vh, 32px) 16px;
}
.lp-card {
	width: 100%; max-width: 1080px;
	height: min(640px, 100%);
	display: grid; grid-template-columns: 1.1fr 1fr;
	background: #fff;
	border-radius: var(--radius);
	box-shadow: 0 30px 80px rgba(15, 23, 42, .28);
	overflow: hidden;
}
.lp-card--single { grid-template-columns: 1fr; max-width: 460px; height: auto; max-height: 100%; }
/* Register: wide form, taller card, the form scrolls INSIDE the card */
.lp-card--wide { max-width: 1240px; height: min(760px, 100%); grid-template-columns: .85fr 1.4fr; }
.lp-card--wide.lp-card--single { max-width: 860px; height: min(760px, 100%); }

/* ---------- side column (desktop only) ---------- */
.lp-side {
	position: relative; color: #fff;
	background: linear-gradient(160deg, var(--p), var(--s));
	display: flex; flex-direction: column;
	padding: clamp(24px, 4vh, 40px);
	min-height: 0;
}
.lp-side::before {
	content: ''; position: absolute; inset: 0; pointer-events: none;
	background-image: radial-gradient(rgba(255,255,255,.14) 1px, transparent 1px);
	background-size: 18px 18px;
	mask-image: linear-gradient(to bottom, #000 0%, transparent 70%);
	-webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 70%);
}
.lp-side-brand { position: relative; display: flex; align-items: center; gap: 12px; }
.lp-side-brand img { height: 40px; max-width: 150px; object-fit: contain; background: #fff; border-radius: 10px; padding: 5px 8px; }
.lp-side-brand span { font-weight: 600; font-size: 15px; opacity: .95; }
.lp-side-media {
	position: relative; flex: 1 1 auto; min-height: 0;
	margin: clamp(14px, 2.6vh, 26px) 0;
	display: flex; align-items: center; justify-content: center;
}
.lp-side-media img {
	max-width: 100%; max-height: 100%;
	object-fit: cover; border-radius: 16px;
	box-shadow: 0 18px 40px rgba(0,0,0,.25);
}
.lp-side-media svg { width: min(100%, 380px); height: auto; max-height: 100%; }
.lp-slider { position: relative; min-height: 110px; }
.lp-slide {
	position: absolute; inset: 0 0 auto 0;
	opacity: 0; transform: translateY(10px);
	transition: opacity .6s ease, transform .6s ease;
	pointer-events: none;
}
.lp-slide.is-active { opacity: 1; transform: none; pointer-events: auto; }
.lp-slide h3 { margin: 0 0 8px; font-size: clamp(19px, 2.5vh, 25px); font-weight: 700; line-height: 1.25; }
.lp-slide p { margin: 0; font-size: 14px; line-height: 1.6; opacity: .88; max-width: 440px; }
.lp-dots { position: relative; display: flex; gap: 8px; margin-top: 16px; }
.lp-dots button {
	width: 8px; height: 8px; padding: 0; border: 0; border-radius: 99px;
	background: rgba(255,255,255,.45); cursor: pointer; transition: width .3s, background .3s;
}
.lp-dots button.is-active { width: 26px; background: #fff; }
.lp-dots button:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* ---------- announcements ---------- */
.lp-news {
	position: relative; margin-top: clamp(14px, 2.4vh, 22px);
	background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25);
	border-radius: 14px; padding: 12px 14px;
	backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.lp-news-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.lp-news-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; opacity: .9; }
.lp-news-tag svg { width: 14px; height: 14px; }
.lp-news-nav { display: flex; align-items: center; gap: 4px; font-size: 11px; opacity: .85; }
.lp-news-nav button { border: 0; background: rgba(255,255,255,.18); color: #fff; width: 22px; height: 22px; border-radius: 6px; cursor: pointer; line-height: 1; }
.lp-news-item { display: none; }
.lp-news-item.is-active { display: block; }
.lp-news-item b { display: block; font-size: 14px; margin-bottom: 2px; }
.lp-news-item p { margin: 0; font-size: 12.5px; opacity: .88; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lp-news-more { background: none; border: 0; padding: 0; margin-top: 4px; color: #fff; font: inherit; font-size: 12px; font-weight: 600; text-decoration: underline; cursor: pointer; }
/* compact bar shown in the form column when there is no side panel (mobile) */
.lp-newsbar {
	display: none; align-items: center; gap: 10px;
	margin: 0 0 clamp(10px, 2vh, 16px); padding: 9px 12px; border-radius: 12px;
	background: color-mix(in srgb, var(--p) 9%, #fff); border: 1px solid color-mix(in srgb, var(--p) 22%, #fff);
	font-size: 13px; color: var(--ink); cursor: pointer; width: 100%; text-align: left; font-family: inherit;
}
.lp-newsbar svg { width: 18px; height: 18px; flex: 0 0 auto; color: var(--p); }
.lp-newsbar span { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lp-newsbar em { font-style: normal; color: var(--p); font-weight: 600; font-size: 12px; }
.lp-card--single .lp-newsbar { display: flex; }
dialog.lp-dialog {
	border: 0; border-radius: 16px; padding: 0; width: min(560px, calc(100vw - 32px));
	max-height: min(80vh, 640px); box-shadow: 0 30px 80px rgba(15,23,42,.35); color: var(--ink);
	font-family: inherit;
}
dialog.lp-dialog::backdrop { background: rgba(15,23,42,.55); }
.lp-dialog-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.lp-dialog-head h4 { margin: 0; font-size: 17px; }
.lp-dialog-head button { border: 0; background: #f1f5f9; width: 32px; height: 32px; border-radius: 8px; font-size: 20px; cursor: pointer; line-height: 1; }
.lp-dialog-body { padding: 8px 20px 20px; overflow-y: auto; max-height: calc(min(80vh, 640px) - 66px); }
.lp-dialog-body article { padding: 14px 0; border-bottom: 1px solid var(--line); }
.lp-dialog-body article:last-child { border-bottom: 0; }
.lp-dialog-body h5 { margin: 0 0 4px; font-size: 15px; }
.lp-dialog-body small { color: var(--muted); }
.lp-dialog-body .lp-news-body { margin-top: 8px; font-size: 14px; line-height: 1.6; }
.lp-dialog-body img { max-width: 100%; border-radius: 10px; margin-top: 8px; }

/* ---------- form column ---------- */
.lp-main {
	display: flex; flex-direction: column; justify-content: center;
	padding: clamp(22px, 4.5vh, 48px) clamp(22px, 4vw, 56px);
	min-height: 0;
}
.lp-card--scroll .lp-main { justify-content: flex-start; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.lp-logo { height: 46px; max-width: 180px; object-fit: contain; margin-bottom: clamp(12px, 2.5vh, 22px); align-self: flex-start; }
.lp-card:not(.lp-card--single) .lp-logo { display: none; }
.lp-greet { margin: 0; font-size: 13px; font-weight: 500; color: var(--p); letter-spacing: .3px; }
.lp-title { margin: 2px 0 4px; font-size: clamp(22px, 3.2vh, 28px); font-weight: 700; line-height: 1.2; }
.lp-sub { margin: 0 0 clamp(14px, 2.6vh, 24px); color: var(--muted); font-size: 14px; }

.lp-alert { border-radius: 12px; padding: 10px 14px; font-size: 13.5px; margin-bottom: 14px; }
.lp-alert--error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.lp-alert--ok { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }

.lp-field { margin-bottom: clamp(10px, 2vh, 16px); }
.lp-label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; color: #334155; }
.lp-label small { font-weight: 400; color: var(--muted); }
.lp-input-wrap { position: relative; }
.lp-input-wrap svg.lp-ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: #94a3b8; pointer-events: none; }
.lp-input {
	width: 100%; height: 48px;
	padding: 0 46px 0 44px;
	font: inherit; font-size: 15px; color: var(--ink);
	background: var(--field); border: 1.5px solid var(--line); border-radius: 12px;
	transition: border-color .2s, box-shadow .2s, background .2s;
}
.lp-input::placeholder { color: #a0aec0; }
.lp-input:focus { outline: none; background: #fff; border-color: var(--p); box-shadow: 0 0 0 4px color-mix(in srgb, var(--p) 16%, transparent); }
.lp-input.is-invalid { border-color: var(--danger); }
.lp-eye {
	position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
	width: 38px; height: 38px; border: 0; background: transparent; border-radius: 10px;
	display: grid; place-items: center; color: #64748b; cursor: pointer;
}
.lp-eye:hover { background: #eef2f7; color: var(--ink); }
.lp-eye:focus-visible { outline: 2px solid var(--p); outline-offset: 1px; }
.lp-eye svg { width: 20px; height: 20px; }
.lp-err { display: block; margin-top: 6px; font-size: 12.5px; color: var(--danger); }
.lp-hint { display: block; margin-top: 6px; font-size: 12px; color: var(--muted); }
.lp-caps { display: none; margin-top: 6px; font-size: 12.5px; color: #b45309; }
.lp-caps.is-on { display: block; }

.lp-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 2px 0 clamp(14px, 2.4vh, 20px); font-size: 13.5px; }
.lp-check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; color: #334155; }
.lp-check input { width: 16px; height: 16px; accent-color: var(--p); }
.lp-link { color: var(--p); font-weight: 500; text-decoration: none; }
.lp-link:hover { text-decoration: underline; }

.lp-btn {
	width: 100%; height: 50px; border: 0; border-radius: 12px;
	background: linear-gradient(135deg, var(--p), var(--s));
	color: #fff; font: inherit; font-size: 15.5px; font-weight: 600; cursor: pointer;
	display: inline-flex; align-items: center; justify-content: center; gap: 10px;
	box-shadow: 0 10px 24px color-mix(in srgb, var(--p) 35%, transparent);
	transition: transform .15s, box-shadow .2s, opacity .2s;
	text-decoration: none;
}
.lp-btn:hover { transform: translateY(-1px); color: #fff; text-decoration: none; box-shadow: 0 14px 30px color-mix(in srgb, var(--p) 40%, transparent); }
.lp-btn:focus-visible { outline: 3px solid color-mix(in srgb, var(--p) 45%, transparent); outline-offset: 2px; }
.lp-btn[disabled] { opacity: .8; cursor: progress; transform: none; }
.lp-btn--ghost { background: #fff; color: var(--p); border: 1.5px solid var(--line); box-shadow: none; }
.lp-btn--ghost:hover { color: var(--p); box-shadow: none; border-color: var(--p); }
.lp-spinner { width: 18px; height: 18px; border: 2.5px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: lp-spin .7s linear infinite; display: none; }
.lp-btn.is-loading .lp-spinner { display: inline-block; }
@keyframes lp-spin { to { transform: rotate(360deg); } }

.lp-alt { text-align: center; margin-top: clamp(10px, 2vh, 16px); font-size: 13.5px; color: var(--muted); }
.lp-foot { margin-top: clamp(12px, 2.4vh, 22px); display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12px; color: #94a3b8; }
.lp-secure { display: inline-flex; align-items: center; gap: 6px; }
.lp-secure svg { width: 14px; height: 14px; }
.lp-preview-bar { position: fixed; top: 0; left: 0; right: 0; z-index: 10; background: #0f172a; color: #fff; text-align: center; font-size: 13px; padding: 6px; }

/* ---------- Register form (existing Bootstrap markup, restyled) ---------- */
.lp-legacy .auth-section-title {
	margin: 18px 0 12px; padding-bottom: 6px; border-bottom: 1px solid var(--line);
	font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; color: var(--p);
}
.lp-legacy .auth-section-title:first-of-type { margin-top: 0; }
.lp-legacy .form-group { margin-bottom: 12px; }
.lp-legacy .auth-field { position: relative; }
.lp-legacy .auth-field .auth-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #94a3b8; font-size: 15px; z-index: 2; pointer-events: none; }
.lp-legacy .form-control {
	height: 46px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--field);
	font-family: inherit; font-size: 14.5px; color: var(--ink); box-shadow: none;
}
.lp-legacy .auth-field .form-control { padding-left: 42px; }
.lp-legacy textarea.form-control { height: auto; min-height: 80px; padding-top: 10px; }
.lp-legacy input[type=file].form-control { padding-top: 9px; }
.lp-legacy .form-control:focus { background: #fff; border-color: var(--p); box-shadow: 0 0 0 4px color-mix(in srgb, var(--p) 16%, transparent); }
.lp-legacy label { font-size: 13px; font-weight: 500; color: #334155; margin-bottom: 5px; }
.lp-legacy .invalid-feedback { font-size: 12.5px; }
.lp-legacy .auth-submit-btn {
	height: 50px; border: 0; border-radius: 12px; font-weight: 600; font-size: 15.5px;
	background: linear-gradient(135deg, var(--p), var(--s)); box-shadow: 0 10px 24px color-mix(in srgb, var(--p) 35%, transparent);
}
.lp-legacy .auth-links { text-align: center; margin-top: 14px; font-size: 13.5px; color: var(--muted); }
.lp-legacy .auth-links a { color: var(--p); font-weight: 500; }

/* ---------- tablet / mobile: no side column, no slider ---------- */
@media (max-width: 991.98px) {
	.lp-card, .lp-card--wide { grid-template-columns: 1fr; max-width: 440px; height: auto; max-height: 100%; }
	.lp-card--wide { max-width: 720px; height: 100%; }
	.lp-side { display: none; }
	.lp-card .lp-logo { display: block !important; }
	.lp-newsbar { display: flex; }
}
@media (max-width: 480px) {
	.lp-shell { padding: 12px; }
	.lp-card { border-radius: 18px; }
	.lp-main { padding: 22px 20px; }
	.lp-input { height: 46px; }
	.lp-btn { height: 48px; }
	.lp-foot { flex-direction: column; gap: 4px; }
}
/* Short screens (landscape phones): compact; only below ~480px tall is page
   scrolling allowed, so the main button can never be cut off. */
@media (max-height: 600px) {
	.lp-logo { height: 34px; margin-bottom: 8px; }
	.lp-sub { margin-bottom: 10px; }
	.lp-foot { display: none; }
}
@media (max-height: 480px) {
	body.lp-body { overflow: auto; height: auto; }
	.lp-shell { height: auto; min-height: 100%; }
}
@media (prefers-reduced-motion: reduce) {
	.lp-slide, .lp-btn, .lp-dots button { transition: none; }
}

/* eye button inside the register form's Bootstrap inputs */
.lp-legacy .auth-field .lp-eye { z-index: 3; }
.lp-legacy .auth-field input[type=password], .lp-legacy .auth-field input[name=password], .lp-legacy .auth-field input[name=password_confirmation] { padding-right: 46px; }
