[hidden] {
  display: none !important;
}

.login-screen {
  --login-navy: #061c2c;
  --login-blue: #0b3850;
  --login-cyan: #46cbd9;
  --login-mint: #77e2be;
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 34px 32px 54px;
  background:
    radial-gradient(circle at 12% 13%, rgba(41, 165, 180, .28), transparent 29%),
    radial-gradient(circle at 82% 87%, rgba(33, 118, 139, .24), transparent 28%),
    linear-gradient(138deg, #041724 0%, #082638 48%, #0b3447 100%);
}

.login-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  opacity: .27;
  background-image:
    linear-gradient(rgba(112, 211, 216, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(112, 211, 216, .055) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, #000, transparent 82%);
}

.login-ambient {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.login-ambient i {
  position: absolute;
  display: block;
  width: 320px;
  height: 320px;
  border: 1px solid rgba(107, 221, 224, .16);
  border-radius: 50%;
}

.login-ambient i::before,
.login-ambient i::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(107, 221, 224, .12);
  border-radius: inherit;
}

.login-ambient i::before { inset: 38px; }
.login-ambient i::after { inset: 88px; }
.login-ambient i:nth-child(1) { left: -135px; top: -120px; }
.login-ambient i:nth-child(2) { right: -160px; bottom: -145px; width: 410px; height: 410px; }
.login-ambient i:nth-child(3) { right: 23%; top: -250px; width: 500px; height: 500px; opacity: .45; }

.login-shell {
  width: min(1240px, 100%);
  min-height: min(690px, calc(100vh - 88px));
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(390px, .72fr);
  overflow: hidden;
  border: 1px solid rgba(170, 235, 235, .22);
  border-radius: 26px;
  background: rgba(8, 40, 56, .88);
  box-shadow: 0 36px 90px rgba(0, 10, 18, .42);
  backdrop-filter: blur(18px);
}

.login-hero {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 42px 50px 30px;
  color: #efffff;
  background:
    linear-gradient(125deg, rgba(11, 63, 80, .84), rgba(5, 35, 49, .55)),
    radial-gradient(circle at 72% 64%, rgba(65, 200, 207, .18), transparent 37%);
}

.login-hero::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(transparent, rgba(130, 231, 226, .32), transparent);
}

.login-brand {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 15px;
  align-items: center;
}

.login-logo {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid rgba(129, 232, 221, .46);
  border-radius: 15px;
  background: linear-gradient(145deg, rgba(103, 226, 208, .2), rgba(39, 147, 170, .08));
  box-shadow: inset 0 0 18px rgba(86, 225, 219, .09);
}

.login-logo svg { width: 36px; height: 36px; }
.login-logo path:first-child { fill: none; stroke: #83ead5; stroke-width: 2.3; }
.login-logo .logo-wave { fill: none; stroke: #49c9dc; stroke-width: 2.2; stroke-linecap: round; }

.login-brand strong,
.login-brand small {
  display: block;
}

.login-brand strong {
  color: #fff;
  font-size: 20px;
  letter-spacing: .015em;
}

.login-brand small {
  margin-top: 1px;
  color: #9fc7cc;
  font-size: 11px;
  letter-spacing: .05em;
}

.login-kicker {
  margin: 0;
  color: #79dfce;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .16em;
}

.login-brand .login-kicker {
  margin-bottom: 2px;
  color: #67c9d1;
  font-size: 9px;
}

.login-message {
  position: relative;
  z-index: 2;
  width: min(680px, 96%);
  margin-top: clamp(54px, 8vh, 82px);
}

.login-message h1 {
  max-width: 650px;
  margin: 13px 0 17px;
  color: #f8ffff;
  font-size: clamp(38px, 4.2vw, 58px);
  line-height: 1.04;
  letter-spacing: -.045em;
}

.login-message > p:last-of-type {
  max-width: 620px;
  margin: 0;
  color: #bdd6da;
  font-size: 16px;
  line-height: 1.7;
}

.login-capabilities {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 24px;
}

.login-capabilities span {
  padding: 7px 11px;
  border: 1px solid rgba(126, 220, 217, .22);
  border-radius: 999px;
  color: #cce9ea;
  background: rgba(5, 35, 48, .38);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
}

.hydraulic-scene {
  position: relative;
  z-index: 1;
  width: min(760px, 112%);
  margin: auto -16px -32px;
}

.hydraulic-scene > svg {
  display: block;
  width: 100%;
  overflow: visible;
}

.scene-grid { fill: none; stroke: #8bcbd0; stroke-width: .7; opacity: .085; }
.scene-pipe-outline { fill: none; stroke: #061a27; stroke-width: 29; stroke-linecap: round; stroke-linejoin: round; opacity: .75; }
.scene-pipe { fill: none; stroke: url(#waterFlow); stroke-width: 15; stroke-linecap: round; stroke-linejoin: round; opacity: .84; filter: url(#softGlow); stroke-dasharray: 10 12; animation: login-flow 4s linear infinite; }
.scene-pump { fill: url(#machineMetal); stroke: #7bddda; stroke-width: 3; }
.scene-pump-ring { fill: rgba(6, 31, 43, .72); stroke: #67ced3; stroke-width: 2; }
.scene-impeller { fill: #70ddcb; opacity: .92; transform-origin: 376px 165px; animation: login-spin 14s linear infinite; }
.scene-shaft { stroke: #b1e9e5; stroke-width: 8; stroke-linecap: round; }
.scene-motor { fill: url(#machineMetal); stroke: #6fc5cc; stroke-width: 2.5; }
.scene-motor-lines { fill: none; stroke: #9bdcdf; stroke-width: 2; opacity: .42; }
.scene-sensor { fill: #84efd1; filter: url(#softGlow); animation: login-pulse 2.4s ease-in-out infinite; }
.scene-signal { fill: none; stroke: #85ebd7; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; opacity: .68; }
.scene-water-back { fill: #1d8193; opacity: .28; }
.scene-water-front { fill: #29a4b4; opacity: .2; }

.scene-metric {
  position: absolute;
  min-width: 90px;
  padding: 8px 10px;
  border: 1px solid rgba(127, 222, 218, .2);
  border-radius: 10px;
  background: rgba(4, 28, 40, .78);
  box-shadow: 0 10px 22px rgba(0, 10, 18, .16);
  backdrop-filter: blur(7px);
}

.scene-metric span,
.scene-metric b { display: block; }
.scene-metric span { color: #78b8bf; font-size: 8px; font-weight: 800; letter-spacing: .1em; }
.scene-metric b { margin-top: 2px; color: #dffff9; font-size: 11px; }
.login-scene .metric-flow, .login-hero .metric-flow { left: 5%; bottom: 27%; }
.login-scene .metric-energy, .login-hero .metric-energy { right: 5%; bottom: 37%; }
.login-scene .metric-health, .login-hero .metric-health { right: 27%; bottom: 5%; }

.login-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 46px clamp(34px, 4vw, 58px);
  background: linear-gradient(155deg, rgba(255, 255, 255, .99), rgba(239, 248, 248, .97));
}

.login-panel-head {
  position: absolute;
  top: 28px;
  left: clamp(34px, 4vw, 58px);
  right: clamp(34px, 4vw, 58px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #61797d;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.login-panel-head span { display: flex; align-items: center; gap: 7px; }
.login-panel-head i { width: 7px; height: 7px; border-radius: 50%; background: #20a77e; box-shadow: 0 0 0 4px rgba(32, 167, 126, .1); }
.login-panel-head small { color: #91a4a7; font-size: 10px; }

.login-form-copy { margin-bottom: 27px; }
.login-form-copy .login-kicker { color: #167b76; }

.login-form-copy h2 {
  margin: 10px 0 9px;
  color: #0b2b38;
  font-size: clamp(28px, 3vw, 36px);
  line-height: 1.12;
  letter-spacing: -.035em;
}

.login-form-copy > p:last-child {
  margin: 0;
  color: #657a7e;
  font-size: 14px;
  line-height: 1.65;
}

.login-form {
  display: grid;
  gap: 17px;
}

.login-form label {
  display: grid;
  gap: 7px;
  color: #183b46;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .015em;
}

.login-form input {
  width: 100%;
  height: 50px;
  padding: 0 14px;
  border: 1px solid #cbdadd;
  border-radius: 10px;
  outline: 0;
  background: rgba(255, 255, 255, .9);
  color: #102f3a;
  font-size: 15px;
  font-weight: 600;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.login-form input::placeholder { color: #9aabad; font-weight: 400; }
.login-form input:focus { border-color: #269da4; background: #fff; box-shadow: 0 0 0 4px rgba(38, 157, 164, .12); }

.password-control { position: relative; display: block; }
.password-control input { padding-right: 70px; }

.password-control button {
  position: absolute;
  top: 50%;
  right: 9px;
  transform: translateY(-50%);
  padding: 7px 8px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #347077;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.password-control button:hover { background: #e9f4f4; }

.login-submit {
  height: 51px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 3px;
  padding: 0 18px;
  border-radius: 10px;
  background: linear-gradient(100deg, #087874, #1199a0);
  box-shadow: 0 12px 26px rgba(8, 120, 116, .21);
  font-size: 14px;
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.login-submit:hover { transform: translateY(-1px); box-shadow: 0 15px 30px rgba(8, 120, 116, .28); filter: saturate(1.08); }
.login-submit:disabled { transform: none; opacity: .62; cursor: wait; box-shadow: none; }
.login-submit b { font-size: 20px; font-weight: 400; }

.login-error {
  margin: 16px 0 0;
  padding: 11px 13px;
  border: 1px solid #ebc5c5;
  border-radius: 9px;
  background: #fff1f1;
  color: #993e3e;
  font-size: 12px;
  line-height: 1.45;
}

.login-trust {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 29px;
  padding-top: 22px;
  border-top: 1px solid #dce7e8;
}

.login-trust > div { display: flex; gap: 9px; align-items: center; min-width: 0; }
.trust-icon { width: 29px; height: 29px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 8px; background: #e1f2ef; color: #167f74; font-size: 13px; font-weight: 900; }
.login-trust p { min-width: 0; margin: 0; }
.login-trust b,
.login-trust small { display: block; }
.login-trust b { color: #29474e; font-size: 10px; }
.login-trust small { overflow: hidden; color: #829497; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }

.login-security {
  margin: 17px 0 0;
  color: #829396;
  font-size: 10px;
  text-align: center;
}

.login-footer {
  position: absolute;
  bottom: 16px;
  left: 32px;
  right: 32px;
  display: flex;
  justify-content: space-between;
  color: rgba(193, 226, 228, .54);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.user-pill {
  padding: 7px 10px;
  border-radius: 99px;
  background: #e6f2ed;
  color: #155f4c;
  font-size: 12px;
  font-weight: 800;
}

.session-user {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #2d5148;
  line-height: 1.5;
}

.session-user b { color: white; }

@keyframes login-flow { to { stroke-dashoffset: -88; } }
@keyframes login-spin { to { transform: rotate(360deg); } }
@keyframes login-pulse { 50% { opacity: .42; transform: scale(.78); transform-origin: center; } }

@media (max-width: 940px) {
  .login-screen { align-items: start; overflow: auto; padding: 22px 20px 52px; }
  .login-shell { min-height: auto; grid-template-columns: 1fr; }
  .login-hero { min-height: 390px; padding: 34px 38px 0; }
  .login-message { width: min(580px, 100%); margin-top: 42px; }
  .login-message h1 { font-size: clamp(34px, 7vw, 48px); }
  .login-message > p:last-of-type { font-size: 14px; }
  .hydraulic-scene { position: absolute; right: -120px; bottom: -82px; width: 620px; opacity: .66; }
  .scene-metric { display: none; }
  .login-panel { min-height: 540px; padding: 74px min(9vw, 64px) 42px; }
}

@media (max-width: 560px) {
  .login-screen { padding: 0 0 42px; background: #071e2c; }
  .login-shell { width: 100%; border: 0; border-radius: 0; box-shadow: none; }
  .login-hero { min-height: 300px; padding: 27px 24px 0; }
  .login-brand small { font-size: 9px; }
  .login-message { margin-top: 34px; }
  .login-message h1 { max-width: 410px; margin: 9px 0 12px; font-size: clamp(30px, 9.5vw, 42px); }
  .login-message > p:last-of-type { display: none; }
  .login-capabilities { gap: 6px; margin-top: 16px; }
  .login-capabilities span { padding: 6px 8px; font-size: 9px; }
  .hydraulic-scene { right: -210px; bottom: -127px; width: 590px; opacity: .46; }
  .login-panel { min-height: 520px; padding: 66px 24px 35px; }
  .login-panel-head { top: 24px; left: 24px; right: 24px; }
  .login-form-copy h2 { font-size: 29px; }
  .login-trust { grid-template-columns: 1fr; }
  .login-footer { left: 18px; right: 18px; justify-content: center; text-align: center; }
  .login-footer span:last-child { display: none; }
}

@media (max-height: 720px) and (min-width: 941px) {
  .login-shell { min-height: 620px; }
  .login-message { margin-top: 42px; }
  .login-message h1 { font-size: 43px; }
  .hydraulic-scene { margin-bottom: -78px; }
  .login-panel { padding-top: 62px; padding-bottom: 34px; }
  .login-trust { margin-top: 20px; padding-top: 17px; }
}

@media (prefers-reduced-motion: reduce) {
  .scene-pipe,
  .scene-impeller,
  .scene-sensor,
  .login-submit { animation: none; transition: none; }
}
