/* MK Poultry SCADA sign-in. After the Dynaflex login (dark device card, orb, base bar) in NewGen colours:
   navy #0b2a63, blue #0868b3, sky #2aa7e0, green #8cc63f. Wallpaper: wall.js. */
:root {
  --navy: #0b2a63; --navy-2: #071a40; --blue: #0868b3; --sky: #2aa7e0; --green: #8cc63f; --lime: #b5d96b;
  --ink: #0b1b36; --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { font-family: var(--font); color: var(--ink); background: #eef3f9; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; overflow-x: hidden; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
#wall { position: fixed; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; pointer-events: none; }

.lg { position: relative; z-index: 1; flex: 1; width: min(1240px, 100%); margin: 0 auto; padding: 40px 56px; display: grid; grid-template-columns: 1fr minmax(340px, 420px); gap: 16px 48px; align-items: center; align-content: center; }

/* left: NewGen logo and plant name on the light side of the wallpaper */
.lg-brand { grid-row: 1 / span 2; display: grid; gap: 26px; justify-items: start; max-width: 560px; }
.lg-logo { width: clamp(180px, 20vw, 260px); height: auto; filter: drop-shadow(0 18px 30px rgba(11, 42, 99, .16)); animation: lgIn .8s cubic-bezier(.2, .7, .2, 1) both; }
.lg-tag { animation: lgIn .8s .12s cubic-bezier(.2, .7, .2, 1) both; }
.lg-k { margin: 0 0 10px; font-size: 14px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #4f8a12; }
.lg-h { margin: 0 0 12px; font-size: clamp(28px, 3vw, 42px); line-height: 1.12; font-weight: 800; letter-spacing: -.02em; color: var(--navy); max-width: 16ch; text-wrap: balance; }
.lg-s { margin: 0; font-size: 16px; line-height: 1.5; color: #3b4d6b; max-width: 40ch; }

/* right: the device card */
.lg-card { position: relative; width: 100%; border-radius: 26px; padding: 6px; background: linear-gradient(160deg, #1d3768, #06122b 60%); box-shadow: 0 40px 80px -24px rgba(2, 10, 30, .75), 0 0 0 1px rgba(255, 255, 255, .08); animation: lgIn .8s .2s cubic-bezier(.2, .7, .2, 1) both; }
.lg-top { position: relative; overflow: hidden; border-radius: 21px 21px 8px 8px; padding: 34px 26px 26px; display: flex; flex-direction: column; align-items: center; gap: 6px; background: linear-gradient(170deg, #10264f 0%, #050d1f 72%); color: #fff; }
.lg-orb { position: absolute; left: 50%; top: 0; width: 240px; height: 170px; margin-left: -120px; pointer-events: none; }
.lg-orb i { position: absolute; width: 112px; height: 112px; border-radius: 50%; filter: blur(28px); opacity: .85; will-change: transform; }
.lg-orb i:nth-child(1) { left: 30px; top: 22px; background: var(--blue); animation: o1 7s ease-in-out infinite alternate; }
.lg-orb i:nth-child(2) { left: 96px; top: 30px; background: var(--green); opacity: .7; animation: o2 8s ease-in-out infinite alternate; }
.lg-orb i:nth-child(3) { left: 66px; top: 4px; width: 80px; height: 80px; background: var(--sky); opacity: .55; animation: o3 6s ease-in-out infinite alternate; }
.lg-orb s { position: absolute; left: 70px; top: 30px; width: 100px; height: 100px; border-radius: 50%; border: 1.5px solid rgba(181, 217, 107, .0); }
@keyframes o1 { to { transform: translate(28px, 12px) scale(1.12); } }
@keyframes o2 { to { transform: translate(-30px, -8px) scale(.92); } }
@keyframes o3 { to { transform: translate(10px, 22px) scale(1.2); } }
.lg-av { position: relative; display: none; width: 64px; height: 64px; margin-top: 20px; border-radius: 50%; place-items: center; font-size: 28px; font-weight: 600; color: #fff; background: linear-gradient(140deg, var(--blue), var(--green)); box-shadow: 0 0 0 3px rgba(255, 255, 255, .85), 0 0 30px rgba(140, 198, 63, .6); }
.lg-hi { position: relative; margin: 34px 0 0; font-size: 54px; line-height: 1.05; font-weight: 300; letter-spacing: -.02em; color: #fff; }
.lg-hi.long { font-size: 38px; font-weight: 300; }
.lg-msg { position: relative; margin: 2px 0 20px; color: #c3cfe3; font-size: 15px; text-align: center; }
#f { position: relative; width: 100%; display: flex; flex-direction: column; gap: 12px; }
.lg-in { position: relative; display: flex; align-items: center; }
.lg-in > svg { position: absolute; left: 14px; width: 18px; height: 18px; fill: none; stroke: #8796b2; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.lg-in input { width: 100%; height: 50px; padding: 0 50px 0 44px; border-radius: 12px; border: 1px solid #2a3d63; background: rgba(255, 255, 255, .05); color: #fff; font: 400 16px var(--font); transition: border-color .15s, box-shadow .15s; }
.lg-in input::placeholder { color: #8391ab; }
.lg-in input:hover { border-color: #3b5384; }
.lg-in input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(140, 198, 63, .3); }
.lg-in input[aria-invalid="true"] { border-color: #ff8a8f; }
.lg-eye { position: absolute; right: 3px; width: 44px; height: 44px; display: grid; place-items: center; border: 0; background: transparent; border-radius: 10px; cursor: pointer; color: #8796b2; }
.lg-eye svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.lg-eye:hover, .lg-eye[aria-pressed="true"] { color: #fff; }
.lg-eye:focus-visible { outline: 2px solid var(--green); outline-offset: -2px; color: #fff; }
.lg-err { margin: 0; padding: 10px 12px; border-radius: 10px; background: rgba(222, 52, 64, .2); border: 1px solid rgba(255, 138, 143, .35); color: #ffc2c5; font-size: 14px; line-height: 1.4; }
.lg-err[hidden] { display: none; }
.lg-submit { height: 50px; border: 0; border-radius: 12px; cursor: pointer; font: 700 16px var(--font); color: #0b2a12; background: linear-gradient(180deg, #a2d65a, var(--green)); box-shadow: 0 10px 24px -10px rgba(140, 198, 63, .8); transition: filter .15s, transform .05s; }
.lg-submit:hover { filter: brightness(1.06); }
.lg-submit:active { transform: translateY(1px); }
.lg-submit:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.lg-submit:disabled, .lg-go:disabled { cursor: progress; opacity: .75; }

.lg-base { position: relative; margin-top: 4px; border-radius: 8px 8px 21px 21px; padding: 14px 14px 16px 16px; display: flex; align-items: center; gap: 12px; background: linear-gradient(180deg, #e9eef5 0%, #c9d3e1 100%); box-shadow: 0 1px 0 rgba(255, 255, 255, .7) inset; }
.lg-mark { width: 38px; height: 38px; }
.lg-name { margin-right: auto; font-size: 17px; font-weight: 700; color: var(--navy); letter-spacing: .01em; }
.lg-name b { color: #4f8a12; }
.lg-go { width: 46px; height: 46px; border: 0; border-radius: 10px; display: grid; place-items: center; cursor: pointer; background: var(--navy); color: #fff; box-shadow: 0 1px 0 rgba(255, 255, 255, .15) inset, 0 8px 18px -8px rgba(11, 42, 99, .8); transition: background .15s; }
.lg-go svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lg-go:hover { background: var(--blue); }
.lg-go:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }
.lg-go.busy svg { display: none; }
.lg-go.busy::after { content: ""; width: 20px; height: 20px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .3); border-top-color: #fff; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.lg-foot { grid-column: 2; align-self: start; display: flex; gap: 6px 8px; flex-wrap: wrap; justify-content: center; font-size: 12.5px; color: #c3cfe3; text-align: center; }

/* wrong password: shake. Signed in: avatar replaces "Hi", orb grows */
.lg-card.shake { animation: shake .55s 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); } }
.lg-card.ok .lg-av { display: grid; animation: pop .5s cubic-bezier(.2, 1.4, .4, 1) both; }
.lg-card.ok .lg-hi { margin-top: 10px; font-size: 30px; }
.lg-card.ok #f { opacity: .35; pointer-events: none; transition: opacity .3s; }
.lg-card.ok .lg-orb i { animation-duration: 1.6s; filter: blur(34px); }
.lg-card.ok .lg-orb s { border-color: rgba(181, 217, 107, .9); animation: ring 1.2s ease-out both; }
@keyframes ring { from { transform: scale(.6); opacity: 1; } to { transform: scale(2.2); opacity: 0; } }
@keyframes pop { from { transform: scale(.4); opacity: 0; } }
@keyframes lgIn { from { opacity: 0; transform: translateY(14px); } }

/* tablet and phone: logo row on top, card below */
@media (max-width: 900px) {
  .lg { grid-template-columns: 1fr; padding: 20px 16px 8px; gap: 54px 0; justify-items: center; align-content: start; }
  .lg-brand { grid-row: auto; grid-template-columns: auto 1fr; align-items: center; gap: 14px; max-width: 440px; width: 100%; }
  .lg-logo { width: 84px; }
  .lg-k { font-size: 12px; margin-bottom: 4px; }
  .lg-h { font-size: 20px; margin: 0; max-width: none; }
  .lg-s { display: none; }
  .lg-card { max-width: 440px; }
  .lg-foot { grid-column: 1; margin: -38px 0 16px; color: #d6e0f0; max-width: 440px; }
}
@media (max-width: 420px) {
  .lg-top { padding: 26px 18px 22px; }
  .lg-hi { font-size: 44px; margin-top: 24px; }
  .lg-hi.long { font-size: 32px; }
  .lg-name { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
