/* The sign-in page: a frosted-glass card on a deep blue-violet background with soft glowing shapes. Always dark. */
.login-page {
  min-height: 100vh; margin: 0; display: flex; flex-direction: column; overflow-x: hidden;
  background: #0b1026; color: #eef1ff;
}

/* ---- background --------------------------------------------------------------------------------------------------- */
.login-bg {
  position: fixed; inset: 0; z-index: 0; overflow: hidden;
  background:
    radial-gradient(1100px 760px at 12% 8%, #3b2a8f 0%, transparent 60%),
    radial-gradient(1000px 700px at 88% 92%, #1d3fa8 0%, transparent 55%),
    linear-gradient(135deg, #0a0f2c 0%, #1a1450 50%, #2d1366 100%);
}
.login-bg .blob { position: absolute; border-radius: 50%; filter: blur(72px); opacity: .55; animation: drift 22s ease-in-out infinite alternate; }
.login-bg .b1 { width: 420px; height: 420px; background: #ff4fa3; top: -90px; left: -70px; }
.login-bg .b2 { width: 380px; height: 380px; background: #22d3ee; bottom: -110px; right: -50px; animation-duration: 27s; }
.login-bg .b3 { width: 300px; height: 300px; background: #8b5cf6; top: 42%; left: 56%; animation-duration: 31s; }
@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(60px, 40px) scale(1.15); }
}
@media (prefers-reduced-motion: reduce) { .login-bg .blob { animation: none; } }

/* ---- the glass card ----------------------------------------------------------------------------------------------- */
.login-shell { position: relative; z-index: 1; flex: 1; display: grid; place-items: center; max-width: none; margin: 0; padding: 32px 16px; }
.glass {
  width: min(420px, 100%); box-sizing: border-box; padding: 32px 30px 26px; border-radius: 20px;
  background: rgba(255, 255, 255, .10); border: 1px solid rgba(255, 255, 255, .22);
  -webkit-backdrop-filter: blur(18px) saturate(140%); backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 20px 60px rgba(4, 6, 30, .55), inset 0 1px 0 rgba(255, 255, 255, .18);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass { background: rgba(23, 20, 70, .92); } /* no blur in this browser: a solid card stays readable */
}
.glass-brand { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-bottom: 18px; }
.glass-logo { width: 170px; height: auto; display: block; }
.glass-caption { font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: rgba(238, 241, 255, .65); }
.glass-slogan {
  margin: 0; text-align: center; font-size: 27px; font-weight: 700; letter-spacing: -.01em; line-height: 1.2;
  background: linear-gradient(90deg, #ffffff, #c7b8ff 60%, #8fe7ff); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.glass-sub { margin: 6px 0 22px; text-align: center; font-size: 13.5px; color: rgba(238, 241, 255, .72); }
.glass h2 { font-size: 15px; font-weight: 600; margin: 0 0 8px; color: #fff; }

/* ---- the form ----------------------------------------------------------------------------------------------------- */
.glass .grid-form { margin: 8px 0 0; gap: 12px; }
.glass label { color: rgba(238, 241, 255, .86); font-weight: 500; }
.glass input {
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .22); color: #fff;
  border-radius: 10px; padding: 10px 12px; font-size: 14px;
}
.glass input::placeholder { color: rgba(238, 241, 255, .45); }
.glass input:focus, .glass input:focus-visible {
  outline: none; border-color: #a78bfa; box-shadow: 0 0 0 3px rgba(167, 139, 250, .35); background: rgba(255, 255, 255, .12);
}
.glass .actions { margin-top: 6px; }
.glass .btn.primary {
  width: 100%; justify-content: center; padding: 11px 14px; border: 0; border-radius: 10px; font-weight: 650; font-size: 14px; color: #fff;
  background: linear-gradient(90deg, #6366f1, #8b5cf6 55%, #d946ef); box-shadow: 0 8px 24px rgba(139, 92, 246, .35);
}
.glass .btn.primary:hover { filter: brightness(1.08); }
.glass .btn.primary:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
#login-links { margin-top: 14px; text-align: center; font-size: 13px; }
.glass a { color: #c4b5fd; }
.glass a:hover { color: #fff; }
.glass .muted { color: rgba(238, 241, 255, .66); }
.glass code { background: rgba(0, 0, 0, .3); color: #e9e5ff; padding: 1px 5px; border-radius: 5px; word-break: break-all; }
.glass .notice { border-radius: 10px; font-size: 13px; margin: 6px 0 4px; }
.glass .notice.err { background: rgba(244, 63, 94, .18); color: #ffd5dd; border: 1px solid rgba(244, 63, 94, .35); }
.glass .notice.ok { background: rgba(16, 185, 129, .18); color: #c9f7e6; border: 1px solid rgba(16, 185, 129, .35); }
.glass .notice.warn { background: rgba(245, 158, 11, .18); color: #ffe8bf; border: 1px solid rgba(245, 158, 11, .35); }

/* ---- footer ------------------------------------------------------------------------------------------------------- */
/* Credits: four lines in the bottom-left corner */
.login-footer { position: fixed; left: 44px; bottom: 44px; z-index: 1; display: flex; flex-direction: column; gap: 3px;
  font-size: 15px; line-height: 1.35; color: #ffffff; text-align: left; }
.login-footer .credit-title { font-size: 18px; font-weight: 700; }
.login-footer > :not(.credit-title) { padding-left: 16px; } /* name, email and version, indented under "Designed by" */
.login-footer a { color: #ffffff; text-decoration: none; }
.login-footer a:hover { text-decoration: underline; }
.login-footer .credit-version { font-size: 13px; margin-top: 2px; }
/* A short or narrow window: the credits follow the card instead of covering it */
@media (max-width: 1000px), (max-height: 760px) {
  .login-footer { position: relative; left: auto; bottom: auto; padding: 16px 20px 20px 40px; }
}

@media (max-width: 480px) {
  .glass { padding: 24px 18px 20px; }
  .glass-slogan { font-size: 23px; }
  .glass-logo { width: 140px; }
}

/* ===== motion (version 3.6, js/login-intro.js) ====================================================================== */
/* ---- the card, with the Orb beside it (over it on narrow screens; hidden on very small ones and with reduced motion) */
.card-wrap { position: relative; width: min(420px, 100%); }
.card-wrap .glass { width: 100%; }
.bot { position: absolute; z-index: 2; width: 300px; right: calc(100% + 36px); top: 50%; transform: translateY(-50%);
  pointer-events: none; visibility: hidden; }
.bot-ready .bot { visibility: visible; }
.still .bot { display: none; }
.bot svg { display: block; width: 100%; height: auto; overflow: visible; }
@media (max-width: 1000px) {
  .bot-ready .card-wrap { padding-top: 136px; }
  .bot { width: 200px; left: 50%; right: auto; top: 0; transform: translateX(-50%); }
  .bot .o-shadow { display: none; }  /* over the card: no floor shadow on the logo */
}
@media (max-width: 1000px) and (max-height: 640px), (max-width: 360px) {
  .bot { display: none; }
  .bot-ready .card-wrap { padding-top: 0; }
}

/* ---- the Orb's parts ---- */
.bot .b-part, .bot .b-eye, .bot .b-head, .bot .b-shake, .bot .b-hand-inner, .bot .o-shade, .bot .o-float, .bot .o-shadow { transform-box: view-box; }
.bot .b-part { transition: transform .75s cubic-bezier(.2, 1.35, .45, 1) var(--d, 0s), opacity .35s var(--d, 0s); }
.assembling .bot .b-part { transform: translate(var(--dx, 0), var(--dy, 0)) rotate(var(--r, 0deg)) scale(.5); opacity: 0; transition: none; }
.bot .b-eye { transform-origin: var(--ex) var(--ey); transition: transform .45s cubic-bezier(.2, 1.6, .4, 1) 1.05s; }
.assembling .bot .b-eye { transform: scale(0); transition: none; }
.bot .b-eye.blink { transform: scaleY(.08); transition: transform .07s; }
.bot .b-glow { opacity: 0; transition: opacity .8s; }
.bot.lit .b-glow { opacity: 1; }
.bot .b-pulse { animation: b-pulse 2.4s ease-in-out infinite; }
@keyframes b-pulse { 50% { opacity: .45; } }
.bot .b-head { transform-origin: 110px 90px; }
.bot .b-shake { transform-origin: 110px 150px; }
.bot .b-shake.no { animation: b-no .9s ease-in-out; }
@keyframes b-no { 15% { transform: rotate(-9deg); } 35% { transform: rotate(8deg); } 55% { transform: rotate(-6deg); } 75% { transform: rotate(4deg); } }
.bot .o-float { animation: o-bob 2.6s ease-in-out infinite alternate; }
@keyframes o-bob { to { transform: translateY(-7px); } }
.bot .o-shadow { transform-origin: 110px 172px; animation: o-shadow 2.6s ease-in-out infinite alternate; }
@keyframes o-shadow { to { transform: scaleX(.8); opacity: .6; } }
.bot .o-halo { stroke-dasharray: 18 9; animation: o-halo 3s linear infinite; }
@keyframes o-halo { to { stroke-dashoffset: -108; } }
/* a password field: the visor slides down over the eyes, the hands come up; shown password: lifted a little */
.bot .o-shade { transform: translateY(-40px); opacity: 0; transition: transform .45s cubic-bezier(.3, 1.3, .5, 1), opacity .3s; }
.bot.cover .o-shade { transform: none; opacity: 1; }
.bot.cover.peek .o-shade { transform: translateY(-15px); }
.bot .b-hand-inner { transition: transform .45s cubic-bezier(.3, 1.3, .5, 1); }
.bot.cover .b-hand-l .b-hand-inner { transform: translate(2px, -58px); }
.bot.cover .b-hand-r .b-hand-inner { transform: translate(-2px, -58px); }
.bot.cover.peek .b-hand-l .b-hand-inner { transform: translate(2px, -46px); }
.bot.cover.peek .b-hand-r .b-hand-inner { transform: translate(-2px, -46px); }
/* signed in: it waves */
.bot .b-hand-r .b-hand-inner { transform-origin: 156px 172px; }
.bot.wave .b-hand-r .b-hand-inner { transform: translate(24px, -66px); animation: b-wave .45s ease-in-out .2s 5 alternate; }
@keyframes b-wave { from { transform: translate(24px, -66px) rotate(-18deg); } to { transform: translate(24px, -66px) rotate(18deg); } }

/* ---- the Data Manager's mark beside the Nexthink wordmark ---- */
.brand-row { display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 42px; height: 42px; flex: none; overflow: visible; }
.logo-wrap { display: block; line-height: 0; }
@media (max-width: 480px) { .brand-mark { width: 34px; height: 34px; } }

/* ---- the first opening of a session: the mark draws itself in the middle, moves aside, the wordmark wipes in ---- */
.intro-full .brand-mark { transform: translateX(var(--mark-shift, 0)) scale(1.25); transition: transform .7s cubic-bezier(.6, 0, .3, 1) 1.9s; }
.intro-full.drawn .brand-mark { transform: none; }
.intro-full .brand-mark .draw { stroke-dasharray: 1; stroke-dashoffset: 1; animation: m-draw .9s cubic-bezier(.6, 0, .4, 1) .75s forwards; }
.intro-full .brand-mark .d2 { animation-delay: 1.1s; }
@keyframes m-draw { to { stroke-dashoffset: 0; } }
.intro-full .logo-wrap { clip-path: inset(0 100% 0 0); filter: drop-shadow(0 0 14px rgba(143, 231, 255, .8)); }
.intro-full.drawn .logo-wrap { clip-path: inset(0 0 0 0); filter: drop-shadow(0 0 0 rgba(143, 231, 255, 0));
  transition: clip-path .9s cubic-bezier(.6, 0, .3, 1) 2.05s, filter 1.2s 2.8s; }
/* the card rises, its contents one after another */
.intro-full .glass { animation: card-in .8s cubic-bezier(.2, .8, .2, 1) .15s both; }
.intro-full .glass > :not(.glass-brand):not(form), .intro-full .glass form > * { animation: rise .6s cubic-bezier(.2, .8, .2, 1) both; }
.intro-full .glass > :nth-child(2) { animation-delay: .4s; }
.intro-full .glass > :nth-child(3) { animation-delay: .48s; }
.intro-full .glass > :nth-child(4) { animation-delay: .55s; }
.intro-full .glass form > :nth-child(1) { animation-delay: .63s; }
.intro-full .glass form > :nth-child(2) { animation-delay: .71s; }
.intro-full .glass form > :nth-child(3) { animation-delay: .79s; }
.intro-full .glass > #login-links { animation-delay: .87s; }
.intro-short .glass { animation: card-fade .35s ease-out both; }
@keyframes card-in { from { opacity: 0; transform: translateY(26px) scale(.98); } }
@keyframes card-fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

/* ---- a wrong password shakes the card; signed in, the card shrinks away ---- */
.glass.shake { animation: shake .5s cubic-bezier(.36, .07, .19, .97) both; }
@keyframes shake { 10%, 90% { transform: translateX(-2px); } 20%, 80% { transform: translateX(4px); }
  30%, 50%, 70% { transform: translateX(-8px); } 40%, 60% { transform: translateX(8px); } }
.card-wrap.leaving .glass { transition: transform .5s cubic-bezier(.6, 0, .4, 1) .55s, opacity .5s .55s; transform: scale(.94); opacity: 0; }

/* ---- a password field's show / hide button ---- */
.pw { position: relative; display: block; }
.pw input { width: 100%; box-sizing: border-box; padding-right: 42px; }
.pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; padding: 0; border: 0;
  border-radius: 8px; background: transparent; color: rgba(238, 241, 255, .7); cursor: pointer; display: grid; place-items: center; }
.pw-eye:hover, .pw-eye:focus-visible { color: #fff; background: rgba(255, 255, 255, .1); outline: none; }
.pw-eye svg { width: 18px; height: 18px; }
.pw-eye .slash { display: none; }
.pw-eye[aria-pressed="true"] .slash { display: inline; }
