:root{
  --pm-auth-bg:#07111c;
  --pm-auth-bg-2:#0b1727;
  --pm-auth-card:rgba(7,15,28,.72);
  --pm-auth-card-strong:rgba(10,20,36,.88);
  --pm-auth-border:rgba(255,255,255,.08);
  --pm-auth-border-strong:rgba(255,255,255,.14);
  --pm-auth-text:#edf3fb;
  --pm-auth-muted:#98a9c2;
  --pm-auth-green:#43c878;
  --pm-auth-green-dark:#2fb868;
  --pm-auth-blue:#4fa3ff;
  --pm-auth-blue-soft:rgba(79,163,255,.18);
  --pm-auth-green-soft:rgba(67,200,120,.18);
  --pm-auth-danger:#ff7d7d;
  --pm-auth-shadow:0 30px 80px rgba(0,0,0,.42);
  --pm-auth-shadow-strong:0 40px 120px rgba(0,0,0,.58);
}

*{
  box-sizing:border-box;
}

html,
body{
  margin:0;
  min-height:100%;
}

body.pm-auth-body{
  min-height:100dvh;
  font-family:Inter,Segoe UI,Arial,sans-serif;
  color:var(--pm-auth-text);
  background:#040b14;
  position:relative;
  overflow-x:hidden;
  overflow-y:auto;
  display:block;
  -webkit-overflow-scrolling:touch;
}

.pm-auth-bg{
  position:fixed;
  inset:0;
  z-index:0;
  background:
    radial-gradient(circle at 50% 0%, rgba(64,130,255,.16), transparent 24%),
    linear-gradient(180deg, rgba(4,10,18,.18), rgba(4,10,18,.72)),
    url("/assets/images/auth-bg.png") center center / cover no-repeat;
  transform:scale(1.04);
  animation:pmAuthBgPulse 8s ease-in-out infinite;
}

.pm-auth-overlay{
  position:fixed;
  inset:0;
  z-index:1;
  background:
    radial-gradient(circle at center, rgba(8,18,34,.12) 0%, rgba(4,10,18,.58) 60%, rgba(4,10,18,.86) 100%),
    linear-gradient(90deg, rgba(4,10,18,.92) 0%, rgba(4,10,18,.56) 50%, rgba(4,10,18,.84) 100%);
  pointer-events:none;
}

.pm-auth-lights{
  position:fixed;
  inset:0;
  z-index:1;
  pointer-events:none;
  overflow:hidden;
}

.pm-auth-light{
  position:absolute;
  border-radius:999px;
  filter:blur(14px);
  opacity:.5;
  mix-blend-mode:screen;
}

.pm-auth-light-1{
  width:420px;
  height:420px;
  top:-120px;
  left:8%;
  background:radial-gradient(circle, rgba(79,163,255,.22) 0%, rgba(79,163,255,.08) 35%, transparent 70%);
  animation:pmAuthFloatOne 9s ease-in-out infinite;
}

.pm-auth-light-2{
  width:520px;
  height:520px;
  right:4%;
  top:-80px;
  background:radial-gradient(circle, rgba(67,200,120,.14) 0%, rgba(79,163,255,.10) 34%, transparent 72%);
  animation:pmAuthFloatTwo 11s ease-in-out infinite;
}

.pm-auth-light-3{
  width:360px;
  height:360px;
  left:50%;
  bottom:-120px;
  transform:translateX(-50%);
  background:radial-gradient(circle, rgba(67,200,120,.16) 0%, rgba(67,200,120,.06) 35%, transparent 72%);
  animation:pmAuthFloatThree 10s ease-in-out infinite;
}

.pm-auth-particles{
  position:fixed;
  inset:0;
  z-index:1;
  pointer-events:none;
  overflow:hidden;
}

.pm-auth-particles span{
  position:absolute;
  width:4px;
  height:4px;
  border-radius:50%;
  background:rgba(255,255,255,.5);
  box-shadow:0 0 10px rgba(255,255,255,.28);
  animation:pmParticleRise linear infinite;
}

.pm-auth-particles span:nth-child(1){ left:8%;  bottom:-20px; animation-duration:12s; animation-delay:0s; opacity:.45; }
.pm-auth-particles span:nth-child(2){ left:16%; bottom:-30px; animation-duration:15s; animation-delay:1s; opacity:.3; }
.pm-auth-particles span:nth-child(3){ left:28%; bottom:-18px; animation-duration:10s; animation-delay:2s; opacity:.36; }
.pm-auth-particles span:nth-child(4){ left:41%; bottom:-24px; animation-duration:14s; animation-delay:1.5s; opacity:.25; }
.pm-auth-particles span:nth-child(5){ left:53%; bottom:-28px; animation-duration:13s; animation-delay:3s; opacity:.42; }
.pm-auth-particles span:nth-child(6){ left:64%; bottom:-20px; animation-duration:16s; animation-delay:2.5s; opacity:.32; }
.pm-auth-particles span:nth-child(7){ left:72%; bottom:-26px; animation-duration:11s; animation-delay:1.2s; opacity:.38; }
.pm-auth-particles span:nth-child(8){ left:81%; bottom:-30px; animation-duration:15s; animation-delay:4s; opacity:.26; }
.pm-auth-particles span:nth-child(9){ left:89%; bottom:-18px; animation-duration:12s; animation-delay:2.2s; opacity:.35; }
.pm-auth-particles span:nth-child(10){ left:94%; bottom:-24px; animation-duration:17s; animation-delay:3.5s; opacity:.24; }

.pm-auth-page{
  position:relative;
  z-index:2;
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:32px 20px;
}

.pm-auth-wrap{
  width:100%;
  max-width:480px;
  display:flex;
  flex-direction:column;
  align-items:center;
}

.pm-auth-brand{
  display:flex;
  align-items:center;
  justify-content:center;
  margin-bottom:22px;
  text-decoration:none;
  position:relative;
}

.pm-auth-brand::before{
  content:"";
  position:absolute;
  inset:auto 50% -10px 50%;
  width:180px;
  height:60px;
  transform:translateX(-50%);
  background:radial-gradient(circle, rgba(79,163,255,.18) 0%, rgba(67,200,120,.10) 38%, transparent 72%);
  filter:blur(20px);
  z-index:-1;
  animation:pmBrandGlow 4s ease-in-out infinite;
}

.pm-auth-logo-clean{
  display:block;
  width:190px;
  max-width:70vw;
  height:auto;
  filter:
    drop-shadow(0 12px 26px rgba(0,0,0,.45))
    drop-shadow(0 0 18px rgba(79,163,255,.18));
  animation:pmLogoFloat 5s ease-in-out infinite;
}

.pm-auth-card{
  position:relative;
  width:100%;
  padding:32px;
  border-radius:30px;
  background:
    linear-gradient(180deg, rgba(12,22,40,.82), rgba(5,12,24,.78));
  border:1px solid var(--pm-auth-border);
  box-shadow:
    var(--pm-auth-shadow),
    inset 0 1px 0 rgba(255,255,255,.06),
    0 0 0 1px rgba(255,255,255,.02);
  backdrop-filter:blur(16px);
  overflow:hidden;
  animation:pmCardFloat 6s ease-in-out infinite;
}

.pm-auth-card::before{
  content:"";
  position:absolute;
  inset:0;
  background:
    linear-gradient(135deg, rgba(79,163,255,.10) 0%, transparent 28%, transparent 72%, rgba(67,200,120,.08) 100%);
  pointer-events:none;
}

.pm-auth-card::after{
  content:"";
  position:absolute;
  top:-120%;
  left:-40%;
  width:60%;
  height:280%;
  transform:rotate(18deg);
  background:linear-gradient(180deg, transparent 0%, rgba(255,255,255,.06) 45%, transparent 100%);
  animation:pmCardSheen 9s linear infinite;
  pointer-events:none;
}

.pm-auth-intro{
  margin-bottom:24px;
  text-align:center;
  position:relative;
  z-index:1;
}

.pm-auth-intro h1{
  margin:0;
  font-size:42px;
  line-height:1.03;
  font-weight:900;
  letter-spacing:-0.03em;
  text-shadow:0 8px 24px rgba(0,0,0,.35);
}

.pm-auth-intro p{
  margin:12px 0 0;
  color:var(--pm-auth-muted);
  line-height:1.65;
  font-size:15px;
}

.pm-auth-alert{
  position:relative;
  z-index:1;
  margin-bottom:18px;
  padding:14px 16px;
  border-radius:16px;
  font-size:14px;
  line-height:1.6;
  backdrop-filter:blur(10px);
}

.pm-auth-alert-error{
  background:rgba(255,125,125,.12);
  border:1px solid rgba(255,125,125,.20);
  color:#ffdede;
  box-shadow:0 10px 24px rgba(255,80,80,.08);
}

.pm-auth-form{
  position:relative;
  z-index:1;
  display:flex;
  flex-direction:column;
  gap:16px;
}

.pm-auth-field{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.pm-auth-field label{
  font-size:14px;
  font-weight:700;
  color:#dce7f8;
  letter-spacing:.01em;
}

.pm-auth-field input{
  width:100%;
  height:58px;
  border:1px solid rgba(255,255,255,.08);
  border-radius:18px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.028));
  color:var(--pm-auth-text);
  padding:0 18px;
  font-size:15px;
  outline:none;
  transition:
    border-color .22s ease,
    box-shadow .22s ease,
    background .22s ease,
    transform .22s ease;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.03),
    0 8px 20px rgba(0,0,0,.18);
}

.pm-auth-field input::placeholder{
  color:#8ea1bc;
}

.pm-auth-field input:hover{
  border-color:rgba(255,255,255,.12);
  background:linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.035));
}

.pm-auth-field input:focus{
  border-color:rgba(67,200,120,.42);
  box-shadow:
    0 0 0 4px rgba(67,200,120,.09),
    0 0 24px rgba(67,200,120,.12),
    inset 0 1px 0 rgba(255,255,255,.04);
  background:rgba(255,255,255,.07);
  transform:translateY(-1px);
}

.pm-auth-remember{
  display:flex;
  align-items:center;
  gap:10px;
  font-size:14px;
  color:#d7e2f2;
  user-select:none;
  margin-top:2px;
}

.pm-auth-remember input{
  width:16px;
  height:16px;
  accent-color:#43c878;
  cursor:pointer;
}

.pm-auth-btn{
  position:relative;
  overflow:hidden;
  isolation:isolate;
  margin-top:4px;
  width:100%;
  min-height:58px;
  border:none;
  border-radius:18px;
  background:linear-gradient(180deg, var(--pm-auth-green), var(--pm-auth-green-dark));
  color:#06120b;
  font-size:16px;
  font-weight:900;
  cursor:pointer;
  transition:transform .22s ease, filter .22s ease, box-shadow .22s ease;
  box-shadow:
    0 16px 34px rgba(47,184,104,.24),
    0 0 28px rgba(67,200,120,.18);
}

.pm-auth-btn span{
  position:relative;
  z-index:2;
  display:inline-block;
}

.pm-auth-btn::before{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(180deg, rgba(255,255,255,.18), rgba(255,255,255,0));
  opacity:.65;
  z-index:0;
}

.pm-auth-btn::after{
  content:"";
  position:absolute;
  top:0;
  left:-30%;
  width:30%;
  height:100%;
  background:linear-gradient(90deg, transparent, rgba(255,255,255,.34), transparent);
  transform:skewX(-20deg);
  animation:pmButtonSweep 3.8s ease-in-out infinite;
  z-index:1;
}

.pm-auth-btn:hover{
  transform:translateY(-2px) scale(1.005);
  filter:brightness(1.04);
  box-shadow:
    0 20px 38px rgba(47,184,104,.28),
    0 0 36px rgba(67,200,120,.22);
}

.pm-auth-btn:active{
  transform:translateY(0);
}

.pm-auth-switch{
  position:relative;
  z-index:1;
  margin-top:20px;
  padding-top:18px;
  border-top:1px solid rgba(255,255,255,.06);
  font-size:14px;
  color:var(--pm-auth-muted);
  text-align:center;
}

.pm-auth-switch a{
  color:#fff;
  font-weight:800;
  margin-left:6px;
  text-decoration:none;
  transition:color .18s ease, text-shadow .18s ease;
}

.pm-auth-switch a:hover{
  color:#c9f6d7;
  text-shadow:0 0 12px rgba(67,200,120,.18);
}

.pm-auth-mascot{
  position:fixed;
  right:18px;
  bottom:18px;
  z-index:4;
  display:flex;
  align-items:flex-end;
  gap:10px;
}

.pm-auth-mascot-bubble{
  padding:12px 14px;
  border-radius:16px;
  background:rgba(8,16,28,.88);
  border:1px solid rgba(255,255,255,.07);
  color:#d8e5f7;
  font-size:13px;
  box-shadow:0 12px 28px rgba(0,0,0,.28);
  backdrop-filter:blur(10px);
}

.pm-auth-mascot-avatar{
  width:68px;
  height:68px;
  border-radius:20px;
  overflow:hidden;
  display:flex;
  align-items:center;
  justify-content:center;
  background:linear-gradient(135deg, rgba(67,200,120,.14), rgba(68,116,255,.16));
  border:1px solid rgba(255,255,255,.08);
  box-shadow:0 12px 28px rgba(0,0,0,.26);
  font-size:28px;
}

.pm-auth-mascot-avatar img{
  width:100%;
  height:100%;
  object-fit:contain;
}

@keyframes pmAuthBgPulse{
  0%,100%{ transform:scale(1.04); filter:brightness(1); }
  50%{ transform:scale(1.06); filter:brightness(1.04); }
}

@keyframes pmAuthFloatOne{
  0%,100%{ transform:translate3d(0,0,0); opacity:.42; }
  50%{ transform:translate3d(18px,14px,0); opacity:.58; }
}

@keyframes pmAuthFloatTwo{
  0%,100%{ transform:translate3d(0,0,0); opacity:.35; }
  50%{ transform:translate3d(-16px,20px,0); opacity:.52; }
}

@keyframes pmAuthFloatThree{
  0%,100%{ transform:translateX(-50%) translateY(0); opacity:.3; }
  50%{ transform:translateX(-50%) translateY(-14px); opacity:.46; }
}

@keyframes pmParticleRise{
  0%{
    transform:translateY(0) scale(.7);
    opacity:0;
  }
  12%{
    opacity:.45;
  }
  100%{
    transform:translateY(-110vh) scale(1.15);
    opacity:0;
  }
}

@keyframes pmBrandGlow{
  0%,100%{ opacity:.7; transform:translateX(-50%) scale(1); }
  50%{ opacity:1; transform:translateX(-50%) scale(1.06); }
}

@keyframes pmLogoFloat{
  0%,100%{ transform:translateY(0); }
  50%{ transform:translateY(-4px); }
}

@keyframes pmCardFloat{
  0%,100%{ transform:translateY(0); }
  50%{ transform:translateY(-4px); }
}

@keyframes pmCardSheen{
  0%{ transform:translateX(-220%) rotate(18deg); }
  100%{ transform:translateX(420%) rotate(18deg); }
}

@keyframes pmButtonSweep{
  0%,100%{ left:-34%; }
  55%{ left:118%; }
}

@media (max-width: 640px){
  html,
  body{
    min-height:100%;
    height:auto;
    overflow-y:auto;
    overflow-x:hidden;
    overscroll-behavior-y:contain;
  }

  .pm-auth-page{
    display:block;
    min-height:auto;
    height:auto;
    padding:20px 14px 110px;
    align-items:flex-start;
    justify-content:flex-start;
  }

  .pm-auth-wrap{
    max-width:100%;
  }

  .pm-auth-brand{
    margin-bottom:18px;
  }

  .pm-auth-logo-clean{
    width:160px;
    max-width:68vw;
  }

  .pm-auth-card{
    padding:22px;
    border-radius:24px;
    animation:none;
  }

  .pm-auth-intro h1{
    font-size:32px;
  }

  .pm-auth-intro p{
    font-size:14px;
  }

  .pm-auth-field input{
    height:54px;
    border-radius:16px;
    font-size:15px;
  }

  .pm-auth-btn{
    min-height:54px;
    border-radius:16px;
  }

  .pm-auth-mascot{
    right:12px;
    left:12px;
    bottom:12px;
    justify-content:flex-end;
  }

  .pm-auth-mascot-bubble{
    max-width:220px;
    font-size:12px;
  }

  .pm-auth-mascot-avatar{
    width:58px;
    height:58px;
    border-radius:18px;
  }

  .pm-auth-light-1,
  .pm-auth-light-2,
  .pm-auth-light-3{
    filter:blur(20px);
    opacity:.42;
  }
}

@media (prefers-reduced-motion: reduce){
  .pm-auth-bg,
  .pm-auth-light,
  .pm-auth-particles span,
  .pm-auth-brand::before,
  .pm-auth-logo-clean,
  .pm-auth-card,
  .pm-auth-card::after,
  .pm-auth-btn::after{
    animation:none !important;
  }
}