:root {
  --white: #ffffff;
  --text-soft: rgba(220, 218, 255, 0.72);
  --card-border: rgba(160, 210, 255, 0.28);
  --field-border: rgba(255, 255, 255, 0.16);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body.login-page {
  min-height: 100vh;
  font-family: "Segoe UI", Arial, sans-serif;
  color: var(--white);
  overflow: hidden;
  position: relative;
  background:
    radial-gradient(ellipse 55% 45% at 5% 5%,   rgba(60, 90, 255, 0.55), transparent),
    radial-gradient(ellipse 50% 40% at 90% 4%,   rgba(130, 80, 255, 0.50), transparent),
    radial-gradient(ellipse 60% 50% at 100% 100%, rgba(0, 220, 255, 0.45), transparent),
    radial-gradient(ellipse 45% 40% at 0% 90%,   rgba(180, 60, 255, 0.38), transparent),
    linear-gradient(170deg, #16104a 0%, #1c1560 30%, #1a1358 65%, #0e0a35 100%);
}

/* Bottom cyan light beam */
body.login-page::before {
  content: "";
  position: fixed;
  bottom: -60px; left: 50%;
  transform: translateX(-50%);
  width: 800px; height: 380px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(0, 230, 255, 0.38) 0%, transparent 68%);
  filter: blur(28px);
  pointer-events: none;
  z-index: 0;
}

/* Top-right purple glow */
body.login-page::after {
  content: "";
  position: fixed;
  top: -100px; right: -100px;
  width: 580px; height: 580px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(90, 50, 255, 0.35) 0%, transparent 65%);
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
  position: relative;
  z-index: 1;
}

.login-stage {
  width: min(760px, 100%);
  min-height: min(760px, calc(100vh - 56px));
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 0;
}

/* Brand */
.login-brand {
  display: flex; align-items: center; gap: 14px;
  z-index: 4; margin-bottom: 16px;
}

.login-brand-mark {
  width: 50px; height: 50px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 1.25rem; font-weight: 700; color: var(--white);
  background: linear-gradient(160deg, #3ee8ff 0%, #2870ff 100%);
  box-shadow: 0 0 0 3px rgba(170,240,255,0.35), 0 10px 36px rgba(40,130,255,0.4);
}

.login-brand h1 {
  font-size: 2.8rem; font-weight: 700;
  letter-spacing: -0.03em; line-height: 1;
  text-shadow: 0 6px 28px rgba(20,15,60,0.55);
}

/* Card */
.login-card {
  width: min(390px, 100%);
  position: relative; z-index: 3;
  padding: 24px 28px 24px;
  border-radius: 24px;
  border: 1px solid rgba(150, 200, 255, 0.26);
  background:
    radial-gradient(circle at 85% 8%,  rgba(150,80,255,0.16), transparent 30%),
    radial-gradient(circle at 80% 96%, rgba(30,210,255,0.14), transparent 28%),
    linear-gradient(160deg, rgba(16,24,80,0.58), rgba(18,22,78,0.40));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.12),
    0 28px 100px rgba(6,5,35,0.50);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
}

.login-card::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -42px; margin: auto;
  width: 76%; height: 84px; border-radius: 999px;
  background: rgba(50,235,255,0.13);
  filter: blur(38px); z-index: -1;
}

/* Heading */
.login-heading { text-align: center; margin-bottom: 20px; }

.login-heading h2 {
  font-size: 1.75rem; font-weight: 700;
  letter-spacing: -0.03em; line-height: 1.1;
}

.login-heading p {
  margin-top: 7px; font-size: 0.88rem;
  color: var(--text-soft); font-weight: 300;
}

/* Messages */
.login-messages { display: grid; gap: 8px; margin-bottom: 14px; }

.login-message {
  padding: 9px 12px; border-radius: 12px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--white); font-size: 0.91rem;
}

.login-message.error   { background: rgba(120,28,28,0.32); color: #ffe7e7; }
.login-message.success { background: rgba(9,105,84,0.28);  color: #e3fffb; }

/* Form */
.login-form { display: grid; gap: 12px; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* Fields */
.login-field {
  min-height: 48px;
  display: flex; align-items: center; gap: 14px;
  padding: 0 16px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,0.12), rgba(255,255,255,0.07));
  border: 1px solid rgba(255,255,255,0.15);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.login-field:focus-within {
  border-color: rgba(66,201,255,0.5);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 0 0 3px rgba(66,201,255,0.1);
}

/* Person icon */
.login-icon {
  position: relative; flex: none;
  width: 22px; height: 22px; opacity: 0.68;
}

.login-icon::before, .login-icon::after {
  content: ""; position: absolute;
  background: rgba(255,255,255,0.85);
}

.login-icon::before {
  width: 10px; height: 10px; border-radius: 50%; top: 0; left: 6px;
}

.login-icon::after {
  width: 18px; height: 8px; border-radius: 9px 9px 0 0; bottom: 0; left: 2px;
}

/* Lock icon */
.login-icon-lock {
  width: 18px; height: 20px;
  border: 2px solid rgba(255,255,255,0.72); border-radius: 5px;
}

.login-icon-lock::before {
  content: ""; position: absolute;
  width: 11px; height: 8px; left: 1px; top: -8px;
  border: 2px solid rgba(255,255,255,0.72);
  border-bottom: none; border-radius: 999px 999px 0 0;
}

.login-icon-lock::after {
  content: ""; position: absolute;
  width: 3px; height: 4px;
  background: rgba(255,255,255,0.72); border-radius: 999px;
  top: 6px; left: 5px;
}

.login-input {
  width: 100%; min-height: 44px;
  background: transparent; border: none; outline: none;
  color: var(--white); font: inherit; font-size: 1rem;
}

.login-input::placeholder { color: rgba(220,218,255,0.66); }

.password-toggle {
  flex: none;
  min-width: 44px;
  border: none;
  border-radius: 999px;
  padding: 6px 10px;
  cursor: pointer;
  color: rgba(255,255,255,0.9);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  background: rgba(255,255,255,0.1);
  transition: background 160ms ease, color 160ms ease;
}

.password-toggle:hover {
  background: rgba(85,223,255,0.18);
  color: var(--white);
}

/* Submit */
.login-submit {
  width: 100%; min-height: 48px;
  margin-top: 4px; border: none; border-radius: 999px;
  cursor: pointer; color: var(--white);
  font: inherit; font-size: 1.02rem; font-weight: 600;
  background: linear-gradient(180deg, #55dfff 0%, #2a8aff 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.28), 0 18px 50px rgba(42,120,255,0.4);
  transition: transform 180ms ease, filter 180ms ease, box-shadow 180ms ease;
}

.login-submit:hover {
  transform: translateY(-2px); filter: brightness(1.07);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.28), 0 24px 60px rgba(42,120,255,0.5);
}

.login-submit:active { transform: translateY(0); filter: brightness(0.97); }

/* Responsive */
@media (max-width: 900px) {
  .login-stage { min-height: calc(100vh - 36px); padding: 18px 0; }
  .login-brand { gap: 12px; margin-bottom: 16px; }
  .login-brand-mark { width: 56px; height: 56px; font-size: 1.4rem; }
  .login-brand h1 { font-size: 2.8rem; }
  .login-card { padding: 30px 20px 28px; border-radius: 26px; }
  .login-heading h2 { font-size: 2rem; }
  .login-field { min-height: 60px; border-radius: 15px; }
  .login-input { min-height: 56px; font-size: 0.96rem; }
  .login-submit { min-height: 62px; font-size: 1.1rem; }
}
