/* Login Apotek ERP Pro — panel merek animasi (kiri) + kartu login (kanan) */
@font-face { font-family: "Jakarta"; src: url("/assets/apotek/fonts/PlusJakartaSans-Regular.ttf") format("truetype"); font-weight: 400 600; font-display: swap; }
@font-face { font-family: "Jakarta"; src: url("/assets/apotek/fonts/PlusJakartaSans-Bold.ttf") format("truetype"); font-weight: 700 800; font-display: swap; }

:root {
	--lx-ink: #0b1b2b;
	--lx-text: #334155;
	--lx-muted: #64748b;
	--lx-line: #e2e8f0;
	--lx-bg: #f4f7fb;
	--lx-teal: #0f766e;
	--lx-teal-2: #14b8a6;
	--lx-cyan: #22d3ee;
	--lx-red: #dc2626;
	--lx-radius: 14px;
	--lx-ease: cubic-bezier(.22, 1, .36, 1);
}

/* netralkan pembungkus halaman web Frappe */
body[data-path="login"] { background: var(--lx-bg); overflow: hidden; }
body[data-path="login"] .navbar,
body[data-path="login"] .web-footer,
body[data-path="login"] .page-header-wrapper,
body[data-path="login"] .page-breadcrumbs { display: none !important; }
.lx, .lx * { box-sizing: border-box; }
.lx .hidden, .lx .hide, .lx [hidden] { display: none !important; }

.lx {
	position: fixed; inset: 0; z-index: 20;
	display: grid; grid-template-columns: minmax(0, 52fr) minmax(0, 48fr);
	font-family: "Jakarta", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
	color: var(--lx-text); -webkit-font-smoothing: antialiased;
}

/* ================= HERO ================= */
.lx-hero {
	position: relative; overflow: hidden; color: #e6f6f5;
	background:
		radial-gradient(120% 80% at 0% 0%, #0b4a55 0%, transparent 55%),
		radial-gradient(90% 70% at 100% 100%, #0b5d55 0%, transparent 60%),
		linear-gradient(160deg, #041824 0%, #06202c 45%, #072c33 100%);
}
.lx-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.lx-glow { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5; pointer-events: none; animation: lx-float 16s ease-in-out infinite alternate; }
.lx-glow-a { width: 420px; height: 420px; left: -120px; top: 18%; background: #0d9488; }
.lx-glow-b { width: 360px; height: 360px; right: -80px; bottom: -60px; background: #0e7490; animation-delay: -8s; }
@keyframes lx-float { to { transform: translate3d(60px, -40px, 0) scale(1.15); } }

.lx-hero-inner {
	position: relative; z-index: 2; height: 100%;
	display: flex; flex-direction: column; justify-content: center;
	padding: clamp(32px, 5vh, 56px) clamp(32px, 8%, 110px);
	max-width: 720px; pointer-events: none;
}
.lx-hero-inner a, .lx-hero-inner button { pointer-events: auto; }

.lx-tabs {
	position: relative; display: inline-flex; align-self: flex-start; gap: 2px; padding: 4px;
	border-radius: 999px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14);
	backdrop-filter: blur(8px); margin-bottom: clamp(22px, 4vh, 40px);
}
.lx-tab {
	position: relative; z-index: 1; border: 0; background: none; cursor: pointer;
	padding: 8px 16px; border-radius: 999px; font-family: inherit; font-size: 11px; font-weight: 700; line-height: 1; letter-spacing: .12em; text-transform: uppercase;
	color: rgba(230,246,245,.7); transition: color .3s;
}
.lx-tab:hover { color: #fff; }
.lx-tab.is-on { color: #04222a; }
.lx-tab:focus-visible { outline: 2px solid var(--lx-cyan); outline-offset: 2px; }
.lx-tab-ink {
	position: absolute; top: 4px; bottom: 4px; left: 4px; width: 0; border-radius: 999px;
	background: linear-gradient(90deg, #5eead4, #fde68a); box-shadow: 0 4px 18px rgba(94,234,212,.35);
	transition: transform .5s var(--lx-ease), width .5s var(--lx-ease);
}

.lx-brand {
	display: inline-flex; align-items: center; gap: 12px; align-self: flex-start;
	padding: 12px 18px 12px 12px; border-radius: 16px; background: #fff; color: var(--lx-ink);
	box-shadow: 0 10px 30px rgba(0,0,0,.25); font-size: 22px; letter-spacing: -.01em;
}
.lx-brand img { width: 40px; height: 40px; border-radius: 10px; }
.lx-brand b { color: var(--lx-teal); font-weight: 800; }
.lx-eyebrow { margin: 22px 0 10px; font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: #5eead4; }

.lx-slides { position: relative; display: grid; }
.lx-slide { grid-area: 1 / 1; opacity: 0; transform: translateY(14px); visibility: hidden; transition: opacity .6s var(--lx-ease), transform .6s var(--lx-ease), visibility 0s .6s; }
.lx-slide.is-on { opacity: 1; transform: none; visibility: visible; transition-delay: .05s, .05s, 0s; }
.lx-slide h1 { margin: 0 0 16px; color: #fff; font-size: clamp(28px, 3.1vw, 42px); line-height: 1.14; font-weight: 800; letter-spacing: -.02em; }
.lx-slide h1 em {
	font-style: normal; background: linear-gradient(90deg, #5eead4, #a5f3fc 50%, #fde68a);
	-webkit-background-clip: text; background-clip: text; color: transparent;
}
.lx-slide > p { margin: 0 0 22px; max-width: 520px; font-size: 15px; line-height: 1.65; color: rgba(230,246,245,.78); }
.lx-checks { list-style: none; margin: 0 0 26px; padding: 0; display: grid; gap: 11px; }
.lx-checks li { display: flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 600; color: #f0fdfa; }
.lx-checks li::before {
	content: ""; flex: none; width: 22px; height: 22px; border-radius: 7px;
	background: rgba(94,234,212,.14) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235eead4' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5 9-10'/%3E%3C/svg%3E") center/13px no-repeat;
	border: 1px solid rgba(94,234,212,.35);
}
.lx-slide.is-on .lx-checks li { animation: lx-rise .6s var(--lx-ease) both; }
.lx-slide.is-on .lx-checks li:nth-child(2) { animation-delay: .08s; }
.lx-slide.is-on .lx-checks li:nth-child(3) { animation-delay: .16s; }
.lx-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; max-width: 520px; }
.lx-stats > div {
	padding: 14px 16px; border-radius: 14px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12);
	backdrop-filter: blur(6px); transition: transform .3s var(--lx-ease), background .3s, border-color .3s;
}
.lx-stats > div:hover { transform: translateY(-3px); background: rgba(255,255,255,.1); border-color: rgba(94,234,212,.45); }
.lx-stats b { display: block; color: #fff; font-size: 22px; font-weight: 800; letter-spacing: -.01em; }
.lx-stats span { display: block; margin-top: 2px; font-size: 12px; color: rgba(230,246,245,.7); }
.lx-slide.is-on .lx-stats > div { animation: lx-rise .7s var(--lx-ease) both; }
.lx-slide.is-on .lx-stats > div:nth-child(2) { animation-delay: .1s; }
.lx-slide.is-on .lx-stats > div:nth-child(3) { animation-delay: .2s; }
@keyframes lx-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.lx-progress { margin-top: 26px; width: 120px; height: 3px; border-radius: 3px; background: rgba(255,255,255,.12); overflow: hidden; }
.lx-progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #5eead4, #fde68a); }
.lx-progress span.run { animation: lx-prog var(--lx-dur, 7s) linear forwards; }
.lx.is-paused .lx-progress span.run { animation-play-state: paused; }
@keyframes lx-prog { to { width: 100%; } }

.lx-hero-foot { margin-top: clamp(26px, 5vh, 48px); display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 12px; color: rgba(230,246,245,.6); }
.lx-hero-foot a { color: #5eead4; text-decoration: none; font-weight: 600; }
.lx-hero-foot a:hover { text-decoration: underline; }

/* ================= SISI LOGIN ================= */
.lx-side {
	position: relative; overflow-y: auto; display: flex; align-items: center; justify-content: center;
	padding: 40px 24px;
	background:
		radial-gradient(circle at 1px 1px, rgba(15,118,110,.09) 1px, transparent 0) 0 0/22px 22px,
		radial-gradient(80% 60% at 100% 0%, #e6fffb 0%, transparent 60%),
		var(--lx-bg);
}
.lx-card-wrap { width: 100%; max-width: 420px; animation: lx-in .8s var(--lx-ease) both; }
@keyframes lx-in { from { opacity: 0; transform: translateY(18px) scale(.985); } to { opacity: 1; transform: none; } }

.lx section[class^="for-"] { display: none; }
.lx section.for-login { display: block; }
.lx-card {
	position: relative; background: #fff; border-radius: 22px; padding: 34px 32px 28px;
	border: 1px solid rgba(15,23,42,.06);
	box-shadow: 0 1px 2px rgba(15,23,42,.04), 0 24px 60px -18px rgba(15,23,42,.22);
	transition: box-shadow .4s var(--lx-ease), transform .4s var(--lx-ease);
}
.lx-card::before {
	content: ""; position: absolute; inset: -1px; border-radius: 23px; padding: 1px; pointer-events: none;
	background: linear-gradient(140deg, rgba(20,184,166,.55), rgba(34,211,238,0) 40%, rgba(253,230,138,0) 60%, rgba(253,230,138,.6));
	-webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
	opacity: 0; transition: opacity .4s;
}
.lx-card:focus-within::before { opacity: 1; }
.lx-card:focus-within { box-shadow: 0 1px 2px rgba(15,23,42,.04), 0 30px 70px -20px rgba(15,118,110,.32); }
.lx-card.invalid-login { animation: lx-shake .45s ease; }
@keyframes lx-shake { 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }

.lx-head { margin-bottom: 24px; }
.lx-logo { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 22px; font-size: 18px; color: var(--lx-ink); letter-spacing: -.01em; }
.lx-logo .app-logo { width: 38px; height: 38px; border-radius: 10px; box-shadow: 0 6px 16px rgba(15,118,110,.3); }
.lx-logo b { color: var(--lx-teal); font-weight: 800; }
.lx-title { margin: 0 0 6px; font-size: 26px; line-height: 1.2; font-weight: 800; color: var(--lx-ink); letter-spacing: -.02em; }
.lx-sub { margin: 0; font-size: 14px; line-height: 1.55; color: var(--lx-muted); }

.lx-body { display: grid; gap: 16px; }
.lx-field { margin: 0; }
.lx-field label { display: block; margin: 0 0 7px; font-size: 13px; font-weight: 600; color: var(--lx-ink); }
.lx-label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.lx-label-row label { margin-bottom: 7px; }
.lx-input { position: relative; }
.lx-ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: #94a3b8; pointer-events: none; transition: color .25s; z-index: 3; }
.lx-ico svg, .lx-eye svg { width: 100%; height: 100%; display: block; }
.lx .lx-input .form-control {
	width: 100%; height: 48px; padding: 0 44px 0 44px; margin: 0;
	font-family: inherit; font-size: 15px; font-weight: 500; line-height: normal; color: var(--lx-ink);
	background: #f8fafc; border: 1.5px solid var(--lx-line); border-radius: var(--lx-radius);
	box-shadow: none; outline: none; transition: border-color .25s, background .25s, box-shadow .25s;
}
.lx .lx-input .form-control::placeholder { color: #a3b1c2; font-weight: 400; }
.lx .lx-input .form-control:hover { border-color: #cbd5e1; }
.lx .lx-input .form-control:focus { background: #fff; border-color: var(--lx-teal-2); box-shadow: 0 0 0 4px rgba(20,184,166,.16); }
.lx .lx-input:focus-within .lx-ico { color: var(--lx-teal); }
.lx .lx-input .form-control:-webkit-autofill { -webkit-box-shadow: 0 0 0 40px #f0fdfa inset; -webkit-text-fill-color: var(--lx-ink); }
.lx-eye {
	position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; padding: 8px;
	border: 0; background: none; border-radius: 10px; color: #94a3b8; cursor: pointer; transition: color .2s, background .2s; z-index: 3;
}
.lx-eye:hover { color: var(--lx-teal); background: #f0fdfa; }
.lx-eye .lx-eye-off, .lx-eye[aria-pressed="true"] .lx-eye-on { display: none; }
.lx-eye[aria-pressed="true"] .lx-eye-off { display: block; }
.lx-caps { margin: 7px 0 0; font-size: 12px; font-weight: 600; color: #b45309; display: flex; align-items: center; gap: 6px; }
.lx-caps::before { content: "⇪"; font-size: 13px; }
.lx .field-error { margin: 6px 0 0; font-size: 12.5px; color: var(--lx-red); min-height: 0; }
.lx .field-error:empty { display: none; }
.lx .form-group.invalid .form-control, .lx .page-card-body.invalid .form-control { border-color: #fca5a5; background: #fff7f7; }
.lx .form-group.invalid .form-control:focus { box-shadow: 0 0 0 4px rgba(220,38,38,.12); }

.lx-link { font-size: 13px; font-weight: 600; color: var(--lx-teal); text-decoration: none; }
.lx-link:hover { color: #0d5f58; text-decoration: underline; }

.lx-actions { display: grid; gap: 12px; margin-top: 24px; }
.lx .lx-btn, .lx .lx-btn-ghost {
	position: relative; display: flex; align-items: center; justify-content: center; gap: 10px;
	width: 100%; height: 50px; padding: 0 18px; border-radius: var(--lx-radius);
	font-family: inherit; font-size: 15px; font-weight: 700; line-height: 1; letter-spacing: .01em; text-decoration: none; cursor: pointer; overflow: hidden;
	transition: transform .25s var(--lx-ease), box-shadow .25s var(--lx-ease), filter .25s, background .25s;
}
.lx .lx-btn {
	border: 0; color: #fff;
	background: linear-gradient(120deg, #0f766e 0%, #0d9488 45%, #0891b2 100%);
	box-shadow: 0 10px 24px -8px rgba(13,148,136,.65), inset 0 1px 0 rgba(255,255,255,.18);
}
.lx .lx-btn::after {
	content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%;
	background: linear-gradient(100deg, transparent, rgba(255,255,255,.35), transparent); transform: skewX(-20deg);
	transition: left .7s var(--lx-ease);
}
.lx .lx-btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 16px 30px -10px rgba(13,148,136,.75), inset 0 1px 0 rgba(255,255,255,.18); }
.lx .lx-btn:hover:not(:disabled)::after { left: 120%; }
.lx .lx-btn:active:not(:disabled) { transform: translateY(0) scale(.99); }
.lx .lx-btn:focus-visible, .lx .lx-btn-ghost:focus-visible { outline: 3px solid rgba(20,184,166,.45); outline-offset: 2px; }
.lx .lx-btn:disabled { filter: grayscale(.5); opacity: .55; cursor: not-allowed; box-shadow: none; }
.lx .lx-btn .lx-arrow { width: 18px; height: 18px; transition: transform .3s var(--lx-ease); }
.lx .lx-btn:hover .lx-arrow { transform: translateX(4px); }
.lx .lx-btn-ghost { color: var(--lx-ink); background: #fff; border: 1.5px solid var(--lx-line); }
.lx .lx-btn-ghost:hover { border-color: #99f6e4; background: #f0fdfa; }
.lx .lx-btn-ghost img, .lx .lx-btn-ghost svg { width: 18px; height: 18px; }

/* spinner tombol (dipakai login.js: aria-busy + .es-spinner) */
.lx .es-button[aria-busy="true"] { pointer-events: none; }
.lx .es-spinner { width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid rgba(255,255,255,.35); border-top-color: #fff; animation: lx-spin .7s linear infinite; }
@keyframes lx-spin { to { transform: rotate(360deg); } }

/* banner error / sukses */
.lx .es-alert { display: flex; align-items: flex-start; gap: 10px; padding: 11px 14px; border-radius: 12px; font-size: 13.5px; line-height: 1.45; animation: lx-rise .35s var(--lx-ease) both; }
.lx .es-alert svg { flex: none; width: 18px; height: 18px; margin-top: 1px; }
.lx .es-alert[data-theme="red"] { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.lx .es-alert[data-theme="green"] { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }

.lx-divider { display: flex; align-items: center; gap: 12px; margin: 4px 0; font-size: 12px; color: var(--lx-muted); }
.lx-divider::before, .lx-divider::after { content: ""; flex: 1; height: 1px; background: var(--lx-line); }
.social-login-buttons { display: grid; gap: 10px; }
.lx-foot-note { margin: 20px 0 0; text-align: center; font-size: 13px; color: var(--lx-muted); }
.lx-actions .lx-foot-note { margin: 0; }

.lx-powered { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; margin: 22px 0 0; font-size: 12.5px; color: #94a3b8; }
.lx-powered b { color: var(--lx-ink); }
.lx-back { color: var(--lx-muted); text-decoration: none; font-weight: 600; }
.lx-back:hover { color: var(--lx-teal); }
.lx-noscript { margin-bottom: 16px; padding: 12px 14px; border-radius: 12px; background: #fff7ed; color: #9a3412; font-size: 13px; }

/* signup form bawaan Frappe (jika diaktifkan) */
.lx .form-signup .form-control { width: 100%; height: 46px; padding: 0 14px; border: 1.5px solid var(--lx-line); border-radius: var(--lx-radius); background: #f8fafc; }
.lx .form-signup .form-group { margin-bottom: 14px; }

/* ================= RESPONSIF ================= */
@media (max-width: 960px) {
	body[data-path="login"] { overflow: auto; }
	.lx { position: relative; min-height: 100vh; grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
	.lx-hero { min-height: 0; }
	.lx-hero-inner { padding: 28px 24px 70px; max-width: none; }
	.lx-tabs, .lx-checks, .lx-stats, .lx-progress, .lx-slide > p, .lx-hero-foot, .lx-eyebrow { display: none; }
	.lx-brand { font-size: 17px; padding: 8px 14px 8px 8px; }
	.lx-brand img { width: 32px; height: 32px; }
	.lx-slide h1 { margin: 16px 0 0; font-size: 22px; }
	.lx-side { align-items: flex-start; padding: 0 16px 32px; background: var(--lx-bg); overflow: visible; }
	.lx-card-wrap { margin-top: -48px; position: relative; z-index: 3; }
	.lx-card { padding: 28px 22px 24px; }
	.lx-card .lx-logo { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	.lx *, .lx *::before, .lx *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
