/* ==========================================================================
   Login radiusnew — port dari template/assets/css/login.css
   Halaman mandiri (tanpa Bootstrap). Selalu gelap; warna aksen mengikuti
   pilihan Theme Customizer di panel (cookie theme_color), di-set inline oleh index.php.
   ========================================================================== */
:root {
  --ui-accent: #4f46e5;
  --ui-accent-rgb: 79, 70, 229;
  --ui-on-accent: #fff;
  --ui-radius: 6px;
  --ui-radius-card: 10px;
  --ui-ease: cubic-bezier(.4, 0, .2, 1);
  --lx-bg: #05060a;
  --lx-line: rgba(255, 255, 255, .085);
  --lx-line-2: rgba(255, 255, 255, .14);
  --lx-text: #eef0f7;
  --lx-muted: #8d92a6;
  --lx-gold: #e8c77a;
  color-scheme: dark;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--lx-bg); color: var(--lx-text);
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid rgba(var(--ui-accent-rgb), .8); outline-offset: 2px; }

.lx { position: relative; min-height: 100vh; min-height: 100dvh; isolation: isolate; }

/* Latar --------------------------------------------------------------- */
.lx-bg { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.aurora { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .5; will-change: transform; }
.aurora.a1 { width: 620px; height: 620px; left: -160px; top: -200px; background: var(--ui-accent); animation: drift1 22s ease-in-out infinite alternate; }
.aurora.a2 { width: 520px; height: 520px; right: -140px; bottom: -180px; background: color-mix(in srgb, var(--ui-accent) 45%, #db2777); opacity: .38; animation: drift2 26s ease-in-out infinite alternate; }
.aurora.a3 { width: 420px; height: 420px; left: 40%; top: 35%; background: color-mix(in srgb, var(--ui-accent) 50%, #0ea5e9); opacity: .16; animation: drift1 30s ease-in-out infinite alternate-reverse; }
@keyframes drift1 { to { transform: translate(120px, 80px) scale(1.12); } }
@keyframes drift2 { to { transform: translate(-100px, -60px) scale(1.08); } }
.lx-grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, .03) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .03) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, #000 30%, transparent 85%);
  mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, #000 30%, transparent 85%);
}
.lx-noise {
  position: absolute; inset: 0; opacity: .06; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.lx-vignette { position: absolute; inset: 0; background: radial-gradient(ellipse 34% 52% at 50% 50%, rgba(5, 6, 10, .85) 0%, rgba(5, 6, 10, .45) 55%, transparent 100%); }

/* Topologi animasi */
.lx-topo { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .75; }
.topo-links path { stroke-width: 1.3; stroke-dasharray: 5 7; opacity: .55; animation: dash 26s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -480; } }
.topo-packets circle { fill: #fff; filter: drop-shadow(0 0 6px var(--ui-accent)) drop-shadow(0 0 2px #fff); }
.topo-core { fill: color-mix(in srgb, var(--ui-accent) 24%, #07080d); stroke: var(--ui-accent); stroke-width: 1.5; }
.topo-olt { fill: color-mix(in srgb, var(--ui-accent) 16%, #07080d); stroke: rgba(var(--ui-accent-rgb), .9); stroke-width: 1.3; }
.topo-odp { fill: rgba(5, 6, 10, .9); stroke: rgba(255, 255, 255, .5); stroke-width: 1.3; }
.topo-onu { fill: rgba(5, 6, 10, .9); stroke: rgba(255, 255, 255, .3); stroke-width: 1.1; }
.topo-onu-led { fill: #4ade80; animation: blink 3s ease-in-out infinite; }
.topo-label { font: 700 11px 'Fira Code', ui-monospace, monospace; fill: rgba(255, 255, 255, .85); letter-spacing: .04em; }
.topo-pulse { fill: rgba(var(--ui-accent-rgb), .18); transform-box: fill-box; transform-origin: center; animation: ring 2.8s ease-out infinite; }
.topo-pulse.slow { animation-duration: 3.6s; }
@keyframes ring { from { transform: scale(.7); opacity: .9; } to { transform: scale(1.7); opacity: 0; } }
@keyframes blink { 50% { opacity: .35; } }

/* Layout -------------------------------------------------------------- */
.lx-shell { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 24px 16px; }

/* Card ---------------------------------------------------------------- */
.lx-card {
  position: relative; width: 100%; max-width: 392px;
  padding: 26px 26px 22px;
  border-radius: calc(var(--ui-radius-card) + 8px);
  background: linear-gradient(180deg, rgba(20, 22, 32, .8), rgba(12, 13, 20, .86));
  -webkit-backdrop-filter: blur(22px) saturate(140%); backdrop-filter: blur(22px) saturate(140%);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .95), inset 0 1px 0 rgba(255, 255, 255, .06);
  animation: cardIn .6s cubic-bezier(.2, .8, .2, 1) both;
}
.lx-card::before {
  content: ''; position: absolute; inset: 0; padding: 1px; border-radius: inherit; pointer-events: none;
  background: linear-gradient(160deg, rgba(var(--ui-accent-rgb), .7), rgba(255, 255, 255, .08) 35%, rgba(255, 255, 255, .03) 65%, rgba(232, 199, 122, .35));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.lx-card::after {
  content: ''; position: absolute; top: -1px; left: 20%; right: 20%; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(var(--ui-accent-rgb), 1), transparent);
  box-shadow: 0 0 18px 2px rgba(var(--ui-accent-rgb), .6);
}
@keyframes cardIn { from { opacity: 0; transform: translateY(12px) scale(.985); } }

/* Brand */
.lx-card-brand { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 20px; text-align: center; }
.lx-logo { display: block; height: 38px; width: auto; max-width: 200px; object-fit: contain; }
.lx-brand-sub { display: inline-flex; align-items: center; gap: 6px; font-size: .7rem; color: var(--lx-muted); }
.lx-tier {
  display: inline-flex; align-items: center; gap: 4px; padding: 1px 7px; border-radius: 50rem;
  font-size: .58rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--lx-gold); background: rgba(232, 199, 122, .08); border: 1px solid rgba(232, 199, 122, .3);
}

/* Tabs Panel Apps / HR Apps */
.lx-tabs {
  display: grid; grid-template-columns: 1fr 1fr; gap: 3px;
  padding: 3px; margin-bottom: 20px;
  border-radius: calc(var(--ui-radius) + 5px);
  background: rgba(0, 0, 0, .35); border: 1px solid var(--lx-line);
}
.lx-tabs button {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: .55rem .4rem; border: 0; background: transparent;
  font-size: .8rem; font-weight: 600; color: var(--lx-muted);
  border-radius: calc(var(--ui-radius) + 2px);
  transition: all .25s var(--ui-ease);
}
.lx-tabs button:hover { color: var(--lx-text); }
.lx-tabs button.active {
  color: var(--lx-text);
  background: linear-gradient(180deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .04));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 6px 18px -8px rgba(0, 0, 0, .9);
}
.lx-tabs button i { font-size: 1rem; }
.lx-tabs button.active i { color: var(--ui-accent); }

.lx-title { font-size: 1.28rem; font-weight: 800; letter-spacing: -.02em; color: var(--lx-text); }
.lx-subtitle { margin: 4px 0 16px; font-size: .8rem; line-height: 1.5; color: var(--lx-muted); }

/* Field dengan floating label (tanpa Bootstrap) ---------------------- */
.lx-field { position: relative; margin-bottom: 12px; }
.lx-field input {
  display: block; width: 100%; height: 52px;
  padding: 1.35rem .9rem .4rem;
  font-size: .92rem; color: var(--lx-text);
  background: rgba(255, 255, 255, .03);
  border: 1px solid var(--lx-line-2); border-radius: var(--ui-radius-card); outline: none;
  transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.lx-field input.has-toggle { padding-right: 46px; }
.lx-field label {
  position: absolute; left: .95rem; top: 50%; transform: translateY(-50%); transform-origin: left top;
  display: inline-flex; align-items: center; gap: 5px;
  font-size: .85rem; color: var(--lx-muted); pointer-events: none;
  transition: transform .18s var(--ui-ease), color .18s, top .18s var(--ui-ease);
}
.lx-field input:focus ~ label,
.lx-field input:not(:placeholder-shown) ~ label { top: 12px; transform: translateY(-50%) scale(.82); color: color-mix(in srgb, var(--ui-accent) 60%, #fff); }
.lx-field input:hover { border-color: rgba(255, 255, 255, .22); }
.lx-field input:focus {
  background: rgba(255, 255, 255, .05);
  border-color: rgba(var(--ui-accent-rgb), .8);
  box-shadow: 0 0 0 3px rgba(var(--ui-accent-rgb), .15), 0 0 22px -6px rgba(var(--ui-accent-rgb), .6);
}
.lx-field input:-webkit-autofill {
  -webkit-text-fill-color: var(--lx-text);
  box-shadow: 0 0 0 1000px #12141d inset;
  caret-color: var(--lx-text);
  transition: background-color 9999s;
}
.lx-reveal {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 34px; height: 34px; display: grid; place-items: center;
  border: 0; border-radius: var(--ui-radius); background: transparent;
  color: var(--lx-muted); font-size: 1.05rem;
}
.lx-reveal:hover { color: var(--lx-text); background: rgba(255, 255, 255, .06); }

.lx-row { display: flex; justify-content: flex-end; align-items: center; margin: -2px 0 16px; font-size: .8rem; }
.lx-link { border: 0; background: none; padding: 2px 0; color: var(--lx-text); opacity: .85; font-size: .8rem; font-weight: 600; transition: all .2s; }
.lx-link:hover { color: var(--ui-accent); opacity: 1; }
.lx-center { justify-content: center; margin: 14px 0 0; }

/* Tombol utama */
.lx-btn {
  position: relative; overflow: hidden;
  width: 100%; height: 48px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: var(--ui-radius-card);
  font-weight: 700; font-size: .92rem; color: var(--ui-on-accent);
  background: linear-gradient(135deg, color-mix(in srgb, var(--ui-accent) 82%, #fff) 0%, var(--ui-accent) 45%, color-mix(in srgb, var(--ui-accent) 70%, #000) 100%);
  box-shadow: 0 12px 26px -12px rgba(var(--ui-accent-rgb), .9), inset 0 1px 0 rgba(255, 255, 255, .3);
  transition: transform .2s var(--ui-ease), box-shadow .2s var(--ui-ease), opacity .2s;
}
.lx-btn::after {
  content: ''; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .35), transparent);
  transform: skewX(-20deg); transition: left .7s var(--ui-ease);
}
.lx-btn:hover { transform: translateY(-1px); box-shadow: 0 16px 32px -12px rgba(var(--ui-accent-rgb), 1), inset 0 1px 0 rgba(255, 255, 255, .3); }
.lx-btn:hover::after { left: 120%; }
.lx-btn i { transition: transform .2s var(--ui-ease); }
.lx-btn:hover i { transform: translateX(3px); }
.lx-btn.is-busy { opacity: .7; cursor: progress; }
.lx-spin { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Pesan (error / info) — id #errormessage dipakai skrip lama */
.lx-alert {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 9px 12px; margin-top: 14px;
  border-radius: var(--ui-radius-card);
  background: rgba(239, 68, 68, .1); border: 1px solid rgba(239, 68, 68, .35);
  color: #fca5a5; font-size: .8rem; line-height: 1.5;
}
.lx-alert > i { font-size: 1rem; line-height: 1.2; flex-shrink: 0; }
.lx-alert .ic-info { display: none; }
.lx-alert.is-info { background: rgba(16, 185, 129, .1); border-color: rgba(16, 185, 129, .4); color: #6ee7b7; }
.lx-alert.is-info .ic-info { display: inline; }
.lx-alert.is-info .ic-err { display: none; }
.lx-alert-text { display: block; }
.lx-alert-text::first-letter { text-transform: uppercase; }

/* Panel form (login / lupa password) */
.form-container { display: none; }
.form-container.active { display: block; animation: fade .22s ease-out; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* Footer */
.lx-foot { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; font-size: .7rem; color: var(--lx-muted); }
.lx-foot .sep { opacity: .4; }

/* Responsif */
@media (max-width: 575.98px) {
  .lx-card { padding: 22px 18px 18px; }
  .lx-topo { opacity: .5; }
  .aurora.a1 { width: 400px; height: 400px; }
  .aurora.a2 { width: 340px; height: 340px; }
}
@media (prefers-reduced-motion: reduce) {
  .aurora, .topo-links path, .topo-pulse, .topo-onu-led, .lx-card { animation: none !important; }
  .topo-packets { display: none; }
}
