/**
 * LenteraSafety Admin UI — halaman login
 * Layar awal: latar brand + satu tombol MASUK. Klik = card login terbuka dengan animasi
 * (tombol berpendar & lenyap -> layar meredup -> cahaya lentera menyala -> card dari blur ke tajam -> isi muncul berurutan).
 * State dikontrol class .is-open pada .ls-auth (lihat login.php).
 */

@font-face {
	font-family: 'Plus Jakarta Sans';
	font-style: normal;
	font-display: swap;
	font-weight: 200 800;
	src: url('../fonts/plus-jakarta-sans-latin.woff2') format('woff2-variations');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
	font-family: 'Plus Jakarta Sans';
	font-style: normal;
	font-display: swap;
	font-weight: 200 800;
	src: url('../fonts/plus-jakarta-sans-latin-ext.woff2') format('woff2-variations');
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
	--ls-navy-950: #081a33;
	--ls-navy-900: #0b2140;
	--ls-navy-800: #0d2745;
	--ls-navy-700: #143a63;
	--ls-navy-600: #1e4d7b;
	--ls-accent: #f47920;
	--ls-accent-rgb: 244, 121, 32;
	--ls-accent-dark: #d9650f;
	--ls-text: #1b2638;
	--ls-muted: #6b778c;
	--ls-border: #d5dce6;
	--ls-font: 'Plus Jakarta Sans', 'Segoe UI', system-ui, sans-serif;
	--ls-ease-out: cubic-bezier(.22, 1, .36, 1);
	--ls-ease-spring: cubic-bezier(.34, 1.56, .64, 1);
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html,
body {
	margin: 0;
	height: 100%;
}

body {
	font-family: var(--ls-font);
	font-size: 14px;
	color: var(--ls-text);
	background: var(--ls-navy-900);
	-webkit-font-smoothing: antialiased;
	overflow: hidden;
}

a {
	color: var(--ls-navy-600);
	text-decoration: none;
}

a:hover {
	color: var(--ls-accent-dark);
}

/* ===================== PANGGUNG / LATAR ===================== */
.ls-auth {
	position: relative;
	min-height: 100vh;
	min-height: 100dvh;
	display: grid;
	place-items: center;
	padding: 24px;
	overflow: hidden;
}

.ls-auth-bg {
	position: fixed;
	inset: 0;
	background:
		radial-gradient(55% 45% at 85% 10%, rgba(74, 144, 226, .25) 0%, transparent 60%),
		radial-gradient(50% 45% at 10% 95%, rgba(var(--ls-accent-rgb), .18) 0%, transparent 60%),
		linear-gradient(150deg, var(--ls-navy-800) 0%, var(--ls-navy-600) 100%);
	transition: transform 1s var(--ls-ease-out), filter 1s var(--ls-ease-out);
}

/* dot grid pojok kiri atas */
.ls-auth-bg::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	width: 340px;
	height: 260px;
	background-image: radial-gradient(rgba(255, 255, 255, .16) 1.2px, transparent 1.5px);
	background-size: 16px 16px;
	-webkit-mask-image: linear-gradient(135deg, #000 0%, transparent 75%);
	mask-image: linear-gradient(135deg, #000 0%, transparent 75%);
}

/* garis aksen oranye di dasar layar */
.ls-auth-bg::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 4px;
	background: var(--ls-accent);
}

#network-canvas {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	opacity: .55;
}

.ls-auth-pulse {
	position: absolute;
	left: 0;
	bottom: 30px;
	width: min(460px, 70vw);
	height: 64px;
	opacity: .35;
}

.ls-auth-pulse path {
	stroke-dasharray: 700;
	stroke-dashoffset: 700;
	animation: ls-draw 2.4s .4s var(--ls-ease-out) forwards;
}

@keyframes ls-draw {
	to {
		stroke-dashoffset: 0;
	}
}

.ls-auth-copy {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 14px;
	z-index: 2;
	text-align: center;
	font-size: 12px;
	color: rgba(255, 255, 255, .5);
	pointer-events: none;
}

/* ===================== TOMBOL AWAL ===================== */
.ls-stage {
	position: relative;
	z-index: 3;
	display: grid;
	place-items: center;
	width: 100%;
}

.ls-login-trigger {
	grid-area: 1 / 1;
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 16px;
	height: 64px;
	padding: 0 10px 0 34px;
	border: 0;
	border-radius: 50rem;
	background: linear-gradient(135deg, #ff8a35 0%, var(--ls-accent) 50%, var(--ls-accent-dark) 100%);
	color: #fff;
	font-family: inherit;
	font-size: 16px;
	font-weight: 800;
	letter-spacing: .16em;
	text-transform: uppercase;
	cursor: pointer;
	box-shadow: 0 18px 40px -12px rgba(var(--ls-accent-rgb), .75), inset 0 1px 0 rgba(255, 255, 255, .25);
	animation: ls-trigger-in .9s .2s var(--ls-ease-spring) both;
	transition: transform .55s var(--ls-ease-out), opacity .4s ease, box-shadow .2s, filter .2s;
}

.ls-login-trigger .arrow {
	width: 46px;
	height: 46px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: #fff;
	color: var(--ls-accent);
	font-size: 16px;
	transition: transform .25s var(--ls-ease-out);
}

.ls-login-trigger:hover {
	filter: brightness(1.05);
	box-shadow: 0 22px 46px -12px rgba(var(--ls-accent-rgb), .9), inset 0 1px 0 rgba(255, 255, 255, .25);
}

.ls-login-trigger:hover .arrow {
	transform: translateX(4px);
}

.ls-login-trigger:focus-visible {
	outline: 0;
	box-shadow: 0 0 0 5px rgba(255, 255, 255, .35), 0 18px 40px -12px rgba(var(--ls-accent-rgb), .75);
}

/* cincin denyut di sekitar tombol */
.ls-login-trigger::before,
.ls-login-trigger::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	border: 2px solid rgba(var(--ls-accent-rgb), .6);
	animation: ls-ring 2.6s 1.2s ease-out infinite;
	pointer-events: none;
}

.ls-login-trigger::after {
	animation-delay: 2.5s;
}

@keyframes ls-ring {
	0% {
		transform: scale(1);
		opacity: .8;
	}

	100% {
		transform: scale(1.45, 1.9);
		opacity: 0;
	}
}

@keyframes ls-trigger-in {
	from {
		opacity: 0;
		transform: translateY(24px) scale(.85);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

/* ===================== ANIMASI "LENTERA MENYALA" =====================
   Klik tombol: tombol berpendar & lenyap, layar meredup, cahaya oranye menyala di tengah
   (berkedip pelan seperti nyala lentera), card muncul dari blur ke tajam. */

/* layar meredup saat card terbuka */
.ls-auth.is-open .ls-auth-bg {
	transform: scale(1.04);
	filter: brightness(.5) saturate(1.05);
}

/* tombol berpendar lalu lenyap */
.ls-auth.is-open .ls-login-trigger {
	transform: scale(1.5);
	filter: blur(10px) brightness(1.6);
	opacity: 0;
	pointer-events: none;
	animation: none;
	transition: transform .45s ease-out, opacity .45s ease, filter .45s ease;
}

.ls-auth.is-open .ls-login-trigger::before,
.ls-auth.is-open .ls-login-trigger::after {
	animation: none;
	opacity: 0;
}

/* cahaya lentera di belakang card */
.ls-stage::before {
	content: "";
	position: absolute;
	left: 50%;
	top: 50%;
	translate: -50% -50%;
	width: min(820px, 140vw);
	aspect-ratio: 1;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(255, 196, 140, .55) 0%, rgba(var(--ls-accent-rgb), .28) 28%, rgba(var(--ls-accent-rgb), 0) 62%);
	opacity: 0;
	transform: scale(.2);
	pointer-events: none;
	z-index: 0;
	transition: opacity .5s ease, transform .6s ease;
}

.ls-auth.is-open .ls-stage::before {
	opacity: 1;
	transform: scale(1);
	animation: ls-flicker 3.5s 1.4s ease-in-out infinite;
	transition: opacity .9s var(--ls-ease-out), transform 1.1s var(--ls-ease-out);
}

@keyframes ls-flicker {
	0%,
	100% {
		opacity: 1;
	}

	45% {
		opacity: .82;
	}

	55% {
		opacity: .95;
	}
}

/* ===================== CARD LOGIN ===================== */
.ls-login-card {
	grid-area: 1 / 1;
	position: relative;
	z-index: 2;
	width: min(420px, 100%);
	padding: 34px 34px 28px;
	border-radius: 26px;
	background: rgba(255, 255, 255, .97);
	box-shadow:
		0 40px 80px -24px rgba(4, 14, 30, .65),
		0 0 0 1px rgba(255, 255, 255, .6) inset;
	/* tertutup: buram & sedikit besar */
	transform: scale(1.1);
	filter: blur(18px);
	opacity: 0;
	visibility: hidden;
	transition: transform .5s ease, filter .5s ease, opacity .4s ease, visibility 0s linear .5s;
}

/* aksen oranye tipis di puncak card */
.ls-login-card::before {
	content: "";
	position: absolute;
	top: 0;
	left: 50%;
	width: 64px;
	height: 4px;
	transform: translateX(-50%);
	border-radius: 0 0 4px 4px;
	background: var(--ls-accent);
}

.ls-auth.is-open .ls-login-card {
	transform: none;
	filter: none;
	opacity: 1;
	visibility: visible;
	transition: transform 1s .3s var(--ls-ease-out), filter .9s .3s var(--ls-ease-out), opacity .7s .3s ease, visibility 0s;
}

/* isi card muncul berurutan (urutan dari --i pada tiap elemen) */
.ls-login-card .ls-reveal {
	opacity: 0;
	transform: translateY(16px);
	transition: opacity .3s ease, transform .3s ease;
}

.ls-auth.is-open .ls-login-card .ls-reveal {
	opacity: 1;
	transform: none;
	transition: opacity .5s var(--ls-ease-out), transform .6s var(--ls-ease-out);
	transition-delay: calc(.35s + var(--i, 0) * .07s);
}

.ls-card-close {
	position: absolute;
	top: 14px;
	right: 14px;
	width: 34px;
	height: 34px;
	border: 0;
	border-radius: 10px;
	background: transparent;
	color: #98a2b3;
	font-size: 16px;
	cursor: pointer;
	transition: background-color .15s, color .15s, transform .2s;
}

.ls-card-close:hover,
.ls-card-close:focus-visible {
	background: #eef2f7;
	color: var(--ls-navy-800);
	transform: rotate(90deg);
	outline: 0;
}

.ls-auth-logo {
	text-align: center;
}

.ls-auth-logo img {
	max-height: 54px;
	max-width: 220px;
}

.ls-auth-heading {
	margin: 20px 0 4px;
	text-align: center;
	font-size: 23px;
	font-weight: 800;
	letter-spacing: -.015em;
	color: var(--ls-navy-800);
}

.ls-auth-sub {
	margin: 0 0 24px;
	text-align: center;
	color: var(--ls-muted);
	line-height: 1.6;
	font-size: 13.5px;
}

.ls-auth-alert {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	margin-bottom: 18px;
	padding: 11px 14px;
	border-radius: 12px;
	background: #fdeeee;
	border: 1px solid #f6caca;
	color: #9b2222;
	font-size: 13px;
	line-height: 1.5;
}

.ls-auth-alert i {
	margin-top: 2px;
}

.ls-auth.is-open .ls-auth-alert.ls-reveal {
	animation: ls-shake .45s .9s both;
}

@keyframes ls-shake {
	20%,
	60% {
		transform: translateX(-6px);
	}

	40%,
	80% {
		transform: translateX(6px);
	}
}

.ls-field {
	margin-bottom: 16px;
}

.ls-field label {
	display: block;
	margin-bottom: 7px;
	font-size: 12.5px;
	font-weight: 700;
	color: #3d4a5f;
}

.ls-field-input {
	position: relative;
}

.ls-field-input > i {
	position: absolute;
	left: 15px;
	top: 50%;
	transform: translateY(-50%);
	color: #9aa5b6;
	font-size: 14px;
	pointer-events: none;
	transition: color .15s;
}

.ls-field-input input {
	width: 100%;
	height: 48px;
	padding: 0 46px 0 42px;
	border: 1px solid var(--ls-border);
	border-radius: 12px;
	background: #f8fafc;
	font-family: inherit;
	font-size: 14px;
	color: var(--ls-text);
	outline: 0;
	transition: border-color .15s, box-shadow .15s, background-color .15s;
}

.ls-field-input input::placeholder {
	color: #a0aabb;
}

.ls-field-input input:hover {
	border-color: #b9c4d3;
}

.ls-field-input input:focus {
	background: #fff;
	border-color: var(--ls-navy-600);
	box-shadow: 0 0 0 4px rgba(30, 77, 123, .12);
}

.ls-field-input:focus-within > i {
	color: var(--ls-navy-600);
}

.ls-field-toggle {
	position: absolute;
	right: 6px;
	top: 50%;
	transform: translateY(-50%);
	width: 36px;
	height: 36px;
	border: 0;
	border-radius: 9px;
	background: transparent;
	color: #8a95a8;
	cursor: pointer;
	font-size: 15px;
}

.ls-field-toggle:hover,
.ls-field-toggle:focus-visible {
	background: #eef2f7;
	color: var(--ls-navy-600);
	outline: 0;
}

/* CTA submit: pill oranye, ikon panah dalam lingkaran putih */
.ls-btn-cta {
	width: 100%;
	height: 52px;
	margin-top: 6px;
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 0 7px 0 24px;
	border: 0;
	border-radius: 50rem;
	background: linear-gradient(135deg, #ff8a35 0%, var(--ls-accent) 50%, var(--ls-accent-dark) 100%);
	color: #fff;
	font-family: inherit;
	font-size: 14px;
	font-weight: 800;
	letter-spacing: .12em;
	text-transform: uppercase;
	cursor: pointer;
	box-shadow: 0 12px 24px -10px rgba(var(--ls-accent-rgb), .8);
	transition: box-shadow .15s, filter .15s, translate .15s;
}

.ls-btn-cta:hover {
	filter: brightness(1.04);
	box-shadow: 0 16px 28px -10px rgba(var(--ls-accent-rgb), .9);
	translate: 0 -1px;
}

.ls-btn-cta:focus-visible {
	outline: 0;
	box-shadow: 0 0 0 4px rgba(var(--ls-accent-rgb), .3);
}

.ls-btn-cta .label {
	flex: 1 1 auto;
	text-align: center;
	padding-left: 38px;
}

.ls-btn-cta .arrow {
	width: 38px;
	height: 38px;
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: #fff;
	color: var(--ls-accent);
	font-size: 14px;
	transition: transform .2s;
}

.ls-btn-cta:hover .arrow {
	transform: translateX(3px);
}

.ls-btn-cta.is-loading .arrow i {
	animation: ls-spin .8s linear infinite;
}

@keyframes ls-spin {
	to {
		transform: rotate(360deg);
	}
}

.ls-auth-help {
	margin: 20px 0 0;
	text-align: center;
	font-size: 12.5px;
	color: var(--ls-muted);
}

.ls-auth-help i {
	color: var(--ls-accent);
	margin-right: 4px;
}

/* ===================== RESPONSIVE & AKSESIBILITAS ===================== */
@media (max-width: 480px) {
	.ls-login-card {
		padding: 30px 22px 24px;
		border-radius: 22px;
	}

	.ls-login-trigger {
		height: 58px;
		font-size: 15px;
	}
}

@media (max-height: 640px) {
	body {
		overflow: auto;
	}
}

@media (prefers-reduced-motion: reduce) {

	*,
	*::before,
	*::after {
		animation: none !important;
		transition: none !important;
	}

	#network-canvas {
		display: none;
	}

	.ls-auth-pulse path {
		stroke-dashoffset: 0;
	}
}

