:root {
  --bg-0: #020617;
  --bg-1: #06132c;
  --bg-2: #082b55;
  --bg-3: #0a4d86;
  --panel: rgba(3, 10, 30, 0.72);
  --panel-strong: rgba(5, 15, 42, 0.88);
  --panel-border: rgba(76, 154, 229, 0.32);
  --panel-border-bright: rgba(34, 211, 238, 0.34);
  --topbar: rgba(6, 24, 57, 0.82);
  --primary: #169bd8;
  --primary-light: #26c6e8;
  --primary-deep: #0c6ea8;
  --cloud-shadow: rgba(34, 211, 238, 0.42);
  --text: #f8fafc;
  --muted: #bdd1ea;
  --input-bg: #edf4ff;
  --input-text: #0f172a;
  --danger: #ffd1d1;
  --warning: #ffe68a;
  --success: #94f7b5;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
}

body.login-body {
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  color: var(--text);
  background: var(--bg-0);
  font-family: Arial, Helvetica, sans-serif;
}

.login-sky,
.sky-gradient,
.sky-glow {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.login-sky {
  z-index: 0;
  background: var(--bg-0);
}

.sky-gradient {
  z-index: 0;
  background:
    radial-gradient(circle at 78% 22%, rgba(65, 189, 232, 0.22), transparent 23%),
    radial-gradient(circle at 32% 100%, rgba(12, 110, 168, 0.42), transparent 44%),
    linear-gradient(180deg, #061024 0%, #071d3a 50%, #082b55 100%);
}

.sky-gradient::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.014) 1px, transparent 1px);
  background-size: 92px 92px;
  mask-image: linear-gradient(180deg, transparent, #000 28%, #000 100%);
  opacity: 0.32;
}

.sky-glow-moon {
  z-index: 1;
  background: radial-gradient(circle at 90% 20%, rgba(204, 244, 255, 0.3), rgba(34, 199, 232, 0.12) 11%, transparent 30%);
}

.sky-glow-bottom {
  z-index: 1;
  background: radial-gradient(ellipse at 50% 100%, rgba(18, 91, 151, 0.52), transparent 55%);
}

.star {
  position: absolute;
  z-index: 2;
  width: var(--size);
  height: var(--size);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 calc(var(--size) * 3.5) rgba(255, 255, 255, 0.72);
  opacity: var(--opacity);
  animation: starTwinkle var(--duration) ease-in-out infinite alternate;
  animation-delay: var(--delay);
}

.star.is-soft {
  background: rgba(178, 225, 255, 0.88);
  box-shadow: 0 0 calc(var(--size) * 4) rgba(125, 211, 252, 0.42);
}

@keyframes starTwinkle {
  from {
    opacity: calc(var(--opacity) * 0.42);
    transform: scale(0.82);
  }
  to {
    opacity: 1;
    transform: scale(1.28);
  }
}

.shooting-star {
  position: absolute;
  z-index: 8;
  width: 190px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.98) 16%, rgba(255, 255, 255, 0.58) 44%, rgba(125, 211, 252, 0.2) 72%, transparent 100%);
  filter: drop-shadow(0 0 7px rgba(255, 255, 255, 0.76));
  opacity: 0;
  transform: rotate(-34deg);
  animation: shootingStar 3.2s linear forwards;
}

@keyframes shootingStar {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) rotate(-34deg);
  }
  9% {
    opacity: 1;
  }
  72% {
    opacity: 0.9;
  }
  100% {
    opacity: 0;
    transform: translate3d(-720px, 460px, 0) rotate(-34deg);
  }
}

.moon {
  position: fixed;
  top: clamp(44px, 10vh, 92px);
  right: clamp(44px, 7vw, 118px);
  z-index: 4;
  width: clamp(78px, 8vw, 122px);
  height: clamp(78px, 8vw, 122px);
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 28%, #ffffff 0%, #eff6ff 43%, #cbd5e1 100%);
  box-shadow:
    0 0 32px rgba(255, 255, 255, 0.82),
    0 0 88px rgba(125, 211, 252, 0.34),
    0 0 142px rgba(14, 165, 233, 0.18),
    inset -18px -18px 30px rgba(71, 85, 105, 0.34),
    inset 14px 14px 26px rgba(255, 255, 255, 0.58);
}

.moon::after {
  content: "";
  position: absolute;
  inset: -18%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.18), transparent 62%);
  filter: blur(2px);
}

.moon-crater {
  position: absolute;
  z-index: 1;
  display: block;
  border-radius: 999px;
  background: rgba(100, 116, 139, 0.36);
  box-shadow: inset 2px 2px 5px rgba(15, 23, 42, 0.14), inset -1px -1px 4px rgba(255, 255, 255, 0.42);
}

.moon-crater-1 { left: 24%; top: 28%; width: 17%; height: 17%; }
.moon-crater-2 { left: 59%; top: 22%; width: 13%; height: 13%; }
.moon-crater-3 { left: 47%; top: 52%; width: 22%; height: 22%; }
.moon-crater-4 { left: 26%; top: 65%; width: 11%; height: 11%; }
.moon-crater-5 { left: 69%; top: 70%; width: 15%; height: 15%; }
.moon-crater-6 { left: 39%; top: 44%; width: 9%; height: 9%; opacity: 0.72; }

.real-cloud {
  position: absolute;
  left: -55vw;
  top: var(--cloud-top);
  z-index: var(--cloud-z);
  width: var(--cloud-width);
  height: calc(var(--cloud-width) * 0.36);
  opacity: var(--cloud-opacity);
  filter: blur(var(--cloud-blur));
  animation: cloudMove var(--cloud-duration) linear infinite;
  animation-delay: var(--cloud-delay);
  will-change: transform;
}

.real-cloud svg {
  width: 100%;
  height: 100%;
  display: block;
}

@keyframes cloudMove {
  from {
    transform: translate3d(-45vw, 0, 0) scale(var(--cloud-scale));
  }
  to {
    transform: translate3d(150vw, 0, 0) scale(var(--cloud-scale));
  }
}

.login-page {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 28px 22px 26px;
}

.login-panel {
  width: min(100%, 420px);
}


.login-card {
  position: relative;
  isolation: isolate;
  width: 100%;
  padding: 38px 38px 34px;
  overflow: hidden;
  border: 1px solid var(--panel-border);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(7, 19, 48, 0.88), rgba(4, 11, 29, 0.82)),
    var(--panel);
  box-shadow:
    0 30px 82px rgba(0, 0, 0, 0.48),
    0 0 0 1px rgba(255, 255, 255, 0.025) inset,
    0 0 46px rgba(14, 165, 233, 0.1);
  backdrop-filter: blur(14px);
}

.login-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background:
    radial-gradient(circle at 16% 0%, rgba(34, 211, 238, 0.16), transparent 32%),
    radial-gradient(circle at 100% 100%, rgba(29, 78, 216, 0.14), transparent 36%);
}

.login-card-shine {
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  pointer-events: none;
}

.login-card-shine::after {
  content: "";
  position: absolute;
  top: -60%;
  left: -40%;
  width: 70%;
  height: 200%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.07), transparent);
  transform: rotate(18deg);
  animation: cardShine 8.5s ease-in-out infinite;
}

@keyframes cardShine {
  0%, 22% { transform: translateX(-140%) rotate(18deg); opacity: 0; }
  35% { opacity: 1; }
  58%, 100% { transform: translateX(280%) rotate(18deg); opacity: 0; }
}


.login-header {
  display: grid;
  grid-template-columns: 58px 1fr;
  grid-template-areas: "icon title";
  column-gap: 14px;
  align-items: center;
  margin: 0 0 30px;
}

.login-brand-icon {
  grid-area: icon;
  width: 58px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  filter:
    drop-shadow(0 0 10px rgba(34, 211, 238, 0.72))
    drop-shadow(0 0 22px rgba(14, 165, 233, 0.38));
}

.login-brand-icon svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}


.login-title {
  grid-area: title;
  margin: 0;
  color: #ffffff;
  font-size: clamp(24px, 3.1vw, 30px);
  font-weight: 900;
  letter-spacing: 0.12em;
  line-height: 1;
  text-shadow: 0 0 18px rgba(255, 255, 255, 0.14);
}

.field-label {
  display: block;
  margin: 0 0 8px;
  color: #f8fafc;
  font-size: 15px;
  font-weight: 800;
}

.field-input {
  width: 100%;
  height: 54px;
  margin: 0 0 18px;
  padding: 0 16px;
  border: 1px solid rgba(147, 197, 253, 0.32);
  border-radius: 12px;
  outline: none;
  background: var(--input-bg);
  color: var(--input-text);
  font-size: 16px;
  line-height: 1;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.1);
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.field-input::placeholder {
  color: rgba(15, 23, 42, 0.52);
}

.field-input:focus {
  border-color: var(--primary-light);
  box-shadow:
    0 0 0 4px rgba(34, 199, 232, 0.22),
    0 14px 26px rgba(0, 0, 0, 0.16);
  transform: translateY(-1px);
}

.login-button {
  width: 100%;
  height: 54px;
  margin-top: 14px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary-light), var(--primary) 58%, var(--primary-deep));
  box-shadow:
    0 14px 30px rgba(21, 151, 211, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  color: #ffffff;
  cursor: pointer;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 0.01em;
  transition: transform 140ms ease, box-shadow 140ms ease, opacity 140ms ease, filter 140ms ease;
}

.login-button:hover {
  transform: translateY(-2px);
  box-shadow:
    0 18px 38px rgba(21, 151, 211, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.42);
  filter: brightness(1.04);
}

.login-button:active {
  transform: translateY(0);
}

.login-button:disabled {
  cursor: wait;
  opacity: 0.72;
  transform: none;
}

.login-message {
  min-height: 22px;
  margin: 18px 0 0;
  color: var(--danger);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
}

.login-message.is-notice,
.login-message.is-error,
.login-message.is-success {
  padding: 11px 12px;
  border-radius: 12px;
}

.login-message.is-notice {
  border: 1px solid rgba(250, 204, 21, 0.34);
  background: rgba(250, 204, 21, 0.12);
  color: var(--warning);
}

.login-message.is-error {
  border: 1px solid rgba(248, 113, 113, 0.24);
  background: rgba(127, 29, 29, 0.18);
  color: var(--danger);
}

.login-message.is-success {
  border: 1px solid rgba(74, 222, 128, 0.28);
  background: rgba(22, 101, 52, 0.17);
  color: var(--success);
}

@media (max-width: 760px) {
  .login-page {
    padding: 24px 18px 22px;
  }

  .login-card {
    padding: 30px 24px 28px;
    border-radius: 18px;
  }

  .login-title {
    letter-spacing: 0.12em;
  }

  .moon {
    top: 42px;
    right: 30px;
  }
}

@media (max-width: 430px) {
  .login-panel {
    width: min(100%, 370px);
  }

  .login-header {
    grid-template-columns: 50px 1fr;
    column-gap: 12px;
    margin-bottom: 26px;
  }

  .login-brand-icon {
    width: 50px;
    height: 32px;
  }

  .login-title {
    font-size: 22px;
    letter-spacing: 0.08em;
  }
}

@media (max-height: 620px) {
  body.login-body {
    overflow-y: auto;
  }

  .login-page {
    align-items: start;
    padding-top: 20px;
  }

  .login-card {
    margin-bottom: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .star,
  .shooting-star,
  .real-cloud,
  .login-card-shine::after {
    animation: none !important;
  }

  .real-cloud {
    transform: translate3d(30vw, 0, 0) scale(var(--cloud-scale));
  }

  .login-button,
  .field-input {
    transition: none;
  }
}
