/* Declared here as well as in style.css, because the sign-in page loads this
   sheet on its own. Same relative path, same versioned directory, so the
   browser fetches the file once and reuses it for the portal. */
@font-face{
  font-family:"Plex Sans"; src:url("fonts/plex-sans-var.woff2") format("woff2");
  font-weight:100 700; font-style:normal; font-display:swap;
}

/* PulseEcho sign-in.
   The palette, the glassy card and the wave field are ported from the original
   PulseEcho front end at /var/www/hydrowatch — same colours, same shapes, now
   in front of authentication that actually works. Its own stylesheet rather than
   an override of the portal's: that one is dark-first and built for a wall, this
   one is a single bright page, and making one set of tokens serve both would
   compromise each. */
:root{
  --hydro-deep:#1a4b8c;
  --hydro-medium:#2196f3;
  --hydro-light:#4fc3f7;
  --hydro-pale:#e6f4ff;
  --hydro-ground:#4a6d8c;
  --ink:#1f2937;
  --dim:#6b7280;
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  background:var(--hydro-ground);
  color:var(--ink);
  font:15px/1.5 "Plex Sans",ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  -webkit-text-size-adjust:100%;
  overflow:hidden;
}

/* ---------- the water ----------
   Three layered waves, each a wide SVG drifting sideways at its own speed. The
   original used a Next.js animation loop; this is the same look with nothing to
   load and nothing to run — CSS transforms the compositor handles on its own. */
.sea{position:fixed;inset:0;pointer-events:none;overflow:hidden;z-index:0}
.sea svg{position:absolute;bottom:0;left:0;width:220%;height:58vh;min-height:320px}
.sea .w1{animation:drift 26s linear infinite;opacity:.30}
.sea .w2{animation:drift 38s linear infinite reverse;opacity:.22}
.sea .w3{animation:drift 52s linear infinite;opacity:.45}
@keyframes drift{from{transform:translateX(0)}to{transform:translateX(-50%)}}

/* Respect a stated preference for stillness — the waves are decoration, and
   decoration should never be the reason somebody cannot use a login form. */
@media (prefers-reduced-motion:reduce){
  .sea .w1,.sea .w2,.sea .w3{animation:none}
}

/* ---------- layout ---------- */
.wrap{position:relative;z-index:10;min-height:100%;display:flex;flex-direction:column;
  align-items:center;justify-content:center;padding:48px 16px}
.box{width:100%;max-width:28rem;animation:rise .8s cubic-bezier(.2,.7,.3,1) both}
@keyframes rise{from{opacity:0;transform:translateY(18px)}to{opacity:1;transform:none}}

/* ---------- mark ---------- */
.mark{text-align:center;margin-bottom:22px}
/* The mark is 1.83:1, so the box is too -- object-fit would letterbox it
   otherwise, and the sign-in page is the one place it is shown large. */
.logo{width:230px;height:126px;margin:0 auto 2px}
.logo img{width:100%;height:100%;object-fit:contain;display:block}
.mark h1{font-size:24px;font-weight:700;color:#fff;letter-spacing:.03em;margin:0}
.mark p{margin:6px 0 0;color:rgba(255,255,255,.75);font-size:13.5px}

/* ---------- card ---------- */
.card{border-radius:1rem;border:1px solid rgba(255,255,255,.2);
  background:rgba(255,255,255,.9);backdrop-filter:blur(12px);
  box-shadow:0 20px 25px -5px rgba(0,0,0,.18),0 8px 10px -6px rgba(0,0,0,.12);
  padding:30px 28px}

label{display:block;font-size:13.5px;font-weight:500;color:#374151;margin-bottom:6px}
.field{position:relative;margin-bottom:18px}
.field svg.lead{position:absolute;left:12px;top:50%;transform:translateY(-50%);
  width:20px;height:20px;color:#9ca3af;pointer-events:none}
input[type=text],input[type=password]{
  width:100%;border-radius:.5rem;border:2px solid rgb(128 200 255);
  background:rgba(230,244,255,.5);padding:.75rem 1rem .75rem 2.75rem;
  color:var(--ink);font:inherit;transition:all .2s cubic-bezier(.4,0,.2,1)}
input::placeholder{color:#9ca3af}
input[type=text]:focus,input[type=password]:focus{
  border-color:#29b6f6;background:#fff;outline:2px solid transparent;
  box-shadow:0 0 0 4px rgba(33,150,243,.35)}
.peek{position:absolute;right:10px;top:50%;transform:translateY(-50%);
  background:none;border:0;padding:4px;cursor:pointer;color:#9ca3af;line-height:0}
.peek:hover{color:#4b5563}
.peek svg{width:20px;height:20px}

button.go{width:100%;border:0;border-radius:.5rem;cursor:pointer;
  background:linear-gradient(180deg,var(--hydro-medium),#1976d2);color:#fff;
  font:inherit;font-weight:600;font-size:15px;padding:.8rem 1rem;
  box-shadow:0 6px 16px rgba(25,118,210,.35);transition:filter .15s,transform .06s}
button.go:hover{filter:brightness(1.07)}
button.go:active{transform:translateY(1px)}

.err{background:#fee2e2;border:1px solid #fca5a5;color:#b91c1c;
  padding:10px 13px;border-radius:.5rem;font-size:13.5px;margin-bottom:18px}
.foot{text-align:center;margin-top:18px;font-size:12.5px;color:rgba(255,255,255,.65)}

/* ---------- phones ---------- */
@media (max-width: 560px) {
  .wrap{padding:28px 16px calc(28px + env(safe-area-inset-bottom))}
  .logo{width:190px;height:104px}
  .card{padding:22px 18px}
  /* 16px or mobile Safari zooms the page the moment the field is focused. */
  input[type=text],input[type=password]{font-size:16px}
  button.go{min-height:46px}
  .sea svg{height:46vh}
}
