:root {
  --blue: #1f3f95;
  --gold: #f2c21a;
  --green: #71bf44;
  --teal: #1aa7c8;
  --ink: #14234d;
  --panel: rgba(255, 255, 255, 0.86);
  --line: #cfdcff;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: Manrope, sans-serif;
  color: var(--ink);
  background: linear-gradient(145deg, #f0f6ff 0%, #eaf5ea 45%, #edf4ff 100%);
  overflow-x: hidden;
  overflow-y: auto;
}

.scene {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(10px);
  opacity: .45;
  animation: drift 10s ease-in-out infinite alternate;
}

.orb-a {
  width: 420px;
  height: 420px;
  top: -120px;
  right: -80px;
  background: radial-gradient(circle, rgba(242,194,26,.65), transparent 68%);
}

.orb-b {
  width: 360px;
  height: 360px;
  left: -100px;
  bottom: -120px;
  background: radial-gradient(circle, rgba(113,191,68,.55), transparent 70%);
  animation-delay: 1.6s;
}

.orb-c {
  width: 280px;
  height: 280px;
  right: 30%;
  bottom: 15%;
  background: radial-gradient(circle, rgba(26,167,200,.4), transparent 70%);
  animation-delay: .9s;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.login-card {
  width: min(560px, 96vw);
  background: var(--panel);
  border: 1px solid #e7eeff;
  border-radius: 24px;
  box-shadow: 0 24px 64px rgba(20, 42, 91, .2);
  backdrop-filter: blur(8px);
  padding: 1.4rem 1.4rem 1.2rem;
  animation: rise .5s ease;
}

.logo-wrap {
  width: 94px;
  height: 94px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--line);
  padding: 4px;
  box-shadow: 0 14px 30px rgba(31, 63, 149, .2);
}

.logo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

.eyebrow {
  margin: .9rem 0 .2rem;
  font-size: .76rem;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--blue);
  font-weight: 800;
}

h1 {
  margin: 0;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.3rem);
}

.intro {
  margin: .55rem 0 1rem;
  color: #384d83;
  line-height: 1.6;
}

.form-grid { display: grid; gap: .7rem; }

label {
  display: grid;
  gap: .36rem;
  font-weight: 700;
}

input {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: .75rem .85rem;
  font: inherit;
  background: #fff;
  transition: border-color .2s ease, box-shadow .2s ease;
}

input:focus {
  outline: none;
  border-color: #92adff;
  box-shadow: 0 0 0 4px rgba(47, 92, 192, .15);
}

.btn-primary {
  border: 0;
  border-radius: 12px;
  padding: .8rem .95rem;
  font: inherit;
  font-weight: 800;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(130deg, #1f3f95, #2e56bc 56%, #1aa7c8);
  transition: transform .2s ease, box-shadow .2s ease;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(21, 48, 113, .25);
}

.btn-primary:disabled {
  opacity: .7;
  cursor: wait;
  transform: none;
  box-shadow: none;
}

.status {
  margin: .05rem 0 0;
  min-height: 1.2rem;
  font-weight: 700;
  color: #24427f;
}

.foot-row {
  margin-top: .5rem;
  display: flex;
  justify-content: flex-end;
}

.text-link {
  color: var(--blue);
  text-decoration: none;
  font-weight: 700;
}

@media (max-width: 640px) {
  .login-shell {
    align-items: start;
    padding: max(1rem, env(safe-area-inset-top)) .85rem 1.25rem;
  }
  .login-card {
    width: 100%;
    border-radius: 20px;
    padding: 1.1rem 1rem 1rem;
  }
  .logo-wrap {
    width: 78px;
    height: 78px;
  }
  .foot-row {
    justify-content: flex-start;
  }
}

@keyframes drift {
  from { transform: translateY(0) translateX(0) scale(1); }
  to { transform: translateY(-16px) translateX(8px) scale(1.04); }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(18px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
