:root{
  --bg:#eef8ff;
  --bg2:#e0f2fe;
  --line:#dbeafe;

  --text:#000000;
  --muted:#000000;

  --shadow:0 20px 60px rgba(15,39,68,.14);

  --topbar-height:76px;

  --accent:#38bdf8;
  --accent-2:#0ea5e9;
  --accent-soft:#7dd3fc;
  --accent-deep:#0284c7;

  --blue-soft:#eef8ff;
  --blue-border:#bae6fd;
}

*{
  box-sizing:border-box;
  margin:0;
  padding:0;
}

html,
body{
  height:100%;
}

body{
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;
  color:var(--text);

  background:
    linear-gradient(
      135deg,
      #ffffff 0%,
      #eef8ff 45%,
      #e0f2fe 100%
    );

  overflow-x:hidden;
}

a{
  color:inherit;
  text-decoration:none;
}


/* ==========================================================================
   Header
   ========================================================================== */

.portal-header-brand{
  position:fixed;
  top:0;
  left:0;
  width:100%;
  z-index:1000;

  display:flex;
  align-items:center;
  justify-content:space-between;

  padding:20px 32px;
  min-height:76px;

  border-bottom:1px solid var(--line);

  background:rgba(255,255,255,.96);

  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);

  box-shadow:0 5px 20px rgba(15,39,68,.05);
}

.portal-logo-text,
.portal-home-link{
  font-size:16px;
  font-weight:800;
  letter-spacing:-.2px;
  color:var(--text);
  text-decoration:none;
}

.portal-home-link{
  color:var(--accent-deep);
}

.portal-home-link:hover,
.portal-logo-text:hover,
.auth-header p a.link:hover,
.label-row a.forgot-link:hover,
.auth-footer a:hover{
  color:var(--accent-2);
}


/* ==========================================================================
   Logo
   ========================================================================== */

.portal-logo-text{
  display:inline-flex;
  align-items:center;
  gap:10px;
}

.portal-logo-image{
  width:36px;
  height:36px;
  object-fit:cover;
  border-radius:50%;
  clip-path:circle(50%);
  flex:0 0 36px;
}


/* ==========================================================================
   Main Layout
   ========================================================================== */

.portal-container{
  min-height:100vh;
  position:relative;
  display:grid;
  grid-template-columns:1.1fr .9fr;
  padding-top:var(--topbar-height);

  background:
    linear-gradient(
      135deg,
      #ffffff 0%,
      #eef8ff 45%,
      #e0f2fe 100%
    );
}


/* ==========================================================================
   Background Photos
   ========================================================================== */

.hero-bg{
  position:absolute;
  inset:0;
  overflow:hidden;
  pointer-events:none;
  z-index:1;
}

.bg-photo{
  position:absolute;

  width:220px;
  height:220px;

  border-radius:30px;

  background-size:cover;
  background-position:center;

  box-shadow:0 22px 60px rgba(15,39,68,.18);

  border:1px solid rgba(255,255,255,.85);

  opacity:.82;

  animation:floaty 7s ease-in-out infinite;

  transform:translate3d(0,0,0);

  filter:saturate(1.04) contrast(1.01);
}

.bg-photo::after{
  content:"";
  position:absolute;
  inset:0;

  border-radius:30px;

  background:linear-gradient(
    180deg,
    rgba(255,255,255,.03),
    rgba(15,39,68,.10)
  );
}

.p1{
  top:8%;
  left:6%;
  background-image:url('https://images.unsplash.com/photo-1547347298-4074fc3086f0?auto=format&fit=crop&w=900&q=80');
  animation-delay:0s;
}

.p2{
  top:18%;
  right:10%;
  background-image:url('https://images.unsplash.com/photo-1514525253161-7a46d19cd819?auto=format&fit=crop&w=900&q=80');
  animation-delay:1.2s;
}

.p3{
  bottom:12%;
  left:8%;
  background-image:url('https://images.unsplash.com/photo-1501386761578-eac5c94b800a?auto=format&fit=crop&w=900&q=80');
  animation-delay:2.1s;
}

.p4{
  bottom:18%;
  right:12%;
  background-image:url('https://images.unsplash.com/photo-1493225457124-a3eb161ffa5f?auto=format&fit=crop&w=900&q=80');
  animation-delay:1.7s;
}

.p5{
  top:42%;
  left:22%;

  background-image:url('https://images.unsplash.com/photo-1518611012118-696072aa579a?auto=format&fit=crop&w=900&q=80');

  animation-delay:.8s;

  width:180px;
  height:180px;
}

.p6{
  top:48%;
  right:22%;

  background-image:url('https://images.unsplash.com/photo-1501387483519-3f7d1a0e6f8f?auto=format&fit=crop&w=900&q=80');

  animation-delay:2.6s;

  width:180px;
  height:180px;
}

.bg-dim{
  position:absolute;
  inset:0;

  background:
    linear-gradient(
      90deg,
      rgba(255,255,255,.24) 0%,
      rgba(238,248,255,.36) 48%,
      rgba(224,242,254,.54) 100%
    );
}


/* ==========================================================================
   Hero
   ========================================================================== */

.login-hero{
  position:relative;
  z-index:2;

  display:flex;
  align-items:center;
  justify-content:flex-start;

  min-height:calc(100vh - var(--topbar-height));

  padding:40px 32px;

  grid-column:1;
}

.hero-copy{
  max-width:560px;

  background:rgba(255,255,255,.90);

  border:1px solid var(--blue-border);

  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);

  border-radius:34px;

  padding:30px;

  box-shadow:var(--shadow);
}

.hero-copy .pill{
  display:inline-flex;

  padding:8px 12px;

  border-radius:999px;

  border:1px solid var(--blue-border);

  background:var(--blue-soft);

  color:var(--accent-deep);

  font-size:12px;
  font-weight:800;
  letter-spacing:.04em;
  text-transform:uppercase;

  margin-bottom:14px;
}

.hero-copy h1{
  font-size:clamp(2.2rem,5vw,4.3rem);
  line-height:.95;
  letter-spacing:-2px;

  margin-bottom:14px;

  color:var(--text);
}

.hero-copy p{
  color:var(--muted);
  font-size:15px;
  line-height:1.7;
  max-width:42ch;
}


/* ==========================================================================
   Form Side
   ========================================================================== */

.form-panel{
  position:relative;
  z-index:3;

  grid-column:2;

  display:flex;
  align-items:center;
  justify-content:flex-end;

  min-height:calc(100vh - var(--topbar-height));

  padding:40px 32px 40px 16px;
}

.form-card{
  width:100%;
  max-width:520px;

  background:rgba(255,255,255,.97);

  border:1px solid var(--line);

  backdrop-filter:blur(18px);
  -webkit-backdrop-filter:blur(18px);

  border-radius:34px;

  box-shadow:var(--shadow);

  padding:30px;
}


/* ==========================================================================
   Form Header
   ========================================================================== */

.auth-header{
  margin-bottom:18px;
}

.auth-header h2{
  font-size:2rem;
  letter-spacing:-1px;
  line-height:1;

  margin-bottom:12px;

  color:var(--text);
}

.auth-header p,
.legal-check label{
  color:var(--muted);
  line-height:1.6;
  font-size:14px;
}

.auth-header p a.link{
  color:var(--accent-deep);
  text-decoration:underline;
  font-weight:800;
}


/* ==========================================================================
   Fields
   ========================================================================== */

.field{
  margin-bottom:18px;
}

.field label{
  display:block;

  color:var(--text);

  font-size:13px;
  font-weight:700;

  margin-bottom:8px;
}

.field input{
  width:100%;

  border-radius:16px;

  border:1px solid #cbd5e1;

  background:#ffffff;

  color:var(--text);

  padding:14px 16px;

  font-size:15px;

  outline:none;

  transition:
    border-color .18s ease,
    box-shadow .18s ease,
    background .18s ease;
}

.field input::placeholder{
  color:#000000;
  opacity:.65;
}

.field input:focus{
  border-color:var(--accent);

  box-shadow:0 0 0 3px rgba(56,189,248,.16);

  background:#ffffff;
}


/* ==========================================================================
   Password Row
   ========================================================================== */

.label-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
}

.label-row a.forgot-link{
  color:var(--accent-deep);
  text-decoration:underline;
  font-weight:800;
  font-size:13px;
}


/* ==========================================================================
   Remember Me
   ========================================================================== */

.legal-check{
  display:flex;
  align-items:center;
  gap:10px;

  margin-bottom:18px;
}

.legal-check input{
  width:16px;
  height:16px;

  accent-color:var(--accent);

  flex:0 0 auto;
}


/* ==========================================================================
   Login Button
   ========================================================================== */

.action-btn{
  width:100%;

  border:1px solid var(--accent);

  border-radius:999px;

  background:var(--accent);

  color:#ffffff;

  font-size:15px;
  font-weight:900;

  padding:15px 20px;

  cursor:pointer;

  transition:
    transform .18s ease,
    box-shadow .18s ease,
    background .18s ease,
    border-color .18s ease;

  box-shadow:0 12px 28px rgba(56,189,248,.22);
}

.action-btn:hover{
  background:var(--accent-2);

  border-color:var(--accent-2);

  transform:translateY(-2px);

  box-shadow:0 16px 34px rgba(14,165,233,.28);
}


/* ==========================================================================
   Footer Text
   ========================================================================== */

.auth-footer{
  margin-top:18px;

  text-align:center;

  font-size:14px;

  color:var(--muted);
}

.auth-footer a{
  color:var(--accent-deep);

  text-decoration:underline;

  font-weight:800;
}


/* ==========================================================================
   Errors
   ========================================================================== */

.error-box{
  color:#dc2626;

  margin:0 0 15px 0;

  font-size:14px;

  line-height:1.5;
}


/* ==========================================================================
   Return Home
   ========================================================================== */

.portal-home-link{
  color:var(--accent-deep);

  text-decoration:none;

  font-weight:800;

  display:inline-flex;

  align-items:center;

  gap:8px;
}

.portal-home-link::before{
  content:"←";

  font-size:14px;

  line-height:1;

  position:relative;

  top:-1px;
}


/* ==========================================================================
   Animation
   ========================================================================== */

@keyframes floaty{
  0%{
    transform:translateY(0) translateX(0) rotate(0deg) scale(1);
  }

  25%{
    transform:translateY(-14px) translateX(8px) rotate(1deg) scale(1.02);
  }

  50%{
    transform:translateY(-22px) translateX(-6px) rotate(-1deg) scale(1.01);
  }

  75%{
    transform:translateY(-10px) translateX(10px) rotate(1deg) scale(1.02);
  }

  100%{
    transform:translateY(0) translateX(0) rotate(0deg) scale(1);
  }
}

.center-motion{
  position:absolute;
  top:50%;
  left:50%;
  width:140px;
  height:220px;
  transform:translate(-50%,-50%);
  z-index:2;
  pointer-events:none;
}

.motion-orb{
  position:absolute;
  display:block;
  border-radius:50%;
  background:#38bdf8;
  box-shadow:0 0 24px rgba(56,189,248,.35);
  opacity:.85;
}

.orb-1{
  width:14px;
  height:14px;
  left:18px;
  top:30px;
  animation:orbFloat1 5s ease-in-out infinite;
}

.orb-2{
  width:10px;
  height:10px;
  right:24px;
  top:95px;
  animation:orbFloat2 4.5s ease-in-out infinite;
}

.orb-3{
  width:18px;
  height:18px;
  left:52px;
  bottom:24px;
  animation:orbFloat3 6s ease-in-out infinite;
}

@keyframes orbFloat1{
  0%,100%{
    transform:translate(0,0);
  }
  50%{
    transform:translate(30px,35px);
  }
}

@keyframes orbFloat2{
  0%,100%{
    transform:translate(0,0);
  }
  50%{
    transform:translate(-35px,28px);
  }
}

@keyframes orbFloat3{
  0%,100%{
    transform:translate(0,0);
  }
  50%{
    transform:translate(18px,-36px);
  }
}

@media (max-width:1100px){
  .center-motion{
    display:none;
  }
}


/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width:1100px){

  .portal-container{
    grid-template-columns:1fr;
  }

  .login-hero,
  .form-panel{
    grid-column:1;
    min-height:auto;
  }

  .login-hero{
    padding:40px 16px 20px;
  }

  .form-panel{
    padding:16px 16px 36px;
    justify-content:center;
  }
}


@media (max-width:900px){

  .bg-photo{
    width:160px;
    height:160px;
    border-radius:24px;
  }

  .p5,
  .p6{
    width:120px;
    height:120px;
  }

  .portal-header-brand{
    padding:18px 24px;
  }

  .hero-copy,
  .form-card{
    padding:22px;
  }
}


@media (max-width:640px){

  .bg-photo{
    opacity:.40;
  }

  .p5,
  .p6{
    display:none;
  }

  .form-panel{
    padding-top:8px;
  }

  .login-hero{
    padding-bottom:8px;
  }

  .form-card{
    width:100%;
  }

  .portal-header-brand{
    padding:16px;
  }

  .portal-logo-text,
  .portal-home-link{
    font-size:14px;
  }
}